Spaces:
Running
Running
| const v=Object.freeze({left:0,top:0,width:16,height:16}),w=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),k=Object.freeze({...v,...w}),T=Object.freeze({...k,body:"",hidden:!1}),E=Object.freeze({width:null,height:null}),M=Object.freeze({...E,...w}),L=(t,s,i,n="")=>{const e=t.split(":");if(t.slice(0,1)==="@"){if(e.length<2||e.length>3)return null;n=e.shift().slice(1)}if(e.length>3||!e.length)return null;if(e.length>1){const l=e.pop(),u=e.pop(),h={provider:e.length>0?e[0]:n,prefix:u,name:l};return S(h)?h:null}const r=e[0],o=r.split("-");if(o.length>1){const l={provider:n,prefix:o.shift(),name:o.join("-")};return S(l)?l:null}if(i&&n===""){const l={provider:n,prefix:"",name:r};return S(l,i)?l:null}return null},S=(t,s)=>t?!!((s&&t.prefix===""||t.prefix)&&t.name):!1;function P(t,s){const i={};!t.hFlip!=!s.hFlip&&(i.hFlip=!0),!t.vFlip!=!s.vFlip&&(i.vFlip=!0);const n=((t.rotate||0)+(s.rotate||0))%4;return n&&(i.rotate=n),i}function b(t,s){const i=P(t,s);for(const n in T)n in w?n in t&&!(n in i)&&(i[n]=w[n]):n in s?i[n]=s[n]:n in t&&(i[n]=t[n]);return i}function C(t,s){const i=t.icons,n=t.aliases||Object.create(null),e=Object.create(null);function r(o){if(i[o])return e[o]=[];if(!(o in e)){e[o]=null;const l=n[o]&&n[o].parent,u=l&&r(l);u&&(e[o]=[l].concat(u))}return e[o]}return(s||Object.keys(i).concat(Object.keys(n))).forEach(r),e}function F(t,s,i){const n=t.icons,e=t.aliases||Object.create(null);let r={};function o(l){r=b(n[l]||e[l],r)}return o(s),i.forEach(o),b(t,r)}function R(t,s){if(t.icons[s])return F(t,s,[]);const i=C(t,[s])[s];return i?F(t,s,i):null}const $=/(-?[0-9.]*[0-9]+[0-9.]*)/g,y=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function j(t,s,i){if(s===1)return t;if(i=i||100,typeof t=="number")return Math.ceil(t*s*i)/i;if(typeof t!="string")return t;const n=t.split($);if(n===null||!n.length)return t;const e=[];let r=n.shift(),o=y.test(r);for(;;){if(o){const l=parseFloat(r);isNaN(l)?e.push(r):e.push(Math.ceil(l*s*i)/i)}else e.push(r);if(r=n.shift(),r===void 0)return e.join("");o=!o}}function G(t,s="defs"){let i="";const n=t.indexOf("<"+s);for(;n>=0;){const e=t.indexOf(">",n),r=t.indexOf("</"+s);if(e===-1||r===-1)break;const o=t.indexOf(">",r);if(o===-1)break;i+=t.slice(e+1,r).trim(),t=t.slice(0,n).trim()+t.slice(o+1)}return{defs:i,content:t}}function H(t,s){return t?"<defs>"+t+"</defs>"+s:s}function V(t,s,i){const n=G(t);return H(n.defs,s+n.content+i)}const z=t=>t==="unset"||t==="undefined"||t==="none";function W(t,s){const i={...k,...t},n={...M,...s},e={left:i.left,top:i.top,width:i.width,height:i.height};let r=i.body;[i,n].forEach(g=>{const c=[],D=g.hFlip,O=g.vFlip;let a=g.rotate;D?O?a+=2:(c.push("translate("+(e.width+e.left).toString()+" "+(0-e.top).toString()+")"),c.push("scale(-1 1)"),e.top=e.left=0):O&&(c.push("translate("+(0-e.left).toString()+" "+(e.height+e.top).toString()+")"),c.push("scale(1 -1)"),e.top=e.left=0);let f;switch(a<0&&(a-=Math.floor(a/4)*4),a=a%4,a){case 1:f=e.height/2+e.top,c.unshift("rotate(90 "+f.toString()+" "+f.toString()+")");break;case 2:c.unshift("rotate(180 "+(e.width/2+e.left).toString()+" "+(e.height/2+e.top).toString()+")");break;case 3:f=e.width/2+e.left,c.unshift("rotate(-90 "+f.toString()+" "+f.toString()+")");break}a%2===1&&(e.left!==e.top&&(f=e.left,e.left=e.top,e.top=f),e.width!==e.height&&(f=e.width,e.width=e.height,e.height=f)),c.length&&(r=V(r,'<g transform="'+c.join(" ")+'">',"</g>"))});const o=n.width,l=n.height,u=e.width,h=e.height;let p,d;o===null?(d=l===null?"1em":l==="auto"?h:l,p=j(d,u/h)):(p=o==="auto"?u:o,d=l===null?j(p,h/u):l==="auto"?h:l);const x={},I=(g,c)=>{z(c)||(x[g]=c.toString())};I("width",p),I("height",d);const m=[e.left,e.top,u,h];return x.viewBox=m.join(" "),{attributes:x,viewBox:m,body:r}}const A=/\sid="(\S+)"/g,N="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let B=0;function K(t,s=N){const i=[];let n;for(;n=A.exec(t);)i.push(n[1]);if(!i.length)return t;const e="suffix"+(Math.random()*16777216|Date.now()).toString(16);return i.forEach(r=>{const o=typeof s=="function"?s(r):s+(B++).toString(),l=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+o+e+"$3")}),t=t.replace(new RegExp(e,"g"),""),t}function U(t,s){let i=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in s)i+=" "+n+'="'+s[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+t+"</svg>"}export{U as a,R as g,W as i,K as r,L as s}; | |
| //# sourceMappingURL=@iconify-D2F_yRRF.js.map | |