theming-personal-theming.mjs.map 206 KB

1
  1. {"version":3,"file":"theming-personal-theming.mjs","sources":["../node_modules/node-vibrant/lib/util.js","../node_modules/lodash/_baseFilter.js","../node_modules/lodash/filter.js","../node_modules/node-vibrant/lib/color.js","../node_modules/node-vibrant/lib/builder.js","../node_modules/node-vibrant/lib/quantizer/vbox.js","../node_modules/node-vibrant/lib/quantizer/pqueue.js","../node_modules/node-vibrant/lib/quantizer/mmcq.js","../node_modules/node-vibrant/lib/quantizer/index.js","../node_modules/lodash/defaults.js","../node_modules/node-vibrant/lib/generator/default.js","../node_modules/node-vibrant/lib/generator/index.js","../node_modules/node-vibrant/lib/filter/default.js","../node_modules/node-vibrant/lib/filter/index.js","../node_modules/node-vibrant/lib/vibrant.js","../node_modules/node-vibrant/lib/image/base.js","../node_modules/node-stdlib-browser/node_modules/punycode/punycode.js","../node_modules/querystring-es3/decode.js","../node_modules/querystring-es3/encode.js","../node_modules/querystring-es3/index.js","../node_modules/node-stdlib-browser/esm/proxy/querystring.js","../node_modules/node-stdlib-browser/esm/proxy/url.js","../node_modules/node-vibrant/lib/image/browser.js","../node_modules/node-vibrant/lib/browser.js","../apps/theming/src/components/BackgroundSettings.vue","../apps/theming/src/components/ItemPreview.vue","../apps/theming/src/components/UserAppMenuSection.vue","../apps/theming/src/components/UserPrimaryColor.vue","../apps/theming/src/UserTheming.vue","../apps/theming/src/personal-settings.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getColorIndex = exports.getColorDiffStatus = exports.hexDiff = exports.rgbDiff = exports.deltaE94 = exports.rgbToCIELab = exports.xyzToCIELab = exports.rgbToXyz = exports.hslToRgb = exports.rgbToHsl = exports.rgbToHex = exports.hexToRgb = exports.defer = exports.RSHIFT = exports.SIGBITS = exports.DELTAE94_DIFF_STATUS = void 0;\nexports.DELTAE94_DIFF_STATUS = {\n NA: 0,\n PERFECT: 1,\n CLOSE: 2,\n GOOD: 10,\n SIMILAR: 50\n};\nexports.SIGBITS = 5;\nexports.RSHIFT = 8 - exports.SIGBITS;\nfunction defer() {\n var resolve;\n var reject;\n // eslint-disable-next-line promise/param-names\n var promise = new Promise(function (_resolve, _reject) {\n resolve = _resolve;\n reject = _reject;\n });\n // @ts-ignore\n return { resolve: resolve, reject: reject, promise: promise };\n}\nexports.defer = defer;\nfunction hexToRgb(hex) {\n var m = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return m === null ? null : [m[1], m[2], m[3]].map(function (s) { return parseInt(s, 16); });\n}\nexports.hexToRgb = hexToRgb;\nfunction rgbToHex(r, g, b) {\n return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1, 7);\n}\nexports.rgbToHex = rgbToHex;\nfunction rgbToHsl(r, g, b) {\n r /= 255;\n g /= 255;\n b /= 255;\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h;\n var s;\n var l = (max + min) / 2;\n if (max === min) {\n h = s = 0;\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n // @ts-ignore\n h /= 6;\n }\n // @ts-ignore\n return [h, s, l];\n}\nexports.rgbToHsl = rgbToHsl;\nfunction hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n function hue2rgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n if (s === 0) {\n r = g = b = l;\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - (l * s);\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - (1 / 3));\n }\n return [\n r * 255,\n g * 255,\n b * 255\n ];\n}\nexports.hslToRgb = hslToRgb;\nfunction rgbToXyz(r, g, b) {\n r /= 255;\n g /= 255;\n b /= 255;\n r = r > 0.04045 ? Math.pow((r + 0.005) / 1.055, 2.4) : r / 12.92;\n g = g > 0.04045 ? Math.pow((g + 0.005) / 1.055, 2.4) : g / 12.92;\n b = b > 0.04045 ? Math.pow((b + 0.005) / 1.055, 2.4) : b / 12.92;\n r *= 100;\n g *= 100;\n b *= 100;\n var x = r * 0.4124 + g * 0.3576 + b * 0.1805;\n var y = r * 0.2126 + g * 0.7152 + b * 0.0722;\n var z = r * 0.0193 + g * 0.1192 + b * 0.9505;\n return [x, y, z];\n}\nexports.rgbToXyz = rgbToXyz;\nfunction xyzToCIELab(x, y, z) {\n var REF_X = 95.047;\n var REF_Y = 100;\n var REF_Z = 108.883;\n x /= REF_X;\n y /= REF_Y;\n z /= REF_Z;\n x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;\n y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;\n z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;\n var L = 116 * y - 16;\n var a = 500 * (x - y);\n var b = 200 * (y - z);\n return [L, a, b];\n}\nexports.xyzToCIELab = xyzToCIELab;\nfunction rgbToCIELab(r, g, b) {\n var _a = rgbToXyz(r, g, b), x = _a[0], y = _a[1], z = _a[2];\n return xyzToCIELab(x, y, z);\n}\nexports.rgbToCIELab = rgbToCIELab;\nfunction deltaE94(lab1, lab2) {\n var WEIGHT_L = 1;\n var WEIGHT_C = 1;\n var WEIGHT_H = 1;\n var L1 = lab1[0], a1 = lab1[1], b1 = lab1[2];\n var L2 = lab2[0], a2 = lab2[1], b2 = lab2[2];\n var dL = L1 - L2;\n var da = a1 - a2;\n var db = b1 - b2;\n var xC1 = Math.sqrt(a1 * a1 + b1 * b1);\n var xC2 = Math.sqrt(a2 * a2 + b2 * b2);\n var xDL = L2 - L1;\n var xDC = xC2 - xC1;\n var xDE = Math.sqrt(dL * dL + da * da + db * db);\n var xDH = (Math.sqrt(xDE) > Math.sqrt(Math.abs(xDL)) + Math.sqrt(Math.abs(xDC)))\n ? Math.sqrt(xDE * xDE - xDL * xDL - xDC * xDC)\n : 0;\n var xSC = 1 + 0.045 * xC1;\n var xSH = 1 + 0.015 * xC1;\n xDL /= WEIGHT_L;\n xDC /= WEIGHT_C * xSC;\n xDH /= WEIGHT_H * xSH;\n return Math.sqrt(xDL * xDL + xDC * xDC + xDH * xDH);\n}\nexports.deltaE94 = deltaE94;\nfunction rgbDiff(rgb1, rgb2) {\n var lab1 = rgbToCIELab.apply(undefined, rgb1);\n var lab2 = rgbToCIELab.apply(undefined, rgb2);\n return deltaE94(lab1, lab2);\n}\nexports.rgbDiff = rgbDiff;\nfunction hexDiff(hex1, hex2) {\n var rgb1 = hexToRgb(hex1);\n var rgb2 = hexToRgb(hex2);\n return rgbDiff(rgb1, rgb2);\n}\nexports.hexDiff = hexDiff;\nfunction getColorDiffStatus(d) {\n if (d < exports.DELTAE94_DIFF_STATUS.NA) {\n return 'N/A';\n }\n // Not perceptible by human eyes\n if (d <= exports.DELTAE94_DIFF_STATUS.PERFECT) {\n return 'Perfect';\n }\n // Perceptible through close observation\n if (d <= exports.DELTAE94_DIFF_STATUS.CLOSE) {\n return 'Close';\n }\n // Perceptible at a glance\n if (d <= exports.DELTAE94_DIFF_STATUS.GOOD) {\n return 'Good';\n }\n // Colors are more similar than opposite\n if (d < exports.DELTAE94_DIFF_STATUS.SIMILAR) {\n return 'Similar';\n }\n return 'Wrong';\n}\nexports.getColorDiffStatus = getColorDiffStatus;\nfunction getColorIndex(r, g, b) {\n return (r << (2 * exports.SIGBITS)) + (g << exports.SIGBITS) + b;\n}\nexports.getColorIndex = getColorIndex;\n//# sourceMappingURL=util.js.map","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nmodule.exports = baseFilter;\n","var arrayFilter = require('./_arrayFilter'),\n baseFilter = require('./_baseFilter'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = filter;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Swatch = void 0;\nvar util_1 = require(\"./util\");\nvar filter = require(\"lodash/filter\");\nvar Swatch = /** @class */ (function () {\n function Swatch(rgb, population) {\n this._rgb = rgb;\n this._population = population;\n }\n Swatch.applyFilter = function (colors, f) {\n return typeof f === 'function'\n ? filter(colors, function (_a) {\n var r = _a.r, g = _a.g, b = _a.b;\n return f(r, g, b, 255);\n })\n : colors;\n };\n Object.defineProperty(Swatch.prototype, \"r\", {\n get: function () { return this._rgb[0]; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"g\", {\n get: function () { return this._rgb[1]; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"b\", {\n get: function () { return this._rgb[2]; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"rgb\", {\n get: function () { return this._rgb; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"hsl\", {\n get: function () {\n if (!this._hsl) {\n var _a = this._rgb, r = _a[0], g = _a[1], b = _a[2];\n this._hsl = util_1.rgbToHsl(r, g, b);\n }\n return this._hsl;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"hex\", {\n get: function () {\n if (!this._hex) {\n var _a = this._rgb, r = _a[0], g = _a[1], b = _a[2];\n this._hex = util_1.rgbToHex(r, g, b);\n }\n return this._hex;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"population\", {\n get: function () { return this._population; },\n enumerable: false,\n configurable: true\n });\n Swatch.prototype.toJSON = function () {\n return {\n rgb: this.rgb,\n population: this.population\n };\n };\n // TODO: deprecate internally, use property instead\n Swatch.prototype.getRgb = function () { return this._rgb; };\n // TODO: deprecate internally, use property instead\n Swatch.prototype.getHsl = function () { return this.hsl; };\n // TODO: deprecate internally, use property instead\n Swatch.prototype.getPopulation = function () { return this._population; };\n // TODO: deprecate internally, use property instead\n Swatch.prototype.getHex = function () { return this.hex; };\n Swatch.prototype.getYiq = function () {\n if (!this._yiq) {\n var rgb = this._rgb;\n this._yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n }\n return this._yiq;\n };\n Object.defineProperty(Swatch.prototype, \"titleTextColor\", {\n get: function () {\n if (!this._titleTextColor) {\n this._titleTextColor = this.getYiq() < 200 ? '#fff' : '#000';\n }\n return this._titleTextColor;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"bodyTextColor\", {\n get: function () {\n if (!this._bodyTextColor) {\n this._bodyTextColor = this.getYiq() < 150 ? '#fff' : '#000';\n }\n return this._bodyTextColor;\n },\n enumerable: false,\n configurable: true\n });\n Swatch.prototype.getTitleTextColor = function () {\n return this.titleTextColor;\n };\n Swatch.prototype.getBodyTextColor = function () {\n return this.bodyTextColor;\n };\n return Swatch;\n}());\nexports.Swatch = Swatch;\n//# sourceMappingURL=color.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar vibrant_1 = __importDefault(require(\"./vibrant\"));\nvar clone = require(\"lodash/clone\");\nvar Builder = /** @class */ (function () {\n function Builder(src, opts) {\n if (opts === void 0) { opts = {}; }\n this._src = src;\n this._opts = opts;\n this._opts.filters = clone(vibrant_1.default.DefaultOpts.filters);\n }\n Builder.prototype.maxColorCount = function (n) {\n this._opts.colorCount = n;\n return this;\n };\n Builder.prototype.maxDimension = function (d) {\n this._opts.maxDimension = d;\n return this;\n };\n Builder.prototype.addFilter = function (f) {\n this._opts.filters.push(f);\n return this;\n };\n Builder.prototype.removeFilter = function (f) {\n var i = this._opts.filters.indexOf(f);\n if (i > 0)\n this._opts.filters.splice(i);\n return this;\n };\n Builder.prototype.clearFilters = function () {\n this._opts.filters = [];\n return this;\n };\n Builder.prototype.quality = function (q) {\n this._opts.quality = q;\n return this;\n };\n Builder.prototype.useImageClass = function (imageClass) {\n this._opts.ImageClass = imageClass;\n return this;\n };\n Builder.prototype.useGenerator = function (generator) {\n this._opts.generator = generator;\n return this;\n };\n Builder.prototype.useQuantizer = function (quantizer) {\n this._opts.quantizer = quantizer;\n return this;\n };\n Builder.prototype.build = function () {\n return new vibrant_1.default(this._src, this._opts);\n };\n Builder.prototype.getPalette = function (cb) {\n return this.build().getPalette(cb);\n };\n Builder.prototype.getSwatches = function (cb) {\n return this.build().getPalette(cb);\n };\n return Builder;\n}());\nexports.default = Builder;\n//# sourceMappingURL=builder.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util\");\nvar VBox = /** @class */ (function () {\n function VBox(r1, r2, g1, g2, b1, b2, hist) {\n this._volume = -1;\n this._count = -1;\n this.dimension = { r1: r1, r2: r2, g1: g1, g2: g2, b1: b1, b2: b2 };\n this.hist = hist;\n }\n VBox.build = function (pixels, shouldIgnore) {\n var hn = 1 << (3 * util_1.SIGBITS);\n var hist = new Uint32Array(hn);\n var rmax;\n var rmin;\n var gmax;\n var gmin;\n var bmax;\n var bmin;\n var r;\n var g;\n var b;\n var a;\n rmax = gmax = bmax = 0;\n rmin = gmin = bmin = Number.MAX_VALUE;\n var n = pixels.length / 4;\n var i = 0;\n while (i < n) {\n var offset = i * 4;\n i++;\n r = pixels[offset + 0];\n g = pixels[offset + 1];\n b = pixels[offset + 2];\n a = pixels[offset + 3];\n // Ignored pixels' alpha is marked as 0 in filtering stage\n if (a === 0)\n continue;\n r = r >> util_1.RSHIFT;\n g = g >> util_1.RSHIFT;\n b = b >> util_1.RSHIFT;\n var index = util_1.getColorIndex(r, g, b);\n hist[index] += 1;\n if (r > rmax)\n rmax = r;\n if (r < rmin)\n rmin = r;\n if (g > gmax)\n gmax = g;\n if (g < gmin)\n gmin = g;\n if (b > bmax)\n bmax = b;\n if (b < bmin)\n bmin = b;\n }\n return new VBox(rmin, rmax, gmin, gmax, bmin, bmax, hist);\n };\n VBox.prototype.invalidate = function () {\n this._volume = this._count = -1;\n this._avg = null;\n };\n VBox.prototype.volume = function () {\n if (this._volume < 0) {\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n this._volume = (r2 - r1 + 1) * (g2 - g1 + 1) * (b2 - b1 + 1);\n }\n return this._volume;\n };\n VBox.prototype.count = function () {\n if (this._count < 0) {\n var hist = this.hist;\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n var c = 0;\n for (var r = r1; r <= r2; r++) {\n for (var g = g1; g <= g2; g++) {\n for (var b = b1; b <= b2; b++) {\n var index = util_1.getColorIndex(r, g, b);\n c += hist[index];\n }\n }\n }\n this._count = c;\n }\n return this._count;\n };\n VBox.prototype.clone = function () {\n var hist = this.hist;\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n return new VBox(r1, r2, g1, g2, b1, b2, hist);\n };\n VBox.prototype.avg = function () {\n if (!this._avg) {\n var hist = this.hist;\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n var ntot = 0;\n var mult = 1 << (8 - util_1.SIGBITS);\n var rsum = void 0;\n var gsum = void 0;\n var bsum = void 0;\n rsum = gsum = bsum = 0;\n for (var r = r1; r <= r2; r++) {\n for (var g = g1; g <= g2; g++) {\n for (var b = b1; b <= b2; b++) {\n var index = util_1.getColorIndex(r, g, b);\n var h = hist[index];\n ntot += h;\n rsum += (h * (r + 0.5) * mult);\n gsum += (h * (g + 0.5) * mult);\n bsum += (h * (b + 0.5) * mult);\n }\n }\n }\n if (ntot) {\n this._avg = [\n ~~(rsum / ntot),\n ~~(gsum / ntot),\n ~~(bsum / ntot)\n ];\n }\n else {\n this._avg = [\n ~~(mult * (r1 + r2 + 1) / 2),\n ~~(mult * (g1 + g2 + 1) / 2),\n ~~(mult * (b1 + b2 + 1) / 2)\n ];\n }\n }\n return this._avg;\n };\n VBox.prototype.contains = function (rgb) {\n var r = rgb[0], g = rgb[1], b = rgb[2];\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n r >>= util_1.RSHIFT;\n g >>= util_1.RSHIFT;\n b >>= util_1.RSHIFT;\n return r >= r1 && r <= r2 &&\n g >= g1 && g <= g2 &&\n b >= b1 && b <= b2;\n };\n VBox.prototype.split = function () {\n var hist = this.hist;\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n var count = this.count();\n if (!count)\n return [];\n if (count === 1)\n return [this.clone()];\n var rw = r2 - r1 + 1;\n var gw = g2 - g1 + 1;\n var bw = b2 - b1 + 1;\n var maxw = Math.max(rw, gw, bw);\n var accSum = null;\n var sum;\n var total;\n sum = total = 0;\n var maxd = null;\n if (maxw === rw) {\n maxd = 'r';\n accSum = new Uint32Array(r2 + 1);\n for (var r = r1; r <= r2; r++) {\n sum = 0;\n for (var g = g1; g <= g2; g++) {\n for (var b = b1; b <= b2; b++) {\n var index = util_1.getColorIndex(r, g, b);\n sum += hist[index];\n }\n }\n total += sum;\n accSum[r] = total;\n }\n }\n else if (maxw === gw) {\n maxd = 'g';\n accSum = new Uint32Array(g2 + 1);\n for (var g = g1; g <= g2; g++) {\n sum = 0;\n for (var r = r1; r <= r2; r++) {\n for (var b = b1; b <= b2; b++) {\n var index = util_1.getColorIndex(r, g, b);\n sum += hist[index];\n }\n }\n total += sum;\n accSum[g] = total;\n }\n }\n else {\n maxd = 'b';\n accSum = new Uint32Array(b2 + 1);\n for (var b = b1; b <= b2; b++) {\n sum = 0;\n for (var r = r1; r <= r2; r++) {\n for (var g = g1; g <= g2; g++) {\n var index = util_1.getColorIndex(r, g, b);\n sum += hist[index];\n }\n }\n total += sum;\n accSum[b] = total;\n }\n }\n var splitPoint = -1;\n var reverseSum = new Uint32Array(accSum.length);\n for (var i = 0; i < accSum.length; i++) {\n var d = accSum[i];\n if (splitPoint < 0 && d > total / 2)\n splitPoint = i;\n reverseSum[i] = total - d;\n }\n var vbox = this;\n function doCut(d) {\n var dim1 = d + '1';\n var dim2 = d + '2';\n var d1 = vbox.dimension[dim1];\n var d2 = vbox.dimension[dim2];\n var vbox1 = vbox.clone();\n var vbox2 = vbox.clone();\n var left = splitPoint - d1;\n var right = d2 - splitPoint;\n if (left <= right) {\n d2 = Math.min(d2 - 1, ~~(splitPoint + right / 2));\n d2 = Math.max(0, d2);\n }\n else {\n d2 = Math.max(d1, ~~(splitPoint - 1 - left / 2));\n d2 = Math.min(vbox.dimension[dim2], d2);\n }\n while (!accSum[d2])\n d2++;\n var c2 = reverseSum[d2];\n while (!c2 && accSum[d2 - 1])\n c2 = reverseSum[--d2];\n vbox1.dimension[dim2] = d2;\n vbox2.dimension[dim1] = d2 + 1;\n return [vbox1, vbox2];\n }\n return doCut(maxd);\n };\n return VBox;\n}());\nexports.default = VBox;\n//# sourceMappingURL=vbox.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar PQueue = /** @class */ (function () {\n function PQueue(comparator) {\n this._comparator = comparator;\n this.contents = [];\n this._sorted = false;\n }\n PQueue.prototype._sort = function () {\n if (!this._sorted) {\n this.contents.sort(this._comparator);\n this._sorted = true;\n }\n };\n PQueue.prototype.push = function (item) {\n this.contents.push(item);\n this._sorted = false;\n };\n PQueue.prototype.peek = function (index) {\n this._sort();\n index = typeof index === 'number' ? index : this.contents.length - 1;\n return this.contents[index];\n };\n PQueue.prototype.pop = function () {\n this._sort();\n return this.contents.pop();\n };\n PQueue.prototype.size = function () {\n return this.contents.length;\n };\n PQueue.prototype.map = function (mapper) {\n this._sort();\n return this.contents.map(mapper);\n };\n return PQueue;\n}());\nexports.default = PQueue;\n//# sourceMappingURL=pqueue.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../color\");\nvar vbox_1 = __importDefault(require(\"./vbox\"));\nvar pqueue_1 = __importDefault(require(\"./pqueue\"));\nvar fractByPopulations = 0.75;\nfunction _splitBoxes(pq, target) {\n var lastSize = pq.size();\n while (pq.size() < target) {\n var vbox = pq.pop();\n if (vbox && vbox.count() > 0) {\n var _a = vbox.split(), vbox1 = _a[0], vbox2 = _a[1];\n pq.push(vbox1);\n if (vbox2 && vbox2.count() > 0)\n pq.push(vbox2);\n // No more new boxes, converged\n if (pq.size() === lastSize) {\n break;\n }\n else {\n lastSize = pq.size();\n }\n }\n else {\n break;\n }\n }\n}\nvar MMCQ = function (pixels, opts) {\n if (pixels.length === 0 || opts.colorCount < 2 || opts.colorCount > 256) {\n throw new Error('Wrong MMCQ parameters');\n }\n var vbox = vbox_1.default.build(pixels);\n var hist = vbox.hist;\n var colorCount = Object.keys(hist).length;\n var pq = new pqueue_1.default(function (a, b) { return a.count() - b.count(); });\n pq.push(vbox);\n // first set of colors, sorted by population\n _splitBoxes(pq, fractByPopulations * opts.colorCount);\n // Re-order\n var pq2 = new pqueue_1.default(function (a, b) { return a.count() * a.volume() - b.count() * b.volume(); });\n pq2.contents = pq.contents;\n // next set - generate the median cuts using the (npix * vol) sorting.\n _splitBoxes(pq2, opts.colorCount - pq2.size());\n // calculate the actual colors\n return generateSwatches(pq2);\n};\nfunction generateSwatches(pq) {\n var swatches = [];\n while (pq.size()) {\n var v = pq.pop();\n var color = v.avg();\n var r = color[0], g = color[1], b = color[2];\n swatches.push(new color_1.Swatch(color, v.count()));\n }\n return swatches;\n}\nexports.default = MMCQ;\n//# sourceMappingURL=mmcq.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WebWorker = void 0;\nvar mmcq_1 = require(\"./mmcq\");\nObject.defineProperty(exports, \"MMCQ\", { enumerable: true, get: function () { return mmcq_1.default; } });\nexports.WebWorker = null;\n//# sourceMappingURL=index.js.map","var baseRest = require('./_baseRest'),\n eq = require('./eq'),\n isIterateeCall = require('./_isIterateeCall'),\n keysIn = require('./keysIn');\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 own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nmodule.exports = defaults;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../color\");\nvar util_1 = require(\"../util\");\nvar defaults = require(\"lodash/defaults\");\nvar DefaultOpts = {\n targetDarkLuma: 0.26,\n maxDarkLuma: 0.45,\n minLightLuma: 0.55,\n targetLightLuma: 0.74,\n minNormalLuma: 0.3,\n targetNormalLuma: 0.5,\n maxNormalLuma: 0.7,\n targetMutesSaturation: 0.3,\n maxMutesSaturation: 0.4,\n targetVibrantSaturation: 1.0,\n minVibrantSaturation: 0.35,\n weightSaturation: 3,\n weightLuma: 6.5,\n weightPopulation: 0.5\n};\nfunction _findMaxPopulation(swatches) {\n var p = 0;\n swatches.forEach(function (s) {\n p = Math.max(p, s.getPopulation());\n });\n return p;\n}\nfunction _isAlreadySelected(palette, s) {\n return palette.Vibrant === s ||\n palette.DarkVibrant === s ||\n palette.LightVibrant === s ||\n palette.Muted === s ||\n palette.DarkMuted === s ||\n palette.LightMuted === s;\n}\nfunction _createComparisonValue(saturation, targetSaturation, luma, targetLuma, population, maxPopulation, opts) {\n function weightedMean() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n var sum = 0;\n var weightSum = 0;\n for (var i = 0; i < values.length; i += 2) {\n var value = values[i];\n var weight = values[i + 1];\n sum += value * weight;\n weightSum += weight;\n }\n return sum / weightSum;\n }\n function invertDiff(value, targetValue) {\n return 1 - Math.abs(value - targetValue);\n }\n return weightedMean(invertDiff(saturation, targetSaturation), opts.weightSaturation, invertDiff(luma, targetLuma), opts.weightLuma, population / maxPopulation, opts.weightPopulation);\n}\nfunction _findColorVariation(palette, swatches, maxPopulation, targetLuma, minLuma, maxLuma, targetSaturation, minSaturation, maxSaturation, opts) {\n var max = null;\n var maxValue = 0;\n swatches.forEach(function (swatch) {\n var _a = swatch.getHsl(), s = _a[1], l = _a[2];\n if (s >= minSaturation && s <= maxSaturation &&\n l >= minLuma && l <= maxLuma &&\n !_isAlreadySelected(palette, swatch)) {\n var value = _createComparisonValue(s, targetSaturation, l, targetLuma, swatch.getPopulation(), maxPopulation, opts);\n if (max === null || value > maxValue) {\n max = swatch;\n maxValue = value;\n }\n }\n });\n return max;\n}\nfunction _generateVariationColors(swatches, maxPopulation, opts) {\n var palette = {};\n // mVibrantSwatch = findColor(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA,\n // TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);\n palette.Vibrant = _findColorVariation(palette, swatches, maxPopulation, opts.targetNormalLuma, opts.minNormalLuma, opts.maxNormalLuma, opts.targetVibrantSaturation, opts.minVibrantSaturation, 1, opts);\n // mLightVibrantSwatch = findColor(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f,\n // TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);\n palette.LightVibrant = _findColorVariation(palette, swatches, maxPopulation, opts.targetLightLuma, opts.minLightLuma, 1, opts.targetVibrantSaturation, opts.minVibrantSaturation, 1, opts);\n // mDarkVibrantSwatch = findColor(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA,\n // TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);\n palette.DarkVibrant = _findColorVariation(palette, swatches, maxPopulation, opts.targetDarkLuma, 0, opts.maxDarkLuma, opts.targetVibrantSaturation, opts.minVibrantSaturation, 1, opts);\n // mMutedSwatch = findColor(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA,\n // TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);\n palette.Muted = _findColorVariation(palette, swatches, maxPopulation, opts.targetNormalLuma, opts.minNormalLuma, opts.maxNormalLuma, opts.targetMutesSaturation, 0, opts.maxMutesSaturation, opts);\n // mLightMutedColor = findColor(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f,\n // TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);\n palette.LightMuted = _findColorVariation(palette, swatches, maxPopulation, opts.targetLightLuma, opts.minLightLuma, 1, opts.targetMutesSaturation, 0, opts.maxMutesSaturation, opts);\n // mDarkMutedSwatch = findColor(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA,\n // TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);\n palette.DarkMuted = _findColorVariation(palette, swatches, maxPopulation, opts.targetDarkLuma, 0, opts.maxDarkLuma, opts.targetMutesSaturation, 0, opts.maxMutesSaturation, opts);\n return palette;\n}\nfunction _generateEmptySwatches(palette, maxPopulation, opts) {\n if (palette.Vibrant === null && palette.DarkVibrant === null && palette.LightVibrant === null) {\n if (palette.DarkVibrant === null && palette.DarkMuted !== null) {\n var _a = palette.DarkMuted.getHsl(), h = _a[0], s = _a[1], l = _a[2];\n l = opts.targetDarkLuma;\n palette.DarkVibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.LightVibrant === null && palette.LightMuted !== null) {\n var _b = palette.LightMuted.getHsl(), h = _b[0], s = _b[1], l = _b[2];\n l = opts.targetDarkLuma;\n palette.DarkVibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n }\n if (palette.Vibrant === null && palette.DarkVibrant !== null) {\n var _c = palette.DarkVibrant.getHsl(), h = _c[0], s = _c[1], l = _c[2];\n l = opts.targetNormalLuma;\n palette.Vibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n else if (palette.Vibrant === null && palette.LightVibrant !== null) {\n var _d = palette.LightVibrant.getHsl(), h = _d[0], s = _d[1], l = _d[2];\n l = opts.targetNormalLuma;\n palette.Vibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.DarkVibrant === null && palette.Vibrant !== null) {\n var _e = palette.Vibrant.getHsl(), h = _e[0], s = _e[1], l = _e[2];\n l = opts.targetDarkLuma;\n palette.DarkVibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.LightVibrant === null && palette.Vibrant !== null) {\n var _f = palette.Vibrant.getHsl(), h = _f[0], s = _f[1], l = _f[2];\n l = opts.targetLightLuma;\n palette.LightVibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.Muted === null && palette.Vibrant !== null) {\n var _g = palette.Vibrant.getHsl(), h = _g[0], s = _g[1], l = _g[2];\n l = opts.targetMutesSaturation;\n palette.Muted = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.DarkMuted === null && palette.DarkVibrant !== null) {\n var _h = palette.DarkVibrant.getHsl(), h = _h[0], s = _h[1], l = _h[2];\n l = opts.targetMutesSaturation;\n palette.DarkMuted = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.LightMuted === null && palette.LightVibrant !== null) {\n var _j = palette.LightVibrant.getHsl(), h = _j[0], s = _j[1], l = _j[2];\n l = opts.targetMutesSaturation;\n palette.LightMuted = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n}\nvar DefaultGenerator = function (swatches, opts) {\n opts = defaults({}, opts, DefaultOpts);\n var maxPopulation = _findMaxPopulation(swatches);\n var palette = _generateVariationColors(swatches, maxPopulation, opts);\n _generateEmptySwatches(palette, maxPopulation, opts);\n return palette;\n};\nexports.default = DefaultGenerator;\n//# sourceMappingURL=default.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar default_1 = require(\"./default\");\nObject.defineProperty(exports, \"Default\", { enumerable: true, get: function () { return default_1.default; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction defaultFilter(r, g, b, a) {\n return a >= 125 &&\n !(r > 250 && g > 250 && b > 250);\n}\nexports.default = defaultFilter;\n//# sourceMappingURL=default.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.combineFilters = void 0;\nvar default_1 = require(\"./default\");\nObject.defineProperty(exports, \"Default\", { enumerable: true, get: function () { return default_1.default; } });\nfunction combineFilters(filters) {\n // TODO: caching\n if (!Array.isArray(filters) || filters.length === 0)\n return null;\n return function (r, g, b, a) {\n if (a === 0)\n return false;\n for (var i = 0; i < filters.length; i++) {\n if (!filters[i](r, g, b, a))\n return false;\n }\n return true;\n };\n}\nexports.combineFilters = combineFilters;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"./color\");\nvar builder_1 = __importDefault(require(\"./builder\"));\nvar Util = __importStar(require(\"./util\"));\nvar Quantizer = __importStar(require(\"./quantizer\"));\nvar Generator = __importStar(require(\"./generator\"));\nvar Filters = __importStar(require(\"./filter\"));\nvar defaults = require(\"lodash/defaults\");\nvar Vibrant = /** @class */ (function () {\n function Vibrant(_src, opts) {\n this._src = _src;\n this.opts = defaults({}, opts, Vibrant.DefaultOpts);\n this.opts.combinedFilter = Filters.combineFilters(this.opts.filters);\n }\n Vibrant.from = function (src) {\n return new builder_1.default(src);\n };\n Vibrant.prototype._process = function (image, opts) {\n var quantizer = opts.quantizer, generator = opts.generator;\n image.scaleDown(opts);\n return image.applyFilter(opts.combinedFilter)\n .then(function (imageData) { return quantizer(imageData.data, opts); })\n .then(function (colors) { return color_1.Swatch.applyFilter(colors, opts.combinedFilter); })\n .then(function (colors) { return Promise.resolve(generator(colors)); });\n };\n Vibrant.prototype.palette = function () {\n return this.swatches();\n };\n Vibrant.prototype.swatches = function () {\n return this._palette;\n };\n Vibrant.prototype.getPalette = function (cb) {\n var _this = this;\n var image = new this.opts.ImageClass();\n var result = image.load(this._src)\n .then(function (image) { return _this._process(image, _this.opts); })\n .then(function (palette) {\n _this._palette = palette;\n image.remove();\n return palette;\n }, function (err) {\n image.remove();\n throw err;\n });\n if (cb)\n result.then(function (palette) { return cb(null, palette); }, function (err) { return cb(err); });\n return result;\n };\n Vibrant.Builder = builder_1.default;\n Vibrant.Quantizer = Quantizer;\n Vibrant.Generator = Generator;\n Vibrant.Filter = Filters;\n Vibrant.Util = Util;\n Vibrant.Swatch = color_1.Swatch;\n Vibrant.DefaultOpts = {\n colorCount: 64,\n quality: 5,\n generator: Generator.Default,\n ImageClass: null,\n quantizer: Quantizer.MMCQ,\n filters: [Filters.Default]\n };\n return Vibrant;\n}());\nexports.default = Vibrant;\n//# sourceMappingURL=vibrant.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImageBase = void 0;\nvar ImageBase = /** @class */ (function () {\n function ImageBase() {\n }\n ImageBase.prototype.scaleDown = function (opts) {\n var width = this.getWidth();\n var height = this.getHeight();\n var ratio = 1;\n if (opts.maxDimension > 0) {\n var maxSide = Math.max(width, height);\n if (maxSide > opts.maxDimension)\n ratio = opts.maxDimension / maxSide;\n }\n else {\n ratio = 1 / opts.quality;\n }\n if (ratio < 1)\n this.resize(width * ratio, height * ratio, ratio);\n };\n ImageBase.prototype.applyFilter = function (filter) {\n var imageData = this.getImageData();\n if (typeof filter === 'function') {\n var pixels = imageData.data;\n var n = pixels.length / 4;\n var offset = void 0, r = void 0, g = void 0, b = void 0, a = void 0;\n for (var i = 0; i < n; i++) {\n offset = i * 4;\n r = pixels[offset + 0];\n g = pixels[offset + 1];\n b = pixels[offset + 2];\n a = pixels[offset + 3];\n // Mark ignored color\n if (!filter(r, g, b, a))\n pixels[offset + 3] = 0;\n }\n }\n return Promise.resolve(imageData);\n };\n return ImageBase;\n}());\nexports.ImageBase = ImageBase;\n//# sourceMappingURL=base.js.map","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","import { decode, encode, parse, stringify } from 'querystring-es3';\nexport { decode, encode, parse, stringify } from 'querystring-es3';\n\n/**\n * @typedef {import('querystring').escape} qsEscape\n * @typedef {import('querystring').unescape} qsUnescape\n */\n/**\n * @type {qsEscape}\n */\n\nfunction qsEscape(string) {\n return encodeURIComponent(string);\n}\n/**\n * @type {qsUnescape}\n */\n\n\nfunction qsUnescape(string) {\n return decodeURIComponent(string);\n}\n\nvar api = {\n decode: decode,\n encode: encode,\n parse: parse,\n stringify: stringify,\n escape: qsEscape,\n unescape: qsUnescape\n};\n\nexport { api as default, qsEscape as escape, qsUnescape as unescape };\n//# sourceMappingURL=querystring.js.map\n","import require$$0 from 'punycode';\nimport require$$2 from 'querystring';\n\nvar util$1 = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n\nvar punycode = require$$0;\nvar util = util$1;\n\nvar parse = urlParse;\nvar resolve$1 = urlResolve;\nvar resolveObject = urlResolveObject;\nvar format = urlFormat;\n\nvar Url_1 = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require$$2;\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nfunction resolve() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : '/';\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n}function filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\nvar _globalThis = function (Object) {\n function get() {\n var _global = this || self;\n\n delete Object.prototype.__magic__;\n return _global;\n }\n\n if (typeof globalThis === \"object\") {\n return globalThis;\n }\n\n if (this) {\n return get();\n } else {\n Object.defineProperty(Object.prototype, \"__magic__\", {\n configurable: true,\n get: get\n });\n var _global = __magic__;\n return _global;\n }\n}(Object);\nvar formatImport =\n/** @type {formatImport}*/\nformat;\nvar parseImport =\n/** @type {parseImport}*/\nparse;\nvar resolveImport =\n/** @type {resolveImport}*/\nresolve$1; // @ts-ignore\n\nvar UrlImport =\n/** @type {UrlImport}*/\nUrl_1;\nvar URL = _globalThis.URL;\n/* eslint-disable-next-line unicorn/prevent-abbreviations */\n\nvar URLSearchParams = _globalThis.URLSearchParams;\nvar percentRegEx = /%/g;\nvar backslashRegEx = /\\\\/g;\nvar newlineRegEx = /\\n/g;\nvar carriageReturnRegEx = /\\r/g;\nvar tabRegEx = /\\t/g;\nvar CHAR_FORWARD_SLASH = 47;\n/**\n * @param {unknown} instance\n */\n\nfunction isURLInstance(instance) {\n var resolved =\n /** @type {URL|null} */\n instance != null ? instance : null;\n return Boolean(resolved !== null && (resolved == null ? void 0 : resolved.href) && (resolved == null ? void 0 : resolved.origin));\n}\n/**\n * @param {URL} url\n */\n\n\nfunction getPathFromURLPosix(url) {\n if (url.hostname !== '') {\n throw new TypeError(\"File URL host must be \\\"localhost\\\" or empty on browser\");\n }\n\n var pathname = url.pathname;\n\n for (var n = 0; n < pathname.length; n++) {\n if (pathname[n] === '%') {\n // @ts-ignore\n var third = pathname.codePointAt(n + 2) | 0x20;\n\n if (pathname[n + 1] === '2' && third === 102) {\n throw new TypeError('File URL path must not include encoded / characters');\n }\n }\n }\n\n return decodeURIComponent(pathname);\n}\n/**\n * @param {string} filepath\n */\n\n\nfunction encodePathChars(filepath) {\n if (filepath.includes('%')) {\n filepath = filepath.replace(percentRegEx, '%25');\n }\n\n if (filepath.includes('\\\\')) {\n filepath = filepath.replace(backslashRegEx, '%5C');\n }\n\n if (filepath.includes('\\n')) {\n filepath = filepath.replace(newlineRegEx, '%0A');\n }\n\n if (filepath.includes('\\r')) {\n filepath = filepath.replace(carriageReturnRegEx, '%0D');\n }\n\n if (filepath.includes('\\t')) {\n filepath = filepath.replace(tabRegEx, '%09');\n }\n\n return filepath;\n}\n\nvar domainToASCII =\n/**\n * @type {domainToASCII}\n */\nfunction domainToASCII(domain) {\n if (typeof domain === 'undefined') {\n throw new TypeError('The \"domain\" argument must be specified');\n }\n\n return new URL(\"http://\" + domain).hostname;\n};\n\nvar domainToUnicode =\n/**\n * @type {domainToUnicode}\n */\nfunction domainToUnicode(domain) {\n if (typeof domain === 'undefined') {\n throw new TypeError('The \"domain\" argument must be specified');\n }\n\n return new URL(\"http://\" + domain).hostname;\n};\n\nvar pathToFileURL =\n/**\n * @type {(url: string) => URL}\n */\nfunction pathToFileURL(filepath) {\n var outURL = new URL('file://');\n var resolved = resolve(filepath);\n var filePathLast = filepath.charCodeAt(filepath.length - 1);\n\n if (filePathLast === CHAR_FORWARD_SLASH && resolved[resolved.length - 1] !== '/') {\n resolved += '/';\n }\n\n outURL.pathname = encodePathChars(resolved);\n return outURL;\n};\n\nvar fileURLToPath =\n/**\n * @type {fileURLToPath & ((path: string | URL) => string)}\n */\nfunction fileURLToPath(path) {\n if (!isURLInstance(path) && typeof path !== 'string') {\n throw new TypeError(\"The \\\"path\\\" argument must be of type string or an instance of URL. Received type \" + typeof path + \" (\" + path + \")\");\n }\n\n var resolved = new URL(path);\n\n if (resolved.protocol !== 'file:') {\n throw new TypeError('The URL must be of scheme file');\n }\n\n return getPathFromURLPosix(resolved);\n};\n\nvar formatImportWithOverloads =\n/**\n * @type {(\n * ((urlObject: URL, options?: URLFormatOptions) => string) &\n * ((urlObject: UrlObject | string, options?: never) => string)\n * )}\n */\nfunction formatImportWithOverloads(urlObject, options) {\n var _options$auth, _options$fragment, _options$search;\n\n if (options === void 0) {\n options = {};\n }\n\n if (!(urlObject instanceof URL)) {\n return formatImport(urlObject);\n }\n\n if (typeof options !== 'object' || options === null) {\n throw new TypeError('The \"options\" argument must be of type object.');\n }\n\n var auth = (_options$auth = options.auth) != null ? _options$auth : true;\n var fragment = (_options$fragment = options.fragment) != null ? _options$fragment : true;\n var search = (_options$search = options.search) != null ? _options$search : true;\n var parsed = new URL(urlObject.toString());\n\n if (!auth) {\n parsed.username = '';\n parsed.password = '';\n }\n\n if (!fragment) {\n parsed.hash = '';\n }\n\n if (!search) {\n parsed.search = '';\n }\n\n return parsed.toString();\n};\n\nvar api = {\n format: formatImportWithOverloads,\n parse: parseImport,\n resolve: resolveImport,\n resolveObject: resolveObject,\n Url: UrlImport,\n URL: URL,\n URLSearchParams: URLSearchParams,\n domainToASCII: domainToASCII,\n domainToUnicode: domainToUnicode,\n pathToFileURL: pathToFileURL,\n fileURLToPath: fileURLToPath\n};\n\nexport { URL, URLSearchParams, UrlImport as Url, api as default, domainToASCII, domainToUnicode, fileURLToPath, formatImportWithOverloads as format, parseImport as parse, pathToFileURL, resolveImport as resolve, resolveObject };\n//# sourceMappingURL=url.js.map\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar base_1 = require(\"./base\");\nvar Url = __importStar(require(\"url\"));\nfunction isRelativeUrl(url) {\n var u = Url.parse(url);\n return u.protocol === null &&\n u.host === null &&\n u.port === null;\n}\nfunction isSameOrigin(a, b) {\n var ua = Url.parse(a);\n var ub = Url.parse(b);\n // https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy\n return ua.protocol === ub.protocol &&\n ua.hostname === ub.hostname &&\n ua.port === ub.port;\n}\nvar BrowserImage = /** @class */ (function (_super) {\n __extends(BrowserImage, _super);\n function BrowserImage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BrowserImage.prototype._initCanvas = function () {\n var img = this.image;\n var canvas = this._canvas = document.createElement('canvas');\n var context = this._context = canvas.getContext('2d');\n canvas.className = 'vibrant-canvas';\n canvas.style.display = 'none';\n this._width = canvas.width = img.width;\n this._height = canvas.height = img.height;\n context.drawImage(img, 0, 0);\n document.body.appendChild(canvas);\n };\n BrowserImage.prototype.load = function (image) {\n var _this = this;\n var img = null;\n var src = null;\n if (typeof image === 'string') {\n img = document.createElement('img');\n if (!isRelativeUrl(image) && !isSameOrigin(window.location.href, image)) {\n img.crossOrigin = 'anonymous';\n }\n src = img.src = image;\n }\n else if (image instanceof HTMLImageElement) {\n img = image;\n src = image.src;\n }\n else {\n return Promise.reject(new Error(\"Cannot load buffer as an image in browser\"));\n }\n this.image = img;\n return new Promise(function (resolve, reject) {\n var onImageLoad = function () {\n _this._initCanvas();\n resolve(_this);\n };\n if (img.complete) {\n // Already loaded\n onImageLoad();\n }\n else {\n img.onload = onImageLoad;\n img.onerror = function (e) { return reject(new Error(\"Fail to load image: \" + src)); };\n }\n });\n };\n BrowserImage.prototype.clear = function () {\n this._context.clearRect(0, 0, this._width, this._height);\n };\n BrowserImage.prototype.update = function (imageData) {\n this._context.putImageData(imageData, 0, 0);\n };\n BrowserImage.prototype.getWidth = function () {\n return this._width;\n };\n BrowserImage.prototype.getHeight = function () {\n return this._height;\n };\n BrowserImage.prototype.resize = function (targetWidth, targetHeight, ratio) {\n var _a = this, canvas = _a._canvas, context = _a._context, img = _a.image;\n this._width = canvas.width = targetWidth;\n this._height = canvas.height = targetHeight;\n context.scale(ratio, ratio);\n context.drawImage(img, 0, 0);\n };\n BrowserImage.prototype.getPixelCount = function () {\n return this._width * this._height;\n };\n BrowserImage.prototype.getImageData = function () {\n return this._context.getImageData(0, 0, this._width, this._height);\n };\n BrowserImage.prototype.remove = function () {\n if (this._canvas && this._canvas.parentNode) {\n this._canvas.parentNode.removeChild(this._canvas);\n }\n };\n return BrowserImage;\n}(base_1.ImageBase));\nexports.default = BrowserImage;\n//# sourceMappingURL=browser.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar vibrant_1 = __importDefault(require(\"./vibrant\"));\nvar browser_1 = __importDefault(require(\"./image/browser\"));\nvibrant_1.default.DefaultOpts.ImageClass = browser_1.default;\nmodule.exports = vibrant_1.default;\n//# sourceMappingURL=browser.js.map","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div class=\"background-selector\" data-user-theming-background-settings>\n\t\t<!-- Custom background -->\n\t\t<button :aria-pressed=\"backgroundImage === 'custom'\"\n\t\t\t:class=\"{\n\t\t\t\t'icon-loading': loading === 'custom',\n\t\t\t\t'background background__filepicker': true,\n\t\t\t\t'background--active': backgroundImage === 'custom'\n\t\t\t}\"\n\t\t\tdata-user-theming-background-custom\n\t\t\ttabindex=\"0\"\n\t\t\t@click=\"pickFile\">\n\t\t\t{{ t('theming', 'Custom background') }}\n\t\t\t<ImageEdit v-if=\"backgroundImage !== 'custom'\" :size=\"20\" />\n\t\t\t<Check :size=\"44\" />\n\t\t</button>\n\n\t\t<!-- Custom color picker -->\n\t\t<NcColorPicker v-model=\"Theming.backgroundColor\" @update:value=\"debouncePickColor\">\n\t\t\t<button :class=\"{\n\t\t\t\t\t'icon-loading': loading === 'color',\n\t\t\t\t\t'background background__color': true,\n\t\t\t\t\t'background--active': backgroundImage === 'color'\n\t\t\t\t}\"\n\t\t\t\t:aria-pressed=\"backgroundImage === 'color'\"\n\t\t\t\t:data-color=\"Theming.backgroundColor\"\n\t\t\t\t:data-color-bright=\"invertTextColor(Theming.backgroundColor)\"\n\t\t\t\t:style=\"{ backgroundColor: Theming.backgroundColor, '--border-color': Theming.backgroundColor}\"\n\t\t\t\tdata-user-theming-background-color\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t@click=\"backgroundImage !== 'color' && debouncePickColor(Theming.backgroundColor)\">\n\t\t\t\t{{ t('theming', 'Plain background') /* TRANSLATORS: Background using a single color */ }}\n\t\t\t\t<ColorPalette v-if=\"backgroundImage !== 'color'\" :size=\"20\" />\n\t\t\t\t<Check :size=\"44\" />\n\t\t\t</button>\n\t\t</NcColorPicker>\n\n\t\t<!-- Default background -->\n\t\t<button :aria-pressed=\"backgroundImage === 'default'\"\n\t\t\t:class=\"{\n\t\t\t\t'icon-loading': loading === 'default',\n\t\t\t\t'background background__default': true,\n\t\t\t\t'background--active': backgroundImage === 'default'\n\t\t\t}\"\n\t\t\t:data-color-bright=\"invertTextColor(Theming.defaultBackgroundColor)\"\n\t\t\t:style=\"{ '--border-color': Theming.defaultBackgroundColor }\"\n\t\t\tdata-user-theming-background-default\n\t\t\ttabindex=\"0\"\n\t\t\t@click=\"setDefault\">\n\t\t\t{{ t('theming', 'Default background') }}\n\t\t\t<Check :size=\"44\" />\n\t\t</button>\n\n\t\t<!-- Background set selection -->\n\t\t<button v-for=\"shippedBackground in shippedBackgrounds\"\n\t\t\t:key=\"shippedBackground.name\"\n\t\t\t:title=\"shippedBackground.details.attribution\"\n\t\t\t:aria-label=\"shippedBackground.details.description\"\n\t\t\t:aria-pressed=\"backgroundImage === shippedBackground.name\"\n\t\t\t:class=\"{\n\t\t\t\t'background background__shipped': true,\n\t\t\t\t'icon-loading': loading === shippedBackground.name,\n\t\t\t\t'background--active': backgroundImage === shippedBackground.name\n\t\t\t}\"\n\t\t\t:data-color-bright=\"invertTextColor(shippedBackground.details.background_color)\"\n\t\t\t:data-user-theming-background-shipped=\"shippedBackground.name\"\n\t\t\t:style=\"{ backgroundImage: 'url(' + shippedBackground.preview + ')', '--border-color': shippedBackground.details.primary_color }\"\n\t\t\ttabindex=\"0\"\n\t\t\t@click=\"setShipped(shippedBackground.name)\">\n\t\t\t<Check :size=\"44\" />\n\t\t</button>\n\t</div>\n</template>\n\n<script>\nimport { generateFilePath, generateRemoteUrl, generateUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { getFilePickerBuilder, showError } from '@nextcloud/dialogs'\nimport { loadState } from '@nextcloud/initial-state'\nimport { Palette } from 'node-vibrant/lib/color.js'\nimport axios from '@nextcloud/axios'\nimport debounce from 'debounce'\nimport NcColorPicker from '@nextcloud/vue/dist/Components/NcColorPicker.js'\nimport Vibrant from 'node-vibrant'\n\nimport Check from 'vue-material-design-icons/Check.vue'\nimport ImageEdit from 'vue-material-design-icons/ImageEdit.vue'\nimport ColorPalette from 'vue-material-design-icons/Palette.vue'\n\nconst shippedBackgroundList = loadState('theming', 'shippedBackgrounds')\nconst backgroundImage = loadState('theming', 'userBackgroundImage')\nconst {\n\tbackgroundImage: defaultBackgroundImage,\n\tbackgroundColor: defaultBackgroundColor,\n\tbackgroundMime: defaultBackgroundMime,\n\tdefaultShippedBackground,\n} = loadState('theming', 'themingDefaults')\n\nconst prefixWithBaseUrl = (url) => generateFilePath('theming', '', 'img/background/') + url\n\nexport default {\n\tname: 'BackgroundSettings',\n\n\tcomponents: {\n\t\tCheck,\n\t\tColorPalette,\n\t\tImageEdit,\n\t\tNcColorPicker,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tTheming: loadState('theming', 'data', {}),\n\n\t\t\t// User background image and color settings\n\t\t\tbackgroundImage,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tshippedBackgrounds() {\n\t\t\treturn Object.keys(shippedBackgroundList)\n\t\t\t\t.filter((background) => {\n\t\t\t\t\t// If the admin did not changed the global background\n\t\t\t\t\t// let's hide the default background to not show it twice\n\t\t\t\t\treturn background !== defaultShippedBackground || !this.isGlobalBackgroundDefault\n\t\t\t\t})\n\t\t\t\t.map((fileName) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname: fileName,\n\t\t\t\t\t\turl: prefixWithBaseUrl(fileName),\n\t\t\t\t\t\tpreview: prefixWithBaseUrl('preview/' + fileName),\n\t\t\t\t\t\tdetails: shippedBackgroundList[fileName],\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\n\t\tisGlobalBackgroundDefault() {\n\t\t\treturn defaultBackgroundMime === ''\n\t\t},\n\n\t\tisGlobalBackgroundDeleted() {\n\t\t\treturn defaultBackgroundMime === 'backgroundColor'\n\t\t},\n\n\t\tcssDefaultBackgroundImage() {\n\t\t\treturn `url('${defaultBackgroundImage}')`\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Do we need to invert the text if color is too bright?\n\t\t *\n\t\t * @param {string} color the hex color\n\t\t */\n\t\tinvertTextColor(color) {\n\t\t\treturn this.calculateLuma(color) > 0.6\n\t\t},\n\n\t\t/**\n\t\t * Calculate luminance of provided hex color\n\t\t *\n\t\t * @param {string} color the hex color\n\t\t */\n\t\tcalculateLuma(color) {\n\t\t\tconst [red, green, blue] = this.hexToRGB(color)\n\t\t\treturn (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255\n\t\t},\n\n\t\t/**\n\t\t * Convert hex color to RGB\n\t\t *\n\t\t * @param {string} hex the hex color\n\t\t */\n\t\thexToRGB(hex) {\n\t\t\tconst result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex)\n\t\t\treturn result\n\t\t\t\t? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]\n\t\t\t\t: null\n\t\t},\n\n\t\t/**\n\t\t * Update local state\n\t\t *\n\t\t * @param {object} data destructuring object\n\t\t * @param {string} data.backgroundColor background color value\n\t\t * @param {string} data.backgroundImage background image value\n\t\t * @param {string} data.version cache buster number\n\t\t * @see https://github.com/nextcloud/server/blob/c78bd45c64d9695724fc44fe8453a88824b85f2f/apps/theming/lib/Controller/UserThemeController.php#L187-L191\n\t\t */\n\t\tasync update(data) {\n\t\t\t// Update state\n\t\t\tthis.backgroundImage = data.backgroundImage\n\t\t\tthis.Theming.backgroundColor = data.backgroundColor\n\n\t\t\t// Notify parent and reload style\n\t\t\tthis.$emit('update:background')\n\t\t\tthis.loading = false\n\t\t},\n\n\t\tasync setDefault() {\n\t\t\tthis.loading = 'default'\n\t\t\tconst result = await axios.post(generateUrl('/apps/theming/background/default'))\n\t\t\tthis.update(result.data)\n\t\t},\n\n\t\tasync setShipped(shipped) {\n\t\t\tthis.loading = shipped\n\t\t\tconst result = await axios.post(generateUrl('/apps/theming/background/shipped'), { value: shipped })\n\t\t\tthis.update(result.data)\n\t\t},\n\n\t\tasync setFile(path, color = null) {\n\t\t\tthis.loading = 'custom'\n\t\t\tconst result = await axios.post(generateUrl('/apps/theming/background/custom'), { value: path, color })\n\t\t\tthis.update(result.data)\n\t\t},\n\n\t\tasync removeBackground() {\n\t\t\tthis.loading = 'remove'\n\t\t\tconst result = await axios.delete(generateUrl('/apps/theming/background/custom'))\n\t\t\tthis.update(result.data)\n\t\t},\n\n\t\tasync pickColor(color) {\n\t\t\tthis.loading = 'color'\n\t\t\tconst { data } = await axios.post(generateUrl('/apps/theming/background/color'), { color: color || '#0082c9' })\n\t\t\tthis.update(data)\n\t\t},\n\n\t\tdebouncePickColor: debounce(function(...args) {\n\t\t\tthis.pickColor(...args)\n\t\t}, 200),\n\n\t\tpickFile() {\n\t\t\tconst picker = getFilePickerBuilder(t('theming', 'Select a background from your files'))\n\t\t\t\t.allowDirectories(false)\n\t\t\t\t.setMimeTypeFilter(['image/png', 'image/gif', 'image/jpeg', 'image/svg+xml', 'image/svg'])\n\t\t\t\t.setMultiSelect(false)\n\t\t\t\t.addButton({\n\t\t\t\t\tid: 'select',\n\t\t\t\t\tlabel: t('theming', 'Select background'),\n\t\t\t\t\tcallback: (nodes) => {\n\t\t\t\t\t\tthis.applyFile(nodes[0]?.path)\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t})\n\t\t\t\t.build()\n\t\t\tpicker.pick()\n\t\t},\n\n\t\tasync applyFile(path) {\n\t\t\tif (!path || typeof path !== 'string' || path.trim().length === 0 || path === '/') {\n\t\t\t\tconsole.error('No valid background have been selected', { path })\n\t\t\t\tshowError(t('theming', 'No background has been selected'))\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loading = 'custom'\n\n\t\t\t// Extract primary color from image\n\t\t\tlet response = null\n\t\t\tlet color = null\n\t\t\ttry {\n\t\t\t\tconst fileUrl = generateRemoteUrl('dav/files/' + getCurrentUser().uid + path)\n\t\t\t\tresponse = await axios.get(fileUrl, { responseType: 'blob' })\n\t\t\t\tconst blobUrl = URL.createObjectURL(response.data)\n\t\t\t\tconst palette = await this.getColorPaletteFromBlob(blobUrl)\n\n\t\t\t\t// DarkVibrant is accessible AND visually pleasing\n\t\t\t\t// Vibrant is not accessible enough and others are boring\n\t\t\t\tcolor = palette?.DarkVibrant?.hex\n\t\t\t\tthis.setFile(path, color)\n\n\t\t\t\t// Log data\n\t\t\t\tconsole.debug('Extracted colour', color, 'from custom image', path, palette)\n\t\t\t} catch (error) {\n\t\t\t\tthis.setFile(path)\n\t\t\t\tconsole.error('Unable to extract colour from custom image', { error, path, response, color })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Extract a Vibrant color palette from a blob URL\n\t\t *\n\t\t * @param {string} blobUrl the blob URL\n\t\t * @return {Promise<Palette>}\n\t\t */\n\t\tgetColorPaletteFromBlob(blobUrl) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst vibrant = new Vibrant(blobUrl)\n\t\t\t\tvibrant.getPalette((error, palette) => {\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\treject(error)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(palette)\n\t\t\t\t})\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.background-selector {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: center;\n\n\t.background-color {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 176px;\n\t\theight: 96px;\n\t\tmargin: 8px;\n\t\tborder-radius: var(--border-radius-large);\n\t\tbackground-color: var(--color-primary);\n\t}\n\n\t.background {\n\t\toverflow: hidden;\n\t\twidth: 176px;\n\t\theight: 96px;\n\t\tmargin: 8px;\n\t\ttext-align: center;\n\t\tword-wrap: break-word;\n\t\thyphens: auto;\n\t\tborder: 2px solid var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\t\tbackground-position: center center;\n\t\tbackground-size: cover;\n\n\t\t&__filepicker {\n\t\t\tbackground-color: var(--color-main-text);\n\t\t\tbackground-color: var(--color-background-dark);\n\n\t\t\t&.background--active {\n\t\t\t\tcolor: var(--color-background-plain-text);\n\t\t\t\tbackground-image: var(--image-background);\n\t\t\t}\n\t\t}\n\n\t\t&__default {\n\t\t\tbackground-color: var(--color-background-plain);\n\t\t\tbackground-image: linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)), v-bind(cssDefaultBackgroundImage);\n\t\t}\n\n\t\t&__filepicker, &__default, &__color {\n\t\t\tborder-color: var(--color-border);\n\t\t}\n\n\t\t// Over a background image\n\t\t&__default,\n\t\t&__shipped {\n\t\t\tcolor: white;\n\t\t}\n\n\t\t// Text and svg icon dark on bright background\n\t\t&[data-color-bright] {\n\t\t\tcolor: black;\n\t\t}\n\n\t\t&--active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-color: var(--color-main-background) !important;\n\t\t}\n\n\t\t// Icon\n\t\tspan {\n\t\t\tmargin: 4px;\n\t\t}\n\n\t\t.check-icon {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t&--active:not(.icon-loading) {\n\t\t\t.check-icon {\n\t\t\t\t// Show checkmark\n\t\t\t\tdisplay: block !important;\n\t\t\t}\n\t\t}\n\t}\n}\n\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div :class=\"'theming__preview--' + theme.id\" class=\"theming__preview\">\n\t\t<div class=\"theming__preview-image\" :style=\"{ backgroundImage: 'url(' + img + ')' }\" @click=\"onToggle\" />\n\t\t<div class=\"theming__preview-description\">\n\t\t\t<h3>{{ theme.title }}</h3>\n\t\t\t<p class=\"theming__preview-explanation\">{{ theme.description }}</p>\n\t\t\t<span v-if=\"enforced\" class=\"theming__preview-warning\" role=\"note\">\n\t\t\t\t{{ t('theming', 'Theme selection is enforced') }}\n\t\t\t</span>\n\t\t\t<NcCheckboxRadioSwitch class=\"theming__preview-toggle\"\n\t\t\t\t:checked.sync=\"checked\"\n\t\t\t\t:disabled=\"enforced\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:type=\"switchType\">\n\t\t\t\t{{ theme.enableLabel }}\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { generateFilePath } from '@nextcloud/router'\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'\n\nexport default {\n\tname: 'ItemPreview',\n\tcomponents: {\n\t\tNcCheckboxRadioSwitch,\n\t},\n\tprops: {\n\t\tenforced: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tselected: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\ttheme: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tunique: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tcomputed: {\n\t\tswitchType() {\n\t\t\treturn this.unique ? 'switch' : 'radio'\n\t\t},\n\n\t\tname() {\n\t\t\treturn !this.unique ? this.type : null\n\t\t},\n\n\t\timg() {\n\t\t\treturn generateFilePath('theming', 'img', this.theme.id + '.jpg')\n\t\t},\n\n\t\tchecked: {\n\t\t\tget() {\n\t\t\t\treturn this.selected\n\t\t\t},\n\t\t\tset(checked) {\n\t\t\t\tconsole.debug('Changed theme', this.theme.id, checked)\n\n\t\t\t\t// If this is a radio, we can only enable\n\t\t\t\tif (!this.unique) {\n\t\t\t\t\tthis.$emit('change', { enabled: true, id: this.theme.id })\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// If this is a switch, we can disable the theme\n\t\t\t\tthis.$emit('change', { enabled: checked === true, id: this.theme.id })\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonToggle() {\n\t\t\tif (this.switchType === 'radio') {\n\t\t\t\tthis.checked = true\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Invert state\n\t\t\tthis.checked = !this.checked\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n@use 'sass:math';\n\n.theming__preview {\n\t// We make previews on 16/10 screens\n\t--ratio: 16;\n\n\tposition: relative;\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\tmax-width: 800px;\n\n\t&,\n\t* {\n\t\tuser-select: none;\n\t}\n\n\t&-image {\n\t\tflex-basis: calc(16px * var(--ratio));\n\t\tflex-shrink: 0;\n\t\theight: calc(10px * var(--ratio));\n\t\tmargin-right: var(--gap);\n\t\tcursor: pointer;\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: top left;\n\t\tbackground-size: cover;\n\t}\n\n\t&-explanation {\n\t\tmargin-bottom: 10px;\n\t}\n\n\t&-description {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3 {\n\t\t\tfont-weight: bold;\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tlabel {\n\t\t\tpadding: 12px 0;\n\t\t}\n\t}\n\n\t&--default {\n\t\tgrid-column: span 2;\n\t}\n\n\t&-warning {\n\t\tcolor: var(--color-warning);\n\t}\n}\n\n@media (max-width: math.div(1024px, 1.5)) {\n\t.theming__preview {\n\t\tflex-direction: column;\n\n\t\t&-image {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n}\n\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<NcSettingsSection :name=\"t('theming', 'Navigation bar settings')\">\n\t\t<p>\n\t\t\t{{ t('theming', 'You can configure the app order used for the navigation bar. The first entry will be the default app, opened after login or when clicking on the logo.') }}\n\t\t</p>\n\t\t<NcNoteCard v-if=\"enforcedDefaultApp\" :id=\"elementIdEnforcedDefaultApp\" type=\"info\">\n\t\t\t{{ t('theming', 'The default app can not be changed because it was configured by the administrator.') }}\n\t\t</NcNoteCard>\n\t\t<NcNoteCard v-if=\"hasAppOrderChanged\" :id=\"elementIdAppOrderChanged\" type=\"info\">\n\t\t\t{{ t('theming', 'The app order was changed, to see it in action you have to reload the page.') }}\n\t\t</NcNoteCard>\n\n\t\t<AppOrderSelector class=\"user-app-menu-order\"\n\t\t\t:aria-details=\"ariaDetailsAppOrder\"\n\t\t\t:value=\"appOrder\"\n\t\t\t@update:value=\"updateAppOrder\" />\n\n\t\t<NcButton data-test-id=\"btn-apporder-reset\"\n\t\t\t:disabled=\"!hasCustomAppOrder\"\n\t\t\ttype=\"tertiary\"\n\t\t\t@click=\"resetAppOrder\">\n\t\t\t<template #icon>\n\t\t\t\t<IconUndo :size=\"20\" />\n\t\t\t</template>\n\t\t\t{{ t('theming', 'Reset default app order') }}\n\t\t</NcButton>\n\t</NcSettingsSection>\n</template>\n\n<script lang=\"ts\">\nimport type { IApp } from './AppOrderSelector.vue'\n\nimport { showError } from '@nextcloud/dialogs'\nimport { loadState } from '@nextcloud/initial-state'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport axios from '@nextcloud/axios'\nimport AppOrderSelector from './AppOrderSelector.vue'\nimport IconUndo from 'vue-material-design-icons/Undo.vue'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\nimport NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'\nimport NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'\n\n/** See NavigationManager */\ninterface INavigationEntry {\n\t/** Navigation id */\n\tid: string\n\t/** Order where this entry should be shown */\n\torder: number\n\t/** Target of the navigation entry */\n\thref: string\n\t/** The icon used for the naviation entry */\n\ticon: string\n\t/** Type of the navigation entry ('link' vs 'settings') */\n\ttype: 'link' | 'settings'\n\t/** Localized name of the navigation entry */\n\tname: string\n\t/** Whether this is the default app */\n\tdefault?: boolean\n\t/** App that registered this navigation entry (not necessarly the same as the id) */\n\tapp?: string\n}\n\n/** The app order user setting */\ntype IAppOrder = Record<string, { order: number, app?: string }>\n\n/** OCS responses */\ninterface IOCSResponse<T> {\n\tocs: {\n\t\tmeta: unknown\n\t\tdata: T\n\t}\n}\n\nexport default defineComponent({\n\tname: 'UserAppMenuSection',\n\tcomponents: {\n\t\tAppOrderSelector,\n\t\tIconUndo,\n\t\tNcButton,\n\t\tNcNoteCard,\n\t\tNcSettingsSection,\n\t},\n\tsetup() {\n\t\tconst {\n\t\t\t/** The app order currently defined by the user */\n\t\t\tuserAppOrder,\n\t\t\t/** The enforced default app set by the administrator (if any) */\n\t\t\tenforcedDefaultApp,\n\t\t} = loadState<{ userAppOrder: IAppOrder, enforcedDefaultApp: string }>('theming', 'navigationBar')\n\n\t\t/**\n\t\t * Array of all available apps, it is set by a core controller for the app menu, so it is always available\n\t\t */\n\t\t const initialAppOrder = Object.values(loadState<Record<string, INavigationEntry>>('core', 'apps'))\n\t\t\t.filter(({ type }) => type === 'link')\n\t\t\t.map((app) => ({ ...app, label: app.name, default: app.default && app.app === enforcedDefaultApp }))\n\n\t\t/**\n\t\t * Check if a custom app order is used or the default is shown\n\t\t */\n\t\tconst hasCustomAppOrder = ref(!Array.isArray(userAppOrder) || Object.values(userAppOrder).length > 0)\n\n\t\t/**\n\t\t * Track if the app order has changed, so the user can be informed to reload\n\t\t */\n\t\tconst hasAppOrderChanged = computed(() => initialAppOrder.some(({ id }, index) => id !== appOrder.value[index].id))\n\n\t\t/** ID of the \"app order has changed\" NcNodeCard, used for the aria-details of the apporder */\n\t\tconst elementIdAppOrderChanged = 'theming-apporder-changed-infocard'\n\n\t\t/** ID of the \"you can not change the default app\" NcNodeCard, used for the aria-details of the apporder */\n\t\tconst elementIdEnforcedDefaultApp = 'theming-apporder-changed-infocard'\n\n\t\t/**\n\t\t * The aria-details value of the app order selector\n\t\t * contains the space separated list of element ids of NcNoteCards\n\t\t */\n\t\tconst ariaDetailsAppOrder = computed(() => (hasAppOrderChanged.value ? `${elementIdAppOrderChanged} ` : '') + (enforcedDefaultApp ? elementIdEnforcedDefaultApp : ''))\n\n\t\t/**\n\t\t * The current apporder (sorted by user)\n\t\t */\n\t\tconst appOrder = ref([...initialAppOrder])\n\n\t\t/**\n\t\t * Update the app order, called when the user sorts entries\n\t\t * @param value The new app order value\n\t\t */\n\t\tconst updateAppOrder = (value: IApp[]) => {\n\t\t\tconst order: IAppOrder = {}\n\t\t\tvalue.forEach(({ app, id }, index) => {\n\t\t\t\torder[id] = { order: index, app }\n\t\t\t})\n\n\t\t\tsaveSetting('apporder', order)\n\t\t\t\t.then(() => {\n\t\t\t\t\tappOrder.value = value as never\n\t\t\t\t\thasCustomAppOrder.value = true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tconsole.warn('Could not set the app order', error)\n\t\t\t\t\tshowError(t('theming', 'Could not set the app order'))\n\t\t\t\t})\n\t\t}\n\n\t\t/**\n\t\t * Reset the app order to the default\n\t\t */\n\t\tconst resetAppOrder = async () => {\n\t\t\ttry {\n\t\t\t\tawait saveSetting('apporder', [])\n\t\t\t\thasCustomAppOrder.value = false\n\n\t\t\t\t// Reset our app order list\n\t\t\t\tconst { data } = await axios.get<IOCSResponse<INavigationEntry[]>>(generateOcsUrl('/core/navigation/apps'), {\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'OCS-APIRequest': 'true',\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tappOrder.value = data.ocs.data.map((app) => ({ ...app, label: app.name, default: app.default && app.app === enforcedDefaultApp }))\n\t\t\t} catch (error) {\n\t\t\t\tconsole.warn(error)\n\t\t\t\tshowError(t('theming', 'Could not reset the app order'))\n\t\t\t}\n\t\t}\n\n\t\tconst saveSetting = async (key: string, value: unknown) => {\n\t\t\tconst url = generateOcsUrl('apps/provisioning_api/api/v1/config/users/{appId}/{configKey}', {\n\t\t\t\tappId: 'core',\n\t\t\t\tconfigKey: key,\n\t\t\t})\n\t\t\treturn await axios.post(url, {\n\t\t\t\tconfigValue: JSON.stringify(value),\n\t\t\t})\n\t\t}\n\n\t\treturn {\n\t\t\tappOrder,\n\t\t\tupdateAppOrder,\n\t\t\tresetAppOrder,\n\n\t\t\tenforcedDefaultApp,\n\t\t\thasAppOrderChanged,\n\t\t\thasCustomAppOrder,\n\n\t\t\tariaDetailsAppOrder,\n\t\t\telementIdAppOrderChanged,\n\t\t\telementIdEnforcedDefaultApp,\n\n\t\t\tt,\n\t\t}\n\t},\n})\n</script>\n\n<style scoped lang=\"scss\">\n.user-app-menu-order {\n\tmargin-block: 12px;\n}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div class=\"primary-color__wrapper\">\n\t\t<NcColorPicker v-model=\"primaryColor\"\n\t\t\tdata-user-theming-primary-color\n\t\t\t@update:value=\"debouncedOnUpdate\">\n\t\t\t<button ref=\"trigger\"\n\t\t\t\tclass=\"color-container primary-color__trigger\"\n\t\t\t\t:style=\"{ 'background-color': primaryColor }\"\n\t\t\t\tdata-user-theming-primary-color-trigger>\n\t\t\t\t{{ t('theming', 'Primary color') }}\n\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t<IconColorPalette v-else :size=\"20\" />\n\t\t\t</button>\n\t\t</NcColorPicker>\n\t\t<NcButton type=\"tertiary\" :disabled=\"isdefaultPrimaryColor\" @click=\"onReset\">\n\t\t\t<template #icon>\n\t\t\t\t<IconUndo :size=\"20\" />\n\t\t\t</template>\n\t\t\t{{ t('theming', 'Reset primary color') }}\n\t\t</NcButton>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport { showError } from '@nextcloud/dialogs'\nimport { loadState } from '@nextcloud/initial-state'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { colord } from 'colord'\nimport { debounce } from 'debounce'\nimport { defineComponent } from 'vue'\n\nimport axios from '@nextcloud/axios'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\nimport NcColorPicker from '@nextcloud/vue/dist/Components/NcColorPicker.js'\nimport NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'\nimport IconColorPalette from 'vue-material-design-icons/Palette.vue'\nimport IconUndo from 'vue-material-design-icons/UndoVariant.vue'\n\nconst { primaryColor, defaultPrimaryColor } = loadState('theming', 'data', { primaryColor: '#0082c9', defaultPrimaryColor: '#0082c9' })\n\nexport default defineComponent({\n\tname: 'UserPrimaryColor',\n\n\tcomponents: {\n\t\tIconColorPalette,\n\t\tIconUndo,\n\t\tNcButton,\n\t\tNcColorPicker,\n\t\tNcLoadingIcon,\n\t},\n\n\temits: ['refresh-styles'],\n\n\tdata() {\n\t\treturn {\n\t\t\tprimaryColor,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tisdefaultPrimaryColor() {\n\t\t\treturn colord(this.primaryColor).isEqual(colord(defaultPrimaryColor))\n\t\t},\n\n\t\tdebouncedOnUpdate() {\n\t\t\treturn debounce(this.onUpdate, 500)\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Global styles are reloaded so we might need to update the current value\n\t\t */\n\t\treload() {\n\t\t\tconst trigger = this.$refs.trigger as HTMLButtonElement\n\t\t\tconst newColor = window.getComputedStyle(trigger).backgroundColor\n\t\t\tif (newColor.toLowerCase() !== this.primaryColor) {\n\t\t\t\tthis.primaryColor = newColor\n\t\t\t}\n\t\t},\n\n\t\tonReset() {\n\t\t\tthis.primaryColor = defaultPrimaryColor\n\t\t\tthis.onUpdate(null)\n\t\t},\n\n\t\tasync onUpdate(value: string | null) {\n\t\t\tthis.loading = true\n\t\t\tconst url = generateOcsUrl('apps/provisioning_api/api/v1/config/users/{appId}/{configKey}', {\n\t\t\t\tappId: 'theming',\n\t\t\t\tconfigKey: 'primary_color',\n\t\t\t})\n\t\t\ttry {\n\t\t\t\tif (value) {\n\t\t\t\t\tawait axios.post(url, {\n\t\t\t\t\t\tconfigValue: value,\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tawait axios.delete(url)\n\t\t\t\t}\n\t\t\t\tthis.$emit('refresh-styles')\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error('Could not update primary color', e)\n\t\t\t\tshowError(t('theming', 'Could not set primary color'))\n\t\t\t}\n\t\t\tthis.loading = false\n\t\t},\n\t},\n})\n</script>\n\n<style scoped lang=\"scss\">\n.primary-color {\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 12px;\n\t}\n\n\t&__trigger {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tgap: 8px;\n\n\t\tbackground-color: var(--color-primary);\n\t\tcolor: var(--color-primary-text);\n\t\twidth: 350px;\n\t\tmax-width: 100vw;\n\t\theight: 96px;\n\n\t\tword-wrap: break-word;\n\t\thyphens: auto;\n\n\t\tborder: 2px solid var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\t&:active {\n\t\t\tbackground-color: var(--color-primary-hover) !important;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:focus-visible {\n\t\t\tborder-color: var(--color-main-background) !important;\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t}\n\t}\n}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<section>\n\t\t<NcSettingsSection :name=\"t('theming', 'Appearance and accessibility settings')\"\n\t\t\t:limit-width=\"false\"\n\t\t\tclass=\"theming\">\n\t\t\t<!-- eslint-disable-next-line vue/no-v-html -->\n\t\t\t<p v-html=\"description\" />\n\t\t\t<!-- eslint-disable-next-line vue/no-v-html -->\n\t\t\t<p v-html=\"descriptionDetail\" />\n\n\t\t\t<div class=\"theming__preview-list\">\n\t\t\t\t<ItemPreview v-for=\"theme in themes\"\n\t\t\t\t\t:key=\"theme.id\"\n\t\t\t\t\t:enforced=\"theme.id === enforceTheme\"\n\t\t\t\t\t:selected=\"selectedTheme.id === theme.id\"\n\t\t\t\t\t:theme=\"theme\"\n\t\t\t\t\t:unique=\"themes.length === 1\"\n\t\t\t\t\ttype=\"theme\"\n\t\t\t\t\t@change=\"changeTheme\" />\n\t\t\t</div>\n\n\t\t\t<div class=\"theming__preview-list\">\n\t\t\t\t<ItemPreview v-for=\"theme in fonts\"\n\t\t\t\t\t:key=\"theme.id\"\n\t\t\t\t\t:selected=\"theme.enabled\"\n\t\t\t\t\t:theme=\"theme\"\n\t\t\t\t\t:unique=\"fonts.length === 1\"\n\t\t\t\t\ttype=\"font\"\n\t\t\t\t\t@change=\"changeFont\" />\n\t\t\t</div>\n\t\t</NcSettingsSection>\n\n\t\t<NcSettingsSection :name=\"t('theming', 'Primary color')\"\n\t\t\t:description=\"isUserThemingDisabled\n\t\t\t\t? t('theming', 'Customization has been disabled by your administrator')\n\t\t\t\t: t('theming', 'Set a primary color to highlight important elements. The color used for elements such as primary buttons might differ a bit as it gets adjusted to fulfill accessibility requirements.')\">\n\t\t\t<UserPrimaryColor v-if=\"!isUserThemingDisabled\"\n\t\t\t\tref=\"primaryColor\"\n\t\t\t\t@refresh-styles=\"refreshGlobalStyles\" />\n\t\t</NcSettingsSection>\n\n\t\t<NcSettingsSection class=\"background\"\n\t\t\t:name=\"t('theming', 'Background and color')\"\n\t\t\t:description=\"isUserThemingDisabled\n\t\t\t\t? t('theming', 'Customization has been disabled by your administrator')\n\t\t\t\t: t('theming', 'The background can be set to an image from the default set, a custom uploaded image, or a plain color.')\">\n\t\t\t<BackgroundSettings v-if=\"!isUserThemingDisabled\"\n\t\t\t\tclass=\"background__grid\"\n\t\t\t\t@update:background=\"refreshGlobalStyles\" />\n\t\t</NcSettingsSection>\n\n\t\t<NcSettingsSection :name=\"t('theming', 'Keyboard shortcuts')\"\n\t\t\t:description=\"t('theming', 'In some cases keyboard shortcuts can interfere with accessibility tools. In order to allow focusing on your tool correctly you can disable all keyboard shortcuts here. This will also disable all available shortcuts in apps.')\">\n\t\t\t<NcCheckboxRadioSwitch class=\"theming__preview-toggle\"\n\t\t\t\t:checked.sync=\"shortcutsDisabled\"\n\t\t\t\ttype=\"switch\"\n\t\t\t\t@change=\"changeShortcutsDisabled\">\n\t\t\t\t{{ t('theming', 'Disable all keyboard shortcuts') }}\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t</NcSettingsSection>\n\n\t\t<UserAppMenuSection />\n\t</section>\n</template>\n\n<script>\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { loadState } from '@nextcloud/initial-state'\nimport { refreshStyles } from './helpers/refreshStyles'\n\nimport axios from '@nextcloud/axios'\n\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'\nimport NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'\n\nimport BackgroundSettings from './components/BackgroundSettings.vue'\nimport ItemPreview from './components/ItemPreview.vue'\nimport UserAppMenuSection from './components/UserAppMenuSection.vue'\nimport UserPrimaryColor from './components/UserPrimaryColor.vue'\n\nconst availableThemes = loadState('theming', 'themes', [])\nconst enforceTheme = loadState('theming', 'enforceTheme', '')\nconst shortcutsDisabled = loadState('theming', 'shortcutsDisabled', false)\n\nconst isUserThemingDisabled = loadState('theming', 'isUserThemingDisabled')\n\nexport default {\n\tname: 'UserTheming',\n\n\tcomponents: {\n\t\tItemPreview,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcSettingsSection,\n\t\tBackgroundSettings,\n\t\tUserAppMenuSection,\n\t\tUserPrimaryColor,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tavailableThemes,\n\n\t\t\t// Admin defined configs\n\t\t\tenforceTheme,\n\t\t\tshortcutsDisabled,\n\t\t\tisUserThemingDisabled,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tthemes() {\n\t\t\treturn this.availableThemes.filter(theme => theme.type === 1)\n\t\t},\n\n\t\tfonts() {\n\t\t\treturn this.availableThemes.filter(theme => theme.type === 2)\n\t\t},\n\n\t\t// Selected theme, fallback on first (default) if none\n\t\tselectedTheme() {\n\t\t\treturn this.themes.find(theme => theme.enabled === true) || this.themes[0]\n\t\t},\n\n\t\tdescription() {\n\t\t\t// using the `t` replace method escape html, we have to do it manually :/\n\t\t\treturn t(\n\t\t\t\t'theming',\n\t\t\t\t'Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level.',\n\t\t\t)\n\t\t\t\t.replace('{guidelines}', this.guidelinesLink)\n\t\t\t\t.replace('{linkend}', '</a>')\n\t\t},\n\n\t\tguidelinesLink() {\n\t\t\treturn '<a target=\"_blank\" href=\"https://www.w3.org/WAI/standards-guidelines/wcag/\" rel=\"noreferrer nofollow\">'\n\t\t},\n\n\t\tdescriptionDetail() {\n\t\t\treturn t(\n\t\t\t\t'theming',\n\t\t\t\t'If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!',\n\t\t\t)\n\t\t\t\t.replace('{issuetracker}', this.issuetrackerLink)\n\t\t\t\t.replace('{designteam}', this.designteamLink)\n\t\t\t\t.replace(/\\{linkend\\}/g, '</a>')\n\t\t},\n\n\t\tissuetrackerLink() {\n\t\t\treturn '<a target=\"_blank\" href=\"https://github.com/nextcloud/server/issues/\" rel=\"noreferrer nofollow\">'\n\t\t},\n\n\t\tdesignteamLink() {\n\t\t\treturn '<a target=\"_blank\" href=\"https://nextcloud.com/design\" rel=\"noreferrer nofollow\">'\n\t\t},\n\t},\n\n\twatch: {\n\t\tshortcutsDisabled(newState) {\n\t\t\tthis.changeShortcutsDisabled(newState)\n\t\t},\n\t},\n\n\tmethods: {\n\t\t// Refresh server-side generated theming CSS\n\t\tasync refreshGlobalStyles() {\n\t\t\tawait refreshStyles()\n\t\t\tthis.$nextTick(() => this.$refs.primaryColor.reload())\n\t\t},\n\n\t\tchangeTheme({ enabled, id }) {\n\t\t\t// Reset selected and select new one\n\t\t\tthis.themes.forEach(theme => {\n\t\t\t\tif (theme.id === id && enabled) {\n\t\t\t\t\ttheme.enabled = true\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\ttheme.enabled = false\n\t\t\t})\n\n\t\t\tthis.updateBodyAttributes()\n\t\t\tthis.selectItem(enabled, id)\n\t\t},\n\n\t\tchangeFont({ enabled, id }) {\n\t\t\t// Reset selected and select new one\n\t\t\tthis.fonts.forEach(font => {\n\t\t\t\tif (font.id === id && enabled) {\n\t\t\t\t\tfont.enabled = true\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tfont.enabled = false\n\t\t\t})\n\n\t\t\tthis.updateBodyAttributes()\n\t\t\tthis.selectItem(enabled, id)\n\t\t},\n\n\t\tasync changeShortcutsDisabled(newState) {\n\t\t\tif (newState) {\n\t\t\t\tawait axios({\n\t\t\t\t\turl: generateOcsUrl('apps/provisioning_api/api/v1/config/users/{appId}/{configKey}', {\n\t\t\t\t\t\tappId: 'theming',\n\t\t\t\t\t\tconfigKey: 'shortcuts_disabled',\n\t\t\t\t\t}),\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tconfigValue: 'yes',\n\t\t\t\t\t},\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tawait axios({\n\t\t\t\t\turl: generateOcsUrl('apps/provisioning_api/api/v1/config/users/{appId}/{configKey}', {\n\t\t\t\t\t\tappId: 'theming',\n\t\t\t\t\t\tconfigKey: 'shortcuts_disabled',\n\t\t\t\t\t}),\n\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\n\t\tupdateBodyAttributes() {\n\t\t\tconst enabledThemesIDs = this.themes.filter(theme => theme.enabled === true).map(theme => theme.id)\n\t\t\tconst enabledFontsIDs = this.fonts.filter(font => font.enabled === true).map(font => font.id)\n\n\t\t\tthis.themes.forEach(theme => {\n\t\t\t\tdocument.body.toggleAttribute(`data-theme-${theme.id}`, theme.enabled)\n\t\t\t})\n\t\t\tthis.fonts.forEach(font => {\n\t\t\t\tdocument.body.toggleAttribute(`data-theme-${font.id}`, font.enabled)\n\t\t\t})\n\n\t\t\tdocument.body.setAttribute('data-themes', [...enabledThemesIDs, ...enabledFontsIDs].join(','))\n\t\t},\n\n\t\t/**\n\t\t * Commit a change and force reload css\n\t\t * Fetching the file again will trigger the server update\n\t\t *\n\t\t * @param {boolean} enabled the theme state\n\t\t * @param {string} themeId the theme ID to change\n\t\t */\n\t\tasync selectItem(enabled, themeId) {\n\t\t\ttry {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tawait axios({\n\t\t\t\t\t\turl: generateOcsUrl('apps/theming/api/v1/theme/{themeId}/enable', { themeId }),\n\t\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tawait axios({\n\t\t\t\t\t\turl: generateOcsUrl('apps/theming/api/v1/theme/{themeId}', { themeId }),\n\t\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(err, err.response)\n\t\t\t\tOC.Notification.showTemporary(t('theming', err.response.data.ocs.meta.message + '. Unable to apply the setting.'))\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.theming {\n\t// Limit width of settings sections for readability\n\tp {\n\t\tmax-width: 800px;\n\t}\n\n\t// Proper highlight for links and focus feedback\n\t&::v-deep a {\n\t\tfont-weight: bold;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t}\n\n\t&__preview-list {\n\t\t--gap: 30px;\n\n\t\tdisplay: grid;\n\t\tmargin-top: var(--gap);\n\t\tcolumn-gap: var(--gap);\n\t\trow-gap: var(--gap);\n\t\tgrid-template-columns: 1fr 1fr;\n\t}\n}\n\n.background {\n\t&__grid {\n\t\tmargin-top: 30px;\n\t}\n}\n\n@media (max-width: 1440px) {\n\t.theming__preview-list {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport Vue from 'vue'\n\nimport { refreshStyles } from './helpers/refreshStyles.js'\nimport App from './UserTheming.vue'\n\nVue.prototype.OC = OC\nVue.prototype.t = t\n\nconst View = Vue.extend(App)\nconst theming = new View()\ntheming.$mount('#theming')\ntheming.$on('update:background', refreshStyles)\n"],"names":["exports","defer","resolve","reject","promise","_resolve","_reject","hexToRgb","hex","m","s","rgbToHex","r","g","b","rgbToHsl","max","min","h","l","d","hslToRgb","hue2rgb","p","q","t","rgbToXyz","x","y","z","xyzToCIELab","REF_X","REF_Y","REF_Z","L","a","rgbToCIELab","_a","deltaE94","lab1","lab2","WEIGHT_L","WEIGHT_C","WEIGHT_H","L1","a1","b1","L2","a2","b2","dL","da","db","xC1","xC2","xDL","xDC","xDE","xDH","xSC","xSH","rgbDiff","rgb1","rgb2","hexDiff","hex1","hex2","getColorDiffStatus","getColorIndex","baseEach","require$$0","baseFilter","collection","predicate","result","value","index","_baseFilter","arrayFilter","require$$1","baseIteratee","require$$2","isArray","require$$3","filter","func","filter_1","color","util_1","Swatch","rgb","population","colors","f","__importDefault","this","mod","builder","vibrant_1","clone","Builder","src","opts","n","i","imageClass","generator","quantizer","cb","vbox","VBox","r1","r2","g1","g2","hist","pixels","shouldIgnore","hn","rmax","rmin","gmax","gmin","bmax","bmin","offset","c","ntot","mult","rsum","gsum","bsum","count","rw","gw","bw","maxw","accSum","sum","total","maxd","splitPoint","reverseSum","doCut","dim1","dim2","d1","d2","vbox1","vbox2","left","right","c2","pqueue","PQueue","comparator","item","mapper","mmcq","color_1","vbox_1","pqueue_1","fractByPopulations","_splitBoxes","pq","target","lastSize","MMCQ","pq2","generateSwatches","swatches","v","mmcq_1","baseRest","eq","isIterateeCall","keysIn","objectProto","hasOwnProperty","defaults","object","sources","length","guard","source","props","propsIndex","propsLength","key","defaults_1","_default","DefaultOpts","_findMaxPopulation","_isAlreadySelected","palette","_createComparisonValue","saturation","targetSaturation","luma","targetLuma","maxPopulation","weightedMean","values","_i","weightSum","weight","invertDiff","targetValue","_findColorVariation","minLuma","maxLuma","minSaturation","maxSaturation","maxValue","swatch","_generateVariationColors","_generateEmptySwatches","_b","_c","_d","_e","_f","_g","_h","_j","DefaultGenerator","default_1","defaultFilter","combineFilters","filters","__createBinding","o","k","k2","__setModuleDefault","__importStar","vibrant","builder_1","Util","Quantizer","Generator","require$$4","Filters","require$$5","require$$6","Vibrant","_src","image","imageData","_this","err","base","ImageBase","width","height","ratio","maxSide","root","freeExports","freeModule","module","freeGlobal","global","punycode","maxInt","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexPunycode","regexNonASCII","regexSeparators","errors","baseMinusTMin","floor","stringFromCharCode","error","type","map","array","fn","mapDomain","string","parts","labels","encoded","ucs2decode","output","counter","extra","ucs2encode","basicToDigit","codePoint","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","decode","input","inputLength","out","bias","basic","j","oldi","w","baseMinusT","encode","handledCPCount","basicLength","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","toASCII","obj","prop","qs","sep","options","regexp","maxKeys","len","idx","kstr","vstr","xs","stringifyPrimitive","name","objectKeys","ks","res","parse","stringify","qsEscape","qsUnescape","api","util$1","arg","util","urlParse","resolve$1","urlResolve","resolveObject","urlResolveObject","format","urlFormat","Url_1","Url","protocolPattern","portPattern","simplePathPattern","delims","unwise","autoEscape","nonHostChars","hostEndingChars","hostnameMaxLen","hostnamePartPattern","hostnamePartStart","unsafeProtocol","hostlessProtocol","slashedProtocol","querystring","url","parseQueryString","slashesDenoteHost","u","queryIndex","splitter","uSplit","slashRegex","rest","simplePath","proto","lowerProto","slashes","hostEnd","hec","auth","atSign","ipv6Hostname","hostparts","part","newpart","validParts","notHost","bit","ae","esc","hash","qm","protocol","pathname","host","query","search","match","relative","rel","tkeys","tk","tkey","rkeys","rk","rkey","keys","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","authInHost","last","hasTrailingSlash","up","isAbsolute","port","normalizeArray","allowAboveRoot","resolvedPath","resolvedAbsolute","path","_globalThis","Object","get","_global","formatImport","parseImport","resolveImport","UrlImport","URL","URLSearchParams","percentRegEx","backslashRegEx","newlineRegEx","carriageReturnRegEx","tabRegEx","CHAR_FORWARD_SLASH","isURLInstance","instance","resolved","getPathFromURLPosix","third","encodePathChars","filepath","domainToASCII","domain","domainToUnicode","pathToFileURL","outURL","filePathLast","fileURLToPath","formatImportWithOverloads","urlObject","_options$auth","_options$fragment","_options$search","fragment","parsed","__extends","extendStatics","__","browser","base_1","isRelativeUrl","isSameOrigin","ua","ub","BrowserImage","_super","img","canvas","context","onImageLoad","e","targetWidth","targetHeight","browser_1","shippedBackgroundList","loadState","backgroundImage","defaultBackgroundImage","defaultBackgroundColor","defaultBackgroundMime","defaultShippedBackground","prefixWithBaseUrl","generateFilePath","__default__","Check","ColorPalette","ImageEdit","NcColorPicker","background","fileName","red","green","blue","data","axios","generateUrl","shipped","debounce","args","getFilePickerBuilder","nodes","showError","response","fileUrl","generateRemoteUrl","getCurrentUser","blobUrl","_sfc_main","NcCheckboxRadioSwitch","checked","_sfc_main$2","defineComponent","AppOrderSelector","IconUndo","NcButton","NcNoteCard","NcSettingsSection","userAppOrder","enforcedDefaultApp","initialAppOrder","app","hasCustomAppOrder","ref","hasAppOrderChanged","computed","id","appOrder","elementIdAppOrderChanged","elementIdEnforcedDefaultApp","ariaDetailsAppOrder","updateAppOrder","order","saveSetting","resetAppOrder","generateOcsUrl","primaryColor","defaultPrimaryColor","_sfc_main$1","IconColorPalette","NcLoadingIcon","colord","trigger","newColor","availableThemes","enforceTheme","shortcutsDisabled","isUserThemingDisabled","ItemPreview","BackgroundSettings","UserAppMenuSection","UserPrimaryColor","theme","newState","refreshStyles","enabled","font","enabledThemesIDs","enabledFontsIDs","themeId","Vue","View","App","theming"],"mappings":";yiCACA,OAAO,eAAcA,EAAU,aAAc,CAAE,MAAO,EAAI,CAAE,EAC5DA,EAAA,cAAwBA,qBAA6BA,EAAkB,QAAAA,EAAA,QAAkBA,EAAmB,SAAAA,EAAA,YAAsBA,cAAsBA,EAAmB,SAAAA,EAAA,SAAmBA,EAAmB,SAAAA,EAAA,SAAmBA,WAAmBA,EAAgB,MAAAA,EAAA,OAAiBA,UAAkBA,EAA+B,qBAAA,OACzUA,EAA+B,qBAAA,CAC3B,GAAI,EACJ,QAAS,EACT,MAAO,EACP,KAAM,GACN,QAAS,EACb,EACAA,EAAA,QAAkB,EAClBA,EAAA,OAAiB,EAAIA,EAAQ,QAC7B,SAASC,GAAQ,CACb,IAAIC,EACAC,EAEAC,EAAU,IAAI,QAAQ,SAAUC,EAAUC,EAAS,CACnDJ,EAAUG,EACVF,EAASG,CACjB,CAAK,EAED,MAAO,CAAE,QAASJ,EAAS,OAAQC,EAAQ,QAASC,EACvD,CACDJ,EAAA,MAAgBC,EAChB,SAASM,EAASC,EAAK,CACnB,IAAIC,EAAI,4CAA4C,KAAKD,CAAG,EAC5D,OAAOC,IAAM,KAAO,KAAO,CAACA,EAAE,CAAC,EAAGA,EAAE,CAAC,EAAGA,EAAE,CAAC,CAAC,EAAE,IAAI,SAAUC,EAAG,CAAE,OAA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