@fe6/icon-img
Version:
Water Icon 的纯 HTML 图标
9 lines (8 loc) • 4.47 kB
JavaScript
var IconsBytedFolderCode=function(u){"use strict";var h={size:"1em",spin:!1,strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{outStrokeColor:"#333",outFillColor:"transparent"},filled:{outStrokeColor:"#333",outFillColor:"#fff"},twoTone:{outStrokeColor:"#333",outFillColor:"#2f88ff"},multiColor:{outStrokeColor:"#333",outFillColor:"#2f88ff",innerStrokeColor:"#fff",innerFillColor:"#43ccf8"}},prefix:"cube"},C=function(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)},f=function(l,t,r){var o=t?.colors||[],e=[],n=t?.theme||r.theme;switch(n){case"outline":e.push(typeof o[0]=="string"?o[0]:r.colors.outline.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:r.colors.outline.outFillColor),e.push(typeof o[0]=="string"?o[0]:r.colors.outline.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:r.colors.outline.outFillColor);break;case"filled":e.push(typeof o[0]=="string"?o[0]:r.colors.filled.outStrokeColor),e.push(typeof o[0]=="string"?o[0]:r.colors.filled.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:r.colors.filled.outFillColor),e.push(typeof o[1]=="string"?o[1]:r.colors.filled.outFillColor);break;case"twoTone":e.push(typeof o[0]=="string"?o[0]:r.colors.twoTone.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:r.colors.twoTone.outFillColor),e.push(typeof o[0]=="string"?o[0]:r.colors.twoTone.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:r.colors.twoTone.outFillColor);break;case"multiColor":e.push(typeof o[0]=="string"?o[0]:r.colors.multiColor.outStrokeColor),e.push(typeof o[1]=="string"?o[1]:r.colors.multiColor.outFillColor),e.push(typeof o[2]=="string"?o[2]:r.colors.multiColor.innerStrokeColor),e.push(typeof o[3]=="string"?o[3]:r.colors.multiColor.innerFillColor);break}return{size:t?.size||r.size,strokeWidth:t?.strokeWidth||r.strokeWidth,strokeLinecap:t?.strokeLinecap||r.strokeLinecap,strokeLinejoin:t?.strokeLinejoin||r.strokeLinejoin,colors:e,svg:t?.svg||"",id:l}},k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",p=function(l,t){for(var r="",o=0,e=l.length,n,s,c,i=t?g:k;o<e;){if(n=l.charCodeAt(o++)&255,o===e){r+=i.charAt(n>>2),r+=i.charAt((n&3)<<4),r+="==";break}if(s=l.charCodeAt(o++),o===e){r+=i.charAt(n>>2),r+=i.charAt((n&3)<<4|(s&240)>>4),r+=i.charAt((s&15)<<2),r+="=";break}c=l.charCodeAt(o++),r+=i.charAt(n>>2),r+=i.charAt((n&3)<<4|(s&240)>>4),r+=i.charAt((s&15)<<2|(c&192)>>6),r+=i.charAt(c&63)}return r},m=function(l){var t="",r,o,e=l.length;for(r=0;r<e;r++)o=l.charCodeAt(r),o>=1&&o<=127?t+=l.charAt(r):o>2047?(t+=String.fromCharCode(224|o>>12&15),t+=String.fromCharCode(128|o>>6&63),t+=String.fromCharCode(128|o>>0&63)):(t+=String.fromCharCode(192|o>>6&31),t+=String.fromCharCode(128|o>>0&63));return t},y=h,S=function(){return y},F=function(l,t,r){return function(o){var e=S(),n=["".concat(e.prefix,"-icon")];n.push("".concat(e.prefix,"-icon-").concat(l)),t&&e.rtl&&n.push("".concat(e.prefix,"-icon-rtl")),o!=null&&o.spin&&n.push("".concat(e.prefix,"-icon-spin"));var s=f(C(),o,e),c=r(s),i=p(m(c)),v="data:image/svg+xml;base64,".concat(i);return o!=null&&o.base64?v:'<span class="'.concat(n.join(" "),`">
<img class="`).concat(e.prefix,'-icon-img" src="').concat(v,`" />
</span>`)}},d=function(l){var t,r,o,e;return`<?xml version="1.0" encoding="UTF-8"?>
<svg width="`.concat(l.size,'" height="').concat(l.size,`" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 8C5 6.89543 5.89543 6 7 6H19L24 12H41C42.1046 12 43 12.8954 43 14V40C43 41.1046 42.1046 42 41 42H7C5.89543 42 5 41.1046 5 40V8Z" fill="`).concat((t=l.colors)===null||t===void 0?void 0:t[1],'" stroke="').concat((r=l.colors)===null||r===void 0?void 0:r[0],'" stroke-width="').concat(l.strokeWidth,'" stroke-linejoin="').concat(l.strokeLinejoin,`"/>
<path d="M28 22L33 27L28 32" stroke="`).concat((o=l.colors)===null||o===void 0?void 0:o[2],'" stroke-width="').concat(l.strokeWidth,'" stroke-linecap="').concat(l.strokeLinecap,'" stroke-linejoin="').concat(l.strokeLinejoin,`"/>
<path d="M20 22L15 27L20 32" stroke="`).concat((e=l.colors)===null||e===void 0?void 0:e[2],'" stroke-width="').concat(l.strokeWidth,'" stroke-linecap="').concat(l.strokeLinecap,'" stroke-linejoin="').concat(l.strokeLinejoin,`"/>
</svg>`)},L=F("byted-folder-code",!1,d);return u.default=L,u.getIconBytedFolderCodeSvgHtml=d,Object.defineProperty(u,"__esModule",{value:!0}),u}({});