galliard-ui 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const u=require("react/jsx-runtime"),b=require("react");function rn(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(c){if(n[c])return r[c]=[];if(!(c in r)){r[c]=null;const a=o[c]&&o[c].parent,l=a&&i(a);l&&(r[c]=[a].concat(l))}return r[c]}return Object.keys(n).concat(Object.keys(o)).forEach(i),r}const Me=Object.freeze({left:0,top:0,width:16,height:16}),ue=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ie=Object.freeze({...Me,...ue}),xe=Object.freeze({...Ie,body:"",hidden:!1});function on(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Ee(e,t){const n=on(e,t);for(const o in xe)o in ue?o in e&&!(o in n)&&(n[o]=ue[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function sn(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function c(a){i=Ee(o[a]||r[a],i)}return c(t),n.forEach(c),Ee(e,i)}function Pe(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=rn(e);for(const r in o){const i=o[r];i&&(t(r,sn(e,r,i)),n.push(r))}return n}const cn={provider:"",aliases:{},not_found:{},...Me};function me(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ae(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!me(e,cn))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r||typeof i.body!="string"||!me(i,xe))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],c=i.parent;if(!r||typeof c!="string"||!n[c]&&!o[c]||!me(i,xe))return null}return t}const Te=Object.create(null);function an(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function X(e,t){const n=Te[e]||(Te[e]=Object.create(null));return n[t]||(n[t]=an(e,t))}function Be(e,t){return Ae(t)?Pe(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function ln(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}const ze=/^[a-z0-9]+(-[a-z0-9]+)*$/,fe=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const a=r.pop(),l=r.pop(),d={provider:r.length>0?r[0]:o,prefix:l,name:a};return t&&!ce(d)?null:d}const i=r[0],c=i.split("-");if(c.length>1){const a={provider:o,prefix:c.shift(),name:c.join("-")};return t&&!ce(a)?null:a}if(n&&o===""){const a={provider:o,prefix:"",name:i};return t&&!ce(a,n)?null:a}return null},ce=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let re=!1;function Ge(e){return typeof e=="boolean"&&(re=e),re}function ke(e){const t=typeof e=="string"?fe(e,!0,re):e;if(t){const n=X(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function un(e,t){const n=fe(e,!0,re);if(!n)return!1;const o=X(n.provider,n.prefix);return t?ln(o,n.name,t):(o.missing.add(n.name),!0)}function fn(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),re&&!t&&!e.prefix){let r=!1;return Ae(e)&&(e.prefix="",Pe(e,(i,c)=>{un(i,c)&&(r=!0)})),r}const n=e.prefix;if(!ce({prefix:n,name:"a"}))return!1;const o=X(t,n);return!!Be(o,e)}const qe=Object.freeze({width:null,height:null}),Ue=Object.freeze({...qe,...ue}),dn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ne(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(dn);if(o===null||!o.length)return e;const r=[];let i=o.shift(),c=pn.test(i);for(;;){if(c){const a=parseFloat(i);isNaN(a)?r.push(i):r.push(Math.ceil(a*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");c=!c}}function mn(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(r===-1||i===-1)break;const c=e.indexOf(">",i);if(c===-1)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(c+1)}return{defs:n,content:e}}function hn(e,t){return e?"<defs>"+e+"</defs>"+t:t}function gn(e,t,n){const o=mn(e);return hn(o.defs,t+o.content+n)}const xn=e=>e==="unset"||e==="undefined"||e==="none";function bn(e,t){const n={...Ie,...e},o={...Ue,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(j=>{const h=[],s=j.hFlip,f=j.vFlip;let p=j.rotate;s?f?p+=2:(h.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),h.push("scale(-1 1)"),r.top=r.left=0):f&&(h.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),h.push("scale(1 -1)"),r.top=r.left=0);let x;switch(p<0&&(p-=Math.floor(p/4)*4),p=p%4,p){case 1:x=r.height/2+r.top,h.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:h.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,h.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}p%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),h.length&&(i=gn(i,'<g transform="'+h.join(" ")+'">',"</g>"))});const c=o.width,a=o.height,l=r.width,d=r.height;let m,y;c===null?(y=a===null?"1em":a==="auto"?d:a,m=Ne(y,l/d)):(m=c==="auto"?l:c,y=a===null?Ne(m,d/l):a==="auto"?d:a);const g={},v=(j,h)=>{xn(h)||(g[j]=h.toString())};v("width",m),v("height",y);const I=[r.left,r.top,l,d];return g.viewBox=I.join(" "),{attributes:g,viewBox:I,body:i}}const yn=/\sid="(\S+)"/g,vn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let _n=0;function In(e,t=vn){const n=[];let o;for(;o=yn.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const c=typeof t=="function"?t(i):t+(_n++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+c+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const be=Object.create(null);function jn(e,t){be[e]=t}function ye(e){return be[e]||be[""]}function je(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const we=Object.create(null),ee=["https://api.simplesvg.com","https://api.unisvg.com"],ae=[];for(;ee.length>0;)ee.length===1||Math.random()>.5?ae.push(ee.shift()):ae.push(ee.pop());we[""]=je({resources:["https://api.iconify.design"].concat(ae)});function wn(e,t){const n=je(t);return n===null?!1:(we[e]=n,!0)}function $e(e){return we[e]}const $n=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Se=$n();function En(e,t){const n=$e(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(c=>{r=Math.max(r,c.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function Tn(e){return e===404}const kn=(e,t,n)=>{const o=[],r=En(e,t),i="icons";let c={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,d)=>{a+=l.length+1,a>=r&&d>0&&(o.push(c),c={type:i,provider:e,prefix:t,icons:[]},a=l.length),c.icons.push(l)}),o.push(c),o};function Nn(e){if(typeof e=="string"){const t=$e(e);if(t)return t.path}return"/"}const Sn=(e,t,n)=>{if(!Se){n("abort",424);return}let o=Nn(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});o+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;Se(e+o).then(i=>{const c=i.status;if(c!==200){setTimeout(()=>{n(Tn(c)?"abort":"next",c)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},Cn={prepare:kn,send:Sn};function Ye(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function Dn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const c=i.icons,a=c.pending.length;c.pending=c.pending.filter(l=>{if(l.prefix!==r)return!0;const d=l.name;if(e.icons[d])c.loaded.push({provider:o,prefix:r,name:d});else if(e.missing.has(d))c.missing.push({provider:o,prefix:r,name:d});else return n=!0,!0;return!1}),c.pending.length!==a&&(n||Ye([e],i.id),i.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),i.abort))})}))}let Fn=0;function Rn(e,t,n){const o=Fn++,r=Ye.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(c=>{(c.loaderCallbacks||(c.loaderCallbacks=[])).push(i)}),r}function On(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,c=r.prefix,a=r.name,l=n[i]||(n[i]=Object.create(null)),d=l[c]||(l[c]=X(i,c));let m;a in d.icons?m=t.loaded:c===""||d.missing.has(a)?m=t.missing:m=t.pending;const y={provider:i,prefix:c,name:a};m.push(y)}),t}function Ln(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?fe(r,t,n):r;i&&o.push(i)}),o}const Mn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Pn(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let c;if(e.random){let _=e.resources.slice(0);for(c=[];_.length>1;){const $=Math.floor(Math.random()*_.length);c.push(_[$]),_=_.slice(0,$).concat(_.slice($+1))}c=c.concat(_)}else c=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",d=0,m,y=null,g=[],v=[];typeof o=="function"&&v.push(o);function I(){y&&(clearTimeout(y),y=null)}function j(){l==="pending"&&(l="aborted"),I(),g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function h(_,$){$&&(v=[]),typeof _=="function"&&v.push(_)}function s(){return{startTime:a,payload:t,status:l,queriesSent:d,queriesPending:g.length,subscribe:h,abort:j}}function f(){l="failed",v.forEach(_=>{_(void 0,m)})}function p(){g.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),g=[]}function x(_,$,S){const k=$!=="success";switch(g=g.filter(w=>w!==_),l){case"pending":break;case"failed":if(k||!e.dataAfterTimeout)return;break;default:return}if($==="abort"){m=S,f();return}if(k){m=S,g.length||(c.length?T():f());return}if(I(),p(),!e.random){const w=e.resources.indexOf(_.resource);w!==-1&&w!==e.index&&(e.index=w)}l="completed",v.forEach(w=>{w(S)})}function T(){if(l!=="pending")return;I();const _=c.shift();if(_===void 0){if(g.length){y=setTimeout(()=>{I(),l==="pending"&&(p(),f())},e.timeout);return}f();return}const $={status:"pending",resource:_,callback:(S,k)=>{x($,S,k)}};g.push($),d++,y=setTimeout(T,e.rotate),n(_,t,$.callback)}return setTimeout(T),s}function Qe(e){const t={...Mn,...e};let n=[];function o(){n=n.filter(a=>a().status==="pending")}function r(a,l,d){const m=Pn(t,a,l,(y,g)=>{o(),d&&d(y,g)});return n.push(m),m}function i(a){return n.find(l=>a(l))||null}return{query:r,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:o}}function Ce(){}const he=Object.create(null);function An(e){if(!he[e]){const t=$e(e);if(!t)return;const n=Qe(t),o={config:t,redundancy:n};he[e]=o}return he[e]}function Bn(e,t,n){let o,r;if(typeof e=="string"){const i=ye(e);if(!i)return n(void 0,424),Ce;r=i.send;const c=An(e);c&&(o=c.redundancy)}else{const i=je(e);if(i){o=Qe(i);const c=e.resources?e.resources[0]:"",a=ye(c);a&&(r=a.send)}}return!o||!r?(n(void 0,424),Ce):o.query(t,r,n)().abort}function De(){}function zn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dn(e)}))}function Gn(e){const t=[],n=[];return e.forEach(o=>{(o.match(ze)?t:n).push(o)}),{valid:t,invalid:n}}function ne(e,t,n){function o(){const r=e.pendingIcons;t.forEach(i=>{r&&r.delete(i),e.icons[i]||e.missing.add(i)})}if(n&&typeof n=="object")try{if(!Be(e,n).length){o();return}}catch(r){console.error(r)}o(),zn(e)}function Fe(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function qn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Fe(e.loadIcons(r,o,n),m=>{ne(e,r,m)});return}if(i){r.forEach(m=>{const y=i(m,o,n);Fe(y,g=>{const v=g?{prefix:o,icons:{[m]:g}}:null;ne(e,[m],v)})});return}const{valid:c,invalid:a}=Gn(r);if(a.length&&ne(e,a,null),!c.length)return;const l=o.match(ze)?ye(n):null;if(!l){ne(e,c,null);return}l.prepare(n,o,c).forEach(m=>{Bn(n,m,y=>{ne(e,m.icons,y)})})}))}const Un=(e,t)=>{const n=Ln(e,!0,Ge()),o=On(n);if(!o.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(o.loaded,o.missing,o.pending,De)}),()=>{l=!1}}const r=Object.create(null),i=[];let c,a;return o.pending.forEach(l=>{const{provider:d,prefix:m}=l;if(m===a&&d===c)return;c=d,a=m,i.push(X(d,m));const y=r[d]||(r[d]=Object.create(null));y[m]||(y[m]=[])}),o.pending.forEach(l=>{const{provider:d,prefix:m,name:y}=l,g=X(d,m),v=g.pendingIcons||(g.pendingIcons=new Set);v.has(y)||(v.add(y),r[d][m].push(y))}),i.forEach(l=>{const d=r[l.provider][l.prefix];d.length&&qn(l,d)}),t?Rn(t,o,i):De};function Yn(e,t){const n={...e};for(const o in t){const r=t[o],i=typeof r;o in qe?(r===null||r&&(i==="string"||i==="number"))&&(n[o]=r):i===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const Qn=/[\s,]+/;function Hn(e,t){t.split(Qn).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Wn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}function Zn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Jn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Xn(e){return"data:image/svg+xml,"+Jn(e)}function Kn(e){return'url("'+Xn(e)+'")'}let te;function Vn(){try{te=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{te=null}}function et(e){return te===void 0&&Vn(),te?te.createHTML(e):e}const He={...Ue,inline:!1},nt={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},tt={display:"inline-block"},ve={backgroundColor:"currentColor"},We={backgroundColor:"transparent"},Re={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Oe={WebkitMask:ve,mask:ve,background:We};for(const e in Oe){const t=Oe[e];for(const n in Re)t[e+n]=Re[n]}const rt={...He,inline:!0};function Le(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const ot=(e,t,n)=>{const o=t.inline?rt:He,r=Yn(o,t),i=t.mode||"svg",c={},a=t.style||{},l={...i==="svg"?nt:{}};if(n){const h=fe(n,!1,!0);if(h){const s=["iconify"],f=["provider","prefix"];for(const p of f)h[p]&&s.push("iconify--"+h[p]);l.className=s.join(" ")}}for(let h in t){const s=t[h];if(s!==void 0)switch(h){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":l.ref=s;break;case"className":l[h]=(l[h]?l[h]+" ":"")+s;break;case"inline":case"hFlip":case"vFlip":r[h]=s===!0||s==="true"||s===1;break;case"flip":typeof s=="string"&&Hn(r,s);break;case"color":c.color=s;break;case"rotate":typeof s=="string"?r[h]=Wn(s):typeof s=="number"&&(r[h]=s);break;case"ariaHidden":case"aria-hidden":s!==!0&&s!=="true"&&delete l["aria-hidden"];break;default:o[h]===void 0&&(l[h]=s)}}const d=bn(e,r),m=d.attributes;if(r.inline&&(c.verticalAlign="-0.125em"),i==="svg"){l.style={...c,...a},Object.assign(l,m);let h=0,s=t.id;return typeof s=="string"&&(s=s.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:et(In(d.body,s?()=>s+"ID"+h++:"iconifyReact"))},b.createElement("svg",l)}const{body:y,width:g,height:v}=e,I=i==="mask"||(i==="bg"?!1:y.indexOf("currentColor")!==-1),j=Zn(y,{...m,width:g+"",height:v+""});return l.style={...c,"--svg":Kn(j),width:Le(m.width),height:Le(m.height),...tt,...I?ve:We,...a},b.createElement("span",l)};Ge(!0);jn("",Cn);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!fn(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;wn(n,r)||console.error(o)}catch{console.error(o)}}}}function Ze(e){const[t,n]=b.useState(!!e.ssr),[o,r]=b.useState({});function i(v){if(v){const I=e.icon;if(typeof I=="object")return{name:"",data:I};const j=ke(I);if(j)return{name:I,data:j}}return{name:""}}const[c,a]=b.useState(i(!!e.ssr));function l(){const v=o.callback;v&&(v(),r({}))}function d(v){if(JSON.stringify(c)!==JSON.stringify(v))return l(),a(v),!0}function m(){var v;const I=e.icon;if(typeof I=="object"){d({name:"",data:I});return}const j=ke(I);if(d({name:I,data:j}))if(j===void 0){const h=Un([I],m);r({callback:h})}else j&&((v=e.onLoad)===null||v===void 0||v.call(e,I))}b.useEffect(()=>(n(!0),l),[]),b.useEffect(()=>{t&&m()},[e.icon,t]);const{name:y,data:g}=c;return g?ot({...Ie,...g},e,y):e.children?e.children:e.fallback?e.fallback:b.createElement("span",{})}const F=b.forwardRef((e,t)=>Ze({...e,_ref:t}));b.forwardRef((e,t)=>Ze({inline:!0,...e,_ref:t}));const st="_container_j1lh3_26",it="_title_j1lh3_46",ct="_containerInputError_j1lh3_50",at="_containerInput_j1lh3_50",lt="_inputElement_j1lh3_69",ut="_errorMessage_j1lh3_80",ft="_icon_j1lh3_92",dt="_containerCustomIcon_j1lh3_99",P={container:st,title:it,containerInputError:ct,containerInput:at,inputElement:lt,errorMessage:ut,icon:ft,containerCustomIcon:dt},oe=e=>{switch(e){case"none":return 0;case"sm":return 5;case"md":return 10;case"lg":return 15;case"full":return 9999;default:return 0}},pt=b.forwardRef(function({placeholder:t,value:n,setValue:o,label:r,typeInput:i,HorV:c,errorMessage:a,font:l,fontLabel:d,rounded:m,width:y,height:g,border:v,shadow:I,textSize:j,textColor:h,bgColor:s,customContainerClass:f,customInputClass:p,customIconRClass:x,customIconLClass:T,seeIconLeft:_=!0,seeIconRight:$,iconColorL:S,iconColorR:k,iconColorPass:w,iconSizeL:R,iconSizeR:M,iconSizePass:O,iconLeft:Y,iconRight:z,customIconLeft:Q,customIconRight:G,args:W},Z){const[C,B]=b.useState(!1),J=b.useMemo(()=>oe(m??"full"),[m]);return u.jsxs("div",{className:P.container,style:{flexDirection:c==="horizontal"?"row":"column"},children:[u.jsx("label",{className:P.title,style:{fontSize:j,color:h,height:c==="horizontal"?35:"auto",display:c==="horizontal"?"flex":"block",alignItems:c==="horizontal"?"center":"initial",marginRight:c==="horizontal"?10:0,marginBottom:c==="vertical"?5:0,fontFamily:d},children:r}),u.jsxs("div",{className:P.containerInputError,children:[u.jsxs("div",{className:`${P.containerInput} ${f}`,style:{borderRadius:J,width:!y&&i==="datetime-local"?"auto":y,height:g,border:v||v===void 0?"":"none",boxShadow:I?"0 0 5px #00000075":"",backgroundColor:s},children:[Q?u.jsx("div",{className:`${P.containerCustomIcon} ${T}`,children:Q}):_&&u.jsx(F,{icon:Y??"mi:user",className:`${P.icon} ${T}`,style:{color:S,fontSize:R}}),u.jsx("input",{ref:Z,className:`${P.inputElement} ${p}`,style:{fontSize:j,color:h,fontFamily:l},type:i==="password"&&C?"text":i,placeholder:t,value:n,onChange:q=>o?.(q.target.value),...W}),i==="password"&&u.jsx(F,{onClick:()=>B(!C),icon:C?"fluent:eye-20-filled":"fluent:eye-hide-20-filled",className:`${P.icon}`,style:{color:w,fontSize:O,marginRight:10,cursor:i=="password"?"pointer":"default"}}),G?u.jsx("div",{className:`${P.containerCustomIcon} ${x}`,children:G}):$&&u.jsx(F,{icon:z??"mi:user",className:`${P.icon} ${x}`,style:{color:k,fontSize:M}})]}),a!==""&&u.jsx("p",{className:P.errorMessage,children:a})]})]})}),mt="_container_5daeb_26",ht="_containerInputError_5daeb_50",gt="_containerInput_5daeb_50",xt="_inputElement_5daeb_69",bt="_errorMessage_5daeb_80",yt="_icon_5daeb_92",vt="_containerCustomIcon_5daeb_99",H={container:mt,containerInputError:ht,containerInput:gt,inputElement:xt,errorMessage:bt,icon:yt,containerCustomIcon:vt},_t=b.forwardRef(function({label:t,value:n,errorMessage:o,textSize:r,textColor:i,setValue:c,useLinkable:a,link:l,font:d,iconSize:m,seeIcon:y,icon:g,iconColor:v,customInputClass:I,customLabelClass:j,customIconClass:h,customIcon:s,args:f},p){const x=b.useId();return u.jsx("div",{ref:p,className:H.container,children:u.jsxs("div",{className:H.containerInputError,children:[u.jsxs("div",{className:H.containerInput,children:[u.jsx("input",{className:`${H.inputElement} ${I}`,style:{fontSize:r,color:i},type:"checkbox",checked:n,onChange:T=>c(T.target.checked),...f}),s?u.jsx("div",{className:`${H.containerCustomIcon} ${h}`,children:s}):y&&u.jsx(F,{icon:g??"mi:user",className:`${H.icon} ${h}`,style:{color:v,fontSize:m}}),a?u.jsx("a",{className:j,href:l||"#",style:{fontSize:r,color:i,textDecoration:"underline",fontFamily:d},children:t}):u.jsx("label",{htmlFor:x,className:j,style:{fontSize:r,color:i,fontFamily:d},children:t})]}),o!==""&&u.jsx("p",{className:H.errorMessage,children:o})]})})}),It="_container_v1dbe_26",jt="_containerInputError_v1dbe_51",wt="_containerInput_v1dbe_51",$t="_errorMessage_v1dbe_81",Et="_icon_v1dbe_93",Tt="_containerCustomIcon_v1dbe_100",kt="_containerInputAndOptions_v1dbe_100",Nt="_containerOptions_v1dbe_100",St="_optionElement_v1dbe_100",Ct="_containerIconOption_v1dbe_100",Dt="_containerLabel_v1dbe_112",Ft="_textOption_v1dbe_142",Rt="_iconArrow_v1dbe_150",N={container:It,containerInputError:jt,containerInput:wt,errorMessage:$t,icon:Et,containerCustomIcon:Tt,containerInputAndOptions:kt,containerOptions:Nt,optionElement:St,containerIconOption:Ct,containerLabel:Dt,textOption:Ft,iconArrow:Rt},Je=(e,t)=>{b.useEffect(()=>{const n=o=>{const r=e.current;!r||r.contains(o.target)||t(o)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},Ot=b.forwardRef(function({label:t,value:n,setValue:o,options:r,placeholder:i,errorMessage:c,orientation:a="bottom",iconInRight:l=!1,font:d,fontLabel:m,rounded:y,border:g=!0,textSize:v="1.4em",textColor:I="#000",labelSize:j="1.4em",labelColor:h="#000",width:s=250,height:f=40,bgColor:p,shadow:x=!1,icon:T,iconSize:_=20,iconsOptionsSize:$=20,seeIcon:S=!1,seeOptionsIcons:k=!1,iconsColor:w="#000",customIcon:R,customContainerClass:M,customInputClass:O,customLabelClass:Y,customIconClass:z,customOptionClass:Q},G){const[W,Z]=b.useState(null),[C,B]=b.useState(!1),J=b.useRef(null),q={valueOption:null,text:i??"Selecciona una opción",icon:"hugeicons:cursor-magic-selection-04"};Je(J,()=>{B(!1)}),b.useEffect(()=>{let D=[q,...r];Z(D)},[]);const se=b.useMemo(()=>oe(y??"lg"),[y]);return u.jsxs("div",{ref:G,className:`${N.container} ${M}`,children:[u.jsxs("div",{className:N.containerLabel,style:{flexDirection:l?"row-reverse":"row",justifyContent:l?"flex-end":"flex-start"},children:[R?u.jsx("div",{className:`${N.containerCustomIcon} ${z}`,style:{height:_},children:R}):S&&u.jsx(F,{icon:T??"icon-park-outline:dot",className:`${N.icon} ${z}`,style:{color:w,fontSize:_}}),u.jsx("label",{className:Y,style:{fontSize:j,color:h,fontFamily:m},children:t})]}),u.jsxs("div",{className:N.containerInputError,children:[u.jsxs("div",{ref:J,className:N.containerInputAndOptions,children:[u.jsxs("div",{onClick:D=>{D.stopPropagation(),B(!C)},className:`${N.containerInput} ${O}`,style:{width:s,height:f,border:g?"":"none",boxShadow:x?"0 0 10px #00000050":"",borderRadius:se,backgroundColor:p},children:[k&&n?.valueOption&&u.jsx(u.Fragment,{children:n?.customIcon?u.jsx("div",{className:N.containerCustomIcon,children:n?.customIcon}):n?.icon&&u.jsx(F,{icon:n.icon,className:N.icon,style:{color:n.iconColor?n.iconColor:w,fontSize:$}})}),u.jsx("p",{className:N.textOption,style:{fontSize:j,color:h,fontWeight:n?.valueOption?"bold":"",fontFamily:d},children:n?.text?n.text:q.text}),u.jsx(F,{icon:"ri:arrow-down-s-line",className:`${N.icon} ${N.iconArrow}`})]}),C&&u.jsx("div",{className:N.containerOptions,style:{top:a==="bottom"?"calc(100% + 10px)":a==="left"||a==="right"?0:"",left:a==="right"?"calc(100% + 10px)":a==="top"||a==="bottom"?0:"",bottom:a==="top"?"calc(100% + 10px)":"",right:a==="left"?"calc(100% + 10px)":""},children:W?.map((D,K)=>u.jsxs("div",{onClick:V=>{V.stopPropagation(),B(!1),o(D)},className:`${N.optionElement} ${Q}`,children:[k&&u.jsx("div",{className:`${N.containerIconOption}`,children:D.customIcon?D.customIcon:k&&u.jsx(F,{icon:D.icon??"icon-park-outline:dot",className:`${N.icon} ${N.containerIconOption}`,style:{color:D.iconColor?D.iconColor:w,fontSize:$}})}),u.jsx("p",{className:N.textOption,style:{fontSize:v,color:I,fontFamily:d},children:D.text?D.text:q.text})]},K))})]}),c!==""&&u.jsx("p",{className:N.errorMessage,children:c})]})]})}),Lt="_container_1nag4_26",Mt="_containerInputError_1nag4_50",Pt="_errorMessage_1nag4_80",At="_icon_1nag4_92",Bt="_containerCustomIcon_1nag4_99",zt="_containerInputFile_1nag4_114",Gt="_containerSelectedFile_1nag4_114",qt="_textInput_1nag4_132",Ut="_inputFile_1nag4_142",Yt="_fileName_1nag4_158",Qt="_backdrop_1nag4_175",L={container:Lt,containerInputError:Mt,errorMessage:Pt,icon:At,containerCustomIcon:Bt,containerInputFile:zt,containerSelectedFile:Gt,textInput:qt,inputFile:Ut,fileName:Yt,backdrop:Qt},ge={images:{common:"image/png, image/jpeg, image/gif, image/webp",png:"image/png",jpg:"image/jpeg, image/jpg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",ico:"image/x-icon, image/vnd.microsoft.icon",tiff:"image/tiff",bmp:"image/bmp",heic:"image/heic, image/heif"},docs:{pdf:"application/pdf",word:".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document",excel:".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",powerpoint:".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",odp:"application/vnd.oasis.opendocument.presentation",txt:"text/plain",rtf:"application/rtf",csv:"text/csv",markdown:"text/markdown, .md",epub:"application/epub+zip"},archives:{zip:"application/zip, application/x-zip-compressed",rar:"application/x-rar-compressed, .rar",sevenZ:"application/x-7z-compressed",tar:"application/x-tar",gz:"application/gzip",iso:"application/x-iso9660-image, .iso"},media:{audio:"audio/*",video:"video/*",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg, video/ogg",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo"},fonts:{woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf, application/x-font-ttf",otf:"font/otf, application/x-font-opentype",eot:"application/vnd.ms-fontobject"},code:{html:"text/html",css:"text/css",js:"text/javascript, application/javascript, .mjs",ts:"application/typescript, .ts, .tsx",json:"application/json",xml:"application/xml, text/xml",python:"text/x-python, .py",java:"text/x-java-source, .java, application/java-archive, .jar",csharp:"text/plain, .cs",cpp:"text/x-c++, .cpp, .h, .hpp",c:"text/x-c, .c",php:"application/x-httpd-php, .php",sql:"application/sql, .sql",sh:"application/x-sh, .sh",yaml:"text/yaml, .yaml, .yml"}},Xe=e=>{if(Array.isArray(e))return e.map(n=>Xe(n)).filter(n=>n!==void 0).join(", ");if(e!=="*"){if(typeof e=="string"){if(e in ge){const t=ge[e];return Object.values(t).join(", ")}return}if(typeof e=="object"){const t=[];return Object.keys(e).forEach(n=>{const o=e[n],r=ge[n];o&&r&&o.forEach(i=>{const c=r[i];c&&t.push(c)})}),t.join(", ")}}},Ht="_btnThemeDark_1hn8j_26",Wt="_iconButton_1hn8j_58",Zt="_containerCustomIcon_1hn8j_65",Jt="_btnBorderedThemeDark_1hn8j_78",Xt="_btnThemeGreen_1hn8j_98",Kt="_btnBorderedThemeGreen_1hn8j_150",Vt="_btnThemeBlue_1hn8j_170",er="_btnBorderedThemeBlue_1hn8j_222",nr="_btnThemeRed_1hn8j_242",tr="_btnBorderedThemeRed_1hn8j_294",rr="_btnThemePurple_1hn8j_314",or="_btnBorderedThemePurple_1hn8j_366",sr="_btnThemeGray_1hn8j_386",ir="_btnBorderedThemeGray_1hn8j_438",cr="_btnThemeLight_1hn8j_458",ar="_btnBorderedThemeLight_1hn8j_510",lr="_btnThemeYellow_1hn8j_530",ur="_btnBorderedThemeYellow_1hn8j_582",ie={btnThemeDark:Ht,iconButton:Wt,containerCustomIcon:Zt,btnBorderedThemeDark:Jt,btnThemeGreen:Xt,btnBorderedThemeGreen:Kt,btnThemeBlue:Vt,btnBorderedThemeBlue:er,btnThemeRed:nr,btnBorderedThemeRed:tr,btnThemePurple:rr,btnBorderedThemePurple:or,btnThemeGray:sr,btnBorderedThemeGray:ir,btnThemeLight:cr,btnBorderedThemeLight:ar,btnThemeYellow:lr,btnBorderedThemeYellow:ur},Ke=b.forwardRef(function({label:t="Texto del Botón",action:n=()=>{alert("Botón presionado")},font:o,width:r,height:i,bgColor:c,txtColor:a,icon:l="tabler:send",seeIcon:d=!0,textSize:m,iconColor:y,iconSize:g,styleType:v="ThemeDark",rounded:I="md",borderedStyle:j=!1,iconOn:h,padding:s,shadow:f=!1,colorShadow:p,customClassButton:x,customClassLabel:T,customClassIcon:_,customIcon:$,args:S},k){const w=b.useMemo(()=>oe(I??"full"),[I]);return u.jsxs("button",{ref:k,className:`${ie[`btn${v}`]} ${j&&ie[`btnBordered${v}`]} ${x}`,style:{borderRadius:w,width:r??"auto",height:i??"auto",flexDirection:h==="left"?"row-reverse":"row",boxShadow:`${f?"0 0 7px "+(p||"#000"):""}`,padding:s,background:c},onClick:R=>{R.preventDefault(),n()},...S,children:[t&&u.jsx("p",{className:`${T}`,style:{fontSize:m,fontFamily:o,color:a},children:t}),$?u.jsx("div",{className:`${ie.containerCustomIcon} ${_}`,children:$}):d&&u.jsx(F,{icon:l,className:`${ie.iconButton} ${_}`,style:{fontSize:g,color:y}})]})}),fr=b.forwardRef(function({label:t,errorMessage:n,acceptFiles:o="*",selectedFileE:r,setSelectedFileE:i,maxMBSize:c,shadow:a=!0,textButtonCancel:l="Cancelar",font:d,width:m,height:y,bgColor:g,bgColorHover:v,labelSize:I,labelColor:j,rounded:h="md",iconSize:s=30,seeIcon:f=!0,icon:p,iconColor:x="#fff",customFIleClass:T,customSelectedClass:_,customLabelClass:$,customIconClass:S,customIcon:k,args:w},R){const M=b.useId(),O=b.useRef(0),[Y,z]=b.useState(r),[Q,G]=b.useState(!1),[W,Z]=b.useState(null),[C,B]=b.useState(!1),J=Xe(o),q=()=>{z(null),i(null)},se=E=>{if(Z(null),c){const tn=c*1024*1024;if(E.size>tn){Z(`El archivo excede el límite de ${c} MB.`),q();return}}z(E),i(E)},D=E=>{E.preventDefault(),E.target.files&&E.target.files[0]?se(E.target.files[0]):q()},K=E=>{E.preventDefault(),E.stopPropagation(),O.current+=1,E.type==="dragenter"||E.type==="dragover"?B(!0):E.type==="dragleave"&&B(!1)},V=E=>{E.preventDefault(),E.stopPropagation(),O.current-=1,O.current===0&&B(!1)},nn=E=>{E.preventDefault(),E.stopPropagation(),B(!1),O.current=0,E.dataTransfer.files&&E.dataTransfer.files[0]&&se(E.dataTransfer.files[0])},pe=b.useMemo(()=>oe(h??"lg"),[h]);return u.jsx("div",{className:L.container,children:u.jsxs("div",{className:L.containerInputError,children:[Y?u.jsxs("div",{className:`${L.containerSelectedFile} ${_}`,style:{boxShadow:a?"0 0 5px #00000050":"",borderRadius:pe,width:m,height:y},children:[f&&u.jsx(F,{icon:"uim:paperclip",className:L.icon}),u.jsx("p",{className:L.fileName,style:{fontFamily:d},children:Y?.name}),u.jsx("div",{className:L.backdrop,style:{borderRadius:pe},children:u.jsx(Ke,{styleType:"ThemeRed",action:q,label:l,rounded:"full",icon:"fa:trash",iconSize:"1.4rem",iconColor:"#fff",textSize:12,padding:"7px"})})]}):u.jsxs("label",{htmlFor:M,className:`${L.containerInputFile} ${T}`,onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),onDragEnter:K,onDragLeave:V,onDragOver:E=>E.preventDefault(),onDrop:nn,style:{boxShadow:a?"0 0 5px #00000050":"",borderRadius:pe,backgroundColor:C?"#fff":Q?v:g,borderColor:C?g||"#6936ee":"",width:m,height:y,fontFamily:d},children:[!k||C?f&&u.jsx(F,{icon:C?"tabler:drag-drop":p??"mingcute:upload-3-fill",className:`${L.icon} ${S}`,onDragEnter:K,onDragLeave:V,style:{color:C?g||"#6936ee":x,fontSize:s}}):u.jsx("div",{className:`${L.containerCustomIcon} ${S}`,style:{height:s??"2rem"},children:k}),u.jsx("span",{className:`${L.textInput} ${$}`,style:{fontSize:I,color:C?g||"#6936ee":j,fontFamily:d},onDragEnter:K,onDragLeave:V,children:C?"Suelta para agregar":t??"Click o arrastra un archivo"}),u.jsx("input",{ref:R,id:M,type:"file",accept:J,className:L.inputFile,onChange:D,...w})]}),u.jsx("p",{className:L.errorMessage,children:W||n||""})]})})}),dr="_container_sbkx2_26",pr="_containerInputError_sbkx2_50",mr="_inputElement_sbkx2_69",hr="_errorMessage_sbkx2_80",gr="_icon_sbkx2_92",xr="_containerCustomIcon_sbkx2_99",br="_containerLabel_sbkx2_111",yr="_containerGroupRadio_sbkx2_127",vr="_containerRadio_sbkx2_134",A={container:dr,containerInputError:pr,inputElement:mr,errorMessage:hr,icon:gr,containerCustomIcon:xr,containerLabel:br,containerGroupRadio:yr,containerRadio:vr},_r=b.forwardRef(function({label:t,labelSize:n,labelColor:o,options:r,errorMessage:i,textSize:c,textColor:a,setValue:l,name:d,font:m,fontLabel:y,HorV:g="horizontal",icon:v,iconInRight:I,iconSize:j,iconColor:h,customIcon:s,seeIcon:f=!0,customInputClass:p,customLabelClass:x,customTextClass:T,customIconLabelClass:_,customContainerRadiosClass:$},S){const k=b.useId();return u.jsxs("div",{ref:S,className:A.container,children:[u.jsxs("div",{className:A.containerLabel,style:{flexDirection:I?"row-reverse":"row",justifyContent:I?"flex-end":"flex-start"},children:[s?u.jsx("div",{className:`${A.containerCustomIcon} ${_}`,style:{height:j},children:s}):f&&u.jsx(F,{icon:v??"mi:user",className:`${A.icon} ${_}`,style:{color:h,fontSize:j}}),u.jsx("label",{style:{fontSize:n,color:o,fontFamily:y},className:T,children:t})]}),u.jsxs("div",{className:A.containerInputError,children:[u.jsx("div",{className:`${A.containerGroupRadio} ${$}`,style:{flexDirection:g==="vertical"?"column":"row",alignItems:g==="vertical"?"stretch":"center",justifyContent:g==="vertical"?"center":"flex-start"},children:r.map((w,R)=>{const M=`${k}-${R}`;return u.jsxs("div",{className:A.containerRadio,children:[u.jsx("input",{id:M,className:`${A.inputElement} ${p}`,style:{fontSize:c,color:a},type:"radio",name:d,value:w.value,onChange:O=>l(O.target.value)}),w.customIcon?u.jsx("div",{className:`${A.containerCustomIcon} ${w.customIconClass}`,children:w.customIcon}):w.seeIcon&&u.jsx(F,{icon:w.icon??"mi:user",className:`${A.icon} ${w.customIconClass}`,style:{color:w.iconColor,fontSize:j}}),u.jsx("label",{htmlFor:M,className:x,style:{fontSize:c,color:a,fontFamily:m},children:w.label})]},k+w.value)})}),i!==""&&u.jsx("p",{className:A.errorMessage,children:i})]})]})}),Ir="_container_msjnc_26",jr="_containerInputError_msjnc_50",wr="_containerInput_msjnc_50",$r="_inputElement_msjnc_69",Er="_errorMessage_msjnc_80",Tr="_icon_msjnc_92",kr="_containerCustomIcon_msjnc_99",Nr="_containerLabel_msjnc_111",Sr="_counterCharacter_msjnc_142",U={container:Ir,containerInputError:jr,containerInput:wr,inputElement:$r,errorMessage:Er,icon:Tr,containerCustomIcon:kr,containerLabel:Nr,counterCharacter:Sr},Cr=b.forwardRef(function({placeholder:t,value:n,setValue:o,label:r,errorMessage:i,seeMaxCharCounter:c=!0,maxCharacters:a=300,resize:l=!0,font:d,fontLabel:m,rounded:y,width:g=250,height:v=100,maxWidth:I=500,maxHeight:j=500,border:h,shadow:s,textSize:f,textColor:p,bgColor:x,customContainerClass:T,customTextAreaClass:_,customIconClass:$,seeIcon:S,iconInRight:k=!1,iconColor:w,iconSize:R,icon:M,customIcon:O,args:Y},z){const Q=b.useMemo(()=>oe(y??"lg"),[y]);return u.jsxs("div",{className:U.container,children:[u.jsxs("div",{className:U.containerLabel,style:{flexDirection:k?"row-reverse":"row",justifyContent:k?"flex-end":"flex-start"},children:[O?u.jsx("div",{className:`${U.containerCustomIcon} ${$}`,style:{height:R},children:O}):S&&u.jsx(F,{icon:M??"mi:user",className:`${U.icon} ${$}`,style:{color:w,fontSize:R}}),u.jsx("label",{style:{fontSize:f,color:p,fontFamily:m},children:r})]}),u.jsxs("div",{className:U.containerInputError,children:[u.jsxs("div",{className:`${U.containerInput} ${T}`,style:{borderRadius:Q,border:h||h===void 0?"":"none",boxShadow:s?"0 0 5px #00000075":"",backgroundColor:x,resize:l?"both":"none",width:g,height:v,minWidth:g,minHeight:v,maxWidth:I,maxHeight:j},children:[u.jsx("textarea",{ref:z,className:`${U.inputElement} ${_}`,style:{fontSize:f,color:p,fontFamily:d},placeholder:t,value:n,maxLength:a,onChange:G=>o?.(G.target.value),...Y}),c&&u.jsxs("p",{className:U.counterCharacter,children:[n?n?.length:0,"/",a]})]}),i!==""&&u.jsx("p",{className:U.errorMessage,children:i})]})]})}),Dr=["America/Mexico_City","America/New_York","America/Los_Angeles","America/Bogota","America/Argentina/Buenos_Aires","America/Sao_Paulo","Europe/Madrid","Europe/London","Europe/Paris","Asia/Tokyo","Asia/Shanghai","Australia/Sydney","UTC"],de="America/Mexico_City";function Ve(e,t){return new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).formatToParts(e).reduce((o,r)=>(o[r.type]=r.value,o),{})}function le(e){if(!e)return 0;let t;return typeof e=="string"?t=new Date(e):t=e,Math.floor(t.getTime()/1e3)}function Fr(e,t=de){if(!e)return"";const n=new Date(e*1e3),o=Ve(n,t);return`${o.year}-${o.month}-${o.day}`}function en(e,t=de){if(!e)return"";const n=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"],o=new Date(e*1e3),r=Ve(o,t),i=parseInt(r.month,10)-1,c=n[i]||r.month,a=r.dayPeriod?r.dayPeriod.toUpperCase().replace(/\./g,""):"";return`${r.day}/${c}/${r.year} - ${r.hour}:${r.minute} ${a}`}function _e(e,t=de){if(!e)return"";const n=new Date(e*1e3),r=new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(n).reduce((i,c)=>(i[c.type]=c.value,i),{});return`${r.year}-${r.month}-${r.day} ${r.hour}:${r.minute}`}function Rr(e,t=de){return en(e,t).split(" - ")[0]}function Or(e){let t=!0;const n=b.useCallback((s,f)=>!s||s===void 0||s.length===0?"Este campo "+f:s+" "+f,[]),o=b.useCallback((s,f,p,x)=>f!==!0&&(s==null||typeof s=="string"&&s.trim()==="")?(t=!1,x?.(n(p,"es obligatorio")),!1):!0,[]),r=b.useCallback((s,f,p,x)=>s.length<f?(t=!1,x?.(n(p,"debe tener mínimo "+f.toString()+" caracteres")),!1):!0,[]),i=b.useCallback((s,f,p,x)=>s.length>f?(t=!1,x?.(n(p,"debe tener máximo "+f.toString()+" caracteres")),!1):!0,[]),c=b.useCallback((s,f,p,x)=>s===f?(t=!1,x?.(n(p,"debe ser igual a: "+f)),!1):!0,[]),a=b.useCallback((s,f,p,x)=>f.test(s)?!0:(t=!1,x?.(n(p,"tiene un formato inválido")),!1),[]),l=b.useCallback((s,f,p)=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?!0:(t=!1,p?.(n(f,"no es un correo electrónico válido")),!1),[n]),d=b.useCallback((s,f,p)=>/^[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}$/.test(s)?!0:(t=!1,p?.(n(f,"no es un número de teléfono válido")),!1),[n]),m=b.useCallback((s,f,p)=>/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/.test(s)?!0:(t=!1,p?.(n(f,"no es una URL válida")),!1),[n]),y=b.useCallback((s,f,p)=>/^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{8,}$/.test(s)?!0:(t=!1,p?.(n(f,"debe tener al menos 8 caracteres, un número y un símbolo")),!1),[n]),g=b.useCallback((s,f,p)=>typeof s=="number"?(t=!1,p?.(n(f,"debe ser un número")),!1):!0,[n]),v=b.useCallback((s,f,p,x)=>s<f?(t=!1,x?.(n(p,"debe ser mayor a "+f.toString())),!1):!0,[n]),I=b.useCallback((s,f,p,x)=>s>f?(t=!1,x?.(n(p,"debe ser menor a "+f.toString())),!1):!0,[n]),j=b.useCallback((s,f,p)=>Number.isInteger(s)?!0:(t=!1,p?.(n(f,"debe ser un número entero (sin decimales)")),!1),[n]),h=b.useCallback((s,f,p,x)=>f===s?(t=!1,x?.(n(p,"debe ser igual a "+f.toString())),!1):!0,[n]);try{return e.forEach(s=>{if(o(s.value,s.canBeNull,s.nameInput,s.setError))switch(s.typeInput){case"text":if(typeof s.minLength=="number"&&s.minLength>0&&typeof s.value=="string"&&!r(s.value,s.minLength,s.nameInput,s.setError)||typeof s.maxLength=="number"&&s.maxLength>0&&typeof s.value=="string"&&!i(s.value,s.maxLength,s.nameInput,s.setError)||typeof s.needBeEqualTo=="string"&&typeof s.value=="string"&&!c(s.value,s.needBeEqualTo,s.nameInput,s.setError)||typeof s.regex=="string"&&typeof s.value=="string"&&!a(s.value,s.regex,s.nameInput,s.setError))return;break;case"email":if(typeof s.value=="string"&&!l(s.value,s.nameInput,s.setError))return;break;case"phone":if(typeof s.value=="string"&&!d(s.value,s.nameInput,s.setError))return;break;case"url":if(typeof s.value=="string"&&!m(s.value,s.nameInput,s.setError))return;break;case"pass":if(typeof s.value=="string"&&!y(s.value,s.nameInput,s.setError))return;break;case"num":if(!g(s.value,s.nameInput,s.setError)||typeof s.min=="number"&&s.min>0&&typeof s.value=="number"&&!v(s.value,s.min,s.nameInput,s.setError)||typeof s.max=="number"&&s.max>0&&typeof s.value=="number"&&!I(s.value,s.max,s.nameInput,s.setError)||s.isInteger===!0&&typeof s.value=="number"&&!j(s.value,s.nameInput,s.setError)||typeof s.needBeEqualTo=="number"&&s.needBeEqualTo>0&&typeof s.value=="number"&&!h(s.value,s.needBeEqualTo,s.nameInput,s.setError))return;break;case"bool":if(s.mustBeTrue===!0&&s.value!==!0){t=!1,s.setError?.(n(s.nameInput,"debe estar seleccionado"));return}break;case"date":case"date-time":let f,p,x;if(typeof s.value=="number"&&s.value.toString().length===10)f=s.value;else if(s.value instanceof Date||typeof s.value=="string")f=le(s.value);else throw new Error("Formato de fecha inválido");if(s.min&&s.min instanceof Date)p=le(s.min);else throw new Error("La propiedad 'min' tiene un formato de fecha inválido o no existe");if(s.max&&s.max instanceof Date)x=le(s.max);else throw new Error("La propiedad 'max' tiene un formato de fecha inválido o no existe");if(f<p){t=!1,s.setError?.(n(s.nameInput,"la fecha no puede ser menor que "+_e(p)));return}if(f>x){t=!1,s.setError?.(n(s.nameInput,"la fecha no puede ser mayor que "+_e(x)));return}break;case"time":case"data":return;default:console.warn("Tipo de validacion no reconocida");break}}),t}catch(s){const f=s.message;throw console.error(`Error: ${f}`),s}}exports.ButtonGal=Ke;exports.CheckBoxGal=_t;exports.DropDownGal=Ot;exports.InputFileGal=fr;exports.InputRadioGal=_r;exports.InputTextGal=pt;exports.TIMEZONES=Dr;exports.TextAreaGal=Cr;exports.convertToUnix=le;exports.unixToDate=Fr;exports.unixToDateTime=_e;exports.unixToDateTimeString=en;exports.unixToStringYMD=Rr;exports.useOnClickOutside=Je;exports.useValidateForms=Or;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const u=require("react/jsx-runtime"),b=require("react");function rn(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(c){if(n[c])return r[c]=[];if(!(c in r)){r[c]=null;const a=o[c]&&o[c].parent,l=a&&i(a);l&&(r[c]=[a].concat(l))}return r[c]}return Object.keys(n).concat(Object.keys(o)).forEach(i),r}const Pe=Object.freeze({left:0,top:0,width:16,height:16}),le=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),je=Object.freeze({...Pe,...le}),be=Object.freeze({...je,body:"",hidden:!1});function on(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Te(e,t){const n=on(e,t);for(const o in be)o in le?o in e&&!(o in n)&&(n[o]=le[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function sn(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function c(a){i=Te(o[a]||r[a],i)}return c(t),n.forEach(c),Te(e,i)}function Ae(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=rn(e);for(const r in o){const i=o[r];i&&(t(r,sn(e,r,i)),n.push(r))}return n}const cn={provider:"",aliases:{},not_found:{},...Pe};function he(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Be(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!he(e,cn))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r||typeof i.body!="string"||!he(i,be))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],c=i.parent;if(!r||typeof c!="string"||!n[c]&&!o[c]||!he(i,be))return null}return t}const ke=Object.create(null);function an(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function H(e,t){const n=ke[e]||(ke[e]=Object.create(null));return n[t]||(n[t]=an(e,t))}function ze(e,t){return Be(t)?Ae(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function ln(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}const Ge=/^[a-z0-9]+(-[a-z0-9]+)*$/,ue=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const a=r.pop(),l=r.pop(),d={provider:r.length>0?r[0]:o,prefix:l,name:a};return t&&!ie(d)?null:d}const i=r[0],c=i.split("-");if(c.length>1){const a={provider:o,prefix:c.shift(),name:c.join("-")};return t&&!ie(a)?null:a}if(n&&o===""){const a={provider:o,prefix:"",name:i};return t&&!ie(a,n)?null:a}return null},ie=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let re=!1;function qe(e){return typeof e=="boolean"&&(re=e),re}function Ne(e){const t=typeof e=="string"?ue(e,!0,re):e;if(t){const n=H(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function un(e,t){const n=ue(e,!0,re);if(!n)return!1;const o=H(n.provider,n.prefix);return t?ln(o,n.name,t):(o.missing.add(n.name),!0)}function fn(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),re&&!t&&!e.prefix){let r=!1;return Be(e)&&(e.prefix="",Ae(e,(i,c)=>{un(i,c)&&(r=!0)})),r}const n=e.prefix;if(!ie({prefix:n,name:"a"}))return!1;const o=H(t,n);return!!ze(o,e)}const Ue=Object.freeze({width:null,height:null}),Ye=Object.freeze({...Ue,...le}),dn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Se(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(dn);if(o===null||!o.length)return e;const r=[];let i=o.shift(),c=pn.test(i);for(;;){if(c){const a=parseFloat(i);isNaN(a)?r.push(i):r.push(Math.ceil(a*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");c=!c}}function mn(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(r===-1||i===-1)break;const c=e.indexOf(">",i);if(c===-1)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(c+1)}return{defs:n,content:e}}function hn(e,t){return e?"<defs>"+e+"</defs>"+t:t}function gn(e,t,n){const o=mn(e);return hn(o.defs,t+o.content+n)}const xn=e=>e==="unset"||e==="undefined"||e==="none";function bn(e,t){const n={...je,...e},o={...Ye,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(j=>{const h=[],s=j.hFlip,f=j.vFlip;let p=j.rotate;s?f?p+=2:(h.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),h.push("scale(-1 1)"),r.top=r.left=0):f&&(h.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),h.push("scale(1 -1)"),r.top=r.left=0);let x;switch(p<0&&(p-=Math.floor(p/4)*4),p=p%4,p){case 1:x=r.height/2+r.top,h.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:h.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,h.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}p%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),h.length&&(i=gn(i,'<g transform="'+h.join(" ")+'">',"</g>"))});const c=o.width,a=o.height,l=r.width,d=r.height;let m,y;c===null?(y=a===null?"1em":a==="auto"?d:a,m=Se(y,l/d)):(m=c==="auto"?l:c,y=a===null?Se(m,d/l):a==="auto"?d:a);const g={},v=(j,h)=>{xn(h)||(g[j]=h.toString())};v("width",m),v("height",y);const _=[r.left,r.top,l,d];return g.viewBox=_.join(" "),{attributes:g,viewBox:_,body:i}}const yn=/\sid="(\S+)"/g,vn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let _n=0;function In(e,t=vn){const n=[];let o;for(;o=yn.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const c=typeof t=="function"?t(i):t+(_n++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+c+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const ye=Object.create(null);function jn(e,t){ye[e]=t}function ve(e){return ye[e]||ye[""]}function we(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const $e=Object.create(null),ee=["https://api.simplesvg.com","https://api.unisvg.com"],ce=[];for(;ee.length>0;)ee.length===1||Math.random()>.5?ce.push(ee.shift()):ce.push(ee.pop());$e[""]=we({resources:["https://api.iconify.design"].concat(ce)});function wn(e,t){const n=we(t);return n===null?!1:($e[e]=n,!0)}function Ee(e){return $e[e]}const $n=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ce=$n();function En(e,t){const n=Ee(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(c=>{r=Math.max(r,c.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function Tn(e){return e===404}const kn=(e,t,n)=>{const o=[],r=En(e,t),i="icons";let c={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,d)=>{a+=l.length+1,a>=r&&d>0&&(o.push(c),c={type:i,provider:e,prefix:t,icons:[]},a=l.length),c.icons.push(l)}),o.push(c),o};function Nn(e){if(typeof e=="string"){const t=Ee(e);if(t)return t.path}return"/"}const Sn=(e,t,n)=>{if(!Ce){n("abort",424);return}let o=Nn(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});o+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;Ce(e+o).then(i=>{const c=i.status;if(c!==200){setTimeout(()=>{n(Tn(c)?"abort":"next",c)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},Cn={prepare:kn,send:Sn};function Qe(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function Dn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const c=i.icons,a=c.pending.length;c.pending=c.pending.filter(l=>{if(l.prefix!==r)return!0;const d=l.name;if(e.icons[d])c.loaded.push({provider:o,prefix:r,name:d});else if(e.missing.has(d))c.missing.push({provider:o,prefix:r,name:d});else return n=!0,!0;return!1}),c.pending.length!==a&&(n||Qe([e],i.id),i.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),i.abort))})}))}let Fn=0;function Rn(e,t,n){const o=Fn++,r=Qe.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(c=>{(c.loaderCallbacks||(c.loaderCallbacks=[])).push(i)}),r}function On(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,c=r.prefix,a=r.name,l=n[i]||(n[i]=Object.create(null)),d=l[c]||(l[c]=H(i,c));let m;a in d.icons?m=t.loaded:c===""||d.missing.has(a)?m=t.missing:m=t.pending;const y={provider:i,prefix:c,name:a};m.push(y)}),t}function Ln(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?ue(r,t,n):r;i&&o.push(i)}),o}const Mn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Pn(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let c;if(e.random){let I=e.resources.slice(0);for(c=[];I.length>1;){const E=Math.floor(Math.random()*I.length);c.push(I[E]),I=I.slice(0,E).concat(I.slice(E+1))}c=c.concat(I)}else c=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",d=0,m,y=null,g=[],v=[];typeof o=="function"&&v.push(o);function _(){y&&(clearTimeout(y),y=null)}function j(){l==="pending"&&(l="aborted"),_(),g.forEach(I=>{I.status==="pending"&&(I.status="aborted")}),g=[]}function h(I,E){E&&(v=[]),typeof I=="function"&&v.push(I)}function s(){return{startTime:a,payload:t,status:l,queriesSent:d,queriesPending:g.length,subscribe:h,abort:j}}function f(){l="failed",v.forEach(I=>{I(void 0,m)})}function p(){g.forEach(I=>{I.status==="pending"&&(I.status="aborted")}),g=[]}function x(I,E,k){const N=E!=="success";switch(g=g.filter(w=>w!==I),l){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){m=k,f();return}if(N){m=k,g.length||(c.length?$():f());return}if(_(),p(),!e.random){const w=e.resources.indexOf(I.resource);w!==-1&&w!==e.index&&(e.index=w)}l="completed",v.forEach(w=>{w(k)})}function $(){if(l!=="pending")return;_();const I=c.shift();if(I===void 0){if(g.length){y=setTimeout(()=>{_(),l==="pending"&&(p(),f())},e.timeout);return}f();return}const E={status:"pending",resource:I,callback:(k,N)=>{x(E,k,N)}};g.push(E),d++,y=setTimeout($,e.rotate),n(I,t,E.callback)}return setTimeout($),s}function We(e){const t={...Mn,...e};let n=[];function o(){n=n.filter(a=>a().status==="pending")}function r(a,l,d){const m=Pn(t,a,l,(y,g)=>{o(),d&&d(y,g)});return n.push(m),m}function i(a){return n.find(l=>a(l))||null}return{query:r,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:o}}function De(){}const ge=Object.create(null);function An(e){if(!ge[e]){const t=Ee(e);if(!t)return;const n=We(t),o={config:t,redundancy:n};ge[e]=o}return ge[e]}function Bn(e,t,n){let o,r;if(typeof e=="string"){const i=ve(e);if(!i)return n(void 0,424),De;r=i.send;const c=An(e);c&&(o=c.redundancy)}else{const i=we(e);if(i){o=We(i);const c=e.resources?e.resources[0]:"",a=ve(c);a&&(r=a.send)}}return!o||!r?(n(void 0,424),De):o.query(t,r,n)().abort}function Fe(){}function zn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dn(e)}))}function Gn(e){const t=[],n=[];return e.forEach(o=>{(o.match(Ge)?t:n).push(o)}),{valid:t,invalid:n}}function ne(e,t,n){function o(){const r=e.pendingIcons;t.forEach(i=>{r&&r.delete(i),e.icons[i]||e.missing.add(i)})}if(n&&typeof n=="object")try{if(!ze(e,n).length){o();return}}catch(r){console.error(r)}o(),zn(e)}function Re(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function qn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Re(e.loadIcons(r,o,n),m=>{ne(e,r,m)});return}if(i){r.forEach(m=>{const y=i(m,o,n);Re(y,g=>{const v=g?{prefix:o,icons:{[m]:g}}:null;ne(e,[m],v)})});return}const{valid:c,invalid:a}=Gn(r);if(a.length&&ne(e,a,null),!c.length)return;const l=o.match(Ge)?ve(n):null;if(!l){ne(e,c,null);return}l.prepare(n,o,c).forEach(m=>{Bn(n,m,y=>{ne(e,m.icons,y)})})}))}const Un=(e,t)=>{const n=Ln(e,!0,qe()),o=On(n);if(!o.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(o.loaded,o.missing,o.pending,Fe)}),()=>{l=!1}}const r=Object.create(null),i=[];let c,a;return o.pending.forEach(l=>{const{provider:d,prefix:m}=l;if(m===a&&d===c)return;c=d,a=m,i.push(H(d,m));const y=r[d]||(r[d]=Object.create(null));y[m]||(y[m]=[])}),o.pending.forEach(l=>{const{provider:d,prefix:m,name:y}=l,g=H(d,m),v=g.pendingIcons||(g.pendingIcons=new Set);v.has(y)||(v.add(y),r[d][m].push(y))}),i.forEach(l=>{const d=r[l.provider][l.prefix];d.length&&qn(l,d)}),t?Rn(t,o,i):Fe};function Yn(e,t){const n={...e};for(const o in t){const r=t[o],i=typeof r;o in Ue?(r===null||r&&(i==="string"||i==="number"))&&(n[o]=r):i===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const Qn=/[\s,]+/;function Wn(e,t){t.split(Qn).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Zn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}function Jn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Xn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Kn(e){return"data:image/svg+xml,"+Xn(e)}function Hn(e){return'url("'+Kn(e)+'")'}let te;function Vn(){try{te=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{te=null}}function et(e){return te===void 0&&Vn(),te?te.createHTML(e):e}const Ze={...Ye,inline:!1},nt={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},tt={display:"inline-block"},_e={backgroundColor:"currentColor"},Je={backgroundColor:"transparent"},Oe={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Le={WebkitMask:_e,mask:_e,background:Je};for(const e in Le){const t=Le[e];for(const n in Oe)t[e+n]=Oe[n]}const rt={...Ze,inline:!0};function Me(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const ot=(e,t,n)=>{const o=t.inline?rt:Ze,r=Yn(o,t),i=t.mode||"svg",c={},a=t.style||{},l={...i==="svg"?nt:{}};if(n){const h=ue(n,!1,!0);if(h){const s=["iconify"],f=["provider","prefix"];for(const p of f)h[p]&&s.push("iconify--"+h[p]);l.className=s.join(" ")}}for(let h in t){const s=t[h];if(s!==void 0)switch(h){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":l.ref=s;break;case"className":l[h]=(l[h]?l[h]+" ":"")+s;break;case"inline":case"hFlip":case"vFlip":r[h]=s===!0||s==="true"||s===1;break;case"flip":typeof s=="string"&&Wn(r,s);break;case"color":c.color=s;break;case"rotate":typeof s=="string"?r[h]=Zn(s):typeof s=="number"&&(r[h]=s);break;case"ariaHidden":case"aria-hidden":s!==!0&&s!=="true"&&delete l["aria-hidden"];break;default:o[h]===void 0&&(l[h]=s)}}const d=bn(e,r),m=d.attributes;if(r.inline&&(c.verticalAlign="-0.125em"),i==="svg"){l.style={...c,...a},Object.assign(l,m);let h=0,s=t.id;return typeof s=="string"&&(s=s.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:et(In(d.body,s?()=>s+"ID"+h++:"iconifyReact"))},b.createElement("svg",l)}const{body:y,width:g,height:v}=e,_=i==="mask"||(i==="bg"?!1:y.indexOf("currentColor")!==-1),j=Jn(y,{...m,width:g+"",height:v+""});return l.style={...c,"--svg":Hn(j),width:Me(m.width),height:Me(m.height),...tt,..._?_e:Je,...a},b.createElement("span",l)};qe(!0);jn("",Cn);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!fn(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;wn(n,r)||console.error(o)}catch{console.error(o)}}}}function Xe(e){const[t,n]=b.useState(!!e.ssr),[o,r]=b.useState({});function i(v){if(v){const _=e.icon;if(typeof _=="object")return{name:"",data:_};const j=Ne(_);if(j)return{name:_,data:j}}return{name:""}}const[c,a]=b.useState(i(!!e.ssr));function l(){const v=o.callback;v&&(v(),r({}))}function d(v){if(JSON.stringify(c)!==JSON.stringify(v))return l(),a(v),!0}function m(){var v;const _=e.icon;if(typeof _=="object"){d({name:"",data:_});return}const j=Ne(_);if(d({name:_,data:j}))if(j===void 0){const h=Un([_],m);r({callback:h})}else j&&((v=e.onLoad)===null||v===void 0||v.call(e,_))}b.useEffect(()=>(n(!0),l),[]),b.useEffect(()=>{t&&m()},[e.icon,t]);const{name:y,data:g}=c;return g?ot({...je,...g},e,y):e.children?e.children:e.fallback?e.fallback:b.createElement("span",{})}const F=b.forwardRef((e,t)=>Xe({...e,_ref:t}));b.forwardRef((e,t)=>Xe({inline:!0,...e,_ref:t}));const st="_container_j1lh3_26",it="_title_j1lh3_46",ct="_containerInputError_j1lh3_50",at="_containerInput_j1lh3_50",lt="_inputElement_j1lh3_69",ut="_errorMessage_j1lh3_80",ft="_icon_j1lh3_92",dt="_containerCustomIcon_j1lh3_99",P={container:st,title:it,containerInputError:ct,containerInput:at,inputElement:lt,errorMessage:ut,icon:ft,containerCustomIcon:dt},oe=e=>{switch(e){case"none":return 0;case"sm":return 5;case"md":return 10;case"lg":return 15;case"full":return 9999;default:return 0}},pt=b.forwardRef(function({placeholder:t,value:n,setValue:o,label:r,typeInput:i,HorV:c,errorMessage:a,font:l,fontLabel:d,rounded:m,width:y,height:g,border:v,shadow:_,textSize:j,textColor:h,bgColor:s,customContainerClass:f,customInputClass:p,customIconRClass:x,customIconLClass:$,seeIconLeft:I=!0,seeIconRight:E,iconColorL:k,iconColorR:N,iconColorPass:w,iconSizeL:D,iconSizeR:L,iconSizePass:R,iconLeft:U,iconRight:Y,customIconLeft:B,customIconRight:z,args:J},X){const[O,G]=b.useState(!1),W=b.useMemo(()=>oe(m??"full"),[m]);return u.jsxs("div",{className:P.container,style:{flexDirection:c==="horizontal"?"row":"column"},children:[u.jsx("label",{className:P.title,style:{fontSize:j,color:h,height:c==="horizontal"?35:"auto",display:c==="horizontal"?"flex":"block",alignItems:c==="horizontal"?"center":"initial",marginRight:c==="horizontal"?10:0,marginBottom:c==="vertical"?5:0,fontFamily:d},children:r}),u.jsxs("div",{className:P.containerInputError,children:[u.jsxs("div",{className:`${P.containerInput} ${f}`,style:{borderRadius:W,width:!y&&i==="datetime-local"?"auto":y,height:g,border:v||v===void 0?"":"none",boxShadow:_?"0 0 5px #00000075":"",backgroundColor:s},children:[B?u.jsx("div",{className:`${P.containerCustomIcon} ${$}`,children:B}):I&&u.jsx(F,{icon:U??"mi:user",className:`${P.icon} ${$}`,style:{color:k,fontSize:D}}),u.jsx("input",{ref:X,className:`${P.inputElement} ${p}`,style:{fontSize:j,color:h,fontFamily:l},type:i==="password"&&O?"text":i,placeholder:t,value:n,onChange:Q=>o?.(Q.target.value),...J}),i==="password"&&u.jsx(F,{onClick:()=>G(!O),icon:O?"fluent:eye-20-filled":"fluent:eye-hide-20-filled",className:`${P.icon}`,style:{color:w,fontSize:R,marginRight:10,cursor:i=="password"?"pointer":"default"}}),z?u.jsx("div",{className:`${P.containerCustomIcon} ${x}`,children:z}):E&&u.jsx(F,{icon:Y??"mi:user",className:`${P.icon} ${x}`,style:{color:N,fontSize:L}})]}),a!==""&&u.jsx("p",{className:P.errorMessage,children:a})]})]})}),mt="_container_5daeb_26",ht="_containerInputError_5daeb_50",gt="_containerInput_5daeb_50",xt="_inputElement_5daeb_69",bt="_errorMessage_5daeb_80",yt="_icon_5daeb_92",vt="_containerCustomIcon_5daeb_99",Z={container:mt,containerInputError:ht,containerInput:gt,inputElement:xt,errorMessage:bt,icon:yt,containerCustomIcon:vt},_t=b.forwardRef(function({label:t,value:n,errorMessage:o,textSize:r,textColor:i,setValue:c,useLinkable:a,link:l,font:d,iconSize:m,seeIcon:y,icon:g,iconColor:v,customInputClass:_,customLabelClass:j,customIconClass:h,customIcon:s,args:f},p){const x=b.useId();return u.jsx("div",{ref:p,className:Z.container,children:u.jsxs("div",{className:Z.containerInputError,children:[u.jsxs("div",{className:Z.containerInput,children:[u.jsx("input",{className:`${Z.inputElement} ${_}`,style:{fontSize:r,color:i},type:"checkbox",checked:n,onChange:$=>c($.target.checked),...f}),s?u.jsx("div",{className:`${Z.containerCustomIcon} ${h}`,children:s}):y&&u.jsx(F,{icon:g??"mi:user",className:`${Z.icon} ${h}`,style:{color:v,fontSize:m}}),a?u.jsx("a",{className:j,href:l||"#",style:{fontSize:r,color:i,textDecoration:"underline",fontFamily:d},children:t}):u.jsx("label",{htmlFor:x,className:j,style:{fontSize:r,color:i,fontFamily:d},children:t})]}),o!==""&&u.jsx("p",{className:Z.errorMessage,children:o})]})})}),It="_container_v1dbe_26",jt="_containerInputError_v1dbe_51",wt="_containerInput_v1dbe_51",$t="_errorMessage_v1dbe_81",Et="_icon_v1dbe_93",Tt="_containerCustomIcon_v1dbe_100",kt="_containerInputAndOptions_v1dbe_100",Nt="_containerOptions_v1dbe_100",St="_optionElement_v1dbe_100",Ct="_containerIconOption_v1dbe_100",Dt="_containerLabel_v1dbe_112",Ft="_textOption_v1dbe_142",Rt="_iconArrow_v1dbe_150",S={container:It,containerInputError:jt,containerInput:wt,errorMessage:$t,icon:Et,containerCustomIcon:Tt,containerInputAndOptions:kt,containerOptions:Nt,optionElement:St,containerIconOption:Ct,containerLabel:Dt,textOption:Ft,iconArrow:Rt},Ke=(e,t)=>{b.useEffect(()=>{const n=o=>{const r=e.current;!r||r.contains(o.target)||t(o)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},Ot=b.forwardRef(function({label:t,value:n,setValue:o,options:r,placeholder:i,errorMessage:c,orientation:a="bottom",iconInRight:l=!1,font:d,fontLabel:m,rounded:y,border:g=!0,textSize:v="1.4em",textColor:_="#000",labelSize:j="1.4em",labelColor:h="#000",width:s=250,height:f=40,bgColor:p,shadow:x=!1,HorV:$="vertical",icon:I,iconSize:E=20,iconsOptionsSize:k=20,seeIcon:N=!1,seeOptionsIcons:w=!1,iconsColor:D="#000",customIcon:L,customContainerClass:R,customInputClass:U,customLabelClass:Y,customIconClass:B,customOptionClass:z},J){const[X,O]=b.useState(null),[G,W]=b.useState(!1),Q=b.useRef(null),K={valueOption:null,text:i??"Selecciona una opción",icon:"hugeicons:cursor-magic-selection-04"};Ke(Q,()=>{W(!1)}),b.useEffect(()=>{let C=[K,...r];O(C)},[]);const de=b.useMemo(()=>oe(y??"lg"),[y]);return u.jsxs("div",{ref:J,className:`${S.container} ${R}`,style:{flexDirection:$==="horizontal"?"row":"column"},children:[u.jsxs("div",{className:S.containerLabel,style:{flexDirection:l?"row-reverse":"row",justifyContent:l?"flex-end":"flex-start"},children:[L?u.jsx("div",{className:`${S.containerCustomIcon} ${B}`,style:{height:E},children:L}):N&&u.jsx(F,{icon:I??"icon-park-outline:dot",className:`${S.icon} ${B}`,style:{color:D,fontSize:E}}),u.jsx("label",{className:Y,style:{fontSize:j,color:h,height:$==="horizontal"?35:"auto",display:$==="horizontal"?"flex":"block",alignItems:$==="horizontal"?"center":"initial",marginRight:$==="horizontal"?10:0,marginBottom:$==="vertical"?5:0,fontFamily:m},children:t})]}),u.jsxs("div",{className:S.containerInputError,children:[u.jsxs("div",{ref:Q,className:S.containerInputAndOptions,children:[u.jsxs("div",{onClick:C=>{C.stopPropagation(),W(!G)},className:`${S.containerInput} ${U}`,style:{width:s,height:f,border:g?"":"none",boxShadow:x?"0 0 10px #00000050":"",borderRadius:de,backgroundColor:p},children:[w&&n?.valueOption&&u.jsx(u.Fragment,{children:n?.customIcon?u.jsx("div",{className:S.containerCustomIcon,children:n?.customIcon}):n?.icon&&u.jsx(F,{icon:n.icon,className:S.icon,style:{color:n.iconColor?n.iconColor:D,fontSize:k}})}),u.jsx("p",{className:S.textOption,style:{fontSize:j,color:h,fontWeight:n?.valueOption?"bold":"",fontFamily:d},children:n?.text?n.text:K.text}),u.jsx(F,{icon:"ri:arrow-down-s-line",className:`${S.icon} ${S.iconArrow}`})]}),G&&u.jsx("div",{className:S.containerOptions,style:{top:a==="bottom"?"calc(100% + 10px)":a==="left"||a==="right"?0:"",left:a==="right"?"calc(100% + 10px)":a==="top"||a==="bottom"?0:"",bottom:a==="top"?"calc(100% + 10px)":"",right:a==="left"?"calc(100% + 10px)":""},children:X?.map((C,V)=>u.jsxs("div",{onClick:pe=>{pe.stopPropagation(),W(!1),o(C)},className:`${S.optionElement} ${z}`,children:[w&&u.jsx("div",{className:`${S.containerIconOption}`,children:C.customIcon?C.customIcon:w&&u.jsx(F,{icon:C.icon??"icon-park-outline:dot",className:`${S.icon} ${S.containerIconOption}`,style:{color:C.iconColor?C.iconColor:D,fontSize:k}})}),u.jsx("p",{className:S.textOption,style:{fontSize:v,color:_,fontFamily:d},children:C.text?C.text:K.text})]},V))})]}),c!==""&&u.jsx("p",{className:S.errorMessage,children:c})]})]})}),Lt="_container_1nag4_26",Mt="_containerInputError_1nag4_50",Pt="_errorMessage_1nag4_80",At="_icon_1nag4_92",Bt="_containerCustomIcon_1nag4_99",zt="_containerInputFile_1nag4_114",Gt="_containerSelectedFile_1nag4_114",qt="_textInput_1nag4_132",Ut="_inputFile_1nag4_142",Yt="_fileName_1nag4_158",Qt="_backdrop_1nag4_175",M={container:Lt,containerInputError:Mt,errorMessage:Pt,icon:At,containerCustomIcon:Bt,containerInputFile:zt,containerSelectedFile:Gt,textInput:qt,inputFile:Ut,fileName:Yt,backdrop:Qt},xe={images:{common:"image/png, image/jpeg, image/gif, image/webp",png:"image/png",jpg:"image/jpeg, image/jpg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",ico:"image/x-icon, image/vnd.microsoft.icon",tiff:"image/tiff",bmp:"image/bmp",heic:"image/heic, image/heif"},docs:{pdf:"application/pdf",word:".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document",excel:".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",powerpoint:".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",odp:"application/vnd.oasis.opendocument.presentation",txt:"text/plain",rtf:"application/rtf",csv:"text/csv",markdown:"text/markdown, .md",epub:"application/epub+zip"},archives:{zip:"application/zip, application/x-zip-compressed",rar:"application/x-rar-compressed, .rar",sevenZ:"application/x-7z-compressed",tar:"application/x-tar",gz:"application/gzip",iso:"application/x-iso9660-image, .iso"},media:{audio:"audio/*",video:"video/*",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg, video/ogg",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo"},fonts:{woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf, application/x-font-ttf",otf:"font/otf, application/x-font-opentype",eot:"application/vnd.ms-fontobject"},code:{html:"text/html",css:"text/css",js:"text/javascript, application/javascript, .mjs",ts:"application/typescript, .ts, .tsx",json:"application/json",xml:"application/xml, text/xml",python:"text/x-python, .py",java:"text/x-java-source, .java, application/java-archive, .jar",csharp:"text/plain, .cs",cpp:"text/x-c++, .cpp, .h, .hpp",c:"text/x-c, .c",php:"application/x-httpd-php, .php",sql:"application/sql, .sql",sh:"application/x-sh, .sh",yaml:"text/yaml, .yaml, .yml"}},He=e=>{if(Array.isArray(e))return e.map(n=>He(n)).filter(n=>n!==void 0).join(", ");if(e!=="*"){if(typeof e=="string"){if(e in xe){const t=xe[e];return Object.values(t).join(", ")}return}if(typeof e=="object"){const t=[];return Object.keys(e).forEach(n=>{const o=e[n],r=xe[n];o&&r&&o.forEach(i=>{const c=r[i];c&&t.push(c)})}),t.join(", ")}}},Wt="_btnThemeDark_1hn8j_26",Zt="_iconButton_1hn8j_58",Jt="_containerCustomIcon_1hn8j_65",Xt="_btnBorderedThemeDark_1hn8j_78",Kt="_btnThemeGreen_1hn8j_98",Ht="_btnBorderedThemeGreen_1hn8j_150",Vt="_btnThemeBlue_1hn8j_170",er="_btnBorderedThemeBlue_1hn8j_222",nr="_btnThemeRed_1hn8j_242",tr="_btnBorderedThemeRed_1hn8j_294",rr="_btnThemePurple_1hn8j_314",or="_btnBorderedThemePurple_1hn8j_366",sr="_btnThemeGray_1hn8j_386",ir="_btnBorderedThemeGray_1hn8j_438",cr="_btnThemeLight_1hn8j_458",ar="_btnBorderedThemeLight_1hn8j_510",lr="_btnThemeYellow_1hn8j_530",ur="_btnBorderedThemeYellow_1hn8j_582",se={btnThemeDark:Wt,iconButton:Zt,containerCustomIcon:Jt,btnBorderedThemeDark:Xt,btnThemeGreen:Kt,btnBorderedThemeGreen:Ht,btnThemeBlue:Vt,btnBorderedThemeBlue:er,btnThemeRed:nr,btnBorderedThemeRed:tr,btnThemePurple:rr,btnBorderedThemePurple:or,btnThemeGray:sr,btnBorderedThemeGray:ir,btnThemeLight:cr,btnBorderedThemeLight:ar,btnThemeYellow:lr,btnBorderedThemeYellow:ur},Ve=b.forwardRef(function({label:t="Texto del Botón",action:n=()=>{alert("Botón presionado")},font:o,width:r,height:i,bgColor:c,txtColor:a,icon:l="tabler:send",seeIcon:d=!0,textSize:m,iconColor:y,iconSize:g,styleType:v="ThemeDark",rounded:_="md",borderedStyle:j=!1,iconOn:h,padding:s,shadow:f=!1,colorShadow:p,customClassButton:x,customClassLabel:$,customClassIcon:I,customIcon:E,args:k},N){const w=b.useMemo(()=>oe(_??"full"),[_]);return u.jsxs("button",{ref:N,className:`${se[`btn${v}`]} ${j&&se[`btnBordered${v}`]} ${x}`,style:{borderRadius:w,width:r??"auto",height:i??"auto",flexDirection:h==="left"?"row-reverse":"row",boxShadow:`${f?"0 0 7px "+(p||"#000"):""}`,padding:s,background:c},onClick:D=>{D.preventDefault(),n()},...k,children:[t&&u.jsx("p",{className:`${$}`,style:{fontSize:m,fontFamily:o,color:a},children:t}),E?u.jsx("div",{className:`${se.containerCustomIcon} ${I}`,children:E}):d&&u.jsx(F,{icon:l,className:`${se.iconButton} ${I}`,style:{fontSize:g,color:y}})]})}),fr=b.forwardRef(function({label:t,errorMessage:n,acceptFiles:o="*",selectedFileE:r,setSelectedFileE:i,maxMBSize:c,shadow:a=!0,textButtonCancel:l="Cancelar",font:d,width:m,height:y,bgColor:g,bgColorHover:v,labelSize:_,labelColor:j,rounded:h="md",iconSize:s=30,seeIcon:f=!0,icon:p,iconColor:x="#fff",customFIleClass:$,customSelectedClass:I,customLabelClass:E,customIconClass:k,customIcon:N,args:w},D){const L=b.useId(),R=b.useRef(0),[U,Y]=b.useState(r),[B,z]=b.useState(!1),[J,X]=b.useState(null),[O,G]=b.useState(!1),W=He(o),Q=()=>{Y(null),i(null)},K=T=>{if(X(null),c){const tn=c*1024*1024;if(T.size>tn){X(`El archivo excede el límite de ${c} MB.`),Q();return}}Y(T),i(T)},de=T=>{T.preventDefault(),T.target.files&&T.target.files[0]?K(T.target.files[0]):Q()},C=T=>{T.preventDefault(),T.stopPropagation(),R.current+=1,T.type==="dragenter"||T.type==="dragover"?G(!0):T.type==="dragleave"&&G(!1)},V=T=>{T.preventDefault(),T.stopPropagation(),R.current-=1,R.current===0&&G(!1)},pe=T=>{T.preventDefault(),T.stopPropagation(),G(!1),R.current=0,T.dataTransfer.files&&T.dataTransfer.files[0]&&K(T.dataTransfer.files[0])},me=b.useMemo(()=>oe(h??"lg"),[h]);return u.jsx("div",{className:M.container,children:u.jsxs("div",{className:M.containerInputError,children:[U?u.jsxs("div",{className:`${M.containerSelectedFile} ${I}`,style:{boxShadow:a?"0 0 5px #00000050":"",borderRadius:me,width:m,height:y},children:[f&&u.jsx(F,{icon:"uim:paperclip",className:M.icon}),u.jsx("p",{className:M.fileName,style:{fontFamily:d},children:U?.name}),u.jsx("div",{className:M.backdrop,style:{borderRadius:me},children:u.jsx(Ve,{styleType:"ThemeRed",action:Q,label:l,rounded:"full",icon:"fa:trash",iconSize:"1.4rem",iconColor:"#fff",textSize:12,padding:"7px"})})]}):u.jsxs("label",{htmlFor:L,className:`${M.containerInputFile} ${$}`,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),onDragEnter:C,onDragLeave:V,onDragOver:T=>T.preventDefault(),onDrop:pe,style:{boxShadow:a?"0 0 5px #00000050":"",borderRadius:me,backgroundColor:O?"#fff":B?v:g,borderColor:O?g||"#6936ee":"",width:m,height:y,fontFamily:d},children:[!N||O?f&&u.jsx(F,{icon:O?"tabler:drag-drop":p??"mingcute:upload-3-fill",className:`${M.icon} ${k}`,onDragEnter:C,onDragLeave:V,style:{color:O?g||"#6936ee":x,fontSize:s}}):u.jsx("div",{className:`${M.containerCustomIcon} ${k}`,style:{height:s??"2rem"},children:N}),u.jsx("span",{className:`${M.textInput} ${E}`,style:{fontSize:_,color:O?g||"#6936ee":j,fontFamily:d},onDragEnter:C,onDragLeave:V,children:O?"Suelta para agregar":t??"Click o arrastra un archivo"}),u.jsx("input",{ref:D,id:L,type:"file",accept:W,className:M.inputFile,onChange:de,...w})]}),u.jsx("p",{className:M.errorMessage,children:J||n||""})]})})}),dr="_container_sbkx2_26",pr="_containerInputError_sbkx2_50",mr="_inputElement_sbkx2_69",hr="_errorMessage_sbkx2_80",gr="_icon_sbkx2_92",xr="_containerCustomIcon_sbkx2_99",br="_containerLabel_sbkx2_111",yr="_containerGroupRadio_sbkx2_127",vr="_containerRadio_sbkx2_134",A={container:dr,containerInputError:pr,inputElement:mr,errorMessage:hr,icon:gr,containerCustomIcon:xr,containerLabel:br,containerGroupRadio:yr,containerRadio:vr},_r=b.forwardRef(function({label:t,labelSize:n,labelColor:o,options:r,errorMessage:i,textSize:c,textColor:a,setValue:l,name:d,font:m,fontLabel:y,HorV:g="horizontal",icon:v,iconInRight:_,iconSize:j,iconColor:h,customIcon:s,seeIcon:f=!0,customInputClass:p,customLabelClass:x,customTextClass:$,customIconLabelClass:I,customContainerRadiosClass:E},k){const N=b.useId();return u.jsxs("div",{ref:k,className:A.container,children:[u.jsxs("div",{className:A.containerLabel,style:{flexDirection:_?"row-reverse":"row",justifyContent:_?"flex-end":"flex-start"},children:[s?u.jsx("div",{className:`${A.containerCustomIcon} ${I}`,style:{height:j},children:s}):f&&u.jsx(F,{icon:v??"mi:user",className:`${A.icon} ${I}`,style:{color:h,fontSize:j}}),u.jsx("label",{style:{fontSize:n,color:o,fontFamily:y},className:$,children:t})]}),u.jsxs("div",{className:A.containerInputError,children:[u.jsx("div",{className:`${A.containerGroupRadio} ${E}`,style:{flexDirection:g==="vertical"?"column":"row",alignItems:g==="vertical"?"stretch":"center",justifyContent:g==="vertical"?"center":"flex-start"},children:r.map((w,D)=>{const L=`${N}-${D}`;return u.jsxs("div",{className:A.containerRadio,children:[u.jsx("input",{id:L,className:`${A.inputElement} ${p}`,style:{fontSize:c,color:a},type:"radio",name:d,value:w.value,onChange:R=>l(R.target.value)}),w.customIcon?u.jsx("div",{className:`${A.containerCustomIcon} ${w.customIconClass}`,children:w.customIcon}):w.seeIcon&&u.jsx(F,{icon:w.icon??"mi:user",className:`${A.icon} ${w.customIconClass}`,style:{color:w.iconColor,fontSize:j}}),u.jsx("label",{htmlFor:L,className:x,style:{fontSize:c,color:a,fontFamily:m},children:w.label})]},N+w.value)})}),i!==""&&u.jsx("p",{className:A.errorMessage,children:i})]})]})}),Ir="_container_msjnc_26",jr="_containerInputError_msjnc_50",wr="_containerInput_msjnc_50",$r="_inputElement_msjnc_69",Er="_errorMessage_msjnc_80",Tr="_icon_msjnc_92",kr="_containerCustomIcon_msjnc_99",Nr="_containerLabel_msjnc_111",Sr="_counterCharacter_msjnc_142",q={container:Ir,containerInputError:jr,containerInput:wr,inputElement:$r,errorMessage:Er,icon:Tr,containerCustomIcon:kr,containerLabel:Nr,counterCharacter:Sr},Cr=b.forwardRef(function({placeholder:t,value:n,setValue:o,label:r,errorMessage:i,seeMaxCharCounter:c=!0,maxCharacters:a=300,resize:l=!0,font:d,fontLabel:m,rounded:y,width:g=250,height:v=100,maxWidth:_=500,maxHeight:j=500,border:h,shadow:s,textSize:f,textColor:p,bgColor:x,customContainerClass:$,customTextAreaClass:I,customIconClass:E,seeIcon:k,iconInRight:N=!1,iconColor:w,iconSize:D,icon:L,customIcon:R,args:U},Y){const B=b.useMemo(()=>oe(y??"lg"),[y]);return u.jsxs("div",{className:q.container,children:[u.jsxs("div",{className:q.containerLabel,style:{flexDirection:N?"row-reverse":"row",justifyContent:N?"flex-end":"flex-start"},children:[R?u.jsx("div",{className:`${q.containerCustomIcon} ${E}`,style:{height:D},children:R}):k&&u.jsx(F,{icon:L??"mi:user",className:`${q.icon} ${E}`,style:{color:w,fontSize:D}}),u.jsx("label",{style:{fontSize:f,color:p,fontFamily:m},children:r})]}),u.jsxs("div",{className:q.containerInputError,children:[u.jsxs("div",{className:`${q.containerInput} ${$}`,style:{borderRadius:B,border:h||h===void 0?"":"none",boxShadow:s?"0 0 5px #00000075":"",backgroundColor:x,resize:l?"both":"none",width:g,height:v,minWidth:g,minHeight:v,maxWidth:_,maxHeight:j},children:[u.jsx("textarea",{ref:Y,className:`${q.inputElement} ${I}`,style:{fontSize:f,color:p,fontFamily:d},placeholder:t,value:n,maxLength:a,onChange:z=>o?.(z.target.value),...U}),c&&u.jsxs("p",{className:q.counterCharacter,children:[n?n?.length:0,"/",a]})]}),i!==""&&u.jsx("p",{className:q.errorMessage,children:i})]})]})}),Dr=["America/Mexico_City","America/New_York","America/Los_Angeles","America/Bogota","America/Argentina/Buenos_Aires","America/Sao_Paulo","Europe/Madrid","Europe/London","Europe/Paris","Asia/Tokyo","Asia/Shanghai","Australia/Sydney","UTC"],fe="America/Mexico_City";function en(e,t){return new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).formatToParts(e).reduce((o,r)=>(o[r.type]=r.value,o),{})}function ae(e){if(!e)return 0;let t;return typeof e=="string"?t=new Date(e):t=e,Math.floor(t.getTime()/1e3)}function Fr(e,t=fe){if(!e)return"";const n=new Date(e*1e3),o=en(n,t);return`${o.year}-${o.month}-${o.day}`}function nn(e,t=fe){if(!e)return"";const n=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"],o=new Date(e*1e3),r=en(o,t),i=parseInt(r.month,10)-1,c=n[i]||r.month,a=r.dayPeriod?r.dayPeriod.toUpperCase().replace(/\./g,""):"";return`${r.day}/${c}/${r.year} - ${r.hour}:${r.minute} ${a}`}function Ie(e,t=fe){if(!e)return"";const n=new Date(e*1e3),r=new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(n).reduce((i,c)=>(i[c.type]=c.value,i),{});return`${r.year}-${r.month}-${r.day} ${r.hour}:${r.minute}`}function Rr(e,t=fe){return nn(e,t).split(" - ")[0]}function Or(e){let t=!0;const n=b.useCallback((s,f)=>!s||s===void 0||s.length===0?"Este campo "+f:s+" "+f,[]),o=b.useCallback((s,f,p,x)=>f!==!0&&(s==null||typeof s=="string"&&s.trim()==="")?(t=!1,x?.(n(p,"es obligatorio")),!1):!0,[]),r=b.useCallback((s,f,p,x)=>s.length<f?(t=!1,x?.(n(p,"debe tener mínimo "+f.toString()+" caracteres")),!1):!0,[]),i=b.useCallback((s,f,p,x)=>s.length>f?(t=!1,x?.(n(p,"debe tener máximo "+f.toString()+" caracteres")),!1):!0,[]),c=b.useCallback((s,f,p,x)=>s===f?(t=!1,x?.(n(p,"debe ser igual a: "+f)),!1):!0,[]),a=b.useCallback((s,f,p,x)=>f.test(s)?!0:(t=!1,x?.(n(p,"tiene un formato inválido")),!1),[]),l=b.useCallback((s,f,p)=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?!0:(t=!1,p?.(n(f,"no es un correo electrónico válido")),!1),[n]),d=b.useCallback((s,f,p)=>/^[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}$/.test(s)?!0:(t=!1,p?.(n(f,"no es un número de teléfono válido")),!1),[n]),m=b.useCallback((s,f,p)=>/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/.test(s)?!0:(t=!1,p?.(n(f,"no es una URL válida")),!1),[n]),y=b.useCallback((s,f,p)=>/^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{8,}$/.test(s)?!0:(t=!1,p?.(n(f,"debe tener al menos 8 caracteres, un número y un símbolo")),!1),[n]),g=b.useCallback((s,f,p)=>typeof s=="number"?(t=!1,p?.(n(f,"debe ser un número")),!1):!0,[n]),v=b.useCallback((s,f,p,x)=>s<f?(t=!1,x?.(n(p,"debe ser mayor a "+f.toString())),!1):!0,[n]),_=b.useCallback((s,f,p,x)=>s>f?(t=!1,x?.(n(p,"debe ser menor a "+f.toString())),!1):!0,[n]),j=b.useCallback((s,f,p)=>Number.isInteger(s)?!0:(t=!1,p?.(n(f,"debe ser un número entero (sin decimales)")),!1),[n]),h=b.useCallback((s,f,p,x)=>f===s?(t=!1,x?.(n(p,"debe ser igual a "+f.toString())),!1):!0,[n]);try{return e.forEach(s=>{if(o(s.value,s.canBeNull,s.nameInput,s.setError))switch(s.typeInput){case"text":if(typeof s.minLength=="number"&&s.minLength>0&&typeof s.value=="string"&&!r(s.value,s.minLength,s.nameInput,s.setError)||typeof s.maxLength=="number"&&s.maxLength>0&&typeof s.value=="string"&&!i(s.value,s.maxLength,s.nameInput,s.setError)||typeof s.needBeEqualTo=="string"&&typeof s.value=="string"&&!c(s.value,s.needBeEqualTo,s.nameInput,s.setError)||typeof s.regex=="string"&&typeof s.value=="string"&&!a(s.value,s.regex,s.nameInput,s.setError))return;break;case"email":if(typeof s.value=="string"&&!l(s.value,s.nameInput,s.setError))return;break;case"phone":if(typeof s.value=="string"&&!d(s.value,s.nameInput,s.setError))return;break;case"url":if(typeof s.value=="string"&&!m(s.value,s.nameInput,s.setError))return;break;case"pass":if(typeof s.value=="string"&&!y(s.value,s.nameInput,s.setError))return;break;case"num":if(!g(s.value,s.nameInput,s.setError)||typeof s.min=="number"&&s.min>0&&typeof s.value=="number"&&!v(s.value,s.min,s.nameInput,s.setError)||typeof s.max=="number"&&s.max>0&&typeof s.value=="number"&&!_(s.value,s.max,s.nameInput,s.setError)||s.isInteger===!0&&typeof s.value=="number"&&!j(s.value,s.nameInput,s.setError)||typeof s.needBeEqualTo=="number"&&s.needBeEqualTo>0&&typeof s.value=="number"&&!h(s.value,s.needBeEqualTo,s.nameInput,s.setError))return;break;case"bool":if(s.mustBeTrue===!0&&s.value!==!0){t=!1,s.setError?.(n(s.nameInput,"debe estar seleccionado"));return}break;case"date":case"date-time":let f,p,x;if(typeof s.value=="number"&&s.value.toString().length===10)f=s.value;else if(s.value instanceof Date||typeof s.value=="string")f=ae(s.value);else throw new Error("Formato de fecha inválido");if(s.min&&s.min instanceof Date)p=ae(s.min);else throw new Error("La propiedad 'min' tiene un formato de fecha inválido o no existe");if(s.max&&s.max instanceof Date)x=ae(s.max);else throw new Error("La propiedad 'max' tiene un formato de fecha inválido o no existe");if(f<p){t=!1,s.setError?.(n(s.nameInput,"la fecha no puede ser menor que "+Ie(p)));return}if(f>x){t=!1,s.setError?.(n(s.nameInput,"la fecha no puede ser mayor que "+Ie(x)));return}break;case"time":case"data":return;default:console.warn("Tipo de validacion no reconocida");break}}),t}catch(s){const f=s.message;throw console.error(`Error: ${f}`),s}}exports.ButtonGal=Ve;exports.CheckBoxGal=_t;exports.DropDownGal=Ot;exports.InputFileGal=fr;exports.InputRadioGal=_r;exports.InputTextGal=pt;exports.TIMEZONES=Dr;exports.TextAreaGal=Cr;exports.convertToUnix=ae;exports.unixToDate=Fr;exports.unixToDateTime=Ie;exports.unixToDateTimeString=nn;exports.unixToStringYMD=Rr;exports.useOnClickOutside=Ke;exports.useValidateForms=Or;