| 844 | } |
| 845 | |
| 846 | function formatImage(image, message, scale) { |
| 847 | var maxWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 600; |
| 848 | var imageUrl = image.src.replace(/\(/g, '%28').replace(/\)/g, '%29'); |
| 849 | |
| 850 | if (image.width > maxWidth) { |
| 851 | scale = Math.min(scale, maxWidth / image.width); |
| 852 | } |
| 853 | |
| 854 | var width = image.width * scale; |
| 855 | var height = image.height * scale; |
| 856 | var style = ['font-size:1px;', "padding:".concat(Math.floor(height / 2), "px ").concat(Math.floor(width / 2), "px;"), "line-height:".concat(height, "px;"), "background:url(".concat(imageUrl, ");"), "background-size:".concat(width, "px ").concat(height, "px;"), 'color:transparent;'].join(''); |
| 857 | return ["".concat(message, " %c+"), style]; |
| 858 | } |
| 859 | },{}],"lXkG":[function(require,module,exports) { |
| 860 | "use strict"; |
| 861 | |