{"version":3,"file":"frappe-web.min.js","sources":["../../../apps/frappe/frappe/public/js/frappe/class.js","../../../apps/frappe/frappe/public/js/frappe/polyfill.js","../../../apps/frappe/frappe/public/js/lib/md5.min.js","../../../apps/frappe/frappe/public/js/frappe/provide.js","../../../apps/frappe/frappe/public/js/frappe/format.js","../../../apps/frappe/frappe/public/js/frappe/utils/datatype.js","../../../apps/frappe/frappe/public/js/frappe/utils/number_format.js","../../../apps/frappe/node_modules/fast-deep-equal/index.js","../../../apps/frappe/node_modules/lodash/_listCacheClear.js","../../../apps/frappe/node_modules/lodash/eq.js","../../../apps/frappe/node_modules/lodash/_assocIndexOf.js","../../../apps/frappe/node_modules/lodash/_listCacheDelete.js","../../../apps/frappe/node_modules/lodash/_listCacheGet.js","../../../apps/frappe/node_modules/lodash/_listCacheHas.js","../../../apps/frappe/node_modules/lodash/_listCacheSet.js","../../../apps/frappe/node_modules/lodash/_ListCache.js","../../../apps/frappe/node_modules/lodash/_stackClear.js","../../../apps/frappe/node_modules/lodash/_stackDelete.js","../../../apps/frappe/node_modules/lodash/_stackGet.js","../../../apps/frappe/node_modules/lodash/_stackHas.js","../../../apps/frappe/node_modules/lodash/_freeGlobal.js","../../../apps/frappe/node_modules/lodash/_root.js","../../../apps/frappe/node_modules/lodash/_Symbol.js","../../../apps/frappe/node_modules/lodash/_getRawTag.js","../../../apps/frappe/node_modules/lodash/_objectToString.js","../../../apps/frappe/node_modules/lodash/_baseGetTag.js","../../../apps/frappe/node_modules/lodash/isObject.js","../../../apps/frappe/node_modules/lodash/isFunction.js","../../../apps/frappe/node_modules/lodash/_coreJsData.js","../../../apps/frappe/node_modules/lodash/_isMasked.js","../../../apps/frappe/node_modules/lodash/_toSource.js","../../../apps/frappe/node_modules/lodash/_baseIsNative.js","../../../apps/frappe/node_modules/lodash/_getValue.js","../../../apps/frappe/node_modules/lodash/_getNative.js","../../../apps/frappe/node_modules/lodash/_Map.js","../../../apps/frappe/node_modules/lodash/_nativeCreate.js","../../../apps/frappe/node_modules/lodash/_hashClear.js","../../../apps/frappe/node_modules/lodash/_hashDelete.js","../../../apps/frappe/node_modules/lodash/_hashGet.js","../../../apps/frappe/node_modules/lodash/_hashHas.js","../../../apps/frappe/node_modules/lodash/_hashSet.js","../../../apps/frappe/node_modules/lodash/_Hash.js","../../../apps/frappe/node_modules/lodash/_mapCacheClear.js","../../../apps/frappe/node_modules/lodash/_isKeyable.js","../../../apps/frappe/node_modules/lodash/_getMapData.js","../../../apps/frappe/node_modules/lodash/_mapCacheDelete.js","../../../apps/frappe/node_modules/lodash/_mapCacheGet.js","../../../apps/frappe/node_modules/lodash/_mapCacheHas.js","../../../apps/frappe/node_modules/lodash/_mapCacheSet.js","../../../apps/frappe/node_modules/lodash/_MapCache.js","../../../apps/frappe/node_modules/lodash/_stackSet.js","../../../apps/frappe/node_modules/lodash/_Stack.js","../../../apps/frappe/node_modules/lodash/_arrayEach.js","../../../apps/frappe/node_modules/lodash/_defineProperty.js","../../../apps/frappe/node_modules/lodash/_baseAssignValue.js","../../../apps/frappe/node_modules/lodash/_assignValue.js","../../../apps/frappe/node_modules/lodash/_copyObject.js","../../../apps/frappe/node_modules/lodash/_baseTimes.js","../../../apps/frappe/node_modules/lodash/isObjectLike.js","../../../apps/frappe/node_modules/lodash/_baseIsArguments.js","../../../apps/frappe/node_modules/lodash/isArguments.js","../../../apps/frappe/node_modules/lodash/isArray.js","../../../apps/frappe/node_modules/lodash/stubFalse.js","../../../apps/frappe/node_modules/lodash/isBuffer.js","../../../apps/frappe/node_modules/lodash/_isIndex.js","../../../apps/frappe/node_modules/lodash/isLength.js","../../../apps/frappe/node_modules/lodash/_baseIsTypedArray.js","../../../apps/frappe/node_modules/lodash/_baseUnary.js","../../../apps/frappe/node_modules/lodash/_nodeUtil.js","../../../apps/frappe/node_modules/lodash/isTypedArray.js","../../../apps/frappe/node_modules/lodash/_arrayLikeKeys.js","../../../apps/frappe/node_modules/lodash/_isPrototype.js","../../../apps/frappe/node_modules/lodash/_overArg.js","../../../apps/frappe/node_modules/lodash/_nativeKeys.js","../../../apps/frappe/node_modules/lodash/_baseKeys.js","../../../apps/frappe/node_modules/lodash/isArrayLike.js","../../../apps/frappe/node_modules/lodash/keys.js","../../../apps/frappe/node_modules/lodash/_baseAssign.js","../../../apps/frappe/node_modules/lodash/_nativeKeysIn.js","../../../apps/frappe/node_modules/lodash/_baseKeysIn.js","../../../apps/frappe/node_modules/lodash/keysIn.js","../../../apps/frappe/node_modules/lodash/_baseAssignIn.js","../../../apps/frappe/node_modules/lodash/_cloneBuffer.js","../../../apps/frappe/node_modules/lodash/_copyArray.js","../../../apps/frappe/node_modules/lodash/_arrayFilter.js","../../../apps/frappe/node_modules/lodash/stubArray.js","../../../apps/frappe/node_modules/lodash/_getSymbols.js","../../../apps/frappe/node_modules/lodash/_copySymbols.js","../../../apps/frappe/node_modules/lodash/_arrayPush.js","../../../apps/frappe/node_modules/lodash/_getPrototype.js","../../../apps/frappe/node_modules/lodash/_getSymbolsIn.js","../../../apps/frappe/node_modules/lodash/_copySymbolsIn.js","../../../apps/frappe/node_modules/lodash/_baseGetAllKeys.js","../../../apps/frappe/node_modules/lodash/_getAllKeys.js","../../../apps/frappe/node_modules/lodash/_getAllKeysIn.js","../../../apps/frappe/node_modules/lodash/_DataView.js","../../../apps/frappe/node_modules/lodash/_Promise.js","../../../apps/frappe/node_modules/lodash/_Set.js","../../../apps/frappe/node_modules/lodash/_WeakMap.js","../../../apps/frappe/node_modules/lodash/_getTag.js","../../../apps/frappe/node_modules/lodash/_initCloneArray.js","../../../apps/frappe/node_modules/lodash/_Uint8Array.js","../../../apps/frappe/node_modules/lodash/_cloneArrayBuffer.js","../../../apps/frappe/node_modules/lodash/_cloneDataView.js","../../../apps/frappe/node_modules/lodash/_cloneRegExp.js","../../../apps/frappe/node_modules/lodash/_cloneSymbol.js","../../../apps/frappe/node_modules/lodash/_cloneTypedArray.js","../../../apps/frappe/node_modules/lodash/_initCloneByTag.js","../../../apps/frappe/node_modules/lodash/_baseCreate.js","../../../apps/frappe/node_modules/lodash/_initCloneObject.js","../../../apps/frappe/node_modules/lodash/_baseIsMap.js","../../../apps/frappe/node_modules/lodash/isMap.js","../../../apps/frappe/node_modules/lodash/_baseIsSet.js","../../../apps/frappe/node_modules/lodash/isSet.js","../../../apps/frappe/node_modules/lodash/_baseClone.js","../../../apps/frappe/node_modules/lodash/cloneDeepWith.js","../../../apps/frappe/frappe/public/js/frappe/utils/utils.js","../../../apps/frappe/frappe/public/js/frappe/utils/common.js","../../../apps/frappe/frappe/public/js/frappe/form/layout.js","../../../apps/frappe/frappe/public/js/frappe/ui/field_group.js","../../../apps/frappe/frappe/public/js/frappe/dom.js","../../../apps/frappe/frappe/public/js/frappe/ui/dialog.js","../../../apps/frappe/frappe/public/js/frappe/ui/messages.js","../../../apps/frappe/frappe/public/js/frappe/translate.js","../../../apps/frappe/frappe/public/js/frappe/utils/pretty_date.js","../../../apps/frappe/frappe/public/js/frappe/microtemplate.js","../../../apps/frappe/frappe/public/js/frappe/query_string.js","../../../apps/frappe/frappe/public/js/frappe/file_uploader/ProgressRing.vue?rollup-plugin-vue=script.js","../../../apps/frappe/frappe/public/js/frappe/file_uploader/ProgressRing.vue","../../../apps/frappe/frappe/public/js/frappe/file_uploader/FilePreview.vue?rollup-plugin-vue=script.js","../../../apps/frappe/frappe/public/js/frappe/file_uploader/FilePreview.vue","../../../apps/frappe/frappe/public/js/frappe/file_uploader/TreeNode.vue?rollup-plugin-vue=script.js","../../../apps/frappe/frappe/public/js/frappe/file_uploader/TreeNode.vue","../../../apps/frappe/frappe/public/js/frappe/file_uploader/FileBrowser.vue?rollup-plugin-vue=script.js","../../../apps/frappe/frappe/public/js/frappe/file_uploader/FileBrowser.vue","../../../apps/frappe/frappe/public/js/frappe/file_uploader/WebLink.vue?rollup-plugin-vue=script.js","../../../apps/frappe/frappe/public/js/frappe/file_uploader/WebLink.vue","../../../apps/frappe/frappe/public/js/integrations/google_drive_picker.js","../../../apps/frappe/frappe/public/js/frappe/file_uploader/FileUploader.vue?rollup-plugin-vue=script.js","../../../apps/frappe/frappe/public/js/frappe/file_uploader/FileUploader.vue","../../../apps/frappe/frappe/public/js/frappe/file_uploader/index.js","../../../apps/frappe/frappe/public/js/frappe/upload.js","../../../apps/frappe/frappe/public/js/frappe/model/meta.js","../../../apps/frappe/frappe/public/js/frappe/model/model.js","../../../apps/frappe/frappe/public/js/frappe/model/perm.js","../../../apps/frappe/node_modules/highlight.js/lib/core.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/javascript.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/python.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/xml.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/django.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/bash.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/css.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/markdown.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/diff.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/json.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/less.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/nginx.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/scss.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/shell.js","../../../apps/frappe/node_modules/highlight.js/lib/languages/sql.js","../../../apps/frappe/frappe/website/js/syntax_highlight.js","../../../apps/frappe/frappe/website/js/website.js","../../../apps/frappe/frappe/public/js/frappe/socketio_client.js"],"sourcesContent":["// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n// MIT License. See license.txt\n\n/*\n\nInheritence \"Class\"\n-------------------\nsee: http://ejohn.org/blog/simple-javascript-inheritance/\nTo subclass, use:\n\n\tvar MyClass = Class.extend({\n\t\tinit: function\n\t})\n\n*/\n// https://stackoverflow.com/a/15052240/5353542\n\n/* Simple JavaScript Inheritance for ES 5.1\n * based on http://ejohn.org/blog/simple-javascript-inheritance/\n * (inspired by base2 and Prototype)\n * MIT Licensed.\n */\n(function(global) {\n\t\"use strict\";\n\tvar fnTest = /xyz/.test(function(){xyz;}) ? /\\b_super\\b/ : /.*/;\n\n\t// The base Class implementation (does nothing)\n\tfunction Class(){}\n\n\t// Create a new Class that inherits from this class\n\tClass.extend = function(props) {\n\t var _super = this.prototype;\n\n\t // Set up the prototype to inherit from the base class\n\t // (but without running the init constructor)\n\t var proto = Object.create(_super);\n\n\t // Copy the properties over onto the new prototype\n\t for (var name in props) {\n\t\t// Check if we're overwriting an existing function\n\t\tproto[name] = typeof props[name] === \"function\" &&\n\t\t typeof _super[name] == \"function\" && fnTest.test(props[name])\n\t\t ? (function(name, fn){\n\t\t\t return function() {\n\t\t\t\tvar tmp = this._super;\n\n\t\t\t\t// Add a new ._super() method that is the same method\n\t\t\t\t// but on the super-class\n\t\t\t\tthis._super = _super[name];\n\n\t\t\t\t// The method only need to be bound temporarily, so we\n\t\t\t\t// remove it when we're done executing\n\t\t\t\tvar ret = fn.apply(this, arguments);\n\t\t\t\tthis._super = tmp;\n\n\t\t\t\treturn ret;\n\t\t\t };\n\t\t\t})(name, props[name])\n\t\t : props[name];\n\t }\n\n\t // The new constructor\n\t var newClass = typeof proto.init === \"function\"\n\t\t? proto.hasOwnProperty(\"init\")\n\t\t ? proto.init // All construction is actually done in the init method\n\t\t : function SubClass(){ _super.init.apply(this, arguments); }\n\t\t: function EmptyClass(){};\n\n\t // Populate our constructed prototype object\n\t newClass.prototype = proto;\n\n\t // Enforce the constructor to be what we expect\n\t proto.constructor = newClass;\n\n\t // And make this class extendable\n\t newClass.extend = Class.extend;\n\n\t return newClass;\n\t};\n\n\t// export\n\tglobal.Class = Class;\n })(this);","// String.prototype.includes polyfill\n// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/includes\nif (!String.prototype.includes) {\n\tString.prototype.includes = function(search, start) {\n\t\t'use strict';\n\t\tif (typeof start !== 'number') {\n\t\t\tstart = 0;\n\t\t}\n\t\tif (start + search.length > this.length) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn this.indexOf(search, start) !== -1;\n\t\t}\n\t};\n}\n// Array.prototype.includes polyfill\n// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/includes\nif (!Array.prototype.includes) {\n\tObject.defineProperty(Array.prototype, 'includes', {\n\t\tvalue: function(searchElement, fromIndex) {\n\t\t\tif (this == null) {\n\t\t\t\tthrow new TypeError('\"this\" is null or not defined');\n\t\t\t}\n\t\t\tvar o = Object(this);\n\t\t\tvar len = o.length >>> 0;\n\t\t\tif (len === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar n = fromIndex | 0;\n\t\t\tvar k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\t\t\twhile (k < len) {\n\t\t\t\tif (o[k] === searchElement) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n\n\nif (typeof String.prototype.trimLeft !== \"function\") {\n\tString.prototype.trimLeft = function() {\n\t\treturn this.replace(/^\\s+/, \"\");\n\t};\n}\nif (typeof String.prototype.trimRight !== \"function\") {\n\tString.prototype.trimRight = function() {\n\t\treturn this.replace(/\\s+$/, \"\");\n\t};\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\nif (typeof Object.assign != 'function') {\n\t// Must be writable: true, enumerable: false, configurable: true\n\tObject.defineProperty(Object, \"assign\", {\n\t\tvalue: function assign(target) { // .length of function is 2\n\t\t\t'use strict';\n\t\t\tif (target == null) { // TypeError if undefined or null\n\t\t\t\tthrow new TypeError('Cannot convert undefined or null to object');\n\t\t\t}\n\n\t\t\tvar to = Object(target);\n\n\t\t\tfor (var index = 1; index < arguments.length; index++) {\n\t\t\t\tvar nextSource = arguments[index];\n\n\t\t\t\tif (nextSource != null) { // Skip over if undefined or null\n\t\t\t\t\tfor (var nextKey in nextSource) {\n\t\t\t\t\t\t// Avoid bugs when hasOwnProperty is shadowed\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n\t\t\t\t\t\t\tto[nextKey] = nextSource[nextKey];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn to;\n\t\t},\n\t\twritable: true,\n\t\tconfigurable: true\n\t});\n}\n","!function(a){\"use strict\";function b(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function c(a,b){return a<>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<>>9<<4)+14]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b>5]|=(255&a.charCodeAt(b/8))<16&&(e=i(e,8*a.length)),c=0;16>c;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d=\"0123456789abcdef\",e=\"\";for(c=0;c>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}\"function\"==typeof define&&define.amd?define(function(){return t}):a.md5=t}(this);","// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n// MIT License. See license.txt\n\n// provide a namespace\nif(!window.frappe)\n\twindow.frappe = {};\n\nfrappe.provide = function(namespace) {\n\t// docs: create a namespace //\n\tvar nsl = namespace.split('.');\n\tvar parent = window;\n\tfor(var i=0; i= 0; i--) {\n\t\t\tvar l = replace_all(str, info.group_sep, \"\").length;\n\t\t\tif (format == \"#,##,###.##\" && str.indexOf(\",\") != -1) { // INR\n\t\t\t\tgroup_position = 2;\n\t\t\t\tl += 1;\n\t\t\t}\n\n\t\t\tstr += integer.charAt(i);\n\n\t\t\tif (l && !((l + 1) % group_position) && i != 0) {\n\t\t\t\tstr += info.group_sep;\n\t\t\t}\n\t\t}\n\t\tpart[0] = str.split(\"\").reverse().join(\"\");\n\t}\n\tif (part[0] + \"\" == \"\") {\n\t\tpart[0] = \"0\";\n\t}\n\n\t// join decimal\n\tpart[1] = (part[1] && info.decimal_str) ? (info.decimal_str + part[1]) : \"\";\n\n\t// join\n\treturn (is_negative ? \"-\" : \"\") + part[0] + part[1];\n};\n\nfunction format_currency(v, currency, decimals) {\n\tvar format = get_number_format(currency);\n\tvar symbol = get_currency_symbol(currency);\n\tif(decimals === undefined) {\n\t\tdecimals = frappe.boot.sysdefaults.currency_precision || null;\n\t}\n\n\tif (symbol)\n\t\treturn symbol + \" \" + format_number(v, format, decimals);\n\telse\n\t\treturn format_number(v, format, decimals);\n}\n\nfunction get_currency_symbol(currency) {\n\tif (frappe.boot) {\n\t\tif (frappe.boot.sysdefaults && frappe.boot.sysdefaults.hide_currency_symbol == \"Yes\")\n\t\t\treturn null;\n\n\t\tif (!currency)\n\t\t\tcurrency = frappe.boot.sysdefaults.currency;\n\n\t\treturn frappe.model.get_value(\":Currency\", currency, \"symbol\") || currency;\n\t} else {\n\t\t// load in template\n\t\treturn frappe.currency_symbols[currency];\n\t}\n}\n\nfunction get_number_format(currency) {\n\treturn (frappe.boot && frappe.boot.sysdefaults && frappe.boot.sysdefaults.number_format) || \"#,###.##\";\n}\n\nfunction get_number_format_info(format) {\n\tvar info = frappe.number_format_info[format];\n\n\tif (!info) {\n\t\tinfo = { decimal_str: \".\", group_sep: \",\" };\n\t}\n\n\t// get the precision from the number format\n\tinfo.precision = format.split(info.decimal_str).slice(1)[0].length;\n\n\treturn info;\n}\n\nfunction _round(num, precision) {\n\tvar is_negative = num < 0 ? true : false;\n\tvar d = cint(precision);\n\tvar m = Math.pow(10, d);\n\tvar n = +(d ? Math.abs(num) * m : Math.abs(num)).toFixed(8); // Avoid rounding errors\n\tvar i = Math.floor(n), f = n - i;\n\tvar r = ((!precision && f == 0.5) ? ((i % 2 == 0) ? i : i + 1) : Math.round(n));\n\tr = d ? r / m : r;\n\treturn is_negative ? -r : r;\n\n}\n\nfunction roundNumber(num, precision) {\n\t// backward compatibility\n\treturn _round(num, precision);\n}\n\nfunction precision(fieldname, doc) {\n\tif (cur_frm) {\n\t\tif (!doc) doc = cur_frm.doc;\n\t\tvar df = frappe.meta.get_docfield(doc.doctype, fieldname, doc.parent || doc.name);\n\t\tif (!df) console.log(fieldname + \": could not find docfield in method precision()\");\n\t\treturn frappe.meta.get_field_precision(df, doc);\n\t} else {\n\t\treturn frappe.boot.sysdefaults.float_precision\n\t}\n}\n\nfunction in_list(list, item) {\n\treturn list.includes(item);\n}\n\nfunction remainder(numerator, denominator, precision) {\n\tprecision = cint(precision);\n\tvar multiplier = Math.pow(10, precision);\n\tif (precision) {\n\t\tvar _remainder = ((numerator * multiplier) % (denominator * multiplier)) / multiplier;\n\t} else {\n\t\tvar _remainder = numerator % denominator;\n\t}\n\n\treturn flt(_remainder, precision);\n}\n\nfunction round_based_on_smallest_currency_fraction(value, currency, precision) {\n\tvar smallest_currency_fraction_value = flt(frappe.model.get_value(\":Currency\",\n\t\tcurrency, \"smallest_currency_fraction_value\"))\n\n\tif (smallest_currency_fraction_value) {\n\t\tvar remainder_val = remainder(value, smallest_currency_fraction_value, precision);\n\t\tif (remainder_val > (smallest_currency_fraction_value / 2)) {\n\t\t\tvalue += (smallest_currency_fraction_value - remainder_val);\n\t\t} else {\n\t\t\tvalue -= remainder_val;\n\t\t}\n\t} else {\n\t\tvalue = _round(value);\n\t}\n\treturn value;\n}\n\nfunction fmt_money(v, format){\n\t// deprecated!\n\t// for backward compatibility\n\treturn format_currency(v, format);\n}\n\n\nObject.assign(window, {\n\tflt,\n\tcint,\n\tstrip_number_groups,\n\tformat_currency,\n\tfmt_money,\n\tget_currency_symbol,\n\tget_number_format,\n\tget_number_format_info,\n\t_round,\n\troundNumber,\n\tprecision,\n\tremainder,\n\tround_based_on_smallest_currency_fraction,\n\tin_list\n});","'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = isArray(a)\n , arrB = isArray(b)\n , i\n , length\n , key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = a instanceof Date\n , dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n\n var regexpA = a instanceof RegExp\n , regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n\n var keys = keyList(a);\n length = keys.length;\n\n if (length !== keyList(b).length)\n return false;\n\n for (i = length; i-- !== 0;)\n if (!hasProp.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n return a!==a && b!==b;\n};\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\nfunction cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n}\n\nmodule.exports = cloneDeepWith;\n","// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n// MIT License. See license.txt\n\nimport deep_equal from \"fast-deep-equal\";\nimport cloneDeepWith from \"lodash/cloneDeepWith\";\n\nfrappe.provide(\"frappe.utils\");\n\n// Array de duplicate\nif (!Array.prototype.uniqBy) {\n\tObject.defineProperty(Array.prototype, 'uniqBy', {\n\t\tvalue: function (key) {\n\t\t\tvar seen = {};\n\t\t\treturn this.filter(function (item) {\n\t\t\t\tvar k = key(item);\n\t\t\t\treturn k in seen ? false : (seen[k] = true);\n\t\t\t});\n\t\t}\n\t});\n\tObject.defineProperty(Array.prototype, 'move', {\n\t\tvalue: function(from, to) {\n\t\t\tthis.splice(to, 0, this.splice(from, 1)[0]);\n\t\t}\n\t});\n}\n\n// Python's dict.setdefault ported for JS objects\nObject.defineProperty(Object.prototype, \"setDefault\", {\n\tvalue: function(key, default_value) {\n\t\tif (!(key in this)) this[key] = default_value;\n\t\treturn this[key];\n\t},\n\twritable: true\n});\n\n// Pluralize\nString.prototype.plural = function(revert) {\n\tconst plural = {\n\t\t\"(quiz)$\": \"$1zes\",\n\t\t\"^(ox)$\": \"$1en\",\n\t\t\"([m|l])ouse$\": \"$1ice\",\n\t\t\"(matr|vert|ind)ix|ex$\": \"$1ices\",\n\t\t\"(x|ch|ss|sh)$\": \"$1es\",\n\t\t\"([^aeiouy]|qu)y$\": \"$1ies\",\n\t\t\"(hive)$\": \"$1s\",\n\t\t\"(?:([^f])fe|([lr])f)$\": \"$1$2ves\",\n\t\t\"(shea|lea|loa|thie)f$\": \"$1ves\",\n\t\tsis$: \"ses\",\n\t\t\"([ti])um$\": \"$1a\",\n\t\t\"(tomat|potat|ech|her|vet)o$\": \"$1oes\",\n\t\t\"(bu)s$\": \"$1ses\",\n\t\t\"(alias)$\": \"$1es\",\n\t\t\"(octop)us$\": \"$1i\",\n\t\t\"(ax|test)is$\": \"$1es\",\n\t\t\"(us)$\": \"$1es\",\n\t\t\"([^s]+)$\": \"$1s\",\n\t};\n\n\tconst singular = {\n\t\t\"(quiz)zes$\": \"$1\",\n\t\t\"(matr)ices$\": \"$1ix\",\n\t\t\"(vert|ind)ices$\": \"$1ex\",\n\t\t\"^(ox)en$\": \"$1\",\n\t\t\"(alias)es$\": \"$1\",\n\t\t\"(octop|vir)i$\": \"$1us\",\n\t\t\"(cris|ax|test)es$\": \"$1is\",\n\t\t\"(shoe)s$\": \"$1\",\n\t\t\"(o)es$\": \"$1\",\n\t\t\"(bus)es$\": \"$1\",\n\t\t\"([m|l])ice$\": \"$1ouse\",\n\t\t\"(x|ch|ss|sh)es$\": \"$1\",\n\t\t\"(m)ovies$\": \"$1ovie\",\n\t\t\"(s)eries$\": \"$1eries\",\n\t\t\"([^aeiouy]|qu)ies$\": \"$1y\",\n\t\t\"([lr])ves$\": \"$1f\",\n\t\t\"(tive)s$\": \"$1\",\n\t\t\"(hive)s$\": \"$1\",\n\t\t\"(li|wi|kni)ves$\": \"$1fe\",\n\t\t\"(shea|loa|lea|thie)ves$\": \"$1f\",\n\t\t\"(^analy)ses$\": \"$1sis\",\n\t\t\"((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$\":\n\t\t\t\"$1$2sis\",\n\t\t\"([ti])a$\": \"$1um\",\n\t\t\"(n)ews$\": \"$1ews\",\n\t\t\"(h|bl)ouses$\": \"$1ouse\",\n\t\t\"(corpse)s$\": \"$1\",\n\t\t\"(us)es$\": \"$1\",\n\t\ts$: \"\",\n\t};\n\n\tconst irregular = {\n\t\tmove: \"moves\",\n\t\tfoot: \"feet\",\n\t\tgoose: \"geese\",\n\t\tsex: \"sexes\",\n\t\tchild: \"children\",\n\t\tman: \"men\",\n\t\ttooth: \"teeth\",\n\t\tperson: \"people\",\n\t};\n\n\tconst uncountable = [\n\t\t\"sheep\",\n\t\t\"fish\",\n\t\t\"deer\",\n\t\t\"moose\",\n\t\t\"series\",\n\t\t\"species\",\n\t\t\"money\",\n\t\t\"rice\",\n\t\t\"information\",\n\t\t\"equipment\",\n\t];\n\n\t// save some time in the case that singular and plural are the same\n\tif (uncountable.indexOf(this.toLowerCase()) >= 0) return this;\n\n\t// check for irregular forms\n\tlet word;\n\tlet pattern;\n\tlet replace;\n\tfor (word in irregular) {\n\t\tif (revert) {\n\t\t\tpattern = new RegExp(irregular[word] + \"$\", \"i\");\n\t\t\treplace = word;\n\t\t} else {\n\t\t\tpattern = new RegExp(word + \"$\", \"i\");\n\t\t\treplace = irregular[word];\n\t\t}\n\t\tif (pattern.test(this)) return this.replace(pattern, replace);\n\t}\n\n\tlet array;\n\tif (revert) array = singular;\n\telse array = plural;\n\n\t// check for matches using regular expressions\n\tlet reg;\n\tfor (reg in array) {\n\t\tpattern = new RegExp(reg, \"i\");\n\n\t\tif (pattern.test(this)) return this.replace(pattern, array[reg]);\n\t}\n\n\treturn this;\n};\n\nObject.assign(frappe.utils, {\n\tget_random: function(len) {\n\t\tvar text = \"\";\n\t\tvar possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n\t\tfor ( var i=0; i < len; i++ )\n\t\t\ttext += possible.charAt(Math.floor(Math.random() * possible.length));\n\n\t\treturn text;\n\t},\n\tget_file_link: function(filename) {\n\t\tfilename = cstr(filename);\n\t\tif (frappe.utils.is_url(filename)) {\n\t\t\treturn filename;\n\t\t} else if (filename.indexOf(\"/\")===-1) {\n\t\t\treturn \"files/\" + filename;\n\t\t} else {\n\t\t\treturn filename;\n\t\t}\n\t},\n\treplace_newlines(t) {\n\t\treturn t?t.replace(/\\n/g, '
'):'';\n\t},\n\tis_html: function(txt) {\n\t\tif (!txt) return false;\n\n\t\tif (txt.indexOf(\"
\")==-1 && txt.indexOf(\"= 768;\n\t},\n\tis_md: function() {\n\t\treturn $(document).width() < 1199 && $(document).width() >= 991;\n\t},\n\tis_json: function(str) {\n\t\ttry {\n\t\t\tJSON.parse(str);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\tstrip_whitespace: function(html) {\n\t\treturn (html || \"\").replace(/

\\s*<\\/p>/g, \"\").replace(/
(\\s*
\\s*)+/g, \"

\");\n\t},\n\tencode_tags: function(html) {\n\t\tvar tagsToReplace = {\n\t\t\t'&': '&',\n\t\t\t'<': '<',\n\t\t\t'>': '>'\n\t\t};\n\n\t\tfunction replaceTag(tag) {\n\t\t\treturn tagsToReplace[tag] || tag;\n\t\t}\n\n\t\treturn html.replace(/[&<>]/g, replaceTag);\n\t},\n\tstrip_original_content: function(txt) {\n\t\tvar out = [],\n\t\t\tpart = [],\n\t\t\tnewline = txt.indexOf(\"
\")===-1 ? \"\\n\" : \"
\";\n\n\t\t$.each(txt.split(newline), function(i, t) {\n\t\t\tvar tt = strip(t);\n\t\t\tif (tt && (tt.substr(0, 1)===\">\" || tt.substr(0, 4)===\">\")) {\n\t\t\t\tpart.push(t);\n\t\t\t} else {\n\t\t\t\tout.concat(part);\n\t\t\t\tout.push(t);\n\t\t\t\tpart = [];\n\t\t\t}\n\t\t});\n\t\treturn out.join(newline);\n\t},\n\n\n\tescape_html: function(txt) {\n\t\tlet escape_html_mapping = {\n\t\t\t'&': '&',\n\t\t\t'<': '<',\n\t\t\t'>': '>',\n\t\t\t'\"': '"',\n\t\t\t\"'\": ''',\n\t\t\t'/': '/',\n\t\t\t'`': '`',\n\t\t\t'=': '='\n\t\t};\n\n\t\treturn String(txt).replace(/[&<>\"'`=/]/g, function(char) {\n\t\t\treturn escape_html_mapping[char];\n\t\t});\n\t},\n\n\thtml2text: function (html) {\n\t\tconst parser = new DOMParser();\n\t\tconst dom = parser.parseFromString(html, \"text/html\");\n\t\treturn dom.body.textContent;\n\t},\n\n\tis_url: function(txt) {\n\t\treturn txt.toLowerCase().substr(0, 7)=='http://'\n\t\t\t|| txt.toLowerCase().substr(0, 8)=='https://';\n\t},\n\tto_title_case: function(string, with_space=false) {\n\t\tlet titlecased_string = string.toLowerCase().replace(/(?:^|[\\s-/])\\w/g, function(match) {\n\t\t\treturn match.toUpperCase();\n\t\t});\n\n\t\tlet replace_with = with_space ? ' ' : '';\n\n\t\treturn titlecased_string.replace(/-|_/g, replace_with);\n\t},\n\ttoggle_blockquote: function(txt) {\n\t\tif (!txt) return txt;\n\n\t\tvar content = $(\"

\").html(txt);\n\t\tcontent.find(\"blockquote\").parent(\"blockquote\").addClass(\"hidden\")\n\t\t\t.before('

\\\n\t\t\t\t\t• • • \\\n\t\t\t\t

');\n\t\treturn content.html();\n\t},\n\tscroll_to: function(element, animate=true, additional_offset, element_to_be_scrolled) {\n\t\telement_to_be_scrolled = element_to_be_scrolled || $(\"html, body\");\n\t\tlet scroll_top = 0;\n\t\tif (element) {\n\t\t\t// If a number is passed, just subtract the offset,\n\t\t\t// otherwise calculate scroll position from element\n\t\t\tscroll_top = typeof element == \"number\"\n\t\t\t\t? element - cint(additional_offset)\n\t\t\t\t: this.get_scroll_position(element, additional_offset);\n\t\t}\n\n\t\tif (scroll_top < 0) {\n\t\t\tscroll_top = 0;\n\t\t}\n\n\t\t// already there\n\t\tif (scroll_top == element_to_be_scrolled.scrollTop()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (animate) {\n\t\t\telement_to_be_scrolled.animate({ scrollTop: scroll_top });\n\t\t} else {\n\t\t\telement_to_be_scrolled.scrollTop(scroll_top);\n\t\t}\n\n\t},\n\tget_scroll_position: function(element, additional_offset) {\n\t\tlet header_offset = $(\".navbar\").height() + $(\".page-head:visible\").height();\n\t\tlet scroll_top = $(element).offset().top - header_offset - cint(additional_offset);\n\t\treturn scroll_top;\n\t},\n\tfilter_dict: function(dict, filters) {\n\t\tvar ret = [];\n\t\tif (typeof filters=='string') {\n\t\t\treturn [dict[filters]];\n\t\t}\n\t\t$.each(dict, function(i, d) {\n\t\t\tfor (var key in filters) {\n\t\t\t\tif ($.isArray(filters[key])) {\n\t\t\t\t\tif (filters[key][0]==\"in\") {\n\t\t\t\t\t\tif (filters[key][1].indexOf(d[key])==-1)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t} else if (filters[key][0]==\"not in\") {\n\t\t\t\t\t\tif (filters[key][1].indexOf(d[key])!=-1)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t} else if (filters[key][0]==\"<\") {\n\t\t\t\t\t\tif (!(d[key] < filters[key])) return;\n\t\t\t\t\t} else if (filters[key][0]==\"<=\") {\n\t\t\t\t\t\tif (!(d[key] <= filters[key])) return;\n\t\t\t\t\t} else if (filters[key][0]==\">\") {\n\t\t\t\t\t\tif (!(d[key] > filters[key])) return;\n\t\t\t\t\t} else if (filters[key][0]==\">=\") {\n\t\t\t\t\t\tif (!(d[key] >= filters[key])) return;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (d[key]!=filters[key]) return;\n\t\t\t\t}\n\t\t\t}\n\t\t\tret.push(d);\n\t\t});\n\t\treturn ret;\n\t},\n\tcomma_or: function(list) {\n\t\treturn frappe.utils.comma_sep(list, \" \" + __(\"or\") + \" \");\n\t},\n\tcomma_and: function(list) {\n\t\treturn frappe.utils.comma_sep(list, \" \" + __(\"and\") + \" \");\n\t},\n\tcomma_sep: function(list, sep) {\n\t\tif (list instanceof Array) {\n\t\t\tif (list.length==0) {\n\t\t\t\treturn \"\";\n\t\t\t} else if (list.length==1) {\n\t\t\t\treturn list[0];\n\t\t\t} else {\n\t\t\t\treturn list.slice(0, list.length-1).join(\", \") + sep + list.slice(-1)[0];\n\t\t\t}\n\t\t} else {\n\t\t\treturn list;\n\t\t}\n\t},\n\tset_footnote: function(footnote_area, wrapper, txt) {\n\t\tif (!footnote_area) {\n\t\t\tfootnote_area = $('
')\n\t\t\t\t.appendTo(wrapper);\n\t\t}\n\n\t\tif (txt) {\n\t\t\tfootnote_area.html(txt);\n\t\t} else {\n\t\t\tfootnote_area.remove();\n\t\t\tfootnote_area = null;\n\t\t}\n\t\treturn footnote_area;\n\t},\n\tget_args_dict_from_url: function(txt) {\n\t\tvar args = {};\n\t\t$.each(decodeURIComponent(txt).split(\"&\"), function(i, arg) {\n\t\t\targ = arg.split(\"=\");\n\t\t\targs[arg[0]] = arg[1];\n\t\t});\n\t\treturn args;\n\t},\n\tget_url_from_dict: function(args) {\n\t\treturn $.map(args, function(val, key) {\n\t\t\tif (val!==null)\n\t\t\t\treturn encodeURIComponent(key)+\"=\"+encodeURIComponent(val);\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}).join(\"&\") || \"\";\n\t},\n\tvalidate_type: function ( val, type ) {\n\t\t// from https://github.com/guillaumepotier/Parsley.js/blob/master/parsley.js#L81\n\t\tvar regExp;\n\n\t\tswitch ( type ) {\n\t\t\tcase \"phone\":\n\t\t\t\tregExp = /^([0-9 +_\\-,.*#()]){1,20}$/;\n\t\t\t\tbreak;\n\t\t\tcase \"name\":\n\t\t\t\tregExp = /^[\\w][\\w'-]*([ \\w][\\w'-]+)*$/;\n\t\t\t\tbreak;\n\t\t\tcase \"number\":\n\t\t\t\tregExp = /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/;\n\t\t\t\tbreak;\n\t\t\tcase \"digits\":\n\t\t\t\tregExp = /^\\d+$/;\n\t\t\t\tbreak;\n\t\t\tcase \"alphanum\":\n\t\t\t\tregExp = /^\\w+$/;\n\t\t\t\tbreak;\n\t\t\tcase \"email\":\n\t\t\t\t// from https://emailregex.com/\n\t\t\t\tregExp = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\t\t\t\tbreak;\n\t\t\tcase \"url\":\n\t\t\t\tregExp = /^((([A-Za-z0-9.+-]+:(?:\\/\\/)?)(?:[-;:&=\\+\\,\\w]@)?[A-Za-z0-9.-]+(:[0-9]+)?|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[\\+~%\\/.\\w-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[\\w]*))?)$/i;\n\t\t\t\tbreak;\n\t\t\tcase \"dateIso\":\n\t\t\t\tregExp = /^(\\d{4})\\D?(0[1-9]|1[0-2])\\D?([12]\\d|0[1-9]|3[01])$/;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\n\t\t// test regExp if not null\n\t\treturn '' !== val ? regExp.test( val ) : false;\n\t},\n\tguess_style: function(text, default_style, _colour) {\n\t\tvar style = default_style || \"default\";\n\t\tvar colour = \"gray\";\n\t\tif (text) {\n\t\t\tif (has_words([\"Pending\", \"Review\", \"Medium\", \"Not Approved\"], text)) {\n\t\t\t\tstyle = \"warning\";\n\t\t\t\tcolour = \"orange\";\n\t\t\t} else if (has_words([\"Open\", \"Urgent\", \"High\", \"Failed\", \"Rejected\", \"Error\"], text)) {\n\t\t\t\tstyle = \"danger\";\n\t\t\t\tcolour = \"red\";\n\t\t\t} else if (has_words([\"Closed\", \"Finished\", \"Converted\", \"Completed\", \"Complete\", \"Confirmed\",\n\t\t\t\t\"Approved\", \"Yes\", \"Active\", \"Available\", \"Paid\", \"Success\"], text)) {\n\t\t\t\tstyle = \"success\";\n\t\t\t\tcolour = \"green\";\n\t\t\t} else if (has_words([\"Submitted\"], text)) {\n\t\t\t\tstyle = \"info\";\n\t\t\t\tcolour = \"blue\";\n\t\t\t}\n\t\t}\n\t\treturn _colour ? colour : style;\n\t},\n\n\tguess_colour: function(text) {\n\t\treturn frappe.utils.guess_style(text, null, true);\n\t},\n\n\tget_indicator_color: function(state) {\n\t\treturn frappe.db.get_list('Workflow State', {filters: {name: state}, fields: ['name', 'style']}).then(res => {\n\t\t\tconst state = res[0];\n\t\t\tif (!state.style) {\n\t\t\t\treturn frappe.utils.guess_colour(state.name);\n\t\t\t}\n\t\t\tconst style = state.style;\n\t\t\tconst colour_map = {\n\t\t\t\t\"Success\": \"green\",\n\t\t\t\t\"Warning\": \"orange\",\n\t\t\t\t\"Danger\": \"red\",\n\t\t\t\t\"Primary\": \"blue\",\n\t\t\t};\n\n\t\t\treturn colour_map[style];\n\t\t});\n\n\t},\n\n\tsort: function(list, key, compare_type, reverse) {\n\t\tif (!list || list.length < 2)\n\t\t\treturn list || [];\n\n\t\tvar sort_fn = {\n\t\t\t\"string\": function(a, b) {\n\t\t\t\treturn cstr(a[key]).localeCompare(cstr(b[key]));\n\t\t\t},\n\t\t\t\"number\": function(a, b) {\n\t\t\t\treturn flt(a[key]) - flt(b[key]);\n\t\t\t}\n\t\t};\n\n\t\tif (!compare_type)\n\t\t\tcompare_type = typeof list[0][key]===\"string\" ? \"string\" : \"number\";\n\n\t\tlist.sort(sort_fn[compare_type]);\n\n\t\tif (reverse) {\n\t\t\tlist.reverse();\n\t\t}\n\n\t\treturn list;\n\t},\n\n\tunique: function(list) {\n\t\tvar dict = {},\n\t\t\tarr = [];\n\t\tfor (var i=0, l=list.length; i < l; i++) {\n\t\t\tif (!(list[i] in dict)) {\n\t\t\t\tdict[list[i]] = null;\n\t\t\t\tarr.push(list[i]);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t},\n\n\tremove_nulls: function(list) {\n\t\tvar new_list = [];\n\t\tfor (var i=0, l=list.length; i < l; i++) {\n\t\t\tif (!is_null(list[i])) {\n\t\t\t\tnew_list.push(list[i]);\n\t\t\t}\n\t\t}\n\t\treturn new_list;\n\t},\n\n\tall: function(lst) {\n\t\tfor (var i=0, l=lst.length; i b[bi] ) {\n\t\t\t\tbi++;\n\t\t\t} else {\n\t\t\t\t/* they're equal */\n\t\t\t\tresult.push(a[ai]);\n\t\t\t\tai++;\n\t\t\t\tbi++;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tresize_image: function(reader, callback, max_width, max_height) {\n\t\tvar tempImg = new Image();\n\t\tif (!max_width) max_width = 600;\n\t\tif (!max_height) max_height = 400;\n\t\ttempImg.src = reader.result;\n\n\t\ttempImg.onload = function() {\n\t\t\tvar tempW = tempImg.width;\n\t\t\tvar tempH = tempImg.height;\n\t\t\tif (tempW > tempH) {\n\t\t\t\tif (tempW > max_width) {\n\t\t\t\t\ttempH *= max_width / tempW;\n\t\t\t\t\ttempW = max_width;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (tempH > max_height) {\n\t\t\t\t\ttempW *= max_height / tempH;\n\t\t\t\t\ttempH = max_height;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar canvas = document.createElement('canvas');\n\t\t\tcanvas.width = tempW;\n\t\t\tcanvas.height = tempH;\n\t\t\tvar ctx = canvas.getContext(\"2d\");\n\t\t\tctx.drawImage(this, 0, 0, tempW, tempH);\n\t\t\tvar dataURL = canvas.toDataURL(\"image/jpeg\");\n\t\t\tsetTimeout(function() {\n\t\t\t\tcallback(dataURL);\n\t\t\t}, 10 );\n\t\t};\n\t},\n\n\tcsv_to_array: function (strData, strDelimiter) {\n\t\t// Check to see if the delimiter is defined. If not,\n\t\t// then default to comma.\n\t\tstrDelimiter = (strDelimiter || \",\");\n\n\t\t// Create a regular expression to parse the CSV values.\n\t\tvar objPattern = new RegExp(\n\t\t\t(\n\t\t\t\t// Delimiters.\n\t\t\t\t\"(\\\\\" + strDelimiter + \"|\\\\r?\\\\n|\\\\r|^)\" +\n\n\t\t\t\t// Quoted fields.\n\t\t\t\t\"(?:\\\"([^\\\"]*(?:\\\"\\\"[^\\\"]*)*)\\\"|\" +\n\n\t\t\t\t// Standard fields.\n\t\t\t\t\"([^\\\"\\\\\" + strDelimiter + \"\\\\r\\\\n]*))\"\n\t\t\t),\n\t\t\t\"gi\"\n\t\t);\n\n\n\t\t// Create an array to hold our data. Give the array\n\t\t// a default empty first row.\n\t\tvar arrData = [[]];\n\n\t\t// Create an array to hold our individual pattern\n\t\t// matching groups.\n\t\tvar arrMatches = null;\n\n\n\t\t// Keep looping over the regular expression matches\n\t\t// until we can no longer find a match.\n\t\twhile ((arrMatches = objPattern.exec( strData ))) {\n\n\t\t\t// Get the delimiter that was found.\n\t\t\tvar strMatchedDelimiter = arrMatches[ 1 ];\n\n\t\t\t// Check to see if the given delimiter has a length\n\t\t\t// (is not the start of string) and if it matches\n\t\t\t// field delimiter. If id does not, then we know\n\t\t\t// that this delimiter is a row delimiter.\n\t\t\tif (\n\t\t\t\tstrMatchedDelimiter.length &&\n\t\t\t\tstrMatchedDelimiter !== strDelimiter\n\t\t\t) {\n\n\t\t\t\t// Since we have reached a new row of data,\n\t\t\t\t// add an empty row to our data array.\n\t\t\t\tarrData.push( [] );\n\n\t\t\t}\n\n\t\t\tvar strMatchedValue;\n\n\t\t\t// Now that we have our delimiter out of the way,\n\t\t\t// let's check to see which kind of value we\n\t\t\t// captured (quoted or unquoted).\n\t\t\tif (arrMatches[ 2 ]) {\n\n\t\t\t\t// We found a quoted value. When we capture\n\t\t\t\t// this value, unescape any double quotes.\n\t\t\t\tstrMatchedValue = arrMatches[ 2 ].replace(\n\t\t\t\t\tnew RegExp( \"\\\"\\\"\", \"g\" ),\n\t\t\t\t\t\"\\\"\"\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\t// We found a non-quoted value.\n\t\t\t\tstrMatchedValue = arrMatches[ 3 ];\n\n\t\t\t}\n\n\n\t\t\t// Now that we have our value string, let's add\n\t\t\t// it to the data array.\n\t\t\tarrData[ arrData.length - 1 ].push( strMatchedValue );\n\t\t}\n\n\t\t// Return the parsed data.\n\t\treturn ( arrData );\n\t},\n\n\twarn_page_name_change: function() {\n\t\tfrappe.msgprint(__(\"Note: Changing the Page Name will break previous URL to this page.\"));\n\t},\n\n\tnotify: function(subject, body, route, onclick) {\n\t\tconsole.log('push notifications are evil and deprecated');\n\t},\n\n\tset_title: function(title) {\n\t\tfrappe._original_title = title;\n\t\tif (frappe._title_prefix) {\n\t\t\ttitle = frappe._title_prefix + \" \" + title.replace(/<[^>]*>/g, \"\");\n\t\t}\n\t\tdocument.title = title;\n\n\t\t// save for re-routing\n\t\tconst sub_path = frappe.router.get_sub_path();\n\t\tfrappe.route_titles[sub_path] = title;\n\t},\n\n\tset_title_prefix: function(prefix) {\n\t\tfrappe._title_prefix = prefix;\n\n\t\t// reset the original title\n\t\tfrappe.utils.set_title(frappe._original_title);\n\t},\n\n\tis_image_file: function(filename) {\n\t\tif (!filename) return false;\n\t\t// url can have query params\n\t\tfilename = filename.split('?')[0];\n\t\treturn (/\\.(gif|jpg|jpeg|tiff|png|svg)$/i).test(filename);\n\t},\n\n\tplay_sound: function(name) {\n\t\ttry {\n\t\t\tif (frappe.boot.user.mute_sounds) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar audio = $(\"#sound-\" + name)[0];\n\t\t\taudio.volume = audio.getAttribute(\"volume\");\n\t\t\taudio.play();\n\n\t\t} catch (e) {\n\t\t\tconsole.log(\"Cannot play sound\", name, e);\n\t\t\t// pass\n\t\t}\n\n\t},\n\tsplit_emails: function(txt) {\n\t\tvar email_list = [];\n\n\t\tif (!txt) {\n\t\t\treturn email_list;\n\t\t}\n\n\t\t// emails can be separated by comma or newline\n\t\ttxt.split(/[,\\n](?=(?:[^\"]|\"[^\"]*\")*$)/g).forEach(function(email) {\n\t\t\temail = email.trim();\n\t\t\tif (email) {\n\t\t\t\temail_list.push(email);\n\t\t\t}\n\t\t});\n\n\t\treturn email_list;\n\t},\n\tsupportsES6: function() {\n\t\ttry {\n\t\t\tnew Function(\"(a = 0) => a\");\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\treturn false;\n\t\t}\n\t}(),\n\tthrottle: function (func, wait, options) {\n\t\tvar context, args, result;\n\t\tvar timeout = null;\n\t\tvar previous = 0;\n\t\tif (!options) options = {};\n\n\t\tlet later = function () {\n\t\t\tprevious = options.leading === false ? 0 : Date.now();\n\t\t\ttimeout = null;\n\t\t\tresult = func.apply(context, args);\n\t\t\tif (!timeout) context = args = null;\n\t\t};\n\n\t\treturn function () {\n\t\t\tvar now = Date.now();\n\t\t\tif (!previous && options.leading === false) previous = now;\n\t\t\tlet remaining = wait - (now - previous);\n\t\t\tcontext = this;\n\t\t\targs = arguments;\n\t\t\tif (remaining <= 0 || remaining > wait) {\n\t\t\t\tif (timeout) {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\ttimeout = null;\n\t\t\t\t}\n\t\t\t\tprevious = now;\n\t\t\t\tresult = func.apply(context, args);\n\t\t\t\tif (!timeout) context = args = null;\n\t\t\t} else if (!timeout && options.trailing !== false) {\n\t\t\t\ttimeout = setTimeout(later, remaining);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t},\n\tdebounce: function(func, wait, immediate) {\n\t\tvar timeout;\n\t\treturn function() {\n\t\t\tvar context = this, args = arguments;\n\t\t\tvar later = function() {\n\t\t\t\ttimeout = null;\n\t\t\t\tif (!immediate) func.apply(context, args);\n\t\t\t};\n\t\t\tvar callNow = immediate && !timeout;\n\t\t\tclearTimeout(timeout);\n\t\t\ttimeout = setTimeout(later, wait);\n\t\t\tif (callNow) func.apply(context, args);\n\t\t};\n\t},\n\tget_form_link: function(doctype, name, html=false, display_text=null, query_params_obj=null) {\n\t\tdisplay_text = display_text || name;\n\t\tname = encodeURIComponent(name);\n\t\tlet route = `/app/${encodeURIComponent(doctype.toLowerCase().replace(/ /g, '-'))}/${name}`;\n\t\tif (query_params_obj) {\n\t\t\troute += frappe.utils.make_query_string(query_params_obj);\n\t\t}\n\t\tif (html) {\n\t\t\treturn `${display_text}`;\n\t\t}\n\t\treturn route;\n\t},\n\tget_route_label(route_str) {\n\t\tlet route = route_str.split('/');\n\n\t\tif (route[2] === 'Report' || route[0] === 'query-report') {\n\t\t\treturn __('{0} Report', [route[3] || route[1]]);\n\t\t}\n\t\tif (route[0] === 'List') {\n\t\t\treturn __('{0} List', [route[1]]);\n\t\t}\n\t\tif (route[0] === 'modules') {\n\t\t\treturn __('{0} Modules', [route[1]]);\n\t\t}\n\t\tif (route[0] === 'dashboard') {\n\t\t\treturn __('{0} Dashboard', [route[1]]);\n\t\t}\n\t\treturn __(frappe.utils.to_title_case(route[0], true));\n\t},\n\treport_column_total: function(values, column, type) {\n\t\tif (column.column.disable_total) {\n\t\t\treturn '';\n\t\t} else if (values.length > 0) {\n\t\t\tif (column.column.fieldtype == \"Percent\" || type === \"mean\") {\n\t\t\t\treturn values.reduce((a, b) => a + flt(b)) / values.length;\n\t\t\t} else if (column.column.fieldtype == \"Int\") {\n\t\t\t\treturn values.reduce((a, b) => a + cint(b));\n\t\t\t} else if (frappe.model.is_numeric_field(column.column.fieldtype)) {\n\t\t\t\treturn values.reduce((a, b) => a + flt(b));\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t},\n\tsetup_search($wrapper, el_class, text_class, data_attr) {\n\t\tconst $search_input = $wrapper.find('[data-element=\"search\"]').show();\n\t\t$search_input.focus().val('');\n\t\tconst $elements = $wrapper.find(el_class).show();\n\n\t\t$search_input.off('keyup').on('keyup', () => {\n\t\t\tlet text_filter = $search_input.val().toLowerCase();\n\t\t\t// Replace trailing and leading spaces\n\t\t\ttext_filter = text_filter.replace(/^\\s+|\\s+$/g, '');\n\t\t\tfor (let i = 0; i < $elements.length; i++) {\n\t\t\t\tconst text_element = $elements.eq(i).find(text_class);\n\t\t\t\tconst text = text_element.text().toLowerCase();\n\n\t\t\t\tlet name = '';\n\t\t\t\tif (data_attr && text_element.attr(data_attr)) {\n\t\t\t\t\tname = text_element.attr(data_attr).toLowerCase();\n\t\t\t\t}\n\n\t\t\t\tif (text.includes(text_filter) || name.includes(text_filter)) {\n\t\t\t\t\t$elements.eq(i).css('display', '');\n\t\t\t\t} else {\n\t\t\t\t\t$elements.eq(i).css('display', 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\tdeep_equal(a, b) {\n\t\treturn deep_equal(a, b);\n\t},\n\n\tdeep_clone(obj, customizer) {\n\t\treturn cloneDeepWith(obj, customizer);\n\t},\n\n\tfile_name_ellipsis(filename, length) {\n\t\tlet first_part_length = length * 2 / 3;\n\t\tlet last_part_length = length - first_part_length;\n\t\tlet parts = filename.split('.');\n\t\tlet extn = parts.pop();\n\t\tlet name = parts.join('');\n\t\tlet first_part = name.slice(0, first_part_length);\n\t\tlet last_part = name.slice(-last_part_length);\n\t\tif (name.length > length) {\n\t\t\treturn `${first_part}...${last_part}.${extn}`;\n\t\t} else {\n\t\t\treturn filename;\n\t\t}\n\t},\n\tget_decoded_string(dataURI) {\n\t\t// decodes base64 to string\n\t\tlet parts = dataURI.split(',');\n\t\tconst encoded_data = parts[1];\n\t\tlet decoded = atob(encoded_data);\n\t\ttry {\n\t\t\tconst escaped = escape(decoded);\n\t\t\tdecoded = decodeURIComponent(escaped);\n\n\t\t} catch (e) {\n\t\t\t// pass decodeURIComponent failure\n\t\t\t// just return atob response\n\t\t}\n\t\treturn decoded;\n\t},\n\tcopy_to_clipboard(string) {\n\t\tconst show_success_alert = () => {\n\t\t\tfrappe.show_alert({\n\t\t\t\tindicator: 'green',\n\t\t\t\tmessage: __('Copied to clipboard.')\n\t\t\t});\n\t\t};\n\t\tif (navigator.clipboard && window.isSecureContext) {\n\t\t\tnavigator.clipboard.writeText(string).then(show_success_alert);\n\t\t} else {\n\t\t\tlet input = $(\"