boring-avatars
Advanced tools
Comparing version 1.4.9 to 1.5.0
@@ -1,2 +0,2 @@ | ||
!function(e,t){if("object"===typeof exports&&"object"===typeof module)module.exports=t(require("react"));else if("function"===typeof define&&define.amd)define(["react"],t);else{var r="object"===typeof exports?t(require("react")):t(e.react);for(var l in r)("object"===typeof exports?exports:e)[l]=r[l]}}(this,(function(e){return function(e){var t={};function r(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,l){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(l,a,function(t){return e[t]}.bind(null,a));return l},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){e.exports=r(2)},function(e,t,r){"use strict";function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(null==e)return{};var r,l,a=function(e,t){if(null==e)return{};var r,l,a={},n=Object.keys(e);for(l=0;l<n.length;l++)r=n[l],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)r=n[l],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.r(t);var n=r(0),i=r.n(n),c=function(e){var t=Array.from(e),r=0;return t.forEach((function(e){return r+=e.charCodeAt(0)})),r},o=function(e,t){return e%t},h=function(e,t){return Math.floor(e/Math.pow(10,t)%10)},f=function(e,t){return!(h(e,t)%2)},s=function(e,t,r){var l=e%t;return r&&h(e,r)%2===0?-l:l},m=function(e,t,r){return t[e%r]},d=function(e){return"#"===e.slice(0,1)&&(e=e.slice(1)),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"black":"white"},u=3,g=12/u;function p(e,t,r){var l=new Array(g).fill(t);return l[r]=e,r===g-1?l[0]=e:l[r+1]=e,l}var E=function(e){var t=function(e,t){var r=c(t),l=e&&e.length,a=o(r,g),n=Array.from({length:g},(function(t,a){return m(r%(a+3),e,l)})),i=m(r+u,e,l),h=m(r-u,e,l);return n.concat(p(i,"none",a),p("none",h,a))}(e.colors,e.name);return i.a.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},i.a.createElement("svg",{viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.a.createElement("path",{d:"M80 40A40 40 0 0040 0v40h40z",fill:t[0]}),i.a.createElement("path",{d:"M40 0A40 40 0 000 40h40V0z",fill:t[1]}),i.a.createElement("path",{d:"M0 40a40 40 0 0040 40V40H0z",fill:t[2]}),i.a.createElement("path",{d:"M40 80a40 40 0 0040-40H40v40z",fill:t[3]}),i.a.createElement("path",{d:"M70 40a30 30 0 00-30-30v30h30z",fill:t[4]}),i.a.createElement("path",{d:"M40 10a30 30 0 00-30 30h30V10z",fill:t[5]}),i.a.createElement("path",{d:"M10 40a30 30 0 0030 30V40H10z",fill:t[6]}),i.a.createElement("path",{d:"M40 70a30 30 0 0030-30H40v30z",fill:t[7]}),i.a.createElement("path",{d:"M60 40a20 20 0 00-20-20v20h20z",fill:t[8]}),i.a.createElement("path",{d:"M40 20a20 20 0 00-20 20h20V20z",fill:t[9]}),i.a.createElement("path",{d:"M20 40a20 20 0 0020 20V40H20z",fill:t[10]}),i.a.createElement("path",{d:"M40 60a20 20 0 0020-20H40v20z",fill:t[11]})))},w=4,y=80;var x=function(e){var t=function(e,t){var r=c(e),l=t&&t.length;return Array.from({length:w},(function(e,a){return{color:m(r+a,t,l),translateX:s(r*(a+1),y/2-(a+17),1),translateY:s(r*(a+1),y/2-(a+17),2),rotate:s(r*(a+1),360),isSquare:f(r,2)}}))}(e.name,e.colors);return n.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},n.createElement("svg",Object.assign({viewBox:"0 0 "+y+" "+y,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("mask",{id:"mask__bauhaus",maskUnits:"userSpaceOnUse",x:0,y:0,width:y,height:y},n.createElement("rect",{width:y,height:y,rx:y/2,fill:"#fff"})),n.createElement("g",{mask:"url(#mask__bauhaus)"},n.createElement("rect",{width:y,height:y,rx:y/2,fill:t[0].color}),n.createElement("rect",{x:(y-60)/2,y:(y-20)/2,width:y,height:t[1].isSquare?y:y/8,fill:t[1].color,transform:"translate("+t[1].translateX+" "+t[1].translateY+") rotate("+t[1].rotate+" "+y/2+" "+y/2+")"}),n.createElement("circle",{cx:y/2,cy:y/2,fill:t[2].color,r:y/5,transform:"translate("+t[2].translateX+" "+t[2].translateY+")"}),n.createElement("line",{x1:0,y1:y/2,x2:y,y2:y/2,strokeWidth:2,stroke:t[3].color,transform:"translate("+t[3].translateX+" "+t[3].translateY+") rotate("+t[3].rotate+" "+y/2+" "+y/2+")"}))))},v=5;var b=function(e){var t=function(e,t){var r=c(t),l=e&&e.length,a=Array.from({length:v},(function(t,a){return m(r+(a+1),e,l)})),n=[];return n[0]=a[0],n[1]=a[1],n[2]=a[1],n[3]=a[2],n[4]=a[2],n[5]=a[3],n[6]=a[3],n[7]=a[0],n[8]=a[4],n}(e.colors,e.name);return i.a.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},i.a.createElement("svg",{viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.a.createElement("path",{d:"M90 45a45.001 45.001 0 00-76.82-31.82A45 45 0 000 45h90z",fill:t[0]}),i.a.createElement("path",{d:"M90 45a45.001 45.001 0 01-76.82 31.82A45 45 0 010 45h90z",fill:t[1]}),i.a.createElement("path",{d:"M83 45a38 38 0 00-76 0h76z",fill:t[2]}),i.a.createElement("path",{d:"M83 45a38 38 0 01-76 0h76z",fill:t[3]}),i.a.createElement("path",{d:"M77 45a32 32 0 10-64 0h64z",fill:t[4]}),i.a.createElement("path",{d:"M77 45a32 32 0 11-64 0h64z",fill:t[5]}),i.a.createElement("path",{d:"M71 45a26 26 0 00-52 0h52z",fill:t[6]}),i.a.createElement("path",{d:"M71 45a26 26 0 01-52 0h52z",fill:t[7]}),i.a.createElement("circle",{cx:45,cy:45,r:23,fill:t[8]})))},O=64;var k=function(e){var t=function(e,t){var r=c(e),l=t&&t.length;return Array.from({length:O},(function(e,a){return{color:m(r%(a+13),t,l)}}))}(e.name,e.colors);return console.log(t[0].color),n.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},n.createElement("svg",Object.assign({viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:80},n.createElement("circle",{cx:40,cy:40,r:40,fill:"white"})),n.createElement("g",{mask:"url(#mask0)"},n.createElement("rect",{width:10,height:10,fill:t[0].color}),n.createElement("rect",{x:20,width:10,height:10,fill:t[1].color}),n.createElement("rect",{x:40,width:10,height:10,fill:t[2].color}),n.createElement("rect",{x:60,width:10,height:10,fill:t[3].color}),n.createElement("rect",{x:10,width:10,height:10,fill:t[4].color}),n.createElement("rect",{x:30,width:10,height:10,fill:t[5].color}),n.createElement("rect",{x:50,width:10,height:10,fill:t[6].color}),n.createElement("rect",{x:70,width:10,height:10,fill:t[7].color}),n.createElement("rect",{y:10,width:10,height:10,fill:t[8].color}),n.createElement("rect",{y:20,width:10,height:10,fill:t[9].color}),n.createElement("rect",{y:30,width:10,height:10,fill:t[10].color}),n.createElement("rect",{y:40,width:10,height:10,fill:t[11].color}),n.createElement("rect",{y:50,width:10,height:10,fill:t[12].color}),n.createElement("rect",{y:60,width:10,height:10,fill:t[13].color}),n.createElement("rect",{y:70,width:10,height:10,fill:t[14].color}),n.createElement("rect",{x:20,y:10,width:10,height:10,fill:t[15].color}),n.createElement("rect",{x:20,y:20,width:10,height:10,fill:t[16].color}),n.createElement("rect",{x:20,y:30,width:10,height:10,fill:t[17].color}),n.createElement("rect",{x:20,y:40,width:10,height:10,fill:t[18].color}),n.createElement("rect",{x:20,y:50,width:10,height:10,fill:t[19].color}),n.createElement("rect",{x:20,y:60,width:10,height:10,fill:t[20].color}),n.createElement("rect",{x:20,y:70,width:10,height:10,fill:t[21].color}),n.createElement("rect",{x:40,y:10,width:10,height:10,fill:t[22].color}),n.createElement("rect",{x:40,y:20,width:10,height:10,fill:t[23].color}),n.createElement("rect",{x:40,y:30,width:10,height:10,fill:t[24].color}),n.createElement("rect",{x:40,y:40,width:10,height:10,fill:t[25].color}),n.createElement("rect",{x:40,y:50,width:10,height:10,fill:t[26].color}),n.createElement("rect",{x:40,y:60,width:10,height:10,fill:t[27].color}),n.createElement("rect",{x:40,y:70,width:10,height:10,fill:t[28].color}),n.createElement("rect",{x:60,y:10,width:10,height:10,fill:t[29].color}),n.createElement("rect",{x:60,y:20,width:10,height:10,fill:t[30].color}),n.createElement("rect",{x:60,y:30,width:10,height:10,fill:t[31].color}),n.createElement("rect",{x:60,y:40,width:10,height:10,fill:t[32].color}),n.createElement("rect",{x:60,y:50,width:10,height:10,fill:t[33].color}),n.createElement("rect",{x:60,y:60,width:10,height:10,fill:t[34].color}),n.createElement("rect",{x:60,y:70,width:10,height:10,fill:t[35].color}),n.createElement("rect",{x:10,y:10,width:10,height:10,fill:t[36].color}),n.createElement("rect",{x:10,y:20,width:10,height:10,fill:t[37].color}),n.createElement("rect",{x:10,y:30,width:10,height:10,fill:t[38].color}),n.createElement("rect",{x:10,y:40,width:10,height:10,fill:t[39].color}),n.createElement("rect",{x:10,y:50,width:10,height:10,fill:t[40].color}),n.createElement("rect",{x:10,y:60,width:10,height:10,fill:t[41].color}),n.createElement("rect",{x:10,y:70,width:10,height:10,fill:t[42].color}),n.createElement("rect",{x:30,y:10,width:10,height:10,fill:t[43].color}),n.createElement("rect",{x:30,y:20,width:10,height:10,fill:t[44].color}),n.createElement("rect",{x:30,y:30,width:10,height:10,fill:t[45].color}),n.createElement("rect",{x:30,y:40,width:10,height:10,fill:t[46].color}),n.createElement("rect",{x:30,y:50,width:10,height:10,fill:t[47].color}),n.createElement("rect",{x:30,y:60,width:10,height:10,fill:t[48].color}),n.createElement("rect",{x:30,y:70,width:10,height:10,fill:t[49].color}),n.createElement("rect",{x:50,y:10,width:10,height:10,fill:t[50].color}),n.createElement("rect",{x:50,y:20,width:10,height:10,fill:t[51].color}),n.createElement("rect",{x:50,y:30,width:10,height:10,fill:t[52].color}),n.createElement("rect",{x:50,y:40,width:10,height:10,fill:t[53].color}),n.createElement("rect",{x:50,y:50,width:10,height:10,fill:t[54].color}),n.createElement("rect",{x:50,y:60,width:10,height:10,fill:t[55].color}),n.createElement("rect",{x:50,y:70,width:10,height:10,fill:t[56].color}),n.createElement("rect",{x:70,y:10,width:10,height:10,fill:t[57].color}),n.createElement("rect",{x:70,y:20,width:10,height:10,fill:t[58].color}),n.createElement("rect",{x:70,y:30,width:10,height:10,fill:t[59].color}),n.createElement("rect",{x:70,y:40,width:10,height:10,fill:t[60].color}),n.createElement("rect",{x:70,y:50,width:10,height:10,fill:t[61].color}),n.createElement("rect",{x:70,y:60,width:10,height:10,fill:t[62].color}),n.createElement("rect",{x:70,y:70,width:10,height:10,fill:t[63].color}))))},_=36;var z=function(e){var t=function(e,t){var r=c(e),l=t&&t.length,a=m(r,t,l),n=s(r,10,1),i=n<5?n+_/9:n,o=s(r,10,2),h=o<5?o+_/9:o;return{wrapperColor:a,faceColor:d(a),backgroundColor:m(r+13,t,l),wrapperTranslateX:i,wrapperTranslateY:h,wrapperRotate:s(r,360),wrapperScale:1+s(r,_/12)/10,isMouthOpen:f(r,2),isCircle:f(r,1),eyeSpread:s(r,5),mouthSpread:s(r,3),faceRotate:s(r,10,3),faceTranslateX:i>_/6?i/2:s(r,8,1),faceTranslateY:h>_/6?h/2:s(r,7,2)}}(e.name,e.colors);return n.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},n.createElement("svg",Object.assign({viewBox:"0 0 "+_+" "+_,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("mask",{id:"mask__beam",maskUnits:"userSpaceOnUse",x:0,y:0,width:_,height:_},n.createElement("rect",{width:_,height:_,rx:20,fill:"white"})),n.createElement("g",{mask:"url(#mask__beam)",fill:"transparent"},n.createElement("rect",{width:_,height:_,rx:20,fill:t.backgroundColor}),n.createElement("rect",{x:"0",y:"0",width:_,height:_,transform:"translate("+t.wrapperTranslateX+" "+t.wrapperTranslateY+") rotate("+t.wrapperRotate+" "+_/2+" "+_/2+") scale("+t.wrapperScale+")",fill:t.wrapperColor,rx:t.isCircle?_:_/6}),n.createElement("g",{transform:"translate("+t.faceTranslateX+" "+t.faceTranslateY+") rotate("+t.faceRotate+" "+_/2+" "+_/2+")"},t.isMouthOpen?n.createElement("path",{d:"M15 "+(19+t.mouthSpread)+"c2 1 4 1 6 0",stroke:t.faceColor,fill:"none",strokeLinecap:"round"}):n.createElement("path",{d:"M13,"+(19+t.mouthSpread)+" a1,0.75 0 0,0 10,0",fill:t.faceColor}),n.createElement("rect",{x:14-t.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:t.faceColor}),n.createElement("rect",{x:20+t.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:t.faceColor})))))},M=4;var j=function(e){var t=function(e,t){var r=c(e),l=t&&t.length;return Array.from({length:M},(function(e,a){return{color:m(r+a,t,l)}}))}(e.name,e.colors),r=e.name.replace(/\s/g,"");return n.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},n.createElement("svg",Object.assign({viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("mask",{id:"mask__sunset",maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:80},n.createElement("circle",{cx:40,cy:40,r:40,fill:"white"})),n.createElement("g",{mask:"url(#mask__sunset)"},n.createElement("path",{fill:"url(#gradient_paint0_linear_"+r+")",d:"M0 0h80v40H0z"}),n.createElement("path",{fill:"url(#gradient_paint1_linear_"+r+")",d:"M0 40h80v40H0z"})),n.createElement("defs",null,n.createElement("linearGradient",{id:"gradient_paint0_linear_"+r,x1:40,y1:0,x2:40,y2:40,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:t[0].color}),n.createElement("stop",{offset:1,stopColor:t[1].color})),n.createElement("linearGradient",{id:"gradient_paint1_linear_"+r,x1:40,y1:40,x2:40,y2:80,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:t[2].color}),n.createElement("stop",{offset:1,stopColor:t[3].color})))))},S=3,C=80;var B=function(e){var t=function(e,t){var r=c(e),l=t&&t.length;return Array.from({length:S},(function(e,a){return{color:m(r+a,t,l),translateX:s(r*(a+1),C/10,1),translateY:s(r*(a+1),C/10,2),scale:1.2+s(r*(a+1),C/20)/10,rotate:s(r*(a+1),360,1)}}))}(e.name,e.colors);return n.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},n.createElement("svg",Object.assign({viewBox:"0 0 "+C+" "+C,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("mask",{id:"mask__marble",maskUnits:"userSpaceOnUse",x:0,y:0,width:C,height:C},n.createElement("path",{d:"M80 40C80 17.909 62.091 0 40 0S0 17.909 0 40s17.909 40 40 40 40-17.909 40-40z",fill:"#fff"})),n.createElement("g",{mask:"url(#mask__marble)"},n.createElement("path",{d:"M80 40C80 17.909 62.091 0 40 0S0 17.909 0 40s17.909 40 40 40 40-17.909 40-40z",fill:t[0].color}),n.createElement("path",{filter:"url(#prefix__filter0_f)",d:"M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z",fill:t[1].color,transform:"translate("+t[1].translateX+" "+t[1].translateY+") rotate("+t[1].rotate+" "+C/2+" "+C/2+") scale("+t[2].scale+")"}),n.createElement("path",{filter:"url(#prefix__filter0_f)",style:{mixBlendMode:"overlay"},d:"M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z",fill:t[2].color,transform:"translate("+t[2].translateX+" "+t[2].translateY+") rotate("+t[2].rotate+" "+C/2+" "+C/2+") scale("+t[2].scale+")"})),n.createElement("defs",null,n.createElement("filter",{id:"prefix__filter0_f",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},n.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),n.createElement("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),n.createElement("feGaussianBlur",{stdDeviation:7,result:"effect1_foregroundBlur"})))))};function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}var P=["pixel","bauhaus","ring","beam","sunset","dome","marble"],U=function(e){var t=e.variant,r=void 0===t?"marble":t,n=e.colors,c=void 0===n?["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"]:n,o=e.name,h=void 0===o?"Clara Barton":o,f=e.size,s=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(r,!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({colors:c,name:h,size:void 0===f?40:f},a(e,["variant","colors","name","size"])),m=P.includes(r)?r:"marble";return{pixel:i.a.createElement(k,s),bauhaus:i.a.createElement(x,s),ring:i.a.createElement(b,s),beam:i.a.createElement(z,s),sunset:i.a.createElement(j,s),dome:i.a.createElement(E,s),marble:i.a.createElement(B,s)}[m]};t.default=U}])})); | ||
!function(e,t){if("object"===typeof exports&&"object"===typeof module)module.exports=t(require("react"));else if("function"===typeof define&&define.amd)define(["react"],t);else{var r="object"===typeof exports?t(require("react")):t(e.react);for(var l in r)("object"===typeof exports?exports:e)[l]=r[l]}}(this,(function(e){return function(e){var t={};function r(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,l){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(l,a,function(t){return e[t]}.bind(null,a));return l},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){e.exports=r(2)},function(e,t,r){"use strict";function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(null==e)return{};var r,l,a=function(e,t){if(null==e)return{};var r,l,a={},n=Object.keys(e);for(l=0;l<n.length;l++)r=n[l],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)r=n[l],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.r(t);var n=r(0),i=r.n(n),c=function(e){var t=Array.from(e),r=0;return t.forEach((function(e){return r+=e.charCodeAt(0)})),r},o=function(e,t){return e%t},h=function(e,t){return Math.floor(e/Math.pow(10,t)%10)},f=function(e,t){return!(h(e,t)%2)},s=function(e,t,r){var l=e%t;return r&&h(e,r)%2===0?-l:l},m=function(e,t,r){return t[e%r]},u=function(e){return"#"===e.slice(0,1)&&(e=e.slice(1)),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"black":"white"},d=3,g=12/d;function p(e,t,r){var l=new Array(g).fill(t);return l[r]=e,r===g-1?l[0]=e:l[r+1]=e,l}var E=function(e){var t=function(e,t){var r=c(t),l=e&&e.length,a=o(r,g),n=Array.from({length:g},(function(t,a){return m(r%(a+3),e,l)})),i=m(r+d,e,l),h=m(r-d,e,l);return n.concat(p(i,"none",a),p("none",h,a))}(e.colors,e.name);return i.a.createElement("svg",Object.assign({viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size},e),i.a.createElement("path",{d:"M80 40A40 40 0 0040 0v40h40z",fill:t[0]}),i.a.createElement("path",{d:"M40 0A40 40 0 000 40h40V0z",fill:t[1]}),i.a.createElement("path",{d:"M0 40a40 40 0 0040 40V40H0z",fill:t[2]}),i.a.createElement("path",{d:"M40 80a40 40 0 0040-40H40v40z",fill:t[3]}),i.a.createElement("path",{d:"M70 40a30 30 0 00-30-30v30h30z",fill:t[4]}),i.a.createElement("path",{d:"M40 10a30 30 0 00-30 30h30V10z",fill:t[5]}),i.a.createElement("path",{d:"M10 40a30 30 0 0030 30V40H10z",fill:t[6]}),i.a.createElement("path",{d:"M40 70a30 30 0 0030-30H40v30z",fill:t[7]}),i.a.createElement("path",{d:"M60 40a20 20 0 00-20-20v20h20z",fill:t[8]}),i.a.createElement("path",{d:"M40 20a20 20 0 00-20 20h20V20z",fill:t[9]}),i.a.createElement("path",{d:"M20 40a20 20 0 0020 20V40H20z",fill:t[10]}),i.a.createElement("path",{d:"M40 60a20 20 0 0020-20H40v20z",fill:t[11]}))},w=4,y=80;var x=function(e){var t=function(e,t){var r=c(e),l=t&&t.length;return Array.from({length:w},(function(e,a){return{color:m(r+a,t,l),translateX:s(r*(a+1),y/2-(a+17),1),translateY:s(r*(a+1),y/2-(a+17),2),rotate:s(r*(a+1),360),isSquare:f(r,2)}}))}(e.name,e.colors);return n.createElement("svg",Object.assign({viewBox:"0 0 "+y+" "+y,fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size},e),n.createElement("mask",{id:"mask__bauhaus",maskUnits:"userSpaceOnUse",x:0,y:0,width:y,height:y},n.createElement("rect",{width:y,height:y,rx:y/2,fill:"#fff"})),n.createElement("g",{mask:"url(#mask__bauhaus)"},n.createElement("rect",{width:y,height:y,rx:y/2,fill:t[0].color}),n.createElement("rect",{x:(y-60)/2,y:(y-20)/2,width:y,height:t[1].isSquare?y:y/8,fill:t[1].color,transform:"translate("+t[1].translateX+" "+t[1].translateY+") rotate("+t[1].rotate+" "+y/2+" "+y/2+")"}),n.createElement("circle",{cx:y/2,cy:y/2,fill:t[2].color,r:y/5,transform:"translate("+t[2].translateX+" "+t[2].translateY+")"}),n.createElement("line",{x1:0,y1:y/2,x2:y,y2:y/2,strokeWidth:2,stroke:t[3].color,transform:"translate("+t[3].translateX+" "+t[3].translateY+") rotate("+t[3].rotate+" "+y/2+" "+y/2+")"})))},v=5;var b=function(e){var t=function(e,t){var r=c(t),l=e&&e.length,a=Array.from({length:v},(function(t,a){return m(r+(a+1),e,l)})),n=[];return n[0]=a[0],n[1]=a[1],n[2]=a[1],n[3]=a[2],n[4]=a[2],n[5]=a[3],n[6]=a[3],n[7]=a[0],n[8]=a[4],n}(e.colors,e.name);return i.a.createElement("svg",Object.assign({viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size},e),i.a.createElement("path",{d:"M90 45a45.001 45.001 0 00-76.82-31.82A45 45 0 000 45h90z",fill:t[0]}),i.a.createElement("path",{d:"M90 45a45.001 45.001 0 01-76.82 31.82A45 45 0 010 45h90z",fill:t[1]}),i.a.createElement("path",{d:"M83 45a38 38 0 00-76 0h76z",fill:t[2]}),i.a.createElement("path",{d:"M83 45a38 38 0 01-76 0h76z",fill:t[3]}),i.a.createElement("path",{d:"M77 45a32 32 0 10-64 0h64z",fill:t[4]}),i.a.createElement("path",{d:"M77 45a32 32 0 11-64 0h64z",fill:t[5]}),i.a.createElement("path",{d:"M71 45a26 26 0 00-52 0h52z",fill:t[6]}),i.a.createElement("path",{d:"M71 45a26 26 0 01-52 0h52z",fill:t[7]}),i.a.createElement("circle",{cx:45,cy:45,r:23,fill:t[8]}))},O=64;var _=function(e){var t=function(e,t){var r=c(e),l=t&&t.length;return Array.from({length:O},(function(e,a){return{color:m(r%(a+13),t,l)}}))}(e.name,e.colors);return n.createElement("svg",Object.assign({viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size},e),n.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:80},n.createElement("circle",{cx:40,cy:40,r:40,fill:"white"})),n.createElement("g",{mask:"url(#mask0)"},n.createElement("rect",{width:10,height:10,fill:t[0].color}),n.createElement("rect",{x:20,width:10,height:10,fill:t[1].color}),n.createElement("rect",{x:40,width:10,height:10,fill:t[2].color}),n.createElement("rect",{x:60,width:10,height:10,fill:t[3].color}),n.createElement("rect",{x:10,width:10,height:10,fill:t[4].color}),n.createElement("rect",{x:30,width:10,height:10,fill:t[5].color}),n.createElement("rect",{x:50,width:10,height:10,fill:t[6].color}),n.createElement("rect",{x:70,width:10,height:10,fill:t[7].color}),n.createElement("rect",{y:10,width:10,height:10,fill:t[8].color}),n.createElement("rect",{y:20,width:10,height:10,fill:t[9].color}),n.createElement("rect",{y:30,width:10,height:10,fill:t[10].color}),n.createElement("rect",{y:40,width:10,height:10,fill:t[11].color}),n.createElement("rect",{y:50,width:10,height:10,fill:t[12].color}),n.createElement("rect",{y:60,width:10,height:10,fill:t[13].color}),n.createElement("rect",{y:70,width:10,height:10,fill:t[14].color}),n.createElement("rect",{x:20,y:10,width:10,height:10,fill:t[15].color}),n.createElement("rect",{x:20,y:20,width:10,height:10,fill:t[16].color}),n.createElement("rect",{x:20,y:30,width:10,height:10,fill:t[17].color}),n.createElement("rect",{x:20,y:40,width:10,height:10,fill:t[18].color}),n.createElement("rect",{x:20,y:50,width:10,height:10,fill:t[19].color}),n.createElement("rect",{x:20,y:60,width:10,height:10,fill:t[20].color}),n.createElement("rect",{x:20,y:70,width:10,height:10,fill:t[21].color}),n.createElement("rect",{x:40,y:10,width:10,height:10,fill:t[22].color}),n.createElement("rect",{x:40,y:20,width:10,height:10,fill:t[23].color}),n.createElement("rect",{x:40,y:30,width:10,height:10,fill:t[24].color}),n.createElement("rect",{x:40,y:40,width:10,height:10,fill:t[25].color}),n.createElement("rect",{x:40,y:50,width:10,height:10,fill:t[26].color}),n.createElement("rect",{x:40,y:60,width:10,height:10,fill:t[27].color}),n.createElement("rect",{x:40,y:70,width:10,height:10,fill:t[28].color}),n.createElement("rect",{x:60,y:10,width:10,height:10,fill:t[29].color}),n.createElement("rect",{x:60,y:20,width:10,height:10,fill:t[30].color}),n.createElement("rect",{x:60,y:30,width:10,height:10,fill:t[31].color}),n.createElement("rect",{x:60,y:40,width:10,height:10,fill:t[32].color}),n.createElement("rect",{x:60,y:50,width:10,height:10,fill:t[33].color}),n.createElement("rect",{x:60,y:60,width:10,height:10,fill:t[34].color}),n.createElement("rect",{x:60,y:70,width:10,height:10,fill:t[35].color}),n.createElement("rect",{x:10,y:10,width:10,height:10,fill:t[36].color}),n.createElement("rect",{x:10,y:20,width:10,height:10,fill:t[37].color}),n.createElement("rect",{x:10,y:30,width:10,height:10,fill:t[38].color}),n.createElement("rect",{x:10,y:40,width:10,height:10,fill:t[39].color}),n.createElement("rect",{x:10,y:50,width:10,height:10,fill:t[40].color}),n.createElement("rect",{x:10,y:60,width:10,height:10,fill:t[41].color}),n.createElement("rect",{x:10,y:70,width:10,height:10,fill:t[42].color}),n.createElement("rect",{x:30,y:10,width:10,height:10,fill:t[43].color}),n.createElement("rect",{x:30,y:20,width:10,height:10,fill:t[44].color}),n.createElement("rect",{x:30,y:30,width:10,height:10,fill:t[45].color}),n.createElement("rect",{x:30,y:40,width:10,height:10,fill:t[46].color}),n.createElement("rect",{x:30,y:50,width:10,height:10,fill:t[47].color}),n.createElement("rect",{x:30,y:60,width:10,height:10,fill:t[48].color}),n.createElement("rect",{x:30,y:70,width:10,height:10,fill:t[49].color}),n.createElement("rect",{x:50,y:10,width:10,height:10,fill:t[50].color}),n.createElement("rect",{x:50,y:20,width:10,height:10,fill:t[51].color}),n.createElement("rect",{x:50,y:30,width:10,height:10,fill:t[52].color}),n.createElement("rect",{x:50,y:40,width:10,height:10,fill:t[53].color}),n.createElement("rect",{x:50,y:50,width:10,height:10,fill:t[54].color}),n.createElement("rect",{x:50,y:60,width:10,height:10,fill:t[55].color}),n.createElement("rect",{x:50,y:70,width:10,height:10,fill:t[56].color}),n.createElement("rect",{x:70,y:10,width:10,height:10,fill:t[57].color}),n.createElement("rect",{x:70,y:20,width:10,height:10,fill:t[58].color}),n.createElement("rect",{x:70,y:30,width:10,height:10,fill:t[59].color}),n.createElement("rect",{x:70,y:40,width:10,height:10,fill:t[60].color}),n.createElement("rect",{x:70,y:50,width:10,height:10,fill:t[61].color}),n.createElement("rect",{x:70,y:60,width:10,height:10,fill:t[62].color}),n.createElement("rect",{x:70,y:70,width:10,height:10,fill:t[63].color})))},z=36;var k=function(e){var t=function(e,t){var r=c(e),l=t&&t.length,a=m(r,t,l),n=s(r,10,1),i=n<5?n+z/9:n,o=s(r,10,2),h=o<5?o+z/9:o;return{wrapperColor:a,faceColor:u(a),backgroundColor:m(r+13,t,l),wrapperTranslateX:i,wrapperTranslateY:h,wrapperRotate:s(r,360),wrapperScale:1+s(r,z/12)/10,isMouthOpen:f(r,2),isCircle:f(r,1),eyeSpread:s(r,5),mouthSpread:s(r,3),faceRotate:s(r,10,3),faceTranslateX:i>z/6?i/2:s(r,8,1),faceTranslateY:h>z/6?h/2:s(r,7,2)}}(e.name,e.colors);return n.createElement("svg",Object.assign({viewBox:"0 0 "+z+" "+z,fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size},e),n.createElement("mask",{id:"mask__beam",maskUnits:"userSpaceOnUse",x:0,y:0,width:z,height:z},n.createElement("rect",{width:z,height:z,rx:20,fill:"white"})),n.createElement("g",{mask:"url(#mask__beam)",fill:"transparent"},n.createElement("rect",{width:z,height:z,rx:20,fill:t.backgroundColor}),n.createElement("rect",{x:"0",y:"0",width:z,height:z,transform:"translate("+t.wrapperTranslateX+" "+t.wrapperTranslateY+") rotate("+t.wrapperRotate+" "+z/2+" "+z/2+") scale("+t.wrapperScale+")",fill:t.wrapperColor,rx:t.isCircle?z:z/6}),n.createElement("g",{transform:"translate("+t.faceTranslateX+" "+t.faceTranslateY+") rotate("+t.faceRotate+" "+z/2+" "+z/2+")"},t.isMouthOpen?n.createElement("path",{d:"M15 "+(19+t.mouthSpread)+"c2 1 4 1 6 0",stroke:t.faceColor,fill:"none",strokeLinecap:"round"}):n.createElement("path",{d:"M13,"+(19+t.mouthSpread)+" a1,0.75 0 0,0 10,0",fill:t.faceColor}),n.createElement("rect",{x:14-t.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:t.faceColor}),n.createElement("rect",{x:20+t.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:t.faceColor}))))},M=4;var j=function(e){var t=function(e,t){var r=c(e),l=t&&t.length;return Array.from({length:M},(function(e,a){return{color:m(r+a,t,l)}}))}(e.name,e.colors),r=e.name.replace(/\s/g,"");return n.createElement("svg",Object.assign({viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size},e),n.createElement("mask",{id:"mask__sunset",maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:80},n.createElement("circle",{cx:40,cy:40,r:40,fill:"white"})),n.createElement("g",{mask:"url(#mask__sunset)"},n.createElement("path",{fill:"url(#gradient_paint0_linear_"+r+")",d:"M0 0h80v40H0z"}),n.createElement("path",{fill:"url(#gradient_paint1_linear_"+r+")",d:"M0 40h80v40H0z"})),n.createElement("defs",null,n.createElement("linearGradient",{id:"gradient_paint0_linear_"+r,x1:40,y1:0,x2:40,y2:40,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:t[0].color}),n.createElement("stop",{offset:1,stopColor:t[1].color})),n.createElement("linearGradient",{id:"gradient_paint1_linear_"+r,x1:40,y1:40,x2:40,y2:80,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:t[2].color}),n.createElement("stop",{offset:1,stopColor:t[3].color}))))},S=3,C=80;var B=function(e){var t=function(e,t){var r=c(e),l=t&&t.length;return Array.from({length:S},(function(e,a){return{color:m(r+a,t,l),translateX:s(r*(a+1),C/10,1),translateY:s(r*(a+1),C/10,2),scale:1.2+s(r*(a+1),C/20)/10,rotate:s(r*(a+1),360,1)}}))}(e.name,e.colors);return n.createElement("svg",Object.assign({viewBox:"0 0 "+C+" "+C,fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size},e),n.createElement("mask",{id:"mask__marble",maskUnits:"userSpaceOnUse",x:0,y:0,width:C,height:C},n.createElement("path",{d:"M80 40C80 17.909 62.091 0 40 0S0 17.909 0 40s17.909 40 40 40 40-17.909 40-40z",fill:"#fff"})),n.createElement("g",{mask:"url(#mask__marble)"},n.createElement("path",{d:"M80 40C80 17.909 62.091 0 40 0S0 17.909 0 40s17.909 40 40 40 40-17.909 40-40z",fill:t[0].color}),n.createElement("path",{filter:"url(#prefix__filter0_f)",d:"M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z",fill:t[1].color,transform:"translate("+t[1].translateX+" "+t[1].translateY+") rotate("+t[1].rotate+" "+C/2+" "+C/2+") scale("+t[2].scale+")"}),n.createElement("path",{filter:"url(#prefix__filter0_f)",style:{mixBlendMode:"overlay"},d:"M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z",fill:t[2].color,transform:"translate("+t[2].translateX+" "+t[2].translateY+") rotate("+t[2].rotate+" "+C/2+" "+C/2+") scale("+t[2].scale+")"})),n.createElement("defs",null,n.createElement("filter",{id:"prefix__filter0_f",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},n.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),n.createElement("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),n.createElement("feGaussianBlur",{stdDeviation:7,result:"effect1_foregroundBlur"}))))};function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}var P=["pixel","bauhaus","ring","beam","sunset","dome","marble"],U={geometric:"dome",abstract:"bauhaus"},X=function(e){var t=e.variant,r=void 0===t?"marble":t,n=e.colors,c=void 0===n?["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"]:n,o=e.name,h=void 0===o?"Clara Barton":o,f=e.size,s=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(r,!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({colors:c,name:h,size:void 0===f?40:f},a(e,["variant","colors","name","size"]));return{pixel:i.a.createElement(_,s),bauhaus:i.a.createElement(x,s),ring:i.a.createElement(b,s),beam:i.a.createElement(k,s),sunset:i.a.createElement(j,s),dome:i.a.createElement(E,s),marble:i.a.createElement(B,s)}[Object.keys(U).includes(r)?U[r]:P.includes(r)?r:"marble"]};t.default=X}])})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "boring-avatars", | ||
"version": "1.4.9", | ||
"version": "1.5.0", | ||
"main": "build/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23282
65