{"version":3,"sources":["jdenticon.js"],"names":["umdGlobal","factory","jdenticon","module","define","self","constructor","SvgElement","element","iconSize","Math","min","Number","getAttribute","_el","firstChild","removeChild","setAttribute","SvgWriter","_s","SvgRenderer","target","_pathsByColor","_target","SvgPath","dataString","CanvasRenderer","ctx","width","canvas","height","save","translate","_ctx","clearRect","Graphics","renderer","_renderer","_transform","NO_TRANSFORM","Transform","x","y","size","rotation","_x","_y","_size","_rotation","Point","parseHex","hash","startPosition","octets","parseInt","substr","decToHex","v","toString","hueToRgb","m1","m2","h","parseColor","color","test","length","r","g","b","a","result","toCss3Color","hexColor","isNaN","toFixed","correctedHsl","s","l","corrector","correctors","partialHex","getConfiguration","paddingOrLocalConfig","defaultPadding","lightness","configName","defaultRange","range","lightnessConfig","value","configObject","rootConfigurationHolder","ROOT_CONFIG_PROPERTY","GLOBAL","saturation","colorSaturation","grayscaleSaturation","backColor","padding","hue","hueFunction","originalHue","hueConfig","colorLightness","grayscaleLightness","iconPadding","getIdenticonType","el","tagName","ICON_TYPE_SVG","ICON_TYPE_CANVAS","observer","updateCallback","MutationObserver","observe","mutationObserver","onmutation","mutations","mutationIndex","mutation","addedNodes","addedNodeIndex","addedNode","nodeType","icons","querySelectorAll","ICON_SELECTOR","iconIndex","type","document","body","VALUE_ATTRIBUTE","HASH_ATTRIBUTE","centerShape","index","cell","positionIndex","k","m","w","inner","outer","addTriangle","addRectangle","addCircle","addPolygon","addRhombus","outerShape","colorTheme","config","iconGenerator","renderShape","colorIndex","shapes","rotationIndex","positions","shapeIndex","beginShape","availableColors","selectedColorIndexes","i","graphics","endShape","isDuplicate","values","indexOf","setBackground","push","finish","isValidHash","hashCandidate","computeHash","f","urlEncodedMessage","encodeURI","message","data","hashBuffer","c","d","e","blockStartIndex","hexHash","substring","charCodeAt","dataSize","BLOCK_SIZE_WORDS","shift","HASH_SIZE_HALF_BYTES","SvgElement_append","parentNode","name","keyValuePairs","createElementNS","appendChild","updateAll","documentQuerySelectorAll","update","hashOrValue","renderDomElement","iconType","getContext","rendererFactory","elements","hasAttribute","jdenticonJqueryPlugin","jdenticonStartup","replaceMode","bind","transformIconPoint","right","bottom","points","invert","di","transform","transformedPoints","p","splice","fillColor","fillStyle","fillRect","beginPath","fill","moveTo","lineTo","closePath","point","diameter","counterClockwise","radius","arc","PI","restore","svgRadius","svgDiameter","svgArc","sweepFlag","match","exec","opacity","_path","pathsByColor","hasOwnProperty","appendPath","configure","newConfiguration","arguments","drawIcon","Error","toSvg","writer","jQuery","setTimeout"],"mappings":"A;AA6BA,SAAA,CAAAA,CAAA,CAAAC,CAAA,CAAA,CACA,IAAAC,EAAAD,CAAA,CAAAD,CAAA,CAGA,YAAA,GAAA,MAAAG,OAAA,EAAA,SAAA,EAAAA,OAAA,CACAA,MAAA,QADA,CACAD,CADA,CAIA,UAAA,GAAA,MAAAE,OAAA,EAAAA,MAAA,IAAA,CACAA,MAAA,CAAA,EAAA,CAAA,QAAA,EAAA,CAAA,MAAAF,EAAA,CAAA,CADA,CAKAF,CAAA,UALA,CAKAE,CAbA,CAAA,CAAA,CAeA,WAAA,GAAA,MAAAG,KAAA,CAAAA,IAAA,CAAA,IAfA,CAeA,QAAA,CAAAL,CAAA,CAAA,CA4oCAM,QAJAC,EAIA,CAAAC,CAAA,CAAA,CAMA,IAAAC,EAAA,IAAAA,EAAAA,CAAAC,IAAAC,IAAA,CACAC,MAAA,CAAAJ,CAAAK,aAAA,CAAA,OAAA,CAAA,CADA,EACA,GADA,CAEAD,MAAA,CAAAJ,CAAAK,aAAA,CAAA,QAAA,CAAA,CAFA,EAEA,GAFA,CAOA,KAHA,IAAAC,EAGA,CAHAN,CAGA,CAAAA,CAAAO,WAAA,CAAA,CACAP,CAAAQ,YAAA,CAAAR,CAAAO,WAAA,CAIAP,EAAAS,aAAA,CAAA,SAAA,CAAA,MAAA,CAAAR,CAAA,CAAA,GAAA,CAAAA,CAAA,CACAD,EAAAS,aAAA,CAAA,qBAAA,CAAA,eAAA,CAnBA,CAjFA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oP,QAAA,CAAAC,CAAA,CAAA,CACAC,SAAAtL,OAAA,GACA0B,CAAA,CAAAC,CAAA,CADA,CACA0J,CADA,CAGA,OAAA3J,EAAA,CAAAC,CAAA,CAJA,CAgqCA3F,EAAA,SAAA,CAxXAuP,QAAA,CAAA9N,CAAA,CAAA4K,CAAA,CAAA5J,CAAA,CAAA2G,CAAA,CAAA,CACA,GAAA,CAAA3H,CAAA,CACA,KAAA+N,MAAA,CAAA,sBAAA,CAAA,CAGAnG,CAAA,CAAA,IAAA7H,CAAA,CAAAC,CAAA,CAAAgB,CAAA,CAAA,CACA+H,CAAA,CAAA6B,CAAA,CADA,EACA3B,CAAA,CAAA2B,CAAA,CADA,CAEAjD,CAFA,CALA,CAyXApJ,EAAA,MAAA,CA9LAyP,QAAA,CAAApD,CAAA,CAAA5J,CAAA,CAAA2G,CAAA,CAAA,CACAsG,CAAAA,CAAA,IAAA1O,CAAA,CAAAyB,CAAA,CACA4G,EAAA,CAAA,IAAAnI,CAAA,CAAAwO,CAAA,CAAA,CACAlF,CAAA,CAAA6B,CAAA,CADA,EACA3B,CAAA,CAAA2B,CAAA,CADA,CAEAjD,CAFA,CAGA,OAAAsG,EAAAlM,SAAA,EALA,CA+LAxD;CAAA,OAAA,CAAAoM,CACApM,EAAA,aAAA,CAAAoM,CACApM,EAAA,UAAA,CAAAoM,CAMApM,EAAA,QAAA,CAAA,OAMAA,EAAA,OAAA,CAAA,aAIA,EADA2P,CACA,CADA/J,CAAA,OACA,IACA+J,CAAA,GAAA,UADA,CACA/C,EADA,CAwBA,WAAA,GAAA,MAAAgD,WAAA,EACAA,UAAA,CAAA/C,EAAA,CAAA,CAAA,CAGA,OAAA7M,EAt1CA,CAfA","file":"jdenticon-3.0.1.min.js","sourcesContent":["/**\r\n * Jdenticon 3.0.1\r\n * http://jdenticon.com\r\n * \r\n * Built: 2020-08-03T16:58:18.496Z\r\n *\r\n * MIT License\r\n * \r\n * Copyright (c) 2014-2020 Daniel Mester Pirttijärvi\r\n * \r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n * \r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n * \r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\n(function (umdGlobal, factory) {\r\n var jdenticon = factory(umdGlobal);\r\n\r\n // Node.js\r\n if (typeof module !== \"undefined\" && \"exports\" in module) {\r\n module[\"exports\"] = jdenticon;\r\n }\r\n // RequireJS\r\n else if (typeof define === \"function\" && define[\"amd\"]) {\r\n define([], function () { return jdenticon; });\r\n }\r\n // No module loader\r\n else {\r\n umdGlobal[\"jdenticon\"] = jdenticon;\r\n }\r\n})(typeof self !== \"undefined\" ? self : this, function (umdGlobal) {\r\n'use strict';\n\n/**\r\n * Parses a substring of the hash as a number.\r\n * @param {number} startPosition \r\n * @param {number=} octets \r\n * @noinline\r\n */\r\nfunction parseHex(hash, startPosition, octets) {\r\n return parseInt(hash.substr(startPosition, octets), 16);\r\n}\n\nfunction decToHex(v) {\r\n v |= 0; // Ensure integer value\r\n return v < 0 ? \"00\" :\r\n v < 16 ? \"0\" + v.toString(16) :\r\n v < 256 ? v.toString(16) :\r\n \"ff\";\r\n}\r\n\r\nfunction hueToRgb(m1, m2, h) {\r\n h = h < 0 ? h + 6 : h > 6 ? h - 6 : h;\r\n return decToHex(255 * (\r\n h < 1 ? m1 + (m2 - m1) * h :\r\n h < 3 ? m2 :\r\n h < 4 ? m1 + (m2 - m1) * (4 - h) :\r\n m1));\r\n}\r\n\r\n/**\r\n * @param {string} color Color value to parse. Currently hexadecimal strings on the format #rgb[a] and #rrggbb[aa] are supported.\r\n */\r\nfunction parseColor(color) {\r\n if (/^#[0-9a-f]{3,8}$/i.test(color)) {\r\n let result;\r\n\r\n if (color.length < 6) {\r\n const r = color[1],\r\n g = color[2],\r\n b = color[3],\r\n a = color[4] || \"\";\r\n result = \"#\" + r + r + g + g + b + b + a + a;\r\n }\r\n if (color.length == 7 || color.length > 8) {\r\n result = color;\r\n }\r\n \r\n return result;\r\n }\r\n}\r\n\r\n/**\r\n * @param {string} hexColor Color on the format \"#RRGGBB\" or \"#RRGGBBAA\"\r\n */\r\nfunction toCss3Color(hexColor) {\r\n const a = parseHex(hexColor, 7, 2);\r\n let result;\r\n\r\n if (isNaN(a)) {\r\n result = hexColor;\r\n } else {\r\n const r = parseHex(hexColor, 1, 2),\r\n g = parseHex(hexColor, 3, 2),\r\n b = parseHex(hexColor, 5, 2);\r\n result = \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + (a / 255).toFixed(2) + \")\";\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * @param h Hue [0, 1]\r\n * @param s Saturation [0, 1]\r\n * @param l Lightness [0, 1]\r\n */\r\nfunction hsl(h, s, l) {\r\n // Based on http://www.w3.org/TR/2011/REC-css3-color-20110607/#hsl-color\r\n let result;\r\n\r\n if (s == 0) {\r\n const partialHex = decToHex(l * 255);\r\n result = partialHex + partialHex + partialHex;\r\n }\r\n else {\r\n const m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s,\r\n m1 = l * 2 - m2;\r\n result =\r\n hueToRgb(m1, m2, h * 6 + 2) +\r\n hueToRgb(m1, m2, h * 6) +\r\n hueToRgb(m1, m2, h * 6 - 2);\r\n }\r\n\r\n return \"#\" + result;\r\n}\r\n\r\n// This function will correct the lightness for the \"dark\" hues\r\nfunction correctedHsl(h, s, l) {\r\n // The corrector specifies the perceived middle lightness for each hue\r\n const correctors = [ 0.55, 0.5, 0.5, 0.46, 0.6, 0.55, 0.55 ],\r\n corrector = correctors[(h * 6 + 0.5) | 0];\r\n \r\n // Adjust the input lightness relative to the corrector\r\n l = l < 0.5 ? l * corrector * 2 : corrector + (l - 0.5) * (1 - corrector) * 2;\r\n \r\n return hsl(h, s, l);\r\n}\n\n/* global umdGlobal */\r\n\r\n// In the future we can replace `GLOBAL` with `globalThis`, but for now use the old school global detection for\r\n// backward compatibility.\r\nconst GLOBAL = umdGlobal;\n\n/**\r\n * @noinline\r\n */\r\nconst ROOT_CONFIG_PROPERTY = \"config\";\r\n\r\nvar rootConfigurationHolder = {};\r\n\r\n/**\r\n * Defines the deprecated `config` property on the root Jdenticon object without printing a warning in the console\r\n * when it is being used.\r\n * @param {!Object} rootObject \r\n */\r\nfunction defineConfigProperty(rootObject) {\r\n rootConfigurationHolder = rootObject;\r\n}\r\n\r\n/**\r\n * Sets a new icon style configuration. The new configuration is not merged with the previous one. * \r\n * @param {Object} newConfiguration - New configuration object.\r\n */\r\nfunction configure(newConfiguration) {\r\n if (arguments.length) {\r\n rootConfigurationHolder[ROOT_CONFIG_PROPERTY] = newConfiguration;\r\n }\r\n return rootConfigurationHolder[ROOT_CONFIG_PROPERTY];\r\n}\r\n\r\n/**\r\n * Gets the normalized current Jdenticon color configuration. Missing fields have default values.\r\n * @param {Object|number|undefined} paddingOrLocalConfig - Configuration passed to the called API method. A\r\n * local configuration overrides the global configuration in it entirety. This parameter can for backward\r\n * compatibility also contain a padding value. A padding value only overrides the global padding, not the\r\n * entire global configuration.\r\n * @param {number} defaultPadding - Padding used if no padding is specified in neither the configuration nor\r\n * explicitly to the API method.\r\n */\r\nfunction getConfiguration(paddingOrLocalConfig, defaultPadding) {\r\n const configObject = \r\n typeof paddingOrLocalConfig == \"object\" && paddingOrLocalConfig ||\r\n rootConfigurationHolder[ROOT_CONFIG_PROPERTY] ||\r\n GLOBAL[\"jdenticon_config\"] ||\r\n { },\r\n\r\n lightnessConfig = configObject[\"lightness\"] || { },\r\n \r\n // In versions < 2.1.0 there was no grayscale saturation -\r\n // saturation was the color saturation.\r\n saturation = configObject[\"saturation\"] || { },\r\n colorSaturation = \"color\" in saturation ? saturation[\"color\"] : saturation,\r\n grayscaleSaturation = saturation[\"grayscale\"],\r\n\r\n backColor = configObject[\"backColor\"],\r\n padding = configObject[\"padding\"];\r\n \r\n /**\r\n * Creates a lightness range.\r\n */\r\n function lightness(configName, defaultRange) {\r\n let range = lightnessConfig[configName];\r\n \r\n // Check if the lightness range is an array-like object. This way we ensure the\r\n // array contain two values at the same time.\r\n if (!(range && range.length > 1)) {\r\n range = defaultRange;\r\n }\r\n\r\n /**\r\n * Gets a lightness relative the specified value in the specified lightness range.\r\n */\r\n return function (value) {\r\n value = range[0] + value * (range[1] - range[0]);\r\n return value < 0 ? 0 : value > 1 ? 1 : value;\r\n };\r\n }\r\n\r\n /**\r\n * Gets a hue allowed by the configured hue restriction,\r\n * provided the originally computed hue.\r\n */\r\n function hueFunction(originalHue) {\r\n const hueConfig = configObject[\"hues\"];\r\n let hue;\r\n \r\n // Check if 'hues' is an array-like object. This way we also ensure that\r\n // the array is not empty, which would mean no hue restriction.\r\n if (hueConfig && hueConfig.length > 0) {\r\n // originalHue is in the range [0, 1]\r\n // Multiply with 0.999 to change the range to [0, 1) and then truncate the index.\r\n hue = hueConfig[0 | (0.999 * originalHue * hueConfig.length)];\r\n }\r\n\r\n return typeof hue == \"number\" ?\r\n \r\n // A hue was specified. We need to convert the hue from\r\n // degrees on any turn - e.g. 746° is a perfectly valid hue -\r\n // to turns in the range [0, 1).\r\n ((((hue / 360) % 1) + 1) % 1) :\r\n\r\n // No hue configured => use original hue\r\n originalHue;\r\n }\r\n \r\n return {\r\n hue: hueFunction,\r\n colorSaturation: typeof colorSaturation == \"number\" ? colorSaturation : 0.5,\r\n grayscaleSaturation: typeof grayscaleSaturation == \"number\" ? grayscaleSaturation : 0,\r\n colorLightness: lightness(\"color\", [0.4, 0.8]),\r\n grayscaleLightness: lightness(\"grayscale\", [0.3, 0.9]),\r\n backColor: parseColor(backColor),\r\n iconPadding: \r\n typeof paddingOrLocalConfig == \"number\" ? paddingOrLocalConfig : \r\n typeof padding == \"number\" ? padding : \r\n defaultPadding\r\n }\r\n}\n\nconst ICON_TYPE_SVG = 1;\r\n\r\nconst ICON_TYPE_CANVAS = 2;\r\n\r\n/**\r\n * @noinline\r\n */\r\nconst HASH_ATTRIBUTE = \"data-jdenticon-hash\";\r\n\r\n/**\r\n * @noinline\r\n */\r\nconst VALUE_ATTRIBUTE = \"data-jdenticon-value\";\r\n\r\n/**\r\n * @noinline\r\n */\r\nconst ICON_SELECTOR = \"[\" + HASH_ATTRIBUTE +\"],[\" + VALUE_ATTRIBUTE +\"]\";\r\n\r\nconst documentQuerySelectorAll = /** @type {!Function} */ (\r\n typeof document !== \"undefined\" && document.querySelectorAll.bind(document));\r\n\r\nfunction getIdenticonType(el) {\r\n if (el) {\r\n const tagName = el[\"tagName\"];\r\n\r\n if (/^svg$/i.test(tagName)) {\r\n return ICON_TYPE_SVG;\r\n }\r\n\r\n if (/^canvas$/i.test(tagName) && \"getContext\" in el) {\r\n return ICON_TYPE_CANVAS;\r\n }\r\n }\r\n}\n\nfunction observer(updateCallback) {\r\n if (typeof MutationObserver != \"undefined\") {\r\n const mutationObserver = new MutationObserver(function onmutation(mutations) {\r\n for (let mutationIndex = 0; mutationIndex < mutations.length; mutationIndex++) {\r\n const mutation = mutations[mutationIndex];\r\n const addedNodes = mutation.addedNodes;\r\n \r\n for (let addedNodeIndex = 0; addedNodes && addedNodeIndex < addedNodes.length; addedNodeIndex++) {\r\n const addedNode = addedNodes[addedNodeIndex];\r\n \r\n // Skip other types of nodes than element nodes, since they might not support\r\n // the querySelectorAll method => runtime error.\r\n if (addedNode.nodeType == 1) {\r\n if (getIdenticonType(addedNode)) {\r\n updateCallback(addedNode);\r\n }\r\n else {\r\n const icons = addedNode.querySelectorAll(ICON_SELECTOR);\r\n for (let iconIndex = 0; iconIndex < icons.length; iconIndex++) {\r\n updateCallback(icons[iconIndex]);\r\n }\r\n }\r\n }\r\n }\r\n \r\n if (mutation.type == \"attributes\" && getIdenticonType(mutation.target)) {\r\n updateCallback(mutation.target);\r\n }\r\n }\r\n });\r\n\r\n mutationObserver.observe(document.body, {\r\n \"childList\": true,\r\n \"attributes\": true,\r\n \"attributeFilter\": [VALUE_ATTRIBUTE, HASH_ATTRIBUTE, \"width\", \"height\"],\r\n \"subtree\": true,\r\n });\r\n }\r\n}\n\n/**\r\n * Represents a point.\r\n */\r\nclass Point {\r\n /**\r\n * @param {number} x \r\n * @param {number} y \r\n */\r\n constructor(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n}\n\n/**\r\n * Translates and rotates a point before being passed on to the canvas context. This was previously done by the canvas context itself, \r\n * but this caused a rendering issue in Chrome on sizes > 256 where the rotation transformation of inverted paths was not done properly.\r\n */\r\nclass Transform {\r\n /**\r\n * @param {number} x The x-coordinate of the upper left corner of the transformed rectangle.\r\n * @param {number} y The y-coordinate of the upper left corner of the transformed rectangle.\r\n * @param {number} size The size of the transformed rectangle.\r\n * @param {number} rotation Rotation specified as 0 = 0 rad, 1 = 0.5π rad, 2 = π rad, 3 = 1.5π rad\r\n */\r\n constructor(x, y, size, rotation) {\r\n this._x = x;\r\n this._y = y;\r\n this._size = size;\r\n this._rotation = rotation;\r\n }\r\n\r\n /**\r\n * Transforms the specified point based on the translation and rotation specification for this Transform.\r\n * @param {number} x x-coordinate\r\n * @param {number} y y-coordinate\r\n * @param {number=} w The width of the transformed rectangle. If greater than 0, this will ensure the returned point is of the upper left corner of the transformed rectangle.\r\n * @param {number=} h The height of the transformed rectangle. If greater than 0, this will ensure the returned point is of the upper left corner of the transformed rectangle.\r\n */\r\n transformIconPoint(x, y, w, h) {\r\n const right = this._x + this._size,\r\n bottom = this._y + this._size,\r\n rotation = this._rotation;\r\n return rotation === 1 ? new Point(right - y - (h || 0), this._y + x) :\r\n rotation === 2 ? new Point(right - x - (w || 0), bottom - y - (h || 0)) :\r\n rotation === 3 ? new Point(this._x + y, bottom - x - (w || 0)) :\r\n new Point(this._x + x, this._y + y);\r\n }\r\n}\r\n\r\nconst NO_TRANSFORM = new Transform(0, 0, 0, 0);\n\n/**\r\n * Provides helper functions for rendering common basic shapes.\r\n */\r\nclass Graphics {\r\n constructor(renderer) {\r\n this._renderer = renderer;\r\n this._transform = NO_TRANSFORM;\r\n }\r\n\r\n /**\r\n * Adds a polygon to the underlying renderer.\r\n * @param {Array} points The points of the polygon clockwise on the format [ x0, y0, x1, y1, ..., xn, yn ]\r\n * @param {boolean=} invert Specifies if the polygon will be inverted.\r\n */\r\n addPolygon(points, invert) {\r\n const di = invert ? -2 : 2, \r\n transform = this._transform,\r\n transformedPoints = [];\r\n \r\n for (let i = invert ? points.length - 2 : 0; i < points.length && i >= 0; i += di) {\r\n transformedPoints.push(transform.transformIconPoint(points[i], points[i + 1]));\r\n }\r\n \r\n this._renderer.addPolygon(transformedPoints);\r\n }\r\n \r\n /**\r\n * Adds a polygon to the underlying renderer.\r\n * Source: http://stackoverflow.com/a/2173084\r\n * @param {number} x The x-coordinate of the upper left corner of the rectangle holding the entire ellipse.\r\n * @param {number} y The y-coordinate of the upper left corner of the rectangle holding the entire ellipse.\r\n * @param {number} size The size of the ellipse.\r\n * @param {boolean=} invert Specifies if the ellipse will be inverted.\r\n */\r\n addCircle(x, y, size, invert) {\r\n const p = this._transform.transformIconPoint(x, y, size, size);\r\n this._renderer.addCircle(p, size, invert);\r\n }\r\n\r\n /**\r\n * Adds a rectangle to the underlying renderer.\r\n * @param {number} x The x-coordinate of the upper left corner of the rectangle.\r\n * @param {number} y The y-coordinate of the upper left corner of the rectangle.\r\n * @param {number} w The width of the rectangle.\r\n * @param {number} h The height of the rectangle.\r\n * @param {boolean=} invert Specifies if the rectangle will be inverted.\r\n */\r\n addRectangle(x, y, w, h, invert) {\r\n this.addPolygon([\r\n x, y, \r\n x + w, y,\r\n x + w, y + h,\r\n x, y + h\r\n ], invert);\r\n }\r\n\r\n /**\r\n * Adds a right triangle to the underlying renderer.\r\n * @param {number} x The x-coordinate of the upper left corner of the rectangle holding the triangle.\r\n * @param {number} y The y-coordinate of the upper left corner of the rectangle holding the triangle.\r\n * @param {number} w The width of the triangle.\r\n * @param {number} h The height of the triangle.\r\n * @param {number} r The rotation of the triangle (clockwise). 0 = right corner of the triangle in the lower left corner of the bounding rectangle.\r\n * @param {boolean=} invert Specifies if the triangle will be inverted.\r\n */\r\n addTriangle(x, y, w, h, r, invert) {\r\n const points = [\r\n x + w, y, \r\n x + w, y + h, \r\n x, y + h,\r\n x, y\r\n ];\r\n points.splice(((r || 0) % 4) * 2, 2);\r\n this.addPolygon(points, invert);\r\n }\r\n\r\n /**\r\n * Adds a rhombus to the underlying renderer.\r\n * @param {number} x The x-coordinate of the upper left corner of the rectangle holding the rhombus.\r\n * @param {number} y The y-coordinate of the upper left corner of the rectangle holding the rhombus.\r\n * @param {number} w The width of the rhombus.\r\n * @param {number} h The height of the rhombus.\r\n * @param {boolean=} invert Specifies if the rhombus will be inverted.\r\n */\r\n addRhombus(x, y, w, h, invert) {\r\n this.addPolygon([\r\n x + w / 2, y,\r\n x + w, y + h / 2,\r\n x + w / 2, y + h,\r\n x, y + h / 2\r\n ], invert);\r\n }\r\n}\n\n/**\r\n * @param {number} index\r\n * @param {Graphics} g\r\n * @param {number} cell\r\n * @param {number} positionIndex\r\n */\r\nfunction centerShape(index, g, cell, positionIndex) {\r\n index = index % 14;\r\n\r\n let k, m, w, h, inner, outer;\r\n\r\n !index ? (\r\n k = cell * 0.42,\r\n g.addPolygon([\r\n 0, 0,\r\n cell, 0,\r\n cell, cell - k * 2,\r\n cell - k, cell,\r\n 0, cell\r\n ])) :\r\n\r\n index == 1 ? (\r\n w = 0 | (cell * 0.5), \r\n h = 0 | (cell * 0.8),\r\n\r\n g.addTriangle(cell - w, 0, w, h, 2)) :\r\n\r\n index == 2 ? (\r\n w = 0 | (cell / 3),\r\n g.addRectangle(w, w, cell - w, cell - w)) :\r\n\r\n index == 3 ? (\r\n inner = cell * 0.1,\r\n // Use fixed outer border widths in small icons to ensure the border is drawn\r\n outer = \r\n cell < 6 ? 1 :\r\n cell < 8 ? 2 :\r\n (0 | (cell * 0.25)),\r\n \r\n inner = \r\n inner > 1 ? (0 | inner) : // large icon => truncate decimals\r\n inner > 0.5 ? 1 : // medium size icon => fixed width\r\n inner, // small icon => anti-aliased border\r\n\r\n g.addRectangle(outer, outer, cell - inner - outer, cell - inner - outer)) :\r\n\r\n index == 4 ? (\r\n m = 0 | (cell * 0.15),\r\n w = 0 | (cell * 0.5),\r\n g.addCircle(cell - w - m, cell - w - m, w)) :\r\n\r\n index == 5 ? (\r\n inner = cell * 0.1,\r\n outer = inner * 4,\r\n\r\n // Align edge to nearest pixel in large icons\r\n outer > 3 && (outer = 0 | outer),\r\n \r\n g.addRectangle(0, 0, cell, cell),\r\n g.addPolygon([\r\n outer, outer,\r\n cell - inner, outer,\r\n outer + (cell - outer - inner) / 2, cell - inner\r\n ], true)) :\r\n\r\n index == 6 ? \r\n g.addPolygon([\r\n 0, 0,\r\n cell, 0,\r\n cell, cell * 0.7,\r\n cell * 0.4, cell * 0.4,\r\n cell * 0.7, cell,\r\n 0, cell\r\n ]) :\r\n\r\n index == 7 ? \r\n g.addTriangle(cell / 2, cell / 2, cell / 2, cell / 2, 3) :\r\n\r\n index == 8 ? (\r\n g.addRectangle(0, 0, cell, cell / 2),\r\n g.addRectangle(0, cell / 2, cell / 2, cell / 2),\r\n g.addTriangle(cell / 2, cell / 2, cell / 2, cell / 2, 1)) :\r\n\r\n index == 9 ? (\r\n inner = cell * 0.14,\r\n // Use fixed outer border widths in small icons to ensure the border is drawn\r\n outer = \r\n cell < 4 ? 1 :\r\n cell < 6 ? 2 :\r\n (0 | (cell * 0.35)),\r\n\r\n inner = \r\n cell < 8 ? inner : // small icon => anti-aliased border\r\n (0 | inner), // large icon => truncate decimals\r\n\r\n g.addRectangle(0, 0, cell, cell),\r\n g.addRectangle(outer, outer, cell - outer - inner, cell - outer - inner, true)) :\r\n\r\n index == 10 ? (\r\n inner = cell * 0.12,\r\n outer = inner * 3,\r\n\r\n g.addRectangle(0, 0, cell, cell),\r\n g.addCircle(outer, outer, cell - inner - outer, true)) :\r\n\r\n index == 11 ? \r\n g.addTriangle(cell / 2, cell / 2, cell / 2, cell / 2, 3) :\r\n\r\n index == 12 ? (\r\n m = cell * 0.25,\r\n g.addRectangle(0, 0, cell, cell),\r\n g.addRhombus(m, m, cell - m, cell - m, true)) :\r\n\r\n // 13\r\n (\r\n !positionIndex && (\r\n m = cell * 0.4, w = cell * 1.2,\r\n g.addCircle(m, m, w)\r\n )\r\n );\r\n}\r\n\r\n/**\r\n * @param {number} index\r\n * @param {Graphics} g\r\n * @param {number} cell\r\n */\r\nfunction outerShape(index, g, cell) {\r\n index = index % 4;\r\n\r\n let m;\r\n\r\n !index ?\r\n g.addTriangle(0, 0, cell, cell, 0) :\r\n \r\n index == 1 ?\r\n g.addTriangle(0, cell / 2, cell, cell / 2, 0) :\r\n\r\n index == 2 ?\r\n g.addRhombus(0, 0, cell, cell) :\r\n\r\n // 3\r\n (\r\n m = cell / 6,\r\n g.addCircle(m, m, cell - 2 * m)\r\n );\r\n}\n\n/**\r\n * Gets a set of identicon color candidates for a specified hue and config.\r\n */\r\nfunction colorTheme(hue, config) {\r\n hue = config.hue(hue);\r\n return [\r\n // Dark gray\r\n correctedHsl(hue, config.grayscaleSaturation, config.grayscaleLightness(0)),\r\n // Mid color\r\n correctedHsl(hue, config.colorSaturation, config.colorLightness(0.5)),\r\n // Light gray\r\n correctedHsl(hue, config.grayscaleSaturation, config.grayscaleLightness(1)),\r\n // Light color\r\n correctedHsl(hue, config.colorSaturation, config.colorLightness(1)),\r\n // Dark color\r\n correctedHsl(hue, config.colorSaturation, config.colorLightness(0))\r\n ];\r\n}\n\n/**\r\n * Draws an identicon to a specified renderer.\r\n */\r\nfunction iconGenerator(renderer, hash, config) {\r\n config = getConfiguration(config, 0.08);\r\n\r\n // Set background color\r\n if (config.backColor) {\r\n renderer.setBackground(config.backColor);\r\n }\r\n \r\n // Calculate padding and round to nearest integer\r\n let size = renderer.iconSize;\r\n const padding = (0.5 + size * config.iconPadding) | 0;\r\n size -= padding * 2;\r\n \r\n const graphics = new Graphics(renderer);\r\n \r\n // Calculate cell size and ensure it is an integer\r\n const cell = 0 | (size / 4);\r\n \r\n // Since the cell size is integer based, the actual icon will be slightly smaller than specified => center icon\r\n const x = 0 | (padding + size / 2 - cell * 2);\r\n const y = 0 | (padding + size / 2 - cell * 2);\r\n\r\n function renderShape(colorIndex, shapes, index, rotationIndex, positions) {\r\n const shapeIndex = parseHex(hash, index, 1);\r\n let r = rotationIndex ? parseHex(hash, rotationIndex, 1) : 0;\r\n \r\n renderer.beginShape(availableColors[selectedColorIndexes[colorIndex]]);\r\n \r\n for (let i = 0; i < positions.length; i++) {\r\n graphics._transform = new Transform(x + positions[i][0] * cell, y + positions[i][1] * cell, cell, r++ % 4);\r\n shapes(shapeIndex, graphics, cell, i);\r\n }\r\n \r\n renderer.endShape();\r\n }\r\n\r\n // AVAILABLE COLORS\r\n const hue = parseHex(hash, -7) / 0xfffffff,\r\n \r\n // Available colors for this icon\r\n availableColors = colorTheme(hue, config),\r\n\r\n // The index of the selected colors\r\n selectedColorIndexes = [];\r\n\r\n let index;\r\n\r\n function isDuplicate(values) {\r\n if (values.indexOf(index) >= 0) {\r\n for (let i = 0; i < values.length; i++) {\r\n if (selectedColorIndexes.indexOf(values[i]) >= 0) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0; i < 3; i++) {\r\n index = parseHex(hash, 8 + i, 1) % availableColors.length;\r\n if (isDuplicate([0, 4]) || // Disallow dark gray and dark color combo\r\n isDuplicate([2, 3])) { // Disallow light gray and light color combo\r\n index = 1;\r\n }\r\n selectedColorIndexes.push(index);\r\n }\r\n\r\n // ACTUAL RENDERING\r\n // Sides\r\n renderShape(0, outerShape, 2, 3, [[1, 0], [2, 0], [2, 3], [1, 3], [0, 1], [3, 1], [3, 2], [0, 2]]);\r\n // Corners\r\n renderShape(1, outerShape, 4, 5, [[0, 0], [3, 0], [3, 3], [0, 3]]);\r\n // Center\r\n renderShape(2, centerShape, 1, null, [[1, 1], [2, 1], [2, 2], [1, 2]]);\r\n \r\n renderer.finish();\r\n}\n\n/**\r\n * Computes a SHA1 hash for any value and returns it as a hexadecimal string.\r\n * \r\n * This function is optimized for minimal code size and rather short messages.\r\n * \r\n * @param {string} message \r\n */\r\nfunction sha1(message) {\r\n const HASH_SIZE_HALF_BYTES = 40;\r\n const BLOCK_SIZE_WORDS = 16;\r\n\r\n // Variables\r\n // `var` is used to be able to minimize the number of `var` keywords.\r\n var i = 0,\r\n f = 0,\r\n \r\n // Use `encodeURI` to UTF8 encode the message without any additional libraries\r\n // We could use `unescape` + `encodeURI` to minimize the code, but that would be slightly risky\r\n // since `unescape` is deprecated.\r\n urlEncodedMessage = encodeURI(message) + \"%80\", // trailing '1' bit padding\r\n \r\n // This can be changed to a preallocated Uint32Array array for greater performance and larger code size\r\n data = [],\r\n dataSize,\r\n \r\n hashBuffer = [],\r\n\r\n a = 0x67452301,\r\n b = 0xefcdab89,\r\n c = ~a,\r\n d = ~b,\r\n e = 0xc3d2e1f0,\r\n hash = [a, b, c, d, e],\r\n\r\n blockStartIndex = 0,\r\n hexHash = \"\";\r\n\r\n /**\r\n * Rotates the value a specified number of bits to the left.\r\n * @param {number} value Value to rotate\r\n * @param {number} shift Bit count to shift.\r\n */\r\n function rotl(value, shift) {\r\n return (value << shift) | (value >>> (32 - shift));\r\n }\r\n\r\n // Message data\r\n for ( ; i < urlEncodedMessage.length; f++) {\r\n data[f >> 2] = data[f >> 2] |\r\n (\r\n (\r\n urlEncodedMessage[i] == \"%\"\r\n // Percent encoded byte\r\n ? parseInt(urlEncodedMessage.substring(i + 1, i += 3), 16)\r\n // Unencoded byte\r\n : urlEncodedMessage.charCodeAt(i++)\r\n )\r\n\r\n // Read bytes in reverse order (big endian words)\r\n << ((3 - (f & 3)) * 8)\r\n );\r\n }\r\n\r\n // f is now the length of the utf8 encoded message\r\n // 7 = 8 bytes (64 bit) for message size, -1 to round down\r\n // >> 6 = integer division with block size\r\n dataSize = (((f + 7) >> 6) + 1) * BLOCK_SIZE_WORDS;\r\n\r\n // Message size in bits.\r\n // SHA1 uses a 64 bit integer to represent the size, but since we only support short messages only the least\r\n // significant 32 bits are set. -8 is for the '1' bit padding byte.\r\n data[dataSize - 1] = f * 8 - 8;\r\n \r\n // Compute hash\r\n for ( ; blockStartIndex < dataSize; blockStartIndex += BLOCK_SIZE_WORDS) {\r\n for (i = 0; i < 80; i++) {\r\n f = rotl(a, 5) + e + (\r\n\t\t\t\t\t// Ch\r\n\t\t\t\t\ti < 20 ? ((b & c) ^ ((~b) & d)) + 0x5a827999 :\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Parity\r\n\t\t\t\t\ti < 40 ? (b ^ c ^ d) + 0x6ed9eba1 :\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Maj\r\n\t\t\t\t\ti < 60 ? ((b & c) ^ (b & d) ^ (c & d)) + 0x8f1bbcdc :\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Parity\r\n (b ^ c ^ d) + 0xca62c1d6\r\n\t\t\t\t) + ( \r\n hashBuffer[i] = i < BLOCK_SIZE_WORDS\r\n // Bitwise OR is used to coerse `undefined` to 0\r\n ? (data[blockStartIndex + i] | 0)\r\n : rotl(hashBuffer[i - 3] ^ hashBuffer[i - 8] ^ hashBuffer[i - 14] ^ hashBuffer[i - 16], 1)\r\n\t\t\t\t);\r\n\r\n e = d;\r\n d = c;\r\n c = rotl(b, 30);\r\n b = a;\r\n a = f;\r\n }\r\n\r\n hash[0] = a = ((hash[0] + a) | 0);\r\n hash[1] = b = ((hash[1] + b) | 0);\r\n hash[2] = c = ((hash[2] + c) | 0);\r\n hash[3] = d = ((hash[3] + d) | 0);\r\n hash[4] = e = ((hash[4] + e) | 0);\r\n }\r\n\r\n // Format hex hash\r\n for (i = 0; i < HASH_SIZE_HALF_BYTES; i++) {\r\n hexHash += (\r\n (\r\n // Get word (2^3 half-bytes per word)\r\n hash[i >> 3] >>>\r\n\r\n // Append half-bytes in reverse order\r\n ((7 - (i & 7)) * 4)\r\n ) \r\n // Clamp to half-byte\r\n & 0xf\r\n ).toString(16);\r\n }\r\n\r\n return hexHash;\r\n}\n\n/**\r\n * Inputs a value that might be a valid hash string for Jdenticon and returns it \r\n * if it is determined valid, otherwise a falsy value is returned.\r\n */\r\nfunction isValidHash(hashCandidate) {\r\n return /^[0-9a-f]{11,}$/i.test(hashCandidate) && hashCandidate;\r\n}\r\n\r\n/**\r\n * Computes a hash for the specified value. Currently SHA1 is used. This function\r\n * always returns a valid hash.\r\n */\r\nfunction computeHash(value) {\r\n return sha1(value == null ? \"\" : \"\" + value);\r\n}\n\n/**\r\n * Renderer redirecting drawing commands to a canvas context.\r\n */\r\nclass CanvasRenderer {\r\n /**\r\n * @param {number=} iconSize\r\n */\r\n constructor(ctx, iconSize) {\r\n const width = ctx.canvas.width,\r\n height = ctx.canvas.height;\r\n \r\n ctx.save();\r\n \r\n if (!iconSize) {\r\n iconSize = Math.min(width, height);\r\n \r\n ctx.translate(\r\n ((width - iconSize) / 2) | 0,\r\n ((height - iconSize) / 2) | 0);\r\n }\r\n\r\n this._ctx = ctx;\r\n this.iconSize = iconSize;\r\n \r\n ctx.clearRect(0, 0, iconSize, iconSize);\r\n }\r\n\r\n /**\r\n * Fills the background with the specified color.\r\n * @param {string} fillColor Fill color on the format #rrggbb[aa].\r\n */\r\n setBackground(fillColor) {\r\n const ctx = this._ctx,\r\n iconSize = this.iconSize;\r\n\r\n ctx.fillStyle = toCss3Color(fillColor);\r\n ctx.fillRect(0, 0, iconSize, iconSize);\r\n }\r\n\r\n /**\r\n * Marks the beginning of a new shape of the specified color. Should be ended with a call to endShape.\r\n * @param {string} fillColor Fill color on format #rrggbb[aa].\r\n */\r\n beginShape(fillColor) {\r\n const ctx = this._ctx;\r\n ctx.fillStyle = toCss3Color(fillColor);\r\n ctx.beginPath();\r\n }\r\n\r\n /**\r\n * Marks the end of the currently drawn shape. This causes the queued paths to be rendered on the canvas.\r\n */\r\n endShape() {\r\n this._ctx.fill();\r\n }\r\n\r\n /**\r\n * Adds a polygon to the rendering queue.\r\n * @param points An array of Point objects.\r\n */\r\n addPolygon(points) {\r\n const ctx = this._ctx;\r\n ctx.moveTo(points[0].x, points[0].y);\r\n for (let i = 1; i < points.length; i++) {\r\n ctx.lineTo(points[i].x, points[i].y);\r\n }\r\n ctx.closePath();\r\n }\r\n\r\n /**\r\n * Adds a circle to the rendering queue.\r\n * @param {Point} point The upper left corner of the circle bounding box.\r\n * @param {number} diameter The diameter of the circle.\r\n * @param {boolean} counterClockwise True if the circle is drawn counter-clockwise (will result in a hole if rendered on a clockwise path).\r\n */\r\n addCircle(point, diameter, counterClockwise) {\r\n const ctx = this._ctx,\r\n radius = diameter / 2;\r\n ctx.moveTo(point.x + radius, point.y + radius);\r\n ctx.arc(point.x + radius, point.y + radius, radius, 0, Math.PI * 2, counterClockwise);\r\n ctx.closePath();\r\n }\r\n\r\n /**\r\n * Called when the icon has been completely drawn.\r\n */\r\n finish() {\r\n this._ctx.restore();\r\n }\r\n}\n\n/**\r\n * Draws an identicon to a context.\r\n * @param {CanvasRenderingContext2D} ctx - Canvas context on which the icon will be drawn at location (0, 0).\r\n * @param {*} hashOrValue - A hexadecimal hash string or any value that will be hashed by Jdenticon.\r\n * @param {number} size - Icon size in pixels.\r\n * @param {Object|number=} config - Optional configuration. If specified, this configuration object overrides any\r\n * global configuration in its entirety. For backward compatibility a padding value in the range [0.0, 0.5) can be\r\n * specified in place of a configuration object.\r\n */\r\nfunction drawIcon(ctx, hashOrValue, size, config) {\r\n if (!ctx) {\r\n throw new Error(\"No canvas specified.\");\r\n }\r\n \r\n iconGenerator(new CanvasRenderer(ctx, size), \r\n isValidHash(hashOrValue) || computeHash(hashOrValue), \r\n config);\r\n}\n\n/**\r\n * Prepares a measure to be used as a measure in an SVG path, by\r\n * rounding the measure to a single decimal. This reduces the file\r\n * size of the generated SVG with more than 50% in some cases.\r\n */\r\nfunction svgValue(value) {\r\n return ((value * 10 + 0.5) | 0) / 10;\r\n}\r\n\r\n/**\r\n * Represents an SVG path element.\r\n */\r\nclass SvgPath {\r\n constructor() {\r\n /**\r\n * This property holds the data string (path.d) of the SVG path.\r\n */\r\n this.dataString = \"\";\r\n }\r\n\r\n /**\r\n * Adds a polygon with the current fill color to the SVG path.\r\n * @param points An array of Point objects.\r\n */\r\n addPolygon(points) {\r\n let dataString = \"\";\r\n for (let i = 0; i < points.length; i++) {\r\n dataString += (i ? \"L\" : \"M\") + svgValue(points[i].x) + \" \" + svgValue(points[i].y);\r\n }\r\n this.dataString += dataString + \"Z\";\r\n }\r\n\r\n /**\r\n * Adds a circle with the current fill color to the SVG path.\r\n * @param {Point} point The upper left corner of the circle bounding box.\r\n * @param {number} diameter The diameter of the circle.\r\n * @param {boolean} counterClockwise True if the circle is drawn counter-clockwise (will result in a hole if rendered on a clockwise path).\r\n */\r\n addCircle(point, diameter, counterClockwise) {\r\n const sweepFlag = counterClockwise ? 0 : 1,\r\n svgRadius = svgValue(diameter / 2),\r\n svgDiameter = svgValue(diameter),\r\n svgArc = \"a\" + svgRadius + \",\" + svgRadius + \" 0 1,\" + sweepFlag + \" \";\r\n \r\n this.dataString += \r\n \"M\" + svgValue(point.x) + \" \" + svgValue(point.y + diameter / 2) +\r\n svgArc + svgDiameter + \",0\" + \r\n svgArc + (-svgDiameter) + \",0\";\r\n }\r\n}\n\n/**\r\n * Renderer producing SVG output.\r\n */\r\nclass SvgRenderer {\r\n /**\r\n * @param {SvgElement|SvgWriter} target \r\n */\r\n constructor(target) {\r\n /**\r\n * @type {SvgPath}\r\n */\r\n this._path;\r\n this._pathsByColor = { };\r\n this._target = target;\r\n this.iconSize = target.iconSize;\r\n }\r\n\r\n /**\r\n * Fills the background with the specified color.\r\n * @param {string} fillColor Fill color on the format #rrggbb[aa].\r\n */\r\n setBackground(fillColor) {\r\n const match = /^(#......)(..)?/.exec(fillColor),\r\n opacity = match[2] ? parseHex(match[2], 0) / 255 : 1;\r\n this._target.setBackground(match[1], opacity);\r\n }\r\n\r\n /**\r\n * Marks the beginning of a new shape of the specified color. Should be ended with a call to endShape.\r\n * @param {string} color Fill color on format #xxxxxx.\r\n */\r\n beginShape(color) {\r\n this._path = this._pathsByColor[color] || (this._pathsByColor[color] = new SvgPath());\r\n }\r\n\r\n /**\r\n * Marks the end of the currently drawn shape.\r\n */\r\n endShape() { }\r\n\r\n /**\r\n * Adds a polygon with the current fill color to the SVG.\r\n * @param points An array of Point objects.\r\n */\r\n addPolygon(points) {\r\n this._path.addPolygon(points);\r\n }\r\n\r\n /**\r\n * Adds a circle with the current fill color to the SVG.\r\n * @param {Point} point The upper left corner of the circle bounding box.\r\n * @param {number} diameter The diameter of the circle.\r\n * @param {boolean} counterClockwise True if the circle is drawn counter-clockwise (will result in a hole if rendered on a clockwise path).\r\n */\r\n addCircle(point, diameter, counterClockwise) {\r\n this._path.addCircle(point, diameter, counterClockwise);\r\n }\r\n\r\n /**\r\n * Called when the icon has been completely drawn.\r\n */\r\n finish() { \r\n const pathsByColor = this._pathsByColor;\r\n for (let color in pathsByColor) {\r\n // hasOwnProperty cannot be shadowed in pathsByColor\r\n // eslint-disable-next-line no-prototype-builtins\r\n if (pathsByColor.hasOwnProperty(color)) {\r\n this._target.appendPath(color, pathsByColor[color].dataString);\r\n }\r\n }\r\n }\r\n}\n\n/**\r\n * Renderer producing SVG output.\r\n */\r\nclass SvgWriter {\r\n /**\r\n * @param {number} iconSize - Icon width and height in pixels.\r\n */\r\n constructor(iconSize) {\r\n this.iconSize = iconSize;\r\n this._s =\r\n '\";\r\n }\r\n}\n\n/**\r\n * Draws an identicon as an SVG string.\r\n * @param {*} hashOrValue - A hexadecimal hash string or any value that will be hashed by Jdenticon.\r\n * @param {number} size - Icon size in pixels.\r\n * @param {Object|number=} config - Optional configuration. If specified, this configuration object overrides any\r\n * global configuration in its entirety. For backward compatibility a padding value in the range [0.0, 0.5) can be\r\n * specified in place of a configuration object.\r\n * @returns {string} SVG string\r\n */\r\nfunction toSvg(hashOrValue, size, config) {\r\n const writer = new SvgWriter(size);\r\n iconGenerator(new SvgRenderer(writer), \r\n isValidHash(hashOrValue) || computeHash(hashOrValue),\r\n config);\r\n return writer.toString();\r\n}\n\n/**\r\n * Creates a new element and adds it to the specified parent.\r\n * @param {Element} parentNode\r\n * @param {string} name\r\n * @param {...(string|number)} keyValuePairs\r\n */\r\nfunction SvgElement_append(parentNode, name, ...keyValuePairs) {\r\n const el = document.createElementNS(\"http://www.w3.org/2000/svg\", name);\r\n \r\n for (let i = 0; i + 1 < keyValuePairs.length; i += 2) {\r\n el.setAttribute(\r\n /** @type {string} */ (keyValuePairs[i]),\r\n /** @type {string|number} */ (keyValuePairs[i + 1]),\r\n );\r\n }\r\n\r\n parentNode.appendChild(el);\r\n}\r\n\r\n\r\n/**\r\n * Renderer producing SVG output.\r\n */\r\nclass SvgElement {\r\n /**\r\n * @param {Element} element - Target element\r\n */\r\n constructor(element) {\r\n // Don't use the clientWidth and clientHeight properties on SVG elements\r\n // since Firefox won't serve a proper value of these properties on SVG\r\n // elements (https://bugzilla.mozilla.org/show_bug.cgi?id=874811)\r\n // Instead use 100px as a hardcoded size (the svg viewBox will rescale \r\n // the icon to the correct dimensions)\r\n const iconSize = this.iconSize = Math.min(\r\n (Number(element.getAttribute(\"width\")) || 100),\r\n (Number(element.getAttribute(\"height\")) || 100)\r\n );\r\n this._el = element;\r\n \r\n // Clear current SVG child elements\r\n while (element.firstChild) {\r\n element.removeChild(element.firstChild);\r\n }\r\n \r\n // Set viewBox attribute to ensure the svg scales nicely.\r\n element.setAttribute(\"viewBox\", \"0 0 \" + iconSize + \" \" + iconSize);\r\n element.setAttribute(\"preserveAspectRatio\", \"xMidYMid meet\");\r\n }\r\n\r\n /**\r\n * Fills the background with the specified color.\r\n * @param {string} fillColor Fill color on the format #rrggbb.\r\n * @param {number} opacity Opacity in the range [0.0, 1.0].\r\n */\r\n setBackground(fillColor, opacity) {\r\n if (opacity) {\r\n SvgElement_append(this._el, \"rect\",\r\n \"width\", \"100%\",\r\n \"height\", \"100%\",\r\n \"fill\", fillColor,\r\n \"opacity\", opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Appends a path to the SVG element.\r\n * @param {string} color Fill color on format #xxxxxx.\r\n * @param {string} dataString The SVG path data string.\r\n */\r\n appendPath(color, dataString) {\r\n SvgElement_append(this._el, \"path\",\r\n \"fill\", color,\r\n \"d\", dataString);\r\n }\r\n}\n\n/**\r\n * Updates all canvas elements with the `data-jdenticon-hash` or `data-jdenticon-value` attribute.\r\n */\r\nfunction updateAll() {\r\n if (documentQuerySelectorAll) {\r\n update(ICON_SELECTOR);\r\n }\r\n}\r\n\r\n/**\r\n * Updates the identicon in the specified `