/**
* (c) Iconify
*
* For the full copyright and license information, please view the license.txt or license.gpl.txt
* files at https://github.com/iconify/iconify
*
* Licensed under Apache 2.0 or GPL 2.0 at your option.
* If derivative product is not compatible with one of licenses, you can pick one of licenses.
*
* @license Apache 2.0
* @license GPL 2.0
* @version 2.2.1
*/const $=/^[a-z0-9]+(-[a-z0-9]+)*$/,w=Object.freeze({left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1});function we(e){return{...w,...e}}function pt(e,t){const n={...e};for(const s in w){const o=s;if(t[o]!==void 0){const r=t[o];if(n[o]===void 0){n[o]=r;continue}switch(o){case"rotate":n[o]=(n[o]+r)%4;break;case"hFlip":case"vFlip":n[o]=r!==n[o];break;default:n[o]=r}}}return n}function ke(e,t,n=!1){function s(r,i){if(e.icons[r]!==void 0)return Object.assign({},e.icons[r]);if(i>5)return null;const c=e.aliases;if(c&&c[r]!==void 0){const l=c[r],a=s(l.parent,i+1);return a&&pt(a,l)}const f=e.chars;return!i&&f&&f[r]!==void 0?s(f[r],i+1):null}const o=s(t,0);if(o)for(const r in w)o[r]===void 0&&e[r]!==void 0&&(o[r]=e[r]);return o&&n?we(o):o}function gt(e){for(const t in w)if(e[t]!==void 0)return!0;return!1}function Re(e,t,n){n=n||{};const s=[];if(typeof e!="object"||typeof e.icons!="object")return s;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),s.push(i)});const o=e.icons;Object.keys(o).forEach(i=>{const c=ke(e,i,!0);c&&(t(i,c),s.push(i))});const r=n.aliases||"all";if(r!=="none"&&typeof e.aliases=="object"){const i=e.aliases;Object.keys(i).forEach(c=>{if(r==="variations"&&gt(i[c]))return;const f=ke(e,c,!0);f&&(t(c,f),s.push(c))})}return s}const ue={provider:"string",aliases:"object",not_found:"object"};for(const e in w)ue[e]=typeof w[e];function qe(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object")return null;for(const o in ue)if(e[o]!==void 0&&typeof e[o]!==ue[o])return null;const n=t.icons;for(const o in n){const r=n[o];if(!o.match($)||typeof r.body!="string")return null;for(const i in w)if(r[i]!==void 0&&typeof r[i]!=typeof w[i])return null}const s=t.aliases;if(s)for(const o in s){const r=s[o],i=r.parent;if(!o.match($)||typeof i!="string"||!n[i]&&!s[i])return null;for(const c in w)if(r[c]!==void 0&&typeof r[c]!=typeof w[c])return null}return t}const L=(e,t,n,s="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),f=o.pop(),l={provider:o.length>0?o[0]:s,prefix:f,name:c};return t&&!F(l)?null:l}const r=o[0],i=r.split("-");if(i.length>1){const c={provider:s,prefix:i.shift(),name:i.join("-")};return t&&!F(c)?null:c}if(n&&s===""){const c={provider:s,prefix:"",name:r};return t&&!F(c,n)?null:c}return null},F=(e,t)=>e?!!((e.provider===""||e.provider.match($))&&(t&&e.prefix===""||e.prefix.match($))&&e.name.match($)):!1,_e=1;let E=Object.create(null);try{const e=window||self;e&&e._iconifyStorage.version===_e&&(E=e._iconifyStorage.storage)}catch(e){}function yt(){try{const e=window||self;e&&!e._iconifyStorage&&(e._iconifyStorage={version:_e,storage:E})}catch(e){}}function mt(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:Object.create(null)}}function j(e,t){E[e]===void 0&&(E[e]=Object.create(null));const n=E[e];return n[t]===void 0&&(n[t]=mt(e,t)),n[t]}function Ie(e,t){if(!qe(t))return[];const n=Date.now();return Re(t,(s,o)=>{o?e.icons[s]=o:e.missing[s]=n})}function bt(e,t,n){try{if(typeof n.body=="string")return e.icons[t]=Object.freeze(we(n)),!0}catch(s){}return!1}function je(e,t){const n=e.icons[t];return n===void 0?null:n}function vt(e,t){let n=[],s;return typeof e=="string"?s=[e]:s=Object.keys(E),s.forEach(o=>{let r;typeof o=="string"&&typeof t=="string"?r=[t]:r=E[o]===void 0?[]:Object.keys(E[o]),r.forEach(i=>{const c=j(o,i),f=Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+i+":"+l);n=n.concat(f)})}),n}let B=!1;function wt(e){return typeof e=="boolean"&&(B=e),B}function ne(e){const t=typeof e=="string"?L(e,!0,B):e;return t?je(j(t.provider,t.prefix),t.name):null}function Ue(e,t){const n=L(e,!0,B);if(!n)return!1;const s=j(n.provider,n.prefix);return bt(s,n.name,t)}function $e(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=typeof e.provider=="string"?e.provider:""),B&&t===""&&(typeof e.prefix!="string"||e.prefix==="")){let s=!1;return qe(e)&&(e.prefix="",Re(e,(o,r)=>{r&&Ue(o,r)&&(s=!0)})),s}if(typeof e.prefix!="string"||!F({provider:t,prefix:e.prefix,name:"a"}))return!1;const n=j(t,e.prefix);return!!Ie(n,e)}function It(e){return ne(e)!==null}function jt(e){const t=ne(e);return t?{...t}:null}const H=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});function oe(e,t){const n={};for(const s in e){const o=s;if(n[o]=e[o],t[o]===void 0)continue;const r=t[o];switch(o){case"inline":case"slice":typeof r=="boolean"&&(n[o]=r);break;case"hFlip":case"vFlip":r===!0&&(n[o]=!n[o]);break;case"hAlign":case"vAlign":typeof r=="string"&&r!==""&&(n[o]=r);break;case"width":case"height":(typeof r=="string"&&r!==""||typeof r=="number"&&r||r===null)&&(n[o]=r);break;case"rotate":typeof r=="number"&&(n[o]+=r);break}}return n}const xt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,St=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function W(e,t,n){if(t===1)return e;if(n=n===void 0?100:n,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const s=e.split(xt);if(s===null||!s.length)return e;const o=[];let r=s.shift(),i=St.test(r);for(;;){if(i){const c=parseFloat(r);isNaN(c)?o.push(r):o.push(Math.ceil(c*t*n)/n)}else o.push(r);if(r=s.shift(),r===void 0)return o.join("");i=!i}}function Ot(e){let t="";switch(e.hAlign){case"left":t+="xMin";break;case"right":t+="xMax";break;default:t+="xMid"}switch(e.vAlign){case"top":t+="YMin";break;case"bottom":t+="YMax";break;default:t+="YMid"}return t+=e.slice?" slice":" meet",t}function xe(e,t){const n={left:e.left,top:e.top,width:e.width,height:e.height};let s=e.body;[e,t].forEach(c=>{const f=[],l=c.hFlip,a=c.vFlip;let u=c.rotate;l?a?u+=2:(f.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),f.push("scale(-1 1)"),n.top=n.left=0):a&&(f.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),f.push("scale(1 -1)"),n.top=n.left=0);let d;switch(u<0&&(u-=Math.floor(u/4)*4),u=u%4,u){case 1:d=n.height/2+n.top,f.unshift("rotate(90 "+d.toString()+" "+d.toString()+")");break;case 2:f.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:d=n.width/2+n.left,f.unshift("rotate(-90 "+d.toString()+" "+d.toString()+")");break}u%2===1&&((n.left!==0||n.top!==0)&&(d=n.left,n.left=n.top,n.top=d),n.width!==n.height&&(d=n.width,n.width=n.height,n.height=d)),f.length&&(s='<g transform="'+f.join(" ")+'">'+s+"</g>")});let o,r;t.width===null&&t.height===null?(r="1em",o=W(r,n.width/n.height)):t.width!==null&&t.height!==null?(o=t.width,r=t.height):t.height!==null?(r=t.height,o=W(r,n.width/n.height)):(o=t.width,r=W(o,n.height/n.width)),o==="auto"&&(o=n.width),r==="auto"&&(r=n.height),o=typeof o=="string"?o:o.toString()+"",r=typeof r=="string"?r:r.toString()+"";const i={attributes:{width:o,height:r,preserveAspectRatio:Ot(t),viewBox:n.left.toString()+" "+n.top.toString()+" "+n.width.toString()+" "+n.height.toString()},body:s};return t.inline&&(i.inline=!0),i}function Et(e,t){return xe(we(e),t?oe(H,t):H)}const At=/\sid="(\S+)"/g,kt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ct=0;function Qe(e,t=kt){const n=[];let s;for(;s=At.exec(e);)n.push(s[1]);return n.length&&n.forEach(o=>{const r=typeof t=="function"?t(o):t+(Ct++).toString(),i=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+"$3")}),e}const Ve="iconify2",K="iconify",Be=K+"-count",He=K+"-version",Ke=36e5,Pt=168,M={local:!0,session:!0};let de=!1;const Ge={local:0,session:0},Ye={local:[],session:[]};let J=typeof window=="undefined"?{}:window;function ze(e){const t=e+"Storage";try{if(J&&J[t]&&typeof J[t].length=="number")return J[t]}catch(n){}return M[e]=!1,null}function Se(e,t,n){try{return e.setItem(Be,n.toString()),Ge[t]=n,!0}catch(s){return!1}}function Je(e){const t=e.getItem(Be);if(t){const n=parseInt(t);return n||0}return 0}function Tt(e,t){try{e.setItem(He,Ve)}catch(n){}Se(e,t,0)}function Ft(e){try{const t=Je(e);for(let n=0;n<t;n++)e.removeItem(K+n.toString())}catch(t){}}const We=()=>{if(de)return;de=!0;const e=Math.floor(Date.now()/Ke)-Pt;function t(n){const s=ze(n);if(!s)return;const o=r=>{const i=K+r.toString(),c=s.getItem(i);if(typeof c!="string")return!1;let f=!0;try{const l=JSON.parse(c);if(typeof l!="object"||typeof l.cached!="number"||l.cached<e||typeof l.provider!="string"||typeof l.data!="object"||typeof l.data.prefix!="string")f=!1;else{const a=l.provider,u=l.data.prefix,d=j(a,u);f=Ie(d,l.data).length>0}}catch(l){f=!1}return f||s.removeItem(i),f};try{const r=s.getItem(He);if(r!==Ve){r&&Ft(s),Tt(s,n);return}let i=Je(s);for(let c=i-1;c>=0;c--)o(c)||(c===i-1?i--:Ye[n].push(c));Se(s,n,i)}catch(r){}}for(const n in M)t(n)},Mt=(e,t)=>{de||We();function n(s){if(!M[s])return!1;const o=ze(s);if(!o)return!1;let r=Ye[s].shift();if(r===void 0&&(r=Ge[s],!Se(o,s,r+1)))return!1;try{const i={cached:Math.floor(Date.now()/Ke),provider:e,data:t};o.setItem(K+r.toString(),JSON.stringify(i))}catch(i){return!1}return!0}!Object.keys(t.icons).length||(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))},he={};function Xe(e,t){switch(e){case"local":case"session":M[e]=t;break;case"all":for(const n in M)M[n]=t;break}}const pe=Object.create(null);function Ze(e,t){pe[e]=t}function ge(e){return pe[e]||pe[""]}function Oe(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path===void 0?"/":e.path,maxURL:e.maxURL?e.maxURL:500,rotate:e.rotate?e.rotate:750,timeout:e.timeout?e.timeout:5e3,random:e.random===!0,index:e.index?e.index:0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const re=Object.create(null),q=["https://api.simplesvg.com","https://api.unisvg.com"],X=[];for(;q.length>0;)q.length===1||Math.random()>.5?X.push(q.shift()):X.push(q.pop());re[""]=Oe({resources:["https://api.iconify.design"].concat(X)});function et(e,t){const n=Oe(t);return n===null?!1:(re[e]=n,!0)}function se(e){return re[e]}function Nt(){return Object.keys(re)}const Ee=(e,t)=>{let n=e,s=n.indexOf("?")!==-1;function o(r){switch(typeof r){case"boolean":return r?"true":"false";case"number":return encodeURIComponent(r);case"string":return encodeURIComponent(r);default:throw new Error("Invalid parameter")}}return Object.keys(t).forEach(r=>{let i;try{i=o(t[r])}catch(c){return}n+=(s?"&":"?")+encodeURIComponent(r)+"="+i,s=!0}),n},tt={},Z={},Lt=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch(t){}return null};let ee=Lt();function Dt(e){ee=e}function Rt(){return ee}function qt(e,t){const n=se(e);if(!n)return 0;let s;if(!n.maxURL)s=0;else{let r=0;n.resources.forEach(c=>{r=Math.max(r,c.length)});const i=Ee(t+".json",{icons:""});s=n.maxURL-r-n.path.length-i.length}const o=e+":"+t;return Z[e]=n.path,tt[o]=s,s}function _t(e){return e===404}const Ut=(e,t,n)=>{const s=[];let o=tt[t];o===void 0&&(o=qt(e,t));const r="icons";let i={type:r,provider:e,prefix:t,icons:[]},c=0;return n.forEach((f,l)=>{c+=f.length+1,c>=o&&l>0&&(s.push(i),i={type:r,provider:e,prefix:t,icons:[]},c=f.length),i.icons.push(f)}),s.push(i),s};function $t(e){if(typeof e=="string"){if(Z[e]===void 0){const t=se(e);if(!t)return"/";Z[e]=t.path}return Z[e]}return"/"}const Qt=(e,t,n)=>{if(!ee){n("abort",424);return}let s=$t(t.provider);switch(t.type){case"icons":{const r=t.prefix,c=t.icons.join(",");s+=Ee(r+".json",{icons:c});break}case"custom":{const r=t.uri;s+=r.slice(0,1)==="/"?r.slice(1):r;break}default:n("abort",400);return}let o=503;ee(e+s).then(r=>{const i=r.status;if(i!==200){setTimeout(()=>{n(_t(i)?"abort":"next",i)});return}return o=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{n("next",o)});return}setTimeout(()=>{n("success",r)})}).catch(()=>{n("next",o)})},Vt={prepare:Ut,send:Qt};function Bt(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,r)=>o.provider!==r.provider?o.provider.localeCompare(r.provider):o.prefix!==r.prefix?o.prefix.localeCompare(r.prefix):o.name.localeCompare(r.name));let s={provider:"",prefix:"",name:""};return e.forEach(o=>{if(s.name===o.name&&s.prefix===o.prefix&&s.provider===o.provider)return;s=o;const r=o.provider,i=o.prefix,c=o.name;n[r]===void 0&&(n[r]=Object.create(null));const f=n[r];f[i]===void 0&&(f[i]=j(r,i));const l=f[i];let a;l.icons[c]!==void 0?a=t.loaded:i===""||l.missing[c]!==void 0?a=t.missing:a=t.pending;const u={provider:r,prefix:i,name:c};a.push(u)}),t}const A=Object.create(null),ie=Object.create(null);function nt(e,t){e.forEach(n=>{const s=n.provider;if(A[s]===void 0)return;const o=A[s],r=n.prefix,i=o[r];i&&(o[r]=i.filter(c=>c.id!==t))})}function Ht(e,t){ie[e]===void 0&&(ie[e]=Object.create(null));const n=ie[e];n[t]||(n[t]=!0,setTimeout(()=>{if(n[t]=!1,A[e]===void 0||A[e][t]===void 0)return;const s=A[e][t].slice(0);if(!s.length)return;const o=j(e,t);let r=!1;s.forEach(i=>{const c=i.icons,f=c.pending.length;c.pending=c.pending.filter(l=>{if(l.prefix!==t)return!0;const a=l.name;if(o.icons[a]!==void 0)c.loaded.push({provider:e,prefix:t,name:a});else if(o.missing[a]!==void 0)c.missing.push({provider:e,prefix:t,name:a});else return r=!0,!0;return!1}),c.pending.length!==f&&(r||nt([{provider:e,prefix:t}],i.id),i.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),i.abort))})}))}let Kt=0;function Gt(e,t,n){const s=Kt++,o=nt.bind(null,n,s);if(!t.pending.length)return o;const r={id:s,icons:t,callback:e,abort:o};return n.forEach(i=>{const c=i.provider,f=i.prefix;A[c]===void 0&&(A[c]=Object.create(null));const l=A[c];l[f]===void 0&&(l[f]=[]),l[f].push(r)}),o}function Yt(e,t=!0,n=!1){const s=[];return e.forEach(o=>{const r=typeof o=="string"?L(o,!1,n):o;(!t||F(r,n))&&s.push({provider:r.provider,prefix:r.prefix,name:r.name})}),s}var Ce={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function zt(e,t,n,s){const o=e.resources.length,r=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let p=e.resources.slice(0);for(i=[];p.length>1;){const m=Math.floor(Math.random()*p.length);i.push(p[m]),p=p.slice(0,m).concat(p.slice(m+1))}i=i.concat(p)}else i=e.resources.slice(r).concat(e.resources.slice(0,r));const c=Date.now();let f="pending",l=0,a,u=null,d=[],h=[];typeof s=="function"&&h.push(s);function g(){u&&(clearTimeout(u),u=null)}function y(){f==="pending"&&(f="aborted"),g(),d.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),d=[]}function D(p,m){m&&(h=[]),typeof p=="function"&&h.push(p)}function b(){return{startTime:c,payload:t,status:f,queriesSent:l,queriesPending:d.length,subscribe:D,abort:y}}function x(){f="failed",h.forEach(p=>{p(void 0,a)})}function v(){d.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),d=[]}function S(p,m,R){const z=m!=="success";switch(d=d.filter(k=>k!==p),f){case"pending":break;case"failed":if(z||!e.dataAfterTimeout)return;break;default:return}if(m==="abort"){a=R,x();return}if(z){a=R,d.length||(i.length?O():x());return}if(g(),v(),!e.random){const k=e.resources.indexOf(p.resource);k!==-1&&k!==e.index&&(e.index=k)}f="completed",h.forEach(k=>{k(R)})}function O(){if(f!=="pending")return;g();const p=i.shift();if(p===void 0){if(d.length){u=setTimeout(()=>{g(),f==="pending"&&(v(),x())},e.timeout);return}x();return}const m={status:"pending",resource:p,callback:(R,z)=>{S(m,R,z)}};d.push(m),l++,u=setTimeout(O,e.rotate),n(p,t,m.callback)}return setTimeout(O),b}function Jt(e){if(typeof e!="object"||typeof e.resources!="object"||!(e.resources instanceof Array)||!e.resources.length)throw new Error("Invalid Reduncancy configuration");const t=Object.create(null);let n;for(n in Ce)e[n]!==void 0?t[n]=e[n]:t[n]=Ce[n];return t}function ot(e){const t=Jt(e);let n=[];function s(){n=n.filter(c=>c().status==="pending")}function o(c,f,l){const a=zt(t,c,f,(u,d)=>{s(),l&&l(u,d)});return n.push(a),a}function r(c){const f=n.find(l=>c(l));return f!==void 0?f:null}return{query:o,find:r,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:s}}function Pe(){}const ce=Object.create(null);function Wt(e){if(ce[e]===void 0){const t=se(e);if(!t)return;const n=ot(t),s={config:t,redundancy:n};ce[e]=s}return ce[e]}function rt(e,t,n){let s,o;if(typeof e=="string"){const r=ge(e);if(!r)return n(void 0,424),Pe;o=r.send;const i=Wt(e);i&&(s=i.redundancy)}else{const r=Oe(e);if(r){s=ot(r);const i=e.resources?e.resources[0]:"",c=ge(i);c&&(o=c.send)}}return!s||!o?(n(void 0,424),Pe):s.query(t,o,n)().abort}function Te(){}const I=Object.create(null),fe=Object.create(null),le=Object.create(null),ae=Object.create(null);function Xt(e,t){le[e]===void 0&&(le[e]=Object.create(null));const n=le[e];n[t]||(n[t]=!0,setTimeout(()=>{n[t]=!1,Ht(e,t)}))}const Fe=Object.create(null);function Zt(e,t,n){function s(){const c=(e===""?"":"@"+e+":")+t,f=Math.floor(Date.now()/6e4);Fe[c]<f&&(Fe[c]=f,console.error('Unable to retrieve icons for "'+c+'" because API is not configured properly.'))}fe[e]===void 0&&(fe[e]=Object.create(null));const o=fe[e];ae[e]===void 0&&(ae[e]=Object.create(null));const r=ae[e];I[e]===void 0&&(I[e]=Object.create(null));const i=I[e];o[t]===void 0?o[t]=n:o[t]=o[t].concat(n).sort(),r[t]||(r[t]=!0,setTimeout(()=>{r[t]=!1;const c=o[t];delete o[t];const f=ge(e);if(!f){s();return}f.prepare(e,t,c).forEach(a=>{rt(e,a,(u,d)=>{const h=j(e,t);if(typeof u!="object"){if(d!==404)return;const g=Date.now();a.icons.forEach(y=>{h.missing[y]=g})}else try{const g=Ie(h,u);if(!g.length)return;const y=i[t];g.forEach(D=>{delete y[D]}),he.store&&he.store(e,u)}catch(g){console.error(g)}Xt(e,t)})})}))}const Me=e=>{const t=e.provider,n=e.prefix;return I[t]&&I[t][n]&&I[t][n][e.name]!==void 0},Ae=(e,t)=>{const n=Yt(e,!0,wt()),s=Bt(n);if(!s.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(s.loaded,s.missing,s.pending,Te)}),()=>{l=!1}}const o=Object.create(null),r=[];let i,c;s.pending.forEach(l=>{const a=l.provider,u=l.prefix;if(u===c&&a===i)return;i=a,c=u,r.push({provider:a,prefix:u}),I[a]===void 0&&(I[a]=Object.create(null));const d=I[a];d[u]===void 0&&(d[u]=Object.create(null)),o[a]===void 0&&(o[a]=Object.create(null));const h=o[a];h[u]===void 0&&(h[u]=[])});const f=Date.now();return s.pending.forEach(l=>{const a=l.provider,u=l.prefix,d=l.name,h=I[a][u];h[d]===void 0&&(h[d]=f,o[a][u].push(d))}),r.forEach(l=>{const a=l.provider,u=l.prefix;o[a][u].length&&Zt(a,u,o[a][u])}),t?Gt(t,s,r):Te},en=e=>new Promise((t,n)=>{const s=typeof e=="string"?L(e):e;Ae([s||e],o=>{if(o.length&&s){const r=j(s.provider,s.prefix),i=je(r,s.name);if(i){t(i);return}}n(e)})}),T="iconifyFinder"+Date.now(),Q="iconifyData"+Date.now();function st(e,t,n,s){let o;try{o=document.createElement("span")}catch(b){return s?"":null}const r=xe(n,oe(H,t)),i=e.element,c=e.finder,f=e.name,l=i?i.getAttribute("class"):"",a=c?c.classFilter(l?l.split(/\s+/):[]):[],u="iconify iconify--"+f.prefix+(f.provider===""?"":" iconify--"+f.provider)+(a.length?" "+a.join(" "):""),d='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="'+u+'">'+Qe(r.body)+"</svg>";o.innerHTML=d;const h=o.childNodes[0],g=h.style,y=r.attributes;if(Object.keys(y).forEach(b=>{h.setAttribute(b,y[b])}),r.inline&&(g.verticalAlign="-0.125em"),i){const b=i.attributes;for(let v=0;v<b.length;v++){const S=b.item(v);if(S){const O=S.name;if(O!=="class"&&O!=="style"&&y[O]===void 0)try{h.setAttribute(O,S.value)}catch(p){}}}const x=i.style;for(let v=0;v<x.length;v++){const S=x[v];g[S]=x[S]}}if(c){const b={name:f,status:"loaded",customisations:t};h[Q]=b,h[T]=c}const D=s?o.innerHTML:h;return i&&i.parentNode?i.parentNode.replaceChild(h,i):o.removeChild(h),D}let C=[];function G(e){for(let t=0;t<C.length;t++){const n=C[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function it(e,t=!1){let n=G(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},C.push(n),n)}function tn(){if(document.documentElement)return it(document.documentElement);C.push({node:()=>document.documentElement})}function nn(e){C=C.filter(t=>{const n=typeof t.node=="function"?t.node():t.node;return e!==n})}function Y(){return C}function on(e){const t=document;t.readyState==="complete"||t.readyState!=="loading"&&!t.documentElement.doScroll?e():(t.addEventListener("DOMContentLoaded",e),window.addEventListener("load",e))}let V=null;const rn={childList:!0,subtree:!0,attributes:!0};function ct(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,V&&V(e)}))}function sn(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let s=0;s<t.length;s++){const o=t[s];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[T]!==void 0){n.paused||ct(e);return}}}function ft(e,t){e.observer.instance.observe(t,rn)}function te(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||(t||(t={paused:0},e.observer=t),t.instance=new MutationObserver(sn.bind(null,e)),ft(e,n),t.paused||ct(e))}function Ne(){Y().forEach(te)}function lt(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function cn(e){const t=V!==null;if(V!==e&&(V=e,t&&Y().forEach(lt)),t){Ne();return}on(Ne)}function ye(e){(e?[e]:Y()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function fn(e){if(e){const t=G(e);t&&ye(t)}else ye()}function me(e){(e?[e]:Y()).forEach(t=>{if(!t.observer){te(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const s=typeof t.node=="function"?t.node():t.node;if(s)n.instance?ft(t,s):te(t);else return}})}function ln(e){if(e){const t=G(e);t&&me(t)}else me()}function at(e,t=!1){const n=it(e,t);return te(n),n}function ut(e){const t=G(e);t&&(lt(t),nn(e))}const be=[];function an(e){be.indexOf(e)===-1&&be.push(e)}function Le(e){return typeof e=="string"&&(e=L(e)),e===null||!F(e)?null:e}function un(e,t){const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(let o=0;o<n.length;o++){const r=n[o];if(t[r]!==e[r])return!1}return!0}function dn(e){const t=[];be.forEach(s=>{const o=s.find(e);Array.prototype.forEach.call(o,r=>{const i=r;if(i[T]!==void 0&&i[T]!==s)return;const c=Le(s.name(i));if(c===null)return;i[T]=s;const f={element:i,finder:s,name:c};t.push(f)})});const n=e.querySelectorAll("svg.iconify");return Array.prototype.forEach.call(n,s=>{const o=s,r=o[T],i=o[Q];if(!r||!i)return;const c=Le(r.name(o));if(c===null)return;let f=!1,l;if(c.prefix!==i.name.prefix||c.name!==i.name.name?f=!0:(l=r.customisations(o),un(i.customisations,l)||(f=!0)),f){const a={element:o,finder:r,name:c,customisations:l};t.push(a)}}),t}let U=!1;function hn(){U||(U=!0,setTimeout(()=>{U&&(U=!1,N())}))}const pn=(e,t)=>e!==null&&t!==null&&e.name===t.name&&e.prefix===t.prefix;function gn(e){const t=G(e);t?N(t):N({node:e,temporary:!0},!0)}function N(e,t=!1){U=!1;const n=Object.create(null);(e?[e]:Y()).forEach(s=>{const o=typeof s.node=="function"?s.node():s.node;if(!o||!o.querySelectorAll)return;let r=!1,i=!1;dn(o).forEach(c=>{const f=c.element,l=c.name,a=l.provider,u=l.prefix,d=l.name;let h=f[Q];if(h!==void 0&&pn(h.name,l))switch(h.status){case"missing":return;case"loading":if(Me({provider:a,prefix:u,name:d})){r=!0;return}}const g=j(a,u);if(g.icons[d]!==void 0){!i&&s.observer&&(ye(s),i=!0);const y=c.customisations!==void 0?c.customisations:c.finder.customisations(f);st(c,y,je(g,d));return}if(g.missing[d]){h={name:l,status:"missing",customisations:{}},f[Q]=h;return}if(!Me({provider:a,prefix:u,name:d})){n[a]===void 0&&(n[a]=Object.create(null));const y=n[a];y[u]===void 0&&(y[u]=Object.create(null)),y[u][d]=!0}h={name:l,status:"loading",customisations:{}},f[Q]=h,r=!0}),s.temporary&&!r?ut(o):t&&r?at(o,!0):i&&s.observer&&me(s)}),Object.keys(n).forEach(s=>{const o=n[s];Object.keys(o).forEach(r=>{Ae(Object.keys(o[r]).map(i=>({provider:s,prefix:r,name:i})),hn)})})}function yn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function s(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:s(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let r=parseFloat(e.slice(0,e.length-n.length));return isNaN(r)?0:(r=r/o,r%1===0?s(r):0)}}return t}const dt=/[\s,]+/;function mn(e,t){t.split(dt).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function bn(e,t){t.split(dt).forEach(n=>{const s=n.trim();switch(s){case"left":case"center":case"right":e.hAlign=s;break;case"top":case"middle":case"bottom":e.vAlign=s;break;case"slice":case"crop":e.slice=!0;break;case"meet":e.slice=!1}})}function P(e,t){return e.hasAttribute(t)}function _(e,t){return e.getAttribute(t)}function vn(e,t){const n=e.getAttribute(t);return n===t||n==="true"?!0:n===""||n==="false"?!1:null}const wn=["inline","hFlip","vFlip"],In=["width","height"],De="iconify",ve="iconify-inline",jn="i."+De+", span."+De+", i."+ve+", span."+ve,xn={find:e=>e.querySelectorAll(jn),name:e=>P(e,"data-icon")?_(e,"data-icon"):null,customisations:(e,t={inline:!1})=>{const n=t,s=e.getAttribute("class");if((s?s.split(/\s+/):[]).indexOf(ve)!==-1&&(n.inline=!0),P(e,"data-rotate")){const r=yn(_(e,"data-rotate"));r&&(n.rotate=r)}return P(e,"data-flip")&&mn(n,_(e,"data-flip")),P(e,"data-align")&&bn(n,_(e,"data-align")),wn.forEach(r=>{if(P(e,"data-"+r)){const i=vn(e,"data-"+r);typeof i=="boolean"&&(n[r]=i)}}),In.forEach(r=>{if(P(e,"data-"+r)){const i=_(e,"data-"+r);i!==""&&(n[r]=i)}}),n},classFilter:e=>{const t=[];return e.forEach(n=>{n!=="iconify"&&n!==""&&n.slice(0,9)!=="iconify--"&&t.push(n)}),t}};function ht(e,t,n){const s=ne(e);if(!s)return null;const o=L(e),r=oe(H,typeof t=="object"?t:{});return st({name:o},r,s,n)}function Sn(){return"2.2.1"}function On(e,t){return ht(e,t,!1)}function En(e,t){return ht(e,t,!0)}function An(e,t){const n=ne(e);if(!n)return null;const s=oe(H,typeof t=="object"?t:{});return xe(n,s)}function kn(e){e?gn(e):N()}if(typeof document!="undefined"&&typeof window!="undefined"){tn(),an(xn);const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!$e(s))&&console.error(n)}catch(o){console.error(n)}})}setTimeout(()=>{cn(N),N()})}function Cn(e,t){Xe(e,t!==!1)}function Pn(e){Xe(e,!0)}Ze("",Vt);if(typeof document!="undefined"&&typeof window!="undefined"){he.store=Mt,We();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const s="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;et(n,o)||console.error(s)}catch(o){console.error(s)}}}}const Tn={getAPIConfig:se,setAPIModule:Ze,sendAPIQuery:rt,setFetch:Dt,getFetch:Rt,listAPIProviders:Nt,mergeParams:Ee},Fn={_api:Tn,addAPIProvider:et,loadIcons:Ae,loadIcon:en,iconExists:It,getIcon:jt,listIcons:vt,addIcon:Ue,addCollection:$e,shareStorage:yt,replaceIDs:Qe,calculateSize:W,buildIcon:Et,getVersion:Sn,renderSVG:On,renderHTML:En,renderIcon:An,scan:kn,observe:at,stopObserving:ut,pauseObserver:fn,resumeObserver:ln,enableCache:Cn,disableCache:Pn};try{self.Iconify===void 0&&(self.Iconify=Fn)}catch(e){}export{Fn as I};
