diff --git a/creator/packages/mongo/oplog_observe_driver.js b/creator/packages/mongo/oplog_observe_driver.js index 113bbc93c8..c0e3c52a9d 100644 --- a/creator/packages/mongo/oplog_observe_driver.js +++ b/creator/packages/mongo/oplog_observe_driver.js @@ -1,3 +1,5 @@ +import { oplogV2V1Converter } from './oplog_v2_converter'; + var Future = Npm.require('fibers/future'); var PHASE = { @@ -598,11 +600,16 @@ _.extend(OplogObserveDriver.prototype, { if (self._matcher.documentMatches(op.o).result) self._addMatching(op.o); } else if (op.op === 'u') { + // we are mapping the new oplog format on mongo 5 + // to what we know better, $set + op.o = oplogV2V1Converter(op.o) // Is this a modifier ($set/$unset, which may require us to poll the // database to figure out if the whole document matches the selector) or // a replacement (in which case we can just directly re-evaluate the // selector)? - var isReplace = !_.has(op.o, '$set') && !_.has(op.o, '$unset'); + // oplog format has changed on mongodb 5, we have to support both now + // diff is the format in Mongo 5+ (oplog v2) + var isReplace = !_.has(op.o, '$set') && !_.has(op.o, 'diff') && !_.has(op.o, '$unset'); // If this modifier modifies something inside an EJSON custom type (ie, // anything with EJSON$), then we can't try to use // LocalCollection._modify, since that just mutates the EJSON encoding, diff --git a/creator/packages/mongo/oplog_v2_converter.js b/creator/packages/mongo/oplog_v2_converter.js new file mode 100644 index 0000000000..f82750834b --- /dev/null +++ b/creator/packages/mongo/oplog_v2_converter.js @@ -0,0 +1,105 @@ + + +function join(prefix, key) { + return prefix ? `${prefix}.${key}` : key; +} + +const arrayOperatorKeyRegex = /^(a|[su]\d+)$/; + +function isArrayOperatorKey(field) { + return arrayOperatorKeyRegex.test(field); +} + +function isArrayOperator(operator) { + return operator.a === true && Object.keys(operator).every(isArrayOperatorKey); +} + +function flattenObjectInto(target, source, prefix) { + if (Array.isArray(source) || typeof source !== 'object' || source === null || + source instanceof Mongo.ObjectID) { + target[prefix] = source; + } else { + const entries = Object.entries(source); + if (entries.length) { + entries.forEach(([key, value]) => { + flattenObjectInto(target, value, join(prefix, key)); + }); + } else { + target[prefix] = source; + } + } +} + +const logDebugMessages = !!process.env.OPLOG_CONVERTER_DEBUG; + +function convertOplogDiff(oplogEntry, diff, prefix) { + if (logDebugMessages) { + console.log(`convertOplogDiff(${JSON.stringify(oplogEntry)}, ${JSON.stringify(diff)}, ${JSON.stringify(prefix)})`); + } + + Object.entries(diff).forEach(([diffKey, value]) => { + if (diffKey === 'd') { + // Handle `$unset`s. + if (oplogEntry.$unset === null || oplogEntry.$unset === undefined) { + oplogEntry.$unset = {}; + } + Object.keys(value).forEach(key => { + oplogEntry.$unset[join(prefix, key)] = true; + }); + } else if (diffKey === 'i') { + // Handle (potentially) nested `$set`s. + if (oplogEntry.$set === null || oplogEntry.$set === undefined) { + oplogEntry.$set = {}; + } + flattenObjectInto(oplogEntry.$set, value, prefix); + } else if (diffKey === 'u') { + // Handle flat `$set`s. + if (oplogEntry.$set === null || oplogEntry.$set === undefined) { + oplogEntry.$set = {}; + } + Object.entries(value).forEach(([key, value]) => { + oplogEntry.$set[join(prefix, key)] = value; + }); + } else { + // Handle s-fields. + const key = diffKey.slice(1); + if (isArrayOperator(value)) { + // Array operator. + Object.entries(value).forEach(([position, value]) => { + if (position === 'a') { + return; + } + + const positionKey = join(join(prefix, key), position.slice(1)); + if (position[0] === 's') { + convertOplogDiff(oplogEntry, value, positionKey); + } else if (value === null) { + if (oplogEntry.$unset === null || oplogEntry.$unset === undefined) { + oplogEntry.$unset = {}; + } + oplogEntry.$unset[positionKey] = true; + } else { + if (oplogEntry.$set === null || oplogEntry.$set === undefined) { + oplogEntry.$set = {}; + } + oplogEntry.$set[positionKey] = value; + } + }); + } else if (key) { + // Nested object. + convertOplogDiff(oplogEntry, value, join(prefix, key)); + } + } + }); +} + +export function oplogV2V1Converter(oplogEntry) { + // Pass-through v1 and (probably) invalid entries. + if (oplogEntry.$v !== 2 || !oplogEntry.diff) { + return oplogEntry; + } + + const convertedOplogEntry = { $v: 2 }; + convertOplogDiff(convertedOplogEntry, oplogEntry.diff, ''); + return convertedOplogEntry; +} \ No newline at end of file diff --git a/creator/packages/mongo/package.js b/creator/packages/mongo/package.js index 2e0dd34025..82c8e8a5fc 100644 --- a/creator/packages/mongo/package.js +++ b/creator/packages/mongo/package.js @@ -74,7 +74,7 @@ Package.onUse(function (api) { api.addFiles(['mongo_driver.js', 'oplog_tailing.js', 'observe_multiplex.js', 'doc_fetcher.js', - 'polling_observe_driver.js','oplog_observe_driver.js'], + 'polling_observe_driver.js','oplog_observe_driver.js', 'oplog_v2_converter.js'], 'server'); api.addFiles('local_collection_driver.js', ['client', 'server']); api.addFiles('remote_collection_driver.js', 'server'); diff --git a/server/bundle/programs/server/packages/aldeed_tabular.js b/server/bundle/programs/server/packages/aldeed_tabular.js index cf4d01e0a5..51f3518635 100644 --- a/server/bundle/programs/server/packages/aldeed_tabular.js +++ b/server/bundle/programs/server/packages/aldeed_tabular.js @@ -18,7 +18,7 @@ var Deps = Package.tracker.Deps; var HTML = Package.htmljs.HTML; /* Package-scope variables */ -var Tabular; +var Tabular, getPubSelector, tableInit, Util; (function(){ diff --git a/server/bundle/programs/server/packages/matb33_collection-hooks.js b/server/bundle/programs/server/packages/matb33_collection-hooks.js index 03d898a9a9..2594563032 100644 --- a/server/bundle/programs/server/packages/matb33_collection-hooks.js +++ b/server/bundle/programs/server/packages/matb33_collection-hooks.js @@ -14,16 +14,16 @@ var LocalCollection = Package.minimongo.LocalCollection; var Minimongo = Package.minimongo.Minimongo; /* Package-scope variables */ -var CollectionHooks; +var CollectionHooks, InsecureLogin; (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/matb33_collection-hooks/collection-hooks.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/matb33_collection-hooks/collection-hooks.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // /* global Package Meteor Mongo LocalCollection CollectionHooks _ EJSON */ /* eslint-disable no-proto, no-native-reassign, no-global-assign */ @@ -341,7 +341,7 @@ if (Meteor.isServer) { } } -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -352,12 +352,12 @@ if (Meteor.isServer) { (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/matb33_collection-hooks/insert.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/matb33_collection-hooks/insert.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // /* global CollectionHooks _ EJSON Mongo */ CollectionHooks.defineAdvice('insert', function (userId, _super, instance, aspects, getTransform, args, suppressAspects) { @@ -422,7 +422,7 @@ CollectionHooks.defineAdvice('insert', function (userId, _super, instance, aspec } }) -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -433,12 +433,12 @@ CollectionHooks.defineAdvice('insert', function (userId, _super, instance, aspec (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/matb33_collection-hooks/update.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/matb33_collection-hooks/update.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // /* global CollectionHooks _ EJSON */ CollectionHooks.defineAdvice('update', function (userId, _super, instance, aspects, getTransform, args, suppressAspects) { @@ -533,7 +533,7 @@ CollectionHooks.defineAdvice('update', function (userId, _super, instance, aspec } }) -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -544,12 +544,12 @@ CollectionHooks.defineAdvice('update', function (userId, _super, instance, aspec (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/matb33_collection-hooks/remove.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/matb33_collection-hooks/remove.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // /* global CollectionHooks _ EJSON */ CollectionHooks.defineAdvice('remove', function (userId, _super, instance, aspects, getTransform, args, suppressAspects) { @@ -615,7 +615,7 @@ CollectionHooks.defineAdvice('remove', function (userId, _super, instance, aspec } }) -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -626,12 +626,12 @@ CollectionHooks.defineAdvice('remove', function (userId, _super, instance, aspec (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/matb33_collection-hooks/upsert.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/matb33_collection-hooks/upsert.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // /* global CollectionHooks _ EJSON */ CollectionHooks.defineAdvice('upsert', function (userId, _super, instance, aspectGroup, getTransform, args, suppressAspects) { @@ -747,7 +747,7 @@ CollectionHooks.defineAdvice('upsert', function (userId, _super, instance, aspec } }) -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -758,12 +758,12 @@ CollectionHooks.defineAdvice('upsert', function (userId, _super, instance, aspec (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/matb33_collection-hooks/find.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/matb33_collection-hooks/find.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // /* global CollectionHooks _ */ CollectionHooks.defineAdvice('find', function (userId, _super, instance, aspects, getTransform, args, suppressAspects) { @@ -801,7 +801,7 @@ CollectionHooks.defineAdvice('find', function (userId, _super, instance, aspects return ret }) -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -812,12 +812,12 @@ CollectionHooks.defineAdvice('find', function (userId, _super, instance, aspects (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/matb33_collection-hooks/findone.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/matb33_collection-hooks/findone.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // /* global CollectionHooks _ */ CollectionHooks.defineAdvice('findOne', function (userId, _super, instance, aspects, getTransform, args, suppressAspects) { @@ -855,7 +855,7 @@ CollectionHooks.defineAdvice('findOne', function (userId, _super, instance, aspe return ret }) -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -866,12 +866,12 @@ CollectionHooks.defineAdvice('findOne', function (userId, _super, instance, aspe (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/matb33_collection-hooks/users-compat.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/matb33_collection-hooks/users-compat.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // /* global CollectionHooks Meteor Mongo */ if (Meteor.users) { @@ -883,7 +883,7 @@ if (Meteor.users) { CollectionHooks.extendCollectionInstance(Meteor.users, Collection) } -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); diff --git a/server/bundle/programs/server/packages/modules.js b/server/bundle/programs/server/packages/modules.js index 2718097f9f..263f106533 100644 --- a/server/bundle/programs/server/packages/modules.js +++ b/server/bundle/programs/server/packages/modules.js @@ -463,7 +463,7 @@ module.useNode(); // module.exports = { "name": "@steedos/objectql", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "lib/index.js" }; @@ -490,7 +490,7 @@ module.useNode(); // module.exports = { "name": "@steedos/i18n", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "lib/index.js" }; @@ -517,7 +517,7 @@ module.useNode(); // module.exports = { "name": "@steedos/core", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "lib/index.js" }; @@ -544,7 +544,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-meteor-package-loader", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "index.js" }; @@ -571,7 +571,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-api", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "index.js" }; @@ -598,7 +598,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-metadata-server", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "index.js" }; @@ -625,7 +625,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-package-registry", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "package.service.js" }; @@ -652,7 +652,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-objectql", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "package.service.js" }; @@ -679,7 +679,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-ui", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "package.service.js" }; @@ -706,7 +706,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-pages", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "package.service.js" }; @@ -733,7 +733,7 @@ module.useNode(); // module.exports = { "name": "@steedos/router", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "lib/index.js" }; @@ -760,7 +760,7 @@ module.useNode(); // module.exports = { "name": "@steedos/auth", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "lib/index.js" }; @@ -787,7 +787,7 @@ module.useNode(); // module.exports = { "name": "@steedos/workflow", - "version": "2.7.4-beta.10", + "version": "2.7.11", "main": "index.js" }; diff --git a/server/bundle/programs/server/packages/mongo.js b/server/bundle/programs/server/packages/mongo.js index 2978076b1c..69decc87a8 100644 --- a/server/bundle/programs/server/packages/mongo.js +++ b/server/bundle/programs/server/packages/mongo.js @@ -2391,7 +2391,7 @@ _.extend(PollingObserveDriver.prototype, { }); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -},"oplog_observe_driver.js":function module(require){ +},"oplog_observe_driver.js":function module(require,exports,module){ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // @@ -2399,6 +2399,14 @@ _.extend(PollingObserveDriver.prototype, { // // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // +let oplogV2V1Converter; +module.link("./oplog_v2_converter", { + oplogV2V1Converter(v) { + oplogV2V1Converter = v; + } + +}, 0); + var Future = Npm.require('fibers/future'); var PHASE = { @@ -2963,11 +2971,16 @@ _.extend(OplogObserveDriver.prototype, { if (self._matcher.documentMatches(op.o).result) self._addMatching(op.o); } else if (op.op === 'u') { - // Is this a modifier ($set/$unset, which may require us to poll the + // we are mapping the new oplog format on mongo 5 + // to what we know better, $set + op.o = oplogV2V1Converter(op.o); // Is this a modifier ($set/$unset, which may require us to poll the // database to figure out if the whole document matches the selector) or // a replacement (in which case we can just directly re-evaluate the // selector)? - var isReplace = !_.has(op.o, '$set') && !_.has(op.o, '$unset'); // If this modifier modifies something inside an EJSON custom type (ie, + // oplog format has changed on mongodb 5, we have to support both now + // diff is the format in Mongo 5+ (oplog v2) + + var isReplace = !_.has(op.o, '$set') && !_.has(op.o, 'diff') && !_.has(op.o, '$unset'); // If this modifier modifies something inside an EJSON custom type (ie, // anything with EJSON$), then we can't try to use // LocalCollection._modify, since that just mutates the EJSON encoding, // not the actual object. @@ -3353,6 +3366,138 @@ var modifierCanBeDirectlyApplied = function (modifier) { MongoInternals.OplogObserveDriver = OplogObserveDriver; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +},"oplog_v2_converter.js":function module(require,exports,module){ + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/mongo/oplog_v2_converter.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +module.export({ + oplogV2V1Converter: () => oplogV2V1Converter +}); + +function join(prefix, key) { + return prefix ? "".concat(prefix, ".").concat(key) : key; +} + +const arrayOperatorKeyRegex = /^(a|[su]\d+)$/; + +function isArrayOperatorKey(field) { + return arrayOperatorKeyRegex.test(field); +} + +function isArrayOperator(operator) { + return operator.a === true && Object.keys(operator).every(isArrayOperatorKey); +} + +function flattenObjectInto(target, source, prefix) { + if (Array.isArray(source) || typeof source !== 'object' || source === null || source instanceof Mongo.ObjectID) { + target[prefix] = source; + } else { + const entries = Object.entries(source); + + if (entries.length) { + entries.forEach((_ref) => { + let [key, value] = _ref; + flattenObjectInto(target, value, join(prefix, key)); + }); + } else { + target[prefix] = source; + } + } +} + +const logDebugMessages = !!process.env.OPLOG_CONVERTER_DEBUG; + +function convertOplogDiff(oplogEntry, diff, prefix) { + if (logDebugMessages) { + console.log("convertOplogDiff(".concat(JSON.stringify(oplogEntry), ", ").concat(JSON.stringify(diff), ", ").concat(JSON.stringify(prefix), ")")); + } + + Object.entries(diff).forEach((_ref2) => { + let [diffKey, value] = _ref2; + + if (diffKey === 'd') { + // Handle `$unset`s. + if (oplogEntry.$unset === null || oplogEntry.$unset === undefined) { + oplogEntry.$unset = {}; + } + + Object.keys(value).forEach(key => { + oplogEntry.$unset[join(prefix, key)] = true; + }); + } else if (diffKey === 'i') { + // Handle (potentially) nested `$set`s. + if (oplogEntry.$set === null || oplogEntry.$set === undefined) { + oplogEntry.$set = {}; + } + + flattenObjectInto(oplogEntry.$set, value, prefix); + } else if (diffKey === 'u') { + // Handle flat `$set`s. + if (oplogEntry.$set === null || oplogEntry.$set === undefined) { + oplogEntry.$set = {}; + } + + Object.entries(value).forEach((_ref3) => { + let [key, value] = _ref3; + oplogEntry.$set[join(prefix, key)] = value; + }); + } else { + // Handle s-fields. + const key = diffKey.slice(1); + + if (isArrayOperator(value)) { + // Array operator. + Object.entries(value).forEach((_ref4) => { + let [position, value] = _ref4; + + if (position === 'a') { + return; + } + + const positionKey = join(join(prefix, key), position.slice(1)); + + if (position[0] === 's') { + convertOplogDiff(oplogEntry, value, positionKey); + } else if (value === null) { + if (oplogEntry.$unset === null || oplogEntry.$unset === undefined) { + oplogEntry.$unset = {}; + } + + oplogEntry.$unset[positionKey] = true; + } else { + if (oplogEntry.$set === null || oplogEntry.$set === undefined) { + oplogEntry.$set = {}; + } + + oplogEntry.$set[positionKey] = value; + } + }); + } else if (key) { + // Nested object. + convertOplogDiff(oplogEntry, value, join(prefix, key)); + } + } + }); +} + +function oplogV2V1Converter(oplogEntry) { + // Pass-through v1 and (probably) invalid entries. + if (oplogEntry.$v !== 2 || !oplogEntry.diff) { + return oplogEntry; + } + + const convertedOplogEntry = { + $v: 2 + }; + convertOplogDiff(convertedOplogEntry, oplogEntry.diff, ''); + return convertedOplogEntry; +} +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + },"local_collection_driver.js":function module(require,exports,module){ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -4273,6 +4418,7 @@ require("/node_modules/meteor/mongo/observe_multiplex.js"); require("/node_modules/meteor/mongo/doc_fetcher.js"); require("/node_modules/meteor/mongo/polling_observe_driver.js"); require("/node_modules/meteor/mongo/oplog_observe_driver.js"); +require("/node_modules/meteor/mongo/oplog_v2_converter.js"); require("/node_modules/meteor/mongo/local_collection_driver.js"); require("/node_modules/meteor/mongo/remote_collection_driver.js"); require("/node_modules/meteor/mongo/collection.js"); @@ -4287,4 +4433,4 @@ Package._define("mongo", { })(); //# sourceURL=meteor://💻app/packages/mongo.js -//# sourceMappingURL=data:application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PSBkYi5zZXJ2ZXJDb25maWcuaXNNYXN0ZXJEb2MucHJpbWFyeTtcbiAgICAgICAgfVxuXG4gICAgICAgIGRiLnNlcnZlckNvbmZpZy5vbihcbiAgICAgICAgICAnam9pbmVkJywgTWV0ZW9yLmJpbmRFbnZpcm9ubWVudChmdW5jdGlvbiAoa2luZCwgZG9jKSB7XG4gICAgICAgICAgICBpZiAoa2luZCA9PT0gJ3ByaW1hcnknKSB7XG4gICAgICAgICAgICAgIGlmIChkb2MucHJpbWFyeSAhPT0gc2VsZi5fcHJpbWFyeSkge1xuICAgICAgICAgICAgICAgIHNlbGYuX3ByaW1hcnkgPSBkb2MucHJpbWFyeTtcbiAgICAgICAgICAgICAgICBzZWxmLl9vbkZhaWxvdmVySG9vay5lYWNoKGZ1bmN0aW9uIChjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soKTtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGRvYy5tZSA9PT0gc2VsZi5fcHJpbWFyeSkge1xuICAgICAgICAgICAgICAvLyBUaGUgdGhpbmcgd2UgdGhvdWdodCB3YXMgcHJpbWFyeSBpcyBub3cgc29tZXRoaW5nIG90aGVyIHRoYW5cbiAgICAgICAgICAgICAgLy8gcHJpbWFyeS4gIEZvcmdldCB0aGF0IHdlIHRob3VnaHQgaXQgd2FzIHByaW1hcnkuICAoVGhpcyBtZWFuc1xuICAgICAgICAgICAgICAvLyB0aGF0IGlmIGEgc2VydmVyIHN0b3BzIGJlaW5nIHByaW1hcnkgYW5kIHRoZW4gc3RhcnRzIGJlaW5nXG4gICAgICAgICAgICAgIC8vIHByaW1hcnkgYWdhaW4gd2l0aG91dCBhbm90aGVyIHNlcnZlciBiZWNvbWluZyBwcmltYXJ5IGluIHRoZVxuICAgICAgICAgICAgICAvLyBtaWRkbGUsIHdlJ2x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bW9kKTtcblxuICB2YXIgdHJpZXMgPSBOVU1fT1BUSU1JU1RJQ19UUklFUztcblxuICB2YXIgZG9VcGRhdGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgdHJpZXMtLTtcbiAgICBpZiAoISB0cmllcykge1xuICAgICAgY2FsbGJhY2sobmV3IEVycm9yKFwiVXBzZXJ0IGZhaWxlZCBhZnRlciBcIiArIE5VTV9PUFRJTUlTVElDX1RSSUVTICsgXCIgdHJpZXMuXCIpKTtcbiAgICB9IGVsc2Uge1xuICAgICAgY29sbGVjdGlvbi51cGRhdGUoc2VsZWN0b3IsIG1vZCwgbW9uZ29PcHRzRm9yVXBkYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgYmluZEVudmlyb25tZW50Rm9yV3JpdGUoZnVuY3Rpb24gKGVyciwgcmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlc3VsdCAmJiByZXN1bHQucmVzdWx0Lm4gIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKG51bGwsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bWJlckFmZmVjdGVkOiByZXN1bHQucmVzdWx0Lm5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb0NvbmRpdGlvbmFsSW5zZXJ0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICB9XG4gIH07XG5cbiAgdmFyIGRvQ29uZGl0aW9uYWxJbnNlcnQgPSBmdW5jdGlvbiAoKSB7XG4gICAgY29sbGVjdGlvbi51cGRhdGUoc2VsZWN0b3IsIHJlcGxhY2VtZW50V2l0aElkLCBtb25nb09wdHNGb3JJbnNlcnQsXG4gICAgICAgICAgICAgICAgICAgICAgYmluZEVudmlyb25tZW50Rm9yV3JpdGUoZnVuY3Rpb24gKGVyciwgcmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZpZ3VyZSBvdXQgaWYgdGhpcyBpcyBhXG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFwiY2Fubm90IGNoYW5nZSBfaWQgb2YgZG9jdW1lbnRcIiBlcnJvciwgYW5kXG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIHNvLCB0cnkgZG9VcGRhdGUoKSBhZ2FpbiwgdXAgdG8gMyB0aW1lcy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE1vbmdvQ29ubmVjdGlvbi5faXNDYW5ub3RDaGFuZ2VJZEVycm9yKGVycikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb1VwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKGVycik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKG51bGwsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1iZXJBZmZlY3RlZDogcmVzdWx0LnJlc3VsdC51cHNlcnRlZC5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5zZXJ0ZWRJZDogaW5zZXJ0ZWRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICA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b25zLlxuICAgICAgZnVuY3Rpb24gaGFuZGxlRG9jKGRvYykge1xuICAgICAgICBpZiAoZG9jLm5zID09PSBcImFkbWluLiRjbWRcIikge1xuICAgICAgICAgIGlmIChkb2Muby5hcHBseU9wcykge1xuICAgICAgICAgICAgLy8gVGhpcyB3YXMgYSBzdWNjZXNzZnVsIHRyYW5zYWN0aW9uLCBzbyB3ZSBuZWVkIHRvIGFwcGx5IHRoZVxuICAgICAgICAgICAgLy8gb3BlcmF0aW9ucyB0aGF0IHdlcmUgaW52b2x2ZWQuXG4gICAgICAgICAgICBsZXQgbmV4dFRpbWVzdGFtcCA9IGRvYy50cztcbiAgICAgICAgICAgIGRvYy5vLmFwcGx5T3BzLmZvckVhY2gob3AgPT4ge1xuICAgICAgICAgICAgICAvLyBTZWUgaHR0cHM6Ly9naXRodWIuY29tL21ldGVvci9tZXRlb3IvaXNzdWVzLzEwNDIwLlxuICAgICAgICAgICAgICBpZiAoIW9wLnRzKSB7XG4gICAgICAgICAgICAgICAgb3AudHMgPSBuZXh0VGltZXN0YW1wO1xuICAgICAgICAgICAgICAgIG5leHRUaW1lc3RhbXAgPSBuZXh0VGltZXN0YW1wLmFkZChUaW1lc3RhbXAuT05FKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBoYW5kbGVEb2Mob3ApO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlVua25vd24gY29tbWFuZCBcIiArIEVKU09OLnN0cmluZ2lmeShkb2MpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyaWdnZXIgPSB7XG4gICAgICAgICAgZHJvcENvbGxlY3Rpb246IGZhbHNlLFxuICAgICAgICAgIGRyb3BEYXRhYmFzZTogZmFsc2UsXG4gICAgICAgICAgb3A6IGRvYyxcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAodHlwZW9mIGRvYy5ucyA9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tcbiAgICAgICAgICAgIHdhaXRpbmcrKztcbiAgICAgICAgICAgIHNlbGYuX21vbmdvSGFuZGxlLl9kb2NGZXRjaGVyLmZldGNoKFxuICAgICAgICAgICAgICBzZWxmLl9jdXJzb3JEZXNjcmlwdGlvbi5jb2xsZWN0aW9uTmFtZSwgaWQsIG9wLFxuICAgICAgICAgICAgICBmaW5pc2hJZk5lZWRUb1BvbGxRdWVyeShmdW5jdGlvbiAoZXJyLCBkb2MpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICBNZXRlb3IuX2RlYnVnKFwiR290IGV4Y2VwdGlvbiB3aGlsZSBmZXRjaGluZyBkb2N1bWVudHNcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnIpO1xuICAgICAgICAgICAgICAgICAgICAvLyBJZiB3ZSBnZXQgYW4gZXJyb3IgZnJvbSB0aGUgZmV0Y2hlciAoZWcsIHRyb3VibGVcbiAgICAgICAgICAgICAgICAgICAgLy8gY29ubmVjdGluZyB0byBNb25nbyksIGxldCdzIGp1c3QgYWJhbmRvbiB0aGUgZmV0Y2ggcGhhc2VcbiAgICAgICAgICAgICAgICAgICAgLy8gYWx0b2dldGhlciBhbmQgZmFsbCBiYWNrIHRvIHBvbGxpbmcuIEl0J3Mgbm90IGxpa2Ugd2UncmVcbiAgICAgICAgICAgICAgICAgICAgLy8gZ2V0dGluZyBsaXZlIHVwZGF0ZXMgYW55d2F5LlxuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5fcGhhc2UgIT09IFBIQVNFLlFVRVJZSU5HKSB7XG4gICAgICAgICAgICAgICAgICAgICAgc2VsZi5fbmVlZFRvUG9sbFF1ZXJ5KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoIXNlbGYuX3N0b3BwZWQgJiYgc2VsZi5fcGhhc2UgPT09IFBIQVNFLkZFVENISU5HXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHNlbGYuX2ZldGNoR2VuZXJhdGlvbiA9PT0gdGhpc0dlbmVyYXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gV2UgcmUtY2hlY2sgdGhlIGdlbmVyYXRpb24gaW4gY2FzZSB3ZSd2ZSBoYWQgYW4gZXhwbGljaXRcbiAgICAgICAgICAgICAgICAgICAgLy8gX3BvbGxRdWVyeSBjYWxsIChlZywgaW4gYW5vdGhlciBmaWJlcikgd2hpY2ggc2hvdWxkXG4gICAgICAgICAgICAgICAgICAgIC8vIGVmZmVjdGl2ZWx5IGNhbmNlbCB0aGlzIHJvdW5kIG9mIGZldGNoZXMuICAoX3BvbGxRdWVyeVxuICAgICAgICAgICAgICAgICAgICAvLyBpbmNyZW1lbnRzIHRoZSBnZW5lcmF0aW9uLilcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5faGFuZGxlRG9jKGlkLCBkb2MpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICB3YWl0aW5nLS07XG4gICAgICAgICAgICAgICAgICAvLyBCZWNhdXNlIGZldGNoKCkgbmV2ZXIgY2FsbHMgaXRzIGNhbGxiYWNrIHN5bmNocm9ub3VzbHksXG4gICAgICAgICAgICAgICAgICAvLyB0aGlzIGlzIHNhZmUgKGllLCB3ZSB3b24ndCBjYWxsIGZ1dC5yZXR1cm4oKSBiZWZvcmUgdGhlXG4gICAgICAgICAgICAgICAgICAvLyBmb3JFYWNoIGlzIGRvbmUpLlxuICAgICAgICAgICAgICAgICAgaWYgKHdhaXRpbmcgPT09IDApXG4gICAgICAgICAgICAgICAgICAgIGZ1dC5yZXR1cm4oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICBmdXQud2FpdCgpO1xuICAgIC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ZW50IGlzLCBzbyB3ZSBjYW4gYXBwbHlcbiAgICAgICAgICAvLyB0aGlzIGRpcmVjdGx5LlxuICAgICAgICAgIHZhciBuZXdEb2MgPSBzZWxmLl9wdWJsaXNoZWQuaGFzKGlkKVxuICAgICAgICAgICAgPyBzZWxmLl9wdWJsaXNoZWQuZ2V0KGlkKSA6IHNlbGYuX3VucHVibGlzaGVkQnVmZmVyLmdldChpZCk7XG4gICAgICAgICAgbmV3RG9jID0gRUpTT04uY2xvbmUobmV3RG9jKTtcblxuICAgICAgICAgIG5ld0RvYy5faWQgPSBpZDtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgTG9jYWxDb2xsZWN0aW9uLl9tb2RpZnkobmV3RG9jLCBvcC5vKTtcbiAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBpZiAoZS5uYW1lICE9PSBcIk1pbmltb25nb0Vycm9yXCIpXG4gICAgICAgICAgICAgIHRocm93IGU7XG4gICAgICAgICAgICAvLyBXZSBkaWRuJ3QgdW5kZXJzdGFuZCB0aGUgbW9kaWZpZXIuICBSZS1mZXRjaC5cbiAgICAgICAgICAgIHNlbGYuX25lZWRUb0ZldGNoLnNldChpZCwgb3ApO1xuICAgICAgICAgICAgaWYgKHNlbGYuX3BoYXNlID09PSBQSEFTRS5TVEVBRFkpIHtcbiAgICAgICAgICAgICAgc2VsZi5fZmV0Y2hNb2RpZmllZERvY3VtZW50cygpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgIH1cbiAgICAgICAgICBzZWxmLl9oYW5kbGVEb2MoaWQsIHNlbGYuX3NoYXJlZFByb2plY3Rpb25GbihuZXdEb2MpKTtcbiAgICAgICAgfSBlbHNlIGlmICghY2FuRGlyZWN0bHlNb2RpZnlEb2MgfHxcbiAgICAgICAgICAgICAgICAgICBzZWxmLl9tYXRjaGVyLmNhbkJlY29tZVRydWVCeU1vZGlmaWVyKG9wLm8pIHx8XG4gICAg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VkIHRvIGZpbmQgYSBkb2N1bWVudCBhbHJlYWR5IHByZXNlbnQgZm9yIHJlbW92ZWRcIik7XG4gICAgICAgICAgc2VsZi5fY29sbGVjdGlvbi5yZW1vdmUobW9uZ29JZCk7XG4gICAgICAgIH0gZWxzZSBpZiAobXNnLm1zZyA9PT0gJ2NoYW5nZWQnKSB7XG4gICAgICAgICAgaWYgKCFkb2MpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJFeHBlY3RlZCB0byBmaW5kIGEgZG9jdW1lbnQgdG8gY2hhbmdlXCIpO1xuICAgICAgICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyhtc2cuZmllbGRzKTtcbiAgICAgICAgICBpZiAoa2V5cy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICB2YXIgbW9kaWZpZXIgPSB7fTtcbiAgICAgICAgICAgIGtleXMuZm9yRWFjaChrZXkgPT4ge1xuICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IG1zZy5maWVsZHNba2V5XTtcbiAgICAgICAgICAgICAgaWYgKEVKU09OLmVxdWFscyhkb2Nba2V5XSwgdmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICAgICAgICAgICAgICBpZiAoIW1vZGlmaWVyLiR1bnNldCkge1xuICAgICAgICAgICAgICAgICAgbW9kaWZpZXIuJHVuc2V0ID0ge307XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG1vZGlmaWVyLiR1bnNldFtrZXldID0gMTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoIW1vZGlmaWVyLiRzZXQpIHtcbiAgICAgICAgICAgICAgICAgIG1vZGlmaWVyLiRzZXQgPSB7fTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICA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b25nb09wdHNGb3JVcGRhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBiaW5kRW52aXJvbm1lbnRGb3JXcml0ZShmdW5jdGlvbiAoZXJyLCByZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKGVycik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzdWx0ICYmIHJlc3VsdC5yZXN1bHQubiAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sobnVsbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyQWZmZWN0ZWQ6IHJlc3VsdC5yZXN1bHQublxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvQ29uZGl0aW9uYWxJbnNlcnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgIH1cbiAgfTtcblxuICB2YXIgZG9Db25kaXRpb25hbEluc2VydCA9IGZ1bmN0aW9uICgpIHtcbiAgICBjb2xsZWN0aW9uLnVwZGF0ZShzZWxlY3RvciwgcmVwbGFjZW1lbnRXaXRoSWQsIG1vbmdvT3B0c0Zvckluc2VydCxcbiAgICAgICAgICAgICAgICAgICAgICBiaW5kRW52aXJvbm1lbnRGb3JXcml0ZShmdW5jdGlvbiAoZXJyLCByZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZmlndXJlIG91dCBpZiB0aGlzIGlzIGFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gXCJjYW5ub3QgY2hhbmdlIF9pZCBvZiBkb2N1bWVudFwiIGVycm9yLCBhbmRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgc28sIHRyeSBkb1VwZGF0ZSgpIGFnYWluLCB1cCB0byAzIHRpbWVzLlxuICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoTW9uZ29Db25uZWN0aW9uLl9pc0Nhbm5vdENoYW5nZUlkRXJyb3IoZXJyKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvVXBkYXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2soZXJyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sobnVsbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bWJlckFmZmVjdGVkOiByZXN1bHQucmVzdWx0LnVwc2VydGVkLmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnNlcnRlZElkOiBpbnNlcnRlZElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9KSk7XG4gIH07XG5cbiAgZG9VcGRhdGUoKTtcbn07XG5cbl8uZWFjaChbXCJpbnNlcnRcIiwgXCJ1cGRhdGVcIiwgXCJyZW1vdmVcIiwgXCJkcm9wQ29sbGVjdGlvblwiLCBcImRyb3BEYXRhYmFzZVwiXSwgZnVuY3Rpb24gKG1ldGhvZCkge1xuICBNb25nb0Nvbm5lY3Rpb24ucHJvdG90eXBlW21ldGhvZF0gPSBmdW5jdGlvbiAoLyogYXJndW1lbnRzICovKSB7XG4gICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgIHJldHVybiBNZXRlb3Iud3JhcEFzeW5jKHNlbGZbXCJf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HdlIG5lZWQgdG8gYXBwbHkgdGhlXG4gICAgICAgICAgICAvLyBvcGVyYXRpb25zIHRoYXQgd2VyZSBpbnZvbHZlZC5cbiAgICAgICAgICAgIGxldCBuZXh0VGltZXN0YW1wID0gZG9jLnRzO1xuICAgICAgICAgICAgZG9jLm8uYXBwbHlPcHMuZm9yRWFjaChvcCA9PiB7XG4gICAgICAgICAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbWV0ZW9yL21ldGVvci9pc3N1ZXMvMTA0MjAuXG4gICAgICAgICAgICAgIGlmICghb3AudHMpIHtcbiAgICAgICAgICAgICAgICBvcC50cyA9IG5leHRUaW1lc3RhbXA7XG4gICAgICAgICAgICAgICAgbmV4dFRpbWVzdGFtcCA9IG5leHRUaW1lc3RhbXAuYWRkKFRpbWVzdGFtcC5PTkUpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGhhbmRsZURvYyhvcCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5rbm93biBjb21tYW5kIFwiICsgRUpTT04uc3RyaW5naWZ5KGRvYykpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJpZ2dlciA9IHtcbiAgICAgICAgICBkcm9wQ29sbGVjdGlvbjogZmFsc2UsXG4gICAgICAgICAgZHJvcERhdGFiYXNlOiBmYWxzZSxcbiAgICAgICAgICBvcDogZG9jLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmICh0eXBlb2YgZG9jLm5zID09PSBcInN0cmluZ1wiICYmXG4gICAgICAgICAgICBkb2MubnMuc3RhcnRzV2l0aChzZWxmLl9kYk5hbWUgKyBcIi5cIikpIHtcbiAgICAgICAgICB0cmlnZ2VyLmNvbGxlY3Rpb24gPSBkb2MubnMuc2xpY2Uoc2VsZi5fZGJOYW1lLmxlbmd0aCArIDEpO1xuICAgICAgICB9XG5cb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ICAgc2VsZi5fY3Vyc29yRGVzY3JpcHRpb24uY29sbGVjdGlvbk5hbWUsIGlkLCBvcCxcbiAgICAgICAgICAgICAgZmluaXNoSWZOZWVkVG9Qb2xsUXVlcnkoZnVuY3Rpb24gKGVyciwgZG9jKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgTWV0ZW9yLl9kZWJ1ZyhcIkdvdCBleGNlcHRpb24gd2hpbGUgZmV0Y2hpbmcgZG9jdW1lbnRzXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gSWYgd2UgZ2V0IGFuIGVycm9yIGZyb20gdGhlIGZldGNoZXIgKGVnLCB0cm91YmxlXG4gICAgICAgICAgICAgICAgICAgIC8vIGNvbm5lY3RpbmcgdG8gTW9uZ28pLCBsZXQncyBqdXN0IGFiYW5kb24gdGhlIGZldGNoIHBoYXNlXG4gICAgICAgICAgICAgICAgICAgIC8vIGFsdG9nZXRoZXIgYW5kIGZhbGwgYmFjayB0byBwb2xsaW5nLiBJdCdzIG5vdCBsaWtlIHdlJ3JlXG4gICAgICAgICAgICAgICAgICAgIC8vIGdldHRpbmcgbGl2ZSB1cGRhdGVzIGFueXdheS5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuX3BoYXNlICE9PSBQSEFTRS5RVUVSWUlORykge1xuICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX25lZWRUb1BvbGxRdWVyeSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCFzZWxmLl9zdG9wcGVkICYmIHNlbGYuX3BoYXNlID09PSBQSEFTRS5GRVRDSElOR1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBzZWxmLl9mZXRjaEdlbmVyYXRpb24gPT09IHRoaXNHZW5lcmF0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFdlIHJlLWNoZWNrIHRoZSBnZW5lcmF0aW9uIGluIGNhc2Ugd2UndmUgaGFkIGFuIGV4cGxpY2l0XG4gICAgICAgICAgICAgICAgICAgIC8vIF9wb2xsUXVlcnkgY2FsbCAoZWcsIGluIGFub3RoZXIgZmliZXIpIHdoaWNoIHNob3VsZFxuICAgICAgICAgICAgICAgICAgICAvLyBlZmZlY3RpdmVseSBjYW5jZWwgdGhpcyByb3VuZCBvZiBmZXRjaGVzLiAgKF9wb2xsUXVlcnlcbiAgICAgICAgICAgICAgICAgICAgLy8gaW5jcmVtZW50cyB0aGUgZ2VuZXJhdGlvbi4pXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX2hhbmRsZURvYyhpZCwgZG9jKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgICAgd2FpdGluZy0tO1xuICAgICAgICAgICAgICAgICAgLy8gQmVjYXVzZSBmZXRjaCgpIG5ldmVyIGNhbGxzIGl0cyBjYWxsYmFjayBzeW5jaHJvbm91c2x5LFxuICAgICAgICAgICAgICAgICAgLy8gdGhpcyBpcyBzYWZlIChpZSwgd2Ugd29uJ3QgY2FsbCBmdXQucmV0dXJuKCkgYmVmb3JlIHRoZVxuICAgICAgICAgICAgICAgICAgLy8gZm9yRWFjaCBpcyBkb25lKS5cbiAgICAgICAgICAgICAgICAgIGlmICh3YWl0aW5nID09PSAwKVxuICAgICAgICAgICAgICAgICAgICBmdXQucmV0dXJuKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgZnV0LndhaXQoKTtcbiAgICAgICAgICAvLyBFeGl0IG5vdyBpZiB3ZSd2ZSBoYWQgYSBfcG9sbFF1ZXJ5IGNhbGwgKGhlcmUgb3IgaW4gYW5vdGhlciBmaWJlcikuXG4gICA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ICAgICAgICBPYmplY3QuZW50cmllcyh2YWx1ZSkuZm9yRWFjaCgoW3Bvc2l0aW9uLCB2YWx1ZV0pID0+IHtcbiAgICAgICAgICAgIGlmIChwb3NpdGlvbiA9PT0gJ2EnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCBwb3NpdGlvbktleSA9IGpvaW4oam9pbihwcmVmaXgsIGtleSksIHBvc2l0aW9uLnNsaWNlKDEpKTtcbiAgICAgICAgICAgIGlmIChwb3NpdGlvblswXSA9PT0gJ3MnKSB7XG4gICAgICAgICAgICAgICAgY29udmVydE9wbG9nRGlmZihvcGxvZ0VudHJ5LCB2YWx1ZSwgcG9zaXRpb25LZXkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGlmIChvcGxvZ0VudHJ5LiR1bnNldCA9PT0gbnVsbCB8fCBvcGxvZ0VudHJ5LiR1bnNldCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgb3Bsb2dFbnRyeS4kdW5zZXQgPSB7fTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb3Bsb2dFbnRyeS4kdW5zZXRbcG9zaXRpb25LZXldID0gdHJ1ZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKG9wbG9nRW50cnkuJHNldCA9PT0gbnVsbCB8fCBvcGxvZ0VudHJ5LiRzZXQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIG9wbG9nRW50cnkuJHNldCA9IHt9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBvcGxvZ0VudHJ5LiRzZXRbcG9zaXRpb25LZXldID0gdmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIGlmIChrZXkpIHtcbi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Y3Qua2V5cyhtc2cuZmllbGRzKTtcbiAgICAgICAgICBpZiAoa2V5cy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICB2YXIgbW9kaWZpZXIgPSB7fTtcbiAgICAgICAgICAgIGtleXMuZm9yRWFjaChrZXkgPT4ge1xuICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IG1zZy5maWVsZHNba2V5XTtcbiAgICAgICAgICAgICAgaWYgKEVKU09OLmVxdWFscyhkb2Nba2V5XSwgdmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICAgICAgICAgICAgICBpZiAoIW1vZGlmaWVyLiR1bnNldCkge1xuICAgICAgICAgICAgICAgICAgbW9kaWZpZXIuJHVuc2V0ID0ge307XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG1vZGlmaWVyLiR1bnNldFtrZXldID0gMTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoIW1vZGlmaWVyLiRzZXQpIHtcbiAgICAgICAgICAgICAgICAgIG1vZGlmaWVyLiRzZXQgPSB7fTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbW9kaWZpZXIuJHNldFtrZXldID0gdmFsdWU7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKE9iamVjdC5rZXlzKG1vZGlmaWVyKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgIHNlbGYuX2NvbGxlY3Rpb24udXBkYXRlKG1vbmdvSWQsIG1vZGlmaWVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiSSBkb24ndCBrbm93IGhvdyB0byBk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IGh0dHA6Ly9tb25nb2RiLmdpdGh1Yi5pby9ub2RlLW1vbmdvZGItbmF0aXZlLzMuMC9yZWZlcmVuY2UvY29ubmVjdGluZy9jb25uZWN0aW9uLXNldHRpbmdzL1xuICogQGxvY3VzIFNlcnZlclxuICogQHBhcmFtIHtPYmplY3R9IG9wdGlvbnMgVXNlciBzcGVjaWZpZWQgTW9uZ28gY29ubmVjdGlvbiBvcHRpb25zXG4gKi9cbk1vbmdvLnNldENvbm5lY3Rpb25PcHRpb25zID0gZnVuY3Rpb24gc2V0Q29ubmVjdGlvbk9wdGlvbnMgKG9wdGlvbnMpIHtcbiAgY2hlY2sob3B0aW9ucywgT2JqZWN0KTtcbiAgTW9uZ28uX2Nvbm5lY3Rpb25PcHRpb25zID0gb3B0aW9ucztcbn07Il19 diff --git a/server/bundle/programs/server/packages/mongo.js.map b/server/bundle/programs/server/packages/mongo.js.map index 4634b23a31..324e01d799 100644 --- a/server/bundle/programs/server/packages/mongo.js.map +++ b/server/bundle/programs/server/packages/mongo.js.map @@ -1 +1 @@ -{"version":3,"sources":["meteor://💻app/packages/mongo/mongo_driver.js","meteor://💻app/packages/mongo/oplog_tailing.js","meteor://💻app/packages/mongo/observe_multiplex.js","meteor://💻app/packages/mongo/doc_fetcher.js","meteor://💻app/packages/mongo/polling_observe_driver.js","meteor://💻app/packages/mongo/oplog_observe_driver.js","meteor://💻app/packages/mongo/local_collection_driver.js","meteor://💻app/packages/mongo/remote_collection_driver.js","meteor://💻app/packages/mongo/collection.js","meteor://💻app/packages/mongo/connection_options.js"],"names":["DocFetcher","module1","link","v","MongoDB","NpmModuleMongodb","Future","Npm","require","MongoInternals","NpmModules","mongodb","version","NpmModuleMongodbVersion","module","NpmModule","replaceNames","filter","thing","_","isArray","map","bind","ret","each","value","key","Timestamp","prototype","clone","makeMongoLegal","name","unmakeMongoLegal","substr","replaceMongoAtomWithMeteor","document","Binary","buffer","Uint8Array","ObjectID","Mongo","toHexString","Decimal128","Decimal","toString","size","EJSON","fromJSONValue","undefined","replaceMeteorAtomWithMongo","isBinary","fromString","_isCustomType","toJSONValue","replaceTypes","atomTransformer","replacedTopLevelAtom","val","valReplaced","MongoConnection","url","options","self","_observeMultiplexers","_onFailoverHook","Hook","mongoOptions","Object","assign","autoReconnect","reconnectTries","Infinity","ignoreUndefined","useNewUrlParser","_connectionOptions","test","native_parser","has","poolSize","db","_primary","_oplogHandle","_docFetcher","connectFuture","connect","Meteor","bindEnvironment","err","client","serverConfig","isMasterDoc","primary","on","kind","doc","callback","me","resolver","wait","oplogUrl","Package","OplogHandle","databaseName","close","Error","oplogHandle","stop","wrap","rawCollection","collectionName","future","collection","_createCappedCollection","byteSize","maxDocuments","createCollection","capped","max","_maybeBeginWrite","fence","DDPServer","_CurrentWriteFence","get","beginWrite","committed","_onFailover","register","writeCallback","write","refresh","result","refreshErr","bindEnvironmentForWrite","_insert","collection_name","sendError","e","_expectedByTest","LocalCollection","_isPlainObject","id","_id","insert","safe","_refresh","selector","refreshKey","specificIds","_idsMatchedBySelector","extend","_remove","wrappedCallback","driverResult","transformResult","numberAffected","remove","_dropCollection","cb","dropCollection","drop","_dropDatabase","dropDatabase","_update","mod","Function","mongoOpts","arrayFilters","upsert","multi","fullResult","mongoSelector","mongoMod","isModify","_isModificationMod","_forbidReplace","knownId","newDoc","_createUpsertDocument","insertedId","generatedId","simulateUpsertWithInsertedId","error","_returnObject","hasOwnProperty","$setOnInsert","update","meteorResult","mongoResult","upserted","length","n","NUM_OPTIMISTIC_TRIES","_isCannotChangeIdError","errmsg","indexOf","mongoOptsForUpdate","mongoOptsForInsert","replacementWithId","tries","doUpdate","doConditionalInsert","method","wrapAsync","apply","arguments","find","Cursor","CursorDescription","findOne","limit","fetch","_ensureIndex","index","indexName","ensureIndex","Exception","_dropIndex","dropIndex","Collection","_rewriteSelector","mongo","cursorDescription","_mongo","_cursorDescription","_synchronousCursor","Symbol","iterator","tailable","_createSynchronousCursor","selfForIteration","useTransform","rewind","getTransform","transform","_publishCursor","sub","_getCollectionName","observe","callbacks","_observeFromObserveChanges","observeChanges","methods","ordered","_observeChangesCallbacksAreOrdered","exceptionName","forEach","_observeChanges","pick","cursorOptions","sort","skip","projection","fields","awaitdata","numberOfRetries","OPLOG_COLLECTION","ts","oplogReplay","dbCursor","maxTimeMs","maxTimeMS","hint","SynchronousCursor","_dbCursor","_selfForIteration","_transform","wrapTransform","_synchronousCount","count","_visitedIds","_IdMap","_rawNextObjectPromise","Promise","resolve","reject","next","_nextObjectPromise","set","_nextObjectPromiseWithTimeout","timeoutMS","nextObjectPromise","timeoutErr","timeoutPromise","timer","setTimeout","race","catch","_nextObject","await","thisArg","_rewind","call","res","push","identity","applySkipLimit","getRawObjects","results","done","tail","docCallback","cursor","stopped","lastTS","loop","newSelector","$gt","defer","_observeChangesTailable","observeKey","stringify","multiplexer","observeDriver","firstHandle","_noYieldsAllowed","ObserveMultiplexer","onStop","observeHandle","ObserveHandle","matcher","sorter","canUseOplog","all","_testOnlyPollCallback","Minimongo","Matcher","OplogObserveDriver","cursorSupported","Sorter","f","driverClass","PollingObserveDriver","mongoHandle","_observeDriver","addHandleAndSendInitialAdds","listenAll","listenCallback","listeners","forEachTrigger","trigger","_InvalidationCrossbar","listen","listener","triggerCallback","addedBefore","added","MongoTimestamp","Connection","TOO_FAR_BEHIND","process","env","METEOR_OPLOG_TOO_FAR_BEHIND","TAIL_TIMEOUT","METEOR_OPLOG_TAIL_TIMEOUT","showTS","getHighBits","getLowBits","idForOp","op","o","o2","dbName","_oplogUrl","_dbName","_oplogLastEntryConnection","_oplogTailConnection","_stopped","_tailHandle","_readyFuture","_crossbar","_Crossbar","factPackage","factName","_baseOplogSelector","ns","RegExp","_escapeRegExp","join","$or","$in","$exists","_catchingUpFutures","_lastProcessedTS","_onSkippedEntriesHook","debugPrintExceptions","_entryQueue","_DoubleEndedQueue","_workerActive","_startTailing","onOplogEntry","originalCallback","notification","_debug","listenHandle","onSkippedEntries","waitUntilCaughtUp","lastEntry","$natural","_sleepForMs","lessThanOrEqual","insertAfter","greaterThan","splice","mongodbUri","parse","database","admin","command","ismaster","setName","lastOplogEntry","oplogSelector","_maybeStartWorker","return","handleDoc","applyOps","nextTimestamp","add","ONE","startsWith","slice","fire","isEmpty","pop","clear","_setLastProcessedTS","shift","sequencer","_defineTooFarBehind","_resetTooFarBehind","Facts","incrementServerFact","_ordered","_onStop","_queue","_SynchronousQueue","_handles","_cache","_CachingChangeObserver","_addHandleTasksScheduledButNotPerformed","callbackNames","callbackName","_applyCallback","toArray","handle","safeToRunTask","runTask","_sendAdds","removeHandle","_ready","_stop","fromQueryError","ready","queueTask","queryError","throw","onFlush","isResolved","args","applyChange","keys","handleId","_addedBefore","_added","docs","nextObserveHandleId","_multiplexer","before","export","Fiber","constructor","mongoConnection","_mongoConnection","_callbacksForOp","Map","check","String","delete","run","POLLING_THROTTLE_MS","METEOR_POLLING_THROTTLE_MS","POLLING_INTERVAL_MS","METEOR_POLLING_INTERVAL_MS","_mongoHandle","_stopCallbacks","_results","_pollsScheduledButNotStarted","_pendingWrites","_ensurePollIsScheduled","throttle","_unthrottledEnsurePollIsScheduled","pollingThrottleMs","_taskQueue","listenersHandle","pollingInterval","pollingIntervalMs","_pollingInterval","intervalHandle","setInterval","clearInterval","_pollMongo","_suspendPolling","_resumePolling","first","newResults","oldResults","writesForCycle","code","JSON","message","Array","_diffQueryChanges","w","c","PHASE","QUERYING","FETCHING","STEADY","SwitchedToQuery","finishIfNeedToPollQuery","currentId","_usesOplog","comparator","getComparator","heapOptions","IdMap","_limit","_comparator","_sorter","_unpublishedBuffer","MinMaxHeap","_published","MaxHeap","_safeAppendToBuffer","_stopHandles","_registerPhaseChange","_matcher","_projectionFn","_compileProjection","_sharedProjection","combineIntoProjection","_sharedProjectionFn","_needToFetch","_currentlyFetching","_fetchGeneration","_requeryWhenDoneThisQuery","_writesToCommitWhenWeReachSteady","_needToPollQuery","_phase","_handleOplogEntryQuerying","_handleOplogEntrySteadyOrFetching","fired","_oplogObserveDrivers","onBeforeFire","drivers","driver","_runInitialQuery","_addPublished","overflowingDocId","maxElementId","overflowingDoc","equals","removed","_addBuffered","_removePublished","empty","newDocId","minElementId","_removeBuffered","_changePublished","oldDoc","projectedNew","projectedOld","changed","DiffSequence","makeChangedFields","maxBufferedId","_addMatching","maxPublished","maxBuffered","toPublish","canAppendToBuffer","canInsertIntoBuffer","toBuffer","_removeMatching","_handleDoc","matchesNow","documentMatches","publishedBefore","bufferedBefore","cachedBefore","minBuffered","staysInPublished","staysInBuffer","_fetchModifiedDocuments","thisGeneration","waiting","fut","_beSteady","writes","isReplace","canDirectlyModifyDoc","modifierCanBeDirectlyApplied","_modify","canBecomeTrueByModifier","affectedByModifier","_runQuery","initial","_doneQuerying","_pollQuery","newBuffer","_cursorForQuery","i","_publishNewResults","optionsOverwrite","description","idsToRemove","console","_oplogEntryHandle","_listenersHandle","phase","now","Date","timeDiff","_phaseStartTime","disableOplog","_disableOplog","_checkSupportedProjection","hasWhere","hasGeoQuery","modifier","operation","field","LocalCollectionDriver","noConnCollections","create","open","conn","ensureCollection","_mongo_livedata_collections","collections","RemoteCollectionDriver","mongo_url","m","defaultRemoteCollectionDriver","once","connectionOptions","mongoUrl","MONGO_URL","MONGO_OPLOG_URL","_objectSpread","default","connection","manager","idGeneration","_driver","_preventAutopublish","_makeNewID","src","DDP","randomStream","Random","insecure","hexString","_connection","isClient","server","_collection","_name","_maybeSetUpReplication","defineMutationMethods","_defineMutationMethods","useExisting","_suppressSameNameError","autopublish","publish","is_auto","registerStore","ok","beginUpdate","batchSize","reset","pauseObservers","msg","mongoId","MongoID","idParse","replace","$unset","$set","endUpdate","resumeObservers","saveOriginals","retrieveOriginals","getDoc","_getCollection","warn","log","_getFindSelector","_getFindOptions","Match","Optional","ObjectIncluding","OneOf","Number","fallbackId","_selectorIsId","getPrototypeOf","getOwnPropertyDescriptors","generateId","_isRemoteCollection","enclosing","_CurrentMethodInvocation","chooseReturnValueFromCollectionResult","wrapCallback","_callMutatorMethod","optionsAndCallback","popCallbackFromArgs","rawDatabase","convertResult","AllowDeny","CollectionPrototype","setConnectionOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAIA,UAAJ;AAAeC,SAAO,CAACC,IAAR,CAAa,kBAAb,EAAgC;AAACF,cAAU,CAACG,CAAD,EAAG;AAACH,gBAAU,GAACG,CAAX;AAAa;;AAA5B,GAAhC,EAA8D,CAA9D;;AAAf;;;;;;;;AASA,MAAIC,OAAO,GAAGC,gBAAd;;AACA,MAAIC,MAAM,GAAGC,GAAG,CAACC,OAAJ,CAAY,eAAZ,CAAb;;AAGAC,gBAAc,GAAG,EAAjB;AAEAA,gBAAc,CAACC,UAAf,GAA4B;AAC1BC,WAAO,EAAE;AACPC,aAAO,EAAEC,uBADF;AAEPC,YAAM,EAAEV;AAFD;AADiB,GAA5B,C,CAOA;AACA;AACA;AACA;;AACAK,gBAAc,CAACM,SAAf,GAA2BX,OAA3B,C,CAEA;AACA;;AACA,MAAIY,YAAY,GAAG,UAAUC,MAAV,EAAkBC,KAAlB,EAAyB;AAC1C,QAAI,OAAOA,KAAP,KAAiB,QAAjB,IAA6BA,KAAK,KAAK,IAA3C,EAAiD;AAC/C,UAAIC,CAAC,CAACC,OAAF,CAAUF,KAAV,CAAJ,EAAsB;AACpB,eAAOC,CAAC,CAACE,GAAF,CAAMH,KAAN,EAAaC,CAAC,CAACG,IAAF,CAAON,YAAP,EAAqB,IAArB,EAA2BC,MAA3B,CAAb,CAAP;AACD;;AACD,UAAIM,GAAG,GAAG,EAAV;;AACAJ,OAAC,CAACK,IAAF,CAAON,KAAP,EAAc,UAAUO,KAAV,EAAiBC,GAAjB,EAAsB;AAClCH,WAAG,CAACN,MAAM,CAACS,GAAD,CAAP,CAAH,GAAmBV,YAAY,CAACC,MAAD,EAASQ,KAAT,CAA/B;AACD,OAFD;;AAGA,aAAOF,GAAP;AACD;;AACD,WAAOL,KAAP;AACD,GAZD,C,CA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AAKAC,OAAK,CAACsK,MAAN,GAAepE,eAAe,CAACoE,MAA/B;AAEA;;;;AAGAtK,OAAK,CAACkL,UAAN,CAAiBZ,MAAjB,GAA0BtK,KAAK,CAACsK,MAAhC;AAEA;;;;AAGAtK,OAAK,CAACkL,UAAN,CAAiBnL,QAAjB,GAA4BC,KAAK,CAACD,QAAlC;AAEA;;;;AAGA8C,QAAM,CAACqI,UAAP,GAAoBlL,KAAK,CAACkL,UAA1B,C,CAEA;;AACAvJ,QAAM,CAACC,MAAP,CACEiB,MAAM,CAACqI,UAAP,CAAkB9L,SADpB,EAEEorB,SAAS,CAACC,mBAFZ;;AAKA,WAASJ,mBAAT,CAA6BnQ,IAA7B,EAAmC;AACjC;AACA;AACA,QAAIA,IAAI,CAAC7Q,MAAL,KACC6Q,IAAI,CAACA,IAAI,CAAC7Q,MAAL,GAAc,CAAf,CAAJ,KAA0B7I,SAA1B,IACA0Z,IAAI,CAACA,IAAI,CAAC7Q,MAAL,GAAc,CAAf,CAAJ,YAAiCzB,QAFlC,CAAJ,EAEiD;AAC/C,aAAOsS,IAAI,CAACnC,GAAL,EAAP;AACD;AACF;;;;;;;;;;;;AClxBD;;;;;;AAMA/X,KAAK,CAAC0qB,oBAAN,GAA6B,SAASA,oBAAT,CAA+BrpB,OAA/B,EAAwC;AACnE8Z,OAAK,CAAC9Z,OAAD,EAAUM,MAAV,CAAL;AACA3B,OAAK,CAACkC,kBAAN,GAA2Bb,OAA3B;AACD,CAHD,C","file":"/packages/mongo.js","sourcesContent":["/**\n * Provide a synchronous Collection API using fibers, backed by\n * MongoDB. This is only for use on the server, and mostly identical\n * to the client API.\n *\n * NOTE: the public API methods must be run within a fiber. If you call\n * these outside of a fiber they will explode!\n */\n\nvar MongoDB = NpmModuleMongodb;\nvar Future = Npm.require('fibers/future');\nimport { DocFetcher } from \"./doc_fetcher.js\";\n\nMongoInternals = {};\n\nMongoInternals.NpmModules = {\n mongodb: {\n version: NpmModuleMongodbVersion,\n module: MongoDB\n }\n};\n\n// Older version of what is now available via\n// MongoInternals.NpmModules.mongodb.module. It was never documented, but\n// people do use it.\n// XXX COMPAT WITH 1.0.3.2\nMongoInternals.NpmModule = MongoDB;\n\n// This is used to add or remove EJSON from the beginning of everything nested\n// inside an EJSON custom type. It should only be called on pure JSON!\nvar replaceNames = function (filter, thing) {\n if (typeof thing === \"object\" && thing !== null) {\n if (_.isArray(thing)) {\n return _.map(thing, _.bind(replaceNames, null, filter));\n }\n var ret = {};\n _.each(thing, function (value, key) {\n ret[filter(key)] = replaceNames(filter, value);\n });\n return ret;\n }\n return thing;\n};\n\n// Ensure that EJSON.clone keeps a Timestamp as a Timestamp (instead of just\n// doing a structural clone).\n// XXX how ok is this? what if there are multiple copies of MongoDB loaded?\nMongoDB.Timestamp.prototype.clone = function () {\n // Timestamps should be immutable.\n return this;\n};\n\nvar makeMongoLegal = function (name) { return \"EJSON\" + name; };\nvar unmakeMongoLegal = function (name) { return name.substr(5); };\n\nvar replaceMongoAtomWithMeteor = function (document) {\n if (document instanceof MongoDB.Binary) {\n var buffer = document.value(true);\n return new Uint8Array(buffer);\n }\n if (document instanceof MongoDB.ObjectID) {\n return new Mongo.ObjectID(document.toHexString());\n }\n if (document instanceof MongoDB.Decimal128) {\n return Decimal(document.toString());\n }\n if (document[\"EJSON$type\"] && document[\"EJSON$value\"] && _.size(document) === 2) {\n return EJSON.fromJSONValue(replaceNames(unmakeMongoLegal, document));\n }\n if (document instanceof MongoDB.Timestamp) {\n // For now, the Meteor representation of a Mongo timestamp type (not a date!\n // this is a weird internal thing used in the oplog!) is the same as the\n // Mongo representation. We need to do this explicitly or else we would do a\n // structural clone and lose the prototype.\n return document;\n }\n return undefined;\n};\n\nvar replaceMeteorAtomWithMongo = function (document) {\n if (EJSON.isBinary(document)) {\n // This does more copies than we'd like, but is necessary because\n // MongoDB.BSON only looks like it takes a Uint8Array (and doesn't actually\n // serialize it correctly).\n // return new MongoDB.Binary(Buffer.from(document));\n }\n if (document instanceof Mongo.ObjectID) {\n return new MongoDB.ObjectID(document.toHexString());\n }\n if (document instanceof MongoDB.Timestamp) {\n // For now, the Meteor representation of a Mongo timestamp type (not a date!\n // this is a weird internal thing used in the oplog!) is the same as the\n // Mongo representation. We need to do this explicitly or else we would do a\n // structural clone and lose the prototype.\n return document;\n }\n if (document instanceof Decimal) {\n return MongoDB.Decimal128.fromString(document.toString());\n }\n if (EJSON._isCustomType(document)) {\n return replaceNames(makeMongoLegal, EJSON.toJSONValue(document));\n }\n // It is not ordinarily possible to stick dollar-sign keys into mongo\n // so we don't bother checking for things that need escaping at this time.\n return undefined;\n};\n\nvar replaceTypes = function (document, atomTransformer) {\n if (typeof document !== 'object' || document === null)\n return document;\n\n var replacedTopLevelAtom = atomTransformer(document);\n if (replacedTopLevelAtom !== undefined)\n return replacedTopLevelAtom;\n\n var ret = document;\n _.each(document, function (val, key) {\n var valReplaced = replaceTypes(val, atomTransformer);\n if (val !== valReplaced) {\n // Lazy clone. Shallow copy.\n if (ret === document)\n ret = _.clone(document);\n ret[key] = valReplaced;\n }\n });\n return ret;\n};\n\n\nMongoConnection = function (url, options) {\n var self = this;\n options = options || {};\n self._observeMultiplexers = {};\n self._onFailoverHook = new Hook;\n\n var mongoOptions = Object.assign({\n // Reconnect on error.\n autoReconnect: true,\n // Try to reconnect forever, instead of stopping after 30 tries (the\n // default), with each attempt separated by 1000ms.\n reconnectTries: Infinity,\n ignoreUndefined: true,\n // Required to silence deprecation warnings with mongodb@3.1.1.\n useNewUrlParser: true,\n }, Mongo._connectionOptions);\n\n // Disable the native parser by default, unless specifically enabled\n // in the mongo URL.\n // - The native driver can cause errors which normally would be\n // thrown, caught, and handled into segfaults that take down the\n // whole app.\n // - Binary modules don't yet work when you bundle and move the bundle\n // to a different platform (aka deploy)\n // We should revisit this after binary npm module support lands.\n if (!(/[\\?&]native_?[pP]arser=/.test(url))) {\n mongoOptions.native_parser = false;\n }\n\n // Internally the oplog connections specify their own poolSize\n // which we don't want to overwrite with any user defined value\n if (_.has(options, 'poolSize')) {\n // If we just set this for \"server\", replSet will override it. If we just\n // set it for replSet, it will be ignored if we're not using a replSet.\n mongoOptions.poolSize = options.poolSize;\n }\n\n self.db = null;\n // We keep track of the ReplSet's primary, so that we can trigger hooks when\n // it changes. The Node driver's joined callback seems to fire way too\n // often, which is why we need to track it ourselves.\n self._primary = null;\n self._oplogHandle = null;\n self._docFetcher = null;\n\n\n var connectFuture = new Future;\n MongoDB.connect(\n url,\n mongoOptions,\n Meteor.bindEnvironment(\n function (err, client) {\n if (err) {\n throw err;\n }\n\n var db = client.db();\n\n // First, figure out what the current primary is, if any.\n if (db.serverConfig.isMasterDoc) {\n self._primary = db.serverConfig.isMasterDoc.primary;\n }\n\n db.serverConfig.on(\n 'joined', Meteor.bindEnvironment(function (kind, doc) {\n if (kind === 'primary') {\n if (doc.primary !== self._primary) {\n self._primary = doc.primary;\n self._onFailoverHook.each(function (callback) {\n callback();\n return true;\n });\n }\n } else if (doc.me === self._primary) {\n // The thing we thought was primary is now something other than\n // primary. Forget that we thought it was primary. (This means\n // that if a server stops being primary and then starts being\n // primary again without another server becoming primary in the\n // middle, we'll correctly count it as a failover.)\n self._primary = null;\n }\n }));\n\n // Allow the constructor to return.\n connectFuture['return']({ client, db });\n },\n connectFuture.resolver() // onException\n )\n );\n\n // Wait for the connection to be successful (throws on failure) and assign the\n // results (`client` and `db`) to `self`.\n Object.assign(self, connectFuture.wait());\n\n if (options.oplogUrl && ! Package['disable-oplog']) {\n self._oplogHandle = new OplogHandle(options.oplogUrl, self.db.databaseName);\n self._docFetcher = new DocFetcher(self);\n }\n};\n\nMongoConnection.prototype.close = function() {\n var self = this;\n\n if (! self.db)\n throw Error(\"close called before Connection created?\");\n\n // XXX probably untested\n var oplogHandle = self._oplogHandle;\n self._oplogHandle = null;\n if (oplogHandle)\n oplogHandle.stop();\n\n // Use Future.wrap so that errors get thrown. This happens to\n // work even outside a fiber since the 'close' method is not\n // actually asynchronous.\n Future.wrap(_.bind(self.client.close, self.client))(true).wait();\n};\n\n// Returns the Mongo Collection object; may yield.\nMongoConnection.prototype.rawCollection = function (collectionName) {\n var self = this;\n\n if (! self.db)\n throw Error(\"rawCollection called before Connection created?\");\n\n var future = new Future;\n self.db.collection(collectionName, future.resolver());\n return future.wait();\n};\n\nMongoConnection.prototype._createCappedCollection = function (\n collectionName, byteSize, maxDocuments) {\n var self = this;\n\n if (! self.db)\n throw Error(\"_createCappedCollection called before Connection created?\");\n\n var future = new Future();\n self.db.createCollection(\n collectionName,\n { capped: true, size: byteSize, max: maxDocuments },\n future.resolver());\n future.wait();\n};\n\n// This should be called synchronously with a write, to create a\n// transaction on the current write fence, if any. After we can read\n// the write, and after observers have been notified (or at least,\n// after the observer notifiers have added themselves to the write\n// fence), you should call 'committed()' on the object returned.\nMongoConnection.prototype._maybeBeginWrite = function () {\n var fence = DDPServer._CurrentWriteFence.get();\n if (fence) {\n return fence.beginWrite();\n } else {\n return {committed: function () {}};\n }\n};\n\n// Internal interface: adds a callback which is called when the Mongo primary\n// changes. Returns a stop handle.\nMongoConnection.prototype._onFailover = function (callback) {\n return this._onFailoverHook.register(callback);\n};\n\n\n//////////// Public API //////////\n\n// The write methods block until the database has confirmed the write (it may\n// not be replicated or stable on disk, but one server has confirmed it) if no\n// callback is provided. If a callback is provided, then they call the callback\n// when the write is confirmed. They return nothing on success, and raise an\n// exception on failure.\n//\n// After making a write (with insert, update, remove), observers are\n// notified asynchronously. If you want to receive a callback once all\n// of the observer notifications have landed for your write, do the\n// writes inside a write fence (set DDPServer._CurrentWriteFence to a new\n// _WriteFence, and then set a callback on the write fence.)\n//\n// Since our execution environment is single-threaded, this is\n// well-defined -- a write \"has been made\" if it's returned, and an\n// observer \"has been notified\" if its callback has returned.\n\nvar writeCallback = function (write, refresh, callback) {\n return function (err, result) {\n if (! err) {\n // XXX We don't have to run this on error, right?\n try {\n refresh();\n } catch (refreshErr) {\n if (callback) {\n callback(refreshErr);\n return;\n } else {\n throw refreshErr;\n }\n }\n }\n write.committed();\n if (callback) {\n callback(err, result);\n } else if (err) {\n throw err;\n }\n };\n};\n\nvar bindEnvironmentForWrite = function (callback) {\n return Meteor.bindEnvironment(callback, \"Mongo write\");\n};\n\nMongoConnection.prototype._insert = function (collection_name, document,\n callback) {\n var self = this;\n\n var sendError = function (e) {\n if (callback)\n return callback(e);\n throw e;\n };\n\n if (collection_name === \"___meteor_failure_test_collection\") {\n var e = new Error(\"Failure test\");\n e._expectedByTest = true;\n sendError(e);\n return;\n }\n\n if (!(LocalCollection._isPlainObject(document) &&\n !EJSON._isCustomType(document))) {\n sendError(new Error(\n \"Only plain objects may be inserted into MongoDB\"));\n return;\n }\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n Meteor.refresh({collection: collection_name, id: document._id });\n };\n callback = bindEnvironmentForWrite(writeCallback(write, refresh, callback));\n try {\n var collection = self.rawCollection(collection_name);\n collection.insert(replaceTypes(document, replaceMeteorAtomWithMongo),\n {safe: true}, callback);\n } catch (err) {\n write.committed();\n throw err;\n }\n};\n\n// Cause queries that may be affected by the selector to poll in this write\n// fence.\nMongoConnection.prototype._refresh = function (collectionName, selector) {\n var refreshKey = {collection: collectionName};\n // If we know which documents we're removing, don't poll queries that are\n // specific to other documents. (Note that multiple notifications here should\n // not cause multiple polls, since all our listener is doing is enqueueing a\n // poll.)\n var specificIds = LocalCollection._idsMatchedBySelector(selector);\n if (specificIds) {\n _.each(specificIds, function (id) {\n Meteor.refresh(_.extend({id: id}, refreshKey));\n });\n } else {\n Meteor.refresh(refreshKey);\n }\n};\n\nMongoConnection.prototype._remove = function (collection_name, selector,\n callback) {\n var self = this;\n\n if (collection_name === \"___meteor_failure_test_collection\") {\n var e = new Error(\"Failure test\");\n e._expectedByTest = true;\n if (callback) {\n return callback(e);\n } else {\n throw e;\n }\n }\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n self._refresh(collection_name, selector);\n };\n callback = bindEnvironmentForWrite(writeCallback(write, refresh, callback));\n\n try {\n var collection = self.rawCollection(collection_name);\n var wrappedCallback = function(err, driverResult) {\n callback(err, transformResult(driverResult).numberAffected);\n };\n collection.remove(replaceTypes(selector, replaceMeteorAtomWithMongo),\n {safe: true}, wrappedCallback);\n } catch (err) {\n write.committed();\n throw err;\n }\n};\n\nMongoConnection.prototype._dropCollection = function (collectionName, cb) {\n var self = this;\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n Meteor.refresh({collection: collectionName, id: null,\n dropCollection: true});\n };\n cb = bindEnvironmentForWrite(writeCallback(write, refresh, cb));\n\n try {\n var collection = self.rawCollection(collectionName);\n collection.drop(cb);\n } catch (e) {\n write.committed();\n throw e;\n }\n};\n\n// For testing only. Slightly better than `c.rawDatabase().dropDatabase()`\n// because it lets the test's fence wait for it to be complete.\nMongoConnection.prototype._dropDatabase = function (cb) {\n var self = this;\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n Meteor.refresh({ dropDatabase: true });\n };\n cb = bindEnvironmentForWrite(writeCallback(write, refresh, cb));\n\n try {\n self.db.dropDatabase(cb);\n } catch (e) {\n write.committed();\n throw e;\n }\n};\n\nMongoConnection.prototype._update = function (collection_name, selector, mod,\n options, callback) {\n var self = this;\n\n if (! callback && options instanceof Function) {\n callback = options;\n options = null;\n }\n\n if (collection_name === \"___meteor_failure_test_collection\") {\n var e = new Error(\"Failure test\");\n e._expectedByTest = true;\n if (callback) {\n return callback(e);\n } else {\n throw e;\n }\n }\n\n // explicit safety check. null and undefined can crash the mongo\n // driver. Although the node driver and minimongo do 'support'\n // non-object modifier in that they don't crash, they are not\n // meaningful operations and do not do anything. Defensively throw an\n // error here.\n if (!mod || typeof mod !== 'object')\n throw new Error(\"Invalid modifier. Modifier must be an object.\");\n\n if (!(LocalCollection._isPlainObject(mod) &&\n !EJSON._isCustomType(mod))) {\n throw new Error(\n \"Only plain objects may be used as replacement\" +\n \" documents in MongoDB\");\n }\n\n if (!options) options = {};\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n self._refresh(collection_name, selector);\n };\n callback = writeCallback(write, refresh, callback);\n try {\n var collection = self.rawCollection(collection_name);\n var mongoOpts = {safe: true};\n // Add support for filtered positional operator\n if (options.arrayFilters !== undefined) mongoOpts.arrayFilters = options.arrayFilters;\n // explictly enumerate options that minimongo supports\n if (options.upsert) mongoOpts.upsert = true;\n if (options.multi) mongoOpts.multi = true;\n // Lets you get a more more full result from MongoDB. Use with caution:\n // might not work with C.upsert (as opposed to C.update({upsert:true}) or\n // with simulated upsert.\n if (options.fullResult) mongoOpts.fullResult = true;\n\n var mongoSelector = replaceTypes(selector, replaceMeteorAtomWithMongo);\n var mongoMod = replaceTypes(mod, replaceMeteorAtomWithMongo);\n\n var isModify = LocalCollection._isModificationMod(mongoMod);\n\n if (options._forbidReplace && !isModify) {\n var err = new Error(\"Invalid modifier. Replacements are forbidden.\");\n if (callback) {\n return callback(err);\n } else {\n throw err;\n }\n }\n\n // We've already run replaceTypes/replaceMeteorAtomWithMongo on\n // selector and mod. We assume it doesn't matter, as far as\n // the behavior of modifiers is concerned, whether `_modify`\n // is run on EJSON or on mongo-converted EJSON.\n\n // Run this code up front so that it fails fast if someone uses\n // a Mongo update operator we don't support.\n let knownId;\n if (options.upsert) {\n try {\n let newDoc = LocalCollection._createUpsertDocument(selector, mod);\n knownId = newDoc._id;\n } catch (err) {\n if (callback) {\n return callback(err);\n } else {\n throw err;\n }\n }\n }\n\n if (options.upsert &&\n ! isModify &&\n ! knownId &&\n options.insertedId &&\n ! (options.insertedId instanceof Mongo.ObjectID &&\n options.generatedId)) {\n // In case of an upsert with a replacement, where there is no _id defined\n // in either the query or the replacement doc, mongo will generate an id itself.\n // Therefore we need this special strategy if we want to control the id ourselves.\n\n // We don't need to do this when:\n // - This is not a replacement, so we can add an _id to $setOnInsert\n // - The id is defined by query or mod we can just add it to the replacement doc\n // - The user did not specify any id preference and the id is a Mongo ObjectId,\n // then we can just let Mongo generate the id\n\n simulateUpsertWithInsertedId(\n collection, mongoSelector, mongoMod, options,\n // This callback does not need to be bindEnvironment'ed because\n // simulateUpsertWithInsertedId() wraps it and then passes it through\n // bindEnvironmentForWrite.\n function (error, result) {\n // If we got here via a upsert() call, then options._returnObject will\n // be set and we should return the whole object. Otherwise, we should\n // just return the number of affected docs to match the mongo API.\n if (result && ! options._returnObject) {\n callback(error, result.numberAffected);\n } else {\n callback(error, result);\n }\n }\n );\n } else {\n\n if (options.upsert && !knownId && options.insertedId && isModify) {\n if (!mongoMod.hasOwnProperty('$setOnInsert')) {\n mongoMod.$setOnInsert = {};\n }\n knownId = options.insertedId;\n Object.assign(mongoMod.$setOnInsert, replaceTypes({_id: options.insertedId}, replaceMeteorAtomWithMongo));\n }\n\n collection.update(\n mongoSelector, mongoMod, mongoOpts,\n bindEnvironmentForWrite(function (err, result) {\n if (! err) {\n var meteorResult = transformResult(result);\n if (meteorResult && options._returnObject) {\n // If this was an upsert() call, and we ended up\n // inserting a new doc and we know its id, then\n // return that id as well.\n if (options.upsert && meteorResult.insertedId) {\n if (knownId) {\n meteorResult.insertedId = knownId;\n } else if (meteorResult.insertedId instanceof MongoDB.ObjectID) {\n meteorResult.insertedId = new Mongo.ObjectID(meteorResult.insertedId.toHexString());\n }\n }\n\n callback(err, meteorResult);\n } else {\n callback(err, meteorResult.numberAffected);\n }\n } else {\n callback(err);\n }\n }));\n }\n } catch (e) {\n write.committed();\n throw e;\n }\n};\n\nvar transformResult = function (driverResult) {\n var meteorResult = { numberAffected: 0 };\n if (driverResult) {\n var mongoResult = driverResult.result;\n\n // On updates with upsert:true, the inserted values come as a list of\n // upserted values -- even with options.multi, when the upsert does insert,\n // it only inserts one element.\n if (mongoResult.upserted) {\n meteorResult.numberAffected += mongoResult.upserted.length;\n\n if (mongoResult.upserted.length == 1) {\n meteorResult.insertedId = mongoResult.upserted[0]._id;\n }\n } else {\n meteorResult.numberAffected = mongoResult.n;\n }\n }\n\n return meteorResult;\n};\n\n\nvar NUM_OPTIMISTIC_TRIES = 3;\n\n// exposed for testing\nMongoConnection._isCannotChangeIdError = function (err) {\n\n // Mongo 3.2.* returns error as next Object:\n // {name: String, code: Number, errmsg: String}\n // Older Mongo returns:\n // {name: String, code: Number, err: String}\n var error = err.errmsg || err.err;\n\n // We don't use the error code here\n // because the error code we observed it producing (16837) appears to be\n // a far more generic error code based on examining the source.\n if (error.indexOf('The _id field cannot be changed') === 0\n || error.indexOf(\"the (immutable) field '_id' was found to have been altered to _id\") !== -1) {\n return true;\n }\n\n return false;\n};\n\nvar simulateUpsertWithInsertedId = function (collection, selector, mod,\n options, callback) {\n // STRATEGY: First try doing an upsert with a generated ID.\n // If this throws an error about changing the ID on an existing document\n // then without affecting the database, we know we should probably try\n // an update without the generated ID. If it affected 0 documents,\n // then without affecting the database, we the document that first\n // gave the error is probably removed and we need to try an insert again\n // We go back to step one and repeat.\n // Like all \"optimistic write\" schemes, we rely on the fact that it's\n // unlikely our writes will continue to be interfered with under normal\n // circumstances (though sufficiently heavy contention with writers\n // disagreeing on the existence of an object will cause writes to fail\n // in theory).\n\n var insertedId = options.insertedId; // must exist\n var mongoOptsForUpdate = {\n safe: true,\n multi: options.multi\n };\n var mongoOptsForInsert = {\n safe: true,\n upsert: true\n };\n\n var replacementWithId = Object.assign(\n replaceTypes({_id: insertedId}, replaceMeteorAtomWithMongo),\n mod);\n\n var tries = NUM_OPTIMISTIC_TRIES;\n\n var doUpdate = function () {\n tries--;\n if (! tries) {\n callback(new Error(\"Upsert failed after \" + NUM_OPTIMISTIC_TRIES + \" tries.\"));\n } else {\n collection.update(selector, mod, mongoOptsForUpdate,\n bindEnvironmentForWrite(function (err, result) {\n if (err) {\n callback(err);\n } else if (result && result.result.n != 0) {\n callback(null, {\n numberAffected: result.result.n\n });\n } else {\n doConditionalInsert();\n }\n }));\n }\n };\n\n var doConditionalInsert = function () {\n collection.update(selector, replacementWithId, mongoOptsForInsert,\n bindEnvironmentForWrite(function (err, result) {\n if (err) {\n // figure out if this is a\n // \"cannot change _id of document\" error, and\n // if so, try doUpdate() again, up to 3 times.\n if (MongoConnection._isCannotChangeIdError(err)) {\n doUpdate();\n } else {\n callback(err);\n }\n } else {\n callback(null, {\n numberAffected: result.result.upserted.length,\n insertedId: insertedId,\n });\n }\n }));\n };\n\n doUpdate();\n};\n\n_.each([\"insert\", \"update\", \"remove\", \"dropCollection\", \"dropDatabase\"], function (method) {\n MongoConnection.prototype[method] = function (/* arguments */) {\n var self = this;\n return Meteor.wrapAsync(self[\"_\" + method]).apply(self, arguments);\n };\n});\n\n// XXX MongoConnection.upsert() does not return the id of the inserted document\n// unless you set it explicitly in the selector or modifier (as a replacement\n// doc).\nMongoConnection.prototype.upsert = function (collectionName, selector, mod,\n options, callback) {\n var self = this;\n if (typeof options === \"function\" && ! callback) {\n callback = options;\n options = {};\n }\n\n return self.update(collectionName, selector, mod,\n _.extend({}, options, {\n upsert: true,\n _returnObject: true\n }), callback);\n};\n\nMongoConnection.prototype.find = function (collectionName, selector, options) {\n var self = this;\n\n if (arguments.length === 1)\n selector = {};\n\n return new Cursor(\n self, new CursorDescription(collectionName, selector, options));\n};\n\nMongoConnection.prototype.findOne = function (collection_name, selector,\n options) {\n var self = this;\n if (arguments.length === 1)\n selector = {};\n\n options = options || {};\n options.limit = 1;\n return self.find(collection_name, selector, options).fetch()[0];\n};\n\n// We'll actually design an index API later. For now, we just pass through to\n// Mongo's, but make it synchronous.\nMongoConnection.prototype._ensureIndex = function (collectionName, index,\n options) {\n try {\n var self = this;\n // We expect this function to be called at startup, not from within a method,\n // so we don't interact with the write fence.\n var collection = self.rawCollection(collectionName);\n var future = new Future;\n var indexName = collection.ensureIndex(index, options, future.resolver());\n future.wait();\n } catch (Exception) {\n \n }\n};\nMongoConnection.prototype._dropIndex = function (collectionName, index) {\n var self = this;\n\n // This function is only used by test code, not within a method, so we don't\n // interact with the write fence.\n var collection = self.rawCollection(collectionName);\n var future = new Future;\n var indexName = collection.dropIndex(index, future.resolver());\n future.wait();\n};\n\n// CURSORS\n\n// There are several classes which relate to cursors:\n//\n// CursorDescription represents the arguments used to construct a cursor:\n// collectionName, selector, and (find) options. Because it is used as a key\n// for cursor de-dup, everything in it should either be JSON-stringifiable or\n// not affect observeChanges output (eg, options.transform functions are not\n// stringifiable but do not affect observeChanges).\n//\n// SynchronousCursor is a wrapper around a MongoDB cursor\n// which includes fully-synchronous versions of forEach, etc.\n//\n// Cursor is the cursor object returned from find(), which implements the\n// documented Mongo.Collection cursor API. It wraps a CursorDescription and a\n// SynchronousCursor (lazily: it doesn't contact Mongo until you call a method\n// like fetch or forEach on it).\n//\n// ObserveHandle is the \"observe handle\" returned from observeChanges. It has a\n// reference to an ObserveMultiplexer.\n//\n// ObserveMultiplexer allows multiple identical ObserveHandles to be driven by a\n// single observe driver.\n//\n// There are two \"observe drivers\" which drive ObserveMultiplexers:\n// - PollingObserveDriver caches the results of a query and reruns it when\n// necessary.\n// - OplogObserveDriver follows the Mongo operation log to directly observe\n// database changes.\n// Both implementations follow the same simple interface: when you create them,\n// they start sending observeChanges callbacks (and a ready() invocation) to\n// their ObserveMultiplexer, and you stop them by calling their stop() method.\n\nCursorDescription = function (collectionName, selector, options) {\n var self = this;\n self.collectionName = collectionName;\n self.selector = Mongo.Collection._rewriteSelector(selector);\n self.options = options || {};\n};\n\nCursor = function (mongo, cursorDescription) {\n var self = this;\n\n self._mongo = mongo;\n self._cursorDescription = cursorDescription;\n self._synchronousCursor = null;\n};\n\n_.each(['forEach', 'map', 'fetch', 'count', Symbol.iterator], function (method) {\n Cursor.prototype[method] = function () {\n var self = this;\n\n // You can only observe a tailable cursor.\n if (self._cursorDescription.options.tailable)\n throw new Error(\"Cannot call \" + method + \" on a tailable cursor\");\n\n if (!self._synchronousCursor) {\n self._synchronousCursor = self._mongo._createSynchronousCursor(\n self._cursorDescription, {\n // Make sure that the \"self\" argument to forEach/map callbacks is the\n // Cursor, not the SynchronousCursor.\n selfForIteration: self,\n useTransform: true\n });\n }\n\n return self._synchronousCursor[method].apply(\n self._synchronousCursor, arguments);\n };\n});\n\n// Since we don't actually have a \"nextObject\" interface, there's really no\n// reason to have a \"rewind\" interface. All it did was make multiple calls\n// to fetch/map/forEach return nothing the second time.\n// XXX COMPAT WITH 0.8.1\nCursor.prototype.rewind = function () {\n};\n\nCursor.prototype.getTransform = function () {\n return this._cursorDescription.options.transform;\n};\n\n// When you call Meteor.publish() with a function that returns a Cursor, we need\n// to transmute it into the equivalent subscription. This is the function that\n// does that.\n\nCursor.prototype._publishCursor = function (sub) {\n var self = this;\n var collection = self._cursorDescription.collectionName;\n return Mongo.Collection._publishCursor(self, sub, collection);\n};\n\n// Used to guarantee that publish functions return at most one cursor per\n// collection. Private, because we might later have cursors that include\n// documents from multiple collections somehow.\nCursor.prototype._getCollectionName = function () {\n var self = this;\n return self._cursorDescription.collectionName;\n};\n\nCursor.prototype.observe = function (callbacks) {\n var self = this;\n return LocalCollection._observeFromObserveChanges(self, callbacks);\n};\n\nCursor.prototype.observeChanges = function (callbacks) {\n var self = this;\n var methods = [\n 'addedAt',\n 'added',\n 'changedAt',\n 'changed',\n 'removedAt',\n 'removed',\n 'movedTo'\n ];\n var ordered = LocalCollection._observeChangesCallbacksAreOrdered(callbacks);\n\n // XXX: Can we find out if callbacks are from observe?\n var exceptionName = ' observe/observeChanges callback';\n methods.forEach(function (method) {\n if (callbacks[method] && typeof callbacks[method] == \"function\") {\n callbacks[method] = Meteor.bindEnvironment(callbacks[method], method + exceptionName);\n }\n });\n\n return self._mongo._observeChanges(\n self._cursorDescription, ordered, callbacks);\n};\n\nMongoConnection.prototype._createSynchronousCursor = function(\n cursorDescription, options) {\n var self = this;\n options = _.pick(options || {}, 'selfForIteration', 'useTransform');\n\n var collection = self.rawCollection(cursorDescription.collectionName);\n var cursorOptions = cursorDescription.options;\n var mongoOptions = {\n sort: cursorOptions.sort,\n limit: cursorOptions.limit,\n skip: cursorOptions.skip,\n projection: cursorOptions.fields\n };\n\n // Do we want a tailable cursor (which only works on capped collections)?\n if (cursorOptions.tailable) {\n // We want a tailable cursor...\n mongoOptions.tailable = true;\n // ... and for the server to wait a bit if any getMore has no data (rather\n // than making us put the relevant sleeps in the client)...\n mongoOptions.awaitdata = true;\n // ... and to keep querying the server indefinitely rather than just 5 times\n // if there's no more data.\n mongoOptions.numberOfRetries = -1;\n // And if this is on the oplog collection and the cursor specifies a 'ts',\n // then set the undocumented oplog replay flag, which does a special scan to\n // find the first document (instead of creating an index on ts). This is a\n // very hard-coded Mongo flag which only works on the oplog collection and\n // only works with the ts field.\n if (cursorDescription.collectionName === OPLOG_COLLECTION &&\n cursorDescription.selector.ts) {\n mongoOptions.oplogReplay = true;\n }\n }\n\n var dbCursor = collection.find(\n replaceTypes(cursorDescription.selector, replaceMeteorAtomWithMongo),\n mongoOptions);\n\n if (typeof cursorOptions.maxTimeMs !== 'undefined') {\n dbCursor = dbCursor.maxTimeMS(cursorOptions.maxTimeMs);\n }\n if (typeof cursorOptions.hint !== 'undefined') {\n dbCursor = dbCursor.hint(cursorOptions.hint);\n }\n\n return new SynchronousCursor(dbCursor, cursorDescription, options);\n};\n\nvar SynchronousCursor = function (dbCursor, cursorDescription, options) {\n var self = this;\n options = _.pick(options || {}, 'selfForIteration', 'useTransform');\n\n self._dbCursor = dbCursor;\n self._cursorDescription = cursorDescription;\n // The \"self\" argument passed to forEach/map callbacks. If we're wrapped\n // inside a user-visible Cursor, we want to provide the outer cursor!\n self._selfForIteration = options.selfForIteration || self;\n if (options.useTransform && cursorDescription.options.transform) {\n self._transform = LocalCollection.wrapTransform(\n cursorDescription.options.transform);\n } else {\n self._transform = null;\n }\n\n self._synchronousCount = Future.wrap(dbCursor.count.bind(dbCursor));\n self._visitedIds = new LocalCollection._IdMap;\n};\n\n_.extend(SynchronousCursor.prototype, {\n // Returns a Promise for the next object from the underlying cursor (before\n // the Mongo->Meteor type replacement).\n _rawNextObjectPromise: function () {\n const self = this;\n return new Promise((resolve, reject) => {\n self._dbCursor.next((err, doc) => {\n if (err) {\n reject(err);\n } else {\n resolve(doc);\n }\n });\n });\n },\n\n // Returns a Promise for the next object from the cursor, skipping those whose\n // IDs we've already seen and replacing Mongo atoms with Meteor atoms.\n _nextObjectPromise: async function () {\n var self = this;\n\n while (true) {\n var doc = await self._rawNextObjectPromise();\n\n if (!doc) return null;\n doc = replaceTypes(doc, replaceMongoAtomWithMeteor);\n\n if (!self._cursorDescription.options.tailable && _.has(doc, '_id')) {\n // Did Mongo give us duplicate documents in the same cursor? If so,\n // ignore this one. (Do this before the transform, since transform might\n // return some unrelated value.) We don't do this for tailable cursors,\n // because we want to maintain O(1) memory usage. And if there isn't _id\n // for some reason (maybe it's the oplog), then we don't do this either.\n // (Be careful to do this for falsey but existing _id, though.)\n if (self._visitedIds.has(doc._id)) continue;\n self._visitedIds.set(doc._id, true);\n }\n\n if (self._transform)\n doc = self._transform(doc);\n\n return doc;\n }\n },\n\n // Returns a promise which is resolved with the next object (like with\n // _nextObjectPromise) or rejected if the cursor doesn't return within\n // timeoutMS ms.\n _nextObjectPromiseWithTimeout: function (timeoutMS) {\n const self = this;\n if (!timeoutMS) {\n return self._nextObjectPromise();\n }\n const nextObjectPromise = self._nextObjectPromise();\n const timeoutErr = new Error('Client-side timeout waiting for next object');\n const timeoutPromise = new Promise((resolve, reject) => {\n const timer = setTimeout(() => {\n reject(timeoutErr);\n }, timeoutMS);\n });\n return Promise.race([nextObjectPromise, timeoutPromise])\n .catch((err) => {\n if (err === timeoutErr) {\n self.close();\n }\n throw err;\n });\n },\n\n _nextObject: function () {\n var self = this;\n return self._nextObjectPromise().await();\n },\n\n forEach: function (callback, thisArg) {\n var self = this;\n\n // Get back to the beginning.\n self._rewind();\n\n // We implement the loop ourself instead of using self._dbCursor.each,\n // because \"each\" will call its callback outside of a fiber which makes it\n // much more complex to make this function synchronous.\n var index = 0;\n while (true) {\n var doc = self._nextObject();\n if (!doc) return;\n callback.call(thisArg, doc, index++, self._selfForIteration);\n }\n },\n\n // XXX Allow overlapping callback executions if callback yields.\n map: function (callback, thisArg) {\n var self = this;\n var res = [];\n self.forEach(function (doc, index) {\n res.push(callback.call(thisArg, doc, index, self._selfForIteration));\n });\n return res;\n },\n\n _rewind: function () {\n var self = this;\n\n // known to be synchronous\n self._dbCursor.rewind();\n\n self._visitedIds = new LocalCollection._IdMap;\n },\n\n // Mostly usable for tailable cursors.\n close: function () {\n var self = this;\n\n self._dbCursor.close();\n },\n\n fetch: function () {\n var self = this;\n return self.map(_.identity);\n },\n\n count: function (applySkipLimit = false) {\n var self = this;\n return self._synchronousCount(applySkipLimit).wait();\n },\n\n // This method is NOT wrapped in Cursor.\n getRawObjects: function (ordered) {\n var self = this;\n if (ordered) {\n return self.fetch();\n } else {\n var results = new LocalCollection._IdMap;\n self.forEach(function (doc) {\n results.set(doc._id, doc);\n });\n return results;\n }\n }\n});\n\nSynchronousCursor.prototype[Symbol.iterator] = function () {\n var self = this;\n\n // Get back to the beginning.\n self._rewind();\n\n return {\n next() {\n const doc = self._nextObject();\n return doc ? {\n value: doc\n } : {\n done: true\n };\n }\n };\n};\n\n// Tails the cursor described by cursorDescription, most likely on the\n// oplog. Calls docCallback with each document found. Ignores errors and just\n// restarts the tail on error.\n//\n// If timeoutMS is set, then if we don't get a new document every timeoutMS,\n// kill and restart the cursor. This is primarily a workaround for #8598.\nMongoConnection.prototype.tail = function (cursorDescription, docCallback, timeoutMS) {\n var self = this;\n if (!cursorDescription.options.tailable)\n throw new Error(\"Can only tail a tailable cursor\");\n\n var cursor = self._createSynchronousCursor(cursorDescription);\n\n var stopped = false;\n var lastTS;\n var loop = function () {\n var doc = null;\n while (true) {\n if (stopped)\n return;\n try {\n doc = cursor._nextObjectPromiseWithTimeout(timeoutMS).await();\n } catch (err) {\n // There's no good way to figure out if this was actually an error from\n // Mongo, or just client-side (including our own timeout error). Ah\n // well. But either way, we need to retry the cursor (unless the failure\n // was because the observe got stopped).\n doc = null;\n }\n // Since we awaited a promise above, we need to check again to see if\n // we've been stopped before calling the callback.\n if (stopped)\n return;\n if (doc) {\n // If a tailable cursor contains a \"ts\" field, use it to recreate the\n // cursor on error. (\"ts\" is a standard that Mongo uses internally for\n // the oplog, and there's a special flag that lets you do binary search\n // on it instead of needing to use an index.)\n lastTS = doc.ts;\n docCallback(doc);\n } else {\n var newSelector = _.clone(cursorDescription.selector);\n if (lastTS) {\n newSelector.ts = {$gt: lastTS};\n }\n cursor = self._createSynchronousCursor(new CursorDescription(\n cursorDescription.collectionName,\n newSelector,\n cursorDescription.options));\n // Mongo failover takes many seconds. Retry in a bit. (Without this\n // setTimeout, we peg the CPU at 100% and never notice the actual\n // failover.\n Meteor.setTimeout(loop, 100);\n break;\n }\n }\n };\n\n Meteor.defer(loop);\n\n return {\n stop: function () {\n stopped = true;\n cursor.close();\n }\n };\n};\n\nMongoConnection.prototype._observeChanges = function (\n cursorDescription, ordered, callbacks) {\n var self = this;\n\n if (cursorDescription.options.tailable) {\n return self._observeChangesTailable(cursorDescription, ordered, callbacks);\n }\n\n // You may not filter out _id when observing changes, because the id is a core\n // part of the observeChanges API.\n if (cursorDescription.options.fields &&\n (cursorDescription.options.fields._id === 0 ||\n cursorDescription.options.fields._id === false)) {\n throw Error(\"You may not observe a cursor with {fields: {_id: 0}}\");\n }\n\n var observeKey = EJSON.stringify(\n _.extend({ordered: ordered}, cursorDescription));\n\n var multiplexer, observeDriver;\n var firstHandle = false;\n\n // Find a matching ObserveMultiplexer, or create a new one. This next block is\n // guaranteed to not yield (and it doesn't call anything that can observe a\n // new query), so no other calls to this function can interleave with it.\n Meteor._noYieldsAllowed(function () {\n if (_.has(self._observeMultiplexers, observeKey)) {\n multiplexer = self._observeMultiplexers[observeKey];\n } else {\n firstHandle = true;\n // Create a new ObserveMultiplexer.\n multiplexer = new ObserveMultiplexer({\n ordered: ordered,\n onStop: function () {\n delete self._observeMultiplexers[observeKey];\n observeDriver.stop();\n }\n });\n self._observeMultiplexers[observeKey] = multiplexer;\n }\n });\n\n var observeHandle = new ObserveHandle(multiplexer, callbacks);\n\n if (firstHandle) {\n var matcher, sorter;\n var canUseOplog = _.all([\n function () {\n // At a bare minimum, using the oplog requires us to have an oplog, to\n // want unordered callbacks, and to not want a callback on the polls\n // that won't happen.\n return self._oplogHandle && !ordered &&\n !callbacks._testOnlyPollCallback;\n }, function () {\n // We need to be able to compile the selector. Fall back to polling for\n // some newfangled $selector that minimongo doesn't support yet.\n try {\n matcher = new Minimongo.Matcher(cursorDescription.selector);\n return true;\n } catch (e) {\n // XXX make all compilation errors MinimongoError or something\n // so that this doesn't ignore unrelated exceptions\n return false;\n }\n }, function () {\n // ... and the selector itself needs to support oplog.\n return OplogObserveDriver.cursorSupported(cursorDescription, matcher);\n }, function () {\n // And we need to be able to compile the sort, if any. eg, can't be\n // {$natural: 1}.\n if (!cursorDescription.options.sort)\n return true;\n try {\n sorter = new Minimongo.Sorter(cursorDescription.options.sort);\n return true;\n } catch (e) {\n // XXX make all compilation errors MinimongoError or something\n // so that this doesn't ignore unrelated exceptions\n return false;\n }\n }], function (f) { return f(); }); // invoke each function\n\n var driverClass = canUseOplog ? OplogObserveDriver : PollingObserveDriver;\n observeDriver = new driverClass({\n cursorDescription: cursorDescription,\n mongoHandle: self,\n multiplexer: multiplexer,\n ordered: ordered,\n matcher: matcher, // ignored by polling\n sorter: sorter, // ignored by polling\n _testOnlyPollCallback: callbacks._testOnlyPollCallback\n });\n\n // This field is only set for use in tests.\n multiplexer._observeDriver = observeDriver;\n }\n\n // Blocks until the initial adds have been sent.\n multiplexer.addHandleAndSendInitialAdds(observeHandle);\n\n return observeHandle;\n};\n\n// Listen for the invalidation messages that will trigger us to poll the\n// database for changes. If this selector specifies specific IDs, specify them\n// here, so that updates to different specific IDs don't cause us to poll.\n// listenCallback is the same kind of (notification, complete) callback passed\n// to InvalidationCrossbar.listen.\n\nlistenAll = function (cursorDescription, listenCallback) {\n var listeners = [];\n forEachTrigger(cursorDescription, function (trigger) {\n listeners.push(DDPServer._InvalidationCrossbar.listen(\n trigger, listenCallback));\n });\n\n return {\n stop: function () {\n _.each(listeners, function (listener) {\n listener.stop();\n });\n }\n };\n};\n\nforEachTrigger = function (cursorDescription, triggerCallback) {\n var key = {collection: cursorDescription.collectionName};\n var specificIds = LocalCollection._idsMatchedBySelector(\n cursorDescription.selector);\n if (specificIds) {\n _.each(specificIds, function (id) {\n triggerCallback(_.extend({id: id}, key));\n });\n triggerCallback(_.extend({dropCollection: true, id: null}, key));\n } else {\n triggerCallback(key);\n }\n // Everyone cares about the database being dropped.\n triggerCallback({ dropDatabase: true });\n};\n\n// observeChanges for tailable cursors on capped collections.\n//\n// Some differences from normal cursors:\n// - Will never produce anything other than 'added' or 'addedBefore'. If you\n// do update a document that has already been produced, this will not notice\n// it.\n// - If you disconnect and reconnect from Mongo, it will essentially restart\n// the query, which will lead to duplicate results. This is pretty bad,\n// but if you include a field called 'ts' which is inserted as\n// new MongoInternals.MongoTimestamp(0, 0) (which is initialized to the\n// current Mongo-style timestamp), we'll be able to find the place to\n// restart properly. (This field is specifically understood by Mongo with an\n// optimization which allows it to find the right place to start without\n// an index on ts. It's how the oplog works.)\n// - No callbacks are triggered synchronously with the call (there's no\n// differentiation between \"initial data\" and \"later changes\"; everything\n// that matches the query gets sent asynchronously).\n// - De-duplication is not implemented.\n// - Does not yet interact with the write fence. Probably, this should work by\n// ignoring removes (which don't work on capped collections) and updates\n// (which don't affect tailable cursors), and just keeping track of the ID\n// of the inserted object, and closing the write fence once you get to that\n// ID (or timestamp?). This doesn't work well if the document doesn't match\n// the query, though. On the other hand, the write fence can close\n// immediately if it does not match the query. So if we trust minimongo\n// enough to accurately evaluate the query against the write fence, we\n// should be able to do this... Of course, minimongo doesn't even support\n// Mongo Timestamps yet.\nMongoConnection.prototype._observeChangesTailable = function (\n cursorDescription, ordered, callbacks) {\n var self = this;\n\n // Tailable cursors only ever call added/addedBefore callbacks, so it's an\n // error if you didn't provide them.\n if ((ordered && !callbacks.addedBefore) ||\n (!ordered && !callbacks.added)) {\n throw new Error(\"Can't observe an \" + (ordered ? \"ordered\" : \"unordered\")\n + \" tailable cursor without a \"\n + (ordered ? \"addedBefore\" : \"added\") + \" callback\");\n }\n\n return self.tail(cursorDescription, function (doc) {\n var id = doc._id;\n delete doc._id;\n // The ts is an implementation detail. Hide it.\n delete doc.ts;\n if (ordered) {\n callbacks.addedBefore(id, doc, null);\n } else {\n callbacks.added(id, doc);\n }\n });\n};\n\n// XXX We probably need to find a better way to expose this. Right now\n// it's only used by tests, but in fact you need it in normal\n// operation to interact with capped collections.\nMongoInternals.MongoTimestamp = MongoDB.Timestamp;\n\nMongoInternals.Connection = MongoConnection;\n","var Future = Npm.require('fibers/future');\n\nimport { NpmModuleMongodb } from \"meteor/npm-mongo\";\nconst { Timestamp } = NpmModuleMongodb;\n\nOPLOG_COLLECTION = 'oplog.rs';\n\nvar TOO_FAR_BEHIND = process.env.METEOR_OPLOG_TOO_FAR_BEHIND || 2000;\nvar TAIL_TIMEOUT = +process.env.METEOR_OPLOG_TAIL_TIMEOUT || 30000;\n\nvar showTS = function (ts) {\n return \"Timestamp(\" + ts.getHighBits() + \", \" + ts.getLowBits() + \")\";\n};\n\nidForOp = function (op) {\n if (op.op === 'd')\n return op.o._id;\n else if (op.op === 'i')\n return op.o._id;\n else if (op.op === 'u')\n return op.o2._id;\n else if (op.op === 'c')\n throw Error(\"Operator 'c' doesn't supply an object with id: \" +\n EJSON.stringify(op));\n else\n throw Error(\"Unknown op: \" + EJSON.stringify(op));\n};\n\nOplogHandle = function (oplogUrl, dbName) {\n var self = this;\n self._oplogUrl = oplogUrl;\n self._dbName = dbName;\n\n self._oplogLastEntryConnection = null;\n self._oplogTailConnection = null;\n self._stopped = false;\n self._tailHandle = null;\n self._readyFuture = new Future();\n self._crossbar = new DDPServer._Crossbar({\n factPackage: \"mongo-livedata\", factName: \"oplog-watchers\"\n });\n self._baseOplogSelector = {\n ns: new RegExp(\"^(?:\" + [\n Meteor._escapeRegExp(self._dbName + \".\"),\n Meteor._escapeRegExp(\"admin.$cmd\"),\n ].join(\"|\") + \")\"),\n\n $or: [\n { op: { $in: ['i', 'u', 'd'] } },\n // drop collection\n { op: 'c', 'o.drop': { $exists: true } },\n { op: 'c', 'o.dropDatabase': 1 },\n { op: 'c', 'o.applyOps': { $exists: true } },\n ]\n };\n\n // Data structures to support waitUntilCaughtUp(). Each oplog entry has a\n // MongoTimestamp object on it (which is not the same as a Date --- it's a\n // combination of time and an incrementing counter; see\n // http://docs.mongodb.org/manual/reference/bson-types/#timestamps).\n //\n // _catchingUpFutures is an array of {ts: MongoTimestamp, future: Future}\n // objects, sorted by ascending timestamp. _lastProcessedTS is the\n // MongoTimestamp of the last oplog entry we've processed.\n //\n // Each time we call waitUntilCaughtUp, we take a peek at the final oplog\n // entry in the db. If we've already processed it (ie, it is not greater than\n // _lastProcessedTS), waitUntilCaughtUp immediately returns. Otherwise,\n // waitUntilCaughtUp makes a new Future and inserts it along with the final\n // timestamp entry that it read, into _catchingUpFutures. waitUntilCaughtUp\n // then waits on that future, which is resolved once _lastProcessedTS is\n // incremented to be past its timestamp by the worker fiber.\n //\n // XXX use a priority queue or something else that's faster than an array\n self._catchingUpFutures = [];\n self._lastProcessedTS = null;\n\n self._onSkippedEntriesHook = new Hook({\n debugPrintExceptions: \"onSkippedEntries callback\"\n });\n\n self._entryQueue = new Meteor._DoubleEndedQueue();\n self._workerActive = false;\n\n self._startTailing();\n};\n\n_.extend(OplogHandle.prototype, {\n stop: function () {\n var self = this;\n if (self._stopped)\n return;\n self._stopped = true;\n if (self._tailHandle)\n self._tailHandle.stop();\n // XXX should close connections too\n },\n onOplogEntry: function (trigger, callback) {\n var self = this;\n if (self._stopped)\n throw new Error(\"Called onOplogEntry on stopped handle!\");\n\n // Calling onOplogEntry requires us to wait for the tailing to be ready.\n self._readyFuture.wait();\n\n var originalCallback = callback;\n callback = Meteor.bindEnvironment(function (notification) {\n originalCallback(notification);\n }, function (err) {\n Meteor._debug(\"Error in oplog callback\", err);\n });\n var listenHandle = self._crossbar.listen(trigger, callback);\n return {\n stop: function () {\n listenHandle.stop();\n }\n };\n },\n // Register a callback to be invoked any time we skip oplog entries (eg,\n // because we are too far behind).\n onSkippedEntries: function (callback) {\n var self = this;\n if (self._stopped)\n throw new Error(\"Called onSkippedEntries on stopped handle!\");\n return self._onSkippedEntriesHook.register(callback);\n },\n // Calls `callback` once the oplog has been processed up to a point that is\n // roughly \"now\": specifically, once we've processed all ops that are\n // currently visible.\n // XXX become convinced that this is actually safe even if oplogConnection\n // is some kind of pool\n waitUntilCaughtUp: function () {\n var self = this;\n if (self._stopped)\n throw new Error(\"Called waitUntilCaughtUp on stopped handle!\");\n\n // Calling waitUntilCaughtUp requries us to wait for the oplog connection to\n // be ready.\n self._readyFuture.wait();\n var lastEntry;\n\n while (!self._stopped) {\n // We need to make the selector at least as restrictive as the actual\n // tailing selector (ie, we need to specify the DB name) or else we might\n // find a TS that won't show up in the actual tail stream.\n try {\n lastEntry = self._oplogLastEntryConnection.findOne(\n OPLOG_COLLECTION, self._baseOplogSelector,\n {fields: {ts: 1}, sort: {$natural: -1}});\n break;\n } catch (e) {\n // During failover (eg) if we get an exception we should log and retry\n // instead of crashing.\n Meteor._debug(\"Got exception while reading last entry\", e);\n Meteor._sleepForMs(100);\n }\n }\n\n if (self._stopped)\n return;\n\n if (!lastEntry) {\n // Really, nothing in the oplog? Well, we've processed everything.\n return;\n }\n\n var ts = lastEntry.ts;\n if (!ts)\n throw Error(\"oplog entry without ts: \" + EJSON.stringify(lastEntry));\n\n if (self._lastProcessedTS && ts.lessThanOrEqual(self._lastProcessedTS)) {\n // We've already caught up to here.\n return;\n }\n\n\n // Insert the future into our list. Almost always, this will be at the end,\n // but it's conceivable that if we fail over from one primary to another,\n // the oplog entries we see will go backwards.\n var insertAfter = self._catchingUpFutures.length;\n while (insertAfter - 1 > 0 && self._catchingUpFutures[insertAfter - 1].ts.greaterThan(ts)) {\n insertAfter--;\n }\n var f = new Future;\n self._catchingUpFutures.splice(insertAfter, 0, {ts: ts, future: f});\n f.wait();\n },\n _startTailing: function () {\n var self = this;\n // First, make sure that we're talking to the local database.\n var mongodbUri = Npm.require('mongodb-uri');\n if (mongodbUri.parse(self._oplogUrl).database !== 'local') {\n throw Error(\"$MONGO_OPLOG_URL must be set to the 'local' database of \" +\n \"a Mongo replica set\");\n }\n\n // We make two separate connections to Mongo. The Node Mongo driver\n // implements a naive round-robin connection pool: each \"connection\" is a\n // pool of several (5 by default) TCP connections, and each request is\n // rotated through the pools. Tailable cursor queries block on the server\n // until there is some data to return (or until a few seconds have\n // passed). So if the connection pool used for tailing cursors is the same\n // pool used for other queries, the other queries will be delayed by seconds\n // 1/5 of the time.\n //\n // The tail connection will only ever be running a single tail command, so\n // it only needs to make one underlying TCP connection.\n self._oplogTailConnection = new MongoConnection(\n self._oplogUrl, {poolSize: 1});\n // XXX better docs, but: it's to get monotonic results\n // XXX is it safe to say \"if there's an in flight query, just use its\n // results\"? I don't think so but should consider that\n self._oplogLastEntryConnection = new MongoConnection(\n self._oplogUrl, {poolSize: 1});\n\n // Now, make sure that there actually is a repl set here. If not, oplog\n // tailing won't ever find anything!\n // More on the isMasterDoc\n // https://docs.mongodb.com/manual/reference/command/isMaster/\n var f = new Future;\n self._oplogLastEntryConnection.db.admin().command(\n { ismaster: 1 }, f.resolver());\n var isMasterDoc = f.wait();\n\n if (!(isMasterDoc && isMasterDoc.setName)) {\n throw Error(\"$MONGO_OPLOG_URL must be set to the 'local' database of \" +\n \"a Mongo replica set\");\n }\n\n // Find the last oplog entry.\n var lastOplogEntry = self._oplogLastEntryConnection.findOne(\n OPLOG_COLLECTION, {}, {sort: {$natural: -1}, fields: {ts: 1}});\n\n var oplogSelector = _.clone(self._baseOplogSelector);\n if (lastOplogEntry) {\n // Start after the last entry that currently exists.\n oplogSelector.ts = {$gt: lastOplogEntry.ts};\n // If there are any calls to callWhenProcessedLatest before any other\n // oplog entries show up, allow callWhenProcessedLatest to call its\n // callback immediately.\n self._lastProcessedTS = lastOplogEntry.ts;\n }\n\n var cursorDescription = new CursorDescription(\n OPLOG_COLLECTION, oplogSelector, {tailable: true});\n\n // Start tailing the oplog.\n //\n // We restart the low-level oplog query every 30 seconds if we didn't get a\n // doc. This is a workaround for #8598: the Node Mongo driver has at least\n // one bug that can lead to query callbacks never getting called (even with\n // an error) when leadership failover occur.\n self._tailHandle = self._oplogTailConnection.tail(\n cursorDescription,\n function (doc) {\n self._entryQueue.push(doc);\n self._maybeStartWorker();\n },\n TAIL_TIMEOUT\n );\n self._readyFuture.return();\n },\n\n _maybeStartWorker: function () {\n var self = this;\n if (self._workerActive) return;\n self._workerActive = true;\n\n Meteor.defer(function () {\n // May be called recursively in case of transactions.\n function handleDoc(doc) {\n if (doc.ns === \"admin.$cmd\") {\n if (doc.o.applyOps) {\n // This was a successful transaction, so we need to apply the\n // operations that were involved.\n let nextTimestamp = doc.ts;\n doc.o.applyOps.forEach(op => {\n // See https://github.com/meteor/meteor/issues/10420.\n if (!op.ts) {\n op.ts = nextTimestamp;\n nextTimestamp = nextTimestamp.add(Timestamp.ONE);\n }\n handleDoc(op);\n });\n return;\n }\n throw new Error(\"Unknown command \" + EJSON.stringify(doc));\n }\n\n const trigger = {\n dropCollection: false,\n dropDatabase: false,\n op: doc,\n };\n\n if (typeof doc.ns === \"string\" &&\n doc.ns.startsWith(self._dbName + \".\")) {\n trigger.collection = doc.ns.slice(self._dbName.length + 1);\n }\n\n // Is it a special command and the collection name is hidden\n // somewhere in operator?\n if (trigger.collection === \"$cmd\") {\n if (doc.o.dropDatabase) {\n delete trigger.collection;\n trigger.dropDatabase = true;\n } else if (_.has(doc.o, \"drop\")) {\n trigger.collection = doc.o.drop;\n trigger.dropCollection = true;\n trigger.id = null;\n } else {\n throw Error(\"Unknown command \" + EJSON.stringify(doc));\n }\n\n } else {\n // All other ops have an id.\n trigger.id = idForOp(doc);\n }\n\n self._crossbar.fire(trigger);\n }\n\n try {\n while (! self._stopped &&\n ! self._entryQueue.isEmpty()) {\n // Are we too far behind? Just tell our observers that they need to\n // repoll, and drop our queue.\n if (self._entryQueue.length > TOO_FAR_BEHIND) {\n var lastEntry = self._entryQueue.pop();\n self._entryQueue.clear();\n\n self._onSkippedEntriesHook.each(function (callback) {\n callback();\n return true;\n });\n\n // Free any waitUntilCaughtUp() calls that were waiting for us to\n // pass something that we just skipped.\n self._setLastProcessedTS(lastEntry.ts);\n continue;\n }\n\n const doc = self._entryQueue.shift();\n\n // Fire trigger(s) for this doc.\n handleDoc(doc);\n\n // Now that we've processed this operation, process pending\n // sequencers.\n if (doc.ts) {\n self._setLastProcessedTS(doc.ts);\n } else {\n throw Error(\"oplog entry without ts: \" + EJSON.stringify(doc));\n }\n }\n } finally {\n self._workerActive = false;\n }\n });\n },\n\n _setLastProcessedTS: function (ts) {\n var self = this;\n self._lastProcessedTS = ts;\n while (!_.isEmpty(self._catchingUpFutures) && self._catchingUpFutures[0].ts.lessThanOrEqual(self._lastProcessedTS)) {\n var sequencer = self._catchingUpFutures.shift();\n sequencer.future.return();\n }\n },\n\n //Methods used on tests to dinamically change TOO_FAR_BEHIND\n _defineTooFarBehind: function(value) {\n TOO_FAR_BEHIND = value;\n },\n _resetTooFarBehind: function() {\n TOO_FAR_BEHIND = process.env.METEOR_OPLOG_TOO_FAR_BEHIND || 2000;\n }\n});\n","var Future = Npm.require('fibers/future');\n\nObserveMultiplexer = function (options) {\n var self = this;\n\n if (!options || !_.has(options, 'ordered'))\n throw Error(\"must specified ordered\");\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-multiplexers\", 1);\n\n self._ordered = options.ordered;\n self._onStop = options.onStop || function () {};\n self._queue = new Meteor._SynchronousQueue();\n self._handles = {};\n self._readyFuture = new Future;\n self._cache = new LocalCollection._CachingChangeObserver({\n ordered: options.ordered});\n // Number of addHandleAndSendInitialAdds tasks scheduled but not yet\n // running. removeHandle uses this to know if it's time to call the onStop\n // callback.\n self._addHandleTasksScheduledButNotPerformed = 0;\n\n _.each(self.callbackNames(), function (callbackName) {\n self[callbackName] = function (/* ... */) {\n self._applyCallback(callbackName, _.toArray(arguments));\n };\n });\n};\n\n_.extend(ObserveMultiplexer.prototype, {\n addHandleAndSendInitialAdds: function (handle) {\n var self = this;\n\n // Check this before calling runTask (even though runTask does the same\n // check) so that we don't leak an ObserveMultiplexer on error by\n // incrementing _addHandleTasksScheduledButNotPerformed and never\n // decrementing it.\n if (!self._queue.safeToRunTask())\n throw new Error(\"Can't call observeChanges from an observe callback on the same query\");\n ++self._addHandleTasksScheduledButNotPerformed;\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-handles\", 1);\n\n self._queue.runTask(function () {\n self._handles[handle._id] = handle;\n // Send out whatever adds we have so far (whether or not we the\n // multiplexer is ready).\n self._sendAdds(handle);\n --self._addHandleTasksScheduledButNotPerformed;\n });\n // *outside* the task, since otherwise we'd deadlock\n self._readyFuture.wait();\n },\n\n // Remove an observe handle. If it was the last observe handle, call the\n // onStop callback; you cannot add any more observe handles after this.\n //\n // This is not synchronized with polls and handle additions: this means that\n // you can safely call it from within an observe callback, but it also means\n // that we have to be careful when we iterate over _handles.\n removeHandle: function (id) {\n var self = this;\n\n // This should not be possible: you can only call removeHandle by having\n // access to the ObserveHandle, which isn't returned to user code until the\n // multiplex is ready.\n if (!self._ready())\n throw new Error(\"Can't remove handles until the multiplex is ready\");\n\n delete self._handles[id];\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-handles\", -1);\n\n if (_.isEmpty(self._handles) &&\n self._addHandleTasksScheduledButNotPerformed === 0) {\n self._stop();\n }\n },\n _stop: function (options) {\n var self = this;\n options = options || {};\n\n // It shouldn't be possible for us to stop when all our handles still\n // haven't been returned from observeChanges!\n if (! self._ready() && ! options.fromQueryError)\n throw Error(\"surprising _stop: not ready\");\n\n // Call stop callback (which kills the underlying process which sends us\n // callbacks and removes us from the connection's dictionary).\n self._onStop();\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-multiplexers\", -1);\n\n // Cause future addHandleAndSendInitialAdds calls to throw (but the onStop\n // callback should make our connection forget about us).\n self._handles = null;\n },\n\n // Allows all addHandleAndSendInitialAdds calls to return, once all preceding\n // adds have been processed. Does not block.\n ready: function () {\n var self = this;\n self._queue.queueTask(function () {\n if (self._ready())\n throw Error(\"can't make ObserveMultiplex ready twice!\");\n self._readyFuture.return();\n });\n },\n\n // If trying to execute the query results in an error, call this. This is\n // intended for permanent errors, not transient network errors that could be\n // fixed. It should only be called before ready(), because if you called ready\n // that meant that you managed to run the query once. It will stop this\n // ObserveMultiplex and cause addHandleAndSendInitialAdds calls (and thus\n // observeChanges calls) to throw the error.\n queryError: function (err) {\n var self = this;\n self._queue.runTask(function () {\n if (self._ready())\n throw Error(\"can't claim query has an error after it worked!\");\n self._stop({fromQueryError: true});\n self._readyFuture.throw(err);\n });\n },\n\n // Calls \"cb\" once the effects of all \"ready\", \"addHandleAndSendInitialAdds\"\n // and observe callbacks which came before this call have been propagated to\n // all handles. \"ready\" must have already been called on this multiplexer.\n onFlush: function (cb) {\n var self = this;\n self._queue.queueTask(function () {\n if (!self._ready())\n throw Error(\"only call onFlush on a multiplexer that will be ready\");\n cb();\n });\n },\n callbackNames: function () {\n var self = this;\n if (self._ordered)\n return [\"addedBefore\", \"changed\", \"movedBefore\", \"removed\"];\n else\n return [\"added\", \"changed\", \"removed\"];\n },\n _ready: function () {\n return this._readyFuture.isResolved();\n },\n _applyCallback: function (callbackName, args) {\n var self = this;\n self._queue.queueTask(function () {\n // If we stopped in the meantime, do nothing.\n if (!self._handles)\n return;\n\n // First, apply the change to the cache.\n // XXX We could make applyChange callbacks promise not to hang on to any\n // state from their arguments (assuming that their supplied callbacks\n // don't) and skip this clone. Currently 'changed' hangs on to state\n // though.\n self._cache.applyChange[callbackName].apply(null, EJSON.clone(args));\n\n // If we haven't finished the initial adds, then we should only be getting\n // adds.\n if (!self._ready() &&\n (callbackName !== 'added' && callbackName !== 'addedBefore')) {\n throw new Error(\"Got \" + callbackName + \" during initial adds\");\n }\n\n // Now multiplex the callbacks out to all observe handles. It's OK if\n // these calls yield; since we're inside a task, no other use of our queue\n // can continue until these are done. (But we do have to be careful to not\n // use a handle that got removed, because removeHandle does not use the\n // queue; thus, we iterate over an array of keys that we control.)\n _.each(_.keys(self._handles), function (handleId) {\n var handle = self._handles && self._handles[handleId];\n if (!handle)\n return;\n var callback = handle['_' + callbackName];\n // clone arguments so that callbacks can mutate their arguments\n callback && callback.apply(null, EJSON.clone(args));\n });\n });\n },\n\n // Sends initial adds to a handle. It should only be called from within a task\n // (the task that is processing the addHandleAndSendInitialAdds call). It\n // synchronously invokes the handle's added or addedBefore; there's no need to\n // flush the queue afterwards to ensure that the callbacks get out.\n _sendAdds: function (handle) {\n var self = this;\n if (self._queue.safeToRunTask())\n throw Error(\"_sendAdds may only be called from within a task!\");\n var add = self._ordered ? handle._addedBefore : handle._added;\n if (!add)\n return;\n // note: docs may be an _IdMap or an OrderedDict\n self._cache.docs.forEach(function (doc, id) {\n if (!_.has(self._handles, handle._id))\n throw Error(\"handle got removed before sending initial adds!\");\n var fields = EJSON.clone(doc);\n delete fields._id;\n if (self._ordered)\n add(id, fields, null); // we're going in order, so add at end\n else\n add(id, fields);\n });\n }\n});\n\n\nvar nextObserveHandleId = 1;\nObserveHandle = function (multiplexer, callbacks) {\n var self = this;\n // The end user is only supposed to call stop(). The other fields are\n // accessible to the multiplexer, though.\n self._multiplexer = multiplexer;\n _.each(multiplexer.callbackNames(), function (name) {\n if (callbacks[name]) {\n self['_' + name] = callbacks[name];\n } else if (name === \"addedBefore\" && callbacks.added) {\n // Special case: if you specify \"added\" and \"movedBefore\", you get an\n // ordered observe where for some reason you don't get ordering data on\n // the adds. I dunno, we wrote tests for it, there must have been a\n // reason.\n self._addedBefore = function (id, fields, before) {\n callbacks.added(id, fields);\n };\n }\n });\n self._stopped = false;\n self._id = nextObserveHandleId++;\n};\nObserveHandle.prototype.stop = function () {\n var self = this;\n if (self._stopped)\n return;\n self._stopped = true;\n self._multiplexer.removeHandle(self._id);\n};\n","var Fiber = Npm.require('fibers');\n\nexport class DocFetcher {\n constructor(mongoConnection) {\n this._mongoConnection = mongoConnection;\n // Map from op -> [callback]\n this._callbacksForOp = new Map;\n }\n\n // Fetches document \"id\" from collectionName, returning it or null if not\n // found.\n //\n // If you make multiple calls to fetch() with the same op reference,\n // DocFetcher may assume that they all return the same document. (It does\n // not check to see if collectionName/id match.)\n //\n // You may assume that callback is never called synchronously (and in fact\n // OplogObserveDriver does so).\n fetch(collectionName, id, op, callback) {\n const self = this;\n\n check(collectionName, String);\n check(op, Object);\n\n // If there's already an in-progress fetch for this cache key, yield until\n // it's done and return whatever it returns.\n if (self._callbacksForOp.has(op)) {\n self._callbacksForOp.get(op).push(callback);\n return;\n }\n\n const callbacks = [callback];\n self._callbacksForOp.set(op, callbacks);\n\n Fiber(function () {\n try {\n var doc = self._mongoConnection.findOne(\n collectionName, {_id: id}) || null;\n // Return doc to all relevant callbacks. Note that this array can\n // continue to grow during callback excecution.\n while (callbacks.length > 0) {\n // Clone the document so that the various calls to fetch don't return\n // objects that are intertwingled with each other. Clone before\n // popping the future, so that if clone throws, the error gets passed\n // to the next callback.\n callbacks.pop()(null, EJSON.clone(doc));\n }\n } catch (e) {\n while (callbacks.length > 0) {\n callbacks.pop()(e);\n }\n } finally {\n // XXX consider keeping the doc around for a period of time before\n // removing from the cache\n self._callbacksForOp.delete(op);\n }\n }).run();\n }\n}\n","var POLLING_THROTTLE_MS = +process.env.METEOR_POLLING_THROTTLE_MS || 50;\nvar POLLING_INTERVAL_MS = +process.env.METEOR_POLLING_INTERVAL_MS || 10 * 1000;\n\nPollingObserveDriver = function (options) {\n var self = this;\n\n self._cursorDescription = options.cursorDescription;\n self._mongoHandle = options.mongoHandle;\n self._ordered = options.ordered;\n self._multiplexer = options.multiplexer;\n self._stopCallbacks = [];\n self._stopped = false;\n\n self._synchronousCursor = self._mongoHandle._createSynchronousCursor(\n self._cursorDescription);\n\n // previous results snapshot. on each poll cycle, diffs against\n // results drives the callbacks.\n self._results = null;\n\n // The number of _pollMongo calls that have been added to self._taskQueue but\n // have not started running. Used to make sure we never schedule more than one\n // _pollMongo (other than possibly the one that is currently running). It's\n // also used by _suspendPolling to pretend there's a poll scheduled. Usually,\n // it's either 0 (for \"no polls scheduled other than maybe one currently\n // running\") or 1 (for \"a poll scheduled that isn't running yet\"), but it can\n // also be 2 if incremented by _suspendPolling.\n self._pollsScheduledButNotStarted = 0;\n self._pendingWrites = []; // people to notify when polling completes\n\n // Make sure to create a separately throttled function for each\n // PollingObserveDriver object.\n self._ensurePollIsScheduled = _.throttle(\n self._unthrottledEnsurePollIsScheduled,\n self._cursorDescription.options.pollingThrottleMs || POLLING_THROTTLE_MS /* ms */);\n\n // XXX figure out if we still need a queue\n self._taskQueue = new Meteor._SynchronousQueue();\n\n var listenersHandle = listenAll(\n self._cursorDescription, function (notification) {\n // When someone does a transaction that might affect us, schedule a poll\n // of the database. If that transaction happens inside of a write fence,\n // block the fence until we've polled and notified observers.\n var fence = DDPServer._CurrentWriteFence.get();\n if (fence)\n self._pendingWrites.push(fence.beginWrite());\n // Ensure a poll is scheduled... but if we already know that one is,\n // don't hit the throttled _ensurePollIsScheduled function (which might\n // lead to us calling it unnecessarily in ms).\n if (self._pollsScheduledButNotStarted === 0)\n self._ensurePollIsScheduled();\n }\n );\n self._stopCallbacks.push(function () { listenersHandle.stop(); });\n\n // every once and a while, poll even if we don't think we're dirty, for\n // eventual consistency with database writes from outside the Meteor\n // universe.\n //\n // For testing, there's an undocumented callback argument to observeChanges\n // which disables time-based polling and gets called at the beginning of each\n // poll.\n if (options._testOnlyPollCallback) {\n self._testOnlyPollCallback = options._testOnlyPollCallback;\n } else {\n var pollingInterval =\n self._cursorDescription.options.pollingIntervalMs ||\n self._cursorDescription.options._pollingInterval || // COMPAT with 1.2\n POLLING_INTERVAL_MS;\n var intervalHandle = Meteor.setInterval(\n _.bind(self._ensurePollIsScheduled, self), pollingInterval);\n self._stopCallbacks.push(function () {\n Meteor.clearInterval(intervalHandle);\n });\n }\n\n // Make sure we actually poll soon!\n self._unthrottledEnsurePollIsScheduled();\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-drivers-polling\", 1);\n};\n\n_.extend(PollingObserveDriver.prototype, {\n // This is always called through _.throttle (except once at startup).\n _unthrottledEnsurePollIsScheduled: function () {\n var self = this;\n if (self._pollsScheduledButNotStarted > 0)\n return;\n ++self._pollsScheduledButNotStarted;\n self._taskQueue.queueTask(function () {\n self._pollMongo();\n });\n },\n\n // test-only interface for controlling polling.\n //\n // _suspendPolling blocks until any currently running and scheduled polls are\n // done, and prevents any further polls from being scheduled. (new\n // ObserveHandles can be added and receive their initial added callbacks,\n // though.)\n //\n // _resumePolling immediately polls, and allows further polls to occur.\n _suspendPolling: function() {\n var self = this;\n // Pretend that there's another poll scheduled (which will prevent\n // _ensurePollIsScheduled from queueing any more polls).\n ++self._pollsScheduledButNotStarted;\n // Now block until all currently running or scheduled polls are done.\n self._taskQueue.runTask(function() {});\n\n // Confirm that there is only one \"poll\" (the fake one we're pretending to\n // have) scheduled.\n if (self._pollsScheduledButNotStarted !== 1)\n throw new Error(\"_pollsScheduledButNotStarted is \" +\n self._pollsScheduledButNotStarted);\n },\n _resumePolling: function() {\n var self = this;\n // We should be in the same state as in the end of _suspendPolling.\n if (self._pollsScheduledButNotStarted !== 1)\n throw new Error(\"_pollsScheduledButNotStarted is \" +\n self._pollsScheduledButNotStarted);\n // Run a poll synchronously (which will counteract the\n // ++_pollsScheduledButNotStarted from _suspendPolling).\n self._taskQueue.runTask(function () {\n self._pollMongo();\n });\n },\n\n _pollMongo: function () {\n var self = this;\n --self._pollsScheduledButNotStarted;\n\n if (self._stopped)\n return;\n\n var first = false;\n var newResults;\n var oldResults = self._results;\n if (!oldResults) {\n first = true;\n // XXX maybe use OrderedDict instead?\n oldResults = self._ordered ? [] : new LocalCollection._IdMap;\n }\n\n self._testOnlyPollCallback && self._testOnlyPollCallback();\n\n // Save the list of pending writes which this round will commit.\n var writesForCycle = self._pendingWrites;\n self._pendingWrites = [];\n\n // Get the new query results. (This yields.)\n try {\n newResults = self._synchronousCursor.getRawObjects(self._ordered);\n } catch (e) {\n if (first && typeof(e.code) === 'number') {\n // This is an error document sent to us by mongod, not a connection\n // error generated by the client. And we've never seen this query work\n // successfully. Probably it's a bad selector or something, so we should\n // NOT retry. Instead, we should halt the observe (which ends up calling\n // `stop` on us).\n self._multiplexer.queryError(\n new Error(\n \"Exception while polling query \" +\n JSON.stringify(self._cursorDescription) + \": \" + e.message));\n return;\n }\n\n // getRawObjects can throw if we're having trouble talking to the\n // database. That's fine --- we will repoll later anyway. But we should\n // make sure not to lose track of this cycle's writes.\n // (It also can throw if there's just something invalid about this query;\n // unfortunately the ObserveDriver API doesn't provide a good way to\n // \"cancel\" the observe from the inside in this case.\n Array.prototype.push.apply(self._pendingWrites, writesForCycle);\n Meteor._debug(\"Exception while polling query \" +\n JSON.stringify(self._cursorDescription), e);\n return;\n }\n\n // Run diffs.\n if (!self._stopped) {\n LocalCollection._diffQueryChanges(\n self._ordered, oldResults, newResults, self._multiplexer);\n }\n\n // Signals the multiplexer to allow all observeChanges calls that share this\n // multiplexer to return. (This happens asynchronously, via the\n // multiplexer's queue.)\n if (first)\n self._multiplexer.ready();\n\n // Replace self._results atomically. (This assignment is what makes `first`\n // stay through on the next cycle, so we've waited until after we've\n // committed to ready-ing the multiplexer.)\n self._results = newResults;\n\n // Once the ObserveMultiplexer has processed everything we've done in this\n // round, mark all the writes which existed before this call as\n // commmitted. (If new writes have shown up in the meantime, there'll\n // already be another _pollMongo task scheduled.)\n self._multiplexer.onFlush(function () {\n _.each(writesForCycle, function (w) {\n w.committed();\n });\n });\n },\n\n stop: function () {\n var self = this;\n self._stopped = true;\n _.each(self._stopCallbacks, function (c) { c(); });\n // Release any write fences that are waiting on us.\n _.each(self._pendingWrites, function (w) {\n w.committed();\n });\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-drivers-polling\", -1);\n }\n});\n","var Future = Npm.require('fibers/future');\n\nvar PHASE = {\n QUERYING: \"QUERYING\",\n FETCHING: \"FETCHING\",\n STEADY: \"STEADY\"\n};\n\n// Exception thrown by _needToPollQuery which unrolls the stack up to the\n// enclosing call to finishIfNeedToPollQuery.\nvar SwitchedToQuery = function () {};\nvar finishIfNeedToPollQuery = function (f) {\n return function () {\n try {\n f.apply(this, arguments);\n } catch (e) {\n if (!(e instanceof SwitchedToQuery))\n throw e;\n }\n };\n};\n\nvar currentId = 0;\n\n// OplogObserveDriver is an alternative to PollingObserveDriver which follows\n// the Mongo operation log instead of just re-polling the query. It obeys the\n// same simple interface: constructing it starts sending observeChanges\n// callbacks (and a ready() invocation) to the ObserveMultiplexer, and you stop\n// it by calling the stop() method.\nOplogObserveDriver = function (options) {\n var self = this;\n self._usesOplog = true; // tests look at this\n\n self._id = currentId;\n currentId++;\n\n self._cursorDescription = options.cursorDescription;\n self._mongoHandle = options.mongoHandle;\n self._multiplexer = options.multiplexer;\n\n if (options.ordered) {\n throw Error(\"OplogObserveDriver only supports unordered observeChanges\");\n }\n\n var sorter = options.sorter;\n // We don't support $near and other geo-queries so it's OK to initialize the\n // comparator only once in the constructor.\n var comparator = sorter && sorter.getComparator();\n\n if (options.cursorDescription.options.limit) {\n // There are several properties ordered driver implements:\n // - _limit is a positive number\n // - _comparator is a function-comparator by which the query is ordered\n // - _unpublishedBuffer is non-null Min/Max Heap,\n // the empty buffer in STEADY phase implies that the\n // everything that matches the queries selector fits\n // into published set.\n // - _published - Min Heap (also implements IdMap methods)\n\n var heapOptions = { IdMap: LocalCollection._IdMap };\n self._limit = self._cursorDescription.options.limit;\n self._comparator = comparator;\n self._sorter = sorter;\n self._unpublishedBuffer = new MinMaxHeap(comparator, heapOptions);\n // We need something that can find Max value in addition to IdMap interface\n self._published = new MaxHeap(comparator, heapOptions);\n } else {\n self._limit = 0;\n self._comparator = null;\n self._sorter = null;\n self._unpublishedBuffer = null;\n self._published = new LocalCollection._IdMap;\n }\n\n // Indicates if it is safe to insert a new document at the end of the buffer\n // for this query. i.e. it is known that there are no documents matching the\n // selector those are not in published or buffer.\n self._safeAppendToBuffer = false;\n\n self._stopped = false;\n self._stopHandles = [];\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-drivers-oplog\", 1);\n\n self._registerPhaseChange(PHASE.QUERYING);\n\n self._matcher = options.matcher;\n var projection = self._cursorDescription.options.fields || {};\n self._projectionFn = LocalCollection._compileProjection(projection);\n // Projection function, result of combining important fields for selector and\n // existing fields projection\n self._sharedProjection = self._matcher.combineIntoProjection(projection);\n if (sorter)\n self._sharedProjection = sorter.combineIntoProjection(self._sharedProjection);\n self._sharedProjectionFn = LocalCollection._compileProjection(\n self._sharedProjection);\n\n self._needToFetch = new LocalCollection._IdMap;\n self._currentlyFetching = null;\n self._fetchGeneration = 0;\n\n self._requeryWhenDoneThisQuery = false;\n self._writesToCommitWhenWeReachSteady = [];\n\n // If the oplog handle tells us that it skipped some entries (because it got\n // behind, say), re-poll.\n self._stopHandles.push(self._mongoHandle._oplogHandle.onSkippedEntries(\n finishIfNeedToPollQuery(function () {\n self._needToPollQuery();\n })\n ));\n\n forEachTrigger(self._cursorDescription, function (trigger) {\n self._stopHandles.push(self._mongoHandle._oplogHandle.onOplogEntry(\n trigger, function (notification) {\n Meteor._noYieldsAllowed(finishIfNeedToPollQuery(function () {\n var op = notification.op;\n if (notification.dropCollection || notification.dropDatabase) {\n // Note: this call is not allowed to block on anything (especially\n // on waiting for oplog entries to catch up) because that will block\n // onOplogEntry!\n self._needToPollQuery();\n } else {\n // All other operators should be handled depending on phase\n if (self._phase === PHASE.QUERYING) {\n self._handleOplogEntryQuerying(op);\n } else {\n self._handleOplogEntrySteadyOrFetching(op);\n }\n }\n }));\n }\n ));\n });\n\n // XXX ordering w.r.t. everything else?\n self._stopHandles.push(listenAll(\n self._cursorDescription, function (notification) {\n // If we're not in a pre-fire write fence, we don't have to do anything.\n var fence = DDPServer._CurrentWriteFence.get();\n if (!fence || fence.fired)\n return;\n\n if (fence._oplogObserveDrivers) {\n fence._oplogObserveDrivers[self._id] = self;\n return;\n }\n\n fence._oplogObserveDrivers = {};\n fence._oplogObserveDrivers[self._id] = self;\n\n fence.onBeforeFire(function () {\n var drivers = fence._oplogObserveDrivers;\n delete fence._oplogObserveDrivers;\n\n // This fence cannot fire until we've caught up to \"this point\" in the\n // oplog, and all observers made it back to the steady state.\n self._mongoHandle._oplogHandle.waitUntilCaughtUp();\n\n _.each(drivers, function (driver) {\n if (driver._stopped)\n return;\n\n var write = fence.beginWrite();\n if (driver._phase === PHASE.STEADY) {\n // Make sure that all of the callbacks have made it through the\n // multiplexer and been delivered to ObserveHandles before committing\n // writes.\n driver._multiplexer.onFlush(function () {\n write.committed();\n });\n } else {\n driver._writesToCommitWhenWeReachSteady.push(write);\n }\n });\n });\n }\n ));\n\n // When Mongo fails over, we need to repoll the query, in case we processed an\n // oplog entry that got rolled back.\n self._stopHandles.push(self._mongoHandle._onFailover(finishIfNeedToPollQuery(\n function () {\n self._needToPollQuery();\n })));\n\n // Give _observeChanges a chance to add the new ObserveHandle to our\n // multiplexer, so that the added calls get streamed.\n Meteor.defer(finishIfNeedToPollQuery(function () {\n self._runInitialQuery();\n }));\n};\n\n_.extend(OplogObserveDriver.prototype, {\n _addPublished: function (id, doc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var fields = _.clone(doc);\n delete fields._id;\n self._published.set(id, self._sharedProjectionFn(doc));\n self._multiplexer.added(id, self._projectionFn(fields));\n\n // After adding this document, the published set might be overflowed\n // (exceeding capacity specified by limit). If so, push the maximum\n // element to the buffer, we might want to save it in memory to reduce the\n // amount of Mongo lookups in the future.\n if (self._limit && self._published.size() > self._limit) {\n // XXX in theory the size of published is no more than limit+1\n if (self._published.size() !== self._limit + 1) {\n throw new Error(\"After adding to published, \" +\n (self._published.size() - self._limit) +\n \" documents are overflowing the set\");\n }\n\n var overflowingDocId = self._published.maxElementId();\n var overflowingDoc = self._published.get(overflowingDocId);\n\n if (EJSON.equals(overflowingDocId, id)) {\n throw new Error(\"The document just added is overflowing the published set\");\n }\n\n self._published.remove(overflowingDocId);\n self._multiplexer.removed(overflowingDocId);\n self._addBuffered(overflowingDocId, overflowingDoc);\n }\n });\n },\n _removePublished: function (id) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._published.remove(id);\n self._multiplexer.removed(id);\n if (! self._limit || self._published.size() === self._limit)\n return;\n\n if (self._published.size() > self._limit)\n throw Error(\"self._published got too big\");\n\n // OK, we are publishing less than the limit. Maybe we should look in the\n // buffer to find the next element past what we were publishing before.\n\n if (!self._unpublishedBuffer.empty()) {\n // There's something in the buffer; move the first thing in it to\n // _published.\n var newDocId = self._unpublishedBuffer.minElementId();\n var newDoc = self._unpublishedBuffer.get(newDocId);\n self._removeBuffered(newDocId);\n self._addPublished(newDocId, newDoc);\n return;\n }\n\n // There's nothing in the buffer. This could mean one of a few things.\n\n // (a) We could be in the middle of re-running the query (specifically, we\n // could be in _publishNewResults). In that case, _unpublishedBuffer is\n // empty because we clear it at the beginning of _publishNewResults. In\n // this case, our caller already knows the entire answer to the query and\n // we don't need to do anything fancy here. Just return.\n if (self._phase === PHASE.QUERYING)\n return;\n\n // (b) We're pretty confident that the union of _published and\n // _unpublishedBuffer contain all documents that match selector. Because\n // _unpublishedBuffer is empty, that means we're confident that _published\n // contains all documents that match selector. So we have nothing to do.\n if (self._safeAppendToBuffer)\n return;\n\n // (c) Maybe there are other documents out there that should be in our\n // buffer. But in that case, when we emptied _unpublishedBuffer in\n // _removeBuffered, we should have called _needToPollQuery, which will\n // either put something in _unpublishedBuffer or set _safeAppendToBuffer\n // (or both), and it will put us in QUERYING for that whole time. So in\n // fact, we shouldn't be able to get here.\n\n throw new Error(\"Buffer inexplicably empty\");\n });\n },\n _changePublished: function (id, oldDoc, newDoc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._published.set(id, self._sharedProjectionFn(newDoc));\n var projectedNew = self._projectionFn(newDoc);\n var projectedOld = self._projectionFn(oldDoc);\n var changed = DiffSequence.makeChangedFields(\n projectedNew, projectedOld);\n if (!_.isEmpty(changed))\n self._multiplexer.changed(id, changed);\n });\n },\n _addBuffered: function (id, doc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._unpublishedBuffer.set(id, self._sharedProjectionFn(doc));\n\n // If something is overflowing the buffer, we just remove it from cache\n if (self._unpublishedBuffer.size() > self._limit) {\n var maxBufferedId = self._unpublishedBuffer.maxElementId();\n\n self._unpublishedBuffer.remove(maxBufferedId);\n\n // Since something matching is removed from cache (both published set and\n // buffer), set flag to false\n self._safeAppendToBuffer = false;\n }\n });\n },\n // Is called either to remove the doc completely from matching set or to move\n // it to the published set later.\n _removeBuffered: function (id) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._unpublishedBuffer.remove(id);\n // To keep the contract \"buffer is never empty in STEADY phase unless the\n // everything matching fits into published\" true, we poll everything as\n // soon as we see the buffer becoming empty.\n if (! self._unpublishedBuffer.size() && ! self._safeAppendToBuffer)\n self._needToPollQuery();\n });\n },\n // Called when a document has joined the \"Matching\" results set.\n // Takes responsibility of keeping _unpublishedBuffer in sync with _published\n // and the effect of limit enforced.\n _addMatching: function (doc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var id = doc._id;\n if (self._published.has(id))\n throw Error(\"tried to add something already published \" + id);\n if (self._limit && self._unpublishedBuffer.has(id))\n throw Error(\"tried to add something already existed in buffer \" + id);\n\n var limit = self._limit;\n var comparator = self._comparator;\n var maxPublished = (limit && self._published.size() > 0) ?\n self._published.get(self._published.maxElementId()) : null;\n var maxBuffered = (limit && self._unpublishedBuffer.size() > 0)\n ? self._unpublishedBuffer.get(self._unpublishedBuffer.maxElementId())\n : null;\n // The query is unlimited or didn't publish enough documents yet or the\n // new document would fit into published set pushing the maximum element\n // out, then we need to publish the doc.\n var toPublish = ! limit || self._published.size() < limit ||\n comparator(doc, maxPublished) < 0;\n\n // Otherwise we might need to buffer it (only in case of limited query).\n // Buffering is allowed if the buffer is not filled up yet and all\n // matching docs are either in the published set or in the buffer.\n var canAppendToBuffer = !toPublish && self._safeAppendToBuffer &&\n self._unpublishedBuffer.size() < limit;\n\n // Or if it is small enough to be safely inserted to the middle or the\n // beginning of the buffer.\n var canInsertIntoBuffer = !toPublish && maxBuffered &&\n comparator(doc, maxBuffered) <= 0;\n\n var toBuffer = canAppendToBuffer || canInsertIntoBuffer;\n\n if (toPublish) {\n self._addPublished(id, doc);\n } else if (toBuffer) {\n self._addBuffered(id, doc);\n } else {\n // dropping it and not saving to the cache\n self._safeAppendToBuffer = false;\n }\n });\n },\n // Called when a document leaves the \"Matching\" results set.\n // Takes responsibility of keeping _unpublishedBuffer in sync with _published\n // and the effect of limit enforced.\n _removeMatching: function (id) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n if (! self._published.has(id) && ! self._limit)\n throw Error(\"tried to remove something matching but not cached \" + id);\n\n if (self._published.has(id)) {\n self._removePublished(id);\n } else if (self._unpublishedBuffer.has(id)) {\n self._removeBuffered(id);\n }\n });\n },\n _handleDoc: function (id, newDoc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var matchesNow = newDoc && self._matcher.documentMatches(newDoc).result;\n\n var publishedBefore = self._published.has(id);\n var bufferedBefore = self._limit && self._unpublishedBuffer.has(id);\n var cachedBefore = publishedBefore || bufferedBefore;\n\n if (matchesNow && !cachedBefore) {\n self._addMatching(newDoc);\n } else if (cachedBefore && !matchesNow) {\n self._removeMatching(id);\n } else if (cachedBefore && matchesNow) {\n var oldDoc = self._published.get(id);\n var comparator = self._comparator;\n var minBuffered = self._limit && self._unpublishedBuffer.size() &&\n self._unpublishedBuffer.get(self._unpublishedBuffer.minElementId());\n var maxBuffered;\n\n if (publishedBefore) {\n // Unlimited case where the document stays in published once it\n // matches or the case when we don't have enough matching docs to\n // publish or the changed but matching doc will stay in published\n // anyways.\n //\n // XXX: We rely on the emptiness of buffer. Be sure to maintain the\n // fact that buffer can't be empty if there are matching documents not\n // published. Notably, we don't want to schedule repoll and continue\n // relying on this property.\n var staysInPublished = ! self._limit ||\n self._unpublishedBuffer.size() === 0 ||\n comparator(newDoc, minBuffered) <= 0;\n\n if (staysInPublished) {\n self._changePublished(id, oldDoc, newDoc);\n } else {\n // after the change doc doesn't stay in the published, remove it\n self._removePublished(id);\n // but it can move into buffered now, check it\n maxBuffered = self._unpublishedBuffer.get(\n self._unpublishedBuffer.maxElementId());\n\n var toBuffer = self._safeAppendToBuffer ||\n (maxBuffered && comparator(newDoc, maxBuffered) <= 0);\n\n if (toBuffer) {\n self._addBuffered(id, newDoc);\n } else {\n // Throw away from both published set and buffer\n self._safeAppendToBuffer = false;\n }\n }\n } else if (bufferedBefore) {\n oldDoc = self._unpublishedBuffer.get(id);\n // remove the old version manually instead of using _removeBuffered so\n // we don't trigger the querying immediately. if we end this block\n // with the buffer empty, we will need to trigger the query poll\n // manually too.\n self._unpublishedBuffer.remove(id);\n\n var maxPublished = self._published.get(\n self._published.maxElementId());\n maxBuffered = self._unpublishedBuffer.size() &&\n self._unpublishedBuffer.get(\n self._unpublishedBuffer.maxElementId());\n\n // the buffered doc was updated, it could move to published\n var toPublish = comparator(newDoc, maxPublished) < 0;\n\n // or stays in buffer even after the change\n var staysInBuffer = (! toPublish && self._safeAppendToBuffer) ||\n (!toPublish && maxBuffered &&\n comparator(newDoc, maxBuffered) <= 0);\n\n if (toPublish) {\n self._addPublished(id, newDoc);\n } else if (staysInBuffer) {\n // stays in buffer but changes\n self._unpublishedBuffer.set(id, newDoc);\n } else {\n // Throw away from both published set and buffer\n self._safeAppendToBuffer = false;\n // Normally this check would have been done in _removeBuffered but\n // we didn't use it, so we need to do it ourself now.\n if (! self._unpublishedBuffer.size()) {\n self._needToPollQuery();\n }\n }\n } else {\n throw new Error(\"cachedBefore implies either of publishedBefore or bufferedBefore is true.\");\n }\n }\n });\n },\n _fetchModifiedDocuments: function () {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._registerPhaseChange(PHASE.FETCHING);\n // Defer, because nothing called from the oplog entry handler may yield,\n // but fetch() yields.\n Meteor.defer(finishIfNeedToPollQuery(function () {\n while (!self._stopped && !self._needToFetch.empty()) {\n if (self._phase === PHASE.QUERYING) {\n // While fetching, we decided to go into QUERYING mode, and then we\n // saw another oplog entry, so _needToFetch is not empty. But we\n // shouldn't fetch these documents until AFTER the query is done.\n break;\n }\n\n // Being in steady phase here would be surprising.\n if (self._phase !== PHASE.FETCHING)\n throw new Error(\"phase in fetchModifiedDocuments: \" + self._phase);\n\n self._currentlyFetching = self._needToFetch;\n var thisGeneration = ++self._fetchGeneration;\n self._needToFetch = new LocalCollection._IdMap;\n var waiting = 0;\n var fut = new Future;\n // This loop is safe, because _currentlyFetching will not be updated\n // during this loop (in fact, it is never mutated).\n self._currentlyFetching.forEach(function (op, id) {\n waiting++;\n self._mongoHandle._docFetcher.fetch(\n self._cursorDescription.collectionName, id, op,\n finishIfNeedToPollQuery(function (err, doc) {\n try {\n if (err) {\n Meteor._debug(\"Got exception while fetching documents\",\n err);\n // If we get an error from the fetcher (eg, trouble\n // connecting to Mongo), let's just abandon the fetch phase\n // altogether and fall back to polling. It's not like we're\n // getting live updates anyway.\n if (self._phase !== PHASE.QUERYING) {\n self._needToPollQuery();\n }\n } else if (!self._stopped && self._phase === PHASE.FETCHING\n && self._fetchGeneration === thisGeneration) {\n // We re-check the generation in case we've had an explicit\n // _pollQuery call (eg, in another fiber) which should\n // effectively cancel this round of fetches. (_pollQuery\n // increments the generation.)\n self._handleDoc(id, doc);\n }\n } finally {\n waiting--;\n // Because fetch() never calls its callback synchronously,\n // this is safe (ie, we won't call fut.return() before the\n // forEach is done).\n if (waiting === 0)\n fut.return();\n }\n }));\n });\n fut.wait();\n // Exit now if we've had a _pollQuery call (here or in another fiber).\n if (self._phase === PHASE.QUERYING)\n return;\n self._currentlyFetching = null;\n }\n // We're done fetching, so we can be steady, unless we've had a\n // _pollQuery call (here or in another fiber).\n if (self._phase !== PHASE.QUERYING)\n self._beSteady();\n }));\n });\n },\n _beSteady: function () {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._registerPhaseChange(PHASE.STEADY);\n var writes = self._writesToCommitWhenWeReachSteady;\n self._writesToCommitWhenWeReachSteady = [];\n self._multiplexer.onFlush(function () {\n _.each(writes, function (w) {\n w.committed();\n });\n });\n });\n },\n _handleOplogEntryQuerying: function (op) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._needToFetch.set(idForOp(op), op);\n });\n },\n _handleOplogEntrySteadyOrFetching: function (op) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var id = idForOp(op);\n // If we're already fetching this one, or about to, we can't optimize;\n // make sure that we fetch it again if necessary.\n if (self._phase === PHASE.FETCHING &&\n ((self._currentlyFetching && self._currentlyFetching.has(id)) ||\n self._needToFetch.has(id))) {\n self._needToFetch.set(id, op);\n return;\n }\n\n if (op.op === 'd') {\n if (self._published.has(id) ||\n (self._limit && self._unpublishedBuffer.has(id)))\n self._removeMatching(id);\n } else if (op.op === 'i') {\n if (self._published.has(id))\n throw new Error(\"insert found for already-existing ID in published\");\n if (self._unpublishedBuffer && self._unpublishedBuffer.has(id))\n throw new Error(\"insert found for already-existing ID in buffer\");\n\n // XXX what if selector yields? for now it can't but later it could\n // have $where\n if (self._matcher.documentMatches(op.o).result)\n self._addMatching(op.o);\n } else if (op.op === 'u') {\n // Is this a modifier ($set/$unset, which may require us to poll the\n // database to figure out if the whole document matches the selector) or\n // a replacement (in which case we can just directly re-evaluate the\n // selector)?\n var isReplace = !_.has(op.o, '$set') && !_.has(op.o, '$unset');\n // If this modifier modifies something inside an EJSON custom type (ie,\n // anything with EJSON$), then we can't try to use\n // LocalCollection._modify, since that just mutates the EJSON encoding,\n // not the actual object.\n var canDirectlyModifyDoc =\n !isReplace && modifierCanBeDirectlyApplied(op.o);\n\n var publishedBefore = self._published.has(id);\n var bufferedBefore = self._limit && self._unpublishedBuffer.has(id);\n\n if (isReplace) {\n self._handleDoc(id, _.extend({_id: id}, op.o));\n } else if ((publishedBefore || bufferedBefore) &&\n canDirectlyModifyDoc) {\n // Oh great, we actually know what the document is, so we can apply\n // this directly.\n var newDoc = self._published.has(id)\n ? self._published.get(id) : self._unpublishedBuffer.get(id);\n newDoc = EJSON.clone(newDoc);\n\n newDoc._id = id;\n try {\n LocalCollection._modify(newDoc, op.o);\n } catch (e) {\n if (e.name !== \"MinimongoError\")\n throw e;\n // We didn't understand the modifier. Re-fetch.\n self._needToFetch.set(id, op);\n if (self._phase === PHASE.STEADY) {\n self._fetchModifiedDocuments();\n }\n return;\n }\n self._handleDoc(id, self._sharedProjectionFn(newDoc));\n } else if (!canDirectlyModifyDoc ||\n self._matcher.canBecomeTrueByModifier(op.o) ||\n (self._sorter && self._sorter.affectedByModifier(op.o))) {\n self._needToFetch.set(id, op);\n if (self._phase === PHASE.STEADY)\n self._fetchModifiedDocuments();\n }\n } else {\n throw Error(\"XXX SURPRISING OPERATION: \" + op);\n }\n });\n },\n // Yields!\n _runInitialQuery: function () {\n var self = this;\n if (self._stopped)\n throw new Error(\"oplog stopped surprisingly early\");\n\n self._runQuery({initial: true}); // yields\n\n if (self._stopped)\n return; // can happen on queryError\n\n // Allow observeChanges calls to return. (After this, it's possible for\n // stop() to be called.)\n self._multiplexer.ready();\n\n self._doneQuerying(); // yields\n },\n\n // In various circumstances, we may just want to stop processing the oplog and\n // re-run the initial query, just as if we were a PollingObserveDriver.\n //\n // This function may not block, because it is called from an oplog entry\n // handler.\n //\n // XXX We should call this when we detect that we've been in FETCHING for \"too\n // long\".\n //\n // XXX We should call this when we detect Mongo failover (since that might\n // mean that some of the oplog entries we have processed have been rolled\n // back). The Node Mongo driver is in the middle of a bunch of huge\n // refactorings, including the way that it notifies you when primary\n // changes. Will put off implementing this until driver 1.4 is out.\n _pollQuery: function () {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n if (self._stopped)\n return;\n\n // Yay, we get to forget about all the things we thought we had to fetch.\n self._needToFetch = new LocalCollection._IdMap;\n self._currentlyFetching = null;\n ++self._fetchGeneration; // ignore any in-flight fetches\n self._registerPhaseChange(PHASE.QUERYING);\n\n // Defer so that we don't yield. We don't need finishIfNeedToPollQuery\n // here because SwitchedToQuery is not thrown in QUERYING mode.\n Meteor.defer(function () {\n self._runQuery();\n self._doneQuerying();\n });\n });\n },\n\n // Yields!\n _runQuery: function (options) {\n var self = this;\n options = options || {};\n var newResults, newBuffer;\n\n // This while loop is just to retry failures.\n while (true) {\n // If we've been stopped, we don't have to run anything any more.\n if (self._stopped)\n return;\n\n newResults = new LocalCollection._IdMap;\n newBuffer = new LocalCollection._IdMap;\n\n // Query 2x documents as the half excluded from the original query will go\n // into unpublished buffer to reduce additional Mongo lookups in cases\n // when documents are removed from the published set and need a\n // replacement.\n // XXX needs more thought on non-zero skip\n // XXX 2 is a \"magic number\" meaning there is an extra chunk of docs for\n // buffer if such is needed.\n var cursor = self._cursorForQuery({ limit: self._limit * 2 });\n try {\n cursor.forEach(function (doc, i) { // yields\n if (!self._limit || i < self._limit) {\n newResults.set(doc._id, doc);\n } else {\n newBuffer.set(doc._id, doc);\n }\n });\n break;\n } catch (e) {\n if (options.initial && typeof(e.code) === 'number') {\n // This is an error document sent to us by mongod, not a connection\n // error generated by the client. And we've never seen this query work\n // successfully. Probably it's a bad selector or something, so we\n // should NOT retry. Instead, we should halt the observe (which ends\n // up calling `stop` on us).\n self._multiplexer.queryError(e);\n return;\n }\n\n // During failover (eg) if we get an exception we should log and retry\n // instead of crashing.\n Meteor._debug(\"Got exception while polling query\", e);\n Meteor._sleepForMs(100);\n }\n }\n\n if (self._stopped)\n return;\n\n self._publishNewResults(newResults, newBuffer);\n },\n\n // Transitions to QUERYING and runs another query, or (if already in QUERYING)\n // ensures that we will query again later.\n //\n // This function may not block, because it is called from an oplog entry\n // handler. However, if we were not already in the QUERYING phase, it throws\n // an exception that is caught by the closest surrounding\n // finishIfNeedToPollQuery call; this ensures that we don't continue running\n // close that was designed for another phase inside PHASE.QUERYING.\n //\n // (It's also necessary whenever logic in this file yields to check that other\n // phases haven't put us into QUERYING mode, though; eg,\n // _fetchModifiedDocuments does this.)\n _needToPollQuery: function () {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n if (self._stopped)\n return;\n\n // If we're not already in the middle of a query, we can query now\n // (possibly pausing FETCHING).\n if (self._phase !== PHASE.QUERYING) {\n self._pollQuery();\n throw new SwitchedToQuery;\n }\n\n // We're currently in QUERYING. Set a flag to ensure that we run another\n // query when we're done.\n self._requeryWhenDoneThisQuery = true;\n });\n },\n\n // Yields!\n _doneQuerying: function () {\n var self = this;\n\n if (self._stopped)\n return;\n self._mongoHandle._oplogHandle.waitUntilCaughtUp(); // yields\n if (self._stopped)\n return;\n if (self._phase !== PHASE.QUERYING)\n throw Error(\"Phase unexpectedly \" + self._phase);\n\n Meteor._noYieldsAllowed(function () {\n if (self._requeryWhenDoneThisQuery) {\n self._requeryWhenDoneThisQuery = false;\n self._pollQuery();\n } else if (self._needToFetch.empty()) {\n self._beSteady();\n } else {\n self._fetchModifiedDocuments();\n }\n });\n },\n\n _cursorForQuery: function (optionsOverwrite) {\n var self = this;\n return Meteor._noYieldsAllowed(function () {\n // The query we run is almost the same as the cursor we are observing,\n // with a few changes. We need to read all the fields that are relevant to\n // the selector, not just the fields we are going to publish (that's the\n // \"shared\" projection). And we don't want to apply any transform in the\n // cursor, because observeChanges shouldn't use the transform.\n var options = _.clone(self._cursorDescription.options);\n\n // Allow the caller to modify the options. Useful to specify different\n // skip and limit values.\n _.extend(options, optionsOverwrite);\n\n options.fields = self._sharedProjection;\n delete options.transform;\n // We are NOT deep cloning fields or selector here, which should be OK.\n var description = new CursorDescription(\n self._cursorDescription.collectionName,\n self._cursorDescription.selector,\n options);\n return new Cursor(self._mongoHandle, description);\n });\n },\n\n\n // Replace self._published with newResults (both are IdMaps), invoking observe\n // callbacks on the multiplexer.\n // Replace self._unpublishedBuffer with newBuffer.\n //\n // XXX This is very similar to LocalCollection._diffQueryUnorderedChanges. We\n // should really: (a) Unify IdMap and OrderedDict into Unordered/OrderedDict\n // (b) Rewrite diff.js to use these classes instead of arrays and objects.\n _publishNewResults: function (newResults, newBuffer) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n\n // If the query is limited and there is a buffer, shut down so it doesn't\n // stay in a way.\n if (self._limit) {\n self._unpublishedBuffer.clear();\n }\n\n // First remove anything that's gone. Be careful not to modify\n // self._published while iterating over it.\n var idsToRemove = [];\n self._published.forEach(function (doc, id) {\n if (!newResults.has(id))\n idsToRemove.push(id);\n });\n _.each(idsToRemove, function (id) {\n self._removePublished(id);\n });\n\n // Now do adds and changes.\n // If self has a buffer and limit, the new fetched result will be\n // limited correctly as the query has sort specifier.\n newResults.forEach(function (doc, id) {\n self._handleDoc(id, doc);\n });\n\n // Sanity-check that everything we tried to put into _published ended up\n // there.\n // XXX if this is slow, remove it later\n if (self._published.size() !== newResults.size()) {\n console.error('The Mongo server and the Meteor query disagree on how ' +\n 'many documents match your query. Cursor description: ',\n self._cursorDescription);\n throw Error(\n \"The Mongo server and the Meteor query disagree on how \" +\n \"many documents match your query. Maybe it is hitting a Mongo \" +\n \"edge case? The query is: \" +\n EJSON.stringify(self._cursorDescription.selector));\n }\n self._published.forEach(function (doc, id) {\n if (!newResults.has(id))\n throw Error(\"_published has a doc that newResults doesn't; \" + id);\n });\n\n // Finally, replace the buffer\n newBuffer.forEach(function (doc, id) {\n self._addBuffered(id, doc);\n });\n\n self._safeAppendToBuffer = newBuffer.size() < self._limit;\n });\n },\n\n // This stop function is invoked from the onStop of the ObserveMultiplexer, so\n // it shouldn't actually be possible to call it until the multiplexer is\n // ready.\n //\n // It's important to check self._stopped after every call in this file that\n // can yield!\n stop: function () {\n var self = this;\n if (self._stopped)\n return;\n self._stopped = true;\n _.each(self._stopHandles, function (handle) {\n handle.stop();\n });\n\n // Note: we *don't* use multiplexer.onFlush here because this stop\n // callback is actually invoked by the multiplexer itself when it has\n // determined that there are no handles left. So nothing is actually going\n // to get flushed (and it's probably not valid to call methods on the\n // dying multiplexer).\n _.each(self._writesToCommitWhenWeReachSteady, function (w) {\n w.committed(); // maybe yields?\n });\n self._writesToCommitWhenWeReachSteady = null;\n\n // Proactively drop references to potentially big things.\n self._published = null;\n self._unpublishedBuffer = null;\n self._needToFetch = null;\n self._currentlyFetching = null;\n self._oplogEntryHandle = null;\n self._listenersHandle = null;\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-drivers-oplog\", -1);\n },\n\n _registerPhaseChange: function (phase) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var now = new Date;\n\n if (self._phase) {\n var timeDiff = now - self._phaseStartTime;\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"time-spent-in-\" + self._phase + \"-phase\", timeDiff);\n }\n\n self._phase = phase;\n self._phaseStartTime = now;\n });\n }\n});\n\n// Does our oplog tailing code support this cursor? For now, we are being very\n// conservative and allowing only simple queries with simple options.\n// (This is a \"static method\".)\nOplogObserveDriver.cursorSupported = function (cursorDescription, matcher) {\n // First, check the options.\n var options = cursorDescription.options;\n\n // Did the user say no explicitly?\n // underscored version of the option is COMPAT with 1.2\n if (options.disableOplog || options._disableOplog)\n return false;\n\n // skip is not supported: to support it we would need to keep track of all\n // \"skipped\" documents or at least their ids.\n // limit w/o a sort specifier is not supported: current implementation needs a\n // deterministic way to order documents.\n if (options.skip || (options.limit && !options.sort)) return false;\n\n // If a fields projection option is given check if it is supported by\n // minimongo (some operators are not supported).\n if (options.fields) {\n try {\n LocalCollection._checkSupportedProjection(options.fields);\n } catch (e) {\n if (e.name === \"MinimongoError\") {\n return false;\n } else {\n throw e;\n }\n }\n }\n\n // We don't allow the following selectors:\n // - $where (not confident that we provide the same JS environment\n // as Mongo, and can yield!)\n // - $near (has \"interesting\" properties in MongoDB, like the possibility\n // of returning an ID multiple times, though even polling maybe\n // have a bug there)\n // XXX: once we support it, we would need to think more on how we\n // initialize the comparators when we create the driver.\n return !matcher.hasWhere() && !matcher.hasGeoQuery();\n};\n\nvar modifierCanBeDirectlyApplied = function (modifier) {\n return _.all(modifier, function (fields, operation) {\n return _.all(fields, function (value, field) {\n return !/EJSON\\$/.test(field);\n });\n });\n};\n\nMongoInternals.OplogObserveDriver = OplogObserveDriver;\n","// singleton\nexport const LocalCollectionDriver = new (class LocalCollectionDriver {\n constructor() {\n this.noConnCollections = Object.create(null);\n }\n\n open(name, conn) {\n if (! name) {\n return new LocalCollection;\n }\n\n if (! conn) {\n return ensureCollection(name, this.noConnCollections);\n }\n\n if (! conn._mongo_livedata_collections) {\n conn._mongo_livedata_collections = Object.create(null);\n }\n\n // XXX is there a way to keep track of a connection's collections without\n // dangling it off the connection object?\n return ensureCollection(name, conn._mongo_livedata_collections);\n }\n});\n\nfunction ensureCollection(name, collections) {\n return (name in collections)\n ? collections[name]\n : collections[name] = new LocalCollection(name);\n}\n","MongoInternals.RemoteCollectionDriver = function (\n mongo_url, options) {\n var self = this;\n self.mongo = new MongoConnection(mongo_url, options);\n};\n\n_.extend(MongoInternals.RemoteCollectionDriver.prototype, {\n open: function (name) {\n var self = this;\n var ret = {};\n _.each(\n ['find', 'findOne', 'insert', 'update', 'upsert',\n 'remove', '_ensureIndex', '_dropIndex', '_createCappedCollection',\n 'dropCollection', 'rawCollection'],\n function (m) {\n ret[m] = _.bind(self.mongo[m], self.mongo, name);\n });\n return ret;\n }\n});\n\n\n// Create the singleton RemoteCollectionDriver only on demand, so we\n// only require Mongo configuration if it's actually used (eg, not if\n// you're only trying to receive data from a remote DDP server.)\nMongoInternals.defaultRemoteCollectionDriver = _.once(function () {\n var connectionOptions = {};\n\n var mongoUrl = process.env.MONGO_URL;\n\n if (process.env.MONGO_OPLOG_URL) {\n connectionOptions.oplogUrl = process.env.MONGO_OPLOG_URL;\n }\n\n if (! mongoUrl)\n throw new Error(\"MONGO_URL must be set in environment\");\n\n return new MongoInternals.RemoteCollectionDriver(mongoUrl, connectionOptions);\n});\n","// options.connection, if given, is a LivedataClient or LivedataServer\n// XXX presently there is no way to destroy/clean up a Collection\n\n/**\n * @summary Namespace for MongoDB-related items\n * @namespace\n */\nMongo = {};\n\n/**\n * @summary Constructor for a Collection\n * @locus Anywhere\n * @instancename collection\n * @class\n * @param {String} name The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.\n * @param {Object} [options]\n * @param {Object} options.connection The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling [`DDP.connect`](#ddp_connect) to specify a different server. Pass `null` to specify no connection. Unmanaged (`name` is null) collections cannot specify a connection.\n * @param {String} options.idGeneration The method of generating the `_id` fields of new documents in this collection. Possible values:\n\n - **`'STRING'`**: random strings\n - **`'MONGO'`**: random [`Mongo.ObjectID`](#mongo_object_id) values\n\nThe default id generation technique is `'STRING'`.\n * @param {Function} options.transform An optional transformation function. Documents will be passed through this function before being returned from `fetch` or `findOne`, and before being passed to callbacks of `observe`, `map`, `forEach`, `allow`, and `deny`. Transforms are *not* applied for the callbacks of `observeChanges` or to cursors returned from publish functions.\n * @param {Boolean} options.defineMutationMethods Set to `false` to skip setting up the mutation methods that enable insert/update/remove from client code. Default `true`.\n */\nMongo.Collection = function Collection(name, options) {\n if (!name && (name !== null)) {\n Meteor._debug(\"Warning: creating anonymous collection. It will not be \" +\n \"saved or synchronized over the network. (Pass null for \" +\n \"the collection name to turn off this warning.)\");\n name = null;\n }\n\n if (name !== null && typeof name !== \"string\") {\n throw new Error(\n \"First argument to new Mongo.Collection must be a string or null\");\n }\n\n if (options && options.methods) {\n // Backwards compatibility hack with original signature (which passed\n // \"connection\" directly instead of in options. (Connections must have a \"methods\"\n // method.)\n // XXX remove before 1.0\n options = {connection: options};\n }\n // Backwards compatibility: \"connection\" used to be called \"manager\".\n if (options && options.manager && !options.connection) {\n options.connection = options.manager;\n }\n\n options = {\n connection: undefined,\n idGeneration: 'STRING',\n transform: null,\n _driver: undefined,\n _preventAutopublish: false,\n ...options,\n };\n\n switch (options.idGeneration) {\n case 'MONGO':\n this._makeNewID = function () {\n var src = name ? DDP.randomStream('/collection/' + name) : Random.insecure;\n return new Mongo.ObjectID(src.hexString(24));\n };\n break;\n case 'STRING':\n default:\n this._makeNewID = function () {\n var src = name ? DDP.randomStream('/collection/' + name) : Random.insecure;\n return src.id();\n };\n break;\n }\n\n this._transform = LocalCollection.wrapTransform(options.transform);\n\n if (! name || options.connection === null)\n // note: nameless collections never have a connection\n this._connection = null;\n else if (options.connection)\n this._connection = options.connection;\n else if (Meteor.isClient)\n this._connection = Meteor.connection;\n else\n this._connection = Meteor.server;\n\n if (!options._driver) {\n // XXX This check assumes that webapp is loaded so that Meteor.server !==\n // null. We should fully support the case of \"want to use a Mongo-backed\n // collection from Node code without webapp\", but we don't yet.\n // #MeteorServerNull\n if (name && this._connection === Meteor.server &&\n typeof MongoInternals !== \"undefined\" &&\n MongoInternals.defaultRemoteCollectionDriver) {\n options._driver = MongoInternals.defaultRemoteCollectionDriver();\n } else {\n const { LocalCollectionDriver } =\n require(\"./local_collection_driver.js\");\n options._driver = LocalCollectionDriver;\n }\n }\n\n this._collection = options._driver.open(name, this._connection);\n this._name = name;\n this._driver = options._driver;\n\n this._maybeSetUpReplication(name, options);\n\n // XXX don't define these until allow or deny is actually used for this\n // collection. Could be hard if the security rules are only defined on the\n // server.\n if (options.defineMutationMethods !== false) {\n try {\n this._defineMutationMethods({\n useExisting: options._suppressSameNameError === true\n });\n } catch (error) {\n // Throw a more understandable error on the server for same collection name\n if (error.message === `A method named '/${name}/insert' is already defined`)\n throw new Error(`There is already a collection named \"${name}\"`);\n throw error;\n }\n }\n\n // autopublish\n if (Package.autopublish &&\n ! options._preventAutopublish &&\n this._connection &&\n this._connection.publish) {\n this._connection.publish(null, () => this.find(), {\n is_auto: true,\n });\n }\n};\n\nObject.assign(Mongo.Collection.prototype, {\n _maybeSetUpReplication(name, {\n _suppressSameNameError = false\n }) {\n const self = this;\n if (! (self._connection &&\n self._connection.registerStore)) {\n return;\n }\n\n // OK, we're going to be a slave, replicating some remote\n // database, except possibly with some temporary divergence while\n // we have unacknowledged RPC's.\n const ok = self._connection.registerStore(name, {\n // Called at the beginning of a batch of updates. batchSize is the number\n // of update calls to expect.\n //\n // XXX This interface is pretty janky. reset probably ought to go back to\n // being its own function, and callers shouldn't have to calculate\n // batchSize. The optimization of not calling pause/remove should be\n // delayed until later: the first call to update() should buffer its\n // message, and then we can either directly apply it at endUpdate time if\n // it was the only update, or do pauseObservers/apply/apply at the next\n // update() if there's another one.\n beginUpdate(batchSize, reset) {\n // pause observers so users don't see flicker when updating several\n // objects at once (including the post-reconnect reset-and-reapply\n // stage), and so that a re-sorting of a query can take advantage of the\n // full _diffQuery moved calculation instead of applying change one at a\n // time.\n if (batchSize > 1 || reset)\n self._collection.pauseObservers();\n\n if (reset)\n self._collection.remove({});\n },\n\n // Apply an update.\n // XXX better specify this interface (not in terms of a wire message)?\n update(msg) {\n if(Meteor.isClient){\n try {\n if(!msg){\n throw new Error(\"mongo update message is undefined. collection name is \" + self._name)\n }\n } catch (error) {\n console.error(error, msg)\n }\n }\n var mongoId = MongoID.idParse(msg.id);\n var doc = self._collection.findOne(mongoId);\n\n // Is this a \"replace the whole doc\" message coming from the quiescence\n // of method writes to an object? (Note that 'undefined' is a valid\n // value meaning \"remove it\".)\n if (msg.msg === 'replace') {\n var replace = msg.replace;\n if (!replace) {\n if (doc)\n self._collection.remove(mongoId);\n } else if (!doc) {\n self._collection.insert(replace);\n } else {\n // XXX check that replace has no $ ops\n self._collection.update(mongoId, replace);\n }\n return;\n } else if (msg.msg === 'added') {\n if (doc) {\n throw new Error(\"Expected not to find a document already present for an add\");\n }\n self._collection.insert({ _id: mongoId, ...msg.fields });\n } else if (msg.msg === 'removed') {\n if (!doc)\n throw new Error(\"Expected to find a document already present for removed\");\n self._collection.remove(mongoId);\n } else if (msg.msg === 'changed') {\n if (!doc)\n throw new Error(\"Expected to find a document to change\");\n const keys = Object.keys(msg.fields);\n if (keys.length > 0) {\n var modifier = {};\n keys.forEach(key => {\n const value = msg.fields[key];\n if (EJSON.equals(doc[key], value)) {\n return;\n }\n if (typeof value === \"undefined\") {\n if (!modifier.$unset) {\n modifier.$unset = {};\n }\n modifier.$unset[key] = 1;\n } else {\n if (!modifier.$set) {\n modifier.$set = {};\n }\n modifier.$set[key] = value;\n }\n });\n if (Object.keys(modifier).length > 0) {\n self._collection.update(mongoId, modifier);\n }\n }\n } else {\n throw new Error(\"I don't know how to deal with this message\");\n }\n },\n\n // Called at the end of a batch of updates.\n endUpdate() {\n self._collection.resumeObservers();\n },\n\n // Called around method stub invocations to capture the original versions\n // of modified documents.\n saveOriginals() {\n self._collection.saveOriginals();\n },\n retrieveOriginals() {\n return self._collection.retrieveOriginals();\n },\n\n // Used to preserve current versions of documents across a store reset.\n getDoc(id) {\n return self.findOne(id);\n },\n\n // To be able to get back to the collection from the store.\n _getCollection() {\n return self;\n }\n });\n\n if (! ok) {\n const message = `There is already a collection named \"${name}\"`;\n if (_suppressSameNameError === true) {\n // XXX In theory we do not have to throw when `ok` is falsy. The\n // store is already defined for this collection name, but this\n // will simply be another reference to it and everything should\n // work. However, we have historically thrown an error here, so\n // for now we will skip the error only when _suppressSameNameError\n // is `true`, allowing people to opt in and give this some real\n // world testing.\n console.warn ? console.warn(message) : console.log(message);\n } else {\n throw new Error(message);\n }\n }\n },\n\n ///\n /// Main collection API\n ///\n\n _getFindSelector(args) {\n if (args.length == 0)\n return {};\n else\n return args[0];\n },\n\n _getFindOptions(args) {\n var self = this;\n if (args.length < 2) {\n return { transform: self._transform };\n } else {\n check(args[1], Match.Optional(Match.ObjectIncluding({\n fields: Match.Optional(Match.OneOf(Object, undefined)),\n sort: Match.Optional(Match.OneOf(Object, Array, Function, undefined)),\n limit: Match.Optional(Match.OneOf(Number, undefined)),\n skip: Match.Optional(Match.OneOf(Number, undefined))\n })));\n\n return {\n transform: self._transform,\n ...args[1],\n };\n }\n },\n\n /**\n * @summary Find the documents in a collection that match the selector.\n * @locus Anywhere\n * @method find\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} [selector] A query describing the documents to find\n * @param {Object} [options]\n * @param {MongoSortSpecifier} options.sort Sort order (default: natural order)\n * @param {Number} options.skip Number of results to skip at the beginning\n * @param {Number} options.limit Maximum number of results to return\n * @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.\n * @param {Boolean} options.reactive (Client only) Default `true`; pass `false` to disable reactivity\n * @param {Function} options.transform Overrides `transform` on the [`Collection`](#collections) for this cursor. Pass `null` to disable transformation.\n * @param {Boolean} options.disableOplog (Server only) Pass true to disable oplog-tailing on this query. This affects the way server processes calls to `observe` on this query. Disabling the oplog can be useful when working with data that updates in large batches.\n * @param {Number} options.pollingIntervalMs (Server only) When oplog is disabled (through the use of `disableOplog` or when otherwise not available), the frequency (in milliseconds) of how often to poll this query when observing on the server. Defaults to 10000ms (10 seconds).\n * @param {Number} options.pollingThrottleMs (Server only) When oplog is disabled (through the use of `disableOplog` or when otherwise not available), the minimum time (in milliseconds) to allow between re-polling when observing on the server. Increasing this will save CPU and mongo load at the expense of slower updates to users. Decreasing this is not recommended. Defaults to 50ms.\n * @param {Number} options.maxTimeMs (Server only) If set, instructs MongoDB to set a time limit for this cursor's operations. If the operation reaches the specified time limit (in milliseconds) without the having been completed, an exception will be thrown. Useful to prevent an (accidental or malicious) unoptimized query from causing a full collection scan that would disrupt other database users, at the expense of needing to handle the resulting error.\n * @param {String|Object} options.hint (Server only) Overrides MongoDB's default index selection and query optimization process. Specify an index to force its use, either by its name or index specification. You can also specify `{ $natural : 1 }` to force a forwards collection scan, or `{ $natural : -1 }` for a reverse collection scan. Setting this is only recommended for advanced users.\n * @returns {Mongo.Cursor}\n */\n find(...args) {\n // Collection.find() (return all docs) behaves differently\n // from Collection.find(undefined) (return 0 docs). so be\n // careful about the length of arguments.\n return this._collection.find(\n this._getFindSelector(args),\n this._getFindOptions(args)\n );\n },\n\n /**\n * @summary Finds the first document that matches the selector, as ordered by sort and skip options. Returns `undefined` if no matching document is found.\n * @locus Anywhere\n * @method findOne\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} [selector] A query describing the documents to find\n * @param {Object} [options]\n * @param {MongoSortSpecifier} options.sort Sort order (default: natural order)\n * @param {Number} options.skip Number of results to skip at the beginning\n * @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.\n * @param {Boolean} options.reactive (Client only) Default true; pass false to disable reactivity\n * @param {Function} options.transform Overrides `transform` on the [`Collection`](#collections) for this cursor. Pass `null` to disable transformation.\n * @returns {Object}\n */\n findOne(...args) {\n return this._collection.findOne(\n this._getFindSelector(args),\n this._getFindOptions(args)\n );\n }\n});\n\nObject.assign(Mongo.Collection, {\n _publishCursor(cursor, sub, collection) {\n var observeHandle = cursor.observeChanges({\n added: function (id, fields) {\n sub.added(collection, id, fields);\n },\n changed: function (id, fields) {\n sub.changed(collection, id, fields);\n },\n removed: function (id) {\n sub.removed(collection, id);\n }\n });\n\n // We don't call sub.ready() here: it gets called in livedata_server, after\n // possibly calling _publishCursor on multiple returned cursors.\n\n // register stop callback (expects lambda w/ no args).\n sub.onStop(function () {\n observeHandle.stop();\n });\n\n // return the observeHandle in case it needs to be stopped early\n return observeHandle;\n },\n\n // protect against dangerous selectors. falsey and {_id: falsey} are both\n // likely programmer error, and not what you want, particularly for destructive\n // operations. If a falsey _id is sent in, a new string _id will be\n // generated and returned; if a fallbackId is provided, it will be returned\n // instead.\n _rewriteSelector(selector, { fallbackId } = {}) {\n // shorthand -- scalars match _id\n if (LocalCollection._selectorIsId(selector))\n selector = {_id: selector};\n\n if (Array.isArray(selector)) {\n // This is consistent with the Mongo console itself; if we don't do this\n // check passing an empty array ends up selecting all items\n throw new Error(\"Mongo selector can't be an array.\");\n }\n\n if (!selector || (('_id' in selector) && !selector._id)) {\n // can't match anything\n return { _id: fallbackId || Random.id() };\n }\n\n return selector;\n }\n});\n\nObject.assign(Mongo.Collection.prototype, {\n // 'insert' immediately returns the inserted document's new _id.\n // The others return values immediately if you are in a stub, an in-memory\n // unmanaged collection, or a mongo-backed collection and you don't pass a\n // callback. 'update' and 'remove' return the number of affected\n // documents. 'upsert' returns an object with keys 'numberAffected' and, if an\n // insert happened, 'insertedId'.\n //\n // Otherwise, the semantics are exactly like other methods: they take\n // a callback as an optional last argument; if no callback is\n // provided, they block until the operation is complete, and throw an\n // exception if it fails; if a callback is provided, then they don't\n // necessarily block, and they call the callback when they finish with error and\n // result arguments. (The insert method provides the document ID as its result;\n // update and remove provide the number of affected docs as the result; upsert\n // provides an object with numberAffected and maybe insertedId.)\n //\n // On the client, blocking is impossible, so if a callback\n // isn't provided, they just return immediately and any error\n // information is lost.\n //\n // There's one more tweak. On the client, if you don't provide a\n // callback, then if there is an error, a message will be logged with\n // Meteor._debug.\n //\n // The intent (though this is actually determined by the underlying\n // drivers) is that the operations should be done synchronously, not\n // generating their result until the database has acknowledged\n // them. In the future maybe we should provide a flag to turn this\n // off.\n\n /**\n * @summary Insert a document in the collection. Returns its unique _id.\n * @locus Anywhere\n * @method insert\n * @memberof Mongo.Collection\n * @instance\n * @param {Object} doc The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.\n * @param {Function} [callback] Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.\n */\n insert(doc, callback) {\n // Make sure we were passed a document to insert\n if (!doc) {\n throw new Error(\"insert requires an argument\");\n }\n\n // Make a shallow clone of the document, preserving its prototype.\n doc = Object.create(\n Object.getPrototypeOf(doc),\n Object.getOwnPropertyDescriptors(doc)\n );\n\n if ('_id' in doc) {\n if (! doc._id ||\n ! (typeof doc._id === 'string' ||\n doc._id instanceof Mongo.ObjectID)) {\n throw new Error(\n \"Meteor requires document _id fields to be non-empty strings or ObjectIDs\");\n }\n } else {\n let generateId = true;\n\n // Don't generate the id if we're the client and the 'outermost' call\n // This optimization saves us passing both the randomSeed and the id\n // Passing both is redundant.\n if (this._isRemoteCollection()) {\n const enclosing = DDP._CurrentMethodInvocation.get();\n if (!enclosing) {\n generateId = false;\n }\n }\n\n if (generateId) {\n doc._id = this._makeNewID();\n }\n }\n\n // On inserts, always return the id that we generated; on all other\n // operations, just return the result from the collection.\n var chooseReturnValueFromCollectionResult = function (result) {\n if (doc._id) {\n return doc._id;\n }\n\n // XXX what is this for??\n // It's some iteraction between the callback to _callMutatorMethod and\n // the return value conversion\n doc._id = result;\n\n return result;\n };\n\n const wrappedCallback = wrapCallback(\n callback, chooseReturnValueFromCollectionResult);\n\n if (this._isRemoteCollection()) {\n const result = this._callMutatorMethod(\"insert\", [doc], wrappedCallback);\n return chooseReturnValueFromCollectionResult(result);\n }\n\n // it's my collection. descend into the collection object\n // and propagate any exception.\n try {\n // If the user provided a callback and the collection implements this\n // operation asynchronously, then queryRet will be undefined, and the\n // result will be returned through the callback instead.\n const result = this._collection.insert(doc, wrappedCallback);\n return chooseReturnValueFromCollectionResult(result);\n } catch (e) {\n if (callback) {\n callback(e);\n return null;\n }\n throw e;\n }\n },\n\n /**\n * @summary Modify one or more documents in the collection. Returns the number of matched documents.\n * @locus Anywhere\n * @method update\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} selector Specifies which documents to modify\n * @param {MongoModifier} modifier Specifies how to modify the documents\n * @param {Object} [options]\n * @param {Boolean} options.multi True to modify all matching documents; false to only modify one of the matching documents (the default).\n * @param {Boolean} options.upsert True to insert a document if no matching documents are found.\n * @param {Function} [callback] Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.\n */\n update(selector, modifier, ...optionsAndCallback) {\n const callback = popCallbackFromArgs(optionsAndCallback);\n\n // We've already popped off the callback, so we are left with an array\n // of one or zero items\n const options = { ...(optionsAndCallback[0] || null) };\n let insertedId;\n if (options && options.upsert) {\n // set `insertedId` if absent. `insertedId` is a Meteor extension.\n if (options.insertedId) {\n if (!(typeof options.insertedId === 'string' || options.insertedId instanceof Mongo.ObjectID))\n throw new Error(\"insertedId must be string or ObjectID\");\n insertedId = options.insertedId;\n } else if (!selector || !selector._id) {\n insertedId = this._makeNewID();\n options.generatedId = true;\n options.insertedId = insertedId;\n }\n }\n\n selector =\n Mongo.Collection._rewriteSelector(selector, { fallbackId: insertedId });\n\n const wrappedCallback = wrapCallback(callback);\n\n if (this._isRemoteCollection()) {\n const args = [\n selector,\n modifier,\n options\n ];\n\n return this._callMutatorMethod(\"update\", args, wrappedCallback);\n }\n\n // it's my collection. descend into the collection object\n // and propagate any exception.\n try {\n // If the user provided a callback and the collection implements this\n // operation asynchronously, then queryRet will be undefined, and the\n // result will be returned through the callback instead.\n return this._collection.update(\n selector, modifier, options, wrappedCallback);\n } catch (e) {\n if (callback) {\n callback(e);\n return null;\n }\n throw e;\n }\n },\n\n /**\n * @summary Remove documents from the collection\n * @locus Anywhere\n * @method remove\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} selector Specifies which documents to remove\n * @param {Function} [callback] Optional. If present, called with an error object as its argument.\n */\n remove(selector, callback) {\n selector = Mongo.Collection._rewriteSelector(selector);\n\n const wrappedCallback = wrapCallback(callback);\n\n if (this._isRemoteCollection()) {\n return this._callMutatorMethod(\"remove\", [selector], wrappedCallback);\n }\n\n // it's my collection. descend into the collection object\n // and propagate any exception.\n try {\n // If the user provided a callback and the collection implements this\n // operation asynchronously, then queryRet will be undefined, and the\n // result will be returned through the callback instead.\n return this._collection.remove(selector, wrappedCallback);\n } catch (e) {\n if (callback) {\n callback(e);\n return null;\n }\n throw e;\n }\n },\n\n // Determine if this collection is simply a minimongo representation of a real\n // database on another server\n _isRemoteCollection() {\n // XXX see #MeteorServerNull\n return this._connection && this._connection !== Meteor.server;\n },\n\n /**\n * @summary Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).\n * @locus Anywhere\n * @method upsert\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} selector Specifies which documents to modify\n * @param {MongoModifier} modifier Specifies how to modify the documents\n * @param {Object} [options]\n * @param {Boolean} options.multi True to modify all matching documents; false to only modify one of the matching documents (the default).\n * @param {Function} [callback] Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.\n */\n upsert(selector, modifier, options, callback) {\n if (! callback && typeof options === \"function\") {\n callback = options;\n options = {};\n }\n\n return this.update(selector, modifier, {\n ...options,\n _returnObject: true,\n upsert: true,\n }, callback);\n },\n\n // We'll actually design an index API later. For now, we just pass through to\n // Mongo's, but make it synchronous.\n _ensureIndex(index, options) {\n var self = this;\n if (!self._collection._ensureIndex)\n throw new Error(\"Can only call _ensureIndex on server collections\");\n self._collection._ensureIndex(index, options);\n },\n\n _dropIndex(index) {\n var self = this;\n if (!self._collection._dropIndex)\n throw new Error(\"Can only call _dropIndex on server collections\");\n self._collection._dropIndex(index);\n },\n\n _dropCollection() {\n var self = this;\n if (!self._collection.dropCollection)\n throw new Error(\"Can only call _dropCollection on server collections\");\n self._collection.dropCollection();\n },\n\n _createCappedCollection(byteSize, maxDocuments) {\n var self = this;\n if (!self._collection._createCappedCollection)\n throw new Error(\"Can only call _createCappedCollection on server collections\");\n self._collection._createCappedCollection(byteSize, maxDocuments);\n },\n\n /**\n * @summary Returns the [`Collection`](http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html) object corresponding to this collection from the [npm `mongodb` driver module](https://www.npmjs.com/package/mongodb) which is wrapped by `Mongo.Collection`.\n * @locus Server\n * @memberof Mongo.Collection\n * @instance\n */\n rawCollection() {\n var self = this;\n if (! self._collection.rawCollection) {\n throw new Error(\"Can only call rawCollection on server collections\");\n }\n return self._collection.rawCollection();\n },\n\n /**\n * @summary Returns the [`Db`](http://mongodb.github.io/node-mongodb-native/3.0/api/Db.html) object corresponding to this collection's database connection from the [npm `mongodb` driver module](https://www.npmjs.com/package/mongodb) which is wrapped by `Mongo.Collection`.\n * @locus Server\n * @memberof Mongo.Collection\n * @instance\n */\n rawDatabase() {\n var self = this;\n if (! (self._driver.mongo && self._driver.mongo.db)) {\n throw new Error(\"Can only call rawDatabase on server collections\");\n }\n return self._driver.mongo.db;\n }\n});\n\n// Convert the callback to not return a result if there is an error\nfunction wrapCallback(callback, convertResult) {\n return callback && function (error, result) {\n if (error) {\n callback(error);\n } else if (typeof convertResult === \"function\") {\n callback(error, convertResult(result));\n } else {\n callback(error, result);\n }\n };\n}\n\n/**\n * @summary Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).\n * @locus Anywhere\n * @class\n * @param {String} [hexString] Optional. The 24-character hexadecimal contents of the ObjectID to create\n */\nMongo.ObjectID = MongoID.ObjectID;\n\n/**\n * @summary To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.\n * @class\n * @instanceName cursor\n */\nMongo.Cursor = LocalCollection.Cursor;\n\n/**\n * @deprecated in 0.9.1\n */\nMongo.Collection.Cursor = Mongo.Cursor;\n\n/**\n * @deprecated in 0.9.1\n */\nMongo.Collection.ObjectID = Mongo.ObjectID;\n\n/**\n * @deprecated in 0.9.1\n */\nMeteor.Collection = Mongo.Collection;\n\n// Allow deny stuff is now in the allow-deny package\nObject.assign(\n Meteor.Collection.prototype,\n AllowDeny.CollectionPrototype\n);\n\nfunction popCallbackFromArgs(args) {\n // Pull off any callback (or perhaps a 'callback' variable that was passed\n // in undefined, like how 'upsert' does it).\n if (args.length &&\n (args[args.length - 1] === undefined ||\n args[args.length - 1] instanceof Function)) {\n return args.pop();\n }\n}\n","/**\n * @summary Allows for user specified connection options\n * @example http://mongodb.github.io/node-mongodb-native/3.0/reference/connecting/connection-settings/\n * @locus Server\n * @param {Object} options User specified Mongo connection options\n */\nMongo.setConnectionOptions = function setConnectionOptions (options) {\n check(options, Object);\n Mongo._connectionOptions = options;\n};"]} \ No newline at end of file +{"version":3,"sources":["meteor://💻app/packages/mongo/mongo_driver.js","meteor://💻app/packages/mongo/oplog_tailing.js","meteor://💻app/packages/mongo/observe_multiplex.js","meteor://💻app/packages/mongo/doc_fetcher.js","meteor://💻app/packages/mongo/polling_observe_driver.js","meteor://💻app/packages/mongo/oplog_observe_driver.js","meteor://💻app/packages/mongo/oplog_v2_converter.js","meteor://💻app/packages/mongo/local_collection_driver.js","meteor://💻app/packages/mongo/remote_collection_driver.js","meteor://💻app/packages/mongo/collection.js","meteor://💻app/packages/mongo/connection_options.js"],"names":["DocFetcher","module1","link","v","MongoDB","NpmModuleMongodb","Future","Npm","require","MongoInternals","NpmModules","mongodb","version","NpmModuleMongodbVersion","module","NpmModule","replaceNames","filter","thing","_","isArray","map","bind","ret","each","value","key","Timestamp","prototype","clone","makeMongoLegal","name","unmakeMongoLegal","substr","replaceMongoAtomWithMeteor","document","Binary","buffer","Uint8Array","ObjectID","Mongo","toHexString","Decimal128","Decimal","toString","size","EJSON","fromJSONValue","undefined","replaceMeteorAtomWithMongo","isBinary","fromString","_isCustomType","toJSONValue","replaceTypes","atomTransformer","replacedTopLevelAtom","val","valReplaced","MongoConnection","url","options","self","_observeMultiplexers","_onFailoverHook","Hook","mongoOptions","Object","assign","autoReconnect","reconnectTries","Infinity","ignoreUndefined","useNewUrlParser","_connectionOptions","test","native_parser","has","poolSize","db","_primary","_oplogHandle","_docFetcher","connectFuture","connect","Meteor","bindEnvironment","err","client","serverConfig","isMasterDoc","primary","on","kind","doc","callback","me","resolver","wait","oplogUrl","Package","OplogHandle","databaseName","close","Error","oplogHandle","stop","wrap","rawCollection","collectionName","future","collection","_createCappedCollection","byteSize","maxDocuments","createCollection","capped","max","_maybeBeginWrite","fence","DDPServer","_CurrentWriteFence","get","beginWrite","committed","_onFailover","register","writeCallback","write","refresh","result","refreshErr","bindEnvironmentForWrite","_insert","collection_name","sendError","e","_expectedByTest","LocalCollection","_isPlainObject","id","_id","insert","safe","_refresh","selector","refreshKey","specificIds","_idsMatchedBySelector","extend","_remove","wrappedCallback","driverResult","transformResult","numberAffected","remove","_dropCollection","cb","dropCollection","drop","_dropDatabase","dropDatabase","_update","mod","Function","mongoOpts","arrayFilters","upsert","multi","fullResult","mongoSelector","mongoMod","isModify","_isModificationMod","_forbidReplace","knownId","newDoc","_createUpsertDocument","insertedId","generatedId","simulateUpsertWithInsertedId","error","_returnObject","hasOwnProperty","$setOnInsert","update","meteorResult","mongoResult","upserted","length","n","NUM_OPTIMISTIC_TRIES","_isCannotChangeIdError","errmsg","indexOf","mongoOptsForUpdate","mongoOptsForInsert","replacementWithId","tries","doUpdate","doConditionalInsert","method","wrapAsync","apply","arguments","find","Cursor","CursorDescription","findOne","limit","fetch","_ensureIndex","index","indexName","ensureIndex","Exception","_dropIndex","dropIndex","Collection","_rewriteSelector","mongo","cursorDescription","_mongo","_cursorDescription","_synchronousCursor","Symbol","iterator","tailable","_createSynchronousCursor","selfForIteration","useTransform","rewind","getTransform","transform","_publishCursor","sub","_getCollectionName","observe","callbacks","_observeFromObserveChanges","observeChanges","methods","ordered","_observeChangesCallbacksAreOrdered","exceptionName","forEach","_observeChanges","pick","cursorOptions","sort","skip","projection","fields","awaitdata","numberOfRetries","OPLOG_COLLECTION","ts","oplogReplay","dbCursor","maxTimeMs","maxTimeMS","hint","SynchronousCursor","_dbCursor","_selfForIteration","_transform","wrapTransform","_synchronousCount","count","_visitedIds","_IdMap","_rawNextObjectPromise","Promise","resolve","reject","next","_nextObjectPromise","set","_nextObjectPromiseWithTimeout","timeoutMS","nextObjectPromise","timeoutErr","timeoutPromise","timer","setTimeout","race","catch","_nextObject","await","thisArg","_rewind","call","res","push","identity","applySkipLimit","getRawObjects","results","done","tail","docCallback","cursor","stopped","lastTS","loop","newSelector","$gt","defer","_observeChangesTailable","observeKey","stringify","multiplexer","observeDriver","firstHandle","_noYieldsAllowed","ObserveMultiplexer","onStop","observeHandle","ObserveHandle","matcher","sorter","canUseOplog","all","_testOnlyPollCallback","Minimongo","Matcher","OplogObserveDriver","cursorSupported","Sorter","f","driverClass","PollingObserveDriver","mongoHandle","_observeDriver","addHandleAndSendInitialAdds","listenAll","listenCallback","listeners","forEachTrigger","trigger","_InvalidationCrossbar","listen","listener","triggerCallback","addedBefore","added","MongoTimestamp","Connection","TOO_FAR_BEHIND","process","env","METEOR_OPLOG_TOO_FAR_BEHIND","TAIL_TIMEOUT","METEOR_OPLOG_TAIL_TIMEOUT","showTS","getHighBits","getLowBits","idForOp","op","o","o2","dbName","_oplogUrl","_dbName","_oplogLastEntryConnection","_oplogTailConnection","_stopped","_tailHandle","_readyFuture","_crossbar","_Crossbar","factPackage","factName","_baseOplogSelector","ns","RegExp","_escapeRegExp","join","$or","$in","$exists","_catchingUpFutures","_lastProcessedTS","_onSkippedEntriesHook","debugPrintExceptions","_entryQueue","_DoubleEndedQueue","_workerActive","_startTailing","onOplogEntry","originalCallback","notification","_debug","listenHandle","onSkippedEntries","waitUntilCaughtUp","lastEntry","$natural","_sleepForMs","lessThanOrEqual","insertAfter","greaterThan","splice","mongodbUri","parse","database","admin","command","ismaster","setName","lastOplogEntry","oplogSelector","_maybeStartWorker","return","handleDoc","applyOps","nextTimestamp","add","ONE","startsWith","slice","fire","isEmpty","pop","clear","_setLastProcessedTS","shift","sequencer","_defineTooFarBehind","_resetTooFarBehind","Facts","incrementServerFact","_ordered","_onStop","_queue","_SynchronousQueue","_handles","_cache","_CachingChangeObserver","_addHandleTasksScheduledButNotPerformed","callbackNames","callbackName","_applyCallback","toArray","handle","safeToRunTask","runTask","_sendAdds","removeHandle","_ready","_stop","fromQueryError","ready","queueTask","queryError","throw","onFlush","isResolved","args","applyChange","keys","handleId","_addedBefore","_added","docs","nextObserveHandleId","_multiplexer","before","export","Fiber","constructor","mongoConnection","_mongoConnection","_callbacksForOp","Map","check","String","delete","run","POLLING_THROTTLE_MS","METEOR_POLLING_THROTTLE_MS","POLLING_INTERVAL_MS","METEOR_POLLING_INTERVAL_MS","_mongoHandle","_stopCallbacks","_results","_pollsScheduledButNotStarted","_pendingWrites","_ensurePollIsScheduled","throttle","_unthrottledEnsurePollIsScheduled","pollingThrottleMs","_taskQueue","listenersHandle","pollingInterval","pollingIntervalMs","_pollingInterval","intervalHandle","setInterval","clearInterval","_pollMongo","_suspendPolling","_resumePolling","first","newResults","oldResults","writesForCycle","code","JSON","message","Array","_diffQueryChanges","w","c","oplogV2V1Converter","PHASE","QUERYING","FETCHING","STEADY","SwitchedToQuery","finishIfNeedToPollQuery","currentId","_usesOplog","comparator","getComparator","heapOptions","IdMap","_limit","_comparator","_sorter","_unpublishedBuffer","MinMaxHeap","_published","MaxHeap","_safeAppendToBuffer","_stopHandles","_registerPhaseChange","_matcher","_projectionFn","_compileProjection","_sharedProjection","combineIntoProjection","_sharedProjectionFn","_needToFetch","_currentlyFetching","_fetchGeneration","_requeryWhenDoneThisQuery","_writesToCommitWhenWeReachSteady","_needToPollQuery","_phase","_handleOplogEntryQuerying","_handleOplogEntrySteadyOrFetching","fired","_oplogObserveDrivers","onBeforeFire","drivers","driver","_runInitialQuery","_addPublished","overflowingDocId","maxElementId","overflowingDoc","equals","removed","_addBuffered","_removePublished","empty","newDocId","minElementId","_removeBuffered","_changePublished","oldDoc","projectedNew","projectedOld","changed","DiffSequence","makeChangedFields","maxBufferedId","_addMatching","maxPublished","maxBuffered","toPublish","canAppendToBuffer","canInsertIntoBuffer","toBuffer","_removeMatching","_handleDoc","matchesNow","documentMatches","publishedBefore","bufferedBefore","cachedBefore","minBuffered","staysInPublished","staysInBuffer","_fetchModifiedDocuments","thisGeneration","waiting","fut","_beSteady","writes","isReplace","canDirectlyModifyDoc","modifierCanBeDirectlyApplied","_modify","canBecomeTrueByModifier","affectedByModifier","_runQuery","initial","_doneQuerying","_pollQuery","newBuffer","_cursorForQuery","i","_publishNewResults","optionsOverwrite","description","idsToRemove","console","_oplogEntryHandle","_listenersHandle","phase","now","Date","timeDiff","_phaseStartTime","disableOplog","_disableOplog","_checkSupportedProjection","hasWhere","hasGeoQuery","modifier","operation","field","prefix","arrayOperatorKeyRegex","isArrayOperatorKey","isArrayOperator","operator","a","every","flattenObjectInto","target","source","entries","logDebugMessages","OPLOG_CONVERTER_DEBUG","convertOplogDiff","oplogEntry","diff","log","diffKey","$unset","$set","position","positionKey","$v","convertedOplogEntry","LocalCollectionDriver","noConnCollections","create","open","conn","ensureCollection","_mongo_livedata_collections","collections","RemoteCollectionDriver","mongo_url","m","defaultRemoteCollectionDriver","once","connectionOptions","mongoUrl","MONGO_URL","MONGO_OPLOG_URL","_objectSpread","default","connection","manager","idGeneration","_driver","_preventAutopublish","_makeNewID","src","DDP","randomStream","Random","insecure","hexString","_connection","isClient","server","_collection","_name","_maybeSetUpReplication","defineMutationMethods","_defineMutationMethods","useExisting","_suppressSameNameError","autopublish","publish","is_auto","registerStore","ok","beginUpdate","batchSize","reset","pauseObservers","msg","mongoId","MongoID","idParse","replace","endUpdate","resumeObservers","saveOriginals","retrieveOriginals","getDoc","_getCollection","warn","_getFindSelector","_getFindOptions","Match","Optional","ObjectIncluding","OneOf","Number","fallbackId","_selectorIsId","getPrototypeOf","getOwnPropertyDescriptors","generateId","_isRemoteCollection","enclosing","_CurrentMethodInvocation","chooseReturnValueFromCollectionResult","wrapCallback","_callMutatorMethod","optionsAndCallback","popCallbackFromArgs","rawDatabase","convertResult","AllowDeny","CollectionPrototype","setConnectionOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAIA,UAAJ;AAAeC,SAAO,CAACC,IAAR,CAAa,kBAAb,EAAgC;AAACF,cAAU,CAACG,CAAD,EAAG;AAACH,gBAAU,GAACG,CAAX;AAAa;;AAA5B,GAAhC,EAA8D,CAA9D;;AAAf;;;;;;;;AASA,MAAIC,OAAO,GAAGC,gBAAd;;AACA,MAAIC,MAAM,GAAGC,GAAG,CAACC,OAAJ,CAAY,eAAZ,CAAb;;AAGAC,gBAAc,GAAG,EAAjB;AAEAA,gBAAc,CAACC,UAAf,GAA4B;AAC1BC,WAAO,EAAE;AACPC,aAAO,EAAEC,uBADF;AAEPC,YAAM,EAAEV;AAFD;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AACgsB,oBAAN,GAA6B,SAASA,oBAAT,CAA+B3qB,OAA/B,EAAwC;AACnE8Z,OAAK,CAAC9Z,OAAD,EAAUM,MAAV,CAAL;AACA3B,OAAK,CAACkC,kBAAN,GAA2Bb,OAA3B;AACD,CAHD,C","file":"/packages/mongo.js","sourcesContent":["/**\n * Provide a synchronous Collection API using fibers, backed by\n * MongoDB. This is only for use on the server, and mostly identical\n * to the client API.\n *\n * NOTE: the public API methods must be run within a fiber. If you call\n * these outside of a fiber they will explode!\n */\n\nvar MongoDB = NpmModuleMongodb;\nvar Future = Npm.require('fibers/future');\nimport { DocFetcher } from \"./doc_fetcher.js\";\n\nMongoInternals = {};\n\nMongoInternals.NpmModules = {\n mongodb: {\n version: NpmModuleMongodbVersion,\n module: MongoDB\n }\n};\n\n// Older version of what is now available via\n// MongoInternals.NpmModules.mongodb.module. It was never documented, but\n// people do use it.\n// XXX COMPAT WITH 1.0.3.2\nMongoInternals.NpmModule = MongoDB;\n\n// This is used to add or remove EJSON from the beginning of everything nested\n// inside an EJSON custom type. It should only be called on pure JSON!\nvar replaceNames = function (filter, thing) {\n if (typeof thing === \"object\" && thing !== null) {\n if (_.isArray(thing)) {\n return _.map(thing, _.bind(replaceNames, null, filter));\n }\n var ret = {};\n _.each(thing, function (value, key) {\n ret[filter(key)] = replaceNames(filter, value);\n });\n return ret;\n }\n return thing;\n};\n\n// Ensure that EJSON.clone keeps a Timestamp as a Timestamp (instead of just\n// doing a structural clone).\n// XXX how ok is this? what if there are multiple copies of MongoDB loaded?\nMongoDB.Timestamp.prototype.clone = function () {\n // Timestamps should be immutable.\n return this;\n};\n\nvar makeMongoLegal = function (name) { return \"EJSON\" + name; };\nvar unmakeMongoLegal = function (name) { return name.substr(5); };\n\nvar replaceMongoAtomWithMeteor = function (document) {\n if (document instanceof MongoDB.Binary) {\n var buffer = document.value(true);\n return new Uint8Array(buffer);\n }\n if (document instanceof MongoDB.ObjectID) {\n return new Mongo.ObjectID(document.toHexString());\n }\n if (document instanceof MongoDB.Decimal128) {\n return Decimal(document.toString());\n }\n if (document[\"EJSON$type\"] && document[\"EJSON$value\"] && _.size(document) === 2) {\n return EJSON.fromJSONValue(replaceNames(unmakeMongoLegal, document));\n }\n if (document instanceof MongoDB.Timestamp) {\n // For now, the Meteor representation of a Mongo timestamp type (not a date!\n // this is a weird internal thing used in the oplog!) is the same as the\n // Mongo representation. We need to do this explicitly or else we would do a\n // structural clone and lose the prototype.\n return document;\n }\n return undefined;\n};\n\nvar replaceMeteorAtomWithMongo = function (document) {\n if (EJSON.isBinary(document)) {\n // This does more copies than we'd like, but is necessary because\n // MongoDB.BSON only looks like it takes a Uint8Array (and doesn't actually\n // serialize it correctly).\n // return new MongoDB.Binary(Buffer.from(document));\n }\n if (document instanceof Mongo.ObjectID) {\n return new MongoDB.ObjectID(document.toHexString());\n }\n if (document instanceof MongoDB.Timestamp) {\n // For now, the Meteor representation of a Mongo timestamp type (not a date!\n // this is a weird internal thing used in the oplog!) is the same as the\n // Mongo representation. We need to do this explicitly or else we would do a\n // structural clone and lose the prototype.\n return document;\n }\n if (document instanceof Decimal) {\n return MongoDB.Decimal128.fromString(document.toString());\n }\n if (EJSON._isCustomType(document)) {\n return replaceNames(makeMongoLegal, EJSON.toJSONValue(document));\n }\n // It is not ordinarily possible to stick dollar-sign keys into mongo\n // so we don't bother checking for things that need escaping at this time.\n return undefined;\n};\n\nvar replaceTypes = function (document, atomTransformer) {\n if (typeof document !== 'object' || document === null)\n return document;\n\n var replacedTopLevelAtom = atomTransformer(document);\n if (replacedTopLevelAtom !== undefined)\n return replacedTopLevelAtom;\n\n var ret = document;\n _.each(document, function (val, key) {\n var valReplaced = replaceTypes(val, atomTransformer);\n if (val !== valReplaced) {\n // Lazy clone. Shallow copy.\n if (ret === document)\n ret = _.clone(document);\n ret[key] = valReplaced;\n }\n });\n return ret;\n};\n\n\nMongoConnection = function (url, options) {\n var self = this;\n options = options || {};\n self._observeMultiplexers = {};\n self._onFailoverHook = new Hook;\n\n var mongoOptions = Object.assign({\n // Reconnect on error.\n autoReconnect: true,\n // Try to reconnect forever, instead of stopping after 30 tries (the\n // default), with each attempt separated by 1000ms.\n reconnectTries: Infinity,\n ignoreUndefined: true,\n // Required to silence deprecation warnings with mongodb@3.1.1.\n useNewUrlParser: true,\n }, Mongo._connectionOptions);\n\n // Disable the native parser by default, unless specifically enabled\n // in the mongo URL.\n // - The native driver can cause errors which normally would be\n // thrown, caught, and handled into segfaults that take down the\n // whole app.\n // - Binary modules don't yet work when you bundle and move the bundle\n // to a different platform (aka deploy)\n // We should revisit this after binary npm module support lands.\n if (!(/[\\?&]native_?[pP]arser=/.test(url))) {\n mongoOptions.native_parser = false;\n }\n\n // Internally the oplog connections specify their own poolSize\n // which we don't want to overwrite with any user defined value\n if (_.has(options, 'poolSize')) {\n // If we just set this for \"server\", replSet will override it. If we just\n // set it for replSet, it will be ignored if we're not using a replSet.\n mongoOptions.poolSize = options.poolSize;\n }\n\n self.db = null;\n // We keep track of the ReplSet's primary, so that we can trigger hooks when\n // it changes. The Node driver's joined callback seems to fire way too\n // often, which is why we need to track it ourselves.\n self._primary = null;\n self._oplogHandle = null;\n self._docFetcher = null;\n\n\n var connectFuture = new Future;\n MongoDB.connect(\n url,\n mongoOptions,\n Meteor.bindEnvironment(\n function (err, client) {\n if (err) {\n throw err;\n }\n\n var db = client.db();\n\n // First, figure out what the current primary is, if any.\n if (db.serverConfig.isMasterDoc) {\n self._primary = db.serverConfig.isMasterDoc.primary;\n }\n\n db.serverConfig.on(\n 'joined', Meteor.bindEnvironment(function (kind, doc) {\n if (kind === 'primary') {\n if (doc.primary !== self._primary) {\n self._primary = doc.primary;\n self._onFailoverHook.each(function (callback) {\n callback();\n return true;\n });\n }\n } else if (doc.me === self._primary) {\n // The thing we thought was primary is now something other than\n // primary. Forget that we thought it was primary. (This means\n // that if a server stops being primary and then starts being\n // primary again without another server becoming primary in the\n // middle, we'll correctly count it as a failover.)\n self._primary = null;\n }\n }));\n\n // Allow the constructor to return.\n connectFuture['return']({ client, db });\n },\n connectFuture.resolver() // onException\n )\n );\n\n // Wait for the connection to be successful (throws on failure) and assign the\n // results (`client` and `db`) to `self`.\n Object.assign(self, connectFuture.wait());\n\n if (options.oplogUrl && ! Package['disable-oplog']) {\n self._oplogHandle = new OplogHandle(options.oplogUrl, self.db.databaseName);\n self._docFetcher = new DocFetcher(self);\n }\n};\n\nMongoConnection.prototype.close = function() {\n var self = this;\n\n if (! self.db)\n throw Error(\"close called before Connection created?\");\n\n // XXX probably untested\n var oplogHandle = self._oplogHandle;\n self._oplogHandle = null;\n if (oplogHandle)\n oplogHandle.stop();\n\n // Use Future.wrap so that errors get thrown. This happens to\n // work even outside a fiber since the 'close' method is not\n // actually asynchronous.\n Future.wrap(_.bind(self.client.close, self.client))(true).wait();\n};\n\n// Returns the Mongo Collection object; may yield.\nMongoConnection.prototype.rawCollection = function (collectionName) {\n var self = this;\n\n if (! self.db)\n throw Error(\"rawCollection called before Connection created?\");\n\n var future = new Future;\n self.db.collection(collectionName, future.resolver());\n return future.wait();\n};\n\nMongoConnection.prototype._createCappedCollection = function (\n collectionName, byteSize, maxDocuments) {\n var self = this;\n\n if (! self.db)\n throw Error(\"_createCappedCollection called before Connection created?\");\n\n var future = new Future();\n self.db.createCollection(\n collectionName,\n { capped: true, size: byteSize, max: maxDocuments },\n future.resolver());\n future.wait();\n};\n\n// This should be called synchronously with a write, to create a\n// transaction on the current write fence, if any. After we can read\n// the write, and after observers have been notified (or at least,\n// after the observer notifiers have added themselves to the write\n// fence), you should call 'committed()' on the object returned.\nMongoConnection.prototype._maybeBeginWrite = function () {\n var fence = DDPServer._CurrentWriteFence.get();\n if (fence) {\n return fence.beginWrite();\n } else {\n return {committed: function () {}};\n }\n};\n\n// Internal interface: adds a callback which is called when the Mongo primary\n// changes. Returns a stop handle.\nMongoConnection.prototype._onFailover = function (callback) {\n return this._onFailoverHook.register(callback);\n};\n\n\n//////////// Public API //////////\n\n// The write methods block until the database has confirmed the write (it may\n// not be replicated or stable on disk, but one server has confirmed it) if no\n// callback is provided. If a callback is provided, then they call the callback\n// when the write is confirmed. They return nothing on success, and raise an\n// exception on failure.\n//\n// After making a write (with insert, update, remove), observers are\n// notified asynchronously. If you want to receive a callback once all\n// of the observer notifications have landed for your write, do the\n// writes inside a write fence (set DDPServer._CurrentWriteFence to a new\n// _WriteFence, and then set a callback on the write fence.)\n//\n// Since our execution environment is single-threaded, this is\n// well-defined -- a write \"has been made\" if it's returned, and an\n// observer \"has been notified\" if its callback has returned.\n\nvar writeCallback = function (write, refresh, callback) {\n return function (err, result) {\n if (! err) {\n // XXX We don't have to run this on error, right?\n try {\n refresh();\n } catch (refreshErr) {\n if (callback) {\n callback(refreshErr);\n return;\n } else {\n throw refreshErr;\n }\n }\n }\n write.committed();\n if (callback) {\n callback(err, result);\n } else if (err) {\n throw err;\n }\n };\n};\n\nvar bindEnvironmentForWrite = function (callback) {\n return Meteor.bindEnvironment(callback, \"Mongo write\");\n};\n\nMongoConnection.prototype._insert = function (collection_name, document,\n callback) {\n var self = this;\n\n var sendError = function (e) {\n if (callback)\n return callback(e);\n throw e;\n };\n\n if (collection_name === \"___meteor_failure_test_collection\") {\n var e = new Error(\"Failure test\");\n e._expectedByTest = true;\n sendError(e);\n return;\n }\n\n if (!(LocalCollection._isPlainObject(document) &&\n !EJSON._isCustomType(document))) {\n sendError(new Error(\n \"Only plain objects may be inserted into MongoDB\"));\n return;\n }\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n Meteor.refresh({collection: collection_name, id: document._id });\n };\n callback = bindEnvironmentForWrite(writeCallback(write, refresh, callback));\n try {\n var collection = self.rawCollection(collection_name);\n collection.insert(replaceTypes(document, replaceMeteorAtomWithMongo),\n {safe: true}, callback);\n } catch (err) {\n write.committed();\n throw err;\n }\n};\n\n// Cause queries that may be affected by the selector to poll in this write\n// fence.\nMongoConnection.prototype._refresh = function (collectionName, selector) {\n var refreshKey = {collection: collectionName};\n // If we know which documents we're removing, don't poll queries that are\n // specific to other documents. (Note that multiple notifications here should\n // not cause multiple polls, since all our listener is doing is enqueueing a\n // poll.)\n var specificIds = LocalCollection._idsMatchedBySelector(selector);\n if (specificIds) {\n _.each(specificIds, function (id) {\n Meteor.refresh(_.extend({id: id}, refreshKey));\n });\n } else {\n Meteor.refresh(refreshKey);\n }\n};\n\nMongoConnection.prototype._remove = function (collection_name, selector,\n callback) {\n var self = this;\n\n if (collection_name === \"___meteor_failure_test_collection\") {\n var e = new Error(\"Failure test\");\n e._expectedByTest = true;\n if (callback) {\n return callback(e);\n } else {\n throw e;\n }\n }\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n self._refresh(collection_name, selector);\n };\n callback = bindEnvironmentForWrite(writeCallback(write, refresh, callback));\n\n try {\n var collection = self.rawCollection(collection_name);\n var wrappedCallback = function(err, driverResult) {\n callback(err, transformResult(driverResult).numberAffected);\n };\n collection.remove(replaceTypes(selector, replaceMeteorAtomWithMongo),\n {safe: true}, wrappedCallback);\n } catch (err) {\n write.committed();\n throw err;\n }\n};\n\nMongoConnection.prototype._dropCollection = function (collectionName, cb) {\n var self = this;\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n Meteor.refresh({collection: collectionName, id: null,\n dropCollection: true});\n };\n cb = bindEnvironmentForWrite(writeCallback(write, refresh, cb));\n\n try {\n var collection = self.rawCollection(collectionName);\n collection.drop(cb);\n } catch (e) {\n write.committed();\n throw e;\n }\n};\n\n// For testing only. Slightly better than `c.rawDatabase().dropDatabase()`\n// because it lets the test's fence wait for it to be complete.\nMongoConnection.prototype._dropDatabase = function (cb) {\n var self = this;\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n Meteor.refresh({ dropDatabase: true });\n };\n cb = bindEnvironmentForWrite(writeCallback(write, refresh, cb));\n\n try {\n self.db.dropDatabase(cb);\n } catch (e) {\n write.committed();\n throw e;\n }\n};\n\nMongoConnection.prototype._update = function (collection_name, selector, mod,\n options, callback) {\n var self = this;\n\n if (! callback && options instanceof Function) {\n callback = options;\n options = null;\n }\n\n if (collection_name === \"___meteor_failure_test_collection\") {\n var e = new Error(\"Failure test\");\n e._expectedByTest = true;\n if (callback) {\n return callback(e);\n } else {\n throw e;\n }\n }\n\n // explicit safety check. null and undefined can crash the mongo\n // driver. Although the node driver and minimongo do 'support'\n // non-object modifier in that they don't crash, they are not\n // meaningful operations and do not do anything. Defensively throw an\n // error here.\n if (!mod || typeof mod !== 'object')\n throw new Error(\"Invalid modifier. Modifier must be an object.\");\n\n if (!(LocalCollection._isPlainObject(mod) &&\n !EJSON._isCustomType(mod))) {\n throw new Error(\n \"Only plain objects may be used as replacement\" +\n \" documents in MongoDB\");\n }\n\n if (!options) options = {};\n\n var write = self._maybeBeginWrite();\n var refresh = function () {\n self._refresh(collection_name, selector);\n };\n callback = writeCallback(write, refresh, callback);\n try {\n var collection = self.rawCollection(collection_name);\n var mongoOpts = {safe: true};\n // Add support for filtered positional operator\n if (options.arrayFilters !== undefined) mongoOpts.arrayFilters = options.arrayFilters;\n // explictly enumerate options that minimongo supports\n if (options.upsert) mongoOpts.upsert = true;\n if (options.multi) mongoOpts.multi = true;\n // Lets you get a more more full result from MongoDB. Use with caution:\n // might not work with C.upsert (as opposed to C.update({upsert:true}) or\n // with simulated upsert.\n if (options.fullResult) mongoOpts.fullResult = true;\n\n var mongoSelector = replaceTypes(selector, replaceMeteorAtomWithMongo);\n var mongoMod = replaceTypes(mod, replaceMeteorAtomWithMongo);\n\n var isModify = LocalCollection._isModificationMod(mongoMod);\n\n if (options._forbidReplace && !isModify) {\n var err = new Error(\"Invalid modifier. Replacements are forbidden.\");\n if (callback) {\n return callback(err);\n } else {\n throw err;\n }\n }\n\n // We've already run replaceTypes/replaceMeteorAtomWithMongo on\n // selector and mod. We assume it doesn't matter, as far as\n // the behavior of modifiers is concerned, whether `_modify`\n // is run on EJSON or on mongo-converted EJSON.\n\n // Run this code up front so that it fails fast if someone uses\n // a Mongo update operator we don't support.\n let knownId;\n if (options.upsert) {\n try {\n let newDoc = LocalCollection._createUpsertDocument(selector, mod);\n knownId = newDoc._id;\n } catch (err) {\n if (callback) {\n return callback(err);\n } else {\n throw err;\n }\n }\n }\n\n if (options.upsert &&\n ! isModify &&\n ! knownId &&\n options.insertedId &&\n ! (options.insertedId instanceof Mongo.ObjectID &&\n options.generatedId)) {\n // In case of an upsert with a replacement, where there is no _id defined\n // in either the query or the replacement doc, mongo will generate an id itself.\n // Therefore we need this special strategy if we want to control the id ourselves.\n\n // We don't need to do this when:\n // - This is not a replacement, so we can add an _id to $setOnInsert\n // - The id is defined by query or mod we can just add it to the replacement doc\n // - The user did not specify any id preference and the id is a Mongo ObjectId,\n // then we can just let Mongo generate the id\n\n simulateUpsertWithInsertedId(\n collection, mongoSelector, mongoMod, options,\n // This callback does not need to be bindEnvironment'ed because\n // simulateUpsertWithInsertedId() wraps it and then passes it through\n // bindEnvironmentForWrite.\n function (error, result) {\n // If we got here via a upsert() call, then options._returnObject will\n // be set and we should return the whole object. Otherwise, we should\n // just return the number of affected docs to match the mongo API.\n if (result && ! options._returnObject) {\n callback(error, result.numberAffected);\n } else {\n callback(error, result);\n }\n }\n );\n } else {\n\n if (options.upsert && !knownId && options.insertedId && isModify) {\n if (!mongoMod.hasOwnProperty('$setOnInsert')) {\n mongoMod.$setOnInsert = {};\n }\n knownId = options.insertedId;\n Object.assign(mongoMod.$setOnInsert, replaceTypes({_id: options.insertedId}, replaceMeteorAtomWithMongo));\n }\n\n collection.update(\n mongoSelector, mongoMod, mongoOpts,\n bindEnvironmentForWrite(function (err, result) {\n if (! err) {\n var meteorResult = transformResult(result);\n if (meteorResult && options._returnObject) {\n // If this was an upsert() call, and we ended up\n // inserting a new doc and we know its id, then\n // return that id as well.\n if (options.upsert && meteorResult.insertedId) {\n if (knownId) {\n meteorResult.insertedId = knownId;\n } else if (meteorResult.insertedId instanceof MongoDB.ObjectID) {\n meteorResult.insertedId = new Mongo.ObjectID(meteorResult.insertedId.toHexString());\n }\n }\n\n callback(err, meteorResult);\n } else {\n callback(err, meteorResult.numberAffected);\n }\n } else {\n callback(err);\n }\n }));\n }\n } catch (e) {\n write.committed();\n throw e;\n }\n};\n\nvar transformResult = function (driverResult) {\n var meteorResult = { numberAffected: 0 };\n if (driverResult) {\n var mongoResult = driverResult.result;\n\n // On updates with upsert:true, the inserted values come as a list of\n // upserted values -- even with options.multi, when the upsert does insert,\n // it only inserts one element.\n if (mongoResult.upserted) {\n meteorResult.numberAffected += mongoResult.upserted.length;\n\n if (mongoResult.upserted.length == 1) {\n meteorResult.insertedId = mongoResult.upserted[0]._id;\n }\n } else {\n meteorResult.numberAffected = mongoResult.n;\n }\n }\n\n return meteorResult;\n};\n\n\nvar NUM_OPTIMISTIC_TRIES = 3;\n\n// exposed for testing\nMongoConnection._isCannotChangeIdError = function (err) {\n\n // Mongo 3.2.* returns error as next Object:\n // {name: String, code: Number, errmsg: String}\n // Older Mongo returns:\n // {name: String, code: Number, err: String}\n var error = err.errmsg || err.err;\n\n // We don't use the error code here\n // because the error code we observed it producing (16837) appears to be\n // a far more generic error code based on examining the source.\n if (error.indexOf('The _id field cannot be changed') === 0\n || error.indexOf(\"the (immutable) field '_id' was found to have been altered to _id\") !== -1) {\n return true;\n }\n\n return false;\n};\n\nvar simulateUpsertWithInsertedId = function (collection, selector, mod,\n options, callback) {\n // STRATEGY: First try doing an upsert with a generated ID.\n // If this throws an error about changing the ID on an existing document\n // then without affecting the database, we know we should probably try\n // an update without the generated ID. If it affected 0 documents,\n // then without affecting the database, we the document that first\n // gave the error is probably removed and we need to try an insert again\n // We go back to step one and repeat.\n // Like all \"optimistic write\" schemes, we rely on the fact that it's\n // unlikely our writes will continue to be interfered with under normal\n // circumstances (though sufficiently heavy contention with writers\n // disagreeing on the existence of an object will cause writes to fail\n // in theory).\n\n var insertedId = options.insertedId; // must exist\n var mongoOptsForUpdate = {\n safe: true,\n multi: options.multi\n };\n var mongoOptsForInsert = {\n safe: true,\n upsert: true\n };\n\n var replacementWithId = Object.assign(\n replaceTypes({_id: insertedId}, replaceMeteorAtomWithMongo),\n mod);\n\n var tries = NUM_OPTIMISTIC_TRIES;\n\n var doUpdate = function () {\n tries--;\n if (! tries) {\n callback(new Error(\"Upsert failed after \" + NUM_OPTIMISTIC_TRIES + \" tries.\"));\n } else {\n collection.update(selector, mod, mongoOptsForUpdate,\n bindEnvironmentForWrite(function (err, result) {\n if (err) {\n callback(err);\n } else if (result && result.result.n != 0) {\n callback(null, {\n numberAffected: result.result.n\n });\n } else {\n doConditionalInsert();\n }\n }));\n }\n };\n\n var doConditionalInsert = function () {\n collection.update(selector, replacementWithId, mongoOptsForInsert,\n bindEnvironmentForWrite(function (err, result) {\n if (err) {\n // figure out if this is a\n // \"cannot change _id of document\" error, and\n // if so, try doUpdate() again, up to 3 times.\n if (MongoConnection._isCannotChangeIdError(err)) {\n doUpdate();\n } else {\n callback(err);\n }\n } else {\n callback(null, {\n numberAffected: result.result.upserted.length,\n insertedId: insertedId,\n });\n }\n }));\n };\n\n doUpdate();\n};\n\n_.each([\"insert\", \"update\", \"remove\", \"dropCollection\", \"dropDatabase\"], function (method) {\n MongoConnection.prototype[method] = function (/* arguments */) {\n var self = this;\n return Meteor.wrapAsync(self[\"_\" + method]).apply(self, arguments);\n };\n});\n\n// XXX MongoConnection.upsert() does not return the id of the inserted document\n// unless you set it explicitly in the selector or modifier (as a replacement\n// doc).\nMongoConnection.prototype.upsert = function (collectionName, selector, mod,\n options, callback) {\n var self = this;\n if (typeof options === \"function\" && ! callback) {\n callback = options;\n options = {};\n }\n\n return self.update(collectionName, selector, mod,\n _.extend({}, options, {\n upsert: true,\n _returnObject: true\n }), callback);\n};\n\nMongoConnection.prototype.find = function (collectionName, selector, options) {\n var self = this;\n\n if (arguments.length === 1)\n selector = {};\n\n return new Cursor(\n self, new CursorDescription(collectionName, selector, options));\n};\n\nMongoConnection.prototype.findOne = function (collection_name, selector,\n options) {\n var self = this;\n if (arguments.length === 1)\n selector = {};\n\n options = options || {};\n options.limit = 1;\n return self.find(collection_name, selector, options).fetch()[0];\n};\n\n// We'll actually design an index API later. For now, we just pass through to\n// Mongo's, but make it synchronous.\nMongoConnection.prototype._ensureIndex = function (collectionName, index,\n options) {\n try {\n var self = this;\n // We expect this function to be called at startup, not from within a method,\n // so we don't interact with the write fence.\n var collection = self.rawCollection(collectionName);\n var future = new Future;\n var indexName = collection.ensureIndex(index, options, future.resolver());\n future.wait();\n } catch (Exception) {\n \n }\n};\nMongoConnection.prototype._dropIndex = function (collectionName, index) {\n var self = this;\n\n // This function is only used by test code, not within a method, so we don't\n // interact with the write fence.\n var collection = self.rawCollection(collectionName);\n var future = new Future;\n var indexName = collection.dropIndex(index, future.resolver());\n future.wait();\n};\n\n// CURSORS\n\n// There are several classes which relate to cursors:\n//\n// CursorDescription represents the arguments used to construct a cursor:\n// collectionName, selector, and (find) options. Because it is used as a key\n// for cursor de-dup, everything in it should either be JSON-stringifiable or\n// not affect observeChanges output (eg, options.transform functions are not\n// stringifiable but do not affect observeChanges).\n//\n// SynchronousCursor is a wrapper around a MongoDB cursor\n// which includes fully-synchronous versions of forEach, etc.\n//\n// Cursor is the cursor object returned from find(), which implements the\n// documented Mongo.Collection cursor API. It wraps a CursorDescription and a\n// SynchronousCursor (lazily: it doesn't contact Mongo until you call a method\n// like fetch or forEach on it).\n//\n// ObserveHandle is the \"observe handle\" returned from observeChanges. It has a\n// reference to an ObserveMultiplexer.\n//\n// ObserveMultiplexer allows multiple identical ObserveHandles to be driven by a\n// single observe driver.\n//\n// There are two \"observe drivers\" which drive ObserveMultiplexers:\n// - PollingObserveDriver caches the results of a query and reruns it when\n// necessary.\n// - OplogObserveDriver follows the Mongo operation log to directly observe\n// database changes.\n// Both implementations follow the same simple interface: when you create them,\n// they start sending observeChanges callbacks (and a ready() invocation) to\n// their ObserveMultiplexer, and you stop them by calling their stop() method.\n\nCursorDescription = function (collectionName, selector, options) {\n var self = this;\n self.collectionName = collectionName;\n self.selector = Mongo.Collection._rewriteSelector(selector);\n self.options = options || {};\n};\n\nCursor = function (mongo, cursorDescription) {\n var self = this;\n\n self._mongo = mongo;\n self._cursorDescription = cursorDescription;\n self._synchronousCursor = null;\n};\n\n_.each(['forEach', 'map', 'fetch', 'count', Symbol.iterator], function (method) {\n Cursor.prototype[method] = function () {\n var self = this;\n\n // You can only observe a tailable cursor.\n if (self._cursorDescription.options.tailable)\n throw new Error(\"Cannot call \" + method + \" on a tailable cursor\");\n\n if (!self._synchronousCursor) {\n self._synchronousCursor = self._mongo._createSynchronousCursor(\n self._cursorDescription, {\n // Make sure that the \"self\" argument to forEach/map callbacks is the\n // Cursor, not the SynchronousCursor.\n selfForIteration: self,\n useTransform: true\n });\n }\n\n return self._synchronousCursor[method].apply(\n self._synchronousCursor, arguments);\n };\n});\n\n// Since we don't actually have a \"nextObject\" interface, there's really no\n// reason to have a \"rewind\" interface. All it did was make multiple calls\n// to fetch/map/forEach return nothing the second time.\n// XXX COMPAT WITH 0.8.1\nCursor.prototype.rewind = function () {\n};\n\nCursor.prototype.getTransform = function () {\n return this._cursorDescription.options.transform;\n};\n\n// When you call Meteor.publish() with a function that returns a Cursor, we need\n// to transmute it into the equivalent subscription. This is the function that\n// does that.\n\nCursor.prototype._publishCursor = function (sub) {\n var self = this;\n var collection = self._cursorDescription.collectionName;\n return Mongo.Collection._publishCursor(self, sub, collection);\n};\n\n// Used to guarantee that publish functions return at most one cursor per\n// collection. Private, because we might later have cursors that include\n// documents from multiple collections somehow.\nCursor.prototype._getCollectionName = function () {\n var self = this;\n return self._cursorDescription.collectionName;\n};\n\nCursor.prototype.observe = function (callbacks) {\n var self = this;\n return LocalCollection._observeFromObserveChanges(self, callbacks);\n};\n\nCursor.prototype.observeChanges = function (callbacks) {\n var self = this;\n var methods = [\n 'addedAt',\n 'added',\n 'changedAt',\n 'changed',\n 'removedAt',\n 'removed',\n 'movedTo'\n ];\n var ordered = LocalCollection._observeChangesCallbacksAreOrdered(callbacks);\n\n // XXX: Can we find out if callbacks are from observe?\n var exceptionName = ' observe/observeChanges callback';\n methods.forEach(function (method) {\n if (callbacks[method] && typeof callbacks[method] == \"function\") {\n callbacks[method] = Meteor.bindEnvironment(callbacks[method], method + exceptionName);\n }\n });\n\n return self._mongo._observeChanges(\n self._cursorDescription, ordered, callbacks);\n};\n\nMongoConnection.prototype._createSynchronousCursor = function(\n cursorDescription, options) {\n var self = this;\n options = _.pick(options || {}, 'selfForIteration', 'useTransform');\n\n var collection = self.rawCollection(cursorDescription.collectionName);\n var cursorOptions = cursorDescription.options;\n var mongoOptions = {\n sort: cursorOptions.sort,\n limit: cursorOptions.limit,\n skip: cursorOptions.skip,\n projection: cursorOptions.fields\n };\n\n // Do we want a tailable cursor (which only works on capped collections)?\n if (cursorOptions.tailable) {\n // We want a tailable cursor...\n mongoOptions.tailable = true;\n // ... and for the server to wait a bit if any getMore has no data (rather\n // than making us put the relevant sleeps in the client)...\n mongoOptions.awaitdata = true;\n // ... and to keep querying the server indefinitely rather than just 5 times\n // if there's no more data.\n mongoOptions.numberOfRetries = -1;\n // And if this is on the oplog collection and the cursor specifies a 'ts',\n // then set the undocumented oplog replay flag, which does a special scan to\n // find the first document (instead of creating an index on ts). This is a\n // very hard-coded Mongo flag which only works on the oplog collection and\n // only works with the ts field.\n if (cursorDescription.collectionName === OPLOG_COLLECTION &&\n cursorDescription.selector.ts) {\n mongoOptions.oplogReplay = true;\n }\n }\n\n var dbCursor = collection.find(\n replaceTypes(cursorDescription.selector, replaceMeteorAtomWithMongo),\n mongoOptions);\n\n if (typeof cursorOptions.maxTimeMs !== 'undefined') {\n dbCursor = dbCursor.maxTimeMS(cursorOptions.maxTimeMs);\n }\n if (typeof cursorOptions.hint !== 'undefined') {\n dbCursor = dbCursor.hint(cursorOptions.hint);\n }\n\n return new SynchronousCursor(dbCursor, cursorDescription, options);\n};\n\nvar SynchronousCursor = function (dbCursor, cursorDescription, options) {\n var self = this;\n options = _.pick(options || {}, 'selfForIteration', 'useTransform');\n\n self._dbCursor = dbCursor;\n self._cursorDescription = cursorDescription;\n // The \"self\" argument passed to forEach/map callbacks. If we're wrapped\n // inside a user-visible Cursor, we want to provide the outer cursor!\n self._selfForIteration = options.selfForIteration || self;\n if (options.useTransform && cursorDescription.options.transform) {\n self._transform = LocalCollection.wrapTransform(\n cursorDescription.options.transform);\n } else {\n self._transform = null;\n }\n\n self._synchronousCount = Future.wrap(dbCursor.count.bind(dbCursor));\n self._visitedIds = new LocalCollection._IdMap;\n};\n\n_.extend(SynchronousCursor.prototype, {\n // Returns a Promise for the next object from the underlying cursor (before\n // the Mongo->Meteor type replacement).\n _rawNextObjectPromise: function () {\n const self = this;\n return new Promise((resolve, reject) => {\n self._dbCursor.next((err, doc) => {\n if (err) {\n reject(err);\n } else {\n resolve(doc);\n }\n });\n });\n },\n\n // Returns a Promise for the next object from the cursor, skipping those whose\n // IDs we've already seen and replacing Mongo atoms with Meteor atoms.\n _nextObjectPromise: async function () {\n var self = this;\n\n while (true) {\n var doc = await self._rawNextObjectPromise();\n\n if (!doc) return null;\n doc = replaceTypes(doc, replaceMongoAtomWithMeteor);\n\n if (!self._cursorDescription.options.tailable && _.has(doc, '_id')) {\n // Did Mongo give us duplicate documents in the same cursor? If so,\n // ignore this one. (Do this before the transform, since transform might\n // return some unrelated value.) We don't do this for tailable cursors,\n // because we want to maintain O(1) memory usage. And if there isn't _id\n // for some reason (maybe it's the oplog), then we don't do this either.\n // (Be careful to do this for falsey but existing _id, though.)\n if (self._visitedIds.has(doc._id)) continue;\n self._visitedIds.set(doc._id, true);\n }\n\n if (self._transform)\n doc = self._transform(doc);\n\n return doc;\n }\n },\n\n // Returns a promise which is resolved with the next object (like with\n // _nextObjectPromise) or rejected if the cursor doesn't return within\n // timeoutMS ms.\n _nextObjectPromiseWithTimeout: function (timeoutMS) {\n const self = this;\n if (!timeoutMS) {\n return self._nextObjectPromise();\n }\n const nextObjectPromise = self._nextObjectPromise();\n const timeoutErr = new Error('Client-side timeout waiting for next object');\n const timeoutPromise = new Promise((resolve, reject) => {\n const timer = setTimeout(() => {\n reject(timeoutErr);\n }, timeoutMS);\n });\n return Promise.race([nextObjectPromise, timeoutPromise])\n .catch((err) => {\n if (err === timeoutErr) {\n self.close();\n }\n throw err;\n });\n },\n\n _nextObject: function () {\n var self = this;\n return self._nextObjectPromise().await();\n },\n\n forEach: function (callback, thisArg) {\n var self = this;\n\n // Get back to the beginning.\n self._rewind();\n\n // We implement the loop ourself instead of using self._dbCursor.each,\n // because \"each\" will call its callback outside of a fiber which makes it\n // much more complex to make this function synchronous.\n var index = 0;\n while (true) {\n var doc = self._nextObject();\n if (!doc) return;\n callback.call(thisArg, doc, index++, self._selfForIteration);\n }\n },\n\n // XXX Allow overlapping callback executions if callback yields.\n map: function (callback, thisArg) {\n var self = this;\n var res = [];\n self.forEach(function (doc, index) {\n res.push(callback.call(thisArg, doc, index, self._selfForIteration));\n });\n return res;\n },\n\n _rewind: function () {\n var self = this;\n\n // known to be synchronous\n self._dbCursor.rewind();\n\n self._visitedIds = new LocalCollection._IdMap;\n },\n\n // Mostly usable for tailable cursors.\n close: function () {\n var self = this;\n\n self._dbCursor.close();\n },\n\n fetch: function () {\n var self = this;\n return self.map(_.identity);\n },\n\n count: function (applySkipLimit = false) {\n var self = this;\n return self._synchronousCount(applySkipLimit).wait();\n },\n\n // This method is NOT wrapped in Cursor.\n getRawObjects: function (ordered) {\n var self = this;\n if (ordered) {\n return self.fetch();\n } else {\n var results = new LocalCollection._IdMap;\n self.forEach(function (doc) {\n results.set(doc._id, doc);\n });\n return results;\n }\n }\n});\n\nSynchronousCursor.prototype[Symbol.iterator] = function () {\n var self = this;\n\n // Get back to the beginning.\n self._rewind();\n\n return {\n next() {\n const doc = self._nextObject();\n return doc ? {\n value: doc\n } : {\n done: true\n };\n }\n };\n};\n\n// Tails the cursor described by cursorDescription, most likely on the\n// oplog. Calls docCallback with each document found. Ignores errors and just\n// restarts the tail on error.\n//\n// If timeoutMS is set, then if we don't get a new document every timeoutMS,\n// kill and restart the cursor. This is primarily a workaround for #8598.\nMongoConnection.prototype.tail = function (cursorDescription, docCallback, timeoutMS) {\n var self = this;\n if (!cursorDescription.options.tailable)\n throw new Error(\"Can only tail a tailable cursor\");\n\n var cursor = self._createSynchronousCursor(cursorDescription);\n\n var stopped = false;\n var lastTS;\n var loop = function () {\n var doc = null;\n while (true) {\n if (stopped)\n return;\n try {\n doc = cursor._nextObjectPromiseWithTimeout(timeoutMS).await();\n } catch (err) {\n // There's no good way to figure out if this was actually an error from\n // Mongo, or just client-side (including our own timeout error). Ah\n // well. But either way, we need to retry the cursor (unless the failure\n // was because the observe got stopped).\n doc = null;\n }\n // Since we awaited a promise above, we need to check again to see if\n // we've been stopped before calling the callback.\n if (stopped)\n return;\n if (doc) {\n // If a tailable cursor contains a \"ts\" field, use it to recreate the\n // cursor on error. (\"ts\" is a standard that Mongo uses internally for\n // the oplog, and there's a special flag that lets you do binary search\n // on it instead of needing to use an index.)\n lastTS = doc.ts;\n docCallback(doc);\n } else {\n var newSelector = _.clone(cursorDescription.selector);\n if (lastTS) {\n newSelector.ts = {$gt: lastTS};\n }\n cursor = self._createSynchronousCursor(new CursorDescription(\n cursorDescription.collectionName,\n newSelector,\n cursorDescription.options));\n // Mongo failover takes many seconds. Retry in a bit. (Without this\n // setTimeout, we peg the CPU at 100% and never notice the actual\n // failover.\n Meteor.setTimeout(loop, 100);\n break;\n }\n }\n };\n\n Meteor.defer(loop);\n\n return {\n stop: function () {\n stopped = true;\n cursor.close();\n }\n };\n};\n\nMongoConnection.prototype._observeChanges = function (\n cursorDescription, ordered, callbacks) {\n var self = this;\n\n if (cursorDescription.options.tailable) {\n return self._observeChangesTailable(cursorDescription, ordered, callbacks);\n }\n\n // You may not filter out _id when observing changes, because the id is a core\n // part of the observeChanges API.\n if (cursorDescription.options.fields &&\n (cursorDescription.options.fields._id === 0 ||\n cursorDescription.options.fields._id === false)) {\n throw Error(\"You may not observe a cursor with {fields: {_id: 0}}\");\n }\n\n var observeKey = EJSON.stringify(\n _.extend({ordered: ordered}, cursorDescription));\n\n var multiplexer, observeDriver;\n var firstHandle = false;\n\n // Find a matching ObserveMultiplexer, or create a new one. This next block is\n // guaranteed to not yield (and it doesn't call anything that can observe a\n // new query), so no other calls to this function can interleave with it.\n Meteor._noYieldsAllowed(function () {\n if (_.has(self._observeMultiplexers, observeKey)) {\n multiplexer = self._observeMultiplexers[observeKey];\n } else {\n firstHandle = true;\n // Create a new ObserveMultiplexer.\n multiplexer = new ObserveMultiplexer({\n ordered: ordered,\n onStop: function () {\n delete self._observeMultiplexers[observeKey];\n observeDriver.stop();\n }\n });\n self._observeMultiplexers[observeKey] = multiplexer;\n }\n });\n\n var observeHandle = new ObserveHandle(multiplexer, callbacks);\n\n if (firstHandle) {\n var matcher, sorter;\n var canUseOplog = _.all([\n function () {\n // At a bare minimum, using the oplog requires us to have an oplog, to\n // want unordered callbacks, and to not want a callback on the polls\n // that won't happen.\n return self._oplogHandle && !ordered &&\n !callbacks._testOnlyPollCallback;\n }, function () {\n // We need to be able to compile the selector. Fall back to polling for\n // some newfangled $selector that minimongo doesn't support yet.\n try {\n matcher = new Minimongo.Matcher(cursorDescription.selector);\n return true;\n } catch (e) {\n // XXX make all compilation errors MinimongoError or something\n // so that this doesn't ignore unrelated exceptions\n return false;\n }\n }, function () {\n // ... and the selector itself needs to support oplog.\n return OplogObserveDriver.cursorSupported(cursorDescription, matcher);\n }, function () {\n // And we need to be able to compile the sort, if any. eg, can't be\n // {$natural: 1}.\n if (!cursorDescription.options.sort)\n return true;\n try {\n sorter = new Minimongo.Sorter(cursorDescription.options.sort);\n return true;\n } catch (e) {\n // XXX make all compilation errors MinimongoError or something\n // so that this doesn't ignore unrelated exceptions\n return false;\n }\n }], function (f) { return f(); }); // invoke each function\n\n var driverClass = canUseOplog ? OplogObserveDriver : PollingObserveDriver;\n observeDriver = new driverClass({\n cursorDescription: cursorDescription,\n mongoHandle: self,\n multiplexer: multiplexer,\n ordered: ordered,\n matcher: matcher, // ignored by polling\n sorter: sorter, // ignored by polling\n _testOnlyPollCallback: callbacks._testOnlyPollCallback\n });\n\n // This field is only set for use in tests.\n multiplexer._observeDriver = observeDriver;\n }\n\n // Blocks until the initial adds have been sent.\n multiplexer.addHandleAndSendInitialAdds(observeHandle);\n\n return observeHandle;\n};\n\n// Listen for the invalidation messages that will trigger us to poll the\n// database for changes. If this selector specifies specific IDs, specify them\n// here, so that updates to different specific IDs don't cause us to poll.\n// listenCallback is the same kind of (notification, complete) callback passed\n// to InvalidationCrossbar.listen.\n\nlistenAll = function (cursorDescription, listenCallback) {\n var listeners = [];\n forEachTrigger(cursorDescription, function (trigger) {\n listeners.push(DDPServer._InvalidationCrossbar.listen(\n trigger, listenCallback));\n });\n\n return {\n stop: function () {\n _.each(listeners, function (listener) {\n listener.stop();\n });\n }\n };\n};\n\nforEachTrigger = function (cursorDescription, triggerCallback) {\n var key = {collection: cursorDescription.collectionName};\n var specificIds = LocalCollection._idsMatchedBySelector(\n cursorDescription.selector);\n if (specificIds) {\n _.each(specificIds, function (id) {\n triggerCallback(_.extend({id: id}, key));\n });\n triggerCallback(_.extend({dropCollection: true, id: null}, key));\n } else {\n triggerCallback(key);\n }\n // Everyone cares about the database being dropped.\n triggerCallback({ dropDatabase: true });\n};\n\n// observeChanges for tailable cursors on capped collections.\n//\n// Some differences from normal cursors:\n// - Will never produce anything other than 'added' or 'addedBefore'. If you\n// do update a document that has already been produced, this will not notice\n// it.\n// - If you disconnect and reconnect from Mongo, it will essentially restart\n// the query, which will lead to duplicate results. This is pretty bad,\n// but if you include a field called 'ts' which is inserted as\n// new MongoInternals.MongoTimestamp(0, 0) (which is initialized to the\n// current Mongo-style timestamp), we'll be able to find the place to\n// restart properly. (This field is specifically understood by Mongo with an\n// optimization which allows it to find the right place to start without\n// an index on ts. It's how the oplog works.)\n// - No callbacks are triggered synchronously with the call (there's no\n// differentiation between \"initial data\" and \"later changes\"; everything\n// that matches the query gets sent asynchronously).\n// - De-duplication is not implemented.\n// - Does not yet interact with the write fence. Probably, this should work by\n// ignoring removes (which don't work on capped collections) and updates\n// (which don't affect tailable cursors), and just keeping track of the ID\n// of the inserted object, and closing the write fence once you get to that\n// ID (or timestamp?). This doesn't work well if the document doesn't match\n// the query, though. On the other hand, the write fence can close\n// immediately if it does not match the query. So if we trust minimongo\n// enough to accurately evaluate the query against the write fence, we\n// should be able to do this... Of course, minimongo doesn't even support\n// Mongo Timestamps yet.\nMongoConnection.prototype._observeChangesTailable = function (\n cursorDescription, ordered, callbacks) {\n var self = this;\n\n // Tailable cursors only ever call added/addedBefore callbacks, so it's an\n // error if you didn't provide them.\n if ((ordered && !callbacks.addedBefore) ||\n (!ordered && !callbacks.added)) {\n throw new Error(\"Can't observe an \" + (ordered ? \"ordered\" : \"unordered\")\n + \" tailable cursor without a \"\n + (ordered ? \"addedBefore\" : \"added\") + \" callback\");\n }\n\n return self.tail(cursorDescription, function (doc) {\n var id = doc._id;\n delete doc._id;\n // The ts is an implementation detail. Hide it.\n delete doc.ts;\n if (ordered) {\n callbacks.addedBefore(id, doc, null);\n } else {\n callbacks.added(id, doc);\n }\n });\n};\n\n// XXX We probably need to find a better way to expose this. Right now\n// it's only used by tests, but in fact you need it in normal\n// operation to interact with capped collections.\nMongoInternals.MongoTimestamp = MongoDB.Timestamp;\n\nMongoInternals.Connection = MongoConnection;\n","var Future = Npm.require('fibers/future');\n\nimport { NpmModuleMongodb } from \"meteor/npm-mongo\";\nconst { Timestamp } = NpmModuleMongodb;\n\nOPLOG_COLLECTION = 'oplog.rs';\n\nvar TOO_FAR_BEHIND = process.env.METEOR_OPLOG_TOO_FAR_BEHIND || 2000;\nvar TAIL_TIMEOUT = +process.env.METEOR_OPLOG_TAIL_TIMEOUT || 30000;\n\nvar showTS = function (ts) {\n return \"Timestamp(\" + ts.getHighBits() + \", \" + ts.getLowBits() + \")\";\n};\n\nidForOp = function (op) {\n if (op.op === 'd')\n return op.o._id;\n else if (op.op === 'i')\n return op.o._id;\n else if (op.op === 'u')\n return op.o2._id;\n else if (op.op === 'c')\n throw Error(\"Operator 'c' doesn't supply an object with id: \" +\n EJSON.stringify(op));\n else\n throw Error(\"Unknown op: \" + EJSON.stringify(op));\n};\n\nOplogHandle = function (oplogUrl, dbName) {\n var self = this;\n self._oplogUrl = oplogUrl;\n self._dbName = dbName;\n\n self._oplogLastEntryConnection = null;\n self._oplogTailConnection = null;\n self._stopped = false;\n self._tailHandle = null;\n self._readyFuture = new Future();\n self._crossbar = new DDPServer._Crossbar({\n factPackage: \"mongo-livedata\", factName: \"oplog-watchers\"\n });\n self._baseOplogSelector = {\n ns: new RegExp(\"^(?:\" + [\n Meteor._escapeRegExp(self._dbName + \".\"),\n Meteor._escapeRegExp(\"admin.$cmd\"),\n ].join(\"|\") + \")\"),\n\n $or: [\n { op: { $in: ['i', 'u', 'd'] } },\n // drop collection\n { op: 'c', 'o.drop': { $exists: true } },\n { op: 'c', 'o.dropDatabase': 1 },\n { op: 'c', 'o.applyOps': { $exists: true } },\n ]\n };\n\n // Data structures to support waitUntilCaughtUp(). Each oplog entry has a\n // MongoTimestamp object on it (which is not the same as a Date --- it's a\n // combination of time and an incrementing counter; see\n // http://docs.mongodb.org/manual/reference/bson-types/#timestamps).\n //\n // _catchingUpFutures is an array of {ts: MongoTimestamp, future: Future}\n // objects, sorted by ascending timestamp. _lastProcessedTS is the\n // MongoTimestamp of the last oplog entry we've processed.\n //\n // Each time we call waitUntilCaughtUp, we take a peek at the final oplog\n // entry in the db. If we've already processed it (ie, it is not greater than\n // _lastProcessedTS), waitUntilCaughtUp immediately returns. Otherwise,\n // waitUntilCaughtUp makes a new Future and inserts it along with the final\n // timestamp entry that it read, into _catchingUpFutures. waitUntilCaughtUp\n // then waits on that future, which is resolved once _lastProcessedTS is\n // incremented to be past its timestamp by the worker fiber.\n //\n // XXX use a priority queue or something else that's faster than an array\n self._catchingUpFutures = [];\n self._lastProcessedTS = null;\n\n self._onSkippedEntriesHook = new Hook({\n debugPrintExceptions: \"onSkippedEntries callback\"\n });\n\n self._entryQueue = new Meteor._DoubleEndedQueue();\n self._workerActive = false;\n\n self._startTailing();\n};\n\n_.extend(OplogHandle.prototype, {\n stop: function () {\n var self = this;\n if (self._stopped)\n return;\n self._stopped = true;\n if (self._tailHandle)\n self._tailHandle.stop();\n // XXX should close connections too\n },\n onOplogEntry: function (trigger, callback) {\n var self = this;\n if (self._stopped)\n throw new Error(\"Called onOplogEntry on stopped handle!\");\n\n // Calling onOplogEntry requires us to wait for the tailing to be ready.\n self._readyFuture.wait();\n\n var originalCallback = callback;\n callback = Meteor.bindEnvironment(function (notification) {\n originalCallback(notification);\n }, function (err) {\n Meteor._debug(\"Error in oplog callback\", err);\n });\n var listenHandle = self._crossbar.listen(trigger, callback);\n return {\n stop: function () {\n listenHandle.stop();\n }\n };\n },\n // Register a callback to be invoked any time we skip oplog entries (eg,\n // because we are too far behind).\n onSkippedEntries: function (callback) {\n var self = this;\n if (self._stopped)\n throw new Error(\"Called onSkippedEntries on stopped handle!\");\n return self._onSkippedEntriesHook.register(callback);\n },\n // Calls `callback` once the oplog has been processed up to a point that is\n // roughly \"now\": specifically, once we've processed all ops that are\n // currently visible.\n // XXX become convinced that this is actually safe even if oplogConnection\n // is some kind of pool\n waitUntilCaughtUp: function () {\n var self = this;\n if (self._stopped)\n throw new Error(\"Called waitUntilCaughtUp on stopped handle!\");\n\n // Calling waitUntilCaughtUp requries us to wait for the oplog connection to\n // be ready.\n self._readyFuture.wait();\n var lastEntry;\n\n while (!self._stopped) {\n // We need to make the selector at least as restrictive as the actual\n // tailing selector (ie, we need to specify the DB name) or else we might\n // find a TS that won't show up in the actual tail stream.\n try {\n lastEntry = self._oplogLastEntryConnection.findOne(\n OPLOG_COLLECTION, self._baseOplogSelector,\n {fields: {ts: 1}, sort: {$natural: -1}});\n break;\n } catch (e) {\n // During failover (eg) if we get an exception we should log and retry\n // instead of crashing.\n Meteor._debug(\"Got exception while reading last entry\", e);\n Meteor._sleepForMs(100);\n }\n }\n\n if (self._stopped)\n return;\n\n if (!lastEntry) {\n // Really, nothing in the oplog? Well, we've processed everything.\n return;\n }\n\n var ts = lastEntry.ts;\n if (!ts)\n throw Error(\"oplog entry without ts: \" + EJSON.stringify(lastEntry));\n\n if (self._lastProcessedTS && ts.lessThanOrEqual(self._lastProcessedTS)) {\n // We've already caught up to here.\n return;\n }\n\n\n // Insert the future into our list. Almost always, this will be at the end,\n // but it's conceivable that if we fail over from one primary to another,\n // the oplog entries we see will go backwards.\n var insertAfter = self._catchingUpFutures.length;\n while (insertAfter - 1 > 0 && self._catchingUpFutures[insertAfter - 1].ts.greaterThan(ts)) {\n insertAfter--;\n }\n var f = new Future;\n self._catchingUpFutures.splice(insertAfter, 0, {ts: ts, future: f});\n f.wait();\n },\n _startTailing: function () {\n var self = this;\n // First, make sure that we're talking to the local database.\n var mongodbUri = Npm.require('mongodb-uri');\n if (mongodbUri.parse(self._oplogUrl).database !== 'local') {\n throw Error(\"$MONGO_OPLOG_URL must be set to the 'local' database of \" +\n \"a Mongo replica set\");\n }\n\n // We make two separate connections to Mongo. The Node Mongo driver\n // implements a naive round-robin connection pool: each \"connection\" is a\n // pool of several (5 by default) TCP connections, and each request is\n // rotated through the pools. Tailable cursor queries block on the server\n // until there is some data to return (or until a few seconds have\n // passed). So if the connection pool used for tailing cursors is the same\n // pool used for other queries, the other queries will be delayed by seconds\n // 1/5 of the time.\n //\n // The tail connection will only ever be running a single tail command, so\n // it only needs to make one underlying TCP connection.\n self._oplogTailConnection = new MongoConnection(\n self._oplogUrl, {poolSize: 1});\n // XXX better docs, but: it's to get monotonic results\n // XXX is it safe to say \"if there's an in flight query, just use its\n // results\"? I don't think so but should consider that\n self._oplogLastEntryConnection = new MongoConnection(\n self._oplogUrl, {poolSize: 1});\n\n // Now, make sure that there actually is a repl set here. If not, oplog\n // tailing won't ever find anything!\n // More on the isMasterDoc\n // https://docs.mongodb.com/manual/reference/command/isMaster/\n var f = new Future;\n self._oplogLastEntryConnection.db.admin().command(\n { ismaster: 1 }, f.resolver());\n var isMasterDoc = f.wait();\n\n if (!(isMasterDoc && isMasterDoc.setName)) {\n throw Error(\"$MONGO_OPLOG_URL must be set to the 'local' database of \" +\n \"a Mongo replica set\");\n }\n\n // Find the last oplog entry.\n var lastOplogEntry = self._oplogLastEntryConnection.findOne(\n OPLOG_COLLECTION, {}, {sort: {$natural: -1}, fields: {ts: 1}});\n\n var oplogSelector = _.clone(self._baseOplogSelector);\n if (lastOplogEntry) {\n // Start after the last entry that currently exists.\n oplogSelector.ts = {$gt: lastOplogEntry.ts};\n // If there are any calls to callWhenProcessedLatest before any other\n // oplog entries show up, allow callWhenProcessedLatest to call its\n // callback immediately.\n self._lastProcessedTS = lastOplogEntry.ts;\n }\n\n var cursorDescription = new CursorDescription(\n OPLOG_COLLECTION, oplogSelector, {tailable: true});\n\n // Start tailing the oplog.\n //\n // We restart the low-level oplog query every 30 seconds if we didn't get a\n // doc. This is a workaround for #8598: the Node Mongo driver has at least\n // one bug that can lead to query callbacks never getting called (even with\n // an error) when leadership failover occur.\n self._tailHandle = self._oplogTailConnection.tail(\n cursorDescription,\n function (doc) {\n self._entryQueue.push(doc);\n self._maybeStartWorker();\n },\n TAIL_TIMEOUT\n );\n self._readyFuture.return();\n },\n\n _maybeStartWorker: function () {\n var self = this;\n if (self._workerActive) return;\n self._workerActive = true;\n\n Meteor.defer(function () {\n // May be called recursively in case of transactions.\n function handleDoc(doc) {\n if (doc.ns === \"admin.$cmd\") {\n if (doc.o.applyOps) {\n // This was a successful transaction, so we need to apply the\n // operations that were involved.\n let nextTimestamp = doc.ts;\n doc.o.applyOps.forEach(op => {\n // See https://github.com/meteor/meteor/issues/10420.\n if (!op.ts) {\n op.ts = nextTimestamp;\n nextTimestamp = nextTimestamp.add(Timestamp.ONE);\n }\n handleDoc(op);\n });\n return;\n }\n throw new Error(\"Unknown command \" + EJSON.stringify(doc));\n }\n\n const trigger = {\n dropCollection: false,\n dropDatabase: false,\n op: doc,\n };\n\n if (typeof doc.ns === \"string\" &&\n doc.ns.startsWith(self._dbName + \".\")) {\n trigger.collection = doc.ns.slice(self._dbName.length + 1);\n }\n\n // Is it a special command and the collection name is hidden\n // somewhere in operator?\n if (trigger.collection === \"$cmd\") {\n if (doc.o.dropDatabase) {\n delete trigger.collection;\n trigger.dropDatabase = true;\n } else if (_.has(doc.o, \"drop\")) {\n trigger.collection = doc.o.drop;\n trigger.dropCollection = true;\n trigger.id = null;\n } else {\n throw Error(\"Unknown command \" + EJSON.stringify(doc));\n }\n\n } else {\n // All other ops have an id.\n trigger.id = idForOp(doc);\n }\n\n self._crossbar.fire(trigger);\n }\n\n try {\n while (! self._stopped &&\n ! self._entryQueue.isEmpty()) {\n // Are we too far behind? Just tell our observers that they need to\n // repoll, and drop our queue.\n if (self._entryQueue.length > TOO_FAR_BEHIND) {\n var lastEntry = self._entryQueue.pop();\n self._entryQueue.clear();\n\n self._onSkippedEntriesHook.each(function (callback) {\n callback();\n return true;\n });\n\n // Free any waitUntilCaughtUp() calls that were waiting for us to\n // pass something that we just skipped.\n self._setLastProcessedTS(lastEntry.ts);\n continue;\n }\n\n const doc = self._entryQueue.shift();\n\n // Fire trigger(s) for this doc.\n handleDoc(doc);\n\n // Now that we've processed this operation, process pending\n // sequencers.\n if (doc.ts) {\n self._setLastProcessedTS(doc.ts);\n } else {\n throw Error(\"oplog entry without ts: \" + EJSON.stringify(doc));\n }\n }\n } finally {\n self._workerActive = false;\n }\n });\n },\n\n _setLastProcessedTS: function (ts) {\n var self = this;\n self._lastProcessedTS = ts;\n while (!_.isEmpty(self._catchingUpFutures) && self._catchingUpFutures[0].ts.lessThanOrEqual(self._lastProcessedTS)) {\n var sequencer = self._catchingUpFutures.shift();\n sequencer.future.return();\n }\n },\n\n //Methods used on tests to dinamically change TOO_FAR_BEHIND\n _defineTooFarBehind: function(value) {\n TOO_FAR_BEHIND = value;\n },\n _resetTooFarBehind: function() {\n TOO_FAR_BEHIND = process.env.METEOR_OPLOG_TOO_FAR_BEHIND || 2000;\n }\n});\n","var Future = Npm.require('fibers/future');\n\nObserveMultiplexer = function (options) {\n var self = this;\n\n if (!options || !_.has(options, 'ordered'))\n throw Error(\"must specified ordered\");\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-multiplexers\", 1);\n\n self._ordered = options.ordered;\n self._onStop = options.onStop || function () {};\n self._queue = new Meteor._SynchronousQueue();\n self._handles = {};\n self._readyFuture = new Future;\n self._cache = new LocalCollection._CachingChangeObserver({\n ordered: options.ordered});\n // Number of addHandleAndSendInitialAdds tasks scheduled but not yet\n // running. removeHandle uses this to know if it's time to call the onStop\n // callback.\n self._addHandleTasksScheduledButNotPerformed = 0;\n\n _.each(self.callbackNames(), function (callbackName) {\n self[callbackName] = function (/* ... */) {\n self._applyCallback(callbackName, _.toArray(arguments));\n };\n });\n};\n\n_.extend(ObserveMultiplexer.prototype, {\n addHandleAndSendInitialAdds: function (handle) {\n var self = this;\n\n // Check this before calling runTask (even though runTask does the same\n // check) so that we don't leak an ObserveMultiplexer on error by\n // incrementing _addHandleTasksScheduledButNotPerformed and never\n // decrementing it.\n if (!self._queue.safeToRunTask())\n throw new Error(\"Can't call observeChanges from an observe callback on the same query\");\n ++self._addHandleTasksScheduledButNotPerformed;\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-handles\", 1);\n\n self._queue.runTask(function () {\n self._handles[handle._id] = handle;\n // Send out whatever adds we have so far (whether or not we the\n // multiplexer is ready).\n self._sendAdds(handle);\n --self._addHandleTasksScheduledButNotPerformed;\n });\n // *outside* the task, since otherwise we'd deadlock\n self._readyFuture.wait();\n },\n\n // Remove an observe handle. If it was the last observe handle, call the\n // onStop callback; you cannot add any more observe handles after this.\n //\n // This is not synchronized with polls and handle additions: this means that\n // you can safely call it from within an observe callback, but it also means\n // that we have to be careful when we iterate over _handles.\n removeHandle: function (id) {\n var self = this;\n\n // This should not be possible: you can only call removeHandle by having\n // access to the ObserveHandle, which isn't returned to user code until the\n // multiplex is ready.\n if (!self._ready())\n throw new Error(\"Can't remove handles until the multiplex is ready\");\n\n delete self._handles[id];\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-handles\", -1);\n\n if (_.isEmpty(self._handles) &&\n self._addHandleTasksScheduledButNotPerformed === 0) {\n self._stop();\n }\n },\n _stop: function (options) {\n var self = this;\n options = options || {};\n\n // It shouldn't be possible for us to stop when all our handles still\n // haven't been returned from observeChanges!\n if (! self._ready() && ! options.fromQueryError)\n throw Error(\"surprising _stop: not ready\");\n\n // Call stop callback (which kills the underlying process which sends us\n // callbacks and removes us from the connection's dictionary).\n self._onStop();\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-multiplexers\", -1);\n\n // Cause future addHandleAndSendInitialAdds calls to throw (but the onStop\n // callback should make our connection forget about us).\n self._handles = null;\n },\n\n // Allows all addHandleAndSendInitialAdds calls to return, once all preceding\n // adds have been processed. Does not block.\n ready: function () {\n var self = this;\n self._queue.queueTask(function () {\n if (self._ready())\n throw Error(\"can't make ObserveMultiplex ready twice!\");\n self._readyFuture.return();\n });\n },\n\n // If trying to execute the query results in an error, call this. This is\n // intended for permanent errors, not transient network errors that could be\n // fixed. It should only be called before ready(), because if you called ready\n // that meant that you managed to run the query once. It will stop this\n // ObserveMultiplex and cause addHandleAndSendInitialAdds calls (and thus\n // observeChanges calls) to throw the error.\n queryError: function (err) {\n var self = this;\n self._queue.runTask(function () {\n if (self._ready())\n throw Error(\"can't claim query has an error after it worked!\");\n self._stop({fromQueryError: true});\n self._readyFuture.throw(err);\n });\n },\n\n // Calls \"cb\" once the effects of all \"ready\", \"addHandleAndSendInitialAdds\"\n // and observe callbacks which came before this call have been propagated to\n // all handles. \"ready\" must have already been called on this multiplexer.\n onFlush: function (cb) {\n var self = this;\n self._queue.queueTask(function () {\n if (!self._ready())\n throw Error(\"only call onFlush on a multiplexer that will be ready\");\n cb();\n });\n },\n callbackNames: function () {\n var self = this;\n if (self._ordered)\n return [\"addedBefore\", \"changed\", \"movedBefore\", \"removed\"];\n else\n return [\"added\", \"changed\", \"removed\"];\n },\n _ready: function () {\n return this._readyFuture.isResolved();\n },\n _applyCallback: function (callbackName, args) {\n var self = this;\n self._queue.queueTask(function () {\n // If we stopped in the meantime, do nothing.\n if (!self._handles)\n return;\n\n // First, apply the change to the cache.\n // XXX We could make applyChange callbacks promise not to hang on to any\n // state from their arguments (assuming that their supplied callbacks\n // don't) and skip this clone. Currently 'changed' hangs on to state\n // though.\n self._cache.applyChange[callbackName].apply(null, EJSON.clone(args));\n\n // If we haven't finished the initial adds, then we should only be getting\n // adds.\n if (!self._ready() &&\n (callbackName !== 'added' && callbackName !== 'addedBefore')) {\n throw new Error(\"Got \" + callbackName + \" during initial adds\");\n }\n\n // Now multiplex the callbacks out to all observe handles. It's OK if\n // these calls yield; since we're inside a task, no other use of our queue\n // can continue until these are done. (But we do have to be careful to not\n // use a handle that got removed, because removeHandle does not use the\n // queue; thus, we iterate over an array of keys that we control.)\n _.each(_.keys(self._handles), function (handleId) {\n var handle = self._handles && self._handles[handleId];\n if (!handle)\n return;\n var callback = handle['_' + callbackName];\n // clone arguments so that callbacks can mutate their arguments\n callback && callback.apply(null, EJSON.clone(args));\n });\n });\n },\n\n // Sends initial adds to a handle. It should only be called from within a task\n // (the task that is processing the addHandleAndSendInitialAdds call). It\n // synchronously invokes the handle's added or addedBefore; there's no need to\n // flush the queue afterwards to ensure that the callbacks get out.\n _sendAdds: function (handle) {\n var self = this;\n if (self._queue.safeToRunTask())\n throw Error(\"_sendAdds may only be called from within a task!\");\n var add = self._ordered ? handle._addedBefore : handle._added;\n if (!add)\n return;\n // note: docs may be an _IdMap or an OrderedDict\n self._cache.docs.forEach(function (doc, id) {\n if (!_.has(self._handles, handle._id))\n throw Error(\"handle got removed before sending initial adds!\");\n var fields = EJSON.clone(doc);\n delete fields._id;\n if (self._ordered)\n add(id, fields, null); // we're going in order, so add at end\n else\n add(id, fields);\n });\n }\n});\n\n\nvar nextObserveHandleId = 1;\nObserveHandle = function (multiplexer, callbacks) {\n var self = this;\n // The end user is only supposed to call stop(). The other fields are\n // accessible to the multiplexer, though.\n self._multiplexer = multiplexer;\n _.each(multiplexer.callbackNames(), function (name) {\n if (callbacks[name]) {\n self['_' + name] = callbacks[name];\n } else if (name === \"addedBefore\" && callbacks.added) {\n // Special case: if you specify \"added\" and \"movedBefore\", you get an\n // ordered observe where for some reason you don't get ordering data on\n // the adds. I dunno, we wrote tests for it, there must have been a\n // reason.\n self._addedBefore = function (id, fields, before) {\n callbacks.added(id, fields);\n };\n }\n });\n self._stopped = false;\n self._id = nextObserveHandleId++;\n};\nObserveHandle.prototype.stop = function () {\n var self = this;\n if (self._stopped)\n return;\n self._stopped = true;\n self._multiplexer.removeHandle(self._id);\n};\n","var Fiber = Npm.require('fibers');\n\nexport class DocFetcher {\n constructor(mongoConnection) {\n this._mongoConnection = mongoConnection;\n // Map from op -> [callback]\n this._callbacksForOp = new Map;\n }\n\n // Fetches document \"id\" from collectionName, returning it or null if not\n // found.\n //\n // If you make multiple calls to fetch() with the same op reference,\n // DocFetcher may assume that they all return the same document. (It does\n // not check to see if collectionName/id match.)\n //\n // You may assume that callback is never called synchronously (and in fact\n // OplogObserveDriver does so).\n fetch(collectionName, id, op, callback) {\n const self = this;\n\n check(collectionName, String);\n check(op, Object);\n\n // If there's already an in-progress fetch for this cache key, yield until\n // it's done and return whatever it returns.\n if (self._callbacksForOp.has(op)) {\n self._callbacksForOp.get(op).push(callback);\n return;\n }\n\n const callbacks = [callback];\n self._callbacksForOp.set(op, callbacks);\n\n Fiber(function () {\n try {\n var doc = self._mongoConnection.findOne(\n collectionName, {_id: id}) || null;\n // Return doc to all relevant callbacks. Note that this array can\n // continue to grow during callback excecution.\n while (callbacks.length > 0) {\n // Clone the document so that the various calls to fetch don't return\n // objects that are intertwingled with each other. Clone before\n // popping the future, so that if clone throws, the error gets passed\n // to the next callback.\n callbacks.pop()(null, EJSON.clone(doc));\n }\n } catch (e) {\n while (callbacks.length > 0) {\n callbacks.pop()(e);\n }\n } finally {\n // XXX consider keeping the doc around for a period of time before\n // removing from the cache\n self._callbacksForOp.delete(op);\n }\n }).run();\n }\n}\n","var POLLING_THROTTLE_MS = +process.env.METEOR_POLLING_THROTTLE_MS || 50;\nvar POLLING_INTERVAL_MS = +process.env.METEOR_POLLING_INTERVAL_MS || 10 * 1000;\n\nPollingObserveDriver = function (options) {\n var self = this;\n\n self._cursorDescription = options.cursorDescription;\n self._mongoHandle = options.mongoHandle;\n self._ordered = options.ordered;\n self._multiplexer = options.multiplexer;\n self._stopCallbacks = [];\n self._stopped = false;\n\n self._synchronousCursor = self._mongoHandle._createSynchronousCursor(\n self._cursorDescription);\n\n // previous results snapshot. on each poll cycle, diffs against\n // results drives the callbacks.\n self._results = null;\n\n // The number of _pollMongo calls that have been added to self._taskQueue but\n // have not started running. Used to make sure we never schedule more than one\n // _pollMongo (other than possibly the one that is currently running). It's\n // also used by _suspendPolling to pretend there's a poll scheduled. Usually,\n // it's either 0 (for \"no polls scheduled other than maybe one currently\n // running\") or 1 (for \"a poll scheduled that isn't running yet\"), but it can\n // also be 2 if incremented by _suspendPolling.\n self._pollsScheduledButNotStarted = 0;\n self._pendingWrites = []; // people to notify when polling completes\n\n // Make sure to create a separately throttled function for each\n // PollingObserveDriver object.\n self._ensurePollIsScheduled = _.throttle(\n self._unthrottledEnsurePollIsScheduled,\n self._cursorDescription.options.pollingThrottleMs || POLLING_THROTTLE_MS /* ms */);\n\n // XXX figure out if we still need a queue\n self._taskQueue = new Meteor._SynchronousQueue();\n\n var listenersHandle = listenAll(\n self._cursorDescription, function (notification) {\n // When someone does a transaction that might affect us, schedule a poll\n // of the database. If that transaction happens inside of a write fence,\n // block the fence until we've polled and notified observers.\n var fence = DDPServer._CurrentWriteFence.get();\n if (fence)\n self._pendingWrites.push(fence.beginWrite());\n // Ensure a poll is scheduled... but if we already know that one is,\n // don't hit the throttled _ensurePollIsScheduled function (which might\n // lead to us calling it unnecessarily in ms).\n if (self._pollsScheduledButNotStarted === 0)\n self._ensurePollIsScheduled();\n }\n );\n self._stopCallbacks.push(function () { listenersHandle.stop(); });\n\n // every once and a while, poll even if we don't think we're dirty, for\n // eventual consistency with database writes from outside the Meteor\n // universe.\n //\n // For testing, there's an undocumented callback argument to observeChanges\n // which disables time-based polling and gets called at the beginning of each\n // poll.\n if (options._testOnlyPollCallback) {\n self._testOnlyPollCallback = options._testOnlyPollCallback;\n } else {\n var pollingInterval =\n self._cursorDescription.options.pollingIntervalMs ||\n self._cursorDescription.options._pollingInterval || // COMPAT with 1.2\n POLLING_INTERVAL_MS;\n var intervalHandle = Meteor.setInterval(\n _.bind(self._ensurePollIsScheduled, self), pollingInterval);\n self._stopCallbacks.push(function () {\n Meteor.clearInterval(intervalHandle);\n });\n }\n\n // Make sure we actually poll soon!\n self._unthrottledEnsurePollIsScheduled();\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-drivers-polling\", 1);\n};\n\n_.extend(PollingObserveDriver.prototype, {\n // This is always called through _.throttle (except once at startup).\n _unthrottledEnsurePollIsScheduled: function () {\n var self = this;\n if (self._pollsScheduledButNotStarted > 0)\n return;\n ++self._pollsScheduledButNotStarted;\n self._taskQueue.queueTask(function () {\n self._pollMongo();\n });\n },\n\n // test-only interface for controlling polling.\n //\n // _suspendPolling blocks until any currently running and scheduled polls are\n // done, and prevents any further polls from being scheduled. (new\n // ObserveHandles can be added and receive their initial added callbacks,\n // though.)\n //\n // _resumePolling immediately polls, and allows further polls to occur.\n _suspendPolling: function() {\n var self = this;\n // Pretend that there's another poll scheduled (which will prevent\n // _ensurePollIsScheduled from queueing any more polls).\n ++self._pollsScheduledButNotStarted;\n // Now block until all currently running or scheduled polls are done.\n self._taskQueue.runTask(function() {});\n\n // Confirm that there is only one \"poll\" (the fake one we're pretending to\n // have) scheduled.\n if (self._pollsScheduledButNotStarted !== 1)\n throw new Error(\"_pollsScheduledButNotStarted is \" +\n self._pollsScheduledButNotStarted);\n },\n _resumePolling: function() {\n var self = this;\n // We should be in the same state as in the end of _suspendPolling.\n if (self._pollsScheduledButNotStarted !== 1)\n throw new Error(\"_pollsScheduledButNotStarted is \" +\n self._pollsScheduledButNotStarted);\n // Run a poll synchronously (which will counteract the\n // ++_pollsScheduledButNotStarted from _suspendPolling).\n self._taskQueue.runTask(function () {\n self._pollMongo();\n });\n },\n\n _pollMongo: function () {\n var self = this;\n --self._pollsScheduledButNotStarted;\n\n if (self._stopped)\n return;\n\n var first = false;\n var newResults;\n var oldResults = self._results;\n if (!oldResults) {\n first = true;\n // XXX maybe use OrderedDict instead?\n oldResults = self._ordered ? [] : new LocalCollection._IdMap;\n }\n\n self._testOnlyPollCallback && self._testOnlyPollCallback();\n\n // Save the list of pending writes which this round will commit.\n var writesForCycle = self._pendingWrites;\n self._pendingWrites = [];\n\n // Get the new query results. (This yields.)\n try {\n newResults = self._synchronousCursor.getRawObjects(self._ordered);\n } catch (e) {\n if (first && typeof(e.code) === 'number') {\n // This is an error document sent to us by mongod, not a connection\n // error generated by the client. And we've never seen this query work\n // successfully. Probably it's a bad selector or something, so we should\n // NOT retry. Instead, we should halt the observe (which ends up calling\n // `stop` on us).\n self._multiplexer.queryError(\n new Error(\n \"Exception while polling query \" +\n JSON.stringify(self._cursorDescription) + \": \" + e.message));\n return;\n }\n\n // getRawObjects can throw if we're having trouble talking to the\n // database. That's fine --- we will repoll later anyway. But we should\n // make sure not to lose track of this cycle's writes.\n // (It also can throw if there's just something invalid about this query;\n // unfortunately the ObserveDriver API doesn't provide a good way to\n // \"cancel\" the observe from the inside in this case.\n Array.prototype.push.apply(self._pendingWrites, writesForCycle);\n Meteor._debug(\"Exception while polling query \" +\n JSON.stringify(self._cursorDescription), e);\n return;\n }\n\n // Run diffs.\n if (!self._stopped) {\n LocalCollection._diffQueryChanges(\n self._ordered, oldResults, newResults, self._multiplexer);\n }\n\n // Signals the multiplexer to allow all observeChanges calls that share this\n // multiplexer to return. (This happens asynchronously, via the\n // multiplexer's queue.)\n if (first)\n self._multiplexer.ready();\n\n // Replace self._results atomically. (This assignment is what makes `first`\n // stay through on the next cycle, so we've waited until after we've\n // committed to ready-ing the multiplexer.)\n self._results = newResults;\n\n // Once the ObserveMultiplexer has processed everything we've done in this\n // round, mark all the writes which existed before this call as\n // commmitted. (If new writes have shown up in the meantime, there'll\n // already be another _pollMongo task scheduled.)\n self._multiplexer.onFlush(function () {\n _.each(writesForCycle, function (w) {\n w.committed();\n });\n });\n },\n\n stop: function () {\n var self = this;\n self._stopped = true;\n _.each(self._stopCallbacks, function (c) { c(); });\n // Release any write fences that are waiting on us.\n _.each(self._pendingWrites, function (w) {\n w.committed();\n });\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-drivers-polling\", -1);\n }\n});\n","import { oplogV2V1Converter } from './oplog_v2_converter';\n\nvar Future = Npm.require('fibers/future');\n\nvar PHASE = {\n QUERYING: \"QUERYING\",\n FETCHING: \"FETCHING\",\n STEADY: \"STEADY\"\n};\n\n// Exception thrown by _needToPollQuery which unrolls the stack up to the\n// enclosing call to finishIfNeedToPollQuery.\nvar SwitchedToQuery = function () {};\nvar finishIfNeedToPollQuery = function (f) {\n return function () {\n try {\n f.apply(this, arguments);\n } catch (e) {\n if (!(e instanceof SwitchedToQuery))\n throw e;\n }\n };\n};\n\nvar currentId = 0;\n\n// OplogObserveDriver is an alternative to PollingObserveDriver which follows\n// the Mongo operation log instead of just re-polling the query. It obeys the\n// same simple interface: constructing it starts sending observeChanges\n// callbacks (and a ready() invocation) to the ObserveMultiplexer, and you stop\n// it by calling the stop() method.\nOplogObserveDriver = function (options) {\n var self = this;\n self._usesOplog = true; // tests look at this\n\n self._id = currentId;\n currentId++;\n\n self._cursorDescription = options.cursorDescription;\n self._mongoHandle = options.mongoHandle;\n self._multiplexer = options.multiplexer;\n\n if (options.ordered) {\n throw Error(\"OplogObserveDriver only supports unordered observeChanges\");\n }\n\n var sorter = options.sorter;\n // We don't support $near and other geo-queries so it's OK to initialize the\n // comparator only once in the constructor.\n var comparator = sorter && sorter.getComparator();\n\n if (options.cursorDescription.options.limit) {\n // There are several properties ordered driver implements:\n // - _limit is a positive number\n // - _comparator is a function-comparator by which the query is ordered\n // - _unpublishedBuffer is non-null Min/Max Heap,\n // the empty buffer in STEADY phase implies that the\n // everything that matches the queries selector fits\n // into published set.\n // - _published - Min Heap (also implements IdMap methods)\n\n var heapOptions = { IdMap: LocalCollection._IdMap };\n self._limit = self._cursorDescription.options.limit;\n self._comparator = comparator;\n self._sorter = sorter;\n self._unpublishedBuffer = new MinMaxHeap(comparator, heapOptions);\n // We need something that can find Max value in addition to IdMap interface\n self._published = new MaxHeap(comparator, heapOptions);\n } else {\n self._limit = 0;\n self._comparator = null;\n self._sorter = null;\n self._unpublishedBuffer = null;\n self._published = new LocalCollection._IdMap;\n }\n\n // Indicates if it is safe to insert a new document at the end of the buffer\n // for this query. i.e. it is known that there are no documents matching the\n // selector those are not in published or buffer.\n self._safeAppendToBuffer = false;\n\n self._stopped = false;\n self._stopHandles = [];\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-drivers-oplog\", 1);\n\n self._registerPhaseChange(PHASE.QUERYING);\n\n self._matcher = options.matcher;\n var projection = self._cursorDescription.options.fields || {};\n self._projectionFn = LocalCollection._compileProjection(projection);\n // Projection function, result of combining important fields for selector and\n // existing fields projection\n self._sharedProjection = self._matcher.combineIntoProjection(projection);\n if (sorter)\n self._sharedProjection = sorter.combineIntoProjection(self._sharedProjection);\n self._sharedProjectionFn = LocalCollection._compileProjection(\n self._sharedProjection);\n\n self._needToFetch = new LocalCollection._IdMap;\n self._currentlyFetching = null;\n self._fetchGeneration = 0;\n\n self._requeryWhenDoneThisQuery = false;\n self._writesToCommitWhenWeReachSteady = [];\n\n // If the oplog handle tells us that it skipped some entries (because it got\n // behind, say), re-poll.\n self._stopHandles.push(self._mongoHandle._oplogHandle.onSkippedEntries(\n finishIfNeedToPollQuery(function () {\n self._needToPollQuery();\n })\n ));\n\n forEachTrigger(self._cursorDescription, function (trigger) {\n self._stopHandles.push(self._mongoHandle._oplogHandle.onOplogEntry(\n trigger, function (notification) {\n Meteor._noYieldsAllowed(finishIfNeedToPollQuery(function () {\n var op = notification.op;\n if (notification.dropCollection || notification.dropDatabase) {\n // Note: this call is not allowed to block on anything (especially\n // on waiting for oplog entries to catch up) because that will block\n // onOplogEntry!\n self._needToPollQuery();\n } else {\n // All other operators should be handled depending on phase\n if (self._phase === PHASE.QUERYING) {\n self._handleOplogEntryQuerying(op);\n } else {\n self._handleOplogEntrySteadyOrFetching(op);\n }\n }\n }));\n }\n ));\n });\n\n // XXX ordering w.r.t. everything else?\n self._stopHandles.push(listenAll(\n self._cursorDescription, function (notification) {\n // If we're not in a pre-fire write fence, we don't have to do anything.\n var fence = DDPServer._CurrentWriteFence.get();\n if (!fence || fence.fired)\n return;\n\n if (fence._oplogObserveDrivers) {\n fence._oplogObserveDrivers[self._id] = self;\n return;\n }\n\n fence._oplogObserveDrivers = {};\n fence._oplogObserveDrivers[self._id] = self;\n\n fence.onBeforeFire(function () {\n var drivers = fence._oplogObserveDrivers;\n delete fence._oplogObserveDrivers;\n\n // This fence cannot fire until we've caught up to \"this point\" in the\n // oplog, and all observers made it back to the steady state.\n self._mongoHandle._oplogHandle.waitUntilCaughtUp();\n\n _.each(drivers, function (driver) {\n if (driver._stopped)\n return;\n\n var write = fence.beginWrite();\n if (driver._phase === PHASE.STEADY) {\n // Make sure that all of the callbacks have made it through the\n // multiplexer and been delivered to ObserveHandles before committing\n // writes.\n driver._multiplexer.onFlush(function () {\n write.committed();\n });\n } else {\n driver._writesToCommitWhenWeReachSteady.push(write);\n }\n });\n });\n }\n ));\n\n // When Mongo fails over, we need to repoll the query, in case we processed an\n // oplog entry that got rolled back.\n self._stopHandles.push(self._mongoHandle._onFailover(finishIfNeedToPollQuery(\n function () {\n self._needToPollQuery();\n })));\n\n // Give _observeChanges a chance to add the new ObserveHandle to our\n // multiplexer, so that the added calls get streamed.\n Meteor.defer(finishIfNeedToPollQuery(function () {\n self._runInitialQuery();\n }));\n};\n\n_.extend(OplogObserveDriver.prototype, {\n _addPublished: function (id, doc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var fields = _.clone(doc);\n delete fields._id;\n self._published.set(id, self._sharedProjectionFn(doc));\n self._multiplexer.added(id, self._projectionFn(fields));\n\n // After adding this document, the published set might be overflowed\n // (exceeding capacity specified by limit). If so, push the maximum\n // element to the buffer, we might want to save it in memory to reduce the\n // amount of Mongo lookups in the future.\n if (self._limit && self._published.size() > self._limit) {\n // XXX in theory the size of published is no more than limit+1\n if (self._published.size() !== self._limit + 1) {\n throw new Error(\"After adding to published, \" +\n (self._published.size() - self._limit) +\n \" documents are overflowing the set\");\n }\n\n var overflowingDocId = self._published.maxElementId();\n var overflowingDoc = self._published.get(overflowingDocId);\n\n if (EJSON.equals(overflowingDocId, id)) {\n throw new Error(\"The document just added is overflowing the published set\");\n }\n\n self._published.remove(overflowingDocId);\n self._multiplexer.removed(overflowingDocId);\n self._addBuffered(overflowingDocId, overflowingDoc);\n }\n });\n },\n _removePublished: function (id) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._published.remove(id);\n self._multiplexer.removed(id);\n if (! self._limit || self._published.size() === self._limit)\n return;\n\n if (self._published.size() > self._limit)\n throw Error(\"self._published got too big\");\n\n // OK, we are publishing less than the limit. Maybe we should look in the\n // buffer to find the next element past what we were publishing before.\n\n if (!self._unpublishedBuffer.empty()) {\n // There's something in the buffer; move the first thing in it to\n // _published.\n var newDocId = self._unpublishedBuffer.minElementId();\n var newDoc = self._unpublishedBuffer.get(newDocId);\n self._removeBuffered(newDocId);\n self._addPublished(newDocId, newDoc);\n return;\n }\n\n // There's nothing in the buffer. This could mean one of a few things.\n\n // (a) We could be in the middle of re-running the query (specifically, we\n // could be in _publishNewResults). In that case, _unpublishedBuffer is\n // empty because we clear it at the beginning of _publishNewResults. In\n // this case, our caller already knows the entire answer to the query and\n // we don't need to do anything fancy here. Just return.\n if (self._phase === PHASE.QUERYING)\n return;\n\n // (b) We're pretty confident that the union of _published and\n // _unpublishedBuffer contain all documents that match selector. Because\n // _unpublishedBuffer is empty, that means we're confident that _published\n // contains all documents that match selector. So we have nothing to do.\n if (self._safeAppendToBuffer)\n return;\n\n // (c) Maybe there are other documents out there that should be in our\n // buffer. But in that case, when we emptied _unpublishedBuffer in\n // _removeBuffered, we should have called _needToPollQuery, which will\n // either put something in _unpublishedBuffer or set _safeAppendToBuffer\n // (or both), and it will put us in QUERYING for that whole time. So in\n // fact, we shouldn't be able to get here.\n\n throw new Error(\"Buffer inexplicably empty\");\n });\n },\n _changePublished: function (id, oldDoc, newDoc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._published.set(id, self._sharedProjectionFn(newDoc));\n var projectedNew = self._projectionFn(newDoc);\n var projectedOld = self._projectionFn(oldDoc);\n var changed = DiffSequence.makeChangedFields(\n projectedNew, projectedOld);\n if (!_.isEmpty(changed))\n self._multiplexer.changed(id, changed);\n });\n },\n _addBuffered: function (id, doc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._unpublishedBuffer.set(id, self._sharedProjectionFn(doc));\n\n // If something is overflowing the buffer, we just remove it from cache\n if (self._unpublishedBuffer.size() > self._limit) {\n var maxBufferedId = self._unpublishedBuffer.maxElementId();\n\n self._unpublishedBuffer.remove(maxBufferedId);\n\n // Since something matching is removed from cache (both published set and\n // buffer), set flag to false\n self._safeAppendToBuffer = false;\n }\n });\n },\n // Is called either to remove the doc completely from matching set or to move\n // it to the published set later.\n _removeBuffered: function (id) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._unpublishedBuffer.remove(id);\n // To keep the contract \"buffer is never empty in STEADY phase unless the\n // everything matching fits into published\" true, we poll everything as\n // soon as we see the buffer becoming empty.\n if (! self._unpublishedBuffer.size() && ! self._safeAppendToBuffer)\n self._needToPollQuery();\n });\n },\n // Called when a document has joined the \"Matching\" results set.\n // Takes responsibility of keeping _unpublishedBuffer in sync with _published\n // and the effect of limit enforced.\n _addMatching: function (doc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var id = doc._id;\n if (self._published.has(id))\n throw Error(\"tried to add something already published \" + id);\n if (self._limit && self._unpublishedBuffer.has(id))\n throw Error(\"tried to add something already existed in buffer \" + id);\n\n var limit = self._limit;\n var comparator = self._comparator;\n var maxPublished = (limit && self._published.size() > 0) ?\n self._published.get(self._published.maxElementId()) : null;\n var maxBuffered = (limit && self._unpublishedBuffer.size() > 0)\n ? self._unpublishedBuffer.get(self._unpublishedBuffer.maxElementId())\n : null;\n // The query is unlimited or didn't publish enough documents yet or the\n // new document would fit into published set pushing the maximum element\n // out, then we need to publish the doc.\n var toPublish = ! limit || self._published.size() < limit ||\n comparator(doc, maxPublished) < 0;\n\n // Otherwise we might need to buffer it (only in case of limited query).\n // Buffering is allowed if the buffer is not filled up yet and all\n // matching docs are either in the published set or in the buffer.\n var canAppendToBuffer = !toPublish && self._safeAppendToBuffer &&\n self._unpublishedBuffer.size() < limit;\n\n // Or if it is small enough to be safely inserted to the middle or the\n // beginning of the buffer.\n var canInsertIntoBuffer = !toPublish && maxBuffered &&\n comparator(doc, maxBuffered) <= 0;\n\n var toBuffer = canAppendToBuffer || canInsertIntoBuffer;\n\n if (toPublish) {\n self._addPublished(id, doc);\n } else if (toBuffer) {\n self._addBuffered(id, doc);\n } else {\n // dropping it and not saving to the cache\n self._safeAppendToBuffer = false;\n }\n });\n },\n // Called when a document leaves the \"Matching\" results set.\n // Takes responsibility of keeping _unpublishedBuffer in sync with _published\n // and the effect of limit enforced.\n _removeMatching: function (id) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n if (! self._published.has(id) && ! self._limit)\n throw Error(\"tried to remove something matching but not cached \" + id);\n\n if (self._published.has(id)) {\n self._removePublished(id);\n } else if (self._unpublishedBuffer.has(id)) {\n self._removeBuffered(id);\n }\n });\n },\n _handleDoc: function (id, newDoc) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var matchesNow = newDoc && self._matcher.documentMatches(newDoc).result;\n\n var publishedBefore = self._published.has(id);\n var bufferedBefore = self._limit && self._unpublishedBuffer.has(id);\n var cachedBefore = publishedBefore || bufferedBefore;\n\n if (matchesNow && !cachedBefore) {\n self._addMatching(newDoc);\n } else if (cachedBefore && !matchesNow) {\n self._removeMatching(id);\n } else if (cachedBefore && matchesNow) {\n var oldDoc = self._published.get(id);\n var comparator = self._comparator;\n var minBuffered = self._limit && self._unpublishedBuffer.size() &&\n self._unpublishedBuffer.get(self._unpublishedBuffer.minElementId());\n var maxBuffered;\n\n if (publishedBefore) {\n // Unlimited case where the document stays in published once it\n // matches or the case when we don't have enough matching docs to\n // publish or the changed but matching doc will stay in published\n // anyways.\n //\n // XXX: We rely on the emptiness of buffer. Be sure to maintain the\n // fact that buffer can't be empty if there are matching documents not\n // published. Notably, we don't want to schedule repoll and continue\n // relying on this property.\n var staysInPublished = ! self._limit ||\n self._unpublishedBuffer.size() === 0 ||\n comparator(newDoc, minBuffered) <= 0;\n\n if (staysInPublished) {\n self._changePublished(id, oldDoc, newDoc);\n } else {\n // after the change doc doesn't stay in the published, remove it\n self._removePublished(id);\n // but it can move into buffered now, check it\n maxBuffered = self._unpublishedBuffer.get(\n self._unpublishedBuffer.maxElementId());\n\n var toBuffer = self._safeAppendToBuffer ||\n (maxBuffered && comparator(newDoc, maxBuffered) <= 0);\n\n if (toBuffer) {\n self._addBuffered(id, newDoc);\n } else {\n // Throw away from both published set and buffer\n self._safeAppendToBuffer = false;\n }\n }\n } else if (bufferedBefore) {\n oldDoc = self._unpublishedBuffer.get(id);\n // remove the old version manually instead of using _removeBuffered so\n // we don't trigger the querying immediately. if we end this block\n // with the buffer empty, we will need to trigger the query poll\n // manually too.\n self._unpublishedBuffer.remove(id);\n\n var maxPublished = self._published.get(\n self._published.maxElementId());\n maxBuffered = self._unpublishedBuffer.size() &&\n self._unpublishedBuffer.get(\n self._unpublishedBuffer.maxElementId());\n\n // the buffered doc was updated, it could move to published\n var toPublish = comparator(newDoc, maxPublished) < 0;\n\n // or stays in buffer even after the change\n var staysInBuffer = (! toPublish && self._safeAppendToBuffer) ||\n (!toPublish && maxBuffered &&\n comparator(newDoc, maxBuffered) <= 0);\n\n if (toPublish) {\n self._addPublished(id, newDoc);\n } else if (staysInBuffer) {\n // stays in buffer but changes\n self._unpublishedBuffer.set(id, newDoc);\n } else {\n // Throw away from both published set and buffer\n self._safeAppendToBuffer = false;\n // Normally this check would have been done in _removeBuffered but\n // we didn't use it, so we need to do it ourself now.\n if (! self._unpublishedBuffer.size()) {\n self._needToPollQuery();\n }\n }\n } else {\n throw new Error(\"cachedBefore implies either of publishedBefore or bufferedBefore is true.\");\n }\n }\n });\n },\n _fetchModifiedDocuments: function () {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._registerPhaseChange(PHASE.FETCHING);\n // Defer, because nothing called from the oplog entry handler may yield,\n // but fetch() yields.\n Meteor.defer(finishIfNeedToPollQuery(function () {\n while (!self._stopped && !self._needToFetch.empty()) {\n if (self._phase === PHASE.QUERYING) {\n // While fetching, we decided to go into QUERYING mode, and then we\n // saw another oplog entry, so _needToFetch is not empty. But we\n // shouldn't fetch these documents until AFTER the query is done.\n break;\n }\n\n // Being in steady phase here would be surprising.\n if (self._phase !== PHASE.FETCHING)\n throw new Error(\"phase in fetchModifiedDocuments: \" + self._phase);\n\n self._currentlyFetching = self._needToFetch;\n var thisGeneration = ++self._fetchGeneration;\n self._needToFetch = new LocalCollection._IdMap;\n var waiting = 0;\n var fut = new Future;\n // This loop is safe, because _currentlyFetching will not be updated\n // during this loop (in fact, it is never mutated).\n self._currentlyFetching.forEach(function (op, id) {\n waiting++;\n self._mongoHandle._docFetcher.fetch(\n self._cursorDescription.collectionName, id, op,\n finishIfNeedToPollQuery(function (err, doc) {\n try {\n if (err) {\n Meteor._debug(\"Got exception while fetching documents\",\n err);\n // If we get an error from the fetcher (eg, trouble\n // connecting to Mongo), let's just abandon the fetch phase\n // altogether and fall back to polling. It's not like we're\n // getting live updates anyway.\n if (self._phase !== PHASE.QUERYING) {\n self._needToPollQuery();\n }\n } else if (!self._stopped && self._phase === PHASE.FETCHING\n && self._fetchGeneration === thisGeneration) {\n // We re-check the generation in case we've had an explicit\n // _pollQuery call (eg, in another fiber) which should\n // effectively cancel this round of fetches. (_pollQuery\n // increments the generation.)\n self._handleDoc(id, doc);\n }\n } finally {\n waiting--;\n // Because fetch() never calls its callback synchronously,\n // this is safe (ie, we won't call fut.return() before the\n // forEach is done).\n if (waiting === 0)\n fut.return();\n }\n }));\n });\n fut.wait();\n // Exit now if we've had a _pollQuery call (here or in another fiber).\n if (self._phase === PHASE.QUERYING)\n return;\n self._currentlyFetching = null;\n }\n // We're done fetching, so we can be steady, unless we've had a\n // _pollQuery call (here or in another fiber).\n if (self._phase !== PHASE.QUERYING)\n self._beSteady();\n }));\n });\n },\n _beSteady: function () {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._registerPhaseChange(PHASE.STEADY);\n var writes = self._writesToCommitWhenWeReachSteady;\n self._writesToCommitWhenWeReachSteady = [];\n self._multiplexer.onFlush(function () {\n _.each(writes, function (w) {\n w.committed();\n });\n });\n });\n },\n _handleOplogEntryQuerying: function (op) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n self._needToFetch.set(idForOp(op), op);\n });\n },\n _handleOplogEntrySteadyOrFetching: function (op) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var id = idForOp(op);\n // If we're already fetching this one, or about to, we can't optimize;\n // make sure that we fetch it again if necessary.\n if (self._phase === PHASE.FETCHING &&\n ((self._currentlyFetching && self._currentlyFetching.has(id)) ||\n self._needToFetch.has(id))) {\n self._needToFetch.set(id, op);\n return;\n }\n\n if (op.op === 'd') {\n if (self._published.has(id) ||\n (self._limit && self._unpublishedBuffer.has(id)))\n self._removeMatching(id);\n } else if (op.op === 'i') {\n if (self._published.has(id))\n throw new Error(\"insert found for already-existing ID in published\");\n if (self._unpublishedBuffer && self._unpublishedBuffer.has(id))\n throw new Error(\"insert found for already-existing ID in buffer\");\n\n // XXX what if selector yields? for now it can't but later it could\n // have $where\n if (self._matcher.documentMatches(op.o).result)\n self._addMatching(op.o);\n } else if (op.op === 'u') {\n // we are mapping the new oplog format on mongo 5\n // to what we know better, $set\n op.o = oplogV2V1Converter(op.o)\n // Is this a modifier ($set/$unset, which may require us to poll the\n // database to figure out if the whole document matches the selector) or\n // a replacement (in which case we can just directly re-evaluate the\n // selector)?\n // oplog format has changed on mongodb 5, we have to support both now\n // diff is the format in Mongo 5+ (oplog v2)\n var isReplace = !_.has(op.o, '$set') && !_.has(op.o, 'diff') && !_.has(op.o, '$unset'); \n // If this modifier modifies something inside an EJSON custom type (ie,\n // anything with EJSON$), then we can't try to use\n // LocalCollection._modify, since that just mutates the EJSON encoding,\n // not the actual object.\n var canDirectlyModifyDoc =\n !isReplace && modifierCanBeDirectlyApplied(op.o);\n\n var publishedBefore = self._published.has(id);\n var bufferedBefore = self._limit && self._unpublishedBuffer.has(id);\n\n if (isReplace) {\n self._handleDoc(id, _.extend({_id: id}, op.o));\n } else if ((publishedBefore || bufferedBefore) &&\n canDirectlyModifyDoc) {\n // Oh great, we actually know what the document is, so we can apply\n // this directly.\n var newDoc = self._published.has(id)\n ? self._published.get(id) : self._unpublishedBuffer.get(id);\n newDoc = EJSON.clone(newDoc);\n\n newDoc._id = id;\n try {\n LocalCollection._modify(newDoc, op.o);\n } catch (e) {\n if (e.name !== \"MinimongoError\")\n throw e;\n // We didn't understand the modifier. Re-fetch.\n self._needToFetch.set(id, op);\n if (self._phase === PHASE.STEADY) {\n self._fetchModifiedDocuments();\n }\n return;\n }\n self._handleDoc(id, self._sharedProjectionFn(newDoc));\n } else if (!canDirectlyModifyDoc ||\n self._matcher.canBecomeTrueByModifier(op.o) ||\n (self._sorter && self._sorter.affectedByModifier(op.o))) {\n self._needToFetch.set(id, op);\n if (self._phase === PHASE.STEADY)\n self._fetchModifiedDocuments();\n }\n } else {\n throw Error(\"XXX SURPRISING OPERATION: \" + op);\n }\n });\n },\n // Yields!\n _runInitialQuery: function () {\n var self = this;\n if (self._stopped)\n throw new Error(\"oplog stopped surprisingly early\");\n\n self._runQuery({initial: true}); // yields\n\n if (self._stopped)\n return; // can happen on queryError\n\n // Allow observeChanges calls to return. (After this, it's possible for\n // stop() to be called.)\n self._multiplexer.ready();\n\n self._doneQuerying(); // yields\n },\n\n // In various circumstances, we may just want to stop processing the oplog and\n // re-run the initial query, just as if we were a PollingObserveDriver.\n //\n // This function may not block, because it is called from an oplog entry\n // handler.\n //\n // XXX We should call this when we detect that we've been in FETCHING for \"too\n // long\".\n //\n // XXX We should call this when we detect Mongo failover (since that might\n // mean that some of the oplog entries we have processed have been rolled\n // back). The Node Mongo driver is in the middle of a bunch of huge\n // refactorings, including the way that it notifies you when primary\n // changes. Will put off implementing this until driver 1.4 is out.\n _pollQuery: function () {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n if (self._stopped)\n return;\n\n // Yay, we get to forget about all the things we thought we had to fetch.\n self._needToFetch = new LocalCollection._IdMap;\n self._currentlyFetching = null;\n ++self._fetchGeneration; // ignore any in-flight fetches\n self._registerPhaseChange(PHASE.QUERYING);\n\n // Defer so that we don't yield. We don't need finishIfNeedToPollQuery\n // here because SwitchedToQuery is not thrown in QUERYING mode.\n Meteor.defer(function () {\n self._runQuery();\n self._doneQuerying();\n });\n });\n },\n\n // Yields!\n _runQuery: function (options) {\n var self = this;\n options = options || {};\n var newResults, newBuffer;\n\n // This while loop is just to retry failures.\n while (true) {\n // If we've been stopped, we don't have to run anything any more.\n if (self._stopped)\n return;\n\n newResults = new LocalCollection._IdMap;\n newBuffer = new LocalCollection._IdMap;\n\n // Query 2x documents as the half excluded from the original query will go\n // into unpublished buffer to reduce additional Mongo lookups in cases\n // when documents are removed from the published set and need a\n // replacement.\n // XXX needs more thought on non-zero skip\n // XXX 2 is a \"magic number\" meaning there is an extra chunk of docs for\n // buffer if such is needed.\n var cursor = self._cursorForQuery({ limit: self._limit * 2 });\n try {\n cursor.forEach(function (doc, i) { // yields\n if (!self._limit || i < self._limit) {\n newResults.set(doc._id, doc);\n } else {\n newBuffer.set(doc._id, doc);\n }\n });\n break;\n } catch (e) {\n if (options.initial && typeof(e.code) === 'number') {\n // This is an error document sent to us by mongod, not a connection\n // error generated by the client. And we've never seen this query work\n // successfully. Probably it's a bad selector or something, so we\n // should NOT retry. Instead, we should halt the observe (which ends\n // up calling `stop` on us).\n self._multiplexer.queryError(e);\n return;\n }\n\n // During failover (eg) if we get an exception we should log and retry\n // instead of crashing.\n Meteor._debug(\"Got exception while polling query\", e);\n Meteor._sleepForMs(100);\n }\n }\n\n if (self._stopped)\n return;\n\n self._publishNewResults(newResults, newBuffer);\n },\n\n // Transitions to QUERYING and runs another query, or (if already in QUERYING)\n // ensures that we will query again later.\n //\n // This function may not block, because it is called from an oplog entry\n // handler. However, if we were not already in the QUERYING phase, it throws\n // an exception that is caught by the closest surrounding\n // finishIfNeedToPollQuery call; this ensures that we don't continue running\n // close that was designed for another phase inside PHASE.QUERYING.\n //\n // (It's also necessary whenever logic in this file yields to check that other\n // phases haven't put us into QUERYING mode, though; eg,\n // _fetchModifiedDocuments does this.)\n _needToPollQuery: function () {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n if (self._stopped)\n return;\n\n // If we're not already in the middle of a query, we can query now\n // (possibly pausing FETCHING).\n if (self._phase !== PHASE.QUERYING) {\n self._pollQuery();\n throw new SwitchedToQuery;\n }\n\n // We're currently in QUERYING. Set a flag to ensure that we run another\n // query when we're done.\n self._requeryWhenDoneThisQuery = true;\n });\n },\n\n // Yields!\n _doneQuerying: function () {\n var self = this;\n\n if (self._stopped)\n return;\n self._mongoHandle._oplogHandle.waitUntilCaughtUp(); // yields\n if (self._stopped)\n return;\n if (self._phase !== PHASE.QUERYING)\n throw Error(\"Phase unexpectedly \" + self._phase);\n\n Meteor._noYieldsAllowed(function () {\n if (self._requeryWhenDoneThisQuery) {\n self._requeryWhenDoneThisQuery = false;\n self._pollQuery();\n } else if (self._needToFetch.empty()) {\n self._beSteady();\n } else {\n self._fetchModifiedDocuments();\n }\n });\n },\n\n _cursorForQuery: function (optionsOverwrite) {\n var self = this;\n return Meteor._noYieldsAllowed(function () {\n // The query we run is almost the same as the cursor we are observing,\n // with a few changes. We need to read all the fields that are relevant to\n // the selector, not just the fields we are going to publish (that's the\n // \"shared\" projection). And we don't want to apply any transform in the\n // cursor, because observeChanges shouldn't use the transform.\n var options = _.clone(self._cursorDescription.options);\n\n // Allow the caller to modify the options. Useful to specify different\n // skip and limit values.\n _.extend(options, optionsOverwrite);\n\n options.fields = self._sharedProjection;\n delete options.transform;\n // We are NOT deep cloning fields or selector here, which should be OK.\n var description = new CursorDescription(\n self._cursorDescription.collectionName,\n self._cursorDescription.selector,\n options);\n return new Cursor(self._mongoHandle, description);\n });\n },\n\n\n // Replace self._published with newResults (both are IdMaps), invoking observe\n // callbacks on the multiplexer.\n // Replace self._unpublishedBuffer with newBuffer.\n //\n // XXX This is very similar to LocalCollection._diffQueryUnorderedChanges. We\n // should really: (a) Unify IdMap and OrderedDict into Unordered/OrderedDict\n // (b) Rewrite diff.js to use these classes instead of arrays and objects.\n _publishNewResults: function (newResults, newBuffer) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n\n // If the query is limited and there is a buffer, shut down so it doesn't\n // stay in a way.\n if (self._limit) {\n self._unpublishedBuffer.clear();\n }\n\n // First remove anything that's gone. Be careful not to modify\n // self._published while iterating over it.\n var idsToRemove = [];\n self._published.forEach(function (doc, id) {\n if (!newResults.has(id))\n idsToRemove.push(id);\n });\n _.each(idsToRemove, function (id) {\n self._removePublished(id);\n });\n\n // Now do adds and changes.\n // If self has a buffer and limit, the new fetched result will be\n // limited correctly as the query has sort specifier.\n newResults.forEach(function (doc, id) {\n self._handleDoc(id, doc);\n });\n\n // Sanity-check that everything we tried to put into _published ended up\n // there.\n // XXX if this is slow, remove it later\n if (self._published.size() !== newResults.size()) {\n console.error('The Mongo server and the Meteor query disagree on how ' +\n 'many documents match your query. Cursor description: ',\n self._cursorDescription);\n throw Error(\n \"The Mongo server and the Meteor query disagree on how \" +\n \"many documents match your query. Maybe it is hitting a Mongo \" +\n \"edge case? The query is: \" +\n EJSON.stringify(self._cursorDescription.selector));\n }\n self._published.forEach(function (doc, id) {\n if (!newResults.has(id))\n throw Error(\"_published has a doc that newResults doesn't; \" + id);\n });\n\n // Finally, replace the buffer\n newBuffer.forEach(function (doc, id) {\n self._addBuffered(id, doc);\n });\n\n self._safeAppendToBuffer = newBuffer.size() < self._limit;\n });\n },\n\n // This stop function is invoked from the onStop of the ObserveMultiplexer, so\n // it shouldn't actually be possible to call it until the multiplexer is\n // ready.\n //\n // It's important to check self._stopped after every call in this file that\n // can yield!\n stop: function () {\n var self = this;\n if (self._stopped)\n return;\n self._stopped = true;\n _.each(self._stopHandles, function (handle) {\n handle.stop();\n });\n\n // Note: we *don't* use multiplexer.onFlush here because this stop\n // callback is actually invoked by the multiplexer itself when it has\n // determined that there are no handles left. So nothing is actually going\n // to get flushed (and it's probably not valid to call methods on the\n // dying multiplexer).\n _.each(self._writesToCommitWhenWeReachSteady, function (w) {\n w.committed(); // maybe yields?\n });\n self._writesToCommitWhenWeReachSteady = null;\n\n // Proactively drop references to potentially big things.\n self._published = null;\n self._unpublishedBuffer = null;\n self._needToFetch = null;\n self._currentlyFetching = null;\n self._oplogEntryHandle = null;\n self._listenersHandle = null;\n\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"observe-drivers-oplog\", -1);\n },\n\n _registerPhaseChange: function (phase) {\n var self = this;\n Meteor._noYieldsAllowed(function () {\n var now = new Date;\n\n if (self._phase) {\n var timeDiff = now - self._phaseStartTime;\n Package['facts-base'] && Package['facts-base'].Facts.incrementServerFact(\n \"mongo-livedata\", \"time-spent-in-\" + self._phase + \"-phase\", timeDiff);\n }\n\n self._phase = phase;\n self._phaseStartTime = now;\n });\n }\n});\n\n// Does our oplog tailing code support this cursor? For now, we are being very\n// conservative and allowing only simple queries with simple options.\n// (This is a \"static method\".)\nOplogObserveDriver.cursorSupported = function (cursorDescription, matcher) {\n // First, check the options.\n var options = cursorDescription.options;\n\n // Did the user say no explicitly?\n // underscored version of the option is COMPAT with 1.2\n if (options.disableOplog || options._disableOplog)\n return false;\n\n // skip is not supported: to support it we would need to keep track of all\n // \"skipped\" documents or at least their ids.\n // limit w/o a sort specifier is not supported: current implementation needs a\n // deterministic way to order documents.\n if (options.skip || (options.limit && !options.sort)) return false;\n\n // If a fields projection option is given check if it is supported by\n // minimongo (some operators are not supported).\n if (options.fields) {\n try {\n LocalCollection._checkSupportedProjection(options.fields);\n } catch (e) {\n if (e.name === \"MinimongoError\") {\n return false;\n } else {\n throw e;\n }\n }\n }\n\n // We don't allow the following selectors:\n // - $where (not confident that we provide the same JS environment\n // as Mongo, and can yield!)\n // - $near (has \"interesting\" properties in MongoDB, like the possibility\n // of returning an ID multiple times, though even polling maybe\n // have a bug there)\n // XXX: once we support it, we would need to think more on how we\n // initialize the comparators when we create the driver.\n return !matcher.hasWhere() && !matcher.hasGeoQuery();\n};\n\nvar modifierCanBeDirectlyApplied = function (modifier) {\n return _.all(modifier, function (fields, operation) {\n return _.all(fields, function (value, field) {\n return !/EJSON\\$/.test(field);\n });\n });\n};\n\nMongoInternals.OplogObserveDriver = OplogObserveDriver;\n","\n\nfunction join(prefix, key) {\n return prefix ? `${prefix}.${key}` : key;\n}\n\nconst arrayOperatorKeyRegex = /^(a|[su]\\d+)$/;\n\nfunction isArrayOperatorKey(field) {\n return arrayOperatorKeyRegex.test(field);\n}\n\nfunction isArrayOperator(operator) {\n return operator.a === true && Object.keys(operator).every(isArrayOperatorKey);\n}\n\nfunction flattenObjectInto(target, source, prefix) {\n if (Array.isArray(source) || typeof source !== 'object' || source === null ||\n source instanceof Mongo.ObjectID) {\n target[prefix] = source;\n } else {\n const entries = Object.entries(source);\n if (entries.length) {\n entries.forEach(([key, value]) => {\n flattenObjectInto(target, value, join(prefix, key));\n });\n } else {\n target[prefix] = source;\n }\n }\n}\n\nconst logDebugMessages = !!process.env.OPLOG_CONVERTER_DEBUG;\n\nfunction convertOplogDiff(oplogEntry, diff, prefix) {\n if (logDebugMessages) {\n console.log(`convertOplogDiff(${JSON.stringify(oplogEntry)}, ${JSON.stringify(diff)}, ${JSON.stringify(prefix)})`);\n }\n\n Object.entries(diff).forEach(([diffKey, value]) => {\n if (diffKey === 'd') {\n // Handle `$unset`s.\n if (oplogEntry.$unset === null || oplogEntry.$unset === undefined) {\n oplogEntry.$unset = {};\n }\n Object.keys(value).forEach(key => {\n oplogEntry.$unset[join(prefix, key)] = true;\n });\n } else if (diffKey === 'i') {\n // Handle (potentially) nested `$set`s.\n if (oplogEntry.$set === null || oplogEntry.$set === undefined) {\n oplogEntry.$set = {};\n }\n flattenObjectInto(oplogEntry.$set, value, prefix);\n } else if (diffKey === 'u') {\n // Handle flat `$set`s.\n if (oplogEntry.$set === null || oplogEntry.$set === undefined) {\n oplogEntry.$set = {};\n }\n Object.entries(value).forEach(([key, value]) => {\n oplogEntry.$set[join(prefix, key)] = value;\n });\n } else {\n // Handle s-fields.\n const key = diffKey.slice(1);\n if (isArrayOperator(value)) {\n // Array operator.\n Object.entries(value).forEach(([position, value]) => {\n if (position === 'a') {\n return;\n }\n\n const positionKey = join(join(prefix, key), position.slice(1));\n if (position[0] === 's') {\n convertOplogDiff(oplogEntry, value, positionKey);\n } else if (value === null) {\n if (oplogEntry.$unset === null || oplogEntry.$unset === undefined) {\n oplogEntry.$unset = {};\n }\n oplogEntry.$unset[positionKey] = true;\n } else {\n if (oplogEntry.$set === null || oplogEntry.$set === undefined) {\n oplogEntry.$set = {};\n }\n oplogEntry.$set[positionKey] = value;\n }\n });\n } else if (key) {\n // Nested object.\n convertOplogDiff(oplogEntry, value, join(prefix, key));\n }\n }\n });\n}\n\nexport function oplogV2V1Converter(oplogEntry) {\n // Pass-through v1 and (probably) invalid entries.\n if (oplogEntry.$v !== 2 || !oplogEntry.diff) {\n return oplogEntry;\n }\n\n const convertedOplogEntry = { $v: 2 };\n convertOplogDiff(convertedOplogEntry, oplogEntry.diff, '');\n return convertedOplogEntry;\n}","// singleton\nexport const LocalCollectionDriver = new (class LocalCollectionDriver {\n constructor() {\n this.noConnCollections = Object.create(null);\n }\n\n open(name, conn) {\n if (! name) {\n return new LocalCollection;\n }\n\n if (! conn) {\n return ensureCollection(name, this.noConnCollections);\n }\n\n if (! conn._mongo_livedata_collections) {\n conn._mongo_livedata_collections = Object.create(null);\n }\n\n // XXX is there a way to keep track of a connection's collections without\n // dangling it off the connection object?\n return ensureCollection(name, conn._mongo_livedata_collections);\n }\n});\n\nfunction ensureCollection(name, collections) {\n return (name in collections)\n ? collections[name]\n : collections[name] = new LocalCollection(name);\n}\n","MongoInternals.RemoteCollectionDriver = function (\n mongo_url, options) {\n var self = this;\n self.mongo = new MongoConnection(mongo_url, options);\n};\n\n_.extend(MongoInternals.RemoteCollectionDriver.prototype, {\n open: function (name) {\n var self = this;\n var ret = {};\n _.each(\n ['find', 'findOne', 'insert', 'update', 'upsert',\n 'remove', '_ensureIndex', '_dropIndex', '_createCappedCollection',\n 'dropCollection', 'rawCollection'],\n function (m) {\n ret[m] = _.bind(self.mongo[m], self.mongo, name);\n });\n return ret;\n }\n});\n\n\n// Create the singleton RemoteCollectionDriver only on demand, so we\n// only require Mongo configuration if it's actually used (eg, not if\n// you're only trying to receive data from a remote DDP server.)\nMongoInternals.defaultRemoteCollectionDriver = _.once(function () {\n var connectionOptions = {};\n\n var mongoUrl = process.env.MONGO_URL;\n\n if (process.env.MONGO_OPLOG_URL) {\n connectionOptions.oplogUrl = process.env.MONGO_OPLOG_URL;\n }\n\n if (! mongoUrl)\n throw new Error(\"MONGO_URL must be set in environment\");\n\n return new MongoInternals.RemoteCollectionDriver(mongoUrl, connectionOptions);\n});\n","// options.connection, if given, is a LivedataClient or LivedataServer\n// XXX presently there is no way to destroy/clean up a Collection\n\n/**\n * @summary Namespace for MongoDB-related items\n * @namespace\n */\nMongo = {};\n\n/**\n * @summary Constructor for a Collection\n * @locus Anywhere\n * @instancename collection\n * @class\n * @param {String} name The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.\n * @param {Object} [options]\n * @param {Object} options.connection The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling [`DDP.connect`](#ddp_connect) to specify a different server. Pass `null` to specify no connection. Unmanaged (`name` is null) collections cannot specify a connection.\n * @param {String} options.idGeneration The method of generating the `_id` fields of new documents in this collection. Possible values:\n\n - **`'STRING'`**: random strings\n - **`'MONGO'`**: random [`Mongo.ObjectID`](#mongo_object_id) values\n\nThe default id generation technique is `'STRING'`.\n * @param {Function} options.transform An optional transformation function. Documents will be passed through this function before being returned from `fetch` or `findOne`, and before being passed to callbacks of `observe`, `map`, `forEach`, `allow`, and `deny`. Transforms are *not* applied for the callbacks of `observeChanges` or to cursors returned from publish functions.\n * @param {Boolean} options.defineMutationMethods Set to `false` to skip setting up the mutation methods that enable insert/update/remove from client code. Default `true`.\n */\nMongo.Collection = function Collection(name, options) {\n if (!name && (name !== null)) {\n Meteor._debug(\"Warning: creating anonymous collection. It will not be \" +\n \"saved or synchronized over the network. (Pass null for \" +\n \"the collection name to turn off this warning.)\");\n name = null;\n }\n\n if (name !== null && typeof name !== \"string\") {\n throw new Error(\n \"First argument to new Mongo.Collection must be a string or null\");\n }\n\n if (options && options.methods) {\n // Backwards compatibility hack with original signature (which passed\n // \"connection\" directly instead of in options. (Connections must have a \"methods\"\n // method.)\n // XXX remove before 1.0\n options = {connection: options};\n }\n // Backwards compatibility: \"connection\" used to be called \"manager\".\n if (options && options.manager && !options.connection) {\n options.connection = options.manager;\n }\n\n options = {\n connection: undefined,\n idGeneration: 'STRING',\n transform: null,\n _driver: undefined,\n _preventAutopublish: false,\n ...options,\n };\n\n switch (options.idGeneration) {\n case 'MONGO':\n this._makeNewID = function () {\n var src = name ? DDP.randomStream('/collection/' + name) : Random.insecure;\n return new Mongo.ObjectID(src.hexString(24));\n };\n break;\n case 'STRING':\n default:\n this._makeNewID = function () {\n var src = name ? DDP.randomStream('/collection/' + name) : Random.insecure;\n return src.id();\n };\n break;\n }\n\n this._transform = LocalCollection.wrapTransform(options.transform);\n\n if (! name || options.connection === null)\n // note: nameless collections never have a connection\n this._connection = null;\n else if (options.connection)\n this._connection = options.connection;\n else if (Meteor.isClient)\n this._connection = Meteor.connection;\n else\n this._connection = Meteor.server;\n\n if (!options._driver) {\n // XXX This check assumes that webapp is loaded so that Meteor.server !==\n // null. We should fully support the case of \"want to use a Mongo-backed\n // collection from Node code without webapp\", but we don't yet.\n // #MeteorServerNull\n if (name && this._connection === Meteor.server &&\n typeof MongoInternals !== \"undefined\" &&\n MongoInternals.defaultRemoteCollectionDriver) {\n options._driver = MongoInternals.defaultRemoteCollectionDriver();\n } else {\n const { LocalCollectionDriver } =\n require(\"./local_collection_driver.js\");\n options._driver = LocalCollectionDriver;\n }\n }\n\n this._collection = options._driver.open(name, this._connection);\n this._name = name;\n this._driver = options._driver;\n\n this._maybeSetUpReplication(name, options);\n\n // XXX don't define these until allow or deny is actually used for this\n // collection. Could be hard if the security rules are only defined on the\n // server.\n if (options.defineMutationMethods !== false) {\n try {\n this._defineMutationMethods({\n useExisting: options._suppressSameNameError === true\n });\n } catch (error) {\n // Throw a more understandable error on the server for same collection name\n if (error.message === `A method named '/${name}/insert' is already defined`)\n throw new Error(`There is already a collection named \"${name}\"`);\n throw error;\n }\n }\n\n // autopublish\n if (Package.autopublish &&\n ! options._preventAutopublish &&\n this._connection &&\n this._connection.publish) {\n this._connection.publish(null, () => this.find(), {\n is_auto: true,\n });\n }\n};\n\nObject.assign(Mongo.Collection.prototype, {\n _maybeSetUpReplication(name, {\n _suppressSameNameError = false\n }) {\n const self = this;\n if (! (self._connection &&\n self._connection.registerStore)) {\n return;\n }\n\n // OK, we're going to be a slave, replicating some remote\n // database, except possibly with some temporary divergence while\n // we have unacknowledged RPC's.\n const ok = self._connection.registerStore(name, {\n // Called at the beginning of a batch of updates. batchSize is the number\n // of update calls to expect.\n //\n // XXX This interface is pretty janky. reset probably ought to go back to\n // being its own function, and callers shouldn't have to calculate\n // batchSize. The optimization of not calling pause/remove should be\n // delayed until later: the first call to update() should buffer its\n // message, and then we can either directly apply it at endUpdate time if\n // it was the only update, or do pauseObservers/apply/apply at the next\n // update() if there's another one.\n beginUpdate(batchSize, reset) {\n // pause observers so users don't see flicker when updating several\n // objects at once (including the post-reconnect reset-and-reapply\n // stage), and so that a re-sorting of a query can take advantage of the\n // full _diffQuery moved calculation instead of applying change one at a\n // time.\n if (batchSize > 1 || reset)\n self._collection.pauseObservers();\n\n if (reset)\n self._collection.remove({});\n },\n\n // Apply an update.\n // XXX better specify this interface (not in terms of a wire message)?\n update(msg) {\n if(Meteor.isClient){\n try {\n if(!msg){\n throw new Error(\"mongo update message is undefined. collection name is \" + self._name)\n }\n } catch (error) {\n console.error(error, msg)\n }\n }\n var mongoId = MongoID.idParse(msg.id);\n var doc = self._collection.findOne(mongoId);\n\n // Is this a \"replace the whole doc\" message coming from the quiescence\n // of method writes to an object? (Note that 'undefined' is a valid\n // value meaning \"remove it\".)\n if (msg.msg === 'replace') {\n var replace = msg.replace;\n if (!replace) {\n if (doc)\n self._collection.remove(mongoId);\n } else if (!doc) {\n self._collection.insert(replace);\n } else {\n // XXX check that replace has no $ ops\n self._collection.update(mongoId, replace);\n }\n return;\n } else if (msg.msg === 'added') {\n if (doc) {\n throw new Error(\"Expected not to find a document already present for an add\");\n }\n self._collection.insert({ _id: mongoId, ...msg.fields });\n } else if (msg.msg === 'removed') {\n if (!doc)\n throw new Error(\"Expected to find a document already present for removed\");\n self._collection.remove(mongoId);\n } else if (msg.msg === 'changed') {\n if (!doc)\n throw new Error(\"Expected to find a document to change\");\n const keys = Object.keys(msg.fields);\n if (keys.length > 0) {\n var modifier = {};\n keys.forEach(key => {\n const value = msg.fields[key];\n if (EJSON.equals(doc[key], value)) {\n return;\n }\n if (typeof value === \"undefined\") {\n if (!modifier.$unset) {\n modifier.$unset = {};\n }\n modifier.$unset[key] = 1;\n } else {\n if (!modifier.$set) {\n modifier.$set = {};\n }\n modifier.$set[key] = value;\n }\n });\n if (Object.keys(modifier).length > 0) {\n self._collection.update(mongoId, modifier);\n }\n }\n } else {\n throw new Error(\"I don't know how to deal with this message\");\n }\n },\n\n // Called at the end of a batch of updates.\n endUpdate() {\n self._collection.resumeObservers();\n },\n\n // Called around method stub invocations to capture the original versions\n // of modified documents.\n saveOriginals() {\n self._collection.saveOriginals();\n },\n retrieveOriginals() {\n return self._collection.retrieveOriginals();\n },\n\n // Used to preserve current versions of documents across a store reset.\n getDoc(id) {\n return self.findOne(id);\n },\n\n // To be able to get back to the collection from the store.\n _getCollection() {\n return self;\n }\n });\n\n if (! ok) {\n const message = `There is already a collection named \"${name}\"`;\n if (_suppressSameNameError === true) {\n // XXX In theory we do not have to throw when `ok` is falsy. The\n // store is already defined for this collection name, but this\n // will simply be another reference to it and everything should\n // work. However, we have historically thrown an error here, so\n // for now we will skip the error only when _suppressSameNameError\n // is `true`, allowing people to opt in and give this some real\n // world testing.\n console.warn ? console.warn(message) : console.log(message);\n } else {\n throw new Error(message);\n }\n }\n },\n\n ///\n /// Main collection API\n ///\n\n _getFindSelector(args) {\n if (args.length == 0)\n return {};\n else\n return args[0];\n },\n\n _getFindOptions(args) {\n var self = this;\n if (args.length < 2) {\n return { transform: self._transform };\n } else {\n check(args[1], Match.Optional(Match.ObjectIncluding({\n fields: Match.Optional(Match.OneOf(Object, undefined)),\n sort: Match.Optional(Match.OneOf(Object, Array, Function, undefined)),\n limit: Match.Optional(Match.OneOf(Number, undefined)),\n skip: Match.Optional(Match.OneOf(Number, undefined))\n })));\n\n return {\n transform: self._transform,\n ...args[1],\n };\n }\n },\n\n /**\n * @summary Find the documents in a collection that match the selector.\n * @locus Anywhere\n * @method find\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} [selector] A query describing the documents to find\n * @param {Object} [options]\n * @param {MongoSortSpecifier} options.sort Sort order (default: natural order)\n * @param {Number} options.skip Number of results to skip at the beginning\n * @param {Number} options.limit Maximum number of results to return\n * @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.\n * @param {Boolean} options.reactive (Client only) Default `true`; pass `false` to disable reactivity\n * @param {Function} options.transform Overrides `transform` on the [`Collection`](#collections) for this cursor. Pass `null` to disable transformation.\n * @param {Boolean} options.disableOplog (Server only) Pass true to disable oplog-tailing on this query. This affects the way server processes calls to `observe` on this query. Disabling the oplog can be useful when working with data that updates in large batches.\n * @param {Number} options.pollingIntervalMs (Server only) When oplog is disabled (through the use of `disableOplog` or when otherwise not available), the frequency (in milliseconds) of how often to poll this query when observing on the server. Defaults to 10000ms (10 seconds).\n * @param {Number} options.pollingThrottleMs (Server only) When oplog is disabled (through the use of `disableOplog` or when otherwise not available), the minimum time (in milliseconds) to allow between re-polling when observing on the server. Increasing this will save CPU and mongo load at the expense of slower updates to users. Decreasing this is not recommended. Defaults to 50ms.\n * @param {Number} options.maxTimeMs (Server only) If set, instructs MongoDB to set a time limit for this cursor's operations. If the operation reaches the specified time limit (in milliseconds) without the having been completed, an exception will be thrown. Useful to prevent an (accidental or malicious) unoptimized query from causing a full collection scan that would disrupt other database users, at the expense of needing to handle the resulting error.\n * @param {String|Object} options.hint (Server only) Overrides MongoDB's default index selection and query optimization process. Specify an index to force its use, either by its name or index specification. You can also specify `{ $natural : 1 }` to force a forwards collection scan, or `{ $natural : -1 }` for a reverse collection scan. Setting this is only recommended for advanced users.\n * @returns {Mongo.Cursor}\n */\n find(...args) {\n // Collection.find() (return all docs) behaves differently\n // from Collection.find(undefined) (return 0 docs). so be\n // careful about the length of arguments.\n return this._collection.find(\n this._getFindSelector(args),\n this._getFindOptions(args)\n );\n },\n\n /**\n * @summary Finds the first document that matches the selector, as ordered by sort and skip options. Returns `undefined` if no matching document is found.\n * @locus Anywhere\n * @method findOne\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} [selector] A query describing the documents to find\n * @param {Object} [options]\n * @param {MongoSortSpecifier} options.sort Sort order (default: natural order)\n * @param {Number} options.skip Number of results to skip at the beginning\n * @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.\n * @param {Boolean} options.reactive (Client only) Default true; pass false to disable reactivity\n * @param {Function} options.transform Overrides `transform` on the [`Collection`](#collections) for this cursor. Pass `null` to disable transformation.\n * @returns {Object}\n */\n findOne(...args) {\n return this._collection.findOne(\n this._getFindSelector(args),\n this._getFindOptions(args)\n );\n }\n});\n\nObject.assign(Mongo.Collection, {\n _publishCursor(cursor, sub, collection) {\n var observeHandle = cursor.observeChanges({\n added: function (id, fields) {\n sub.added(collection, id, fields);\n },\n changed: function (id, fields) {\n sub.changed(collection, id, fields);\n },\n removed: function (id) {\n sub.removed(collection, id);\n }\n });\n\n // We don't call sub.ready() here: it gets called in livedata_server, after\n // possibly calling _publishCursor on multiple returned cursors.\n\n // register stop callback (expects lambda w/ no args).\n sub.onStop(function () {\n observeHandle.stop();\n });\n\n // return the observeHandle in case it needs to be stopped early\n return observeHandle;\n },\n\n // protect against dangerous selectors. falsey and {_id: falsey} are both\n // likely programmer error, and not what you want, particularly for destructive\n // operations. If a falsey _id is sent in, a new string _id will be\n // generated and returned; if a fallbackId is provided, it will be returned\n // instead.\n _rewriteSelector(selector, { fallbackId } = {}) {\n // shorthand -- scalars match _id\n if (LocalCollection._selectorIsId(selector))\n selector = {_id: selector};\n\n if (Array.isArray(selector)) {\n // This is consistent with the Mongo console itself; if we don't do this\n // check passing an empty array ends up selecting all items\n throw new Error(\"Mongo selector can't be an array.\");\n }\n\n if (!selector || (('_id' in selector) && !selector._id)) {\n // can't match anything\n return { _id: fallbackId || Random.id() };\n }\n\n return selector;\n }\n});\n\nObject.assign(Mongo.Collection.prototype, {\n // 'insert' immediately returns the inserted document's new _id.\n // The others return values immediately if you are in a stub, an in-memory\n // unmanaged collection, or a mongo-backed collection and you don't pass a\n // callback. 'update' and 'remove' return the number of affected\n // documents. 'upsert' returns an object with keys 'numberAffected' and, if an\n // insert happened, 'insertedId'.\n //\n // Otherwise, the semantics are exactly like other methods: they take\n // a callback as an optional last argument; if no callback is\n // provided, they block until the operation is complete, and throw an\n // exception if it fails; if a callback is provided, then they don't\n // necessarily block, and they call the callback when they finish with error and\n // result arguments. (The insert method provides the document ID as its result;\n // update and remove provide the number of affected docs as the result; upsert\n // provides an object with numberAffected and maybe insertedId.)\n //\n // On the client, blocking is impossible, so if a callback\n // isn't provided, they just return immediately and any error\n // information is lost.\n //\n // There's one more tweak. On the client, if you don't provide a\n // callback, then if there is an error, a message will be logged with\n // Meteor._debug.\n //\n // The intent (though this is actually determined by the underlying\n // drivers) is that the operations should be done synchronously, not\n // generating their result until the database has acknowledged\n // them. In the future maybe we should provide a flag to turn this\n // off.\n\n /**\n * @summary Insert a document in the collection. Returns its unique _id.\n * @locus Anywhere\n * @method insert\n * @memberof Mongo.Collection\n * @instance\n * @param {Object} doc The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.\n * @param {Function} [callback] Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.\n */\n insert(doc, callback) {\n // Make sure we were passed a document to insert\n if (!doc) {\n throw new Error(\"insert requires an argument\");\n }\n\n // Make a shallow clone of the document, preserving its prototype.\n doc = Object.create(\n Object.getPrototypeOf(doc),\n Object.getOwnPropertyDescriptors(doc)\n );\n\n if ('_id' in doc) {\n if (! doc._id ||\n ! (typeof doc._id === 'string' ||\n doc._id instanceof Mongo.ObjectID)) {\n throw new Error(\n \"Meteor requires document _id fields to be non-empty strings or ObjectIDs\");\n }\n } else {\n let generateId = true;\n\n // Don't generate the id if we're the client and the 'outermost' call\n // This optimization saves us passing both the randomSeed and the id\n // Passing both is redundant.\n if (this._isRemoteCollection()) {\n const enclosing = DDP._CurrentMethodInvocation.get();\n if (!enclosing) {\n generateId = false;\n }\n }\n\n if (generateId) {\n doc._id = this._makeNewID();\n }\n }\n\n // On inserts, always return the id that we generated; on all other\n // operations, just return the result from the collection.\n var chooseReturnValueFromCollectionResult = function (result) {\n if (doc._id) {\n return doc._id;\n }\n\n // XXX what is this for??\n // It's some iteraction between the callback to _callMutatorMethod and\n // the return value conversion\n doc._id = result;\n\n return result;\n };\n\n const wrappedCallback = wrapCallback(\n callback, chooseReturnValueFromCollectionResult);\n\n if (this._isRemoteCollection()) {\n const result = this._callMutatorMethod(\"insert\", [doc], wrappedCallback);\n return chooseReturnValueFromCollectionResult(result);\n }\n\n // it's my collection. descend into the collection object\n // and propagate any exception.\n try {\n // If the user provided a callback and the collection implements this\n // operation asynchronously, then queryRet will be undefined, and the\n // result will be returned through the callback instead.\n const result = this._collection.insert(doc, wrappedCallback);\n return chooseReturnValueFromCollectionResult(result);\n } catch (e) {\n if (callback) {\n callback(e);\n return null;\n }\n throw e;\n }\n },\n\n /**\n * @summary Modify one or more documents in the collection. Returns the number of matched documents.\n * @locus Anywhere\n * @method update\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} selector Specifies which documents to modify\n * @param {MongoModifier} modifier Specifies how to modify the documents\n * @param {Object} [options]\n * @param {Boolean} options.multi True to modify all matching documents; false to only modify one of the matching documents (the default).\n * @param {Boolean} options.upsert True to insert a document if no matching documents are found.\n * @param {Function} [callback] Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.\n */\n update(selector, modifier, ...optionsAndCallback) {\n const callback = popCallbackFromArgs(optionsAndCallback);\n\n // We've already popped off the callback, so we are left with an array\n // of one or zero items\n const options = { ...(optionsAndCallback[0] || null) };\n let insertedId;\n if (options && options.upsert) {\n // set `insertedId` if absent. `insertedId` is a Meteor extension.\n if (options.insertedId) {\n if (!(typeof options.insertedId === 'string' || options.insertedId instanceof Mongo.ObjectID))\n throw new Error(\"insertedId must be string or ObjectID\");\n insertedId = options.insertedId;\n } else if (!selector || !selector._id) {\n insertedId = this._makeNewID();\n options.generatedId = true;\n options.insertedId = insertedId;\n }\n }\n\n selector =\n Mongo.Collection._rewriteSelector(selector, { fallbackId: insertedId });\n\n const wrappedCallback = wrapCallback(callback);\n\n if (this._isRemoteCollection()) {\n const args = [\n selector,\n modifier,\n options\n ];\n\n return this._callMutatorMethod(\"update\", args, wrappedCallback);\n }\n\n // it's my collection. descend into the collection object\n // and propagate any exception.\n try {\n // If the user provided a callback and the collection implements this\n // operation asynchronously, then queryRet will be undefined, and the\n // result will be returned through the callback instead.\n return this._collection.update(\n selector, modifier, options, wrappedCallback);\n } catch (e) {\n if (callback) {\n callback(e);\n return null;\n }\n throw e;\n }\n },\n\n /**\n * @summary Remove documents from the collection\n * @locus Anywhere\n * @method remove\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} selector Specifies which documents to remove\n * @param {Function} [callback] Optional. If present, called with an error object as its argument.\n */\n remove(selector, callback) {\n selector = Mongo.Collection._rewriteSelector(selector);\n\n const wrappedCallback = wrapCallback(callback);\n\n if (this._isRemoteCollection()) {\n return this._callMutatorMethod(\"remove\", [selector], wrappedCallback);\n }\n\n // it's my collection. descend into the collection object\n // and propagate any exception.\n try {\n // If the user provided a callback and the collection implements this\n // operation asynchronously, then queryRet will be undefined, and the\n // result will be returned through the callback instead.\n return this._collection.remove(selector, wrappedCallback);\n } catch (e) {\n if (callback) {\n callback(e);\n return null;\n }\n throw e;\n }\n },\n\n // Determine if this collection is simply a minimongo representation of a real\n // database on another server\n _isRemoteCollection() {\n // XXX see #MeteorServerNull\n return this._connection && this._connection !== Meteor.server;\n },\n\n /**\n * @summary Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and `insertedId` (the unique _id of the document that was inserted, if any).\n * @locus Anywhere\n * @method upsert\n * @memberof Mongo.Collection\n * @instance\n * @param {MongoSelector} selector Specifies which documents to modify\n * @param {MongoModifier} modifier Specifies how to modify the documents\n * @param {Object} [options]\n * @param {Boolean} options.multi True to modify all matching documents; false to only modify one of the matching documents (the default).\n * @param {Function} [callback] Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.\n */\n upsert(selector, modifier, options, callback) {\n if (! callback && typeof options === \"function\") {\n callback = options;\n options = {};\n }\n\n return this.update(selector, modifier, {\n ...options,\n _returnObject: true,\n upsert: true,\n }, callback);\n },\n\n // We'll actually design an index API later. For now, we just pass through to\n // Mongo's, but make it synchronous.\n _ensureIndex(index, options) {\n var self = this;\n if (!self._collection._ensureIndex)\n throw new Error(\"Can only call _ensureIndex on server collections\");\n self._collection._ensureIndex(index, options);\n },\n\n _dropIndex(index) {\n var self = this;\n if (!self._collection._dropIndex)\n throw new Error(\"Can only call _dropIndex on server collections\");\n self._collection._dropIndex(index);\n },\n\n _dropCollection() {\n var self = this;\n if (!self._collection.dropCollection)\n throw new Error(\"Can only call _dropCollection on server collections\");\n self._collection.dropCollection();\n },\n\n _createCappedCollection(byteSize, maxDocuments) {\n var self = this;\n if (!self._collection._createCappedCollection)\n throw new Error(\"Can only call _createCappedCollection on server collections\");\n self._collection._createCappedCollection(byteSize, maxDocuments);\n },\n\n /**\n * @summary Returns the [`Collection`](http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html) object corresponding to this collection from the [npm `mongodb` driver module](https://www.npmjs.com/package/mongodb) which is wrapped by `Mongo.Collection`.\n * @locus Server\n * @memberof Mongo.Collection\n * @instance\n */\n rawCollection() {\n var self = this;\n if (! self._collection.rawCollection) {\n throw new Error(\"Can only call rawCollection on server collections\");\n }\n return self._collection.rawCollection();\n },\n\n /**\n * @summary Returns the [`Db`](http://mongodb.github.io/node-mongodb-native/3.0/api/Db.html) object corresponding to this collection's database connection from the [npm `mongodb` driver module](https://www.npmjs.com/package/mongodb) which is wrapped by `Mongo.Collection`.\n * @locus Server\n * @memberof Mongo.Collection\n * @instance\n */\n rawDatabase() {\n var self = this;\n if (! (self._driver.mongo && self._driver.mongo.db)) {\n throw new Error(\"Can only call rawDatabase on server collections\");\n }\n return self._driver.mongo.db;\n }\n});\n\n// Convert the callback to not return a result if there is an error\nfunction wrapCallback(callback, convertResult) {\n return callback && function (error, result) {\n if (error) {\n callback(error);\n } else if (typeof convertResult === \"function\") {\n callback(error, convertResult(result));\n } else {\n callback(error, result);\n }\n };\n}\n\n/**\n * @summary Create a Mongo-style `ObjectID`. If you don't specify a `hexString`, the `ObjectID` will generated randomly (not using MongoDB's ID construction rules).\n * @locus Anywhere\n * @class\n * @param {String} [hexString] Optional. The 24-character hexadecimal contents of the ObjectID to create\n */\nMongo.ObjectID = MongoID.ObjectID;\n\n/**\n * @summary To create a cursor, use find. To access the documents in a cursor, use forEach, map, or fetch.\n * @class\n * @instanceName cursor\n */\nMongo.Cursor = LocalCollection.Cursor;\n\n/**\n * @deprecated in 0.9.1\n */\nMongo.Collection.Cursor = Mongo.Cursor;\n\n/**\n * @deprecated in 0.9.1\n */\nMongo.Collection.ObjectID = Mongo.ObjectID;\n\n/**\n * @deprecated in 0.9.1\n */\nMeteor.Collection = Mongo.Collection;\n\n// Allow deny stuff is now in the allow-deny package\nObject.assign(\n Meteor.Collection.prototype,\n AllowDeny.CollectionPrototype\n);\n\nfunction popCallbackFromArgs(args) {\n // Pull off any callback (or perhaps a 'callback' variable that was passed\n // in undefined, like how 'upsert' does it).\n if (args.length &&\n (args[args.length - 1] === undefined ||\n args[args.length - 1] instanceof Function)) {\n return args.pop();\n }\n}\n","/**\n * @summary Allows for user specified connection options\n * @example http://mongodb.github.io/node-mongodb-native/3.0/reference/connecting/connection-settings/\n * @locus Server\n * @param {Object} options User specified Mongo connection options\n */\nMongo.setConnectionOptions = function setConnectionOptions (options) {\n check(options, Object);\n Mongo._connectionOptions = options;\n};"]} \ No newline at end of file diff --git a/server/bundle/programs/web.browser.legacy/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js b/server/bundle/programs/web.browser.legacy/6bff06e054ac5205945d97d558e533dad0a6378f.js similarity index 96% rename from server/bundle/programs/web.browser.legacy/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js rename to server/bundle/programs/web.browser.legacy/6bff06e054ac5205945d97d558e533dad0a6378f.js index 0576ed0031..be623facf7 100644 --- a/server/bundle/programs/web.browser.legacy/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js +++ b/server/bundle/programs/web.browser.legacy/6bff06e054ac5205945d97d558e533dad0a6378f.js @@ -68,7 +68,7 @@ object-assign * Copyright 2011-2019 Twitter, Inc. * Licensed under the MIT license */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this,i;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(r).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};function r(t){return this.each((function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var r=e(this),i=r.attr("data-target");i||(i=(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function s(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s())};var i=e.fn.alert;e.fn.alert=r,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.isLoading=!1};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.button"),o="object"==typeof n&&n;i||r.data("bs.button",i=new t(this,o)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",o=r.data();t+="Text",null==o.resetText&&r.data("resetText",r[i]()),setTimeout(e.proxy((function(){r[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var r=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var r=e(t.target).closest(".btn");n.call(r,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.carousel"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n),s="string"==typeof n?n:o.slide;i||r.data("bs.carousel",i=new t(this,o)),"number"==typeof n?i.to(n):s?i[s]():o.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),r;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var i,o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,r){var i=this.$element.find(".item.active"),o=r||this.getItemForDirection(n,i),s=this.interval,a="next"==n?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var f=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:f,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=e(this.$indicators.children()[this.getItemIndex(o)]);l&&l.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:f,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(a),o.addClass(a),i.one("bsTransitionEnd",(function(){o.removeClass([n,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var r=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this};var i=function(t){var r=e(this),i=r.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=r.attr("data-target")||i,s=e(document).find(o);if(s.hasClass("carousel")){var a=e.extend({},s.data(),r.data()),u=r.attr("data-slide-to");u&&(a.interval=!1),n.call(s,a),u&&s.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(r)}function r(n){return this.each((function(){var r=e(this),i=r.data("bs.collapse"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);!i&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),i||r.data("bs.collapse",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(r.call(i,"hide"),n||i.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var u=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[s](this.$element[0][u])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var r=this.dimension();this.$element[r](this.$element[r]())[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 i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[r](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,r){var i=e(r);this.addAriaAndCollapsedClass(n(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=e.fn.collapse;e.fn.collapse=r,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=n(i),s,a=o.data("bs.collapse")?"toggle":i.data();r.call(o,a)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?e(document).find(n):null;return r&&r.length?r:t.parent()}function o(r){r&&3===r.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=i(t),o={relatedTarget:this};n.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&e.contains(n[0],r.target)||(n.trigger(r=e.Event("hide.bs.dropdown",o)),r.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function s(t){return this.each((function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",a)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+a);if(u.length){var f=u.index(t.target);38==t.which&&f>0&&f--,40==t.which&&fdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},f.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&e(document).find(e.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 i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},f.prototype.getDefaults=function(){return f.DEFAULTS},f.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete r[i];return(n=e.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=u(n.template,n.whiteList,n.sanitizeFn)),n},f.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,r){n[e]!=r&&(t[e]=r)})),t},f.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},f.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},f.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},f.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=i[0].offsetWidth,h=i[0].offsetHeight;if(u){var d=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-hp.width?"left":"left"==s&&c.left-ls.top+s.height&&(i.top=s.top+s.height-u)}else{var f=t.left-o,c=t.left+o+n;fs.right&&(i.left=s.left+s.width-c)}return i},f.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},f.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},f.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(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},f.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},f.prototype.enable=function(){this.enabled=!0},f.prototype.disable=function(){this.enabled=!1},f.prototype.toggleEnabled=function(){this.enabled=!this.enabled},f.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},f.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},f.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=c,e.fn.tooltip.Constructor=f,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function n(n){return this.each((function(){var r=e(this),i=r.data("bs.popover"),o="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||r.data("bs.popover",i=new t(this,o)),"string"==typeof n&&i[n]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var r=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(jQuery),function(e){"use strict";function t(n,r){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var r=e(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[n]().top+r,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),n=this.options.offset+t-this.$scrollElement.height(),r=this.offsets,i=this.targets,o=this.activeTarget,s;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(s=i[i.length-1])&&this.activate(s);if(o&&e=r[s]&&(void 0===r[s+1]||e .active"),s=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!r.find("> .fade").length);function a(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&s?o.one("bsTransitionEnd",a).emulateTransitionEnd(t.TRANSITION_DURATION):a(),o.removeClass("in")};var r=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=r,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i=e-r&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),f=e.Event(u+".bs.affix");if(this.$element.trigger(f),f.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),r=t.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(t,r)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,r,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),s=t("path"),a=t("detect-libc");Math.random();var u=s.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+a.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(c){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(c.stack||c.message||c),new Error("Missing binary. See message above.")}f(e.exports)}function f(e){try{var t=process.binding("async_wrap"),n;if(t.asyncIdStackSize instanceof Function)n=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");l=t.constants.kStackLength,n=function(){return t.async_hook_fields[l]}}var r=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,s;if(!r||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,s=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var a=t.async_id_fields||t.async_uid_fields;function u(){for(var e=n(),t=new Array(e);e>0;--e){var i=a[o];t[e-1]={asyncId:i,triggerId:a[s]},r(i)}return t}function f(e){for(var t=0;t0)i.changeLanguage(e,r);else if(0!=a[u]){a[u]=0;var f=new XMLHttpRequest;f.overrideMimeType("application/json"),f.open("GET",u,!1),f.send(null),200===f.status?a[u]=1:a[u]=-1,n.addResourceBundle(e,s,JSON.parse(f.response)||{}),i.changeLanguage(e,r)}};n.changeLanguage=p;var g=function(e,t,n){return i.format(e,t,n)};n.format=g;var b=function(){return i.languages};n.getLanguages=b;var m=function(e,t){return i.loadLanguages(e,t)};n.loadLanguages=m;var v=function(e,t){return i.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};n.on=y;var _=function(e,t){return i.off(e,t)};n.off=_,r.__exportStar(t("./i18n/i18n"),n),r.__exportStar(t("./i18n/i18n.app"),n),r.__exportStar(t("./translations"),n)},i18n:{"i18n.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fallbackKeys=n.getObjectI18nTemplate=n.translationI18nObjects=n.addObjectsI18n=n.translationI18nObject=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="_",a="base",u="core",f="translation",c=function(e,t){var n={lng:t,ns:f};if((0,r.exists)(e,n))return(0,r._t)(e,n)},l=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},d=function(e,t){var n=h(e,t);return"".concat(n).concat("_","inlineHelpText")},p=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(n)},g=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},b=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},m=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,n){var r=l(t);return c(r,e)||n||""},_=function(e,t,n,r,i){var o=h(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=_(e,a,n,r,i))}return s||r||""},w=function(e,t,n,r,i){var o=d(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=w(e,a,n,r,i))}return s||r||""},k=function(e,t,n,r){var i=p(t,n);return c(i,e)||r||""},j=function(e,t,n,r,i,o){var s=g(t,n,r),a=c(s,e);if(!a){var u=v(o);u&&"base"!=t&&"core"!=t&&(a=j(e,u,n,r,i,o))}return a||i||""},x=function(e,t,n,r,i){var o=b(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=x(e,a,n,r,i))}return s||r||""},S=function(e,t,n,r,i){var o=m(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=S(e,a,n,r,i))}return s||r||""},D=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},E=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},A=function(e,t,n){n.label=y(e,t,n.label),i.each(n.fields,(function(r,o){if(r.label=_(e,t,o,r.label,n.datasource),r.inlineHelpText&&(r.inlineHelpText=w(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(r.group=k(e,t,r.group,r.group)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var a=j(e,t,o,r.value,r.label,n.datasource);s.push(i.extend({},r,{label:a}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=x(e,t,i,r.label,n.datasource)})),i.each(n.list_views,(function(r,i){r.label=S(e,t,i,r.label,n.datasource)}))};n.translationI18nObject=A;var C=function(e){i.each(e,(function(e){(0,r.addResourceBundle)(e.lng,f,e.data,!0,!0)}))};n.addObjectsI18n=C;var M=function(e,t){i.each(t,(function(t,r){(0,n.translationI18nObject)(e,r,t)}))};n.translationI18nObjects=M;var O=function(e,t,n){var r=o(n);E(r);var s={};return s[l(t)]=y(e,t,r.label),i.each(r.fields,(function(n,o){s[h(t,o)]=_(e,t,o,n.label),n.inlineHelpText&&(s[d(t,o)]=w(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(s[p(t,n.group)]=k(e,t,n.group,n.group)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[g(t,o,n.value)]=j(e,t,o,n.value,n.label))}))})),i.each(r.actions,(function(n,r){s[b(t,r)]=x(e,t,r,n.label)})),i.each(r.list_views,(function(n,r){s[m(t,r)]=S(e,t,r,n.label)})),s};n.getObjectI18nTemplate=O,n.fallbackKeys={getObjectLabelKey:l,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:d,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:g,getObjectActionLabelKey:b,getObjectListviewLabelKey:m}},"i18n.app.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.appFallbackKeys=n.getAppI18nTemplate=n.translationI18nApps=n.translationI18nMenus=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="translation",a="_",u=function(e,t){var n={lng:t,ns:s};if((0,r.exists)(e,n))return(0,r._t)(e,n)},f=function(e){return"app".concat("_").concat(e).concat("_","name")},c=function(e){return"app".concat("_").concat(e).concat("_","description")},l=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(n)},h=function(e){return"menu".concat("_").concat(e)},d=function(e){return"tab".concat("_").concat(e)},p=function(e,t,n){var r=f(t);return u(r,e)||n||""},g=function(e,t,n){var r=c(t);return u(r,e)||n||""},b=function(e,t,n){var r=h(t);return u(r,e)||n||""},m=function(e,t,r){r.label=p(e,t,r.label||r.name),r.description=g(e,t,r.description),(0,n.translationI18nMenus)(e,r.admin_menus)},v=function(e,t){i.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=y;var _=function(e,t,n){var r=o(n),s={};return s[f(t)]=p(e,t,r.label||r.name),s[c(t)]=g(e,t,r.description),i.each(r.admin_menus,(function(t){s[h(t._id)]=b(e,t._id,t.label||t.name)})),s};n.getAppI18nTemplate=_,n.appFallbackKeys={getAppLabelKey:f,getAppDescriptionKey:c,getAppGroupKey:l,getMenuLabelKey:h,getTabKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var r=t("tslib"),i=t("underscore");r.__exportStar(t("./objectTranslation"),n),r.__exportStar(t("./translation"),n),r.__exportStar(t("./templates/objectTranslation"),n),r.__exportStar(t("./templates/translation"),n);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},s=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(r){console.error("Creator.convertFieldsOptions",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},a;n.convertObject=s,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(a=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),s=t("../index"),a=t("./index"),u=t("../i18n/i18n"),f=t("lodash"),c=t("crypto"),l,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function d(e){var t;return c.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(d(JSON.stringify(t)))},g=t("clone"),b=".",m="base",v="core",y="translation",_="object",w="field",k="listview",j="action",x=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,s.exists)(e,n))return(0,s._t)(e,n)},S=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},D=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},E=function(e){var t;return[D(),e].join(".")},A=function(e){var t;return[D("object"),e,"label"].join(".")},C=function(e){var t;return[D("object"),e,"description"].join(".")},M=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},T=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},B=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),r;return[D("field"),e,"group",n].join(".")},I=function(e,t,n){var r;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},R=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},P=function(e,t,n){var r,i=[A(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),x(i,e)||n||""};n.translationObjectLabel=P;var N=function(e,t,n){var r=C(t);return x(r,e)||n||""},L=function(e,t,n,r,i,o){var s,a=[M(t,n)],f=u.fallbackKeys.getObjectFieldLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=L(e,l,n,r,i))}return c||r||""},z=function(e,t,n,r,i,o){var s,a=[O(t,n)],f=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=z(e,l,n,r,i))}return c||r||""},U=function(e,t,n,r,i,o){var s=T(t,n),a,u=x([s],e);if(1!=o&&!u){var f=S(i);f&&"base"!=t&&"core"!=t&&(u=U(e,f,n,r,i))}return u||r||""},q=function(e,t,n,r,i,o){var s,a=[B(t,n)],f=u.fallbackKeys.getObjectFieldGroupKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=q(e,l,n,r,i))}return c||r||""},$=function(e,t,n,r,i,o,s){var a,f=[I(t,n,r)],c=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,r);c&&f.push(c);var l=x(f,e);if(1!=s&&!l){var h=S(o);h&&"base"!=t&&"core"!=t&&(l=$(e,h,n,r,i,o))}return l||i||""},W=function(e,t,n,r,i,o){var s,a=[R(t,n)],f=u.fallbackKeys.getObjectActionLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=W(e,l,n,r,i))}return c||r||""},H=function(e,t,n,r,i,o){var s,a=[F(t,n)],f=u.fallbackKeys.getObjectListviewLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=H(e,l,n,r,i))}return c||r||""},Y=function(e,t,r,o,s){void 0===s&&(s=!1);var u=p(e,r),c=h.get(u);if(c)return Object.assign(r,(0,f.cloneDeep)(c));o&&(0,a.convertObject)(r),r.label=(0,n.translationObjectLabel)(e,t,r.label),r.description=N(e,t,r.description),i.each(r.fields,(function(n,o){if(n.label=L(e,t,o,n.label,r.datasource,s),n.inlineHelpText=z(e,t,o,n.inlineHelpText,r.datasource,s),n.description=U(e,t,o,n.description,r.datasource,s),n.group&&(n.group=q(e,t,n.group,n.group,r.datasource,s)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var u=$(e,t,o,n.value,n.label,r.datasource,s);a.push(i.extend({},n,{label:u}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=W(e,t,i,n.label,r.datasource,s)})),i.each(r.list_views,(function(n,i){n.label=H(e,t,i,n.label,r.datasource,s)})),h.set(u,(0,f.cloneDeep)(r))};n.translationObject=Y;var V=function(e,t){i.each(t,(function(t,r){(0,n.translationObject)(e,r,t)}))};n.translationObjects=V;var K=function(e,t,r){var o=g(r);(0,a.convertObject)(o);var s={};return s[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),s[C(t)]=N(e,t,o.description),i.each(o.fields,(function(n,r){s[M(t,r)]=L(e,t,r,n.label),n.inlineHelpText&&(s[O(t,r)]=z(e,t,r,n.inlineHelpText,o.datasource)),n.description&&(s[T(t,r)]=U(e,t,r,n.description,o.datasource)),n.group&&(s[B(t,n.group)]=q(e,t,n.group,n.group,o.datasource)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[I(t,r,n.value)]=$(e,t,r,n.value,n.label))}))})),i.each(o.actions,(function(n,r){s[R(t,r)]=W(e,t,r,n.label)})),i.each(o.list_views,(function(n,r){s[F(t,r)]=H(e,t,r,n.label)})),s};function G(e,t){var n=g(e);(0,a.convertObject)(n);var r={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),r[A(o)]=n.label,r[C(o)]=n.description,i.each(n.fields,(function(e,t){r[M(o,t)]=e.label,e.help&&(r[O(o,t)]=e.help),e.description&&(r[T(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(r[I(o,t,e.value)]=e.label)}))})),i.each(n.groups,(function(e,t){r[B(o,t)]=e})),i.each(n.actions,(function(e,t){r[R(o,t)]=e.label})),i.each(n.listviews,(function(e,t){r[F(o,t)]=e.label})),i.each(n.CustomLabels,(function(e,t){r[E(t)]=e})),r}n.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,s.addResourceBundle)(e.lng,y,t,!0,!0)}))};n.addObjectsTranslation=X},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addTranslations=n.convertTranslation=n.convertTranslationData=n.getAppTranslationTemplate=n.translationApps=n.translationMenus=n.translationApp=n.translationTabLabel=n.translationTabGroup=void 0;var r=t("../index"),i=t("underscore"),o=t("./"),s=t("../i18n/i18n.app"),a=t("clone"),u="translation",f=".",c="app",l="menu",h="tab",d=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[d(),e].join(".")},g=function(e,t){var n={lng:t,ns:u,keySeparator:!1};if((0,r.exists)(e,n))return(0,r._t)(e,n)},b=function(e){var t;return[d("app"),e,"name"].join(".")},m=function(e){var t;return[d("app"),e,"description"].join(".")},v=function(e,t){var n,r;return[d("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[d("menu"),"menu_".concat(e)].join(".")},_=function(e){var t;return[d("tab"),e].join(".")},w=function(e,t,n){var r,i=[b(t)],o=s.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),g(i,e)||n||""},k=function(e,t,n){var r,i=[m(t)],o=s.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),g(i,e)||n||""},j=function(e,t,n,r){var i,o=[v(t,n)],a=s.appFallbackKeys.getAppGroupKey(t,n);return a&&o.push(a),g(o,e)||r||""};n.translationTabGroup=j;var x=function(e,t,n){var r,i=[y(t)],o=s.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),g(i,e)||n||""},S=function(e,t,n){var r,i=[_(t)],o=s.appFallbackKeys.getTabKey(t);return o&&i.push(o),g(i,e)||n||""};n.translationTabLabel=S;var D=function(e,t,r){r.label=w(e,t,r.label||r.name),r.description=k(e,t,r.description),i.each(r.tab_groups,(function(i,o){r.tab_groups[o].id=i.id||i.group_name,r.tab_groups[o].group_name=(0,n.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,n.translationMenus)(e,r.admin_menus)};n.translationApp=D;var E=function(e,t){i.each(t,(function(t){var n=x(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=E;var A=function(e,t){i.each(t,(function(t,r){(0,n.translationApp)(e,r,t)}))};n.translationApps=A;var C=function(e,t,n){var r=a(n),o={};return o[b(t)]=w(e,t,r.label||r.name),o[m(t)]=k(e,t,r.description),i.each(r.admin_menus,(function(t){o[y(t._id)]=x(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var M=function(e,t,n){i.isArray(n)?i.each(n,(function(e){M(e,"",e)})):n&&i.each(i.keys(n),(function(r){var o=t?"".concat(t,".").concat(r):r,s=n[r];"object"==typeof s?i.isArray(s)?i.each(s,(function(e){M(e,o,s)})):M(e,o,s):e[o]=s}))};function O(e){for(var t in e)"object"==typeof e[t]&&M(e,t,e[t]);return e}n.convertTranslationData=O;var T=function(e){var t=a(e),n={};return i.each(t.CustomApplications,(function(e,t){n[b(t)]=e.name,n[m(t)]=e.description,i.each(e.groups,(function(e,r){n[v(t,r)]=e}))})),i.each(t.CustomTabs,(function(e,t){n[_(t)]=e})),i.each(t.CustomLabels,(function(e,t){var r;if("simpleschema"!=t&&i.isObject(e)){var o=O(((r={})[t]=e,r));i.each(o,(function(e,t){i.isObject(e)||(n[p(t)]=e)}))}else n[p(t)]=e})),n};n.convertTranslation=T;var B=function(e){i.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,r.addResourceBundle)(e.lng,u,t,!0,!0)}))};n.addTranslations=B},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function a(e){return s(["label","description"],e)}function u(e){switch(e.type){case"select":return s(["label","help","options","description"],e);default:return s(["label","help","description"],e)}}function f(e){return s(["label"],e)}function c(e){return s(["label"],e)}function l(e){var t={};return r.each(e,(function(e,n){t[n]=u(e)})),t}function h(e){var t={};return r.each(e,(function(e,n){t[n]=c(e)})),t}function d(e){var t={};return r.each(e,(function(e,n){t[n]=f(e)})),t}function p(e,t){var n={};return r.each(e,(function(e,r){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[i]=t[r].group}})),n}var g=function(e,t,n,s){void 0===s&&(s=!1);var u=o(n);1!=s&&(0,i.translationObject)(e,t,u,!0,s);var f=Object.assign({},a(u));f=Object.assign({},f,{fields:l(u.fields)});var c=p(n.fields,u.fields);r.isEmpty(c)||(f=Object.assign({},f,{groups:c}));var g=d(u.list_views);r.isEmpty(g)||(f=Object.assign({},f,{listviews:g}));var b=h(u.actions);return r.isEmpty(b)||(f=Object.assign({},f,{actions:b})),Object.assign({name:t},f)};n.getObjectMetadataTranslationTemplate=g},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]=t[e]||""})),n}function a(e){var t={groups:{}};return e?(r.each(e,(function(e){var n=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[n]=e.group_name})),t):{}}var u=function(e){return Object.assign({},s(["name","description"],e),a(e.tab_groups))},f=function(e){var t={};return r.each(e,(function(e,n){t[n]=n})),t},c=function(e){var t={};return r.each(e,(function(e){var n=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[n]=e})),t},l=function(e,t,n){var r,s=o(n);(0,i.translationApp)(e,t,s);var a={},l;return s.tab_items?a=f(s.tab_items):s.tabs&&(a=c(s.tabs)),Object.assign({},{CustomApplications:(r={},r[t]=u(s),r)},{CustomTabs:a})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",module:"./dist/esm/i18next.js",main:"./dist/cjs/i18next.js"}},dist:{esm:{"i18next.js":function e(t,n,e){let r,i,o,s,a,u,f,c;e.link("@babel/runtime/helpers/esm/typeof",{default(e){r=e}},0),e.link("@babel/runtime/helpers/esm/objectSpread",{default(e){i=e}},1),e.link("@babel/runtime/helpers/esm/classCallCheck",{default(e){o=e}},2),e.link("@babel/runtime/helpers/esm/createClass",{default(e){s=e}},3),e.link("@babel/runtime/helpers/esm/possibleConstructorReturn",{default(e){a=e}},4),e.link("@babel/runtime/helpers/esm/getPrototypeOf",{default(e){u=e}},5),e.link("@babel/runtime/helpers/esm/assertThisInitialized",{default(e){f=e}},6),e.link("@babel/runtime/helpers/esm/inherits",{default(e){c=e}},7);var l={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,n){console&&console[t]&&console[t].apply(console,n)}},h,d=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n)}return s(e,[{key:"init",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||l,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function y(e,t,n){var r=v(e,t,Object),i,o;r.obj[r.k]=n}function _(e,t,n,r){var i=v(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function w(e,t){var n=v(e,t),r=n.obj,i=n.k;if(r)return r[i]}function k(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return c(t,e),s(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[t,n];return r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split(".")),w(this.data,s)}},{key:"addResource",value:function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(i=n,n=(a=t.split("."))[1]),this.addNamespaces(n),y(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}},{key:"addResources",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}},{key:"addResourceBundle",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},u=[t,n];t.indexOf(".")>-1&&(o=r,r=n,n=(u=t.split("."))[1]),this.addNamespaces(n);var f=w(this.data,u)||{};o?j(f,r,s):f=i({},f,r),y(this.data,u,f),a.silent||this.emit("added",t,n,r)}},{key:"removeResourceBundle",value:function e(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}},{key:"hasResourceBundle",value:function e(t,n){return void 0!==this.getResource(t,n)}},{key:"getResourceBundle",value:function e(t,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(t,n)):this.getResource(t,n)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(p),C={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,r,i,o){var s=this;return t.forEach((function(e){s.processors[e]&&(n=s.processors[e].process(n,r,i,o))})),n}},M={},O=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),m(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,f(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=d.create("translator"),n}return c(t,e),s(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,n);return r&&void 0!==r.res}},{key:"extractFromKey",value:function e(t,n){var r=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:o};var a=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,o,s){var a=this;if("object"!==r(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var u=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(n[n.length-1],o),c=f.key,l=f.namespaces,h=l[l.length-1],d=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=o.nsSeparator||this.options.nsSeparator;return h+g+c}return c}var b=this.resolve(n,o),m=b&&b.res,v=b&&b.usedKey||c,y=b&&b.exactUsedKey||c,_=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(j&&m&&x&&w.indexOf(_)<0&&("string"!=typeof k||"[object Array]"!==_)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,o):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(u){var S="[object Array]"===_,D=S?[]:{},E=S?y:v;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var C="".concat(E).concat(u).concat(A);D[A]=this.translate(C,i({},o,{joinArrays:!1,ns:l})),D[A]===C&&(D[A]=m[A])}m=D}}else if(j&&"string"==typeof k&&"[object Array]"===_)(m=m.join(k))&&(m=this.extendTranslation(m,n,o,s));else{var M=!1,O=!1,T=void 0!==o.count&&"string"!=typeof o.count,B=t.hasDefaultValue(o),I=T?this.pluralResolver.getSuffix(d,o.count):"",R=o["defaultValue".concat(I)]||o.defaultValue;!this.isValidLookup(m)&&B&&(M=!0,m=R),this.isValidLookup(m)||(O=!0,m=c);var F=B&&R!==m&&this.options.updateMissing;if(O||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,h,c,F?R:m),u){var P=this.resolve(c,i({},o,{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},i,o,s,a,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(i)){var t=n.extractFromKey(e,r),f=t.key;o=f;var c=t.namespaces;n.options.fallbackNS&&(c=c.concat(n.options.fallbackNS));var l=void 0!==r.count&&"string"!=typeof r.count,h=void 0!==r.context&&"string"==typeof r.context&&""!==r.context,d=r.lngs?r.lngs:n.languageUtils.toResolveHierarchy(r.lng||n.language,r.fallbackLng);c.forEach((function(e){n.isValidLookup(i)||(u=e,!M["".concat(d[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(u)&&(M["".concat(d[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(t){if(!n.isValidLookup(i)){a=t;var o=f,u=[o],c,d;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(u,f,t,e,r);else l&&(c=n.pluralResolver.getSuffix(t,r.count)),l&&h&&u.push(o+c),h&&u.push(o+="".concat(n.options.contextSeparator).concat(r.context)),l&&u.push(o+=c);for(;d=u.pop();)n.isValidLookup(i)||(s=d,i=n.getResource(t,e,d,r))}})))}))}})),{res:i,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:u}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&void 0!==t[r])return!0;return!1}}]),t}(p);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}var B=function(){function e(t){o(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d.create("languageUtils")}return s(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=T(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var n=this,r;return t?(t.forEach((function(e){if(!r){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(r=t)}})),!r&&this.options.supportedLngs&&t.forEach((function(e){if(!r){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return r=t;r=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function e(t,n){if(!t)return[];if("function"==typeof t&&(t=t(n)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function e(t,n){var r=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=function e(t){t&&(r.isSupportedCode(t)?o.push(t):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(t))):"string"==typeof t&&s(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&s(r.formatLanguageCode(e))})),o}}]),e}(),I=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],R={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function F(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:R[t.fc]}}))})),e}var P=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.languageUtils=t,this.options=n,this.logger=d.create("pluralResolver"),this.rules=F()}return s(e,[{key:"addRule",value:function e(t,n){this.rules[t]=n}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,n){return this.getSuffixes(t).map((function(e){return n+e}))}},{key:"getSuffixes",value:function e(t){var n=this,r=this.getRule(t);return r?r.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var r=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(n):i.plurals(Math.abs(n)),s=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var a=function e(){return r.options.prepend&&s.toString()?r.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=d.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=void 0!==n.escape?n.escape:D,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?x(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?x(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?x(n.nestingPrefix):n.nestingPrefixEscaped||x("$t("),this.nestingSuffix=n.nestingSuffix?x(n.nestingSuffix):n.nestingSuffixEscaped||x(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function e(t,n,r,i){var o=this,s,a,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function e(t){if(t.indexOf(o.formatSeparator)<0){var s=k(n,f,t);return o.alwaysFormat?o.format(s,void 0,r):s}var a=t.split(o.formatSeparator),u=a.shift().trim(),c=a.join(o.formatSeparator).trim();return o.format(k(n,f,u),c,r,i)};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return c(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?c(o.escape(t)):c(t)}}].forEach((function(e){for(u=0;s=e.regex.exec(t);){if(void 0===(a=l(s[1].trim())))if("function"==typeof h){var n=h(t,s,i);a="string"==typeof n?n:""}else{if(d){a=s[0];continue}o.logger.warn("missed to pass in variable ".concat(s[1]," for interpolating ").concat(t)),a=""}else"string"==typeof a||o.useRawValueToEscape||(a=b(a));if(t=t.replace(s[0],e.safeValue(a)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s,a,u=i({},o);function f(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(s){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),s),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e}for(u.applyPostProcessor=!1,delete u.defaultValue;s=this.nestingRegexp.exec(t);){var c=[],l=!1;if(s[0].includes(this.formatSeparator)&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map((function(e){return e.trim()}));s[1]=h.shift(),c=h,l=!0}if((a=n(f.call(this,s[1].trim(),u),u))&&s[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=b(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return r.format(e,t,o.lng,o)}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}]),e}();function L(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var z=function(e){function t(e,n,r){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o(this,t),i=a(this,u(t).call(this)),E&&p.call(f(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=s,i.logger=d.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,s.backend,s),i}return c(t,e),s(t,[{key:"queueLoad",value:function e(t,n,r,i){var o=this,s=[],a=[],u=[],f=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var i="".concat(e,"|").concat(n);!r.reload&&o.store.hasResourceBundle(e,n)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?a.indexOf(i)<0&&a.push(i):(o.state[i]=1,t=!1,a.indexOf(i)<0&&a.push(i),s.indexOf(i)<0&&s.push(i),f.indexOf(n)<0&&f.push(n)))})),t||u.push(e)})),(s.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:s,pending:a,toLoadLanguages:u,toLoadNamespaces:f}}},{key:"loaded",value:function e(t,n,r){var i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(r){_(r.loaded,[o],s),L(r.pending,t),n&&r.errors.push(n),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){e[t]||(e[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,n,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,n,r,o+1,2*s,a)}),s):a(e,u)})):a(null,{})}},{key:"prepareLoading",value:function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var s=this.queueLoad(t,n,i,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function e(t,n,r){this.prepareLoading(t,n,{},r)}},{key:"reload",value:function e(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}},{key:"loadOne",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],s=i[1];this.read(o,s,"read",void 0,void 0,(function(e,i){e&&n.logger.warn("".concat(r,"loading namespace ").concat(s," for language ").concat(o," failed"),e),!e&&i&&n.logger.log("".concat(r,"loaded namespace ").concat(s," for language ").concat(o),i),n.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(t,n,r,o,null,i({},a,{isUpdate:s})),t&&t[0]&&this.store.addResource(t[0],n,r,o))}}]),t}(p);function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var n={};if("object"===r(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===r(t[2])||"object"===r(t[3])){var i=t[3]||t[2];Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n},interpolation:{escapeValue:!0,format:function e(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function q(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $(){}var W,H=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(o(this,t),e=a(this,u(t).call(this)),E&&p.call(f(e)),e.options=q(n),e.services={},e.logger=d,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),a(e,f(e));setTimeout((function(){e.init(n,r)}),0)}return e}return c(t,e),s(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},U(),this.options,q(n)),this.format=this.options.interpolation.format,r||(r=$),!this.options.isClone){this.modules.logger?d.init(o(this.modules.logger),this.options):d.init(null,this.options);var s=new B(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=d,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new P(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new N(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new z(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var l=g(),h=function e(){var n=function e(n,i){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(i),r(n,i)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return n(null,t.t.bind(t));t.changeLanguage(t.options.lng,n)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),l}},{key:"loadResources",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,i=r,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var s=[],a=function e(t){var r;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(s,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,n,r){var i=g();return t||(t=this.languages),n||(n=this.options.ns),r||(r=$),this.services.backendConnector.reload(t,n,(function(e){i.resolve(),r(e)})),i}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&C.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var r=this;this.isLanguageChangingTo=t;var i=g();this.emit("languageChanging",t);var o=function e(t,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,i.resolve((function(){return r.t.apply(r,arguments)})),n&&n(t,(function(){return r.t.apply(r,arguments)}))},s=function e(t){var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||(r.language=n,r.languages=r.services.languageUtils.toResolveHierarchy(n)),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,(function(e){o(e,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(t):s(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,n){var o=this,s=function e(t,n){var s;if("object"!==r(n)){for(var a=arguments.length,u=new Array(a>2?a-2:0),f=2;f1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],o=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function e(t,r){var i=n.services.backendConnector.state["".concat(t,"|").concat(r)];return-1===i||2===i};if(r.precheck){var u=r.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!a(i,t)||o&&!a(s,t)))}},{key:"loadNamespaces",value:function e(t,n){var r=this,i=g();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var r=g();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(n&&n(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var n}},{key:"createInstance",value:function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(n,r)}},{key:"cloneInstance",value:function e(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,s=i({},this.options,r,{isClone:!0}),a=new t(s),u=["store","services","language"];return u.forEach((function(e){a[e]=n[e]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new O(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rr,root:()=>i,ArrayProto:()=>o,ObjProto:()=>s,SymbolProto:()=>a,push:()=>u,slice:()=>f,toString:()=>c,hasOwnProperty:()=>l,supportsArrayBuffer:()=>h,supportsDataView:()=>d,nativeIsArray:()=>p,nativeKeys:()=>g,nativeCreate:()=>b,nativeIsView:()=>m,_isNaN:()=>v,_isFinite:()=>y,hasEnumBug:()=>_,nonEnumerableProps:()=>w,MAX_ARRAY_INDEX:()=>k});var r="1.13.4",i="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,u=o.push,f=o.slice,c=s.toString,l=s.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,p=Array.isArray,g=Object.keys,b=Object.create,m=h&&ArrayBuffer.isView,v=isNaN,y=isFinite,_=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=Math.pow(2,53)-1},"restArguments.js":function e(t,n,e){function r(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;ir})},"isObject.js":function e(t,n,e){function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}e.export({default:()=>r})},"isNull.js":function e(t,n,e){function r(e){return null===e}e.export({default:()=>r})},"isUndefined.js":function e(t,n,e){function r(e){return void 0===e}e.export({default:()=>r})},"isBoolean.js":function e(t,n,e){let r;function i(e){return!0===e||!1===e||"[object Boolean]"===r.call(e)}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isElement.js":function e(t,n,e){function r(e){return!(!e||1!==e.nodeType)}e.export({default:()=>r})},"isString.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("String"))},"_tagTester.js":function e(t,n,e){let r;function i(e){var t="[object "+e+"]";return function(e){return r.call(e)===t}}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isNumber.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Number"))},"isDate.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Date"))},"isRegExp.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("RegExp"))},"isError.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Error"))},"isSymbol.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Symbol"))},"isArrayBuffer.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("ArrayBuffer"))},"isDataView.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isArrayBuffer.js",{default(e){o=e}},2),e.link("./_stringTagBug.js",{hasStringTagBug(e){s=e}},3);var a=r("DataView");function u(e){return null!=e&&i(e.getInt8)&&o(e.buffer)}e.exportDefault(s?u:a)},"isFunction.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_setup.js",{root(e){i=e}},1);var o=r("Function"),s=i.document&&i.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof s&&(o=function(e){return"function"==typeof e||!1}),e.exportDefault(o)},"_stringTagBug.js":function e(t,n,e){let r,i;e.export({hasStringTagBug:()=>o,isIE11:()=>s}),e.link("./_setup.js",{supportsDataView(e){r=e}},0),e.link("./_hasObjectTag.js",{default(e){i=e}},1);var o=r&&i(new DataView(new ArrayBuffer(8))),s="undefined"!=typeof Map&&i(new Map)},"_hasObjectTag.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Object"))},"isArray.js":function e(t,n,e){let r,i;e.link("./_setup.js",{nativeIsArray(e){r=e}},0),e.link("./_tagTester.js",{default(e){i=e}},1),e.exportDefault(r||i("Array"))},"isArguments.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1);var o=r("Arguments");!function(){o(arguments)||(o=function(e){return i(e,"callee")})}(),e.exportDefault(o)},"_has.js":function e(t,n,e){let r;function i(e,t){return null!=e&&r.call(e,t)}e.export({default:()=>i}),e.link("./_setup.js",{hasOwnProperty(e){r=e}},0)},"isFinite.js":function e(t,n,e){let r,i;function o(e){return!i(e)&&r(e)&&!isNaN(parseFloat(e))}e.export({default:()=>o}),e.link("./_setup.js",{_isFinite(e){r=e}},0),e.link("./isSymbol.js",{default(e){i=e}},1)},"isNaN.js":function e(t,n,e){let r,i;function o(e){return i(e)&&r(e)}e.export({default:()=>o}),e.link("./_setup.js",{_isNaN(e){r=e}},0),e.link("./isNumber.js",{default(e){i=e}},1)},"isTypedArray.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./_setup.js",{supportsArrayBuffer(e){r=e},nativeIsView(e){i=e},toString(e){o=e}},0),e.link("./isDataView.js",{default(e){s=e}},1),e.link("./constant.js",{default(e){a=e}},2),e.link("./_isBufferLike.js",{default(e){u=e}},3);var f=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function c(e){return i?i(e)&&!s(e):u(e)&&f.test(o.call(e))}e.exportDefault(r?c:a(!1))},"constant.js":function e(t,n,e){function r(e){return function(){return e}}e.export({default:()=>r})},"_isBufferLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getByteLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createSizePropertyCheck.js":function e(t,n,e){let r;function i(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=r}}e.export({default:()=>i}),e.link("./_setup.js",{MAX_ARRAY_INDEX(e){r=e}},0)},"_getByteLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("byteLength"))},"_shallowProperty.js":function e(t,n,e){function r(e){return function(t){return null==t?void 0:t[e]}}e.export({default:()=>r})},"isEmpty.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(null==e)return!0;var t=r(e);return"number"==typeof t&&(i(e)||o(e)||s(e))?0===t:0===r(a(e))}e.export({default:()=>u}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3),e.link("./keys.js",{default(e){a=e}},4)},"_getLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("length"))},"keys.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(!r(e))return[];if(i)return i(e);var t=[];for(var n in e)s(e,n)&&t.push(n);return o&&a(e,t),t}e.export({default:()=>u}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeKeys(e){i=e},hasEnumBug(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2),e.link("./_collectNonEnumProps.js",{default(e){a=e}},3)},"_collectNonEnumProps.js":function e(t,n,e){let r,i,o,s;function a(e){for(var t={},n=e.length,r=0;ru}),e.link("./_setup.js",{nonEnumerableProps(e){r=e},ObjProto(e){i=e}},0),e.link("./isFunction.js",{default(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2)},"isMatch.js":function e(t,n,e){let r;function i(e,t){var n=r(t),i=n.length;if(null==e)return!i;for(var o=Object(e),s=0;si}),e.link("./keys.js",{default(e){r=e}},0)},"isEqual.js":function e(t,n,e){let r,i,o,s,a,u,f,c,l,h,d;e.export({default:()=>m}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_setup.js",{toString(e){i=e},SymbolProto(e){o=e}},1),e.link("./_getByteLength.js",{default(e){s=e}},2),e.link("./isTypedArray.js",{default(e){a=e}},3),e.link("./isFunction.js",{default(e){u=e}},4),e.link("./_stringTagBug.js",{hasStringTagBug(e){f=e}},5),e.link("./isDataView.js",{default(e){c=e}},6),e.link("./keys.js",{default(e){l=e}},7),e.link("./_has.js",{default(e){h=e}},8),e.link("./_toBufferView.js",{default(e){d=e}},9);var p="[object DataView]";function g(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&b(e,t,n,r)}function b(e,t,n,m){e instanceof r&&(e=e._wrapped),t instanceof r&&(t=t._wrapped);var v=i.call(e);if(v!==i.call(t))return!1;if(f&&"[object Object]"==v&&c(e)){if(!c(t))return!1;v=p}switch(v){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(t);case"[object ArrayBuffer]":case p:return b(d(e),d(t),n,m)}var y="[object Array]"===v;if(!y&&a(e)){var _;if(s(e)!==s(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;y=!0}if(!y){if("object"!=typeof e||"object"!=typeof t)return!1;var w=e.constructor,k=t.constructor;if(w!==k&&!(u(w)&&w instanceof w&&u(k)&&k instanceof k)&&"constructor"in e&&"constructor"in t)return!1}m=m||[];for(var j=(n=n||[]).length;j--;)if(n[j]===e)return m[j]===t;if(n.push(e),m.push(t),y){if((j=e.length)!==t.length)return!1;for(;j--;)if(!g(e[j],t[j],n,m))return!1}else{var x=l(e),S;if(j=x.length,l(t).length!==j)return!1;for(;j--;)if(S=x[j],!h(t,S)||!g(e[S],t[S],n,m))return!1}return n.pop(),m.pop(),!0}function m(e,t){return g(e,t)}},"underscore.js":function e(t,n,e){let r;function i(e){return e instanceof i?e:this instanceof i?void(this._wrapped=e):new i(e)}e.export({default:()=>i}),e.link("./_setup.js",{VERSION(e){r=e}},0),i.VERSION=r,i.prototype.value=function(){return this._wrapped},i.prototype.valueOf=i.prototype.toJSON=i.prototype.value,i.prototype.toString=function(){return String(this._wrapped)}},"_toBufferView.js":function e(t,n,e){let r;function i(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,r(e))}e.export({default:()=>i}),e.link("./_getByteLength.js",{default(e){r=e}},0)},"isMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},mapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Map"))},"_methodFingerprint.js":function e(t,n,e){let r,i,o;function s(e){var t=r(e);return function(n){if(null==n)return!1;var s=o(n);if(r(s))return!1;for(var u=0;us,mapMethods:()=>l,weakMapMethods:()=>h,setMethods:()=>d}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./allKeys.js",{default(e){o=e}},2);var a="forEach",u="has",f=["clear","delete"],c=["get","has","set"],l=f.concat(a,c),h=f.concat(c),d=["add"].concat(f,a,"has")},"allKeys.js":function e(t,n,e){let r,i,o;function s(e){if(!r(e))return[];var t=[];for(var n in e)t.push(n);return i&&o(e,t),t}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{hasEnumBug(e){i=e}},1),e.link("./_collectNonEnumProps.js",{default(e){o=e}},2)},"isWeakMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},weakMapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("WeakMap"))},"isSet.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},setMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Set"))},"isWeakSet.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("WeakSet"))},"values.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"pairs.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"invert.js":function e(t,n,e){let r;function i(e){for(var t={},n=r(e),i=0,o=n.length;ii}),e.link("./keys.js",{default(e){r=e}},0)},"functions.js":function e(t,n,e){let r;function i(e){var t=[];for(var n in e)r(e[n])&&t.push(n);return t.sort()}e.export({default:()=>i}),e.link("./isFunction.js",{default(e){r=e}},0)},"extend.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createAssigner.js":function e(t,n,e){function r(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;ir})},"extendOwn.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"defaults.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i,!0))},"create.js":function e(t,n,e){let r,i;function o(e,t){var n=r(e);return t&&i(n,t),n}e.export({default:()=>o}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./extendOwn.js",{default(e){i=e}},1)},"_baseCreate.js":function e(t,n,e){let r,i;function o(){return function(){}}function s(e){if(!r(e))return{};if(i)return i(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeCreate(e){i=e}},1)},"clone.js":function e(t,n,e){let r,i,o;function s(e){return r(e)?i(e)?e.slice():o({},e):e}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./extend.js",{default(e){o=e}},2)},"tap.js":function e(t,n,e){function r(e,t){return t(e),e}e.export({default:()=>r})},"get.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=i(e,r(t));return o(s)?n:s}e.export({default:()=>s}),e.link("./_toPath.js",{default(e){r=e}},0),e.link("./_deepGet.js",{default(e){i=e}},1),e.link("./isUndefined.js",{default(e){o=e}},2)},"_toPath.js":function e(t,n,e){let r;function i(e){return r.toPath(e)}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./toPath.js")},"toPath.js":function e(t,n,e){let r,i;function o(e){return i(e)?e:[e]}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),r.toPath=o},"_deepGet.js":function e(t,n,e){function r(e,t){for(var n=t.length,r=0;rr})},"has.js":function e(t,n,e){let r,i;function o(e,t){for(var n=(t=i(t)).length,o=0;oo}),e.link("./_has.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"mapObject.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s=o.length,a={},u=0;uo}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"_cb.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r.iteratee!==o?r.iteratee(e,t):i(e,t,n)}e.export({default:()=>s}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),e.link("./iteratee.js",{default(e){o=e}},2)},"_baseIteratee.js":function e(t,n,e){let r,i,o,s,a,u,f;function c(e,t,n){return null==e?r:i(e)?f(e,t,n):o(e)&&!s(e)?a(e):u(e)}e.export({default:()=>c}),e.link("./identity.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isObject.js",{default(e){o=e}},2),e.link("./isArray.js",{default(e){s=e}},3),e.link("./matcher.js",{default(e){a=e}},4),e.link("./property.js",{default(e){u=e}},5),e.link("./_optimizeCb.js",{default(e){f=e}},6)},"identity.js":function e(t,n,e){function r(e){return e}e.export({default:()=>r})},"matcher.js":function e(t,n,e){let r,i;function o(e){return e=r({},e),function(t){return i(t,e)}}e.export({default:()=>o}),e.link("./extendOwn.js",{default(e){r=e}},0),e.link("./isMatch.js",{default(e){i=e}},1)},"property.js":function e(t,n,e){let r,i;function o(e){return e=i(e),function(t){return r(t,e)}}e.export({default:()=>o}),e.link("./_deepGet.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"_optimizeCb.js":function e(t,n,e){function r(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}e.export({default:()=>r})},"iteratee.js":function e(t,n,e){let r,i;function o(e,t){return i(e,t,1/0)}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),r.iteratee=o},"noop.js":function e(t,n,e){function r(){}e.export({default:()=>r})},"propertyOf.js":function e(t,n,e){let r,i;function o(e){return null==e?r:function(t){return i(e,t)}}e.export({default:()=>o}),e.link("./noop.js",{default(e){r=e}},0),e.link("./get.js",{default(e){i=e}},1)},"times.js":function e(t,n,e){let r;function i(e,t,n){var i=Array(Math.max(0,e));t=r(t,n,1);for(var o=0;oi}),e.link("./_optimizeCb.js",{default(e){r=e}},0)},"random.js":function e(t,n,e){function r(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}e.export({default:()=>r})},"now.js":function e(t,n,e){e.exportDefault(Date.now||function(){return(new Date).getTime()})},"escape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createEscaper.js":function e(t,n,e){let r;function i(e){var t=function(t){return e[t]},n="(?:"+r(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}}e.export({default:()=>i}),e.link("./keys.js",{default(e){r=e}},0)},"_escapeMap.js":function e(t,n,e){e.exportDefault({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"})},"unescape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_unescapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_unescapeMap.js":function e(t,n,e){let r,i;e.link("./invert.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"templateSettings.js":function e(t,n,e){let r;e.link("./underscore.js",{default(e){r=e}},0),e.exportDefault(r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g})},"template.js":function e(t,n,e){let r,i;e.export({default:()=>c}),e.link("./defaults.js",{default(e){r=e}},0),e.link("./underscore.js",{default(e){i=e}},1),e.link("./templateSettings.js");var o=/(.)^/,s={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},a=/\\|'|\r|\n|\u2028|\u2029/g;function u(e){return"\\"+s[e]}var f=/^\s*(\w|\$)+\s*$/;function c(e,t,n){!t&&n&&(t=n),t=r({},t,i.templateSettings);var s=RegExp([(t.escape||o).source,(t.interpolate||o).source,(t.evaluate||o).source].join("|")+"|$","g"),c=0,l="__p+='";e.replace(s,(function(t,n,r,i,o){return l+=e.slice(c,o).replace(a,u),c=o+t.length,n?l+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?l+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(l+="';\n"+i+"\n__p+='"),t})),l+="';\n";var h=t.variable,d;if(h){if(!f.test(h))throw new Error("variable is not a bare identifier: "+h)}else l="with(obj||{}){\n"+l+"}\n",h="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";try{d=new Function(h,"_",l)}catch(g){throw g.source=l,g}var p=function(e){return d.call(this,e,i)};return p.source="function("+h+"){\n"+l+"}",p}},"result.js":function e(t,n,e){let r,i;function o(e,t,n){var o=(t=i(t)).length;if(!o)return r(n)?n.call(e):n;for(var s=0;so}),e.link("./isFunction.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"uniqueId.js":function e(t,n,e){e.export({default:()=>i});var r=0;function i(e){var t=++r+"";return e?e+t:t}},"chain.js":function e(t,n,e){let r;function i(e){var t=r(e);return t._chain=!0,t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"partial.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_executeBound.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2);var s=r((function(e,t){var n=s.placeholder,r=function(){for(var o=0,s=t.length,a=Array(s),u=0;uo}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./isObject.js",{default(e){i=e}},1)},"bind.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_executeBound.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t,n){if(!i(e))throw new TypeError("Bind must be called on a function");var s=r((function(r){return o(e,s,t,this,n.concat(r))}));return s})))},"bindAll.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./bind.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t){var n=(t=i(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=o(e[r],e)}return e})))},"_flatten.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,u){if(u=u||[],t||0===t){if(t<=0)return u.concat(e)}else t=1/0;for(var f=u.length,c=0,l=r(e);c1)a(h,t-1,n,u),f=u.length;else for(var d=0,p=h.length;da}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./isArray.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3)},"_isArrayLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"memoize.js":function e(t,n,e){let r;function i(e,t){var n=function(i){var o=n.cache,s=""+(t?t.apply(this,arguments):i);return r(o,s)||(o[s]=e.apply(this,arguments)),o[s]};return n.cache={},n}e.export({default:()=>i}),e.link("./_has.js",{default(e){r=e}},0)},"delay.js":function e(t,n,e){let r;e.link("./restArguments.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})))},"defer.js":function e(t,n,e){let r,i,o;e.link("./partial.js",{default(e){r=e}},0),e.link("./delay.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2),e.exportDefault(r(i,o,1))},"throttle.js":function e(t,n,e){let r;function i(e,t,n){var i,o,s,a,u=0;n||(n={});var f=function(){u=!1===n.leading?0:r(),i=null,a=e.apply(o,s),i||(o=s=null)},c=function(){var c=r();u||!1!==n.leading||(u=c);var l=t-(c-u);return o=this,s=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=c,a=e.apply(o,s),i||(o=s=null)):i||!1===n.trailing||(i=setTimeout(f,l)),a};return c.cancel=function(){clearTimeout(i),u=0,i=o=s=null},c}e.export({default:()=>i}),e.link("./now.js",{default(e){r=e}},0)},"debounce.js":function e(t,n,e){let r,i;function o(e,t,n){var o,s,a,u,f,c=function(){var r=i()-s;t>r?o=setTimeout(c,t-r):(o=null,n||(u=e.apply(f,a)),o||(a=f=null))},l=r((function(r){return f=this,a=r,s=i(),o||(o=setTimeout(c,t),n&&(u=e.apply(f,a))),u}));return l.cancel=function(){clearTimeout(o),o=a=f=null},l}e.export({default:()=>o}),e.link("./restArguments.js",{default(e){r=e}},0),e.link("./now.js",{default(e){i=e}},1)},"wrap.js":function e(t,n,e){let r;function i(e,t){return r(t,e)}e.export({default:()=>i}),e.link("./partial.js",{default(e){r=e}},0)},"negate.js":function e(t,n,e){function r(e){return function(){return!e.apply(this,arguments)}}e.export({default:()=>r})},"compose.js":function e(t,n,e){function r(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}e.export({default:()=>r})},"after.js":function e(t,n,e){function r(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}e.export({default:()=>r})},"before.js":function e(t,n,e){function r(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}e.export({default:()=>r})},"once.js":function e(t,n,e){let r,i;e.link("./partial.js",{default(e){r=e}},0),e.link("./before.js",{default(e){i=e}},1),e.exportDefault(r(i,2))},"findKey.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s,a=0,u=o.length;ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"findIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createPredicateIndexFinder.js":function e(t,n,e){let r,i;function o(e){return function(t,n,o){n=r(n,o);for(var s=i(t),a=e>0?0:s-1;a>=0&&ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"findLastIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"sortedIndex.js":function e(t,n,e){let r,i;function o(e,t,n,o){for(var s=(n=r(n,o,1))(t),a=0,u=i(e);ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"indexOf.js":function e(t,n,e){let r,i,o;e.link("./sortedIndex.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./_createIndexFinder.js",{default(e){o=e}},2),e.exportDefault(o(1,i,r))},"_createIndexFinder.js":function e(t,n,e){let r,i,o;function s(e,t,n){return function(s,a,u){var f=0,c=r(s);if("number"==typeof u)e>0?f=u>=0?u:Math.max(u+c,f):c=u>=0?Math.min(u+1,c):u+c+1;else if(n&&u&&c)return s[u=n(s,a)]===a?u:-1;if(a!=a)return(u=t(i.call(s,f,c),o))>=0?u+f:-1;for(u=e>0?f:c-1;u>=0&&us}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isNaN.js",{default(e){o=e}},2)},"lastIndexOf.js":function e(t,n,e){let r,i;e.link("./findLastIndex.js",{default(e){r=e}},0),e.link("./_createIndexFinder.js",{default(e){i=e}},1),e.exportDefault(i(-1,r))},"find.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a=(r(e)?i:o)(e,t,n);if(void 0!==a&&-1!==a)return e[a]}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./findKey.js",{default(e){o=e}},2)},"findWhere.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./find.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"each.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a;if(t=r(t,n),i(e))for(s=0,a=e.length;ss}),e.link("./_optimizeCb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"map.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=Array(a),f=0;fs}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"reduce.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createReduce.js":function e(t,n,e){let r,i,o;function s(e){var t=function(t,n,o,s){var a=!r(t)&&i(t),u=(a||t).length,f=e>0?0:u-1;for(s||(o=t[a?a[f]:f],f+=e);f>=0&&f=3;return t(e,o(n,i,4),r,s)}}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2)},"reduceRight.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"filter.js":function e(t,n,e){let r,i;function o(e,t,n){var o=[];return t=r(t,n),i(e,(function(e,n,r){t(e,n,r)&&o.push(e)})),o}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"reject.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r(e,i(o(t)),n)}e.export({default:()=>s}),e.link("./filter.js",{default(e){r=e}},0),e.link("./negate.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2)},"every.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"some.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"contains.js":function e(t,n,e){let r,i,o;function s(e,t,n,s){return r(e)||(e=i(e)),("number"!=typeof n||s)&&(n=0),o(e,t,n)>=0}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./indexOf.js",{default(e){o=e}},2)},"invoke.js":function e(t,n,e){let r,i,o,s,a;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2),e.link("./_deepGet.js",{default(e){s=e}},3),e.link("./_toPath.js",{default(e){a=e}},4),e.exportDefault(r((function(e,t,n){var r,u;return i(t)?u=t:(t=a(t),r=t.slice(0,-1),t=t[t.length-1]),o(e,(function(e){var i=u;if(!i){if(r&&r.length&&(e=s(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)}))})))},"pluck.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./map.js",{default(e){r=e}},0),e.link("./property.js",{default(e){i=e}},1)},"where.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./filter.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"max.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=-1/0,u=-1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la&&(a=f);else t=o(t,n),s(e,(function(e,n,r){((c=t(e,n,r))>u||c===-1/0&&a===-1/0)&&(a=e,u=c)}));return a}e.export({default:()=>a}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"min.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=1/0,u=1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"shuffle.js":function e(t,n,e){let r;function i(e){return r(e,1/0)}e.export({default:()=>i}),e.link("./sample.js",{default(e){r=e}},0)},"sample.js":function e(t,n,e){let r,i,o,s,a;function u(e,t,n){if(null==t||n)return r(e)||(e=i(e)),e[s(e.length-1)];var u=a(e),f=o(u);t=Math.max(Math.min(t,f),0);for(var c=f-1,l=0;lu}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./random.js",{default(e){s=e}},3),e.link("./toArray.js",{default(e){a=e}},4)},"toArray.js":function e(t,n,e){let r,i,o,s,a,u,f;e.export({default:()=>l}),e.link("./isArray.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./_isArrayLike.js",{default(e){s=e}},3),e.link("./map.js",{default(e){a=e}},4),e.link("./identity.js",{default(e){u=e}},5),e.link("./values.js",{default(e){f=e}},6);var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function l(e){return e?r(e)?i.call(e):o(e)?e.match(c):s(e)?a(e,u):f(e):[]}},"sortBy.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=0;return t=r(t,n),i(o(e,(function(e,n,r){return{value:e,index:s++,criteria:t(e,n,r)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(ns}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./pluck.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2)},"groupBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n].push(t):e[n]=[t]})))},"_group.js":function e(t,n,e){let r,i;function o(e,t){return function(n,o,s){var a=t?[[],[]]:{};return o=r(o,s),i(n,(function(t,r){var i=o(t,r,n);e(a,t,i)})),a}}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"indexBy.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n]=t})))},"countBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n]++:e[n]=1})))},"partition.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n?0:1].push(t)}),!0))},"size.js":function e(t,n,e){let r,i;function o(e){return null==e?0:r(e)?e.length:i(e).length}e.export({default:()=>o}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"pick.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2),e.link("./allKeys.js",{default(e){s=e}},3),e.link("./_keyInObj.js",{default(e){a=e}},4),e.link("./_flatten.js",{default(e){u=e}},5),e.exportDefault(r((function(e,t){var n={},r=t[0];if(null==e)return n;i(r)?(t.length>1&&(r=o(r,t[1])),t=s(e)):(r=a,t=u(t,!1,!1),e=Object(e));for(var f=0,c=t.length;fr})},"omit.js":function e(t,n,e){let r,i,o,s,a,u,f;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./negate.js",{default(e){o=e}},2),e.link("./map.js",{default(e){s=e}},3),e.link("./_flatten.js",{default(e){a=e}},4),e.link("./contains.js",{default(e){u=e}},5),e.link("./pick.js",{default(e){f=e}},6),e.exportDefault(r((function(e,t){var n=t[0],r;return i(n)?(n=o(n),t.length>1&&(r=t[1])):(t=s(a(t,!1,!1),String),n=function(e,n){return!u(t,n)}),f(e,n,r)})))},"first.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:r(e,e.length-t)}e.export({default:()=>i}),e.link("./initial.js",{default(e){r=e}},0)},"initial.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"last.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:r(e,Math.max(0,e.length-t))}e.export({default:()=>i}),e.link("./rest.js",{default(e){r=e}},0)},"rest.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,null==t||n?1:t)}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"compact.js":function e(t,n,e){let r;function i(e){return r(e,Boolean)}e.export({default:()=>i}),e.link("./filter.js",{default(e){r=e}},0)},"flatten.js":function e(t,n,e){let r;function i(e,t){return r(e,t,!1)}e.export({default:()=>i}),e.link("./_flatten.js",{default(e){r=e}},0)},"without.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./difference.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t){return i(e,t)})))},"difference.js":function e(t,n,e){let r,i,o,s;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./filter.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3),e.exportDefault(r((function(e,t){return t=i(t,!0,!0),o(e,(function(e){return!s(t,e)}))})))},"uniq.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,a){r(t)||(a=n,n=t,t=!1),null!=n&&(n=i(n,a));for(var u=[],f=[],c=0,l=o(e);ca}),e.link("./isBoolean.js",{default(e){r=e}},0),e.link("./_cb.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3)},"union.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./uniq.js",{default(e){i=e}},1),e.link("./_flatten.js",{default(e){o=e}},2),e.exportDefault(r((function(e){return i(o(e,!0,!0))})))},"intersection.js":function e(t,n,e){let r,i;function o(e){for(var t=[],n=arguments.length,o=0,s=r(e);oo}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./contains.js",{default(e){i=e}},1)},"unzip.js":function e(t,n,e){let r,i,o;function s(e){for(var t=e&&r(e,i).length||0,n=Array(t),s=0;ss}),e.link("./max.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.link("./pluck.js",{default(e){o=e}},2)},"zip.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./unzip.js",{default(e){i=e}},1),e.exportDefault(r(i))},"object.js":function e(t,n,e){let r;function i(e,t){for(var n={},i=0,o=r(e);ii}),e.link("./_getLength.js",{default(e){r=e}},0)},"range.js":function e(t,n,e){function r(e,t,n){null==t&&(t=e||0,e=0),n||(n=tr})},"chunk.js":function e(t,n,e){let r;function i(e,t){if(null==t||t<1)return[];for(var n=[],i=0,o=e.length;ii}),e.link("./_setup.js",{slice(e){r=e}},0)},"mixin.js":function e(t,n,e){let r,i,o,s,a;function u(e){return i(o(e),(function(t){var n=r[t]=e[t];r.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),a(this,n.apply(r,e))}})),r}e.export({default:()=>u}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./functions.js",{default(e){o=e}},2),e.link("./_setup.js",{push(e){s=e}},3),e.link("./_chainResult.js",{default(e){a=e}},4)},"_chainResult.js":function e(t,n,e){let r;function i(e,t){return e._chain?r(t).chain():t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"underscore-array-methods.js":function e(t,n,e){let r,i,o,s;e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./_setup.js",{ArrayProto(e){o=e}},2),e.link("./_chainResult.js",{default(e){s=e}},3),i(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=o[e];r.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),s(this,n)}})),i(["concat","join","slice"],(function(e){var t=o[e];r.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),s(this,e)}})),e.exportDefault(r)}}}}},cachers:{"package.json":function e(t,n,e){e.exports={name:"@steedos/cachers",version:"2.7.4-beta.10",main:"lib/index.js"}},lib:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCacherNames=n.clearCacher=n.getCacher=void 0;var r={},i=t("./memory"),o=t("./memory-lru"),s=function(e,t){return r[e]||(e.startsWith("lru.")?r[e]=new o.MemoryLRUCacher(t):r[e]=new i.MemoryCacher),r[e]};n.getCacher=s;var a=function(e){r[e]&&r[e].clear()};n.clearCacher=a;var u=function(){return Object.keys(r)};n.getCacherNames=u},"memory.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryCacher=void 0;var r=t("lodash"),i=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.delete=function(e){delete this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.clear=function(){this.cache={}},e.prototype.keys=function(){return(0,r.keys)(this.cache)},e.prototype.values=function(){return(0,r.values)(this.cache)},e}();n.MemoryCacher=i},"memory-lru.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryLRUCacher=void 0;var r=t("lodash"),i=t("lru-cache"),o={max:5e3,ttl:null,keygen:null,maxParamsLength:null},s=function(){function e(e){this.opts=(0,r.defaultsDeep)(e,o),this.cache=new i({max:this.opts.max,maxAge:this.opts.ttl?1e3*this.opts.ttl:null,updateAgeOnGet:!!this.opts.ttl})}return e.prototype.get=function(e){return this.cache.get(e)},e.prototype.set=function(e,t,n){return this.cache.set(e,t,n)},e.prototype.delete=function(e){return this.cache.delete(e)},e.prototype.clear=function(){return this.cache.clear()},e.prototype.keys=function(){return this.cache.keys()},e.prototype.values=function(){return this.cache.values()},e}();n.MemoryLRUCacher=s}},node_modules:{"lru-cache":{"package.json":function e(t,n,e){e.exports={name:"lru-cache",version:"7.14.1",main:"index.js"}},"index.js":function e(t,n,e){const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i="function"==typeof AbortController,o=i?AbortController:class e{constructor(){this.signal=new u}abort(){this.signal.dispatchEvent("abort")}},s="function"==typeof AbortSignal,a="function"==typeof o.AbortSignal,u=s?AbortSignal:a?o.AbortController:class e{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach(e=>e(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},f=new Set,c=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&g(n,`${e} option`,`options.${t}`,_)},l=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} method`,`cache.${t}()`,i)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} property`,`cache.${t}`,i)}},d=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!f.has(e),g=(e,t,n,r)=>{f.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;d(i,"DeprecationWarning",e,r)},b=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),m=e=>b(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=m(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class _{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:h,noUpdateTTL:g,maxSize:v=0,maxEntrySize:w=0,sizeCalculation:k,fetchMethod:j,fetchContext:x,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:D}=e,{length:E,maxAge:A,stale:C}=e instanceof _?{}:e;if(0!==t&&!b(t))throw new TypeError("max option must be a nonnegative integer");const M=t?m(t):Array;if(!M)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=w||this.maxSize,this.sizeCalculation=k||E,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=j||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&void 0!==x)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new M(t),this.prev=new M(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof l?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!S,0!==this.maxEntrySize){if(0!==this.maxSize&&!b(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!b(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!C,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=b(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||A||0,this.ttl){if(!b(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){f.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";d(t,"UnboundedCacheWarning",e,_)}}C&&c("stale","allowStale"),A&&c("maxAge","ttl"),E&&c("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,n=r.now())=>{if(this.starts[e]=0!==t?n:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?r.now():0};let e=0;const t=()=>{const t=r.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const r=this.keyMap.get(n);return void 0===r?0:0===this.ttls[r]||0===this.starts[r]?1/0:this.starts[r]+this.ttls[r]-(e||t())},this.isStale=n=>0!==this.ttls[n]&&0!==this.starts[n]&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!b(n)){if(!r)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!b(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return l("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const n=this.keyList[t],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,s={value:o};if(this.ttls){s.ttl=this.ttls[t];const e=r.now()-this.starts[t];s.start=Math.floor(Date.now()-e)}this.sizes&&(s.size=this.sizes[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),a=!1;else{const n=this.valList[u];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():i||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(u,n,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,n=this.keyList[t],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,n,"evict"),this.disposeAfter&&this.disposed.push([r,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const n=this.keyMap.get(e);return void 0!==n&&!this.isStale(n)&&(t&&this.updateItemAge(n),!0)}peek(e,{allowStale:t=this.allowStale}={}){const n=this.keyMap.get(e);if(void 0!==n&&(t||!this.isStale(n))){const e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const s=new o,a={signal:s.signal,options:n,context:r},u=t=>(s.signal.aborted||this.set(e,t,a.options),t),f=r=>{if(this.valList[t]===l){const r=!n.noDeleteOnFetchRejection||void 0===l.__staleWhileFetching;r?this.delete(e):this.valList[t]=l.__staleWhileFetching}if(l.__returned===l)throw r},c=t=>t(this.fetchMethod(e,i,a)),l=new Promise(c).then(u,f);return l.__abortController=s,l.__staleWhileFetching=i,l.__returned=null,void 0===t?(this.set(e,l,a.options),t=this.keyMap.get(e)):this.valList[t]=l,l}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:c=this.fetchContext,forceRefresh:l=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r});const h={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:u,noDeleteOnFetchRejection:f};let d=this.keyMap.get(e);if(void 0===d){const t=this.backgroundFetch(e,d,h,c);return t.__returned=t}{const r=this.valList[d];if(this.isBackgroundFetch(r))return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r;if(!l&&!this.isStale(d))return this.moveToTail(d),n&&this.updateItemAge(d),r;const i=this.backgroundFetch(e,d,h,c);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(r||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),n&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return l("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const n=this.keyList[e];this.dispose(t,n,"delete"),this.disposeAfter&&this.disposed.push([t,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return l("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=_}}}},"form-builder":{"package.json":function e(t,n,e){e.exports={name:"@steedos/form-builder",version:"3.6.2-patch.5",private:!1,publishConfig:{access:"public"},main:"dist/form-builder.min.js",homepage:"https://formbuilder.online/",repository:{url:"https://github.com/kevinchappell/formBuilder.git",type:"git"},files:["dist/**/*","docs/**/*","src/**/*"],author:"Kevin Chappell ",contributors:[],bugs:"https://github.com/kevinchappell/formBuilder/issues",description:"A jQuery plugin for drag and drop form building",keywords:["jquery-plugin","forms","drag and drop","form builder","form create"],license:"MIT",ignore:["**/*","node_modules","test"],config:{files:{test:["test/**/*.spec.js"],pluginsDir:"src/js/control_plugins/",fonts:"src/fonts",sass:"src/sass",formBuilder:{js:"src/js/form-builder.js",sass:["src/sass/form-builder.scss"]},formRender:{js:"src/js/form-render.js",sass:["src/sass/form-render.scss"]},site:["demo/assets/sass/site.scss"]},fontServer:"http://fontello.com",fontelloToken:"09d648f01d6c57cb9f9b8cc55043e0c0"},babel:{presets:[["@babel/preset-env",{targets:{browsers:["> 1%"]},loose:!0}]],comments:!1,plugins:["@babel/plugin-proposal-object-rest-spread","@babel/plugin-proposal-class-properties"]},scripts:{"build:analyze":"webpack --mode production -p --progress --config tools/webpack.config --analyze","build:plugins":"webpack --mode production -p --display-entrypoints --progress --config tools/webpack.plugins.config","build:vendor":"babel-node tools/build-vendor",build:"webpack --mode production -p --progress --config tools/webpack.config","build:all":"npm-run-all build:plugins build:vendor build copy",copy:"cp -a dist/* demo/assets/js/ && cp CONTRIBUTING.md docs/contributing.md && cp LICENSE docs/license.md && npm run copy:lang","copy:lang":"babel-node tools/copy-language-files","deploy:all":"npm-run-all deploy:demo deploy:site","deploy:demo":"node tools/deploy-demo.js","deploy:site":"node tools/deploy-site.js",docs:"mkdocs build",font:"babel-node tools/icon-font",lint:"eslint ./src --ext .js || true","semantic-release":"semantic-release","start:devServer":"webpack-dev-server --mode development --config tools/webpack.config",prestart:"npm-run-all -p build:vendor copy:lang",start:"npm run start:devServer",test:"npm run-script build"},dependencies:{jquery:">=3.4.1","jquery-ui-sortable":"*"},devDependencies:{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/node":"^7.10.5","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-syntax-object-rest-spread":"^7.8.3","@babel/plugin-transform-destructuring":"^7.10.4","@babel/preset-env":"^7.11.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.5",autoprefixer:"^9.8.6","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","clean-webpack-plugin":"^3.0.0",clui:"^0.3.6","compression-webpack-plugin":"^5.0.1","concat-files":"^0.1.1","cross-env":"^7.0.2","css-loader":"^4.2.1",eslint:"^7.7.0","eslint-loader":"^4.0.2","formbuilder-languages":"latest","fs-extra":"^9.0.1","html-webpack-harddisk-plugin":"^1.0.2","html-webpack-plugin":"^4.3.0",inquirer:"^7.3.3",mi18n:"^0.4.8","node-sass":"6.0.1","npm-run-all":"^4.1.5",opener:"^1.5.1","postcss-loader":"^3.0.0","replace-in-file":"^6.1.0",request:"^2.88.2","sass-loader":"10.5.2","semantic-release":"^17.1.1",semver:"^7.3.2","style-loader":"^1.2.1",unzipper:"^0.10.11",webpack:"^4.44.1","webpack-bundle-analyzer":"^3.8.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","wrapper-webpack-plugin":"^2.1.0"},prettier:{singleQuote:!0,trailingComma:"all",printWidth:120,semi:!1,arrowParens:"avoid",spaceAfterFunction:!1},engines:{},release:{branch:"master",verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},browserslist:["> 1%"]}},dist:{"form-builder.min.js":[]}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",module:"tslib.es6.js",main:"tslib.js"}},"tslib.es6.js":function e(t,n,e){e.export({__extends:()=>i,__assign:()=>o,__rest:()=>s,__decorate:()=>a,__param:()=>u,__metadata:()=>f,__awaiter:()=>c,__generator:()=>l,__createBinding:()=>h,__exportStar:()=>d,__values:()=>p,__read:()=>g,__spread:()=>b,__spreadArrays:()=>m,__spreadArray:()=>v,__await:()=>y,__asyncGenerator:()=>_,__asyncDelegator:()=>w,__asyncValues:()=>k,__makeTemplateObject:()=>j,__importStar:()=>S,__importDefault:()=>D,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>A}); +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this,i;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(r).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};function r(t){return this.each((function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var r=e(this),i=r.attr("data-target");i||(i=(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function s(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s())};var i=e.fn.alert;e.fn.alert=r,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.isLoading=!1};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.button"),o="object"==typeof n&&n;i||r.data("bs.button",i=new t(this,o)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",o=r.data();t+="Text",null==o.resetText&&r.data("resetText",r[i]()),setTimeout(e.proxy((function(){r[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var r=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var r=e(t.target).closest(".btn");n.call(r,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.carousel"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n),s="string"==typeof n?n:o.slide;i||r.data("bs.carousel",i=new t(this,o)),"number"==typeof n?i.to(n):s?i[s]():o.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),r;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var i,o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,r){var i=this.$element.find(".item.active"),o=r||this.getItemForDirection(n,i),s=this.interval,a="next"==n?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var f=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:f,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=e(this.$indicators.children()[this.getItemIndex(o)]);l&&l.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:f,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(a),o.addClass(a),i.one("bsTransitionEnd",(function(){o.removeClass([n,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var r=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this};var i=function(t){var r=e(this),i=r.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=r.attr("data-target")||i,s=e(document).find(o);if(s.hasClass("carousel")){var a=e.extend({},s.data(),r.data()),u=r.attr("data-slide-to");u&&(a.interval=!1),n.call(s,a),u&&s.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(r)}function r(n){return this.each((function(){var r=e(this),i=r.data("bs.collapse"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);!i&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),i||r.data("bs.collapse",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(r.call(i,"hide"),n||i.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var u=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[s](this.$element[0][u])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var r=this.dimension();this.$element[r](this.$element[r]())[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 i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[r](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,r){var i=e(r);this.addAriaAndCollapsedClass(n(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=e.fn.collapse;e.fn.collapse=r,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=n(i),s,a=o.data("bs.collapse")?"toggle":i.data();r.call(o,a)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?e(document).find(n):null;return r&&r.length?r:t.parent()}function o(r){r&&3===r.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=i(t),o={relatedTarget:this};n.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&e.contains(n[0],r.target)||(n.trigger(r=e.Event("hide.bs.dropdown",o)),r.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function s(t){return this.each((function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",a)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+a);if(u.length){var f=u.index(t.target);38==t.which&&f>0&&f--,40==t.which&&fdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},f.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&e(document).find(e.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 i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},f.prototype.getDefaults=function(){return f.DEFAULTS},f.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete r[i];return(n=e.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=u(n.template,n.whiteList,n.sanitizeFn)),n},f.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,r){n[e]!=r&&(t[e]=r)})),t},f.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},f.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},f.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},f.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=i[0].offsetWidth,h=i[0].offsetHeight;if(u){var d=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-hp.width?"left":"left"==s&&c.left-ls.top+s.height&&(i.top=s.top+s.height-u)}else{var f=t.left-o,c=t.left+o+n;fs.right&&(i.left=s.left+s.width-c)}return i},f.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},f.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},f.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(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},f.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},f.prototype.enable=function(){this.enabled=!0},f.prototype.disable=function(){this.enabled=!1},f.prototype.toggleEnabled=function(){this.enabled=!this.enabled},f.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},f.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},f.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=c,e.fn.tooltip.Constructor=f,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function n(n){return this.each((function(){var r=e(this),i=r.data("bs.popover"),o="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||r.data("bs.popover",i=new t(this,o)),"string"==typeof n&&i[n]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var r=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(jQuery),function(e){"use strict";function t(n,r){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var r=e(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[n]().top+r,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),n=this.options.offset+t-this.$scrollElement.height(),r=this.offsets,i=this.targets,o=this.activeTarget,s;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(s=i[i.length-1])&&this.activate(s);if(o&&e=r[s]&&(void 0===r[s+1]||e .active"),s=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!r.find("> .fade").length);function a(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&s?o.one("bsTransitionEnd",a).emulateTransitionEnd(t.TRANSITION_DURATION):a(),o.removeClass("in")};var r=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=r,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i=e-r&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),f=e.Event(u+".bs.affix");if(this.$element.trigger(f),f.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),r=t.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(t,r)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,r,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),s=t("path"),a=t("detect-libc");Math.random();var u=s.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+a.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(c){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(c.stack||c.message||c),new Error("Missing binary. See message above.")}f(e.exports)}function f(e){try{var t=process.binding("async_wrap"),n;if(t.asyncIdStackSize instanceof Function)n=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");l=t.constants.kStackLength,n=function(){return t.async_hook_fields[l]}}var r=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,s;if(!r||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,s=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var a=t.async_id_fields||t.async_uid_fields;function u(){for(var e=n(),t=new Array(e);e>0;--e){var i=a[o];t[e-1]={asyncId:i,triggerId:a[s]},r(i)}return t}function f(e){for(var t=0;t0)i.changeLanguage(e,r);else if(0!=a[u]){a[u]=0;var f=new XMLHttpRequest;f.overrideMimeType("application/json"),f.open("GET",u,!1),f.send(null),200===f.status?a[u]=1:a[u]=-1,n.addResourceBundle(e,s,JSON.parse(f.response)||{}),i.changeLanguage(e,r)}};n.changeLanguage=p;var g=function(e,t,n){return i.format(e,t,n)};n.format=g;var b=function(){return i.languages};n.getLanguages=b;var m=function(e,t){return i.loadLanguages(e,t)};n.loadLanguages=m;var v=function(e,t){return i.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};n.on=y;var _=function(e,t){return i.off(e,t)};n.off=_,r.__exportStar(t("./i18n/i18n"),n),r.__exportStar(t("./i18n/i18n.app"),n),r.__exportStar(t("./translations"),n)},i18n:{"i18n.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fallbackKeys=n.getObjectI18nTemplate=n.translationI18nObjects=n.addObjectsI18n=n.translationI18nObject=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="_",a="base",u="core",f="translation",c=function(e,t){var n={lng:t,ns:f};if((0,r.exists)(e,n))return(0,r._t)(e,n)},l=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},d=function(e,t){var n=h(e,t);return"".concat(n).concat("_","inlineHelpText")},p=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(n)},g=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},b=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},m=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,n){var r=l(t);return c(r,e)||n||""},_=function(e,t,n,r,i){var o=h(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=_(e,a,n,r,i))}return s||r||""},w=function(e,t,n,r,i){var o=d(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=w(e,a,n,r,i))}return s||r||""},k=function(e,t,n,r){var i=p(t,n);return c(i,e)||r||""},j=function(e,t,n,r,i,o){var s=g(t,n,r),a=c(s,e);if(!a){var u=v(o);u&&"base"!=t&&"core"!=t&&(a=j(e,u,n,r,i,o))}return a||i||""},x=function(e,t,n,r,i){var o=b(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=x(e,a,n,r,i))}return s||r||""},S=function(e,t,n,r,i){var o=m(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=S(e,a,n,r,i))}return s||r||""},D=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},E=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},A=function(e,t,n){n.label=y(e,t,n.label),i.each(n.fields,(function(r,o){if(r.label=_(e,t,o,r.label,n.datasource),r.inlineHelpText&&(r.inlineHelpText=w(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(r.group=k(e,t,r.group,r.group)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var a=j(e,t,o,r.value,r.label,n.datasource);s.push(i.extend({},r,{label:a}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=x(e,t,i,r.label,n.datasource)})),i.each(n.list_views,(function(r,i){r.label=S(e,t,i,r.label,n.datasource)}))};n.translationI18nObject=A;var C=function(e){i.each(e,(function(e){(0,r.addResourceBundle)(e.lng,f,e.data,!0,!0)}))};n.addObjectsI18n=C;var M=function(e,t){i.each(t,(function(t,r){(0,n.translationI18nObject)(e,r,t)}))};n.translationI18nObjects=M;var O=function(e,t,n){var r=o(n);E(r);var s={};return s[l(t)]=y(e,t,r.label),i.each(r.fields,(function(n,o){s[h(t,o)]=_(e,t,o,n.label),n.inlineHelpText&&(s[d(t,o)]=w(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(s[p(t,n.group)]=k(e,t,n.group,n.group)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[g(t,o,n.value)]=j(e,t,o,n.value,n.label))}))})),i.each(r.actions,(function(n,r){s[b(t,r)]=x(e,t,r,n.label)})),i.each(r.list_views,(function(n,r){s[m(t,r)]=S(e,t,r,n.label)})),s};n.getObjectI18nTemplate=O,n.fallbackKeys={getObjectLabelKey:l,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:d,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:g,getObjectActionLabelKey:b,getObjectListviewLabelKey:m}},"i18n.app.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.appFallbackKeys=n.getAppI18nTemplate=n.translationI18nApps=n.translationI18nMenus=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="translation",a="_",u=function(e,t){var n={lng:t,ns:s};if((0,r.exists)(e,n))return(0,r._t)(e,n)},f=function(e){return"app".concat("_").concat(e).concat("_","name")},c=function(e){return"app".concat("_").concat(e).concat("_","description")},l=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(n)},h=function(e){return"menu".concat("_").concat(e)},d=function(e){return"tab".concat("_").concat(e)},p=function(e,t,n){var r=f(t);return u(r,e)||n||""},g=function(e,t,n){var r=c(t);return u(r,e)||n||""},b=function(e,t,n){var r=h(t);return u(r,e)||n||""},m=function(e,t,r){r.label=p(e,t,r.label||r.name),r.description=g(e,t,r.description),(0,n.translationI18nMenus)(e,r.admin_menus)},v=function(e,t){i.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=y;var _=function(e,t,n){var r=o(n),s={};return s[f(t)]=p(e,t,r.label||r.name),s[c(t)]=g(e,t,r.description),i.each(r.admin_menus,(function(t){s[h(t._id)]=b(e,t._id,t.label||t.name)})),s};n.getAppI18nTemplate=_,n.appFallbackKeys={getAppLabelKey:f,getAppDescriptionKey:c,getAppGroupKey:l,getMenuLabelKey:h,getTabKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var r=t("tslib"),i=t("underscore");r.__exportStar(t("./objectTranslation"),n),r.__exportStar(t("./translation"),n),r.__exportStar(t("./templates/objectTranslation"),n),r.__exportStar(t("./templates/translation"),n);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},s=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(r){console.error("Creator.convertFieldsOptions",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},a;n.convertObject=s,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(a=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),s=t("../index"),a=t("./index"),u=t("../i18n/i18n"),f=t("lodash"),c=t("crypto"),l,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function d(e){var t;return c.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(d(JSON.stringify(t)))},g=t("clone"),b=".",m="base",v="core",y="translation",_="object",w="field",k="listview",j="action",x=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,s.exists)(e,n))return(0,s._t)(e,n)},S=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},D=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},E=function(e){var t;return[D(),e].join(".")},A=function(e){var t;return[D("object"),e,"label"].join(".")},C=function(e){var t;return[D("object"),e,"description"].join(".")},M=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},T=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},B=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),r;return[D("field"),e,"group",n].join(".")},I=function(e,t,n){var r;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},R=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},P=function(e,t,n){var r,i=[A(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),x(i,e)||n||""};n.translationObjectLabel=P;var N=function(e,t,n){var r=C(t);return x(r,e)||n||""},L=function(e,t,n,r,i,o){var s,a=[M(t,n)],f=u.fallbackKeys.getObjectFieldLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=L(e,l,n,r,i))}return c||r||""},z=function(e,t,n,r,i,o){var s,a=[O(t,n)],f=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=z(e,l,n,r,i))}return c||r||""},U=function(e,t,n,r,i,o){var s=T(t,n),a,u=x([s],e);if(1!=o&&!u){var f=S(i);f&&"base"!=t&&"core"!=t&&(u=U(e,f,n,r,i))}return u||r||""},q=function(e,t,n,r,i,o){var s,a=[B(t,n)],f=u.fallbackKeys.getObjectFieldGroupKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=q(e,l,n,r,i))}return c||r||""},$=function(e,t,n,r,i,o,s){var a,f=[I(t,n,r)],c=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,r);c&&f.push(c);var l=x(f,e);if(1!=s&&!l){var h=S(o);h&&"base"!=t&&"core"!=t&&(l=$(e,h,n,r,i,o))}return l||i||""},W=function(e,t,n,r,i,o){var s,a=[R(t,n)],f=u.fallbackKeys.getObjectActionLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=W(e,l,n,r,i))}return c||r||""},H=function(e,t,n,r,i,o){var s,a=[F(t,n)],f=u.fallbackKeys.getObjectListviewLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=H(e,l,n,r,i))}return c||r||""},Y=function(e,t,r,o,s){void 0===s&&(s=!1);var u=p(e,r),c=h.get(u);if(c)return Object.assign(r,(0,f.cloneDeep)(c));o&&(0,a.convertObject)(r),r.label=(0,n.translationObjectLabel)(e,t,r.label),r.description=N(e,t,r.description),i.each(r.fields,(function(n,o){if(n.label=L(e,t,o,n.label,r.datasource,s),n.inlineHelpText=z(e,t,o,n.inlineHelpText,r.datasource,s),n.description=U(e,t,o,n.description,r.datasource,s),n.group&&(n.group=q(e,t,n.group,n.group,r.datasource,s)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var u=$(e,t,o,n.value,n.label,r.datasource,s);a.push(i.extend({},n,{label:u}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=W(e,t,i,n.label,r.datasource,s)})),i.each(r.list_views,(function(n,i){n.label=H(e,t,i,n.label,r.datasource,s)})),h.set(u,(0,f.cloneDeep)(r))};n.translationObject=Y;var V=function(e,t){i.each(t,(function(t,r){(0,n.translationObject)(e,r,t)}))};n.translationObjects=V;var K=function(e,t,r){var o=g(r);(0,a.convertObject)(o);var s={};return s[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),s[C(t)]=N(e,t,o.description),i.each(o.fields,(function(n,r){s[M(t,r)]=L(e,t,r,n.label),n.inlineHelpText&&(s[O(t,r)]=z(e,t,r,n.inlineHelpText,o.datasource)),n.description&&(s[T(t,r)]=U(e,t,r,n.description,o.datasource)),n.group&&(s[B(t,n.group)]=q(e,t,n.group,n.group,o.datasource)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[I(t,r,n.value)]=$(e,t,r,n.value,n.label))}))})),i.each(o.actions,(function(n,r){s[R(t,r)]=W(e,t,r,n.label)})),i.each(o.list_views,(function(n,r){s[F(t,r)]=H(e,t,r,n.label)})),s};function G(e,t){var n=g(e);(0,a.convertObject)(n);var r={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),r[A(o)]=n.label,r[C(o)]=n.description,i.each(n.fields,(function(e,t){r[M(o,t)]=e.label,e.help&&(r[O(o,t)]=e.help),e.description&&(r[T(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(r[I(o,t,e.value)]=e.label)}))})),i.each(n.groups,(function(e,t){r[B(o,t)]=e})),i.each(n.actions,(function(e,t){r[R(o,t)]=e.label})),i.each(n.listviews,(function(e,t){r[F(o,t)]=e.label})),i.each(n.CustomLabels,(function(e,t){r[E(t)]=e})),r}n.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,s.addResourceBundle)(e.lng,y,t,!0,!0)}))};n.addObjectsTranslation=X},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addTranslations=n.convertTranslation=n.convertTranslationData=n.getAppTranslationTemplate=n.translationApps=n.translationMenus=n.translationApp=n.translationTabLabel=n.translationTabGroup=void 0;var r=t("../index"),i=t("underscore"),o=t("./"),s=t("../i18n/i18n.app"),a=t("clone"),u="translation",f=".",c="app",l="menu",h="tab",d=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[d(),e].join(".")},g=function(e,t){var n={lng:t,ns:u,keySeparator:!1};if((0,r.exists)(e,n))return(0,r._t)(e,n)},b=function(e){var t;return[d("app"),e,"name"].join(".")},m=function(e){var t;return[d("app"),e,"description"].join(".")},v=function(e,t){var n,r;return[d("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[d("menu"),"menu_".concat(e)].join(".")},_=function(e){var t;return[d("tab"),e].join(".")},w=function(e,t,n){var r,i=[b(t)],o=s.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),g(i,e)||n||""},k=function(e,t,n){var r,i=[m(t)],o=s.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),g(i,e)||n||""},j=function(e,t,n,r){var i,o=[v(t,n)],a=s.appFallbackKeys.getAppGroupKey(t,n);return a&&o.push(a),g(o,e)||r||""};n.translationTabGroup=j;var x=function(e,t,n){var r,i=[y(t)],o=s.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),g(i,e)||n||""},S=function(e,t,n){var r,i=[_(t)],o=s.appFallbackKeys.getTabKey(t);return o&&i.push(o),g(i,e)||n||""};n.translationTabLabel=S;var D=function(e,t,r){r.label=w(e,t,r.label||r.name),r.description=k(e,t,r.description),i.each(r.tab_groups,(function(i,o){r.tab_groups[o].id=i.id||i.group_name,r.tab_groups[o].group_name=(0,n.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,n.translationMenus)(e,r.admin_menus)};n.translationApp=D;var E=function(e,t){i.each(t,(function(t){var n=x(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=E;var A=function(e,t){i.each(t,(function(t,r){(0,n.translationApp)(e,r,t)}))};n.translationApps=A;var C=function(e,t,n){var r=a(n),o={};return o[b(t)]=w(e,t,r.label||r.name),o[m(t)]=k(e,t,r.description),i.each(r.admin_menus,(function(t){o[y(t._id)]=x(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var M=function(e,t,n){i.isArray(n)?i.each(n,(function(e){M(e,"",e)})):n&&i.each(i.keys(n),(function(r){var o=t?"".concat(t,".").concat(r):r,s=n[r];"object"==typeof s?i.isArray(s)?i.each(s,(function(e){M(e,o,s)})):M(e,o,s):e[o]=s}))};function O(e){for(var t in e)"object"==typeof e[t]&&M(e,t,e[t]);return e}n.convertTranslationData=O;var T=function(e){var t=a(e),n={};return i.each(t.CustomApplications,(function(e,t){n[b(t)]=e.name,n[m(t)]=e.description,i.each(e.groups,(function(e,r){n[v(t,r)]=e}))})),i.each(t.CustomTabs,(function(e,t){n[_(t)]=e})),i.each(t.CustomLabels,(function(e,t){var r;if("simpleschema"!=t&&i.isObject(e)){var o=O(((r={})[t]=e,r));i.each(o,(function(e,t){i.isObject(e)||(n[p(t)]=e)}))}else n[p(t)]=e})),n};n.convertTranslation=T;var B=function(e){i.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,r.addResourceBundle)(e.lng,u,t,!0,!0)}))};n.addTranslations=B},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function a(e){return s(["label","description"],e)}function u(e){switch(e.type){case"select":return s(["label","help","options","description"],e);default:return s(["label","help","description"],e)}}function f(e){return s(["label"],e)}function c(e){return s(["label"],e)}function l(e){var t={};return r.each(e,(function(e,n){t[n]=u(e)})),t}function h(e){var t={};return r.each(e,(function(e,n){t[n]=c(e)})),t}function d(e){var t={};return r.each(e,(function(e,n){t[n]=f(e)})),t}function p(e,t){var n={};return r.each(e,(function(e,r){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[i]=t[r].group}})),n}var g=function(e,t,n,s){void 0===s&&(s=!1);var u=o(n);1!=s&&(0,i.translationObject)(e,t,u,!0,s);var f=Object.assign({},a(u));f=Object.assign({},f,{fields:l(u.fields)});var c=p(n.fields,u.fields);r.isEmpty(c)||(f=Object.assign({},f,{groups:c}));var g=d(u.list_views);r.isEmpty(g)||(f=Object.assign({},f,{listviews:g}));var b=h(u.actions);return r.isEmpty(b)||(f=Object.assign({},f,{actions:b})),Object.assign({name:t},f)};n.getObjectMetadataTranslationTemplate=g},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]=t[e]||""})),n}function a(e){var t={groups:{}};return e?(r.each(e,(function(e){var n=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[n]=e.group_name})),t):{}}var u=function(e){return Object.assign({},s(["name","description"],e),a(e.tab_groups))},f=function(e){var t={};return r.each(e,(function(e,n){t[n]=n})),t},c=function(e){var t={};return r.each(e,(function(e){var n=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[n]=e})),t},l=function(e,t,n){var r,s=o(n);(0,i.translationApp)(e,t,s);var a={},l;return s.tab_items?a=f(s.tab_items):s.tabs&&(a=c(s.tabs)),Object.assign({},{CustomApplications:(r={},r[t]=u(s),r)},{CustomTabs:a})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",module:"./dist/esm/i18next.js",main:"./dist/cjs/i18next.js"}},dist:{esm:{"i18next.js":function e(t,n,e){let r,i,o,s,a,u,f,c;e.link("@babel/runtime/helpers/esm/typeof",{default(e){r=e}},0),e.link("@babel/runtime/helpers/esm/objectSpread",{default(e){i=e}},1),e.link("@babel/runtime/helpers/esm/classCallCheck",{default(e){o=e}},2),e.link("@babel/runtime/helpers/esm/createClass",{default(e){s=e}},3),e.link("@babel/runtime/helpers/esm/possibleConstructorReturn",{default(e){a=e}},4),e.link("@babel/runtime/helpers/esm/getPrototypeOf",{default(e){u=e}},5),e.link("@babel/runtime/helpers/esm/assertThisInitialized",{default(e){f=e}},6),e.link("@babel/runtime/helpers/esm/inherits",{default(e){c=e}},7);var l={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,n){console&&console[t]&&console[t].apply(console,n)}},h,d=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n)}return s(e,[{key:"init",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||l,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function y(e,t,n){var r=v(e,t,Object),i,o;r.obj[r.k]=n}function _(e,t,n,r){var i=v(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function w(e,t){var n=v(e,t),r=n.obj,i=n.k;if(r)return r[i]}function k(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return c(t,e),s(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[t,n];return r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split(".")),w(this.data,s)}},{key:"addResource",value:function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(i=n,n=(a=t.split("."))[1]),this.addNamespaces(n),y(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}},{key:"addResources",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}},{key:"addResourceBundle",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},u=[t,n];t.indexOf(".")>-1&&(o=r,r=n,n=(u=t.split("."))[1]),this.addNamespaces(n);var f=w(this.data,u)||{};o?j(f,r,s):f=i({},f,r),y(this.data,u,f),a.silent||this.emit("added",t,n,r)}},{key:"removeResourceBundle",value:function e(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}},{key:"hasResourceBundle",value:function e(t,n){return void 0!==this.getResource(t,n)}},{key:"getResourceBundle",value:function e(t,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(t,n)):this.getResource(t,n)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(p),C={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,r,i,o){var s=this;return t.forEach((function(e){s.processors[e]&&(n=s.processors[e].process(n,r,i,o))})),n}},M={},O=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),m(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,f(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=d.create("translator"),n}return c(t,e),s(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,n);return r&&void 0!==r.res}},{key:"extractFromKey",value:function e(t,n){var r=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:o};var a=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,o,s){var a=this;if("object"!==r(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var u=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(n[n.length-1],o),c=f.key,l=f.namespaces,h=l[l.length-1],d=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=o.nsSeparator||this.options.nsSeparator;return h+g+c}return c}var b=this.resolve(n,o),m=b&&b.res,v=b&&b.usedKey||c,y=b&&b.exactUsedKey||c,_=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(j&&m&&x&&w.indexOf(_)<0&&("string"!=typeof k||"[object Array]"!==_)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,o):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(u){var S="[object Array]"===_,D=S?[]:{},E=S?y:v;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var C="".concat(E).concat(u).concat(A);D[A]=this.translate(C,i({},o,{joinArrays:!1,ns:l})),D[A]===C&&(D[A]=m[A])}m=D}}else if(j&&"string"==typeof k&&"[object Array]"===_)(m=m.join(k))&&(m=this.extendTranslation(m,n,o,s));else{var M=!1,O=!1,T=void 0!==o.count&&"string"!=typeof o.count,B=t.hasDefaultValue(o),I=T?this.pluralResolver.getSuffix(d,o.count):"",R=o["defaultValue".concat(I)]||o.defaultValue;!this.isValidLookup(m)&&B&&(M=!0,m=R),this.isValidLookup(m)||(O=!0,m=c);var F=B&&R!==m&&this.options.updateMissing;if(O||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,h,c,F?R:m),u){var P=this.resolve(c,i({},o,{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},i,o,s,a,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(i)){var t=n.extractFromKey(e,r),f=t.key;o=f;var c=t.namespaces;n.options.fallbackNS&&(c=c.concat(n.options.fallbackNS));var l=void 0!==r.count&&"string"!=typeof r.count,h=void 0!==r.context&&"string"==typeof r.context&&""!==r.context,d=r.lngs?r.lngs:n.languageUtils.toResolveHierarchy(r.lng||n.language,r.fallbackLng);c.forEach((function(e){n.isValidLookup(i)||(u=e,!M["".concat(d[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(u)&&(M["".concat(d[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(t){if(!n.isValidLookup(i)){a=t;var o=f,u=[o],c,d;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(u,f,t,e,r);else l&&(c=n.pluralResolver.getSuffix(t,r.count)),l&&h&&u.push(o+c),h&&u.push(o+="".concat(n.options.contextSeparator).concat(r.context)),l&&u.push(o+=c);for(;d=u.pop();)n.isValidLookup(i)||(s=d,i=n.getResource(t,e,d,r))}})))}))}})),{res:i,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:u}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&void 0!==t[r])return!0;return!1}}]),t}(p);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}var B=function(){function e(t){o(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d.create("languageUtils")}return s(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=T(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var n=this,r;return t?(t.forEach((function(e){if(!r){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(r=t)}})),!r&&this.options.supportedLngs&&t.forEach((function(e){if(!r){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return r=t;r=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function e(t,n){if(!t)return[];if("function"==typeof t&&(t=t(n)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function e(t,n){var r=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=function e(t){t&&(r.isSupportedCode(t)?o.push(t):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(t))):"string"==typeof t&&s(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&s(r.formatLanguageCode(e))})),o}}]),e}(),I=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],R={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function F(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:R[t.fc]}}))})),e}var P=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.languageUtils=t,this.options=n,this.logger=d.create("pluralResolver"),this.rules=F()}return s(e,[{key:"addRule",value:function e(t,n){this.rules[t]=n}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,n){return this.getSuffixes(t).map((function(e){return n+e}))}},{key:"getSuffixes",value:function e(t){var n=this,r=this.getRule(t);return r?r.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var r=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(n):i.plurals(Math.abs(n)),s=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var a=function e(){return r.options.prepend&&s.toString()?r.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=d.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=void 0!==n.escape?n.escape:D,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?x(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?x(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?x(n.nestingPrefix):n.nestingPrefixEscaped||x("$t("),this.nestingSuffix=n.nestingSuffix?x(n.nestingSuffix):n.nestingSuffixEscaped||x(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function e(t,n,r,i){var o=this,s,a,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function e(t){if(t.indexOf(o.formatSeparator)<0){var s=k(n,f,t);return o.alwaysFormat?o.format(s,void 0,r):s}var a=t.split(o.formatSeparator),u=a.shift().trim(),c=a.join(o.formatSeparator).trim();return o.format(k(n,f,u),c,r,i)};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return c(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?c(o.escape(t)):c(t)}}].forEach((function(e){for(u=0;s=e.regex.exec(t);){if(void 0===(a=l(s[1].trim())))if("function"==typeof h){var n=h(t,s,i);a="string"==typeof n?n:""}else{if(d){a=s[0];continue}o.logger.warn("missed to pass in variable ".concat(s[1]," for interpolating ").concat(t)),a=""}else"string"==typeof a||o.useRawValueToEscape||(a=b(a));if(t=t.replace(s[0],e.safeValue(a)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s,a,u=i({},o);function f(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(s){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),s),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e}for(u.applyPostProcessor=!1,delete u.defaultValue;s=this.nestingRegexp.exec(t);){var c=[],l=!1;if(s[0].includes(this.formatSeparator)&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map((function(e){return e.trim()}));s[1]=h.shift(),c=h,l=!0}if((a=n(f.call(this,s[1].trim(),u),u))&&s[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=b(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return r.format(e,t,o.lng,o)}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}]),e}();function L(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var z=function(e){function t(e,n,r){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o(this,t),i=a(this,u(t).call(this)),E&&p.call(f(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=s,i.logger=d.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,s.backend,s),i}return c(t,e),s(t,[{key:"queueLoad",value:function e(t,n,r,i){var o=this,s=[],a=[],u=[],f=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var i="".concat(e,"|").concat(n);!r.reload&&o.store.hasResourceBundle(e,n)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?a.indexOf(i)<0&&a.push(i):(o.state[i]=1,t=!1,a.indexOf(i)<0&&a.push(i),s.indexOf(i)<0&&s.push(i),f.indexOf(n)<0&&f.push(n)))})),t||u.push(e)})),(s.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:s,pending:a,toLoadLanguages:u,toLoadNamespaces:f}}},{key:"loaded",value:function e(t,n,r){var i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(r){_(r.loaded,[o],s),L(r.pending,t),n&&r.errors.push(n),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){e[t]||(e[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,n,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,n,r,o+1,2*s,a)}),s):a(e,u)})):a(null,{})}},{key:"prepareLoading",value:function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var s=this.queueLoad(t,n,i,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function e(t,n,r){this.prepareLoading(t,n,{},r)}},{key:"reload",value:function e(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}},{key:"loadOne",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],s=i[1];this.read(o,s,"read",void 0,void 0,(function(e,i){e&&n.logger.warn("".concat(r,"loading namespace ").concat(s," for language ").concat(o," failed"),e),!e&&i&&n.logger.log("".concat(r,"loaded namespace ").concat(s," for language ").concat(o),i),n.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(t,n,r,o,null,i({},a,{isUpdate:s})),t&&t[0]&&this.store.addResource(t[0],n,r,o))}}]),t}(p);function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var n={};if("object"===r(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===r(t[2])||"object"===r(t[3])){var i=t[3]||t[2];Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n},interpolation:{escapeValue:!0,format:function e(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function q(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $(){}var W,H=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(o(this,t),e=a(this,u(t).call(this)),E&&p.call(f(e)),e.options=q(n),e.services={},e.logger=d,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),a(e,f(e));setTimeout((function(){e.init(n,r)}),0)}return e}return c(t,e),s(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},U(),this.options,q(n)),this.format=this.options.interpolation.format,r||(r=$),!this.options.isClone){this.modules.logger?d.init(o(this.modules.logger),this.options):d.init(null,this.options);var s=new B(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=d,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new P(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new N(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new z(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var l=g(),h=function e(){var n=function e(n,i){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(i),r(n,i)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return n(null,t.t.bind(t));t.changeLanguage(t.options.lng,n)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),l}},{key:"loadResources",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,i=r,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var s=[],a=function e(t){var r;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(s,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,n,r){var i=g();return t||(t=this.languages),n||(n=this.options.ns),r||(r=$),this.services.backendConnector.reload(t,n,(function(e){i.resolve(),r(e)})),i}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&C.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var r=this;this.isLanguageChangingTo=t;var i=g();this.emit("languageChanging",t);var o=function e(t,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,i.resolve((function(){return r.t.apply(r,arguments)})),n&&n(t,(function(){return r.t.apply(r,arguments)}))},s=function e(t){var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||(r.language=n,r.languages=r.services.languageUtils.toResolveHierarchy(n)),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,(function(e){o(e,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(t):s(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,n){var o=this,s=function e(t,n){var s;if("object"!==r(n)){for(var a=arguments.length,u=new Array(a>2?a-2:0),f=2;f1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],o=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function e(t,r){var i=n.services.backendConnector.state["".concat(t,"|").concat(r)];return-1===i||2===i};if(r.precheck){var u=r.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!a(i,t)||o&&!a(s,t)))}},{key:"loadNamespaces",value:function e(t,n){var r=this,i=g();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var r=g();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(n&&n(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var n}},{key:"createInstance",value:function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(n,r)}},{key:"cloneInstance",value:function e(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,s=i({},this.options,r,{isClone:!0}),a=new t(s),u=["store","services","language"];return u.forEach((function(e){a[e]=n[e]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new O(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rr,root:()=>i,ArrayProto:()=>o,ObjProto:()=>s,SymbolProto:()=>a,push:()=>u,slice:()=>f,toString:()=>c,hasOwnProperty:()=>l,supportsArrayBuffer:()=>h,supportsDataView:()=>d,nativeIsArray:()=>p,nativeKeys:()=>g,nativeCreate:()=>b,nativeIsView:()=>m,_isNaN:()=>v,_isFinite:()=>y,hasEnumBug:()=>_,nonEnumerableProps:()=>w,MAX_ARRAY_INDEX:()=>k});var r="1.13.4",i="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,u=o.push,f=o.slice,c=s.toString,l=s.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,p=Array.isArray,g=Object.keys,b=Object.create,m=h&&ArrayBuffer.isView,v=isNaN,y=isFinite,_=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=Math.pow(2,53)-1},"restArguments.js":function e(t,n,e){function r(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;ir})},"isObject.js":function e(t,n,e){function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}e.export({default:()=>r})},"isNull.js":function e(t,n,e){function r(e){return null===e}e.export({default:()=>r})},"isUndefined.js":function e(t,n,e){function r(e){return void 0===e}e.export({default:()=>r})},"isBoolean.js":function e(t,n,e){let r;function i(e){return!0===e||!1===e||"[object Boolean]"===r.call(e)}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isElement.js":function e(t,n,e){function r(e){return!(!e||1!==e.nodeType)}e.export({default:()=>r})},"isString.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("String"))},"_tagTester.js":function e(t,n,e){let r;function i(e){var t="[object "+e+"]";return function(e){return r.call(e)===t}}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isNumber.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Number"))},"isDate.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Date"))},"isRegExp.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("RegExp"))},"isError.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Error"))},"isSymbol.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Symbol"))},"isArrayBuffer.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("ArrayBuffer"))},"isDataView.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isArrayBuffer.js",{default(e){o=e}},2),e.link("./_stringTagBug.js",{hasStringTagBug(e){s=e}},3);var a=r("DataView");function u(e){return null!=e&&i(e.getInt8)&&o(e.buffer)}e.exportDefault(s?u:a)},"isFunction.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_setup.js",{root(e){i=e}},1);var o=r("Function"),s=i.document&&i.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof s&&(o=function(e){return"function"==typeof e||!1}),e.exportDefault(o)},"_stringTagBug.js":function e(t,n,e){let r,i;e.export({hasStringTagBug:()=>o,isIE11:()=>s}),e.link("./_setup.js",{supportsDataView(e){r=e}},0),e.link("./_hasObjectTag.js",{default(e){i=e}},1);var o=r&&i(new DataView(new ArrayBuffer(8))),s="undefined"!=typeof Map&&i(new Map)},"_hasObjectTag.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Object"))},"isArray.js":function e(t,n,e){let r,i;e.link("./_setup.js",{nativeIsArray(e){r=e}},0),e.link("./_tagTester.js",{default(e){i=e}},1),e.exportDefault(r||i("Array"))},"isArguments.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1);var o=r("Arguments");!function(){o(arguments)||(o=function(e){return i(e,"callee")})}(),e.exportDefault(o)},"_has.js":function e(t,n,e){let r;function i(e,t){return null!=e&&r.call(e,t)}e.export({default:()=>i}),e.link("./_setup.js",{hasOwnProperty(e){r=e}},0)},"isFinite.js":function e(t,n,e){let r,i;function o(e){return!i(e)&&r(e)&&!isNaN(parseFloat(e))}e.export({default:()=>o}),e.link("./_setup.js",{_isFinite(e){r=e}},0),e.link("./isSymbol.js",{default(e){i=e}},1)},"isNaN.js":function e(t,n,e){let r,i;function o(e){return i(e)&&r(e)}e.export({default:()=>o}),e.link("./_setup.js",{_isNaN(e){r=e}},0),e.link("./isNumber.js",{default(e){i=e}},1)},"isTypedArray.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./_setup.js",{supportsArrayBuffer(e){r=e},nativeIsView(e){i=e},toString(e){o=e}},0),e.link("./isDataView.js",{default(e){s=e}},1),e.link("./constant.js",{default(e){a=e}},2),e.link("./_isBufferLike.js",{default(e){u=e}},3);var f=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function c(e){return i?i(e)&&!s(e):u(e)&&f.test(o.call(e))}e.exportDefault(r?c:a(!1))},"constant.js":function e(t,n,e){function r(e){return function(){return e}}e.export({default:()=>r})},"_isBufferLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getByteLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createSizePropertyCheck.js":function e(t,n,e){let r;function i(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=r}}e.export({default:()=>i}),e.link("./_setup.js",{MAX_ARRAY_INDEX(e){r=e}},0)},"_getByteLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("byteLength"))},"_shallowProperty.js":function e(t,n,e){function r(e){return function(t){return null==t?void 0:t[e]}}e.export({default:()=>r})},"isEmpty.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(null==e)return!0;var t=r(e);return"number"==typeof t&&(i(e)||o(e)||s(e))?0===t:0===r(a(e))}e.export({default:()=>u}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3),e.link("./keys.js",{default(e){a=e}},4)},"_getLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("length"))},"keys.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(!r(e))return[];if(i)return i(e);var t=[];for(var n in e)s(e,n)&&t.push(n);return o&&a(e,t),t}e.export({default:()=>u}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeKeys(e){i=e},hasEnumBug(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2),e.link("./_collectNonEnumProps.js",{default(e){a=e}},3)},"_collectNonEnumProps.js":function e(t,n,e){let r,i,o,s;function a(e){for(var t={},n=e.length,r=0;ru}),e.link("./_setup.js",{nonEnumerableProps(e){r=e},ObjProto(e){i=e}},0),e.link("./isFunction.js",{default(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2)},"isMatch.js":function e(t,n,e){let r;function i(e,t){var n=r(t),i=n.length;if(null==e)return!i;for(var o=Object(e),s=0;si}),e.link("./keys.js",{default(e){r=e}},0)},"isEqual.js":function e(t,n,e){let r,i,o,s,a,u,f,c,l,h,d;e.export({default:()=>m}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_setup.js",{toString(e){i=e},SymbolProto(e){o=e}},1),e.link("./_getByteLength.js",{default(e){s=e}},2),e.link("./isTypedArray.js",{default(e){a=e}},3),e.link("./isFunction.js",{default(e){u=e}},4),e.link("./_stringTagBug.js",{hasStringTagBug(e){f=e}},5),e.link("./isDataView.js",{default(e){c=e}},6),e.link("./keys.js",{default(e){l=e}},7),e.link("./_has.js",{default(e){h=e}},8),e.link("./_toBufferView.js",{default(e){d=e}},9);var p="[object DataView]";function g(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&b(e,t,n,r)}function b(e,t,n,m){e instanceof r&&(e=e._wrapped),t instanceof r&&(t=t._wrapped);var v=i.call(e);if(v!==i.call(t))return!1;if(f&&"[object Object]"==v&&c(e)){if(!c(t))return!1;v=p}switch(v){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(t);case"[object ArrayBuffer]":case p:return b(d(e),d(t),n,m)}var y="[object Array]"===v;if(!y&&a(e)){var _;if(s(e)!==s(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;y=!0}if(!y){if("object"!=typeof e||"object"!=typeof t)return!1;var w=e.constructor,k=t.constructor;if(w!==k&&!(u(w)&&w instanceof w&&u(k)&&k instanceof k)&&"constructor"in e&&"constructor"in t)return!1}m=m||[];for(var j=(n=n||[]).length;j--;)if(n[j]===e)return m[j]===t;if(n.push(e),m.push(t),y){if((j=e.length)!==t.length)return!1;for(;j--;)if(!g(e[j],t[j],n,m))return!1}else{var x=l(e),S;if(j=x.length,l(t).length!==j)return!1;for(;j--;)if(S=x[j],!h(t,S)||!g(e[S],t[S],n,m))return!1}return n.pop(),m.pop(),!0}function m(e,t){return g(e,t)}},"underscore.js":function e(t,n,e){let r;function i(e){return e instanceof i?e:this instanceof i?void(this._wrapped=e):new i(e)}e.export({default:()=>i}),e.link("./_setup.js",{VERSION(e){r=e}},0),i.VERSION=r,i.prototype.value=function(){return this._wrapped},i.prototype.valueOf=i.prototype.toJSON=i.prototype.value,i.prototype.toString=function(){return String(this._wrapped)}},"_toBufferView.js":function e(t,n,e){let r;function i(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,r(e))}e.export({default:()=>i}),e.link("./_getByteLength.js",{default(e){r=e}},0)},"isMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},mapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Map"))},"_methodFingerprint.js":function e(t,n,e){let r,i,o;function s(e){var t=r(e);return function(n){if(null==n)return!1;var s=o(n);if(r(s))return!1;for(var u=0;us,mapMethods:()=>l,weakMapMethods:()=>h,setMethods:()=>d}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./allKeys.js",{default(e){o=e}},2);var a="forEach",u="has",f=["clear","delete"],c=["get","has","set"],l=f.concat(a,c),h=f.concat(c),d=["add"].concat(f,a,"has")},"allKeys.js":function e(t,n,e){let r,i,o;function s(e){if(!r(e))return[];var t=[];for(var n in e)t.push(n);return i&&o(e,t),t}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{hasEnumBug(e){i=e}},1),e.link("./_collectNonEnumProps.js",{default(e){o=e}},2)},"isWeakMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},weakMapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("WeakMap"))},"isSet.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},setMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Set"))},"isWeakSet.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("WeakSet"))},"values.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"pairs.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"invert.js":function e(t,n,e){let r;function i(e){for(var t={},n=r(e),i=0,o=n.length;ii}),e.link("./keys.js",{default(e){r=e}},0)},"functions.js":function e(t,n,e){let r;function i(e){var t=[];for(var n in e)r(e[n])&&t.push(n);return t.sort()}e.export({default:()=>i}),e.link("./isFunction.js",{default(e){r=e}},0)},"extend.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createAssigner.js":function e(t,n,e){function r(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;ir})},"extendOwn.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"defaults.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i,!0))},"create.js":function e(t,n,e){let r,i;function o(e,t){var n=r(e);return t&&i(n,t),n}e.export({default:()=>o}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./extendOwn.js",{default(e){i=e}},1)},"_baseCreate.js":function e(t,n,e){let r,i;function o(){return function(){}}function s(e){if(!r(e))return{};if(i)return i(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeCreate(e){i=e}},1)},"clone.js":function e(t,n,e){let r,i,o;function s(e){return r(e)?i(e)?e.slice():o({},e):e}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./extend.js",{default(e){o=e}},2)},"tap.js":function e(t,n,e){function r(e,t){return t(e),e}e.export({default:()=>r})},"get.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=i(e,r(t));return o(s)?n:s}e.export({default:()=>s}),e.link("./_toPath.js",{default(e){r=e}},0),e.link("./_deepGet.js",{default(e){i=e}},1),e.link("./isUndefined.js",{default(e){o=e}},2)},"_toPath.js":function e(t,n,e){let r;function i(e){return r.toPath(e)}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./toPath.js")},"toPath.js":function e(t,n,e){let r,i;function o(e){return i(e)?e:[e]}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),r.toPath=o},"_deepGet.js":function e(t,n,e){function r(e,t){for(var n=t.length,r=0;rr})},"has.js":function e(t,n,e){let r,i;function o(e,t){for(var n=(t=i(t)).length,o=0;oo}),e.link("./_has.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"mapObject.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s=o.length,a={},u=0;uo}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"_cb.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r.iteratee!==o?r.iteratee(e,t):i(e,t,n)}e.export({default:()=>s}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),e.link("./iteratee.js",{default(e){o=e}},2)},"_baseIteratee.js":function e(t,n,e){let r,i,o,s,a,u,f;function c(e,t,n){return null==e?r:i(e)?f(e,t,n):o(e)&&!s(e)?a(e):u(e)}e.export({default:()=>c}),e.link("./identity.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isObject.js",{default(e){o=e}},2),e.link("./isArray.js",{default(e){s=e}},3),e.link("./matcher.js",{default(e){a=e}},4),e.link("./property.js",{default(e){u=e}},5),e.link("./_optimizeCb.js",{default(e){f=e}},6)},"identity.js":function e(t,n,e){function r(e){return e}e.export({default:()=>r})},"matcher.js":function e(t,n,e){let r,i;function o(e){return e=r({},e),function(t){return i(t,e)}}e.export({default:()=>o}),e.link("./extendOwn.js",{default(e){r=e}},0),e.link("./isMatch.js",{default(e){i=e}},1)},"property.js":function e(t,n,e){let r,i;function o(e){return e=i(e),function(t){return r(t,e)}}e.export({default:()=>o}),e.link("./_deepGet.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"_optimizeCb.js":function e(t,n,e){function r(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}e.export({default:()=>r})},"iteratee.js":function e(t,n,e){let r,i;function o(e,t){return i(e,t,1/0)}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),r.iteratee=o},"noop.js":function e(t,n,e){function r(){}e.export({default:()=>r})},"propertyOf.js":function e(t,n,e){let r,i;function o(e){return null==e?r:function(t){return i(e,t)}}e.export({default:()=>o}),e.link("./noop.js",{default(e){r=e}},0),e.link("./get.js",{default(e){i=e}},1)},"times.js":function e(t,n,e){let r;function i(e,t,n){var i=Array(Math.max(0,e));t=r(t,n,1);for(var o=0;oi}),e.link("./_optimizeCb.js",{default(e){r=e}},0)},"random.js":function e(t,n,e){function r(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}e.export({default:()=>r})},"now.js":function e(t,n,e){e.exportDefault(Date.now||function(){return(new Date).getTime()})},"escape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createEscaper.js":function e(t,n,e){let r;function i(e){var t=function(t){return e[t]},n="(?:"+r(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}}e.export({default:()=>i}),e.link("./keys.js",{default(e){r=e}},0)},"_escapeMap.js":function e(t,n,e){e.exportDefault({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"})},"unescape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_unescapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_unescapeMap.js":function e(t,n,e){let r,i;e.link("./invert.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"templateSettings.js":function e(t,n,e){let r;e.link("./underscore.js",{default(e){r=e}},0),e.exportDefault(r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g})},"template.js":function e(t,n,e){let r,i;e.export({default:()=>c}),e.link("./defaults.js",{default(e){r=e}},0),e.link("./underscore.js",{default(e){i=e}},1),e.link("./templateSettings.js");var o=/(.)^/,s={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},a=/\\|'|\r|\n|\u2028|\u2029/g;function u(e){return"\\"+s[e]}var f=/^\s*(\w|\$)+\s*$/;function c(e,t,n){!t&&n&&(t=n),t=r({},t,i.templateSettings);var s=RegExp([(t.escape||o).source,(t.interpolate||o).source,(t.evaluate||o).source].join("|")+"|$","g"),c=0,l="__p+='";e.replace(s,(function(t,n,r,i,o){return l+=e.slice(c,o).replace(a,u),c=o+t.length,n?l+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?l+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(l+="';\n"+i+"\n__p+='"),t})),l+="';\n";var h=t.variable,d;if(h){if(!f.test(h))throw new Error("variable is not a bare identifier: "+h)}else l="with(obj||{}){\n"+l+"}\n",h="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";try{d=new Function(h,"_",l)}catch(g){throw g.source=l,g}var p=function(e){return d.call(this,e,i)};return p.source="function("+h+"){\n"+l+"}",p}},"result.js":function e(t,n,e){let r,i;function o(e,t,n){var o=(t=i(t)).length;if(!o)return r(n)?n.call(e):n;for(var s=0;so}),e.link("./isFunction.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"uniqueId.js":function e(t,n,e){e.export({default:()=>i});var r=0;function i(e){var t=++r+"";return e?e+t:t}},"chain.js":function e(t,n,e){let r;function i(e){var t=r(e);return t._chain=!0,t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"partial.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_executeBound.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2);var s=r((function(e,t){var n=s.placeholder,r=function(){for(var o=0,s=t.length,a=Array(s),u=0;uo}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./isObject.js",{default(e){i=e}},1)},"bind.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_executeBound.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t,n){if(!i(e))throw new TypeError("Bind must be called on a function");var s=r((function(r){return o(e,s,t,this,n.concat(r))}));return s})))},"bindAll.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./bind.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t){var n=(t=i(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=o(e[r],e)}return e})))},"_flatten.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,u){if(u=u||[],t||0===t){if(t<=0)return u.concat(e)}else t=1/0;for(var f=u.length,c=0,l=r(e);c1)a(h,t-1,n,u),f=u.length;else for(var d=0,p=h.length;da}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./isArray.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3)},"_isArrayLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"memoize.js":function e(t,n,e){let r;function i(e,t){var n=function(i){var o=n.cache,s=""+(t?t.apply(this,arguments):i);return r(o,s)||(o[s]=e.apply(this,arguments)),o[s]};return n.cache={},n}e.export({default:()=>i}),e.link("./_has.js",{default(e){r=e}},0)},"delay.js":function e(t,n,e){let r;e.link("./restArguments.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})))},"defer.js":function e(t,n,e){let r,i,o;e.link("./partial.js",{default(e){r=e}},0),e.link("./delay.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2),e.exportDefault(r(i,o,1))},"throttle.js":function e(t,n,e){let r;function i(e,t,n){var i,o,s,a,u=0;n||(n={});var f=function(){u=!1===n.leading?0:r(),i=null,a=e.apply(o,s),i||(o=s=null)},c=function(){var c=r();u||!1!==n.leading||(u=c);var l=t-(c-u);return o=this,s=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=c,a=e.apply(o,s),i||(o=s=null)):i||!1===n.trailing||(i=setTimeout(f,l)),a};return c.cancel=function(){clearTimeout(i),u=0,i=o=s=null},c}e.export({default:()=>i}),e.link("./now.js",{default(e){r=e}},0)},"debounce.js":function e(t,n,e){let r,i;function o(e,t,n){var o,s,a,u,f,c=function(){var r=i()-s;t>r?o=setTimeout(c,t-r):(o=null,n||(u=e.apply(f,a)),o||(a=f=null))},l=r((function(r){return f=this,a=r,s=i(),o||(o=setTimeout(c,t),n&&(u=e.apply(f,a))),u}));return l.cancel=function(){clearTimeout(o),o=a=f=null},l}e.export({default:()=>o}),e.link("./restArguments.js",{default(e){r=e}},0),e.link("./now.js",{default(e){i=e}},1)},"wrap.js":function e(t,n,e){let r;function i(e,t){return r(t,e)}e.export({default:()=>i}),e.link("./partial.js",{default(e){r=e}},0)},"negate.js":function e(t,n,e){function r(e){return function(){return!e.apply(this,arguments)}}e.export({default:()=>r})},"compose.js":function e(t,n,e){function r(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}e.export({default:()=>r})},"after.js":function e(t,n,e){function r(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}e.export({default:()=>r})},"before.js":function e(t,n,e){function r(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}e.export({default:()=>r})},"once.js":function e(t,n,e){let r,i;e.link("./partial.js",{default(e){r=e}},0),e.link("./before.js",{default(e){i=e}},1),e.exportDefault(r(i,2))},"findKey.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s,a=0,u=o.length;ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"findIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createPredicateIndexFinder.js":function e(t,n,e){let r,i;function o(e){return function(t,n,o){n=r(n,o);for(var s=i(t),a=e>0?0:s-1;a>=0&&ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"findLastIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"sortedIndex.js":function e(t,n,e){let r,i;function o(e,t,n,o){for(var s=(n=r(n,o,1))(t),a=0,u=i(e);ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"indexOf.js":function e(t,n,e){let r,i,o;e.link("./sortedIndex.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./_createIndexFinder.js",{default(e){o=e}},2),e.exportDefault(o(1,i,r))},"_createIndexFinder.js":function e(t,n,e){let r,i,o;function s(e,t,n){return function(s,a,u){var f=0,c=r(s);if("number"==typeof u)e>0?f=u>=0?u:Math.max(u+c,f):c=u>=0?Math.min(u+1,c):u+c+1;else if(n&&u&&c)return s[u=n(s,a)]===a?u:-1;if(a!=a)return(u=t(i.call(s,f,c),o))>=0?u+f:-1;for(u=e>0?f:c-1;u>=0&&us}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isNaN.js",{default(e){o=e}},2)},"lastIndexOf.js":function e(t,n,e){let r,i;e.link("./findLastIndex.js",{default(e){r=e}},0),e.link("./_createIndexFinder.js",{default(e){i=e}},1),e.exportDefault(i(-1,r))},"find.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a=(r(e)?i:o)(e,t,n);if(void 0!==a&&-1!==a)return e[a]}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./findKey.js",{default(e){o=e}},2)},"findWhere.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./find.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"each.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a;if(t=r(t,n),i(e))for(s=0,a=e.length;ss}),e.link("./_optimizeCb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"map.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=Array(a),f=0;fs}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"reduce.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createReduce.js":function e(t,n,e){let r,i,o;function s(e){var t=function(t,n,o,s){var a=!r(t)&&i(t),u=(a||t).length,f=e>0?0:u-1;for(s||(o=t[a?a[f]:f],f+=e);f>=0&&f=3;return t(e,o(n,i,4),r,s)}}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2)},"reduceRight.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"filter.js":function e(t,n,e){let r,i;function o(e,t,n){var o=[];return t=r(t,n),i(e,(function(e,n,r){t(e,n,r)&&o.push(e)})),o}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"reject.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r(e,i(o(t)),n)}e.export({default:()=>s}),e.link("./filter.js",{default(e){r=e}},0),e.link("./negate.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2)},"every.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"some.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"contains.js":function e(t,n,e){let r,i,o;function s(e,t,n,s){return r(e)||(e=i(e)),("number"!=typeof n||s)&&(n=0),o(e,t,n)>=0}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./indexOf.js",{default(e){o=e}},2)},"invoke.js":function e(t,n,e){let r,i,o,s,a;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2),e.link("./_deepGet.js",{default(e){s=e}},3),e.link("./_toPath.js",{default(e){a=e}},4),e.exportDefault(r((function(e,t,n){var r,u;return i(t)?u=t:(t=a(t),r=t.slice(0,-1),t=t[t.length-1]),o(e,(function(e){var i=u;if(!i){if(r&&r.length&&(e=s(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)}))})))},"pluck.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./map.js",{default(e){r=e}},0),e.link("./property.js",{default(e){i=e}},1)},"where.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./filter.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"max.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=-1/0,u=-1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la&&(a=f);else t=o(t,n),s(e,(function(e,n,r){((c=t(e,n,r))>u||c===-1/0&&a===-1/0)&&(a=e,u=c)}));return a}e.export({default:()=>a}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"min.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=1/0,u=1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"shuffle.js":function e(t,n,e){let r;function i(e){return r(e,1/0)}e.export({default:()=>i}),e.link("./sample.js",{default(e){r=e}},0)},"sample.js":function e(t,n,e){let r,i,o,s,a;function u(e,t,n){if(null==t||n)return r(e)||(e=i(e)),e[s(e.length-1)];var u=a(e),f=o(u);t=Math.max(Math.min(t,f),0);for(var c=f-1,l=0;lu}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./random.js",{default(e){s=e}},3),e.link("./toArray.js",{default(e){a=e}},4)},"toArray.js":function e(t,n,e){let r,i,o,s,a,u,f;e.export({default:()=>l}),e.link("./isArray.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./_isArrayLike.js",{default(e){s=e}},3),e.link("./map.js",{default(e){a=e}},4),e.link("./identity.js",{default(e){u=e}},5),e.link("./values.js",{default(e){f=e}},6);var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function l(e){return e?r(e)?i.call(e):o(e)?e.match(c):s(e)?a(e,u):f(e):[]}},"sortBy.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=0;return t=r(t,n),i(o(e,(function(e,n,r){return{value:e,index:s++,criteria:t(e,n,r)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(ns}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./pluck.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2)},"groupBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n].push(t):e[n]=[t]})))},"_group.js":function e(t,n,e){let r,i;function o(e,t){return function(n,o,s){var a=t?[[],[]]:{};return o=r(o,s),i(n,(function(t,r){var i=o(t,r,n);e(a,t,i)})),a}}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"indexBy.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n]=t})))},"countBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n]++:e[n]=1})))},"partition.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n?0:1].push(t)}),!0))},"size.js":function e(t,n,e){let r,i;function o(e){return null==e?0:r(e)?e.length:i(e).length}e.export({default:()=>o}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"pick.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2),e.link("./allKeys.js",{default(e){s=e}},3),e.link("./_keyInObj.js",{default(e){a=e}},4),e.link("./_flatten.js",{default(e){u=e}},5),e.exportDefault(r((function(e,t){var n={},r=t[0];if(null==e)return n;i(r)?(t.length>1&&(r=o(r,t[1])),t=s(e)):(r=a,t=u(t,!1,!1),e=Object(e));for(var f=0,c=t.length;fr})},"omit.js":function e(t,n,e){let r,i,o,s,a,u,f;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./negate.js",{default(e){o=e}},2),e.link("./map.js",{default(e){s=e}},3),e.link("./_flatten.js",{default(e){a=e}},4),e.link("./contains.js",{default(e){u=e}},5),e.link("./pick.js",{default(e){f=e}},6),e.exportDefault(r((function(e,t){var n=t[0],r;return i(n)?(n=o(n),t.length>1&&(r=t[1])):(t=s(a(t,!1,!1),String),n=function(e,n){return!u(t,n)}),f(e,n,r)})))},"first.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:r(e,e.length-t)}e.export({default:()=>i}),e.link("./initial.js",{default(e){r=e}},0)},"initial.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"last.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:r(e,Math.max(0,e.length-t))}e.export({default:()=>i}),e.link("./rest.js",{default(e){r=e}},0)},"rest.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,null==t||n?1:t)}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"compact.js":function e(t,n,e){let r;function i(e){return r(e,Boolean)}e.export({default:()=>i}),e.link("./filter.js",{default(e){r=e}},0)},"flatten.js":function e(t,n,e){let r;function i(e,t){return r(e,t,!1)}e.export({default:()=>i}),e.link("./_flatten.js",{default(e){r=e}},0)},"without.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./difference.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t){return i(e,t)})))},"difference.js":function e(t,n,e){let r,i,o,s;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./filter.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3),e.exportDefault(r((function(e,t){return t=i(t,!0,!0),o(e,(function(e){return!s(t,e)}))})))},"uniq.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,a){r(t)||(a=n,n=t,t=!1),null!=n&&(n=i(n,a));for(var u=[],f=[],c=0,l=o(e);ca}),e.link("./isBoolean.js",{default(e){r=e}},0),e.link("./_cb.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3)},"union.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./uniq.js",{default(e){i=e}},1),e.link("./_flatten.js",{default(e){o=e}},2),e.exportDefault(r((function(e){return i(o(e,!0,!0))})))},"intersection.js":function e(t,n,e){let r,i;function o(e){for(var t=[],n=arguments.length,o=0,s=r(e);oo}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./contains.js",{default(e){i=e}},1)},"unzip.js":function e(t,n,e){let r,i,o;function s(e){for(var t=e&&r(e,i).length||0,n=Array(t),s=0;ss}),e.link("./max.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.link("./pluck.js",{default(e){o=e}},2)},"zip.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./unzip.js",{default(e){i=e}},1),e.exportDefault(r(i))},"object.js":function e(t,n,e){let r;function i(e,t){for(var n={},i=0,o=r(e);ii}),e.link("./_getLength.js",{default(e){r=e}},0)},"range.js":function e(t,n,e){function r(e,t,n){null==t&&(t=e||0,e=0),n||(n=tr})},"chunk.js":function e(t,n,e){let r;function i(e,t){if(null==t||t<1)return[];for(var n=[],i=0,o=e.length;ii}),e.link("./_setup.js",{slice(e){r=e}},0)},"mixin.js":function e(t,n,e){let r,i,o,s,a;function u(e){return i(o(e),(function(t){var n=r[t]=e[t];r.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),a(this,n.apply(r,e))}})),r}e.export({default:()=>u}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./functions.js",{default(e){o=e}},2),e.link("./_setup.js",{push(e){s=e}},3),e.link("./_chainResult.js",{default(e){a=e}},4)},"_chainResult.js":function e(t,n,e){let r;function i(e,t){return e._chain?r(t).chain():t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"underscore-array-methods.js":function e(t,n,e){let r,i,o,s;e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./_setup.js",{ArrayProto(e){o=e}},2),e.link("./_chainResult.js",{default(e){s=e}},3),i(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=o[e];r.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),s(this,n)}})),i(["concat","join","slice"],(function(e){var t=o[e];r.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),s(this,e)}})),e.exportDefault(r)}}}}},cachers:{"package.json":function e(t,n,e){e.exports={name:"@steedos/cachers",version:"2.7.11",main:"lib/index.js"}},lib:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCacherNames=n.clearCacher=n.getCacher=void 0;var r={},i=t("./memory"),o=t("./memory-lru"),s=function(e,t){return r[e]||(e.startsWith("lru.")?r[e]=new o.MemoryLRUCacher(t):r[e]=new i.MemoryCacher),r[e]};n.getCacher=s;var a=function(e){r[e]&&r[e].clear()};n.clearCacher=a;var u=function(){return Object.keys(r)};n.getCacherNames=u},"memory.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryCacher=void 0;var r=t("lodash"),i=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.delete=function(e){delete this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.clear=function(){this.cache={}},e.prototype.keys=function(){return(0,r.keys)(this.cache)},e.prototype.values=function(){return(0,r.values)(this.cache)},e}();n.MemoryCacher=i},"memory-lru.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryLRUCacher=void 0;var r=t("lodash"),i=t("lru-cache"),o={max:5e3,ttl:null,keygen:null,maxParamsLength:null},s=function(){function e(e){this.opts=(0,r.defaultsDeep)(e,o),this.cache=new i({max:this.opts.max,maxAge:this.opts.ttl?1e3*this.opts.ttl:null,updateAgeOnGet:!!this.opts.ttl})}return e.prototype.get=function(e){return this.cache.get(e)},e.prototype.set=function(e,t,n){return this.cache.set(e,t,n)},e.prototype.delete=function(e){return this.cache.delete(e)},e.prototype.clear=function(){return this.cache.clear()},e.prototype.keys=function(){return this.cache.keys()},e.prototype.values=function(){return this.cache.values()},e}();n.MemoryLRUCacher=s}},node_modules:{"lru-cache":{"package.json":function e(t,n,e){e.exports={name:"lru-cache",version:"7.14.1",main:"index.js"}},"index.js":function e(t,n,e){const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i="function"==typeof AbortController,o=i?AbortController:class e{constructor(){this.signal=new u}abort(){this.signal.dispatchEvent("abort")}},s="function"==typeof AbortSignal,a="function"==typeof o.AbortSignal,u=s?AbortSignal:a?o.AbortController:class e{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach(e=>e(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},f=new Set,c=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&g(n,`${e} option`,`options.${t}`,_)},l=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} method`,`cache.${t}()`,i)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} property`,`cache.${t}`,i)}},d=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!f.has(e),g=(e,t,n,r)=>{f.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;d(i,"DeprecationWarning",e,r)},b=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),m=e=>b(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=m(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class _{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:h,noUpdateTTL:g,maxSize:v=0,maxEntrySize:w=0,sizeCalculation:k,fetchMethod:j,fetchContext:x,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:D}=e,{length:E,maxAge:A,stale:C}=e instanceof _?{}:e;if(0!==t&&!b(t))throw new TypeError("max option must be a nonnegative integer");const M=t?m(t):Array;if(!M)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=w||this.maxSize,this.sizeCalculation=k||E,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=j||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&void 0!==x)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new M(t),this.prev=new M(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof l?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!S,0!==this.maxEntrySize){if(0!==this.maxSize&&!b(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!b(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!C,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=b(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||A||0,this.ttl){if(!b(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){f.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";d(t,"UnboundedCacheWarning",e,_)}}C&&c("stale","allowStale"),A&&c("maxAge","ttl"),E&&c("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,n=r.now())=>{if(this.starts[e]=0!==t?n:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?r.now():0};let e=0;const t=()=>{const t=r.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const r=this.keyMap.get(n);return void 0===r?0:0===this.ttls[r]||0===this.starts[r]?1/0:this.starts[r]+this.ttls[r]-(e||t())},this.isStale=n=>0!==this.ttls[n]&&0!==this.starts[n]&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!b(n)){if(!r)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!b(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return l("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const n=this.keyList[t],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,s={value:o};if(this.ttls){s.ttl=this.ttls[t];const e=r.now()-this.starts[t];s.start=Math.floor(Date.now()-e)}this.sizes&&(s.size=this.sizes[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),a=!1;else{const n=this.valList[u];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():i||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(u,n,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,n=this.keyList[t],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,n,"evict"),this.disposeAfter&&this.disposed.push([r,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const n=this.keyMap.get(e);return void 0!==n&&!this.isStale(n)&&(t&&this.updateItemAge(n),!0)}peek(e,{allowStale:t=this.allowStale}={}){const n=this.keyMap.get(e);if(void 0!==n&&(t||!this.isStale(n))){const e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const s=new o,a={signal:s.signal,options:n,context:r},u=t=>(s.signal.aborted||this.set(e,t,a.options),t),f=r=>{if(this.valList[t]===l){const r=!n.noDeleteOnFetchRejection||void 0===l.__staleWhileFetching;r?this.delete(e):this.valList[t]=l.__staleWhileFetching}if(l.__returned===l)throw r},c=t=>t(this.fetchMethod(e,i,a)),l=new Promise(c).then(u,f);return l.__abortController=s,l.__staleWhileFetching=i,l.__returned=null,void 0===t?(this.set(e,l,a.options),t=this.keyMap.get(e)):this.valList[t]=l,l}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:c=this.fetchContext,forceRefresh:l=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r});const h={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:u,noDeleteOnFetchRejection:f};let d=this.keyMap.get(e);if(void 0===d){const t=this.backgroundFetch(e,d,h,c);return t.__returned=t}{const r=this.valList[d];if(this.isBackgroundFetch(r))return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r;if(!l&&!this.isStale(d))return this.moveToTail(d),n&&this.updateItemAge(d),r;const i=this.backgroundFetch(e,d,h,c);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(r||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),n&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return l("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const n=this.keyList[e];this.dispose(t,n,"delete"),this.disposeAfter&&this.disposed.push([t,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return l("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=_}}}},"form-builder":{"package.json":function e(t,n,e){e.exports={name:"@steedos/form-builder",version:"3.6.2-patch.5",private:!1,publishConfig:{access:"public"},main:"dist/form-builder.min.js",homepage:"https://formbuilder.online/",repository:{url:"https://github.com/kevinchappell/formBuilder.git",type:"git"},files:["dist/**/*","docs/**/*","src/**/*"],author:"Kevin Chappell ",contributors:[],bugs:"https://github.com/kevinchappell/formBuilder/issues",description:"A jQuery plugin for drag and drop form building",keywords:["jquery-plugin","forms","drag and drop","form builder","form create"],license:"MIT",ignore:["**/*","node_modules","test"],config:{files:{test:["test/**/*.spec.js"],pluginsDir:"src/js/control_plugins/",fonts:"src/fonts",sass:"src/sass",formBuilder:{js:"src/js/form-builder.js",sass:["src/sass/form-builder.scss"]},formRender:{js:"src/js/form-render.js",sass:["src/sass/form-render.scss"]},site:["demo/assets/sass/site.scss"]},fontServer:"http://fontello.com",fontelloToken:"09d648f01d6c57cb9f9b8cc55043e0c0"},babel:{presets:[["@babel/preset-env",{targets:{browsers:["> 1%"]},loose:!0}]],comments:!1,plugins:["@babel/plugin-proposal-object-rest-spread","@babel/plugin-proposal-class-properties"]},scripts:{"build:analyze":"webpack --mode production -p --progress --config tools/webpack.config --analyze","build:plugins":"webpack --mode production -p --display-entrypoints --progress --config tools/webpack.plugins.config","build:vendor":"babel-node tools/build-vendor",build:"webpack --mode production -p --progress --config tools/webpack.config","build:all":"npm-run-all build:plugins build:vendor build copy",copy:"cp -a dist/* demo/assets/js/ && cp CONTRIBUTING.md docs/contributing.md && cp LICENSE docs/license.md && npm run copy:lang","copy:lang":"babel-node tools/copy-language-files","deploy:all":"npm-run-all deploy:demo deploy:site","deploy:demo":"node tools/deploy-demo.js","deploy:site":"node tools/deploy-site.js",docs:"mkdocs build",font:"babel-node tools/icon-font",lint:"eslint ./src --ext .js || true","semantic-release":"semantic-release","start:devServer":"webpack-dev-server --mode development --config tools/webpack.config",prestart:"npm-run-all -p build:vendor copy:lang",start:"npm run start:devServer",test:"npm run-script build"},dependencies:{jquery:">=3.4.1","jquery-ui-sortable":"*"},devDependencies:{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/node":"^7.10.5","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-syntax-object-rest-spread":"^7.8.3","@babel/plugin-transform-destructuring":"^7.10.4","@babel/preset-env":"^7.11.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.5",autoprefixer:"^9.8.6","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","clean-webpack-plugin":"^3.0.0",clui:"^0.3.6","compression-webpack-plugin":"^5.0.1","concat-files":"^0.1.1","cross-env":"^7.0.2","css-loader":"^4.2.1",eslint:"^7.7.0","eslint-loader":"^4.0.2","formbuilder-languages":"latest","fs-extra":"^9.0.1","html-webpack-harddisk-plugin":"^1.0.2","html-webpack-plugin":"^4.3.0",inquirer:"^7.3.3",mi18n:"^0.4.8","node-sass":"6.0.1","npm-run-all":"^4.1.5",opener:"^1.5.1","postcss-loader":"^3.0.0","replace-in-file":"^6.1.0",request:"^2.88.2","sass-loader":"10.5.2","semantic-release":"^17.1.1",semver:"^7.3.2","style-loader":"^1.2.1",unzipper:"^0.10.11",webpack:"^4.44.1","webpack-bundle-analyzer":"^3.8.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","wrapper-webpack-plugin":"^2.1.0"},prettier:{singleQuote:!0,trailingComma:"all",printWidth:120,semi:!1,arrowParens:"avoid",spaceAfterFunction:!1},engines:{},release:{branch:"master",verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},browserslist:["> 1%"]}},dist:{"form-builder.min.js":[]}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",module:"tslib.es6.js",main:"tslib.js"}},"tslib.es6.js":function e(t,n,e){e.export({__extends:()=>i,__assign:()=>o,__rest:()=>s,__decorate:()=>a,__param:()=>u,__metadata:()=>f,__awaiter:()=>c,__generator:()=>l,__createBinding:()=>h,__exportStar:()=>d,__values:()=>p,__read:()=>g,__spread:()=>b,__spreadArrays:()=>m,__spreadArray:()=>v,__await:()=>y,__asyncGenerator:()=>_,__asyncDelegator:()=>w,__asyncValues:()=>k,__makeTemplateObject:()=>j,__importStar:()=>S,__importDefault:()=>D,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>A}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -453,7 +453,7 @@ Package._define("mrt:moment"); Package._define("steedos:loaders-css"); -!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.mongo.Mongo,i=Package.tracker.Tracker,r=Package.tracker.Deps,c=Package.underscore._,a=Package.ejson.EJSON,s=Package.minimongo.LocalCollection,u=Package.minimongo.Minimongo,l;(function(){var e={},n=Package.tracker&&Package.tracker.Tracker||Package.deps.Deps,i=t.isServer&&new t.EnvironmentVariable;if((l={defaults:{before:{insert:{},update:{},remove:{},upsert:{},find:{},findOne:{},all:{}},after:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}},all:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}}},directEnv:new t.EnvironmentVariable,directOp:function t(e){return this.directEnv.withValue(!0,e)},hookedOp:function t(e){return this.directEnv.withValue(!1,e)}}).getUserId=function e(){var o;if(t.isClient&&n.nonreactive((function(){o=t.userId&&t.userId()})),t.isServer){try{o=t.userId&&t.userId()}catch(r){}null==o&&(o=i.get())}return null==o&&(o=l.defaultUserId),o},l.extendCollectionInstance=function n(o,i){c.each(["before","after"],(function(n){c.each(e,(function(e,i){"upsert"===e&&"after"===n||(t._ensure(o,n,i),t._ensure(o,"_hookAspects",i),o._hookAspects[i][n]=[],o[n][i]=function(t,e){var r=o._hookAspects[i][n].push({aspect:t,options:l.initOptions(e,n,i)});return{replace:function(t,e){o._hookAspects[i][n].splice(r-1,1,{aspect:t,options:l.initOptions(e,n,i)})},remove:function(){o._hookAspects[i][n].splice(r-1,1)}}})}))})),o.hookOptions=a.clone(l.defaults),c.each(e,(function(e,n){var r=t.isClient||"upsert"===n?o:o._collection,a=r[n];t._ensure(o,"direct",n),o.direct[n]=function(){var t=arguments;return l.directOp((function(){return i.prototype[n].apply(o,t)}))},r[n]=function(){return!0===l.directEnv.get()?a.apply(r,arguments):e.call(this,l.getUserId(),a,o,"upsert"===n?{insert:o._hookAspects.insert||{},update:o._hookAspects.update||{},upsert:o._hookAspects.upsert||{}}:o._hookAspects[n]||{},(function(t){return c.isFunction(o._transform)?function(e){return o._transform(e||t)}:function(e){return e||t}}),c.toArray(arguments),!1)}}))},l.defineAdvice=function t(n,o){e[n]=o},l.getAdvice=function t(n){return e[n]},l.initOptions=function t(e,n,o){return l.extendOptions(l.defaults,e,n,o)},l.extendOptions=function t(e,n,o,i){return n=c.extend(n||{},e.all.all),n=c.extend(n,e[o].all),n=c.extend(n,e.all[i]),n=c.extend(n,e[o][i])},l.getDocs=function t(e,n,o){var i={transform:null,reactive:!1};return o&&(o.multi||(i.limit=1),c.extend(i,c.omit(o,"multi","upsert"))),e.find(n,i)},l.getFields=function t(e){var n=[],o=["$addToSet","$bit","$currentDate","$inc","$max","$min","$pop","$pull","$pullAll","$push","$rename","$set","$unset"];return c.each(e,(function(t,e){c.contains(o,e)?c.each(c.keys(t),(function(t){-1!==t.indexOf(".")&&(t=t.substring(0,t.indexOf("."))),c.contains(n,t)||n.push(t)})):n.push(e)})),n},l.reassignPrototype=function e(n,i){var r="function"==typeof Object.setPrototypeOf;i||(i=void 0!==o?o.Collection:t.Collection),r?Object.setPrototypeOf(n,i.prototype):n.__proto__&&(n.__proto__=i.prototype)},l.wrapCollection=function t(e,n){n._CollectionConstructor||(n._CollectionConstructor=n.Collection),n._CollectionPrototype||(n._CollectionPrototype=new n.Collection(null));var o=e._NewCollectionContructor||n._CollectionConstructor,i=n._CollectionPrototype;for(var r in e.Collection=function(){var t=o.apply(this,arguments);return l.extendCollectionInstance(this,o),t},e._NewCollectionContructor=e.Collection,e.Collection.prototype=i,e.Collection.prototype.constructor=e.Collection,o)o.hasOwnProperty(r)&&(e.Collection[r]=o[r]);e.Collection.apply=Function.prototype.apply},l.modify=s._modify,void 0!==o?(l.wrapCollection(t,o),l.wrapCollection(o,o)):l.wrapCollection(t,t),t.isServer){var r=t.publish;t.publish=function(t,e,n){return r.call(this,t,(function(){var t=this,n=arguments;return i.withValue(t&&t.userId,(function(){return e.apply(t,n)}))}),n)},l.isWithinPublish=function t(){return void 0!==i.get()}}}).call(this),function(){l.defineAdvice("insert",(function(t,e,n,i,r,s,u){var l=this,f={context:this,_super:e,args:s},p=c.last(s),d=c.isFunction(p),h,v;if(!u)try{if(c.each(i.before,(function(e){var n;!1===e.aspect.call(c.extend({transform:r(s[0])},f),t,s[0])&&(h=!0)})),h)return}catch(m){if(d)return p.call(this,m);throw m}function _(e,n){var l=s[0];if(e&&(c.isObject(e)&&e.ops&&(e=l._id._str?new o.ObjectID(l._id._str.toString()):e.ops&&e.ops[0]&&e.ops[0]._id),(l=a.clone(s[0]))._id=e),!u){var p=c.extend({transform:r(l),_id:e,err:n},f);c.each(i.after,(function(e){e.aspect.call(p,t,l)}))}return e}return d?(s[s.length-1]=function(t,e){return _(e&&e[0]&&e[0]._id||e,t),p.apply(this,arguments)},e.apply(this,s)):_((v=e.apply(this,s))&&v[0]&&v[0]._id||v)}))}.call(this),function(){l.defineAdvice("update",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m,g={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(_=l.getFields(r[1]),h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.after)||(g.mutator=a.clone(r[1]),g.options=a.clone(r[2]),c.some(o.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(g.docs={},c.each(h,(function(t){g.docs[t._id]=a.clone(t)})))),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n,_,r[1],r[2])&&(m=!0)}))})),m)return 0}catch(k){if(d)return p.call(u,k);throw k}function y(e,a){if(!s){if(!c.isEmpty(o.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:g.docs&&g.docs[o._id],affected:e,err:a},f),t,o,p,g.mutator,g.options)}))}))}}if(d)return r[r.length-1]=function(t,e){return y(e,t),p.apply(this,arguments)},e.apply(this,r);var C=e.apply(u,r);return y(C),C}))}.call(this),function(){l.defineAdvice("remove",(function(t,e,n,o,i,r,s){var u=this,f={context:this,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_=[];if(!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(h=l.getDocs.call(this,n,r[0]).fetch()),c.isEmpty(o.after)||c.each(h,(function(t){_.push(a.clone(t))})),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n)&&(v=!0)}))})),v)return 0}catch(y){if(d)return p.call(this,y);throw y}function m(e){s||c.each(o.after,(function(n){c.each(_,(function(o){n.aspect.call(c.extend({transform:i(o),err:e},f),t,o)}))}))}if(d)return r[r.length-1]=function(t){return m(t),p.apply(this,arguments)},e.apply(this,r);var g=e.apply(this,r);return m(),g}))}.call(this),function(){l.defineAdvice("upsert",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s&&(c.isEmpty(o.upsert.before)||(h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.update.after)||c.some(o.update.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(m.mutator=a.clone(r[1]),m.options=a.clone(r[2]),m.docs={},c.each(h,(function(t){m.docs[t._id]=a.clone(t)}))),c.each(o.upsert.before,(function(e){var n;!1===e.aspect.call(f,t,r[0],r[1],r[2])&&(_=!0)})),_))return{numberAffected:0};function g(e,a){if(!s){if(!c.isEmpty(o.update.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.update.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:m.docs&&m.docs[o._id],affected:e,err:a},f),t,o,p,m.mutator,m.options)}))}))}}function y(e,a){if(!s){if(!c.isEmpty(o.insert.after))var p=l.getDocs.call(u,n,{_id:e},r[0],{}).fetch()[0],d=c.extend({transform:i(p),_id:e,err:a},f);c.each(o.insert.after,(function(e){e.aspect.call(d,t,p)}))}}if(d)return r[r.length-1]=function(t,e){return t||e&&e.insertedId?y(e.insertedId,t):g(e&&e.numberAffected,t),l.hookedOp((function(){return p.call(this,t,e)}))},l.directOp((function(){return e.apply(u,r)}));var C=l.directOp((function(){return e.apply(u,r)}));return C&&C.insertedId?y(C.insertedId):g(C&&C.numberAffected),C}))}.call(this),function(){l.defineAdvice("find",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),!a&&(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),f))return n.find(void 0);function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}return p(l=e.apply(this,r)),l}))}.call(this),function(){l.defineAdvice("findOne",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),a||(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),!f))return p(l=e.apply(this,r)),l;function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}}))}.call(this),function(){if(t.users){l.reassignPrototype(t.users);var e=void 0!==o&&void 0!==o.Collection?o.Collection:t.Collection;l.extendCollectionInstance(t.users,e)}}.call(this),Package._define("matb33:collection-hooks",{CollectionHooks:l})}(); +!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.mongo.Mongo,i=Package.tracker.Tracker,r=Package.tracker.Deps,c=Package.underscore._,a=Package.ejson.EJSON,s=Package.minimongo.LocalCollection,u=Package.minimongo.Minimongo,l,f;(function(){var e={},n=Package.tracker&&Package.tracker.Tracker||Package.deps.Deps,i=t.isServer&&new t.EnvironmentVariable;if((l={defaults:{before:{insert:{},update:{},remove:{},upsert:{},find:{},findOne:{},all:{}},after:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}},all:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}}},directEnv:new t.EnvironmentVariable,directOp:function t(e){return this.directEnv.withValue(!0,e)},hookedOp:function t(e){return this.directEnv.withValue(!1,e)}}).getUserId=function e(){var o;if(t.isClient&&n.nonreactive((function(){o=t.userId&&t.userId()})),t.isServer){try{o=t.userId&&t.userId()}catch(r){}null==o&&(o=i.get())}return null==o&&(o=l.defaultUserId),o},l.extendCollectionInstance=function n(o,i){c.each(["before","after"],(function(n){c.each(e,(function(e,i){"upsert"===e&&"after"===n||(t._ensure(o,n,i),t._ensure(o,"_hookAspects",i),o._hookAspects[i][n]=[],o[n][i]=function(t,e){var r=o._hookAspects[i][n].push({aspect:t,options:l.initOptions(e,n,i)});return{replace:function(t,e){o._hookAspects[i][n].splice(r-1,1,{aspect:t,options:l.initOptions(e,n,i)})},remove:function(){o._hookAspects[i][n].splice(r-1,1)}}})}))})),o.hookOptions=a.clone(l.defaults),c.each(e,(function(e,n){var r=t.isClient||"upsert"===n?o:o._collection,a=r[n];t._ensure(o,"direct",n),o.direct[n]=function(){var t=arguments;return l.directOp((function(){return i.prototype[n].apply(o,t)}))},r[n]=function(){return!0===l.directEnv.get()?a.apply(r,arguments):e.call(this,l.getUserId(),a,o,"upsert"===n?{insert:o._hookAspects.insert||{},update:o._hookAspects.update||{},upsert:o._hookAspects.upsert||{}}:o._hookAspects[n]||{},(function(t){return c.isFunction(o._transform)?function(e){return o._transform(e||t)}:function(e){return e||t}}),c.toArray(arguments),!1)}}))},l.defineAdvice=function t(n,o){e[n]=o},l.getAdvice=function t(n){return e[n]},l.initOptions=function t(e,n,o){return l.extendOptions(l.defaults,e,n,o)},l.extendOptions=function t(e,n,o,i){return n=c.extend(n||{},e.all.all),n=c.extend(n,e[o].all),n=c.extend(n,e.all[i]),n=c.extend(n,e[o][i])},l.getDocs=function t(e,n,o){var i={transform:null,reactive:!1};return o&&(o.multi||(i.limit=1),c.extend(i,c.omit(o,"multi","upsert"))),e.find(n,i)},l.getFields=function t(e){var n=[],o=["$addToSet","$bit","$currentDate","$inc","$max","$min","$pop","$pull","$pullAll","$push","$rename","$set","$unset"];return c.each(e,(function(t,e){c.contains(o,e)?c.each(c.keys(t),(function(t){-1!==t.indexOf(".")&&(t=t.substring(0,t.indexOf("."))),c.contains(n,t)||n.push(t)})):n.push(e)})),n},l.reassignPrototype=function e(n,i){var r="function"==typeof Object.setPrototypeOf;i||(i=void 0!==o?o.Collection:t.Collection),r?Object.setPrototypeOf(n,i.prototype):n.__proto__&&(n.__proto__=i.prototype)},l.wrapCollection=function t(e,n){n._CollectionConstructor||(n._CollectionConstructor=n.Collection),n._CollectionPrototype||(n._CollectionPrototype=new n.Collection(null));var o=e._NewCollectionContructor||n._CollectionConstructor,i=n._CollectionPrototype;for(var r in e.Collection=function(){var t=o.apply(this,arguments);return l.extendCollectionInstance(this,o),t},e._NewCollectionContructor=e.Collection,e.Collection.prototype=i,e.Collection.prototype.constructor=e.Collection,o)o.hasOwnProperty(r)&&(e.Collection[r]=o[r]);e.Collection.apply=Function.prototype.apply},l.modify=s._modify,void 0!==o?(l.wrapCollection(t,o),l.wrapCollection(o,o)):l.wrapCollection(t,t),t.isServer){var r=t.publish;t.publish=function(t,e,n){return r.call(this,t,(function(){var t=this,n=arguments;return i.withValue(t&&t.userId,(function(){return e.apply(t,n)}))}),n)},l.isWithinPublish=function t(){return void 0!==i.get()}}}).call(this),function(){l.defineAdvice("insert",(function(t,e,n,i,r,s,u){var l=this,f={context:this,_super:e,args:s},p=c.last(s),d=c.isFunction(p),h,v;if(!u)try{if(c.each(i.before,(function(e){var n;!1===e.aspect.call(c.extend({transform:r(s[0])},f),t,s[0])&&(h=!0)})),h)return}catch(m){if(d)return p.call(this,m);throw m}function _(e,n){var l=s[0];if(e&&(c.isObject(e)&&e.ops&&(e=l._id._str?new o.ObjectID(l._id._str.toString()):e.ops&&e.ops[0]&&e.ops[0]._id),(l=a.clone(s[0]))._id=e),!u){var p=c.extend({transform:r(l),_id:e,err:n},f);c.each(i.after,(function(e){e.aspect.call(p,t,l)}))}return e}return d?(s[s.length-1]=function(t,e){return _(e&&e[0]&&e[0]._id||e,t),p.apply(this,arguments)},e.apply(this,s)):_((v=e.apply(this,s))&&v[0]&&v[0]._id||v)}))}.call(this),function(){l.defineAdvice("update",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m,g={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(_=l.getFields(r[1]),h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.after)||(g.mutator=a.clone(r[1]),g.options=a.clone(r[2]),c.some(o.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(g.docs={},c.each(h,(function(t){g.docs[t._id]=a.clone(t)})))),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n,_,r[1],r[2])&&(m=!0)}))})),m)return 0}catch(k){if(d)return p.call(u,k);throw k}function y(e,a){if(!s){if(!c.isEmpty(o.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:g.docs&&g.docs[o._id],affected:e,err:a},f),t,o,p,g.mutator,g.options)}))}))}}if(d)return r[r.length-1]=function(t,e){return y(e,t),p.apply(this,arguments)},e.apply(this,r);var C=e.apply(u,r);return y(C),C}))}.call(this),function(){l.defineAdvice("remove",(function(t,e,n,o,i,r,s){var u=this,f={context:this,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_=[];if(!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(h=l.getDocs.call(this,n,r[0]).fetch()),c.isEmpty(o.after)||c.each(h,(function(t){_.push(a.clone(t))})),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n)&&(v=!0)}))})),v)return 0}catch(y){if(d)return p.call(this,y);throw y}function m(e){s||c.each(o.after,(function(n){c.each(_,(function(o){n.aspect.call(c.extend({transform:i(o),err:e},f),t,o)}))}))}if(d)return r[r.length-1]=function(t){return m(t),p.apply(this,arguments)},e.apply(this,r);var g=e.apply(this,r);return m(),g}))}.call(this),function(){l.defineAdvice("upsert",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s&&(c.isEmpty(o.upsert.before)||(h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.update.after)||c.some(o.update.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(m.mutator=a.clone(r[1]),m.options=a.clone(r[2]),m.docs={},c.each(h,(function(t){m.docs[t._id]=a.clone(t)}))),c.each(o.upsert.before,(function(e){var n;!1===e.aspect.call(f,t,r[0],r[1],r[2])&&(_=!0)})),_))return{numberAffected:0};function g(e,a){if(!s){if(!c.isEmpty(o.update.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.update.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:m.docs&&m.docs[o._id],affected:e,err:a},f),t,o,p,m.mutator,m.options)}))}))}}function y(e,a){if(!s){if(!c.isEmpty(o.insert.after))var p=l.getDocs.call(u,n,{_id:e},r[0],{}).fetch()[0],d=c.extend({transform:i(p),_id:e,err:a},f);c.each(o.insert.after,(function(e){e.aspect.call(d,t,p)}))}}if(d)return r[r.length-1]=function(t,e){return t||e&&e.insertedId?y(e.insertedId,t):g(e&&e.numberAffected,t),l.hookedOp((function(){return p.call(this,t,e)}))},l.directOp((function(){return e.apply(u,r)}));var C=l.directOp((function(){return e.apply(u,r)}));return C&&C.insertedId?y(C.insertedId):g(C&&C.numberAffected),C}))}.call(this),function(){l.defineAdvice("find",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),!a&&(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),f))return n.find(void 0);function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}return p(l=e.apply(this,r)),l}))}.call(this),function(){l.defineAdvice("findOne",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),a||(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),!f))return p(l=e.apply(this,r)),l;function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}}))}.call(this),function(){if(t.users){l.reassignPrototype(t.users);var e=void 0!==o&&void 0!==o.Collection?o.Collection:t.Collection;l.extendCollectionInstance(t.users,e)}}.call(this),Package._define("matb33:collection-hooks",{CollectionHooks:l})}(); Package._define("steedos:smsqueue"); @@ -662,7 +662,7 @@ Package._define("steedos:qcloud-smsqueue"); !function(){var e=Package.meteor.Meteor,t=Package.meteor.global,o=Package.meteor.meteorEnv,r=Package["reactive-var"].ReactiveVar,a=Package["reactive-dict"].ReactiveDict,n=Package.random.Random,s=Package["ddp-client"].DDP,c=Package.check.check,i=Package.check.Match,u=Package.underscore._,d=Package.tracker.Tracker,l=Package.tracker.Deps,f=Package.session.Session,p=Package["aldeed:simple-schema"].SimpleSchema,g=Package["aldeed:simple-schema"].MongoObject,m=Package["aldeed:tabular"].Tabular,b=Package["matb33:collection-hooks"].CollectionHooks,k=Package["meteorhacks:subs-manager"].SubsManager,v=Package["universe:i18n"]._i18n,_=Package["universe:i18n"].i18n,P=Package.modules.meteorInstall,j=Package.promise.Promise,h=Package["aldeed:collection2-core"].Collection2,y=Package.mongo.Mongo,C,S;P({node_modules:{meteor:{"steedos:object-database":{client:{"subscribe.coffee":function t(){var o=C="object"==typeof C?C:{},a,n,s,c,i,l,p,g,m,b,v,_,P;P=new k,Creator._subApp=new r({}),v=null,b=function(){return v&&clearTimeout(v),v=setTimeout((function(){return Creator.loadAppsMenus(),v=null}),5e3)},m=null,g=[],p=function(t){return m&&clearTimeout(m),g.push(t),m=e.setTimeout((function(){return c(g,(function(e){if(e&&e.objects)return u.each(e.objects,(function(e){var t,o;if(u.size(e.fields)>0){delete Creator._recordSafeObjectCache[e.name];try{(o=Creator.getObject(e.name))&&(e=u.extend(e,{list_views:o.list_views}))}catch(r){t=r,console.error(t)}return Creator.Objects[e.name]=e,Creator.loadObjects(e),Creator.deps.object.changed()}}))}))}),5e3)},a=function(e){if(b(),Creator.Apps[e.code]=e,Creator._subApp.set(Object.assign(e,{_id:e.code})),f.get("app_id")===e._id)return Creator.deps.app.changed()},n=function(e,t){var o;if((Steedos.isSpaceAdmin()||e.is_enable)&&(Steedos.isSpaceAdmin()||"0"===e.in_development)){SteedosUI.reloadObject(e.name),b(),p(e.name);try{if(t&&e&&t.name!==e.name)return l(t)}catch(r){return o=r,console.error(o)}}},l=function(e){var t;return t=u.findWhere(Creator.objectsByName,{_id:e._id}),Creator.removeObject(null!=t?t.name:void 0),f.get("object_name")===(null!=t?t.name:void 0)&&FlowRouter.go("/"),Creator.deps.object.changed()},i=function(e){if(delete Creator.Apps[e.code],Creator._subApp.set(Object.assign({},e,{visible:!1,_id:e.code})),f.get("app_id")===e.code||f.get("app_id")===e._id)return f.set("app_id",null),FlowRouter.go("/")},_=function(){return Setup.bootstrap(Steedos.getSpaceId()),e.setTimeout((function(){return Creator.deps.object.changed()}),3e3)},s=function(t,o){var r;if(t&&u.isString(t))return r=f.get("spaceId"),$.ajax({type:"get",url:Steedos.absoluteUrl("/api/bootstrap/"+r+"/"+t),dataType:"json",beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken())},error:function(e,t,o){var r;return r=e.responseJSON,console.error(r),(null!=r?r.reason:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.reason)):void 0:(null!=r?r.message:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(r):void 0},success:function(e){if(u.isFunction(o))return o(e)}})},c=function(t,o){var r;if((t=u.compact(u.uniq(t)))&&u.isArray(t)&&!u.isEmpty(t))return r=f.get("spaceId"),$.ajax({type:"get",url:Steedos.absoluteUrl("/api/bootstrap/"+r+"/"+t.join(",")),dataType:"json",beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken())},error:function(e,t,o){var r;return r=e.responseJSON,console.error(r),(null!=r?r.reason:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.reason)):void 0:(null!=r?r.message:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(r):void 0},success:function(e){if(u.isFunction(o))return o(e)}}),d.autorun((function(e){var t;if(Creator.bootstrapLoaded.get())return t=!1,Creator.getCollection("apps").find({is_creator:!0}).observe({added:function(e){if(t)return a(e)},changed:function(e,o){if(t)return a(e)},removed:function(e){if(t)return i(e)}}),t=!0}))}}}}}}},{extensions:[".js",".json",".coffee"]})("/node_modules/meteor/steedos:object-database/client/subscribe.coffee"),Package._define("steedos:object-database")}(); -Package._define("steedos:mailqueue"); +!function(){var e,a;Package._define("steedos:mailqueue")}(); Package._define("steedos:webhookqueue"); @@ -728,7 +728,7 @@ Package._define("steedos:instance-record-queue"); !function(){var e=Package.meteor.Meteor,o=Package.meteor.global,n=Package.meteor.meteorEnv,s=Package["reactive-var"].ReactiveVar,a=Package["reactive-dict"].ReactiveDict,l=Package.random.Random,r=Package["ddp-client"].DDP,i=Package.check.check,c=Package.check.Match,d=Package.underscore._,u=Package.tracker.Tracker,f=Package.tracker.Deps,m=Package.session.Session,p=Package.blaze.Blaze,_=Package.blaze.UI,w=Package.blaze.Handlebars,b=Package["templating-runtime"].Template,k=Package["aldeed:simple-schema"].SimpleSchema,g=Package["aldeed:simple-schema"].MongoObject,h=Package["kadira:flow-router"].FlowRouter,v=Package["aldeed:tabular"].Tabular,y=Package["steedos:base"].Selector,I=Package["steedos:base"].Steedos,D=Package["steedos:base"].AjaxCollection,T=Package["steedos:base"].SteedosDataManager,F=Package["steedos:base"].SteedosOffice,S=Package["steedos:base"].Modal,V=Package["universe:i18n"]._i18n,j=Package["universe:i18n"].i18n,P=Package.promise.Promise,C=Package.modules.meteorInstall,O=Package.htmljs.HTML,x=Package["aldeed:collection2-core"].Collection2,A=Package["steedos:cfs-base-package"].FS,R=Package.spacebars.Spacebars,E=Package.mongo.Mongo,U,N=C({node_modules:{meteor:{"steedos:app-workflow":{"core.coffee":function o(){var n=U="object"==typeof U?U:{};this.WorkflowCore={},e.isClient&&(WorkflowCore.openFlowDesign=function(o,n,s,a){var l,r,i,c,d;return d="/applications/designer/current/"+o.toLocaleLowerCase()+"/?spaceId="+n,s&&(d=d+"&flowId="+s),a&&!Creator.isSpaceAdmin(n,e.userId())&&(d=d+"&companyId="+a),d=encodeURIComponent(I.absoluteUrl(d)),c=""+t("Workflow Designer"),s&&(l=null!=(i=db.flows.findOne(s))?i.name:void 0)&&(c=l+" | "+c),r="/api/workflow/designer?url="+d+"&title="+(c=encodeURIComponent(c)),I.openWindow(I.absoluteUrl(r))},WorkflowCore.openFormDesign=function(t,e,o,n){return S.show("formDesign",{formId:o},{keyboard:!1,backdrop:"static"})},e.startup((function(){return $(document).keydown((function(t){if("13"===t.keyCode||"Enter"===t.key){if(1!==$(".flow-modal").length)return;if(("TEXTAREA"!==t.target.tagName||$(t.target).closest("div").hasClass("bootstrap-tagsinput"))&&1===$(".flow-modal").length)return $(".flow-modal .btn-confirm").click()}}))}))),e.isServer&&(WorkflowCore.checkCreatePermissions=function(t,e,o){return!o||0!==Creator.getCollection("company").find({_id:o,space:t}).count()})},client:{"template.new_flow_modal.js":function t(){b.__checkName("new_flow_modal"),b.new_flow_modal=new b("Template.new_flow_modal",(function(){var t=this;return O.DIV({class:"modal fade creator-modal flow-modal new-flow-modal",id:"newFlowModal"},"\n\t\t",O.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",O.DIV({class:"slds-modal__container"},"\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t

\n\t\t\t\t\t\t

新建流程

\n\t\t\t\t\t\n\t\t\t\t
'),"\n\n\t\t\t\t",O.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t",p._TemplateWith((function(){return{schema:R.call(t.lookup("schema")),id:R.call("newFlowForm")}}),(function(){return R.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t",p.Each((function(){return R.call(t.lookup("fields"))}),(function(){return["\n\t\t\t\t\t\t",O.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t",O.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t",O.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:R.call(t.lookup("."))}}),(function(){return R.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"]}))})),"\n\t\t\t"),"\n\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
'),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"new_flow_modal.coffee":function t(){var o=U="object"==typeof U?U:{},n;n=["category","name","company_id","object_name"],b.new_flow_modal.helpers({schema:function(){var t,e,o,s;return s={},o=Creator.getObject("flows"),t=new k(Creator.getObjectSchema(o)),e=t._schema,d.each(n,(function(t){if(s[t]=e[t],s[t].autoform&&(s[t].autoform.readonly=!1,s[t].autoform.disabled=!1),"name"===t)return s[t].optional=!1})),new k(s)},fields:function(){return n}}),b.new_flow_modal.events({"click .btn-confirm":function(t,o){var n,s,a,l,r;return t.currentTarget.disabled=!0,AutoForm.validateField("newFlowForm")?(a=AutoForm.getFormValues("newFlowForm").insertDoc,l={id:r=Creator.getCollection("flows")._makeNewID(),name:a.name,space:I.getSpaceId(),is_valid:!0,app:"workflow",current:{id:Creator.getCollection("flows")._makeNewID()}},a.category&&(l.category=a.category),(n=a.company_id)&&(l.company_id=n),a.object_name&&(l.object_name=a.object_name),s={Forms:[l]},$.ajax({type:"post",url:I.absoluteUrl("/am/forms?sync_token="+(new Date).getTime()/1e3),data:JSON.stringify(s),dataType:"json",contentType:"application/json",crossDomain:!0,headers:{"x-user-id":e.userId(),"x-auth-token":Accounts._storedLoginToken()},beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken()),t.setRequestHeader("x-user-id",e.userId()),t.setRequestHeader("x-auth-token",Accounts._storedLoginToken())},success:function(t){var e,n;return console.log(t),e=t.ChangeSet.inserts.Flows,(n=d.find(e,(function(t){return t.form===r}))).object_name||WorkflowCore.openFlowDesign(I.locale(),n.space,n._id,Creator.getUserCompanyId()),h.go("/app/admin/flows/view/"+n._id),S.hide(o)},error:function(e,o,n){return toastr.error(e.responseText),t.currentTarget.disabled=!1,console.error(n)}})):(t.currentTarget.disabled=!1,!1)}})},design:{"template.form_design.js":function t(){b.__checkName("formDesign"),b.formDesign=new b("Template.formDesign",(function(){var t=this;return O.DIV({class:"modal fade creator-modal flow-modal new-flow-modal",id:"newFlowModal"},"\n\t\t",O.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",O.DIV({class:"slds-modal__container"},"\n\t\t\t\t\t",R.With((function(){return R.call(t.lookup("form"))}),(function(){return["\n\t\t\t\t\t\t",O.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t\t\t",O.H2({class:"title slds-text-heading--medium"},"\n\t\t\t\t\t\t\t\t",O.H2({class:"slds-text-heading--medium"},"编辑表单:",p.View("lookup:name",(function(){return R.mustache(t.lookup("name"))}))),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\n\t\t\t\t\t\t",O.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t\t\t\t",p._TemplateWith((function(){return{form:R.call(t.lookup("."))}}),(function(){return R.include(t.lookupTemplate("formBuilder"))})),"\n\t\t\t\t\t\t"),"\n\n\t\t\t\t\t\t",O.FOOTER({class:"slds-modal__footer"},"\n\t\t\t\t\t\t\t",O.BUTTON({type:"submit",class:"slds-button slds-button_brand btn-confirm"},"确定"),"\n\t\t\t\t\t\t\t",O.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"form_design.coffee":function t(){var o=U="object"==typeof U?U:{};b.formDesign.helpers({form:function(){return Creator.odata.get("forms",b.instance().data.formId)}}),b.formDesign.events({"click .btn-confirm":function(t,o){var n,s,a,l,r;if(console.log("click .btn-confirm"),n=$("#fb-editor").data("formBuilder").actions.getData(),a=Creator.formBuilder.transformFormFieldsOut(n),r=Creator.formBuilder.validateFormFields(a))return delete(s=Creator.odata.get("forms",o.data.formId)).historys,s.current.fields=a,l=I.absoluteUrl("/am/forms?sync_token="+(new Date).getTime()/1e3),n={},s.id=s._id,n.Forms=[s],$.ajax({type:"put",url:l,data:JSON.stringify(n),dataType:"json",contentType:"application/json",processData:!1,beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken())},success:function(t){return toastr.success("修改成功"),S.hide(o)},error:function(t,e,o){var n;return 504===t.status?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__("连接超时,请稍后再试")):void 0:t.responseJSON?(n=t.responseJSON.error,console.error(n),n.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(n.reason)):void 0:n.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(n.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(n):void 0):"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t.responseText):void 0}})}})}},"template.admin_import_flow_modal.js":function t(){b.__checkName("admin_import_flow_modal"),b.admin_import_flow_modal=new b("Template.admin_import_flow_modal",(function(){var t=this;return O.DIV({class:"modal fade creator-modal flow-modal new-flow-modal",id:"newFlowModal"},"\n\t\t",O.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",O.DIV({class:"slds-modal__container"},"\n\t\t\t\t",O.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t",O.H2({class:"title slds-text-heading--medium"},"\n\t\t\t\t\t\t",O.H2({class:"slds-text-heading--medium"},p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"workflow_import_flow")}))),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\n\t\t\t\t",O.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t\t",O.DIV({class:"form-group slds-form-element",style:"padding: 0 .75rem;"},"\n\t\t\t\t\t\t",O.Raw(''),"\n\t\t\t\t\t\t",O.DIV({class:"import-files"},"\n\t\t\t\t\t\t\t",O.DIV("\n\t\t\t\t\t\t\t\t",O.DIV({class:"btn btn-default js-af-select-file",style:"width: 100%"},"\n\t\t\t\t\t\t\t\t\t",O.INPUT({type:"file",name:"importFlowFile",id:"importFlowFile",multiple:function(){return p.Unless((function(){return R.call(t.lookup("isUpgrade"))}),(function(){return"multiple"}))},accept:".json,.JSON"}),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",O.Raw(''),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t",O.Raw(''),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",p.Unless((function(){return R.call(t.lookup("isUpgrade"))}),(function(){return["\n\t\t\t\t\t",p._TemplateWith((function(){return{schema:R.call(t.lookup("schema")),id:R.call("importFlowForm")}}),(function(){return R.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t\t",p.Each((function(){return R.call(t.lookup("fields"))}),(function(){return["\n\t\t\t\t\t\t\t",O.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t\t",O.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t",O.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:R.call(t.lookup("."))}}),(function(){return R.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"]})),"\n\t\t\t\t\t"]}))})),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
'),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"admin_import_flow_modal.coffee":function e(){var o=U="object"==typeof U?U:{},n,s;n=["company_id"],b.admin_import_flow_modal.helpers({spaceId:function(){return m.get("spaceId")},schema:function(){var t,e,o,s;return s={},o=Creator.getObject("flows"),t=new k(Creator.getObjectSchema(o)),e=t._schema,d.each(n,(function(t){if(s[t]=e[t],s[t].autoform)return s[t].autoform.readonly=!1,s[t].autoform.disabled=!1})),new k(s)},fields:function(){return n},isUpgrade:function(){return!!this.flowId}}),s=function(t,e){var o;if(o=[],d.each(d.keys(t),(function(e){var n,s;return s=t[e].new_flows,n=[],d.each(s,(function(t){return n.push("查看流程")})),o.push("

"+e+": "+n.join("")+"

")})),o.length>0)return $(".help-block",e.find(".import-files")).append("

导入成功的文件("+o.length+"条):

"+o.join("")+"
")},b.admin_import_flow_modal.events({"change #importFlowFile,#importFlowForm":function(t,e){return $(e.find(".btn-confirm")).prop("disabled",!1)},"click .btn-confirm":function(e,o){var n,a,l,r,i,c,u,f,p,_,w;if(!(r=AutoForm.getCurrentDataForForm("importFlowForm"))||AutoForm.validateForm("importFlowForm")){if(n=null!=(u=AutoForm.getFormValues("importFlowForm"))&&null!=(f=u.insertDoc)?f.company_id:void 0,0!==(l=(a=$("#importFlowFile")[0].files).length)){for(i=new FormData,_="api/workflow/import/form?space="+m.get("spaceId"),n&&(_=_+"&company_id="+n),o.data.flowId&&(_=_+"&flowId="+o.data.flowId),$(o.find(".btn-confirm")).prop("disabled",!0),w=c=0,p=l-1;0<=p?c<=p:c>=p;w=0<=p?++c:--c)i.append("file-"+w,a[w]);return $(".help-block",o.find(".import-files")).html(""),$.ajax({type:"POST",url:I.absoluteUrl(_),processData:!1,contentType:!1,data:i,dataType:"json",success:function(e){var n,a,l,r;return console.log("data",e),n=e.multiple,r=e.success,o.data.flowId||toastr.success(t("workflow_import_flow_success")),n?s(r,o):(S.hide(o),d.isFunction(o.data.onSuccess)?(a=null!=(l=r[d.keys(r)[0]])?l.new_flows:void 0,o.data.onSuccess(a)):void 0)},error:function(e){var n,a,l,r;return(l=e.responseJSON.multiple)&&(n=e.responseJSON.fail,r=e.responseJSON.success,s(r,o),a=[],d.each(d.keys(n),(function(t){return a.push("

"+t+": "+n[t]+"

")})),$(".help-block",o.find(".import-files")).append("

导入失败的文件("+a.length+"条):

"+a.join("")+"
")),e.responseJSON.fail?(n=e.responseJSON.fail,d.each(n,(function(e,o){return d.isString(e)?toastr.error(e,o):toastr.error(t(e.reason,e.details),o)}))):toastr.error(t("workflow_import_flow_error")),console.error(e)}})}toastr.warning(t("workflow_import_flow_info"))}}})},"template.copy_flow_modal.js":function t(){b.__checkName("copy_flow_modal"),b.copy_flow_modal=new b("Template.copy_flow_modal",(function(){var t=this;return O.DIV({class:"modal fade creator-modal flow-modal copy-flow-modal",id:"newFlowModal"},"\n\t\t",O.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",O.DIV({class:"slds-modal__container"},"\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t

\n\t\t\t\t\t\t

复制流程

\n\t\t\t\t\t\n\t\t\t\t
'),"\n\n\t\t\t\t",O.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t",p._TemplateWith((function(){return{schema:R.call(t.lookup("schema")),id:R.call(t.lookup("formId"))}}),(function(){return R.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t",p.Each((function(){return R.call(t.lookup("fields"))}),(function(){return["\n\t\t\t\t\t\t",O.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t",O.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t",O.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:R.call(t.lookup("."))}}),(function(){return R.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"]}))})),"\n\t\t\t"),"\n\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
'),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"copy_flow_modal.coffee":function o(){var n=U="object"==typeof U?U:{},s,a;s=["name","company_id"],a="copyFlowForm",b.copy_flow_modal.helpers({formId:function(){return a},schema:function(){var t,e,o,n;return n={},o=Creator.getObject("flows"),t=new k(Creator.getObjectSchema(o)),e=t._schema,d.each(s,(function(t){if(n[t]=e[t],n[t].autoform)return n[t].autoform.readonly=!1,n[t].autoform.disabled=!1})),new k(n)},fields:function(){return s}}),b.copy_flow_modal.events({"click .btn-confirm":function(o,n){var s,l;return o.currentTarget.disabled=!0,AutoForm.validateField(a)?(s=AutoForm.getFormValues(a).insertDoc,l=n.data.record_id,e.call("flow_copy",I.spaceId(),l,s,(function(e,o){return e?toastr.error("error"):(toastr.success(t("workflow_copy_flow_success")),S.hide(n),d.isFunction(n.data.onSuccess)?n.data.onSuccess(o):void 0)}))):(o.currentTarget.disabled=!1,!1)}})},views:{flow:{"template.distribute_edit_flow_modal.js":function t(){b.__checkName("distribute_edit_flow_modal"),b.distribute_edit_flow_modal=new b("Template.distribute_edit_flow_modal",(function(){var t=this;return O.DIV({class:"modal fade",id:"distribute_edit_flow_modal"},"\n\t\t",O.DIV({class:"modal-dialog modal-lg modal-body-zoom",role:"document"},"\n\t\t\t",O.DIV({class:"modal-content ins-modal"},"\n\t\t\t\t",O.DIV({class:"modal-header"},"\n\t\t\t\t\t",O.Raw(''),"\n\t\t\t\t\t",O.H4({class:"modal-title"},"\n\t\t\t\t\t\t",p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"Edit")})),":",O.Raw(" "),p.View("lookup:flow.name",(function(){return R.mustache(R.dot(t.lookup("flow"),"name"))})),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\n\t\t\t\t",O.DIV({class:"modal-body",style:"overflow-y:auto"},"\n\t\t\t\t\t",O.DIV({class:"form-group"},"\n\t\t\t\t\t\t",O.LABEL({for:"distribute_edit_flow_select_users",class:"control-label"},p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"distribute_edit_flow_select_users")}))),"\n\t\t\t\t\t\t",p._TemplateWith((function(){return R.call(t.lookup("user_context"))}),(function(){return R.include(t.lookupTemplate("afSelectUser"))})),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",O.DIV({class:"form-group"},"\n\t\t\t\t\t\t",O.DIV({class:"checkbox"},"\n\t\t\t\t\t\t\t",O.LABEL(O.INPUT({type:"checkbox",id:"distribute_to_self",checked:function(){return p.If((function(){return R.call(t.lookup("to_self"))}),(function(){return"checked"}))}}),O.Raw(" "),p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"distribute_to_self")}))),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",O.DIV({class:"checkbox"},"\n\t\t\t\t\t\t\t",O.LABEL(O.INPUT({type:"checkbox",id:"distribute_end_notification",checked:function(){return p.If((function(){return R.call(t.lookup("end_notification"))}),(function(){return"checked"}))}}),O.Raw(" "),p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"distribute_end_notification")}))),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",O.DIV({class:"checkbox"},"\n\t\t\t\t\t\t\t",O.LABEL(O.INPUT({type:"checkbox",id:"upload_after_being_distributed",checked:function(){return p.If((function(){return R.call(t.lookup("upload_after_being_distributed"))}),(function(){return"checked"}))}}),O.Raw(" "),p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"flows_upload_after_being_distributed")}))),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",p.Each((function(){return R.call(t.lookup("allow_distribute_steps"))}),(function(){return["\n\t\t\t\t\t\t",O.DIV({class:"form-group"},"\n\t\t\t\t\t\t\t",O.LABEL({class:"control-label"},p.View("lookup:name",(function(){return R.mustache(t.lookup("name"))}))),"\n\t\t\t\t\t\t\t",p._TemplateWith((function(){return{id:R.call(R.dataMustache(t.lookup("_id"))),schema:R.call(t.lookup("schema")),doc:R.call(R.dataMustache(t.lookup("flows_doc"),t.lookup("distribute_optional_flows"))),type:R.call("update"),autosave:R.call(!1),placeholder:R.call(R.dataMustache(t.lookup("_"),"distribute_edit_flow_select_flows"))}}),(function(){return R.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:R.call("distribute_flows"),multiple:R.call(!0)}}),(function(){return R.include(t.lookupTemplate("afFieldInput"))})),"\n\t\t\t\t\t\t\t"]}))})),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\t\t\t\t",O.DIV({class:"modal-footer"},"\n\t\t\t\t\t",O.BUTTON({type:"button",class:"btn btn-primary",id:"distribute_edit_flow_modal_ok"},p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"OK")}))),"\n\t\t\t\t\t",O.BUTTON({type:"button",class:"btn btn-default","data-dismiss":"modal"},p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"Cancel")}))),"\n\t\t\t\t"),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"distribute_edit_flow_modal.coffee":function o(){var n=U="object"==typeof U?U:{};b.distribute_edit_flow_modal.helpers({user_context:function(){var t,e,o,n,s,a,l;return s=(null!=(e=this.flow)?e.distribute_optional_users:void 0)||[],a=d.pluck(s,"id"),o=T.getFormulaUserObjects(m.get("spaceId"),a),l=[],o.forEach((function(t){if(t)return l.push(t)})),n=d.pluck(l,"id"),t={value:l,dataset:{showOrg:!0,multiple:!0,values:n.toString()},name:"distribute_edit_flow_select_users",atts:{name:"distribute_edit_flow_select_users",id:"distribute_edit_flow_select_users",class:"selectUser form-control"}}},allow_distribute_steps:function(){return this.flow?d.where(this.flow.current.steps,{allowDistribute:!0}):new Array},flows_doc:function(t){return{distribute_flows:t}},schema:function(){var t;return t=new k({distribute_flows:{type:[String],optional:!0,autoform:{type:"universe-select",afFieldInput:{multiple:!0,optionsMethod:"get_distribute_flows",optionsMethodParams:JSON.stringify({spaceId:m.get("spaceId")})}}}})},to_self:function(){var t;return null!=(t=this.flow)?t.distribute_to_self:void 0},end_notification:function(){var t;return null!=(t=this.flow)?t.distribute_end_notification:void 0},upload_after_being_distributed:function(){var t;return null!=(t=this.flow)?t.upload_after_being_distributed:void 0}}),b.distribute_edit_flow_modal.events({"click #distribute_edit_flow_modal_ok":function(o,n){var s,a,l,r,i;return l=(r=$("#distribute_edit_flow_select_users")[0].dataset.values)?r.split(","):[],a=n.data.flow._id,s=d.where(n.data.flow.current.steps,{allowDistribute:!0}),i=new Array,console.log("allow_distribute_steps",s),d.each(s,(function(t){return i.push({_id:t._id,distribute_optional_flows:AutoForm.getFieldValue("distribute_flows",t._id)})})),$("body").addClass("loading"),e.call("update_distribute_settings",a,l,i,$("#distribute_to_self")[0].checked,$("#distribute_end_notification")[0].checked,$("#upload_after_being_distributed")[0].checked,(function(e,o){$("body").removeClass("loading"),e&&toastr.error(TAPi18n.__(e.reason)),!0===o&&(toastr.success(t("instance_approve_modal_modificationsave")),S.hide(n))}))}})}}}},cfs:{"instances.coffee":function t(o){var n=U="object"==typeof U?U:{},s,a,l,r,i;i="instances","OSS"===(null!=(a=e.settings.public.cfs)?a.store:void 0)?e.isClient?s=new A.Store.OSS(i):e.isServer&&(s=new A.Store.OSS(i,e.settings.cfs.aliyun)):"S3"===(null!=(l=e.settings.public.cfs)?l.store:void 0)?e.isClient?s=new A.Store.S3(i):e.isServer&&(s=new A.Store.S3(i,e.settings.cfs.aws)):"STEEDOSCLOUD"===(null!=(r=e.settings.public.cfs)?r.store:void 0)?e.isClient?s=new A.Store.STEEDOSCLOUD(i):e.isServer&&(s=new A.Store.STEEDOSCLOUD(i,e.settings.cfs.steedosCloud)):e.isClient?s=new A.Store.FileSystem(i):e.isServer&&(s=new A.Store.FileSystem(i,{path:o("path").join(process.env.STEEDOS_STORAGE_DIR,"files/instances"),fileKeyMaker:function(t){var e,n,s,a,l,r,c,d,u,f,m,p,_,w,b;return(w=t&&t._getInfo(i))&&w.key?w.key:(s=t.name(),n=(f=(u=(a=t.name({store:i}))||s).split(".")).pop(),l=f.join(".").substring(0,50)+"."+n,b=(m=new Date).getFullYear(),d=m.getMonth()+1,r=t.metadata.instance,p=o("path"),c=o("mkdirp"),_=p.join(process.env.STEEDOS_STORAGE_DIR,"files/instances/"+b+"/"+d+"/"+r),e=p.resolve(_),c.sync(e),b+"/"+d+"/"+r+"/"+t.collectionName+"-"+t._id+"-"+l)}})),cfs.instances=new A.Collection(i,{stores:[s]}),cfs.instances.allow({download:function(){return!0}})}}}}}},{extensions:[".js",".json",".coffee",".less",".html"]});N("/node_modules/meteor/steedos:app-workflow/core.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/template.new_flow_modal.js"),N("/node_modules/meteor/steedos:app-workflow/client/new_flow_modal.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/design/template.form_design.js"),N("/node_modules/meteor/steedos:app-workflow/client/design/form_design.coffee"),N("/node_modules/meteor/steedos:app-workflow/cfs/instances.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/template.admin_import_flow_modal.js"),N("/node_modules/meteor/steedos:app-workflow/client/admin_import_flow_modal.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/template.copy_flow_modal.js"),N("/node_modules/meteor/steedos:app-workflow/client/copy_flow_modal.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/views/flow/template.distribute_edit_flow_modal.js"),N("/node_modules/meteor/steedos:app-workflow/client/views/flow/distribute_edit_flow_modal.coffee"),Package._define("steedos:app-workflow")}(); -Package._define("steedos:object-webhooks-queue"); +!function(){var e,o;Package._define("steedos:object-webhooks-queue")}(); !function(){var e=Package.meteor.Meteor,o=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.jquery.$,l=Package.jquery.jQuery,s=Package["templating-runtime"].Template,r=Package.session.Session,c=Package.blaze.Blaze,u=Package.blaze.UI,i=Package.blaze.Handlebars,d=Package["aldeed:autoform"].AutoForm,m=Package["raix:handlebar-helpers"].Helpers,p=Package["mpowaga:string-template"].StringTemplate,f=Package.promise.Promise,g=Package["aldeed:simple-schema"].SimpleSchema,h=Package["aldeed:simple-schema"].MongoObject,k=Package.spacebars.Spacebars,b=Package.htmljs.HTML,C;(function(){s.__checkName("autoformModals"),s.autoformModals=new s("Template.autoformModals",(function(){var t=this;return b.DIV({class:"modal fade creator-modal",id:"afModal"},"\n\t\t",b.DIV({class:function(){return["modal-dialog ",k.mustache(t.lookup("cmModalDialogClass"))," slds-modal slds-fade-in-open"]}},"\n\t\t\t",b.DIV({class:function(){return["slds-modal__container ",k.mustache(t.lookup("cmModalContentClass"))]}},"\n\t\t\t\t",b.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_icon slds-modal__close slds-button_icon-inverse",title:"Close","data-dismiss":"modal"},"\n\t\t\t\t\t\t",b.SVG({class:"slds-button__icon slds-button__icon_large","aria-hidden":"true"},"\n\t\t\t\t\t\t\t",b.USE({"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"/packages/steedos_lightning-design-system/client/icons/utility-sprite/symbols.svg#close"}),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",b.Raw('Close'),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",b.H2({class:"title slds-text-heading--medium"},"\n\t\t\t\t\t\t",b.H2({class:"slds-text-heading--medium"},c.View("lookup:title",(function(){return k.makeRaw(k.mustache(t.lookup("title")))}))),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\n\t\t\t\t",b.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$neq"),t.lookup("cmOperation"),"remove")}),(function(){return["\n\t\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$and"),t.lookup("cmCollection"),t.lookup("cmOperation"))}),(function(){return["\n\t\t\t\t\t\t\t",b.P(c.View("lookup:prompt",(function(){return k.makeRaw(k.mustache(t.lookup("prompt")))}))),"\n\t\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("shouldUpdateQuickForm"))}),(function(){return["\n\n\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{title:k.call(t.lookup("cmTitle")),id:k.call(t.lookup("cmFormId")),collection:k.call(t.lookup("cmCollection")),doc:k.call(t.lookup("cmDoc")),buttonContent:k.call(!1),template:k.call(t.lookup("cmTemplate")),"label-class":k.call(t.lookup("cmLabelClass")),"input-col-class":k.call(t.lookup("cmInputColClass")),buttonClasses:k.call(t.lookup("cmButtonClasses")),meteormethod:k.call(t.lookup("cmMeteorMethod")),type:k.call(t.lookup("cmAutoformType"))}}),(function(){return k.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(k.dot(t.lookup("schemaFields"),"grouplessFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(k.dot(t.lookup("schemaFields"),"grouplessFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{name:k.call(t.lookup("."))}}),(function(){return k.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(k.dot(t.lookup("schemaFields"),"groupFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(k.dot(t.lookup("schemaFields"),"groupFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(k.dot(t.lookup("."),"fields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-section slds-is-open group-section"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t",b.H3({class:"slds-section__title group-section-control"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.BUTTON({"aria-controls":"expando-unique-id","aria-expanded":"true",class:"slds-button slds-section__title-action"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{class:k.call("slds-section__title-action-icon slds-button__icon slds-button__icon_left"),source:k.call("utility-sprite"),name:k.call("switch")}}),(function(){return k.include(t.lookupTemplate("steedos_icon"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.SPAN({class:"slds-truncate",title:function(){return k.mustache(k.dot(t.lookup("."),"name"))}},c.View("lookup:..name",(function(){return k.mustache(k.dot(t.lookup("."),"name"))}))),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({"aria-hidden":"false",class:"slds-section__content",id:"expando-unique-id"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(k.dot(t.lookup("."),"fields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{name:k.call(t.lookup("."))}}),(function(){return k.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t\t\t"]}))})),"\n\t\t\t\t\t\n\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t"]})),"\n\t\t\t\t\t"]})),"\n\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmIsMultipleUpdate"))}),(function(){return["\n\t\t\t\t\t\t",b.DIV({class:"form-group multiple-box"},"\n\t\t\t\t\t\t\t",b.LABEL({class:"col-sm-2 control-label"}),"\n\t\t\t\t\t\t\t",b.DIV({class:"col-sm-10"},"\n\t\t\t\t\t\t\t\t",b.LABEL({class:"slds-checkbox"},"\n\t\t\t\t\t\t\t\t\t",b.INPUT({class:"keyboardMode--trigger ckb-multiple-update",type:"checkbox"}),"\n\t\t\t\t\t\t\t\t\t",b.SPAN({class:"slds-checkbox--faux"}),"\n\t\t\t\t\t\t\t\t\t",b.SPAN({class:"label-multiple-update"},"更新 ",c.View("lookup:cmTargetIds.length",(function(){return k.mustache(k.dot(t.lookup("cmTargetIds"),"length"))}))," 个选定记录"),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",b.SPAN({class:"help-block"}),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"remove")}),(function(){return["\n\t\t\t\t\t\t",b.DIV({class:"remove-prompt slds-text-align--center"},"是否确定要删除本条数据?"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\n\t\t\t\t",b.FOOTER({class:"slds-modal__footer"},"\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"insert")}),(function(){return["\n\t\t\t\t\t\t",b.BUTTON({type:"submit",class:"slds-button slds-button_brand btn-insert"},"保存"),"\n\n\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmSaveAndInsert"))}),(function(){return["\n\t\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-insert-and-create"},"保存并新建"),"\n\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"update")}),(function(){return["\n\n\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmShowRemoveButton"))}),(function(){return["\n\t\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_destructive btn-remove"},"删除"),"\n\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_brand btn-update"},"保存"),"\n\n\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmSaveAndInsert"))}),(function(){return["\n\t\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-update-and-create"},"保存并新建"),"\n\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"remove")}),(function(){return["\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_brand btn-remove"},"删除"),"\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\t\t\t"),"\n\t\t"),"\n\t")})),s.__checkName("afModal"),s.afModal=new s("Template.afModal",(function(){var t=this;return b.A({href:"#afModal",class:function(){return k.mustache(t.lookup("class"))},collection:function(){return k.mustache(t.lookup("collection"))},operation:function(){return k.mustache(t.lookup("operation"))}},"\n\t\t",c._InOuterTemplateScope(t,(function(){return k.include((function(){return k.call(t.templateContentBlock)}))})),"\n\t")}))}).call(this),function(){var o=C="object"==typeof C?C:{},n,l,c,u,i,m,f,g,h,k,b;b=["cmForm"],c="cmForm",n=null,d.addHooks("cmForm",{onSuccess:function(){return a("#afModal").modal("hide")},onError:function(e,o){return console.error(o),o.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(o.reason)):void 0:o.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(o.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(o):void 0}}),l=function(t){return t.split(".").reduce((function(t,e){return t[e]}),window)},f=function(t){var e;return e=_.map(t,(function(t,e){return(!t.autoform||!t.autoform.group)&&e})),e=_.compact(e)},h=function(t){var e;return e=_.map(t,(function(t){return t.autoform&&t.autoform.group})),e=_.compact(e),e=_.unique(e)},u=function(t,e){var o;return o=_.map(t,(function(t,o){return t.autoform&&t.autoform.group===e&&o})),o=_.compact(o)},g=function(t,e){return e=_.map(e,(function(e){var o,n;return(null==(n=(o=_.pick(t,e))[e].autoform)||!n.omit)&&e})),e=_.compact(e)},m=function(t,e){return e=_.map(e,(function(e){return _.indexOf(t,e)>-1&&e})),e=_.compact(e)},i=function(t,e){var o,n,a,l,s,r,c;for(n=[],a=0;a1?(s=r.get("cmCollection"),f=p,c=d.getFormValues(r.get("cmFormId")||"cmForm").updateDoc,m=r.get("object_name"),e.call("af_modal_multiple_update",{target_ids:f,doc:c,object_name:m},(function(e){return e?(console.error(e),e.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(e.reason)):void 0:e.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(error.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error("Sorry, update failed."):void 0):(a("#afModal").modal("hide"),"function"==typeof n?n():void 0)}))):a("#afModal #cmForm").submit()},"click button.btn-remove":function(e,o){var s,c,u;return c=r.get("cmCollection"),u=r.get("cmOperation"),s=r.get("cmDoc")._id,l(c).remove(s,(function(e){return e?(console.error(e),e.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(e.reason)):void 0:e.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(error.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error("Sorry, this could not be deleted."):void 0):(a("#afModal").modal("hide"),"function"==typeof n&&n(),"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.success?toastr.success(t("afModal_remove_suc")):void 0)}))},"click button.btn-update-and-create":function(t,e){return a("#afModal #cmForm").submit(),r.set("cmShowAgain",!0)},"click button.btn-insert-and-create":function(t,e){return a("#afModal #cmForm").submit(),r.set("cmShowAgain",!0)},"click .group-section-control":function(t,e){return t.preventDefault(),t.stopPropagation(),a(t.currentTarget).closest(".group-section").toggleClass("slds-is-open")}}),k={cmCollection:function(){return r.get("cmCollection")},cmOperation:function(){return r.get("cmOperation")},cmDoc:function(){return r.get("cmDoc")},cmButtonHtml:function(){return r.get("cmButtonHtml")},cmFields:function(){return r.get("cmFields")},cmOmitFields:function(){return r.get("cmOmitFields")},cmButtonContent:function(){return r.get("cmButtonContent")},cmCloseButtonContent:function(){return r.get("cmCloseButtonContent")},cmTitle:function(){return r.get("cmTitle")},cmButtonClasses:function(){return r.get("cmButtonClasses")},cmCloseButtonClasses:function(){return r.get("cmCloseButtonClasses")},cmPrompt:function(){return r.get("cmPrompt")},cmTemplate:function(){return r.get("cmTemplate")||"bootstrap3-horizontal"},cmLabelClass:function(){return r.get("cmLabelClass")||"col-sm-2"},cmInputColClass:function(){return r.get("cmInputColClass")||"col-sm-10"},cmPlaceholder:function(){return r.get("cmPlaceholder")},cmFormId:function(){return r.get("cmFormId")||"cmForm"},cmAutoformType:function(){return r.get("cmMeteorMethod")?"method":r.get("cmOperation")},cmModalDialogClass:function(){return r.get("cmModalDialogClass")},cmModalContentClass:function(){return r.get("cmModalContentClass")},cmMeteorMethod:function(){return r.get("cmMeteorMethod")},title:function(){return p.compile("{{{cmTitle}}}",k)},prompt:function(){return p.compile("{{{cmPrompt}}}",k)},buttonContent:function(){return p.compile("{{{cmButtonContent}}}",k)},closeButtonContent:function(){return p.compile("{{{cmCloseButtonContent}}}",k)},cmShowRemoveButton:function(){return r.get("cmShowRemoveButton")},shouldUpdateQuickForm:function(){var t;return null!=(t=s.instance())?t.shouldUpdateQuickForm.get():void 0},cmSaveAndInsert:function(){return r.get("cmSaveAndInsert")},cmIsMultipleUpdate:function(){var t,e;return t=r.get("cmIsMultipleUpdate")&&(null!=(e=r.get("cmTargetIds"))?e.length:void 0)>1},cmTargetIds:function(){return r.get("cmTargetIds")},schemaFields:function(){var t,e,o,n,a,s,c,d,p;if(t=r.get("cmCollection"),d=[],t)return p=l(t).simpleSchema()._schema,s=l(t).simpleSchema()._firstLevelSchemaKeys,r.get("cmFields")&&(s=[r.get("cmFields")]),r.get("cmOmitFields")&&(s=_.difference(s,[r.get("cmOmitFields")])),_.each(p,(function(t,e){var o;if(_.indexOf(s,e)>-1&&!(null!=(o=t.autoform)?o.omit:void 0))return d.push(e)})),1===d.length?a={grouplessFields:[d]}:(o=[],n=[],c=[],c=f(p),c=m(s,c),c=g(p,c),c=i(p,c),e=h(p),_.each(e,(function(t){return n=u(p,t),n=m(s,n),n=g(p,n),n=i(p,n),o.push({name:t,fields:n})})),a={grouplessFields:c,groupFields:o})}},s.autoformModals.helpers(k),s.afModal.events({"click *":function(t,e){var o,s,c;return t.preventDefault(),o=e.$("*").html(),e.data.collectionName?"update"===e.data.operation?c="编辑"+e.data.collectionName:"insert"===e.data.operation?c="新建"+e.data.collectionName:"remove"===e.data.operation&&(c="删除"+e.data.collectionName):c=o,r.set("cmCollection",e.data.collection),r.set("cmOperation",e.data.operation),r.set("cmFields",e.data.fields),r.set("cmOmitFields",e.data.omitFields),r.set("cmButtonHtml",o),r.set("cmTitle",e.data.title||c),r.set("cmTemplate",e.data.template),r.set("cmLabelClass",e.data.labelClass||e.data["label-class"]),r.set("cmInputColClass",e.data.inputColClass||e.data["input-col-class"]),r.set("cmPlaceholder",!0===e.data.placeholder?"schemaLabel":""),r.set("cmFormId",e.data.formId),r.set("cmMeteorMethod",e.data.meteormethod),r.set("cmModalDialogClass",e.data.dialogClass),r.set("cmModalContentClass",e.data.contentClass),r.set("cmShowRemoveButton",e.data.showRemoveButton||!1),r.set("cmSaveAndInsert",e.data.saveAndInsert),n=e.data.onSuccess,_.contains(b,e.data.formId)||(d.addHooks(e.data.formId,{onSuccess:function(){return a("#afModal").modal("hide")}}),b.push(e.data.formId)),e.data.doc&&r.set("cmDoc",l(e.data.collection).findOne({_id:e.data.doc})),e.data.showRemoveButton&&(e.data.buttonContent=!1),e.data.buttonContent||!1===e.data.buttonContent?r.set("cmButtonContent",e.data.buttonContent):"insert"===e.data.operation?r.set("cmButtonContent","Create"):"update"===e.data.operation?r.set("cmButtonContent","Update"):"remove"===e.data.operation&&r.set("cmButtonContent","Delete"),e.data.buttonClasses?r.set("cmButtonClasses",e.data.buttonClasses):"remove"===e.data.operation?r.set("cmButtonClasses","btn btn-danger"):r.set("cmButtonClasses","btn btn-primary"),r.set("cmCloseButtonContent",e.data.closeButtonContent||""),r.set("cmCloseButtonClasses",e.data.closeButtonClasses||"btn btn-danger"),e.data.prompt?r.set("cmPrompt",e.data.prompt):"remove"===e.data.operation?r.set("cmPrompt","Are you sure?"):r.set("cmPrompt",""),s=t.currentTarget.className,r.set("cmPressKey",s),r.get("cmShowAgain")&&(r.set("cmDoc",void 0),r.set("cmOperation","insert")),r.set("cmShowAgain",!1),a("#afModal").data("bs.modal").options.backdrop=e.data.backdrop||!0,a("#afModal").modal("show")}}),s.autoformModals.onCreated((function(){var t;return t=this,this.shouldUpdateQuickForm=new ReactiveVar(!0)})),s.autoformModals.onDestroyed((function(){return r.set("cmIsMultipleUpdate",!1),r.set("cmTargetIds",null)}))}.call(this),Package._define("steedos:autoform-modals")}(); diff --git a/server/bundle/programs/web.browser.legacy/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json b/server/bundle/programs/web.browser.legacy/6bff06e054ac5205945d97d558e533dad0a6378f.stats.json similarity index 99% rename from server/bundle/programs/web.browser.legacy/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json rename to server/bundle/programs/web.browser.legacy/6bff06e054ac5205945d97d558e533dad0a6378f.stats.json index 9ef2d3392f..405904464e 100644 --- a/server/bundle/programs/web.browser.legacy/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json +++ b/server/bundle/programs/web.browser.legacy/6bff06e054ac5205945d97d558e533dad0a6378f.stats.json @@ -3,15 +3,15 @@ "name": "standard-minifier-js", "version": "2.6.0" }, - "totalMinifiedBytes": 4306832, - "totalMinifiedGzipBytes": 1085093, + "totalMinifiedBytes": 4306866, + "totalMinifiedGzipBytes": 1085088, "minifiedBytesByPackage": { "packages/meteor.js": 9504, "packages/coffeescript.js": 32, "packages/blaze-html-templates.js": 40, "packages/modules-runtime.js": 4269, "packages/modules.js": [ - 928404, + 928390, { "node_modules": { "meteor": { @@ -741,7 +741,7 @@ }, "@steedos": { "i18n": { - "package.json": 95, + "package.json": 88, "lib": { "index.js": 2137, "i18n": { @@ -936,7 +936,7 @@ } }, "cachers": { - "package.json": 98, + "package.json": 91, "lib": { "index.js": 412, "memory.js": 501, @@ -2044,7 +2044,7 @@ "packages/dburles_collection-helpers.js": 557, "packages/mrt_moment.js": 30, "packages/steedos_loaders-css.js": 39, - "packages/matb33_collection-hooks.js": 9263, + "packages/matb33_collection-hooks.js": 9265, "packages/steedos_smsqueue.js": 36, "packages/flemay_less-autoprefixer.js": 44, "packages/steedos_ui.js": [ @@ -2382,7 +2382,7 @@ } } ], - "packages/steedos_mailqueue.js": 37, + "packages/steedos_mailqueue.js": 60, "packages/steedos_webhookqueue.js": 40, "packages/lamhieu_meteorx.js": 73, "packages/lamhieu_unblock.js": 35, @@ -2659,7 +2659,7 @@ } } ], - "packages/steedos_object-webhooks-queue.js": 49, + "packages/steedos_object-webhooks-queue.js": 72, "packages/steedos_autoform-modals.js": 20485, "packages/steedos_slipjs.js": 15081, "packages/steedos_workflow.js": [ diff --git a/server/bundle/programs/web.browser.legacy/program.json b/server/bundle/programs/web.browser.legacy/program.json index 1479de3617..f0d0c80dd4 100644 --- a/server/bundle/programs/web.browser.legacy/program.json +++ b/server/bundle/programs/web.browser.legacy/program.json @@ -2,24 +2,24 @@ "format": "web-program-pre1", "manifest": [ { - "path": "654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js", + "path": "6bff06e054ac5205945d97d558e533dad0a6378f.js", "where": "client", "type": "js", "cacheable": true, - "url": "/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js?meteor_js_resource=true", - "size": 4306832, - "hash": "654579c5cf995e5454837b1d9db81c0c6ae3a2ef", - "sri": "qPSOXHjsN4RdiFxjbVubxm9SU621aIWGApTnRxEnK/nUxXdRBZ5EDLh5i3kwqyu5lnh2UiAbktAQuHDnm54DVw==" + "url": "/6bff06e054ac5205945d97d558e533dad0a6378f.js?meteor_js_resource=true", + "size": 4306866, + "hash": "6bff06e054ac5205945d97d558e533dad0a6378f", + "sri": "q5wudNmv/B0dWi/Z6vihVrBl1u2goOvCqRT+UCqcBJ6IWxuJ6jQFb+Xtq/apUeIAK735BPqGDYV7kiJYVBHU3A==" }, { - "path": "654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json", + "path": "6bff06e054ac5205945d97d558e533dad0a6378f.stats.json", "where": "client", "type": "json", "cacheable": true, - "url": "/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json?meteor_js_resource=true", + "url": "/6bff06e054ac5205945d97d558e533dad0a6378f.stats.json?meteor_js_resource=true", "size": 92684, - "hash": "3c6856bff2d8b4985daf32fb3208891936216ebb", - "sri": "BzVj+opIx2k0j9EOsL7IEcb/oDRk2ddsuq6BtRsulup7sIKwQgH+MNEzxlqtGEaihfHRCPX1FEnmzg6Q2LTwHQ==" + "hash": "9232e935545a384e694468e74f3b6f8acfcacebe", + "sri": "y5fXOpn8G1MJXBjpLLwd9wCYg57kkFKRqjr8K2+BLangOuBl/J6JdZnLECAHBk4OQzuKoa1r8deUtm8ukpEADA==" }, { "path": "dynamic/node_modules/@steedos/form-builder/dist/form-builder.min.js", @@ -58,8 +58,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_asc.png", "size": 1118, - "hash": "316902f252ed6c1df0f2e249b595947ea614561f", - "sri": "Nuoh8B6BuGHNfEMcEHBZAoIr9Hqg328mnKZu8sn85o8HP3yCGm3WWL1+6HnrnfdsohuJ7lisX5qag8ImWgdKmw==" + "hash": "f7d6c6b431b0d8e55f2edc2cac3b93319a48445e", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_asc_disabled.png", @@ -68,8 +68,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_asc_disabled.png", "size": 2916, - "hash": "d3b36e7e840073d72c41234d8ea9458f6fbfdd89", - "sri": "Np57d/2rfIV4VBtl977miwbZdQVVtfe7JCeZAAQNAJBVm96NeBs2yHIos6KTPsRyPfn72bR2wQ+Ie93VbCyB5w==" + "hash": "cafa49620d7bd15a9fd0644dedec4ba862b3a2d4", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_both.png", @@ -78,8 +78,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_both.png", "size": 1136, - "hash": "ab54233bd2b1c940c4dc31fb0c61153df0688cd3", - "sri": "kwpWVgKlaCLJoySRqvgvt4GPbeqSqx+eBIKkOT4LOxt5w0uhM3z2hK/QtVVRzk/p7XN3ljW0PlvgO/uCB+G+KQ==" + "hash": "7d5a19949989bb107e478c6e55ea65f8c325abcd", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_desc.png", @@ -88,8 +88,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_desc.png", "size": 1127, - "hash": "e0d717f0b79a6fa7648a2f7803db6883482d94d3", - "sri": "WcMO6Jpo1AHAjz5kpNECZzheBFC1I2aUzGoYr+UTdKg/gtLWrw48Z2hxpzvt2V38F8G/4z7CgVxRxES189aUMg==" + "hash": "d69a3fd48716a8c4d8df38859cd0c1d7dab5e296", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_desc_disabled.png", @@ -98,8 +98,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_desc_disabled.png", "size": 1045, - "hash": "d78cd75eda77f65256044e0c16554a48901fe46f", - "sri": "wWNhEtCCD5xwQdWjTJJtJh2jA5jTW7zZ6N8rKBufbZ0n5f/i+dDSZFVafcMEuBGi+1jFnjINgbsQcozynkBlTA==" + "hash": "cd40181787ffeaef98d82fba7b0f6b7a5293e2aa", + "sri": null }, { "path": "packages/steedos_autoform-bs-minicolors/public/jquery.minicolors.png", diff --git a/server/bundle/programs/web.browser/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js b/server/bundle/programs/web.browser/6bff06e054ac5205945d97d558e533dad0a6378f.js similarity index 96% rename from server/bundle/programs/web.browser/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js rename to server/bundle/programs/web.browser/6bff06e054ac5205945d97d558e533dad0a6378f.js index 0576ed0031..be623facf7 100644 --- a/server/bundle/programs/web.browser/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js +++ b/server/bundle/programs/web.browser/6bff06e054ac5205945d97d558e533dad0a6378f.js @@ -68,7 +68,7 @@ object-assign * Copyright 2011-2019 Twitter, Inc. * Licensed under the MIT license */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this,i;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(r).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};function r(t){return this.each((function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var r=e(this),i=r.attr("data-target");i||(i=(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function s(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s())};var i=e.fn.alert;e.fn.alert=r,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.isLoading=!1};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.button"),o="object"==typeof n&&n;i||r.data("bs.button",i=new t(this,o)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",o=r.data();t+="Text",null==o.resetText&&r.data("resetText",r[i]()),setTimeout(e.proxy((function(){r[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var r=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var r=e(t.target).closest(".btn");n.call(r,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.carousel"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n),s="string"==typeof n?n:o.slide;i||r.data("bs.carousel",i=new t(this,o)),"number"==typeof n?i.to(n):s?i[s]():o.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),r;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var i,o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,r){var i=this.$element.find(".item.active"),o=r||this.getItemForDirection(n,i),s=this.interval,a="next"==n?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var f=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:f,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=e(this.$indicators.children()[this.getItemIndex(o)]);l&&l.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:f,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(a),o.addClass(a),i.one("bsTransitionEnd",(function(){o.removeClass([n,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var r=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this};var i=function(t){var r=e(this),i=r.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=r.attr("data-target")||i,s=e(document).find(o);if(s.hasClass("carousel")){var a=e.extend({},s.data(),r.data()),u=r.attr("data-slide-to");u&&(a.interval=!1),n.call(s,a),u&&s.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(r)}function r(n){return this.each((function(){var r=e(this),i=r.data("bs.collapse"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);!i&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),i||r.data("bs.collapse",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(r.call(i,"hide"),n||i.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var u=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[s](this.$element[0][u])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var r=this.dimension();this.$element[r](this.$element[r]())[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 i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[r](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,r){var i=e(r);this.addAriaAndCollapsedClass(n(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=e.fn.collapse;e.fn.collapse=r,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=n(i),s,a=o.data("bs.collapse")?"toggle":i.data();r.call(o,a)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?e(document).find(n):null;return r&&r.length?r:t.parent()}function o(r){r&&3===r.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=i(t),o={relatedTarget:this};n.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&e.contains(n[0],r.target)||(n.trigger(r=e.Event("hide.bs.dropdown",o)),r.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function s(t){return this.each((function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",a)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+a);if(u.length){var f=u.index(t.target);38==t.which&&f>0&&f--,40==t.which&&fdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},f.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&e(document).find(e.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 i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},f.prototype.getDefaults=function(){return f.DEFAULTS},f.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete r[i];return(n=e.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=u(n.template,n.whiteList,n.sanitizeFn)),n},f.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,r){n[e]!=r&&(t[e]=r)})),t},f.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},f.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},f.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},f.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=i[0].offsetWidth,h=i[0].offsetHeight;if(u){var d=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-hp.width?"left":"left"==s&&c.left-ls.top+s.height&&(i.top=s.top+s.height-u)}else{var f=t.left-o,c=t.left+o+n;fs.right&&(i.left=s.left+s.width-c)}return i},f.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},f.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},f.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(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},f.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},f.prototype.enable=function(){this.enabled=!0},f.prototype.disable=function(){this.enabled=!1},f.prototype.toggleEnabled=function(){this.enabled=!this.enabled},f.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},f.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},f.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=c,e.fn.tooltip.Constructor=f,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function n(n){return this.each((function(){var r=e(this),i=r.data("bs.popover"),o="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||r.data("bs.popover",i=new t(this,o)),"string"==typeof n&&i[n]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var r=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(jQuery),function(e){"use strict";function t(n,r){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var r=e(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[n]().top+r,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),n=this.options.offset+t-this.$scrollElement.height(),r=this.offsets,i=this.targets,o=this.activeTarget,s;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(s=i[i.length-1])&&this.activate(s);if(o&&e=r[s]&&(void 0===r[s+1]||e .active"),s=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!r.find("> .fade").length);function a(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&s?o.one("bsTransitionEnd",a).emulateTransitionEnd(t.TRANSITION_DURATION):a(),o.removeClass("in")};var r=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=r,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i=e-r&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),f=e.Event(u+".bs.affix");if(this.$element.trigger(f),f.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),r=t.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(t,r)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,r,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),s=t("path"),a=t("detect-libc");Math.random();var u=s.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+a.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(c){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(c.stack||c.message||c),new Error("Missing binary. See message above.")}f(e.exports)}function f(e){try{var t=process.binding("async_wrap"),n;if(t.asyncIdStackSize instanceof Function)n=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");l=t.constants.kStackLength,n=function(){return t.async_hook_fields[l]}}var r=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,s;if(!r||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,s=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var a=t.async_id_fields||t.async_uid_fields;function u(){for(var e=n(),t=new Array(e);e>0;--e){var i=a[o];t[e-1]={asyncId:i,triggerId:a[s]},r(i)}return t}function f(e){for(var t=0;t0)i.changeLanguage(e,r);else if(0!=a[u]){a[u]=0;var f=new XMLHttpRequest;f.overrideMimeType("application/json"),f.open("GET",u,!1),f.send(null),200===f.status?a[u]=1:a[u]=-1,n.addResourceBundle(e,s,JSON.parse(f.response)||{}),i.changeLanguage(e,r)}};n.changeLanguage=p;var g=function(e,t,n){return i.format(e,t,n)};n.format=g;var b=function(){return i.languages};n.getLanguages=b;var m=function(e,t){return i.loadLanguages(e,t)};n.loadLanguages=m;var v=function(e,t){return i.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};n.on=y;var _=function(e,t){return i.off(e,t)};n.off=_,r.__exportStar(t("./i18n/i18n"),n),r.__exportStar(t("./i18n/i18n.app"),n),r.__exportStar(t("./translations"),n)},i18n:{"i18n.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fallbackKeys=n.getObjectI18nTemplate=n.translationI18nObjects=n.addObjectsI18n=n.translationI18nObject=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="_",a="base",u="core",f="translation",c=function(e,t){var n={lng:t,ns:f};if((0,r.exists)(e,n))return(0,r._t)(e,n)},l=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},d=function(e,t){var n=h(e,t);return"".concat(n).concat("_","inlineHelpText")},p=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(n)},g=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},b=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},m=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,n){var r=l(t);return c(r,e)||n||""},_=function(e,t,n,r,i){var o=h(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=_(e,a,n,r,i))}return s||r||""},w=function(e,t,n,r,i){var o=d(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=w(e,a,n,r,i))}return s||r||""},k=function(e,t,n,r){var i=p(t,n);return c(i,e)||r||""},j=function(e,t,n,r,i,o){var s=g(t,n,r),a=c(s,e);if(!a){var u=v(o);u&&"base"!=t&&"core"!=t&&(a=j(e,u,n,r,i,o))}return a||i||""},x=function(e,t,n,r,i){var o=b(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=x(e,a,n,r,i))}return s||r||""},S=function(e,t,n,r,i){var o=m(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=S(e,a,n,r,i))}return s||r||""},D=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},E=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},A=function(e,t,n){n.label=y(e,t,n.label),i.each(n.fields,(function(r,o){if(r.label=_(e,t,o,r.label,n.datasource),r.inlineHelpText&&(r.inlineHelpText=w(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(r.group=k(e,t,r.group,r.group)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var a=j(e,t,o,r.value,r.label,n.datasource);s.push(i.extend({},r,{label:a}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=x(e,t,i,r.label,n.datasource)})),i.each(n.list_views,(function(r,i){r.label=S(e,t,i,r.label,n.datasource)}))};n.translationI18nObject=A;var C=function(e){i.each(e,(function(e){(0,r.addResourceBundle)(e.lng,f,e.data,!0,!0)}))};n.addObjectsI18n=C;var M=function(e,t){i.each(t,(function(t,r){(0,n.translationI18nObject)(e,r,t)}))};n.translationI18nObjects=M;var O=function(e,t,n){var r=o(n);E(r);var s={};return s[l(t)]=y(e,t,r.label),i.each(r.fields,(function(n,o){s[h(t,o)]=_(e,t,o,n.label),n.inlineHelpText&&(s[d(t,o)]=w(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(s[p(t,n.group)]=k(e,t,n.group,n.group)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[g(t,o,n.value)]=j(e,t,o,n.value,n.label))}))})),i.each(r.actions,(function(n,r){s[b(t,r)]=x(e,t,r,n.label)})),i.each(r.list_views,(function(n,r){s[m(t,r)]=S(e,t,r,n.label)})),s};n.getObjectI18nTemplate=O,n.fallbackKeys={getObjectLabelKey:l,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:d,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:g,getObjectActionLabelKey:b,getObjectListviewLabelKey:m}},"i18n.app.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.appFallbackKeys=n.getAppI18nTemplate=n.translationI18nApps=n.translationI18nMenus=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="translation",a="_",u=function(e,t){var n={lng:t,ns:s};if((0,r.exists)(e,n))return(0,r._t)(e,n)},f=function(e){return"app".concat("_").concat(e).concat("_","name")},c=function(e){return"app".concat("_").concat(e).concat("_","description")},l=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(n)},h=function(e){return"menu".concat("_").concat(e)},d=function(e){return"tab".concat("_").concat(e)},p=function(e,t,n){var r=f(t);return u(r,e)||n||""},g=function(e,t,n){var r=c(t);return u(r,e)||n||""},b=function(e,t,n){var r=h(t);return u(r,e)||n||""},m=function(e,t,r){r.label=p(e,t,r.label||r.name),r.description=g(e,t,r.description),(0,n.translationI18nMenus)(e,r.admin_menus)},v=function(e,t){i.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=y;var _=function(e,t,n){var r=o(n),s={};return s[f(t)]=p(e,t,r.label||r.name),s[c(t)]=g(e,t,r.description),i.each(r.admin_menus,(function(t){s[h(t._id)]=b(e,t._id,t.label||t.name)})),s};n.getAppI18nTemplate=_,n.appFallbackKeys={getAppLabelKey:f,getAppDescriptionKey:c,getAppGroupKey:l,getMenuLabelKey:h,getTabKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var r=t("tslib"),i=t("underscore");r.__exportStar(t("./objectTranslation"),n),r.__exportStar(t("./translation"),n),r.__exportStar(t("./templates/objectTranslation"),n),r.__exportStar(t("./templates/translation"),n);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},s=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(r){console.error("Creator.convertFieldsOptions",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},a;n.convertObject=s,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(a=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),s=t("../index"),a=t("./index"),u=t("../i18n/i18n"),f=t("lodash"),c=t("crypto"),l,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function d(e){var t;return c.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(d(JSON.stringify(t)))},g=t("clone"),b=".",m="base",v="core",y="translation",_="object",w="field",k="listview",j="action",x=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,s.exists)(e,n))return(0,s._t)(e,n)},S=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},D=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},E=function(e){var t;return[D(),e].join(".")},A=function(e){var t;return[D("object"),e,"label"].join(".")},C=function(e){var t;return[D("object"),e,"description"].join(".")},M=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},T=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},B=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),r;return[D("field"),e,"group",n].join(".")},I=function(e,t,n){var r;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},R=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},P=function(e,t,n){var r,i=[A(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),x(i,e)||n||""};n.translationObjectLabel=P;var N=function(e,t,n){var r=C(t);return x(r,e)||n||""},L=function(e,t,n,r,i,o){var s,a=[M(t,n)],f=u.fallbackKeys.getObjectFieldLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=L(e,l,n,r,i))}return c||r||""},z=function(e,t,n,r,i,o){var s,a=[O(t,n)],f=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=z(e,l,n,r,i))}return c||r||""},U=function(e,t,n,r,i,o){var s=T(t,n),a,u=x([s],e);if(1!=o&&!u){var f=S(i);f&&"base"!=t&&"core"!=t&&(u=U(e,f,n,r,i))}return u||r||""},q=function(e,t,n,r,i,o){var s,a=[B(t,n)],f=u.fallbackKeys.getObjectFieldGroupKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=q(e,l,n,r,i))}return c||r||""},$=function(e,t,n,r,i,o,s){var a,f=[I(t,n,r)],c=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,r);c&&f.push(c);var l=x(f,e);if(1!=s&&!l){var h=S(o);h&&"base"!=t&&"core"!=t&&(l=$(e,h,n,r,i,o))}return l||i||""},W=function(e,t,n,r,i,o){var s,a=[R(t,n)],f=u.fallbackKeys.getObjectActionLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=W(e,l,n,r,i))}return c||r||""},H=function(e,t,n,r,i,o){var s,a=[F(t,n)],f=u.fallbackKeys.getObjectListviewLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=H(e,l,n,r,i))}return c||r||""},Y=function(e,t,r,o,s){void 0===s&&(s=!1);var u=p(e,r),c=h.get(u);if(c)return Object.assign(r,(0,f.cloneDeep)(c));o&&(0,a.convertObject)(r),r.label=(0,n.translationObjectLabel)(e,t,r.label),r.description=N(e,t,r.description),i.each(r.fields,(function(n,o){if(n.label=L(e,t,o,n.label,r.datasource,s),n.inlineHelpText=z(e,t,o,n.inlineHelpText,r.datasource,s),n.description=U(e,t,o,n.description,r.datasource,s),n.group&&(n.group=q(e,t,n.group,n.group,r.datasource,s)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var u=$(e,t,o,n.value,n.label,r.datasource,s);a.push(i.extend({},n,{label:u}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=W(e,t,i,n.label,r.datasource,s)})),i.each(r.list_views,(function(n,i){n.label=H(e,t,i,n.label,r.datasource,s)})),h.set(u,(0,f.cloneDeep)(r))};n.translationObject=Y;var V=function(e,t){i.each(t,(function(t,r){(0,n.translationObject)(e,r,t)}))};n.translationObjects=V;var K=function(e,t,r){var o=g(r);(0,a.convertObject)(o);var s={};return s[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),s[C(t)]=N(e,t,o.description),i.each(o.fields,(function(n,r){s[M(t,r)]=L(e,t,r,n.label),n.inlineHelpText&&(s[O(t,r)]=z(e,t,r,n.inlineHelpText,o.datasource)),n.description&&(s[T(t,r)]=U(e,t,r,n.description,o.datasource)),n.group&&(s[B(t,n.group)]=q(e,t,n.group,n.group,o.datasource)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[I(t,r,n.value)]=$(e,t,r,n.value,n.label))}))})),i.each(o.actions,(function(n,r){s[R(t,r)]=W(e,t,r,n.label)})),i.each(o.list_views,(function(n,r){s[F(t,r)]=H(e,t,r,n.label)})),s};function G(e,t){var n=g(e);(0,a.convertObject)(n);var r={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),r[A(o)]=n.label,r[C(o)]=n.description,i.each(n.fields,(function(e,t){r[M(o,t)]=e.label,e.help&&(r[O(o,t)]=e.help),e.description&&(r[T(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(r[I(o,t,e.value)]=e.label)}))})),i.each(n.groups,(function(e,t){r[B(o,t)]=e})),i.each(n.actions,(function(e,t){r[R(o,t)]=e.label})),i.each(n.listviews,(function(e,t){r[F(o,t)]=e.label})),i.each(n.CustomLabels,(function(e,t){r[E(t)]=e})),r}n.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,s.addResourceBundle)(e.lng,y,t,!0,!0)}))};n.addObjectsTranslation=X},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addTranslations=n.convertTranslation=n.convertTranslationData=n.getAppTranslationTemplate=n.translationApps=n.translationMenus=n.translationApp=n.translationTabLabel=n.translationTabGroup=void 0;var r=t("../index"),i=t("underscore"),o=t("./"),s=t("../i18n/i18n.app"),a=t("clone"),u="translation",f=".",c="app",l="menu",h="tab",d=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[d(),e].join(".")},g=function(e,t){var n={lng:t,ns:u,keySeparator:!1};if((0,r.exists)(e,n))return(0,r._t)(e,n)},b=function(e){var t;return[d("app"),e,"name"].join(".")},m=function(e){var t;return[d("app"),e,"description"].join(".")},v=function(e,t){var n,r;return[d("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[d("menu"),"menu_".concat(e)].join(".")},_=function(e){var t;return[d("tab"),e].join(".")},w=function(e,t,n){var r,i=[b(t)],o=s.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),g(i,e)||n||""},k=function(e,t,n){var r,i=[m(t)],o=s.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),g(i,e)||n||""},j=function(e,t,n,r){var i,o=[v(t,n)],a=s.appFallbackKeys.getAppGroupKey(t,n);return a&&o.push(a),g(o,e)||r||""};n.translationTabGroup=j;var x=function(e,t,n){var r,i=[y(t)],o=s.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),g(i,e)||n||""},S=function(e,t,n){var r,i=[_(t)],o=s.appFallbackKeys.getTabKey(t);return o&&i.push(o),g(i,e)||n||""};n.translationTabLabel=S;var D=function(e,t,r){r.label=w(e,t,r.label||r.name),r.description=k(e,t,r.description),i.each(r.tab_groups,(function(i,o){r.tab_groups[o].id=i.id||i.group_name,r.tab_groups[o].group_name=(0,n.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,n.translationMenus)(e,r.admin_menus)};n.translationApp=D;var E=function(e,t){i.each(t,(function(t){var n=x(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=E;var A=function(e,t){i.each(t,(function(t,r){(0,n.translationApp)(e,r,t)}))};n.translationApps=A;var C=function(e,t,n){var r=a(n),o={};return o[b(t)]=w(e,t,r.label||r.name),o[m(t)]=k(e,t,r.description),i.each(r.admin_menus,(function(t){o[y(t._id)]=x(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var M=function(e,t,n){i.isArray(n)?i.each(n,(function(e){M(e,"",e)})):n&&i.each(i.keys(n),(function(r){var o=t?"".concat(t,".").concat(r):r,s=n[r];"object"==typeof s?i.isArray(s)?i.each(s,(function(e){M(e,o,s)})):M(e,o,s):e[o]=s}))};function O(e){for(var t in e)"object"==typeof e[t]&&M(e,t,e[t]);return e}n.convertTranslationData=O;var T=function(e){var t=a(e),n={};return i.each(t.CustomApplications,(function(e,t){n[b(t)]=e.name,n[m(t)]=e.description,i.each(e.groups,(function(e,r){n[v(t,r)]=e}))})),i.each(t.CustomTabs,(function(e,t){n[_(t)]=e})),i.each(t.CustomLabels,(function(e,t){var r;if("simpleschema"!=t&&i.isObject(e)){var o=O(((r={})[t]=e,r));i.each(o,(function(e,t){i.isObject(e)||(n[p(t)]=e)}))}else n[p(t)]=e})),n};n.convertTranslation=T;var B=function(e){i.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,r.addResourceBundle)(e.lng,u,t,!0,!0)}))};n.addTranslations=B},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function a(e){return s(["label","description"],e)}function u(e){switch(e.type){case"select":return s(["label","help","options","description"],e);default:return s(["label","help","description"],e)}}function f(e){return s(["label"],e)}function c(e){return s(["label"],e)}function l(e){var t={};return r.each(e,(function(e,n){t[n]=u(e)})),t}function h(e){var t={};return r.each(e,(function(e,n){t[n]=c(e)})),t}function d(e){var t={};return r.each(e,(function(e,n){t[n]=f(e)})),t}function p(e,t){var n={};return r.each(e,(function(e,r){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[i]=t[r].group}})),n}var g=function(e,t,n,s){void 0===s&&(s=!1);var u=o(n);1!=s&&(0,i.translationObject)(e,t,u,!0,s);var f=Object.assign({},a(u));f=Object.assign({},f,{fields:l(u.fields)});var c=p(n.fields,u.fields);r.isEmpty(c)||(f=Object.assign({},f,{groups:c}));var g=d(u.list_views);r.isEmpty(g)||(f=Object.assign({},f,{listviews:g}));var b=h(u.actions);return r.isEmpty(b)||(f=Object.assign({},f,{actions:b})),Object.assign({name:t},f)};n.getObjectMetadataTranslationTemplate=g},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]=t[e]||""})),n}function a(e){var t={groups:{}};return e?(r.each(e,(function(e){var n=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[n]=e.group_name})),t):{}}var u=function(e){return Object.assign({},s(["name","description"],e),a(e.tab_groups))},f=function(e){var t={};return r.each(e,(function(e,n){t[n]=n})),t},c=function(e){var t={};return r.each(e,(function(e){var n=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[n]=e})),t},l=function(e,t,n){var r,s=o(n);(0,i.translationApp)(e,t,s);var a={},l;return s.tab_items?a=f(s.tab_items):s.tabs&&(a=c(s.tabs)),Object.assign({},{CustomApplications:(r={},r[t]=u(s),r)},{CustomTabs:a})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",module:"./dist/esm/i18next.js",main:"./dist/cjs/i18next.js"}},dist:{esm:{"i18next.js":function e(t,n,e){let r,i,o,s,a,u,f,c;e.link("@babel/runtime/helpers/esm/typeof",{default(e){r=e}},0),e.link("@babel/runtime/helpers/esm/objectSpread",{default(e){i=e}},1),e.link("@babel/runtime/helpers/esm/classCallCheck",{default(e){o=e}},2),e.link("@babel/runtime/helpers/esm/createClass",{default(e){s=e}},3),e.link("@babel/runtime/helpers/esm/possibleConstructorReturn",{default(e){a=e}},4),e.link("@babel/runtime/helpers/esm/getPrototypeOf",{default(e){u=e}},5),e.link("@babel/runtime/helpers/esm/assertThisInitialized",{default(e){f=e}},6),e.link("@babel/runtime/helpers/esm/inherits",{default(e){c=e}},7);var l={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,n){console&&console[t]&&console[t].apply(console,n)}},h,d=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n)}return s(e,[{key:"init",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||l,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function y(e,t,n){var r=v(e,t,Object),i,o;r.obj[r.k]=n}function _(e,t,n,r){var i=v(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function w(e,t){var n=v(e,t),r=n.obj,i=n.k;if(r)return r[i]}function k(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return c(t,e),s(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[t,n];return r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split(".")),w(this.data,s)}},{key:"addResource",value:function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(i=n,n=(a=t.split("."))[1]),this.addNamespaces(n),y(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}},{key:"addResources",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}},{key:"addResourceBundle",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},u=[t,n];t.indexOf(".")>-1&&(o=r,r=n,n=(u=t.split("."))[1]),this.addNamespaces(n);var f=w(this.data,u)||{};o?j(f,r,s):f=i({},f,r),y(this.data,u,f),a.silent||this.emit("added",t,n,r)}},{key:"removeResourceBundle",value:function e(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}},{key:"hasResourceBundle",value:function e(t,n){return void 0!==this.getResource(t,n)}},{key:"getResourceBundle",value:function e(t,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(t,n)):this.getResource(t,n)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(p),C={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,r,i,o){var s=this;return t.forEach((function(e){s.processors[e]&&(n=s.processors[e].process(n,r,i,o))})),n}},M={},O=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),m(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,f(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=d.create("translator"),n}return c(t,e),s(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,n);return r&&void 0!==r.res}},{key:"extractFromKey",value:function e(t,n){var r=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:o};var a=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,o,s){var a=this;if("object"!==r(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var u=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(n[n.length-1],o),c=f.key,l=f.namespaces,h=l[l.length-1],d=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=o.nsSeparator||this.options.nsSeparator;return h+g+c}return c}var b=this.resolve(n,o),m=b&&b.res,v=b&&b.usedKey||c,y=b&&b.exactUsedKey||c,_=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(j&&m&&x&&w.indexOf(_)<0&&("string"!=typeof k||"[object Array]"!==_)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,o):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(u){var S="[object Array]"===_,D=S?[]:{},E=S?y:v;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var C="".concat(E).concat(u).concat(A);D[A]=this.translate(C,i({},o,{joinArrays:!1,ns:l})),D[A]===C&&(D[A]=m[A])}m=D}}else if(j&&"string"==typeof k&&"[object Array]"===_)(m=m.join(k))&&(m=this.extendTranslation(m,n,o,s));else{var M=!1,O=!1,T=void 0!==o.count&&"string"!=typeof o.count,B=t.hasDefaultValue(o),I=T?this.pluralResolver.getSuffix(d,o.count):"",R=o["defaultValue".concat(I)]||o.defaultValue;!this.isValidLookup(m)&&B&&(M=!0,m=R),this.isValidLookup(m)||(O=!0,m=c);var F=B&&R!==m&&this.options.updateMissing;if(O||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,h,c,F?R:m),u){var P=this.resolve(c,i({},o,{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},i,o,s,a,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(i)){var t=n.extractFromKey(e,r),f=t.key;o=f;var c=t.namespaces;n.options.fallbackNS&&(c=c.concat(n.options.fallbackNS));var l=void 0!==r.count&&"string"!=typeof r.count,h=void 0!==r.context&&"string"==typeof r.context&&""!==r.context,d=r.lngs?r.lngs:n.languageUtils.toResolveHierarchy(r.lng||n.language,r.fallbackLng);c.forEach((function(e){n.isValidLookup(i)||(u=e,!M["".concat(d[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(u)&&(M["".concat(d[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(t){if(!n.isValidLookup(i)){a=t;var o=f,u=[o],c,d;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(u,f,t,e,r);else l&&(c=n.pluralResolver.getSuffix(t,r.count)),l&&h&&u.push(o+c),h&&u.push(o+="".concat(n.options.contextSeparator).concat(r.context)),l&&u.push(o+=c);for(;d=u.pop();)n.isValidLookup(i)||(s=d,i=n.getResource(t,e,d,r))}})))}))}})),{res:i,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:u}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&void 0!==t[r])return!0;return!1}}]),t}(p);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}var B=function(){function e(t){o(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d.create("languageUtils")}return s(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=T(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var n=this,r;return t?(t.forEach((function(e){if(!r){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(r=t)}})),!r&&this.options.supportedLngs&&t.forEach((function(e){if(!r){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return r=t;r=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function e(t,n){if(!t)return[];if("function"==typeof t&&(t=t(n)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function e(t,n){var r=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=function e(t){t&&(r.isSupportedCode(t)?o.push(t):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(t))):"string"==typeof t&&s(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&s(r.formatLanguageCode(e))})),o}}]),e}(),I=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],R={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function F(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:R[t.fc]}}))})),e}var P=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.languageUtils=t,this.options=n,this.logger=d.create("pluralResolver"),this.rules=F()}return s(e,[{key:"addRule",value:function e(t,n){this.rules[t]=n}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,n){return this.getSuffixes(t).map((function(e){return n+e}))}},{key:"getSuffixes",value:function e(t){var n=this,r=this.getRule(t);return r?r.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var r=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(n):i.plurals(Math.abs(n)),s=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var a=function e(){return r.options.prepend&&s.toString()?r.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=d.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=void 0!==n.escape?n.escape:D,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?x(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?x(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?x(n.nestingPrefix):n.nestingPrefixEscaped||x("$t("),this.nestingSuffix=n.nestingSuffix?x(n.nestingSuffix):n.nestingSuffixEscaped||x(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function e(t,n,r,i){var o=this,s,a,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function e(t){if(t.indexOf(o.formatSeparator)<0){var s=k(n,f,t);return o.alwaysFormat?o.format(s,void 0,r):s}var a=t.split(o.formatSeparator),u=a.shift().trim(),c=a.join(o.formatSeparator).trim();return o.format(k(n,f,u),c,r,i)};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return c(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?c(o.escape(t)):c(t)}}].forEach((function(e){for(u=0;s=e.regex.exec(t);){if(void 0===(a=l(s[1].trim())))if("function"==typeof h){var n=h(t,s,i);a="string"==typeof n?n:""}else{if(d){a=s[0];continue}o.logger.warn("missed to pass in variable ".concat(s[1]," for interpolating ").concat(t)),a=""}else"string"==typeof a||o.useRawValueToEscape||(a=b(a));if(t=t.replace(s[0],e.safeValue(a)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s,a,u=i({},o);function f(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(s){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),s),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e}for(u.applyPostProcessor=!1,delete u.defaultValue;s=this.nestingRegexp.exec(t);){var c=[],l=!1;if(s[0].includes(this.formatSeparator)&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map((function(e){return e.trim()}));s[1]=h.shift(),c=h,l=!0}if((a=n(f.call(this,s[1].trim(),u),u))&&s[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=b(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return r.format(e,t,o.lng,o)}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}]),e}();function L(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var z=function(e){function t(e,n,r){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o(this,t),i=a(this,u(t).call(this)),E&&p.call(f(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=s,i.logger=d.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,s.backend,s),i}return c(t,e),s(t,[{key:"queueLoad",value:function e(t,n,r,i){var o=this,s=[],a=[],u=[],f=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var i="".concat(e,"|").concat(n);!r.reload&&o.store.hasResourceBundle(e,n)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?a.indexOf(i)<0&&a.push(i):(o.state[i]=1,t=!1,a.indexOf(i)<0&&a.push(i),s.indexOf(i)<0&&s.push(i),f.indexOf(n)<0&&f.push(n)))})),t||u.push(e)})),(s.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:s,pending:a,toLoadLanguages:u,toLoadNamespaces:f}}},{key:"loaded",value:function e(t,n,r){var i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(r){_(r.loaded,[o],s),L(r.pending,t),n&&r.errors.push(n),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){e[t]||(e[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,n,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,n,r,o+1,2*s,a)}),s):a(e,u)})):a(null,{})}},{key:"prepareLoading",value:function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var s=this.queueLoad(t,n,i,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function e(t,n,r){this.prepareLoading(t,n,{},r)}},{key:"reload",value:function e(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}},{key:"loadOne",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],s=i[1];this.read(o,s,"read",void 0,void 0,(function(e,i){e&&n.logger.warn("".concat(r,"loading namespace ").concat(s," for language ").concat(o," failed"),e),!e&&i&&n.logger.log("".concat(r,"loaded namespace ").concat(s," for language ").concat(o),i),n.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(t,n,r,o,null,i({},a,{isUpdate:s})),t&&t[0]&&this.store.addResource(t[0],n,r,o))}}]),t}(p);function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var n={};if("object"===r(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===r(t[2])||"object"===r(t[3])){var i=t[3]||t[2];Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n},interpolation:{escapeValue:!0,format:function e(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function q(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $(){}var W,H=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(o(this,t),e=a(this,u(t).call(this)),E&&p.call(f(e)),e.options=q(n),e.services={},e.logger=d,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),a(e,f(e));setTimeout((function(){e.init(n,r)}),0)}return e}return c(t,e),s(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},U(),this.options,q(n)),this.format=this.options.interpolation.format,r||(r=$),!this.options.isClone){this.modules.logger?d.init(o(this.modules.logger),this.options):d.init(null,this.options);var s=new B(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=d,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new P(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new N(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new z(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var l=g(),h=function e(){var n=function e(n,i){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(i),r(n,i)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return n(null,t.t.bind(t));t.changeLanguage(t.options.lng,n)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),l}},{key:"loadResources",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,i=r,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var s=[],a=function e(t){var r;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(s,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,n,r){var i=g();return t||(t=this.languages),n||(n=this.options.ns),r||(r=$),this.services.backendConnector.reload(t,n,(function(e){i.resolve(),r(e)})),i}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&C.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var r=this;this.isLanguageChangingTo=t;var i=g();this.emit("languageChanging",t);var o=function e(t,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,i.resolve((function(){return r.t.apply(r,arguments)})),n&&n(t,(function(){return r.t.apply(r,arguments)}))},s=function e(t){var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||(r.language=n,r.languages=r.services.languageUtils.toResolveHierarchy(n)),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,(function(e){o(e,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(t):s(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,n){var o=this,s=function e(t,n){var s;if("object"!==r(n)){for(var a=arguments.length,u=new Array(a>2?a-2:0),f=2;f1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],o=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function e(t,r){var i=n.services.backendConnector.state["".concat(t,"|").concat(r)];return-1===i||2===i};if(r.precheck){var u=r.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!a(i,t)||o&&!a(s,t)))}},{key:"loadNamespaces",value:function e(t,n){var r=this,i=g();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var r=g();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(n&&n(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var n}},{key:"createInstance",value:function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(n,r)}},{key:"cloneInstance",value:function e(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,s=i({},this.options,r,{isClone:!0}),a=new t(s),u=["store","services","language"];return u.forEach((function(e){a[e]=n[e]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new O(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rr,root:()=>i,ArrayProto:()=>o,ObjProto:()=>s,SymbolProto:()=>a,push:()=>u,slice:()=>f,toString:()=>c,hasOwnProperty:()=>l,supportsArrayBuffer:()=>h,supportsDataView:()=>d,nativeIsArray:()=>p,nativeKeys:()=>g,nativeCreate:()=>b,nativeIsView:()=>m,_isNaN:()=>v,_isFinite:()=>y,hasEnumBug:()=>_,nonEnumerableProps:()=>w,MAX_ARRAY_INDEX:()=>k});var r="1.13.4",i="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,u=o.push,f=o.slice,c=s.toString,l=s.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,p=Array.isArray,g=Object.keys,b=Object.create,m=h&&ArrayBuffer.isView,v=isNaN,y=isFinite,_=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=Math.pow(2,53)-1},"restArguments.js":function e(t,n,e){function r(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;ir})},"isObject.js":function e(t,n,e){function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}e.export({default:()=>r})},"isNull.js":function e(t,n,e){function r(e){return null===e}e.export({default:()=>r})},"isUndefined.js":function e(t,n,e){function r(e){return void 0===e}e.export({default:()=>r})},"isBoolean.js":function e(t,n,e){let r;function i(e){return!0===e||!1===e||"[object Boolean]"===r.call(e)}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isElement.js":function e(t,n,e){function r(e){return!(!e||1!==e.nodeType)}e.export({default:()=>r})},"isString.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("String"))},"_tagTester.js":function e(t,n,e){let r;function i(e){var t="[object "+e+"]";return function(e){return r.call(e)===t}}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isNumber.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Number"))},"isDate.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Date"))},"isRegExp.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("RegExp"))},"isError.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Error"))},"isSymbol.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Symbol"))},"isArrayBuffer.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("ArrayBuffer"))},"isDataView.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isArrayBuffer.js",{default(e){o=e}},2),e.link("./_stringTagBug.js",{hasStringTagBug(e){s=e}},3);var a=r("DataView");function u(e){return null!=e&&i(e.getInt8)&&o(e.buffer)}e.exportDefault(s?u:a)},"isFunction.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_setup.js",{root(e){i=e}},1);var o=r("Function"),s=i.document&&i.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof s&&(o=function(e){return"function"==typeof e||!1}),e.exportDefault(o)},"_stringTagBug.js":function e(t,n,e){let r,i;e.export({hasStringTagBug:()=>o,isIE11:()=>s}),e.link("./_setup.js",{supportsDataView(e){r=e}},0),e.link("./_hasObjectTag.js",{default(e){i=e}},1);var o=r&&i(new DataView(new ArrayBuffer(8))),s="undefined"!=typeof Map&&i(new Map)},"_hasObjectTag.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Object"))},"isArray.js":function e(t,n,e){let r,i;e.link("./_setup.js",{nativeIsArray(e){r=e}},0),e.link("./_tagTester.js",{default(e){i=e}},1),e.exportDefault(r||i("Array"))},"isArguments.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1);var o=r("Arguments");!function(){o(arguments)||(o=function(e){return i(e,"callee")})}(),e.exportDefault(o)},"_has.js":function e(t,n,e){let r;function i(e,t){return null!=e&&r.call(e,t)}e.export({default:()=>i}),e.link("./_setup.js",{hasOwnProperty(e){r=e}},0)},"isFinite.js":function e(t,n,e){let r,i;function o(e){return!i(e)&&r(e)&&!isNaN(parseFloat(e))}e.export({default:()=>o}),e.link("./_setup.js",{_isFinite(e){r=e}},0),e.link("./isSymbol.js",{default(e){i=e}},1)},"isNaN.js":function e(t,n,e){let r,i;function o(e){return i(e)&&r(e)}e.export({default:()=>o}),e.link("./_setup.js",{_isNaN(e){r=e}},0),e.link("./isNumber.js",{default(e){i=e}},1)},"isTypedArray.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./_setup.js",{supportsArrayBuffer(e){r=e},nativeIsView(e){i=e},toString(e){o=e}},0),e.link("./isDataView.js",{default(e){s=e}},1),e.link("./constant.js",{default(e){a=e}},2),e.link("./_isBufferLike.js",{default(e){u=e}},3);var f=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function c(e){return i?i(e)&&!s(e):u(e)&&f.test(o.call(e))}e.exportDefault(r?c:a(!1))},"constant.js":function e(t,n,e){function r(e){return function(){return e}}e.export({default:()=>r})},"_isBufferLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getByteLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createSizePropertyCheck.js":function e(t,n,e){let r;function i(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=r}}e.export({default:()=>i}),e.link("./_setup.js",{MAX_ARRAY_INDEX(e){r=e}},0)},"_getByteLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("byteLength"))},"_shallowProperty.js":function e(t,n,e){function r(e){return function(t){return null==t?void 0:t[e]}}e.export({default:()=>r})},"isEmpty.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(null==e)return!0;var t=r(e);return"number"==typeof t&&(i(e)||o(e)||s(e))?0===t:0===r(a(e))}e.export({default:()=>u}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3),e.link("./keys.js",{default(e){a=e}},4)},"_getLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("length"))},"keys.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(!r(e))return[];if(i)return i(e);var t=[];for(var n in e)s(e,n)&&t.push(n);return o&&a(e,t),t}e.export({default:()=>u}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeKeys(e){i=e},hasEnumBug(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2),e.link("./_collectNonEnumProps.js",{default(e){a=e}},3)},"_collectNonEnumProps.js":function e(t,n,e){let r,i,o,s;function a(e){for(var t={},n=e.length,r=0;ru}),e.link("./_setup.js",{nonEnumerableProps(e){r=e},ObjProto(e){i=e}},0),e.link("./isFunction.js",{default(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2)},"isMatch.js":function e(t,n,e){let r;function i(e,t){var n=r(t),i=n.length;if(null==e)return!i;for(var o=Object(e),s=0;si}),e.link("./keys.js",{default(e){r=e}},0)},"isEqual.js":function e(t,n,e){let r,i,o,s,a,u,f,c,l,h,d;e.export({default:()=>m}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_setup.js",{toString(e){i=e},SymbolProto(e){o=e}},1),e.link("./_getByteLength.js",{default(e){s=e}},2),e.link("./isTypedArray.js",{default(e){a=e}},3),e.link("./isFunction.js",{default(e){u=e}},4),e.link("./_stringTagBug.js",{hasStringTagBug(e){f=e}},5),e.link("./isDataView.js",{default(e){c=e}},6),e.link("./keys.js",{default(e){l=e}},7),e.link("./_has.js",{default(e){h=e}},8),e.link("./_toBufferView.js",{default(e){d=e}},9);var p="[object DataView]";function g(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&b(e,t,n,r)}function b(e,t,n,m){e instanceof r&&(e=e._wrapped),t instanceof r&&(t=t._wrapped);var v=i.call(e);if(v!==i.call(t))return!1;if(f&&"[object Object]"==v&&c(e)){if(!c(t))return!1;v=p}switch(v){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(t);case"[object ArrayBuffer]":case p:return b(d(e),d(t),n,m)}var y="[object Array]"===v;if(!y&&a(e)){var _;if(s(e)!==s(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;y=!0}if(!y){if("object"!=typeof e||"object"!=typeof t)return!1;var w=e.constructor,k=t.constructor;if(w!==k&&!(u(w)&&w instanceof w&&u(k)&&k instanceof k)&&"constructor"in e&&"constructor"in t)return!1}m=m||[];for(var j=(n=n||[]).length;j--;)if(n[j]===e)return m[j]===t;if(n.push(e),m.push(t),y){if((j=e.length)!==t.length)return!1;for(;j--;)if(!g(e[j],t[j],n,m))return!1}else{var x=l(e),S;if(j=x.length,l(t).length!==j)return!1;for(;j--;)if(S=x[j],!h(t,S)||!g(e[S],t[S],n,m))return!1}return n.pop(),m.pop(),!0}function m(e,t){return g(e,t)}},"underscore.js":function e(t,n,e){let r;function i(e){return e instanceof i?e:this instanceof i?void(this._wrapped=e):new i(e)}e.export({default:()=>i}),e.link("./_setup.js",{VERSION(e){r=e}},0),i.VERSION=r,i.prototype.value=function(){return this._wrapped},i.prototype.valueOf=i.prototype.toJSON=i.prototype.value,i.prototype.toString=function(){return String(this._wrapped)}},"_toBufferView.js":function e(t,n,e){let r;function i(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,r(e))}e.export({default:()=>i}),e.link("./_getByteLength.js",{default(e){r=e}},0)},"isMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},mapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Map"))},"_methodFingerprint.js":function e(t,n,e){let r,i,o;function s(e){var t=r(e);return function(n){if(null==n)return!1;var s=o(n);if(r(s))return!1;for(var u=0;us,mapMethods:()=>l,weakMapMethods:()=>h,setMethods:()=>d}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./allKeys.js",{default(e){o=e}},2);var a="forEach",u="has",f=["clear","delete"],c=["get","has","set"],l=f.concat(a,c),h=f.concat(c),d=["add"].concat(f,a,"has")},"allKeys.js":function e(t,n,e){let r,i,o;function s(e){if(!r(e))return[];var t=[];for(var n in e)t.push(n);return i&&o(e,t),t}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{hasEnumBug(e){i=e}},1),e.link("./_collectNonEnumProps.js",{default(e){o=e}},2)},"isWeakMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},weakMapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("WeakMap"))},"isSet.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},setMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Set"))},"isWeakSet.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("WeakSet"))},"values.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"pairs.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"invert.js":function e(t,n,e){let r;function i(e){for(var t={},n=r(e),i=0,o=n.length;ii}),e.link("./keys.js",{default(e){r=e}},0)},"functions.js":function e(t,n,e){let r;function i(e){var t=[];for(var n in e)r(e[n])&&t.push(n);return t.sort()}e.export({default:()=>i}),e.link("./isFunction.js",{default(e){r=e}},0)},"extend.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createAssigner.js":function e(t,n,e){function r(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;ir})},"extendOwn.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"defaults.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i,!0))},"create.js":function e(t,n,e){let r,i;function o(e,t){var n=r(e);return t&&i(n,t),n}e.export({default:()=>o}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./extendOwn.js",{default(e){i=e}},1)},"_baseCreate.js":function e(t,n,e){let r,i;function o(){return function(){}}function s(e){if(!r(e))return{};if(i)return i(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeCreate(e){i=e}},1)},"clone.js":function e(t,n,e){let r,i,o;function s(e){return r(e)?i(e)?e.slice():o({},e):e}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./extend.js",{default(e){o=e}},2)},"tap.js":function e(t,n,e){function r(e,t){return t(e),e}e.export({default:()=>r})},"get.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=i(e,r(t));return o(s)?n:s}e.export({default:()=>s}),e.link("./_toPath.js",{default(e){r=e}},0),e.link("./_deepGet.js",{default(e){i=e}},1),e.link("./isUndefined.js",{default(e){o=e}},2)},"_toPath.js":function e(t,n,e){let r;function i(e){return r.toPath(e)}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./toPath.js")},"toPath.js":function e(t,n,e){let r,i;function o(e){return i(e)?e:[e]}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),r.toPath=o},"_deepGet.js":function e(t,n,e){function r(e,t){for(var n=t.length,r=0;rr})},"has.js":function e(t,n,e){let r,i;function o(e,t){for(var n=(t=i(t)).length,o=0;oo}),e.link("./_has.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"mapObject.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s=o.length,a={},u=0;uo}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"_cb.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r.iteratee!==o?r.iteratee(e,t):i(e,t,n)}e.export({default:()=>s}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),e.link("./iteratee.js",{default(e){o=e}},2)},"_baseIteratee.js":function e(t,n,e){let r,i,o,s,a,u,f;function c(e,t,n){return null==e?r:i(e)?f(e,t,n):o(e)&&!s(e)?a(e):u(e)}e.export({default:()=>c}),e.link("./identity.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isObject.js",{default(e){o=e}},2),e.link("./isArray.js",{default(e){s=e}},3),e.link("./matcher.js",{default(e){a=e}},4),e.link("./property.js",{default(e){u=e}},5),e.link("./_optimizeCb.js",{default(e){f=e}},6)},"identity.js":function e(t,n,e){function r(e){return e}e.export({default:()=>r})},"matcher.js":function e(t,n,e){let r,i;function o(e){return e=r({},e),function(t){return i(t,e)}}e.export({default:()=>o}),e.link("./extendOwn.js",{default(e){r=e}},0),e.link("./isMatch.js",{default(e){i=e}},1)},"property.js":function e(t,n,e){let r,i;function o(e){return e=i(e),function(t){return r(t,e)}}e.export({default:()=>o}),e.link("./_deepGet.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"_optimizeCb.js":function e(t,n,e){function r(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}e.export({default:()=>r})},"iteratee.js":function e(t,n,e){let r,i;function o(e,t){return i(e,t,1/0)}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),r.iteratee=o},"noop.js":function e(t,n,e){function r(){}e.export({default:()=>r})},"propertyOf.js":function e(t,n,e){let r,i;function o(e){return null==e?r:function(t){return i(e,t)}}e.export({default:()=>o}),e.link("./noop.js",{default(e){r=e}},0),e.link("./get.js",{default(e){i=e}},1)},"times.js":function e(t,n,e){let r;function i(e,t,n){var i=Array(Math.max(0,e));t=r(t,n,1);for(var o=0;oi}),e.link("./_optimizeCb.js",{default(e){r=e}},0)},"random.js":function e(t,n,e){function r(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}e.export({default:()=>r})},"now.js":function e(t,n,e){e.exportDefault(Date.now||function(){return(new Date).getTime()})},"escape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createEscaper.js":function e(t,n,e){let r;function i(e){var t=function(t){return e[t]},n="(?:"+r(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}}e.export({default:()=>i}),e.link("./keys.js",{default(e){r=e}},0)},"_escapeMap.js":function e(t,n,e){e.exportDefault({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"})},"unescape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_unescapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_unescapeMap.js":function e(t,n,e){let r,i;e.link("./invert.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"templateSettings.js":function e(t,n,e){let r;e.link("./underscore.js",{default(e){r=e}},0),e.exportDefault(r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g})},"template.js":function e(t,n,e){let r,i;e.export({default:()=>c}),e.link("./defaults.js",{default(e){r=e}},0),e.link("./underscore.js",{default(e){i=e}},1),e.link("./templateSettings.js");var o=/(.)^/,s={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},a=/\\|'|\r|\n|\u2028|\u2029/g;function u(e){return"\\"+s[e]}var f=/^\s*(\w|\$)+\s*$/;function c(e,t,n){!t&&n&&(t=n),t=r({},t,i.templateSettings);var s=RegExp([(t.escape||o).source,(t.interpolate||o).source,(t.evaluate||o).source].join("|")+"|$","g"),c=0,l="__p+='";e.replace(s,(function(t,n,r,i,o){return l+=e.slice(c,o).replace(a,u),c=o+t.length,n?l+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?l+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(l+="';\n"+i+"\n__p+='"),t})),l+="';\n";var h=t.variable,d;if(h){if(!f.test(h))throw new Error("variable is not a bare identifier: "+h)}else l="with(obj||{}){\n"+l+"}\n",h="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";try{d=new Function(h,"_",l)}catch(g){throw g.source=l,g}var p=function(e){return d.call(this,e,i)};return p.source="function("+h+"){\n"+l+"}",p}},"result.js":function e(t,n,e){let r,i;function o(e,t,n){var o=(t=i(t)).length;if(!o)return r(n)?n.call(e):n;for(var s=0;so}),e.link("./isFunction.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"uniqueId.js":function e(t,n,e){e.export({default:()=>i});var r=0;function i(e){var t=++r+"";return e?e+t:t}},"chain.js":function e(t,n,e){let r;function i(e){var t=r(e);return t._chain=!0,t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"partial.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_executeBound.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2);var s=r((function(e,t){var n=s.placeholder,r=function(){for(var o=0,s=t.length,a=Array(s),u=0;uo}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./isObject.js",{default(e){i=e}},1)},"bind.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_executeBound.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t,n){if(!i(e))throw new TypeError("Bind must be called on a function");var s=r((function(r){return o(e,s,t,this,n.concat(r))}));return s})))},"bindAll.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./bind.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t){var n=(t=i(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=o(e[r],e)}return e})))},"_flatten.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,u){if(u=u||[],t||0===t){if(t<=0)return u.concat(e)}else t=1/0;for(var f=u.length,c=0,l=r(e);c1)a(h,t-1,n,u),f=u.length;else for(var d=0,p=h.length;da}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./isArray.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3)},"_isArrayLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"memoize.js":function e(t,n,e){let r;function i(e,t){var n=function(i){var o=n.cache,s=""+(t?t.apply(this,arguments):i);return r(o,s)||(o[s]=e.apply(this,arguments)),o[s]};return n.cache={},n}e.export({default:()=>i}),e.link("./_has.js",{default(e){r=e}},0)},"delay.js":function e(t,n,e){let r;e.link("./restArguments.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})))},"defer.js":function e(t,n,e){let r,i,o;e.link("./partial.js",{default(e){r=e}},0),e.link("./delay.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2),e.exportDefault(r(i,o,1))},"throttle.js":function e(t,n,e){let r;function i(e,t,n){var i,o,s,a,u=0;n||(n={});var f=function(){u=!1===n.leading?0:r(),i=null,a=e.apply(o,s),i||(o=s=null)},c=function(){var c=r();u||!1!==n.leading||(u=c);var l=t-(c-u);return o=this,s=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=c,a=e.apply(o,s),i||(o=s=null)):i||!1===n.trailing||(i=setTimeout(f,l)),a};return c.cancel=function(){clearTimeout(i),u=0,i=o=s=null},c}e.export({default:()=>i}),e.link("./now.js",{default(e){r=e}},0)},"debounce.js":function e(t,n,e){let r,i;function o(e,t,n){var o,s,a,u,f,c=function(){var r=i()-s;t>r?o=setTimeout(c,t-r):(o=null,n||(u=e.apply(f,a)),o||(a=f=null))},l=r((function(r){return f=this,a=r,s=i(),o||(o=setTimeout(c,t),n&&(u=e.apply(f,a))),u}));return l.cancel=function(){clearTimeout(o),o=a=f=null},l}e.export({default:()=>o}),e.link("./restArguments.js",{default(e){r=e}},0),e.link("./now.js",{default(e){i=e}},1)},"wrap.js":function e(t,n,e){let r;function i(e,t){return r(t,e)}e.export({default:()=>i}),e.link("./partial.js",{default(e){r=e}},0)},"negate.js":function e(t,n,e){function r(e){return function(){return!e.apply(this,arguments)}}e.export({default:()=>r})},"compose.js":function e(t,n,e){function r(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}e.export({default:()=>r})},"after.js":function e(t,n,e){function r(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}e.export({default:()=>r})},"before.js":function e(t,n,e){function r(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}e.export({default:()=>r})},"once.js":function e(t,n,e){let r,i;e.link("./partial.js",{default(e){r=e}},0),e.link("./before.js",{default(e){i=e}},1),e.exportDefault(r(i,2))},"findKey.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s,a=0,u=o.length;ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"findIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createPredicateIndexFinder.js":function e(t,n,e){let r,i;function o(e){return function(t,n,o){n=r(n,o);for(var s=i(t),a=e>0?0:s-1;a>=0&&ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"findLastIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"sortedIndex.js":function e(t,n,e){let r,i;function o(e,t,n,o){for(var s=(n=r(n,o,1))(t),a=0,u=i(e);ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"indexOf.js":function e(t,n,e){let r,i,o;e.link("./sortedIndex.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./_createIndexFinder.js",{default(e){o=e}},2),e.exportDefault(o(1,i,r))},"_createIndexFinder.js":function e(t,n,e){let r,i,o;function s(e,t,n){return function(s,a,u){var f=0,c=r(s);if("number"==typeof u)e>0?f=u>=0?u:Math.max(u+c,f):c=u>=0?Math.min(u+1,c):u+c+1;else if(n&&u&&c)return s[u=n(s,a)]===a?u:-1;if(a!=a)return(u=t(i.call(s,f,c),o))>=0?u+f:-1;for(u=e>0?f:c-1;u>=0&&us}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isNaN.js",{default(e){o=e}},2)},"lastIndexOf.js":function e(t,n,e){let r,i;e.link("./findLastIndex.js",{default(e){r=e}},0),e.link("./_createIndexFinder.js",{default(e){i=e}},1),e.exportDefault(i(-1,r))},"find.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a=(r(e)?i:o)(e,t,n);if(void 0!==a&&-1!==a)return e[a]}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./findKey.js",{default(e){o=e}},2)},"findWhere.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./find.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"each.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a;if(t=r(t,n),i(e))for(s=0,a=e.length;ss}),e.link("./_optimizeCb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"map.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=Array(a),f=0;fs}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"reduce.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createReduce.js":function e(t,n,e){let r,i,o;function s(e){var t=function(t,n,o,s){var a=!r(t)&&i(t),u=(a||t).length,f=e>0?0:u-1;for(s||(o=t[a?a[f]:f],f+=e);f>=0&&f=3;return t(e,o(n,i,4),r,s)}}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2)},"reduceRight.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"filter.js":function e(t,n,e){let r,i;function o(e,t,n){var o=[];return t=r(t,n),i(e,(function(e,n,r){t(e,n,r)&&o.push(e)})),o}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"reject.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r(e,i(o(t)),n)}e.export({default:()=>s}),e.link("./filter.js",{default(e){r=e}},0),e.link("./negate.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2)},"every.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"some.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"contains.js":function e(t,n,e){let r,i,o;function s(e,t,n,s){return r(e)||(e=i(e)),("number"!=typeof n||s)&&(n=0),o(e,t,n)>=0}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./indexOf.js",{default(e){o=e}},2)},"invoke.js":function e(t,n,e){let r,i,o,s,a;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2),e.link("./_deepGet.js",{default(e){s=e}},3),e.link("./_toPath.js",{default(e){a=e}},4),e.exportDefault(r((function(e,t,n){var r,u;return i(t)?u=t:(t=a(t),r=t.slice(0,-1),t=t[t.length-1]),o(e,(function(e){var i=u;if(!i){if(r&&r.length&&(e=s(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)}))})))},"pluck.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./map.js",{default(e){r=e}},0),e.link("./property.js",{default(e){i=e}},1)},"where.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./filter.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"max.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=-1/0,u=-1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la&&(a=f);else t=o(t,n),s(e,(function(e,n,r){((c=t(e,n,r))>u||c===-1/0&&a===-1/0)&&(a=e,u=c)}));return a}e.export({default:()=>a}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"min.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=1/0,u=1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"shuffle.js":function e(t,n,e){let r;function i(e){return r(e,1/0)}e.export({default:()=>i}),e.link("./sample.js",{default(e){r=e}},0)},"sample.js":function e(t,n,e){let r,i,o,s,a;function u(e,t,n){if(null==t||n)return r(e)||(e=i(e)),e[s(e.length-1)];var u=a(e),f=o(u);t=Math.max(Math.min(t,f),0);for(var c=f-1,l=0;lu}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./random.js",{default(e){s=e}},3),e.link("./toArray.js",{default(e){a=e}},4)},"toArray.js":function e(t,n,e){let r,i,o,s,a,u,f;e.export({default:()=>l}),e.link("./isArray.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./_isArrayLike.js",{default(e){s=e}},3),e.link("./map.js",{default(e){a=e}},4),e.link("./identity.js",{default(e){u=e}},5),e.link("./values.js",{default(e){f=e}},6);var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function l(e){return e?r(e)?i.call(e):o(e)?e.match(c):s(e)?a(e,u):f(e):[]}},"sortBy.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=0;return t=r(t,n),i(o(e,(function(e,n,r){return{value:e,index:s++,criteria:t(e,n,r)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(ns}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./pluck.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2)},"groupBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n].push(t):e[n]=[t]})))},"_group.js":function e(t,n,e){let r,i;function o(e,t){return function(n,o,s){var a=t?[[],[]]:{};return o=r(o,s),i(n,(function(t,r){var i=o(t,r,n);e(a,t,i)})),a}}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"indexBy.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n]=t})))},"countBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n]++:e[n]=1})))},"partition.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n?0:1].push(t)}),!0))},"size.js":function e(t,n,e){let r,i;function o(e){return null==e?0:r(e)?e.length:i(e).length}e.export({default:()=>o}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"pick.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2),e.link("./allKeys.js",{default(e){s=e}},3),e.link("./_keyInObj.js",{default(e){a=e}},4),e.link("./_flatten.js",{default(e){u=e}},5),e.exportDefault(r((function(e,t){var n={},r=t[0];if(null==e)return n;i(r)?(t.length>1&&(r=o(r,t[1])),t=s(e)):(r=a,t=u(t,!1,!1),e=Object(e));for(var f=0,c=t.length;fr})},"omit.js":function e(t,n,e){let r,i,o,s,a,u,f;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./negate.js",{default(e){o=e}},2),e.link("./map.js",{default(e){s=e}},3),e.link("./_flatten.js",{default(e){a=e}},4),e.link("./contains.js",{default(e){u=e}},5),e.link("./pick.js",{default(e){f=e}},6),e.exportDefault(r((function(e,t){var n=t[0],r;return i(n)?(n=o(n),t.length>1&&(r=t[1])):(t=s(a(t,!1,!1),String),n=function(e,n){return!u(t,n)}),f(e,n,r)})))},"first.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:r(e,e.length-t)}e.export({default:()=>i}),e.link("./initial.js",{default(e){r=e}},0)},"initial.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"last.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:r(e,Math.max(0,e.length-t))}e.export({default:()=>i}),e.link("./rest.js",{default(e){r=e}},0)},"rest.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,null==t||n?1:t)}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"compact.js":function e(t,n,e){let r;function i(e){return r(e,Boolean)}e.export({default:()=>i}),e.link("./filter.js",{default(e){r=e}},0)},"flatten.js":function e(t,n,e){let r;function i(e,t){return r(e,t,!1)}e.export({default:()=>i}),e.link("./_flatten.js",{default(e){r=e}},0)},"without.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./difference.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t){return i(e,t)})))},"difference.js":function e(t,n,e){let r,i,o,s;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./filter.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3),e.exportDefault(r((function(e,t){return t=i(t,!0,!0),o(e,(function(e){return!s(t,e)}))})))},"uniq.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,a){r(t)||(a=n,n=t,t=!1),null!=n&&(n=i(n,a));for(var u=[],f=[],c=0,l=o(e);ca}),e.link("./isBoolean.js",{default(e){r=e}},0),e.link("./_cb.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3)},"union.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./uniq.js",{default(e){i=e}},1),e.link("./_flatten.js",{default(e){o=e}},2),e.exportDefault(r((function(e){return i(o(e,!0,!0))})))},"intersection.js":function e(t,n,e){let r,i;function o(e){for(var t=[],n=arguments.length,o=0,s=r(e);oo}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./contains.js",{default(e){i=e}},1)},"unzip.js":function e(t,n,e){let r,i,o;function s(e){for(var t=e&&r(e,i).length||0,n=Array(t),s=0;ss}),e.link("./max.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.link("./pluck.js",{default(e){o=e}},2)},"zip.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./unzip.js",{default(e){i=e}},1),e.exportDefault(r(i))},"object.js":function e(t,n,e){let r;function i(e,t){for(var n={},i=0,o=r(e);ii}),e.link("./_getLength.js",{default(e){r=e}},0)},"range.js":function e(t,n,e){function r(e,t,n){null==t&&(t=e||0,e=0),n||(n=tr})},"chunk.js":function e(t,n,e){let r;function i(e,t){if(null==t||t<1)return[];for(var n=[],i=0,o=e.length;ii}),e.link("./_setup.js",{slice(e){r=e}},0)},"mixin.js":function e(t,n,e){let r,i,o,s,a;function u(e){return i(o(e),(function(t){var n=r[t]=e[t];r.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),a(this,n.apply(r,e))}})),r}e.export({default:()=>u}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./functions.js",{default(e){o=e}},2),e.link("./_setup.js",{push(e){s=e}},3),e.link("./_chainResult.js",{default(e){a=e}},4)},"_chainResult.js":function e(t,n,e){let r;function i(e,t){return e._chain?r(t).chain():t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"underscore-array-methods.js":function e(t,n,e){let r,i,o,s;e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./_setup.js",{ArrayProto(e){o=e}},2),e.link("./_chainResult.js",{default(e){s=e}},3),i(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=o[e];r.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),s(this,n)}})),i(["concat","join","slice"],(function(e){var t=o[e];r.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),s(this,e)}})),e.exportDefault(r)}}}}},cachers:{"package.json":function e(t,n,e){e.exports={name:"@steedos/cachers",version:"2.7.4-beta.10",main:"lib/index.js"}},lib:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCacherNames=n.clearCacher=n.getCacher=void 0;var r={},i=t("./memory"),o=t("./memory-lru"),s=function(e,t){return r[e]||(e.startsWith("lru.")?r[e]=new o.MemoryLRUCacher(t):r[e]=new i.MemoryCacher),r[e]};n.getCacher=s;var a=function(e){r[e]&&r[e].clear()};n.clearCacher=a;var u=function(){return Object.keys(r)};n.getCacherNames=u},"memory.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryCacher=void 0;var r=t("lodash"),i=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.delete=function(e){delete this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.clear=function(){this.cache={}},e.prototype.keys=function(){return(0,r.keys)(this.cache)},e.prototype.values=function(){return(0,r.values)(this.cache)},e}();n.MemoryCacher=i},"memory-lru.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryLRUCacher=void 0;var r=t("lodash"),i=t("lru-cache"),o={max:5e3,ttl:null,keygen:null,maxParamsLength:null},s=function(){function e(e){this.opts=(0,r.defaultsDeep)(e,o),this.cache=new i({max:this.opts.max,maxAge:this.opts.ttl?1e3*this.opts.ttl:null,updateAgeOnGet:!!this.opts.ttl})}return e.prototype.get=function(e){return this.cache.get(e)},e.prototype.set=function(e,t,n){return this.cache.set(e,t,n)},e.prototype.delete=function(e){return this.cache.delete(e)},e.prototype.clear=function(){return this.cache.clear()},e.prototype.keys=function(){return this.cache.keys()},e.prototype.values=function(){return this.cache.values()},e}();n.MemoryLRUCacher=s}},node_modules:{"lru-cache":{"package.json":function e(t,n,e){e.exports={name:"lru-cache",version:"7.14.1",main:"index.js"}},"index.js":function e(t,n,e){const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i="function"==typeof AbortController,o=i?AbortController:class e{constructor(){this.signal=new u}abort(){this.signal.dispatchEvent("abort")}},s="function"==typeof AbortSignal,a="function"==typeof o.AbortSignal,u=s?AbortSignal:a?o.AbortController:class e{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach(e=>e(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},f=new Set,c=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&g(n,`${e} option`,`options.${t}`,_)},l=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} method`,`cache.${t}()`,i)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} property`,`cache.${t}`,i)}},d=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!f.has(e),g=(e,t,n,r)=>{f.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;d(i,"DeprecationWarning",e,r)},b=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),m=e=>b(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=m(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class _{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:h,noUpdateTTL:g,maxSize:v=0,maxEntrySize:w=0,sizeCalculation:k,fetchMethod:j,fetchContext:x,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:D}=e,{length:E,maxAge:A,stale:C}=e instanceof _?{}:e;if(0!==t&&!b(t))throw new TypeError("max option must be a nonnegative integer");const M=t?m(t):Array;if(!M)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=w||this.maxSize,this.sizeCalculation=k||E,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=j||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&void 0!==x)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new M(t),this.prev=new M(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof l?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!S,0!==this.maxEntrySize){if(0!==this.maxSize&&!b(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!b(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!C,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=b(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||A||0,this.ttl){if(!b(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){f.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";d(t,"UnboundedCacheWarning",e,_)}}C&&c("stale","allowStale"),A&&c("maxAge","ttl"),E&&c("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,n=r.now())=>{if(this.starts[e]=0!==t?n:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?r.now():0};let e=0;const t=()=>{const t=r.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const r=this.keyMap.get(n);return void 0===r?0:0===this.ttls[r]||0===this.starts[r]?1/0:this.starts[r]+this.ttls[r]-(e||t())},this.isStale=n=>0!==this.ttls[n]&&0!==this.starts[n]&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!b(n)){if(!r)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!b(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return l("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const n=this.keyList[t],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,s={value:o};if(this.ttls){s.ttl=this.ttls[t];const e=r.now()-this.starts[t];s.start=Math.floor(Date.now()-e)}this.sizes&&(s.size=this.sizes[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),a=!1;else{const n=this.valList[u];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():i||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(u,n,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,n=this.keyList[t],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,n,"evict"),this.disposeAfter&&this.disposed.push([r,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const n=this.keyMap.get(e);return void 0!==n&&!this.isStale(n)&&(t&&this.updateItemAge(n),!0)}peek(e,{allowStale:t=this.allowStale}={}){const n=this.keyMap.get(e);if(void 0!==n&&(t||!this.isStale(n))){const e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const s=new o,a={signal:s.signal,options:n,context:r},u=t=>(s.signal.aborted||this.set(e,t,a.options),t),f=r=>{if(this.valList[t]===l){const r=!n.noDeleteOnFetchRejection||void 0===l.__staleWhileFetching;r?this.delete(e):this.valList[t]=l.__staleWhileFetching}if(l.__returned===l)throw r},c=t=>t(this.fetchMethod(e,i,a)),l=new Promise(c).then(u,f);return l.__abortController=s,l.__staleWhileFetching=i,l.__returned=null,void 0===t?(this.set(e,l,a.options),t=this.keyMap.get(e)):this.valList[t]=l,l}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:c=this.fetchContext,forceRefresh:l=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r});const h={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:u,noDeleteOnFetchRejection:f};let d=this.keyMap.get(e);if(void 0===d){const t=this.backgroundFetch(e,d,h,c);return t.__returned=t}{const r=this.valList[d];if(this.isBackgroundFetch(r))return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r;if(!l&&!this.isStale(d))return this.moveToTail(d),n&&this.updateItemAge(d),r;const i=this.backgroundFetch(e,d,h,c);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(r||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),n&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return l("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const n=this.keyList[e];this.dispose(t,n,"delete"),this.disposeAfter&&this.disposed.push([t,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return l("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=_}}}},"form-builder":{"package.json":function e(t,n,e){e.exports={name:"@steedos/form-builder",version:"3.6.2-patch.5",private:!1,publishConfig:{access:"public"},main:"dist/form-builder.min.js",homepage:"https://formbuilder.online/",repository:{url:"https://github.com/kevinchappell/formBuilder.git",type:"git"},files:["dist/**/*","docs/**/*","src/**/*"],author:"Kevin Chappell ",contributors:[],bugs:"https://github.com/kevinchappell/formBuilder/issues",description:"A jQuery plugin for drag and drop form building",keywords:["jquery-plugin","forms","drag and drop","form builder","form create"],license:"MIT",ignore:["**/*","node_modules","test"],config:{files:{test:["test/**/*.spec.js"],pluginsDir:"src/js/control_plugins/",fonts:"src/fonts",sass:"src/sass",formBuilder:{js:"src/js/form-builder.js",sass:["src/sass/form-builder.scss"]},formRender:{js:"src/js/form-render.js",sass:["src/sass/form-render.scss"]},site:["demo/assets/sass/site.scss"]},fontServer:"http://fontello.com",fontelloToken:"09d648f01d6c57cb9f9b8cc55043e0c0"},babel:{presets:[["@babel/preset-env",{targets:{browsers:["> 1%"]},loose:!0}]],comments:!1,plugins:["@babel/plugin-proposal-object-rest-spread","@babel/plugin-proposal-class-properties"]},scripts:{"build:analyze":"webpack --mode production -p --progress --config tools/webpack.config --analyze","build:plugins":"webpack --mode production -p --display-entrypoints --progress --config tools/webpack.plugins.config","build:vendor":"babel-node tools/build-vendor",build:"webpack --mode production -p --progress --config tools/webpack.config","build:all":"npm-run-all build:plugins build:vendor build copy",copy:"cp -a dist/* demo/assets/js/ && cp CONTRIBUTING.md docs/contributing.md && cp LICENSE docs/license.md && npm run copy:lang","copy:lang":"babel-node tools/copy-language-files","deploy:all":"npm-run-all deploy:demo deploy:site","deploy:demo":"node tools/deploy-demo.js","deploy:site":"node tools/deploy-site.js",docs:"mkdocs build",font:"babel-node tools/icon-font",lint:"eslint ./src --ext .js || true","semantic-release":"semantic-release","start:devServer":"webpack-dev-server --mode development --config tools/webpack.config",prestart:"npm-run-all -p build:vendor copy:lang",start:"npm run start:devServer",test:"npm run-script build"},dependencies:{jquery:">=3.4.1","jquery-ui-sortable":"*"},devDependencies:{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/node":"^7.10.5","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-syntax-object-rest-spread":"^7.8.3","@babel/plugin-transform-destructuring":"^7.10.4","@babel/preset-env":"^7.11.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.5",autoprefixer:"^9.8.6","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","clean-webpack-plugin":"^3.0.0",clui:"^0.3.6","compression-webpack-plugin":"^5.0.1","concat-files":"^0.1.1","cross-env":"^7.0.2","css-loader":"^4.2.1",eslint:"^7.7.0","eslint-loader":"^4.0.2","formbuilder-languages":"latest","fs-extra":"^9.0.1","html-webpack-harddisk-plugin":"^1.0.2","html-webpack-plugin":"^4.3.0",inquirer:"^7.3.3",mi18n:"^0.4.8","node-sass":"6.0.1","npm-run-all":"^4.1.5",opener:"^1.5.1","postcss-loader":"^3.0.0","replace-in-file":"^6.1.0",request:"^2.88.2","sass-loader":"10.5.2","semantic-release":"^17.1.1",semver:"^7.3.2","style-loader":"^1.2.1",unzipper:"^0.10.11",webpack:"^4.44.1","webpack-bundle-analyzer":"^3.8.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","wrapper-webpack-plugin":"^2.1.0"},prettier:{singleQuote:!0,trailingComma:"all",printWidth:120,semi:!1,arrowParens:"avoid",spaceAfterFunction:!1},engines:{},release:{branch:"master",verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},browserslist:["> 1%"]}},dist:{"form-builder.min.js":[]}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",module:"tslib.es6.js",main:"tslib.js"}},"tslib.es6.js":function e(t,n,e){e.export({__extends:()=>i,__assign:()=>o,__rest:()=>s,__decorate:()=>a,__param:()=>u,__metadata:()=>f,__awaiter:()=>c,__generator:()=>l,__createBinding:()=>h,__exportStar:()=>d,__values:()=>p,__read:()=>g,__spread:()=>b,__spreadArrays:()=>m,__spreadArray:()=>v,__await:()=>y,__asyncGenerator:()=>_,__asyncDelegator:()=>w,__asyncValues:()=>k,__makeTemplateObject:()=>j,__importStar:()=>S,__importDefault:()=>D,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>A}); +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this,i;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(r).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};function r(t){return this.each((function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var r=e(this),i=r.attr("data-target");i||(i=(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function s(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s())};var i=e.fn.alert;e.fn.alert=r,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.isLoading=!1};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.button"),o="object"==typeof n&&n;i||r.data("bs.button",i=new t(this,o)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",o=r.data();t+="Text",null==o.resetText&&r.data("resetText",r[i]()),setTimeout(e.proxy((function(){r[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var r=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var r=e(t.target).closest(".btn");n.call(r,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.carousel"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n),s="string"==typeof n?n:o.slide;i||r.data("bs.carousel",i=new t(this,o)),"number"==typeof n?i.to(n):s?i[s]():o.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),r;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var i,o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,r){var i=this.$element.find(".item.active"),o=r||this.getItemForDirection(n,i),s=this.interval,a="next"==n?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var f=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:f,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=e(this.$indicators.children()[this.getItemIndex(o)]);l&&l.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:f,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(a),o.addClass(a),i.one("bsTransitionEnd",(function(){o.removeClass([n,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var r=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this};var i=function(t){var r=e(this),i=r.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=r.attr("data-target")||i,s=e(document).find(o);if(s.hasClass("carousel")){var a=e.extend({},s.data(),r.data()),u=r.attr("data-slide-to");u&&(a.interval=!1),n.call(s,a),u&&s.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(r)}function r(n){return this.each((function(){var r=e(this),i=r.data("bs.collapse"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);!i&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),i||r.data("bs.collapse",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(r.call(i,"hide"),n||i.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var u=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[s](this.$element[0][u])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var r=this.dimension();this.$element[r](this.$element[r]())[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 i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[r](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,r){var i=e(r);this.addAriaAndCollapsedClass(n(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=e.fn.collapse;e.fn.collapse=r,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=n(i),s,a=o.data("bs.collapse")?"toggle":i.data();r.call(o,a)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?e(document).find(n):null;return r&&r.length?r:t.parent()}function o(r){r&&3===r.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=i(t),o={relatedTarget:this};n.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&e.contains(n[0],r.target)||(n.trigger(r=e.Event("hide.bs.dropdown",o)),r.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function s(t){return this.each((function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",a)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+a);if(u.length){var f=u.index(t.target);38==t.which&&f>0&&f--,40==t.which&&fdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},f.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&e(document).find(e.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 i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},f.prototype.getDefaults=function(){return f.DEFAULTS},f.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete r[i];return(n=e.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=u(n.template,n.whiteList,n.sanitizeFn)),n},f.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,r){n[e]!=r&&(t[e]=r)})),t},f.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},f.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},f.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},f.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=i[0].offsetWidth,h=i[0].offsetHeight;if(u){var d=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-hp.width?"left":"left"==s&&c.left-ls.top+s.height&&(i.top=s.top+s.height-u)}else{var f=t.left-o,c=t.left+o+n;fs.right&&(i.left=s.left+s.width-c)}return i},f.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},f.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},f.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(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},f.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},f.prototype.enable=function(){this.enabled=!0},f.prototype.disable=function(){this.enabled=!1},f.prototype.toggleEnabled=function(){this.enabled=!this.enabled},f.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},f.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},f.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=c,e.fn.tooltip.Constructor=f,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function n(n){return this.each((function(){var r=e(this),i=r.data("bs.popover"),o="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||r.data("bs.popover",i=new t(this,o)),"string"==typeof n&&i[n]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var r=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(jQuery),function(e){"use strict";function t(n,r){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var r=e(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[n]().top+r,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),n=this.options.offset+t-this.$scrollElement.height(),r=this.offsets,i=this.targets,o=this.activeTarget,s;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(s=i[i.length-1])&&this.activate(s);if(o&&e=r[s]&&(void 0===r[s+1]||e .active"),s=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!r.find("> .fade").length);function a(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&s?o.one("bsTransitionEnd",a).emulateTransitionEnd(t.TRANSITION_DURATION):a(),o.removeClass("in")};var r=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=r,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i=e-r&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),f=e.Event(u+".bs.affix");if(this.$element.trigger(f),f.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),r=t.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(t,r)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,r,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),s=t("path"),a=t("detect-libc");Math.random();var u=s.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+a.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(c){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(c.stack||c.message||c),new Error("Missing binary. See message above.")}f(e.exports)}function f(e){try{var t=process.binding("async_wrap"),n;if(t.asyncIdStackSize instanceof Function)n=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");l=t.constants.kStackLength,n=function(){return t.async_hook_fields[l]}}var r=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,s;if(!r||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,s=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var a=t.async_id_fields||t.async_uid_fields;function u(){for(var e=n(),t=new Array(e);e>0;--e){var i=a[o];t[e-1]={asyncId:i,triggerId:a[s]},r(i)}return t}function f(e){for(var t=0;t0)i.changeLanguage(e,r);else if(0!=a[u]){a[u]=0;var f=new XMLHttpRequest;f.overrideMimeType("application/json"),f.open("GET",u,!1),f.send(null),200===f.status?a[u]=1:a[u]=-1,n.addResourceBundle(e,s,JSON.parse(f.response)||{}),i.changeLanguage(e,r)}};n.changeLanguage=p;var g=function(e,t,n){return i.format(e,t,n)};n.format=g;var b=function(){return i.languages};n.getLanguages=b;var m=function(e,t){return i.loadLanguages(e,t)};n.loadLanguages=m;var v=function(e,t){return i.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};n.on=y;var _=function(e,t){return i.off(e,t)};n.off=_,r.__exportStar(t("./i18n/i18n"),n),r.__exportStar(t("./i18n/i18n.app"),n),r.__exportStar(t("./translations"),n)},i18n:{"i18n.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fallbackKeys=n.getObjectI18nTemplate=n.translationI18nObjects=n.addObjectsI18n=n.translationI18nObject=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="_",a="base",u="core",f="translation",c=function(e,t){var n={lng:t,ns:f};if((0,r.exists)(e,n))return(0,r._t)(e,n)},l=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},d=function(e,t){var n=h(e,t);return"".concat(n).concat("_","inlineHelpText")},p=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(n)},g=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},b=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},m=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,n){var r=l(t);return c(r,e)||n||""},_=function(e,t,n,r,i){var o=h(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=_(e,a,n,r,i))}return s||r||""},w=function(e,t,n,r,i){var o=d(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=w(e,a,n,r,i))}return s||r||""},k=function(e,t,n,r){var i=p(t,n);return c(i,e)||r||""},j=function(e,t,n,r,i,o){var s=g(t,n,r),a=c(s,e);if(!a){var u=v(o);u&&"base"!=t&&"core"!=t&&(a=j(e,u,n,r,i,o))}return a||i||""},x=function(e,t,n,r,i){var o=b(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=x(e,a,n,r,i))}return s||r||""},S=function(e,t,n,r,i){var o=m(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=S(e,a,n,r,i))}return s||r||""},D=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},E=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},A=function(e,t,n){n.label=y(e,t,n.label),i.each(n.fields,(function(r,o){if(r.label=_(e,t,o,r.label,n.datasource),r.inlineHelpText&&(r.inlineHelpText=w(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(r.group=k(e,t,r.group,r.group)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var a=j(e,t,o,r.value,r.label,n.datasource);s.push(i.extend({},r,{label:a}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=x(e,t,i,r.label,n.datasource)})),i.each(n.list_views,(function(r,i){r.label=S(e,t,i,r.label,n.datasource)}))};n.translationI18nObject=A;var C=function(e){i.each(e,(function(e){(0,r.addResourceBundle)(e.lng,f,e.data,!0,!0)}))};n.addObjectsI18n=C;var M=function(e,t){i.each(t,(function(t,r){(0,n.translationI18nObject)(e,r,t)}))};n.translationI18nObjects=M;var O=function(e,t,n){var r=o(n);E(r);var s={};return s[l(t)]=y(e,t,r.label),i.each(r.fields,(function(n,o){s[h(t,o)]=_(e,t,o,n.label),n.inlineHelpText&&(s[d(t,o)]=w(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(s[p(t,n.group)]=k(e,t,n.group,n.group)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[g(t,o,n.value)]=j(e,t,o,n.value,n.label))}))})),i.each(r.actions,(function(n,r){s[b(t,r)]=x(e,t,r,n.label)})),i.each(r.list_views,(function(n,r){s[m(t,r)]=S(e,t,r,n.label)})),s};n.getObjectI18nTemplate=O,n.fallbackKeys={getObjectLabelKey:l,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:d,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:g,getObjectActionLabelKey:b,getObjectListviewLabelKey:m}},"i18n.app.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.appFallbackKeys=n.getAppI18nTemplate=n.translationI18nApps=n.translationI18nMenus=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="translation",a="_",u=function(e,t){var n={lng:t,ns:s};if((0,r.exists)(e,n))return(0,r._t)(e,n)},f=function(e){return"app".concat("_").concat(e).concat("_","name")},c=function(e){return"app".concat("_").concat(e).concat("_","description")},l=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(n)},h=function(e){return"menu".concat("_").concat(e)},d=function(e){return"tab".concat("_").concat(e)},p=function(e,t,n){var r=f(t);return u(r,e)||n||""},g=function(e,t,n){var r=c(t);return u(r,e)||n||""},b=function(e,t,n){var r=h(t);return u(r,e)||n||""},m=function(e,t,r){r.label=p(e,t,r.label||r.name),r.description=g(e,t,r.description),(0,n.translationI18nMenus)(e,r.admin_menus)},v=function(e,t){i.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=y;var _=function(e,t,n){var r=o(n),s={};return s[f(t)]=p(e,t,r.label||r.name),s[c(t)]=g(e,t,r.description),i.each(r.admin_menus,(function(t){s[h(t._id)]=b(e,t._id,t.label||t.name)})),s};n.getAppI18nTemplate=_,n.appFallbackKeys={getAppLabelKey:f,getAppDescriptionKey:c,getAppGroupKey:l,getMenuLabelKey:h,getTabKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var r=t("tslib"),i=t("underscore");r.__exportStar(t("./objectTranslation"),n),r.__exportStar(t("./translation"),n),r.__exportStar(t("./templates/objectTranslation"),n),r.__exportStar(t("./templates/translation"),n);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},s=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(r){console.error("Creator.convertFieldsOptions",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},a;n.convertObject=s,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(a=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),s=t("../index"),a=t("./index"),u=t("../i18n/i18n"),f=t("lodash"),c=t("crypto"),l,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function d(e){var t;return c.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(d(JSON.stringify(t)))},g=t("clone"),b=".",m="base",v="core",y="translation",_="object",w="field",k="listview",j="action",x=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,s.exists)(e,n))return(0,s._t)(e,n)},S=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},D=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},E=function(e){var t;return[D(),e].join(".")},A=function(e){var t;return[D("object"),e,"label"].join(".")},C=function(e){var t;return[D("object"),e,"description"].join(".")},M=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},T=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},B=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),r;return[D("field"),e,"group",n].join(".")},I=function(e,t,n){var r;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},R=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},P=function(e,t,n){var r,i=[A(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),x(i,e)||n||""};n.translationObjectLabel=P;var N=function(e,t,n){var r=C(t);return x(r,e)||n||""},L=function(e,t,n,r,i,o){var s,a=[M(t,n)],f=u.fallbackKeys.getObjectFieldLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=L(e,l,n,r,i))}return c||r||""},z=function(e,t,n,r,i,o){var s,a=[O(t,n)],f=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=z(e,l,n,r,i))}return c||r||""},U=function(e,t,n,r,i,o){var s=T(t,n),a,u=x([s],e);if(1!=o&&!u){var f=S(i);f&&"base"!=t&&"core"!=t&&(u=U(e,f,n,r,i))}return u||r||""},q=function(e,t,n,r,i,o){var s,a=[B(t,n)],f=u.fallbackKeys.getObjectFieldGroupKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=q(e,l,n,r,i))}return c||r||""},$=function(e,t,n,r,i,o,s){var a,f=[I(t,n,r)],c=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,r);c&&f.push(c);var l=x(f,e);if(1!=s&&!l){var h=S(o);h&&"base"!=t&&"core"!=t&&(l=$(e,h,n,r,i,o))}return l||i||""},W=function(e,t,n,r,i,o){var s,a=[R(t,n)],f=u.fallbackKeys.getObjectActionLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=W(e,l,n,r,i))}return c||r||""},H=function(e,t,n,r,i,o){var s,a=[F(t,n)],f=u.fallbackKeys.getObjectListviewLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=H(e,l,n,r,i))}return c||r||""},Y=function(e,t,r,o,s){void 0===s&&(s=!1);var u=p(e,r),c=h.get(u);if(c)return Object.assign(r,(0,f.cloneDeep)(c));o&&(0,a.convertObject)(r),r.label=(0,n.translationObjectLabel)(e,t,r.label),r.description=N(e,t,r.description),i.each(r.fields,(function(n,o){if(n.label=L(e,t,o,n.label,r.datasource,s),n.inlineHelpText=z(e,t,o,n.inlineHelpText,r.datasource,s),n.description=U(e,t,o,n.description,r.datasource,s),n.group&&(n.group=q(e,t,n.group,n.group,r.datasource,s)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var u=$(e,t,o,n.value,n.label,r.datasource,s);a.push(i.extend({},n,{label:u}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=W(e,t,i,n.label,r.datasource,s)})),i.each(r.list_views,(function(n,i){n.label=H(e,t,i,n.label,r.datasource,s)})),h.set(u,(0,f.cloneDeep)(r))};n.translationObject=Y;var V=function(e,t){i.each(t,(function(t,r){(0,n.translationObject)(e,r,t)}))};n.translationObjects=V;var K=function(e,t,r){var o=g(r);(0,a.convertObject)(o);var s={};return s[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),s[C(t)]=N(e,t,o.description),i.each(o.fields,(function(n,r){s[M(t,r)]=L(e,t,r,n.label),n.inlineHelpText&&(s[O(t,r)]=z(e,t,r,n.inlineHelpText,o.datasource)),n.description&&(s[T(t,r)]=U(e,t,r,n.description,o.datasource)),n.group&&(s[B(t,n.group)]=q(e,t,n.group,n.group,o.datasource)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[I(t,r,n.value)]=$(e,t,r,n.value,n.label))}))})),i.each(o.actions,(function(n,r){s[R(t,r)]=W(e,t,r,n.label)})),i.each(o.list_views,(function(n,r){s[F(t,r)]=H(e,t,r,n.label)})),s};function G(e,t){var n=g(e);(0,a.convertObject)(n);var r={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),r[A(o)]=n.label,r[C(o)]=n.description,i.each(n.fields,(function(e,t){r[M(o,t)]=e.label,e.help&&(r[O(o,t)]=e.help),e.description&&(r[T(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(r[I(o,t,e.value)]=e.label)}))})),i.each(n.groups,(function(e,t){r[B(o,t)]=e})),i.each(n.actions,(function(e,t){r[R(o,t)]=e.label})),i.each(n.listviews,(function(e,t){r[F(o,t)]=e.label})),i.each(n.CustomLabels,(function(e,t){r[E(t)]=e})),r}n.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,s.addResourceBundle)(e.lng,y,t,!0,!0)}))};n.addObjectsTranslation=X},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addTranslations=n.convertTranslation=n.convertTranslationData=n.getAppTranslationTemplate=n.translationApps=n.translationMenus=n.translationApp=n.translationTabLabel=n.translationTabGroup=void 0;var r=t("../index"),i=t("underscore"),o=t("./"),s=t("../i18n/i18n.app"),a=t("clone"),u="translation",f=".",c="app",l="menu",h="tab",d=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[d(),e].join(".")},g=function(e,t){var n={lng:t,ns:u,keySeparator:!1};if((0,r.exists)(e,n))return(0,r._t)(e,n)},b=function(e){var t;return[d("app"),e,"name"].join(".")},m=function(e){var t;return[d("app"),e,"description"].join(".")},v=function(e,t){var n,r;return[d("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[d("menu"),"menu_".concat(e)].join(".")},_=function(e){var t;return[d("tab"),e].join(".")},w=function(e,t,n){var r,i=[b(t)],o=s.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),g(i,e)||n||""},k=function(e,t,n){var r,i=[m(t)],o=s.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),g(i,e)||n||""},j=function(e,t,n,r){var i,o=[v(t,n)],a=s.appFallbackKeys.getAppGroupKey(t,n);return a&&o.push(a),g(o,e)||r||""};n.translationTabGroup=j;var x=function(e,t,n){var r,i=[y(t)],o=s.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),g(i,e)||n||""},S=function(e,t,n){var r,i=[_(t)],o=s.appFallbackKeys.getTabKey(t);return o&&i.push(o),g(i,e)||n||""};n.translationTabLabel=S;var D=function(e,t,r){r.label=w(e,t,r.label||r.name),r.description=k(e,t,r.description),i.each(r.tab_groups,(function(i,o){r.tab_groups[o].id=i.id||i.group_name,r.tab_groups[o].group_name=(0,n.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,n.translationMenus)(e,r.admin_menus)};n.translationApp=D;var E=function(e,t){i.each(t,(function(t){var n=x(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=E;var A=function(e,t){i.each(t,(function(t,r){(0,n.translationApp)(e,r,t)}))};n.translationApps=A;var C=function(e,t,n){var r=a(n),o={};return o[b(t)]=w(e,t,r.label||r.name),o[m(t)]=k(e,t,r.description),i.each(r.admin_menus,(function(t){o[y(t._id)]=x(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var M=function(e,t,n){i.isArray(n)?i.each(n,(function(e){M(e,"",e)})):n&&i.each(i.keys(n),(function(r){var o=t?"".concat(t,".").concat(r):r,s=n[r];"object"==typeof s?i.isArray(s)?i.each(s,(function(e){M(e,o,s)})):M(e,o,s):e[o]=s}))};function O(e){for(var t in e)"object"==typeof e[t]&&M(e,t,e[t]);return e}n.convertTranslationData=O;var T=function(e){var t=a(e),n={};return i.each(t.CustomApplications,(function(e,t){n[b(t)]=e.name,n[m(t)]=e.description,i.each(e.groups,(function(e,r){n[v(t,r)]=e}))})),i.each(t.CustomTabs,(function(e,t){n[_(t)]=e})),i.each(t.CustomLabels,(function(e,t){var r;if("simpleschema"!=t&&i.isObject(e)){var o=O(((r={})[t]=e,r));i.each(o,(function(e,t){i.isObject(e)||(n[p(t)]=e)}))}else n[p(t)]=e})),n};n.convertTranslation=T;var B=function(e){i.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,r.addResourceBundle)(e.lng,u,t,!0,!0)}))};n.addTranslations=B},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function a(e){return s(["label","description"],e)}function u(e){switch(e.type){case"select":return s(["label","help","options","description"],e);default:return s(["label","help","description"],e)}}function f(e){return s(["label"],e)}function c(e){return s(["label"],e)}function l(e){var t={};return r.each(e,(function(e,n){t[n]=u(e)})),t}function h(e){var t={};return r.each(e,(function(e,n){t[n]=c(e)})),t}function d(e){var t={};return r.each(e,(function(e,n){t[n]=f(e)})),t}function p(e,t){var n={};return r.each(e,(function(e,r){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[i]=t[r].group}})),n}var g=function(e,t,n,s){void 0===s&&(s=!1);var u=o(n);1!=s&&(0,i.translationObject)(e,t,u,!0,s);var f=Object.assign({},a(u));f=Object.assign({},f,{fields:l(u.fields)});var c=p(n.fields,u.fields);r.isEmpty(c)||(f=Object.assign({},f,{groups:c}));var g=d(u.list_views);r.isEmpty(g)||(f=Object.assign({},f,{listviews:g}));var b=h(u.actions);return r.isEmpty(b)||(f=Object.assign({},f,{actions:b})),Object.assign({name:t},f)};n.getObjectMetadataTranslationTemplate=g},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]=t[e]||""})),n}function a(e){var t={groups:{}};return e?(r.each(e,(function(e){var n=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[n]=e.group_name})),t):{}}var u=function(e){return Object.assign({},s(["name","description"],e),a(e.tab_groups))},f=function(e){var t={};return r.each(e,(function(e,n){t[n]=n})),t},c=function(e){var t={};return r.each(e,(function(e){var n=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[n]=e})),t},l=function(e,t,n){var r,s=o(n);(0,i.translationApp)(e,t,s);var a={},l;return s.tab_items?a=f(s.tab_items):s.tabs&&(a=c(s.tabs)),Object.assign({},{CustomApplications:(r={},r[t]=u(s),r)},{CustomTabs:a})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",module:"./dist/esm/i18next.js",main:"./dist/cjs/i18next.js"}},dist:{esm:{"i18next.js":function e(t,n,e){let r,i,o,s,a,u,f,c;e.link("@babel/runtime/helpers/esm/typeof",{default(e){r=e}},0),e.link("@babel/runtime/helpers/esm/objectSpread",{default(e){i=e}},1),e.link("@babel/runtime/helpers/esm/classCallCheck",{default(e){o=e}},2),e.link("@babel/runtime/helpers/esm/createClass",{default(e){s=e}},3),e.link("@babel/runtime/helpers/esm/possibleConstructorReturn",{default(e){a=e}},4),e.link("@babel/runtime/helpers/esm/getPrototypeOf",{default(e){u=e}},5),e.link("@babel/runtime/helpers/esm/assertThisInitialized",{default(e){f=e}},6),e.link("@babel/runtime/helpers/esm/inherits",{default(e){c=e}},7);var l={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,n){console&&console[t]&&console[t].apply(console,n)}},h,d=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n)}return s(e,[{key:"init",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||l,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function y(e,t,n){var r=v(e,t,Object),i,o;r.obj[r.k]=n}function _(e,t,n,r){var i=v(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function w(e,t){var n=v(e,t),r=n.obj,i=n.k;if(r)return r[i]}function k(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return c(t,e),s(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[t,n];return r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split(".")),w(this.data,s)}},{key:"addResource",value:function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(i=n,n=(a=t.split("."))[1]),this.addNamespaces(n),y(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}},{key:"addResources",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}},{key:"addResourceBundle",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},u=[t,n];t.indexOf(".")>-1&&(o=r,r=n,n=(u=t.split("."))[1]),this.addNamespaces(n);var f=w(this.data,u)||{};o?j(f,r,s):f=i({},f,r),y(this.data,u,f),a.silent||this.emit("added",t,n,r)}},{key:"removeResourceBundle",value:function e(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}},{key:"hasResourceBundle",value:function e(t,n){return void 0!==this.getResource(t,n)}},{key:"getResourceBundle",value:function e(t,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(t,n)):this.getResource(t,n)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(p),C={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,r,i,o){var s=this;return t.forEach((function(e){s.processors[e]&&(n=s.processors[e].process(n,r,i,o))})),n}},M={},O=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),m(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,f(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=d.create("translator"),n}return c(t,e),s(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,n);return r&&void 0!==r.res}},{key:"extractFromKey",value:function e(t,n){var r=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:o};var a=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,o,s){var a=this;if("object"!==r(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var u=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(n[n.length-1],o),c=f.key,l=f.namespaces,h=l[l.length-1],d=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=o.nsSeparator||this.options.nsSeparator;return h+g+c}return c}var b=this.resolve(n,o),m=b&&b.res,v=b&&b.usedKey||c,y=b&&b.exactUsedKey||c,_=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(j&&m&&x&&w.indexOf(_)<0&&("string"!=typeof k||"[object Array]"!==_)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,o):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(u){var S="[object Array]"===_,D=S?[]:{},E=S?y:v;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var C="".concat(E).concat(u).concat(A);D[A]=this.translate(C,i({},o,{joinArrays:!1,ns:l})),D[A]===C&&(D[A]=m[A])}m=D}}else if(j&&"string"==typeof k&&"[object Array]"===_)(m=m.join(k))&&(m=this.extendTranslation(m,n,o,s));else{var M=!1,O=!1,T=void 0!==o.count&&"string"!=typeof o.count,B=t.hasDefaultValue(o),I=T?this.pluralResolver.getSuffix(d,o.count):"",R=o["defaultValue".concat(I)]||o.defaultValue;!this.isValidLookup(m)&&B&&(M=!0,m=R),this.isValidLookup(m)||(O=!0,m=c);var F=B&&R!==m&&this.options.updateMissing;if(O||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,h,c,F?R:m),u){var P=this.resolve(c,i({},o,{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},i,o,s,a,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(i)){var t=n.extractFromKey(e,r),f=t.key;o=f;var c=t.namespaces;n.options.fallbackNS&&(c=c.concat(n.options.fallbackNS));var l=void 0!==r.count&&"string"!=typeof r.count,h=void 0!==r.context&&"string"==typeof r.context&&""!==r.context,d=r.lngs?r.lngs:n.languageUtils.toResolveHierarchy(r.lng||n.language,r.fallbackLng);c.forEach((function(e){n.isValidLookup(i)||(u=e,!M["".concat(d[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(u)&&(M["".concat(d[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(t){if(!n.isValidLookup(i)){a=t;var o=f,u=[o],c,d;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(u,f,t,e,r);else l&&(c=n.pluralResolver.getSuffix(t,r.count)),l&&h&&u.push(o+c),h&&u.push(o+="".concat(n.options.contextSeparator).concat(r.context)),l&&u.push(o+=c);for(;d=u.pop();)n.isValidLookup(i)||(s=d,i=n.getResource(t,e,d,r))}})))}))}})),{res:i,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:u}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&void 0!==t[r])return!0;return!1}}]),t}(p);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}var B=function(){function e(t){o(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d.create("languageUtils")}return s(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=T(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var n=this,r;return t?(t.forEach((function(e){if(!r){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(r=t)}})),!r&&this.options.supportedLngs&&t.forEach((function(e){if(!r){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return r=t;r=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function e(t,n){if(!t)return[];if("function"==typeof t&&(t=t(n)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function e(t,n){var r=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=function e(t){t&&(r.isSupportedCode(t)?o.push(t):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(t))):"string"==typeof t&&s(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&s(r.formatLanguageCode(e))})),o}}]),e}(),I=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],R={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function F(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:R[t.fc]}}))})),e}var P=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.languageUtils=t,this.options=n,this.logger=d.create("pluralResolver"),this.rules=F()}return s(e,[{key:"addRule",value:function e(t,n){this.rules[t]=n}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,n){return this.getSuffixes(t).map((function(e){return n+e}))}},{key:"getSuffixes",value:function e(t){var n=this,r=this.getRule(t);return r?r.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var r=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(n):i.plurals(Math.abs(n)),s=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var a=function e(){return r.options.prepend&&s.toString()?r.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=d.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=void 0!==n.escape?n.escape:D,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?x(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?x(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?x(n.nestingPrefix):n.nestingPrefixEscaped||x("$t("),this.nestingSuffix=n.nestingSuffix?x(n.nestingSuffix):n.nestingSuffixEscaped||x(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function e(t,n,r,i){var o=this,s,a,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function e(t){if(t.indexOf(o.formatSeparator)<0){var s=k(n,f,t);return o.alwaysFormat?o.format(s,void 0,r):s}var a=t.split(o.formatSeparator),u=a.shift().trim(),c=a.join(o.formatSeparator).trim();return o.format(k(n,f,u),c,r,i)};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return c(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?c(o.escape(t)):c(t)}}].forEach((function(e){for(u=0;s=e.regex.exec(t);){if(void 0===(a=l(s[1].trim())))if("function"==typeof h){var n=h(t,s,i);a="string"==typeof n?n:""}else{if(d){a=s[0];continue}o.logger.warn("missed to pass in variable ".concat(s[1]," for interpolating ").concat(t)),a=""}else"string"==typeof a||o.useRawValueToEscape||(a=b(a));if(t=t.replace(s[0],e.safeValue(a)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s,a,u=i({},o);function f(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(s){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),s),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e}for(u.applyPostProcessor=!1,delete u.defaultValue;s=this.nestingRegexp.exec(t);){var c=[],l=!1;if(s[0].includes(this.formatSeparator)&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map((function(e){return e.trim()}));s[1]=h.shift(),c=h,l=!0}if((a=n(f.call(this,s[1].trim(),u),u))&&s[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=b(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return r.format(e,t,o.lng,o)}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}]),e}();function L(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var z=function(e){function t(e,n,r){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o(this,t),i=a(this,u(t).call(this)),E&&p.call(f(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=s,i.logger=d.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,s.backend,s),i}return c(t,e),s(t,[{key:"queueLoad",value:function e(t,n,r,i){var o=this,s=[],a=[],u=[],f=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var i="".concat(e,"|").concat(n);!r.reload&&o.store.hasResourceBundle(e,n)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?a.indexOf(i)<0&&a.push(i):(o.state[i]=1,t=!1,a.indexOf(i)<0&&a.push(i),s.indexOf(i)<0&&s.push(i),f.indexOf(n)<0&&f.push(n)))})),t||u.push(e)})),(s.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:s,pending:a,toLoadLanguages:u,toLoadNamespaces:f}}},{key:"loaded",value:function e(t,n,r){var i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(r){_(r.loaded,[o],s),L(r.pending,t),n&&r.errors.push(n),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){e[t]||(e[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,n,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,n,r,o+1,2*s,a)}),s):a(e,u)})):a(null,{})}},{key:"prepareLoading",value:function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var s=this.queueLoad(t,n,i,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function e(t,n,r){this.prepareLoading(t,n,{},r)}},{key:"reload",value:function e(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}},{key:"loadOne",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],s=i[1];this.read(o,s,"read",void 0,void 0,(function(e,i){e&&n.logger.warn("".concat(r,"loading namespace ").concat(s," for language ").concat(o," failed"),e),!e&&i&&n.logger.log("".concat(r,"loaded namespace ").concat(s," for language ").concat(o),i),n.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(t,n,r,o,null,i({},a,{isUpdate:s})),t&&t[0]&&this.store.addResource(t[0],n,r,o))}}]),t}(p);function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var n={};if("object"===r(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===r(t[2])||"object"===r(t[3])){var i=t[3]||t[2];Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n},interpolation:{escapeValue:!0,format:function e(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function q(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $(){}var W,H=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(o(this,t),e=a(this,u(t).call(this)),E&&p.call(f(e)),e.options=q(n),e.services={},e.logger=d,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),a(e,f(e));setTimeout((function(){e.init(n,r)}),0)}return e}return c(t,e),s(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},U(),this.options,q(n)),this.format=this.options.interpolation.format,r||(r=$),!this.options.isClone){this.modules.logger?d.init(o(this.modules.logger),this.options):d.init(null,this.options);var s=new B(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=d,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new P(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new N(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new z(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var l=g(),h=function e(){var n=function e(n,i){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(i),r(n,i)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return n(null,t.t.bind(t));t.changeLanguage(t.options.lng,n)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),l}},{key:"loadResources",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,i=r,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var s=[],a=function e(t){var r;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(s,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,n,r){var i=g();return t||(t=this.languages),n||(n=this.options.ns),r||(r=$),this.services.backendConnector.reload(t,n,(function(e){i.resolve(),r(e)})),i}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&C.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var r=this;this.isLanguageChangingTo=t;var i=g();this.emit("languageChanging",t);var o=function e(t,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,i.resolve((function(){return r.t.apply(r,arguments)})),n&&n(t,(function(){return r.t.apply(r,arguments)}))},s=function e(t){var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||(r.language=n,r.languages=r.services.languageUtils.toResolveHierarchy(n)),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,(function(e){o(e,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(t):s(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,n){var o=this,s=function e(t,n){var s;if("object"!==r(n)){for(var a=arguments.length,u=new Array(a>2?a-2:0),f=2;f1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],o=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function e(t,r){var i=n.services.backendConnector.state["".concat(t,"|").concat(r)];return-1===i||2===i};if(r.precheck){var u=r.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!a(i,t)||o&&!a(s,t)))}},{key:"loadNamespaces",value:function e(t,n){var r=this,i=g();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var r=g();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(n&&n(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var n}},{key:"createInstance",value:function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(n,r)}},{key:"cloneInstance",value:function e(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,s=i({},this.options,r,{isClone:!0}),a=new t(s),u=["store","services","language"];return u.forEach((function(e){a[e]=n[e]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new O(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rr,root:()=>i,ArrayProto:()=>o,ObjProto:()=>s,SymbolProto:()=>a,push:()=>u,slice:()=>f,toString:()=>c,hasOwnProperty:()=>l,supportsArrayBuffer:()=>h,supportsDataView:()=>d,nativeIsArray:()=>p,nativeKeys:()=>g,nativeCreate:()=>b,nativeIsView:()=>m,_isNaN:()=>v,_isFinite:()=>y,hasEnumBug:()=>_,nonEnumerableProps:()=>w,MAX_ARRAY_INDEX:()=>k});var r="1.13.4",i="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,u=o.push,f=o.slice,c=s.toString,l=s.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,p=Array.isArray,g=Object.keys,b=Object.create,m=h&&ArrayBuffer.isView,v=isNaN,y=isFinite,_=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=Math.pow(2,53)-1},"restArguments.js":function e(t,n,e){function r(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;ir})},"isObject.js":function e(t,n,e){function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}e.export({default:()=>r})},"isNull.js":function e(t,n,e){function r(e){return null===e}e.export({default:()=>r})},"isUndefined.js":function e(t,n,e){function r(e){return void 0===e}e.export({default:()=>r})},"isBoolean.js":function e(t,n,e){let r;function i(e){return!0===e||!1===e||"[object Boolean]"===r.call(e)}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isElement.js":function e(t,n,e){function r(e){return!(!e||1!==e.nodeType)}e.export({default:()=>r})},"isString.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("String"))},"_tagTester.js":function e(t,n,e){let r;function i(e){var t="[object "+e+"]";return function(e){return r.call(e)===t}}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isNumber.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Number"))},"isDate.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Date"))},"isRegExp.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("RegExp"))},"isError.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Error"))},"isSymbol.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Symbol"))},"isArrayBuffer.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("ArrayBuffer"))},"isDataView.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isArrayBuffer.js",{default(e){o=e}},2),e.link("./_stringTagBug.js",{hasStringTagBug(e){s=e}},3);var a=r("DataView");function u(e){return null!=e&&i(e.getInt8)&&o(e.buffer)}e.exportDefault(s?u:a)},"isFunction.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_setup.js",{root(e){i=e}},1);var o=r("Function"),s=i.document&&i.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof s&&(o=function(e){return"function"==typeof e||!1}),e.exportDefault(o)},"_stringTagBug.js":function e(t,n,e){let r,i;e.export({hasStringTagBug:()=>o,isIE11:()=>s}),e.link("./_setup.js",{supportsDataView(e){r=e}},0),e.link("./_hasObjectTag.js",{default(e){i=e}},1);var o=r&&i(new DataView(new ArrayBuffer(8))),s="undefined"!=typeof Map&&i(new Map)},"_hasObjectTag.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Object"))},"isArray.js":function e(t,n,e){let r,i;e.link("./_setup.js",{nativeIsArray(e){r=e}},0),e.link("./_tagTester.js",{default(e){i=e}},1),e.exportDefault(r||i("Array"))},"isArguments.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1);var o=r("Arguments");!function(){o(arguments)||(o=function(e){return i(e,"callee")})}(),e.exportDefault(o)},"_has.js":function e(t,n,e){let r;function i(e,t){return null!=e&&r.call(e,t)}e.export({default:()=>i}),e.link("./_setup.js",{hasOwnProperty(e){r=e}},0)},"isFinite.js":function e(t,n,e){let r,i;function o(e){return!i(e)&&r(e)&&!isNaN(parseFloat(e))}e.export({default:()=>o}),e.link("./_setup.js",{_isFinite(e){r=e}},0),e.link("./isSymbol.js",{default(e){i=e}},1)},"isNaN.js":function e(t,n,e){let r,i;function o(e){return i(e)&&r(e)}e.export({default:()=>o}),e.link("./_setup.js",{_isNaN(e){r=e}},0),e.link("./isNumber.js",{default(e){i=e}},1)},"isTypedArray.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./_setup.js",{supportsArrayBuffer(e){r=e},nativeIsView(e){i=e},toString(e){o=e}},0),e.link("./isDataView.js",{default(e){s=e}},1),e.link("./constant.js",{default(e){a=e}},2),e.link("./_isBufferLike.js",{default(e){u=e}},3);var f=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function c(e){return i?i(e)&&!s(e):u(e)&&f.test(o.call(e))}e.exportDefault(r?c:a(!1))},"constant.js":function e(t,n,e){function r(e){return function(){return e}}e.export({default:()=>r})},"_isBufferLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getByteLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createSizePropertyCheck.js":function e(t,n,e){let r;function i(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=r}}e.export({default:()=>i}),e.link("./_setup.js",{MAX_ARRAY_INDEX(e){r=e}},0)},"_getByteLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("byteLength"))},"_shallowProperty.js":function e(t,n,e){function r(e){return function(t){return null==t?void 0:t[e]}}e.export({default:()=>r})},"isEmpty.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(null==e)return!0;var t=r(e);return"number"==typeof t&&(i(e)||o(e)||s(e))?0===t:0===r(a(e))}e.export({default:()=>u}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3),e.link("./keys.js",{default(e){a=e}},4)},"_getLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("length"))},"keys.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(!r(e))return[];if(i)return i(e);var t=[];for(var n in e)s(e,n)&&t.push(n);return o&&a(e,t),t}e.export({default:()=>u}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeKeys(e){i=e},hasEnumBug(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2),e.link("./_collectNonEnumProps.js",{default(e){a=e}},3)},"_collectNonEnumProps.js":function e(t,n,e){let r,i,o,s;function a(e){for(var t={},n=e.length,r=0;ru}),e.link("./_setup.js",{nonEnumerableProps(e){r=e},ObjProto(e){i=e}},0),e.link("./isFunction.js",{default(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2)},"isMatch.js":function e(t,n,e){let r;function i(e,t){var n=r(t),i=n.length;if(null==e)return!i;for(var o=Object(e),s=0;si}),e.link("./keys.js",{default(e){r=e}},0)},"isEqual.js":function e(t,n,e){let r,i,o,s,a,u,f,c,l,h,d;e.export({default:()=>m}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_setup.js",{toString(e){i=e},SymbolProto(e){o=e}},1),e.link("./_getByteLength.js",{default(e){s=e}},2),e.link("./isTypedArray.js",{default(e){a=e}},3),e.link("./isFunction.js",{default(e){u=e}},4),e.link("./_stringTagBug.js",{hasStringTagBug(e){f=e}},5),e.link("./isDataView.js",{default(e){c=e}},6),e.link("./keys.js",{default(e){l=e}},7),e.link("./_has.js",{default(e){h=e}},8),e.link("./_toBufferView.js",{default(e){d=e}},9);var p="[object DataView]";function g(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&b(e,t,n,r)}function b(e,t,n,m){e instanceof r&&(e=e._wrapped),t instanceof r&&(t=t._wrapped);var v=i.call(e);if(v!==i.call(t))return!1;if(f&&"[object Object]"==v&&c(e)){if(!c(t))return!1;v=p}switch(v){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(t);case"[object ArrayBuffer]":case p:return b(d(e),d(t),n,m)}var y="[object Array]"===v;if(!y&&a(e)){var _;if(s(e)!==s(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;y=!0}if(!y){if("object"!=typeof e||"object"!=typeof t)return!1;var w=e.constructor,k=t.constructor;if(w!==k&&!(u(w)&&w instanceof w&&u(k)&&k instanceof k)&&"constructor"in e&&"constructor"in t)return!1}m=m||[];for(var j=(n=n||[]).length;j--;)if(n[j]===e)return m[j]===t;if(n.push(e),m.push(t),y){if((j=e.length)!==t.length)return!1;for(;j--;)if(!g(e[j],t[j],n,m))return!1}else{var x=l(e),S;if(j=x.length,l(t).length!==j)return!1;for(;j--;)if(S=x[j],!h(t,S)||!g(e[S],t[S],n,m))return!1}return n.pop(),m.pop(),!0}function m(e,t){return g(e,t)}},"underscore.js":function e(t,n,e){let r;function i(e){return e instanceof i?e:this instanceof i?void(this._wrapped=e):new i(e)}e.export({default:()=>i}),e.link("./_setup.js",{VERSION(e){r=e}},0),i.VERSION=r,i.prototype.value=function(){return this._wrapped},i.prototype.valueOf=i.prototype.toJSON=i.prototype.value,i.prototype.toString=function(){return String(this._wrapped)}},"_toBufferView.js":function e(t,n,e){let r;function i(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,r(e))}e.export({default:()=>i}),e.link("./_getByteLength.js",{default(e){r=e}},0)},"isMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},mapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Map"))},"_methodFingerprint.js":function e(t,n,e){let r,i,o;function s(e){var t=r(e);return function(n){if(null==n)return!1;var s=o(n);if(r(s))return!1;for(var u=0;us,mapMethods:()=>l,weakMapMethods:()=>h,setMethods:()=>d}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./allKeys.js",{default(e){o=e}},2);var a="forEach",u="has",f=["clear","delete"],c=["get","has","set"],l=f.concat(a,c),h=f.concat(c),d=["add"].concat(f,a,"has")},"allKeys.js":function e(t,n,e){let r,i,o;function s(e){if(!r(e))return[];var t=[];for(var n in e)t.push(n);return i&&o(e,t),t}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{hasEnumBug(e){i=e}},1),e.link("./_collectNonEnumProps.js",{default(e){o=e}},2)},"isWeakMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},weakMapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("WeakMap"))},"isSet.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},setMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Set"))},"isWeakSet.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("WeakSet"))},"values.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"pairs.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"invert.js":function e(t,n,e){let r;function i(e){for(var t={},n=r(e),i=0,o=n.length;ii}),e.link("./keys.js",{default(e){r=e}},0)},"functions.js":function e(t,n,e){let r;function i(e){var t=[];for(var n in e)r(e[n])&&t.push(n);return t.sort()}e.export({default:()=>i}),e.link("./isFunction.js",{default(e){r=e}},0)},"extend.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createAssigner.js":function e(t,n,e){function r(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;ir})},"extendOwn.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"defaults.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i,!0))},"create.js":function e(t,n,e){let r,i;function o(e,t){var n=r(e);return t&&i(n,t),n}e.export({default:()=>o}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./extendOwn.js",{default(e){i=e}},1)},"_baseCreate.js":function e(t,n,e){let r,i;function o(){return function(){}}function s(e){if(!r(e))return{};if(i)return i(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeCreate(e){i=e}},1)},"clone.js":function e(t,n,e){let r,i,o;function s(e){return r(e)?i(e)?e.slice():o({},e):e}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./extend.js",{default(e){o=e}},2)},"tap.js":function e(t,n,e){function r(e,t){return t(e),e}e.export({default:()=>r})},"get.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=i(e,r(t));return o(s)?n:s}e.export({default:()=>s}),e.link("./_toPath.js",{default(e){r=e}},0),e.link("./_deepGet.js",{default(e){i=e}},1),e.link("./isUndefined.js",{default(e){o=e}},2)},"_toPath.js":function e(t,n,e){let r;function i(e){return r.toPath(e)}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./toPath.js")},"toPath.js":function e(t,n,e){let r,i;function o(e){return i(e)?e:[e]}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),r.toPath=o},"_deepGet.js":function e(t,n,e){function r(e,t){for(var n=t.length,r=0;rr})},"has.js":function e(t,n,e){let r,i;function o(e,t){for(var n=(t=i(t)).length,o=0;oo}),e.link("./_has.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"mapObject.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s=o.length,a={},u=0;uo}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"_cb.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r.iteratee!==o?r.iteratee(e,t):i(e,t,n)}e.export({default:()=>s}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),e.link("./iteratee.js",{default(e){o=e}},2)},"_baseIteratee.js":function e(t,n,e){let r,i,o,s,a,u,f;function c(e,t,n){return null==e?r:i(e)?f(e,t,n):o(e)&&!s(e)?a(e):u(e)}e.export({default:()=>c}),e.link("./identity.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isObject.js",{default(e){o=e}},2),e.link("./isArray.js",{default(e){s=e}},3),e.link("./matcher.js",{default(e){a=e}},4),e.link("./property.js",{default(e){u=e}},5),e.link("./_optimizeCb.js",{default(e){f=e}},6)},"identity.js":function e(t,n,e){function r(e){return e}e.export({default:()=>r})},"matcher.js":function e(t,n,e){let r,i;function o(e){return e=r({},e),function(t){return i(t,e)}}e.export({default:()=>o}),e.link("./extendOwn.js",{default(e){r=e}},0),e.link("./isMatch.js",{default(e){i=e}},1)},"property.js":function e(t,n,e){let r,i;function o(e){return e=i(e),function(t){return r(t,e)}}e.export({default:()=>o}),e.link("./_deepGet.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"_optimizeCb.js":function e(t,n,e){function r(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}e.export({default:()=>r})},"iteratee.js":function e(t,n,e){let r,i;function o(e,t){return i(e,t,1/0)}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),r.iteratee=o},"noop.js":function e(t,n,e){function r(){}e.export({default:()=>r})},"propertyOf.js":function e(t,n,e){let r,i;function o(e){return null==e?r:function(t){return i(e,t)}}e.export({default:()=>o}),e.link("./noop.js",{default(e){r=e}},0),e.link("./get.js",{default(e){i=e}},1)},"times.js":function e(t,n,e){let r;function i(e,t,n){var i=Array(Math.max(0,e));t=r(t,n,1);for(var o=0;oi}),e.link("./_optimizeCb.js",{default(e){r=e}},0)},"random.js":function e(t,n,e){function r(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}e.export({default:()=>r})},"now.js":function e(t,n,e){e.exportDefault(Date.now||function(){return(new Date).getTime()})},"escape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createEscaper.js":function e(t,n,e){let r;function i(e){var t=function(t){return e[t]},n="(?:"+r(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}}e.export({default:()=>i}),e.link("./keys.js",{default(e){r=e}},0)},"_escapeMap.js":function e(t,n,e){e.exportDefault({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"})},"unescape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_unescapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_unescapeMap.js":function e(t,n,e){let r,i;e.link("./invert.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"templateSettings.js":function e(t,n,e){let r;e.link("./underscore.js",{default(e){r=e}},0),e.exportDefault(r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g})},"template.js":function e(t,n,e){let r,i;e.export({default:()=>c}),e.link("./defaults.js",{default(e){r=e}},0),e.link("./underscore.js",{default(e){i=e}},1),e.link("./templateSettings.js");var o=/(.)^/,s={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},a=/\\|'|\r|\n|\u2028|\u2029/g;function u(e){return"\\"+s[e]}var f=/^\s*(\w|\$)+\s*$/;function c(e,t,n){!t&&n&&(t=n),t=r({},t,i.templateSettings);var s=RegExp([(t.escape||o).source,(t.interpolate||o).source,(t.evaluate||o).source].join("|")+"|$","g"),c=0,l="__p+='";e.replace(s,(function(t,n,r,i,o){return l+=e.slice(c,o).replace(a,u),c=o+t.length,n?l+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?l+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(l+="';\n"+i+"\n__p+='"),t})),l+="';\n";var h=t.variable,d;if(h){if(!f.test(h))throw new Error("variable is not a bare identifier: "+h)}else l="with(obj||{}){\n"+l+"}\n",h="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";try{d=new Function(h,"_",l)}catch(g){throw g.source=l,g}var p=function(e){return d.call(this,e,i)};return p.source="function("+h+"){\n"+l+"}",p}},"result.js":function e(t,n,e){let r,i;function o(e,t,n){var o=(t=i(t)).length;if(!o)return r(n)?n.call(e):n;for(var s=0;so}),e.link("./isFunction.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"uniqueId.js":function e(t,n,e){e.export({default:()=>i});var r=0;function i(e){var t=++r+"";return e?e+t:t}},"chain.js":function e(t,n,e){let r;function i(e){var t=r(e);return t._chain=!0,t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"partial.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_executeBound.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2);var s=r((function(e,t){var n=s.placeholder,r=function(){for(var o=0,s=t.length,a=Array(s),u=0;uo}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./isObject.js",{default(e){i=e}},1)},"bind.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_executeBound.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t,n){if(!i(e))throw new TypeError("Bind must be called on a function");var s=r((function(r){return o(e,s,t,this,n.concat(r))}));return s})))},"bindAll.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./bind.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t){var n=(t=i(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=o(e[r],e)}return e})))},"_flatten.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,u){if(u=u||[],t||0===t){if(t<=0)return u.concat(e)}else t=1/0;for(var f=u.length,c=0,l=r(e);c1)a(h,t-1,n,u),f=u.length;else for(var d=0,p=h.length;da}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./isArray.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3)},"_isArrayLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"memoize.js":function e(t,n,e){let r;function i(e,t){var n=function(i){var o=n.cache,s=""+(t?t.apply(this,arguments):i);return r(o,s)||(o[s]=e.apply(this,arguments)),o[s]};return n.cache={},n}e.export({default:()=>i}),e.link("./_has.js",{default(e){r=e}},0)},"delay.js":function e(t,n,e){let r;e.link("./restArguments.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})))},"defer.js":function e(t,n,e){let r,i,o;e.link("./partial.js",{default(e){r=e}},0),e.link("./delay.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2),e.exportDefault(r(i,o,1))},"throttle.js":function e(t,n,e){let r;function i(e,t,n){var i,o,s,a,u=0;n||(n={});var f=function(){u=!1===n.leading?0:r(),i=null,a=e.apply(o,s),i||(o=s=null)},c=function(){var c=r();u||!1!==n.leading||(u=c);var l=t-(c-u);return o=this,s=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=c,a=e.apply(o,s),i||(o=s=null)):i||!1===n.trailing||(i=setTimeout(f,l)),a};return c.cancel=function(){clearTimeout(i),u=0,i=o=s=null},c}e.export({default:()=>i}),e.link("./now.js",{default(e){r=e}},0)},"debounce.js":function e(t,n,e){let r,i;function o(e,t,n){var o,s,a,u,f,c=function(){var r=i()-s;t>r?o=setTimeout(c,t-r):(o=null,n||(u=e.apply(f,a)),o||(a=f=null))},l=r((function(r){return f=this,a=r,s=i(),o||(o=setTimeout(c,t),n&&(u=e.apply(f,a))),u}));return l.cancel=function(){clearTimeout(o),o=a=f=null},l}e.export({default:()=>o}),e.link("./restArguments.js",{default(e){r=e}},0),e.link("./now.js",{default(e){i=e}},1)},"wrap.js":function e(t,n,e){let r;function i(e,t){return r(t,e)}e.export({default:()=>i}),e.link("./partial.js",{default(e){r=e}},0)},"negate.js":function e(t,n,e){function r(e){return function(){return!e.apply(this,arguments)}}e.export({default:()=>r})},"compose.js":function e(t,n,e){function r(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}e.export({default:()=>r})},"after.js":function e(t,n,e){function r(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}e.export({default:()=>r})},"before.js":function e(t,n,e){function r(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}e.export({default:()=>r})},"once.js":function e(t,n,e){let r,i;e.link("./partial.js",{default(e){r=e}},0),e.link("./before.js",{default(e){i=e}},1),e.exportDefault(r(i,2))},"findKey.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s,a=0,u=o.length;ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"findIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createPredicateIndexFinder.js":function e(t,n,e){let r,i;function o(e){return function(t,n,o){n=r(n,o);for(var s=i(t),a=e>0?0:s-1;a>=0&&ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"findLastIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"sortedIndex.js":function e(t,n,e){let r,i;function o(e,t,n,o){for(var s=(n=r(n,o,1))(t),a=0,u=i(e);ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"indexOf.js":function e(t,n,e){let r,i,o;e.link("./sortedIndex.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./_createIndexFinder.js",{default(e){o=e}},2),e.exportDefault(o(1,i,r))},"_createIndexFinder.js":function e(t,n,e){let r,i,o;function s(e,t,n){return function(s,a,u){var f=0,c=r(s);if("number"==typeof u)e>0?f=u>=0?u:Math.max(u+c,f):c=u>=0?Math.min(u+1,c):u+c+1;else if(n&&u&&c)return s[u=n(s,a)]===a?u:-1;if(a!=a)return(u=t(i.call(s,f,c),o))>=0?u+f:-1;for(u=e>0?f:c-1;u>=0&&us}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isNaN.js",{default(e){o=e}},2)},"lastIndexOf.js":function e(t,n,e){let r,i;e.link("./findLastIndex.js",{default(e){r=e}},0),e.link("./_createIndexFinder.js",{default(e){i=e}},1),e.exportDefault(i(-1,r))},"find.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a=(r(e)?i:o)(e,t,n);if(void 0!==a&&-1!==a)return e[a]}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./findKey.js",{default(e){o=e}},2)},"findWhere.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./find.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"each.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a;if(t=r(t,n),i(e))for(s=0,a=e.length;ss}),e.link("./_optimizeCb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"map.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=Array(a),f=0;fs}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"reduce.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createReduce.js":function e(t,n,e){let r,i,o;function s(e){var t=function(t,n,o,s){var a=!r(t)&&i(t),u=(a||t).length,f=e>0?0:u-1;for(s||(o=t[a?a[f]:f],f+=e);f>=0&&f=3;return t(e,o(n,i,4),r,s)}}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2)},"reduceRight.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"filter.js":function e(t,n,e){let r,i;function o(e,t,n){var o=[];return t=r(t,n),i(e,(function(e,n,r){t(e,n,r)&&o.push(e)})),o}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"reject.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r(e,i(o(t)),n)}e.export({default:()=>s}),e.link("./filter.js",{default(e){r=e}},0),e.link("./negate.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2)},"every.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"some.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"contains.js":function e(t,n,e){let r,i,o;function s(e,t,n,s){return r(e)||(e=i(e)),("number"!=typeof n||s)&&(n=0),o(e,t,n)>=0}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./indexOf.js",{default(e){o=e}},2)},"invoke.js":function e(t,n,e){let r,i,o,s,a;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2),e.link("./_deepGet.js",{default(e){s=e}},3),e.link("./_toPath.js",{default(e){a=e}},4),e.exportDefault(r((function(e,t,n){var r,u;return i(t)?u=t:(t=a(t),r=t.slice(0,-1),t=t[t.length-1]),o(e,(function(e){var i=u;if(!i){if(r&&r.length&&(e=s(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)}))})))},"pluck.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./map.js",{default(e){r=e}},0),e.link("./property.js",{default(e){i=e}},1)},"where.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./filter.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"max.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=-1/0,u=-1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la&&(a=f);else t=o(t,n),s(e,(function(e,n,r){((c=t(e,n,r))>u||c===-1/0&&a===-1/0)&&(a=e,u=c)}));return a}e.export({default:()=>a}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"min.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=1/0,u=1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"shuffle.js":function e(t,n,e){let r;function i(e){return r(e,1/0)}e.export({default:()=>i}),e.link("./sample.js",{default(e){r=e}},0)},"sample.js":function e(t,n,e){let r,i,o,s,a;function u(e,t,n){if(null==t||n)return r(e)||(e=i(e)),e[s(e.length-1)];var u=a(e),f=o(u);t=Math.max(Math.min(t,f),0);for(var c=f-1,l=0;lu}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./random.js",{default(e){s=e}},3),e.link("./toArray.js",{default(e){a=e}},4)},"toArray.js":function e(t,n,e){let r,i,o,s,a,u,f;e.export({default:()=>l}),e.link("./isArray.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./_isArrayLike.js",{default(e){s=e}},3),e.link("./map.js",{default(e){a=e}},4),e.link("./identity.js",{default(e){u=e}},5),e.link("./values.js",{default(e){f=e}},6);var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function l(e){return e?r(e)?i.call(e):o(e)?e.match(c):s(e)?a(e,u):f(e):[]}},"sortBy.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=0;return t=r(t,n),i(o(e,(function(e,n,r){return{value:e,index:s++,criteria:t(e,n,r)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(ns}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./pluck.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2)},"groupBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n].push(t):e[n]=[t]})))},"_group.js":function e(t,n,e){let r,i;function o(e,t){return function(n,o,s){var a=t?[[],[]]:{};return o=r(o,s),i(n,(function(t,r){var i=o(t,r,n);e(a,t,i)})),a}}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"indexBy.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n]=t})))},"countBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n]++:e[n]=1})))},"partition.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n?0:1].push(t)}),!0))},"size.js":function e(t,n,e){let r,i;function o(e){return null==e?0:r(e)?e.length:i(e).length}e.export({default:()=>o}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"pick.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2),e.link("./allKeys.js",{default(e){s=e}},3),e.link("./_keyInObj.js",{default(e){a=e}},4),e.link("./_flatten.js",{default(e){u=e}},5),e.exportDefault(r((function(e,t){var n={},r=t[0];if(null==e)return n;i(r)?(t.length>1&&(r=o(r,t[1])),t=s(e)):(r=a,t=u(t,!1,!1),e=Object(e));for(var f=0,c=t.length;fr})},"omit.js":function e(t,n,e){let r,i,o,s,a,u,f;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./negate.js",{default(e){o=e}},2),e.link("./map.js",{default(e){s=e}},3),e.link("./_flatten.js",{default(e){a=e}},4),e.link("./contains.js",{default(e){u=e}},5),e.link("./pick.js",{default(e){f=e}},6),e.exportDefault(r((function(e,t){var n=t[0],r;return i(n)?(n=o(n),t.length>1&&(r=t[1])):(t=s(a(t,!1,!1),String),n=function(e,n){return!u(t,n)}),f(e,n,r)})))},"first.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:r(e,e.length-t)}e.export({default:()=>i}),e.link("./initial.js",{default(e){r=e}},0)},"initial.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"last.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:r(e,Math.max(0,e.length-t))}e.export({default:()=>i}),e.link("./rest.js",{default(e){r=e}},0)},"rest.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,null==t||n?1:t)}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"compact.js":function e(t,n,e){let r;function i(e){return r(e,Boolean)}e.export({default:()=>i}),e.link("./filter.js",{default(e){r=e}},0)},"flatten.js":function e(t,n,e){let r;function i(e,t){return r(e,t,!1)}e.export({default:()=>i}),e.link("./_flatten.js",{default(e){r=e}},0)},"without.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./difference.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t){return i(e,t)})))},"difference.js":function e(t,n,e){let r,i,o,s;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./filter.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3),e.exportDefault(r((function(e,t){return t=i(t,!0,!0),o(e,(function(e){return!s(t,e)}))})))},"uniq.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,a){r(t)||(a=n,n=t,t=!1),null!=n&&(n=i(n,a));for(var u=[],f=[],c=0,l=o(e);ca}),e.link("./isBoolean.js",{default(e){r=e}},0),e.link("./_cb.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3)},"union.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./uniq.js",{default(e){i=e}},1),e.link("./_flatten.js",{default(e){o=e}},2),e.exportDefault(r((function(e){return i(o(e,!0,!0))})))},"intersection.js":function e(t,n,e){let r,i;function o(e){for(var t=[],n=arguments.length,o=0,s=r(e);oo}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./contains.js",{default(e){i=e}},1)},"unzip.js":function e(t,n,e){let r,i,o;function s(e){for(var t=e&&r(e,i).length||0,n=Array(t),s=0;ss}),e.link("./max.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.link("./pluck.js",{default(e){o=e}},2)},"zip.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./unzip.js",{default(e){i=e}},1),e.exportDefault(r(i))},"object.js":function e(t,n,e){let r;function i(e,t){for(var n={},i=0,o=r(e);ii}),e.link("./_getLength.js",{default(e){r=e}},0)},"range.js":function e(t,n,e){function r(e,t,n){null==t&&(t=e||0,e=0),n||(n=tr})},"chunk.js":function e(t,n,e){let r;function i(e,t){if(null==t||t<1)return[];for(var n=[],i=0,o=e.length;ii}),e.link("./_setup.js",{slice(e){r=e}},0)},"mixin.js":function e(t,n,e){let r,i,o,s,a;function u(e){return i(o(e),(function(t){var n=r[t]=e[t];r.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),a(this,n.apply(r,e))}})),r}e.export({default:()=>u}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./functions.js",{default(e){o=e}},2),e.link("./_setup.js",{push(e){s=e}},3),e.link("./_chainResult.js",{default(e){a=e}},4)},"_chainResult.js":function e(t,n,e){let r;function i(e,t){return e._chain?r(t).chain():t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"underscore-array-methods.js":function e(t,n,e){let r,i,o,s;e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./_setup.js",{ArrayProto(e){o=e}},2),e.link("./_chainResult.js",{default(e){s=e}},3),i(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=o[e];r.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),s(this,n)}})),i(["concat","join","slice"],(function(e){var t=o[e];r.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),s(this,e)}})),e.exportDefault(r)}}}}},cachers:{"package.json":function e(t,n,e){e.exports={name:"@steedos/cachers",version:"2.7.11",main:"lib/index.js"}},lib:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCacherNames=n.clearCacher=n.getCacher=void 0;var r={},i=t("./memory"),o=t("./memory-lru"),s=function(e,t){return r[e]||(e.startsWith("lru.")?r[e]=new o.MemoryLRUCacher(t):r[e]=new i.MemoryCacher),r[e]};n.getCacher=s;var a=function(e){r[e]&&r[e].clear()};n.clearCacher=a;var u=function(){return Object.keys(r)};n.getCacherNames=u},"memory.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryCacher=void 0;var r=t("lodash"),i=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.delete=function(e){delete this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.clear=function(){this.cache={}},e.prototype.keys=function(){return(0,r.keys)(this.cache)},e.prototype.values=function(){return(0,r.values)(this.cache)},e}();n.MemoryCacher=i},"memory-lru.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryLRUCacher=void 0;var r=t("lodash"),i=t("lru-cache"),o={max:5e3,ttl:null,keygen:null,maxParamsLength:null},s=function(){function e(e){this.opts=(0,r.defaultsDeep)(e,o),this.cache=new i({max:this.opts.max,maxAge:this.opts.ttl?1e3*this.opts.ttl:null,updateAgeOnGet:!!this.opts.ttl})}return e.prototype.get=function(e){return this.cache.get(e)},e.prototype.set=function(e,t,n){return this.cache.set(e,t,n)},e.prototype.delete=function(e){return this.cache.delete(e)},e.prototype.clear=function(){return this.cache.clear()},e.prototype.keys=function(){return this.cache.keys()},e.prototype.values=function(){return this.cache.values()},e}();n.MemoryLRUCacher=s}},node_modules:{"lru-cache":{"package.json":function e(t,n,e){e.exports={name:"lru-cache",version:"7.14.1",main:"index.js"}},"index.js":function e(t,n,e){const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i="function"==typeof AbortController,o=i?AbortController:class e{constructor(){this.signal=new u}abort(){this.signal.dispatchEvent("abort")}},s="function"==typeof AbortSignal,a="function"==typeof o.AbortSignal,u=s?AbortSignal:a?o.AbortController:class e{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach(e=>e(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},f=new Set,c=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&g(n,`${e} option`,`options.${t}`,_)},l=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} method`,`cache.${t}()`,i)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} property`,`cache.${t}`,i)}},d=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!f.has(e),g=(e,t,n,r)=>{f.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;d(i,"DeprecationWarning",e,r)},b=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),m=e=>b(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=m(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class _{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:h,noUpdateTTL:g,maxSize:v=0,maxEntrySize:w=0,sizeCalculation:k,fetchMethod:j,fetchContext:x,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:D}=e,{length:E,maxAge:A,stale:C}=e instanceof _?{}:e;if(0!==t&&!b(t))throw new TypeError("max option must be a nonnegative integer");const M=t?m(t):Array;if(!M)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=w||this.maxSize,this.sizeCalculation=k||E,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=j||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&void 0!==x)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new M(t),this.prev=new M(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof l?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!S,0!==this.maxEntrySize){if(0!==this.maxSize&&!b(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!b(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!C,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=b(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||A||0,this.ttl){if(!b(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){f.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";d(t,"UnboundedCacheWarning",e,_)}}C&&c("stale","allowStale"),A&&c("maxAge","ttl"),E&&c("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,n=r.now())=>{if(this.starts[e]=0!==t?n:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?r.now():0};let e=0;const t=()=>{const t=r.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const r=this.keyMap.get(n);return void 0===r?0:0===this.ttls[r]||0===this.starts[r]?1/0:this.starts[r]+this.ttls[r]-(e||t())},this.isStale=n=>0!==this.ttls[n]&&0!==this.starts[n]&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!b(n)){if(!r)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!b(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return l("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const n=this.keyList[t],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,s={value:o};if(this.ttls){s.ttl=this.ttls[t];const e=r.now()-this.starts[t];s.start=Math.floor(Date.now()-e)}this.sizes&&(s.size=this.sizes[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),a=!1;else{const n=this.valList[u];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():i||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(u,n,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,n=this.keyList[t],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,n,"evict"),this.disposeAfter&&this.disposed.push([r,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const n=this.keyMap.get(e);return void 0!==n&&!this.isStale(n)&&(t&&this.updateItemAge(n),!0)}peek(e,{allowStale:t=this.allowStale}={}){const n=this.keyMap.get(e);if(void 0!==n&&(t||!this.isStale(n))){const e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const s=new o,a={signal:s.signal,options:n,context:r},u=t=>(s.signal.aborted||this.set(e,t,a.options),t),f=r=>{if(this.valList[t]===l){const r=!n.noDeleteOnFetchRejection||void 0===l.__staleWhileFetching;r?this.delete(e):this.valList[t]=l.__staleWhileFetching}if(l.__returned===l)throw r},c=t=>t(this.fetchMethod(e,i,a)),l=new Promise(c).then(u,f);return l.__abortController=s,l.__staleWhileFetching=i,l.__returned=null,void 0===t?(this.set(e,l,a.options),t=this.keyMap.get(e)):this.valList[t]=l,l}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:c=this.fetchContext,forceRefresh:l=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r});const h={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:u,noDeleteOnFetchRejection:f};let d=this.keyMap.get(e);if(void 0===d){const t=this.backgroundFetch(e,d,h,c);return t.__returned=t}{const r=this.valList[d];if(this.isBackgroundFetch(r))return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r;if(!l&&!this.isStale(d))return this.moveToTail(d),n&&this.updateItemAge(d),r;const i=this.backgroundFetch(e,d,h,c);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(r||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),n&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return l("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const n=this.keyList[e];this.dispose(t,n,"delete"),this.disposeAfter&&this.disposed.push([t,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return l("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=_}}}},"form-builder":{"package.json":function e(t,n,e){e.exports={name:"@steedos/form-builder",version:"3.6.2-patch.5",private:!1,publishConfig:{access:"public"},main:"dist/form-builder.min.js",homepage:"https://formbuilder.online/",repository:{url:"https://github.com/kevinchappell/formBuilder.git",type:"git"},files:["dist/**/*","docs/**/*","src/**/*"],author:"Kevin Chappell ",contributors:[],bugs:"https://github.com/kevinchappell/formBuilder/issues",description:"A jQuery plugin for drag and drop form building",keywords:["jquery-plugin","forms","drag and drop","form builder","form create"],license:"MIT",ignore:["**/*","node_modules","test"],config:{files:{test:["test/**/*.spec.js"],pluginsDir:"src/js/control_plugins/",fonts:"src/fonts",sass:"src/sass",formBuilder:{js:"src/js/form-builder.js",sass:["src/sass/form-builder.scss"]},formRender:{js:"src/js/form-render.js",sass:["src/sass/form-render.scss"]},site:["demo/assets/sass/site.scss"]},fontServer:"http://fontello.com",fontelloToken:"09d648f01d6c57cb9f9b8cc55043e0c0"},babel:{presets:[["@babel/preset-env",{targets:{browsers:["> 1%"]},loose:!0}]],comments:!1,plugins:["@babel/plugin-proposal-object-rest-spread","@babel/plugin-proposal-class-properties"]},scripts:{"build:analyze":"webpack --mode production -p --progress --config tools/webpack.config --analyze","build:plugins":"webpack --mode production -p --display-entrypoints --progress --config tools/webpack.plugins.config","build:vendor":"babel-node tools/build-vendor",build:"webpack --mode production -p --progress --config tools/webpack.config","build:all":"npm-run-all build:plugins build:vendor build copy",copy:"cp -a dist/* demo/assets/js/ && cp CONTRIBUTING.md docs/contributing.md && cp LICENSE docs/license.md && npm run copy:lang","copy:lang":"babel-node tools/copy-language-files","deploy:all":"npm-run-all deploy:demo deploy:site","deploy:demo":"node tools/deploy-demo.js","deploy:site":"node tools/deploy-site.js",docs:"mkdocs build",font:"babel-node tools/icon-font",lint:"eslint ./src --ext .js || true","semantic-release":"semantic-release","start:devServer":"webpack-dev-server --mode development --config tools/webpack.config",prestart:"npm-run-all -p build:vendor copy:lang",start:"npm run start:devServer",test:"npm run-script build"},dependencies:{jquery:">=3.4.1","jquery-ui-sortable":"*"},devDependencies:{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/node":"^7.10.5","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-syntax-object-rest-spread":"^7.8.3","@babel/plugin-transform-destructuring":"^7.10.4","@babel/preset-env":"^7.11.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.5",autoprefixer:"^9.8.6","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","clean-webpack-plugin":"^3.0.0",clui:"^0.3.6","compression-webpack-plugin":"^5.0.1","concat-files":"^0.1.1","cross-env":"^7.0.2","css-loader":"^4.2.1",eslint:"^7.7.0","eslint-loader":"^4.0.2","formbuilder-languages":"latest","fs-extra":"^9.0.1","html-webpack-harddisk-plugin":"^1.0.2","html-webpack-plugin":"^4.3.0",inquirer:"^7.3.3",mi18n:"^0.4.8","node-sass":"6.0.1","npm-run-all":"^4.1.5",opener:"^1.5.1","postcss-loader":"^3.0.0","replace-in-file":"^6.1.0",request:"^2.88.2","sass-loader":"10.5.2","semantic-release":"^17.1.1",semver:"^7.3.2","style-loader":"^1.2.1",unzipper:"^0.10.11",webpack:"^4.44.1","webpack-bundle-analyzer":"^3.8.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","wrapper-webpack-plugin":"^2.1.0"},prettier:{singleQuote:!0,trailingComma:"all",printWidth:120,semi:!1,arrowParens:"avoid",spaceAfterFunction:!1},engines:{},release:{branch:"master",verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},browserslist:["> 1%"]}},dist:{"form-builder.min.js":[]}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",module:"tslib.es6.js",main:"tslib.js"}},"tslib.es6.js":function e(t,n,e){e.export({__extends:()=>i,__assign:()=>o,__rest:()=>s,__decorate:()=>a,__param:()=>u,__metadata:()=>f,__awaiter:()=>c,__generator:()=>l,__createBinding:()=>h,__exportStar:()=>d,__values:()=>p,__read:()=>g,__spread:()=>b,__spreadArrays:()=>m,__spreadArray:()=>v,__await:()=>y,__asyncGenerator:()=>_,__asyncDelegator:()=>w,__asyncValues:()=>k,__makeTemplateObject:()=>j,__importStar:()=>S,__importDefault:()=>D,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>A}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -453,7 +453,7 @@ Package._define("mrt:moment"); Package._define("steedos:loaders-css"); -!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.mongo.Mongo,i=Package.tracker.Tracker,r=Package.tracker.Deps,c=Package.underscore._,a=Package.ejson.EJSON,s=Package.minimongo.LocalCollection,u=Package.minimongo.Minimongo,l;(function(){var e={},n=Package.tracker&&Package.tracker.Tracker||Package.deps.Deps,i=t.isServer&&new t.EnvironmentVariable;if((l={defaults:{before:{insert:{},update:{},remove:{},upsert:{},find:{},findOne:{},all:{}},after:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}},all:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}}},directEnv:new t.EnvironmentVariable,directOp:function t(e){return this.directEnv.withValue(!0,e)},hookedOp:function t(e){return this.directEnv.withValue(!1,e)}}).getUserId=function e(){var o;if(t.isClient&&n.nonreactive((function(){o=t.userId&&t.userId()})),t.isServer){try{o=t.userId&&t.userId()}catch(r){}null==o&&(o=i.get())}return null==o&&(o=l.defaultUserId),o},l.extendCollectionInstance=function n(o,i){c.each(["before","after"],(function(n){c.each(e,(function(e,i){"upsert"===e&&"after"===n||(t._ensure(o,n,i),t._ensure(o,"_hookAspects",i),o._hookAspects[i][n]=[],o[n][i]=function(t,e){var r=o._hookAspects[i][n].push({aspect:t,options:l.initOptions(e,n,i)});return{replace:function(t,e){o._hookAspects[i][n].splice(r-1,1,{aspect:t,options:l.initOptions(e,n,i)})},remove:function(){o._hookAspects[i][n].splice(r-1,1)}}})}))})),o.hookOptions=a.clone(l.defaults),c.each(e,(function(e,n){var r=t.isClient||"upsert"===n?o:o._collection,a=r[n];t._ensure(o,"direct",n),o.direct[n]=function(){var t=arguments;return l.directOp((function(){return i.prototype[n].apply(o,t)}))},r[n]=function(){return!0===l.directEnv.get()?a.apply(r,arguments):e.call(this,l.getUserId(),a,o,"upsert"===n?{insert:o._hookAspects.insert||{},update:o._hookAspects.update||{},upsert:o._hookAspects.upsert||{}}:o._hookAspects[n]||{},(function(t){return c.isFunction(o._transform)?function(e){return o._transform(e||t)}:function(e){return e||t}}),c.toArray(arguments),!1)}}))},l.defineAdvice=function t(n,o){e[n]=o},l.getAdvice=function t(n){return e[n]},l.initOptions=function t(e,n,o){return l.extendOptions(l.defaults,e,n,o)},l.extendOptions=function t(e,n,o,i){return n=c.extend(n||{},e.all.all),n=c.extend(n,e[o].all),n=c.extend(n,e.all[i]),n=c.extend(n,e[o][i])},l.getDocs=function t(e,n,o){var i={transform:null,reactive:!1};return o&&(o.multi||(i.limit=1),c.extend(i,c.omit(o,"multi","upsert"))),e.find(n,i)},l.getFields=function t(e){var n=[],o=["$addToSet","$bit","$currentDate","$inc","$max","$min","$pop","$pull","$pullAll","$push","$rename","$set","$unset"];return c.each(e,(function(t,e){c.contains(o,e)?c.each(c.keys(t),(function(t){-1!==t.indexOf(".")&&(t=t.substring(0,t.indexOf("."))),c.contains(n,t)||n.push(t)})):n.push(e)})),n},l.reassignPrototype=function e(n,i){var r="function"==typeof Object.setPrototypeOf;i||(i=void 0!==o?o.Collection:t.Collection),r?Object.setPrototypeOf(n,i.prototype):n.__proto__&&(n.__proto__=i.prototype)},l.wrapCollection=function t(e,n){n._CollectionConstructor||(n._CollectionConstructor=n.Collection),n._CollectionPrototype||(n._CollectionPrototype=new n.Collection(null));var o=e._NewCollectionContructor||n._CollectionConstructor,i=n._CollectionPrototype;for(var r in e.Collection=function(){var t=o.apply(this,arguments);return l.extendCollectionInstance(this,o),t},e._NewCollectionContructor=e.Collection,e.Collection.prototype=i,e.Collection.prototype.constructor=e.Collection,o)o.hasOwnProperty(r)&&(e.Collection[r]=o[r]);e.Collection.apply=Function.prototype.apply},l.modify=s._modify,void 0!==o?(l.wrapCollection(t,o),l.wrapCollection(o,o)):l.wrapCollection(t,t),t.isServer){var r=t.publish;t.publish=function(t,e,n){return r.call(this,t,(function(){var t=this,n=arguments;return i.withValue(t&&t.userId,(function(){return e.apply(t,n)}))}),n)},l.isWithinPublish=function t(){return void 0!==i.get()}}}).call(this),function(){l.defineAdvice("insert",(function(t,e,n,i,r,s,u){var l=this,f={context:this,_super:e,args:s},p=c.last(s),d=c.isFunction(p),h,v;if(!u)try{if(c.each(i.before,(function(e){var n;!1===e.aspect.call(c.extend({transform:r(s[0])},f),t,s[0])&&(h=!0)})),h)return}catch(m){if(d)return p.call(this,m);throw m}function _(e,n){var l=s[0];if(e&&(c.isObject(e)&&e.ops&&(e=l._id._str?new o.ObjectID(l._id._str.toString()):e.ops&&e.ops[0]&&e.ops[0]._id),(l=a.clone(s[0]))._id=e),!u){var p=c.extend({transform:r(l),_id:e,err:n},f);c.each(i.after,(function(e){e.aspect.call(p,t,l)}))}return e}return d?(s[s.length-1]=function(t,e){return _(e&&e[0]&&e[0]._id||e,t),p.apply(this,arguments)},e.apply(this,s)):_((v=e.apply(this,s))&&v[0]&&v[0]._id||v)}))}.call(this),function(){l.defineAdvice("update",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m,g={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(_=l.getFields(r[1]),h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.after)||(g.mutator=a.clone(r[1]),g.options=a.clone(r[2]),c.some(o.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(g.docs={},c.each(h,(function(t){g.docs[t._id]=a.clone(t)})))),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n,_,r[1],r[2])&&(m=!0)}))})),m)return 0}catch(k){if(d)return p.call(u,k);throw k}function y(e,a){if(!s){if(!c.isEmpty(o.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:g.docs&&g.docs[o._id],affected:e,err:a},f),t,o,p,g.mutator,g.options)}))}))}}if(d)return r[r.length-1]=function(t,e){return y(e,t),p.apply(this,arguments)},e.apply(this,r);var C=e.apply(u,r);return y(C),C}))}.call(this),function(){l.defineAdvice("remove",(function(t,e,n,o,i,r,s){var u=this,f={context:this,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_=[];if(!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(h=l.getDocs.call(this,n,r[0]).fetch()),c.isEmpty(o.after)||c.each(h,(function(t){_.push(a.clone(t))})),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n)&&(v=!0)}))})),v)return 0}catch(y){if(d)return p.call(this,y);throw y}function m(e){s||c.each(o.after,(function(n){c.each(_,(function(o){n.aspect.call(c.extend({transform:i(o),err:e},f),t,o)}))}))}if(d)return r[r.length-1]=function(t){return m(t),p.apply(this,arguments)},e.apply(this,r);var g=e.apply(this,r);return m(),g}))}.call(this),function(){l.defineAdvice("upsert",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s&&(c.isEmpty(o.upsert.before)||(h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.update.after)||c.some(o.update.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(m.mutator=a.clone(r[1]),m.options=a.clone(r[2]),m.docs={},c.each(h,(function(t){m.docs[t._id]=a.clone(t)}))),c.each(o.upsert.before,(function(e){var n;!1===e.aspect.call(f,t,r[0],r[1],r[2])&&(_=!0)})),_))return{numberAffected:0};function g(e,a){if(!s){if(!c.isEmpty(o.update.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.update.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:m.docs&&m.docs[o._id],affected:e,err:a},f),t,o,p,m.mutator,m.options)}))}))}}function y(e,a){if(!s){if(!c.isEmpty(o.insert.after))var p=l.getDocs.call(u,n,{_id:e},r[0],{}).fetch()[0],d=c.extend({transform:i(p),_id:e,err:a},f);c.each(o.insert.after,(function(e){e.aspect.call(d,t,p)}))}}if(d)return r[r.length-1]=function(t,e){return t||e&&e.insertedId?y(e.insertedId,t):g(e&&e.numberAffected,t),l.hookedOp((function(){return p.call(this,t,e)}))},l.directOp((function(){return e.apply(u,r)}));var C=l.directOp((function(){return e.apply(u,r)}));return C&&C.insertedId?y(C.insertedId):g(C&&C.numberAffected),C}))}.call(this),function(){l.defineAdvice("find",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),!a&&(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),f))return n.find(void 0);function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}return p(l=e.apply(this,r)),l}))}.call(this),function(){l.defineAdvice("findOne",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),a||(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),!f))return p(l=e.apply(this,r)),l;function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}}))}.call(this),function(){if(t.users){l.reassignPrototype(t.users);var e=void 0!==o&&void 0!==o.Collection?o.Collection:t.Collection;l.extendCollectionInstance(t.users,e)}}.call(this),Package._define("matb33:collection-hooks",{CollectionHooks:l})}(); +!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.mongo.Mongo,i=Package.tracker.Tracker,r=Package.tracker.Deps,c=Package.underscore._,a=Package.ejson.EJSON,s=Package.minimongo.LocalCollection,u=Package.minimongo.Minimongo,l,f;(function(){var e={},n=Package.tracker&&Package.tracker.Tracker||Package.deps.Deps,i=t.isServer&&new t.EnvironmentVariable;if((l={defaults:{before:{insert:{},update:{},remove:{},upsert:{},find:{},findOne:{},all:{}},after:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}},all:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}}},directEnv:new t.EnvironmentVariable,directOp:function t(e){return this.directEnv.withValue(!0,e)},hookedOp:function t(e){return this.directEnv.withValue(!1,e)}}).getUserId=function e(){var o;if(t.isClient&&n.nonreactive((function(){o=t.userId&&t.userId()})),t.isServer){try{o=t.userId&&t.userId()}catch(r){}null==o&&(o=i.get())}return null==o&&(o=l.defaultUserId),o},l.extendCollectionInstance=function n(o,i){c.each(["before","after"],(function(n){c.each(e,(function(e,i){"upsert"===e&&"after"===n||(t._ensure(o,n,i),t._ensure(o,"_hookAspects",i),o._hookAspects[i][n]=[],o[n][i]=function(t,e){var r=o._hookAspects[i][n].push({aspect:t,options:l.initOptions(e,n,i)});return{replace:function(t,e){o._hookAspects[i][n].splice(r-1,1,{aspect:t,options:l.initOptions(e,n,i)})},remove:function(){o._hookAspects[i][n].splice(r-1,1)}}})}))})),o.hookOptions=a.clone(l.defaults),c.each(e,(function(e,n){var r=t.isClient||"upsert"===n?o:o._collection,a=r[n];t._ensure(o,"direct",n),o.direct[n]=function(){var t=arguments;return l.directOp((function(){return i.prototype[n].apply(o,t)}))},r[n]=function(){return!0===l.directEnv.get()?a.apply(r,arguments):e.call(this,l.getUserId(),a,o,"upsert"===n?{insert:o._hookAspects.insert||{},update:o._hookAspects.update||{},upsert:o._hookAspects.upsert||{}}:o._hookAspects[n]||{},(function(t){return c.isFunction(o._transform)?function(e){return o._transform(e||t)}:function(e){return e||t}}),c.toArray(arguments),!1)}}))},l.defineAdvice=function t(n,o){e[n]=o},l.getAdvice=function t(n){return e[n]},l.initOptions=function t(e,n,o){return l.extendOptions(l.defaults,e,n,o)},l.extendOptions=function t(e,n,o,i){return n=c.extend(n||{},e.all.all),n=c.extend(n,e[o].all),n=c.extend(n,e.all[i]),n=c.extend(n,e[o][i])},l.getDocs=function t(e,n,o){var i={transform:null,reactive:!1};return o&&(o.multi||(i.limit=1),c.extend(i,c.omit(o,"multi","upsert"))),e.find(n,i)},l.getFields=function t(e){var n=[],o=["$addToSet","$bit","$currentDate","$inc","$max","$min","$pop","$pull","$pullAll","$push","$rename","$set","$unset"];return c.each(e,(function(t,e){c.contains(o,e)?c.each(c.keys(t),(function(t){-1!==t.indexOf(".")&&(t=t.substring(0,t.indexOf("."))),c.contains(n,t)||n.push(t)})):n.push(e)})),n},l.reassignPrototype=function e(n,i){var r="function"==typeof Object.setPrototypeOf;i||(i=void 0!==o?o.Collection:t.Collection),r?Object.setPrototypeOf(n,i.prototype):n.__proto__&&(n.__proto__=i.prototype)},l.wrapCollection=function t(e,n){n._CollectionConstructor||(n._CollectionConstructor=n.Collection),n._CollectionPrototype||(n._CollectionPrototype=new n.Collection(null));var o=e._NewCollectionContructor||n._CollectionConstructor,i=n._CollectionPrototype;for(var r in e.Collection=function(){var t=o.apply(this,arguments);return l.extendCollectionInstance(this,o),t},e._NewCollectionContructor=e.Collection,e.Collection.prototype=i,e.Collection.prototype.constructor=e.Collection,o)o.hasOwnProperty(r)&&(e.Collection[r]=o[r]);e.Collection.apply=Function.prototype.apply},l.modify=s._modify,void 0!==o?(l.wrapCollection(t,o),l.wrapCollection(o,o)):l.wrapCollection(t,t),t.isServer){var r=t.publish;t.publish=function(t,e,n){return r.call(this,t,(function(){var t=this,n=arguments;return i.withValue(t&&t.userId,(function(){return e.apply(t,n)}))}),n)},l.isWithinPublish=function t(){return void 0!==i.get()}}}).call(this),function(){l.defineAdvice("insert",(function(t,e,n,i,r,s,u){var l=this,f={context:this,_super:e,args:s},p=c.last(s),d=c.isFunction(p),h,v;if(!u)try{if(c.each(i.before,(function(e){var n;!1===e.aspect.call(c.extend({transform:r(s[0])},f),t,s[0])&&(h=!0)})),h)return}catch(m){if(d)return p.call(this,m);throw m}function _(e,n){var l=s[0];if(e&&(c.isObject(e)&&e.ops&&(e=l._id._str?new o.ObjectID(l._id._str.toString()):e.ops&&e.ops[0]&&e.ops[0]._id),(l=a.clone(s[0]))._id=e),!u){var p=c.extend({transform:r(l),_id:e,err:n},f);c.each(i.after,(function(e){e.aspect.call(p,t,l)}))}return e}return d?(s[s.length-1]=function(t,e){return _(e&&e[0]&&e[0]._id||e,t),p.apply(this,arguments)},e.apply(this,s)):_((v=e.apply(this,s))&&v[0]&&v[0]._id||v)}))}.call(this),function(){l.defineAdvice("update",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m,g={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(_=l.getFields(r[1]),h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.after)||(g.mutator=a.clone(r[1]),g.options=a.clone(r[2]),c.some(o.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(g.docs={},c.each(h,(function(t){g.docs[t._id]=a.clone(t)})))),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n,_,r[1],r[2])&&(m=!0)}))})),m)return 0}catch(k){if(d)return p.call(u,k);throw k}function y(e,a){if(!s){if(!c.isEmpty(o.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:g.docs&&g.docs[o._id],affected:e,err:a},f),t,o,p,g.mutator,g.options)}))}))}}if(d)return r[r.length-1]=function(t,e){return y(e,t),p.apply(this,arguments)},e.apply(this,r);var C=e.apply(u,r);return y(C),C}))}.call(this),function(){l.defineAdvice("remove",(function(t,e,n,o,i,r,s){var u=this,f={context:this,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_=[];if(!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(h=l.getDocs.call(this,n,r[0]).fetch()),c.isEmpty(o.after)||c.each(h,(function(t){_.push(a.clone(t))})),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n)&&(v=!0)}))})),v)return 0}catch(y){if(d)return p.call(this,y);throw y}function m(e){s||c.each(o.after,(function(n){c.each(_,(function(o){n.aspect.call(c.extend({transform:i(o),err:e},f),t,o)}))}))}if(d)return r[r.length-1]=function(t){return m(t),p.apply(this,arguments)},e.apply(this,r);var g=e.apply(this,r);return m(),g}))}.call(this),function(){l.defineAdvice("upsert",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s&&(c.isEmpty(o.upsert.before)||(h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.update.after)||c.some(o.update.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(m.mutator=a.clone(r[1]),m.options=a.clone(r[2]),m.docs={},c.each(h,(function(t){m.docs[t._id]=a.clone(t)}))),c.each(o.upsert.before,(function(e){var n;!1===e.aspect.call(f,t,r[0],r[1],r[2])&&(_=!0)})),_))return{numberAffected:0};function g(e,a){if(!s){if(!c.isEmpty(o.update.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.update.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:m.docs&&m.docs[o._id],affected:e,err:a},f),t,o,p,m.mutator,m.options)}))}))}}function y(e,a){if(!s){if(!c.isEmpty(o.insert.after))var p=l.getDocs.call(u,n,{_id:e},r[0],{}).fetch()[0],d=c.extend({transform:i(p),_id:e,err:a},f);c.each(o.insert.after,(function(e){e.aspect.call(d,t,p)}))}}if(d)return r[r.length-1]=function(t,e){return t||e&&e.insertedId?y(e.insertedId,t):g(e&&e.numberAffected,t),l.hookedOp((function(){return p.call(this,t,e)}))},l.directOp((function(){return e.apply(u,r)}));var C=l.directOp((function(){return e.apply(u,r)}));return C&&C.insertedId?y(C.insertedId):g(C&&C.numberAffected),C}))}.call(this),function(){l.defineAdvice("find",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),!a&&(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),f))return n.find(void 0);function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}return p(l=e.apply(this,r)),l}))}.call(this),function(){l.defineAdvice("findOne",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),a||(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),!f))return p(l=e.apply(this,r)),l;function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}}))}.call(this),function(){if(t.users){l.reassignPrototype(t.users);var e=void 0!==o&&void 0!==o.Collection?o.Collection:t.Collection;l.extendCollectionInstance(t.users,e)}}.call(this),Package._define("matb33:collection-hooks",{CollectionHooks:l})}(); Package._define("steedos:smsqueue"); @@ -662,7 +662,7 @@ Package._define("steedos:qcloud-smsqueue"); !function(){var e=Package.meteor.Meteor,t=Package.meteor.global,o=Package.meteor.meteorEnv,r=Package["reactive-var"].ReactiveVar,a=Package["reactive-dict"].ReactiveDict,n=Package.random.Random,s=Package["ddp-client"].DDP,c=Package.check.check,i=Package.check.Match,u=Package.underscore._,d=Package.tracker.Tracker,l=Package.tracker.Deps,f=Package.session.Session,p=Package["aldeed:simple-schema"].SimpleSchema,g=Package["aldeed:simple-schema"].MongoObject,m=Package["aldeed:tabular"].Tabular,b=Package["matb33:collection-hooks"].CollectionHooks,k=Package["meteorhacks:subs-manager"].SubsManager,v=Package["universe:i18n"]._i18n,_=Package["universe:i18n"].i18n,P=Package.modules.meteorInstall,j=Package.promise.Promise,h=Package["aldeed:collection2-core"].Collection2,y=Package.mongo.Mongo,C,S;P({node_modules:{meteor:{"steedos:object-database":{client:{"subscribe.coffee":function t(){var o=C="object"==typeof C?C:{},a,n,s,c,i,l,p,g,m,b,v,_,P;P=new k,Creator._subApp=new r({}),v=null,b=function(){return v&&clearTimeout(v),v=setTimeout((function(){return Creator.loadAppsMenus(),v=null}),5e3)},m=null,g=[],p=function(t){return m&&clearTimeout(m),g.push(t),m=e.setTimeout((function(){return c(g,(function(e){if(e&&e.objects)return u.each(e.objects,(function(e){var t,o;if(u.size(e.fields)>0){delete Creator._recordSafeObjectCache[e.name];try{(o=Creator.getObject(e.name))&&(e=u.extend(e,{list_views:o.list_views}))}catch(r){t=r,console.error(t)}return Creator.Objects[e.name]=e,Creator.loadObjects(e),Creator.deps.object.changed()}}))}))}),5e3)},a=function(e){if(b(),Creator.Apps[e.code]=e,Creator._subApp.set(Object.assign(e,{_id:e.code})),f.get("app_id")===e._id)return Creator.deps.app.changed()},n=function(e,t){var o;if((Steedos.isSpaceAdmin()||e.is_enable)&&(Steedos.isSpaceAdmin()||"0"===e.in_development)){SteedosUI.reloadObject(e.name),b(),p(e.name);try{if(t&&e&&t.name!==e.name)return l(t)}catch(r){return o=r,console.error(o)}}},l=function(e){var t;return t=u.findWhere(Creator.objectsByName,{_id:e._id}),Creator.removeObject(null!=t?t.name:void 0),f.get("object_name")===(null!=t?t.name:void 0)&&FlowRouter.go("/"),Creator.deps.object.changed()},i=function(e){if(delete Creator.Apps[e.code],Creator._subApp.set(Object.assign({},e,{visible:!1,_id:e.code})),f.get("app_id")===e.code||f.get("app_id")===e._id)return f.set("app_id",null),FlowRouter.go("/")},_=function(){return Setup.bootstrap(Steedos.getSpaceId()),e.setTimeout((function(){return Creator.deps.object.changed()}),3e3)},s=function(t,o){var r;if(t&&u.isString(t))return r=f.get("spaceId"),$.ajax({type:"get",url:Steedos.absoluteUrl("/api/bootstrap/"+r+"/"+t),dataType:"json",beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken())},error:function(e,t,o){var r;return r=e.responseJSON,console.error(r),(null!=r?r.reason:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.reason)):void 0:(null!=r?r.message:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(r):void 0},success:function(e){if(u.isFunction(o))return o(e)}})},c=function(t,o){var r;if((t=u.compact(u.uniq(t)))&&u.isArray(t)&&!u.isEmpty(t))return r=f.get("spaceId"),$.ajax({type:"get",url:Steedos.absoluteUrl("/api/bootstrap/"+r+"/"+t.join(",")),dataType:"json",beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken())},error:function(e,t,o){var r;return r=e.responseJSON,console.error(r),(null!=r?r.reason:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.reason)):void 0:(null!=r?r.message:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(r):void 0},success:function(e){if(u.isFunction(o))return o(e)}}),d.autorun((function(e){var t;if(Creator.bootstrapLoaded.get())return t=!1,Creator.getCollection("apps").find({is_creator:!0}).observe({added:function(e){if(t)return a(e)},changed:function(e,o){if(t)return a(e)},removed:function(e){if(t)return i(e)}}),t=!0}))}}}}}}},{extensions:[".js",".json",".coffee"]})("/node_modules/meteor/steedos:object-database/client/subscribe.coffee"),Package._define("steedos:object-database")}(); -Package._define("steedos:mailqueue"); +!function(){var e,a;Package._define("steedos:mailqueue")}(); Package._define("steedos:webhookqueue"); @@ -728,7 +728,7 @@ Package._define("steedos:instance-record-queue"); !function(){var e=Package.meteor.Meteor,o=Package.meteor.global,n=Package.meteor.meteorEnv,s=Package["reactive-var"].ReactiveVar,a=Package["reactive-dict"].ReactiveDict,l=Package.random.Random,r=Package["ddp-client"].DDP,i=Package.check.check,c=Package.check.Match,d=Package.underscore._,u=Package.tracker.Tracker,f=Package.tracker.Deps,m=Package.session.Session,p=Package.blaze.Blaze,_=Package.blaze.UI,w=Package.blaze.Handlebars,b=Package["templating-runtime"].Template,k=Package["aldeed:simple-schema"].SimpleSchema,g=Package["aldeed:simple-schema"].MongoObject,h=Package["kadira:flow-router"].FlowRouter,v=Package["aldeed:tabular"].Tabular,y=Package["steedos:base"].Selector,I=Package["steedos:base"].Steedos,D=Package["steedos:base"].AjaxCollection,T=Package["steedos:base"].SteedosDataManager,F=Package["steedos:base"].SteedosOffice,S=Package["steedos:base"].Modal,V=Package["universe:i18n"]._i18n,j=Package["universe:i18n"].i18n,P=Package.promise.Promise,C=Package.modules.meteorInstall,O=Package.htmljs.HTML,x=Package["aldeed:collection2-core"].Collection2,A=Package["steedos:cfs-base-package"].FS,R=Package.spacebars.Spacebars,E=Package.mongo.Mongo,U,N=C({node_modules:{meteor:{"steedos:app-workflow":{"core.coffee":function o(){var n=U="object"==typeof U?U:{};this.WorkflowCore={},e.isClient&&(WorkflowCore.openFlowDesign=function(o,n,s,a){var l,r,i,c,d;return d="/applications/designer/current/"+o.toLocaleLowerCase()+"/?spaceId="+n,s&&(d=d+"&flowId="+s),a&&!Creator.isSpaceAdmin(n,e.userId())&&(d=d+"&companyId="+a),d=encodeURIComponent(I.absoluteUrl(d)),c=""+t("Workflow Designer"),s&&(l=null!=(i=db.flows.findOne(s))?i.name:void 0)&&(c=l+" | "+c),r="/api/workflow/designer?url="+d+"&title="+(c=encodeURIComponent(c)),I.openWindow(I.absoluteUrl(r))},WorkflowCore.openFormDesign=function(t,e,o,n){return S.show("formDesign",{formId:o},{keyboard:!1,backdrop:"static"})},e.startup((function(){return $(document).keydown((function(t){if("13"===t.keyCode||"Enter"===t.key){if(1!==$(".flow-modal").length)return;if(("TEXTAREA"!==t.target.tagName||$(t.target).closest("div").hasClass("bootstrap-tagsinput"))&&1===$(".flow-modal").length)return $(".flow-modal .btn-confirm").click()}}))}))),e.isServer&&(WorkflowCore.checkCreatePermissions=function(t,e,o){return!o||0!==Creator.getCollection("company").find({_id:o,space:t}).count()})},client:{"template.new_flow_modal.js":function t(){b.__checkName("new_flow_modal"),b.new_flow_modal=new b("Template.new_flow_modal",(function(){var t=this;return O.DIV({class:"modal fade creator-modal flow-modal new-flow-modal",id:"newFlowModal"},"\n\t\t",O.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",O.DIV({class:"slds-modal__container"},"\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t

\n\t\t\t\t\t\t

新建流程

\n\t\t\t\t\t\n\t\t\t\t
'),"\n\n\t\t\t\t",O.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t",p._TemplateWith((function(){return{schema:R.call(t.lookup("schema")),id:R.call("newFlowForm")}}),(function(){return R.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t",p.Each((function(){return R.call(t.lookup("fields"))}),(function(){return["\n\t\t\t\t\t\t",O.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t",O.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t",O.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:R.call(t.lookup("."))}}),(function(){return R.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"]}))})),"\n\t\t\t"),"\n\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
'),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"new_flow_modal.coffee":function t(){var o=U="object"==typeof U?U:{},n;n=["category","name","company_id","object_name"],b.new_flow_modal.helpers({schema:function(){var t,e,o,s;return s={},o=Creator.getObject("flows"),t=new k(Creator.getObjectSchema(o)),e=t._schema,d.each(n,(function(t){if(s[t]=e[t],s[t].autoform&&(s[t].autoform.readonly=!1,s[t].autoform.disabled=!1),"name"===t)return s[t].optional=!1})),new k(s)},fields:function(){return n}}),b.new_flow_modal.events({"click .btn-confirm":function(t,o){var n,s,a,l,r;return t.currentTarget.disabled=!0,AutoForm.validateField("newFlowForm")?(a=AutoForm.getFormValues("newFlowForm").insertDoc,l={id:r=Creator.getCollection("flows")._makeNewID(),name:a.name,space:I.getSpaceId(),is_valid:!0,app:"workflow",current:{id:Creator.getCollection("flows")._makeNewID()}},a.category&&(l.category=a.category),(n=a.company_id)&&(l.company_id=n),a.object_name&&(l.object_name=a.object_name),s={Forms:[l]},$.ajax({type:"post",url:I.absoluteUrl("/am/forms?sync_token="+(new Date).getTime()/1e3),data:JSON.stringify(s),dataType:"json",contentType:"application/json",crossDomain:!0,headers:{"x-user-id":e.userId(),"x-auth-token":Accounts._storedLoginToken()},beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken()),t.setRequestHeader("x-user-id",e.userId()),t.setRequestHeader("x-auth-token",Accounts._storedLoginToken())},success:function(t){var e,n;return console.log(t),e=t.ChangeSet.inserts.Flows,(n=d.find(e,(function(t){return t.form===r}))).object_name||WorkflowCore.openFlowDesign(I.locale(),n.space,n._id,Creator.getUserCompanyId()),h.go("/app/admin/flows/view/"+n._id),S.hide(o)},error:function(e,o,n){return toastr.error(e.responseText),t.currentTarget.disabled=!1,console.error(n)}})):(t.currentTarget.disabled=!1,!1)}})},design:{"template.form_design.js":function t(){b.__checkName("formDesign"),b.formDesign=new b("Template.formDesign",(function(){var t=this;return O.DIV({class:"modal fade creator-modal flow-modal new-flow-modal",id:"newFlowModal"},"\n\t\t",O.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",O.DIV({class:"slds-modal__container"},"\n\t\t\t\t\t",R.With((function(){return R.call(t.lookup("form"))}),(function(){return["\n\t\t\t\t\t\t",O.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t\t\t",O.H2({class:"title slds-text-heading--medium"},"\n\t\t\t\t\t\t\t\t",O.H2({class:"slds-text-heading--medium"},"编辑表单:",p.View("lookup:name",(function(){return R.mustache(t.lookup("name"))}))),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\n\t\t\t\t\t\t",O.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t\t\t\t",p._TemplateWith((function(){return{form:R.call(t.lookup("."))}}),(function(){return R.include(t.lookupTemplate("formBuilder"))})),"\n\t\t\t\t\t\t"),"\n\n\t\t\t\t\t\t",O.FOOTER({class:"slds-modal__footer"},"\n\t\t\t\t\t\t\t",O.BUTTON({type:"submit",class:"slds-button slds-button_brand btn-confirm"},"确定"),"\n\t\t\t\t\t\t\t",O.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"form_design.coffee":function t(){var o=U="object"==typeof U?U:{};b.formDesign.helpers({form:function(){return Creator.odata.get("forms",b.instance().data.formId)}}),b.formDesign.events({"click .btn-confirm":function(t,o){var n,s,a,l,r;if(console.log("click .btn-confirm"),n=$("#fb-editor").data("formBuilder").actions.getData(),a=Creator.formBuilder.transformFormFieldsOut(n),r=Creator.formBuilder.validateFormFields(a))return delete(s=Creator.odata.get("forms",o.data.formId)).historys,s.current.fields=a,l=I.absoluteUrl("/am/forms?sync_token="+(new Date).getTime()/1e3),n={},s.id=s._id,n.Forms=[s],$.ajax({type:"put",url:l,data:JSON.stringify(n),dataType:"json",contentType:"application/json",processData:!1,beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken())},success:function(t){return toastr.success("修改成功"),S.hide(o)},error:function(t,e,o){var n;return 504===t.status?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__("连接超时,请稍后再试")):void 0:t.responseJSON?(n=t.responseJSON.error,console.error(n),n.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(n.reason)):void 0:n.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(n.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(n):void 0):"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t.responseText):void 0}})}})}},"template.admin_import_flow_modal.js":function t(){b.__checkName("admin_import_flow_modal"),b.admin_import_flow_modal=new b("Template.admin_import_flow_modal",(function(){var t=this;return O.DIV({class:"modal fade creator-modal flow-modal new-flow-modal",id:"newFlowModal"},"\n\t\t",O.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",O.DIV({class:"slds-modal__container"},"\n\t\t\t\t",O.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t",O.H2({class:"title slds-text-heading--medium"},"\n\t\t\t\t\t\t",O.H2({class:"slds-text-heading--medium"},p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"workflow_import_flow")}))),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\n\t\t\t\t",O.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t\t",O.DIV({class:"form-group slds-form-element",style:"padding: 0 .75rem;"},"\n\t\t\t\t\t\t",O.Raw(''),"\n\t\t\t\t\t\t",O.DIV({class:"import-files"},"\n\t\t\t\t\t\t\t",O.DIV("\n\t\t\t\t\t\t\t\t",O.DIV({class:"btn btn-default js-af-select-file",style:"width: 100%"},"\n\t\t\t\t\t\t\t\t\t",O.INPUT({type:"file",name:"importFlowFile",id:"importFlowFile",multiple:function(){return p.Unless((function(){return R.call(t.lookup("isUpgrade"))}),(function(){return"multiple"}))},accept:".json,.JSON"}),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",O.Raw(''),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t",O.Raw(''),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",p.Unless((function(){return R.call(t.lookup("isUpgrade"))}),(function(){return["\n\t\t\t\t\t",p._TemplateWith((function(){return{schema:R.call(t.lookup("schema")),id:R.call("importFlowForm")}}),(function(){return R.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t\t",p.Each((function(){return R.call(t.lookup("fields"))}),(function(){return["\n\t\t\t\t\t\t\t",O.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t\t",O.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t",O.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:R.call(t.lookup("."))}}),(function(){return R.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"]})),"\n\t\t\t\t\t"]}))})),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
'),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"admin_import_flow_modal.coffee":function e(){var o=U="object"==typeof U?U:{},n,s;n=["company_id"],b.admin_import_flow_modal.helpers({spaceId:function(){return m.get("spaceId")},schema:function(){var t,e,o,s;return s={},o=Creator.getObject("flows"),t=new k(Creator.getObjectSchema(o)),e=t._schema,d.each(n,(function(t){if(s[t]=e[t],s[t].autoform)return s[t].autoform.readonly=!1,s[t].autoform.disabled=!1})),new k(s)},fields:function(){return n},isUpgrade:function(){return!!this.flowId}}),s=function(t,e){var o;if(o=[],d.each(d.keys(t),(function(e){var n,s;return s=t[e].new_flows,n=[],d.each(s,(function(t){return n.push("查看流程")})),o.push("

"+e+": "+n.join("")+"

")})),o.length>0)return $(".help-block",e.find(".import-files")).append("

导入成功的文件("+o.length+"条):

"+o.join("")+"
")},b.admin_import_flow_modal.events({"change #importFlowFile,#importFlowForm":function(t,e){return $(e.find(".btn-confirm")).prop("disabled",!1)},"click .btn-confirm":function(e,o){var n,a,l,r,i,c,u,f,p,_,w;if(!(r=AutoForm.getCurrentDataForForm("importFlowForm"))||AutoForm.validateForm("importFlowForm")){if(n=null!=(u=AutoForm.getFormValues("importFlowForm"))&&null!=(f=u.insertDoc)?f.company_id:void 0,0!==(l=(a=$("#importFlowFile")[0].files).length)){for(i=new FormData,_="api/workflow/import/form?space="+m.get("spaceId"),n&&(_=_+"&company_id="+n),o.data.flowId&&(_=_+"&flowId="+o.data.flowId),$(o.find(".btn-confirm")).prop("disabled",!0),w=c=0,p=l-1;0<=p?c<=p:c>=p;w=0<=p?++c:--c)i.append("file-"+w,a[w]);return $(".help-block",o.find(".import-files")).html(""),$.ajax({type:"POST",url:I.absoluteUrl(_),processData:!1,contentType:!1,data:i,dataType:"json",success:function(e){var n,a,l,r;return console.log("data",e),n=e.multiple,r=e.success,o.data.flowId||toastr.success(t("workflow_import_flow_success")),n?s(r,o):(S.hide(o),d.isFunction(o.data.onSuccess)?(a=null!=(l=r[d.keys(r)[0]])?l.new_flows:void 0,o.data.onSuccess(a)):void 0)},error:function(e){var n,a,l,r;return(l=e.responseJSON.multiple)&&(n=e.responseJSON.fail,r=e.responseJSON.success,s(r,o),a=[],d.each(d.keys(n),(function(t){return a.push("

"+t+": "+n[t]+"

")})),$(".help-block",o.find(".import-files")).append("

导入失败的文件("+a.length+"条):

"+a.join("")+"
")),e.responseJSON.fail?(n=e.responseJSON.fail,d.each(n,(function(e,o){return d.isString(e)?toastr.error(e,o):toastr.error(t(e.reason,e.details),o)}))):toastr.error(t("workflow_import_flow_error")),console.error(e)}})}toastr.warning(t("workflow_import_flow_info"))}}})},"template.copy_flow_modal.js":function t(){b.__checkName("copy_flow_modal"),b.copy_flow_modal=new b("Template.copy_flow_modal",(function(){var t=this;return O.DIV({class:"modal fade creator-modal flow-modal copy-flow-modal",id:"newFlowModal"},"\n\t\t",O.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",O.DIV({class:"slds-modal__container"},"\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t

\n\t\t\t\t\t\t

复制流程

\n\t\t\t\t\t\n\t\t\t\t
'),"\n\n\t\t\t\t",O.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t",p._TemplateWith((function(){return{schema:R.call(t.lookup("schema")),id:R.call(t.lookup("formId"))}}),(function(){return R.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t",p.Each((function(){return R.call(t.lookup("fields"))}),(function(){return["\n\t\t\t\t\t\t",O.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t",O.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t",O.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:R.call(t.lookup("."))}}),(function(){return R.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"]}))})),"\n\t\t\t"),"\n\n\t\t\t\t",O.Raw('
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
'),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"copy_flow_modal.coffee":function o(){var n=U="object"==typeof U?U:{},s,a;s=["name","company_id"],a="copyFlowForm",b.copy_flow_modal.helpers({formId:function(){return a},schema:function(){var t,e,o,n;return n={},o=Creator.getObject("flows"),t=new k(Creator.getObjectSchema(o)),e=t._schema,d.each(s,(function(t){if(n[t]=e[t],n[t].autoform)return n[t].autoform.readonly=!1,n[t].autoform.disabled=!1})),new k(n)},fields:function(){return s}}),b.copy_flow_modal.events({"click .btn-confirm":function(o,n){var s,l;return o.currentTarget.disabled=!0,AutoForm.validateField(a)?(s=AutoForm.getFormValues(a).insertDoc,l=n.data.record_id,e.call("flow_copy",I.spaceId(),l,s,(function(e,o){return e?toastr.error("error"):(toastr.success(t("workflow_copy_flow_success")),S.hide(n),d.isFunction(n.data.onSuccess)?n.data.onSuccess(o):void 0)}))):(o.currentTarget.disabled=!1,!1)}})},views:{flow:{"template.distribute_edit_flow_modal.js":function t(){b.__checkName("distribute_edit_flow_modal"),b.distribute_edit_flow_modal=new b("Template.distribute_edit_flow_modal",(function(){var t=this;return O.DIV({class:"modal fade",id:"distribute_edit_flow_modal"},"\n\t\t",O.DIV({class:"modal-dialog modal-lg modal-body-zoom",role:"document"},"\n\t\t\t",O.DIV({class:"modal-content ins-modal"},"\n\t\t\t\t",O.DIV({class:"modal-header"},"\n\t\t\t\t\t",O.Raw(''),"\n\t\t\t\t\t",O.H4({class:"modal-title"},"\n\t\t\t\t\t\t",p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"Edit")})),":",O.Raw(" "),p.View("lookup:flow.name",(function(){return R.mustache(R.dot(t.lookup("flow"),"name"))})),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\n\t\t\t\t",O.DIV({class:"modal-body",style:"overflow-y:auto"},"\n\t\t\t\t\t",O.DIV({class:"form-group"},"\n\t\t\t\t\t\t",O.LABEL({for:"distribute_edit_flow_select_users",class:"control-label"},p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"distribute_edit_flow_select_users")}))),"\n\t\t\t\t\t\t",p._TemplateWith((function(){return R.call(t.lookup("user_context"))}),(function(){return R.include(t.lookupTemplate("afSelectUser"))})),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",O.DIV({class:"form-group"},"\n\t\t\t\t\t\t",O.DIV({class:"checkbox"},"\n\t\t\t\t\t\t\t",O.LABEL(O.INPUT({type:"checkbox",id:"distribute_to_self",checked:function(){return p.If((function(){return R.call(t.lookup("to_self"))}),(function(){return"checked"}))}}),O.Raw(" "),p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"distribute_to_self")}))),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",O.DIV({class:"checkbox"},"\n\t\t\t\t\t\t\t",O.LABEL(O.INPUT({type:"checkbox",id:"distribute_end_notification",checked:function(){return p.If((function(){return R.call(t.lookup("end_notification"))}),(function(){return"checked"}))}}),O.Raw(" "),p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"distribute_end_notification")}))),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",O.DIV({class:"checkbox"},"\n\t\t\t\t\t\t\t",O.LABEL(O.INPUT({type:"checkbox",id:"upload_after_being_distributed",checked:function(){return p.If((function(){return R.call(t.lookup("upload_after_being_distributed"))}),(function(){return"checked"}))}}),O.Raw(" "),p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"flows_upload_after_being_distributed")}))),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",p.Each((function(){return R.call(t.lookup("allow_distribute_steps"))}),(function(){return["\n\t\t\t\t\t\t",O.DIV({class:"form-group"},"\n\t\t\t\t\t\t\t",O.LABEL({class:"control-label"},p.View("lookup:name",(function(){return R.mustache(t.lookup("name"))}))),"\n\t\t\t\t\t\t\t",p._TemplateWith((function(){return{id:R.call(R.dataMustache(t.lookup("_id"))),schema:R.call(t.lookup("schema")),doc:R.call(R.dataMustache(t.lookup("flows_doc"),t.lookup("distribute_optional_flows"))),type:R.call("update"),autosave:R.call(!1),placeholder:R.call(R.dataMustache(t.lookup("_"),"distribute_edit_flow_select_flows"))}}),(function(){return R.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:R.call("distribute_flows"),multiple:R.call(!0)}}),(function(){return R.include(t.lookupTemplate("afFieldInput"))})),"\n\t\t\t\t\t\t\t"]}))})),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\t\t\t\t",O.DIV({class:"modal-footer"},"\n\t\t\t\t\t",O.BUTTON({type:"button",class:"btn btn-primary",id:"distribute_edit_flow_modal_ok"},p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"OK")}))),"\n\t\t\t\t\t",O.BUTTON({type:"button",class:"btn btn-default","data-dismiss":"modal"},p.View("lookup:_",(function(){return R.mustache(t.lookup("_"),"Cancel")}))),"\n\t\t\t\t"),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"distribute_edit_flow_modal.coffee":function o(){var n=U="object"==typeof U?U:{};b.distribute_edit_flow_modal.helpers({user_context:function(){var t,e,o,n,s,a,l;return s=(null!=(e=this.flow)?e.distribute_optional_users:void 0)||[],a=d.pluck(s,"id"),o=T.getFormulaUserObjects(m.get("spaceId"),a),l=[],o.forEach((function(t){if(t)return l.push(t)})),n=d.pluck(l,"id"),t={value:l,dataset:{showOrg:!0,multiple:!0,values:n.toString()},name:"distribute_edit_flow_select_users",atts:{name:"distribute_edit_flow_select_users",id:"distribute_edit_flow_select_users",class:"selectUser form-control"}}},allow_distribute_steps:function(){return this.flow?d.where(this.flow.current.steps,{allowDistribute:!0}):new Array},flows_doc:function(t){return{distribute_flows:t}},schema:function(){var t;return t=new k({distribute_flows:{type:[String],optional:!0,autoform:{type:"universe-select",afFieldInput:{multiple:!0,optionsMethod:"get_distribute_flows",optionsMethodParams:JSON.stringify({spaceId:m.get("spaceId")})}}}})},to_self:function(){var t;return null!=(t=this.flow)?t.distribute_to_self:void 0},end_notification:function(){var t;return null!=(t=this.flow)?t.distribute_end_notification:void 0},upload_after_being_distributed:function(){var t;return null!=(t=this.flow)?t.upload_after_being_distributed:void 0}}),b.distribute_edit_flow_modal.events({"click #distribute_edit_flow_modal_ok":function(o,n){var s,a,l,r,i;return l=(r=$("#distribute_edit_flow_select_users")[0].dataset.values)?r.split(","):[],a=n.data.flow._id,s=d.where(n.data.flow.current.steps,{allowDistribute:!0}),i=new Array,console.log("allow_distribute_steps",s),d.each(s,(function(t){return i.push({_id:t._id,distribute_optional_flows:AutoForm.getFieldValue("distribute_flows",t._id)})})),$("body").addClass("loading"),e.call("update_distribute_settings",a,l,i,$("#distribute_to_self")[0].checked,$("#distribute_end_notification")[0].checked,$("#upload_after_being_distributed")[0].checked,(function(e,o){$("body").removeClass("loading"),e&&toastr.error(TAPi18n.__(e.reason)),!0===o&&(toastr.success(t("instance_approve_modal_modificationsave")),S.hide(n))}))}})}}}},cfs:{"instances.coffee":function t(o){var n=U="object"==typeof U?U:{},s,a,l,r,i;i="instances","OSS"===(null!=(a=e.settings.public.cfs)?a.store:void 0)?e.isClient?s=new A.Store.OSS(i):e.isServer&&(s=new A.Store.OSS(i,e.settings.cfs.aliyun)):"S3"===(null!=(l=e.settings.public.cfs)?l.store:void 0)?e.isClient?s=new A.Store.S3(i):e.isServer&&(s=new A.Store.S3(i,e.settings.cfs.aws)):"STEEDOSCLOUD"===(null!=(r=e.settings.public.cfs)?r.store:void 0)?e.isClient?s=new A.Store.STEEDOSCLOUD(i):e.isServer&&(s=new A.Store.STEEDOSCLOUD(i,e.settings.cfs.steedosCloud)):e.isClient?s=new A.Store.FileSystem(i):e.isServer&&(s=new A.Store.FileSystem(i,{path:o("path").join(process.env.STEEDOS_STORAGE_DIR,"files/instances"),fileKeyMaker:function(t){var e,n,s,a,l,r,c,d,u,f,m,p,_,w,b;return(w=t&&t._getInfo(i))&&w.key?w.key:(s=t.name(),n=(f=(u=(a=t.name({store:i}))||s).split(".")).pop(),l=f.join(".").substring(0,50)+"."+n,b=(m=new Date).getFullYear(),d=m.getMonth()+1,r=t.metadata.instance,p=o("path"),c=o("mkdirp"),_=p.join(process.env.STEEDOS_STORAGE_DIR,"files/instances/"+b+"/"+d+"/"+r),e=p.resolve(_),c.sync(e),b+"/"+d+"/"+r+"/"+t.collectionName+"-"+t._id+"-"+l)}})),cfs.instances=new A.Collection(i,{stores:[s]}),cfs.instances.allow({download:function(){return!0}})}}}}}},{extensions:[".js",".json",".coffee",".less",".html"]});N("/node_modules/meteor/steedos:app-workflow/core.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/template.new_flow_modal.js"),N("/node_modules/meteor/steedos:app-workflow/client/new_flow_modal.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/design/template.form_design.js"),N("/node_modules/meteor/steedos:app-workflow/client/design/form_design.coffee"),N("/node_modules/meteor/steedos:app-workflow/cfs/instances.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/template.admin_import_flow_modal.js"),N("/node_modules/meteor/steedos:app-workflow/client/admin_import_flow_modal.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/template.copy_flow_modal.js"),N("/node_modules/meteor/steedos:app-workflow/client/copy_flow_modal.coffee"),N("/node_modules/meteor/steedos:app-workflow/client/views/flow/template.distribute_edit_flow_modal.js"),N("/node_modules/meteor/steedos:app-workflow/client/views/flow/distribute_edit_flow_modal.coffee"),Package._define("steedos:app-workflow")}(); -Package._define("steedos:object-webhooks-queue"); +!function(){var e,o;Package._define("steedos:object-webhooks-queue")}(); !function(){var e=Package.meteor.Meteor,o=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.jquery.$,l=Package.jquery.jQuery,s=Package["templating-runtime"].Template,r=Package.session.Session,c=Package.blaze.Blaze,u=Package.blaze.UI,i=Package.blaze.Handlebars,d=Package["aldeed:autoform"].AutoForm,m=Package["raix:handlebar-helpers"].Helpers,p=Package["mpowaga:string-template"].StringTemplate,f=Package.promise.Promise,g=Package["aldeed:simple-schema"].SimpleSchema,h=Package["aldeed:simple-schema"].MongoObject,k=Package.spacebars.Spacebars,b=Package.htmljs.HTML,C;(function(){s.__checkName("autoformModals"),s.autoformModals=new s("Template.autoformModals",(function(){var t=this;return b.DIV({class:"modal fade creator-modal",id:"afModal"},"\n\t\t",b.DIV({class:function(){return["modal-dialog ",k.mustache(t.lookup("cmModalDialogClass"))," slds-modal slds-fade-in-open"]}},"\n\t\t\t",b.DIV({class:function(){return["slds-modal__container ",k.mustache(t.lookup("cmModalContentClass"))]}},"\n\t\t\t\t",b.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_icon slds-modal__close slds-button_icon-inverse",title:"Close","data-dismiss":"modal"},"\n\t\t\t\t\t\t",b.SVG({class:"slds-button__icon slds-button__icon_large","aria-hidden":"true"},"\n\t\t\t\t\t\t\t",b.USE({"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"/packages/steedos_lightning-design-system/client/icons/utility-sprite/symbols.svg#close"}),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",b.Raw('Close'),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",b.H2({class:"title slds-text-heading--medium"},"\n\t\t\t\t\t\t",b.H2({class:"slds-text-heading--medium"},c.View("lookup:title",(function(){return k.makeRaw(k.mustache(t.lookup("title")))}))),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\n\t\t\t\t",b.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$neq"),t.lookup("cmOperation"),"remove")}),(function(){return["\n\t\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$and"),t.lookup("cmCollection"),t.lookup("cmOperation"))}),(function(){return["\n\t\t\t\t\t\t\t",b.P(c.View("lookup:prompt",(function(){return k.makeRaw(k.mustache(t.lookup("prompt")))}))),"\n\t\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("shouldUpdateQuickForm"))}),(function(){return["\n\n\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{title:k.call(t.lookup("cmTitle")),id:k.call(t.lookup("cmFormId")),collection:k.call(t.lookup("cmCollection")),doc:k.call(t.lookup("cmDoc")),buttonContent:k.call(!1),template:k.call(t.lookup("cmTemplate")),"label-class":k.call(t.lookup("cmLabelClass")),"input-col-class":k.call(t.lookup("cmInputColClass")),buttonClasses:k.call(t.lookup("cmButtonClasses")),meteormethod:k.call(t.lookup("cmMeteorMethod")),type:k.call(t.lookup("cmAutoformType"))}}),(function(){return k.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(k.dot(t.lookup("schemaFields"),"grouplessFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(k.dot(t.lookup("schemaFields"),"grouplessFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{name:k.call(t.lookup("."))}}),(function(){return k.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(k.dot(t.lookup("schemaFields"),"groupFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(k.dot(t.lookup("schemaFields"),"groupFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(k.dot(t.lookup("."),"fields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-section slds-is-open group-section"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t",b.H3({class:"slds-section__title group-section-control"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.BUTTON({"aria-controls":"expando-unique-id","aria-expanded":"true",class:"slds-button slds-section__title-action"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{class:k.call("slds-section__title-action-icon slds-button__icon slds-button__icon_left"),source:k.call("utility-sprite"),name:k.call("switch")}}),(function(){return k.include(t.lookupTemplate("steedos_icon"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.SPAN({class:"slds-truncate",title:function(){return k.mustache(k.dot(t.lookup("."),"name"))}},c.View("lookup:..name",(function(){return k.mustache(k.dot(t.lookup("."),"name"))}))),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({"aria-hidden":"false",class:"slds-section__content",id:"expando-unique-id"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(k.dot(t.lookup("."),"fields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{name:k.call(t.lookup("."))}}),(function(){return k.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t\t\t"]}))})),"\n\t\t\t\t\t\n\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t"]})),"\n\t\t\t\t\t"]})),"\n\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmIsMultipleUpdate"))}),(function(){return["\n\t\t\t\t\t\t",b.DIV({class:"form-group multiple-box"},"\n\t\t\t\t\t\t\t",b.LABEL({class:"col-sm-2 control-label"}),"\n\t\t\t\t\t\t\t",b.DIV({class:"col-sm-10"},"\n\t\t\t\t\t\t\t\t",b.LABEL({class:"slds-checkbox"},"\n\t\t\t\t\t\t\t\t\t",b.INPUT({class:"keyboardMode--trigger ckb-multiple-update",type:"checkbox"}),"\n\t\t\t\t\t\t\t\t\t",b.SPAN({class:"slds-checkbox--faux"}),"\n\t\t\t\t\t\t\t\t\t",b.SPAN({class:"label-multiple-update"},"更新 ",c.View("lookup:cmTargetIds.length",(function(){return k.mustache(k.dot(t.lookup("cmTargetIds"),"length"))}))," 个选定记录"),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",b.SPAN({class:"help-block"}),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"remove")}),(function(){return["\n\t\t\t\t\t\t",b.DIV({class:"remove-prompt slds-text-align--center"},"是否确定要删除本条数据?"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\n\t\t\t\t",b.FOOTER({class:"slds-modal__footer"},"\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"insert")}),(function(){return["\n\t\t\t\t\t\t",b.BUTTON({type:"submit",class:"slds-button slds-button_brand btn-insert"},"保存"),"\n\n\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmSaveAndInsert"))}),(function(){return["\n\t\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-insert-and-create"},"保存并新建"),"\n\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"update")}),(function(){return["\n\n\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmShowRemoveButton"))}),(function(){return["\n\t\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_destructive btn-remove"},"删除"),"\n\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_brand btn-update"},"保存"),"\n\n\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmSaveAndInsert"))}),(function(){return["\n\t\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-update-and-create"},"保存并新建"),"\n\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"remove")}),(function(){return["\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_brand btn-remove"},"删除"),"\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\t\t\t"),"\n\t\t"),"\n\t")})),s.__checkName("afModal"),s.afModal=new s("Template.afModal",(function(){var t=this;return b.A({href:"#afModal",class:function(){return k.mustache(t.lookup("class"))},collection:function(){return k.mustache(t.lookup("collection"))},operation:function(){return k.mustache(t.lookup("operation"))}},"\n\t\t",c._InOuterTemplateScope(t,(function(){return k.include((function(){return k.call(t.templateContentBlock)}))})),"\n\t")}))}).call(this),function(){var o=C="object"==typeof C?C:{},n,l,c,u,i,m,f,g,h,k,b;b=["cmForm"],c="cmForm",n=null,d.addHooks("cmForm",{onSuccess:function(){return a("#afModal").modal("hide")},onError:function(e,o){return console.error(o),o.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(o.reason)):void 0:o.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(o.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(o):void 0}}),l=function(t){return t.split(".").reduce((function(t,e){return t[e]}),window)},f=function(t){var e;return e=_.map(t,(function(t,e){return(!t.autoform||!t.autoform.group)&&e})),e=_.compact(e)},h=function(t){var e;return e=_.map(t,(function(t){return t.autoform&&t.autoform.group})),e=_.compact(e),e=_.unique(e)},u=function(t,e){var o;return o=_.map(t,(function(t,o){return t.autoform&&t.autoform.group===e&&o})),o=_.compact(o)},g=function(t,e){return e=_.map(e,(function(e){var o,n;return(null==(n=(o=_.pick(t,e))[e].autoform)||!n.omit)&&e})),e=_.compact(e)},m=function(t,e){return e=_.map(e,(function(e){return _.indexOf(t,e)>-1&&e})),e=_.compact(e)},i=function(t,e){var o,n,a,l,s,r,c;for(n=[],a=0;a1?(s=r.get("cmCollection"),f=p,c=d.getFormValues(r.get("cmFormId")||"cmForm").updateDoc,m=r.get("object_name"),e.call("af_modal_multiple_update",{target_ids:f,doc:c,object_name:m},(function(e){return e?(console.error(e),e.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(e.reason)):void 0:e.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(error.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error("Sorry, update failed."):void 0):(a("#afModal").modal("hide"),"function"==typeof n?n():void 0)}))):a("#afModal #cmForm").submit()},"click button.btn-remove":function(e,o){var s,c,u;return c=r.get("cmCollection"),u=r.get("cmOperation"),s=r.get("cmDoc")._id,l(c).remove(s,(function(e){return e?(console.error(e),e.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(e.reason)):void 0:e.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(error.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error("Sorry, this could not be deleted."):void 0):(a("#afModal").modal("hide"),"function"==typeof n&&n(),"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.success?toastr.success(t("afModal_remove_suc")):void 0)}))},"click button.btn-update-and-create":function(t,e){return a("#afModal #cmForm").submit(),r.set("cmShowAgain",!0)},"click button.btn-insert-and-create":function(t,e){return a("#afModal #cmForm").submit(),r.set("cmShowAgain",!0)},"click .group-section-control":function(t,e){return t.preventDefault(),t.stopPropagation(),a(t.currentTarget).closest(".group-section").toggleClass("slds-is-open")}}),k={cmCollection:function(){return r.get("cmCollection")},cmOperation:function(){return r.get("cmOperation")},cmDoc:function(){return r.get("cmDoc")},cmButtonHtml:function(){return r.get("cmButtonHtml")},cmFields:function(){return r.get("cmFields")},cmOmitFields:function(){return r.get("cmOmitFields")},cmButtonContent:function(){return r.get("cmButtonContent")},cmCloseButtonContent:function(){return r.get("cmCloseButtonContent")},cmTitle:function(){return r.get("cmTitle")},cmButtonClasses:function(){return r.get("cmButtonClasses")},cmCloseButtonClasses:function(){return r.get("cmCloseButtonClasses")},cmPrompt:function(){return r.get("cmPrompt")},cmTemplate:function(){return r.get("cmTemplate")||"bootstrap3-horizontal"},cmLabelClass:function(){return r.get("cmLabelClass")||"col-sm-2"},cmInputColClass:function(){return r.get("cmInputColClass")||"col-sm-10"},cmPlaceholder:function(){return r.get("cmPlaceholder")},cmFormId:function(){return r.get("cmFormId")||"cmForm"},cmAutoformType:function(){return r.get("cmMeteorMethod")?"method":r.get("cmOperation")},cmModalDialogClass:function(){return r.get("cmModalDialogClass")},cmModalContentClass:function(){return r.get("cmModalContentClass")},cmMeteorMethod:function(){return r.get("cmMeteorMethod")},title:function(){return p.compile("{{{cmTitle}}}",k)},prompt:function(){return p.compile("{{{cmPrompt}}}",k)},buttonContent:function(){return p.compile("{{{cmButtonContent}}}",k)},closeButtonContent:function(){return p.compile("{{{cmCloseButtonContent}}}",k)},cmShowRemoveButton:function(){return r.get("cmShowRemoveButton")},shouldUpdateQuickForm:function(){var t;return null!=(t=s.instance())?t.shouldUpdateQuickForm.get():void 0},cmSaveAndInsert:function(){return r.get("cmSaveAndInsert")},cmIsMultipleUpdate:function(){var t,e;return t=r.get("cmIsMultipleUpdate")&&(null!=(e=r.get("cmTargetIds"))?e.length:void 0)>1},cmTargetIds:function(){return r.get("cmTargetIds")},schemaFields:function(){var t,e,o,n,a,s,c,d,p;if(t=r.get("cmCollection"),d=[],t)return p=l(t).simpleSchema()._schema,s=l(t).simpleSchema()._firstLevelSchemaKeys,r.get("cmFields")&&(s=[r.get("cmFields")]),r.get("cmOmitFields")&&(s=_.difference(s,[r.get("cmOmitFields")])),_.each(p,(function(t,e){var o;if(_.indexOf(s,e)>-1&&!(null!=(o=t.autoform)?o.omit:void 0))return d.push(e)})),1===d.length?a={grouplessFields:[d]}:(o=[],n=[],c=[],c=f(p),c=m(s,c),c=g(p,c),c=i(p,c),e=h(p),_.each(e,(function(t){return n=u(p,t),n=m(s,n),n=g(p,n),n=i(p,n),o.push({name:t,fields:n})})),a={grouplessFields:c,groupFields:o})}},s.autoformModals.helpers(k),s.afModal.events({"click *":function(t,e){var o,s,c;return t.preventDefault(),o=e.$("*").html(),e.data.collectionName?"update"===e.data.operation?c="编辑"+e.data.collectionName:"insert"===e.data.operation?c="新建"+e.data.collectionName:"remove"===e.data.operation&&(c="删除"+e.data.collectionName):c=o,r.set("cmCollection",e.data.collection),r.set("cmOperation",e.data.operation),r.set("cmFields",e.data.fields),r.set("cmOmitFields",e.data.omitFields),r.set("cmButtonHtml",o),r.set("cmTitle",e.data.title||c),r.set("cmTemplate",e.data.template),r.set("cmLabelClass",e.data.labelClass||e.data["label-class"]),r.set("cmInputColClass",e.data.inputColClass||e.data["input-col-class"]),r.set("cmPlaceholder",!0===e.data.placeholder?"schemaLabel":""),r.set("cmFormId",e.data.formId),r.set("cmMeteorMethod",e.data.meteormethod),r.set("cmModalDialogClass",e.data.dialogClass),r.set("cmModalContentClass",e.data.contentClass),r.set("cmShowRemoveButton",e.data.showRemoveButton||!1),r.set("cmSaveAndInsert",e.data.saveAndInsert),n=e.data.onSuccess,_.contains(b,e.data.formId)||(d.addHooks(e.data.formId,{onSuccess:function(){return a("#afModal").modal("hide")}}),b.push(e.data.formId)),e.data.doc&&r.set("cmDoc",l(e.data.collection).findOne({_id:e.data.doc})),e.data.showRemoveButton&&(e.data.buttonContent=!1),e.data.buttonContent||!1===e.data.buttonContent?r.set("cmButtonContent",e.data.buttonContent):"insert"===e.data.operation?r.set("cmButtonContent","Create"):"update"===e.data.operation?r.set("cmButtonContent","Update"):"remove"===e.data.operation&&r.set("cmButtonContent","Delete"),e.data.buttonClasses?r.set("cmButtonClasses",e.data.buttonClasses):"remove"===e.data.operation?r.set("cmButtonClasses","btn btn-danger"):r.set("cmButtonClasses","btn btn-primary"),r.set("cmCloseButtonContent",e.data.closeButtonContent||""),r.set("cmCloseButtonClasses",e.data.closeButtonClasses||"btn btn-danger"),e.data.prompt?r.set("cmPrompt",e.data.prompt):"remove"===e.data.operation?r.set("cmPrompt","Are you sure?"):r.set("cmPrompt",""),s=t.currentTarget.className,r.set("cmPressKey",s),r.get("cmShowAgain")&&(r.set("cmDoc",void 0),r.set("cmOperation","insert")),r.set("cmShowAgain",!1),a("#afModal").data("bs.modal").options.backdrop=e.data.backdrop||!0,a("#afModal").modal("show")}}),s.autoformModals.onCreated((function(){var t;return t=this,this.shouldUpdateQuickForm=new ReactiveVar(!0)})),s.autoformModals.onDestroyed((function(){return r.set("cmIsMultipleUpdate",!1),r.set("cmTargetIds",null)}))}.call(this),Package._define("steedos:autoform-modals")}(); diff --git a/server/bundle/programs/web.browser/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json b/server/bundle/programs/web.browser/6bff06e054ac5205945d97d558e533dad0a6378f.stats.json similarity index 99% rename from server/bundle/programs/web.browser/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json rename to server/bundle/programs/web.browser/6bff06e054ac5205945d97d558e533dad0a6378f.stats.json index 9ef2d3392f..405904464e 100644 --- a/server/bundle/programs/web.browser/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json +++ b/server/bundle/programs/web.browser/6bff06e054ac5205945d97d558e533dad0a6378f.stats.json @@ -3,15 +3,15 @@ "name": "standard-minifier-js", "version": "2.6.0" }, - "totalMinifiedBytes": 4306832, - "totalMinifiedGzipBytes": 1085093, + "totalMinifiedBytes": 4306866, + "totalMinifiedGzipBytes": 1085088, "minifiedBytesByPackage": { "packages/meteor.js": 9504, "packages/coffeescript.js": 32, "packages/blaze-html-templates.js": 40, "packages/modules-runtime.js": 4269, "packages/modules.js": [ - 928404, + 928390, { "node_modules": { "meteor": { @@ -741,7 +741,7 @@ }, "@steedos": { "i18n": { - "package.json": 95, + "package.json": 88, "lib": { "index.js": 2137, "i18n": { @@ -936,7 +936,7 @@ } }, "cachers": { - "package.json": 98, + "package.json": 91, "lib": { "index.js": 412, "memory.js": 501, @@ -2044,7 +2044,7 @@ "packages/dburles_collection-helpers.js": 557, "packages/mrt_moment.js": 30, "packages/steedos_loaders-css.js": 39, - "packages/matb33_collection-hooks.js": 9263, + "packages/matb33_collection-hooks.js": 9265, "packages/steedos_smsqueue.js": 36, "packages/flemay_less-autoprefixer.js": 44, "packages/steedos_ui.js": [ @@ -2382,7 +2382,7 @@ } } ], - "packages/steedos_mailqueue.js": 37, + "packages/steedos_mailqueue.js": 60, "packages/steedos_webhookqueue.js": 40, "packages/lamhieu_meteorx.js": 73, "packages/lamhieu_unblock.js": 35, @@ -2659,7 +2659,7 @@ } } ], - "packages/steedos_object-webhooks-queue.js": 49, + "packages/steedos_object-webhooks-queue.js": 72, "packages/steedos_autoform-modals.js": 20485, "packages/steedos_slipjs.js": 15081, "packages/steedos_workflow.js": [ diff --git a/server/bundle/programs/web.browser/program.json b/server/bundle/programs/web.browser/program.json index 1479de3617..f0d0c80dd4 100644 --- a/server/bundle/programs/web.browser/program.json +++ b/server/bundle/programs/web.browser/program.json @@ -2,24 +2,24 @@ "format": "web-program-pre1", "manifest": [ { - "path": "654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js", + "path": "6bff06e054ac5205945d97d558e533dad0a6378f.js", "where": "client", "type": "js", "cacheable": true, - "url": "/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.js?meteor_js_resource=true", - "size": 4306832, - "hash": "654579c5cf995e5454837b1d9db81c0c6ae3a2ef", - "sri": "qPSOXHjsN4RdiFxjbVubxm9SU621aIWGApTnRxEnK/nUxXdRBZ5EDLh5i3kwqyu5lnh2UiAbktAQuHDnm54DVw==" + "url": "/6bff06e054ac5205945d97d558e533dad0a6378f.js?meteor_js_resource=true", + "size": 4306866, + "hash": "6bff06e054ac5205945d97d558e533dad0a6378f", + "sri": "q5wudNmv/B0dWi/Z6vihVrBl1u2goOvCqRT+UCqcBJ6IWxuJ6jQFb+Xtq/apUeIAK735BPqGDYV7kiJYVBHU3A==" }, { - "path": "654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json", + "path": "6bff06e054ac5205945d97d558e533dad0a6378f.stats.json", "where": "client", "type": "json", "cacheable": true, - "url": "/654579c5cf995e5454837b1d9db81c0c6ae3a2ef.stats.json?meteor_js_resource=true", + "url": "/6bff06e054ac5205945d97d558e533dad0a6378f.stats.json?meteor_js_resource=true", "size": 92684, - "hash": "3c6856bff2d8b4985daf32fb3208891936216ebb", - "sri": "BzVj+opIx2k0j9EOsL7IEcb/oDRk2ddsuq6BtRsulup7sIKwQgH+MNEzxlqtGEaihfHRCPX1FEnmzg6Q2LTwHQ==" + "hash": "9232e935545a384e694468e74f3b6f8acfcacebe", + "sri": "y5fXOpn8G1MJXBjpLLwd9wCYg57kkFKRqjr8K2+BLangOuBl/J6JdZnLECAHBk4OQzuKoa1r8deUtm8ukpEADA==" }, { "path": "dynamic/node_modules/@steedos/form-builder/dist/form-builder.min.js", @@ -58,8 +58,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_asc.png", "size": 1118, - "hash": "316902f252ed6c1df0f2e249b595947ea614561f", - "sri": "Nuoh8B6BuGHNfEMcEHBZAoIr9Hqg328mnKZu8sn85o8HP3yCGm3WWL1+6HnrnfdsohuJ7lisX5qag8ImWgdKmw==" + "hash": "f7d6c6b431b0d8e55f2edc2cac3b93319a48445e", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_asc_disabled.png", @@ -68,8 +68,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_asc_disabled.png", "size": 2916, - "hash": "d3b36e7e840073d72c41234d8ea9458f6fbfdd89", - "sri": "Np57d/2rfIV4VBtl977miwbZdQVVtfe7JCeZAAQNAJBVm96NeBs2yHIos6KTPsRyPfn72bR2wQ+Ie93VbCyB5w==" + "hash": "cafa49620d7bd15a9fd0644dedec4ba862b3a2d4", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_both.png", @@ -78,8 +78,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_both.png", "size": 1136, - "hash": "ab54233bd2b1c940c4dc31fb0c61153df0688cd3", - "sri": "kwpWVgKlaCLJoySRqvgvt4GPbeqSqx+eBIKkOT4LOxt5w0uhM3z2hK/QtVVRzk/p7XN3ljW0PlvgO/uCB+G+KQ==" + "hash": "7d5a19949989bb107e478c6e55ea65f8c325abcd", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_desc.png", @@ -88,8 +88,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_desc.png", "size": 1127, - "hash": "e0d717f0b79a6fa7648a2f7803db6883482d94d3", - "sri": "WcMO6Jpo1AHAjz5kpNECZzheBFC1I2aUzGoYr+UTdKg/gtLWrw48Z2hxpzvt2V38F8G/4z7CgVxRxES189aUMg==" + "hash": "d69a3fd48716a8c4d8df38859cd0c1d7dab5e296", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_desc_disabled.png", @@ -98,8 +98,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_desc_disabled.png", "size": 1045, - "hash": "d78cd75eda77f65256044e0c16554a48901fe46f", - "sri": "wWNhEtCCD5xwQdWjTJJtJh2jA5jTW7zZ6N8rKBufbZ0n5f/i+dDSZFVafcMEuBGi+1jFnjINgbsQcozynkBlTA==" + "hash": "cd40181787ffeaef98d82fba7b0f6b7a5293e2aa", + "sri": null }, { "path": "packages/steedos_autoform-bs-minicolors/public/jquery.minicolors.png", diff --git a/server/bundle/programs/web.cordova/fb4cf6e7df455043d1874910f489bd5cde8823b7.js b/server/bundle/programs/web.cordova/e1ec5a6649a0245e29a456099f5acd3caeb34798.js similarity index 97% rename from server/bundle/programs/web.cordova/fb4cf6e7df455043d1874910f489bd5cde8823b7.js rename to server/bundle/programs/web.cordova/e1ec5a6649a0245e29a456099f5acd3caeb34798.js index 40e15b8ac7..8e8fd50f94 100644 --- a/server/bundle/programs/web.cordova/fb4cf6e7df455043d1874910f489bd5cde8823b7.js +++ b/server/bundle/programs/web.cordova/e1ec5a6649a0245e29a456099f5acd3caeb34798.js @@ -68,7 +68,7 @@ object-assign * Copyright 2011-2019 Twitter, Inc. * Licensed under the MIT license */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var r in t)if(void 0!==e.style[r])return{end:t[r]};return!1}e.fn.emulateTransitionEnd=function(t){var r=!1,n=this,i;return e(this).one("bsTransitionEnd",(function(){r=!0})),setTimeout((function(){r||e(n).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',r=function(r){e(r).on("click",t,this.close)};function n(t){return this.each((function(){var n=e(this),i=n.data("bs.alert");i||n.data("bs.alert",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.TRANSITION_DURATION=150,r.prototype.close=function(t){var n=e(this),i=n.attr("data-target");i||(i=(i=n.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function a(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=n.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",a).emulateTransitionEnd(r.TRANSITION_DURATION):a())};var i=e.fn.alert;e.fn.alert=n,e.fn.alert.Constructor=r,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,r.prototype.close)}(jQuery),function(e){"use strict";var t=function(r,n){this.$element=e(r),this.options=e.extend({},t.DEFAULTS,n),this.isLoading=!1};function r(r){return this.each((function(){var n=e(this),i=n.data("bs.button"),o="object"==typeof r&&r;i||n.data("bs.button",i=new t(this,o)),"toggle"==r?i.toggle():r&&i.setState(r)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var r="disabled",n=this.$element,i=n.is("input")?"val":"html",o=n.data();t+="Text",null==o.resetText&&n.data("resetText",n[i]()),setTimeout(e.proxy((function(){n[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,n.addClass(r).attr(r,r).prop(r,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(r).removeAttr(r).prop(r,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var r=this.$element.find("input");"radio"==r.prop("type")?(r.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==r.prop("type")&&(r.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),r.prop("checked",this.$element.hasClass("active")),e&&r.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=r,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn");r.call(n,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,r){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=r,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function r(r){return this.each((function(){var n=e(this),i=n.data("bs.carousel"),o=e.extend({},t.DEFAULTS,n.data(),"object"==typeof r&&r),a="string"==typeof r?r:o.slide;i||n.data("bs.carousel",i=new t(this,o)),"number"==typeof r?i.to(r):a?i[a]():o.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var r=this.getItemIndex(t),n;if(("prev"==e&&0===r||"next"==e&&r==this.$items.length-1)&&!this.options.wrap)return t;var i,o=(r+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,r=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):r==e?this.pause().cycle():this.slide(e>r?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(r,n){var i=this.$element.find(".item.active"),o=n||this.getItemForDirection(r,i),a=this.interval,s="next"==r?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],l=e.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var f=e(this.$indicators.children()[this.getItemIndex(o)]);f&&f.addClass("active")}var d=e.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(r),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",(function(){o.removeClass([r,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(d)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),a&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=r,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this};var i=function(t){var n=e(this),i=n.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=n.attr("data-target")||i,a=e(document).find(o);if(a.hasClass("carousel")){var s=e.extend({},a.data(),n.data()),u=n.attr("data-slide-to");u&&(s.interval=!1),r.call(a,s),u&&a.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);r.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(r,n){this.$element=e(r),this.options=e.extend({},t.DEFAULTS,n),this.$trigger=e('[data-toggle="collapse"][href="#'+r.id+'"],[data-toggle="collapse"][data-target="#'+r.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function r(t){var r,n=t.attr("data-target")||(r=t.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(n)}function n(r){return this.each((function(){var n=e(this),i=n.data("bs.collapse"),o=e.extend({},t.DEFAULTS,n.data(),"object"==typeof r&&r);!i&&o.toggle&&/show|hide/.test(r)&&(o.toggle=!1),i||n.data("bs.collapse",i=new t(this,o)),"string"==typeof r&&i[r]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var r,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(r=i.data("bs.collapse"))&&r.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(n.call(i,"hide"),r||i.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var u=e.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[a](this.$element[0][u])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var r=e.Event("hide.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[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 i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[n](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,n){var i=e(n);this.addAriaAndCollapsedClass(r(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var r=e.hasClass("in");e.attr("aria-expanded",r),t.toggleClass("collapsed",!r).attr("aria-expanded",r)};var i=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=r(i),a,s=o.data("bs.collapse")?"toggle":i.data();n.call(o,s)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",r='[data-toggle="dropdown"]',n=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var r=t.attr("data-target");r||(r=(r=t.attr("href"))&&/#[A-Za-z]/.test(r)&&r.replace(/.*(?=#[^\s]*$)/,""));var n="#"!==r?e(document).find(r):null;return n&&n.length?n:t.parent()}function o(n){n&&3===n.which||(e(t).remove(),e(r).each((function(){var t=e(this),r=i(t),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(r[0],n.target)||(r.trigger(n=e.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(t.attr("aria-expanded","false"),r.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function a(t){return this.each((function(){var r=e(this),i=r.data("bs.dropdown");i||r.data("bs.dropdown",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.prototype.toggle=function(t){var r=e(this);if(!r.is(".disabled, :disabled")){var n=i(r),a=n.hasClass("open");if(o(),!a){"ontouchstart"in document.documentElement&&!n.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var s={relatedTarget:this};if(n.trigger(t=e.Event("show.bs.dropdown",s)),t.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),n.toggleClass("open").trigger(e.Event("shown.bs.dropdown",s))}return!1}},n.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var n=e(this);if(t.preventDefault(),t.stopPropagation(),!n.is(".disabled, :disabled")){var o=i(n),a=o.hasClass("open");if(!a&&27!=t.which||a&&27==t.which)return 27==t.which&&o.find(r).trigger("focus"),n.trigger("click");var s=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+s);if(u.length){var c=u.index(t.target);38==t.which&&c>0&&c--,40==t.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},c.prototype.init=function(t,r,n){if(this.enabled=!0,this.type=t,this.$element=e(r),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&e(document).find(e.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 i=this.options.trigger.split(" "),o=i.length;o--;){var a=i[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",u="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(r){var n=this.$element.data();for(var i in n)n.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete n[i];return(r=e.extend({},this.getDefaults(),n,r)).delay&&"number"==typeof r.delay&&(r.delay={show:r.delay,hide:r.delay}),r.sanitize&&(r.template=u(r.template,r.whiteList,r.sanitizeFn)),r},c.prototype.getDelegateOptions=function(){var t={},r=this.getDefaults();return this._options&&e.each(this._options,(function(e,n){r[e]!=n&&(t[e]=n)})),t},c.prototype.enter=function(t){var r=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(r||(r=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,r)),t instanceof e.Event&&(r.inState["focusin"==t.type?"focus":"hover"]=!0),r.tip().hasClass("in")||"in"==r.hoverState)r.hoverState="in";else{if(clearTimeout(r.timeout),r.hoverState="in",!r.options.delay||!r.options.delay.show)return r.show();r.timeout=setTimeout((function(){"in"==r.hoverState&&r.show()}),r.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},c.prototype.leave=function(t){var r=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(r||(r=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,r)),t instanceof e.Event&&(r.inState["focusout"==t.type?"focus":"hover"]=!1),!r.isInStateTrue()){if(clearTimeout(r.timeout),r.hoverState="out",!r.options.delay||!r.options.delay.hide)return r.hide();r.timeout=setTimeout((function(){"out"==r.hoverState&&r.hide()}),r.options.delay.hide)}},c.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var r=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!r)return;var n=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,u=s.test(a);u&&(a=a.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),f=i[0].offsetWidth,d=i[0].offsetHeight;if(u){var h=a,p=this.getPosition(this.$viewport);a="bottom"==a&&l.bottom+d>p.bottom?"top":"top"==a&&l.top-dp.width?"left":"left"==a&&l.left-fa.top+a.height&&(i.top=a.top+a.height-u)}else{var c=t.left-o,l=t.left+o+r;ca.right&&(i.left=a.left+a.width-l)}return i},c.prototype.getTitle=function(){var e,t=this.$element,r=this.options;return e=t.attr("data-original-title")||("function"==typeof r.title?r.title.call(t[0]):r.title)},c.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(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")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(t){var r=this;t&&((r=e(t.currentTarget).data("bs."+this.type))||(r=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,r))),t?(r.inState.click=!r.inState.click,r.isInStateTrue()?r.enter(r):r.leave(r)):r.tip().hasClass("in")?r.leave(r):r.enter(r)},c.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},c.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var f=e.fn.tooltip;e.fn.tooltip=l,e.fn.tooltip.Constructor=c,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=f,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function r(r){return this.each((function(){var n=e(this),i=n.data("bs.popover"),o="object"==typeof r&&r;!i&&/destroy|hide/.test(r)||(i||n.data("bs.popover",i=new t(this,o)),"string"==typeof r&&i[r]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),r=this.getContent();if(this.options.html){var n=typeof r;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===n&&(r=this.sanitizeHtml(r))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===n?"html":"append"](r)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(r);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=e.fn.popover;e.fn.popover=r,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),function(e){"use strict";function t(r,n){this.$body=e(document.body),this.$scrollElement=e(r).is(document.body)?e(window):e(r),this.options=e.extend({},t.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function r(r){return this.each((function(){var n=e(this),i=n.data("bs.scrollspy"),o="object"==typeof r&&r;i||n.data("bs.scrollspy",i=new t(this,o)),"string"==typeof r&&i[r]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,r="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(r="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[r]().top+n,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),r=this.options.offset+t-this.$scrollElement.height(),n=this.offsets,i=this.targets,o=this.activeTarget,a;if(this.scrollHeight!=t&&this.refresh(),e>=r)return o!=(a=i[i.length-1])&&this.activate(a);if(o&&e=n[a]&&(void 0===n[a+1]||e .active"),a=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!n.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),r.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(r[0].offsetWidth,r.addClass("in")):r.removeClass("fade"),r.parent(".dropdown-menu").length&&r.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&a?o.one("bsTransitionEnd",s).emulateTransitionEnd(t.TRANSITION_DURATION):s(),o.removeClass("in")};var n=e.fn.tab;e.fn.tab=r,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this};var i=function(t){t.preventDefault(),r.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(r,n){this.options=e.extend({},t.DEFAULTS,n);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(r),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function r(r){return this.each((function(){var n=e(this),i=n.data("bs.affix"),o="object"==typeof r&&r;i||n.data("bs.affix",i=new t(this,o)),"string"==typeof r&&i[r]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,r,n){var i=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=r&&"top"==this.affixed)return i=e-n&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),r=this.$element.offset();return this.pinnedOffset=r.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var r=this.$element.height(),n=this.options.offset,i=n.top,o=n.bottom,a=Math.max(e(document).height(),e(document.body).height());"object"!=typeof n&&(o=i=n),"function"==typeof i&&(i=n.top(this.$element)),"function"==typeof o&&(o=n.bottom(this.$element));var s=this.getState(a,r,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var u="affix"+(s?"-"+s:""),c=e.Event(u+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-r-o})}};var n=e.fn.affix;e.fn.affix=r,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),n=t.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),r.call(t,n)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,r,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,r,e,n,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),a=t("path"),s=t("detect-libc");Math.random();var u=a.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+s.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(l){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(l.stack||l.message||l),new Error("Missing binary. See message above.")}c(e.exports)}function c(e){try{var t=process.binding("async_wrap"),r;if(t.asyncIdStackSize instanceof Function)r=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");f=t.constants.kStackLength,r=function(){return t.async_hook_fields[f]}}var n=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,a;if(!n||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,a=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var s=t.async_id_fields||t.async_uid_fields;function u(){for(var e=r(),t=new Array(e);e>0;--e){var i=s[o];t[e-1]={asyncId:i,triggerId:s[a]},n(i)}return t}function c(e){for(var t=0;t0)i.changeLanguage(e,n);else if(0!=s[u]){s[u]=0;var c=new XMLHttpRequest;c.overrideMimeType("application/json"),c.open("GET",u,!1),c.send(null),200===c.status?s[u]=1:s[u]=-1,r.addResourceBundle(e,a,JSON.parse(c.response)||{}),i.changeLanguage(e,n)}};r.changeLanguage=p;var b=function(e,t,r){return i.format(e,t,r)};r.format=b;var m=function(){return i.languages};r.getLanguages=m;var g=function(e,t){return i.loadLanguages(e,t)};r.loadLanguages=g;var v=function(e,t){return i.loadNamespaces(e,t)};r.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};r.on=y;var w=function(e,t){return i.off(e,t)};r.off=w,n.__exportStar(t("./i18n/i18n"),r),n.__exportStar(t("./i18n/i18n.app"),r),n.__exportStar(t("./translations"),r)},i18n:{"i18n.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fallbackKeys=r.getObjectI18nTemplate=r.translationI18nObjects=r.addObjectsI18n=r.translationI18nObject=void 0;var n=t("../index"),i=t("underscore"),o=t("clone"),a="_",s="base",u="core",c="translation",l=function(e,t){var r={lng:t,ns:c};if((0,n.exists)(e,r))return(0,n._t)(e,r)},f=function(e){return"".concat(e,"__object")},d=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},h=function(e,t){var r=d(e,t);return"".concat(r).concat("_","inlineHelpText")},p=function(e,t){var r=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(r)},b=function(e,t,r){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(r)},m=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},g=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,r){var n=f(t);return l(n,e)||r||""},w=function(e,t,r,n,i){var o=d(t,r),a=l(o,e);if(!a){var s=v(i);s&&"base"!=t&&"core"!=t&&(a=w(e,s,r,n,i))}return a||n||""},_=function(e,t,r,n,i){var o=h(t,r),a=l(o,e);if(!a){var s=v(i);s&&"base"!=t&&"core"!=t&&(a=_(e,s,r,n,i))}return a||n||""},x=function(e,t,r,n){var i=p(t,r);return l(i,e)||n||""},k=function(e,t,r,n,i,o){var a=b(t,r,n),s=l(a,e);if(!s){var u=v(o);u&&"base"!=t&&"core"!=t&&(s=k(e,u,r,n,i,o))}return s||i||""},S=function(e,t,r,n,i){var o=m(t,r),a=l(o,e);if(!a){var s=v(i);s&&"base"!=t&&"core"!=t&&(a=S(e,s,r,n,i))}return a||n||""},j=function(e,t,r,n,i){var o=g(t,r),a=l(o,e);if(!a){var s=v(i);s&&"base"!=t&&"core"!=t&&(a=j(e,s,r,n,i))}return a||n||""},A=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},D=function(e){i.forEach(e.fields,(function(e,t){var r=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return r.push(A(e))}))):r.push(A(e))})),e.options=r}catch(n){console.error("convertFieldsOptions error: ",e.options,n)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return r.push({label:e,value:t})})),e.options=r)}))},E=function(e,t,r){r.label=y(e,t,r.label),i.each(r.fields,(function(n,o){if(n.label=w(e,t,o,n.label,r.datasource),n.inlineHelpText&&(n.inlineHelpText=_(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(n.group=x(e,t,n.group,n.group)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var s=k(e,t,o,n.value,n.label,r.datasource);a.push(i.extend({},n,{label:s}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=S(e,t,i,n.label,r.datasource)})),i.each(r.list_views,(function(n,i){n.label=j(e,t,i,n.label,r.datasource)}))};r.translationI18nObject=E;var O=function(e){i.each(e,(function(e){(0,n.addResourceBundle)(e.lng,c,e.data,!0,!0)}))};r.addObjectsI18n=O;var C=function(e,t){i.each(t,(function(t,n){(0,r.translationI18nObject)(e,n,t)}))};r.translationI18nObjects=C;var T=function(e,t,r){var n=o(r);D(n);var a={};return a[f(t)]=y(e,t,n.label),i.each(n.fields,(function(r,o){a[d(t,o)]=w(e,t,o,r.label),r.inlineHelpText&&(a[h(t,o)]=_(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(a[p(t,r.group)]=x(e,t,r.group,r.group)),r.options&&i.each(r.options,(function(r){i.has(r,"value")&&(a[b(t,o,r.value)]=k(e,t,o,r.value,r.label))}))})),i.each(n.actions,(function(r,n){a[m(t,n)]=S(e,t,n,r.label)})),i.each(n.list_views,(function(r,n){a[g(t,n)]=j(e,t,n,r.label)})),a};r.getObjectI18nTemplate=T,r.fallbackKeys={getObjectLabelKey:f,getObjectFieldLabelKey:d,getObjectFieldInlineHelpTextLabelKey:h,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:b,getObjectActionLabelKey:m,getObjectListviewLabelKey:g}},"i18n.app.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.appFallbackKeys=r.getAppI18nTemplate=r.translationI18nApps=r.translationI18nMenus=void 0;var n=t("../index"),i=t("underscore"),o=t("clone"),a="translation",s="_",u=function(e,t){var r={lng:t,ns:a};if((0,n.exists)(e,r))return(0,n._t)(e,r)},c=function(e){return"app".concat("_").concat(e).concat("_","name")},l=function(e){return"app".concat("_").concat(e).concat("_","description")},f=function(e,t){var r=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(r)},d=function(e){return"menu".concat("_").concat(e)},h=function(e){return"tab".concat("_").concat(e)},p=function(e,t,r){var n=c(t);return u(n,e)||r||""},b=function(e,t,r){var n=l(t);return u(n,e)||r||""},m=function(e,t,r){var n=d(t);return u(n,e)||r||""},g=function(e,t,n){n.label=p(e,t,n.label||n.name),n.description=b(e,t,n.description),(0,r.translationI18nMenus)(e,n.admin_menus)},v=function(e,t){i.each(t,(function(t){var r=m(e,t._id,t.label||t.name);t.label=r,t.name=r}))};r.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,r){g(e,r,t)}))};r.translationI18nApps=y;var w=function(e,t,r){var n=o(r),a={};return a[c(t)]=p(e,t,n.label||n.name),a[l(t)]=b(e,t,n.description),i.each(n.admin_menus,(function(t){a[d(t._id)]=m(e,t._id,t.label||t.name)})),a};r.getAppI18nTemplate=w,r.appFallbackKeys={getAppLabelKey:c,getAppDescriptionKey:l,getAppGroupKey:f,getMenuLabelKey:d,getTabKey:h}}},translations:{"index.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SteedosTranslationPrefixKeys=r.convertObject=void 0;var n=t("tslib"),i=t("underscore");n.__exportStar(t("./objectTranslation"),r),n.__exportStar(t("./translation"),r),n.__exportStar(t("./templates/objectTranslation"),r),n.__exportStar(t("./templates/translation"),r);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},a=function(e){i.forEach(e.fields,(function(e,t){var r=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return r.push(o(e))}))):r.push(o(e))})),e.options=r}catch(n){console.error("convertFieldsOptions error: ",e.options,n)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?r.push(o(e)):r.push(e)})),e.options=r}catch(n){console.error("Creator.convertFieldsOptions",e.options,n)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return r.push({label:e,value:t})})),e.options=r)}))},s;r.convertObject=a,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(s=r.SteedosTranslationPrefixKeys||(r.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,r,e,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.addObjectsTranslation=r.getObjectTranslationTemplate=r.translationObjects=r.translationObject=r.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),a=t("../index"),s=t("./index"),u=t("../i18n/i18n"),c=t("lodash"),l=t("crypto"),f,d=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function h(e){var t;return l.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(h(JSON.stringify(t)))},b=t("clone"),m=".",g="base",v="core",y="translation",w="object",_="field",x="listview",k="action",S=function(e,t){var r={lng:t,ns:y,keySeparator:!1};if((0,a.exists)(e,r))return(0,a._t)(e,r)},j=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},A=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},D=function(e){var t;return[A(),e].join(".")},E=function(e){var t;return[A("object"),e,"label"].join(".")},O=function(e){var t;return[A("object"),e,"description"].join(".")},C=function(e,t){var r;return t&&(t=t.replace(/\./g,"_")),[A("field"),e,t,"label"].join(".")},T=function(e,t){var r;return t&&(t=t.replace(/\./g,"_")),[A("field"),e,t,"help"].join(".")},M=function(e,t){var r;return t&&(t=t.replace(/\./g,"_")),[A("field"),e,t,"description"].join(".")},B=function(e,t){var r=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),n;return[A("field"),e,"group",r].join(".")},I=function(e,t,r){var n;return t&&(t=t.replace(/\./g,"_")),[A("field"),e,t,"options",r].join(".")},R=function(e,t){var r;return[A("action"),e,t].join(".")},N=function(e,t){var r;return[A("listview"),e,t].join(".")},F=function(e,t,r){var n,i=[E(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),S(i,e)||r||""};r.translationObjectLabel=F;var L=function(e,t,r){var n=O(t);return S(n,e)||r||""},P=function(e,t,r,n,i,o){var a,s=[C(t,r)],c=u.fallbackKeys.getObjectFieldLabelKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=P(e,f,r,n,i))}return l||n||""},q=function(e,t,r,n,i,o){var a,s=[T(t,r)],c=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=q(e,f,r,n,i))}return l||n||""},z=function(e,t,r,n,i,o){var a=M(t,r),s,u=S([a],e);if(1!=o&&!u){var c=j(i);c&&"base"!=t&&"core"!=t&&(u=z(e,c,r,n,i))}return u||n||""},U=function(e,t,r,n,i,o){var a,s=[B(t,r)],c=u.fallbackKeys.getObjectFieldGroupKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=U(e,f,r,n,i))}return l||n||""},$=function(e,t,r,n,i,o,a){var s,c=[I(t,r,n)],l=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,r,n);l&&c.push(l);var f=S(c,e);if(1!=a&&!f){var d=j(o);d&&"base"!=t&&"core"!=t&&(f=$(e,d,r,n,i,o))}return f||i||""},H=function(e,t,r,n,i,o){var a,s=[R(t,r)],c=u.fallbackKeys.getObjectActionLabelKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=H(e,f,r,n,i))}return l||n||""},W=function(e,t,r,n,i,o){var a,s=[N(t,r)],c=u.fallbackKeys.getObjectListviewLabelKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=W(e,f,r,n,i))}return l||n||""},Y=function(e,t,n,o,a){void 0===a&&(a=!1);var u=p(e,n),l=d.get(u);if(l)return Object.assign(n,(0,c.cloneDeep)(l));o&&(0,s.convertObject)(n),n.label=(0,r.translationObjectLabel)(e,t,n.label),n.description=L(e,t,n.description),i.each(n.fields,(function(r,o){if(r.label=P(e,t,o,r.label,n.datasource,a),r.inlineHelpText=q(e,t,o,r.inlineHelpText,n.datasource,a),r.description=z(e,t,o,r.description,n.datasource,a),r.group&&(r.group=U(e,t,r.group,r.group,n.datasource,a)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var u=$(e,t,o,r.value,r.label,n.datasource,a);s.push(i.extend({},r,{label:u}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=H(e,t,i,r.label,n.datasource,a)})),i.each(n.list_views,(function(r,i){r.label=W(e,t,i,r.label,n.datasource,a)})),d.set(u,(0,c.cloneDeep)(n))};r.translationObject=Y;var V=function(e,t){i.each(t,(function(t,n){(0,r.translationObject)(e,n,t)}))};r.translationObjects=V;var K=function(e,t,n){var o=b(n);(0,s.convertObject)(o);var a={};return a[E(t)]=(0,r.translationObjectLabel)(e,t,o.label),a[O(t)]=L(e,t,o.description),i.each(o.fields,(function(r,n){a[C(t,n)]=P(e,t,n,r.label),r.inlineHelpText&&(a[T(t,n)]=q(e,t,n,r.inlineHelpText,o.datasource)),r.description&&(a[M(t,n)]=z(e,t,n,r.description,o.datasource)),r.group&&(a[B(t,r.group)]=U(e,t,r.group,r.group,o.datasource)),r.options&&i.each(r.options,(function(r){i.has(r,"value")&&(a[I(t,n,r.value)]=$(e,t,n,r.value,r.label))}))})),i.each(o.actions,(function(r,n){a[R(t,n)]=H(e,t,n,r.label)})),i.each(o.list_views,(function(r,n){a[N(t,n)]=W(e,t,n,r.label)})),a};function G(e,t){var r=b(e);(0,s.convertObject)(r);var n={},o=r.name;return o||console.error("Error: Invalid objectTranslation:"+t),n[E(o)]=r.label,n[O(o)]=r.description,i.each(r.fields,(function(e,t){n[C(o,t)]=e.label,e.help&&(n[T(o,t)]=e.help),e.description&&(n[M(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(n[I(o,t,e.value)]=e.label)}))})),i.each(r.groups,(function(e,t){n[B(o,t)]=e})),i.each(r.actions,(function(e,t){n[R(o,t)]=e.label})),i.each(r.listviews,(function(e,t){n[N(o,t)]=e.label})),i.each(r.CustomLabels,(function(e,t){n[D(t)]=e})),n}r.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,a.addResourceBundle)(e.lng,y,t,!0,!0)}))};r.addObjectsTranslation=X},"translation.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.addTranslations=r.convertTranslation=r.convertTranslationData=r.getAppTranslationTemplate=r.translationApps=r.translationMenus=r.translationApp=r.translationTabLabel=r.translationTabGroup=void 0;var n=t("../index"),i=t("underscore"),o=t("./"),a=t("../i18n/i18n.app"),s=t("clone"),u="translation",c=".",l="app",f="menu",d="tab",h=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[h(),e].join(".")},b=function(e,t){var r={lng:t,ns:u,keySeparator:!1};if((0,n.exists)(e,r))return(0,n._t)(e,r)},m=function(e){var t;return[h("app"),e,"name"].join(".")},g=function(e){var t;return[h("app"),e,"description"].join(".")},v=function(e,t){var r,n;return[h("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[h("menu"),"menu_".concat(e)].join(".")},w=function(e){var t;return[h("tab"),e].join(".")},_=function(e,t,r){var n,i=[m(t)],o=a.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),b(i,e)||r||""},x=function(e,t,r){var n,i=[g(t)],o=a.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),b(i,e)||r||""},k=function(e,t,r,n){var i,o=[v(t,r)],s=a.appFallbackKeys.getAppGroupKey(t,r);return s&&o.push(s),b(o,e)||n||""};r.translationTabGroup=k;var S=function(e,t,r){var n,i=[y(t)],o=a.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),b(i,e)||r||""},j=function(e,t,r){var n,i=[w(t)],o=a.appFallbackKeys.getTabKey(t);return o&&i.push(o),b(i,e)||r||""};r.translationTabLabel=j;var A=function(e,t,n){n.label=_(e,t,n.label||n.name),n.description=x(e,t,n.description),i.each(n.tab_groups,(function(i,o){n.tab_groups[o].id=i.id||i.group_name,n.tab_groups[o].group_name=(0,r.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,r.translationMenus)(e,n.admin_menus)};r.translationApp=A;var D=function(e,t){i.each(t,(function(t){var r=S(e,t._id,t.label||t.name);t.label=r,t.name=r}))};r.translationMenus=D;var E=function(e,t){i.each(t,(function(t,n){(0,r.translationApp)(e,n,t)}))};r.translationApps=E;var O=function(e,t,r){var n=s(r),o={};return o[m(t)]=_(e,t,n.label||n.name),o[g(t)]=x(e,t,n.description),i.each(n.admin_menus,(function(t){o[y(t._id)]=S(e,t._id,t.label||t.name)})),o};r.getAppTranslationTemplate=O;var C=function(e,t,r){i.isArray(r)?i.each(r,(function(e){C(e,"",e)})):r&&i.each(i.keys(r),(function(n){var o=t?"".concat(t,".").concat(n):n,a=r[n];"object"==typeof a?i.isArray(a)?i.each(a,(function(e){C(e,o,a)})):C(e,o,a):e[o]=a}))};function T(e){for(var t in e)"object"==typeof e[t]&&C(e,t,e[t]);return e}r.convertTranslationData=T;var M=function(e){var t=s(e),r={};return i.each(t.CustomApplications,(function(e,t){r[m(t)]=e.name,r[g(t)]=e.description,i.each(e.groups,(function(e,n){r[v(t,n)]=e}))})),i.each(t.CustomTabs,(function(e,t){r[w(t)]=e})),i.each(t.CustomLabels,(function(e,t){var n;if("simpleschema"!=t&&i.isObject(e)){var o=T(((n={})[t]=e,n));i.each(o,(function(e,t){i.isObject(e)||(r[p(t)]=e)}))}else r[p(t)]=e})),r};r.convertTranslation=M;var B=function(e){i.each(e,(function(e){var t=(0,r.convertTranslation)(e.data);(0,n.addResourceBundle)(e.lng,u,t,!0,!0)}))};r.addTranslations=B},templates:{"objectTranslation.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getObjectMetadataTranslationTemplate=void 0;var n=t("underscore"),i=t("../index"),o=t("clone");function a(e,t){var r={};return n.each(e,(function(e){r[e]="help"===e?t.inlineHelpText||"":t[e]||""})),r}function s(e){return a(["label","description"],e)}function u(e){switch(e.type){case"select":return a(["label","help","options","description"],e);default:return a(["label","help","description"],e)}}function c(e){return a(["label"],e)}function l(e){return a(["label"],e)}function f(e){var t={};return n.each(e,(function(e,r){t[r]=u(e)})),t}function d(e){var t={};return n.each(e,(function(e,r){t[r]=l(e)})),t}function h(e){var t={};return n.each(e,(function(e,r){t[r]=c(e)})),t}function p(e,t){var r={};return n.each(e,(function(e,n){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");r[i]=t[n].group}})),r}var b=function(e,t,r,a){void 0===a&&(a=!1);var u=o(r);1!=a&&(0,i.translationObject)(e,t,u,!0,a);var c=Object.assign({},s(u));c=Object.assign({},c,{fields:f(u.fields)});var l=p(r.fields,u.fields);n.isEmpty(l)||(c=Object.assign({},c,{groups:l}));var b=h(u.list_views);n.isEmpty(b)||(c=Object.assign({},c,{listviews:b}));var m=d(u.actions);return n.isEmpty(m)||(c=Object.assign({},c,{actions:m})),Object.assign({name:t},c)};r.getObjectMetadataTranslationTemplate=b},"translation.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getAppMetadataTranslationTemplate=void 0;var n=t("underscore"),i=t("../index"),o=t("clone");function a(e,t){var r={};return n.each(e,(function(e){r[e]=t[e]||""})),r}function s(e){var t={groups:{}};return e?(n.each(e,(function(e){var r=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[r]=e.group_name})),t):{}}var u=function(e){return Object.assign({},a(["name","description"],e),s(e.tab_groups))},c=function(e){var t={};return n.each(e,(function(e,r){t[r]=r})),t},l=function(e){var t={};return n.each(e,(function(e){var r=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[r]=e})),t},f=function(e,t,r){var n,a=o(r);(0,i.translationApp)(e,t,a);var s={},f;return a.tab_items?s=c(a.tab_items):a.tabs&&(s=l(a.tabs)),Object.assign({},{CustomApplications:(n={},n[t]=u(a),n)},{CustomTabs:s})};r.getAppMetadataTranslationTemplate=f}}}},node_modules:{i18next:{"package.json":function e(t,r,e){e.exports={name:"i18next",version:"19.9.2",main:"./dist/cjs/i18next.js",module:"./dist/esm/i18next.js"}},dist:{cjs:{"i18next.js":function e(t,r,e){"use strict";var n=t("@babel/runtime/helpers/typeof"),i=t("@babel/runtime/helpers/objectSpread"),o=t("@babel/runtime/helpers/classCallCheck"),a=t("@babel/runtime/helpers/createClass"),s=t("@babel/runtime/helpers/possibleConstructorReturn"),u=t("@babel/runtime/helpers/getPrototypeOf"),c=t("@babel/runtime/helpers/assertThisInitialized"),l=t("@babel/runtime/helpers/inherits");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=f(n),h=f(i),p=f(o),b=f(a),m=f(s),g=f(u),v=f(c),y=f(l),w={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,r){console&&console[t]&&console[t].apply(console,r)}},_,x=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,e),this.init(t,r)}return b.default(e,[{key:"init",value:function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||w,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n1?r-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function E(e,t,r){var n=D(e,t,Object),i,o;n.obj[n.k]=r}function O(e,t,r,n){var i=D(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],n&&(o[a]=o[a].concat(r)),n||o[a].push(r)}function C(e,t){var r=D(e,t),n=r.obj,i=r.k;if(n)return n[i]}function T(e,t,r){var n=C(e,r);return void 0!==n?n:C(t,r)}function M(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):M(e[n],t[n],r):e[n]=t[n]);return e}function B(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var I={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function R(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return I[e]})):e}var N="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,F=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return p.default(this,t),r=m.default(this,g.default(t).call(this)),N&&k.call(v.default(r)),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return y.default(t,e),b.default(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}},{key:"getResource",value:function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=[t,r];return n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(a=t.split(".")),C(this.data,a)}},{key:"addResource",value:function e(t,r,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var s=[t,r];n&&(s=s.concat(a?n.split(a):n)),t.indexOf(".")>-1&&(i=r,r=(s=t.split("."))[1]),this.addNamespaces(r),E(this.data,s,i),o.silent||this.emit("added",t,r,n,i)}},{key:"addResources",value:function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(t,r,o,n[o],{silent:!0});i.silent||this.emit("added",t,r,n)}},{key:"addResourceBundle",value:function e(t,r,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,r];t.indexOf(".")>-1&&(i=n,n=r,r=(s=t.split("."))[1]),this.addNamespaces(r);var u=C(this.data,s)||{};i?M(u,n,o):u=h.default({},u,n),E(this.data,s,u),a.silent||this.emit("added",t,r,n)}},{key:"removeResourceBundle",value:function e(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}},{key:"hasResourceBundle",value:function e(t,r){return void 0!==this.getResource(t,r)}},{key:"getResourceBundle",value:function e(t,r){return r||(r=this.options.defaultNS),"v1"===this.options.compatibilityAPI?h.default({},{},this.getResource(t,r)):this.getResource(t,r)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(k),L={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,r,n,i,o){var a=this;return t.forEach((function(e){a.processors[e]&&(r=a.processors[e].process(r,n,i,o))})),r}},P={},q=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p.default(this,t),r=m.default(this,g.default(t).call(this)),N&&k.call(v.default(r)),A(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,v.default(r)),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=x.create("translator"),r}return y.default(t,e),b.default(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(t,r);return n&&void 0!==n.res}},{key:"extractFromKey",value:function e(t,r){var n=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=r.ns||this.options.defaultNS;if(n&&t.indexOf(n)>-1){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:o};var s=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),t=s.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(r,n,i){var o=this;if("object"!==d.default(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==r)return"";Array.isArray(r)||(r=[String(r)]);var a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,s=this.extractFromKey(r[r.length-1],n),u=s.key,c=s.namespaces,l=c[c.length-1],f=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(p){var b=n.nsSeparator||this.options.nsSeparator;return l+b+u}return u}var m=this.resolve(r,n),g=m&&m.res,v=m&&m.usedKey||u,y=m&&m.exactUsedKey||u,w=Object.prototype.toString.apply(g),_=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g;if(k&&g&&S&&_.indexOf(w)<0&&("string"!=typeof x||"[object Array]"!==w)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,n):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(a){var j="[object Array]"===w,A=j?[]:{},D=j?y:v;for(var E in g)if(Object.prototype.hasOwnProperty.call(g,E)){var O="".concat(D).concat(a).concat(E);A[E]=this.translate(O,h.default({},n,{joinArrays:!1,ns:c})),A[E]===O&&(A[E]=g[E])}g=A}}else if(k&&"string"==typeof x&&"[object Array]"===w)(g=g.join(x))&&(g=this.extendTranslation(g,r,n,i));else{var C=!1,T=!1,M=void 0!==n.count&&"string"!=typeof n.count,B=t.hasDefaultValue(n),I=M?this.pluralResolver.getSuffix(f,n.count):"",R=n["defaultValue".concat(I)]||n.defaultValue;!this.isValidLookup(g)&&B&&(C=!0,g=R),this.isValidLookup(g)||(T=!0,g=u);var N=B&&R!==g&&this.options.updateMissing;if(T||C||N){if(this.logger.log(N?"updateKey":"missingKey",f,l,u,N?R:g),a){var F=this.resolve(u,h.default({},n,{keySeparator:!1}));F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var L=[],P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&P&&P[0])for(var q=0;q1&&void 0!==arguments[1]?arguments[1]:{},i,o,a,s,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!r.isValidLookup(i)){var t=r.extractFromKey(e,n),c=t.key;o=c;var l=t.namespaces;r.options.fallbackNS&&(l=l.concat(r.options.fallbackNS));var f=void 0!==n.count&&"string"!=typeof n.count,d=void 0!==n.context&&"string"==typeof n.context&&""!==n.context,h=n.lngs?n.lngs:r.languageUtils.toResolveHierarchy(n.lng||r.language,n.fallbackLng);l.forEach((function(e){r.isValidLookup(i)||(u=e,!P["".concat(h[0],"-").concat(e)]&&r.utils&&r.utils.hasLoadedNamespace&&!r.utils.hasLoadedNamespace(u)&&(P["".concat(h[0],"-").concat(e)]=!0,r.logger.warn('key "'.concat(o,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((function(t){if(!r.isValidLookup(i)){s=t;var o=c,u=[o],l,h;if(r.i18nFormat&&r.i18nFormat.addLookupKeys)r.i18nFormat.addLookupKeys(u,c,t,e,n);else f&&(l=r.pluralResolver.getSuffix(t,n.count)),f&&d&&u.push(o+l),d&&u.push(o+="".concat(r.options.contextSeparator).concat(n.context)),f&&u.push(o+=l);for(;h=u.pop();)r.isValidLookup(i)||(a=h,i=r.getResource(t,e,h,n))}})))}))}})),{res:i,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:u}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}}],[{key:"hasDefaultValue",value:function e(t){var r="defaultValue";for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&void 0!==t[n])return!0;return!1}}]),t}(k);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var U=function(){function e(t){p.default(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}return b.default(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var r=t.split("-");return 2===r.length?null:(r.pop(),"x"===r[r.length-1].toLowerCase()?null:this.formatLanguageCode(r.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=z(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=z(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=z(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var r=this,n;return t?(t.forEach((function(e){if(!n){var t=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(t)||(n=t)}})),!n&&this.options.supportedLngs&&t.forEach((function(e){if(!n){var t=r.getLanguagePartFromCode(e);if(r.isSupportedCode(t))return n=t;n=r.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n):null}},{key:"getFallbackCodes",value:function e(t,r){if(!t)return[];if("function"==typeof t&&(t=t(r)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!r)return t.default||[];var n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function e(t,r){var n=this,i=this.getFallbackCodes(r||this.options.fallbackLng||[],t),o=[],a=function e(t){t&&(n.isSupportedCode(t)?o.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(t))):"string"==typeof t&&a(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&a(n.formatLanguageCode(e))})),o}}]),e}(),$=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],H={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function W(){var e={};return $.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:H[t.fc]}}))})),e}var Y=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,e),this.languageUtils=t,this.options=r,this.logger=x.create("pluralResolver"),this.rules=W()}return b.default(e,[{key:"addRule",value:function e(t,r){this.rules[t]=r}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var r=this.getRule(t);return r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,r){return this.getSuffixes(t).map((function(e){return r+e}))}},{key:"getSuffixes",value:function e(t){var r=this,n=this.getRule(t);return n?n.numbers.map((function(e){return r.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,r){var n=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(r):i.plurals(Math.abs(r)),a=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===a?a="plural":1===a&&(a=""));var s=function e(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return"v1"===this.options.compatibilityJSON?1===a?"":"number"==typeof a?"_plural_".concat(a.toString()):s():"v2"===this.options.compatibilityJSON?s():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p.default(this,e),this.logger=x.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return b.default(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=void 0!==r.escape?r.escape:R,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?B(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?B(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?B(r.nestingPrefix):r.nestingPrefixEscaped||B("$t("),this.nestingSuffix=r.nestingSuffix?B(r.nestingSuffix):r.nestingSuffixEscaped||B(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=void 0!==r.alwaysFormat&&r.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function e(t,r,n,i){var o=this,a,s,u,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var f=function e(t){if(t.indexOf(o.formatSeparator)<0){var a=T(r,c,t);return o.alwaysFormat?o.format(a,void 0,n):a}var s=t.split(o.formatSeparator),u=s.shift().trim(),l=s.join(o.formatSeparator).trim();return o.format(T(r,c,u),l,n,i)};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return l(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?l(o.escape(t)):l(t)}}].forEach((function(e){for(u=0;a=e.regex.exec(t);){if(void 0===(s=f(a[1].trim())))if("function"==typeof d){var r=d(t,a,i);s="string"==typeof r?r:""}else{if(h){s=a[0];continue}o.logger.warn("missed to pass in variable ".concat(a[1]," for interpolating ").concat(t)),s=""}else"string"==typeof s||o.useRawValueToEscape||(s=j(s));if(t=t.replace(a[0],e.safeValue(s)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,r){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o,a,s=h.default({},i);function u(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0],i=(i=this.interpolate(i,s)).replace(/'/g,'"');try{s=JSON.parse(i),t&&(s=h.default({},t,s))}catch(o){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),o),"".concat(e).concat(r).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;o=this.nestingRegexp.exec(t);){var c=[],l=!1;if(o[0].includes(this.formatSeparator)&&!/{.*}/.test(o[1])){var f=o[1].split(this.formatSeparator).map((function(e){return e.trim()}));o[1]=f.shift(),c=f,l=!0}if((a=r(u.call(this,o[1].trim(),s),s))&&o[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=j(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return n.format(e,t,i.lng,i)}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}]),e}();function K(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}var G=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p.default(this,t),i=m.default(this,g.default(t).call(this)),N&&k.call(v.default(i)),i.backend=e,i.store=r,i.services=n,i.languageUtils=n.languageUtils,i.options=o,i.logger=x.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return y.default(t,e),b.default(t,[{key:"queueLoad",value:function e(t,r,n,i){var o=this,a=[],s=[],u=[],c=[];return t.forEach((function(e){var t=!0;r.forEach((function(r){var i="".concat(e,"|").concat(r);!n.reload&&o.store.hasResourceBundle(e,r)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?s.indexOf(i)<0&&s.push(i):(o.state[i]=1,t=!1,s.indexOf(i)<0&&s.push(i),a.indexOf(i)<0&&a.push(i),c.indexOf(r)<0&&c.push(r)))})),t||u.push(e)})),(a.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:i}),{toLoad:a,pending:s,toLoadLanguages:u,toLoadNamespaces:c}}},{key:"loaded",value:function e(t,r,n){var i=t.split("|"),o=i[0],a=i[1];r&&this.emit("failedLoading",o,a,r),n&&this.store.addResourceBundle(o,a,n),this.state[t]=r?-1:2;var e={};this.queue.forEach((function(n){O(n.loaded,[o],a),K(n.pending,t),r&&n.errors.push(r),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(t){e[t]||(e[t]=[]),n.loaded[t].length&&n.loaded[t].forEach((function(r){e[t].indexOf(r)<0&&e[t].push(r)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,r,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[n](t,r,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,r,n,o+1,2*a,s)}),a):s(e,u)})):s(null,{})}},{key:"prepareLoading",value:function e(t,r){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof r&&(r=[r]);var a=this.queueLoad(t,r,i,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function e(t,r,n){this.prepareLoading(t,r,{},n)}},{key:"reload",value:function e(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}},{key:"loadOne",value:function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],a=i[1];this.read(o,a,"read",void 0,void 0,(function(e,i){e&&r.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(o," failed"),e),!e&&i&&r.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(o),i),r.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,r,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(t,r,n,i,null,h.default({},a,{isUpdate:o})),t&&t[0]&&this.store.addResource(t[0],r,n,i))}}]),t}(k);function X(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var r={};if("object"===d.default(t[1])&&(r=t[1]),"string"==typeof t[1]&&(r.defaultValue=t[1]),"string"==typeof t[2]&&(r.tDescription=t[2]),"object"===d.default(t[2])||"object"===d.default(t[3])){var n=t[3]||t[2];Object.keys(n).forEach((function(e){r[e]=n[e]}))}return r},interpolation:{escapeValue:!0,format:function e(t,r,n,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function Z(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function J(){}var Q,ee=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(p.default(this,t),e=m.default(this,g.default(t).call(this)),N&&k.call(v.default(e)),e.options=Z(r),e.services={},e.logger=x,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),m.default(e,v.default(e));setTimeout((function(){e.init(r,n)}),0)}return e}return y.default(t,e),b.default(t,[{key:"init",value:function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof r&&(n=r,r={}),r.whitelist&&!r.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),r.nonExplicitWhitelist&&!r.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=h.default({},X(),this.options,Z(r)),this.format=this.options.interpolation.format,n||(n=J),!this.options.isClone){this.modules.logger?x.init(i(this.modules.logger),this.options):x.init(null,this.options);var o=new U(this.options);this.store=new F(this.options.resources,this.options);var a=this.services;a.logger=x,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new Y(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new V(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new G(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments),t}}));var l=S(),f=function e(){var r=function e(r,i){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(i),n(r,i)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return r(null,t.t.bind(t));t.changeLanguage(t.options.lng,r)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),l}},{key:"loadResources",value:function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,i=n,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var a=[],s=function e(t){var n;t&&r.services.languageUtils.toResolveHierarchy(t).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};if(o)s(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(a,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,r,n){var i=S();return t||(t=this.languages),r||(r=this.options.ns),n||(n=J),this.services.backendConnector.reload(t,r,(function(e){i.resolve(),n(e)})),i}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&L.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,r){var n=this;this.isLanguageChangingTo=t;var i=S();this.emit("languageChanging",t);var o=function e(t,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,i.resolve((function(){return n.t.apply(n,arguments)})),r&&r(t,(function(){return n.t.apply(n,arguments)}))},a=function e(t){var r="string"==typeof t?t:n.services.languageUtils.getBestMatchFromCodes(t);r&&(n.language||(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r)),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,(function(e){o(e,r)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,r){var n=this,i=function e(t,r){var i;if("object"!==d.default(r)){for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;s1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],o=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var s=function e(t,n){var i=r.services.backendConnector.state["".concat(t,"|").concat(n)];return-1===i||2===i};if(n.precheck){var u=n.precheck(this,s);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!s(i,t)||o&&!s(a,t)))}},{key:"loadNamespaces",value:function e(t,r){var n=this,i=S();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),r&&r(e)})),i):(r&&r(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,r){var n=S();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){n.resolve(),r&&r(e)})),n):(r&&r(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var r}},{key:"createInstance",value:function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(r,n)}},{key:"cloneInstance",value:function e(){var r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,o=h.default({},this.options,n,{isClone:!0}),a=new t(o),s=["store","services","language"];return s.forEach((function(e){a[e]=r[e]})),a.services=h.default({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new q(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0&&r<=y}}function Z(e){return function(t){return null==t?void 0:t[e]}}var J=Z("byteLength"),Q=X(J),ee=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function te(e){return p?p(e)&&!U(e):Q(e)&&ee.test(s.call(e))}var re=c?te:G(!1),ne=Z("length");function ie(e){for(var t={},r=e.length,n=0;n":">",'"':""","'":"'","`":"`"},st=ot(at),ut,ct=ot(Ce(at)),lt=ce.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},ft=/(.)^/,dt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ht=/\\|'|\r|\n|\u2028|\u2029/g;function pt(e){return"\\"+dt[e]}var bt=/^\s*(\w|\$)+\s*$/;function mt(e,t,r){!t&&r&&(t=r),t=Re({},t,ce.templateSettings);var n=RegExp([(t.escape||ft).source,(t.interpolate||ft).source,(t.evaluate||ft).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(n,(function(t,r,n,a,s){return o+=e.slice(i,s).replace(ht,pt),i=s+t.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t})),o+="';\n";var a=t.variable,s;if(a){if(!bt.test(a))throw new Error("variable is not a bare identifier: "+a)}else o="with(obj||{}){\n"+o+"}\n",a="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{s=new Function(a,"_",o)}catch(c){throw c.source=o,c}var u=function(e){return s.call(this,e,ce)};return u.source="function("+a+"){\n"+o+"}",u}function gt(e,t,r){var n=(t=Ue(t)).length;if(!n)return N(r)?r.call(e):r;for(var i=0;i1)jt(s,t-1,r,n),i=n.length;else for(var u=0,c=s.length;ut?(n&&(clearTimeout(n),n=null),s=c,a=e.apply(i,o),n||(i=o=null)):n||!1===r.trailing||(n=setTimeout(u,l)),a};return c.cancel=function(){clearTimeout(n),s=0,n=i=o=null},c}function Tt(e,t,r){var n,i,o,a,s,u=function(){var c=it()-i;t>c?n=setTimeout(u,t-c):(n=null,r||(a=e.apply(s,o)),n||(o=s=null))},c=w((function(c){return s=this,o=c,i=it(),n||(n=setTimeout(u,t),r&&(a=e.apply(s,o))),a}));return c.cancel=function(){clearTimeout(n),n=o=s=null},c}function Mt(e,t){return xt(t,e)}function Bt(e){return function(){return!e.apply(this,arguments)}}function It(){var e=arguments,t=e.length-1;return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n);return n}}function Rt(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function Nt(e,t){var r;return function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=null),r}}var Ft=xt(Nt,2);function Lt(e,t,r){t=Je(t,r);for(var n=ae(e),i,o=0,a=n.length;o0?0:i-1;o>=0&&o0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(r&&o&&u)return n[o=r(n,i)]===i?o:-1;if(i!=i)return(o=t(a.call(n,s,u),K))>=0?o+s:-1;for(o=e>0?s:u-1;o>=0&&o0?0:a-1;for(i||(n=t[o?o[s]:s],s+=e);s>=0&&s=3;return t(e,Ge(r,i,4),n,o)}}var Zt=Xt(1),Jt=Xt(-1);function Qt(e,t,r){var n=[];return t=Je(t,r),Kt(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function er(e,t,r){return Qt(e,Bt(Je(t)),r)}function tr(e,t,r){t=Je(t,r);for(var n=!St(e)&&ae(e),i=(n||e).length,o=0;o=0}var ir=w((function(e,t,r){var n,i;return N(t)?i=t:(t=Ue(t),n=t.slice(0,-1),t=t[t.length-1]),Gt(e,(function(e){var o=i;if(!o){if(n&&n.length&&(e=$e(e,n)),null==e)return;o=e[t]}return null==o?o:o.apply(e,r)}))}));function or(e,t){return Gt(e,Ke(t))}function ar(e,t){return Qt(e,Ve(t))}function sr(e,t,r){var n=-1/0,i=-1/0,o,a;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=St(e)?e:Ee(e)).length;sn&&(n=o);else t=Je(t,r),Kt(e,(function(e,r,o){((a=t(e,r,o))>i||a===-1/0&&n===-1/0)&&(n=e,i=a)}));return n}function ur(e,t,r){var n=1/0,i=1/0,o,a;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=St(e)?e:Ee(e)).length;sn||void 0===r)return 1;if(r1&&(n=Ge(n,t[1])),t=be(e)):(n=wr,t=jt(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i1&&(n=t[1])):(t=Gt(jt(t,!1,!1),String),r=function(e,r){return!nr(t,r)}),_r(e,r,n)}));function kr(e,t,r){return a.call(e,0,Math.max(0,e.length-(null==t||r?1:t)))}function Sr(e,t,r){return null==e||e.length<1?null==t||r?void 0:[]:null==t||r?e[0]:kr(e,e.length-t)}function jr(e,t,r){return a.call(e,null==t||r?1:t)}function Ar(e,t,r){return null==e||e.length<1?null==t||r?void 0:[]:null==t||r?e[e.length-1]:jr(e,Math.max(0,e.length-t))}function Dr(e){return Qt(e,Boolean)}function Er(e,t){return jt(e,t,!1)}var Or=w((function(e,t){return t=jt(t,!0,!0),Qt(e,(function(e){return!nr(t,e)}))})),Cr=w((function(e,t){return Or(e,t)}));function Tr(e,t,r,n){S(t)||(n=r,r=t,t=!1),null!=r&&(r=Je(r,n));for(var i=[],o=[],a=0,s=ne(e);ae(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},c=new Set,l=(e,t)=>{const r=`LRU_CACHE_OPTION_${e}`;p(r)&&b(r,`${e} option`,`options.${t}`,w)},f=(e,t)=>{const r=`LRU_CACHE_METHOD_${e}`;if(p(r)){const{prototype:n}=w,{get:i}=Object.getOwnPropertyDescriptor(n,e);b(r,`${e} method`,`cache.${t}()`,i)}},d=(e,t)=>{const r=`LRU_CACHE_PROPERTY_${e}`;if(p(r)){const{prototype:n}=w,{get:i}=Object.getOwnPropertyDescriptor(n,e);b(r,`${e} property`,`cache.${t}`,i)}},h=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!c.has(e),b=(e,t,r,n)=>{c.add(e);const i=`The ${t} is deprecated. Please use ${r} instead.`;h(i,"DeprecationWarning",e,n)},m=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),g=e=>m(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=g(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class w{constructor(e={}){const{max:t=0,ttl:r,ttlResolution:n=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:s,dispose:u,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:b,maxSize:v=0,maxEntrySize:_=0,sizeCalculation:x,fetchMethod:k,fetchContext:S,noDeleteOnFetchRejection:j,noDeleteOnStaleGet:A}=e,{length:D,maxAge:E,stale:O}=e instanceof w?{}:e;if(0!==t&&!m(t))throw new TypeError("max option must be a nonnegative integer");const C=t?g(t):Array;if(!C)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=x||D,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=k||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=S,!this.fetchMethod&&void 0!==S)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new C(t),this.prev=new C(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof f?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!b,this.noDeleteOnFetchRejection=!!j,0!==this.maxEntrySize){if(0!==this.maxSize&&!m(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!m(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!s||!!O,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=m(n)||0===n?n:1,this.ttlAutopurge=!!i,this.ttl=r||E||0,this.ttl){if(!m(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){c.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";h(t,"UnboundedCacheWarning",e,w)}}O&&l("stale","allowStale"),E&&l("maxAge","ttl"),D&&l("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,r=n.now())=>{if(this.starts[e]=0!==t?r:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const r=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);r.unref&&r.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?n.now():0};let e=0;const t=()=>{const t=n.now();if(this.ttlResolution>0){e=t;const r=setTimeout(()=>e=0,this.ttlResolution);r.unref&&r.unref()}return t};this.getRemainingTTL=r=>{const n=this.keyMap.get(r);return void 0===n?0:0===this.ttls[n]||0===this.starts[n]?1/0:this.starts[n]+this.ttls[n]-(e||t())},this.isStale=r=>0!==this.ttls[r]&&0!==this.starts[r]&&(e||t())-this.starts[r]>this.ttls[r]}updateItemAge(e){}setItemTTL(e,t,r){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,r,n)=>{if(this.isBackgroundFetch(t))return 0;if(!m(r)){if(!n)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!m(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,r,n){if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const r of this.indexes())if(e(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],t)}forEach(e,t=this){for(const r of this.indexes())e.call(t,this.valList[r],this.keyList[r],this)}rforEach(e,t=this){for(const r of this.rindexes())e.call(t,this.valList[r],this.keyList[r],this)}get prune(){return f("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const r=this.keyList[t],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,a={value:o};if(this.ttls){a.ttl=this.ttls[t];const e=n.now()-this.starts[t];a.start=Math.floor(Date.now()-e)}this.sizes&&(a.size=this.sizes[t]),e.unshift([r,a])}return e}load(e){this.clear();for(const[t,r]of e){if(r.start){const e=Date.now()-r.start;r.start=n.now()-e}this.set(t,r.value,r)}}dispose(e,t,r){}set(e,t,{ttl:r=this.ttl,start:n,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:s=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,a),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),s=!1;else{const r=this.valList[u];t!==r&&(this.isBackgroundFetch(r)?r.__abortController.abort():i||(this.dispose(r,e,"set"),this.disposeAfter&&this.disposed.push([r,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===r||0!==this.ttl||this.ttls||this.initializeTTLTracking(),s||this.setItemTTL(u,r,n),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,r=this.keyList[t],n=this.valList[t];return this.isBackgroundFetch(n)?n.__abortController.abort():(this.dispose(n,r,"evict"),this.disposeAfter&&this.disposed.push([n,r,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(r),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const r=this.keyMap.get(e);return void 0!==r&&!this.isStale(r)&&(t&&this.updateItemAge(r),!0)}peek(e,{allowStale:t=this.allowStale}={}){const r=this.keyMap.get(e);if(void 0!==r&&(t||!this.isStale(r))){const e=this.valList[r];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,r,n){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const a=new o,s={signal:a.signal,options:r,context:n},u=t=>(a.signal.aborted||this.set(e,t,s.options),t),c=n=>{if(this.valList[t]===f){const n=!r.noDeleteOnFetchRejection||void 0===f.__staleWhileFetching;n?this.delete(e):this.valList[t]=f.__staleWhileFetching}if(f.__returned===f)throw n},l=t=>t(this.fetchMethod(e,i,s)),f=new Promise(l).then(u,c);return f.__abortController=a,f.__staleWhileFetching=i,f.__returned=null,void 0===t?(this.set(e,f,s.options),t=this.keyMap.get(e)):this.valList[t]=f,f}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,fetchContext:l=this.fetchContext,forceRefresh:f=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:n});const d={allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:i,noDisposeOnSet:o,size:a,sizeCalculation:s,noUpdateTTL:u,noDeleteOnFetchRejection:c};let h=this.keyMap.get(e);if(void 0===h){const t=this.backgroundFetch(e,h,d,l);return t.__returned=t}{const n=this.valList[h];if(this.isBackgroundFetch(n))return t&&void 0!==n.__staleWhileFetching?n.__staleWhileFetching:n.__returned=n;if(!f&&!this.isStale(h))return this.moveToTail(h),r&&this.updateItemAge(h),n;const i=this.backgroundFetch(e,h,d,l);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],a=this.isBackgroundFetch(o);if(this.isStale(i))return a?t?o.__staleWhileFetching:void 0:(n||this.delete(e),t?o:void 0);if(a)return;return this.moveToTail(i),r&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return f("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const r=this.keyMap.get(e);if(void 0!==r)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(r);const t=this.valList[r];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const r=this.keyList[e];this.dispose(t,r,"delete"),this.disposeAfter&&this.disposed.push([t,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return f("reset","clear"),this.clear}get length(){return d("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=w}}}},"form-builder":{"package.json":function e(t,r,e){e.exports={name:"@steedos/form-builder",version:"3.6.2-patch.5",private:!1,publishConfig:{access:"public"},main:"dist/form-builder.min.js",homepage:"https://formbuilder.online/",repository:{url:"https://github.com/kevinchappell/formBuilder.git",type:"git"},files:["dist/**/*","docs/**/*","src/**/*"],author:"Kevin Chappell ",contributors:[],bugs:"https://github.com/kevinchappell/formBuilder/issues",description:"A jQuery plugin for drag and drop form building",keywords:["jquery-plugin","forms","drag and drop","form builder","form create"],license:"MIT",ignore:["**/*","node_modules","test"],config:{files:{test:["test/**/*.spec.js"],pluginsDir:"src/js/control_plugins/",fonts:"src/fonts",sass:"src/sass",formBuilder:{js:"src/js/form-builder.js",sass:["src/sass/form-builder.scss"]},formRender:{js:"src/js/form-render.js",sass:["src/sass/form-render.scss"]},site:["demo/assets/sass/site.scss"]},fontServer:"http://fontello.com",fontelloToken:"09d648f01d6c57cb9f9b8cc55043e0c0"},babel:{presets:[["@babel/preset-env",{targets:{browsers:["> 1%"]},loose:!0}]],comments:!1,plugins:["@babel/plugin-proposal-object-rest-spread","@babel/plugin-proposal-class-properties"]},scripts:{"build:analyze":"webpack --mode production -p --progress --config tools/webpack.config --analyze","build:plugins":"webpack --mode production -p --display-entrypoints --progress --config tools/webpack.plugins.config","build:vendor":"babel-node tools/build-vendor",build:"webpack --mode production -p --progress --config tools/webpack.config","build:all":"npm-run-all build:plugins build:vendor build copy",copy:"cp -a dist/* demo/assets/js/ && cp CONTRIBUTING.md docs/contributing.md && cp LICENSE docs/license.md && npm run copy:lang","copy:lang":"babel-node tools/copy-language-files","deploy:all":"npm-run-all deploy:demo deploy:site","deploy:demo":"node tools/deploy-demo.js","deploy:site":"node tools/deploy-site.js",docs:"mkdocs build",font:"babel-node tools/icon-font",lint:"eslint ./src --ext .js || true","semantic-release":"semantic-release","start:devServer":"webpack-dev-server --mode development --config tools/webpack.config",prestart:"npm-run-all -p build:vendor copy:lang",start:"npm run start:devServer",test:"npm run-script build"},dependencies:{jquery:">=3.4.1","jquery-ui-sortable":"*"},devDependencies:{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/node":"^7.10.5","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-syntax-object-rest-spread":"^7.8.3","@babel/plugin-transform-destructuring":"^7.10.4","@babel/preset-env":"^7.11.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.5",autoprefixer:"^9.8.6","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","clean-webpack-plugin":"^3.0.0",clui:"^0.3.6","compression-webpack-plugin":"^5.0.1","concat-files":"^0.1.1","cross-env":"^7.0.2","css-loader":"^4.2.1",eslint:"^7.7.0","eslint-loader":"^4.0.2","formbuilder-languages":"latest","fs-extra":"^9.0.1","html-webpack-harddisk-plugin":"^1.0.2","html-webpack-plugin":"^4.3.0",inquirer:"^7.3.3",mi18n:"^0.4.8","node-sass":"6.0.1","npm-run-all":"^4.1.5",opener:"^1.5.1","postcss-loader":"^3.0.0","replace-in-file":"^6.1.0",request:"^2.88.2","sass-loader":"10.5.2","semantic-release":"^17.1.1",semver:"^7.3.2","style-loader":"^1.2.1",unzipper:"^0.10.11",webpack:"^4.44.1","webpack-bundle-analyzer":"^3.8.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","wrapper-webpack-plugin":"^2.1.0"},prettier:{singleQuote:!0,trailingComma:"all",printWidth:120,semi:!1,arrowParens:"avoid",spaceAfterFunction:!1},engines:{},release:{branch:"master",verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},browserslist:["> 1%"]}},dist:{"form-builder.min.js":function e(t,r){ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var r in t)if(void 0!==e.style[r])return{end:t[r]};return!1}e.fn.emulateTransitionEnd=function(t){var r=!1,n=this,i;return e(this).one("bsTransitionEnd",(function(){r=!0})),setTimeout((function(){r||e(n).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',r=function(r){e(r).on("click",t,this.close)};function n(t){return this.each((function(){var n=e(this),i=n.data("bs.alert");i||n.data("bs.alert",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.TRANSITION_DURATION=150,r.prototype.close=function(t){var n=e(this),i=n.attr("data-target");i||(i=(i=n.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function a(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=n.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",a).emulateTransitionEnd(r.TRANSITION_DURATION):a())};var i=e.fn.alert;e.fn.alert=n,e.fn.alert.Constructor=r,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,r.prototype.close)}(jQuery),function(e){"use strict";var t=function(r,n){this.$element=e(r),this.options=e.extend({},t.DEFAULTS,n),this.isLoading=!1};function r(r){return this.each((function(){var n=e(this),i=n.data("bs.button"),o="object"==typeof r&&r;i||n.data("bs.button",i=new t(this,o)),"toggle"==r?i.toggle():r&&i.setState(r)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var r="disabled",n=this.$element,i=n.is("input")?"val":"html",o=n.data();t+="Text",null==o.resetText&&n.data("resetText",n[i]()),setTimeout(e.proxy((function(){n[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,n.addClass(r).attr(r,r).prop(r,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(r).removeAttr(r).prop(r,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var r=this.$element.find("input");"radio"==r.prop("type")?(r.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==r.prop("type")&&(r.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),r.prop("checked",this.$element.hasClass("active")),e&&r.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=r,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn");r.call(n,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,r){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=r,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function r(r){return this.each((function(){var n=e(this),i=n.data("bs.carousel"),o=e.extend({},t.DEFAULTS,n.data(),"object"==typeof r&&r),a="string"==typeof r?r:o.slide;i||n.data("bs.carousel",i=new t(this,o)),"number"==typeof r?i.to(r):a?i[a]():o.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var r=this.getItemIndex(t),n;if(("prev"==e&&0===r||"next"==e&&r==this.$items.length-1)&&!this.options.wrap)return t;var i,o=(r+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,r=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):r==e?this.pause().cycle():this.slide(e>r?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(r,n){var i=this.$element.find(".item.active"),o=n||this.getItemForDirection(r,i),a=this.interval,s="next"==r?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],l=e.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var f=e(this.$indicators.children()[this.getItemIndex(o)]);f&&f.addClass("active")}var d=e.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(r),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",(function(){o.removeClass([r,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(d)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),a&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=r,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this};var i=function(t){var n=e(this),i=n.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=n.attr("data-target")||i,a=e(document).find(o);if(a.hasClass("carousel")){var s=e.extend({},a.data(),n.data()),u=n.attr("data-slide-to");u&&(s.interval=!1),r.call(a,s),u&&a.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);r.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(r,n){this.$element=e(r),this.options=e.extend({},t.DEFAULTS,n),this.$trigger=e('[data-toggle="collapse"][href="#'+r.id+'"],[data-toggle="collapse"][data-target="#'+r.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function r(t){var r,n=t.attr("data-target")||(r=t.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(n)}function n(r){return this.each((function(){var n=e(this),i=n.data("bs.collapse"),o=e.extend({},t.DEFAULTS,n.data(),"object"==typeof r&&r);!i&&o.toggle&&/show|hide/.test(r)&&(o.toggle=!1),i||n.data("bs.collapse",i=new t(this,o)),"string"==typeof r&&i[r]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var r,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(r=i.data("bs.collapse"))&&r.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(n.call(i,"hide"),r||i.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var u=e.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[a](this.$element[0][u])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var r=e.Event("hide.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[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 i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[n](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,n){var i=e(n);this.addAriaAndCollapsedClass(r(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var r=e.hasClass("in");e.attr("aria-expanded",r),t.toggleClass("collapsed",!r).attr("aria-expanded",r)};var i=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=r(i),a,s=o.data("bs.collapse")?"toggle":i.data();n.call(o,s)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",r='[data-toggle="dropdown"]',n=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var r=t.attr("data-target");r||(r=(r=t.attr("href"))&&/#[A-Za-z]/.test(r)&&r.replace(/.*(?=#[^\s]*$)/,""));var n="#"!==r?e(document).find(r):null;return n&&n.length?n:t.parent()}function o(n){n&&3===n.which||(e(t).remove(),e(r).each((function(){var t=e(this),r=i(t),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(r[0],n.target)||(r.trigger(n=e.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(t.attr("aria-expanded","false"),r.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function a(t){return this.each((function(){var r=e(this),i=r.data("bs.dropdown");i||r.data("bs.dropdown",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.prototype.toggle=function(t){var r=e(this);if(!r.is(".disabled, :disabled")){var n=i(r),a=n.hasClass("open");if(o(),!a){"ontouchstart"in document.documentElement&&!n.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var s={relatedTarget:this};if(n.trigger(t=e.Event("show.bs.dropdown",s)),t.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),n.toggleClass("open").trigger(e.Event("shown.bs.dropdown",s))}return!1}},n.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var n=e(this);if(t.preventDefault(),t.stopPropagation(),!n.is(".disabled, :disabled")){var o=i(n),a=o.hasClass("open");if(!a&&27!=t.which||a&&27==t.which)return 27==t.which&&o.find(r).trigger("focus"),n.trigger("click");var s=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+s);if(u.length){var c=u.index(t.target);38==t.which&&c>0&&c--,40==t.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},c.prototype.init=function(t,r,n){if(this.enabled=!0,this.type=t,this.$element=e(r),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&e(document).find(e.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 i=this.options.trigger.split(" "),o=i.length;o--;){var a=i[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",u="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(r){var n=this.$element.data();for(var i in n)n.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete n[i];return(r=e.extend({},this.getDefaults(),n,r)).delay&&"number"==typeof r.delay&&(r.delay={show:r.delay,hide:r.delay}),r.sanitize&&(r.template=u(r.template,r.whiteList,r.sanitizeFn)),r},c.prototype.getDelegateOptions=function(){var t={},r=this.getDefaults();return this._options&&e.each(this._options,(function(e,n){r[e]!=n&&(t[e]=n)})),t},c.prototype.enter=function(t){var r=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(r||(r=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,r)),t instanceof e.Event&&(r.inState["focusin"==t.type?"focus":"hover"]=!0),r.tip().hasClass("in")||"in"==r.hoverState)r.hoverState="in";else{if(clearTimeout(r.timeout),r.hoverState="in",!r.options.delay||!r.options.delay.show)return r.show();r.timeout=setTimeout((function(){"in"==r.hoverState&&r.show()}),r.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},c.prototype.leave=function(t){var r=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(r||(r=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,r)),t instanceof e.Event&&(r.inState["focusout"==t.type?"focus":"hover"]=!1),!r.isInStateTrue()){if(clearTimeout(r.timeout),r.hoverState="out",!r.options.delay||!r.options.delay.hide)return r.hide();r.timeout=setTimeout((function(){"out"==r.hoverState&&r.hide()}),r.options.delay.hide)}},c.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var r=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!r)return;var n=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,u=s.test(a);u&&(a=a.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),f=i[0].offsetWidth,d=i[0].offsetHeight;if(u){var h=a,p=this.getPosition(this.$viewport);a="bottom"==a&&l.bottom+d>p.bottom?"top":"top"==a&&l.top-dp.width?"left":"left"==a&&l.left-fa.top+a.height&&(i.top=a.top+a.height-u)}else{var c=t.left-o,l=t.left+o+r;ca.right&&(i.left=a.left+a.width-l)}return i},c.prototype.getTitle=function(){var e,t=this.$element,r=this.options;return e=t.attr("data-original-title")||("function"==typeof r.title?r.title.call(t[0]):r.title)},c.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(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")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(t){var r=this;t&&((r=e(t.currentTarget).data("bs."+this.type))||(r=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,r))),t?(r.inState.click=!r.inState.click,r.isInStateTrue()?r.enter(r):r.leave(r)):r.tip().hasClass("in")?r.leave(r):r.enter(r)},c.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},c.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var f=e.fn.tooltip;e.fn.tooltip=l,e.fn.tooltip.Constructor=c,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=f,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function r(r){return this.each((function(){var n=e(this),i=n.data("bs.popover"),o="object"==typeof r&&r;!i&&/destroy|hide/.test(r)||(i||n.data("bs.popover",i=new t(this,o)),"string"==typeof r&&i[r]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),r=this.getContent();if(this.options.html){var n=typeof r;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===n&&(r=this.sanitizeHtml(r))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===n?"html":"append"](r)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(r);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=e.fn.popover;e.fn.popover=r,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),function(e){"use strict";function t(r,n){this.$body=e(document.body),this.$scrollElement=e(r).is(document.body)?e(window):e(r),this.options=e.extend({},t.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function r(r){return this.each((function(){var n=e(this),i=n.data("bs.scrollspy"),o="object"==typeof r&&r;i||n.data("bs.scrollspy",i=new t(this,o)),"string"==typeof r&&i[r]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,r="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(r="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[r]().top+n,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),r=this.options.offset+t-this.$scrollElement.height(),n=this.offsets,i=this.targets,o=this.activeTarget,a;if(this.scrollHeight!=t&&this.refresh(),e>=r)return o!=(a=i[i.length-1])&&this.activate(a);if(o&&e=n[a]&&(void 0===n[a+1]||e .active"),a=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!n.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),r.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(r[0].offsetWidth,r.addClass("in")):r.removeClass("fade"),r.parent(".dropdown-menu").length&&r.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&a?o.one("bsTransitionEnd",s).emulateTransitionEnd(t.TRANSITION_DURATION):s(),o.removeClass("in")};var n=e.fn.tab;e.fn.tab=r,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this};var i=function(t){t.preventDefault(),r.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(r,n){this.options=e.extend({},t.DEFAULTS,n);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(r),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function r(r){return this.each((function(){var n=e(this),i=n.data("bs.affix"),o="object"==typeof r&&r;i||n.data("bs.affix",i=new t(this,o)),"string"==typeof r&&i[r]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,r,n){var i=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=r&&"top"==this.affixed)return i=e-n&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),r=this.$element.offset();return this.pinnedOffset=r.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var r=this.$element.height(),n=this.options.offset,i=n.top,o=n.bottom,a=Math.max(e(document).height(),e(document.body).height());"object"!=typeof n&&(o=i=n),"function"==typeof i&&(i=n.top(this.$element)),"function"==typeof o&&(o=n.bottom(this.$element));var s=this.getState(a,r,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var u="affix"+(s?"-"+s:""),c=e.Event(u+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-r-o})}};var n=e.fn.affix;e.fn.affix=r,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),n=t.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),r.call(t,n)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,r,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,r,e,n,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),a=t("path"),s=t("detect-libc");Math.random();var u=a.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+s.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(l){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(l.stack||l.message||l),new Error("Missing binary. See message above.")}c(e.exports)}function c(e){try{var t=process.binding("async_wrap"),r;if(t.asyncIdStackSize instanceof Function)r=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");f=t.constants.kStackLength,r=function(){return t.async_hook_fields[f]}}var n=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,a;if(!n||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,a=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var s=t.async_id_fields||t.async_uid_fields;function u(){for(var e=r(),t=new Array(e);e>0;--e){var i=s[o];t[e-1]={asyncId:i,triggerId:s[a]},n(i)}return t}function c(e){for(var t=0;t0)i.changeLanguage(e,n);else if(0!=s[u]){s[u]=0;var c=new XMLHttpRequest;c.overrideMimeType("application/json"),c.open("GET",u,!1),c.send(null),200===c.status?s[u]=1:s[u]=-1,r.addResourceBundle(e,a,JSON.parse(c.response)||{}),i.changeLanguage(e,n)}};r.changeLanguage=p;var b=function(e,t,r){return i.format(e,t,r)};r.format=b;var m=function(){return i.languages};r.getLanguages=m;var g=function(e,t){return i.loadLanguages(e,t)};r.loadLanguages=g;var v=function(e,t){return i.loadNamespaces(e,t)};r.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};r.on=y;var w=function(e,t){return i.off(e,t)};r.off=w,n.__exportStar(t("./i18n/i18n"),r),n.__exportStar(t("./i18n/i18n.app"),r),n.__exportStar(t("./translations"),r)},i18n:{"i18n.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fallbackKeys=r.getObjectI18nTemplate=r.translationI18nObjects=r.addObjectsI18n=r.translationI18nObject=void 0;var n=t("../index"),i=t("underscore"),o=t("clone"),a="_",s="base",u="core",c="translation",l=function(e,t){var r={lng:t,ns:c};if((0,n.exists)(e,r))return(0,n._t)(e,r)},f=function(e){return"".concat(e,"__object")},d=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},h=function(e,t){var r=d(e,t);return"".concat(r).concat("_","inlineHelpText")},p=function(e,t){var r=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(r)},b=function(e,t,r){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(r)},m=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},g=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,r){var n=f(t);return l(n,e)||r||""},w=function(e,t,r,n,i){var o=d(t,r),a=l(o,e);if(!a){var s=v(i);s&&"base"!=t&&"core"!=t&&(a=w(e,s,r,n,i))}return a||n||""},_=function(e,t,r,n,i){var o=h(t,r),a=l(o,e);if(!a){var s=v(i);s&&"base"!=t&&"core"!=t&&(a=_(e,s,r,n,i))}return a||n||""},x=function(e,t,r,n){var i=p(t,r);return l(i,e)||n||""},k=function(e,t,r,n,i,o){var a=b(t,r,n),s=l(a,e);if(!s){var u=v(o);u&&"base"!=t&&"core"!=t&&(s=k(e,u,r,n,i,o))}return s||i||""},S=function(e,t,r,n,i){var o=m(t,r),a=l(o,e);if(!a){var s=v(i);s&&"base"!=t&&"core"!=t&&(a=S(e,s,r,n,i))}return a||n||""},j=function(e,t,r,n,i){var o=g(t,r),a=l(o,e);if(!a){var s=v(i);s&&"base"!=t&&"core"!=t&&(a=j(e,s,r,n,i))}return a||n||""},A=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},D=function(e){i.forEach(e.fields,(function(e,t){var r=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return r.push(A(e))}))):r.push(A(e))})),e.options=r}catch(n){console.error("convertFieldsOptions error: ",e.options,n)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return r.push({label:e,value:t})})),e.options=r)}))},E=function(e,t,r){r.label=y(e,t,r.label),i.each(r.fields,(function(n,o){if(n.label=w(e,t,o,n.label,r.datasource),n.inlineHelpText&&(n.inlineHelpText=_(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(n.group=x(e,t,n.group,n.group)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var s=k(e,t,o,n.value,n.label,r.datasource);a.push(i.extend({},n,{label:s}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=S(e,t,i,n.label,r.datasource)})),i.each(r.list_views,(function(n,i){n.label=j(e,t,i,n.label,r.datasource)}))};r.translationI18nObject=E;var O=function(e){i.each(e,(function(e){(0,n.addResourceBundle)(e.lng,c,e.data,!0,!0)}))};r.addObjectsI18n=O;var C=function(e,t){i.each(t,(function(t,n){(0,r.translationI18nObject)(e,n,t)}))};r.translationI18nObjects=C;var T=function(e,t,r){var n=o(r);D(n);var a={};return a[f(t)]=y(e,t,n.label),i.each(n.fields,(function(r,o){a[d(t,o)]=w(e,t,o,r.label),r.inlineHelpText&&(a[h(t,o)]=_(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(a[p(t,r.group)]=x(e,t,r.group,r.group)),r.options&&i.each(r.options,(function(r){i.has(r,"value")&&(a[b(t,o,r.value)]=k(e,t,o,r.value,r.label))}))})),i.each(n.actions,(function(r,n){a[m(t,n)]=S(e,t,n,r.label)})),i.each(n.list_views,(function(r,n){a[g(t,n)]=j(e,t,n,r.label)})),a};r.getObjectI18nTemplate=T,r.fallbackKeys={getObjectLabelKey:f,getObjectFieldLabelKey:d,getObjectFieldInlineHelpTextLabelKey:h,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:b,getObjectActionLabelKey:m,getObjectListviewLabelKey:g}},"i18n.app.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.appFallbackKeys=r.getAppI18nTemplate=r.translationI18nApps=r.translationI18nMenus=void 0;var n=t("../index"),i=t("underscore"),o=t("clone"),a="translation",s="_",u=function(e,t){var r={lng:t,ns:a};if((0,n.exists)(e,r))return(0,n._t)(e,r)},c=function(e){return"app".concat("_").concat(e).concat("_","name")},l=function(e){return"app".concat("_").concat(e).concat("_","description")},f=function(e,t){var r=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(r)},d=function(e){return"menu".concat("_").concat(e)},h=function(e){return"tab".concat("_").concat(e)},p=function(e,t,r){var n=c(t);return u(n,e)||r||""},b=function(e,t,r){var n=l(t);return u(n,e)||r||""},m=function(e,t,r){var n=d(t);return u(n,e)||r||""},g=function(e,t,n){n.label=p(e,t,n.label||n.name),n.description=b(e,t,n.description),(0,r.translationI18nMenus)(e,n.admin_menus)},v=function(e,t){i.each(t,(function(t){var r=m(e,t._id,t.label||t.name);t.label=r,t.name=r}))};r.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,r){g(e,r,t)}))};r.translationI18nApps=y;var w=function(e,t,r){var n=o(r),a={};return a[c(t)]=p(e,t,n.label||n.name),a[l(t)]=b(e,t,n.description),i.each(n.admin_menus,(function(t){a[d(t._id)]=m(e,t._id,t.label||t.name)})),a};r.getAppI18nTemplate=w,r.appFallbackKeys={getAppLabelKey:c,getAppDescriptionKey:l,getAppGroupKey:f,getMenuLabelKey:d,getTabKey:h}}},translations:{"index.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SteedosTranslationPrefixKeys=r.convertObject=void 0;var n=t("tslib"),i=t("underscore");n.__exportStar(t("./objectTranslation"),r),n.__exportStar(t("./translation"),r),n.__exportStar(t("./templates/objectTranslation"),r),n.__exportStar(t("./templates/translation"),r);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},a=function(e){i.forEach(e.fields,(function(e,t){var r=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return r.push(o(e))}))):r.push(o(e))})),e.options=r}catch(n){console.error("convertFieldsOptions error: ",e.options,n)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?r.push(o(e)):r.push(e)})),e.options=r}catch(n){console.error("Creator.convertFieldsOptions",e.options,n)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return r.push({label:e,value:t})})),e.options=r)}))},s;r.convertObject=a,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(s=r.SteedosTranslationPrefixKeys||(r.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,r,e,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.addObjectsTranslation=r.getObjectTranslationTemplate=r.translationObjects=r.translationObject=r.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),a=t("../index"),s=t("./index"),u=t("../i18n/i18n"),c=t("lodash"),l=t("crypto"),f,d=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function h(e){var t;return l.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(h(JSON.stringify(t)))},b=t("clone"),m=".",g="base",v="core",y="translation",w="object",_="field",x="listview",k="action",S=function(e,t){var r={lng:t,ns:y,keySeparator:!1};if((0,a.exists)(e,r))return(0,a._t)(e,r)},j=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},A=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},D=function(e){var t;return[A(),e].join(".")},E=function(e){var t;return[A("object"),e,"label"].join(".")},O=function(e){var t;return[A("object"),e,"description"].join(".")},C=function(e,t){var r;return t&&(t=t.replace(/\./g,"_")),[A("field"),e,t,"label"].join(".")},T=function(e,t){var r;return t&&(t=t.replace(/\./g,"_")),[A("field"),e,t,"help"].join(".")},M=function(e,t){var r;return t&&(t=t.replace(/\./g,"_")),[A("field"),e,t,"description"].join(".")},B=function(e,t){var r=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),n;return[A("field"),e,"group",r].join(".")},I=function(e,t,r){var n;return t&&(t=t.replace(/\./g,"_")),[A("field"),e,t,"options",r].join(".")},R=function(e,t){var r;return[A("action"),e,t].join(".")},N=function(e,t){var r;return[A("listview"),e,t].join(".")},F=function(e,t,r){var n,i=[E(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),S(i,e)||r||""};r.translationObjectLabel=F;var L=function(e,t,r){var n=O(t);return S(n,e)||r||""},P=function(e,t,r,n,i,o){var a,s=[C(t,r)],c=u.fallbackKeys.getObjectFieldLabelKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=P(e,f,r,n,i))}return l||n||""},q=function(e,t,r,n,i,o){var a,s=[T(t,r)],c=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=q(e,f,r,n,i))}return l||n||""},z=function(e,t,r,n,i,o){var a=M(t,r),s,u=S([a],e);if(1!=o&&!u){var c=j(i);c&&"base"!=t&&"core"!=t&&(u=z(e,c,r,n,i))}return u||n||""},U=function(e,t,r,n,i,o){var a,s=[B(t,r)],c=u.fallbackKeys.getObjectFieldGroupKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=U(e,f,r,n,i))}return l||n||""},$=function(e,t,r,n,i,o,a){var s,c=[I(t,r,n)],l=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,r,n);l&&c.push(l);var f=S(c,e);if(1!=a&&!f){var d=j(o);d&&"base"!=t&&"core"!=t&&(f=$(e,d,r,n,i,o))}return f||i||""},H=function(e,t,r,n,i,o){var a,s=[R(t,r)],c=u.fallbackKeys.getObjectActionLabelKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=H(e,f,r,n,i))}return l||n||""},W=function(e,t,r,n,i,o){var a,s=[N(t,r)],c=u.fallbackKeys.getObjectListviewLabelKey(t,r);c&&s.push(c);var l=S(s,e);if(1!=o&&!l){var f=j(i);f&&"base"!=t&&"core"!=t&&(l=W(e,f,r,n,i))}return l||n||""},Y=function(e,t,n,o,a){void 0===a&&(a=!1);var u=p(e,n),l=d.get(u);if(l)return Object.assign(n,(0,c.cloneDeep)(l));o&&(0,s.convertObject)(n),n.label=(0,r.translationObjectLabel)(e,t,n.label),n.description=L(e,t,n.description),i.each(n.fields,(function(r,o){if(r.label=P(e,t,o,r.label,n.datasource,a),r.inlineHelpText=q(e,t,o,r.inlineHelpText,n.datasource,a),r.description=z(e,t,o,r.description,n.datasource,a),r.group&&(r.group=U(e,t,r.group,r.group,n.datasource,a)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var u=$(e,t,o,r.value,r.label,n.datasource,a);s.push(i.extend({},r,{label:u}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=H(e,t,i,r.label,n.datasource,a)})),i.each(n.list_views,(function(r,i){r.label=W(e,t,i,r.label,n.datasource,a)})),d.set(u,(0,c.cloneDeep)(n))};r.translationObject=Y;var V=function(e,t){i.each(t,(function(t,n){(0,r.translationObject)(e,n,t)}))};r.translationObjects=V;var K=function(e,t,n){var o=b(n);(0,s.convertObject)(o);var a={};return a[E(t)]=(0,r.translationObjectLabel)(e,t,o.label),a[O(t)]=L(e,t,o.description),i.each(o.fields,(function(r,n){a[C(t,n)]=P(e,t,n,r.label),r.inlineHelpText&&(a[T(t,n)]=q(e,t,n,r.inlineHelpText,o.datasource)),r.description&&(a[M(t,n)]=z(e,t,n,r.description,o.datasource)),r.group&&(a[B(t,r.group)]=U(e,t,r.group,r.group,o.datasource)),r.options&&i.each(r.options,(function(r){i.has(r,"value")&&(a[I(t,n,r.value)]=$(e,t,n,r.value,r.label))}))})),i.each(o.actions,(function(r,n){a[R(t,n)]=H(e,t,n,r.label)})),i.each(o.list_views,(function(r,n){a[N(t,n)]=W(e,t,n,r.label)})),a};function G(e,t){var r=b(e);(0,s.convertObject)(r);var n={},o=r.name;return o||console.error("Error: Invalid objectTranslation:"+t),n[E(o)]=r.label,n[O(o)]=r.description,i.each(r.fields,(function(e,t){n[C(o,t)]=e.label,e.help&&(n[T(o,t)]=e.help),e.description&&(n[M(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(n[I(o,t,e.value)]=e.label)}))})),i.each(r.groups,(function(e,t){n[B(o,t)]=e})),i.each(r.actions,(function(e,t){n[R(o,t)]=e.label})),i.each(r.listviews,(function(e,t){n[N(o,t)]=e.label})),i.each(r.CustomLabels,(function(e,t){n[D(t)]=e})),n}r.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,a.addResourceBundle)(e.lng,y,t,!0,!0)}))};r.addObjectsTranslation=X},"translation.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.addTranslations=r.convertTranslation=r.convertTranslationData=r.getAppTranslationTemplate=r.translationApps=r.translationMenus=r.translationApp=r.translationTabLabel=r.translationTabGroup=void 0;var n=t("../index"),i=t("underscore"),o=t("./"),a=t("../i18n/i18n.app"),s=t("clone"),u="translation",c=".",l="app",f="menu",d="tab",h=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[h(),e].join(".")},b=function(e,t){var r={lng:t,ns:u,keySeparator:!1};if((0,n.exists)(e,r))return(0,n._t)(e,r)},m=function(e){var t;return[h("app"),e,"name"].join(".")},g=function(e){var t;return[h("app"),e,"description"].join(".")},v=function(e,t){var r,n;return[h("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[h("menu"),"menu_".concat(e)].join(".")},w=function(e){var t;return[h("tab"),e].join(".")},_=function(e,t,r){var n,i=[m(t)],o=a.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),b(i,e)||r||""},x=function(e,t,r){var n,i=[g(t)],o=a.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),b(i,e)||r||""},k=function(e,t,r,n){var i,o=[v(t,r)],s=a.appFallbackKeys.getAppGroupKey(t,r);return s&&o.push(s),b(o,e)||n||""};r.translationTabGroup=k;var S=function(e,t,r){var n,i=[y(t)],o=a.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),b(i,e)||r||""},j=function(e,t,r){var n,i=[w(t)],o=a.appFallbackKeys.getTabKey(t);return o&&i.push(o),b(i,e)||r||""};r.translationTabLabel=j;var A=function(e,t,n){n.label=_(e,t,n.label||n.name),n.description=x(e,t,n.description),i.each(n.tab_groups,(function(i,o){n.tab_groups[o].id=i.id||i.group_name,n.tab_groups[o].group_name=(0,r.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,r.translationMenus)(e,n.admin_menus)};r.translationApp=A;var D=function(e,t){i.each(t,(function(t){var r=S(e,t._id,t.label||t.name);t.label=r,t.name=r}))};r.translationMenus=D;var E=function(e,t){i.each(t,(function(t,n){(0,r.translationApp)(e,n,t)}))};r.translationApps=E;var O=function(e,t,r){var n=s(r),o={};return o[m(t)]=_(e,t,n.label||n.name),o[g(t)]=x(e,t,n.description),i.each(n.admin_menus,(function(t){o[y(t._id)]=S(e,t._id,t.label||t.name)})),o};r.getAppTranslationTemplate=O;var C=function(e,t,r){i.isArray(r)?i.each(r,(function(e){C(e,"",e)})):r&&i.each(i.keys(r),(function(n){var o=t?"".concat(t,".").concat(n):n,a=r[n];"object"==typeof a?i.isArray(a)?i.each(a,(function(e){C(e,o,a)})):C(e,o,a):e[o]=a}))};function T(e){for(var t in e)"object"==typeof e[t]&&C(e,t,e[t]);return e}r.convertTranslationData=T;var M=function(e){var t=s(e),r={};return i.each(t.CustomApplications,(function(e,t){r[m(t)]=e.name,r[g(t)]=e.description,i.each(e.groups,(function(e,n){r[v(t,n)]=e}))})),i.each(t.CustomTabs,(function(e,t){r[w(t)]=e})),i.each(t.CustomLabels,(function(e,t){var n;if("simpleschema"!=t&&i.isObject(e)){var o=T(((n={})[t]=e,n));i.each(o,(function(e,t){i.isObject(e)||(r[p(t)]=e)}))}else r[p(t)]=e})),r};r.convertTranslation=M;var B=function(e){i.each(e,(function(e){var t=(0,r.convertTranslation)(e.data);(0,n.addResourceBundle)(e.lng,u,t,!0,!0)}))};r.addTranslations=B},templates:{"objectTranslation.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getObjectMetadataTranslationTemplate=void 0;var n=t("underscore"),i=t("../index"),o=t("clone");function a(e,t){var r={};return n.each(e,(function(e){r[e]="help"===e?t.inlineHelpText||"":t[e]||""})),r}function s(e){return a(["label","description"],e)}function u(e){switch(e.type){case"select":return a(["label","help","options","description"],e);default:return a(["label","help","description"],e)}}function c(e){return a(["label"],e)}function l(e){return a(["label"],e)}function f(e){var t={};return n.each(e,(function(e,r){t[r]=u(e)})),t}function d(e){var t={};return n.each(e,(function(e,r){t[r]=l(e)})),t}function h(e){var t={};return n.each(e,(function(e,r){t[r]=c(e)})),t}function p(e,t){var r={};return n.each(e,(function(e,n){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");r[i]=t[n].group}})),r}var b=function(e,t,r,a){void 0===a&&(a=!1);var u=o(r);1!=a&&(0,i.translationObject)(e,t,u,!0,a);var c=Object.assign({},s(u));c=Object.assign({},c,{fields:f(u.fields)});var l=p(r.fields,u.fields);n.isEmpty(l)||(c=Object.assign({},c,{groups:l}));var b=h(u.list_views);n.isEmpty(b)||(c=Object.assign({},c,{listviews:b}));var m=d(u.actions);return n.isEmpty(m)||(c=Object.assign({},c,{actions:m})),Object.assign({name:t},c)};r.getObjectMetadataTranslationTemplate=b},"translation.js":function e(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getAppMetadataTranslationTemplate=void 0;var n=t("underscore"),i=t("../index"),o=t("clone");function a(e,t){var r={};return n.each(e,(function(e){r[e]=t[e]||""})),r}function s(e){var t={groups:{}};return e?(n.each(e,(function(e){var r=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[r]=e.group_name})),t):{}}var u=function(e){return Object.assign({},a(["name","description"],e),s(e.tab_groups))},c=function(e){var t={};return n.each(e,(function(e,r){t[r]=r})),t},l=function(e){var t={};return n.each(e,(function(e){var r=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[r]=e})),t},f=function(e,t,r){var n,a=o(r);(0,i.translationApp)(e,t,a);var s={},f;return a.tab_items?s=c(a.tab_items):a.tabs&&(s=l(a.tabs)),Object.assign({},{CustomApplications:(n={},n[t]=u(a),n)},{CustomTabs:s})};r.getAppMetadataTranslationTemplate=f}}}},node_modules:{i18next:{"package.json":function e(t,r,e){e.exports={name:"i18next",version:"19.9.2",main:"./dist/cjs/i18next.js",module:"./dist/esm/i18next.js"}},dist:{cjs:{"i18next.js":function e(t,r,e){"use strict";var n=t("@babel/runtime/helpers/typeof"),i=t("@babel/runtime/helpers/objectSpread"),o=t("@babel/runtime/helpers/classCallCheck"),a=t("@babel/runtime/helpers/createClass"),s=t("@babel/runtime/helpers/possibleConstructorReturn"),u=t("@babel/runtime/helpers/getPrototypeOf"),c=t("@babel/runtime/helpers/assertThisInitialized"),l=t("@babel/runtime/helpers/inherits");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=f(n),h=f(i),p=f(o),b=f(a),m=f(s),g=f(u),v=f(c),y=f(l),w={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,r){console&&console[t]&&console[t].apply(console,r)}},_,x=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,e),this.init(t,r)}return b.default(e,[{key:"init",value:function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||w,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n1?r-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function E(e,t,r){var n=D(e,t,Object),i,o;n.obj[n.k]=r}function O(e,t,r,n){var i=D(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],n&&(o[a]=o[a].concat(r)),n||o[a].push(r)}function C(e,t){var r=D(e,t),n=r.obj,i=r.k;if(n)return n[i]}function T(e,t,r){var n=C(e,r);return void 0!==n?n:C(t,r)}function M(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):M(e[n],t[n],r):e[n]=t[n]);return e}function B(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var I={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function R(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return I[e]})):e}var N="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,F=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return p.default(this,t),r=m.default(this,g.default(t).call(this)),N&&k.call(v.default(r)),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return y.default(t,e),b.default(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}},{key:"getResource",value:function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=[t,r];return n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(a=t.split(".")),C(this.data,a)}},{key:"addResource",value:function e(t,r,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var s=[t,r];n&&(s=s.concat(a?n.split(a):n)),t.indexOf(".")>-1&&(i=r,r=(s=t.split("."))[1]),this.addNamespaces(r),E(this.data,s,i),o.silent||this.emit("added",t,r,n,i)}},{key:"addResources",value:function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(t,r,o,n[o],{silent:!0});i.silent||this.emit("added",t,r,n)}},{key:"addResourceBundle",value:function e(t,r,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,r];t.indexOf(".")>-1&&(i=n,n=r,r=(s=t.split("."))[1]),this.addNamespaces(r);var u=C(this.data,s)||{};i?M(u,n,o):u=h.default({},u,n),E(this.data,s,u),a.silent||this.emit("added",t,r,n)}},{key:"removeResourceBundle",value:function e(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}},{key:"hasResourceBundle",value:function e(t,r){return void 0!==this.getResource(t,r)}},{key:"getResourceBundle",value:function e(t,r){return r||(r=this.options.defaultNS),"v1"===this.options.compatibilityAPI?h.default({},{},this.getResource(t,r)):this.getResource(t,r)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(k),L={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,r,n,i,o){var a=this;return t.forEach((function(e){a.processors[e]&&(r=a.processors[e].process(r,n,i,o))})),r}},P={},q=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p.default(this,t),r=m.default(this,g.default(t).call(this)),N&&k.call(v.default(r)),A(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,v.default(r)),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=x.create("translator"),r}return y.default(t,e),b.default(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(t,r);return n&&void 0!==n.res}},{key:"extractFromKey",value:function e(t,r){var n=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=r.ns||this.options.defaultNS;if(n&&t.indexOf(n)>-1){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:o};var s=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),t=s.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(r,n,i){var o=this;if("object"!==d.default(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==r)return"";Array.isArray(r)||(r=[String(r)]);var a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,s=this.extractFromKey(r[r.length-1],n),u=s.key,c=s.namespaces,l=c[c.length-1],f=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(p){var b=n.nsSeparator||this.options.nsSeparator;return l+b+u}return u}var m=this.resolve(r,n),g=m&&m.res,v=m&&m.usedKey||u,y=m&&m.exactUsedKey||u,w=Object.prototype.toString.apply(g),_=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g;if(k&&g&&S&&_.indexOf(w)<0&&("string"!=typeof x||"[object Array]"!==w)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,n):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(a){var j="[object Array]"===w,A=j?[]:{},D=j?y:v;for(var E in g)if(Object.prototype.hasOwnProperty.call(g,E)){var O="".concat(D).concat(a).concat(E);A[E]=this.translate(O,h.default({},n,{joinArrays:!1,ns:c})),A[E]===O&&(A[E]=g[E])}g=A}}else if(k&&"string"==typeof x&&"[object Array]"===w)(g=g.join(x))&&(g=this.extendTranslation(g,r,n,i));else{var C=!1,T=!1,M=void 0!==n.count&&"string"!=typeof n.count,B=t.hasDefaultValue(n),I=M?this.pluralResolver.getSuffix(f,n.count):"",R=n["defaultValue".concat(I)]||n.defaultValue;!this.isValidLookup(g)&&B&&(C=!0,g=R),this.isValidLookup(g)||(T=!0,g=u);var N=B&&R!==g&&this.options.updateMissing;if(T||C||N){if(this.logger.log(N?"updateKey":"missingKey",f,l,u,N?R:g),a){var F=this.resolve(u,h.default({},n,{keySeparator:!1}));F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var L=[],P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&P&&P[0])for(var q=0;q1&&void 0!==arguments[1]?arguments[1]:{},i,o,a,s,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!r.isValidLookup(i)){var t=r.extractFromKey(e,n),c=t.key;o=c;var l=t.namespaces;r.options.fallbackNS&&(l=l.concat(r.options.fallbackNS));var f=void 0!==n.count&&"string"!=typeof n.count,d=void 0!==n.context&&"string"==typeof n.context&&""!==n.context,h=n.lngs?n.lngs:r.languageUtils.toResolveHierarchy(n.lng||r.language,n.fallbackLng);l.forEach((function(e){r.isValidLookup(i)||(u=e,!P["".concat(h[0],"-").concat(e)]&&r.utils&&r.utils.hasLoadedNamespace&&!r.utils.hasLoadedNamespace(u)&&(P["".concat(h[0],"-").concat(e)]=!0,r.logger.warn('key "'.concat(o,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((function(t){if(!r.isValidLookup(i)){s=t;var o=c,u=[o],l,h;if(r.i18nFormat&&r.i18nFormat.addLookupKeys)r.i18nFormat.addLookupKeys(u,c,t,e,n);else f&&(l=r.pluralResolver.getSuffix(t,n.count)),f&&d&&u.push(o+l),d&&u.push(o+="".concat(r.options.contextSeparator).concat(n.context)),f&&u.push(o+=l);for(;h=u.pop();)r.isValidLookup(i)||(a=h,i=r.getResource(t,e,h,n))}})))}))}})),{res:i,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:u}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}}],[{key:"hasDefaultValue",value:function e(t){var r="defaultValue";for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&void 0!==t[n])return!0;return!1}}]),t}(k);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var U=function(){function e(t){p.default(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}return b.default(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var r=t.split("-");return 2===r.length?null:(r.pop(),"x"===r[r.length-1].toLowerCase()?null:this.formatLanguageCode(r.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=z(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=z(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=z(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var r=this,n;return t?(t.forEach((function(e){if(!n){var t=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(t)||(n=t)}})),!n&&this.options.supportedLngs&&t.forEach((function(e){if(!n){var t=r.getLanguagePartFromCode(e);if(r.isSupportedCode(t))return n=t;n=r.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n):null}},{key:"getFallbackCodes",value:function e(t,r){if(!t)return[];if("function"==typeof t&&(t=t(r)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!r)return t.default||[];var n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function e(t,r){var n=this,i=this.getFallbackCodes(r||this.options.fallbackLng||[],t),o=[],a=function e(t){t&&(n.isSupportedCode(t)?o.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(t))):"string"==typeof t&&a(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&a(n.formatLanguageCode(e))})),o}}]),e}(),$=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],H={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function W(){var e={};return $.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:H[t.fc]}}))})),e}var Y=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,e),this.languageUtils=t,this.options=r,this.logger=x.create("pluralResolver"),this.rules=W()}return b.default(e,[{key:"addRule",value:function e(t,r){this.rules[t]=r}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var r=this.getRule(t);return r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,r){return this.getSuffixes(t).map((function(e){return r+e}))}},{key:"getSuffixes",value:function e(t){var r=this,n=this.getRule(t);return n?n.numbers.map((function(e){return r.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,r){var n=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(r):i.plurals(Math.abs(r)),a=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===a?a="plural":1===a&&(a=""));var s=function e(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return"v1"===this.options.compatibilityJSON?1===a?"":"number"==typeof a?"_plural_".concat(a.toString()):s():"v2"===this.options.compatibilityJSON?s():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p.default(this,e),this.logger=x.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return b.default(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=void 0!==r.escape?r.escape:R,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?B(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?B(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?B(r.nestingPrefix):r.nestingPrefixEscaped||B("$t("),this.nestingSuffix=r.nestingSuffix?B(r.nestingSuffix):r.nestingSuffixEscaped||B(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=void 0!==r.alwaysFormat&&r.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function e(t,r,n,i){var o=this,a,s,u,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var f=function e(t){if(t.indexOf(o.formatSeparator)<0){var a=T(r,c,t);return o.alwaysFormat?o.format(a,void 0,n):a}var s=t.split(o.formatSeparator),u=s.shift().trim(),l=s.join(o.formatSeparator).trim();return o.format(T(r,c,u),l,n,i)};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return l(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?l(o.escape(t)):l(t)}}].forEach((function(e){for(u=0;a=e.regex.exec(t);){if(void 0===(s=f(a[1].trim())))if("function"==typeof d){var r=d(t,a,i);s="string"==typeof r?r:""}else{if(h){s=a[0];continue}o.logger.warn("missed to pass in variable ".concat(a[1]," for interpolating ").concat(t)),s=""}else"string"==typeof s||o.useRawValueToEscape||(s=j(s));if(t=t.replace(a[0],e.safeValue(s)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,r){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o,a,s=h.default({},i);function u(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0],i=(i=this.interpolate(i,s)).replace(/'/g,'"');try{s=JSON.parse(i),t&&(s=h.default({},t,s))}catch(o){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),o),"".concat(e).concat(r).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;o=this.nestingRegexp.exec(t);){var c=[],l=!1;if(o[0].includes(this.formatSeparator)&&!/{.*}/.test(o[1])){var f=o[1].split(this.formatSeparator).map((function(e){return e.trim()}));o[1]=f.shift(),c=f,l=!0}if((a=r(u.call(this,o[1].trim(),s),s))&&o[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=j(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return n.format(e,t,i.lng,i)}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}]),e}();function K(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}var G=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p.default(this,t),i=m.default(this,g.default(t).call(this)),N&&k.call(v.default(i)),i.backend=e,i.store=r,i.services=n,i.languageUtils=n.languageUtils,i.options=o,i.logger=x.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return y.default(t,e),b.default(t,[{key:"queueLoad",value:function e(t,r,n,i){var o=this,a=[],s=[],u=[],c=[];return t.forEach((function(e){var t=!0;r.forEach((function(r){var i="".concat(e,"|").concat(r);!n.reload&&o.store.hasResourceBundle(e,r)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?s.indexOf(i)<0&&s.push(i):(o.state[i]=1,t=!1,s.indexOf(i)<0&&s.push(i),a.indexOf(i)<0&&a.push(i),c.indexOf(r)<0&&c.push(r)))})),t||u.push(e)})),(a.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:i}),{toLoad:a,pending:s,toLoadLanguages:u,toLoadNamespaces:c}}},{key:"loaded",value:function e(t,r,n){var i=t.split("|"),o=i[0],a=i[1];r&&this.emit("failedLoading",o,a,r),n&&this.store.addResourceBundle(o,a,n),this.state[t]=r?-1:2;var e={};this.queue.forEach((function(n){O(n.loaded,[o],a),K(n.pending,t),r&&n.errors.push(r),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(t){e[t]||(e[t]=[]),n.loaded[t].length&&n.loaded[t].forEach((function(r){e[t].indexOf(r)<0&&e[t].push(r)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,r,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[n](t,r,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,r,n,o+1,2*a,s)}),a):s(e,u)})):s(null,{})}},{key:"prepareLoading",value:function e(t,r){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof r&&(r=[r]);var a=this.queueLoad(t,r,i,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function e(t,r,n){this.prepareLoading(t,r,{},n)}},{key:"reload",value:function e(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}},{key:"loadOne",value:function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],a=i[1];this.read(o,a,"read",void 0,void 0,(function(e,i){e&&r.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(o," failed"),e),!e&&i&&r.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(o),i),r.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,r,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(t,r,n,i,null,h.default({},a,{isUpdate:o})),t&&t[0]&&this.store.addResource(t[0],r,n,i))}}]),t}(k);function X(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var r={};if("object"===d.default(t[1])&&(r=t[1]),"string"==typeof t[1]&&(r.defaultValue=t[1]),"string"==typeof t[2]&&(r.tDescription=t[2]),"object"===d.default(t[2])||"object"===d.default(t[3])){var n=t[3]||t[2];Object.keys(n).forEach((function(e){r[e]=n[e]}))}return r},interpolation:{escapeValue:!0,format:function e(t,r,n,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function Z(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function J(){}var Q,ee=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(p.default(this,t),e=m.default(this,g.default(t).call(this)),N&&k.call(v.default(e)),e.options=Z(r),e.services={},e.logger=x,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),m.default(e,v.default(e));setTimeout((function(){e.init(r,n)}),0)}return e}return y.default(t,e),b.default(t,[{key:"init",value:function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof r&&(n=r,r={}),r.whitelist&&!r.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),r.nonExplicitWhitelist&&!r.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=h.default({},X(),this.options,Z(r)),this.format=this.options.interpolation.format,n||(n=J),!this.options.isClone){this.modules.logger?x.init(i(this.modules.logger),this.options):x.init(null,this.options);var o=new U(this.options);this.store=new F(this.options.resources,this.options);var a=this.services;a.logger=x,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new Y(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new V(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new G(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments),t}}));var l=S(),f=function e(){var r=function e(r,i){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(i),n(r,i)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return r(null,t.t.bind(t));t.changeLanguage(t.options.lng,r)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),l}},{key:"loadResources",value:function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,i=n,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var a=[],s=function e(t){var n;t&&r.services.languageUtils.toResolveHierarchy(t).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};if(o)s(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(a,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,r,n){var i=S();return t||(t=this.languages),r||(r=this.options.ns),n||(n=J),this.services.backendConnector.reload(t,r,(function(e){i.resolve(),n(e)})),i}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&L.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,r){var n=this;this.isLanguageChangingTo=t;var i=S();this.emit("languageChanging",t);var o=function e(t,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,i.resolve((function(){return n.t.apply(n,arguments)})),r&&r(t,(function(){return n.t.apply(n,arguments)}))},a=function e(t){var r="string"==typeof t?t:n.services.languageUtils.getBestMatchFromCodes(t);r&&(n.language||(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r)),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,(function(e){o(e,r)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,r){var n=this,i=function e(t,r){var i;if("object"!==d.default(r)){for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;s1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],o=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var s=function e(t,n){var i=r.services.backendConnector.state["".concat(t,"|").concat(n)];return-1===i||2===i};if(n.precheck){var u=n.precheck(this,s);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!s(i,t)||o&&!s(a,t)))}},{key:"loadNamespaces",value:function e(t,r){var n=this,i=S();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),r&&r(e)})),i):(r&&r(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,r){var n=S();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){n.resolve(),r&&r(e)})),n):(r&&r(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var r}},{key:"createInstance",value:function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(r,n)}},{key:"cloneInstance",value:function e(){var r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,o=h.default({},this.options,n,{isClone:!0}),a=new t(o),s=["store","services","language"];return s.forEach((function(e){a[e]=r[e]})),a.services=h.default({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new q(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0&&r<=y}}function Z(e){return function(t){return null==t?void 0:t[e]}}var J=Z("byteLength"),Q=X(J),ee=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function te(e){return p?p(e)&&!U(e):Q(e)&&ee.test(s.call(e))}var re=c?te:G(!1),ne=Z("length");function ie(e){for(var t={},r=e.length,n=0;n":">",'"':""","'":"'","`":"`"},st=ot(at),ut,ct=ot(Ce(at)),lt=ce.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},ft=/(.)^/,dt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ht=/\\|'|\r|\n|\u2028|\u2029/g;function pt(e){return"\\"+dt[e]}var bt=/^\s*(\w|\$)+\s*$/;function mt(e,t,r){!t&&r&&(t=r),t=Re({},t,ce.templateSettings);var n=RegExp([(t.escape||ft).source,(t.interpolate||ft).source,(t.evaluate||ft).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(n,(function(t,r,n,a,s){return o+=e.slice(i,s).replace(ht,pt),i=s+t.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t})),o+="';\n";var a=t.variable,s;if(a){if(!bt.test(a))throw new Error("variable is not a bare identifier: "+a)}else o="with(obj||{}){\n"+o+"}\n",a="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{s=new Function(a,"_",o)}catch(c){throw c.source=o,c}var u=function(e){return s.call(this,e,ce)};return u.source="function("+a+"){\n"+o+"}",u}function gt(e,t,r){var n=(t=Ue(t)).length;if(!n)return N(r)?r.call(e):r;for(var i=0;i1)jt(s,t-1,r,n),i=n.length;else for(var u=0,c=s.length;ut?(n&&(clearTimeout(n),n=null),s=c,a=e.apply(i,o),n||(i=o=null)):n||!1===r.trailing||(n=setTimeout(u,l)),a};return c.cancel=function(){clearTimeout(n),s=0,n=i=o=null},c}function Tt(e,t,r){var n,i,o,a,s,u=function(){var c=it()-i;t>c?n=setTimeout(u,t-c):(n=null,r||(a=e.apply(s,o)),n||(o=s=null))},c=w((function(c){return s=this,o=c,i=it(),n||(n=setTimeout(u,t),r&&(a=e.apply(s,o))),a}));return c.cancel=function(){clearTimeout(n),n=o=s=null},c}function Mt(e,t){return xt(t,e)}function Bt(e){return function(){return!e.apply(this,arguments)}}function It(){var e=arguments,t=e.length-1;return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n);return n}}function Rt(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function Nt(e,t){var r;return function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=null),r}}var Ft=xt(Nt,2);function Lt(e,t,r){t=Je(t,r);for(var n=ae(e),i,o=0,a=n.length;o0?0:i-1;o>=0&&o0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(r&&o&&u)return n[o=r(n,i)]===i?o:-1;if(i!=i)return(o=t(a.call(n,s,u),K))>=0?o+s:-1;for(o=e>0?s:u-1;o>=0&&o0?0:a-1;for(i||(n=t[o?o[s]:s],s+=e);s>=0&&s=3;return t(e,Ge(r,i,4),n,o)}}var Zt=Xt(1),Jt=Xt(-1);function Qt(e,t,r){var n=[];return t=Je(t,r),Kt(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function er(e,t,r){return Qt(e,Bt(Je(t)),r)}function tr(e,t,r){t=Je(t,r);for(var n=!St(e)&&ae(e),i=(n||e).length,o=0;o=0}var ir=w((function(e,t,r){var n,i;return N(t)?i=t:(t=Ue(t),n=t.slice(0,-1),t=t[t.length-1]),Gt(e,(function(e){var o=i;if(!o){if(n&&n.length&&(e=$e(e,n)),null==e)return;o=e[t]}return null==o?o:o.apply(e,r)}))}));function or(e,t){return Gt(e,Ke(t))}function ar(e,t){return Qt(e,Ve(t))}function sr(e,t,r){var n=-1/0,i=-1/0,o,a;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=St(e)?e:Ee(e)).length;sn&&(n=o);else t=Je(t,r),Kt(e,(function(e,r,o){((a=t(e,r,o))>i||a===-1/0&&n===-1/0)&&(n=e,i=a)}));return n}function ur(e,t,r){var n=1/0,i=1/0,o,a;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=St(e)?e:Ee(e)).length;sn||void 0===r)return 1;if(r1&&(n=Ge(n,t[1])),t=be(e)):(n=wr,t=jt(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i1&&(n=t[1])):(t=Gt(jt(t,!1,!1),String),r=function(e,r){return!nr(t,r)}),_r(e,r,n)}));function kr(e,t,r){return a.call(e,0,Math.max(0,e.length-(null==t||r?1:t)))}function Sr(e,t,r){return null==e||e.length<1?null==t||r?void 0:[]:null==t||r?e[0]:kr(e,e.length-t)}function jr(e,t,r){return a.call(e,null==t||r?1:t)}function Ar(e,t,r){return null==e||e.length<1?null==t||r?void 0:[]:null==t||r?e[e.length-1]:jr(e,Math.max(0,e.length-t))}function Dr(e){return Qt(e,Boolean)}function Er(e,t){return jt(e,t,!1)}var Or=w((function(e,t){return t=jt(t,!0,!0),Qt(e,(function(e){return!nr(t,e)}))})),Cr=w((function(e,t){return Or(e,t)}));function Tr(e,t,r,n){S(t)||(n=r,r=t,t=!1),null!=r&&(r=Je(r,n));for(var i=[],o=[],a=0,s=ne(e);ae(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},c=new Set,l=(e,t)=>{const r=`LRU_CACHE_OPTION_${e}`;p(r)&&b(r,`${e} option`,`options.${t}`,w)},f=(e,t)=>{const r=`LRU_CACHE_METHOD_${e}`;if(p(r)){const{prototype:n}=w,{get:i}=Object.getOwnPropertyDescriptor(n,e);b(r,`${e} method`,`cache.${t}()`,i)}},d=(e,t)=>{const r=`LRU_CACHE_PROPERTY_${e}`;if(p(r)){const{prototype:n}=w,{get:i}=Object.getOwnPropertyDescriptor(n,e);b(r,`${e} property`,`cache.${t}`,i)}},h=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!c.has(e),b=(e,t,r,n)=>{c.add(e);const i=`The ${t} is deprecated. Please use ${r} instead.`;h(i,"DeprecationWarning",e,n)},m=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),g=e=>m(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=g(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class w{constructor(e={}){const{max:t=0,ttl:r,ttlResolution:n=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:s,dispose:u,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:b,maxSize:v=0,maxEntrySize:_=0,sizeCalculation:x,fetchMethod:k,fetchContext:S,noDeleteOnFetchRejection:j,noDeleteOnStaleGet:A}=e,{length:D,maxAge:E,stale:O}=e instanceof w?{}:e;if(0!==t&&!m(t))throw new TypeError("max option must be a nonnegative integer");const C=t?g(t):Array;if(!C)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=x||D,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=k||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=S,!this.fetchMethod&&void 0!==S)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new C(t),this.prev=new C(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof f?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!b,this.noDeleteOnFetchRejection=!!j,0!==this.maxEntrySize){if(0!==this.maxSize&&!m(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!m(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!s||!!O,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=m(n)||0===n?n:1,this.ttlAutopurge=!!i,this.ttl=r||E||0,this.ttl){if(!m(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){c.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";h(t,"UnboundedCacheWarning",e,w)}}O&&l("stale","allowStale"),E&&l("maxAge","ttl"),D&&l("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,r=n.now())=>{if(this.starts[e]=0!==t?r:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const r=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);r.unref&&r.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?n.now():0};let e=0;const t=()=>{const t=n.now();if(this.ttlResolution>0){e=t;const r=setTimeout(()=>e=0,this.ttlResolution);r.unref&&r.unref()}return t};this.getRemainingTTL=r=>{const n=this.keyMap.get(r);return void 0===n?0:0===this.ttls[n]||0===this.starts[n]?1/0:this.starts[n]+this.ttls[n]-(e||t())},this.isStale=r=>0!==this.ttls[r]&&0!==this.starts[r]&&(e||t())-this.starts[r]>this.ttls[r]}updateItemAge(e){}setItemTTL(e,t,r){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,r,n)=>{if(this.isBackgroundFetch(t))return 0;if(!m(r)){if(!n)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!m(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,r,n){if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const r of this.indexes())if(e(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],t)}forEach(e,t=this){for(const r of this.indexes())e.call(t,this.valList[r],this.keyList[r],this)}rforEach(e,t=this){for(const r of this.rindexes())e.call(t,this.valList[r],this.keyList[r],this)}get prune(){return f("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const r=this.keyList[t],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,a={value:o};if(this.ttls){a.ttl=this.ttls[t];const e=n.now()-this.starts[t];a.start=Math.floor(Date.now()-e)}this.sizes&&(a.size=this.sizes[t]),e.unshift([r,a])}return e}load(e){this.clear();for(const[t,r]of e){if(r.start){const e=Date.now()-r.start;r.start=n.now()-e}this.set(t,r.value,r)}}dispose(e,t,r){}set(e,t,{ttl:r=this.ttl,start:n,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:s=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,a),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),s=!1;else{const r=this.valList[u];t!==r&&(this.isBackgroundFetch(r)?r.__abortController.abort():i||(this.dispose(r,e,"set"),this.disposeAfter&&this.disposed.push([r,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===r||0!==this.ttl||this.ttls||this.initializeTTLTracking(),s||this.setItemTTL(u,r,n),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,r=this.keyList[t],n=this.valList[t];return this.isBackgroundFetch(n)?n.__abortController.abort():(this.dispose(n,r,"evict"),this.disposeAfter&&this.disposed.push([n,r,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(r),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const r=this.keyMap.get(e);return void 0!==r&&!this.isStale(r)&&(t&&this.updateItemAge(r),!0)}peek(e,{allowStale:t=this.allowStale}={}){const r=this.keyMap.get(e);if(void 0!==r&&(t||!this.isStale(r))){const e=this.valList[r];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,r,n){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const a=new o,s={signal:a.signal,options:r,context:n},u=t=>(a.signal.aborted||this.set(e,t,s.options),t),c=n=>{if(this.valList[t]===f){const n=!r.noDeleteOnFetchRejection||void 0===f.__staleWhileFetching;n?this.delete(e):this.valList[t]=f.__staleWhileFetching}if(f.__returned===f)throw n},l=t=>t(this.fetchMethod(e,i,s)),f=new Promise(l).then(u,c);return f.__abortController=a,f.__staleWhileFetching=i,f.__returned=null,void 0===t?(this.set(e,f,s.options),t=this.keyMap.get(e)):this.valList[t]=f,f}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,fetchContext:l=this.fetchContext,forceRefresh:f=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:n});const d={allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:i,noDisposeOnSet:o,size:a,sizeCalculation:s,noUpdateTTL:u,noDeleteOnFetchRejection:c};let h=this.keyMap.get(e);if(void 0===h){const t=this.backgroundFetch(e,h,d,l);return t.__returned=t}{const n=this.valList[h];if(this.isBackgroundFetch(n))return t&&void 0!==n.__staleWhileFetching?n.__staleWhileFetching:n.__returned=n;if(!f&&!this.isStale(h))return this.moveToTail(h),r&&this.updateItemAge(h),n;const i=this.backgroundFetch(e,h,d,l);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],a=this.isBackgroundFetch(o);if(this.isStale(i))return a?t?o.__staleWhileFetching:void 0:(n||this.delete(e),t?o:void 0);if(a)return;return this.moveToTail(i),r&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return f("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const r=this.keyMap.get(e);if(void 0!==r)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(r);const t=this.valList[r];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const r=this.keyList[e];this.dispose(t,r,"delete"),this.disposeAfter&&this.disposed.push([t,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return f("reset","clear"),this.clear}get length(){return d("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=w}}}},"form-builder":{"package.json":function e(t,r,e){e.exports={name:"@steedos/form-builder",version:"3.6.2-patch.5",private:!1,publishConfig:{access:"public"},main:"dist/form-builder.min.js",homepage:"https://formbuilder.online/",repository:{url:"https://github.com/kevinchappell/formBuilder.git",type:"git"},files:["dist/**/*","docs/**/*","src/**/*"],author:"Kevin Chappell ",contributors:[],bugs:"https://github.com/kevinchappell/formBuilder/issues",description:"A jQuery plugin for drag and drop form building",keywords:["jquery-plugin","forms","drag and drop","form builder","form create"],license:"MIT",ignore:["**/*","node_modules","test"],config:{files:{test:["test/**/*.spec.js"],pluginsDir:"src/js/control_plugins/",fonts:"src/fonts",sass:"src/sass",formBuilder:{js:"src/js/form-builder.js",sass:["src/sass/form-builder.scss"]},formRender:{js:"src/js/form-render.js",sass:["src/sass/form-render.scss"]},site:["demo/assets/sass/site.scss"]},fontServer:"http://fontello.com",fontelloToken:"09d648f01d6c57cb9f9b8cc55043e0c0"},babel:{presets:[["@babel/preset-env",{targets:{browsers:["> 1%"]},loose:!0}]],comments:!1,plugins:["@babel/plugin-proposal-object-rest-spread","@babel/plugin-proposal-class-properties"]},scripts:{"build:analyze":"webpack --mode production -p --progress --config tools/webpack.config --analyze","build:plugins":"webpack --mode production -p --display-entrypoints --progress --config tools/webpack.plugins.config","build:vendor":"babel-node tools/build-vendor",build:"webpack --mode production -p --progress --config tools/webpack.config","build:all":"npm-run-all build:plugins build:vendor build copy",copy:"cp -a dist/* demo/assets/js/ && cp CONTRIBUTING.md docs/contributing.md && cp LICENSE docs/license.md && npm run copy:lang","copy:lang":"babel-node tools/copy-language-files","deploy:all":"npm-run-all deploy:demo deploy:site","deploy:demo":"node tools/deploy-demo.js","deploy:site":"node tools/deploy-site.js",docs:"mkdocs build",font:"babel-node tools/icon-font",lint:"eslint ./src --ext .js || true","semantic-release":"semantic-release","start:devServer":"webpack-dev-server --mode development --config tools/webpack.config",prestart:"npm-run-all -p build:vendor copy:lang",start:"npm run start:devServer",test:"npm run-script build"},dependencies:{jquery:">=3.4.1","jquery-ui-sortable":"*"},devDependencies:{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/node":"^7.10.5","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-syntax-object-rest-spread":"^7.8.3","@babel/plugin-transform-destructuring":"^7.10.4","@babel/preset-env":"^7.11.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.5",autoprefixer:"^9.8.6","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","clean-webpack-plugin":"^3.0.0",clui:"^0.3.6","compression-webpack-plugin":"^5.0.1","concat-files":"^0.1.1","cross-env":"^7.0.2","css-loader":"^4.2.1",eslint:"^7.7.0","eslint-loader":"^4.0.2","formbuilder-languages":"latest","fs-extra":"^9.0.1","html-webpack-harddisk-plugin":"^1.0.2","html-webpack-plugin":"^4.3.0",inquirer:"^7.3.3",mi18n:"^0.4.8","node-sass":"6.0.1","npm-run-all":"^4.1.5",opener:"^1.5.1","postcss-loader":"^3.0.0","replace-in-file":"^6.1.0",request:"^2.88.2","sass-loader":"10.5.2","semantic-release":"^17.1.1",semver:"^7.3.2","style-loader":"^1.2.1",unzipper:"^0.10.11",webpack:"^4.44.1","webpack-bundle-analyzer":"^3.8.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","wrapper-webpack-plugin":"^2.1.0"},prettier:{singleQuote:!0,trailingComma:"all",printWidth:120,semi:!1,arrowParens:"avoid",spaceAfterFunction:!1},engines:{},release:{branch:"master",verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},browserslist:["> 1%"]}},dist:{"form-builder.min.js":function e(t,r){ /*! * jQuery formBuilder: https://formbuilder.online/ * Version: 3.6.2-patch.5 @@ -472,7 +472,7 @@ Package._define("mrt:moment"); Package._define("steedos:loaders-css"); -!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.mongo.Mongo,i=Package.tracker.Tracker,r=Package.tracker.Deps,c=Package.underscore._,a=Package.ejson.EJSON,s=Package.minimongo.LocalCollection,u=Package.minimongo.Minimongo,l;(function(){var e={},n=Package.tracker&&Package.tracker.Tracker||Package.deps.Deps,i=t.isServer&&new t.EnvironmentVariable;if((l={defaults:{before:{insert:{},update:{},remove:{},upsert:{},find:{},findOne:{},all:{}},after:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}},all:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}}},directEnv:new t.EnvironmentVariable,directOp:function t(e){return this.directEnv.withValue(!0,e)},hookedOp:function t(e){return this.directEnv.withValue(!1,e)}}).getUserId=function e(){var o;if(t.isClient&&n.nonreactive((function(){o=t.userId&&t.userId()})),t.isServer){try{o=t.userId&&t.userId()}catch(r){}null==o&&(o=i.get())}return null==o&&(o=l.defaultUserId),o},l.extendCollectionInstance=function n(o,i){c.each(["before","after"],(function(n){c.each(e,(function(e,i){"upsert"===e&&"after"===n||(t._ensure(o,n,i),t._ensure(o,"_hookAspects",i),o._hookAspects[i][n]=[],o[n][i]=function(t,e){var r=o._hookAspects[i][n].push({aspect:t,options:l.initOptions(e,n,i)});return{replace:function(t,e){o._hookAspects[i][n].splice(r-1,1,{aspect:t,options:l.initOptions(e,n,i)})},remove:function(){o._hookAspects[i][n].splice(r-1,1)}}})}))})),o.hookOptions=a.clone(l.defaults),c.each(e,(function(e,n){var r=t.isClient||"upsert"===n?o:o._collection,a=r[n];t._ensure(o,"direct",n),o.direct[n]=function(){var t=arguments;return l.directOp((function(){return i.prototype[n].apply(o,t)}))},r[n]=function(){return!0===l.directEnv.get()?a.apply(r,arguments):e.call(this,l.getUserId(),a,o,"upsert"===n?{insert:o._hookAspects.insert||{},update:o._hookAspects.update||{},upsert:o._hookAspects.upsert||{}}:o._hookAspects[n]||{},(function(t){return c.isFunction(o._transform)?function(e){return o._transform(e||t)}:function(e){return e||t}}),c.toArray(arguments),!1)}}))},l.defineAdvice=function t(n,o){e[n]=o},l.getAdvice=function t(n){return e[n]},l.initOptions=function t(e,n,o){return l.extendOptions(l.defaults,e,n,o)},l.extendOptions=function t(e,n,o,i){return n=c.extend(n||{},e.all.all),n=c.extend(n,e[o].all),n=c.extend(n,e.all[i]),n=c.extend(n,e[o][i])},l.getDocs=function t(e,n,o){var i={transform:null,reactive:!1};return o&&(o.multi||(i.limit=1),c.extend(i,c.omit(o,"multi","upsert"))),e.find(n,i)},l.getFields=function t(e){var n=[],o=["$addToSet","$bit","$currentDate","$inc","$max","$min","$pop","$pull","$pullAll","$push","$rename","$set","$unset"];return c.each(e,(function(t,e){c.contains(o,e)?c.each(c.keys(t),(function(t){-1!==t.indexOf(".")&&(t=t.substring(0,t.indexOf("."))),c.contains(n,t)||n.push(t)})):n.push(e)})),n},l.reassignPrototype=function e(n,i){var r="function"==typeof Object.setPrototypeOf;i||(i=void 0!==o?o.Collection:t.Collection),r?Object.setPrototypeOf(n,i.prototype):n.__proto__&&(n.__proto__=i.prototype)},l.wrapCollection=function t(e,n){n._CollectionConstructor||(n._CollectionConstructor=n.Collection),n._CollectionPrototype||(n._CollectionPrototype=new n.Collection(null));var o=e._NewCollectionContructor||n._CollectionConstructor,i=n._CollectionPrototype;for(var r in e.Collection=function(){var t=o.apply(this,arguments);return l.extendCollectionInstance(this,o),t},e._NewCollectionContructor=e.Collection,e.Collection.prototype=i,e.Collection.prototype.constructor=e.Collection,o)o.hasOwnProperty(r)&&(e.Collection[r]=o[r]);e.Collection.apply=Function.prototype.apply},l.modify=s._modify,void 0!==o?(l.wrapCollection(t,o),l.wrapCollection(o,o)):l.wrapCollection(t,t),t.isServer){var r=t.publish;t.publish=function(t,e,n){return r.call(this,t,(function(){var t=this,n=arguments;return i.withValue(t&&t.userId,(function(){return e.apply(t,n)}))}),n)},l.isWithinPublish=function t(){return void 0!==i.get()}}}).call(this),function(){l.defineAdvice("insert",(function(t,e,n,i,r,s,u){var l=this,f={context:this,_super:e,args:s},p=c.last(s),d=c.isFunction(p),h,v;if(!u)try{if(c.each(i.before,(function(e){var n;!1===e.aspect.call(c.extend({transform:r(s[0])},f),t,s[0])&&(h=!0)})),h)return}catch(m){if(d)return p.call(this,m);throw m}function _(e,n){var l=s[0];if(e&&(c.isObject(e)&&e.ops&&(e=l._id._str?new o.ObjectID(l._id._str.toString()):e.ops&&e.ops[0]&&e.ops[0]._id),(l=a.clone(s[0]))._id=e),!u){var p=c.extend({transform:r(l),_id:e,err:n},f);c.each(i.after,(function(e){e.aspect.call(p,t,l)}))}return e}return d?(s[s.length-1]=function(t,e){return _(e&&e[0]&&e[0]._id||e,t),p.apply(this,arguments)},e.apply(this,s)):_((v=e.apply(this,s))&&v[0]&&v[0]._id||v)}))}.call(this),function(){l.defineAdvice("update",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m,g={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(_=l.getFields(r[1]),h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.after)||(g.mutator=a.clone(r[1]),g.options=a.clone(r[2]),c.some(o.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(g.docs={},c.each(h,(function(t){g.docs[t._id]=a.clone(t)})))),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n,_,r[1],r[2])&&(m=!0)}))})),m)return 0}catch(k){if(d)return p.call(u,k);throw k}function y(e,a){if(!s){if(!c.isEmpty(o.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:g.docs&&g.docs[o._id],affected:e,err:a},f),t,o,p,g.mutator,g.options)}))}))}}if(d)return r[r.length-1]=function(t,e){return y(e,t),p.apply(this,arguments)},e.apply(this,r);var C=e.apply(u,r);return y(C),C}))}.call(this),function(){l.defineAdvice("remove",(function(t,e,n,o,i,r,s){var u=this,f={context:this,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_=[];if(!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(h=l.getDocs.call(this,n,r[0]).fetch()),c.isEmpty(o.after)||c.each(h,(function(t){_.push(a.clone(t))})),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n)&&(v=!0)}))})),v)return 0}catch(y){if(d)return p.call(this,y);throw y}function m(e){s||c.each(o.after,(function(n){c.each(_,(function(o){n.aspect.call(c.extend({transform:i(o),err:e},f),t,o)}))}))}if(d)return r[r.length-1]=function(t){return m(t),p.apply(this,arguments)},e.apply(this,r);var g=e.apply(this,r);return m(),g}))}.call(this),function(){l.defineAdvice("upsert",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s&&(c.isEmpty(o.upsert.before)||(h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.update.after)||c.some(o.update.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(m.mutator=a.clone(r[1]),m.options=a.clone(r[2]),m.docs={},c.each(h,(function(t){m.docs[t._id]=a.clone(t)}))),c.each(o.upsert.before,(function(e){var n;!1===e.aspect.call(f,t,r[0],r[1],r[2])&&(_=!0)})),_))return{numberAffected:0};function g(e,a){if(!s){if(!c.isEmpty(o.update.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.update.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:m.docs&&m.docs[o._id],affected:e,err:a},f),t,o,p,m.mutator,m.options)}))}))}}function y(e,a){if(!s){if(!c.isEmpty(o.insert.after))var p=l.getDocs.call(u,n,{_id:e},r[0],{}).fetch()[0],d=c.extend({transform:i(p),_id:e,err:a},f);c.each(o.insert.after,(function(e){e.aspect.call(d,t,p)}))}}if(d)return r[r.length-1]=function(t,e){return t||e&&e.insertedId?y(e.insertedId,t):g(e&&e.numberAffected,t),l.hookedOp((function(){return p.call(this,t,e)}))},l.directOp((function(){return e.apply(u,r)}));var C=l.directOp((function(){return e.apply(u,r)}));return C&&C.insertedId?y(C.insertedId):g(C&&C.numberAffected),C}))}.call(this),function(){l.defineAdvice("find",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),!a&&(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),f))return n.find(void 0);function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}return p(l=e.apply(this,r)),l}))}.call(this),function(){l.defineAdvice("findOne",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),a||(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),!f))return p(l=e.apply(this,r)),l;function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}}))}.call(this),function(){if(t.users){l.reassignPrototype(t.users);var e=void 0!==o&&void 0!==o.Collection?o.Collection:t.Collection;l.extendCollectionInstance(t.users,e)}}.call(this),Package._define("matb33:collection-hooks",{CollectionHooks:l})}(); +!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.mongo.Mongo,i=Package.tracker.Tracker,r=Package.tracker.Deps,c=Package.underscore._,a=Package.ejson.EJSON,s=Package.minimongo.LocalCollection,u=Package.minimongo.Minimongo,l,f;(function(){var e={},n=Package.tracker&&Package.tracker.Tracker||Package.deps.Deps,i=t.isServer&&new t.EnvironmentVariable;if((l={defaults:{before:{insert:{},update:{},remove:{},upsert:{},find:{},findOne:{},all:{}},after:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}},all:{insert:{},update:{},remove:{},find:{},findOne:{},all:{}}},directEnv:new t.EnvironmentVariable,directOp:function t(e){return this.directEnv.withValue(!0,e)},hookedOp:function t(e){return this.directEnv.withValue(!1,e)}}).getUserId=function e(){var o;if(t.isClient&&n.nonreactive((function(){o=t.userId&&t.userId()})),t.isServer){try{o=t.userId&&t.userId()}catch(r){}null==o&&(o=i.get())}return null==o&&(o=l.defaultUserId),o},l.extendCollectionInstance=function n(o,i){c.each(["before","after"],(function(n){c.each(e,(function(e,i){"upsert"===e&&"after"===n||(t._ensure(o,n,i),t._ensure(o,"_hookAspects",i),o._hookAspects[i][n]=[],o[n][i]=function(t,e){var r=o._hookAspects[i][n].push({aspect:t,options:l.initOptions(e,n,i)});return{replace:function(t,e){o._hookAspects[i][n].splice(r-1,1,{aspect:t,options:l.initOptions(e,n,i)})},remove:function(){o._hookAspects[i][n].splice(r-1,1)}}})}))})),o.hookOptions=a.clone(l.defaults),c.each(e,(function(e,n){var r=t.isClient||"upsert"===n?o:o._collection,a=r[n];t._ensure(o,"direct",n),o.direct[n]=function(){var t=arguments;return l.directOp((function(){return i.prototype[n].apply(o,t)}))},r[n]=function(){return!0===l.directEnv.get()?a.apply(r,arguments):e.call(this,l.getUserId(),a,o,"upsert"===n?{insert:o._hookAspects.insert||{},update:o._hookAspects.update||{},upsert:o._hookAspects.upsert||{}}:o._hookAspects[n]||{},(function(t){return c.isFunction(o._transform)?function(e){return o._transform(e||t)}:function(e){return e||t}}),c.toArray(arguments),!1)}}))},l.defineAdvice=function t(n,o){e[n]=o},l.getAdvice=function t(n){return e[n]},l.initOptions=function t(e,n,o){return l.extendOptions(l.defaults,e,n,o)},l.extendOptions=function t(e,n,o,i){return n=c.extend(n||{},e.all.all),n=c.extend(n,e[o].all),n=c.extend(n,e.all[i]),n=c.extend(n,e[o][i])},l.getDocs=function t(e,n,o){var i={transform:null,reactive:!1};return o&&(o.multi||(i.limit=1),c.extend(i,c.omit(o,"multi","upsert"))),e.find(n,i)},l.getFields=function t(e){var n=[],o=["$addToSet","$bit","$currentDate","$inc","$max","$min","$pop","$pull","$pullAll","$push","$rename","$set","$unset"];return c.each(e,(function(t,e){c.contains(o,e)?c.each(c.keys(t),(function(t){-1!==t.indexOf(".")&&(t=t.substring(0,t.indexOf("."))),c.contains(n,t)||n.push(t)})):n.push(e)})),n},l.reassignPrototype=function e(n,i){var r="function"==typeof Object.setPrototypeOf;i||(i=void 0!==o?o.Collection:t.Collection),r?Object.setPrototypeOf(n,i.prototype):n.__proto__&&(n.__proto__=i.prototype)},l.wrapCollection=function t(e,n){n._CollectionConstructor||(n._CollectionConstructor=n.Collection),n._CollectionPrototype||(n._CollectionPrototype=new n.Collection(null));var o=e._NewCollectionContructor||n._CollectionConstructor,i=n._CollectionPrototype;for(var r in e.Collection=function(){var t=o.apply(this,arguments);return l.extendCollectionInstance(this,o),t},e._NewCollectionContructor=e.Collection,e.Collection.prototype=i,e.Collection.prototype.constructor=e.Collection,o)o.hasOwnProperty(r)&&(e.Collection[r]=o[r]);e.Collection.apply=Function.prototype.apply},l.modify=s._modify,void 0!==o?(l.wrapCollection(t,o),l.wrapCollection(o,o)):l.wrapCollection(t,t),t.isServer){var r=t.publish;t.publish=function(t,e,n){return r.call(this,t,(function(){var t=this,n=arguments;return i.withValue(t&&t.userId,(function(){return e.apply(t,n)}))}),n)},l.isWithinPublish=function t(){return void 0!==i.get()}}}).call(this),function(){l.defineAdvice("insert",(function(t,e,n,i,r,s,u){var l=this,f={context:this,_super:e,args:s},p=c.last(s),d=c.isFunction(p),h,v;if(!u)try{if(c.each(i.before,(function(e){var n;!1===e.aspect.call(c.extend({transform:r(s[0])},f),t,s[0])&&(h=!0)})),h)return}catch(m){if(d)return p.call(this,m);throw m}function _(e,n){var l=s[0];if(e&&(c.isObject(e)&&e.ops&&(e=l._id._str?new o.ObjectID(l._id._str.toString()):e.ops&&e.ops[0]&&e.ops[0]._id),(l=a.clone(s[0]))._id=e),!u){var p=c.extend({transform:r(l),_id:e,err:n},f);c.each(i.after,(function(e){e.aspect.call(p,t,l)}))}return e}return d?(s[s.length-1]=function(t,e){return _(e&&e[0]&&e[0]._id||e,t),p.apply(this,arguments)},e.apply(this,s)):_((v=e.apply(this,s))&&v[0]&&v[0]._id||v)}))}.call(this),function(){l.defineAdvice("update",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m,g={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(_=l.getFields(r[1]),h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.after)||(g.mutator=a.clone(r[1]),g.options=a.clone(r[2]),c.some(o.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(g.docs={},c.each(h,(function(t){g.docs[t._id]=a.clone(t)})))),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n,_,r[1],r[2])&&(m=!0)}))})),m)return 0}catch(k){if(d)return p.call(u,k);throw k}function y(e,a){if(!s){if(!c.isEmpty(o.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:g.docs&&g.docs[o._id],affected:e,err:a},f),t,o,p,g.mutator,g.options)}))}))}}if(d)return r[r.length-1]=function(t,e){return y(e,t),p.apply(this,arguments)},e.apply(this,r);var C=e.apply(u,r);return y(C),C}))}.call(this),function(){l.defineAdvice("remove",(function(t,e,n,o,i,r,s){var u=this,f={context:this,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_=[];if(!s)try{if(c.isEmpty(o.before)&&c.isEmpty(o.after)||(h=l.getDocs.call(this,n,r[0]).fetch()),c.isEmpty(o.after)||c.each(h,(function(t){_.push(a.clone(t))})),c.each(o.before,(function(e){c.each(h,(function(n){var o;!1===e.aspect.call(c.extend({transform:i(n)},f),t,n)&&(v=!0)}))})),v)return 0}catch(y){if(d)return p.call(this,y);throw y}function m(e){s||c.each(o.after,(function(n){c.each(_,(function(o){n.aspect.call(c.extend({transform:i(o),err:e},f),t,o)}))}))}if(d)return r[r.length-1]=function(t){return m(t),p.apply(this,arguments)},e.apply(this,r);var g=e.apply(this,r);return m(),g}))}.call(this),function(){l.defineAdvice("upsert",(function(t,e,n,o,i,r,s){var u=this,f={context:u,_super:e,args:r},p=c.last(r),d=c.isFunction(p),h,v,_,m={};if(c.isFunction(r[2])&&(p=r[2],r[2]={}),!s&&(c.isEmpty(o.upsert.before)||(h=l.getDocs.call(u,n,r[0],r[2]).fetch(),v=c.map(h,(function(t){return t._id}))),c.isEmpty(o.update.after)||c.some(o.update.after,(function(t){return!1!==t.options.fetchPrevious}))&&!1!==l.extendOptions(n.hookOptions,{},"after","update").fetchPrevious&&(m.mutator=a.clone(r[1]),m.options=a.clone(r[2]),m.docs={},c.each(h,(function(t){m.docs[t._id]=a.clone(t)}))),c.each(o.upsert.before,(function(e){var n;!1===e.aspect.call(f,t,r[0],r[1],r[2])&&(_=!0)})),_))return{numberAffected:0};function g(e,a){if(!s){if(!c.isEmpty(o.update.after))var p=l.getFields(r[1]),d=l.getDocs.call(u,n,{_id:{$in:v}},r[2]).fetch();c.each(o.update.after,(function(n){c.each(d,(function(o){n.aspect.call(c.extend({transform:i(o),previous:m.docs&&m.docs[o._id],affected:e,err:a},f),t,o,p,m.mutator,m.options)}))}))}}function y(e,a){if(!s){if(!c.isEmpty(o.insert.after))var p=l.getDocs.call(u,n,{_id:e},r[0],{}).fetch()[0],d=c.extend({transform:i(p),_id:e,err:a},f);c.each(o.insert.after,(function(e){e.aspect.call(d,t,p)}))}}if(d)return r[r.length-1]=function(t,e){return t||e&&e.insertedId?y(e.insertedId,t):g(e&&e.numberAffected,t),l.hookedOp((function(){return p.call(this,t,e)}))},l.directOp((function(){return e.apply(u,r)}));var C=l.directOp((function(){return e.apply(u,r)}));return C&&C.insertedId?y(C.insertedId):g(C&&C.numberAffected),C}))}.call(this),function(){l.defineAdvice("find",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),!a&&(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),f))return n.find(void 0);function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}return p(l=e.apply(this,r)),l}))}.call(this),function(){l.defineAdvice("findOne",(function(t,e,n,o,i,r,a){var s=this,u={context:this,_super:e,args:r},l,f;if(r[0]=n._getFindSelector(r),r[1]=n._getFindOptions(r),a||(c.each(o.before,(function(e){var n;!1===e.aspect.call(u,t,r[0],r[1])&&(f=!0)})),!f))return p(l=e.apply(this,r)),l;function p(e){a||c.each(o.after,(function(n){n.aspect.call(u,t,r[0],r[1],e)}))}}))}.call(this),function(){if(t.users){l.reassignPrototype(t.users);var e=void 0!==o&&void 0!==o.Collection?o.Collection:t.Collection;l.extendCollectionInstance(t.users,e)}}.call(this),Package._define("matb33:collection-hooks",{CollectionHooks:l})}(); Package._define("steedos:smsqueue"); @@ -681,7 +681,7 @@ Package._define("steedos:qcloud-smsqueue"); !function(){var e=Package.meteor.Meteor,t=Package.meteor.global,o=Package.meteor.meteorEnv,r=Package["reactive-var"].ReactiveVar,a=Package["reactive-dict"].ReactiveDict,n=Package.random.Random,s=Package["ddp-client"].DDP,c=Package.check.check,i=Package.check.Match,u=Package.underscore._,d=Package.tracker.Tracker,l=Package.tracker.Deps,f=Package.session.Session,p=Package["aldeed:simple-schema"].SimpleSchema,g=Package["aldeed:simple-schema"].MongoObject,m=Package["aldeed:tabular"].Tabular,b=Package["matb33:collection-hooks"].CollectionHooks,k=Package["meteorhacks:subs-manager"].SubsManager,v=Package["universe:i18n"]._i18n,_=Package["universe:i18n"].i18n,P=Package.modules.meteorInstall,j=Package.modules.meteorBabelHelpers,h=Package.promise.Promise,y=Package["aldeed:collection2-core"].Collection2,C=Package.mongo.Mongo,S,A;P({node_modules:{meteor:{"steedos:object-database":{client:{"subscribe.coffee":function t(){var o=S="object"==typeof S?S:{},a,n,s,c,i,l,p,g,m,b,v,_,P;P=new k,Creator._subApp=new r({}),v=null,b=function(){return v&&clearTimeout(v),v=setTimeout((function(){return Creator.loadAppsMenus(),v=null}),5e3)},m=null,g=[],p=function(t){return m&&clearTimeout(m),g.push(t),m=e.setTimeout((function(){return c(g,(function(e){if(e&&e.objects)return u.each(e.objects,(function(e){var t,o;if(u.size(e.fields)>0){delete Creator._recordSafeObjectCache[e.name];try{(o=Creator.getObject(e.name))&&(e=u.extend(e,{list_views:o.list_views}))}catch(r){t=r,console.error(t)}return Creator.Objects[e.name]=e,Creator.loadObjects(e),Creator.deps.object.changed()}}))}))}),5e3)},a=function(e){if(b(),Creator.Apps[e.code]=e,Creator._subApp.set(Object.assign(e,{_id:e.code})),f.get("app_id")===e._id)return Creator.deps.app.changed()},n=function(e,t){var o;if((Steedos.isSpaceAdmin()||e.is_enable)&&(Steedos.isSpaceAdmin()||"0"===e.in_development)){SteedosUI.reloadObject(e.name),b(),p(e.name);try{if(t&&e&&t.name!==e.name)return l(t)}catch(r){return o=r,console.error(o)}}},l=function(e){var t;return t=u.findWhere(Creator.objectsByName,{_id:e._id}),Creator.removeObject(null!=t?t.name:void 0),f.get("object_name")===(null!=t?t.name:void 0)&&FlowRouter.go("/"),Creator.deps.object.changed()},i=function(e){if(delete Creator.Apps[e.code],Creator._subApp.set(Object.assign({},e,{visible:!1,_id:e.code})),f.get("app_id")===e.code||f.get("app_id")===e._id)return f.set("app_id",null),FlowRouter.go("/")},_=function(){return Setup.bootstrap(Steedos.getSpaceId()),e.setTimeout((function(){return Creator.deps.object.changed()}),3e3)},s=function(t,o){var r;if(t&&u.isString(t))return r=f.get("spaceId"),$.ajax({type:"get",url:Steedos.absoluteUrl("/api/bootstrap/"+r+"/"+t),dataType:"json",beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken())},error:function(e,t,o){var r;return r=e.responseJSON,console.error(r),(null!=r?r.reason:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.reason)):void 0:(null!=r?r.message:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(r):void 0},success:function(e){if(u.isFunction(o))return o(e)}})},c=function(t,o){var r;if((t=u.compact(u.uniq(t)))&&u.isArray(t)&&!u.isEmpty(t))return r=f.get("spaceId"),$.ajax({type:"get",url:Steedos.absoluteUrl("/api/bootstrap/"+r+"/"+t.join(",")),dataType:"json",beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken())},error:function(e,t,o){var r;return r=e.responseJSON,console.error(r),(null!=r?r.reason:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.reason)):void 0:(null!=r?r.message:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(r.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(r):void 0},success:function(e){if(u.isFunction(o))return o(e)}}),d.autorun((function(e){var t;if(Creator.bootstrapLoaded.get())return t=!1,Creator.getCollection("apps").find({is_creator:!0}).observe({added:function(e){if(t)return a(e)},changed:function(e,o){if(t)return a(e)},removed:function(e){if(t)return i(e)}}),t=!0}))}}}}}}},{extensions:[".js",".json",".coffee"]})("/node_modules/meteor/steedos:object-database/client/subscribe.coffee"),Package._define("steedos:object-database")}(); -Package._define("steedos:mailqueue"); +!function(){var e,a;Package._define("steedos:mailqueue")}(); Package._define("steedos:webhookqueue"); @@ -747,7 +747,7 @@ Package._define("steedos:instance-record-queue"); !function(){var e=Package.meteor.Meteor,o=Package.meteor.global,n=Package.meteor.meteorEnv,s=Package["reactive-var"].ReactiveVar,a=Package["reactive-dict"].ReactiveDict,l=Package.random.Random,r=Package["ddp-client"].DDP,i=Package.check.check,c=Package.check.Match,d=Package.underscore._,u=Package.tracker.Tracker,f=Package.tracker.Deps,m=Package.session.Session,p=Package.blaze.Blaze,_=Package.blaze.UI,w=Package.blaze.Handlebars,b=Package["templating-runtime"].Template,k=Package["aldeed:simple-schema"].SimpleSchema,g=Package["aldeed:simple-schema"].MongoObject,h=Package["kadira:flow-router"].FlowRouter,v=Package["aldeed:tabular"].Tabular,y=Package["steedos:base"].Selector,I=Package["steedos:base"].Steedos,D=Package["steedos:base"].AjaxCollection,T=Package["steedos:base"].SteedosDataManager,F=Package["steedos:base"].SteedosOffice,S=Package["steedos:base"].Modal,V=Package["universe:i18n"]._i18n,j=Package["universe:i18n"].i18n,P=Package.promise.Promise,C=Package.modules.meteorInstall,O=Package.modules.meteorBabelHelpers,x=Package.htmljs.HTML,A=Package["aldeed:collection2-core"].Collection2,R=Package["steedos:cfs-base-package"].FS,E=Package.spacebars.Spacebars,U=Package.mongo.Mongo,N,L=C({node_modules:{meteor:{"steedos:app-workflow":{"core.coffee":function o(){var n=N="object"==typeof N?N:{};this.WorkflowCore={},e.isClient&&(WorkflowCore.openFlowDesign=function(o,n,s,a){var l,r,i,c,d;return d="/applications/designer/current/"+o.toLocaleLowerCase()+"/?spaceId="+n,s&&(d=d+"&flowId="+s),a&&!Creator.isSpaceAdmin(n,e.userId())&&(d=d+"&companyId="+a),d=encodeURIComponent(I.absoluteUrl(d)),c=""+t("Workflow Designer"),s&&(l=null!=(i=db.flows.findOne(s))?i.name:void 0)&&(c=l+" | "+c),r="/api/workflow/designer?url="+d+"&title="+(c=encodeURIComponent(c)),I.openWindow(I.absoluteUrl(r))},WorkflowCore.openFormDesign=function(t,e,o,n){return S.show("formDesign",{formId:o},{keyboard:!1,backdrop:"static"})},e.startup((function(){return $(document).keydown((function(t){if("13"===t.keyCode||"Enter"===t.key){if(1!==$(".flow-modal").length)return;if(("TEXTAREA"!==t.target.tagName||$(t.target).closest("div").hasClass("bootstrap-tagsinput"))&&1===$(".flow-modal").length)return $(".flow-modal .btn-confirm").click()}}))}))),e.isServer&&(WorkflowCore.checkCreatePermissions=function(t,e,o){return!o||0!==Creator.getCollection("company").find({_id:o,space:t}).count()})},client:{"template.new_flow_modal.js":function t(){b.__checkName("new_flow_modal"),b.new_flow_modal=new b("Template.new_flow_modal",(function(){var t=this;return x.DIV({class:"modal fade creator-modal flow-modal new-flow-modal",id:"newFlowModal"},"\n\t\t",x.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",x.DIV({class:"slds-modal__container"},"\n\t\t\t\t",x.Raw('
\n\t\t\t\t\t

\n\t\t\t\t\t\t

新建流程

\n\t\t\t\t\t\n\t\t\t\t
'),"\n\n\t\t\t\t",x.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t",p._TemplateWith((function(){return{schema:E.call(t.lookup("schema")),id:E.call("newFlowForm")}}),(function(){return E.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t",p.Each((function(){return E.call(t.lookup("fields"))}),(function(){return["\n\t\t\t\t\t\t",x.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t",x.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t",x.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:E.call(t.lookup("."))}}),(function(){return E.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"]}))})),"\n\t\t\t"),"\n\n\t\t\t\t",x.Raw('
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
'),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"new_flow_modal.coffee":function t(){var o=N="object"==typeof N?N:{},n;n=["category","name","company_id","object_name"],b.new_flow_modal.helpers({schema:function(){var t,e,o,s;return s={},o=Creator.getObject("flows"),t=new k(Creator.getObjectSchema(o)),e=t._schema,d.each(n,(function(t){if(s[t]=e[t],s[t].autoform&&(s[t].autoform.readonly=!1,s[t].autoform.disabled=!1),"name"===t)return s[t].optional=!1})),new k(s)},fields:function(){return n}}),b.new_flow_modal.events({"click .btn-confirm":function(t,o){var n,s,a,l,r;return t.currentTarget.disabled=!0,AutoForm.validateField("newFlowForm")?(a=AutoForm.getFormValues("newFlowForm").insertDoc,l={id:r=Creator.getCollection("flows")._makeNewID(),name:a.name,space:I.getSpaceId(),is_valid:!0,app:"workflow",current:{id:Creator.getCollection("flows")._makeNewID()}},a.category&&(l.category=a.category),(n=a.company_id)&&(l.company_id=n),a.object_name&&(l.object_name=a.object_name),s={Forms:[l]},$.ajax({type:"post",url:I.absoluteUrl("/am/forms?sync_token="+(new Date).getTime()/1e3),data:JSON.stringify(s),dataType:"json",contentType:"application/json",crossDomain:!0,headers:{"x-user-id":e.userId(),"x-auth-token":Accounts._storedLoginToken()},beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken()),t.setRequestHeader("x-user-id",e.userId()),t.setRequestHeader("x-auth-token",Accounts._storedLoginToken())},success:function(t){var e,n;return console.log(t),e=t.ChangeSet.inserts.Flows,(n=d.find(e,(function(t){return t.form===r}))).object_name||WorkflowCore.openFlowDesign(I.locale(),n.space,n._id,Creator.getUserCompanyId()),h.go("/app/admin/flows/view/"+n._id),S.hide(o)},error:function(e,o,n){return toastr.error(e.responseText),t.currentTarget.disabled=!1,console.error(n)}})):(t.currentTarget.disabled=!1,!1)}})},design:{"template.form_design.js":function t(){b.__checkName("formDesign"),b.formDesign=new b("Template.formDesign",(function(){var t=this;return x.DIV({class:"modal fade creator-modal flow-modal new-flow-modal",id:"newFlowModal"},"\n\t\t",x.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",x.DIV({class:"slds-modal__container"},"\n\t\t\t\t\t",E.With((function(){return E.call(t.lookup("form"))}),(function(){return["\n\t\t\t\t\t\t",x.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t\t\t",x.H2({class:"title slds-text-heading--medium"},"\n\t\t\t\t\t\t\t\t",x.H2({class:"slds-text-heading--medium"},"编辑表单:",p.View("lookup:name",(function(){return E.mustache(t.lookup("name"))}))),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\n\t\t\t\t\t\t",x.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t\t\t\t",p._TemplateWith((function(){return{form:E.call(t.lookup("."))}}),(function(){return E.include(t.lookupTemplate("formBuilder"))})),"\n\t\t\t\t\t\t"),"\n\n\t\t\t\t\t\t",x.FOOTER({class:"slds-modal__footer"},"\n\t\t\t\t\t\t\t",x.BUTTON({type:"submit",class:"slds-button slds-button_brand btn-confirm"},"确定"),"\n\t\t\t\t\t\t\t",x.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"form_design.coffee":function t(){var o=N="object"==typeof N?N:{};b.formDesign.helpers({form:function(){return Creator.odata.get("forms",b.instance().data.formId)}}),b.formDesign.events({"click .btn-confirm":function(t,o){var n,s,a,l,r;if(console.log("click .btn-confirm"),n=$("#fb-editor").data("formBuilder").actions.getData(),a=Creator.formBuilder.transformFormFieldsOut(n),r=Creator.formBuilder.validateFormFields(a))return delete(s=Creator.odata.get("forms",o.data.formId)).historys,s.current.fields=a,l=I.absoluteUrl("/am/forms?sync_token="+(new Date).getTime()/1e3),n={},s.id=s._id,n.Forms=[s],$.ajax({type:"put",url:l,data:JSON.stringify(n),dataType:"json",contentType:"application/json",processData:!1,beforeSend:function(t){return t.setRequestHeader("X-User-Id",e.userId()),t.setRequestHeader("X-Auth-Token",Accounts._storedLoginToken())},success:function(t){return toastr.success("修改成功"),S.hide(o)},error:function(t,e,o){var n;return 504===t.status?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__("连接超时,请稍后再试")):void 0:t.responseJSON?(n=t.responseJSON.error,console.error(n),n.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(n.reason)):void 0:n.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(n.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(n):void 0):"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t.responseText):void 0}})}})}},"template.admin_import_flow_modal.js":function t(){b.__checkName("admin_import_flow_modal"),b.admin_import_flow_modal=new b("Template.admin_import_flow_modal",(function(){var t=this;return x.DIV({class:"modal fade creator-modal flow-modal new-flow-modal",id:"newFlowModal"},"\n\t\t",x.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",x.DIV({class:"slds-modal__container"},"\n\t\t\t\t",x.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t",x.H2({class:"title slds-text-heading--medium"},"\n\t\t\t\t\t\t",x.H2({class:"slds-text-heading--medium"},p.View("lookup:_",(function(){return E.mustache(t.lookup("_"),"workflow_import_flow")}))),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\n\t\t\t\t",x.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t\t",x.DIV({class:"form-group slds-form-element",style:"padding: 0 .75rem;"},"\n\t\t\t\t\t\t",x.Raw(''),"\n\t\t\t\t\t\t",x.DIV({class:"import-files"},"\n\t\t\t\t\t\t\t",x.DIV("\n\t\t\t\t\t\t\t\t",x.DIV({class:"btn btn-default js-af-select-file",style:"width: 100%"},"\n\t\t\t\t\t\t\t\t\t",x.INPUT({type:"file",name:"importFlowFile",id:"importFlowFile",multiple:function(){return p.Unless((function(){return E.call(t.lookup("isUpgrade"))}),(function(){return"multiple"}))},accept:".json,.JSON"}),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",x.Raw(''),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t",x.Raw(''),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",p.Unless((function(){return E.call(t.lookup("isUpgrade"))}),(function(){return["\n\t\t\t\t\t",p._TemplateWith((function(){return{schema:E.call(t.lookup("schema")),id:E.call("importFlowForm")}}),(function(){return E.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t\t",p.Each((function(){return E.call(t.lookup("fields"))}),(function(){return["\n\t\t\t\t\t\t\t",x.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t\t",x.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t",x.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:E.call(t.lookup("."))}}),(function(){return E.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"]})),"\n\t\t\t\t\t"]}))})),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\n\t\t\t\t",x.Raw('
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
'),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"admin_import_flow_modal.coffee":function e(){var o=N="object"==typeof N?N:{},n,s;n=["company_id"],b.admin_import_flow_modal.helpers({spaceId:function(){return m.get("spaceId")},schema:function(){var t,e,o,s;return s={},o=Creator.getObject("flows"),t=new k(Creator.getObjectSchema(o)),e=t._schema,d.each(n,(function(t){if(s[t]=e[t],s[t].autoform)return s[t].autoform.readonly=!1,s[t].autoform.disabled=!1})),new k(s)},fields:function(){return n},isUpgrade:function(){return!!this.flowId}}),s=function(t,e){var o;if(o=[],d.each(d.keys(t),(function(e){var n,s;return s=t[e].new_flows,n=[],d.each(s,(function(t){return n.push("查看流程")})),o.push("

"+e+": "+n.join("")+"

")})),o.length>0)return $(".help-block",e.find(".import-files")).append("

导入成功的文件("+o.length+"条):

"+o.join("")+"
")},b.admin_import_flow_modal.events({"change #importFlowFile,#importFlowForm":function(t,e){return $(e.find(".btn-confirm")).prop("disabled",!1)},"click .btn-confirm":function(e,o){var n,a,l,r,i,c,u,f,p,_,w;if(!(r=AutoForm.getCurrentDataForForm("importFlowForm"))||AutoForm.validateForm("importFlowForm")){if(n=null!=(u=AutoForm.getFormValues("importFlowForm"))&&null!=(f=u.insertDoc)?f.company_id:void 0,0!==(l=(a=$("#importFlowFile")[0].files).length)){for(i=new FormData,_="api/workflow/import/form?space="+m.get("spaceId"),n&&(_=_+"&company_id="+n),o.data.flowId&&(_=_+"&flowId="+o.data.flowId),$(o.find(".btn-confirm")).prop("disabled",!0),w=c=0,p=l-1;0<=p?c<=p:c>=p;w=0<=p?++c:--c)i.append("file-"+w,a[w]);return $(".help-block",o.find(".import-files")).html(""),$.ajax({type:"POST",url:I.absoluteUrl(_),processData:!1,contentType:!1,data:i,dataType:"json",success:function(e){var n,a,l,r;return console.log("data",e),n=e.multiple,r=e.success,o.data.flowId||toastr.success(t("workflow_import_flow_success")),n?s(r,o):(S.hide(o),d.isFunction(o.data.onSuccess)?(a=null!=(l=r[d.keys(r)[0]])?l.new_flows:void 0,o.data.onSuccess(a)):void 0)},error:function(e){var n,a,l,r;return(l=e.responseJSON.multiple)&&(n=e.responseJSON.fail,r=e.responseJSON.success,s(r,o),a=[],d.each(d.keys(n),(function(t){return a.push("

"+t+": "+n[t]+"

")})),$(".help-block",o.find(".import-files")).append("

导入失败的文件("+a.length+"条):

"+a.join("")+"
")),e.responseJSON.fail?(n=e.responseJSON.fail,d.each(n,(function(e,o){return d.isString(e)?toastr.error(e,o):toastr.error(t(e.reason,e.details),o)}))):toastr.error(t("workflow_import_flow_error")),console.error(e)}})}toastr.warning(t("workflow_import_flow_info"))}}})},"template.copy_flow_modal.js":function t(){b.__checkName("copy_flow_modal"),b.copy_flow_modal=new b("Template.copy_flow_modal",(function(){var t=this;return x.DIV({class:"modal fade creator-modal flow-modal copy-flow-modal",id:"newFlowModal"},"\n\t\t",x.DIV({class:"modal-dialog slds-modal slds-fade-in-open modal-lg"},"\n\t\t\t",x.DIV({class:"slds-modal__container"},"\n\t\t\t\t",x.Raw('
\n\t\t\t\t\t

\n\t\t\t\t\t\t

复制流程

\n\t\t\t\t\t\n\t\t\t\t
'),"\n\n\t\t\t\t",x.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t",p._TemplateWith((function(){return{schema:E.call(t.lookup("schema")),id:E.call(t.lookup("formId"))}}),(function(){return E.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t",p.Each((function(){return E.call(t.lookup("fields"))}),(function(){return["\n\t\t\t\t\t\t",x.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t",x.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t",x.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:E.call(t.lookup("."))}}),(function(){return E.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"]}))})),"\n\t\t\t"),"\n\n\t\t\t\t",x.Raw('
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
'),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"copy_flow_modal.coffee":function o(){var n=N="object"==typeof N?N:{},s,a;s=["name","company_id"],a="copyFlowForm",b.copy_flow_modal.helpers({formId:function(){return a},schema:function(){var t,e,o,n;return n={},o=Creator.getObject("flows"),t=new k(Creator.getObjectSchema(o)),e=t._schema,d.each(s,(function(t){if(n[t]=e[t],n[t].autoform)return n[t].autoform.readonly=!1,n[t].autoform.disabled=!1})),new k(n)},fields:function(){return s}}),b.copy_flow_modal.events({"click .btn-confirm":function(o,n){var s,l;return o.currentTarget.disabled=!0,AutoForm.validateField(a)?(s=AutoForm.getFormValues(a).insertDoc,l=n.data.record_id,e.call("flow_copy",I.spaceId(),l,s,(function(e,o){return e?toastr.error("error"):(toastr.success(t("workflow_copy_flow_success")),S.hide(n),d.isFunction(n.data.onSuccess)?n.data.onSuccess(o):void 0)}))):(o.currentTarget.disabled=!1,!1)}})},views:{flow:{"template.distribute_edit_flow_modal.js":function t(){b.__checkName("distribute_edit_flow_modal"),b.distribute_edit_flow_modal=new b("Template.distribute_edit_flow_modal",(function(){var t=this;return x.DIV({class:"modal fade",id:"distribute_edit_flow_modal"},"\n\t\t",x.DIV({class:"modal-dialog modal-lg modal-body-zoom",role:"document"},"\n\t\t\t",x.DIV({class:"modal-content ins-modal"},"\n\t\t\t\t",x.DIV({class:"modal-header"},"\n\t\t\t\t\t",x.Raw(''),"\n\t\t\t\t\t",x.H4({class:"modal-title"},"\n\t\t\t\t\t\t",p.View("lookup:_",(function(){return E.mustache(t.lookup("_"),"Edit")})),":",x.Raw(" "),p.View("lookup:flow.name",(function(){return E.mustache(E.dot(t.lookup("flow"),"name"))})),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\n\t\t\t\t",x.DIV({class:"modal-body",style:"overflow-y:auto"},"\n\t\t\t\t\t",x.DIV({class:"form-group"},"\n\t\t\t\t\t\t",x.LABEL({for:"distribute_edit_flow_select_users",class:"control-label"},p.View("lookup:_",(function(){return E.mustache(t.lookup("_"),"distribute_edit_flow_select_users")}))),"\n\t\t\t\t\t\t",p._TemplateWith((function(){return E.call(t.lookup("user_context"))}),(function(){return E.include(t.lookupTemplate("afSelectUser"))})),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",x.DIV({class:"form-group"},"\n\t\t\t\t\t\t",x.DIV({class:"checkbox"},"\n\t\t\t\t\t\t\t",x.LABEL(x.INPUT({type:"checkbox",id:"distribute_to_self",checked:function(){return p.If((function(){return E.call(t.lookup("to_self"))}),(function(){return"checked"}))}}),x.Raw(" "),p.View("lookup:_",(function(){return E.mustache(t.lookup("_"),"distribute_to_self")}))),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",x.DIV({class:"checkbox"},"\n\t\t\t\t\t\t\t",x.LABEL(x.INPUT({type:"checkbox",id:"distribute_end_notification",checked:function(){return p.If((function(){return E.call(t.lookup("end_notification"))}),(function(){return"checked"}))}}),x.Raw(" "),p.View("lookup:_",(function(){return E.mustache(t.lookup("_"),"distribute_end_notification")}))),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",x.DIV({class:"checkbox"},"\n\t\t\t\t\t\t\t",x.LABEL(x.INPUT({type:"checkbox",id:"upload_after_being_distributed",checked:function(){return p.If((function(){return E.call(t.lookup("upload_after_being_distributed"))}),(function(){return"checked"}))}}),x.Raw(" "),p.View("lookup:_",(function(){return E.mustache(t.lookup("_"),"flows_upload_after_being_distributed")}))),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",p.Each((function(){return E.call(t.lookup("allow_distribute_steps"))}),(function(){return["\n\t\t\t\t\t\t",x.DIV({class:"form-group"},"\n\t\t\t\t\t\t\t",x.LABEL({class:"control-label"},p.View("lookup:name",(function(){return E.mustache(t.lookup("name"))}))),"\n\t\t\t\t\t\t\t",p._TemplateWith((function(){return{id:E.call(E.dataMustache(t.lookup("_id"))),schema:E.call(t.lookup("schema")),doc:E.call(E.dataMustache(t.lookup("flows_doc"),t.lookup("distribute_optional_flows"))),type:E.call("update"),autosave:E.call(!1),placeholder:E.call(E.dataMustache(t.lookup("_"),"distribute_edit_flow_select_flows"))}}),(function(){return E.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t\t\t\t",p._TemplateWith((function(){return{name:E.call("distribute_flows"),multiple:E.call(!0)}}),(function(){return E.include(t.lookupTemplate("afFieldInput"))})),"\n\t\t\t\t\t\t\t"]}))})),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\t\t\t\t",x.DIV({class:"modal-footer"},"\n\t\t\t\t\t",x.BUTTON({type:"button",class:"btn btn-primary",id:"distribute_edit_flow_modal_ok"},p.View("lookup:_",(function(){return E.mustache(t.lookup("_"),"OK")}))),"\n\t\t\t\t\t",x.BUTTON({type:"button",class:"btn btn-default","data-dismiss":"modal"},p.View("lookup:_",(function(){return E.mustache(t.lookup("_"),"Cancel")}))),"\n\t\t\t\t"),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"distribute_edit_flow_modal.coffee":function o(){var n=N="object"==typeof N?N:{};b.distribute_edit_flow_modal.helpers({user_context:function(){var t,e,o,n,s,a,l;return s=(null!=(e=this.flow)?e.distribute_optional_users:void 0)||[],a=d.pluck(s,"id"),o=T.getFormulaUserObjects(m.get("spaceId"),a),l=[],o.forEach((function(t){if(t)return l.push(t)})),n=d.pluck(l,"id"),t={value:l,dataset:{showOrg:!0,multiple:!0,values:n.toString()},name:"distribute_edit_flow_select_users",atts:{name:"distribute_edit_flow_select_users",id:"distribute_edit_flow_select_users",class:"selectUser form-control"}}},allow_distribute_steps:function(){return this.flow?d.where(this.flow.current.steps,{allowDistribute:!0}):new Array},flows_doc:function(t){return{distribute_flows:t}},schema:function(){var t;return t=new k({distribute_flows:{type:[String],optional:!0,autoform:{type:"universe-select",afFieldInput:{multiple:!0,optionsMethod:"get_distribute_flows",optionsMethodParams:JSON.stringify({spaceId:m.get("spaceId")})}}}})},to_self:function(){var t;return null!=(t=this.flow)?t.distribute_to_self:void 0},end_notification:function(){var t;return null!=(t=this.flow)?t.distribute_end_notification:void 0},upload_after_being_distributed:function(){var t;return null!=(t=this.flow)?t.upload_after_being_distributed:void 0}}),b.distribute_edit_flow_modal.events({"click #distribute_edit_flow_modal_ok":function(o,n){var s,a,l,r,i;return l=(r=$("#distribute_edit_flow_select_users")[0].dataset.values)?r.split(","):[],a=n.data.flow._id,s=d.where(n.data.flow.current.steps,{allowDistribute:!0}),i=new Array,console.log("allow_distribute_steps",s),d.each(s,(function(t){return i.push({_id:t._id,distribute_optional_flows:AutoForm.getFieldValue("distribute_flows",t._id)})})),$("body").addClass("loading"),e.call("update_distribute_settings",a,l,i,$("#distribute_to_self")[0].checked,$("#distribute_end_notification")[0].checked,$("#upload_after_being_distributed")[0].checked,(function(e,o){$("body").removeClass("loading"),e&&toastr.error(TAPi18n.__(e.reason)),!0===o&&(toastr.success(t("instance_approve_modal_modificationsave")),S.hide(n))}))}})}}}},cfs:{"instances.coffee":function t(o){var n=N="object"==typeof N?N:{},s,a,l,r,i;i="instances","OSS"===(null!=(a=e.settings.public.cfs)?a.store:void 0)?e.isClient?s=new R.Store.OSS(i):e.isServer&&(s=new R.Store.OSS(i,e.settings.cfs.aliyun)):"S3"===(null!=(l=e.settings.public.cfs)?l.store:void 0)?e.isClient?s=new R.Store.S3(i):e.isServer&&(s=new R.Store.S3(i,e.settings.cfs.aws)):"STEEDOSCLOUD"===(null!=(r=e.settings.public.cfs)?r.store:void 0)?e.isClient?s=new R.Store.STEEDOSCLOUD(i):e.isServer&&(s=new R.Store.STEEDOSCLOUD(i,e.settings.cfs.steedosCloud)):e.isClient?s=new R.Store.FileSystem(i):e.isServer&&(s=new R.Store.FileSystem(i,{path:o("path").join(process.env.STEEDOS_STORAGE_DIR,"files/instances"),fileKeyMaker:function(t){var e,n,s,a,l,r,c,d,u,f,m,p,_,w,b;return(w=t&&t._getInfo(i))&&w.key?w.key:(s=t.name(),n=(f=(u=(a=t.name({store:i}))||s).split(".")).pop(),l=f.join(".").substring(0,50)+"."+n,b=(m=new Date).getFullYear(),d=m.getMonth()+1,r=t.metadata.instance,p=o("path"),c=o("mkdirp"),_=p.join(process.env.STEEDOS_STORAGE_DIR,"files/instances/"+b+"/"+d+"/"+r),e=p.resolve(_),c.sync(e),b+"/"+d+"/"+r+"/"+t.collectionName+"-"+t._id+"-"+l)}})),cfs.instances=new R.Collection(i,{stores:[s]}),cfs.instances.allow({download:function(){return!0}})}}}}}},{extensions:[".js",".json",".coffee",".less",".html"]});L("/node_modules/meteor/steedos:app-workflow/core.coffee"),L("/node_modules/meteor/steedos:app-workflow/client/template.new_flow_modal.js"),L("/node_modules/meteor/steedos:app-workflow/client/new_flow_modal.coffee"),L("/node_modules/meteor/steedos:app-workflow/client/design/template.form_design.js"),L("/node_modules/meteor/steedos:app-workflow/client/design/form_design.coffee"),L("/node_modules/meteor/steedos:app-workflow/cfs/instances.coffee"),L("/node_modules/meteor/steedos:app-workflow/client/template.admin_import_flow_modal.js"),L("/node_modules/meteor/steedos:app-workflow/client/admin_import_flow_modal.coffee"),L("/node_modules/meteor/steedos:app-workflow/client/template.copy_flow_modal.js"),L("/node_modules/meteor/steedos:app-workflow/client/copy_flow_modal.coffee"),L("/node_modules/meteor/steedos:app-workflow/client/views/flow/template.distribute_edit_flow_modal.js"),L("/node_modules/meteor/steedos:app-workflow/client/views/flow/distribute_edit_flow_modal.coffee"),Package._define("steedos:app-workflow")}(); -Package._define("steedos:object-webhooks-queue"); +!function(){var e,o;Package._define("steedos:object-webhooks-queue")}(); !function(){var e=Package.meteor.Meteor,o=Package.meteor.global,n=Package.meteor.meteorEnv,a=Package.jquery.$,l=Package.jquery.jQuery,s=Package["templating-runtime"].Template,r=Package.session.Session,c=Package.blaze.Blaze,u=Package.blaze.UI,i=Package.blaze.Handlebars,d=Package["aldeed:autoform"].AutoForm,m=Package["raix:handlebar-helpers"].Helpers,p=Package["mpowaga:string-template"].StringTemplate,f=Package.promise.Promise,g=Package["aldeed:simple-schema"].SimpleSchema,h=Package["aldeed:simple-schema"].MongoObject,k=Package.spacebars.Spacebars,b=Package.htmljs.HTML,C;(function(){s.__checkName("autoformModals"),s.autoformModals=new s("Template.autoformModals",(function(){var t=this;return b.DIV({class:"modal fade creator-modal",id:"afModal"},"\n\t\t",b.DIV({class:function(){return["modal-dialog ",k.mustache(t.lookup("cmModalDialogClass"))," slds-modal slds-fade-in-open"]}},"\n\t\t\t",b.DIV({class:function(){return["slds-modal__container ",k.mustache(t.lookup("cmModalContentClass"))]}},"\n\t\t\t\t",b.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_icon slds-modal__close slds-button_icon-inverse",title:"Close","data-dismiss":"modal"},"\n\t\t\t\t\t\t",b.SVG({class:"slds-button__icon slds-button__icon_large","aria-hidden":"true"},"\n\t\t\t\t\t\t\t",b.USE({"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"/packages/steedos_lightning-design-system/client/icons/utility-sprite/symbols.svg#close"}),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",b.Raw('Close'),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",b.H2({class:"title slds-text-heading--medium"},"\n\t\t\t\t\t\t",b.H2({class:"slds-text-heading--medium"},c.View("lookup:title",(function(){return k.makeRaw(k.mustache(t.lookup("title")))}))),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\n\t\t\t\t",b.DIV({class:"slds-modal__content slds-p-around_medium"},"\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$neq"),t.lookup("cmOperation"),"remove")}),(function(){return["\n\t\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$and"),t.lookup("cmCollection"),t.lookup("cmOperation"))}),(function(){return["\n\t\t\t\t\t\t\t",b.P(c.View("lookup:prompt",(function(){return k.makeRaw(k.mustache(t.lookup("prompt")))}))),"\n\t\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("shouldUpdateQuickForm"))}),(function(){return["\n\n\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{title:k.call(t.lookup("cmTitle")),id:k.call(t.lookup("cmFormId")),collection:k.call(t.lookup("cmCollection")),doc:k.call(t.lookup("cmDoc")),buttonContent:k.call(!1),template:k.call(t.lookup("cmTemplate")),"label-class":k.call(t.lookup("cmLabelClass")),"input-col-class":k.call(t.lookup("cmInputColClass")),buttonClasses:k.call(t.lookup("cmButtonClasses")),meteormethod:k.call(t.lookup("cmMeteorMethod")),type:k.call(t.lookup("cmAutoformType"))}}),(function(){return k.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(k.dot(t.lookup("schemaFields"),"grouplessFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(k.dot(t.lookup("schemaFields"),"grouplessFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{name:k.call(t.lookup("."))}}),(function(){return k.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(k.dot(t.lookup("schemaFields"),"groupFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(k.dot(t.lookup("schemaFields"),"groupFields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(k.dot(t.lookup("."),"fields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-section slds-is-open group-section"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t",b.H3({class:"slds-section__title group-section-control"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.BUTTON({"aria-controls":"expando-unique-id","aria-expanded":"true",class:"slds-button slds-section__title-action"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{class:k.call("slds-section__title-action-icon slds-button__icon slds-button__icon_left"),source:k.call("utility-sprite"),name:k.call("switch")}}),(function(){return k.include(t.lookupTemplate("steedos_icon"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.SPAN({class:"slds-truncate",title:function(){return k.mustache(k.dot(t.lookup("."),"name"))}},c.View("lookup:..name",(function(){return k.mustache(k.dot(t.lookup("."),"name"))}))),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({"aria-hidden":"false",class:"slds-section__content",id:"expando-unique-id"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(k.dot(t.lookup("."),"fields"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-grid view-page-section-row"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.Each((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",b.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t",c._TemplateWith((function(){return{name:k.call(t.lookup("."))}}),(function(){return k.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t\t\t"]}))})),"\n\t\t\t\t\t\n\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t"]})),"\n\t\t\t\t\t"]})),"\n\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmIsMultipleUpdate"))}),(function(){return["\n\t\t\t\t\t\t",b.DIV({class:"form-group multiple-box"},"\n\t\t\t\t\t\t\t",b.LABEL({class:"col-sm-2 control-label"}),"\n\t\t\t\t\t\t\t",b.DIV({class:"col-sm-10"},"\n\t\t\t\t\t\t\t\t",b.LABEL({class:"slds-checkbox"},"\n\t\t\t\t\t\t\t\t\t",b.INPUT({class:"keyboardMode--trigger ckb-multiple-update",type:"checkbox"}),"\n\t\t\t\t\t\t\t\t\t",b.SPAN({class:"slds-checkbox--faux"}),"\n\t\t\t\t\t\t\t\t\t",b.SPAN({class:"label-multiple-update"},"更新 ",c.View("lookup:cmTargetIds.length",(function(){return k.mustache(k.dot(t.lookup("cmTargetIds"),"length"))}))," 个选定记录"),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",b.SPAN({class:"help-block"}),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"remove")}),(function(){return["\n\t\t\t\t\t\t",b.DIV({class:"remove-prompt slds-text-align--center"},"是否确定要删除本条数据?"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\n\t\t\t\t",b.FOOTER({class:"slds-modal__footer"},"\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"insert")}),(function(){return["\n\t\t\t\t\t\t",b.BUTTON({type:"submit",class:"slds-button slds-button_brand btn-insert"},"保存"),"\n\n\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmSaveAndInsert"))}),(function(){return["\n\t\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-insert-and-create"},"保存并新建"),"\n\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"update")}),(function(){return["\n\n\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmShowRemoveButton"))}),(function(){return["\n\t\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_destructive btn-remove"},"删除"),"\n\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_brand btn-update"},"保存"),"\n\n\t\t\t\t\t\t",c.If((function(){return k.call(t.lookup("cmSaveAndInsert"))}),(function(){return["\n\t\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-update-and-create"},"保存并新建"),"\n\t\t\t\t\t\t"]})),"\n\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t\t",c.If((function(){return k.dataMustache(t.lookup("$eq"),t.lookup("cmOperation"),"remove")}),(function(){return["\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_brand btn-remove"},"删除"),"\n\t\t\t\t\t\t",b.BUTTON({class:"slds-button slds-button_neutral btn-cancel","data-dismiss":"modal"},"取消"),"\n\t\t\t\t\t"]})),"\n\t\t\t\t"),"\n\t\t\t"),"\n\t\t"),"\n\t")})),s.__checkName("afModal"),s.afModal=new s("Template.afModal",(function(){var t=this;return b.A({href:"#afModal",class:function(){return k.mustache(t.lookup("class"))},collection:function(){return k.mustache(t.lookup("collection"))},operation:function(){return k.mustache(t.lookup("operation"))}},"\n\t\t",c._InOuterTemplateScope(t,(function(){return k.include((function(){return k.call(t.templateContentBlock)}))})),"\n\t")}))}).call(this),function(){var o=C="object"==typeof C?C:{},n,l,c,u,i,m,f,g,h,k,b;b=["cmForm"],c="cmForm",n=null,d.addHooks("cmForm",{onSuccess:function(){return a("#afModal").modal("hide")},onError:function(e,o){return console.error(o),o.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(o.reason)):void 0:o.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(o.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(o):void 0}}),l=function(t){return t.split(".").reduce((function(t,e){return t[e]}),window)},f=function(t){var e;return e=_.map(t,(function(t,e){return(!t.autoform||!t.autoform.group)&&e})),e=_.compact(e)},h=function(t){var e;return e=_.map(t,(function(t){return t.autoform&&t.autoform.group})),e=_.compact(e),e=_.unique(e)},u=function(t,e){var o;return o=_.map(t,(function(t,o){return t.autoform&&t.autoform.group===e&&o})),o=_.compact(o)},g=function(t,e){return e=_.map(e,(function(e){var o,n;return(null==(n=(o=_.pick(t,e))[e].autoform)||!n.omit)&&e})),e=_.compact(e)},m=function(t,e){return e=_.map(e,(function(e){return _.indexOf(t,e)>-1&&e})),e=_.compact(e)},i=function(t,e){var o,n,a,l,s,r,c;for(n=[],a=0;a1?(s=r.get("cmCollection"),f=p,c=d.getFormValues(r.get("cmFormId")||"cmForm").updateDoc,m=r.get("object_name"),e.call("af_modal_multiple_update",{target_ids:f,doc:c,object_name:m},(function(e){return e?(console.error(e),e.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(e.reason)):void 0:e.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(error.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error("Sorry, update failed."):void 0):(a("#afModal").modal("hide"),"function"==typeof n?n():void 0)}))):a("#afModal #cmForm").submit()},"click button.btn-remove":function(e,o){var s,c,u;return c=r.get("cmCollection"),u=r.get("cmOperation"),s=r.get("cmDoc")._id,l(c).remove(s,(function(e){return e?(console.error(e),e.reason?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(e.reason)):void 0:e.message?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(t(error.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error("Sorry, this could not be deleted."):void 0):(a("#afModal").modal("hide"),"function"==typeof n&&n(),"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.success?toastr.success(t("afModal_remove_suc")):void 0)}))},"click button.btn-update-and-create":function(t,e){return a("#afModal #cmForm").submit(),r.set("cmShowAgain",!0)},"click button.btn-insert-and-create":function(t,e){return a("#afModal #cmForm").submit(),r.set("cmShowAgain",!0)},"click .group-section-control":function(t,e){return t.preventDefault(),t.stopPropagation(),a(t.currentTarget).closest(".group-section").toggleClass("slds-is-open")}}),k={cmCollection:function(){return r.get("cmCollection")},cmOperation:function(){return r.get("cmOperation")},cmDoc:function(){return r.get("cmDoc")},cmButtonHtml:function(){return r.get("cmButtonHtml")},cmFields:function(){return r.get("cmFields")},cmOmitFields:function(){return r.get("cmOmitFields")},cmButtonContent:function(){return r.get("cmButtonContent")},cmCloseButtonContent:function(){return r.get("cmCloseButtonContent")},cmTitle:function(){return r.get("cmTitle")},cmButtonClasses:function(){return r.get("cmButtonClasses")},cmCloseButtonClasses:function(){return r.get("cmCloseButtonClasses")},cmPrompt:function(){return r.get("cmPrompt")},cmTemplate:function(){return r.get("cmTemplate")||"bootstrap3-horizontal"},cmLabelClass:function(){return r.get("cmLabelClass")||"col-sm-2"},cmInputColClass:function(){return r.get("cmInputColClass")||"col-sm-10"},cmPlaceholder:function(){return r.get("cmPlaceholder")},cmFormId:function(){return r.get("cmFormId")||"cmForm"},cmAutoformType:function(){return r.get("cmMeteorMethod")?"method":r.get("cmOperation")},cmModalDialogClass:function(){return r.get("cmModalDialogClass")},cmModalContentClass:function(){return r.get("cmModalContentClass")},cmMeteorMethod:function(){return r.get("cmMeteorMethod")},title:function(){return p.compile("{{{cmTitle}}}",k)},prompt:function(){return p.compile("{{{cmPrompt}}}",k)},buttonContent:function(){return p.compile("{{{cmButtonContent}}}",k)},closeButtonContent:function(){return p.compile("{{{cmCloseButtonContent}}}",k)},cmShowRemoveButton:function(){return r.get("cmShowRemoveButton")},shouldUpdateQuickForm:function(){var t;return null!=(t=s.instance())?t.shouldUpdateQuickForm.get():void 0},cmSaveAndInsert:function(){return r.get("cmSaveAndInsert")},cmIsMultipleUpdate:function(){var t,e;return t=r.get("cmIsMultipleUpdate")&&(null!=(e=r.get("cmTargetIds"))?e.length:void 0)>1},cmTargetIds:function(){return r.get("cmTargetIds")},schemaFields:function(){var t,e,o,n,a,s,c,d,p;if(t=r.get("cmCollection"),d=[],t)return p=l(t).simpleSchema()._schema,s=l(t).simpleSchema()._firstLevelSchemaKeys,r.get("cmFields")&&(s=[r.get("cmFields")]),r.get("cmOmitFields")&&(s=_.difference(s,[r.get("cmOmitFields")])),_.each(p,(function(t,e){var o;if(_.indexOf(s,e)>-1&&!(null!=(o=t.autoform)?o.omit:void 0))return d.push(e)})),1===d.length?a={grouplessFields:[d]}:(o=[],n=[],c=[],c=f(p),c=m(s,c),c=g(p,c),c=i(p,c),e=h(p),_.each(e,(function(t){return n=u(p,t),n=m(s,n),n=g(p,n),n=i(p,n),o.push({name:t,fields:n})})),a={grouplessFields:c,groupFields:o})}},s.autoformModals.helpers(k),s.afModal.events({"click *":function(t,e){var o,s,c;return t.preventDefault(),o=e.$("*").html(),e.data.collectionName?"update"===e.data.operation?c="编辑"+e.data.collectionName:"insert"===e.data.operation?c="新建"+e.data.collectionName:"remove"===e.data.operation&&(c="删除"+e.data.collectionName):c=o,r.set("cmCollection",e.data.collection),r.set("cmOperation",e.data.operation),r.set("cmFields",e.data.fields),r.set("cmOmitFields",e.data.omitFields),r.set("cmButtonHtml",o),r.set("cmTitle",e.data.title||c),r.set("cmTemplate",e.data.template),r.set("cmLabelClass",e.data.labelClass||e.data["label-class"]),r.set("cmInputColClass",e.data.inputColClass||e.data["input-col-class"]),r.set("cmPlaceholder",!0===e.data.placeholder?"schemaLabel":""),r.set("cmFormId",e.data.formId),r.set("cmMeteorMethod",e.data.meteormethod),r.set("cmModalDialogClass",e.data.dialogClass),r.set("cmModalContentClass",e.data.contentClass),r.set("cmShowRemoveButton",e.data.showRemoveButton||!1),r.set("cmSaveAndInsert",e.data.saveAndInsert),n=e.data.onSuccess,_.contains(b,e.data.formId)||(d.addHooks(e.data.formId,{onSuccess:function(){return a("#afModal").modal("hide")}}),b.push(e.data.formId)),e.data.doc&&r.set("cmDoc",l(e.data.collection).findOne({_id:e.data.doc})),e.data.showRemoveButton&&(e.data.buttonContent=!1),e.data.buttonContent||!1===e.data.buttonContent?r.set("cmButtonContent",e.data.buttonContent):"insert"===e.data.operation?r.set("cmButtonContent","Create"):"update"===e.data.operation?r.set("cmButtonContent","Update"):"remove"===e.data.operation&&r.set("cmButtonContent","Delete"),e.data.buttonClasses?r.set("cmButtonClasses",e.data.buttonClasses):"remove"===e.data.operation?r.set("cmButtonClasses","btn btn-danger"):r.set("cmButtonClasses","btn btn-primary"),r.set("cmCloseButtonContent",e.data.closeButtonContent||""),r.set("cmCloseButtonClasses",e.data.closeButtonClasses||"btn btn-danger"),e.data.prompt?r.set("cmPrompt",e.data.prompt):"remove"===e.data.operation?r.set("cmPrompt","Are you sure?"):r.set("cmPrompt",""),s=t.currentTarget.className,r.set("cmPressKey",s),r.get("cmShowAgain")&&(r.set("cmDoc",void 0),r.set("cmOperation","insert")),r.set("cmShowAgain",!1),a("#afModal").data("bs.modal").options.backdrop=e.data.backdrop||!0,a("#afModal").modal("show")}}),s.autoformModals.onCreated((function(){var t;return t=this,this.shouldUpdateQuickForm=new ReactiveVar(!0)})),s.autoformModals.onDestroyed((function(){return r.set("cmIsMultipleUpdate",!1),r.set("cmTargetIds",null)}))}.call(this),Package._define("steedos:autoform-modals")}(); diff --git a/server/bundle/programs/web.cordova/fb4cf6e7df455043d1874910f489bd5cde8823b7.stats.json b/server/bundle/programs/web.cordova/e1ec5a6649a0245e29a456099f5acd3caeb34798.stats.json similarity index 99% rename from server/bundle/programs/web.cordova/fb4cf6e7df455043d1874910f489bd5cde8823b7.stats.json rename to server/bundle/programs/web.cordova/e1ec5a6649a0245e29a456099f5acd3caeb34798.stats.json index 777e6af630..3b95c13580 100644 --- a/server/bundle/programs/web.cordova/fb4cf6e7df455043d1874910f489bd5cde8823b7.stats.json +++ b/server/bundle/programs/web.cordova/e1ec5a6649a0245e29a456099f5acd3caeb34798.stats.json @@ -3,15 +3,15 @@ "name": "standard-minifier-js", "version": "2.6.0" }, - "totalMinifiedBytes": 4483059, - "totalMinifiedGzipBytes": 1144398, + "totalMinifiedBytes": 4483093, + "totalMinifiedGzipBytes": 1144376, "minifiedBytesByPackage": { "packages/meteor.js": 9639, "packages/coffeescript.js": 32, "packages/blaze-html-templates.js": 40, "packages/modules-runtime.js": 4269, "packages/modules.js": [ - 1027482, + 1027468, { "node_modules": { "meteor": { @@ -593,7 +593,7 @@ }, "@steedos": { "i18n": { - "package.json": 95, + "package.json": 88, "lib": { "index.js": 2137, "i18n": { @@ -626,7 +626,7 @@ } }, "cachers": { - "package.json": 98, + "package.json": 91, "lib": { "index.js": 412, "memory.js": 501, @@ -1776,7 +1776,7 @@ "packages/dburles_collection-helpers.js": 557, "packages/mrt_moment.js": 30, "packages/steedos_loaders-css.js": 39, - "packages/matb33_collection-hooks.js": 9263, + "packages/matb33_collection-hooks.js": 9265, "packages/steedos_smsqueue.js": 36, "packages/flemay_less-autoprefixer.js": 44, "packages/steedos_ui.js": [ @@ -2115,7 +2115,7 @@ } } ], - "packages/steedos_mailqueue.js": 37, + "packages/steedos_mailqueue.js": 60, "packages/steedos_webhookqueue.js": 40, "packages/lamhieu_meteorx.js": 73, "packages/lamhieu_unblock.js": 35, @@ -2392,7 +2392,7 @@ } } ], - "packages/steedos_object-webhooks-queue.js": 49, + "packages/steedos_object-webhooks-queue.js": 72, "packages/steedos_autoform-modals.js": 20485, "packages/steedos_slipjs.js": 15081, "packages/steedos_workflow.js": [ diff --git a/server/bundle/programs/web.cordova/program.json b/server/bundle/programs/web.cordova/program.json index 10d5a1f79b..27c155ff04 100644 --- a/server/bundle/programs/web.cordova/program.json +++ b/server/bundle/programs/web.cordova/program.json @@ -2,24 +2,24 @@ "format": "web-program-pre1", "manifest": [ { - "path": "fb4cf6e7df455043d1874910f489bd5cde8823b7.js", + "path": "e1ec5a6649a0245e29a456099f5acd3caeb34798.js", "where": "client", "type": "js", "cacheable": true, - "url": "/__cordova/fb4cf6e7df455043d1874910f489bd5cde8823b7.js?meteor_js_resource=true", - "size": 4483059, - "hash": "fb4cf6e7df455043d1874910f489bd5cde8823b7", - "sri": "bBix8D/m0nCVpVvmNLczkokJOf4g3Jm+AOligOGE/CVqbyXArFolDx53Od0wps9XkycAz+kDuiRgDNs9eTWliA==" + "url": "/__cordova/e1ec5a6649a0245e29a456099f5acd3caeb34798.js?meteor_js_resource=true", + "size": 4483093, + "hash": "e1ec5a6649a0245e29a456099f5acd3caeb34798", + "sri": "TBr3GrvrsJfM0FWyJQl3p3ySbRHh4nQsnov5186s0uxycfyn7dQVAvB7j/wNRqmvG7hnvxHnse/tq6jTF16FPA==" }, { - "path": "fb4cf6e7df455043d1874910f489bd5cde8823b7.stats.json", + "path": "e1ec5a6649a0245e29a456099f5acd3caeb34798.stats.json", "where": "client", "type": "json", "cacheable": true, - "url": "/__cordova/fb4cf6e7df455043d1874910f489bd5cde8823b7.stats.json?meteor_js_resource=true", + "url": "/__cordova/e1ec5a6649a0245e29a456099f5acd3caeb34798.stats.json?meteor_js_resource=true", "size": 82586, - "hash": "5be3f098434fbb04485aa9a4fa002f6246eb43a1", - "sri": "38vl1341OSTLh1ZARiWQqfiUDcVRbcrEtCHMkZnbU4WAoRfFlrJMqTAAM61yU/nrq+Bn2uY9eCg7druyShdXnQ==" + "hash": "10a67188367cb3a2208882a653308af99996f07a", + "sri": "Xe6pzu2mtt2TFrQN91zA/LKzN1IdweCKeU+jOU+qwGoqR1DdTos+601DOf/7LbNoshaliO03YG38oKEcQNNqiw==" }, { "path": "106b9e345091b56401f90f1c9096385cd0758cb4.css", @@ -38,8 +38,8 @@ "cacheable": false, "url": "/__cordova/packages/aldeed_tabular/images/sort_asc.png", "size": 1118, - "hash": "316902f252ed6c1df0f2e249b595947ea614561f", - "sri": "Nuoh8B6BuGHNfEMcEHBZAoIr9Hqg328mnKZu8sn85o8HP3yCGm3WWL1+6HnrnfdsohuJ7lisX5qag8ImWgdKmw==" + "hash": "f7d6c6b431b0d8e55f2edc2cac3b93319a48445e", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_asc.png", @@ -48,8 +48,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_asc.png", "size": 1118, - "hash": "316902f252ed6c1df0f2e249b595947ea614561f", - "sri": "Nuoh8B6BuGHNfEMcEHBZAoIr9Hqg328mnKZu8sn85o8HP3yCGm3WWL1+6HnrnfdsohuJ7lisX5qag8ImWgdKmw==" + "hash": "f7d6c6b431b0d8e55f2edc2cac3b93319a48445e", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_asc_disabled.png", @@ -58,8 +58,8 @@ "cacheable": false, "url": "/__cordova/packages/aldeed_tabular/images/sort_asc_disabled.png", "size": 2916, - "hash": "d3b36e7e840073d72c41234d8ea9458f6fbfdd89", - "sri": "Np57d/2rfIV4VBtl977miwbZdQVVtfe7JCeZAAQNAJBVm96NeBs2yHIos6KTPsRyPfn72bR2wQ+Ie93VbCyB5w==" + "hash": "cafa49620d7bd15a9fd0644dedec4ba862b3a2d4", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_asc_disabled.png", @@ -68,8 +68,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_asc_disabled.png", "size": 2916, - "hash": "d3b36e7e840073d72c41234d8ea9458f6fbfdd89", - "sri": "Np57d/2rfIV4VBtl977miwbZdQVVtfe7JCeZAAQNAJBVm96NeBs2yHIos6KTPsRyPfn72bR2wQ+Ie93VbCyB5w==" + "hash": "cafa49620d7bd15a9fd0644dedec4ba862b3a2d4", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_both.png", @@ -78,8 +78,8 @@ "cacheable": false, "url": "/__cordova/packages/aldeed_tabular/images/sort_both.png", "size": 1136, - "hash": "ab54233bd2b1c940c4dc31fb0c61153df0688cd3", - "sri": "kwpWVgKlaCLJoySRqvgvt4GPbeqSqx+eBIKkOT4LOxt5w0uhM3z2hK/QtVVRzk/p7XN3ljW0PlvgO/uCB+G+KQ==" + "hash": "7d5a19949989bb107e478c6e55ea65f8c325abcd", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_both.png", @@ -88,8 +88,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_both.png", "size": 1136, - "hash": "ab54233bd2b1c940c4dc31fb0c61153df0688cd3", - "sri": "kwpWVgKlaCLJoySRqvgvt4GPbeqSqx+eBIKkOT4LOxt5w0uhM3z2hK/QtVVRzk/p7XN3ljW0PlvgO/uCB+G+KQ==" + "hash": "7d5a19949989bb107e478c6e55ea65f8c325abcd", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_desc.png", @@ -98,8 +98,8 @@ "cacheable": false, "url": "/__cordova/packages/aldeed_tabular/images/sort_desc.png", "size": 1127, - "hash": "e0d717f0b79a6fa7648a2f7803db6883482d94d3", - "sri": "WcMO6Jpo1AHAjz5kpNECZzheBFC1I2aUzGoYr+UTdKg/gtLWrw48Z2hxpzvt2V38F8G/4z7CgVxRxES189aUMg==" + "hash": "d69a3fd48716a8c4d8df38859cd0c1d7dab5e296", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_desc.png", @@ -108,8 +108,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_desc.png", "size": 1127, - "hash": "e0d717f0b79a6fa7648a2f7803db6883482d94d3", - "sri": "WcMO6Jpo1AHAjz5kpNECZzheBFC1I2aUzGoYr+UTdKg/gtLWrw48Z2hxpzvt2V38F8G/4z7CgVxRxES189aUMg==" + "hash": "d69a3fd48716a8c4d8df38859cd0c1d7dab5e296", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_desc_disabled.png", @@ -118,8 +118,8 @@ "cacheable": false, "url": "/__cordova/packages/aldeed_tabular/images/sort_desc_disabled.png", "size": 1045, - "hash": "d78cd75eda77f65256044e0c16554a48901fe46f", - "sri": "wWNhEtCCD5xwQdWjTJJtJh2jA5jTW7zZ6N8rKBufbZ0n5f/i+dDSZFVafcMEuBGi+1jFnjINgbsQcozynkBlTA==" + "hash": "cd40181787ffeaef98d82fba7b0f6b7a5293e2aa", + "sri": null }, { "path": "packages/aldeed_tabular/images/sort_desc_disabled.png", @@ -128,8 +128,8 @@ "cacheable": false, "url": "/packages/aldeed_tabular/images/sort_desc_disabled.png", "size": 1045, - "hash": "d78cd75eda77f65256044e0c16554a48901fe46f", - "sri": "wWNhEtCCD5xwQdWjTJJtJh2jA5jTW7zZ6N8rKBufbZ0n5f/i+dDSZFVafcMEuBGi+1jFnjINgbsQcozynkBlTA==" + "hash": "cd40181787ffeaef98d82fba7b0f6b7a5293e2aa", + "sri": null }, { "path": "packages/steedos_autoform-bs-minicolors/public/jquery.minicolors.png", diff --git a/server/bundle/star.json b/server/bundle/star.json index aac003d054..35f2c28f31 100644 --- a/server/bundle/star.json +++ b/server/bundle/star.json @@ -36,5 +36,5 @@ "meteorRelease": "METEOR@1.9.3", "nodeVersion": "12.16.1", "npmVersion": "6.13.4", - "gitCommitHash": "679bc7c5e6889ec7de3cc02952ea51156ea53179" + "gitCommitHash": "b066e997a1a0140540d94bd8ef8ea218facebf69" } \ No newline at end of file