1 line
No EOL
29 KiB
XML
1 line
No EOL
29 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg48" width="64" height="64" version="1.1"><defs id="defs15"><filter id="filter4498" width="1.783" height="2.121" x="-.392" y="-.56" color-interpolation-filters="sRGB"><feGaussianBlur id="feGaussianBlur1" stdDeviation="1.331"/></filter><filter id="filter6078" width="1.513" height="1.539" x="-.256" y="-.269" color-interpolation-filters="sRGB"><feGaussianBlur id="feGaussianBlur2" stdDeviation="1.343"/></filter><filter id="filter6078-7" width="1.428" height="1.669" x="-.214" y="-.335" color-interpolation-filters="sRGB"><feGaussianBlur id="feGaussianBlur3" stdDeviation="1.343"/></filter><filter id="filter4498-9" width="1.717" height="1.544" x="-.358" y="-.272" color-interpolation-filters="sRGB"><feGaussianBlur id="feGaussianBlur4" stdDeviation="1.331"/></filter><filter id="filter6078-7-5" width="1.369" height="1.241" x="-.185" y="-.12" color-interpolation-filters="sRGB"><feGaussianBlur id="feGaussianBlur5" stdDeviation="1.343"/></filter><filter id="filter4498-9-5" width="1.388" height="1.396" x="-.194" y="-.198" color-interpolation-filters="sRGB"><feGaussianBlur id="feGaussianBlur6" stdDeviation="1.331"/></filter><filter id="filter1384" width="1.072" height="1.052" x="-.036" y="-.026" color-interpolation-filters="sRGB"><feGaussianBlur id="feGaussianBlur7" stdDeviation=".362"/></filter><filter id="filter986" width="1.361" height="1.188" x="-.181" y="-.094" color-interpolation-filters="sRGB"><feGaussianBlur id="feGaussianBlur8" stdDeviation=".189"/></filter><linearGradient id="linearGradient916"><stop id="stop8" offset="0" stop-color="#fffff6" stop-opacity="0"/><stop id="stop9" offset="1" stop-color="#fffff6"/></linearGradient><linearGradient xlink:href="#linearGradient916" id="linearGradient918" x1="49.119" x2="66.475" y1="177.92" y2="168.14" gradientTransform="translate(-36.753 -142.3)" gradientUnits="userSpaceOnUse"/><linearGradient xlink:href="#linearGradient916" id="linearGradient1027" x1="49.119" x2="66.475" y1="177.92" y2="168.14" gradientTransform="translate(-29.978 -153.98)" gradientUnits="userSpaceOnUse"/><linearGradient xlink:href="#linearGradient916" id="linearGradient1169" x1="49.119" x2="66.475" y1="177.92" y2="168.14" gradientTransform="translate(-9.681 -142.27)" gradientUnits="userSpaceOnUse"/><linearGradient xlink:href="#linearGradient916" id="linearGradient1219" x1="49.119" x2="66.475" y1="177.92" y2="168.14" gradientTransform="translate(-29.998 -130.64)" gradientUnits="userSpaceOnUse"/><linearGradient xlink:href="#linearGradient916" id="linearGradient1490" x1="49.119" x2="66.475" y1="177.92" y2="168.14" gradientTransform="translate(-16.575 -154.01)" gradientUnits="userSpaceOnUse"/><linearGradient id="linearGradient974" x1="7.248" x2="39.627" y1="40.091" y2="21.015" gradientTransform="translate(11.726 10.541)" gradientUnits="userSpaceOnUse"><stop id="stop10" offset="0" stop-color="#e0d1a2"/><stop id="stop11" offset=".424" stop-color="#fefdfb" stop-opacity=".992"/><stop id="stop12" offset=".519" stop-color="#d4c391" stop-opacity=".992"/><stop id="stop13" offset="1" stop-color="#fff" stop-opacity=".989"/></linearGradient><clipPath id="clipPath54"><path id="path13" fill="#ff1400" fill-rule="evenodd" d="M30.259 26.98s1.225-.284 3.285-1.408c1.222-.667 3.024-.914 1.447-3.229-1.38-2.026-5.04-2.625-8.173-.597-3.232 1.866-4.366 5.397-3.19 7.548 1.342 2.458 2.383.966 3.533.182 1.938-1.322 2.75-2.283 2.75-2.283"/></clipPath><clipPath id="clipPath57"><path id="path14" fill="#ff1700" fill-rule="evenodd" d="M30.216 27.133c-4.944 3.024-4.458 5.434-2.635 7.73s4.222 2.84 7.336.941c3.607-2.2 4.456-3.69 2.803-7.359-.706-1.567-2.853-4.157-7.504-1.312"/></clipPath><clipPath id="clipPath60"><path id="path15" fill="#ff1700" fill-rule="evenodd" d="M31.594 40.857c.542 3.352 1.366 4.464 3 7.516.834 1.558 2.543 2.941 4.735 4.27 2.053 1.246 4.993 1.891 6.64.986.92-.507 1.396-1.474 1.827-3.425.43-1.95.44-4.772-.78-7.54-1.219-2.77-3.019-5.268-5.04-6.9-2.022-1.634-4.12-2.305-6.876-1.19s-3.857 4.111-3.506 6.283"/></clipPath></defs><rect id="rect15" width="60" height="60" x="2" y="2" fill="#fff" rx="30" ry="30" style="fill:#f2f2f2"/><path id="path16" fill="#ff80f6" fill-rule="evenodd" d="m12.393 27.812 6.682-3.755 6.75 3.788.006 7.877-6.716 3.755-6.75-3.855z"/><path id="path17" fill="url(#linearGradient918)" fill-rule="evenodd" d="m12.295 27.852 6.682-3.755 6.75 3.788.006 7.877-6.716 3.755-6.75-3.855z"/><path id="path18" fill="none" stroke="#7c00ae" stroke-linecap="round" stroke-linejoin="round" stroke-width=".465" d="m25.732 35.769-3.144 1.827-3.624 2.055-3.154-1.81-3.592-2.11-.01-3.637.032-4.166 3.144-1.827 3.624-2.055 3.154 1.81 3.592 2.11.01 3.637z"/><path id="path19" fill="#80e5ff" fill-rule="evenodd" d="m32.47 16.282 6.682-3.755 6.75 3.788.005 7.877-6.715 3.755-6.75-3.855z"/><path id="path20" fill="url(#linearGradient1490)" fill-rule="evenodd" d="m32.473 16.142 6.682-3.755 6.75 3.788.005 7.877-6.715 3.755-6.75-3.855z"/><path id="path21" fill="none" stroke="#6d82e9" stroke-linecap="round" stroke-linejoin="round" stroke-width=".465" d="m45.879 24.116-3.144 1.827-3.624 2.055-3.154-1.81-3.592-2.11-.01-3.637.032-4.166 3.144-1.827 3.624-2.055 3.154 1.81 3.592 2.11.01 3.637z"/><path id="path22" fill="#8c80ff" fill-rule="evenodd" d="m19.005 16.222 6.682-3.755 6.75 3.788.006 7.877-6.716 3.755-6.75-3.855z"/><path id="path23" fill="url(#linearGradient1027)" fill-rule="evenodd" d="m19.07 16.182 6.682-3.755 6.75 3.788.005 7.877-6.715 3.755-6.75-3.855z"/><path id="path24" fill="none" stroke="#5c00dc" stroke-linecap="round" stroke-linejoin="round" stroke-width=".465" d="m32.442 24.137-3.144 1.827-3.624 2.055-3.154-1.81-3.592-2.11-.01-3.637.032-4.166 3.144-1.827 3.624-2.055 3.154 1.81 3.592 2.11.01 3.637z"/><path id="path25" fill="#a0ff80" fill-rule="evenodd" d="m39.367 27.892 6.682-3.755 6.75 3.788.006 7.877-6.716 3.755-6.75-3.855z"/><path id="path26" fill="url(#linearGradient1169)" fill-rule="evenodd" d="m39.367 27.892 6.682-3.755 6.75 3.788.006 7.877-6.716 3.755-6.75-3.855z"/><path id="path27" fill="none" stroke="#2bb477" stroke-linecap="round" stroke-linejoin="round" stroke-width=".465" d="m52.776 35.728-3.144 1.827-3.624 2.055-3.154-1.81-3.592-2.11-.01-3.637.032-4.166 3.144-1.827 3.624-2.055 3.155 1.81 3.591 2.11.01 3.637z"/><path id="path28" fill="#ff9e80" fill-rule="evenodd" d="m19.05 39.522 6.682-3.755 6.75 3.788.006 7.877-6.716 3.755-6.75-3.855z"/><path id="path29" fill="url(#linearGradient1219)" fill-rule="evenodd" d="m19.05 39.522 6.682-3.755 6.75 3.788.006 7.877-6.716 3.755-6.75-3.855z"/><path id="path30" fill="none" stroke="#cf486c" stroke-linecap="round" stroke-linejoin="round" stroke-width=".465" d="m32.536 47.372-3.144 1.827-3.624 2.055-3.154-1.81-3.592-2.11-.01-3.637.032-4.166 3.144-1.827 3.624-2.055 3.154 1.81 3.592 2.11.01 3.637z"/><path id="path31" fill-rule="evenodd" d="m25.859 27.912 6.584-3.779 6.848 3.812 2.462 9.342-8.375 4.405-7.565-6.047z"/><path id="path32" fill="#5c386c" d="M13.643 12.416c-3.232 1.866-4.3 5.88-3.191 7.548 1.387 2.085 2.17.464 1.805 3.096-.587 5.416-.988 8.282-1.3 14.303s2.188 2.436 3.876 5.986c2.383 5.014 7.683-6.384 9.916-5.662 2.247.727 5.3 1.72 5.581 1.606.23-.198 3.155-.456 3.531-2.786.375-2.317 1.184-2.518-2.195-6.923-7.404-4.296-6.642-9.228-11.019-16.197-2.268-2.512-4.608-2.484-7.004-.97z" filter="url(#filter1384)" opacity=".7" transform="translate(11.975 11.102)"/><path id="path33" fill="none" stroke="#4a2e3b" stroke-linecap="round" stroke-width=".465" d="M29.025 20.848s-.274-2.38-.177-4.702c3.354-3.647 6.842-4.332 6.842-4.332m-10.939 11.15s-1.557-1.066-3.62-2.138c-5.984-.222-8.218 1.537-8.218 1.537"/><path id="path34" fill="#75624f" fill-rule="evenodd" d="M30.259 26.98s1.225-.284 3.285-1.408c1.222-.667 3.024-.914 1.447-3.229-1.38-2.026-5.04-2.625-8.173-.597-3.232 1.866-4.366 5.397-3.19 7.548 1.342 2.458 2.383.966 3.533.182 1.938-1.322 2.75-2.283 2.75-2.283"/><path id="path35" fill="#edd57c" fill-rule="evenodd" d="M27.713 16.531c1.241-.274 7.89 2.826 9.185 3.898 1.196.991 1.294 5.974-.489 6.95-4.61 2.528-2.694.31-2.855-2.903-.058-1.18-.804-2.966-5.502-3.582-2.761-.362-4.553-3.434-.339-4.363" clip-path="url(#clipPath54)" filter="url(#filter6078)" opacity=".977"/><path id="path36" fill="#673141" d="M24.525 12.049c2.499-1.897 5.598-1.915 7.194-.432 2.05 1.907.35 2.548-.693 3.47-.555.49-1.04.87-1.454 1.174q.014-.34-.003-.7c-.057-1.139-.765-2.841-5.044-3.512" filter="url(#filter4498)" transform="scale(-1 1)rotate(75.731 -7.32 -15.136)"/><path id="path37" fill="none" stroke="#4a2e3b" stroke-width=".465" d="M30.259 26.98s1.225-.284 3.285-1.408c1.222-.667 3.024-.914 1.447-3.229-1.38-2.026-5.04-2.625-8.173-.597-3.232 1.866-4.366 5.397-3.19 7.548 1.342 2.458 2.383.966 3.533.182 1.938-1.322 2.75-2.283 2.75-2.283"/><path id="path38" fill="#75624f" fill-rule="evenodd" d="M30.013 27.122c-2.58 1.762-4.443 4.422-3.268 6.573 1.342 2.458 3.177 3.346 4.565 3.455 2.442.192 4.107-.802 4.28-.91.176-.105 1.819-1.135 2.76-3.396.535-1.285.58-3.323-.997-5.638-1.38-2.026-4.596-1.578-7.34-.084"/><path id="path39" fill="#edd57c" fill-rule="evenodd" d="M30.914 23.542c1.241-.274 8.344 1.738 9.64 2.81 1.195.991 3.17 3.56 1.388 4.537-4.61 2.527-1.646 3.253-3.33.512-1.705-2.775-2.921-4.166-7.657-4.01-4.694.155-4.255-2.92-.041-3.849" clip-path="url(#clipPath57)" filter="url(#filter6078-7)" opacity=".977"/><path id="path40" fill="#6c3142" d="M23.608 12.047c3.863-3.544 5.985-2.475 7.696-.227 1.776 2.332 1.713 4.791-.896 7.341-1.241 1.214-2.252 2.005-3.23 2.343.219-1.226.79-2.808 1.321-4.354.384-1.116.2-6.314-4.43-5.17-.158.04-.311.059-.461.067" filter="url(#filter4498-9)" transform="scale(-1 1)rotate(75.731 -12.957 -14.526)"/><path id="path41" fill="none" stroke="#4a2e3b" stroke-width=".465" d="M29.911 27.193c-2.526 1.762-4.325 4.38-3.166 6.502 1.343 2.458 3.178 3.346 4.566 3.455 2.117.167 3.65-.558 4.133-.825.46-.305 1.812-1.328 2.645-3.282.546-1.28.608-3.318-.949-5.646-1.344-2.01-4.498-1.627-7.229-.204z"/><path id="path42" fill="#75624f" fill-rule="evenodd" d="M34.481 34.992c-3.966 2.695-3.471 6.291-1.228 11.01 2.383 5.014 6.218 6.958 8.451 7.68 2.246.726 3.93.117 4.21.003.23-.198 1.54-1.42 1.916-3.75.374-2.317.39-6.616-2.988-11.02-3.179-4.147-6.155-6.225-10.36-3.922z"/><path id="path43" fill="#ffda00" fill-rule="evenodd" d="M35.575 49.346c5.576.21 8.881-.6 11.623-6.45 0 0 .7 3.376.712 5.786-2.41 3.01-4.203 3.975-9.163 3.71-2.51-1.374-3.172-3.046-3.172-3.046m-3.967-7.961c5.15-.246 8.604-2.257 10.391-5.72 0 0 1.727 1.767 3.59 4.441-2.928 4.615-5.858 6.118-12.198 6.511-1.849-3.594-1.783-5.232-1.783-5.232"/><path id="path44" fill="#edd57c" fill-rule="evenodd" d="M45.458 33.652c1.952 1.075 4.474 6.43 5.769 7.503 1.196.99-.296 16.08-2.098 17.02-3.081 1.61-2.76-6.05-2.795-9.41-.043-4.23-1.585-8.532-3.773-10.926-.908-.994-8.765-3.877-8.339-5.13.832-2.448 9.346-.098 11.236.943" clip-path="url(#clipPath60)" filter="url(#filter6078-7-5)" opacity=".977"/><path id="path45" fill="#6c3142" d="M20.32 9.178c1.812-1.902 4.644-2.12 6.5-1.316 3.115 1.352 3.988 2.424 6.544 4.76 1.304 1.193 2.223 3.19 2.97 5.64.515 1.685.596 3.75.099 5.274-1.433-2.194-2.22-3.62-3.835-6.467-.583-1.027-2.859-3.94-6.874-6.01-.788-.408-3.384-1.116-5.404-1.881" filter="url(#filter4498-9-5)" transform="scale(-1 1)rotate(75.731 -23.606 -13.204)"/><path id="path46" fill="none" stroke="#4a2e3b" stroke-width=".465" d="M34.481 34.992c-3.966 2.695-3.471 6.291-1.228 11.01 2.383 5.014 6.218 6.958 8.451 7.68 2.246.726 3.93.117 4.21.003.23-.198 1.54-1.42 1.916-3.75.374-2.317.39-6.616-2.988-11.02-3.179-4.147-6.155-6.225-10.36-3.922z"/><path id="path47" fill="url(#linearGradient974)" fill-rule="evenodd" stroke="#7d7967" stroke-width=".465" d="M26.607 29.961c-1.804.847-4.064 30.319-1.724 31.371 1.16.521 5.71.007 8.33-2.013s3.31-5.546 3.482-7.058c.344-3.025-8.284-23.147-10.088-22.3zm7.358-4.348c1.612-1.173 28.52 11.061 28.313 13.618-.103 1.268-2.747 5.006-5.78 6.327s-6.455.225-7.863-.354c-2.816-1.157-16.283-18.419-14.67-19.59z"/><path id="path48" fill="#ffcff6" d="M24.211 25.546c-.246.646-.24 1.207-.201 1.912.055.424.174.908.37 1.263.305.552.506.909 1.498 1.305-.552.462-.689.334-.79.344-.728.076-1.102-.955-1.433-1.433-.31-.366-.34-1.47-.231-1.907.15-.73.384-1.007.787-1.484" filter="url(#filter986)" opacity=".366"/><script id="mesh_polyfill" type="text/javascript">!function(){const t="http://www.w3.org/2000/svg",e="http://www.w3.org/1999/xlink",s="http://www.w3.org/1999/xhtml",r=2;if(document.createElementNS(t,"meshgradient").x)return;const n=(t,e,s,r)=>{let n=new x(.5*(e.x+s.x),.5*(e.y+s.y)),o=new x(.5*(t.x+e.x),.5*(t.y+e.y)),i=new x(.5*(s.x+r.x),.5*(s.y+r.y)),a=new x(.5*(n.x+o.x),.5*(n.y+o.y)),h=new x(.5*(n.x+i.x),.5*(n.y+i.y)),l=new x(.5*(a.x+h.x),.5*(a.y+h.y));return[[t,o,a,l],[l,h,i,r]]},o=t=>{let e=t[0].distSquared(t[1]),s=t[2].distSquared(t[3]),r=.25*t[0].distSquared(t[2]),n=.25*t[1].distSquared(t[3]),o=e>s?e:s,i=r>n?r:n;return 18*(o>i?o:i)},i=(t,e)=>Math.sqrt(t.distSquared(e)),a=(t,e)=>t.scale(2/3).add(e.scale(1/3)),h=t=>{let e,s,r,n,o,i,a,h=new g;return t.match(/(\w+\(\s*[^)]+\))+/g).forEach(t=>{let l=t.match(/[\w.-]+/g),d=l.shift();switch(d){case"translate":2===l.length?e=new g(1,0,0,1,l[0],l[1]):(console.error("mesh.js: translate does not have 2 arguments!"),e=new g(1,0,0,1,0,0)),h=h.append(e);break;case"scale":1===l.length?s=new g(l[0],0,0,l[0],0,0):2===l.length?s=new g(l[0],0,0,l[1],0,0):(console.error("mesh.js: scale does not have 1 or 2 arguments!"),s=new g(1,0,0,1,0,0)),h=h.append(s);break;case"rotate":if(3===l.length&&(e=new g(1,0,0,1,l[1],l[2]),h=h.append(e)),l[0]){r=l[0]*Math.PI/180;let t=Math.cos(r),e=Math.sin(r);Math.abs(t)<1e-16&&(t=0),Math.abs(e)<1e-16&&(e=0),a=new g(t,e,-e,t,0,0),h=h.append(a)}else console.error("math.js: No argument to rotate transform!");3===l.length&&(e=new g(1,0,0,1,-l[1],-l[2]),h=h.append(e));break;case"skewX":l[0]?(r=l[0]*Math.PI/180,n=Math.tan(r),o=new g(1,0,n,1,0,0),h=h.append(o)):console.error("math.js: No argument to skewX transform!");break;case"skewY":l[0]?(r=l[0]*Math.PI/180,n=Math.tan(r),i=new g(1,n,0,1,0,0),h=h.append(i)):console.error("math.js: No argument to skewY transform!");break;case"matrix":6===l.length?h=h.append(new g(...l)):console.error("math.js: Incorrect number of arguments for matrix!");break;default:console.error("mesh.js: Unhandled transform type: "+d)}}),h},l=t=>{let e=[],s=t.split(/[ ,]+/);for(let t=0,r=s.length-1;t<r;t+=2)e.push(new x(parseFloat(s[t]),parseFloat(s[t+1])));return e},d=(t,e)=>{for(let s in e)t.setAttribute(s,e[s])},c=(t,e,s,r,n)=>{let o,i,a=[0,0,0,0];for(let h=0;h<3;++h)e[h]<t[h]&&e[h]<s[h]||t[h]<e[h]&&s[h]<e[h]?a[h]=0:(a[h]=.5*((e[h]-t[h])/r+(s[h]-e[h])/n),o=Math.abs(3*(e[h]-t[h])/r),i=Math.abs(3*(s[h]-e[h])/n),a[h]>o?a[h]=o:a[h]>i&&(a[h]=i));return a},u=[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0],[-3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0],[2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0],[0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0],[-3,0,3,0,0,0,0,0,-2,0,-1,0,0,0,0,0],[0,0,0,0,-3,0,3,0,0,0,0,0,-2,0,-1,0],[9,-9,-9,9,6,3,-6,-3,6,-6,3,-3,4,2,2,1],[-6,6,6,-6,-3,-3,3,3,-4,4,-2,2,-2,-2,-1,-1],[2,0,-2,0,0,0,0,0,1,0,1,0,0,0,0,0],[0,0,0,0,2,0,-2,0,0,0,0,0,1,0,1,0],[-6,6,6,-6,-4,-2,4,2,-3,3,-3,3,-2,-1,-2,-1],[4,-4,-4,4,2,2,-2,-2,2,-2,2,-2,1,1,1,1]],f=t=>{let e=[];for(let s=0;s<16;++s){e[s]=0;for(let r=0;r<16;++r)e[s]+=u[s][r]*t[r]}return e},p=(t,e,s)=>{const r=e*e,n=s*s,o=e*e*e,i=s*s*s;return t[0]+t[1]*e+t[2]*r+t[3]*o+t[4]*s+t[5]*s*e+t[6]*s*r+t[7]*s*o+t[8]*n+t[9]*n*e+t[10]*n*r+t[11]*n*o+t[12]*i+t[13]*i*e+t[14]*i*r+t[15]*i*o},y=t=>{let e=[],s=[],r=[];for(let s=0;s<4;++s)e[s]=[],e[s][0]=n(t[0][s],t[1][s],t[2][s],t[3][s]),e[s][1]=[],e[s][1].push(...n(...e[s][0][0])),e[s][1].push(...n(...e[s][0][1])),e[s][2]=[],e[s][2].push(...n(...e[s][1][0])),e[s][2].push(...n(...e[s][1][1])),e[s][2].push(...n(...e[s][1][2])),e[s][2].push(...n(...e[s][1][3]));for(let t=0;t<8;++t){s[t]=[];for(let r=0;r<4;++r)s[t][r]=[],s[t][r][0]=n(e[0][2][t][r],e[1][2][t][r],e[2][2][t][r],e[3][2][t][r]),s[t][r][1]=[],s[t][r][1].push(...n(...s[t][r][0][0])),s[t][r][1].push(...n(...s[t][r][0][1])),s[t][r][2]=[],s[t][r][2].push(...n(...s[t][r][1][0])),s[t][r][2].push(...n(...s[t][r][1][1])),s[t][r][2].push(...n(...s[t][r][1][2])),s[t][r][2].push(...n(...s[t][r][1][3]))}for(let t=0;t<8;++t){r[t]=[];for(let e=0;e<8;++e)r[t][e]=[],r[t][e][0]=s[t][0][2][e],r[t][e][1]=s[t][1][2][e],r[t][e][2]=s[t][2][2][e],r[t][e][3]=s[t][3][2][e]}return r};class x{constructor(t,e){this.x=t||0,this.y=e||0}toString(){return`(x=${this.x}, y=${this.y})`}clone(){return new x(this.x,this.y)}add(t){return new x(this.x+t.x,this.y+t.y)}scale(t){return void 0===t.x?new x(this.x*t,this.y*t):new x(this.x*t.x,this.y*t.y)}distSquared(t){let e=this.x-t.x,s=this.y-t.y;return e*e+s*s}transform(t){let e=this.x*t.a+this.y*t.c+t.e,s=this.x*t.b+this.y*t.d+t.f;return new x(e,s)}}class g{constructor(t,e,s,r,n,o){void 0===t?(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0):(this.a=t,this.b=e,this.c=s,this.d=r,this.e=n,this.f=o)}toString(){return`affine: ${this.a} ${this.c} ${this.e} \n ${this.b} ${this.d} ${this.f}`}append(t){t instanceof g||console.error("mesh.js: argument to Affine.append is not affine!");let e=this.a*t.a+this.c*t.b,s=this.b*t.a+this.d*t.b,r=this.a*t.c+this.c*t.d,n=this.b*t.c+this.d*t.d,o=this.a*t.e+this.c*t.f+this.e,i=this.b*t.e+this.d*t.f+this.f;return new g(e,s,r,n,o,i)}}class w{constructor(t,e){this.nodes=t,this.colors=e}paintCurve(t,e){if(o(this.nodes)>r){const s=n(...this.nodes);let r=[[],[]],o=[[],[]];for(let t=0;t<4;++t)r[0][t]=this.colors[0][t],r[1][t]=(this.colors[0][t]+this.colors[1][t])/2,o[0][t]=r[1][t],o[1][t]=this.colors[1][t];let i=new w(s[0],r),a=new w(s[1],o);i.paintCurve(t,e),a.paintCurve(t,e)}else{let s=Math.round(this.nodes[0].x);if(s>=0&&s<e){let r=4*(~~this.nodes[0].y*e+s);t[r]=Math.round(this.colors[0][0]),t[r+1]=Math.round(this.colors[0][1]),t[r+2]=Math.round(this.colors[0][2]),t[r+3]=Math.round(this.colors[0][3])}}}}class m{constructor(t,e){this.nodes=t,this.colors=e}split(){let t=[[],[],[],[]],e=[[],[],[],[]],s=[[[],[]],[[],[]]],r=[[[],[]],[[],[]]];for(let s=0;s<4;++s){const r=n(this.nodes[0][s],this.nodes[1][s],this.nodes[2][s],this.nodes[3][s]);t[0][s]=r[0][0],t[1][s]=r[0][1],t[2][s]=r[0][2],t[3][s]=r[0][3],e[0][s]=r[1][0],e[1][s]=r[1][1],e[2][s]=r[1][2],e[3][s]=r[1][3]}for(let t=0;t<4;++t)s[0][0][t]=this.colors[0][0][t],s[0][1][t]=this.colors[0][1][t],s[1][0][t]=(this.colors[0][0][t]+this.colors[1][0][t])/2,s[1][1][t]=(this.colors[0][1][t]+this.colors[1][1][t])/2,r[0][0][t]=s[1][0][t],r[0][1][t]=s[1][1][t],r[1][0][t]=this.colors[1][0][t],r[1][1][t]=this.colors[1][1][t];return[new m(t,s),new m(e,r)]}paint(t,e){let s,n=!1;for(let t=0;t<4;++t)if((s=o([this.nodes[0][t],this.nodes[1][t],this.nodes[2][t],this.nodes[3][t]]))>r){n=!0;break}if(n){let s=this.split();s[0].paint(t,e),s[1].paint(t,e)}else{new w([...this.nodes[0]],[...this.colors[0]]).paintCurve(t,e)}}}class b{constructor(t){this.readMesh(t),this.type=t.getAttribute("type")||"bilinear"}readMesh(t){let e=[[]],s=[[]],r=Number(t.getAttribute("x")),n=Number(t.getAttribute("y"));e[0][0]=new x(r,n);let o=t.children;for(let t=0,r=o.length;t<r;++t){e[3*t+1]=[],e[3*t+2]=[],e[3*t+3]=[],s[t+1]=[];let r=o[t].children;for(let n=0,o=r.length;n<o;++n){let o=r[n].children;for(let r=0,i=o.length;r<i;++r){let i=r;0!==t&&++i;let h,d=o[r].getAttribute("path"),c="l";null!=d&&(c=(h=d.match(/\s*([lLcC])\s*(.*)/))[1]);let u=l(h[2]);switch(c){case"l":0===i?(e[3*t][3*n+3]=u[0].add(e[3*t][3*n]),e[3*t][3*n+1]=a(e[3*t][3*n],e[3*t][3*n+3]),e[3*t][3*n+2]=a(e[3*t][3*n+3],e[3*t][3*n])):1===i?(e[3*t+3][3*n+3]=u[0].add(e[3*t][3*n+3]),e[3*t+1][3*n+3]=a(e[3*t][3*n+3],e[3*t+3][3*n+3]),e[3*t+2][3*n+3]=a(e[3*t+3][3*n+3],e[3*t][3*n+3])):2===i?(0===n&&(e[3*t+3][3*n+0]=u[0].add(e[3*t+3][3*n+3])),e[3*t+3][3*n+1]=a(e[3*t+3][3*n],e[3*t+3][3*n+3]),e[3*t+3][3*n+2]=a(e[3*t+3][3*n+3],e[3*t+3][3*n])):(e[3*t+1][3*n]=a(e[3*t][3*n],e[3*t+3][3*n]),e[3*t+2][3*n]=a(e[3*t+3][3*n],e[3*t][3*n]));break;case"L":0===i?(e[3*t][3*n+3]=u[0],e[3*t][3*n+1]=a(e[3*t][3*n],e[3*t][3*n+3]),e[3*t][3*n+2]=a(e[3*t][3*n+3],e[3*t][3*n])):1===i?(e[3*t+3][3*n+3]=u[0],e[3*t+1][3*n+3]=a(e[3*t][3*n+3],e[3*t+3][3*n+3]),e[3*t+2][3*n+3]=a(e[3*t+3][3*n+3],e[3*t][3*n+3])):2===i?(0===n&&(e[3*t+3][3*n+0]=u[0]),e[3*t+3][3*n+1]=a(e[3*t+3][3*n],e[3*t+3][3*n+3]),e[3*t+3][3*n+2]=a(e[3*t+3][3*n+3],e[3*t+3][3*n])):(e[3*t+1][3*n]=a(e[3*t][3*n],e[3*t+3][3*n]),e[3*t+2][3*n]=a(e[3*t+3][3*n],e[3*t][3*n]));break;case"c":0===i?(e[3*t][3*n+1]=u[0].add(e[3*t][3*n]),e[3*t][3*n+2]=u[1].add(e[3*t][3*n]),e[3*t][3*n+3]=u[2].add(e[3*t][3*n])):1===i?(e[3*t+1][3*n+3]=u[0].add(e[3*t][3*n+3]),e[3*t+2][3*n+3]=u[1].add(e[3*t][3*n+3]),e[3*t+3][3*n+3]=u[2].add(e[3*t][3*n+3])):2===i?(e[3*t+3][3*n+2]=u[0].add(e[3*t+3][3*n+3]),e[3*t+3][3*n+1]=u[1].add(e[3*t+3][3*n+3]),0===n&&(e[3*t+3][3*n+0]=u[2].add(e[3*t+3][3*n+3]))):(e[3*t+2][3*n]=u[0].add(e[3*t+3][3*n]),e[3*t+1][3*n]=u[1].add(e[3*t+3][3*n]));break;case"C":0===i?(e[3*t][3*n+1]=u[0],e[3*t][3*n+2]=u[1],e[3*t][3*n+3]=u[2]):1===i?(e[3*t+1][3*n+3]=u[0],e[3*t+2][3*n+3]=u[1],e[3*t+3][3*n+3]=u[2]):2===i?(e[3*t+3][3*n+2]=u[0],e[3*t+3][3*n+1]=u[1],0===n&&(e[3*t+3][3*n+0]=u[2])):(e[3*t+2][3*n]=u[0],e[3*t+1][3*n]=u[1]);break;default:console.error("mesh.js: "+c+" invalid path type.")}if(0===t&&0===n||r>0){let e=window.getComputedStyle(o[r]).stopColor.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),a=window.getComputedStyle(o[r]).stopOpacity,h=255;a&&(h=Math.floor(255*a)),e&&(0===i?(s[t][n]=[],s[t][n][0]=Math.floor(e[1]),s[t][n][1]=Math.floor(e[2]),s[t][n][2]=Math.floor(e[3]),s[t][n][3]=h):1===i?(s[t][n+1]=[],s[t][n+1][0]=Math.floor(e[1]),s[t][n+1][1]=Math.floor(e[2]),s[t][n+1][2]=Math.floor(e[3]),s[t][n+1][3]=h):2===i?(s[t+1][n+1]=[],s[t+1][n+1][0]=Math.floor(e[1]),s[t+1][n+1][1]=Math.floor(e[2]),s[t+1][n+1][2]=Math.floor(e[3]),s[t+1][n+1][3]=h):3===i&&(s[t+1][n]=[],s[t+1][n][0]=Math.floor(e[1]),s[t+1][n][1]=Math.floor(e[2]),s[t+1][n][2]=Math.floor(e[3]),s[t+1][n][3]=h))}}e[3*t+1][3*n+1]=new x,e[3*t+1][3*n+2]=new x,e[3*t+2][3*n+1]=new x,e[3*t+2][3*n+2]=new x,e[3*t+1][3*n+1].x=(-4*e[3*t][3*n].x+6*(e[3*t][3*n+1].x+e[3*t+1][3*n].x)+-2*(e[3*t][3*n+3].x+e[3*t+3][3*n].x)+3*(e[3*t+3][3*n+1].x+e[3*t+1][3*n+3].x)+-1*e[3*t+3][3*n+3].x)/9,e[3*t+1][3*n+2].x=(-4*e[3*t][3*n+3].x+6*(e[3*t][3*n+2].x+e[3*t+1][3*n+3].x)+-2*(e[3*t][3*n].x+e[3*t+3][3*n+3].x)+3*(e[3*t+3][3*n+2].x+e[3*t+1][3*n].x)+-1*e[3*t+3][3*n].x)/9,e[3*t+2][3*n+1].x=(-4*e[3*t+3][3*n].x+6*(e[3*t+3][3*n+1].x+e[3*t+2][3*n].x)+-2*(e[3*t+3][3*n+3].x+e[3*t][3*n].x)+3*(e[3*t][3*n+1].x+e[3*t+2][3*n+3].x)+-1*e[3*t][3*n+3].x)/9,e[3*t+2][3*n+2].x=(-4*e[3*t+3][3*n+3].x+6*(e[3*t+3][3*n+2].x+e[3*t+2][3*n+3].x)+-2*(e[3*t+3][3*n].x+e[3*t][3*n+3].x)+3*(e[3*t][3*n+2].x+e[3*t+2][3*n].x)+-1*e[3*t][3*n].x)/9,e[3*t+1][3*n+1].y=(-4*e[3*t][3*n].y+6*(e[3*t][3*n+1].y+e[3*t+1][3*n].y)+-2*(e[3*t][3*n+3].y+e[3*t+3][3*n].y)+3*(e[3*t+3][3*n+1].y+e[3*t+1][3*n+3].y)+-1*e[3*t+3][3*n+3].y)/9,e[3*t+1][3*n+2].y=(-4*e[3*t][3*n+3].y+6*(e[3*t][3*n+2].y+e[3*t+1][3*n+3].y)+-2*(e[3*t][3*n].y+e[3*t+3][3*n+3].y)+3*(e[3*t+3][3*n+2].y+e[3*t+1][3*n].y)+-1*e[3*t+3][3*n].y)/9,e[3*t+2][3*n+1].y=(-4*e[3*t+3][3*n].y+6*(e[3*t+3][3*n+1].y+e[3*t+2][3*n].y)+-2*(e[3*t+3][3*n+3].y+e[3*t][3*n].y)+3*(e[3*t][3*n+1].y+e[3*t+2][3*n+3].y)+-1*e[3*t][3*n+3].y)/9,e[3*t+2][3*n+2].y=(-4*e[3*t+3][3*n+3].y+6*(e[3*t+3][3*n+2].y+e[3*t+2][3*n+3].y)+-2*(e[3*t+3][3*n].y+e[3*t][3*n+3].y)+3*(e[3*t][3*n+2].y+e[3*t+2][3*n].y)+-1*e[3*t][3*n].y)/9}}this.nodes=e,this.colors=s}paintMesh(t,e){let s=(this.nodes.length-1)/3,r=(this.nodes[0].length-1)/3;if("bilinear"===this.type||s<2||r<2){let n;for(let o=0;o<s;++o)for(let s=0;s<r;++s){let r=[];for(let t=3*o,e=3*o+4;t<e;++t)r.push(this.nodes[t].slice(3*s,3*s+4));let i=[];i.push(this.colors[o].slice(s,s+2)),i.push(this.colors[o+1].slice(s,s+2)),(n=new m(r,i)).paint(t,e)}}else{let n,o,a,h,l,d,u;const x=s,g=r;s++,r++;let w=new Array(s);for(let t=0;t<s;++t){w[t]=new Array(r);for(let e=0;e<r;++e)w[t][e]=[],w[t][e][0]=this.nodes[3*t][3*e],w[t][e][1]=this.colors[t][e]}for(let t=0;t<s;++t)for(let e=0;e<r;++e)0!==t&&t!==x&&(n=i(w[t-1][e][0],w[t][e][0]),o=i(w[t+1][e][0],w[t][e][0]),w[t][e][2]=c(w[t-1][e][1],w[t][e][1],w[t+1][e][1],n,o)),0!==e&&e!==g&&(n=i(w[t][e-1][0],w[t][e][0]),o=i(w[t][e+1][0],w[t][e][0]),w[t][e][3]=c(w[t][e-1][1],w[t][e][1],w[t][e+1][1],n,o));for(let t=0;t<r;++t){w[0][t][2]=[],w[x][t][2]=[];for(let e=0;e<4;++e)n=i(w[1][t][0],w[0][t][0]),o=i(w[x][t][0],w[x-1][t][0]),w[0][t][2][e]=n>0?2*(w[1][t][1][e]-w[0][t][1][e])/n-w[1][t][2][e]:0,w[x][t][2][e]=o>0?2*(w[x][t][1][e]-w[x-1][t][1][e])/o-w[x-1][t][2][e]:0}for(let t=0;t<s;++t){w[t][0][3]=[],w[t][g][3]=[];for(let e=0;e<4;++e)n=i(w[t][1][0],w[t][0][0]),o=i(w[t][g][0],w[t][g-1][0]),w[t][0][3][e]=n>0?2*(w[t][1][1][e]-w[t][0][1][e])/n-w[t][1][3][e]:0,w[t][g][3][e]=o>0?2*(w[t][g][1][e]-w[t][g-1][1][e])/o-w[t][g-1][3][e]:0}for(let s=0;s<x;++s)for(let r=0;r<g;++r){let n=i(w[s][r][0],w[s+1][r][0]),o=i(w[s][r+1][0],w[s+1][r+1][0]),c=i(w[s][r][0],w[s][r+1][0]),x=i(w[s+1][r][0],w[s+1][r+1][0]),g=[[],[],[],[]];for(let t=0;t<4;++t){(d=[])[0]=w[s][r][1][t],d[1]=w[s+1][r][1][t],d[2]=w[s][r+1][1][t],d[3]=w[s+1][r+1][1][t],d[4]=w[s][r][2][t]*n,d[5]=w[s+1][r][2][t]*n,d[6]=w[s][r+1][2][t]*o,d[7]=w[s+1][r+1][2][t]*o,d[8]=w[s][r][3][t]*c,d[9]=w[s+1][r][3][t]*x,d[10]=w[s][r+1][3][t]*c,d[11]=w[s+1][r+1][3][t]*x,d[12]=0,d[13]=0,d[14]=0,d[15]=0,u=f(d);for(let e=0;e<9;++e){g[t][e]=[];for(let s=0;s<9;++s)g[t][e][s]=p(u,e/8,s/8),g[t][e][s]>255?g[t][e][s]=255:g[t][e][s]<0&&(g[t][e][s]=0)}}h=[];for(let t=3*s,e=3*s+4;t<e;++t)h.push(this.nodes[t].slice(3*r,3*r+4));l=y(h);for(let s=0;s<8;++s)for(let r=0;r<8;++r)(a=new m(l[s][r],[[[g[0][s][r],g[1][s][r],g[2][s][r],g[3][s][r]],[g[0][s][r+1],g[1][s][r+1],g[2][s][r+1],g[3][s][r+1]]],[[g[0][s+1][r],g[1][s+1][r],g[2][s+1][r],g[3][s+1][r]],[g[0][s+1][r+1],g[1][s+1][r+1],g[2][s+1][r+1],g[3][s+1][r+1]]]])).paint(t,e)}}}transform(t){if(t instanceof x)for(let e=0,s=this.nodes.length;e<s;++e)for(let s=0,r=this.nodes[0].length;s<r;++s)this.nodes[e][s]=this.nodes[e][s].add(t);else if(t instanceof g)for(let e=0,s=this.nodes.length;e<s;++e)for(let s=0,r=this.nodes[0].length;s<r;++s)this.nodes[e][s]=this.nodes[e][s].transform(t)}scale(t){for(let e=0,s=this.nodes.length;e<s;++e)for(let s=0,r=this.nodes[0].length;s<r;++s)this.nodes[e][s]=this.nodes[e][s].scale(t)}}document.querySelectorAll("rect,circle,ellipse,path,text").forEach((r,n)=>{let o=r.getAttribute("id");o||(o="patchjs_shape"+n,r.setAttribute("id",o));const i=r.style.fill.match(/^url\(\s*"?\s*#([^\s"]+)"?\s*\)/),a=r.style.stroke.match(/^url\(\s*"?\s*#([^\s"]+)"?\s*\)/);if(i&&i[1]){const a=document.getElementById(i[1]);if(a&&"meshgradient"===a.nodeName){const i=r.getBBox();let l=document.createElementNS(s,"canvas");d(l,{width:i.width,height:i.height});const c=l.getContext("2d");let u=c.createImageData(i.width,i.height);const f=new b(a);"objectBoundingBox"===a.getAttribute("gradientUnits")&&f.scale(new x(i.width,i.height));const p=a.getAttribute("gradientTransform");null!=p&&f.transform(h(p)),"userSpaceOnUse"===a.getAttribute("gradientUnits")&&f.transform(new x(-i.x,-i.y)),f.paintMesh(u.data,l.width),c.putImageData(u,0,0);const y=document.createElementNS(t,"image");d(y,{width:i.width,height:i.height,x:i.x,y:i.y});let g=l.toDataURL();y.setAttributeNS(e,"xlink:href",g),r.parentNode.insertBefore(y,r),r.style.fill="none";const w=document.createElementNS(t,"use");w.setAttributeNS(e,"xlink:href","#"+o);const m="patchjs_clip"+n,M=document.createElementNS(t,"clipPath");M.setAttribute("id",m),M.appendChild(w),r.parentElement.insertBefore(M,r),y.setAttribute("clip-path","url(#"+m+")"),u=null,l=null,g=null}}if(a&&a[1]){const o=document.getElementById(a[1]);if(o&&"meshgradient"===o.nodeName){const i=parseFloat(r.style.strokeWidth.slice(0,-2))*(parseFloat(r.style.strokeMiterlimit)||parseFloat(r.getAttribute("stroke-miterlimit"))||1),a=r.getBBox(),l=Math.trunc(a.width+i),c=Math.trunc(a.height+i),u=Math.trunc(a.x-i/2),f=Math.trunc(a.y-i/2);let p=document.createElementNS(s,"canvas");d(p,{width:l,height:c});const y=p.getContext("2d");let g=y.createImageData(l,c);const w=new b(o);"objectBoundingBox"===o.getAttribute("gradientUnits")&&w.scale(new x(l,c));const m=o.getAttribute("gradientTransform");null!=m&&w.transform(h(m)),"userSpaceOnUse"===o.getAttribute("gradientUnits")&&w.transform(new x(-u,-f)),w.paintMesh(g.data,p.width),y.putImageData(g,0,0);const M=document.createElementNS(t,"image");d(M,{width:l,height:c,x:0,y:0});let S=p.toDataURL();M.setAttributeNS(e,"xlink:href",S);const k="pattern_clip"+n,A=document.createElementNS(t,"pattern");d(A,{id:k,patternUnits:"userSpaceOnUse",width:l,height:c,x:u,y:f}),A.appendChild(M),o.parentNode.appendChild(A),r.style.stroke="url(#"+k+")",g=null,p=null,S=null}}})}();</script></svg> |