lawgic-dev-kit 0.14.0 → 0.14.2

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.
@@ -2,8 +2,8 @@ import { j as d } from "../../../_virtual/jsx-runtime.js";
2
2
  const c = ({
3
3
  active: r,
4
4
  color: n = "blue",
5
- variant: u = "rounded",
6
- className: l,
5
+ variant: l = "rounded",
6
+ className: u,
7
7
  size: o = 16,
8
8
  ...i
9
9
  }) => {
@@ -15,7 +15,7 @@ const c = ({
15
15
  }[n], a = {
16
16
  rounded: "rounded-full",
17
17
  square: "rounded-md"
18
- }[u], s = (e) => ({
18
+ }[l], s = (e) => ({
19
19
  width: `${e}px`,
20
20
  height: `${e}px`,
21
21
  minWidth: `${e}px`,
@@ -24,7 +24,7 @@ const c = ({
24
24
  return /* @__PURE__ */ d.jsx(
25
25
  "div",
26
26
  {
27
- className: `transition-colors ease-in-out duration-150 flex items-center justify-center ${a} border-[1.5px] bg-white ${r ? t : "border-gray-400"} ${l}`,
27
+ className: `relative transition-colors ease-in-out duration-150 flex items-center justify-center ${a} border-[1.5px] bg-white ${r ? t : "border-gray-400"} ${u}`,
28
28
  style: s(o),
29
29
  ...i,
30
30
  children: /* @__PURE__ */ d.jsx(
@@ -693,7 +693,7 @@ function print() { __p += __j.call(arguments, '') }
693
693
  ${u}
694
694
  `,onError:O,...d}),x.jsx("div",{className:`
695
695
  flex items-center justify-center leading-none text-center absolute
696
- `,style:{maxWidth:m,maxHeight:m,minWidth:m,minHeight:m},children:A()})]})};function Hx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Hx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Zn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hx(e))&&(r&&(r+=" "),r+=t);return r}const qx={filled:"bg-blue-500 text-white hover:bg-blue-600 hover:text-white active:bg-blue-700 active:text-white",transparent:"bg-blue-100 text-blue-500 hover:bg-blue-200 hover:text-blue-600 active:bg-blue-300/80 active:text-blue-700",outline:"bg-transparent border-1 border-blue-500 text-blue-500 hover:text-blue-600 hover:border-blue-600 active:text-blue-700 active:border-blue-700",invisible:"text-blue-500 hover:text-blue-600 active:text-blue-700"},Kx={filled:"bg-aqua-500 text-white hover:bg-aqua-600 hover:text-white active:bg-aqua-700 active:text-white",transparent:"bg-aqua-100 text-aqua-500 hover:bg-aqua-200/50 hover:text-aqua-600 active:bg-aqua-200/70 active:text-aqua-700",outline:"bg-transparent border-1 border-aqua-500 text-aqua-500 hover:text-aqua-600 hover:border-aqua-600 active:text-aqua-700 active:border-aqua-700",invisible:"text-aqua-500 hover:text-aqua-600 active:text-aqua-700"},Xx={filled:"bg-red-500 text-white hover:bg-red-600 hover:text-white active:bg-red-700 active:text-white",transparent:"bg-red-500/20 text-error hover:bg-red-500/30 hover:text-red-600 active:text-red-700 active:bg-red-700/40",outline:"bg-transparent border-1 border-red-500 text-error hover:text-red-600 hover:border-red-600 active:text-red-700 active:border-red-700",invisible:"text-red-500 hover:text-red-600 active:text-red-700"},Zx={filled:"bg-gray-500 text-white hover:bg-gray-600 hover:text-white active:bg-gray-700 active:text-white",transparent:"bg-gray-100 text-gray-500 hover:bg-gray-200 hover:text-gray-600 active:text-gray-700 active:bg-gray-300",outline:"bg-transparent border-1 border-gray-500 text-gray-500 hover:text-gray-600 hover:border-gray-600 active:text-gray-700 active:border-gray-700",invisible:"text-gray-500 hover:text-gray-600 active:text-gray-700"},eN="transition-colors ease-in-out duration-200 flex items-center justify-center rounded-full w-fit font-600 text-body-s disabled:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-300",tN={lg:"gap-12 px-24 py-8 text-lg",base:"gap-8 px-20 py-7",md:"gap-8 px-16 py-6",sm:"gap-4 px-12 py-5",xs:"gap-4 px-6 py-3"},nN=(e="filled",t="blue",n="base")=>{const r=Zn(eN,tN[n]),i={blue:qx[e],aqua:Kx[e],red:Xx[e],gray:Zx[e]}[t];return Zn(r,i)},rN="transition-colors ease-in-out duration-200 flex items-center justify-center rounded-full w-fit font-600 leading-normal disabled:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-300",iN={lg:"min-h-[46px] max-h-[46px] min-w-[46px] max-w-[46px]",base:"min-h-[40px] max-h-[40px] min-w-[40px] max-w-[40px]",md:"min-h-[28px] max-h-[28px] min-w-[28px] max-w-[28px]",sm:"min-h-[20px] max-h-[20px] min-w-[16px] max-w-[16px]",xs:"min-h-[12px] max-h-[12px] min-w-[12px] max-w-[12px]"},sN={none:"",blue:"shadow-blue-sh hover:shadow-blue-sh active:shadow-blue-sh"},oN=(e="filled",t="blue",n="base",r="none")=>{const i=Zn(rN,iN[n],sN[r]),o={blue:qx[e],aqua:Kx[e],red:Xx[e],gray:Zx[e]}[t];return Zn(i,o)},aN={lg:"min-h-[20px] max-h-[20px]",base:"min-h-[15px] max-h-[15px]",md:"min-h-[15px] max-h-[15px]",sm:"min-h-[15px] max-h-[15px]",xs:"min-h-[15px] max-h-[15px]"},Mo=(e="base")=>aN[e],_o=({icon:e,rightIcon:t,color:n,variant:r="filled",size:i="base",children:o,className:l,...c})=>{const{defaultColorScheme:u}=ze(),d=n||u;return x.jsxs("button",{type:"button",className:nN(r,d,i)+" "+l,...c,children:[e&&x.jsx(De,{icon:e,className:Mo(i)}),o,t&&x.jsx(De,{icon:t,className:Mo(i)})]})},Jx=({className:e="",direction:t="horizontal"})=>t==="horizontal"?x.jsx("hr",{className:`w-full min-h-1 max-h-1 bg-blue-100 border-blue-100 ${e}`}):x.jsx("hr",{className:`h-full min-w-1 max-w-1 bg-blue-100 border-blue-100 ${e}`}),Qx=({open:e,onClose:t,title:n,children:r})=>{const i={hidden:{opacity:0},visible:{opacity:1}},o={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1,transition:{duration:.15}},exit:{opacity:0,scale:.9,transition:{duration:.15}}};return x.jsx(xr,{children:e&&x.jsx(x.Fragment,{children:x.jsx(Ze.div,{className:"fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",initial:"hidden",animate:"visible",exit:"hidden",variants:i,onClick:t,children:x.jsx(Ze.div,{className:"w-full max-w-lg mx-16 z-50",variants:o,initial:"hidden",animate:"visible",exit:"exit",onClick:l=>l.stopPropagation(),children:x.jsxs(is,{className:"flex flex-col gap-16 md:gap-24 p-0!",children:[x.jsxs("div",{className:"flex flex-col gap-16 md:gap-24 md:p-32 md:pb-0",children:[x.jsxs("div",{className:"flex justify-between items-center px-16 pt-16 md:px-0 md:pt-0",children:[n&&x.jsx("h2",{className:"text-black font-700 text-2xl",children:n}),x.jsx(De,{icon:Kc,className:"cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700 ml-auto",onClick:t})]}),n&&x.jsx(Jx,{className:"bg-gray-100!"})]}),x.jsx("div",{className:"flex flex-col gap-16 md:gap-24 p-16 pt-0 md:p-32 md:pt-4",children:typeof r=="function"?r(t):r})]})})})})})},lN=({active:e,color:t="blue",variant:n="rounded",className:r,size:i=16,...o})=>{const l={blue:"border-blue-500 bg-blue-500",aqua:"border-aqua-500 bg-aqua-500",red:"border-red-500 bg-red-500",gray:"border-gray-500 bg-gray-500"}[t],c={rounded:"rounded-full",square:"rounded-md"}[n],u=d=>({width:`${d}px`,height:`${d}px`,minWidth:`${d}px`,minHeight:`${d}px`});return x.jsx("div",{className:`transition-colors ease-in-out duration-150 flex items-center justify-center ${c} border-[1.5px] bg-white ${e?l:"border-gray-400"} ${r}`,style:u(i),...o,children:x.jsx("div",{className:`absolute transition-colors ease-in-out duration-150 ${c} size-12 ${e?l:""}`,style:u(i*.7)})})};var zd,ew;function cN(){if(ew)return zd;ew=1;function e(w){this._maxSize=w,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(w){return this._values[w]},e.prototype.set=function(w,A){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=A};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,l=512,c=new e(l),u=new e(l),d=new e(l);zd={Cache:e,split:m,normalizePath:h,setter:function(w){var A=h(w);return u.get(w)||u.set(w,function(D,C){for(var L=0,V=A.length,F=D;L<V-1;){var q=A[L];if(q==="__proto__"||q==="constructor"||q==="prototype")return D;F=F[A[L++]]}F[A[L]]=C})},getter:function(w,A){var O=h(w);return d.get(w)||d.set(w,function(C){for(var L=0,V=O.length;L<V;)if(C!=null||!A)C=C[O[L++]];else return;return C})},join:function(w){return w.reduce(function(A,O){return A+(y(O)||n.test(O)?"["+O+"]":(A?".":"")+O)},"")},forEach:function(w,A,O){g(Array.isArray(w)?w:m(w),A,O)}};function h(w){return c.get(w)||c.set(w,m(w).map(function(A){return A.replace(o,"$2")}))}function m(w){return w.match(t)||[""]}function g(w,A,O){var D=w.length,C,L,V,F;for(L=0;L<D;L++)C=w[L],C&&(P(C)&&(C='"'+C+'"'),F=y(C),V=!F&&/^\d+$/.test(C),A.call(O,C,F,V,L,w))}function y(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function S(w){return w.match(r)&&!w.match(n)}function b(w){return i.test(w)}function P(w){return!y(w)&&(S(w)||b(w))}return zd}var si=cN(),Gd,tw;function uN(){if(tw)return Gd;tw=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=h=>h.match(e)||[],n=h=>h[0].toUpperCase()+h.slice(1),r=(h,m)=>t(h).join(m).toLowerCase(),i=h=>t(h).reduce((m,g)=>`${m}${m?g[0].toUpperCase()+g.slice(1).toLowerCase():g.toLowerCase()}`,"");return Gd={words:t,upperFirst:n,camelCase:i,pascalCase:h=>n(i(h)),snakeCase:h=>r(h,"_"),kebabCase:h=>r(h,"-"),sentenceCase:h=>n(r(h," ")),titleCase:h=>t(h).map(n).join(" ")},Gd}var Yd=uN(),al={exports:{}},nw;function fN(){if(nw)return al.exports;nw=1,al.exports=function(i){return e(t(i),i)},al.exports.array=e;function e(i,o){var l=i.length,c=new Array(l),u={},d=l,h=n(o),m=r(i);for(o.forEach(function(y){if(!m.has(y[0])||!m.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)u[d]||g(i[d],d,new Set);return c;function g(y,S,b){if(b.has(y)){var P;try{P=", node was:"+JSON.stringify(y)}catch{P=""}throw new Error("Cyclic dependency"+P)}if(!m.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!u[S]){u[S]=!0;var w=h.get(y)||new Set;if(w=Array.from(w),S=w.length){b.add(y);do{var A=w[--S];g(A,m.get(A),b)}while(S);b.delete(y)}c[--l]=y}}}function t(i){for(var o=new Set,l=0,c=i.length;l<c;l++){var u=i[l];o.add(u[0]),o.add(u[1])}return Array.from(o)}function n(i){for(var o=new Map,l=0,c=i.length;l<c;l++){var u=i[l];o.has(u[0])||o.set(u[0],new Set),o.has(u[1])||o.set(u[1],new Set),o.get(u[0]).add(u[1])}return o}function r(i){for(var o=new Map,l=0,c=i.length;l<c;l++)o.set(i[l],l);return o}return al.exports}var dN=fN();const hN=vm(dN),mN=Object.prototype.toString,pN=Error.prototype.toString,gN=RegExp.prototype.toString,yN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",vN=/^Symbol\((.*)\)(.*)$/;function bN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function rw(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return bN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return yN.call(e).replace(vN,"Symbol($1)");const r=mN.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+pN.call(e)+"]":r==="RegExp"?gN.call(e):null}function Mr(e,t){let n=rw(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let o=rw(this[r],t);return o!==null?o:i},2)}function iw(e){return e==null?[]:[].concat(e)}let sw,ow,aw,xN=/\$\{\s*(\w+)\s*\}/g;sw=Symbol.toStringTag;class lw{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[sw]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],iw(t).forEach(o=>{if(Lt.isError(o)){this.errors.push(...o.errors);const l=o.inner.length?o.inner:[o];this.inner.push(...l)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}ow=Symbol.hasInstance,aw=Symbol.toStringTag;class Lt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(xN,(i,o)=>Mr(n[o])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,o){const l=new lw(t,n,r,i);if(o)return l;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[aw]="Error",this.name=l.name,this.message=l.message,this.type=l.type,this.value=l.value,this.path=l.path,this.errors=l.errors,this.inner=l.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Lt)}static[ow](t){return lw[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Ln={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Mr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Mr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Mr(n,!0)}\``+i}},kt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},wN={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Hd={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},SN={isValue:"${path} field must be ${value}"},ll={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Ln,string:kt,number:wN,date:Hd,object:ll,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:SN,tuple:{notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Mr(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Mr(n,!0)}\``}return Lt.formatError(Ln.notType,e)}}});const qd=e=>e&&e.__isYupSchema__;class cl{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:o}=n,l=typeof r=="function"?r:(...c)=>c.every(u=>u===r);return new cl(t,(c,u)=>{var d;let h=l(...c)?i:o;return(d=h==null?void 0:h(u))!=null?d:u})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(o=>o.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!qd(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const ul={context:"$",value:"."};class oi{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===ul.context,this.isValue=this.key[0]===ul.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?ul.context:this.isValue?ul.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&si.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}oi.prototype.__isYupRef=!0;const ai=e=>e==null;function ss(e){function t({value:n,path:r="",options:i,originalValue:o,schema:l},c,u){const{name:d,test:h,params:m,message:g,skipAbsent:y}=e;let{parent:S,context:b,abortEarly:P=l.spec.abortEarly,disableStackTrace:w=l.spec.disableStackTrace}=i;function A(re){return oi.isRef(re)?re.getValue(n,S,b):re}function O(re={}){const ve=Object.assign({value:n,originalValue:o,label:l.spec.label,path:re.path||r,spec:l.spec,disableStackTrace:re.disableStackTrace||w},m,re.params);for(const fe of Object.keys(ve))ve[fe]=A(ve[fe]);const ye=new Lt(Lt.formatError(re.message||g,ve),n,ve.path,re.type||d,ve.disableStackTrace);return ye.params=ve,ye}const D=P?c:u;let C={path:r,parent:S,type:d,from:i.from,createError:O,resolve:A,options:i,originalValue:o,schema:l};const L=re=>{Lt.isError(re)?D(re):re?u(null):D(O())},V=re=>{Lt.isError(re)?D(re):c(re)};if(y&&ai(n))return L(!0);let q;try{var ee;if(q=h.call(C,n,C),typeof((ee=q)==null?void 0:ee.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then(L,V)}}catch(re){V(re);return}L(q)}return t.OPTIONS=e,t}function TN(e,t,n,r=n){let i,o,l;return t?(si.forEach(t,(c,u,d)=>{let h=u?c.slice(1,c.length-1):c;e=e.resolve({context:r,parent:i,value:n});let m=e.type==="tuple",g=d?parseInt(h,10):0;if(e.innerType||m){if(m&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${l}" must contain an index to the tuple element, e.g. "${l}[0]"`);if(n&&g>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[g],e=m?e.spec.types[g]:e.innerType}if(!d){if(!e.fields||!e.fields[h])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${l} which is a type: "${e.type}")`);i=n,n=n&&n[h],e=e.fields[h]}o=h,l=u?"["+c+"]":"."+c}),{schema:e,parent:i,parentPath:o}):{parent:i,parentPath:t,schema:e}}class fl extends Set{describe(){const t=[];for(const n of this.values())t.push(oi.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new fl(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function os(e,t=new Map){if(qd(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=os(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,os(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(os(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=os(i,t)}else throw Error(`Unable to clone ${e}`);return n}class kn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new fl,this._blacklist=new fl,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ln.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=os(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(o=>{t.tests.forEach(l=>{o.test(l.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,o)=>o.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,o;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(o=t.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",o=r._cast(t,n);if(n.assert!==!1&&!r.isType(o)){if(i&&ai(o))return o;let l=Mr(t),c=Mr(o);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
696
+ `,style:{maxWidth:m,maxHeight:m,minWidth:m,minHeight:m},children:A()})]})};function Hx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Hx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Zn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hx(e))&&(r&&(r+=" "),r+=t);return r}const qx={filled:"bg-blue-500 text-white hover:bg-blue-600 hover:text-white active:bg-blue-700 active:text-white",transparent:"bg-blue-100 text-blue-500 hover:bg-blue-200 hover:text-blue-600 active:bg-blue-300/80 active:text-blue-700",outline:"bg-transparent border-1 border-blue-500 text-blue-500 hover:text-blue-600 hover:border-blue-600 active:text-blue-700 active:border-blue-700",invisible:"text-blue-500 hover:text-blue-600 active:text-blue-700"},Kx={filled:"bg-aqua-500 text-white hover:bg-aqua-600 hover:text-white active:bg-aqua-700 active:text-white",transparent:"bg-aqua-100 text-aqua-500 hover:bg-aqua-200/50 hover:text-aqua-600 active:bg-aqua-200/70 active:text-aqua-700",outline:"bg-transparent border-1 border-aqua-500 text-aqua-500 hover:text-aqua-600 hover:border-aqua-600 active:text-aqua-700 active:border-aqua-700",invisible:"text-aqua-500 hover:text-aqua-600 active:text-aqua-700"},Xx={filled:"bg-red-500 text-white hover:bg-red-600 hover:text-white active:bg-red-700 active:text-white",transparent:"bg-red-500/20 text-error hover:bg-red-500/30 hover:text-red-600 active:text-red-700 active:bg-red-700/40",outline:"bg-transparent border-1 border-red-500 text-error hover:text-red-600 hover:border-red-600 active:text-red-700 active:border-red-700",invisible:"text-red-500 hover:text-red-600 active:text-red-700"},Zx={filled:"bg-gray-500 text-white hover:bg-gray-600 hover:text-white active:bg-gray-700 active:text-white",transparent:"bg-gray-100 text-gray-500 hover:bg-gray-200 hover:text-gray-600 active:text-gray-700 active:bg-gray-300",outline:"bg-transparent border-1 border-gray-500 text-gray-500 hover:text-gray-600 hover:border-gray-600 active:text-gray-700 active:border-gray-700",invisible:"text-gray-500 hover:text-gray-600 active:text-gray-700"},eN="transition-colors ease-in-out duration-200 flex items-center justify-center rounded-full w-fit font-600 text-body-s disabled:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-300",tN={lg:"gap-12 px-24 py-8 text-lg",base:"gap-8 px-20 py-7",md:"gap-8 px-16 py-6",sm:"gap-4 px-12 py-5",xs:"gap-4 px-6 py-3"},nN=(e="filled",t="blue",n="base")=>{const r=Zn(eN,tN[n]),i={blue:qx[e],aqua:Kx[e],red:Xx[e],gray:Zx[e]}[t];return Zn(r,i)},rN="transition-colors ease-in-out duration-200 flex items-center justify-center rounded-full w-fit font-600 leading-normal disabled:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-300",iN={lg:"min-h-[46px] max-h-[46px] min-w-[46px] max-w-[46px]",base:"min-h-[40px] max-h-[40px] min-w-[40px] max-w-[40px]",md:"min-h-[28px] max-h-[28px] min-w-[28px] max-w-[28px]",sm:"min-h-[20px] max-h-[20px] min-w-[16px] max-w-[16px]",xs:"min-h-[12px] max-h-[12px] min-w-[12px] max-w-[12px]"},sN={none:"",blue:"shadow-blue-sh hover:shadow-blue-sh active:shadow-blue-sh"},oN=(e="filled",t="blue",n="base",r="none")=>{const i=Zn(rN,iN[n],sN[r]),o={blue:qx[e],aqua:Kx[e],red:Xx[e],gray:Zx[e]}[t];return Zn(i,o)},aN={lg:"min-h-[20px] max-h-[20px]",base:"min-h-[15px] max-h-[15px]",md:"min-h-[15px] max-h-[15px]",sm:"min-h-[15px] max-h-[15px]",xs:"min-h-[15px] max-h-[15px]"},Mo=(e="base")=>aN[e],_o=({icon:e,rightIcon:t,color:n,variant:r="filled",size:i="base",children:o,className:l,...c})=>{const{defaultColorScheme:u}=ze(),d=n||u;return x.jsxs("button",{type:"button",className:nN(r,d,i)+" "+l,...c,children:[e&&x.jsx(De,{icon:e,className:Mo(i)}),o,t&&x.jsx(De,{icon:t,className:Mo(i)})]})},Jx=({className:e="",direction:t="horizontal"})=>t==="horizontal"?x.jsx("hr",{className:`w-full min-h-1 max-h-1 bg-blue-100 border-blue-100 ${e}`}):x.jsx("hr",{className:`h-full min-w-1 max-w-1 bg-blue-100 border-blue-100 ${e}`}),Qx=({open:e,onClose:t,title:n,children:r})=>{const i={hidden:{opacity:0},visible:{opacity:1}},o={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1,transition:{duration:.15}},exit:{opacity:0,scale:.9,transition:{duration:.15}}};return x.jsx(xr,{children:e&&x.jsx(x.Fragment,{children:x.jsx(Ze.div,{className:"fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",initial:"hidden",animate:"visible",exit:"hidden",variants:i,onClick:t,children:x.jsx(Ze.div,{className:"w-full max-w-lg mx-16 z-50",variants:o,initial:"hidden",animate:"visible",exit:"exit",onClick:l=>l.stopPropagation(),children:x.jsxs(is,{className:"flex flex-col gap-16 md:gap-24 p-0!",children:[x.jsxs("div",{className:"flex flex-col gap-16 md:gap-24 md:p-32 md:pb-0",children:[x.jsxs("div",{className:"flex justify-between items-center px-16 pt-16 md:px-0 md:pt-0",children:[n&&x.jsx("h2",{className:"text-black font-700 text-2xl",children:n}),x.jsx(De,{icon:Kc,className:"cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700 ml-auto",onClick:t})]}),n&&x.jsx(Jx,{className:"bg-gray-100!"})]}),x.jsx("div",{className:"flex flex-col gap-16 md:gap-24 p-16 pt-0 md:p-32 md:pt-4",children:typeof r=="function"?r(t):r})]})})})})})},lN=({active:e,color:t="blue",variant:n="rounded",className:r,size:i=16,...o})=>{const l={blue:"border-blue-500 bg-blue-500",aqua:"border-aqua-500 bg-aqua-500",red:"border-red-500 bg-red-500",gray:"border-gray-500 bg-gray-500"}[t],c={rounded:"rounded-full",square:"rounded-md"}[n],u=d=>({width:`${d}px`,height:`${d}px`,minWidth:`${d}px`,minHeight:`${d}px`});return x.jsx("div",{className:`relative transition-colors ease-in-out duration-150 flex items-center justify-center ${c} border-[1.5px] bg-white ${e?l:"border-gray-400"} ${r}`,style:u(i),...o,children:x.jsx("div",{className:`absolute transition-colors ease-in-out duration-150 ${c} size-12 ${e?l:""}`,style:u(i*.7)})})};var zd,ew;function cN(){if(ew)return zd;ew=1;function e(w){this._maxSize=w,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(w){return this._values[w]},e.prototype.set=function(w,A){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=A};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,l=512,c=new e(l),u=new e(l),d=new e(l);zd={Cache:e,split:m,normalizePath:h,setter:function(w){var A=h(w);return u.get(w)||u.set(w,function(D,C){for(var L=0,V=A.length,F=D;L<V-1;){var q=A[L];if(q==="__proto__"||q==="constructor"||q==="prototype")return D;F=F[A[L++]]}F[A[L]]=C})},getter:function(w,A){var O=h(w);return d.get(w)||d.set(w,function(C){for(var L=0,V=O.length;L<V;)if(C!=null||!A)C=C[O[L++]];else return;return C})},join:function(w){return w.reduce(function(A,O){return A+(y(O)||n.test(O)?"["+O+"]":(A?".":"")+O)},"")},forEach:function(w,A,O){g(Array.isArray(w)?w:m(w),A,O)}};function h(w){return c.get(w)||c.set(w,m(w).map(function(A){return A.replace(o,"$2")}))}function m(w){return w.match(t)||[""]}function g(w,A,O){var D=w.length,C,L,V,F;for(L=0;L<D;L++)C=w[L],C&&(P(C)&&(C='"'+C+'"'),F=y(C),V=!F&&/^\d+$/.test(C),A.call(O,C,F,V,L,w))}function y(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function S(w){return w.match(r)&&!w.match(n)}function b(w){return i.test(w)}function P(w){return!y(w)&&(S(w)||b(w))}return zd}var si=cN(),Gd,tw;function uN(){if(tw)return Gd;tw=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=h=>h.match(e)||[],n=h=>h[0].toUpperCase()+h.slice(1),r=(h,m)=>t(h).join(m).toLowerCase(),i=h=>t(h).reduce((m,g)=>`${m}${m?g[0].toUpperCase()+g.slice(1).toLowerCase():g.toLowerCase()}`,"");return Gd={words:t,upperFirst:n,camelCase:i,pascalCase:h=>n(i(h)),snakeCase:h=>r(h,"_"),kebabCase:h=>r(h,"-"),sentenceCase:h=>n(r(h," ")),titleCase:h=>t(h).map(n).join(" ")},Gd}var Yd=uN(),al={exports:{}},nw;function fN(){if(nw)return al.exports;nw=1,al.exports=function(i){return e(t(i),i)},al.exports.array=e;function e(i,o){var l=i.length,c=new Array(l),u={},d=l,h=n(o),m=r(i);for(o.forEach(function(y){if(!m.has(y[0])||!m.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)u[d]||g(i[d],d,new Set);return c;function g(y,S,b){if(b.has(y)){var P;try{P=", node was:"+JSON.stringify(y)}catch{P=""}throw new Error("Cyclic dependency"+P)}if(!m.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!u[S]){u[S]=!0;var w=h.get(y)||new Set;if(w=Array.from(w),S=w.length){b.add(y);do{var A=w[--S];g(A,m.get(A),b)}while(S);b.delete(y)}c[--l]=y}}}function t(i){for(var o=new Set,l=0,c=i.length;l<c;l++){var u=i[l];o.add(u[0]),o.add(u[1])}return Array.from(o)}function n(i){for(var o=new Map,l=0,c=i.length;l<c;l++){var u=i[l];o.has(u[0])||o.set(u[0],new Set),o.has(u[1])||o.set(u[1],new Set),o.get(u[0]).add(u[1])}return o}function r(i){for(var o=new Map,l=0,c=i.length;l<c;l++)o.set(i[l],l);return o}return al.exports}var dN=fN();const hN=vm(dN),mN=Object.prototype.toString,pN=Error.prototype.toString,gN=RegExp.prototype.toString,yN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",vN=/^Symbol\((.*)\)(.*)$/;function bN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function rw(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return bN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return yN.call(e).replace(vN,"Symbol($1)");const r=mN.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+pN.call(e)+"]":r==="RegExp"?gN.call(e):null}function Mr(e,t){let n=rw(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let o=rw(this[r],t);return o!==null?o:i},2)}function iw(e){return e==null?[]:[].concat(e)}let sw,ow,aw,xN=/\$\{\s*(\w+)\s*\}/g;sw=Symbol.toStringTag;class lw{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[sw]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],iw(t).forEach(o=>{if(Lt.isError(o)){this.errors.push(...o.errors);const l=o.inner.length?o.inner:[o];this.inner.push(...l)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}ow=Symbol.hasInstance,aw=Symbol.toStringTag;class Lt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(xN,(i,o)=>Mr(n[o])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,o){const l=new lw(t,n,r,i);if(o)return l;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[aw]="Error",this.name=l.name,this.message=l.message,this.type=l.type,this.value=l.value,this.path=l.path,this.errors=l.errors,this.inner=l.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Lt)}static[ow](t){return lw[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Ln={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Mr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Mr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Mr(n,!0)}\``+i}},kt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},wN={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Hd={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},SN={isValue:"${path} field must be ${value}"},ll={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Ln,string:kt,number:wN,date:Hd,object:ll,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:SN,tuple:{notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Mr(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Mr(n,!0)}\``}return Lt.formatError(Ln.notType,e)}}});const qd=e=>e&&e.__isYupSchema__;class cl{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:o}=n,l=typeof r=="function"?r:(...c)=>c.every(u=>u===r);return new cl(t,(c,u)=>{var d;let h=l(...c)?i:o;return(d=h==null?void 0:h(u))!=null?d:u})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(o=>o.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!qd(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const ul={context:"$",value:"."};class oi{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===ul.context,this.isValue=this.key[0]===ul.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?ul.context:this.isValue?ul.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&si.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}oi.prototype.__isYupRef=!0;const ai=e=>e==null;function ss(e){function t({value:n,path:r="",options:i,originalValue:o,schema:l},c,u){const{name:d,test:h,params:m,message:g,skipAbsent:y}=e;let{parent:S,context:b,abortEarly:P=l.spec.abortEarly,disableStackTrace:w=l.spec.disableStackTrace}=i;function A(re){return oi.isRef(re)?re.getValue(n,S,b):re}function O(re={}){const ve=Object.assign({value:n,originalValue:o,label:l.spec.label,path:re.path||r,spec:l.spec,disableStackTrace:re.disableStackTrace||w},m,re.params);for(const fe of Object.keys(ve))ve[fe]=A(ve[fe]);const ye=new Lt(Lt.formatError(re.message||g,ve),n,ve.path,re.type||d,ve.disableStackTrace);return ye.params=ve,ye}const D=P?c:u;let C={path:r,parent:S,type:d,from:i.from,createError:O,resolve:A,options:i,originalValue:o,schema:l};const L=re=>{Lt.isError(re)?D(re):re?u(null):D(O())},V=re=>{Lt.isError(re)?D(re):c(re)};if(y&&ai(n))return L(!0);let q;try{var ee;if(q=h.call(C,n,C),typeof((ee=q)==null?void 0:ee.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then(L,V)}}catch(re){V(re);return}L(q)}return t.OPTIONS=e,t}function TN(e,t,n,r=n){let i,o,l;return t?(si.forEach(t,(c,u,d)=>{let h=u?c.slice(1,c.length-1):c;e=e.resolve({context:r,parent:i,value:n});let m=e.type==="tuple",g=d?parseInt(h,10):0;if(e.innerType||m){if(m&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${l}" must contain an index to the tuple element, e.g. "${l}[0]"`);if(n&&g>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[g],e=m?e.spec.types[g]:e.innerType}if(!d){if(!e.fields||!e.fields[h])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${l} which is a type: "${e.type}")`);i=n,n=n&&n[h],e=e.fields[h]}o=h,l=u?"["+c+"]":"."+c}),{schema:e,parent:i,parentPath:o}):{parent:i,parentPath:t,schema:e}}class fl extends Set{describe(){const t=[];for(const n of this.values())t.push(oi.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new fl(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function os(e,t=new Map){if(qd(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=os(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,os(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(os(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=os(i,t)}else throw Error(`Unable to clone ${e}`);return n}class kn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new fl,this._blacklist=new fl,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ln.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=os(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(o=>{t.tests.forEach(l=>{o.test(l.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,o)=>o.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,o;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(o=t.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",o=r._cast(t,n);if(n.assert!==!1&&!r.isType(o)){if(i&&ai(o))return o;let l=Mr(t),c=Mr(o);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
697
697
 
698
698
  attempted value: ${l}
699
699
  `+(c!==l?`result of cast: ${c}`:""))}return o}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,o)=>o.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:o,originalValue:l=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:o,value:u,originalValue:l,options:n,tests:d},r,h=>{if(h.length)return i(h,u);this.runTests({path:o,value:u,originalValue:l,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:o,value:l,originalValue:c,path:u,options:d}=t,h=b=>{i||(i=!0,n(b,l))},m=b=>{i||(i=!0,r(b,l))},g=o.length,y=[];if(!g)return m([]);let S={value:l,originalValue:c,path:u,options:d,schema:this};for(let b=0;b<o.length;b++){const P=o[b];P(S,h,function(A){A&&(Array.isArray(A)?y.push(...A):y.push(A)),--g<=0&&m(y)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:o,options:l}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},l,{strict:!0,parent:r,value:d,originalValue:o[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${i||""}[${u?c:`"${c}"`}]`:(i?`${i}.`:"")+t});return(m,g,y)=>this.resolve(h)._validate(d,h,g,y)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((l,c)=>i._validate(t,n,(u,d)=>{Lt.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new Lt(u,d,void 0,void 0,o)):l(d)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),o,l=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw Lt.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new Lt(c,t,void 0,void 0,l);o=u}),o}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Lt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Lt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):os(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=ss({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=ss({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Ln.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ln.notNull){return this.nullability(!1,t)}required(t=Ln.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Ln.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=ss(n),o=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(l=>!(l.OPTIONS.name===n.name&&(o||l.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=iw(t).map(o=>new oi(o));return i.forEach(o=>{o.isSibling&&r.deps.push(o.key)}),r.conditions.push(typeof n=="function"?new cl(i,n):cl.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ss({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Ln.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=ss({message:n,name:"oneOf",skipAbsent:!0,test(i){let o=this.schema._whitelist,l=o.resolveAll(this.resolve);return l.includes(i)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:l}})}}),r}notOneOf(t,n=Ln.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=ss({message:n,name:"notOneOf",test(i){let o=this.schema._blacklist,l=o.resolveAll(this.resolve);return l.includes(i)?this.createError({params:{values:Array.from(o).join(", "),resolved:l}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:o,nullable:l}=n.spec;return{meta:i,label:r,optional:o,nullable:l,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(m=>m.name===u.name)===d)}}}kn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])kn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:o,schema:l}=TN(this,t,n,r.context);return l[e](i&&i[o],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])kn.prototype[e]=kn.prototype.oneOf;for(const e of["not","nope"])kn.prototype[e]=kn.prototype.notOneOf;const EN=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function CN(e){const t=Kd(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function Kd(e){var t,n;const r=EN.exec(e);return r?{year:Jn(r[1]),month:Jn(r[2],1)-1,day:Jn(r[3],1),hour:Jn(r[4]),minute:Jn(r[5]),second:Jn(r[6]),millisecond:r[7]?Jn(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Jn(r[10]),minuteOffset:Jn(r[11])}:null}function Jn(e,t=0){return Number(e)||t}let PN=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,AN=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ON=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,MN="^\\d{4}-\\d{2}-\\d{2}",_N="\\d{2}:\\d{2}:\\d{2}",IN="(([+-]\\d{2}(:?\\d{2})?)|Z)",DN=new RegExp(`${MN}T${_N}(\\.\\d+)?${IN}$`),$N=e=>ai(e)||e===e.trim(),RN={}.toString();function _r(){return new cw}class cw extends kn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===RN?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Ln.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=kt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=kt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=kt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,o;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:o}=n:i=n),this.test({name:o||"matches",message:i||kt.matches,params:{regex:t},skipAbsent:!0,test:l=>l===""&&r||l.search(t)!==-1})}email(t=kt.email){return this.matches(PN,{name:"email",message:t,excludeEmptyString:!0})}url(t=kt.url){return this.matches(AN,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=kt.uuid){return this.matches(ON,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(DN,{name:"datetime",message:n||kt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||kt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:o=>{if(!o||r)return!0;const l=Kd(o);return l?!!l.z:!1}}).test({name:"datetime_precision",message:n||kt.datetime_precision,params:{precision:i},skipAbsent:!0,test:o=>{if(!o||i==null)return!0;const l=Kd(o);return l?l.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=kt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:$N})}lowercase(t=kt.lowercase){return this.transform(n=>ai(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ai(n)||n===n.toLowerCase()})}uppercase(t=kt.uppercase){return this.transform(n=>ai(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ai(n)||n===n.toUpperCase()})}}_r.prototype=cw.prototype;let NN=new Date(""),LN=e=>Object.prototype.toString.call(e)==="[object Date]";class Xd extends kn{constructor(){super({type:"date",check(t){return LN(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=CN(t),isNaN(t)?Xd.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(oi.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=Hd.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=Hd.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Xd.INVALID_DATE=NN;function kN(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([l,c])=>`${l}-${c}`));function o(l,c){let u=si.split(l)[0];r.add(u),i.has(`${c}-${u}`)||n.push([c,u])}for(const l of Object.keys(e)){let c=e[l];r.add(l),oi.isRef(c)&&c.isSibling?o(c.path,l):qd(c)&&"deps"in c&&c.deps.forEach(u=>o(u,l))}return hN.array(Array.from(r),n).reverse()}function uw(e,t){let n=1/0;return e.some((r,i)=>{var o;if((o=t.path)!=null&&o.includes(r))return n=i,!0}),n}function fw(e){return(t,n)=>uw(e,t)-uw(e,n)}const FN=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function dl(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=dl(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=dl(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(dl)}):"optional"in e?e.optional():e}const jN=(e,t)=>{const n=[...si.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=si.getter(si.join(n),!0)(e);return!!(i&&r in i)};let dw=e=>Object.prototype.toString.call(e)==="[object Object]";function hw(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const VN=fw([]);function Zd(e){return new mw(e)}class mw extends kn{constructor(t){super({type:"object",check(n){return dw(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=VN,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let o=this.fields,l=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(i).filter(m=>!this._nodes.includes(m))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const m of c){let g=o[m],y=m in i;if(g){let S,b=i[m];d.path=(n.path?`${n.path}.`:"")+m,g=g.resolve({value:b,context:n.context,parent:u});let P=g instanceof kn?g.spec:void 0,w=P==null?void 0:P.strict;if(P!=null&&P.strip){h=h||m in i;continue}S=!n.__validating||!w?g.cast(i[m],d):i[m],S!==void 0&&(u[m]=S)}else y&&!l&&(u[m]=i[m]);(y!==m in u||u[m]!==i[m])&&(h=!0)}return h?u:i}_validate(t,n={},r,i){let{from:o=[],originalValue:l=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:l},...o],n.__validating=!0,n.originalValue=l,super._validate(t,n,r,(u,d)=>{if(!c||!dw(d)){i(u,d);return}l=l||d;let h=[];for(let m of this._nodes){let g=this.fields[m];!g||oi.isRef(g)||h.push(g.asNestedTest({options:n,key:m,parent:d,parentPath:n.path,originalParent:l}))}this.runTests({tests:h,value:d,originalValue:l,options:n},r,m=>{i(m.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,o]of Object.entries(this.fields)){const l=r[i];r[i]=l===void 0?o:l}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const o=this.fields[r];let l=t;(i=l)!=null&&i.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[r]})),n[r]=o&&"getDefault"in o?o.getDefault(l):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=kN(t,n),r._sortErrors=fw(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return dl(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=si.getter(t,!0);return this.transform(o=>{if(!o)return o;let l=o;return jN(o,t)&&(l=Object.assign({},o),r||delete l[t],l[n]=i(o)),l})}json(){return this.transform(FN)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||ll.exact,test(n){if(n==null)return!0;const r=hw(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=ll.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const o=hw(this.schema,i);return!t||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=ll.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(Yd.camelCase)}snakeCase(){return this.transformKeys(Yd.snakeCase)}constantCase(){return this.transformKeys(t=>Yd.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[o,l]of Object.entries(n.fields)){var i;let c=t;(i=c)!=null&&i.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[o]})),r.fields[o]=l.describe(c)}return r}}Zd.prototype=mw.prototype,Zd().shape({labelES:_r().required(),label:_r().required(),code:_r().required(),codeISO2:_r().required(),phone:_r().required()});const pw=[{labelES:"Afganistán",label:"Afghanistan",codeISO2:"AF",code:"AFG",phone:"93"},{labelES:"Albania",label:"Albania",codeISO2:"AL",code:"ALB",phone:"355"},{labelES:"Alemania",label:"Germany",codeISO2:"DE",code:"DEU",phone:"49"},{labelES:"Andorra",label:"Andorra",codeISO2:"AD",code:"AND",phone:"376"},{labelES:"Angola",label:"Angola",codeISO2:"AO",code:"AGO",phone:"244"},{labelES:"Anguila",label:"Anguilla",codeISO2:"AI",code:"AIA",phone:"1 264"},{labelES:"Antártida",label:"Antarctica",codeISO2:"AQ",code:"ATA",phone:"672"},{labelES:"Antigua y Barbuda",label:"Antigua and Barbuda",codeISO2:"AG",code:"ATG",phone:"1 268"},{labelES:"Arabia Saudita",label:"Saudi Arabia",codeISO2:"SA",code:"SAU",phone:"966"},{labelES:"Argelia",label:"Algeria",codeISO2:"DZ",code:"DZA",phone:"213"},{labelES:"Argentina",label:"Argentina",codeISO2:"AR",code:"ARG",phone:"54"},{labelES:"Armenia",label:"Armenia",codeISO2:"AM",code:"ARM",phone:"374"},{labelES:"Aruba",label:"Aruba",codeISO2:"AW",code:"ABW",phone:"297"},{labelES:"Australia",label:"Australia",codeISO2:"AU",code:"AUS",phone:"61"},{labelES:"Austria",label:"Austria",codeISO2:"AT",code:"AUT",phone:"43"},{labelES:"Azerbaiyán",label:"Azerbaijan",codeISO2:"AZ",code:"AZE",phone:"994"},{labelES:"Bélgica",label:"Belgium",codeISO2:"BE",code:"BEL",phone:"32"},{labelES:"Bahamas",label:"Bahamas",codeISO2:"BS",code:"BHS",phone:"1 242"},{labelES:"Bahrein",label:"Bahrain",codeISO2:"BH",code:"BHR",phone:"973"},{labelES:"Bangladesh",label:"Bangladesh",codeISO2:"BD",code:"BGD",phone:"880"},{labelES:"Barbados",label:"Barbados",codeISO2:"BB",code:"BRB",phone:"1 246"},{labelES:"Belice",label:"Belize",codeISO2:"BZ",code:"BLZ",phone:"501"},{labelES:"Benín",label:"Benin",codeISO2:"BJ",code:"BEN",phone:"229"},{labelES:"Bhután",label:"Bhutan",codeISO2:"BT",code:"BTN",phone:"975"},{labelES:"Bielorrusia",label:"Belarus",codeISO2:"BY",code:"BLR",phone:"375"},{labelES:"Birmania",label:"Myanmar",codeISO2:"MM",code:"MMR",phone:"95"},{labelES:"Bolivia",label:"Bolivia",codeISO2:"BO",code:"BOL",phone:"591"},{labelES:"Bosnia y Herzegovina",label:"Bosnia and Herzegovina",codeISO2:"BA",code:"BIH",phone:"387"},{labelES:"Botsuana",label:"Botswana",codeISO2:"BW",code:"BWA",phone:"267"},{labelES:"Brasil",label:"Brazil",codeISO2:"BR",code:"BRA",phone:"55"},{labelES:"Brunéi",label:"Brunei",codeISO2:"BN",code:"BRN",phone:"673"},{labelES:"Bulgaria",label:"Bulgaria",codeISO2:"BG",code:"BGR",phone:"359"},{labelES:"Burkina Faso",label:"Burkina Faso",codeISO2:"BF",code:"BFA",phone:"226"},{labelES:"Burundi",label:"Burundi",codeISO2:"BI",code:"BDI",phone:"257"},{labelES:"Cabo Verde",label:"Cape Verde",codeISO2:"CV",code:"CPV",phone:"238"},{labelES:"Camboya",label:"Cambodia",codeISO2:"KH",code:"KHM",phone:"855"},{labelES:"Camerún",label:"Cameroon",codeISO2:"CM",code:"CMR",phone:"237"},{labelES:"Canadá",label:"Canada",codeISO2:"CA",code:"CAN",phone:"1"},{labelES:"Chad",label:"Chad",codeISO2:"TD",code:"TCD",phone:"235"},{labelES:"Chile",label:"Chile",codeISO2:"CL",code:"CHL",phone:"56"},{labelES:"China",label:"China",codeISO2:"CN",code:"CHN",phone:"86"},{labelES:"Chipre",label:"Cyprus",codeISO2:"CY",code:"CYP",phone:"357"},{labelES:"Ciudad del Vaticano",label:"Vatican City State",codeISO2:"VA",code:"VAT",phone:"39"},{labelES:"Colombia",label:"Colombia",codeISO2:"CO",code:"COL",phone:"57"},{labelES:"Comoras",label:"Comoros",codeISO2:"KM",code:"COM",phone:"269"},{labelES:"República del Congo",label:"Republic of the Congo",codeISO2:"CG",code:"COG",phone:"242"},{labelES:"República Democrática del Congo",label:"Democratic Republic of the Congo",codeISO2:"CD",code:"COD",phone:"243"},{labelES:"Corea del Norte",label:"North Korea",codeISO2:"KP",code:"PRK",phone:"850"},{labelES:"Corea del Sur",label:"South Korea",codeISO2:"KR",code:"KOR",phone:"82"},{labelES:"Costa de Marfil",label:"Ivory Coast",codeISO2:"CI",code:"CIV",phone:"225"},{labelES:"Costa Rica",label:"Costa Rica",codeISO2:"CR",code:"CRI",phone:"506"},{labelES:"Croacia",label:"Croatia",codeISO2:"HR",code:"HRV",phone:"385"},{labelES:"Cuba",label:"Cuba",codeISO2:"CU",code:"CUB",phone:"53"},{labelES:"Curazao",label:"Curaçao",codeISO2:"CW",code:"CWU",phone:"5999"},{labelES:"Dinamarca",label:"Denmark",codeISO2:"DK",code:"DNK",phone:"45"},{labelES:"Dominica",label:"Dominica",codeISO2:"DM",code:"DMA",phone:"1 767"},{labelES:"Ecuador",label:"Ecuador",codeISO2:"EC",code:"ECU",phone:"593"},{labelES:"Egipto",label:"Egypt",codeISO2:"EG",code:"EGY",phone:"20"},{labelES:"El Salvador",label:"El Salvador",codeISO2:"SV",code:"SLV",phone:"503"},{labelES:"Emiratos Árabes Unidos",label:"United Arab Emirates",codeISO2:"AE",code:"ARE",phone:"971"},{labelES:"Eritrea",label:"Eritrea",codeISO2:"ER",code:"ERI",phone:"291"},{labelES:"Eslovaquia",label:"Slovakia",codeISO2:"SK",code:"SVK",phone:"421"},{labelES:"Eslovenia",label:"Slovenia",codeISO2:"SI",code:"SVN",phone:"386"},{labelES:"España",label:"Spain",codeISO2:"ES",code:"ESP",phone:"34"},{labelES:"Estados Unidos de América",label:"United States of America",codeISO2:"US",code:"USA",phone:"1"},{labelES:"Estonia",label:"Estonia",codeISO2:"EE",code:"EST",phone:"372"},{labelES:"Etiopía",label:"Ethiopia",codeISO2:"ET",code:"ETH",phone:"251"},{labelES:"Filipinas",label:"Philippines",codeISO2:"PH",code:"PHL",phone:"63"},{labelES:"Finlandia",label:"Finland",codeISO2:"FI",code:"FIN",phone:"358"},{labelES:"Fiyi",label:"Fiji",codeISO2:"FJ",code:"FJI",phone:"679"},{labelES:"Francia",label:"France",codeISO2:"FR",code:"FRA",phone:"33"},{labelES:"Gabón",label:"Gabon",codeISO2:"GA",code:"GAB",phone:"241"},{labelES:"Gambia",label:"Gambia",codeISO2:"GM",code:"GMB",phone:"220"},{labelES:"Georgia",label:"Georgia",codeISO2:"GE",code:"GEO",phone:"995"},{labelES:"Ghana",label:"Ghana",codeISO2:"GH",code:"GHA",phone:"233"},{labelES:"Gibraltar",label:"Gibraltar",codeISO2:"GI",code:"GIB",phone:"350"},{labelES:"Granada",label:"Grenada",codeISO2:"GD",code:"GRD",phone:"1 473"},{labelES:"Grecia",label:"Greece",codeISO2:"GR",code:"GRC",phone:"30"},{labelES:"Groenlandia",label:"Greenland",codeISO2:"GL",code:"GRL",phone:"299"},{labelES:"Guadalupe",label:"Guadeloupe",codeISO2:"GP",code:"GLP",phone:"590"},{labelES:"Guam",label:"Guam",codeISO2:"GU",code:"GUM",phone:"1 671"},{labelES:"Guatemala",label:"Guatemala",codeISO2:"GT",code:"GTM",phone:"502"},{labelES:"Guayana Francesa",label:"French Guiana",codeISO2:"GF",code:"GUF",phone:"594"},{labelES:"Guernsey",label:"Guernsey",codeISO2:"GG",code:"GGY",phone:"44"},{labelES:"Guinea",label:"Guinea",codeISO2:"GN",code:"GIN",phone:"224"},{labelES:"Guinea Ecuatorial",label:"Equatorial Guinea",codeISO2:"GQ",code:"GNQ",phone:"240"},{labelES:"Guinea-Bissau",label:"Guinea-Bissau",codeISO2:"GW",code:"GNB",phone:"245"},{labelES:"Guyana",label:"Guyana",codeISO2:"GY",code:"GUY",phone:"592"},{labelES:"Haití",label:"Haiti",codeISO2:"HT",code:"HTI",phone:"509"},{labelES:"Honduras",label:"Honduras",codeISO2:"HN",code:"HND",phone:"504"},{labelES:"Hong kong",label:"Hong Kong",codeISO2:"HK",code:"HKG",phone:"852"},{labelES:"Hungría",label:"Hungary",codeISO2:"HU",code:"HUN",phone:"36"},{labelES:"India",label:"India",codeISO2:"IN",code:"IND",phone:"91"},{labelES:"Indonesia",label:"Indonesia",codeISO2:"ID",code:"IDN",phone:"62"},{labelES:"Irán",label:"Iran",codeISO2:"IR",code:"IRN",phone:"98"},{labelES:"Irak",label:"Iraq",codeISO2:"IQ",code:"IRQ",phone:"964"},{labelES:"Irlanda",label:"Ireland",codeISO2:"IE",code:"IRL",phone:"353"},{labelES:"Isla Bouvet",label:"Bouvet Island",codeISO2:"BV",code:"BVT",phone:""},{labelES:"Isla de Man",label:"Isle of Man",codeISO2:"IM",code:"IMN",phone:"44"},{labelES:"Isla de Navidad",label:"Christmas Island",codeISO2:"CX",code:"CXR",phone:"61"},{labelES:"Isla Norfolk",label:"Norfolk Island",codeISO2:"NF",code:"NFK",phone:"672"},{labelES:"Islandia",label:"Iceland",codeISO2:"IS",code:"ISL",phone:"354"},{labelES:"Islas Bermudas",label:"Bermuda Islands",codeISO2:"BM",code:"BMU",phone:"1 441"},{labelES:"Islas Caimán",label:"Cayman Islands",codeISO2:"KY",code:"CYM",phone:"1 345"},{labelES:"Islas Cocos (Keeling)",label:"Cocos (Keeling) Islands",codeISO2:"CC",code:"CCK",phone:"61"},{labelES:"Islas Cook",label:"Cook Islands",codeISO2:"CK",code:"COK",phone:"682"},{labelES:"Islas de Åland",label:"Åland Islands",codeISO2:"AX",code:"ALA",phone:"358"},{labelES:"Islas Feroe",label:"Faroe Islands",codeISO2:"FO",code:"FRO",phone:"298"},{labelES:"Islas Georgias del Sur y Sandwich del Sur",label:"South Georgia and the South Sandwich Islands",codeISO2:"GS",code:"SGS",phone:"500"},{labelES:"Islas Heard y McDonald",label:"Heard Island and McDonald Islands",codeISO2:"HM",code:"HMD",phone:""},{labelES:"Islas Maldivas",label:"Maldives",codeISO2:"MV",code:"MDV",phone:"960"},{labelES:"Islas Malvinas",label:"Falkland Islands (Malvinas)",codeISO2:"FK",code:"FLK",phone:"500"},{labelES:"Islas Marianas del Norte",label:"Northern Mariana Islands",codeISO2:"MP",code:"MNP",phone:"1 670"},{labelES:"Islas Marshall",label:"Marshall Islands",codeISO2:"MH",code:"MHL",phone:"692"},{labelES:"Islas Pitcairn",label:"Pitcairn Islands",codeISO2:"PN",code:"PCN",phone:"870"},{labelES:"Islas Salomón",label:"Solomon Islands",codeISO2:"SB",code:"SLB",phone:"677"},{labelES:"Islas Turcas y Caicos",label:"Turks and Caicos Islands",codeISO2:"TC",code:"TCA",phone:"1 649"},{labelES:"Islas Ultramarinas Menores de Estados Unidos",label:"United States Minor Outlying Islands",codeISO2:"UM",code:"UMI",phone:"246"},{labelES:"Islas Vírgenes Británicas",label:"Virgin Islands",codeISO2:"VG",code:"VGB",phone:"1 284"},{labelES:"Islas Vírgenes de los Estados Unidos",label:"United States Virgin Islands",codeISO2:"VI",code:"VIR",phone:"1 340"},{labelES:"Israel",label:"Israel",codeISO2:"IL",code:"ISR",phone:"972"},{labelES:"Italia",label:"Italy",codeISO2:"IT",code:"ITA",phone:"39"},{labelES:"Jamaica",label:"Jamaica",codeISO2:"JM",code:"JAM",phone:"1 876"},{labelES:"Japón",label:"Japan",codeISO2:"JP",code:"JPN",phone:"81"},{labelES:"Jersey",label:"Jersey",codeISO2:"JE",code:"JEY",phone:"44"},{labelES:"Jordania",label:"Jordan",codeISO2:"JO",code:"JOR",phone:"962"},{labelES:"Kazajistán",label:"Kazakhstan",codeISO2:"KZ",code:"KAZ",phone:"7"},{labelES:"Kenia",label:"Kenya",codeISO2:"KE",code:"KEN",phone:"254"},{labelES:"Kirguistán",label:"Kyrgyzstan",codeISO2:"KG",code:"KGZ",phone:"996"},{labelES:"Kiribati",label:"Kiribati",codeISO2:"KI",code:"KIR",phone:"686"},{labelES:"Kuwait",label:"Kuwait",codeISO2:"KW",code:"KWT",phone:"965"},{labelES:"Líbano",label:"Lebanon",codeISO2:"LB",code:"LBN",phone:"961"},{labelES:"Laos",label:"Laos",codeISO2:"LA",code:"LAO",phone:"856"},{labelES:"Lesoto",label:"Lesotho",codeISO2:"LS",code:"LSO",phone:"266"},{labelES:"Letonia",label:"Latvia",codeISO2:"LV",code:"LVA",phone:"371"},{labelES:"Liberia",label:"Liberia",codeISO2:"LR",code:"LBR",phone:"231"},{labelES:"Libia",label:"Libya",codeISO2:"LY",code:"LBY",phone:"218"},{labelES:"Liechtenstein",label:"Liechtenstein",codeISO2:"LI",code:"LIE",phone:"423"},{labelES:"Lituania",label:"Lithuania",codeISO2:"LT",code:"LTU",phone:"370"},{labelES:"Luxemburgo",label:"Luxembourg",codeISO2:"LU",code:"LUX",phone:"352"},{labelES:"México",label:"Mexico",codeISO2:"MX",code:"MEX",phone:"52"},{labelES:"Mónaco",label:"Monaco",codeISO2:"MC",code:"MCO",phone:"377"},{labelES:"Macao",label:"Macao",codeISO2:"MO",code:"MAC",phone:"853"},{labelES:"Macedônia",label:"Macedonia",codeISO2:"MK",code:"MKD",phone:"389"},{labelES:"Madagascar",label:"Madagascar",codeISO2:"MG",code:"MDG",phone:"261"},{labelES:"Malasia",label:"Malaysia",codeISO2:"MY",code:"MYS",phone:"60"},{labelES:"Malawi",label:"Malawi",codeISO2:"MW",code:"MWI",phone:"265"},{labelES:"Mali",label:"Mali",codeISO2:"ML",code:"MLI",phone:"223"},{labelES:"Malta",label:"Malta",codeISO2:"MT",code:"MLT",phone:"356"},{labelES:"Marruecos",label:"Morocco",codeISO2:"MA",code:"MAR",phone:"212"},{labelES:"Martinica",label:"Martinique",codeISO2:"MQ",code:"MTQ",phone:"596"},{labelES:"Mauricio",label:"Mauritius",codeISO2:"MU",code:"MUS",phone:"230"},{labelES:"Mauritania",label:"Mauritania",codeISO2:"MR",code:"MRT",phone:"222"},{labelES:"Mayotte",label:"Mayotte",codeISO2:"YT",code:"MYT",phone:"262"},{labelES:"Micronesia",label:"Estados Federados de",codeISO2:"FM",code:"FSM",phone:"691"},{labelES:"Moldavia",label:"Moldova",codeISO2:"MD",code:"MDA",phone:"373"},{labelES:"Mongolia",label:"Mongolia",codeISO2:"MN",code:"MNG",phone:"976"},{labelES:"Montenegro",label:"Montenegro",codeISO2:"ME",code:"MNE",phone:"382"},{labelES:"Montserrat",label:"Montserrat",codeISO2:"MS",code:"MSR",phone:"1 664"},{labelES:"Mozambique",label:"Mozambique",codeISO2:"MZ",code:"MOZ",phone:"258"},{labelES:"Namibia",label:"Namibia",codeISO2:"NA",code:"NAM",phone:"264"},{labelES:"Nauru",label:"Nauru",codeISO2:"NR",code:"NRU",phone:"674"},{labelES:"Nepal",label:"Nepal",codeISO2:"NP",code:"NPL",phone:"977"},{labelES:"Nicaragua",label:"Nicaragua",codeISO2:"NI",code:"NIC",phone:"505"},{labelES:"Niger",label:"Niger",codeISO2:"NE",code:"NER",phone:"227"},{labelES:"Nigeria",label:"Nigeria",codeISO2:"NG",code:"NGA",phone:"234"},{labelES:"Niue",label:"Niue",codeISO2:"NU",code:"NIU",phone:"683"},{labelES:"Noruega",label:"Norway",codeISO2:"NO",code:"NOR",phone:"47"},{labelES:"Nueva Caledonia",label:"New Caledonia",codeISO2:"NC",code:"NCL",phone:"687"},{labelES:"Nueva Zelanda",label:"New Zealand",codeISO2:"NZ",code:"NZL",phone:"64"},{labelES:"Omán",label:"Oman",codeISO2:"OM",code:"OMN",phone:"968"},{labelES:"Países Bajos",label:"Netherlands",codeISO2:"NL",code:"NLD",phone:"31"},{labelES:"Pakistán",label:"Pakistan",codeISO2:"PK",code:"PAK",phone:"92"},{labelES:"Palau",label:"Palau",codeISO2:"PW",code:"PLW",phone:"680"},{labelES:"Palestina",label:"Palestine",codeISO2:"PS",code:"PSE",phone:"970"},{labelES:"Panamá",label:"Panama",codeISO2:"PA",code:"PAN",phone:"507"},{labelES:"Papúa Nueva Guinea",label:"Papua New Guinea",codeISO2:"PG",code:"PNG",phone:"675"},{labelES:"Paraguay",label:"Paraguay",codeISO2:"PY",code:"PRY",phone:"595"},{labelES:"Perú",label:"Peru",codeISO2:"PE",code:"PER",phone:"51"},{labelES:"Polinesia Francesa",label:"French Polynesia",codeISO2:"PF",code:"PYF",phone:"689"},{labelES:"Polonia",label:"Poland",codeISO2:"PL",code:"POL",phone:"48"},{labelES:"Portugal",label:"Portugal",codeISO2:"PT",code:"PRT",phone:"351"},{labelES:"Puerto Rico",label:"Puerto Rico",codeISO2:"PR",code:"PRI",phone:"1"},{labelES:"Qatar",label:"Qatar",codeISO2:"QA",code:"QAT",phone:"974"},{labelES:"Reino Unido",label:"United Kingdom",codeISO2:"GB",code:"GBR",phone:"44"},{labelES:"República Centroafricana",label:"Central African Republic",codeISO2:"CF",code:"CAF",phone:"236"},{labelES:"República Checa",label:"Czech Republic",codeISO2:"CZ",code:"CZE",phone:"420"},{labelES:"República Dominicana",label:"Dominican Republic",codeISO2:"DO",code:"DOM",phone:"1 809"},{labelES:"República de Sudán del Sur",label:"South Sudan",codeISO2:"SS",code:"SSD",phone:"211"},{labelES:"Reunión",label:"Réunion",codeISO2:"RE",code:"REU",phone:"262"},{labelES:"Ruanda",label:"Rwanda",codeISO2:"RW",code:"RWA",phone:"250"},{labelES:"Rumanía",label:"Romania",codeISO2:"RO",code:"ROU",phone:"40"},{labelES:"Rusia",label:"Russia",codeISO2:"RU",code:"RUS",phone:"7"},{labelES:"Sahara Occidental",label:"Western Sahara",codeISO2:"EH",code:"ESH",phone:"212"},{labelES:"Samoa",label:"Samoa",codeISO2:"WS",code:"WSM",phone:"685"},{labelES:"Samoa Americana",label:"American Samoa",codeISO2:"AS",code:"ASM",phone:"1 684"},{labelES:"San Bartolomé",label:"Saint Barthélemy",codeISO2:"BL",code:"BLM",phone:"590"},{labelES:"San Cristóbal y Nieves",label:"Saint Kitts and Nevis",codeISO2:"KN",code:"KNA",phone:"1 869"},{labelES:"San Marino",label:"San Marino",codeISO2:"SM",code:"SMR",phone:"378"},{labelES:"San Martín (Francia)",label:"Saint Martin (French part)",codeISO2:"MF",code:"MAF",phone:"1 599"},{labelES:"San Pedro y Miquelón",label:"Saint Pierre and Miquelon",codeISO2:"PM",code:"SPM",phone:"508"},{labelES:"San Vicente y las Granadinas",label:"Saint Vincent and the Grenadines",codeISO2:"VC",code:"VCT",phone:"1 784"},{labelES:"Santa Elena",label:"Ascensión y Tristán de Acuña",codeISO2:"SH",code:"SHN",phone:"290"},{labelES:"Santa Lucía",label:"Saint Lucia",codeISO2:"LC",code:"LCA",phone:"1 758"},{labelES:"Santo Tomé y Príncipe",label:"Sao Tome and Principe",codeISO2:"ST",code:"STP",phone:"239"},{labelES:"Senegal",label:"Senegal",codeISO2:"SN",code:"SEN",phone:"221"},{labelES:"Serbia",label:"Serbia",codeISO2:"RS",code:"SRB",phone:"381"},{labelES:"Seychelles",label:"Seychelles",codeISO2:"SC",code:"SYC",phone:"248"},{labelES:"Sierra Leona",label:"Sierra Leone",codeISO2:"SL",code:"SLE",phone:"232"},{labelES:"Singapur",label:"Singapore",codeISO2:"SG",code:"SGP",phone:"65"},{labelES:"Sint Maarten",label:"Sint Maarten",codeISO2:"SX",code:"SMX",phone:"1 721"},{labelES:"Siria",label:"Syria",codeISO2:"SY",code:"SYR",phone:"963"},{labelES:"Somalia",label:"Somalia",codeISO2:"SO",code:"SOM",phone:"252"},{labelES:"Sri lanka",label:"Sri Lanka",codeISO2:"LK",code:"LKA",phone:"94"},{labelES:"Sudáfrica",label:"South Africa",codeISO2:"ZA",code:"ZAF",phone:"27"},{labelES:"Sudán",label:"Sudan",codeISO2:"SD",code:"SDN",phone:"249"},{labelES:"Suecia",label:"Sweden",codeISO2:"SE",code:"SWE",phone:"46"},{labelES:"Suiza",label:"Switzerland",codeISO2:"CH",code:"CHE",phone:"41"},{labelES:"Surinám",label:"Suriname",codeISO2:"SR",code:"SUR",phone:"597"},{labelES:"Svalbard y Jan Mayen",label:"Svalbard and Jan Mayen",codeISO2:"SJ",code:"SJM",phone:"47"},{labelES:"Swazilandia",label:"Swaziland",codeISO2:"SZ",code:"SWZ",phone:"268"},{labelES:"Tayikistán",label:"Tajikistan",codeISO2:"TJ",code:"TJK",phone:"992"},{labelES:"Tailandia",label:"Thailand",codeISO2:"TH",code:"THA",phone:"66"},{labelES:"Taiwán",label:"Taiwan",codeISO2:"TW",code:"TWN",phone:"886"},{labelES:"Tanzania",label:"Tanzania",codeISO2:"TZ",code:"TZA",phone:"255"},{labelES:"Territorio Británico del Océano Índico",label:"British Indian Ocean Territory",codeISO2:"IO",code:"IOT",phone:"246"},{labelES:"Territorios Australes y Antárticas Franceses",label:"French Southern Territories",codeISO2:"TF",code:"ATF",phone:""},{labelES:"Timor Oriental",label:"East Timor",codeISO2:"TL",code:"TLS",phone:"670"},{labelES:"Togo",label:"Togo",codeISO2:"TG",code:"TGO",phone:"228"},{labelES:"Tokelau",label:"Tokelau",codeISO2:"TK",code:"TKL",phone:"690"},{labelES:"Tonga",label:"Tonga",codeISO2:"TO",code:"TON",phone:"676"},{labelES:"Trinidad y Tobago",label:"Trinidad and Tobago",codeISO2:"TT",code:"TTO",phone:"1 868"},{labelES:"Tunez",label:"Tunisia",codeISO2:"TN",code:"TUN",phone:"216"},{labelES:"Turkmenistán",label:"Turkmenistan",codeISO2:"TM",code:"TKM",phone:"993"},{labelES:"Turquía",label:"Turkey",codeISO2:"TR",code:"TUR",phone:"90"},{labelES:"Tuvalu",label:"Tuvalu",codeISO2:"TV",code:"TUV",phone:"688"},{labelES:"Ucrania",label:"Ukraine",codeISO2:"UA",code:"UKR",phone:"380"},{labelES:"Uganda",label:"Uganda",codeISO2:"UG",code:"UGA",phone:"256"},{labelES:"Uruguay",label:"Uruguay",codeISO2:"UY",code:"URY",phone:"598"},{labelES:"Uzbekistán",label:"Uzbekistan",codeISO2:"UZ",code:"UZB",phone:"998"},{labelES:"Vanuatu",label:"Vanuatu",codeISO2:"VU",code:"VUT",phone:"678"},{labelES:"Venezuela",label:"Venezuela",codeISO2:"VE",code:"VEN",phone:"58"},{labelES:"Vietnam",label:"Vietnam",codeISO2:"VN",code:"VNM",phone:"84"},{labelES:"Wallis y Futuna",label:"Wallis and Futuna",codeISO2:"WF",code:"WLF",phone:"681"},{labelES:"Yemen",label:"Yemen",codeISO2:"YE",code:"YEM",phone:"967"},{labelES:"Yibuti",label:"Djibouti",codeISO2:"DJ",code:"DJI",phone:"253"},{labelES:"Zambia",label:"Zambia",codeISO2:"ZM",code:"ZMB",phone:"260"},{labelES:"Zimbabue",label:"Zimbabwe",codeISO2:"ZW",code:"ZWE",phone:"263"}],BN=({countries:e=pw,name:t,control:n,label:r="select_a_country",placeholder:i="type_to_search",language:o="en",className:l="",translateKey:c})=>{var Ce,Ue,Q;const{t:u}=ze(),{field:d,fieldState:h}=cr.useController({name:t,control:n,rules:{validate:{}},defaultValue:null}),[m,g]=I.useState(!1),[y,S]=I.useState(""),[b,P]=I.useState(d.value||null),w=I.useRef(null),A=I.useRef(null),O=I.useRef(null),{x:D,y:C,strategy:L,refs:V,context:F,placement:q,middlewareData:ee}=Co({open:m,onOpenChange:g,middleware:[xo(8),So(),wo({padding:8}),rl({apply({availableHeight:pe,elements:Le}){Object.assign(Le.floating.style,{maxHeight:`${Math.min(pe-10,300)}px`})},padding:8}),il({element:A})],placement:"bottom-start",whileElementsMounted:bo}),re=To(F),ve=Eo(F),{getReferenceProps:ye,getFloatingProps:fe}=Po([re,ve]),{isMounted:se,styles:oe}=Ao(F,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),Y=(Array.isArray(e)?e:[]).filter(pe=>{if(!y.trim())return!0;const Le=o==="es"&&pe.labelES?pe.labelES.toLowerCase():pe.label.toLowerCase(),ft=pe.code?pe.code.toLowerCase():"";return Le.includes(y.toLowerCase())||ft.includes(y.toLowerCase())}),Z=pe=>{P(pe),g(!1),S(""),d.onChange(pe)},_=()=>{g(!m),!m&&w.current&&setTimeout(()=>{var pe;(pe=w.current)==null||pe.focus()},100)},k=()=>{setTimeout(()=>{m||d.onBlur()},200)};I.useEffect(()=>{P(d.value)},[d.value]),I.useEffect(()=>{const pe=Le=>{O.current&&!O.current.contains(Le.target)&&d.onBlur()};return document.addEventListener("mousedown",pe),()=>{document.removeEventListener("mousedown",pe)}},[d]);const X=pe=>{var Le;return pe?pe.codeISO2?pe.codeISO2.toLowerCase():((Le=pe.code)==null?void 0:Le.toLowerCase())||"":""},J=(Ce=ee.arrow)==null?void 0:Ce.x,le=(Ue=ee.arrow)==null?void 0:Ue.y,H={top:"bottom",right:"left",bottom:"top",left:"right"}[q.split("-")[0]],ie=ye({onClick:_,onBlur:k}),de=u(r),ne=u(i),me=(Q=h.error)==null?void 0:Q.message;return x.jsxs("div",{ref:O,className:`w-full relative flex flex-col gap-8 ${l}`,children:[x.jsx("label",{className:`text-gray-600 font-600 group ${me&&"!text-red-500"} text-label`,children:de}),x.jsxs("div",{ref:V.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${me&&"border-red-500 hover:border-red-600"} ${se?"border-blue-400":"border-blue-100"}`,...ie,tabIndex:0,children:[b!=null&&b.code?x.jsxs("div",{className:"flex items-center w-full gap-10",children:[X(b)&&x.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${X(b)}.png`,srcSet:`https://flagcdn.com/w40/${X(b)}.png 2x`,alt:b.label,onError:pe=>{pe.currentTarget.style.display="none"}}),x.jsxs("span",{className:"flex-grow font-600 text-body-m",children:[o==="es"&&b.labelES?b.labelES:b.label,b.code?` (${b.code})`:u("select_country")]})]}):x.jsx("span",{className:"text-gray-400 font-600 text-body-m",children:ne}),x.jsx("svg",{className:`w-16 h-16 transition-transform ${m?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),me&&x.jsx("p",{className:"mt-1 text-sm text-red-600",children:u(me,{x:u(c||"")||u(t)})}),se&&x.jsxs("div",{ref:V.setFloating,style:{position:L,top:C??0,left:D??0,...oe},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...fe(),children:[x.jsx("div",{ref:A,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:J!=null?`${J}px`:"",top:le!=null?`${le}px`:"",right:"",bottom:"",[H]:"-2px",borderRight:H==="left"?"1px solid":"none",borderBottom:H==="top"?"1px solid":"none",borderLeft:H==="right"?"1px solid":"none",borderTop:H==="bottom"?"1px solid":"none"}}),x.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:x.jsx("input",{ref:w,type:"text",className:"w-full p-16 text-body-s",placeholder:u("search")+"...",value:y,onChange:pe=>S(pe.target.value),onClick:pe=>pe.stopPropagation(),onBlur:pe=>{pe.stopPropagation()},autoFocus:!0})}),x.jsx("div",{children:Y.length>0?x.jsx("ul",{className:"flex flex-col",children:Y.map((pe,Le)=>{var li;const ft=pe.codeISO2?pe.codeISO2.toLowerCase():((li=pe.code)==null?void 0:li.toLowerCase())||"";return x.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:dt=>{dt.stopPropagation(),Z(pe)},children:[ft&&x.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${ft}.png`,srcSet:`https://flagcdn.com/w40/${ft}.png 2x`,alt:pe.label,onError:dt=>{dt.currentTarget.style.display="none"}}),x.jsxs("span",{children:[o==="es"&&pe.labelES?pe.labelES:pe.label,pe.code?` (${pe.code})`:"Country not found"]})]},`${pe.code}-${Le}`)})}):x.jsx("div",{className:"px-16 py-8 text-gray-500 text-body-s",children:u("no_countries_found")})})]})]})},UN=({country:e})=>{const t=n=>{var r;return n?n.codeISO2?n.codeISO2.toLowerCase():((r=n.code)==null?void 0:r.toLowerCase())||"":""};return x.jsxs("div",{className:"flex items-center gap-8",children:[x.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${t(e)}.png`,srcSet:`https://flagcdn.com/w40/${t(e)}.png 2x`,alt:e.label,onError:n=>{n.currentTarget.style.display="none"}}),x.jsx("p",{className:"text-body-s text-gray-600",children:e.label})]})},WN=({countries:e,name:t,control:n,label:r="select_a_country",placeholder:i="type_to_search",language:o="en",className:l=""})=>{const{t:c}=ze();return x.jsx(cr.Controller,{name:t,control:n,render:({field:{onChange:u,value:d},fieldState:{error:h}})=>x.jsx(zN,{countries:e,value:d,onChange:u,label:c(r),placeholder:c(i),language:o,error:h==null?void 0:h.message,className:l})})},zN=({countries:e,value:t,onChange:n,label:r="select_a_country",placeholder:i="type_to_search",language:o="en",error:l,className:c=""})=>{var J,le;const{t:u}=ze(),[d,h]=I.useState(!1),[m,g]=I.useState(""),[y,S]=I.useState(t||null),b=I.useRef(null),P=I.useRef(null),{x:w,y:A,strategy:O,refs:D,context:C,placement:L,middlewareData:V}=Co({open:d,onOpenChange:h,middleware:[xo(8),So(),wo({padding:8}),rl({apply({availableHeight:H,elements:ie}){Object.assign(ie.floating.style,{maxHeight:`${Math.min(H-10,300)}px`})},padding:8}),il({element:P})],placement:"bottom-start",whileElementsMounted:bo}),F=To(C),q=Eo(C),{getReferenceProps:ee,getFloatingProps:re}=Po([F,q]),{isMounted:ve,styles:ye}=Ao(C,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),se=(Array.isArray(e)?e:[]).filter(H=>{if(!m.trim())return!0;const ie=o==="es"&&H.labelES?H.labelES.toLowerCase():H.label.toLowerCase(),de=H.code?H.code.toLowerCase():"";return ie.includes(m.toLowerCase())||de.includes(m.toLowerCase())}),oe=H=>{S(H),h(!1),g(""),n(H)},z=()=>{h(!d),!d&&b.current&&setTimeout(()=>{var H;(H=b.current)==null||H.focus()},100)};I.useEffect(()=>{S(t)},[t]);const Y=H=>{var ie;return H?H.codeISO2?H.codeISO2.toLowerCase():((ie=H.code)==null?void 0:ie.toLowerCase())||"":""},Z=(J=V.arrow)==null?void 0:J.x,_=(le=V.arrow)==null?void 0:le.y,k={top:"bottom",right:"left",bottom:"top",left:"right"}[L.split("-")[0]],X=ee({onClick:z});return x.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${c}`,children:[x.jsx("label",{className:`text-gray-600 font-600 group ${l&&"!text-red-500"} text-label`,children:r}),x.jsxs("div",{ref:D.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${l&&"border-red-500 hover:border-red-600"} ${ve?"border-blue-400":"border-blue-100"}`,...X,children:[y!=null&&y.code?x.jsxs("div",{className:"flex items-center w-full",children:[Y(y)&&x.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${Y(y)}.png`,srcSet:`https://flagcdn.com/w40/${Y(y)}.png 2x`,alt:y.label,onError:H=>{H.currentTarget.style.display="none"}}),x.jsxs("span",{className:"flex-grow",children:[o==="es"&&y.labelES?y.labelES:y.label,y.code?` (${y.code})`:u("select_country")]})]}):x.jsx("span",{className:"text-gray-500",children:i}),x.jsx("svg",{className:`w-16 h-16 transition-transform ${d?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),l&&x.jsx("p",{className:"mt-1 text-sm text-red-600",children:l}),ve&&x.jsxs("div",{ref:D.setFloating,style:{position:O,top:A??0,left:w??0,...ye},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...re(),children:[x.jsx("div",{ref:P,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:Z!=null?`${Z}px`:"",top:_!=null?`${_}px`:"",right:"",bottom:"",[k]:"-2px",borderRight:k==="left"?"1px solid":"none",borderBottom:k==="top"?"1px solid":"none",borderLeft:k==="right"?"1px solid":"none",borderTop:k==="bottom"?"1px solid":"none"}}),x.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:x.jsx("input",{ref:b,type:"text",className:"w-full p-16",placeholder:u("search")+"...",value:m,onChange:H=>g(H.target.value),onClick:H=>H.stopPropagation(),autoFocus:!0})}),x.jsx("div",{children:se.length>0?x.jsx("ul",{className:"flex flex-col",children:se.map((H,ie)=>{var ne;const de=H.codeISO2?H.codeISO2.toLowerCase():((ne=H.code)==null?void 0:ne.toLowerCase())||"";return x.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:me=>{me.stopPropagation(),oe(H)},children:[de&&x.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${de}.png`,srcSet:`https://flagcdn.com/w40/${de}.png 2x`,alt:H.label,onError:me=>{me.currentTarget.style.display="none"}}),x.jsxs("span",{children:[o==="es"&&H.labelES?H.labelES:H.label,H.code?` (${H.code})`:"Country not found"]})]},`${H.code}-${ie}`)})}):x.jsx("div",{className:"px-3 py-2 text-gray-500",children:"No countries found"})})]})]})},Jd=({variant:e="filled",color:t,size:n="base",shadow:r="none",icon:i,iconProps:o={},children:l,className:c,...u})=>{const{defaultColorScheme:d}=ze(),h=t||d;return x.jsx("button",{...u,className:`${oN(e,h,n,r)} ${c}`,children:i?x.jsx(De,{...o,className:Mo(n),icon:i}):l})};function GN(e){return e!==null&&typeof e=="object"&&"name"in e&&"size"in e&&"type"in e&&typeof e.name=="string"&&typeof e.size=="number"&&typeof e.type=="string"}const YN=({src:e,alt:t,isEditable:n=!1,onChange:r,className:i="",name:o,control:l,user:c})=>{const[u,d]=I.useState(e||null),[h,m]=I.useState(!!e),g=I.useRef(null),y=cr.useController({name:o,control:l}),S=!!l;I.useEffect(()=>{if(S){const A=y==null?void 0:y.field.value;if(GN(A)){const O=URL.createObjectURL(A);return d(O),m(!0),()=>URL.revokeObjectURL(O)}else typeof A=="string"&&A&&A!==e?(d(A),m(!0)):e?(d(e),m(!0)):(d(null),m(!1))}},[y==null?void 0:y.field.value,e]);const b=()=>{var A;n&&((A=g.current)==null||A.click())},P=A=>{var D;const O=(D=A.target.files)==null?void 0:D[0];if(O){const C=URL.createObjectURL(O);d(C),m(!0),S&&(y==null||y.field.onChange(O)),r&&r(O)}},w=A=>{A.stopPropagation(),d(null),m(!1),g.current&&(g.current.value=""),S&&(y==null||y.field.onChange(null)),r&&r(null)};return x.jsxs("div",{className:"relative flex items-center gap-10",children:[n&&h&&x.jsx("button",{type:"button",onClick:w,className:"bg-red-500 text-white rounded-full w-20 h-20 flex items-center justify-center hover:bg-red-600 focus:outline-none","aria-label":"Eliminar imagen",children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),x.jsxs("div",{className:`relative flex items-center justify-center h-40 w-40 ${n?"cursor-pointer hover:opacity-80":""} ${i}`,onClick:b,children:[u?x.jsx("img",{src:u,alt:t,className:"w-full h-full object-cover rounded-full"}):x.jsx(Yx,{size:60,user:c}),n&&x.jsxs(x.Fragment,{children:[x.jsx("input",{type:"file",ref:A=>{g.current=A,y&&y.field.ref(A)},onChange:P,onBlur:y==null?void 0:y.field.onBlur,accept:"image/*",className:"hidden"}),!h&&x.jsx("div",{className:"absolute bottom-0 right-0 bg-blue-100 rounded-full h-20 w-20 flex items-center justify-center",children:x.jsx(De,{icon:CR,className:"text-blue-500"})})]})]})]})},HN=Zd({name:_r(),base64:_r()}),qN=({index:e,label:t,active:n,completed:r})=>x.jsxs("div",{className:"flex items-center gap-8",children:[x.jsx("div",{className:`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lawgic-dev-kit",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "description": "Componentes de UI para Lawgic",
5
5
  "type": "module",
6
6
  "private": false,
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- import { FieldValues } from "react-hook-form";
3
- import { PhoneInputProps } from "./PhoneInput.types";
4
- declare const PhoneInput: <T extends FieldValues = FieldValues>({ name, control, label, placeholder, language, className, translateKey, countries, }: PhoneInputProps<T>) => React.ReactElement;
5
- export default PhoneInput;
@@ -1,12 +0,0 @@
1
- import { Control, FieldValues, Path } from "react-hook-form";
2
- import { Country } from "../../../constants/countries";
3
- export interface PhoneInputProps<T extends FieldValues = FieldValues> {
4
- countries?: Country[];
5
- name: Path<T>;
6
- control: Control<T>;
7
- label?: string;
8
- placeholder?: string;
9
- language?: string;
10
- className?: string;
11
- translateKey?: string;
12
- }
@@ -1,4 +0,0 @@
1
- import { FieldValues } from "react-hook-form";
2
- import type { SelectInputProps } from "./SelectInput.types";
3
- declare const SelectInput: <T extends FieldValues>({ options, name, control, label, placeholder, className, input, }: SelectInputProps<T>) => import("react/jsx-runtime").JSX.Element;
4
- export default SelectInput;
@@ -1,24 +0,0 @@
1
- import type { Control, FieldValues, Path } from "react-hook-form";
2
- export interface Option {
3
- key: string;
4
- label: string;
5
- }
6
- export interface SelectInputProps<T extends FieldValues> {
7
- options: Option[];
8
- name: Path<T>;
9
- control: Control<T>;
10
- label?: string;
11
- placeholder?: string;
12
- className?: string;
13
- input?: boolean;
14
- }
15
- export interface SelectInputFieldProps {
16
- options: Option[];
17
- value: Option | null;
18
- onChange: (option: Option | null) => void;
19
- label?: string;
20
- placeholder?: string;
21
- error?: string;
22
- className?: string;
23
- input?: boolean;
24
- }
@@ -1 +0,0 @@
1
- export { default as SelectInput } from "./SelectInput";
@@ -1,33 +0,0 @@
1
- export * from './ActionButton/index';
2
- export * from './ActionButton/index';
3
- export * from './AsyncToast/index';
4
- export * from './Avatar/index';
5
- export * from './BoxContainer/index';
6
- export * from './Button/index';
7
- export * from './CenterModal/index';
8
- export * from './Checkbox/index';
9
- export * from './CountryInput/index';
10
- export * from './CountryLabel/index';
11
- export * from './CountrySelectInput/index';
12
- export * from './Divider/index';
13
- export * from './IconButton/index';
14
- export * from './ImageProfileInput/index';
15
- export * from './IndexedStep/index';
16
- export * from './InfoCard/index';
17
- export * from './InformationDisclaimer/index';
18
- export * from './LoadingSpinner/index';
19
- export * from './PasswordInput/index';
20
- export * from './PhoneInput/index';
21
- export * from './ProgressBar/index';
22
- export * from './SearchBar/index';
23
- export * from './SectionButton/index';
24
- export * from './SelectInput/index';
25
- export * from './SidebarButton/index';
26
- export * from './Tab/index';
27
- export * from './TextButton/index';
28
- export * from './TextInput/index';
29
- export * from './TextStaticInput/index';
30
- export * from './Toast/index';
31
- export * from './UncontrolledSelector/index';
32
- export * from './UncontrolledTextInput/index';
33
- export * from './UploadContainer/index';