@gits-id/badge
Advanced tools
Comparing version 0.11.10 to 0.12.0-alpha.0
@@ -1,1 +0,1 @@ | ||
var Badge=function(o,e,a){"use strict";const n=e.defineComponent({__name:"VBadge",props:{color:{type:String,default:"default"},rounded:{type:Boolean,default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["dismiss"],setup(s,{emit:l}){const r=s,{dismissable:i}=e.toRefs(r),d=e.computed(()=>{if(r.bgColor)return`${r.bgColor} ${r.textColor}`;let t;return r.outlined?t={default:"bg-transparent border border-gray-800 text-gray-800",primary:"bg-transparent border border-primary-500 text-primary-500",secondary:"bg-transparent border border-secondary-500 text-secondary-500",info:"bg-transparent border border-info-500 text-info-500",warning:"bg-transparent border border-warning-500 text-warning-500",error:"bg-transparent border border-error-500 text-error-500",success:"bg-transparent border border-success-500 text-success-500",dark:"bg-transparent border border-gray-900 text-gray-900"}:t={default:"bg-gray-200 text-gray-800",primary:"bg-primary-500 text-white",secondary:"bg-secondary-500 text-white",info:"bg-info-500 text-white",warning:"bg-warning-500 text-white",error:"bg-error-500 text-white",success:"bg-success-500 text-white",dark:"bg-gray-900 text-white"},t[r.color]}),c=e.computed(()=>r.small?"px-2 py-1 text-xs":r.large?"px-4 py-2 text-lg":"px-2 py-1 text-sm"),g=e.computed(()=>{let t="rounded-md";return r.small?t="rounded":r.large&&(t="rounded-lg"),r.rounded?"rounded-full":t}),b=e.computed(()=>{let t="w-7 h-7";return r.small?t="w-6 h-6":r.large&&(t="w-10 h-10"),r.circle?"inline-flex items-center justify-center rounded-full "+t:""}),f=e.computed(()=>({default:"hover:bg-gray-400 active:bg-gray-300 hover:text-white",primary:"hover:bg-primary-400 active:bg-primary-300",secondary:"hover:bg-secondary-400 active:bg-secondary-300",info:"hover:bg-info-400 active:bg-info-300",warning:"hover:bg-warning-400 active:bg-warning-300",success:"hover:bg-success-400 active:bg-success-300",error:"hover:bg-error-400 active:bg-error-300"})[r.color]),u=()=>{l("dismiss")};return(t,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-2",[e.unref(d),e.unref(g),e.unref(c),e.unref(b)]])},[e.renderSlot(t.$slots,"default"),e.unref(i)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["bg-transparent rounded-sm !p-0",[e.unref(f)]]),type:"button",onClick:u},[e.createVNode(e.unref(a.XIcon),{class:"h-4 w-4"})],2)):e.createCommentVNode("",!0)],2))}});return o.VBadge=n,o.default=n,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),o}({},Vue,outline); | ||
var Badge=function(P,d){"use strict";const V=Object.freeze({left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1});function Be(e){return{...V,...e}}for(const e in V)V[e];const le=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});function Re(e,n){const t={};for(const r in e){const o=r;if(t[o]=e[o],n[o]===void 0)continue;const i=n[o];switch(o){case"inline":case"slice":typeof i=="boolean"&&(t[o]=i);break;case"hFlip":case"vFlip":i===!0&&(t[o]=!t[o]);break;case"hAlign":case"vAlign":typeof i=="string"&&i!==""&&(t[o]=i);break;case"width":case"height":(typeof i=="string"&&i!==""||typeof i=="number"&&i||i===null)&&(t[o]=i);break;case"rotate":typeof i=="number"&&(t[o]+=i);break}}return t}const ae=/[\s,]+/;function Ve(e,n){n.split(ae).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function ze(e,n){n.split(ae).forEach(t=>{const r=t.trim();switch(r){case"left":case"center":case"right":e.hAlign=r;break;case"top":case"middle":case"bottom":e.vAlign=r;break;case"slice":case"crop":e.slice=!0;break;case"meet":e.slice=!1}})}function Ue(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return n}const qe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Qe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function z(e,n,t){if(n===1)return e;if(t=t===void 0?100:t,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(qe);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=Qe.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?o.push(i):o.push(Math.ceil(c*n*t)/t)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}function Ye(e){let n="";switch(e.hAlign){case"left":n+="xMin";break;case"right":n+="xMax";break;default:n+="xMid"}switch(e.vAlign){case"top":n+="YMin";break;case"bottom":n+="YMax";break;default:n+="YMid"}return n+=e.slice?" slice":" meet",n}function He(e,n){const t={left:e.left,top:e.top,width:e.width,height:e.height};let r=e.body;[e,n].forEach(c=>{const l=[],a=c.hFlip,f=c.vFlip;let u=c.rotate;a?f?u+=2:(l.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),l.push("scale(-1 1)"),t.top=t.left=0):f&&(l.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),l.push("scale(1 -1)"),t.top=t.left=0);let h;switch(u<0&&(u-=Math.floor(u/4)*4),u=u%4,u){case 1:h=t.height/2+t.top,l.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:l.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:h=t.width/2+t.left,l.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}u%2===1&&((t.left!==0||t.top!==0)&&(h=t.left,t.left=t.top,t.top=h),t.width!==t.height&&(h=t.width,t.width=t.height,t.height=h)),l.length&&(r='<g transform="'+l.join(" ")+'">'+r+"</g>")});let o,i;n.width===null&&n.height===null?(i="1em",o=z(i,t.width/t.height)):n.width!==null&&n.height!==null?(o=n.width,i=n.height):n.height!==null?(i=n.height,o=z(i,t.width/t.height)):(o=n.width,i=z(o,t.height/t.width)),o==="auto"&&(o=t.width),i==="auto"&&(i=t.height),o=typeof o=="string"?o:o.toString()+"",i=typeof i=="string"?i:i.toString()+"";const s={attributes:{width:o,height:i,preserveAspectRatio:Ye(n),viewBox:t.left.toString()+" "+t.top.toString()+" "+t.width.toString()+" "+t.height.toString()},body:r};return n.inline&&(s.inline=!0),s}const Ke=/\sid="(\S+)"/g,Ge="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Je=0;function We(e,n=Ge){const t=[];let r;for(;r=Ke.exec(e);)t.push(r[1]);return t.length&&t.forEach(o=>{const i=typeof n=="function"?n(o):n+(Je++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+"$3")}),e}const Xe={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"};let w={};["horizontal","vertical"].forEach(e=>{["Align","Flip"].forEach(n=>{const r={attr:e.slice(0,1)+n,boolean:n==="Flip"};w[e+"-"+n.toLowerCase()]=r,w[e.slice(0,1)+"-"+n.toLowerCase()]=r,w[e+n]=r})});const Ze=(e,n)=>{const t=Re(le,n),r={...Xe};let o=typeof n.style=="object"&&!(n.style instanceof Array)?{...n.style}:{};for(let l in n){const a=n[l];if(a!==void 0)switch(l){case"icon":case"style":case"onLoad":break;case"inline":case"hFlip":case"vFlip":t[l]=a===!0||a==="true"||a===1;break;case"flip":typeof a=="string"&&Ve(t,a);break;case"align":typeof a=="string"&&ze(t,a);break;case"color":o.color=a;break;case"rotate":typeof a=="string"?t[l]=Ue(a):typeof a=="number"&&(t[l]=a);break;case"ariaHidden":case"aria-hidden":a!==!0&&a!=="true"&&delete r["aria-hidden"];break;default:w[l]!==void 0?w[l].boolean&&(a===!0||a==="true"||a===1)?t[w[l].attr]=!0:!w[l].boolean&&typeof a=="string"&&a!==""&&(t[w[l].attr]=a):le[l]===void 0&&(r[l]=a)}}const i=He(e,t);for(let l in i.attributes)r[l]=i.attributes[l];i.inline&&o.verticalAlign===void 0&&o["vertical-align"]===void 0&&(o.verticalAlign="-0.125em");let s=0,c=n.id;return typeof c=="string"&&(c=c.replace(/-/g,"_")),r.innerHTML=We(i.body,c?()=>c+"ID"+s++:"iconifyVue"),Object.keys(o).length>0&&(r.style=o),d.h("svg",r)},et=Object.create(null),tt=d.defineComponent({inheritAttrs:!1,render(){const e=this.$attrs,n=typeof e.icon=="string"?et[e.icon]:typeof e.icon=="object"?Be(e.icon):null;return n===null||typeof n!="object"||typeof n.body!="string"?this.$slots.default?this.$slots.default():null:Ze(n,e)}}),x=/^[a-z0-9]+(-[a-z0-9]+)*$/,b=Object.freeze({left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1});function T(e){return{...b,...e}}const C=(e,n,t,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),a={provider:o.length>0?o[0]:r,prefix:l,name:c};return n&&!A(a)?null:a}const i=o[0],s=i.split("-");if(s.length>1){const c={provider:r,prefix:s.shift(),name:s.join("-")};return n&&!A(c)?null:c}if(t&&r===""){const c={provider:r,prefix:"",name:i};return n&&!A(c,t)?null:c}return null},A=(e,n)=>e?!!((e.provider===""||e.provider.match(x))&&(n&&e.prefix===""||e.prefix.match(x))&&e.name.match(x)):!1;function nt(e,n){const t={...e};for(const r in b){const o=r;if(n[o]!==void 0){const i=n[o];if(t[o]===void 0){t[o]=i;continue}switch(o){case"rotate":t[o]=(t[o]+i)%4;break;case"hFlip":case"vFlip":t[o]=i!==t[o];break;default:t[o]=i}}}return t}function fe(e,n,t=!1){function r(i,s){if(e.icons[i]!==void 0)return Object.assign({},e.icons[i]);if(s>5)return null;const c=e.aliases;if(c&&c[i]!==void 0){const a=c[i],f=r(a.parent,s+1);return f&&nt(f,a)}const l=e.chars;return!s&&l&&l[i]!==void 0?r(l[i],s+1):null}const o=r(n,0);if(o)for(const i in b)o[i]===void 0&&e[i]!==void 0&&(o[i]=e[i]);return o&&t?T(o):o}function ot(e){for(const n in b)if(e[n]!==void 0)return!0;return!1}function ue(e,n,t){t=t||{};const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(s=>{n(s,null),r.push(s)});const o=e.icons;Object.keys(o).forEach(s=>{const c=fe(e,s,!0);c&&(n(s,c),r.push(s))});const i=t.aliases||"all";if(i!=="none"&&typeof e.aliases=="object"){const s=e.aliases;Object.keys(s).forEach(c=>{if(i==="variations"&&ot(s[c]))return;const l=fe(e,c,!0);l&&(n(c,l),r.push(c))})}return r}const U={provider:"string",aliases:"object",not_found:"object"};for(const e in b)U[e]=typeof b[e];function he(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object")return null;for(const o in U)if(e[o]!==void 0&&typeof e[o]!==U[o])return null;const t=n.icons;for(const o in t){const i=t[o];if(!o.match(x)||typeof i.body!="string")return null;for(const s in b)if(i[s]!==void 0&&typeof i[s]!=typeof b[s])return null}const r=n.aliases;if(r)for(const o in r){const i=r[o],s=i.parent;if(!o.match(x)||typeof s!="string"||!t[s]&&!r[s])return null;for(const c in b)if(i[c]!==void 0&&typeof i[c]!=typeof b[c])return null}return n}const it=1;let L=Object.create(null);try{const e=window||self;e&&e._iconifyStorage.version===it&&(L=e._iconifyStorage.storage)}catch{}function rt(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:Object.create(null)}}function v(e,n){L[e]===void 0&&(L[e]=Object.create(null));const t=L[e];return t[n]===void 0&&(t[n]=rt(e,n)),t[n]}function q(e,n){if(!he(n))return[];const t=Date.now();return ue(n,(r,o)=>{o?e.icons[r]=o:e.missing[r]=t})}function st(e,n,t){try{if(typeof t.body=="string")return e.icons[n]=Object.freeze(T(t)),!0}catch{}return!1}function de(e,n){const t=e.icons[n];return t===void 0?null:t}let F=!1;function ge(e){return typeof e=="boolean"&&(F=e),F}function ct(e){const n=typeof e=="string"?C(e,!0,F):e;return n?de(v(n.provider,n.prefix),n.name):null}function lt(e,n){const t=C(e,!0,F);if(!t)return!1;const r=v(t.provider,t.prefix);return st(r,t.name,n)}function at(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=typeof e.provider=="string"?e.provider:""),F&&n===""&&(typeof e.prefix!="string"||e.prefix==="")){let r=!1;return he(e)&&(e.prefix="",ue(e,(o,i)=>{i&<(o,i)&&(r=!0)})),r}if(typeof e.prefix!="string"||!A({provider:n,prefix:e.prefix,name:"a"}))return!1;const t=v(n,e.prefix);return!!q(t,e)}const pe=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});function ft(e,n){const t={};for(const r in e){const o=r;if(t[o]=e[o],n[o]===void 0)continue;const i=n[o];switch(o){case"inline":case"slice":typeof i=="boolean"&&(t[o]=i);break;case"hFlip":case"vFlip":i===!0&&(t[o]=!t[o]);break;case"hAlign":case"vAlign":typeof i=="string"&&i!==""&&(t[o]=i);break;case"width":case"height":(typeof i=="string"&&i!==""||typeof i=="number"&&i||i===null)&&(t[o]=i);break;case"rotate":typeof i=="number"&&(t[o]+=i);break}}return t}const ut=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ht=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Q(e,n,t){if(n===1)return e;if(t=t===void 0?100:t,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(ut);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=ht.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?o.push(i):o.push(Math.ceil(c*n*t)/t)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}function dt(e){let n="";switch(e.hAlign){case"left":n+="xMin";break;case"right":n+="xMax";break;default:n+="xMid"}switch(e.vAlign){case"top":n+="YMin";break;case"bottom":n+="YMax";break;default:n+="YMid"}return n+=e.slice?" slice":" meet",n}function gt(e,n){const t={left:e.left,top:e.top,width:e.width,height:e.height};let r=e.body;[e,n].forEach(c=>{const l=[],a=c.hFlip,f=c.vFlip;let u=c.rotate;a?f?u+=2:(l.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),l.push("scale(-1 1)"),t.top=t.left=0):f&&(l.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),l.push("scale(1 -1)"),t.top=t.left=0);let h;switch(u<0&&(u-=Math.floor(u/4)*4),u=u%4,u){case 1:h=t.height/2+t.top,l.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:l.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:h=t.width/2+t.left,l.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}u%2===1&&((t.left!==0||t.top!==0)&&(h=t.left,t.left=t.top,t.top=h),t.width!==t.height&&(h=t.width,t.width=t.height,t.height=h)),l.length&&(r='<g transform="'+l.join(" ")+'">'+r+"</g>")});let o,i;n.width===null&&n.height===null?(i="1em",o=Q(i,t.width/t.height)):n.width!==null&&n.height!==null?(o=n.width,i=n.height):n.height!==null?(i=n.height,o=Q(i,t.width/t.height)):(o=n.width,i=Q(o,t.height/t.width)),o==="auto"&&(o=t.width),i==="auto"&&(i=t.height),o=typeof o=="string"?o:o.toString()+"",i=typeof i=="string"?i:i.toString()+"";const s={attributes:{width:o,height:i,preserveAspectRatio:dt(n),viewBox:t.left.toString()+" "+t.top.toString()+" "+t.width.toString()+" "+t.height.toString()},body:r};return n.inline&&(s.inline=!0),s}const pt=/\sid="(\S+)"/g,yt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let mt=0;function bt(e,n=yt){const t=[];let r;for(;r=pt.exec(e);)t.push(r[1]);return t.length&&t.forEach(o=>{const i=typeof n=="function"?n(o):n+(mt++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+"$3")}),e}const Y=Object.create(null);function wt(e,n){Y[e]=n}function H(e){return Y[e]||Y[""]}function K(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,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 G=Object.create(null),O=["https://api.simplesvg.com","https://api.unisvg.com"],D=[];for(;O.length>0;)O.length===1||Math.random()>.5?D.push(O.shift()):D.push(O.pop());G[""]=K({resources:["https://api.iconify.design"].concat(D)});function vt(e,n){const t=K(n);return t===null?!1:(G[e]=t,!0)}function J(e){return G[e]}const ye=(e,n)=>{let t=e,r=t.indexOf("?")!==-1;function o(i){switch(typeof i){case"boolean":return i?"true":"false";case"number":return encodeURIComponent(i);case"string":return encodeURIComponent(i);default:throw new Error("Invalid parameter")}}return Object.keys(n).forEach(i=>{let s;try{s=o(n[i])}catch{return}t+=(r?"&":"?")+encodeURIComponent(i)+"="+s,r=!0}),t},me={},_={};let be=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}return null})();function It(e,n){const t=J(e);if(!t)return 0;let r;if(!t.maxURL)r=0;else{let i=0;t.resources.forEach(c=>{i=Math.max(i,c.length)});const s=ye(n+".json",{icons:""});r=t.maxURL-i-t.path.length-s.length}const o=e+":"+n;return _[e]=t.path,me[o]=r,r}function St(e){return e===404}const kt=(e,n,t)=>{const r=[];let o=me[n];o===void 0&&(o=It(e,n));const i="icons";let s={type:i,provider:e,prefix:n,icons:[]},c=0;return t.forEach((l,a)=>{c+=l.length+1,c>=o&&a>0&&(r.push(s),s={type:i,provider:e,prefix:n,icons:[]},c=l.length),s.icons.push(l)}),r.push(s),r};function jt(e){if(typeof e=="string"){if(_[e]===void 0){const n=J(e);if(!n)return"/";_[e]=n.path}return _[e]}return"/"}const xt={prepare:kt,send:(e,n,t)=>{if(!be){t("abort",424);return}let r=jt(n.provider);switch(n.type){case"icons":{const i=n.prefix,c=n.icons.join(",");r+=ye(i+".json",{icons:c});break}case"custom":{const i=n.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:t("abort",400);return}let o=503;be(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{t(St(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{t("next",o)});return}setTimeout(()=>{t("success",i)})}).catch(()=>{t("next",o)})}};function Ct(e){const n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,s=o.prefix,c=o.name;t[i]===void 0&&(t[i]=Object.create(null));const l=t[i];l[s]===void 0&&(l[s]=v(i,s));const a=l[s];let f;a.icons[c]!==void 0?f=n.loaded:s===""||a.missing[c]!==void 0?f=n.missing:f=n.pending;const u={provider:i,prefix:s,name:c};f.push(u)}),n}const I=Object.create(null),W=Object.create(null);function we(e,n){e.forEach(t=>{const r=t.provider;if(I[r]===void 0)return;const o=I[r],i=t.prefix,s=o[i];s&&(o[i]=s.filter(c=>c.id!==n))})}function At(e,n){W[e]===void 0&&(W[e]=Object.create(null));const t=W[e];t[n]||(t[n]=!0,setTimeout(()=>{if(t[n]=!1,I[e]===void 0||I[e][n]===void 0)return;const r=I[e][n].slice(0);if(!r.length)return;const o=v(e,n);let i=!1;r.forEach(s=>{const c=s.icons,l=c.pending.length;c.pending=c.pending.filter(a=>{if(a.prefix!==n)return!0;const f=a.name;if(o.icons[f]!==void 0)c.loaded.push({provider:e,prefix:n,name:f});else if(o.missing[f]!==void 0)c.missing.push({provider:e,prefix:n,name:f});else return i=!0,!0;return!1}),c.pending.length!==l&&(i||we([{provider:e,prefix:n}],s.id),s.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),s.abort))})}))}let Ft=0;function Ot(e,n,t){const r=Ft++,o=we.bind(null,t,r);if(!n.pending.length)return o;const i={id:r,icons:n,callback:e,abort:o};return t.forEach(s=>{const c=s.provider,l=s.prefix;I[c]===void 0&&(I[c]=Object.create(null));const a=I[c];a[l]===void 0&&(a[l]=[]),a[l].push(i)}),o}function Et(e,n=!0,t=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?C(o,!1,t):o;(!n||A(i,t))&&r.push({provider:i.provider,prefix:i.prefix,name:i.name})}),r}var ve={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function $t(e,n,t,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let g=e.resources.slice(0);for(s=[];g.length>1;){const y=Math.floor(Math.random()*g.length);s.push(g[y]),g=g.slice(0,y).concat(g.slice(y+1))}s=s.concat(g)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let l="pending",a=0,f,u=null,h=[],p=[];typeof r=="function"&&p.push(r);function m(){u&&(clearTimeout(u),u=null)}function $(){l==="pending"&&(l="aborted"),m(),h.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),h=[]}function se(g,y){y&&(p=[]),typeof g=="function"&&p.push(g)}function Jt(){return{startTime:c,payload:n,status:l,queriesSent:a,queriesPending:h.length,subscribe:se,abort:$}}function B(){l="failed",p.forEach(g=>{g(void 0,f)})}function Ne(){h.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),h=[]}function Wt(g,y,M){const R=y!=="success";switch(h=h.filter(j=>j!==g),l){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(y==="abort"){f=M,B();return}if(R){f=M,h.length||(s.length?ce():B());return}if(m(),Ne(),!e.random){const j=e.resources.indexOf(g.resource);j!==-1&&j!==e.index&&(e.index=j)}l="completed",p.forEach(j=>{j(M)})}function ce(){if(l!=="pending")return;m();const g=s.shift();if(g===void 0){if(h.length){u=setTimeout(()=>{m(),l==="pending"&&(Ne(),B())},e.timeout);return}B();return}const y={status:"pending",resource:g,callback:(M,R)=>{Wt(y,M,R)}};h.push(y),a++,u=setTimeout(ce,e.rotate),t(g,n,y.callback)}return setTimeout(ce),Jt}function Mt(e){if(typeof e!="object"||typeof e.resources!="object"||!(e.resources instanceof Array)||!e.resources.length)throw new Error("Invalid Reduncancy configuration");const n=Object.create(null);let t;for(t in ve)e[t]!==void 0?n[t]=e[t]:n[t]=ve[t];return n}function Ie(e){const n=Mt(e);let t=[];function r(){t=t.filter(c=>c().status==="pending")}function o(c,l,a){const f=$t(n,c,l,(u,h)=>{r(),a&&a(u,h)});return t.push(f),f}function i(c){const l=t.find(a=>c(a));return l!==void 0?l:null}return{query:o,find:i,setIndex:c=>{n.index=c},getIndex:()=>n.index,cleanup:r}}function Se(){}const X=Object.create(null);function Pt(e){if(X[e]===void 0){const n=J(e);if(!n)return;const t=Ie(n),r={config:n,redundancy:t};X[e]=r}return X[e]}function Tt(e,n,t){let r,o;if(typeof e=="string"){const i=H(e);if(!i)return t(void 0,424),Se;o=i.send;const s=Pt(e);s&&(r=s.redundancy)}else{const i=K(e);if(i){r=Ie(i);const s=e.resources?e.resources[0]:"",c=H(s);c&&(o=c.send)}}return!r||!o?(t(void 0,424),Se):r.query(n,o,t)().abort}const Z={};function ke(){}const k=Object.create(null),ee=Object.create(null),te=Object.create(null),ne=Object.create(null);function Lt(e,n){te[e]===void 0&&(te[e]=Object.create(null));const t=te[e];t[n]||(t[n]=!0,setTimeout(()=>{t[n]=!1,At(e,n)}))}const je=Object.create(null);function Dt(e,n,t){function r(){const c=(e===""?"":"@"+e+":")+n,l=Math.floor(Date.now()/6e4);je[c]<l&&(je[c]=l,console.error('Unable to retrieve icons for "'+c+'" because API is not configured properly.'))}ee[e]===void 0&&(ee[e]=Object.create(null));const o=ee[e];ne[e]===void 0&&(ne[e]=Object.create(null));const i=ne[e];k[e]===void 0&&(k[e]=Object.create(null));const s=k[e];o[n]===void 0?o[n]=t:o[n]=o[n].concat(t).sort(),i[n]||(i[n]=!0,setTimeout(()=>{i[n]=!1;const c=o[n];delete o[n];const l=H(e);if(!l){r();return}l.prepare(e,n,c).forEach(f=>{Tt(e,f,(u,h)=>{const p=v(e,n);if(typeof u!="object"){if(h!==404)return;const m=Date.now();f.icons.forEach($=>{p.missing[$]=m})}else try{const m=q(p,u);if(!m.length)return;const $=s[n];m.forEach(se=>{delete $[se]}),Z.store&&Z.store(e,u)}catch(m){console.error(m)}Lt(e,n)})})}))}const xe=(e,n)=>{const t=Et(e,!0,ge()),r=Ct(t);if(!r.pending.length){let a=!0;return n&&setTimeout(()=>{a&&n(r.loaded,r.missing,r.pending,ke)}),()=>{a=!1}}const o=Object.create(null),i=[];let s,c;r.pending.forEach(a=>{const f=a.provider,u=a.prefix;if(u===c&&f===s)return;s=f,c=u,i.push({provider:f,prefix:u}),k[f]===void 0&&(k[f]=Object.create(null));const h=k[f];h[u]===void 0&&(h[u]=Object.create(null)),o[f]===void 0&&(o[f]=Object.create(null));const p=o[f];p[u]===void 0&&(p[u]=[])});const l=Date.now();return r.pending.forEach(a=>{const f=a.provider,u=a.prefix,h=a.name,p=k[f][u];p[h]===void 0&&(p[h]=l,o[f][u].push(h))}),i.forEach(a=>{const f=a.provider,u=a.prefix;o[f][u].length&&Dt(f,u,o[f][u])}),n?Ot(n,r,i):ke},_t=e=>new Promise((n,t)=>{const r=typeof e=="string"?C(e):e;xe([r||e],o=>{if(o.length&&r){const i=v(r.provider,r.prefix),s=de(i,r.name);if(s){n(s);return}}t(e)})}),Ce="iconify2",E="iconify",Ae=E+"-count",Fe=E+"-version",Oe=36e5,Nt=168,oe={local:!0,session:!0};let ie=!1;const Ee={local:0,session:0},$e={local:[],session:[]};let N=typeof window>"u"?{}:window;function Me(e){const n=e+"Storage";try{if(N&&N[n]&&typeof N[n].length=="number")return N[n]}catch{}return oe[e]=!1,null}function re(e,n,t){try{return e.setItem(Ae,t.toString()),Ee[n]=t,!0}catch{return!1}}function Pe(e){const n=e.getItem(Ae);if(n){const t=parseInt(n);return t||0}return 0}function Bt(e,n){try{e.setItem(Fe,Ce)}catch{}re(e,n,0)}function Rt(e){try{const n=Pe(e);for(let t=0;t<n;t++)e.removeItem(E+t.toString())}catch{}}const Te=()=>{if(ie)return;ie=!0;const e=Math.floor(Date.now()/Oe)-Nt;function n(t){const r=Me(t);if(!r)return;const o=i=>{const s=E+i.toString(),c=r.getItem(s);if(typeof c!="string")return!1;let l=!0;try{const a=JSON.parse(c);if(typeof a!="object"||typeof a.cached!="number"||a.cached<e||typeof a.provider!="string"||typeof a.data!="object"||typeof a.data.prefix!="string")l=!1;else{const f=a.provider,u=a.data.prefix,h=v(f,u);l=q(h,a.data).length>0}}catch{l=!1}return l||r.removeItem(s),l};try{const i=r.getItem(Fe);if(i!==Ce){i&&Rt(r),Bt(r,t);return}let s=Pe(r);for(let c=s-1;c>=0;c--)o(c)||(c===s-1?s--:$e[t].push(c));re(r,t,s)}catch{}}for(const t in oe)n(t)},Vt=(e,n)=>{ie||Te();function t(r){if(!oe[r])return!1;const o=Me(r);if(!o)return!1;let i=$e[r].shift();if(i===void 0&&(i=Ee[r],!re(o,r,i+1)))return!1;try{const s={cached:Math.floor(Date.now()/Oe),provider:e,data:n};o.setItem(E+i.toString(),JSON.stringify(s))}catch{return!1}return!0}!Object.keys(n.icons).length||(n.not_found&&(n=Object.assign({},n),delete n.not_found),t("local")||t("session"))},Le=/[\s,]+/;function zt(e,n){n.split(Le).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ut(e,n){n.split(Le).forEach(t=>{const r=t.trim();switch(r){case"left":case"center":case"right":e.hAlign=r;break;case"top":case"middle":case"bottom":e.vAlign=r;break;case"slice":case"crop":e.slice=!0;break;case"meet":e.slice=!1}})}function qt(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return n}const Qt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"};let S={};["horizontal","vertical"].forEach(e=>{["Align","Flip"].forEach(n=>{const r={attr:e.slice(0,1)+n,boolean:n==="Flip"};S[e+"-"+n.toLowerCase()]=r,S[e.slice(0,1)+"-"+n.toLowerCase()]=r,S[e+n]=r})});const De=(e,n)=>{const t=ft(pe,n),r={...Qt};let o=typeof n.style=="object"&&!(n.style instanceof Array)?{...n.style}:{};for(let l in n){const a=n[l];if(a!==void 0)switch(l){case"icon":case"style":case"onLoad":break;case"inline":case"hFlip":case"vFlip":t[l]=a===!0||a==="true"||a===1;break;case"flip":typeof a=="string"&&zt(t,a);break;case"align":typeof a=="string"&&Ut(t,a);break;case"color":o.color=a;break;case"rotate":typeof a=="string"?t[l]=qt(a):typeof a=="number"&&(t[l]=a);break;case"ariaHidden":case"aria-hidden":a!==!0&&a!=="true"&&delete r["aria-hidden"];break;default:S[l]!==void 0?S[l].boolean&&(a===!0||a==="true"||a===1)?t[S[l].attr]=!0:!S[l].boolean&&typeof a=="string"&&a!==""&&(t[S[l].attr]=a):pe[l]===void 0&&(r[l]=a)}}const i=gt(e,t);for(let l in i.attributes)r[l]=i.attributes[l];i.inline&&o.verticalAlign===void 0&&o["vertical-align"]===void 0&&(o.verticalAlign="-0.125em");let s=0,c=n.id;return typeof c=="string"&&(c=c.replace(/-/g,"_")),r.innerHTML=bt(i.body,c?()=>c+"ID"+s++:"iconifyVue"),Object.keys(o).length>0&&(r.style=o),d.h("svg",r)};if(ge(!0),wt("",xt),typeof document<"u"&&typeof window<"u"){Z.store=Vt,Te();const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!at(r))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let t in n){const r="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;vt(t,o)||console.error(r)}catch{console.error(r)}}}}const Yt=T({body:""});d.defineComponent({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,n){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:T(e)};let t;if(typeof e!="string"||(t=C(e,!1,!0))===null)return this.abortLoading(),null;const r=ct(t);if(r===null)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",this._loadingIcon={name:e,abort:xe([t],()=>{this.counter++})}),null;this.abortLoading(),this._name!==e&&(this._name=e,n&&n(e));const o=["iconify"];return t.prefix!==""&&o.push("iconify--"+t.prefix),t.provider!==""&&o.push("iconify--"+t.provider),{data:r,classes:o}}},render(){this.counter;const e=this.$attrs,n=this.iconMounted?this.getIcon(e.icon,e.onLoad):null;if(!n)return De(Yt,e);let t=e;return n.classes&&(t={...e,class:(typeof e.class=="string"?e.class+" ":"")+n.classes.join(" ")}),De(n.data,t)}});const Ht=["xxs","xs","sm","md","lg","xl"],Kt={key:2},Gt=d.defineComponent({__name:"Icon",props:{name:null,size:{default:"md"}},setup(e){const n=e,t=d.ref(!1),r=d.ref();async function o(){t.value=!0,r.value=await _t(n.name).catch(()=>{}),t.value=!1}d.watch(()=>n.name,o);const i=d.computed(()=>`v-icon v-icon--${n.size}`),s=d.computed(()=>Ht.includes(String(n.size))?{}:{width:n.size,height:n.size});return o(),(c,l)=>t.value?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(i)),style:d.normalizeStyle(d.unref(s))},null,6)):r.value?(d.openBlock(),d.createBlock(d.unref(tt),{key:1,icon:r.value,class:d.normalizeClass(d.unref(i)),style:d.normalizeStyle(d.unref(s))},null,8,["icon","class","style"])):(d.openBlock(),d.createElementBlock("span",Kt,d.toDisplayString(e.name),1))}}),_e=d.defineComponent({__name:"VBadge",props:{color:{type:String,default:"default"},rounded:{type:[Boolean,String],default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},closeIcon:{type:String,default:"ri:close-line"}},emits:["dismiss"],setup(e,{emit:n}){const t=e,r=()=>{n("dismiss")},o=d.computed(()=>{const i=typeof t.rounded=="string"?{[`badge--rounded-${t.rounded}`]:!!t.rounded}:t.rounded?"badge--rounded":"";return["badge",`badge-${t.color}`,i,{"badge--sm":t.small,"badge--lg":t.large,"badge--outlined":t.outlined,"badge--dismissable":t.dismissable}]});return(i,s)=>(d.openBlock(),d.createElementBlock("span",{class:d.normalizeClass(["badge",d.unref(o)])},[d.renderSlot(i.$slots,"default"),d.renderSlot(i.$slots,"dismissable",{dismiss:r},()=>[e.dismissable?(d.openBlock(),d.createElementBlock("button",{key:0,class:"badge-dismiss-button",type:"button","aria-label":"Close",onClick:r},[d.createVNode(d.unref(Gt),{name:e.closeIcon,class:"badge-icon"},null,8,["name"])])):d.createCommentVNode("",!0)])],2))}});return P.VBadge=_e,P.default=_e,Object.defineProperties(P,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),P}({},Vue); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("@heroicons/vue/outline"),o=e.defineComponent({__name:"VBadge",props:{color:{type:String,default:"default"},rounded:{type:Boolean,default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["dismiss"],setup(n,{emit:s}){const r=n,{dismissable:a}=e.toRefs(r),l=e.computed(()=>{if(r.bgColor)return`${r.bgColor} ${r.textColor}`;let t;return r.outlined?t={default:"bg-transparent border border-gray-800 text-gray-800",primary:"bg-transparent border border-primary-500 text-primary-500",secondary:"bg-transparent border border-secondary-500 text-secondary-500",info:"bg-transparent border border-info-500 text-info-500",warning:"bg-transparent border border-warning-500 text-warning-500",error:"bg-transparent border border-error-500 text-error-500",success:"bg-transparent border border-success-500 text-success-500",dark:"bg-transparent border border-gray-900 text-gray-900"}:t={default:"bg-gray-200 text-gray-800",primary:"bg-primary-500 text-white",secondary:"bg-secondary-500 text-white",info:"bg-info-500 text-white",warning:"bg-warning-500 text-white",error:"bg-error-500 text-white",success:"bg-success-500 text-white",dark:"bg-gray-900 text-white"},t[r.color]}),i=e.computed(()=>r.small?"px-2 py-1 text-xs":r.large?"px-4 py-2 text-lg":"px-2 py-1 text-sm"),c=e.computed(()=>{let t="rounded-md";return r.small?t="rounded":r.large&&(t="rounded-lg"),r.rounded?"rounded-full":t}),d=e.computed(()=>{let t="w-7 h-7";return r.small?t="w-6 h-6":r.large&&(t="w-10 h-10"),r.circle?"inline-flex items-center justify-center rounded-full "+t:""}),u=e.computed(()=>({default:"hover:bg-gray-400 active:bg-gray-300 hover:text-white",primary:"hover:bg-primary-400 active:bg-primary-300",secondary:"hover:bg-secondary-400 active:bg-secondary-300",info:"hover:bg-info-400 active:bg-info-300",warning:"hover:bg-warning-400 active:bg-warning-300",success:"hover:bg-success-400 active:bg-success-300",error:"hover:bg-error-400 active:bg-error-300"})[r.color]),g=()=>{s("dismiss")};return(t,f)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-2",[e.unref(l),e.unref(c),e.unref(i),e.unref(d)]])},[e.renderSlot(t.$slots,"default"),e.unref(a)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["bg-transparent rounded-sm !p-0",[e.unref(u)]]),type:"button",onClick:g},[e.createVNode(e.unref(b.XIcon),{class:"h-4 w-4"})],2)):e.createCommentVNode("",!0)],2))}});exports.VBadge=o;exports.default=o; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue"),G=Object.freeze({left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1});function Re(e){return{...G,...e}}for(const e in G)G[e];const le=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});function Ve(e,n){const t={};for(const r in e){const o=r;if(t[o]=e[o],n[o]===void 0)continue;const i=n[o];switch(o){case"inline":case"slice":typeof i=="boolean"&&(t[o]=i);break;case"hFlip":case"vFlip":i===!0&&(t[o]=!t[o]);break;case"hAlign":case"vAlign":typeof i=="string"&&i!==""&&(t[o]=i);break;case"width":case"height":(typeof i=="string"&&i!==""||typeof i=="number"&&i||i===null)&&(t[o]=i);break;case"rotate":typeof i=="number"&&(t[o]+=i);break}}return t}const me=/[\s,]+/;function ze(e,n){n.split(me).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ue(e,n){n.split(me).forEach(t=>{const r=t.trim();switch(r){case"left":case"center":case"right":e.hAlign=r;break;case"top":case"middle":case"bottom":e.vAlign=r;break;case"slice":case"crop":e.slice=!0;break;case"meet":e.slice=!1}})}function qe(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return n}const Qe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ye=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function z(e,n,t){if(n===1)return e;if(t=t===void 0?100:t,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(Qe);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=Ye.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?o.push(i):o.push(Math.ceil(c*n*t)/t)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}function He(e){let n="";switch(e.hAlign){case"left":n+="xMin";break;case"right":n+="xMax";break;default:n+="xMid"}switch(e.vAlign){case"top":n+="YMin";break;case"bottom":n+="YMax";break;default:n+="YMid"}return n+=e.slice?" slice":" meet",n}function Ke(e,n){const t={left:e.left,top:e.top,width:e.width,height:e.height};let r=e.body;[e,n].forEach(c=>{const l=[],a=c.hFlip,f=c.vFlip;let u=c.rotate;a?f?u+=2:(l.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),l.push("scale(-1 1)"),t.top=t.left=0):f&&(l.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),l.push("scale(1 -1)"),t.top=t.left=0);let h;switch(u<0&&(u-=Math.floor(u/4)*4),u=u%4,u){case 1:h=t.height/2+t.top,l.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:l.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:h=t.width/2+t.left,l.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}u%2===1&&((t.left!==0||t.top!==0)&&(h=t.left,t.left=t.top,t.top=h),t.width!==t.height&&(h=t.width,t.width=t.height,t.height=h)),l.length&&(r='<g transform="'+l.join(" ")+'">'+r+"</g>")});let o,i;n.width===null&&n.height===null?(i="1em",o=z(i,t.width/t.height)):n.width!==null&&n.height!==null?(o=n.width,i=n.height):n.height!==null?(i=n.height,o=z(i,t.width/t.height)):(o=n.width,i=z(o,t.height/t.width)),o==="auto"&&(o=t.width),i==="auto"&&(i=t.height),o=typeof o=="string"?o:o.toString()+"",i=typeof i=="string"?i:i.toString()+"";const s={attributes:{width:o,height:i,preserveAspectRatio:He(n),viewBox:t.left.toString()+" "+t.top.toString()+" "+t.width.toString()+" "+t.height.toString()},body:r};return n.inline&&(s.inline=!0),s}const Ge=/\sid="(\S+)"/g,Je="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let We=0;function Xe(e,n=Je){const t=[];let r;for(;r=Ge.exec(e);)t.push(r[1]);return t.length&&t.forEach(o=>{const i=typeof n=="function"?n(o):n+(We++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+"$3")}),e}const Ze={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"};let v={};["horizontal","vertical"].forEach(e=>{["Align","Flip"].forEach(n=>{const r={attr:e.slice(0,1)+n,boolean:n==="Flip"};v[e+"-"+n.toLowerCase()]=r,v[e.slice(0,1)+"-"+n.toLowerCase()]=r,v[e+n]=r})});const et=(e,n)=>{const t=Ve(le,n),r={...Ze};let o=typeof n.style=="object"&&!(n.style instanceof Array)?{...n.style}:{};for(let l in n){const a=n[l];if(a!==void 0)switch(l){case"icon":case"style":case"onLoad":break;case"inline":case"hFlip":case"vFlip":t[l]=a===!0||a==="true"||a===1;break;case"flip":typeof a=="string"&&ze(t,a);break;case"align":typeof a=="string"&&Ue(t,a);break;case"color":o.color=a;break;case"rotate":typeof a=="string"?t[l]=qe(a):typeof a=="number"&&(t[l]=a);break;case"ariaHidden":case"aria-hidden":a!==!0&&a!=="true"&&delete r["aria-hidden"];break;default:v[l]!==void 0?v[l].boolean&&(a===!0||a==="true"||a===1)?t[v[l].attr]=!0:!v[l].boolean&&typeof a=="string"&&a!==""&&(t[v[l].attr]=a):le[l]===void 0&&(r[l]=a)}}const i=Ke(e,t);for(let l in i.attributes)r[l]=i.attributes[l];i.inline&&o.verticalAlign===void 0&&o["vertical-align"]===void 0&&(o.verticalAlign="-0.125em");let s=0,c=n.id;return typeof c=="string"&&(c=c.replace(/-/g,"_")),r.innerHTML=Xe(i.body,c?()=>c+"ID"+s++:"iconifyVue"),Object.keys(o).length>0&&(r.style=o),d.h("svg",r)},tt=Object.create(null),nt=d.defineComponent({inheritAttrs:!1,render(){const e=this.$attrs,n=typeof e.icon=="string"?tt[e.icon]:typeof e.icon=="object"?Re(e.icon):null;return n===null||typeof n!="object"||typeof n.body!="string"?this.$slots.default?this.$slots.default():null:et(n,e)}}),F=/^[a-z0-9]+(-[a-z0-9]+)*$/,b=Object.freeze({left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1});function B(e){return{...b,...e}}const $=(e,n,t,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),a={provider:o.length>0?o[0]:r,prefix:l,name:c};return n&&!O(a)?null:a}const i=o[0],s=i.split("-");if(s.length>1){const c={provider:r,prefix:s.shift(),name:s.join("-")};return n&&!O(c)?null:c}if(t&&r===""){const c={provider:r,prefix:"",name:i};return n&&!O(c,t)?null:c}return null},O=(e,n)=>e?!!((e.provider===""||e.provider.match(F))&&(n&&e.prefix===""||e.prefix.match(F))&&e.name.match(F)):!1;function ot(e,n){const t={...e};for(const r in b){const o=r;if(n[o]!==void 0){const i=n[o];if(t[o]===void 0){t[o]=i;continue}switch(o){case"rotate":t[o]=(t[o]+i)%4;break;case"hFlip":case"vFlip":t[o]=i!==t[o];break;default:t[o]=i}}}return t}function ae(e,n,t=!1){function r(i,s){if(e.icons[i]!==void 0)return Object.assign({},e.icons[i]);if(s>5)return null;const c=e.aliases;if(c&&c[i]!==void 0){const a=c[i],f=r(a.parent,s+1);return f&&ot(f,a)}const l=e.chars;return!s&&l&&l[i]!==void 0?r(l[i],s+1):null}const o=r(n,0);if(o)for(const i in b)o[i]===void 0&&e[i]!==void 0&&(o[i]=e[i]);return o&&t?B(o):o}function it(e){for(const n in b)if(e[n]!==void 0)return!0;return!1}function be(e,n,t){t=t||{};const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(s=>{n(s,null),r.push(s)});const o=e.icons;Object.keys(o).forEach(s=>{const c=ae(e,s,!0);c&&(n(s,c),r.push(s))});const i=t.aliases||"all";if(i!=="none"&&typeof e.aliases=="object"){const s=e.aliases;Object.keys(s).forEach(c=>{if(i==="variations"&&it(s[c]))return;const l=ae(e,c,!0);l&&(n(c,l),r.push(c))})}return r}const J={provider:"string",aliases:"object",not_found:"object"};for(const e in b)J[e]=typeof b[e];function ve(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object")return null;for(const o in J)if(e[o]!==void 0&&typeof e[o]!==J[o])return null;const t=n.icons;for(const o in t){const i=t[o];if(!o.match(F)||typeof i.body!="string")return null;for(const s in b)if(i[s]!==void 0&&typeof i[s]!=typeof b[s])return null}const r=n.aliases;if(r)for(const o in r){const i=r[o],s=i.parent;if(!o.match(F)||typeof s!="string"||!t[s]&&!r[s])return null;for(const c in b)if(i[c]!==void 0&&typeof i[c]!=typeof b[c])return null}return n}const rt=1;let D=Object.create(null);try{const e=window||self;e&&e._iconifyStorage.version===rt&&(D=e._iconifyStorage.storage)}catch{}function st(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:Object.create(null)}}function S(e,n){D[e]===void 0&&(D[e]=Object.create(null));const t=D[e];return t[n]===void 0&&(t[n]=st(e,n)),t[n]}function te(e,n){if(!ve(n))return[];const t=Date.now();return be(n,(r,o)=>{o?e.icons[r]=o:e.missing[r]=t})}function ct(e,n,t){try{if(typeof t.body=="string")return e.icons[n]=Object.freeze(B(t)),!0}catch{}return!1}function we(e,n){const t=e.icons[n];return t===void 0?null:t}let E=!1;function Ie(e){return typeof e=="boolean"&&(E=e),E}function lt(e){const n=typeof e=="string"?$(e,!0,E):e;return n?we(S(n.provider,n.prefix),n.name):null}function at(e,n){const t=$(e,!0,E);if(!t)return!1;const r=S(t.provider,t.prefix);return ct(r,t.name,n)}function ft(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=typeof e.provider=="string"?e.provider:""),E&&n===""&&(typeof e.prefix!="string"||e.prefix==="")){let r=!1;return ve(e)&&(e.prefix="",be(e,(o,i)=>{i&&at(o,i)&&(r=!0)})),r}if(typeof e.prefix!="string"||!O({provider:n,prefix:e.prefix,name:"a"}))return!1;const t=S(n,e.prefix);return!!te(t,e)}const fe=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});function ut(e,n){const t={};for(const r in e){const o=r;if(t[o]=e[o],n[o]===void 0)continue;const i=n[o];switch(o){case"inline":case"slice":typeof i=="boolean"&&(t[o]=i);break;case"hFlip":case"vFlip":i===!0&&(t[o]=!t[o]);break;case"hAlign":case"vAlign":typeof i=="string"&&i!==""&&(t[o]=i);break;case"width":case"height":(typeof i=="string"&&i!==""||typeof i=="number"&&i||i===null)&&(t[o]=i);break;case"rotate":typeof i=="number"&&(t[o]+=i);break}}return t}const ht=/(-?[0-9.]*[0-9]+[0-9.]*)/g,dt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function U(e,n,t){if(n===1)return e;if(t=t===void 0?100:t,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(ht);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=dt.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?o.push(i):o.push(Math.ceil(c*n*t)/t)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}function gt(e){let n="";switch(e.hAlign){case"left":n+="xMin";break;case"right":n+="xMax";break;default:n+="xMid"}switch(e.vAlign){case"top":n+="YMin";break;case"bottom":n+="YMax";break;default:n+="YMid"}return n+=e.slice?" slice":" meet",n}function pt(e,n){const t={left:e.left,top:e.top,width:e.width,height:e.height};let r=e.body;[e,n].forEach(c=>{const l=[],a=c.hFlip,f=c.vFlip;let u=c.rotate;a?f?u+=2:(l.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),l.push("scale(-1 1)"),t.top=t.left=0):f&&(l.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),l.push("scale(1 -1)"),t.top=t.left=0);let h;switch(u<0&&(u-=Math.floor(u/4)*4),u=u%4,u){case 1:h=t.height/2+t.top,l.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:l.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:h=t.width/2+t.left,l.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}u%2===1&&((t.left!==0||t.top!==0)&&(h=t.left,t.left=t.top,t.top=h),t.width!==t.height&&(h=t.width,t.width=t.height,t.height=h)),l.length&&(r='<g transform="'+l.join(" ")+'">'+r+"</g>")});let o,i;n.width===null&&n.height===null?(i="1em",o=U(i,t.width/t.height)):n.width!==null&&n.height!==null?(o=n.width,i=n.height):n.height!==null?(i=n.height,o=U(i,t.width/t.height)):(o=n.width,i=U(o,t.height/t.width)),o==="auto"&&(o=t.width),i==="auto"&&(i=t.height),o=typeof o=="string"?o:o.toString()+"",i=typeof i=="string"?i:i.toString()+"";const s={attributes:{width:o,height:i,preserveAspectRatio:gt(n),viewBox:t.left.toString()+" "+t.top.toString()+" "+t.width.toString()+" "+t.height.toString()},body:r};return n.inline&&(s.inline=!0),s}const yt=/\sid="(\S+)"/g,mt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let bt=0;function vt(e,n=mt){const t=[];let r;for(;r=yt.exec(e);)t.push(r[1]);return t.length&&t.forEach(o=>{const i=typeof n=="function"?n(o):n+(bt++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+"$3")}),e}const W=Object.create(null);function wt(e,n){W[e]=n}function X(e){return W[e]||W[""]}function ne(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,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 oe=Object.create(null),A=["https://api.simplesvg.com","https://api.unisvg.com"],_=[];for(;A.length>0;)A.length===1||Math.random()>.5?_.push(A.shift()):_.push(A.pop());oe[""]=ne({resources:["https://api.iconify.design"].concat(_)});function It(e,n){const t=ne(n);return t===null?!1:(oe[e]=t,!0)}function ie(e){return oe[e]}const Se=(e,n)=>{let t=e,r=t.indexOf("?")!==-1;function o(i){switch(typeof i){case"boolean":return i?"true":"false";case"number":return encodeURIComponent(i);case"string":return encodeURIComponent(i);default:throw new Error("Invalid parameter")}}return Object.keys(n).forEach(i=>{let s;try{s=o(n[i])}catch{return}t+=(r?"&":"?")+encodeURIComponent(i)+"="+s,r=!0}),t},ke={},N={},St=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}return null};let ue=St();function kt(e,n){const t=ie(e);if(!t)return 0;let r;if(!t.maxURL)r=0;else{let i=0;t.resources.forEach(c=>{i=Math.max(i,c.length)});const s=Se(n+".json",{icons:""});r=t.maxURL-i-t.path.length-s.length}const o=e+":"+n;return N[e]=t.path,ke[o]=r,r}function jt(e){return e===404}const xt=(e,n,t)=>{const r=[];let o=ke[n];o===void 0&&(o=kt(e,n));const i="icons";let s={type:i,provider:e,prefix:n,icons:[]},c=0;return t.forEach((l,a)=>{c+=l.length+1,c>=o&&a>0&&(r.push(s),s={type:i,provider:e,prefix:n,icons:[]},c=l.length),s.icons.push(l)}),r.push(s),r};function Ct(e){if(typeof e=="string"){if(N[e]===void 0){const n=ie(e);if(!n)return"/";N[e]=n.path}return N[e]}return"/"}const At=(e,n,t)=>{if(!ue){t("abort",424);return}let r=Ct(n.provider);switch(n.type){case"icons":{const i=n.prefix,c=n.icons.join(",");r+=Se(i+".json",{icons:c});break}case"custom":{const i=n.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:t("abort",400);return}let o=503;ue(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{t(jt(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{t("next",o)});return}setTimeout(()=>{t("success",i)})}).catch(()=>{t("next",o)})},Ft={prepare:xt,send:At};function Ot(e){const n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,s=o.prefix,c=o.name;t[i]===void 0&&(t[i]=Object.create(null));const l=t[i];l[s]===void 0&&(l[s]=S(i,s));const a=l[s];let f;a.icons[c]!==void 0?f=n.loaded:s===""||a.missing[c]!==void 0?f=n.missing:f=n.pending;const u={provider:i,prefix:s,name:c};f.push(u)}),n}const I=Object.create(null),q=Object.create(null);function je(e,n){e.forEach(t=>{const r=t.provider;if(I[r]===void 0)return;const o=I[r],i=t.prefix,s=o[i];s&&(o[i]=s.filter(c=>c.id!==n))})}function Et(e,n){q[e]===void 0&&(q[e]=Object.create(null));const t=q[e];t[n]||(t[n]=!0,setTimeout(()=>{if(t[n]=!1,I[e]===void 0||I[e][n]===void 0)return;const r=I[e][n].slice(0);if(!r.length)return;const o=S(e,n);let i=!1;r.forEach(s=>{const c=s.icons,l=c.pending.length;c.pending=c.pending.filter(a=>{if(a.prefix!==n)return!0;const f=a.name;if(o.icons[f]!==void 0)c.loaded.push({provider:e,prefix:n,name:f});else if(o.missing[f]!==void 0)c.missing.push({provider:e,prefix:n,name:f});else return i=!0,!0;return!1}),c.pending.length!==l&&(i||je([{provider:e,prefix:n}],s.id),s.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),s.abort))})}))}let $t=0;function Mt(e,n,t){const r=$t++,o=je.bind(null,t,r);if(!n.pending.length)return o;const i={id:r,icons:n,callback:e,abort:o};return t.forEach(s=>{const c=s.provider,l=s.prefix;I[c]===void 0&&(I[c]=Object.create(null));const a=I[c];a[l]===void 0&&(a[l]=[]),a[l].push(i)}),o}function Pt(e,n=!0,t=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?$(o,!1,t):o;(!n||O(i,t))&&r.push({provider:i.provider,prefix:i.prefix,name:i.name})}),r}var he={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Tt(e,n,t,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let g=e.resources.slice(0);for(s=[];g.length>1;){const y=Math.floor(Math.random()*g.length);s.push(g[y]),g=g.slice(0,y).concat(g.slice(y+1))}s=s.concat(g)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let l="pending",a=0,f,u=null,h=[],p=[];typeof r=="function"&&p.push(r);function m(){u&&(clearTimeout(u),u=null)}function x(){l==="pending"&&(l="aborted"),m(),h.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),h=[]}function R(g,y){y&&(p=[]),typeof g=="function"&&p.push(g)}function Ne(){return{startTime:c,payload:n,status:l,queriesSent:a,queriesPending:h.length,subscribe:R,abort:x}}function P(){l="failed",p.forEach(g=>{g(void 0,f)})}function ce(){h.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),h=[]}function Be(g,y,C){const T=y!=="success";switch(h=h.filter(k=>k!==g),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(y==="abort"){f=C,P();return}if(T){f=C,h.length||(s.length?V():P());return}if(m(),ce(),!e.random){const k=e.resources.indexOf(g.resource);k!==-1&&k!==e.index&&(e.index=k)}l="completed",p.forEach(k=>{k(C)})}function V(){if(l!=="pending")return;m();const g=s.shift();if(g===void 0){if(h.length){u=setTimeout(()=>{m(),l==="pending"&&(ce(),P())},e.timeout);return}P();return}const y={status:"pending",resource:g,callback:(C,T)=>{Be(y,C,T)}};h.push(y),a++,u=setTimeout(V,e.rotate),t(g,n,y.callback)}return setTimeout(V),Ne}function Lt(e){if(typeof e!="object"||typeof e.resources!="object"||!(e.resources instanceof Array)||!e.resources.length)throw new Error("Invalid Reduncancy configuration");const n=Object.create(null);let t;for(t in he)e[t]!==void 0?n[t]=e[t]:n[t]=he[t];return n}function xe(e){const n=Lt(e);let t=[];function r(){t=t.filter(c=>c().status==="pending")}function o(c,l,a){const f=Tt(n,c,l,(u,h)=>{r(),a&&a(u,h)});return t.push(f),f}function i(c){const l=t.find(a=>c(a));return l!==void 0?l:null}return{query:o,find:i,setIndex:c=>{n.index=c},getIndex:()=>n.index,cleanup:r}}function de(){}const Q=Object.create(null);function Dt(e){if(Q[e]===void 0){const n=ie(e);if(!n)return;const t=xe(n),r={config:n,redundancy:t};Q[e]=r}return Q[e]}function _t(e,n,t){let r,o;if(typeof e=="string"){const i=X(e);if(!i)return t(void 0,424),de;o=i.send;const s=Dt(e);s&&(r=s.redundancy)}else{const i=ne(e);if(i){r=xe(i);const s=e.resources?e.resources[0]:"",c=X(s);c&&(o=c.send)}}return!r||!o?(t(void 0,424),de):r.query(n,o,t)().abort}const Z={};function ge(){}const j=Object.create(null),Y=Object.create(null),H=Object.create(null),K=Object.create(null);function Nt(e,n){H[e]===void 0&&(H[e]=Object.create(null));const t=H[e];t[n]||(t[n]=!0,setTimeout(()=>{t[n]=!1,Et(e,n)}))}const pe=Object.create(null);function Bt(e,n,t){function r(){const c=(e===""?"":"@"+e+":")+n,l=Math.floor(Date.now()/6e4);pe[c]<l&&(pe[c]=l,console.error('Unable to retrieve icons for "'+c+'" because API is not configured properly.'))}Y[e]===void 0&&(Y[e]=Object.create(null));const o=Y[e];K[e]===void 0&&(K[e]=Object.create(null));const i=K[e];j[e]===void 0&&(j[e]=Object.create(null));const s=j[e];o[n]===void 0?o[n]=t:o[n]=o[n].concat(t).sort(),i[n]||(i[n]=!0,setTimeout(()=>{i[n]=!1;const c=o[n];delete o[n];const l=X(e);if(!l){r();return}l.prepare(e,n,c).forEach(f=>{_t(e,f,(u,h)=>{const p=S(e,n);if(typeof u!="object"){if(h!==404)return;const m=Date.now();f.icons.forEach(x=>{p.missing[x]=m})}else try{const m=te(p,u);if(!m.length)return;const x=s[n];m.forEach(R=>{delete x[R]}),Z.store&&Z.store(e,u)}catch(m){console.error(m)}Nt(e,n)})})}))}const Ce=(e,n)=>{const t=Pt(e,!0,Ie()),r=Ot(t);if(!r.pending.length){let a=!0;return n&&setTimeout(()=>{a&&n(r.loaded,r.missing,r.pending,ge)}),()=>{a=!1}}const o=Object.create(null),i=[];let s,c;r.pending.forEach(a=>{const f=a.provider,u=a.prefix;if(u===c&&f===s)return;s=f,c=u,i.push({provider:f,prefix:u}),j[f]===void 0&&(j[f]=Object.create(null));const h=j[f];h[u]===void 0&&(h[u]=Object.create(null)),o[f]===void 0&&(o[f]=Object.create(null));const p=o[f];p[u]===void 0&&(p[u]=[])});const l=Date.now();return r.pending.forEach(a=>{const f=a.provider,u=a.prefix,h=a.name,p=j[f][u];p[h]===void 0&&(p[h]=l,o[f][u].push(h))}),i.forEach(a=>{const f=a.provider,u=a.prefix;o[f][u].length&&Bt(f,u,o[f][u])}),n?Mt(n,r,i):ge},Rt=e=>new Promise((n,t)=>{const r=typeof e=="string"?$(e):e;Ce([r||e],o=>{if(o.length&&r){const i=S(r.provider,r.prefix),s=we(i,r.name);if(s){n(s);return}}t(e)})}),Ae="iconify2",M="iconify",Fe=M+"-count",Oe=M+"-version",Ee=36e5,Vt=168,re={local:!0,session:!0};let ee=!1;const $e={local:0,session:0},Me={local:[],session:[]};let L=typeof window>"u"?{}:window;function Pe(e){const n=e+"Storage";try{if(L&&L[n]&&typeof L[n].length=="number")return L[n]}catch{}return re[e]=!1,null}function se(e,n,t){try{return e.setItem(Fe,t.toString()),$e[n]=t,!0}catch{return!1}}function Te(e){const n=e.getItem(Fe);if(n){const t=parseInt(n);return t||0}return 0}function zt(e,n){try{e.setItem(Oe,Ae)}catch{}se(e,n,0)}function Ut(e){try{const n=Te(e);for(let t=0;t<n;t++)e.removeItem(M+t.toString())}catch{}}const Le=()=>{if(ee)return;ee=!0;const e=Math.floor(Date.now()/Ee)-Vt;function n(t){const r=Pe(t);if(!r)return;const o=i=>{const s=M+i.toString(),c=r.getItem(s);if(typeof c!="string")return!1;let l=!0;try{const a=JSON.parse(c);if(typeof a!="object"||typeof a.cached!="number"||a.cached<e||typeof a.provider!="string"||typeof a.data!="object"||typeof a.data.prefix!="string")l=!1;else{const f=a.provider,u=a.data.prefix,h=S(f,u);l=te(h,a.data).length>0}}catch{l=!1}return l||r.removeItem(s),l};try{const i=r.getItem(Oe);if(i!==Ae){i&&Ut(r),zt(r,t);return}let s=Te(r);for(let c=s-1;c>=0;c--)o(c)||(c===s-1?s--:Me[t].push(c));se(r,t,s)}catch{}}for(const t in re)n(t)},qt=(e,n)=>{ee||Le();function t(r){if(!re[r])return!1;const o=Pe(r);if(!o)return!1;let i=Me[r].shift();if(i===void 0&&(i=$e[r],!se(o,r,i+1)))return!1;try{const s={cached:Math.floor(Date.now()/Ee),provider:e,data:n};o.setItem(M+i.toString(),JSON.stringify(s))}catch{return!1}return!0}!Object.keys(n.icons).length||(n.not_found&&(n=Object.assign({},n),delete n.not_found),t("local")||t("session"))},De=/[\s,]+/;function Qt(e,n){n.split(De).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Yt(e,n){n.split(De).forEach(t=>{const r=t.trim();switch(r){case"left":case"center":case"right":e.hAlign=r;break;case"top":case"middle":case"bottom":e.vAlign=r;break;case"slice":case"crop":e.slice=!0;break;case"meet":e.slice=!1}})}function Ht(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return n}const Kt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"};let w={};["horizontal","vertical"].forEach(e=>{["Align","Flip"].forEach(n=>{const r={attr:e.slice(0,1)+n,boolean:n==="Flip"};w[e+"-"+n.toLowerCase()]=r,w[e.slice(0,1)+"-"+n.toLowerCase()]=r,w[e+n]=r})});const ye=(e,n)=>{const t=ut(fe,n),r={...Kt};let o=typeof n.style=="object"&&!(n.style instanceof Array)?{...n.style}:{};for(let l in n){const a=n[l];if(a!==void 0)switch(l){case"icon":case"style":case"onLoad":break;case"inline":case"hFlip":case"vFlip":t[l]=a===!0||a==="true"||a===1;break;case"flip":typeof a=="string"&&Qt(t,a);break;case"align":typeof a=="string"&&Yt(t,a);break;case"color":o.color=a;break;case"rotate":typeof a=="string"?t[l]=Ht(a):typeof a=="number"&&(t[l]=a);break;case"ariaHidden":case"aria-hidden":a!==!0&&a!=="true"&&delete r["aria-hidden"];break;default:w[l]!==void 0?w[l].boolean&&(a===!0||a==="true"||a===1)?t[w[l].attr]=!0:!w[l].boolean&&typeof a=="string"&&a!==""&&(t[w[l].attr]=a):fe[l]===void 0&&(r[l]=a)}}const i=pt(e,t);for(let l in i.attributes)r[l]=i.attributes[l];i.inline&&o.verticalAlign===void 0&&o["vertical-align"]===void 0&&(o.verticalAlign="-0.125em");let s=0,c=n.id;return typeof c=="string"&&(c=c.replace(/-/g,"_")),r.innerHTML=vt(i.body,c?()=>c+"ID"+s++:"iconifyVue"),Object.keys(o).length>0&&(r.style=o),d.h("svg",r)};Ie(!0);wt("",Ft);if(typeof document<"u"&&typeof window<"u"){Z.store=qt,Le();const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!ft(r))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let t in n){const r="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;It(t,o)||console.error(r)}catch{console.error(r)}}}}const Gt=B({body:""});d.defineComponent({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,n){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:B(e)};let t;if(typeof e!="string"||(t=$(e,!1,!0))===null)return this.abortLoading(),null;const r=lt(t);if(r===null)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",this._loadingIcon={name:e,abort:Ce([t],()=>{this.counter++})}),null;this.abortLoading(),this._name!==e&&(this._name=e,n&&n(e));const o=["iconify"];return t.prefix!==""&&o.push("iconify--"+t.prefix),t.provider!==""&&o.push("iconify--"+t.provider),{data:r,classes:o}}},render(){this.counter;const e=this.$attrs,n=this.iconMounted?this.getIcon(e.icon,e.onLoad):null;if(!n)return ye(Gt,e);let t=e;return n.classes&&(t={...e,class:(typeof e.class=="string"?e.class+" ":"")+n.classes.join(" ")}),ye(n.data,t)}});const Jt=["xxs","xs","sm","md","lg","xl"],Wt={key:2},Xt=d.defineComponent({__name:"Icon",props:{name:null,size:{default:"md"}},setup(e){const n=e,t=d.ref(!1),r=d.ref();async function o(){t.value=!0,r.value=await Rt(n.name).catch(()=>{}),t.value=!1}d.watch(()=>n.name,o);const i=d.computed(()=>`v-icon v-icon--${n.size}`),s=d.computed(()=>Jt.includes(String(n.size))?{}:{width:n.size,height:n.size});return o(),(c,l)=>t.value?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(i)),style:d.normalizeStyle(d.unref(s))},null,6)):r.value?(d.openBlock(),d.createBlock(d.unref(nt),{key:1,icon:r.value,class:d.normalizeClass(d.unref(i)),style:d.normalizeStyle(d.unref(s))},null,8,["icon","class","style"])):(d.openBlock(),d.createElementBlock("span",Wt,d.toDisplayString(e.name),1))}}),_e=d.defineComponent({__name:"VBadge",props:{color:{type:String,default:"default"},rounded:{type:[Boolean,String],default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},closeIcon:{type:String,default:"ri:close-line"}},emits:["dismiss"],setup(e,{emit:n}){const t=e,r=()=>{n("dismiss")},o=d.computed(()=>{const i=typeof t.rounded=="string"?{[`badge--rounded-${t.rounded}`]:!!t.rounded}:t.rounded?"badge--rounded":"";return["badge",`badge-${t.color}`,i,{"badge--sm":t.small,"badge--lg":t.large,"badge--outlined":t.outlined,"badge--dismissable":t.dismissable}]});return(i,s)=>(d.openBlock(),d.createElementBlock("span",{class:d.normalizeClass(["badge",d.unref(o)])},[d.renderSlot(i.$slots,"default"),d.renderSlot(i.$slots,"dismissable",{dismiss:r},()=>[e.dismissable?(d.openBlock(),d.createElementBlock("button",{key:0,class:"badge-dismiss-button",type:"button","aria-label":"Close",onClick:r},[d.createVNode(d.unref(Xt),{name:e.closeIcon,class:"badge-icon"},null,8,["name"])])):d.createCommentVNode("",!0)])],2))}});exports.VBadge=_e;exports.default=_e; |
@@ -1,1 +0,1 @@ | ||
(function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@heroicons/vue/outline")):typeof define=="function"&&define.amd?define(["exports","vue","@heroicons/vue/outline"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o.Badge={},o.Vue,o.outline))})(this,function(o,e,s){"use strict";const n=e.defineComponent({__name:"VBadge",props:{color:{type:String,default:"default"},rounded:{type:Boolean,default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["dismiss"],setup(a,{emit:i}){const r=a,{dismissable:l}=e.toRefs(r),d=e.computed(()=>{if(r.bgColor)return`${r.bgColor} ${r.textColor}`;let t;return r.outlined?t={default:"bg-transparent border border-gray-800 text-gray-800",primary:"bg-transparent border border-primary-500 text-primary-500",secondary:"bg-transparent border border-secondary-500 text-secondary-500",info:"bg-transparent border border-info-500 text-info-500",warning:"bg-transparent border border-warning-500 text-warning-500",error:"bg-transparent border border-error-500 text-error-500",success:"bg-transparent border border-success-500 text-success-500",dark:"bg-transparent border border-gray-900 text-gray-900"}:t={default:"bg-gray-200 text-gray-800",primary:"bg-primary-500 text-white",secondary:"bg-secondary-500 text-white",info:"bg-info-500 text-white",warning:"bg-warning-500 text-white",error:"bg-error-500 text-white",success:"bg-success-500 text-white",dark:"bg-gray-900 text-white"},t[r.color]}),c=e.computed(()=>r.small?"px-2 py-1 text-xs":r.large?"px-4 py-2 text-lg":"px-2 py-1 text-sm"),f=e.computed(()=>{let t="rounded-md";return r.small?t="rounded":r.large&&(t="rounded-lg"),r.rounded?"rounded-full":t}),g=e.computed(()=>{let t="w-7 h-7";return r.small?t="w-6 h-6":r.large&&(t="w-10 h-10"),r.circle?"inline-flex items-center justify-center rounded-full "+t:""}),u=e.computed(()=>({default:"hover:bg-gray-400 active:bg-gray-300 hover:text-white",primary:"hover:bg-primary-400 active:bg-primary-300",secondary:"hover:bg-secondary-400 active:bg-secondary-300",info:"hover:bg-info-400 active:bg-info-300",warning:"hover:bg-warning-400 active:bg-warning-300",success:"hover:bg-success-400 active:bg-success-300",error:"hover:bg-error-400 active:bg-error-300"})[r.color]),b=()=>{i("dismiss")};return(t,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-2",[e.unref(d),e.unref(f),e.unref(c),e.unref(g)]])},[e.renderSlot(t.$slots,"default"),e.unref(l)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["bg-transparent rounded-sm !p-0",[e.unref(u)]]),type:"button",onClick:b},[e.createVNode(e.unref(s.XIcon),{class:"h-4 w-4"})],2)):e.createCommentVNode("",!0)],2))}});o.VBadge=n,o.default=n,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(w,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(w=typeof globalThis<"u"?globalThis:w||self,d(w.Badge={},w.Vue))})(this,function(w,d){"use strict";const V=Object.freeze({left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1});function Be(e){return{...V,...e}}for(const e in V)V[e];const le=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});function Re(e,n){const t={};for(const r in e){const o=r;if(t[o]=e[o],n[o]===void 0)continue;const i=n[o];switch(o){case"inline":case"slice":typeof i=="boolean"&&(t[o]=i);break;case"hFlip":case"vFlip":i===!0&&(t[o]=!t[o]);break;case"hAlign":case"vAlign":typeof i=="string"&&i!==""&&(t[o]=i);break;case"width":case"height":(typeof i=="string"&&i!==""||typeof i=="number"&&i||i===null)&&(t[o]=i);break;case"rotate":typeof i=="number"&&(t[o]+=i);break}}return t}const ae=/[\s,]+/;function Ve(e,n){n.split(ae).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function ze(e,n){n.split(ae).forEach(t=>{const r=t.trim();switch(r){case"left":case"center":case"right":e.hAlign=r;break;case"top":case"middle":case"bottom":e.vAlign=r;break;case"slice":case"crop":e.slice=!0;break;case"meet":e.slice=!1}})}function Ue(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return n}const qe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Qe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function z(e,n,t){if(n===1)return e;if(t=t===void 0?100:t,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(qe);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=Qe.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?o.push(i):o.push(Math.ceil(c*n*t)/t)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}function Ye(e){let n="";switch(e.hAlign){case"left":n+="xMin";break;case"right":n+="xMax";break;default:n+="xMid"}switch(e.vAlign){case"top":n+="YMin";break;case"bottom":n+="YMax";break;default:n+="YMid"}return n+=e.slice?" slice":" meet",n}function He(e,n){const t={left:e.left,top:e.top,width:e.width,height:e.height};let r=e.body;[e,n].forEach(c=>{const l=[],a=c.hFlip,f=c.vFlip;let u=c.rotate;a?f?u+=2:(l.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),l.push("scale(-1 1)"),t.top=t.left=0):f&&(l.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),l.push("scale(1 -1)"),t.top=t.left=0);let h;switch(u<0&&(u-=Math.floor(u/4)*4),u=u%4,u){case 1:h=t.height/2+t.top,l.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:l.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:h=t.width/2+t.left,l.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}u%2===1&&((t.left!==0||t.top!==0)&&(h=t.left,t.left=t.top,t.top=h),t.width!==t.height&&(h=t.width,t.width=t.height,t.height=h)),l.length&&(r='<g transform="'+l.join(" ")+'">'+r+"</g>")});let o,i;n.width===null&&n.height===null?(i="1em",o=z(i,t.width/t.height)):n.width!==null&&n.height!==null?(o=n.width,i=n.height):n.height!==null?(i=n.height,o=z(i,t.width/t.height)):(o=n.width,i=z(o,t.height/t.width)),o==="auto"&&(o=t.width),i==="auto"&&(i=t.height),o=typeof o=="string"?o:o.toString()+"",i=typeof i=="string"?i:i.toString()+"";const s={attributes:{width:o,height:i,preserveAspectRatio:Ye(n),viewBox:t.left.toString()+" "+t.top.toString()+" "+t.width.toString()+" "+t.height.toString()},body:r};return n.inline&&(s.inline=!0),s}const Ke=/\sid="(\S+)"/g,Ge="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Je=0;function We(e,n=Ge){const t=[];let r;for(;r=Ke.exec(e);)t.push(r[1]);return t.length&&t.forEach(o=>{const i=typeof n=="function"?n(o):n+(Je++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+"$3")}),e}const Xe={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"};let v={};["horizontal","vertical"].forEach(e=>{["Align","Flip"].forEach(n=>{const r={attr:e.slice(0,1)+n,boolean:n==="Flip"};v[e+"-"+n.toLowerCase()]=r,v[e.slice(0,1)+"-"+n.toLowerCase()]=r,v[e+n]=r})});const Ze=(e,n)=>{const t=Re(le,n),r={...Xe};let o=typeof n.style=="object"&&!(n.style instanceof Array)?{...n.style}:{};for(let l in n){const a=n[l];if(a!==void 0)switch(l){case"icon":case"style":case"onLoad":break;case"inline":case"hFlip":case"vFlip":t[l]=a===!0||a==="true"||a===1;break;case"flip":typeof a=="string"&&Ve(t,a);break;case"align":typeof a=="string"&&ze(t,a);break;case"color":o.color=a;break;case"rotate":typeof a=="string"?t[l]=Ue(a):typeof a=="number"&&(t[l]=a);break;case"ariaHidden":case"aria-hidden":a!==!0&&a!=="true"&&delete r["aria-hidden"];break;default:v[l]!==void 0?v[l].boolean&&(a===!0||a==="true"||a===1)?t[v[l].attr]=!0:!v[l].boolean&&typeof a=="string"&&a!==""&&(t[v[l].attr]=a):le[l]===void 0&&(r[l]=a)}}const i=He(e,t);for(let l in i.attributes)r[l]=i.attributes[l];i.inline&&o.verticalAlign===void 0&&o["vertical-align"]===void 0&&(o.verticalAlign="-0.125em");let s=0,c=n.id;return typeof c=="string"&&(c=c.replace(/-/g,"_")),r.innerHTML=We(i.body,c?()=>c+"ID"+s++:"iconifyVue"),Object.keys(o).length>0&&(r.style=o),d.h("svg",r)},et=Object.create(null),tt=d.defineComponent({inheritAttrs:!1,render(){const e=this.$attrs,n=typeof e.icon=="string"?et[e.icon]:typeof e.icon=="object"?Be(e.icon):null;return n===null||typeof n!="object"||typeof n.body!="string"?this.$slots.default?this.$slots.default():null:Ze(n,e)}}),C=/^[a-z0-9]+(-[a-z0-9]+)*$/,b=Object.freeze({left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1});function T(e){return{...b,...e}}const A=(e,n,t,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),a={provider:o.length>0?o[0]:r,prefix:l,name:c};return n&&!F(a)?null:a}const i=o[0],s=i.split("-");if(s.length>1){const c={provider:r,prefix:s.shift(),name:s.join("-")};return n&&!F(c)?null:c}if(t&&r===""){const c={provider:r,prefix:"",name:i};return n&&!F(c,t)?null:c}return null},F=(e,n)=>e?!!((e.provider===""||e.provider.match(C))&&(n&&e.prefix===""||e.prefix.match(C))&&e.name.match(C)):!1;function nt(e,n){const t={...e};for(const r in b){const o=r;if(n[o]!==void 0){const i=n[o];if(t[o]===void 0){t[o]=i;continue}switch(o){case"rotate":t[o]=(t[o]+i)%4;break;case"hFlip":case"vFlip":t[o]=i!==t[o];break;default:t[o]=i}}}return t}function fe(e,n,t=!1){function r(i,s){if(e.icons[i]!==void 0)return Object.assign({},e.icons[i]);if(s>5)return null;const c=e.aliases;if(c&&c[i]!==void 0){const a=c[i],f=r(a.parent,s+1);return f&&nt(f,a)}const l=e.chars;return!s&&l&&l[i]!==void 0?r(l[i],s+1):null}const o=r(n,0);if(o)for(const i in b)o[i]===void 0&&e[i]!==void 0&&(o[i]=e[i]);return o&&t?T(o):o}function ot(e){for(const n in b)if(e[n]!==void 0)return!0;return!1}function ue(e,n,t){t=t||{};const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(s=>{n(s,null),r.push(s)});const o=e.icons;Object.keys(o).forEach(s=>{const c=fe(e,s,!0);c&&(n(s,c),r.push(s))});const i=t.aliases||"all";if(i!=="none"&&typeof e.aliases=="object"){const s=e.aliases;Object.keys(s).forEach(c=>{if(i==="variations"&&ot(s[c]))return;const l=fe(e,c,!0);l&&(n(c,l),r.push(c))})}return r}const U={provider:"string",aliases:"object",not_found:"object"};for(const e in b)U[e]=typeof b[e];function he(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object")return null;for(const o in U)if(e[o]!==void 0&&typeof e[o]!==U[o])return null;const t=n.icons;for(const o in t){const i=t[o];if(!o.match(C)||typeof i.body!="string")return null;for(const s in b)if(i[s]!==void 0&&typeof i[s]!=typeof b[s])return null}const r=n.aliases;if(r)for(const o in r){const i=r[o],s=i.parent;if(!o.match(C)||typeof s!="string"||!t[s]&&!r[s])return null;for(const c in b)if(i[c]!==void 0&&typeof i[c]!=typeof b[c])return null}return n}const it=1;let L=Object.create(null);try{const e=window||self;e&&e._iconifyStorage.version===it&&(L=e._iconifyStorage.storage)}catch{}function rt(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:Object.create(null)}}function I(e,n){L[e]===void 0&&(L[e]=Object.create(null));const t=L[e];return t[n]===void 0&&(t[n]=rt(e,n)),t[n]}function q(e,n){if(!he(n))return[];const t=Date.now();return ue(n,(r,o)=>{o?e.icons[r]=o:e.missing[r]=t})}function st(e,n,t){try{if(typeof t.body=="string")return e.icons[n]=Object.freeze(T(t)),!0}catch{}return!1}function de(e,n){const t=e.icons[n];return t===void 0?null:t}let O=!1;function ge(e){return typeof e=="boolean"&&(O=e),O}function ct(e){const n=typeof e=="string"?A(e,!0,O):e;return n?de(I(n.provider,n.prefix),n.name):null}function lt(e,n){const t=A(e,!0,O);if(!t)return!1;const r=I(t.provider,t.prefix);return st(r,t.name,n)}function at(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=typeof e.provider=="string"?e.provider:""),O&&n===""&&(typeof e.prefix!="string"||e.prefix==="")){let r=!1;return he(e)&&(e.prefix="",ue(e,(o,i)=>{i&<(o,i)&&(r=!0)})),r}if(typeof e.prefix!="string"||!F({provider:n,prefix:e.prefix,name:"a"}))return!1;const t=I(n,e.prefix);return!!q(t,e)}const pe=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});function ft(e,n){const t={};for(const r in e){const o=r;if(t[o]=e[o],n[o]===void 0)continue;const i=n[o];switch(o){case"inline":case"slice":typeof i=="boolean"&&(t[o]=i);break;case"hFlip":case"vFlip":i===!0&&(t[o]=!t[o]);break;case"hAlign":case"vAlign":typeof i=="string"&&i!==""&&(t[o]=i);break;case"width":case"height":(typeof i=="string"&&i!==""||typeof i=="number"&&i||i===null)&&(t[o]=i);break;case"rotate":typeof i=="number"&&(t[o]+=i);break}}return t}const ut=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ht=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Q(e,n,t){if(n===1)return e;if(t=t===void 0?100:t,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(ut);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=ht.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?o.push(i):o.push(Math.ceil(c*n*t)/t)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}function dt(e){let n="";switch(e.hAlign){case"left":n+="xMin";break;case"right":n+="xMax";break;default:n+="xMid"}switch(e.vAlign){case"top":n+="YMin";break;case"bottom":n+="YMax";break;default:n+="YMid"}return n+=e.slice?" slice":" meet",n}function gt(e,n){const t={left:e.left,top:e.top,width:e.width,height:e.height};let r=e.body;[e,n].forEach(c=>{const l=[],a=c.hFlip,f=c.vFlip;let u=c.rotate;a?f?u+=2:(l.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),l.push("scale(-1 1)"),t.top=t.left=0):f&&(l.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),l.push("scale(1 -1)"),t.top=t.left=0);let h;switch(u<0&&(u-=Math.floor(u/4)*4),u=u%4,u){case 1:h=t.height/2+t.top,l.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:l.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:h=t.width/2+t.left,l.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}u%2===1&&((t.left!==0||t.top!==0)&&(h=t.left,t.left=t.top,t.top=h),t.width!==t.height&&(h=t.width,t.width=t.height,t.height=h)),l.length&&(r='<g transform="'+l.join(" ")+'">'+r+"</g>")});let o,i;n.width===null&&n.height===null?(i="1em",o=Q(i,t.width/t.height)):n.width!==null&&n.height!==null?(o=n.width,i=n.height):n.height!==null?(i=n.height,o=Q(i,t.width/t.height)):(o=n.width,i=Q(o,t.height/t.width)),o==="auto"&&(o=t.width),i==="auto"&&(i=t.height),o=typeof o=="string"?o:o.toString()+"",i=typeof i=="string"?i:i.toString()+"";const s={attributes:{width:o,height:i,preserveAspectRatio:dt(n),viewBox:t.left.toString()+" "+t.top.toString()+" "+t.width.toString()+" "+t.height.toString()},body:r};return n.inline&&(s.inline=!0),s}const pt=/\sid="(\S+)"/g,yt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let mt=0;function bt(e,n=yt){const t=[];let r;for(;r=pt.exec(e);)t.push(r[1]);return t.length&&t.forEach(o=>{const i=typeof n=="function"?n(o):n+(mt++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+"$3")}),e}const Y=Object.create(null);function wt(e,n){Y[e]=n}function H(e){return Y[e]||Y[""]}function K(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,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 G=Object.create(null),E=["https://api.simplesvg.com","https://api.unisvg.com"],D=[];for(;E.length>0;)E.length===1||Math.random()>.5?D.push(E.shift()):D.push(E.pop());G[""]=K({resources:["https://api.iconify.design"].concat(D)});function vt(e,n){const t=K(n);return t===null?!1:(G[e]=t,!0)}function J(e){return G[e]}const ye=(e,n)=>{let t=e,r=t.indexOf("?")!==-1;function o(i){switch(typeof i){case"boolean":return i?"true":"false";case"number":return encodeURIComponent(i);case"string":return encodeURIComponent(i);default:throw new Error("Invalid parameter")}}return Object.keys(n).forEach(i=>{let s;try{s=o(n[i])}catch{return}t+=(r?"&":"?")+encodeURIComponent(i)+"="+s,r=!0}),t},me={},_={};let be=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}return null})();function It(e,n){const t=J(e);if(!t)return 0;let r;if(!t.maxURL)r=0;else{let i=0;t.resources.forEach(c=>{i=Math.max(i,c.length)});const s=ye(n+".json",{icons:""});r=t.maxURL-i-t.path.length-s.length}const o=e+":"+n;return _[e]=t.path,me[o]=r,r}function St(e){return e===404}const kt=(e,n,t)=>{const r=[];let o=me[n];o===void 0&&(o=It(e,n));const i="icons";let s={type:i,provider:e,prefix:n,icons:[]},c=0;return t.forEach((l,a)=>{c+=l.length+1,c>=o&&a>0&&(r.push(s),s={type:i,provider:e,prefix:n,icons:[]},c=l.length),s.icons.push(l)}),r.push(s),r};function jt(e){if(typeof e=="string"){if(_[e]===void 0){const n=J(e);if(!n)return"/";_[e]=n.path}return _[e]}return"/"}const xt={prepare:kt,send:(e,n,t)=>{if(!be){t("abort",424);return}let r=jt(n.provider);switch(n.type){case"icons":{const i=n.prefix,c=n.icons.join(",");r+=ye(i+".json",{icons:c});break}case"custom":{const i=n.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:t("abort",400);return}let o=503;be(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{t(St(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{t("next",o)});return}setTimeout(()=>{t("success",i)})}).catch(()=>{t("next",o)})}};function Ct(e){const n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,s=o.prefix,c=o.name;t[i]===void 0&&(t[i]=Object.create(null));const l=t[i];l[s]===void 0&&(l[s]=I(i,s));const a=l[s];let f;a.icons[c]!==void 0?f=n.loaded:s===""||a.missing[c]!==void 0?f=n.missing:f=n.pending;const u={provider:i,prefix:s,name:c};f.push(u)}),n}const S=Object.create(null),W=Object.create(null);function we(e,n){e.forEach(t=>{const r=t.provider;if(S[r]===void 0)return;const o=S[r],i=t.prefix,s=o[i];s&&(o[i]=s.filter(c=>c.id!==n))})}function At(e,n){W[e]===void 0&&(W[e]=Object.create(null));const t=W[e];t[n]||(t[n]=!0,setTimeout(()=>{if(t[n]=!1,S[e]===void 0||S[e][n]===void 0)return;const r=S[e][n].slice(0);if(!r.length)return;const o=I(e,n);let i=!1;r.forEach(s=>{const c=s.icons,l=c.pending.length;c.pending=c.pending.filter(a=>{if(a.prefix!==n)return!0;const f=a.name;if(o.icons[f]!==void 0)c.loaded.push({provider:e,prefix:n,name:f});else if(o.missing[f]!==void 0)c.missing.push({provider:e,prefix:n,name:f});else return i=!0,!0;return!1}),c.pending.length!==l&&(i||we([{provider:e,prefix:n}],s.id),s.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),s.abort))})}))}let Ft=0;function Ot(e,n,t){const r=Ft++,o=we.bind(null,t,r);if(!n.pending.length)return o;const i={id:r,icons:n,callback:e,abort:o};return t.forEach(s=>{const c=s.provider,l=s.prefix;S[c]===void 0&&(S[c]=Object.create(null));const a=S[c];a[l]===void 0&&(a[l]=[]),a[l].push(i)}),o}function Et(e,n=!0,t=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?A(o,!1,t):o;(!n||F(i,t))&&r.push({provider:i.provider,prefix:i.prefix,name:i.name})}),r}var ve={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function $t(e,n,t,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let g=e.resources.slice(0);for(s=[];g.length>1;){const y=Math.floor(Math.random()*g.length);s.push(g[y]),g=g.slice(0,y).concat(g.slice(y+1))}s=s.concat(g)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let l="pending",a=0,f,u=null,h=[],p=[];typeof r=="function"&&p.push(r);function m(){u&&(clearTimeout(u),u=null)}function M(){l==="pending"&&(l="aborted"),m(),h.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),h=[]}function se(g,y){y&&(p=[]),typeof g=="function"&&p.push(g)}function Jt(){return{startTime:c,payload:n,status:l,queriesSent:a,queriesPending:h.length,subscribe:se,abort:M}}function B(){l="failed",p.forEach(g=>{g(void 0,f)})}function Ne(){h.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),h=[]}function Wt(g,y,P){const R=y!=="success";switch(h=h.filter(x=>x!==g),l){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(y==="abort"){f=P,B();return}if(R){f=P,h.length||(s.length?ce():B());return}if(m(),Ne(),!e.random){const x=e.resources.indexOf(g.resource);x!==-1&&x!==e.index&&(e.index=x)}l="completed",p.forEach(x=>{x(P)})}function ce(){if(l!=="pending")return;m();const g=s.shift();if(g===void 0){if(h.length){u=setTimeout(()=>{m(),l==="pending"&&(Ne(),B())},e.timeout);return}B();return}const y={status:"pending",resource:g,callback:(P,R)=>{Wt(y,P,R)}};h.push(y),a++,u=setTimeout(ce,e.rotate),t(g,n,y.callback)}return setTimeout(ce),Jt}function Mt(e){if(typeof e!="object"||typeof e.resources!="object"||!(e.resources instanceof Array)||!e.resources.length)throw new Error("Invalid Reduncancy configuration");const n=Object.create(null);let t;for(t in ve)e[t]!==void 0?n[t]=e[t]:n[t]=ve[t];return n}function Ie(e){const n=Mt(e);let t=[];function r(){t=t.filter(c=>c().status==="pending")}function o(c,l,a){const f=$t(n,c,l,(u,h)=>{r(),a&&a(u,h)});return t.push(f),f}function i(c){const l=t.find(a=>c(a));return l!==void 0?l:null}return{query:o,find:i,setIndex:c=>{n.index=c},getIndex:()=>n.index,cleanup:r}}function Se(){}const X=Object.create(null);function Pt(e){if(X[e]===void 0){const n=J(e);if(!n)return;const t=Ie(n),r={config:n,redundancy:t};X[e]=r}return X[e]}function Tt(e,n,t){let r,o;if(typeof e=="string"){const i=H(e);if(!i)return t(void 0,424),Se;o=i.send;const s=Pt(e);s&&(r=s.redundancy)}else{const i=K(e);if(i){r=Ie(i);const s=e.resources?e.resources[0]:"",c=H(s);c&&(o=c.send)}}return!r||!o?(t(void 0,424),Se):r.query(n,o,t)().abort}const Z={};function ke(){}const j=Object.create(null),ee=Object.create(null),te=Object.create(null),ne=Object.create(null);function Lt(e,n){te[e]===void 0&&(te[e]=Object.create(null));const t=te[e];t[n]||(t[n]=!0,setTimeout(()=>{t[n]=!1,At(e,n)}))}const je=Object.create(null);function Dt(e,n,t){function r(){const c=(e===""?"":"@"+e+":")+n,l=Math.floor(Date.now()/6e4);je[c]<l&&(je[c]=l,console.error('Unable to retrieve icons for "'+c+'" because API is not configured properly.'))}ee[e]===void 0&&(ee[e]=Object.create(null));const o=ee[e];ne[e]===void 0&&(ne[e]=Object.create(null));const i=ne[e];j[e]===void 0&&(j[e]=Object.create(null));const s=j[e];o[n]===void 0?o[n]=t:o[n]=o[n].concat(t).sort(),i[n]||(i[n]=!0,setTimeout(()=>{i[n]=!1;const c=o[n];delete o[n];const l=H(e);if(!l){r();return}l.prepare(e,n,c).forEach(f=>{Tt(e,f,(u,h)=>{const p=I(e,n);if(typeof u!="object"){if(h!==404)return;const m=Date.now();f.icons.forEach(M=>{p.missing[M]=m})}else try{const m=q(p,u);if(!m.length)return;const M=s[n];m.forEach(se=>{delete M[se]}),Z.store&&Z.store(e,u)}catch(m){console.error(m)}Lt(e,n)})})}))}const xe=(e,n)=>{const t=Et(e,!0,ge()),r=Ct(t);if(!r.pending.length){let a=!0;return n&&setTimeout(()=>{a&&n(r.loaded,r.missing,r.pending,ke)}),()=>{a=!1}}const o=Object.create(null),i=[];let s,c;r.pending.forEach(a=>{const f=a.provider,u=a.prefix;if(u===c&&f===s)return;s=f,c=u,i.push({provider:f,prefix:u}),j[f]===void 0&&(j[f]=Object.create(null));const h=j[f];h[u]===void 0&&(h[u]=Object.create(null)),o[f]===void 0&&(o[f]=Object.create(null));const p=o[f];p[u]===void 0&&(p[u]=[])});const l=Date.now();return r.pending.forEach(a=>{const f=a.provider,u=a.prefix,h=a.name,p=j[f][u];p[h]===void 0&&(p[h]=l,o[f][u].push(h))}),i.forEach(a=>{const f=a.provider,u=a.prefix;o[f][u].length&&Dt(f,u,o[f][u])}),n?Ot(n,r,i):ke},_t=e=>new Promise((n,t)=>{const r=typeof e=="string"?A(e):e;xe([r||e],o=>{if(o.length&&r){const i=I(r.provider,r.prefix),s=de(i,r.name);if(s){n(s);return}}t(e)})}),Ce="iconify2",$="iconify",Ae=$+"-count",Fe=$+"-version",Oe=36e5,Nt=168,oe={local:!0,session:!0};let ie=!1;const Ee={local:0,session:0},$e={local:[],session:[]};let N=typeof window>"u"?{}:window;function Me(e){const n=e+"Storage";try{if(N&&N[n]&&typeof N[n].length=="number")return N[n]}catch{}return oe[e]=!1,null}function re(e,n,t){try{return e.setItem(Ae,t.toString()),Ee[n]=t,!0}catch{return!1}}function Pe(e){const n=e.getItem(Ae);if(n){const t=parseInt(n);return t||0}return 0}function Bt(e,n){try{e.setItem(Fe,Ce)}catch{}re(e,n,0)}function Rt(e){try{const n=Pe(e);for(let t=0;t<n;t++)e.removeItem($+t.toString())}catch{}}const Te=()=>{if(ie)return;ie=!0;const e=Math.floor(Date.now()/Oe)-Nt;function n(t){const r=Me(t);if(!r)return;const o=i=>{const s=$+i.toString(),c=r.getItem(s);if(typeof c!="string")return!1;let l=!0;try{const a=JSON.parse(c);if(typeof a!="object"||typeof a.cached!="number"||a.cached<e||typeof a.provider!="string"||typeof a.data!="object"||typeof a.data.prefix!="string")l=!1;else{const f=a.provider,u=a.data.prefix,h=I(f,u);l=q(h,a.data).length>0}}catch{l=!1}return l||r.removeItem(s),l};try{const i=r.getItem(Fe);if(i!==Ce){i&&Rt(r),Bt(r,t);return}let s=Pe(r);for(let c=s-1;c>=0;c--)o(c)||(c===s-1?s--:$e[t].push(c));re(r,t,s)}catch{}}for(const t in oe)n(t)},Vt=(e,n)=>{ie||Te();function t(r){if(!oe[r])return!1;const o=Me(r);if(!o)return!1;let i=$e[r].shift();if(i===void 0&&(i=Ee[r],!re(o,r,i+1)))return!1;try{const s={cached:Math.floor(Date.now()/Oe),provider:e,data:n};o.setItem($+i.toString(),JSON.stringify(s))}catch{return!1}return!0}!Object.keys(n.icons).length||(n.not_found&&(n=Object.assign({},n),delete n.not_found),t("local")||t("session"))},Le=/[\s,]+/;function zt(e,n){n.split(Le).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ut(e,n){n.split(Le).forEach(t=>{const r=t.trim();switch(r){case"left":case"center":case"right":e.hAlign=r;break;case"top":case"middle":case"bottom":e.vAlign=r;break;case"slice":case"crop":e.slice=!0;break;case"meet":e.slice=!1}})}function qt(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return n}const Qt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"};let k={};["horizontal","vertical"].forEach(e=>{["Align","Flip"].forEach(n=>{const r={attr:e.slice(0,1)+n,boolean:n==="Flip"};k[e+"-"+n.toLowerCase()]=r,k[e.slice(0,1)+"-"+n.toLowerCase()]=r,k[e+n]=r})});const De=(e,n)=>{const t=ft(pe,n),r={...Qt};let o=typeof n.style=="object"&&!(n.style instanceof Array)?{...n.style}:{};for(let l in n){const a=n[l];if(a!==void 0)switch(l){case"icon":case"style":case"onLoad":break;case"inline":case"hFlip":case"vFlip":t[l]=a===!0||a==="true"||a===1;break;case"flip":typeof a=="string"&&zt(t,a);break;case"align":typeof a=="string"&&Ut(t,a);break;case"color":o.color=a;break;case"rotate":typeof a=="string"?t[l]=qt(a):typeof a=="number"&&(t[l]=a);break;case"ariaHidden":case"aria-hidden":a!==!0&&a!=="true"&&delete r["aria-hidden"];break;default:k[l]!==void 0?k[l].boolean&&(a===!0||a==="true"||a===1)?t[k[l].attr]=!0:!k[l].boolean&&typeof a=="string"&&a!==""&&(t[k[l].attr]=a):pe[l]===void 0&&(r[l]=a)}}const i=gt(e,t);for(let l in i.attributes)r[l]=i.attributes[l];i.inline&&o.verticalAlign===void 0&&o["vertical-align"]===void 0&&(o.verticalAlign="-0.125em");let s=0,c=n.id;return typeof c=="string"&&(c=c.replace(/-/g,"_")),r.innerHTML=bt(i.body,c?()=>c+"ID"+s++:"iconifyVue"),Object.keys(o).length>0&&(r.style=o),d.h("svg",r)};if(ge(!0),wt("",xt),typeof document<"u"&&typeof window<"u"){Z.store=Vt,Te();const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!at(r))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let t in n){const r="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;vt(t,o)||console.error(r)}catch{console.error(r)}}}}const Yt=T({body:""});d.defineComponent({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,n){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:T(e)};let t;if(typeof e!="string"||(t=A(e,!1,!0))===null)return this.abortLoading(),null;const r=ct(t);if(r===null)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",this._loadingIcon={name:e,abort:xe([t],()=>{this.counter++})}),null;this.abortLoading(),this._name!==e&&(this._name=e,n&&n(e));const o=["iconify"];return t.prefix!==""&&o.push("iconify--"+t.prefix),t.provider!==""&&o.push("iconify--"+t.provider),{data:r,classes:o}}},render(){this.counter;const e=this.$attrs,n=this.iconMounted?this.getIcon(e.icon,e.onLoad):null;if(!n)return De(Yt,e);let t=e;return n.classes&&(t={...e,class:(typeof e.class=="string"?e.class+" ":"")+n.classes.join(" ")}),De(n.data,t)}});const Ht=["xxs","xs","sm","md","lg","xl"],Kt={key:2},Gt=d.defineComponent({__name:"Icon",props:{name:null,size:{default:"md"}},setup(e){const n=e,t=d.ref(!1),r=d.ref();async function o(){t.value=!0,r.value=await _t(n.name).catch(()=>{}),t.value=!1}d.watch(()=>n.name,o);const i=d.computed(()=>`v-icon v-icon--${n.size}`),s=d.computed(()=>Ht.includes(String(n.size))?{}:{width:n.size,height:n.size});return o(),(c,l)=>t.value?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(i)),style:d.normalizeStyle(d.unref(s))},null,6)):r.value?(d.openBlock(),d.createBlock(d.unref(tt),{key:1,icon:r.value,class:d.normalizeClass(d.unref(i)),style:d.normalizeStyle(d.unref(s))},null,8,["icon","class","style"])):(d.openBlock(),d.createElementBlock("span",Kt,d.toDisplayString(e.name),1))}}),_e=d.defineComponent({__name:"VBadge",props:{color:{type:String,default:"default"},rounded:{type:[Boolean,String],default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},closeIcon:{type:String,default:"ri:close-line"}},emits:["dismiss"],setup(e,{emit:n}){const t=e,r=()=>{n("dismiss")},o=d.computed(()=>{const i=typeof t.rounded=="string"?{[`badge--rounded-${t.rounded}`]:!!t.rounded}:t.rounded?"badge--rounded":"";return["badge",`badge-${t.color}`,i,{"badge--sm":t.small,"badge--lg":t.large,"badge--outlined":t.outlined,"badge--dismissable":t.dismissable}]});return(i,s)=>(d.openBlock(),d.createElementBlock("span",{class:d.normalizeClass(["badge",d.unref(o)])},[d.renderSlot(i.$slots,"default"),d.renderSlot(i.$slots,"dismissable",{dismiss:r},()=>[e.dismissable?(d.openBlock(),d.createElementBlock("button",{key:0,class:"badge-dismiss-button",type:"button","aria-label":"Close",onClick:r},[d.createVNode(d.unref(Gt),{name:e.closeIcon,class:"badge-icon"},null,8,["name"])])):d.createCommentVNode("",!0)])],2))}});w.VBadge=_e,w.default=_e,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
@@ -0,1 +1,4 @@ | ||
import { PropType } from 'vue'; | ||
import { DefaultColors } from '@gits-id/theme/defaultTheme'; | ||
export declare type BadgeColors = DefaultColors | 'default' | string; | ||
declare const _default: { | ||
@@ -9,3 +12,3 @@ new (...args: any[]): { | ||
color: string; | ||
rounded: boolean; | ||
rounded: string | boolean; | ||
large: boolean; | ||
@@ -16,9 +19,10 @@ bgColor: string; | ||
outlined: boolean; | ||
closeIcon: string; | ||
}> & Omit<Readonly<import("vue").ExtractPropTypes<{ | ||
color: { | ||
type: StringConstructor; | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
rounded: { | ||
type: BooleanConstructor; | ||
type: PropType<string | boolean>; | ||
default: boolean; | ||
@@ -34,2 +38,5 @@ }; | ||
}; | ||
/** | ||
* @deprecated use `color` prop instead | ||
*/ | ||
bgColor: { | ||
@@ -39,2 +46,5 @@ type: StringConstructor; | ||
}; | ||
/** | ||
* @deprecated use `color` prop instead | ||
*/ | ||
textColor: { | ||
@@ -44,2 +54,5 @@ type: StringConstructor; | ||
}; | ||
/** | ||
* @deprecated use `rounded="none"` instead | ||
*/ | ||
circle: { | ||
@@ -57,5 +70,9 @@ type: BooleanConstructor; | ||
}; | ||
closeIcon: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
}>> & { | ||
onDismiss?: ((...args: any[]) => any) | undefined; | ||
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "small" | "circle" | "color" | "rounded" | "large" | "bgColor" | "textColor" | "dismissable" | "outlined">; | ||
onDismiss?: (() => any) | undefined; | ||
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "small" | "circle" | "color" | "rounded" | "large" | "bgColor" | "textColor" | "dismissable" | "outlined" | "closeIcon">; | ||
$attrs: { | ||
@@ -72,11 +89,11 @@ [x: string]: unknown; | ||
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null; | ||
$emit: (event: "dismiss", ...args: any[]) => void; | ||
$emit: (event: "dismiss") => void; | ||
$el: any; | ||
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{ | ||
color: { | ||
type: StringConstructor; | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
rounded: { | ||
type: BooleanConstructor; | ||
type: PropType<string | boolean>; | ||
default: boolean; | ||
@@ -92,2 +109,5 @@ }; | ||
}; | ||
/** | ||
* @deprecated use `color` prop instead | ||
*/ | ||
bgColor: { | ||
@@ -97,2 +117,5 @@ type: StringConstructor; | ||
}; | ||
/** | ||
* @deprecated use `color` prop instead | ||
*/ | ||
textColor: { | ||
@@ -102,2 +125,5 @@ type: StringConstructor; | ||
}; | ||
/** | ||
* @deprecated use `rounded="none"` instead | ||
*/ | ||
circle: { | ||
@@ -115,9 +141,15 @@ type: BooleanConstructor; | ||
}; | ||
closeIcon: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
}>> & { | ||
onDismiss?: ((...args: any[]) => any) | undefined; | ||
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "dismiss"[], string, { | ||
onDismiss?: (() => any) | undefined; | ||
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { | ||
dismiss: () => void; | ||
}, string, { | ||
small: boolean; | ||
circle: boolean; | ||
color: string; | ||
rounded: boolean; | ||
rounded: string | boolean; | ||
large: boolean; | ||
@@ -128,2 +160,3 @@ bgColor: string; | ||
outlined: boolean; | ||
closeIcon: string; | ||
}> & { | ||
@@ -151,7 +184,7 @@ beforeCreate?: ((() => void) | (() => void)[]) | undefined; | ||
color: { | ||
type: StringConstructor; | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
rounded: { | ||
type: BooleanConstructor; | ||
type: PropType<string | boolean>; | ||
default: boolean; | ||
@@ -167,2 +200,5 @@ }; | ||
}; | ||
/** | ||
* @deprecated use `color` prop instead | ||
*/ | ||
bgColor: { | ||
@@ -172,2 +208,5 @@ type: StringConstructor; | ||
}; | ||
/** | ||
* @deprecated use `color` prop instead | ||
*/ | ||
textColor: { | ||
@@ -177,2 +216,5 @@ type: StringConstructor; | ||
}; | ||
/** | ||
* @deprecated use `rounded="none"` instead | ||
*/ | ||
circle: { | ||
@@ -190,4 +232,8 @@ type: BooleanConstructor; | ||
}; | ||
closeIcon: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
}>> & { | ||
onDismiss?: ((...args: any[]) => any) | undefined; | ||
onDismiss?: (() => any) | undefined; | ||
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties; | ||
@@ -199,7 +245,7 @@ __isFragment?: undefined; | ||
color: { | ||
type: StringConstructor; | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
rounded: { | ||
type: BooleanConstructor; | ||
type: PropType<string | boolean>; | ||
default: boolean; | ||
@@ -215,2 +261,5 @@ }; | ||
}; | ||
/** | ||
* @deprecated use `color` prop instead | ||
*/ | ||
bgColor: { | ||
@@ -220,2 +269,5 @@ type: StringConstructor; | ||
}; | ||
/** | ||
* @deprecated use `color` prop instead | ||
*/ | ||
textColor: { | ||
@@ -225,2 +277,5 @@ type: StringConstructor; | ||
}; | ||
/** | ||
* @deprecated use `rounded="none"` instead | ||
*/ | ||
circle: { | ||
@@ -238,9 +293,15 @@ type: BooleanConstructor; | ||
}; | ||
closeIcon: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
}>> & { | ||
onDismiss?: ((...args: any[]) => any) | undefined; | ||
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "dismiss"[], "dismiss", { | ||
onDismiss?: (() => any) | undefined; | ||
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { | ||
dismiss: () => void; | ||
}, string, { | ||
small: boolean; | ||
circle: boolean; | ||
color: string; | ||
rounded: boolean; | ||
rounded: string | boolean; | ||
large: boolean; | ||
@@ -251,2 +312,3 @@ bgColor: string; | ||
outlined: boolean; | ||
closeIcon: string; | ||
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => { | ||
@@ -253,0 +315,0 @@ $slots: typeof import('./VBadge.vue.__VLS_template').default; |
{ | ||
"name": "@gits-id/badge", | ||
"version": "0.11.10", | ||
"version": "0.12.0-alpha.0", | ||
"description": "GITS Badge Component", | ||
"scripts": { | ||
"build": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types", | ||
"prepublishOnly": "npm run build", | ||
"test": "vitest" | ||
}, | ||
"keywords": [ | ||
@@ -15,10 +10,10 @@ "badge", | ||
], | ||
"author": "", | ||
"license": "ISC", | ||
"author": "Warsono <warsono16694@gmail.com>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@heroicons/vue": "^1.0.6", | ||
"vue": "^3.2.33" | ||
}, | ||
"devDependencies": { | ||
"@gits-id/tailwind-config": "^0.11.10", | ||
"@gits-id/tailwind-config": "^0.12.0-alpha.0", | ||
"@gits-id/theme": "^0.12.0-alpha.0", | ||
"@gits-id/utils": "^0.11.10", | ||
@@ -36,3 +31,18 @@ "@vue/test-utils": "^2.0.0-rc.17", | ||
"types": "./dist/types/index.d.ts", | ||
"gitHead": "73e3452946775714e36592e956ecd52858dffd48" | ||
} | ||
"exports": { | ||
".": { | ||
"import": "./dist/badge.mjs", | ||
"require": "./dist/badge.js" | ||
}, | ||
"./plugin": "./src/plugin.js", | ||
"./plugin.js": "./src/plugin.js", | ||
"./package.json": "./package.json", | ||
"./src/*": "./src/*", | ||
"./*": "./*" | ||
}, | ||
"gitHead": "80bc1037da208367d00723d488dff0ca00e2ebee", | ||
"scripts": { | ||
"build": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types", | ||
"test": "vitest" | ||
} | ||
} |
import VBadge from './VBadge.vue'; | ||
import {themeColors} from '@gits-id/utils/colors'; | ||
import type {VBadgeProps} from './types'; | ||
import {Story, Meta} from '@storybook/vue3'; | ||
import {defaultRounded, defaultColors} from '@gits-id/theme/defaultTheme'; | ||
const colors = ['default', ...defaultColors]; | ||
export default { | ||
title: 'Components/Badge', | ||
component: VBadge, | ||
argTypes: { | ||
color: { | ||
control: {type: 'select', options: themeColors}, | ||
}, | ||
}, | ||
args: { | ||
label: '', | ||
dismissable: false, | ||
icon: false, | ||
outlined: false, | ||
}, | ||
} as Meta; | ||
const Template: Story<VBadgeProps> = (args) => ({ | ||
// Components used in your story `template` are defined in the `components` object | ||
components: { | ||
VBadge, | ||
}, | ||
// The story's `args` need to be mapped into the template through the `setup()` method | ||
setup() { | ||
return {args, themeColors}; | ||
return {args, colors}; | ||
}, | ||
// And then the `args` are bound to your component with `v-bind="args"` | ||
template: ` | ||
<div class="flex flex-row flex-wrap gap-2"> | ||
<VBadge v-for="color in themeColors" :key="color" v-bind="args" :color="color">{{ args.label || color }}</VBadge> | ||
<VBadge | ||
v-for="color in colors" | ||
:key="color" | ||
v-bind="args" | ||
:color="color" | ||
> | ||
{{ args.label || color }} | ||
</VBadge> | ||
</div> | ||
@@ -57,26 +52,53 @@ `, | ||
export const Rounded = Template.bind({}); | ||
Rounded.args = { | ||
rounded: true, | ||
}; | ||
Rounded.parameters = { | ||
docs: { | ||
source: { | ||
code: `<v-badge rounded> text </v-badge>`, | ||
}, | ||
export const Rounded: Story<VBadgeProps> = (args) => ({ | ||
components: { | ||
VBadge, | ||
}, | ||
}; | ||
setup() { | ||
return {args, defaultRounded}; | ||
}, | ||
template: ` | ||
<div class="flex flex-row flex-wrap gap-2"> | ||
<VBadge | ||
v-for="rounded in defaultRounded" | ||
:key="rounded" | ||
v-bind="args" | ||
:rounded="rounded" | ||
color="primary" | ||
> | ||
{{ args.label || rounded }} | ||
</VBadge> | ||
</div> | ||
`, | ||
}); | ||
export const Circle = Template.bind({}); | ||
Circle.args = { | ||
circle: true, | ||
label: 20, | ||
}; | ||
Circle.parameters = { | ||
docs: { | ||
source: { | ||
code: `<v-badge circle> 20 </v-badge>`, | ||
}, | ||
export const Sizes: Story<VBadgeProps> = (args) => ({ | ||
components: { | ||
VBadge, | ||
}, | ||
}; | ||
setup() { | ||
return {args, defaultRounded}; | ||
}, | ||
template: ` | ||
<div class="space-x-2"> | ||
<VBadge | ||
color="primary" | ||
small | ||
> | ||
small | ||
</VBadge> | ||
<VBadge | ||
color="primary" | ||
> | ||
default | ||
</VBadge> | ||
<VBadge | ||
color="primary" | ||
large | ||
> | ||
large | ||
</VBadge> | ||
</div> | ||
`, | ||
}); | ||
@@ -131,19 +153,9 @@ export const Large = Template.bind({}); | ||
// export const CustomColor = Template.bind({}); | ||
// CustomColor.args = { | ||
// bgColor: 'bg-white', | ||
// textColor: 'text-info-500', | ||
// class: 'border border-info-500', | ||
// }; | ||
const SingleTemplate: Story<VBadgeProps> = (args) => ({ | ||
// Components used in your story `template` are defined in the `components` object | ||
components: { | ||
VBadge, | ||
}, | ||
// The story's `args` need to be mapped into the template through the `setup()` method | ||
setup() { | ||
return {args}; | ||
}, | ||
// And then the `args` are bound to your component with `v-bind="args"` | ||
template: `<VBadge v-bind="args">{{ args.label || 'Text' }}</VBadge>`, | ||
@@ -154,5 +166,3 @@ }); | ||
CustomClass.args = { | ||
bgColor: 'bg-teal-500', | ||
textColor: 'text-white', | ||
class: 'uppercase text-sm', | ||
class: 'uppercase text-sm bg-teal-500 text-white', | ||
}; | ||
@@ -163,5 +173,5 @@ | ||
source: { | ||
code: `<v-badge bg-color="bg-teal-500" text-color="text-white" class="uppercase text-sm"> text </v-badge>`, | ||
code: `<v-badge class="uppercase text-sm bg-teal-500 text-white"> text </v-badge>`, | ||
}, | ||
}, | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
159575
1
24
2734
1
8
5
- Removed@heroicons/vue@^1.0.6
- Removed@heroicons/vue@1.0.6(transitive)