@dipusevilla/componentes-iu 1.0.21 → 1.0.22

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.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),Vr=require("react-dom");function Us(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const M=Us(v);function Bs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var tt={exports:{}},ze={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),ns=require("react-dom");function wn(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const W=wn(v);function kn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ft={exports:{}},et={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Qt;function Zs(){if(Qt)return ze;Qt=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(s,n,a){var i=null;if(a!==void 0&&(i=""+a),n.key!==void 0&&(i=""+n.key),"key"in n){a={};for(var l in n)l!=="key"&&(a[l]=n[l])}else a=n;return n=a.ref,{$$typeof:r,type:s,key:i,ref:n!==void 0?n:null,props:a}}return ze.Fragment=e,ze.jsx=t,ze.jsxs=t,ze}var We={};/**
9
+ */var gr;function jn(){if(gr)return et;gr=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function e(s,n,a){var o=null;if(a!==void 0&&(o=""+a),n.key!==void 0&&(o=""+n.key),"key"in n){a={};for(var l in n)l!=="key"&&(a[l]=n[l])}else a=n;return n=a.ref,{$$typeof:r,type:s,key:o,ref:n!==void 0?n:null,props:a}}return et.Fragment=t,et.jsx=e,et.jsxs=e,et}var tt={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,37 +14,37 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var er;function zs(){return er||(er=1,process.env.NODE_ENV!=="production"&&function(){function r(x){if(x==null)return null;if(typeof x=="function")return x.$$typeof===I?null:x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case j:return"Fragment";case y:return"Profiler";case S:return"StrictMode";case T:return"Suspense";case B:return"SuspenseList";case L:return"Activity"}if(typeof x=="object")switch(typeof x.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),x.$$typeof){case _:return"Portal";case E:return(x.displayName||"Context")+".Provider";case b:return(x._context.displayName||"Context")+".Consumer";case V:var F=x.render;return x=x.displayName,x||(x=F.displayName||F.name||"",x=x!==""?"ForwardRef("+x+")":"ForwardRef"),x;case W:return F=x.displayName||null,F!==null?F:r(x.type)||"Memo";case z:F=x._payload,x=x._init;try{return r(x(F))}catch{}}return null}function e(x){return""+x}function t(x){try{e(x);var F=!1}catch{F=!0}if(F){F=console;var P=F.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&x[Symbol.toStringTag]||x.constructor.name||"Object";return P.call(F,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),e(x)}}function s(x){if(x===j)return"<>";if(typeof x=="object"&&x!==null&&x.$$typeof===z)return"<...>";try{var F=r(x);return F?"<"+F+">":"<...>"}catch{return"<...>"}}function n(){var x=A.A;return x===null?null:x.getOwner()}function a(){return Error("react-stack-top-frame")}function i(x){if(D.call(x,"key")){var F=Object.getOwnPropertyDescriptor(x,"key").get;if(F&&F.isReactWarning)return!1}return x.key!==void 0}function l(x,F){function P(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",F))}P.isReactWarning=!0,Object.defineProperty(x,"key",{get:P,configurable:!0})}function c(){var x=r(this.type);return H[x]||(H[x]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),x=this.props.ref,x!==void 0?x:null}function d(x,F,P,G,ne,ae,Y,ie){return P=ae.ref,x={$$typeof:g,type:x,key:F,props:ae,_owner:ne},(P!==void 0?P:null)!==null?Object.defineProperty(x,"ref",{enumerable:!1,get:c}):Object.defineProperty(x,"ref",{enumerable:!1,value:null}),x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(x,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(x,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(x,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ie}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x}function f(x,F,P,G,ne,ae,Y,ie){var Q=F.children;if(Q!==void 0)if(G)if(Z(Q)){for(G=0;G<Q.length;G++)h(Q[G]);Object.freeze&&Object.freeze(Q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(Q);if(D.call(F,"key")){Q=r(x);var K=Object.keys(F).filter(function(Ie){return Ie!=="key"});G=0<K.length?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}",re[Q+G]||(K=0<K.length?"{"+K.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var br;function En(){return br||(br=1,process.env.NODE_ENV!=="production"&&function(){function r(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===P?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case k:return"Fragment";case y:return"Profiler";case S:return"StrictMode";case F:return"Suspense";case Z:return"SuspenseList";case D:return"Activity"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case N:return"Portal";case E:return(p.displayName||"Context")+".Provider";case b:return(p._context.displayName||"Context")+".Consumer";case R:var T=p.render;return p=p.displayName,p||(p=T.displayName||T.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case X:return T=p.displayName||null,T!==null?T:r(p.type)||"Memo";case _:T=p._payload,p=p._init;try{return r(p(T))}catch{}}return null}function t(p){return""+p}function e(p){try{t(p);var T=!1}catch{T=!0}if(T){T=console;var z=T.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return z.call(T,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(p)}}function s(p){if(p===k)return"<>";if(typeof p=="object"&&p!==null&&p.$$typeof===_)return"<...>";try{var T=r(p);return T?"<"+T+">":"<...>"}catch{return"<...>"}}function n(){var p=V.A;return p===null?null:p.getOwner()}function a(){return Error("react-stack-top-frame")}function o(p){if($.call(p,"key")){var T=Object.getOwnPropertyDescriptor(p,"key").get;if(T&&T.isReactWarning)return!1}return p.key!==void 0}function l(p,T){function z(){K||(K=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",T))}z.isReactWarning=!0,Object.defineProperty(p,"key",{get:z,configurable:!0})}function c(){var p=r(this.type);return Y[p]||(Y[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function u(p,T,z,H,re,le,ee,Q){return z=le.ref,p={$$typeof:g,type:p,key:T,props:le,_owner:re},(z!==void 0?z:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:c}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(p,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(p,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function f(p,T,z,H,re,le,ee,Q){var ne=T.children;if(ne!==void 0)if(H)if(G(ne)){for(H=0;H<ne.length;H++)h(ne[H]);Object.freeze&&Object.freeze(ne)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(ne);if($.call(T,"key")){ne=r(p);var se=Object.keys(T).filter(function(Se){return Se!=="key"});H=0<se.length?"{key: someKey, "+se.join(": ..., ")+": ...}":"{key: someKey}",ae[ne+H]||(se=0<se.length?"{"+se.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,G,Q,K,Q),re[Q+G]=!0)}if(Q=null,P!==void 0&&(t(P),Q=""+P),i(F)&&(t(F.key),Q=""+F.key),"key"in F){P={};for(var pe in F)pe!=="key"&&(P[pe]=F[pe])}else P=F;return Q&&l(P,typeof x=="function"?x.displayName||x.name||"Unknown":x),d(x,Q,ae,ne,n(),P,Y,ie)}function h(x){typeof x=="object"&&x!==null&&x.$$typeof===g&&x._store&&(x._store.validated=1)}var m=v,g=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),E=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),A=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,Z=Array.isArray,q=console.createTask?console.createTask:function(){return null};m={"react-stack-bottom-frame":function(x){return x()}};var X,H={},k=m["react-stack-bottom-frame"].bind(m,a)(),J=q(s(a)),re={};We.Fragment=j,We.jsx=function(x,F,P,G,ne){var ae=1e4>A.recentlyCreatedOwnerStacks++;return f(x,F,P,!1,G,ne,ae?Error("react-stack-top-frame"):k,ae?q(s(x)):J)},We.jsxs=function(x,F,P,G,ne){var ae=1e4>A.recentlyCreatedOwnerStacks++;return f(x,F,P,!0,G,ne,ae?Error("react-stack-top-frame"):k,ae?q(s(x)):J)}}()),We}var tr;function Ws(){return tr||(tr=1,process.env.NODE_ENV==="production"?tt.exports=Zs():tt.exports=zs()),tt.exports}var o=Ws();function Mr(r){var e,t,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=Mr(r[e]))&&(s&&(s+=" "),s+=t)}else for(t in r)r[t]&&(s&&(s+=" "),s+=t);return s}function R(){for(var r,e,t=0,s="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=Mr(r))&&(s&&(s+=" "),s+=e);return s}const qs={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-10 h-10",full:"w-full h-full"};function Ee({component:r,size:e="sm",className:t,...s}){return o.jsx(r,{className:R(qs[e],t),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Hs="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Ys={primary:"bg-[var(--color-ds-button-primary-bg)] text-[var(--color-ds-button-primary-text)] hover:animate-pulse",outline:"bg-transparent text-[var(--color-ds-text-primary)] ring-1 ring-inset ring-[var(--color-ds-border-default)] hover:bg-[var(--color-ds-background-accent)] hover:text-[var(--color-ds-text-on-accent)]",ghost:"bg-transparent text-[var(--color-ds-text-primary)] hover:animate-pulse"},Gs={sm:"text-ds-sm h-6 px-2",md:"text-ds-md h-10 px-2.5",lg:"text-ds-lg h-12 px-3"},Xs={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},Js="disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[var(--color-ds-background-disabled)] disabled:text-[var(--color-ds-text-on-accent)] disabled:ring-1 disabled:ring-inset disabled:ring-[var(--color-ds-border-muted)]";function Te({type:r="button",variant:e="primary",size:t="sm",width:s,disabled:n=!1,icon:a,iconPosition:i="left",ariaLabel:l,children:c,onClick:d,className:f}){const h=!!a,m=h&&!c,g=m?Xs[t]:Gs[t];return o.jsxs("button",{type:r,onClick:d,disabled:n,"aria-label":m?l:void 0,style:s?{width:s}:void 0,className:R(Hs,Ys[e],g,Js,f,h&&c&&"gap-2"),children:[a&&i==="left"&&o.jsx(Ee,{component:a,size:t}),c,a&&i==="right"&&o.jsx(Ee,{component:a,size:t})]})}function Ks({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Qs=M.forwardRef(Ks);function en({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Lr=M.forwardRef(en);function tn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const rn=M.forwardRef(tn);function sn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const nn=M.forwardRef(sn);function an({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"}))}const on=M.forwardRef(an);function ln({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const rr=M.forwardRef(ln);function cn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const un=M.forwardRef(cn);function dn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Ir=M.forwardRef(dn);function fn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"}))}const hn=M.forwardRef(fn);function mn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const xn=M.forwardRef(mn);function pn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const gn=M.forwardRef(pn);function bn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const vn=M.forwardRef(bn);function yn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const wn=M.forwardRef(yn);function jn({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const kn=M.forwardRef(jn);function En({title:r,titleId:e,...t},s){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?M.createElement("title",{id:e},r):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const Rt=M.forwardRef(En);function Nt({title:r,children:e,defaultOpen:t=!0,className:s}){const[n,a]=v.useState(t),i=v.useRef(null),l=v.useRef(null),[c,d]=v.useState(0),f=()=>{if(l.current){const h=l.current.scrollHeight;d(h)}};return v.useLayoutEffect(()=>{f()},[n]),v.useEffect(()=>{const h=l.current;if(!h)return;const m=new ResizeObserver(()=>{f()});return m.observe(h),()=>{m.disconnect()}},[]),o.jsxs("div",{className:R("flex flex-col w-full gap-3",s),children:[o.jsxs("button",{type:"button",onClick:()=>a(h=>!h),className:"flex items-center justify-between w-full hover:bg-[var(--color-ds-surface-hover)] transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),o.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),n?o.jsx(nn,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):o.jsx(Lr,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),o.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:o.jsx("div",{className:"px-6",children:o.jsx("div",{ref:i,className:R("overflow-hidden transition-all duration-300 ease-in-out",n?"opacity-100":"opacity-0"),style:{maxHeight:n?`${c}px`:"0px"},children:o.jsx("div",{ref:l,className:"py-4",children:e})})})})]})}var Je=r=>r.type==="checkbox",De=r=>r instanceof Date,he=r=>r==null;const Pr=r=>typeof r=="object";var le=r=>!he(r)&&!Array.isArray(r)&&Pr(r)&&!De(r),Ur=r=>le(r)&&r.target?Je(r.target)?r.target.checked:r.target.value:r,_n=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,Br=(r,e)=>r.has(_n(e)),Nn=r=>{const e=r.constructor&&r.constructor.prototype;return le(e)&&e.hasOwnProperty("isPrototypeOf")},Vt=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function de(r){let e;const t=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)e=new Date(r);else if(r instanceof Set)e=new Set(r);else if(!(Vt&&(r instanceof Blob||s))&&(t||le(r)))if(e=t?[]:{},!t&&!Nn(r))e=r;else for(const n in r)r.hasOwnProperty(n)&&(e[n]=de(r[n]));else return r;return e}var gt=r=>Array.isArray(r)?r.filter(Boolean):[],oe=r=>r===void 0,C=(r,e,t)=>{if(!e||!le(r))return t;const s=gt(e.split(/[,[\].]+?/)).reduce((n,a)=>he(n)?n:n[a],r);return oe(s)||s===r?oe(r[e])?t:r[e]:s},ge=r=>typeof r=="boolean",Mt=r=>/^\w*$/.test(r),Zr=r=>gt(r.replace(/["|']|\]/g,"").split(/\.|\[/)),ee=(r,e,t)=>{let s=-1;const n=Mt(e)?[e]:Zr(e),a=n.length,i=a-1;for(;++s<a;){const l=n[s];let c=t;if(s!==i){const d=r[l];c=le(d)||Array.isArray(d)?d:isNaN(+n[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const dt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ye={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ne={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zr=v.createContext(null),Ke=()=>v.useContext(zr),Fn=r=>{const{children:e,...t}=r;return v.createElement(zr.Provider,{value:t},e)};var Wr=(r,e,t,s=!0)=>{const n={defaultValues:e._defaultValues};for(const a in r)Object.defineProperty(n,a,{get:()=>{const i=a;return e._proxyFormState[i]!==ye.all&&(e._proxyFormState[i]=!s||ye.all),t&&(t[i]=!0),r[i]}});return n};const Lt=typeof window<"u"?M.useLayoutEffect:M.useEffect;function Sn(r){const e=Ke(),{control:t=e.control,disabled:s,name:n,exact:a}=r||{},[i,l]=v.useState(t._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Lt(()=>t._subscribe({name:n,formState:c.current,exact:a,callback:d=>{!s&&l({...t._formState,...d})}}),[n,s,a]),v.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),v.useMemo(()=>Wr(i,t,c.current,!1),[i,t])}var _e=r=>typeof r=="string",qr=(r,e,t,s,n)=>_e(r)?(s&&e.watch.add(r),C(t,r,n)):Array.isArray(r)?r.map(a=>(s&&e.watch.add(a),C(t,a))):(s&&(e.watchAll=!0),t);function It(r){const e=Ke(),{control:t=e.control,name:s,defaultValue:n,disabled:a,exact:i}=r||{},l=v.useRef(n),[c,d]=v.useState(t._getWatch(s,l.current));return Lt(()=>t._subscribe({name:s,formState:{values:!0},exact:i,callback:f=>!a&&d(qr(s,t._names,f.values||t._formValues,!1,l.current))}),[s,t,a,i]),v.useEffect(()=>t._removeUnmounted()),c}function Hr(r){const e=Ke(),{name:t,disabled:s,control:n=e.control,shouldUnregister:a}=r,i=Br(n._names.array,t),l=It({control:n,name:t,defaultValue:C(n._formValues,t,C(n._defaultValues,t,r.defaultValue)),exact:!0}),c=Sn({control:n,name:t,exact:!0}),d=v.useRef(r),f=v.useRef(n.register(t,{...r.rules,value:l,...ge(r.disabled)?{disabled:r.disabled}:{}})),h=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!C(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!C(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!C(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!C(c.validatingFields,t)},error:{enumerable:!0,get:()=>C(c.errors,t)}}),[c,t]),m=v.useCallback(S=>f.current.onChange({target:{value:Ur(S),name:t},type:dt.CHANGE}),[t]),g=v.useCallback(()=>f.current.onBlur({target:{value:C(n._formValues,t),name:t},type:dt.BLUR}),[t,n._formValues]),_=v.useCallback(S=>{const y=C(n._fields,t);y&&S&&(y._f.ref={focus:()=>S.focus(),select:()=>S.select(),setCustomValidity:b=>S.setCustomValidity(b),reportValidity:()=>S.reportValidity()})},[n._fields,t]),j=v.useMemo(()=>({name:t,value:l,...ge(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:m,onBlur:g,ref:_}),[t,s,c.disabled,m,g,_,l]);return v.useEffect(()=>{const S=n._options.shouldUnregister||a;n.register(t,{...d.current.rules,...ge(d.current.disabled)?{disabled:d.current.disabled}:{}});const y=(b,E)=>{const V=C(n._fields,b);V&&V._f&&(V._f.mount=E)};if(y(t,!0),S){const b=de(C(n._options.defaultValues,t));ee(n._defaultValues,t,b),oe(C(n._formValues,t))&&ee(n._formValues,t,b)}return!i&&n.register(t),()=>{(i?S&&!n._state.action:S)?n.unregister(t):y(t,!1)}},[t,n,i,a]),v.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),v.useMemo(()=>({field:j,formState:c,fieldState:h}),[j,c,h])}const je=r=>r.render(Hr(r));var Yr=(r,e,t,s,n)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[s]:n||!0}}:{},Ye=r=>Array.isArray(r)?r:[r],sr=()=>{let r=[];return{get observers(){return r},next:n=>{for(const a of r)a.next&&a.next(n)},subscribe:n=>(r.push(n),{unsubscribe:()=>{r=r.filter(a=>a!==n)}}),unsubscribe:()=>{r=[]}}},Ft=r=>he(r)||!Pr(r);function Ae(r,e){if(Ft(r)||Ft(e))return r===e;if(De(r)&&De(e))return r.getTime()===e.getTime();const t=Object.keys(r),s=Object.keys(e);if(t.length!==s.length)return!1;for(const n of t){const a=r[n];if(!s.includes(n))return!1;if(n!=="ref"){const i=e[n];if(De(a)&&De(i)||le(a)&&le(i)||Array.isArray(a)&&Array.isArray(i)?!Ae(a,i):a!==i)return!1}}return!0}var fe=r=>le(r)&&!Object.keys(r).length,Pt=r=>r.type==="file",we=r=>typeof r=="function",ft=r=>{if(!Vt)return!1;const e=r?r.ownerDocument:0;return r instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Gr=r=>r.type==="select-multiple",Ut=r=>r.type==="radio",Tn=r=>Ut(r)||Je(r),wt=r=>ft(r)&&r.isConnected;function On(r,e){const t=e.slice(0,-1).length;let s=0;for(;s<t;)r=oe(r)?s++:r[e[s++]];return r}function Cn(r){for(const e in r)if(r.hasOwnProperty(e)&&!oe(r[e]))return!1;return!0}function ce(r,e){const t=Array.isArray(e)?e:Mt(e)?[e]:Zr(e),s=t.length===1?r:On(r,t),n=t.length-1,a=t[n];return s&&delete s[a],n!==0&&(le(s)&&fe(s)||Array.isArray(s)&&Cn(s))&&ce(r,t.slice(0,-1)),r}var Xr=r=>{for(const e in r)if(we(r[e]))return!0;return!1};function ht(r,e={}){const t=Array.isArray(r);if(le(r)||t)for(const s in r)Array.isArray(r[s])||le(r[s])&&!Xr(r[s])?(e[s]=Array.isArray(r[s])?[]:{},ht(r[s],e[s])):he(r[s])||(e[s]=!0);return e}function Jr(r,e,t){const s=Array.isArray(r);if(le(r)||s)for(const n in r)Array.isArray(r[n])||le(r[n])&&!Xr(r[n])?oe(e)||Ft(t[n])?t[n]=Array.isArray(r[n])?ht(r[n],[]):{...ht(r[n])}:Jr(r[n],he(e)?{}:e[n],t[n]):t[n]=!Ae(r[n],e[n]);return t}var qe=(r,e)=>Jr(r,e,ht(e));const nr={value:!1,isValid:!1},ar={value:!0,isValid:!0};var Kr=r=>{if(Array.isArray(r)){if(r.length>1){const e=r.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:e,isValid:!!e.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!oe(r[0].attributes.value)?oe(r[0].value)||r[0].value===""?ar:{value:r[0].value,isValid:!0}:ar:nr}return nr},Qr=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:s})=>oe(r)?r:e?r===""?NaN:r&&+r:t&&_e(r)?new Date(r):s?s(r):r;const ir={isValid:!1,value:null};var es=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,ir):ir;function or(r){const e=r.ref;return Pt(e)?e.files:Ut(e)?es(r.refs).value:Gr(e)?[...e.selectedOptions].map(({value:t})=>t):Je(e)?Kr(r.refs).value:Qr(oe(e.value)?r.ref.value:e.value,r)}var An=(r,e,t,s)=>{const n={};for(const a of r){const i=C(e,a);i&&ee(n,a,i._f)}return{criteriaMode:t,names:[...r],fields:n,shouldUseNativeValidation:s}},mt=r=>r instanceof RegExp,He=r=>oe(r)?r:mt(r)?r.source:le(r)?mt(r.value)?r.value.source:r.value:r,lr=r=>({isOnSubmit:!r||r===ye.onSubmit,isOnBlur:r===ye.onBlur,isOnChange:r===ye.onChange,isOnAll:r===ye.all,isOnTouch:r===ye.onTouched});const cr="AsyncFunction";var $n=r=>!!r&&!!r.validate&&!!(we(r.validate)&&r.validate.constructor.name===cr||le(r.validate)&&Object.values(r.validate).find(e=>e.constructor.name===cr)),Dn=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),ur=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const Ge=(r,e,t,s)=>{for(const n of t||Object.keys(r)){const a=C(r,n);if(a){const{_f:i,...l}=a;if(i){if(i.refs&&i.refs[0]&&e(i.refs[0],n)&&!s)return!0;if(i.ref&&e(i.ref,i.name)&&!s)return!0;if(Ge(l,e))break}else if(le(l)&&Ge(l,e))break}}};function dr(r,e,t){const s=C(r,t);if(s||Mt(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),i=C(e,a),l=C(r,a);if(i&&!Array.isArray(i)&&t!==a)return{name:t};if(l&&l.type)return{name:a,error:l};n.pop()}return{name:t}}var Rn=(r,e,t,s)=>{t(r);const{name:n,...a}=r;return fe(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(i=>e[i]===(!s||ye.all))},Vn=(r,e,t)=>!r||!e||r===e||Ye(r).some(s=>s&&(t?s===e:s.startsWith(e)||e.startsWith(s))),Mn=(r,e,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(e||r):(t?s.isOnBlur:n.isOnBlur)?!r:(t?s.isOnChange:n.isOnChange)?r:!0,Ln=(r,e)=>!gt(C(r,e)).length&&ce(r,e),In=(r,e,t)=>{const s=Ye(C(r,t));return ee(s,"root",e[t]),ee(r,t,s),r},ot=r=>_e(r);function fr(r,e,t="validate"){if(ot(r)||Array.isArray(r)&&r.every(ot)||ge(r)&&!r)return{type:t,message:ot(r)?r:"",ref:e}}var Pe=r=>le(r)&&!mt(r)?r:{value:r,message:""},hr=async(r,e,t,s,n,a)=>{const{ref:i,refs:l,required:c,maxLength:d,minLength:f,min:h,max:m,pattern:g,validate:_,name:j,valueAsNumber:S,mount:y}=r._f,b=C(t,j);if(!y||e.has(j))return{};const E=l?l[0]:i,V=D=>{n&&E.reportValidity&&(E.setCustomValidity(ge(D)?"":D||""),E.reportValidity())},T={},B=Ut(i),W=Je(i),z=B||W,L=(S||Pt(i))&&oe(i.value)&&oe(b)||ft(i)&&i.value===""||b===""||Array.isArray(b)&&!b.length,I=Yr.bind(null,j,s,T),A=(D,Z,q,X=Ne.maxLength,H=Ne.minLength)=>{const k=D?Z:q;T[j]={type:D?X:H,message:k,ref:i,...I(D?X:H,k)}};if(a?!Array.isArray(b)||!b.length:c&&(!z&&(L||he(b))||ge(b)&&!b||W&&!Kr(l).isValid||B&&!es(l).isValid)){const{value:D,message:Z}=ot(c)?{value:!!c,message:c}:Pe(c);if(D&&(T[j]={type:Ne.required,message:Z,ref:E,...I(Ne.required,Z)},!s))return V(Z),T}if(!L&&(!he(h)||!he(m))){let D,Z;const q=Pe(m),X=Pe(h);if(!he(b)&&!isNaN(b)){const H=i.valueAsNumber||b&&+b;he(q.value)||(D=H>q.value),he(X.value)||(Z=H<X.value)}else{const H=i.valueAsDate||new Date(b),k=x=>new Date(new Date().toDateString()+" "+x),J=i.type=="time",re=i.type=="week";_e(q.value)&&b&&(D=J?k(b)>k(q.value):re?b>q.value:H>new Date(q.value)),_e(X.value)&&b&&(Z=J?k(b)<k(X.value):re?b<X.value:H<new Date(X.value))}if((D||Z)&&(A(!!D,q.message,X.message,Ne.max,Ne.min),!s))return V(T[j].message),T}if((d||f)&&!L&&(_e(b)||a&&Array.isArray(b))){const D=Pe(d),Z=Pe(f),q=!he(D.value)&&b.length>+D.value,X=!he(Z.value)&&b.length<+Z.value;if((q||X)&&(A(q,D.message,Z.message),!s))return V(T[j].message),T}if(g&&!L&&_e(b)){const{value:D,message:Z}=Pe(g);if(mt(D)&&!b.match(D)&&(T[j]={type:Ne.pattern,message:Z,ref:i,...I(Ne.pattern,Z)},!s))return V(Z),T}if(_){if(we(_)){const D=await _(b,t),Z=fr(D,E);if(Z&&(T[j]={...Z,...I(Ne.validate,Z.message)},!s))return V(Z.message),T}else if(le(_)){let D={};for(const Z in _){if(!fe(D)&&!s)break;const q=fr(await _[Z](b,t),E,Z);q&&(D={...q,...I(Z,q.message)},V(q.message),s&&(T[j]=D))}if(!fe(D)&&(T[j]={ref:E,...D},!s))return T}}return V(!0),T};const Pn={mode:ye.onSubmit,reValidateMode:ye.onChange,shouldFocusError:!0};function Un(r={}){let e={...Pn,...r},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:we(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1};const s={};let n=le(e.defaultValues)||le(e.values)?de(e.defaultValues||e.values)||{}:{},a=e.shouldUnregister?{}:de(n),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...f};const m={array:sr(),state:sr()},g=e.criteriaMode===ye.all,_=u=>p=>{clearTimeout(d),d=setTimeout(u,p)},j=async u=>{if(!e.disabled&&(f.isValid||h.isValid||u)){const p=e.resolver?fe((await W()).errors):await L(s,!0);p!==t.isValid&&m.state.next({isValid:p})}},S=(u,p)=>{!e.disabled&&(f.isValidating||f.validatingFields||h.isValidating||h.validatingFields)&&((u||Array.from(l.mount)).forEach(w=>{w&&(p?ee(t.validatingFields,w,p):ce(t.validatingFields,w))}),m.state.next({validatingFields:t.validatingFields,isValidating:!fe(t.validatingFields)}))},y=(u,p=[],w,$,O=!0,N=!0)=>{if($&&w&&!e.disabled){if(i.action=!0,N&&Array.isArray(C(s,u))){const U=w(C(s,u),$.argA,$.argB);O&&ee(s,u,U)}if(N&&Array.isArray(C(t.errors,u))){const U=w(C(t.errors,u),$.argA,$.argB);O&&ee(t.errors,u,U),Ln(t.errors,u)}if((f.touchedFields||h.touchedFields)&&N&&Array.isArray(C(t.touchedFields,u))){const U=w(C(t.touchedFields,u),$.argA,$.argB);O&&ee(t.touchedFields,u,U)}(f.dirtyFields||h.dirtyFields)&&(t.dirtyFields=qe(n,a)),m.state.next({name:u,isDirty:A(u,p),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else ee(a,u,p)},b=(u,p)=>{ee(t.errors,u,p),m.state.next({errors:t.errors})},E=u=>{t.errors=u,m.state.next({errors:t.errors,isValid:!1})},V=(u,p,w,$)=>{const O=C(s,u);if(O){const N=C(a,u,oe(w)?C(n,u):w);oe(N)||$&&$.defaultChecked||p?ee(a,u,p?N:or(O._f)):q(u,N),i.mount&&j()}},T=(u,p,w,$,O)=>{let N=!1,U=!1;const te={name:u};if(!e.disabled){if(!w||$){(f.isDirty||h.isDirty)&&(U=t.isDirty,t.isDirty=te.isDirty=A(),N=U!==te.isDirty);const se=Ae(C(n,u),p);U=!!C(t.dirtyFields,u),se?ce(t.dirtyFields,u):ee(t.dirtyFields,u,!0),te.dirtyFields=t.dirtyFields,N=N||(f.dirtyFields||h.dirtyFields)&&U!==!se}if(w){const se=C(t.touchedFields,u);se||(ee(t.touchedFields,u,w),te.touchedFields=t.touchedFields,N=N||(f.touchedFields||h.touchedFields)&&se!==w)}N&&O&&m.state.next(te)}return N?te:{}},B=(u,p,w,$)=>{const O=C(t.errors,u),N=(f.isValid||h.isValid)&&ge(p)&&t.isValid!==p;if(e.delayError&&w?(c=_(()=>b(u,w)),c(e.delayError)):(clearTimeout(d),c=null,w?ee(t.errors,u,w):ce(t.errors,u)),(w?!Ae(O,w):O)||!fe($)||N){const U={...$,...N&&ge(p)?{isValid:p}:{},errors:t.errors,name:u};t={...t,...U},m.state.next(U)}},W=async u=>{S(u,!0);const p=await e.resolver(a,e.context,An(u||l.mount,s,e.criteriaMode,e.shouldUseNativeValidation));return S(u),p},z=async u=>{const{errors:p}=await W(u);if(u)for(const w of u){const $=C(p,w);$?ee(t.errors,w,$):ce(t.errors,w)}else t.errors=p;return p},L=async(u,p,w={valid:!0})=>{for(const $ in u){const O=u[$];if(O){const{_f:N,...U}=O;if(N){const te=l.array.has(N.name),se=O._f&&$n(O._f);se&&f.validatingFields&&S([$],!0);const be=await hr(O,l.disabled,a,g,e.shouldUseNativeValidation&&!p,te);if(se&&f.validatingFields&&S([$]),be[N.name]&&(w.valid=!1,p))break;!p&&(C(be,N.name)?te?In(t.errors,be,N.name):ee(t.errors,N.name,be[N.name]):ce(t.errors,N.name))}!fe(U)&&await L(U,p,w)}}return w.valid},I=()=>{for(const u of l.unMount){const p=C(s,u);p&&(p._f.refs?p._f.refs.every(w=>!wt(w)):!wt(p._f.ref))&&ie(u)}l.unMount=new Set},A=(u,p)=>!e.disabled&&(u&&p&&ee(a,u,p),!Ae(x(),n)),D=(u,p,w)=>qr(u,l,{...i.mount?a:oe(p)?n:_e(u)?{[u]:p}:p},w,p),Z=u=>gt(C(i.mount?a:n,u,e.shouldUnregister?C(n,u,[]):[])),q=(u,p,w={})=>{const $=C(s,u);let O=p;if($){const N=$._f;N&&(!N.disabled&&ee(a,u,Qr(p,N)),O=ft(N.ref)&&he(p)?"":p,Gr(N.ref)?[...N.ref.options].forEach(U=>U.selected=O.includes(U.value)):N.refs?Je(N.ref)?N.refs.forEach(U=>{(!U.defaultChecked||!U.disabled)&&(Array.isArray(O)?U.checked=!!O.find(te=>te===U.value):U.checked=O===U.value||!!O)}):N.refs.forEach(U=>U.checked=U.value===O):Pt(N.ref)?N.ref.value="":(N.ref.value=O,N.ref.type||m.state.next({name:u,values:de(a)})))}(w.shouldDirty||w.shouldTouch)&&T(u,O,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&re(u)},X=(u,p,w)=>{for(const $ in p){if(!p.hasOwnProperty($))return;const O=p[$],N=`${u}.${$}`,U=C(s,N);(l.array.has(u)||le(O)||U&&!U._f)&&!De(O)?X(N,O,w):q(N,O,w)}},H=(u,p,w={})=>{const $=C(s,u),O=l.array.has(u),N=de(p);ee(a,u,N),O?(m.array.next({name:u,values:de(a)}),(f.isDirty||f.dirtyFields||h.isDirty||h.dirtyFields)&&w.shouldDirty&&m.state.next({name:u,dirtyFields:qe(n,a),isDirty:A(u,N)})):$&&!$._f&&!he(N)?X(u,N,w):q(u,N,w),ur(u,l)&&m.state.next({...t}),m.state.next({name:i.mount?u:void 0,values:de(a)})},k=async u=>{i.mount=!0;const p=u.target;let w=p.name,$=!0;const O=C(s,w),N=se=>{$=Number.isNaN(se)||De(se)&&isNaN(se.getTime())||Ae(se,C(a,w,se))},U=lr(e.mode),te=lr(e.reValidateMode);if(O){let se,be;const et=p.type?or(O._f):Ur(u),Oe=u.type===dt.BLUR||u.type===dt.FOCUS_OUT,Ls=!Dn(O._f)&&!e.resolver&&!C(t.errors,w)&&!O._f.deps||Mn(Oe,C(t.touchedFields,w),t.isSubmitted,te,U),vt=ur(w,l,Oe);ee(a,w,et),Oe?(O._f.onBlur&&O._f.onBlur(u),c&&c(0)):O._f.onChange&&O._f.onChange(u);const yt=T(w,et,Oe),Is=!fe(yt)||vt;if(!Oe&&m.state.next({name:w,type:u.type,values:de(a)}),Ls)return(f.isValid||h.isValid)&&(e.mode==="onBlur"?Oe&&j():Oe||j()),Is&&m.state.next({name:w,...vt?{}:yt});if(!Oe&&vt&&m.state.next({...t}),e.resolver){const{errors:Jt}=await W([w]);if(N(et),$){const Ps=dr(t.errors,s,w),Kt=dr(Jt,s,Ps.name||w);se=Kt.error,w=Kt.name,be=fe(Jt)}}else S([w],!0),se=(await hr(O,l.disabled,a,g,e.shouldUseNativeValidation))[w],S([w]),N(et),$&&(se?be=!1:(f.isValid||h.isValid)&&(be=await L(s,!0)));$&&(O._f.deps&&re(O._f.deps),B(w,be,se,yt))}},J=(u,p)=>{if(C(t.errors,p)&&u.focus)return u.focus(),1},re=async(u,p={})=>{let w,$;const O=Ye(u);if(e.resolver){const N=await z(oe(u)?u:O);w=fe(N),$=u?!O.some(U=>C(N,U)):w}else u?($=(await Promise.all(O.map(async N=>{const U=C(s,N);return await L(U&&U._f?{[N]:U}:U)}))).every(Boolean),!(!$&&!t.isValid)&&j()):$=w=await L(s);return m.state.next({...!_e(u)||(f.isValid||h.isValid)&&w!==t.isValid?{}:{name:u},...e.resolver||!u?{isValid:w}:{},errors:t.errors}),p.shouldFocus&&!$&&Ge(s,J,u?O:l.mount),$},x=u=>{const p={...i.mount?a:n};return oe(u)?p:_e(u)?C(p,u):u.map(w=>C(p,w))},F=(u,p)=>({invalid:!!C((p||t).errors,u),isDirty:!!C((p||t).dirtyFields,u),error:C((p||t).errors,u),isValidating:!!C(t.validatingFields,u),isTouched:!!C((p||t).touchedFields,u)}),P=u=>{u&&Ye(u).forEach(p=>ce(t.errors,p)),m.state.next({errors:u?t.errors:{}})},G=(u,p,w)=>{const $=(C(s,u,{_f:{}})._f||{}).ref,O=C(t.errors,u)||{},{ref:N,message:U,type:te,...se}=O;ee(t.errors,u,{...se,...p,ref:$}),m.state.next({name:u,errors:t.errors,isValid:!1}),w&&w.shouldFocus&&$&&$.focus&&$.focus()},ne=(u,p)=>we(u)?m.state.subscribe({next:w=>u(D(void 0,p),w)}):D(u,p,!0),ae=u=>m.state.subscribe({next:p=>{Vn(u.name,p.name,u.exact)&&Rn(p,u.formState||f,Ms,u.reRenderRoot)&&u.callback({values:{...a},...t,...p})}}).unsubscribe,Y=u=>(i.mount=!0,h={...h,...u.formState},ae({...u,formState:h})),ie=(u,p={})=>{for(const w of u?Ye(u):l.mount)l.mount.delete(w),l.array.delete(w),p.keepValue||(ce(s,w),ce(a,w)),!p.keepError&&ce(t.errors,w),!p.keepDirty&&ce(t.dirtyFields,w),!p.keepTouched&&ce(t.touchedFields,w),!p.keepIsValidating&&ce(t.validatingFields,w),!e.shouldUnregister&&!p.keepDefaultValue&&ce(n,w);m.state.next({values:de(a)}),m.state.next({...t,...p.keepDirty?{isDirty:A()}:{}}),!p.keepIsValid&&j()},Q=({disabled:u,name:p})=>{(ge(u)&&i.mount||u||l.disabled.has(p))&&(u?l.disabled.add(p):l.disabled.delete(p))},K=(u,p={})=>{let w=C(s,u);const $=ge(p.disabled)||ge(e.disabled);return ee(s,u,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:u}},name:u,mount:!0,...p}}),l.mount.add(u),w?Q({disabled:ge(p.disabled)?p.disabled:e.disabled,name:u}):V(u,!0,p.value),{...$?{disabled:p.disabled||e.disabled}:{},...e.progressive?{required:!!p.required,min:He(p.min),max:He(p.max),minLength:He(p.minLength),maxLength:He(p.maxLength),pattern:He(p.pattern)}:{},name:u,onChange:k,onBlur:k,ref:O=>{if(O){K(u,p),w=C(s,u);const N=oe(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,U=Tn(N),te=w._f.refs||[];if(U?te.find(se=>se===N):N===w._f.ref)return;ee(s,u,{_f:{...w._f,...U?{refs:[...te.filter(wt),N,...Array.isArray(C(n,u))?[{}]:[]],ref:{type:N.type,name:u}}:{ref:N}}}),V(u,!1,void 0,N)}else w=C(s,u,{}),w._f&&(w._f.mount=!1),(e.shouldUnregister||p.shouldUnregister)&&!(Br(l.array,u)&&i.action)&&l.unMount.add(u)}}},pe=()=>e.shouldFocusError&&Ge(s,J,l.mount),Ie=u=>{ge(u)&&(m.state.next({disabled:u}),Ge(s,(p,w)=>{const $=C(s,w);$&&(p.disabled=$._f.disabled||u,Array.isArray($._f.refs)&&$._f.refs.forEach(O=>{O.disabled=$._f.disabled||u}))},0,!1))},Ze=(u,p)=>async w=>{let $;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let O=de(a);if(m.state.next({isSubmitting:!0}),e.resolver){const{errors:N,values:U}=await W();t.errors=N,O=U}else await L(s);if(l.disabled.size)for(const N of l.disabled)ee(O,N,void 0);if(ce(t.errors,"root"),fe(t.errors)){m.state.next({errors:{}});try{await u(O,w)}catch(N){$=N}}else p&&await p({...t.errors},w),pe(),setTimeout(pe);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:fe(t.errors)&&!$,submitCount:t.submitCount+1,errors:t.errors}),$)throw $},Rs=(u,p={})=>{C(s,u)&&(oe(p.defaultValue)?H(u,de(C(n,u))):(H(u,p.defaultValue),ee(n,u,de(p.defaultValue))),p.keepTouched||ce(t.touchedFields,u),p.keepDirty||(ce(t.dirtyFields,u),t.isDirty=p.defaultValue?A(u,de(C(n,u))):A()),p.keepError||(ce(t.errors,u),f.isValid&&j()),m.state.next({...t}))},Yt=(u,p={})=>{const w=u?de(u):n,$=de(w),O=fe(u),N=O?n:$;if(p.keepDefaultValues||(n=w),!p.keepValues){if(p.keepDirtyValues){const U=new Set([...l.mount,...Object.keys(qe(n,a))]);for(const te of Array.from(U))C(t.dirtyFields,te)?ee(N,te,C(a,te)):H(te,C(N,te))}else{if(Vt&&oe(u))for(const U of l.mount){const te=C(s,U);if(te&&te._f){const se=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(ft(se)){const be=se.closest("form");if(be){be.reset();break}}}}for(const U of l.mount)H(U,C(N,U))}a=de(N),m.array.next({values:{...N}}),m.state.next({values:{...N}})}l={mount:p.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!p.keepIsValid||!!p.keepDirtyValues,i.watch=!!e.shouldUnregister,m.state.next({submitCount:p.keepSubmitCount?t.submitCount:0,isDirty:O?!1:p.keepDirty?t.isDirty:!!(p.keepDefaultValues&&!Ae(u,n)),isSubmitted:p.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:O?{}:p.keepDirtyValues?p.keepDefaultValues&&a?qe(n,a):t.dirtyFields:p.keepDefaultValues&&u?qe(n,u):p.keepDirty?t.dirtyFields:{},touchedFields:p.keepTouched?t.touchedFields:{},errors:p.keepErrors?t.errors:{},isSubmitSuccessful:p.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},Gt=(u,p)=>Yt(we(u)?u(a):u,p),Vs=(u,p={})=>{const w=C(s,u),$=w&&w._f;if($){const O=$.refs?$.refs[0]:$.ref;O.focus&&(O.focus(),p.shouldSelect&&we(O.select)&&O.select())}},Ms=u=>{t={...t,...u}},Xt={control:{register:K,unregister:ie,getFieldState:F,handleSubmit:Ze,setError:G,_subscribe:ae,_runSchema:W,_getWatch:D,_getDirty:A,_setValid:j,_setFieldArray:y,_setDisabledField:Q,_setErrors:E,_getFieldArray:Z,_reset:Yt,_resetDefaultValues:()=>we(e.defaultValues)&&e.defaultValues().then(u=>{Gt(u,e.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:Ie,_subjects:m,_proxyFormState:f,get _fields(){return s},get _formValues(){return a},get _state(){return i},set _state(u){i=u},get _defaultValues(){return n},get _names(){return l},set _names(u){l=u},get _formState(){return t},get _options(){return e},set _options(u){e={...e,...u}}},subscribe:Y,trigger:re,register:K,handleSubmit:Ze,watch:ne,setValue:H,getValues:x,reset:Gt,resetField:Rs,clearErrors:P,unregister:ie,setError:G,setFocus:Vs,getFieldState:F};return{...Xt,formControl:Xt}}function Bn(r={}){const e=v.useRef(void 0),t=v.useRef(void 0),[s,n]=v.useState({isDirty:!1,isValidating:!1,isLoading:we(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,isReady:!1,defaultValues:we(r.defaultValues)?void 0:r.defaultValues});e.current||(e.current={...r.formControl?r.formControl:Un(r),formState:s},r.formControl&&r.defaultValues&&!we(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const a=e.current.control;return a._options=r,Lt(()=>{const i=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(l=>({...l,isReady:!0})),a._formState.isReady=!0,i},[a]),v.useEffect(()=>a._disableForm(r.disabled),[a,r.disabled]),v.useEffect(()=>{r.mode&&(a._options.mode=r.mode),r.reValidateMode&&(a._options.reValidateMode=r.reValidateMode),r.errors&&!fe(r.errors)&&a._setErrors(r.errors)},[a,r.errors,r.mode,r.reValidateMode]),v.useEffect(()=>{r.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,r.shouldUnregister]),v.useEffect(()=>{if(a._proxyFormState.isDirty){const i=a._getDirty();i!==s.isDirty&&a._subjects.state.next({isDirty:i})}},[a,s.isDirty]),v.useEffect(()=>{r.values&&!Ae(r.values,t.current)?(a._reset(r.values,a._options.resetOptions),t.current=r.values,n(i=>({...i}))):a._resetDefaultValues()},[a,r.values]),v.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),e.current.formState=Wr(s,a),e.current}const ts={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Zn={sm:"h-6",md:"h-10",lg:"h-12"},zn={sm:"px-2",md:"px-2.5",lg:"px-3"};function mr(r,e,t,s,n,a,i){const l=e?"datetime-local":"date";return o.jsxs(o.Fragment,{children:[o.jsx("input",{id:r,type:l,disabled:n,...s,className:R("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition text-[var(--color-ds-text-primary)] font-[var(--font-primary)]",ts[t],Zn[t],zn[t],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",n?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]",i)}),o.jsx("div",{children:a!=null&&a.message?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}function rs(r){const{control:e,name:t,rules:s,defaultValue:n,showTime:a=!1,size:i="sm",width:l="100%",label:c,labelHidden:d=!1,hasError:f=!1,errorMessage:h="",disabled:m=!1,className:g,onChange:_}=r,j=v.useId(),S=t||j;return o.jsxs("div",{className:R("flex flex-col",g),style:{width:l,maxWidth:"100%"},children:[c&&o.jsx("label",{htmlFor:S,className:R("pb-2 text-[var(--color-ds-text-primary)]",ts[i],d&&"sr-only"),children:c}),e&&t?o.jsx(je,{name:t,control:e,rules:s,defaultValue:n,render:({field:y,fieldState:b})=>mr(S,a,i,{value:y.value,onChange:y.onChange,onBlur:y.onBlur},m,b.error,g)}):mr(S,a,i,{defaultValue:n,onChange:_},m,f?{message:h}:void 0,g)]})}const Wn=({trigger:r,items:e,align:t="left",className:s})=>{const[n,a]=v.useState(!1),i=v.useRef(null),l=v.useRef([]);v.useEffect(()=>{const d=f=>{i.current&&!i.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]);const c=d=>{var h,m;const f=l.current.findIndex(g=>g===document.activeElement);if(d.key==="Escape")a(!1);else if(d.key==="ArrowDown"){d.preventDefault();const g=(f+1)%e.length;(h=l.current[g])==null||h.focus()}else if(d.key==="ArrowUp"){d.preventDefault();const g=(f-1+e.length)%e.length;(m=l.current[g])==null||m.focus()}};return o.jsxs("div",{className:R("relative inline-block",s),ref:i,children:[o.jsx("button",{type:"button",onClick:()=>a(d=>!d),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":n,children:r}),n&&o.jsx("div",{role:"menu","aria-orientation":"vertical",className:R("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",t==="right"?"right-0":"left-0"),onKeyDown:c,children:e.map((d,f)=>{const{label:h,onSelect:m,disabled:g,icon:_}=d;return o.jsxs("button",{role:"menuitem",type:"button",disabled:g,ref:j=>{l.current[f]=j},className:R("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",g?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{g||(m(),a(!1))},children:[_&&o.jsx(_,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),h]},f)})})]})},qn=(r,e,t,s)=>{var a,i,l,c;const n=[t,{code:e,...s||{}}];if((i=(a=r==null?void 0:r.services)==null?void 0:a.logger)!=null&&i.forward)return r.services.logger.forward(n,"warn","react-i18next::",!0);Re(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),(c=(l=r==null?void 0:r.services)==null?void 0:l.logger)!=null&&c.warn?r.services.logger.warn(...n):console!=null&&console.warn&&console.warn(...n)},xr={},St=(r,e,t,s)=>{Re(t)&&xr[t]||(Re(t)&&(xr[t]=new Date),qn(r,e,t,s))},ss=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},Tt=(r,e,t)=>{r.loadNamespaces(e,ss(r,t))},pr=(r,e,t,s)=>{if(Re(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return Tt(r,t,s);t.forEach(n=>{r.options.ns.indexOf(n)<0&&r.options.ns.push(n)}),r.loadLanguages(e,ss(r,s))},Hn=(r,e,t={})=>!e.languages||!e.languages.length?(St(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(s,n)=>{var a;if(((a=t.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!n(s.isLanguageChangingTo,r))return!1}}),Re=r=>typeof r=="string",Yn=r=>typeof r=="object"&&r!==null,Gn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Xn={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Jn=r=>Xn[r],Kn=r=>r.replace(Gn,Jn);let Qn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Kn};const ea=()=>Qn;let ta;const ra=()=>ta,sa=v.createContext();class na{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const aa=(r,e)=>{const t=v.useRef();return v.useEffect(()=>{t.current=r},[r,e]),t.current},ns=(r,e,t,s)=>r.getFixedT(e,t,s),ia=(r,e,t,s)=>v.useCallback(ns(r,e,t,s),[r,e,t,s]),Bt=(r,e={})=>{var V,T,B,W;const{i18n:t}=e,{i18n:s,defaultNS:n}=v.useContext(sa)||{},a=t||s||ra();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new na),!a){St(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const z=(I,A)=>Re(A)?A:Yn(A)&&Re(A.defaultValue)?A.defaultValue:Array.isArray(I)?I[I.length-1]:I,L=[z,{},!1];return L.t=z,L.i18n={},L.ready=!1,L}(V=a.options.react)!=null&&V.wait&&St(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...ea(),...a.options.react,...e},{useSuspense:l,keyPrefix:c}=i;let d=n||((T=a.options)==null?void 0:T.defaultNS);d=Re(d)?[d]:d||["translation"],(W=(B=a.reportNamespaces).addUsedNamespaces)==null||W.call(B,d);const f=(a.isInitialized||a.initializedStoreOnce)&&d.every(z=>Hn(z,a,i)),h=ia(a,e.lng||null,i.nsMode==="fallback"?d:d[0],c),m=()=>h,g=()=>ns(a,e.lng||null,i.nsMode==="fallback"?d:d[0],c),[_,j]=v.useState(m);let S=d.join();e.lng&&(S=`${e.lng}${S}`);const y=aa(S),b=v.useRef(!0);v.useEffect(()=>{const{bindI18n:z,bindI18nStore:L}=i;b.current=!0,!f&&!l&&(e.lng?pr(a,e.lng,d,()=>{b.current&&j(g)}):Tt(a,d,()=>{b.current&&j(g)})),f&&y&&y!==S&&b.current&&j(g);const I=()=>{b.current&&j(g)};return z&&(a==null||a.on(z,I)),L&&(a==null||a.store.on(L,I)),()=>{b.current=!1,a&&(z==null||z.split(" ").forEach(A=>a.off(A,I))),L&&a&&L.split(" ").forEach(A=>a.store.off(A,I))}},[a,S]),v.useEffect(()=>{b.current&&f&&j(m)},[a,c,f]);const E=[_,a,f];if(E.t=_,E.i18n=a,E.ready=f,f||!f&&!l)return E;throw new Promise(z=>{e.lng?pr(a,e.lng,d,()=>z()):Tt(a,d,()=>z())})},Ot={sm:"text-sm",md:"text-base",lg:"text-lg"};function gr(r,e,t,s,n,a,i,l,c){const{t:d}=Bt(),f=v.useRef(null),h=typeof s=="number"&&e.length>=s,m=()=>{var b;!i&&!h&&((b=f.current)==null||b.click())},g=b=>{const E=b.target.files;if(!E)return;const V=Array.from(E);let T=e.concat(V);s&&(T=T.slice(0,s)),t(T),b.target.value=""},_=b=>{if(b.preventDefault(),i||h)return;const E=Array.from(b.dataTransfer.files);let V=e.concat(E);s&&(V=V.slice(0,s)),t(V)},j=b=>{b.preventDefault()},S=b=>{const E=URL.createObjectURL(b);window.open(E)},y=b=>{const E=e.filter((V,T)=>T!==b);t(E)};return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"self-start mb-4 w-auto",children:o.jsx(Te,{type:"button",variant:"outline",size:a,icon:rr,onClick:m,disabled:i||h,children:d("ds.fileUploader.browse","Browse files")})}),!h&&o.jsxs("div",{className:R("relative flex bg-[var(--color-ds-background-page)] flex-col items-center justify-center border-2 border-dashed border-[var(--color-ds-border-muted)] rounded-lg p-4",i?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",Ot[a],c),onDrop:_,onDragOver:j,children:[o.jsx("input",{id:r,type:"file",ref:f,className:"hidden",multiple:s!==1,accept:n,onChange:g,disabled:i}),o.jsx(Ee,{component:on,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),o.jsx("p",{className:"mt-3 text-[var(--color-ds-text-secondary)] text-center",children:d("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),e.length>0&&o.jsx("ul",{className:"mt-4 space-y-1",children:e.map((b,E)=>o.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx(rr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),o.jsx("span",{className:"truncate pr-2",children:b.name})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Te,{variant:"ghost",size:"sm",icon:Ir,ariaLabel:d("ds.fileUploader.view","View"),onClick:()=>S(b)}),o.jsx(Te,{variant:"ghost",size:"sm",icon:Rt,ariaLabel:d("ds.fileUploader.remove","Remove"),onClick:()=>y(E)})]})]},E))}),o.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}function as(r){const{control:e,name:t,rules:s,defaultValue:n,maxFiles:a,accept:i,size:l="sm",width:c="100%",label:d,labelHidden:f=!1,disabled:h=!1,hasError:m=!1,errorMessage:g="",className:_}=r,j=v.useId(),S=t||j;if(e&&t)return o.jsxs("div",{className:R("flex flex-col",_),style:{width:c},children:[d&&o.jsx("label",{htmlFor:S,className:R("pb-[10px] text-[var(--color-ds-text-primary)]",Ot[l],f&&"sr-only"),children:d}),o.jsx(je,{name:t,control:e,rules:s,defaultValue:n instanceof FileList?Array.from(n):n||[],render:({field:E,fieldState:V})=>gr(S,E.value,T=>E.onChange(T),a,i,l,h,V.error,_)})]});const[y,b]=v.useState(n instanceof FileList?Array.from(n):n||[]);return o.jsxs("div",{className:R("flex flex-col",_),style:{width:c},children:[d&&o.jsx("label",{htmlFor:S,className:R("pb-[10px] text-[var(--color-ds-text-primary)]",Ot[l],f&&"sr-only"),children:d}),gr(S,y,b,a,i,l,h,m?{message:g}:void 0,_)]})}const Me=({count:r=1,width:e,height:t="1em",variant:s="rect",className:n})=>{const a=Array.from({length:r});return o.jsx(o.Fragment,{children:a.map((i,l)=>o.jsx("span",{role:"status","aria-label":"Cargando...",className:R("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",n),style:{width:e??"auto",height:t}},l))})},rt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},oa={sm:"h-6",md:"h-10",lg:"h-12"},la={sm:"px-2",md:"px-2.5",lg:"px-3"},br={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},ca={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function bt({id:r,type:e="text",size:t="sm",width:s="100%",label:n,labelHidden:a=!1,hasError:i=!1,errorMessage:l="",prefixIcon:c,suffixIcon:d,separator:f,suffixButton:h,disabled:m=!1,control:g,name:_,rules:j,defaultValue:S,loading:y=!1,className:b,...E}){const V=v.useId(),[T,B]=v.useState(!1),W=r||V,z=e==="password",I=c??(e==="number"?hn:void 0),A=z?T?un:Ir:d,D=R("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",rt[t],oa[t],la[t],i?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]","bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]","disabled:bg-[var(--color-ds-background-disabled)]","disabled:border-[var(--color-ds-border-muted)]","disabled:text-[var(--color-ds-text-disabled)]","disabled:cursor-not-allowed");return y?o.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!a&&n&&o.jsx("label",{htmlFor:W,className:R("pb-2",rt[t]),children:n}),o.jsx(Me,{width:"100%",height:ca[t],variant:"rect",className:"rounded-lg"}),o.jsx("div",{className:"min-h-[18px] w-full",children:o.jsx("span",{"aria-hidden":"true",children:" "})})]}):g&&_?o.jsx(je,{name:_,control:g,rules:j,defaultValue:S,render:({field:Z,fieldState:q})=>o.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&o.jsx("label",{htmlFor:W,className:R("pb-2 text-[var(--color-ds-text-primary)]",rt[t]),children:n}),o.jsxs("div",{className:"relative flex items-center w-full",children:[I&&o.jsx("div",{className:R("absolute left-0 flex items-center h-full",br[t]),children:o.jsx(Ee,{component:I,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),o.jsx("input",{...Z,id:W,type:z?T?"text":"password":e,disabled:m,"aria-invalid":!!q.error,className:R(D,I&&"pl-9",A&&"pr-9",b),onInvalid:X=>X.preventDefault(),style:z&&!T?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&o.jsx("div",{className:"flex items-center h-full",children:f}),h&&o.jsx("div",{className:"flex items-center h-full pr-2",children:h}),A&&o.jsx("button",{type:"button",onClick:()=>B(X=>!X),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:o.jsx(Ee,{component:A,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),o.jsx("div",{className:"min-h-[18px]",children:q.error?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:q.error.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}):o.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&o.jsx("label",{htmlFor:W,className:R("pb-2 text-[var(--color-ds-text-primary)]",rt[t]),children:n}),o.jsxs("div",{className:"relative flex items-center w-full",children:[I&&o.jsx("div",{className:R("absolute left-0 flex items-center h-full",br[t]),children:o.jsx(Ee,{component:I,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),o.jsx("input",{...E,id:W,type:z?T?"text":"password":e,disabled:m,"aria-invalid":i,className:R(D,I&&"pl-9",A&&"pr-9",b),onInvalid:Z=>Z.preventDefault(),style:z&&!T?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&o.jsx("div",{className:"flex items-center h-full",children:f}),h&&o.jsx("div",{className:"flex items-center h-full",children:h}),A&&o.jsx("button",{type:"button",onClick:()=>B(Z=>!Z),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:o.jsx(Ee,{component:A,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),o.jsx("div",{className:"min-h-[18px]",children:i&&l?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}const ua={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},jt=400,st=8,is=({children:r,size:e="sm",position:t="top",className:s})=>{const[n,a]=v.useState(!1),[i,l]=v.useState({x:0,y:0}),c=v.useRef(null),d=v.useId();v.useEffect(()=>{if(n&&c.current){const m=c.current.getBoundingClientRect();let g=0,_=0;switch(t){case"top":g=m.left+m.width/2-jt/2,_=m.top-st;break;case"bottom":g=m.left+m.width/2-jt/2,_=m.bottom+st;break;case"left":g=m.left-jt-st,_=m.top+m.height/2;break;case"right":g=m.right+st,_=m.top+m.height/2;break}l({x:g,y:_})}},[n,t]);const f=()=>typeof r=="string"?o.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):o.jsx(o.Fragment,{children:r}),h=n?o.jsx("div",{id:d,role:"tooltip",className:R("fixed z-50 w-[250px] bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)] text-ds-sm rounded p-2 shadow-lg","pointer-events-none"),style:{top:`${i.y}px`,left:`${i.x}px`,transform:t==="left"||t==="right"?"translateY(-50%)":t==="top"?"translateY(-100%)":void 0},children:f()}):null;return o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button","aria-describedby":d,ref:c,className:R("inline-flex items-center justify-center focus:outline-none",ua[e],"text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]",s),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:o.jsx(xn,{className:"w-full h-full"})}),Vr.createPortal(h,document.body)]})};function da({name:r,label:e,type:t="text",size:s="sm",width:n,placeholder:a,validation:i,loadingDefaults:l,disabled:c,info:d}){var S;const{control:f,formState:{errors:h}}=Ke(),m=!!h[r],g=((S=h[r])==null?void 0:S.message)||"",_="relative",j=n??"w-full";return o.jsxs("div",{className:_,children:[o.jsx(je,{name:r,control:f,rules:i,render:({field:y})=>o.jsx(bt,{label:e,size:s,width:j,placeholder:a,hasError:m,errorMessage:g,loading:l,type:t,...y,disabled:c})}),d&&o.jsx(is,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:d})]})}const Zt=v.memo(da);Zt.displayName="FormFieldInput";function fa({title:r,headerButtons:e,children:t,className:s}){return o.jsxs("div",{className:R("flex flex-col h-full",s),children:[o.jsxs("div",{className:"flex items-center justify-between py-4",children:[o.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
22
+ <%s key={someKey} {...props} />`,H,ne,se,ne),ae[ne+H]=!0)}if(ne=null,z!==void 0&&(e(z),ne=""+z),o(T)&&(e(T.key),ne=""+T.key),"key"in T){z={};for(var me in T)me!=="key"&&(z[me]=T[me])}else z=T;return ne&&l(z,typeof p=="function"?p.displayName||p.name||"Unknown":p),u(p,ne,le,re,n(),z,ee,Q)}function h(p){typeof p=="object"&&p!==null&&p.$$typeof===g&&p._store&&(p._store.validated=1)}var m=v,g=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),E=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),V=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,G=Array.isArray,J=console.createTask?console.createTask:function(){return null};m={"react-stack-bottom-frame":function(p){return p()}};var K,Y={},j=m["react-stack-bottom-frame"].bind(m,a)(),A=J(s(a)),ae={};tt.Fragment=k,tt.jsx=function(p,T,z,H,re){var le=1e4>V.recentlyCreatedOwnerStacks++;return f(p,T,z,!1,H,re,le?Error("react-stack-top-frame"):j,le?J(s(p)):A)},tt.jsxs=function(p,T,z,H,re){var le=1e4>V.recentlyCreatedOwnerStacks++;return f(p,T,z,!0,H,re,le?Error("react-stack-top-frame"):j,le?J(s(p)):A)}}()),tt}var yr;function Nn(){return yr||(yr=1,process.env.NODE_ENV==="production"?ft.exports=jn():ft.exports=En()),ft.exports}var i=Nn();function as(r){var t,e,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(t=0;t<n;t++)r[t]&&(e=as(r[t]))&&(s&&(s+=" "),s+=e)}else for(e in r)r[e]&&(s&&(s+=" "),s+=e);return s}function L(){for(var r,t,e=0,s="",n=arguments.length;e<n;e++)(r=arguments[e])&&(t=as(r))&&(s&&(s+=" "),s+=t);return s}const _n={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-10 h-10",full:"w-full h-full"};function Ce({component:r,size:t="sm",className:e,...s}){return i.jsx(r,{className:L(_n[t],e),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Sn="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Fn={primary:"bg-[var(--color-ds-button-primary-bg)] text-[var(--color-ds-button-primary-text)] hover:animate-pulse",outline:"bg-transparent text-[var(--color-ds-text-primary)] ring-1 ring-inset ring-[var(--color-ds-border-default)] hover:bg-[var(--color-ds-background-accent)] hover:text-[var(--color-ds-text-on-accent)]",ghost:"bg-transparent text-[var(--color-ds-text-primary)] hover:animate-pulse"},Tn={sm:"text-ds-sm h-6 px-2",md:"text-ds-md h-10 px-2.5",lg:"text-ds-lg h-12 px-3"},Cn={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},An="disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[var(--color-ds-background-disabled)] disabled:text-[var(--color-ds-text-on-accent)] disabled:ring-1 disabled:ring-inset disabled:ring-[var(--color-ds-border-muted)]";function $e({type:r="button",variant:t="primary",size:e="sm",width:s,disabled:n=!1,icon:a,iconPosition:o="left",ariaLabel:l,children:c,onClick:u,className:f}){const h=!!a,m=h&&!c,g=m?Cn[e]:Tn[e];return i.jsxs("button",{type:r,onClick:u,disabled:n,"aria-label":m?l:void 0,style:s?{width:s}:void 0,className:L(Sn,Fn[t],g,An,f,h&&c&&"gap-2"),children:[a&&o==="left"&&i.jsx(Ce,{component:a,size:e}),c,a&&o==="right"&&i.jsx(Ce,{component:a,size:e})]})}function On({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Mn=W.forwardRef(On);function Rn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const os=W.forwardRef(Rn);function Vn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const $n=W.forwardRef(Vn);function Dn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const In=W.forwardRef(Dn);function Ln({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"}))}const Pn=W.forwardRef(Ln);function zn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const vr=W.forwardRef(zn);function Un({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const Bn=W.forwardRef(Un);function Zn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const is=W.forwardRef(Zn);function Wn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"}))}const qn=W.forwardRef(Wn);function Gn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const Hn=W.forwardRef(Gn);function Yn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const Xn=W.forwardRef(Yn);function Jn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const Kn=W.forwardRef(Jn);function Qn({title:r,titleId:t,...e},s){return W.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},e),r?W.createElement("title",{id:t},r):null,W.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const Kt=W.forwardRef(Qn);function Pt({title:r,children:t,defaultOpen:e=!0,className:s}){const[n,a]=v.useState(e),o=v.useRef(null),l=v.useRef(null),[c,u]=v.useState(0),f=()=>{if(l.current){const h=l.current.scrollHeight;u(h)}};return v.useLayoutEffect(()=>{f()},[n]),v.useEffect(()=>{const h=l.current;if(!h)return;const m=new ResizeObserver(()=>{f()});return m.observe(h),()=>{m.disconnect()}},[]),i.jsxs("div",{className:L("flex flex-col w-full gap-3",s),children:[i.jsxs("button",{type:"button",onClick:()=>a(h=>!h),className:"flex items-center justify-between w-full hover:bg-[var(--color-ds-surface-hover)] transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),i.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),n?i.jsx(In,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):i.jsx(os,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),i.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:i.jsx("div",{className:"px-6",children:i.jsx("div",{ref:o,className:L("overflow-hidden transition-all duration-300 ease-in-out",n?"opacity-100":"opacity-0"),style:{maxHeight:n?`${c}px`:"0px"},children:i.jsx("div",{ref:l,className:"py-4",children:t})})})})]})}const Qt="-",ea=r=>{const t=ra(r),{conflictingClassGroups:e,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:o=>{const l=o.split(Qt);return l[0]===""&&l.length!==1&&l.shift(),ls(l,t)||ta(o)},getConflictingClassGroupIds:(o,l)=>{const c=e[o]||[];return l&&s[o]?[...c,...s[o]]:c}}},ls=(r,t)=>{var o;if(r.length===0)return t.classGroupId;const e=r[0],s=t.nextPart.get(e),n=s?ls(r.slice(1),s):void 0;if(n)return n;if(t.validators.length===0)return;const a=r.join(Qt);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},wr=/^\[(.+)\]$/,ta=r=>{if(wr.test(r)){const t=wr.exec(r)[1],e=t==null?void 0:t.substring(0,t.indexOf(":"));if(e)return"arbitrary.."+e}},ra=r=>{const{theme:t,classGroups:e}=r,s={nextPart:new Map,validators:[]};for(const n in e)zt(e[n],s,n,t);return s},zt=(r,t,e,s)=>{r.forEach(n=>{if(typeof n=="string"){const a=n===""?t:kr(t,n);a.classGroupId=e;return}if(typeof n=="function"){if(sa(n)){zt(n(s),t,e,s);return}t.validators.push({validator:n,classGroupId:e});return}Object.entries(n).forEach(([a,o])=>{zt(o,kr(t,a),e,s)})})},kr=(r,t)=>{let e=r;return t.split(Qt).forEach(s=>{e.nextPart.has(s)||e.nextPart.set(s,{nextPart:new Map,validators:[]}),e=e.nextPart.get(s)}),e},sa=r=>r.isThemeGetter,na=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,e=new Map,s=new Map;const n=(a,o)=>{e.set(a,o),t++,t>r&&(t=0,s=e,e=new Map)};return{get(a){let o=e.get(a);if(o!==void 0)return o;if((o=s.get(a))!==void 0)return n(a,o),o},set(a,o){e.has(a)?e.set(a,o):n(a,o)}}},Ut="!",Bt=":",aa=Bt.length,oa=r=>{const{prefix:t,experimentalParseClassName:e}=r;let s=n=>{const a=[];let o=0,l=0,c=0,u;for(let N=0;N<n.length;N++){let k=n[N];if(o===0&&l===0){if(k===Bt){a.push(n.slice(c,N)),c=N+aa;continue}if(k==="/"){u=N;continue}}k==="["?o++:k==="]"?o--:k==="("?l++:k===")"&&l--}const f=a.length===0?n:n.substring(c),h=ia(f),m=h!==f,g=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const n=t+Bt,a=s;s=o=>o.startsWith(n)?a(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(e){const n=s;s=a=>e({className:a,parseClassName:n})}return s},ia=r=>r.endsWith(Ut)?r.substring(0,r.length-1):r.startsWith(Ut)?r.substring(1):r,la=r=>{const t=Object.fromEntries(r.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const n=[];let a=[];return s.forEach(o=>{o[0]==="["||t[o]?(n.push(...a.sort(),o),a=[]):a.push(o)}),n.push(...a.sort()),n}},ca=r=>({cache:na(r.cacheSize),parseClassName:oa(r),sortModifiers:la(r),...ea(r)}),da=/\s+/,ua=(r,t)=>{const{parseClassName:e,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:a}=t,o=[],l=r.trim().split(da);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:N,maybePostfixModifierPosition:k}=e(f);if(h){c=f+(c.length>0?" "+c:c);continue}let S=!!k,y=s(S?N.substring(0,k):N);if(!y){if(!S){c=f+(c.length>0?" "+c:c);continue}if(y=s(N),!y){c=f+(c.length>0?" "+c:c);continue}S=!1}const b=a(m).join(":"),E=g?b+Ut:b,R=E+y;if(o.includes(R))continue;o.push(R);const F=n(y,S);for(let Z=0;Z<F.length;++Z){const X=F[Z];o.push(E+X)}c=f+(c.length>0?" "+c:c)}return c};function fa(){let r=0,t,e,s="";for(;r<arguments.length;)(t=arguments[r++])&&(e=cs(t))&&(s&&(s+=" "),s+=e);return s}const cs=r=>{if(typeof r=="string")return r;let t,e="";for(let s=0;s<r.length;s++)r[s]&&(t=cs(r[s]))&&(e&&(e+=" "),e+=t);return e};function ha(r,...t){let e,s,n,a=o;function o(c){const u=t.reduce((f,h)=>h(f),r());return e=ca(u),s=e.cache.get,n=e.cache.set,a=l,l(c)}function l(c){const u=s(c);if(u)return u;const f=ua(c,e);return n(c,f),f}return function(){return a(fa.apply(null,arguments))}}const fe=r=>{const t=e=>e[r]||[];return t.isThemeGetter=!0,t},ds=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,us=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ma=/^\d+\/\d+$/,pa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ga=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ba=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ya=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,He=r=>ma.test(r),te=r=>!!r&&!Number.isNaN(Number(r)),Ie=r=>!!r&&Number.isInteger(Number(r)),Mt=r=>r.endsWith("%")&&te(r.slice(0,-1)),Oe=r=>pa.test(r),va=()=>!0,wa=r=>xa.test(r)&&!ga.test(r),fs=()=>!1,ka=r=>ba.test(r),ja=r=>ya.test(r),Ea=r=>!U(r)&&!B(r),Na=r=>Ke(r,ps,fs),U=r=>ds.test(r),Ue=r=>Ke(r,xs,wa),Rt=r=>Ke(r,Ca,te),jr=r=>Ke(r,hs,fs),_a=r=>Ke(r,ms,ja),ht=r=>Ke(r,gs,ka),B=r=>us.test(r),rt=r=>Qe(r,xs),Sa=r=>Qe(r,Aa),Er=r=>Qe(r,hs),Fa=r=>Qe(r,ps),Ta=r=>Qe(r,ms),mt=r=>Qe(r,gs,!0),Ke=(r,t,e)=>{const s=ds.exec(r);return s?s[1]?t(s[1]):e(s[2]):!1},Qe=(r,t,e=!1)=>{const s=us.exec(r);return s?s[1]?t(s[1]):e:!1},hs=r=>r==="position"||r==="percentage",ms=r=>r==="image"||r==="url",ps=r=>r==="length"||r==="size"||r==="bg-size",xs=r=>r==="length",Ca=r=>r==="number",Aa=r=>r==="family-name",gs=r=>r==="shadow",Oa=()=>{const r=fe("color"),t=fe("font"),e=fe("text"),s=fe("font-weight"),n=fe("tracking"),a=fe("leading"),o=fe("breakpoint"),l=fe("container"),c=fe("spacing"),u=fe("radius"),f=fe("shadow"),h=fe("inset-shadow"),m=fe("text-shadow"),g=fe("drop-shadow"),N=fe("blur"),k=fe("perspective"),S=fe("aspect"),y=fe("ease"),b=fe("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...R(),B,U],Z=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],_=()=>[B,U,c],D=()=>[He,"full","auto",..._()],P=()=>[Ie,"none","subgrid",B,U],V=()=>["auto",{span:["full",Ie,B,U]},Ie,B,U],$=()=>[Ie,"auto",B,U],G=()=>["auto","min","max","fr",B,U],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",..._()],j=()=>[He,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],A=()=>[r,B,U],ae=()=>[...R(),Er,jr,{position:[B,U]}],p=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",Fa,Na,{size:[B,U]}],z=()=>[Mt,rt,Ue],H=()=>["","none","full",u,B,U],re=()=>["",te,rt,Ue],le=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[te,Mt,Er,jr],ne=()=>["","none",N,B,U],se=()=>["none",te,B,U],me=()=>["none",te,B,U],Se=()=>[te,B,U],Fe=()=>[He,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oe],breakpoint:[Oe],color:[va],container:[Oe],"drop-shadow":[Oe],ease:["in","out","in-out"],font:[Ea],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oe],shadow:[Oe],spacing:["px",te],text:[Oe],"text-shadow":[Oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",He,U,B,S]}],container:["container"],columns:[{columns:[te,U,B,l]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",B,U]}],basis:[{basis:[He,"full","auto",l,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,He,"auto","initial","none",U]}],grow:[{grow:["",te,B,U]}],shrink:[{shrink:["",te,B,U]}],order:[{order:[Ie,"first","last","none",B,U]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[l,"screen",...j()]}],"min-w":[{"min-w":[l,"screen","none",...j()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",e,rt,Ue]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,B,Rt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mt,U]}],"font-family":[{font:[Sa,U,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,B,U]}],"line-clamp":[{"line-clamp":[te,"none",B,Rt]}],leading:[{leading:[a,..._()]}],"list-image":[{"list-image":["none",B,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",B,Ue]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[te,"auto",B,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:p()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,B,U],radial:["",B,U],conic:[Ie,B,U]},Ta,_a]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[te,B,U]}],"outline-w":[{outline:["",te,rt,Ue]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",f,mt,ht]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",h,mt,ht]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[te,Ue]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",m,mt,ht]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[te,B,U]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[B,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:p()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,U]}],filter:[{filter:["","none",B,U]}],blur:[{blur:ne()}],brightness:[{brightness:[te,B,U]}],contrast:[{contrast:[te,B,U]}],"drop-shadow":[{"drop-shadow":["","none",g,mt,ht]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",te,B,U]}],"hue-rotate":[{"hue-rotate":[te,B,U]}],invert:[{invert:["",te,B,U]}],saturate:[{saturate:[te,B,U]}],sepia:[{sepia:["",te,B,U]}],"backdrop-filter":[{"backdrop-filter":["","none",B,U]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[te,B,U]}],"backdrop-contrast":[{"backdrop-contrast":[te,B,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,B,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,B,U]}],"backdrop-invert":[{"backdrop-invert":["",te,B,U]}],"backdrop-opacity":[{"backdrop-opacity":[te,B,U]}],"backdrop-saturate":[{"backdrop-saturate":[te,B,U]}],"backdrop-sepia":[{"backdrop-sepia":["",te,B,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",B,U]}],ease:[{ease:["linear","initial",y,B,U]}],delay:[{delay:[te,B,U]}],animate:[{animate:["none",b,B,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,B,U]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[B,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B,U]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[te,rt,Ue,Rt]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ma=ha(Oa);var lt=r=>r.type==="checkbox",Be=r=>r instanceof Date,be=r=>r==null;const bs=r=>typeof r=="object";var ue=r=>!be(r)&&!Array.isArray(r)&&bs(r)&&!Be(r),ys=r=>ue(r)&&r.target?lt(r.target)?r.target.checked:r.target.value:r,Ra=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,vs=(r,t)=>r.has(Ra(t)),Va=r=>{const t=r.constructor&&r.constructor.prototype;return ue(t)&&t.hasOwnProperty("isPrototypeOf")},er=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function xe(r){let t;const e=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)t=new Date(r);else if(r instanceof Set)t=new Set(r);else if(!(er&&(r instanceof Blob||s))&&(e||ue(r)))if(t=e?[]:{},!e&&!Va(r))t=r;else for(const n in r)r.hasOwnProperty(n)&&(t[n]=xe(r[n]));else return r;return t}var Tt=r=>Array.isArray(r)?r.filter(Boolean):[],de=r=>r===void 0,M=(r,t,e)=>{if(!t||!ue(r))return e;const s=Tt(t.split(/[,[\].]+?/)).reduce((n,a)=>be(n)?n:n[a],r);return de(s)||s===r?de(r[t])?e:r[t]:s},we=r=>typeof r=="boolean",tr=r=>/^\w*$/.test(r),ws=r=>Tt(r.replace(/["|']|\]/g,"").split(/\.|\[/)),oe=(r,t,e)=>{let s=-1;const n=tr(t)?[t]:ws(t),a=n.length,o=a-1;for(;++s<a;){const l=n[s];let c=e;if(s!==o){const u=r[l];c=ue(u)||Array.isArray(u)?u:isNaN(+n[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const jt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ee={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Me={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ks=v.createContext(null),ct=()=>v.useContext(ks),$a=r=>{const{children:t,...e}=r;return v.createElement(ks.Provider,{value:e},t)};var js=(r,t,e,s=!0)=>{const n={defaultValues:t._defaultValues};for(const a in r)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Ee.all&&(t._proxyFormState[o]=!s||Ee.all),e&&(e[o]=!0),r[o]}});return n};const rr=typeof window<"u"?W.useLayoutEffect:W.useEffect;function Da(r){const t=ct(),{control:e=t.control,disabled:s,name:n,exact:a}=r||{},[o,l]=v.useState(e._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return rr(()=>e._subscribe({name:n,formState:c.current,exact:a,callback:u=>{!s&&l({...e._formState,...u})}}),[n,s,a]),v.useEffect(()=>{c.current.isValid&&e._setValid(!0)},[e]),v.useMemo(()=>js(o,e,c.current,!1),[o,e])}var Ae=r=>typeof r=="string",Es=(r,t,e,s,n)=>Ae(r)?(s&&t.watch.add(r),M(e,r,n)):Array.isArray(r)?r.map(a=>(s&&t.watch.add(a),M(e,a))):(s&&(t.watchAll=!0),e);function sr(r){const t=ct(),{control:e=t.control,name:s,defaultValue:n,disabled:a,exact:o}=r||{},l=v.useRef(n),[c,u]=v.useState(e._getWatch(s,l.current));return rr(()=>e._subscribe({name:s,formState:{values:!0},exact:o,callback:f=>!a&&u(Es(s,e._names,f.values||e._formValues,!1,l.current))}),[s,e,a,o]),v.useEffect(()=>e._removeUnmounted()),c}function Ns(r){const t=ct(),{name:e,disabled:s,control:n=t.control,shouldUnregister:a}=r,o=vs(n._names.array,e),l=sr({control:n,name:e,defaultValue:M(n._formValues,e,M(n._defaultValues,e,r.defaultValue)),exact:!0}),c=Da({control:n,name:e,exact:!0}),u=v.useRef(r),f=v.useRef(n.register(e,{...r.rules,value:l,...we(r.disabled)?{disabled:r.disabled}:{}})),h=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!M(c.errors,e)},isDirty:{enumerable:!0,get:()=>!!M(c.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!M(c.touchedFields,e)},isValidating:{enumerable:!0,get:()=>!!M(c.validatingFields,e)},error:{enumerable:!0,get:()=>M(c.errors,e)}}),[c,e]),m=v.useCallback(S=>f.current.onChange({target:{value:ys(S),name:e},type:jt.CHANGE}),[e]),g=v.useCallback(()=>f.current.onBlur({target:{value:M(n._formValues,e),name:e},type:jt.BLUR}),[e,n._formValues]),N=v.useCallback(S=>{const y=M(n._fields,e);y&&S&&(y._f.ref={focus:()=>S.focus(),select:()=>S.select(),setCustomValidity:b=>S.setCustomValidity(b),reportValidity:()=>S.reportValidity()})},[n._fields,e]),k=v.useMemo(()=>({name:e,value:l,...we(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:m,onBlur:g,ref:N}),[e,s,c.disabled,m,g,N,l]);return v.useEffect(()=>{const S=n._options.shouldUnregister||a;n.register(e,{...u.current.rules,...we(u.current.disabled)?{disabled:u.current.disabled}:{}});const y=(b,E)=>{const R=M(n._fields,b);R&&R._f&&(R._f.mount=E)};if(y(e,!0),S){const b=xe(M(n._options.defaultValues,e));oe(n._defaultValues,e,b),de(M(n._formValues,e))&&oe(n._formValues,e,b)}return!o&&n.register(e),()=>{(o?S&&!n._state.action:S)?n.unregister(e):y(e,!1)}},[e,n,o,a]),v.useEffect(()=>{n._setDisabledField({disabled:s,name:e})},[s,e,n]),v.useMemo(()=>({field:k,formState:c,fieldState:h}),[k,c,h])}const _e=r=>r.render(Ns(r));var _s=(r,t,e,s,n)=>t?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[s]:n||!0}}:{},at=r=>Array.isArray(r)?r:[r],Nr=()=>{let r=[];return{get observers(){return r},next:n=>{for(const a of r)a.next&&a.next(n)},subscribe:n=>(r.push(n),{unsubscribe:()=>{r=r.filter(a=>a!==n)}}),unsubscribe:()=>{r=[]}}},Zt=r=>be(r)||!bs(r);function Pe(r,t){if(Zt(r)||Zt(t))return r===t;if(Be(r)&&Be(t))return r.getTime()===t.getTime();const e=Object.keys(r),s=Object.keys(t);if(e.length!==s.length)return!1;for(const n of e){const a=r[n];if(!s.includes(n))return!1;if(n!=="ref"){const o=t[n];if(Be(a)&&Be(o)||ue(a)&&ue(o)||Array.isArray(a)&&Array.isArray(o)?!Pe(a,o):a!==o)return!1}}return!0}var ge=r=>ue(r)&&!Object.keys(r).length,nr=r=>r.type==="file",Ne=r=>typeof r=="function",Et=r=>{if(!er)return!1;const t=r?r.ownerDocument:0;return r instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ss=r=>r.type==="select-multiple",ar=r=>r.type==="radio",Ia=r=>ar(r)||lt(r),Vt=r=>Et(r)&&r.isConnected;function La(r,t){const e=t.slice(0,-1).length;let s=0;for(;s<e;)r=de(r)?s++:r[t[s++]];return r}function Pa(r){for(const t in r)if(r.hasOwnProperty(t)&&!de(r[t]))return!1;return!0}function he(r,t){const e=Array.isArray(t)?t:tr(t)?[t]:ws(t),s=e.length===1?r:La(r,e),n=e.length-1,a=e[n];return s&&delete s[a],n!==0&&(ue(s)&&ge(s)||Array.isArray(s)&&Pa(s))&&he(r,e.slice(0,-1)),r}var Fs=r=>{for(const t in r)if(Ne(r[t]))return!0;return!1};function Nt(r,t={}){const e=Array.isArray(r);if(ue(r)||e)for(const s in r)Array.isArray(r[s])||ue(r[s])&&!Fs(r[s])?(t[s]=Array.isArray(r[s])?[]:{},Nt(r[s],t[s])):be(r[s])||(t[s]=!0);return t}function Ts(r,t,e){const s=Array.isArray(r);if(ue(r)||s)for(const n in r)Array.isArray(r[n])||ue(r[n])&&!Fs(r[n])?de(t)||Zt(e[n])?e[n]=Array.isArray(r[n])?Nt(r[n],[]):{...Nt(r[n])}:Ts(r[n],be(t)?{}:t[n],e[n]):e[n]=!Pe(r[n],t[n]);return e}var st=(r,t)=>Ts(r,t,Nt(t));const _r={value:!1,isValid:!1},Sr={value:!0,isValid:!0};var Cs=r=>{if(Array.isArray(r)){if(r.length>1){const t=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!de(r[0].attributes.value)?de(r[0].value)||r[0].value===""?Sr:{value:r[0].value,isValid:!0}:Sr:_r}return _r},As=(r,{valueAsNumber:t,valueAsDate:e,setValueAs:s})=>de(r)?r:t?r===""?NaN:r&&+r:e&&Ae(r)?new Date(r):s?s(r):r;const Fr={isValid:!1,value:null};var Os=r=>Array.isArray(r)?r.reduce((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t,Fr):Fr;function Tr(r){const t=r.ref;return nr(t)?t.files:ar(t)?Os(r.refs).value:Ss(t)?[...t.selectedOptions].map(({value:e})=>e):lt(t)?Cs(r.refs).value:As(de(t.value)?r.ref.value:t.value,r)}var za=(r,t,e,s)=>{const n={};for(const a of r){const o=M(t,a);o&&oe(n,a,o._f)}return{criteriaMode:e,names:[...r],fields:n,shouldUseNativeValidation:s}},_t=r=>r instanceof RegExp,nt=r=>de(r)?r:_t(r)?r.source:ue(r)?_t(r.value)?r.value.source:r.value:r,Cr=r=>({isOnSubmit:!r||r===Ee.onSubmit,isOnBlur:r===Ee.onBlur,isOnChange:r===Ee.onChange,isOnAll:r===Ee.all,isOnTouch:r===Ee.onTouched});const Ar="AsyncFunction";var Ua=r=>!!r&&!!r.validate&&!!(Ne(r.validate)&&r.validate.constructor.name===Ar||ue(r.validate)&&Object.values(r.validate).find(t=>t.constructor.name===Ar)),Ba=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),Or=(r,t,e)=>!e&&(t.watchAll||t.watch.has(r)||[...t.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const ot=(r,t,e,s)=>{for(const n of e||Object.keys(r)){const a=M(r,n);if(a){const{_f:o,...l}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!s)return!0;if(o.ref&&t(o.ref,o.name)&&!s)return!0;if(ot(l,t))break}else if(ue(l)&&ot(l,t))break}}};function Mr(r,t,e){const s=M(r,e);if(s||tr(e))return{error:s,name:e};const n=e.split(".");for(;n.length;){const a=n.join("."),o=M(t,a),l=M(r,a);if(o&&!Array.isArray(o)&&e!==a)return{name:e};if(l&&l.type)return{name:a,error:l};n.pop()}return{name:e}}var Za=(r,t,e,s)=>{e(r);const{name:n,...a}=r;return ge(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!s||Ee.all))},Wa=(r,t,e)=>!r||!t||r===t||at(r).some(s=>s&&(e?s===t:s.startsWith(t)||t.startsWith(s))),qa=(r,t,e,s,n)=>n.isOnAll?!1:!e&&n.isOnTouch?!(t||r):(e?s.isOnBlur:n.isOnBlur)?!r:(e?s.isOnChange:n.isOnChange)?r:!0,Ga=(r,t)=>!Tt(M(r,t)).length&&he(r,t),Ha=(r,t,e)=>{const s=at(M(r,e));return oe(s,"root",t[e]),oe(r,e,s),r},vt=r=>Ae(r);function Rr(r,t,e="validate"){if(vt(r)||Array.isArray(r)&&r.every(vt)||we(r)&&!r)return{type:e,message:vt(r)?r:"",ref:t}}var Ye=r=>ue(r)&&!_t(r)?r:{value:r,message:""},Vr=async(r,t,e,s,n,a)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:f,min:h,max:m,pattern:g,validate:N,name:k,valueAsNumber:S,mount:y}=r._f,b=M(e,k);if(!y||t.has(k))return{};const E=l?l[0]:o,R=$=>{n&&E.reportValidity&&(E.setCustomValidity(we($)?"":$||""),E.reportValidity())},F={},Z=ar(o),X=lt(o),_=Z||X,D=(S||nr(o))&&de(o.value)&&de(b)||Et(o)&&o.value===""||b===""||Array.isArray(b)&&!b.length,P=_s.bind(null,k,s,F),V=($,G,J,K=Me.maxLength,Y=Me.minLength)=>{const j=$?G:J;F[k]={type:$?K:Y,message:j,ref:o,...P($?K:Y,j)}};if(a?!Array.isArray(b)||!b.length:c&&(!_&&(D||be(b))||we(b)&&!b||X&&!Cs(l).isValid||Z&&!Os(l).isValid)){const{value:$,message:G}=vt(c)?{value:!!c,message:c}:Ye(c);if($&&(F[k]={type:Me.required,message:G,ref:E,...P(Me.required,G)},!s))return R(G),F}if(!D&&(!be(h)||!be(m))){let $,G;const J=Ye(m),K=Ye(h);if(!be(b)&&!isNaN(b)){const Y=o.valueAsNumber||b&&+b;be(J.value)||($=Y>J.value),be(K.value)||(G=Y<K.value)}else{const Y=o.valueAsDate||new Date(b),j=p=>new Date(new Date().toDateString()+" "+p),A=o.type=="time",ae=o.type=="week";Ae(J.value)&&b&&($=A?j(b)>j(J.value):ae?b>J.value:Y>new Date(J.value)),Ae(K.value)&&b&&(G=A?j(b)<j(K.value):ae?b<K.value:Y<new Date(K.value))}if(($||G)&&(V(!!$,J.message,K.message,Me.max,Me.min),!s))return R(F[k].message),F}if((u||f)&&!D&&(Ae(b)||a&&Array.isArray(b))){const $=Ye(u),G=Ye(f),J=!be($.value)&&b.length>+$.value,K=!be(G.value)&&b.length<+G.value;if((J||K)&&(V(J,$.message,G.message),!s))return R(F[k].message),F}if(g&&!D&&Ae(b)){const{value:$,message:G}=Ye(g);if(_t($)&&!b.match($)&&(F[k]={type:Me.pattern,message:G,ref:o,...P(Me.pattern,G)},!s))return R(G),F}if(N){if(Ne(N)){const $=await N(b,e),G=Rr($,E);if(G&&(F[k]={...G,...P(Me.validate,G.message)},!s))return R(G.message),F}else if(ue(N)){let $={};for(const G in N){if(!ge($)&&!s)break;const J=Rr(await N[G](b,e),E,G);J&&($={...J,...P(G,J.message)},R(J.message),s&&(F[k]=$))}if(!ge($)&&(F[k]={ref:E,...$},!s))return F}}return R(!0),F};const Ya={mode:Ee.onSubmit,reValidateMode:Ee.onChange,shouldFocusError:!0};function Xa(r={}){let t={...Ya,...r},e={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ne(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const s={};let n=ue(t.defaultValues)||ue(t.values)?xe(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:xe(n),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...f};const m={array:Nr(),state:Nr()},g=t.criteriaMode===Ee.all,N=d=>x=>{clearTimeout(u),u=setTimeout(d,x)},k=async d=>{if(!t.disabled&&(f.isValid||h.isValid||d)){const x=t.resolver?ge((await X()).errors):await D(s,!0);x!==e.isValid&&m.state.next({isValid:x})}},S=(d,x)=>{!t.disabled&&(f.isValidating||f.validatingFields||h.isValidating||h.validatingFields)&&((d||Array.from(l.mount)).forEach(w=>{w&&(x?oe(e.validatingFields,w,x):he(e.validatingFields,w))}),m.state.next({validatingFields:e.validatingFields,isValidating:!ge(e.validatingFields)}))},y=(d,x=[],w,I,O=!0,C=!0)=>{if(I&&w&&!t.disabled){if(o.action=!0,C&&Array.isArray(M(s,d))){const q=w(M(s,d),I.argA,I.argB);O&&oe(s,d,q)}if(C&&Array.isArray(M(e.errors,d))){const q=w(M(e.errors,d),I.argA,I.argB);O&&oe(e.errors,d,q),Ga(e.errors,d)}if((f.touchedFields||h.touchedFields)&&C&&Array.isArray(M(e.touchedFields,d))){const q=w(M(e.touchedFields,d),I.argA,I.argB);O&&oe(e.touchedFields,d,q)}(f.dirtyFields||h.dirtyFields)&&(e.dirtyFields=st(n,a)),m.state.next({name:d,isDirty:V(d,x),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else oe(a,d,x)},b=(d,x)=>{oe(e.errors,d,x),m.state.next({errors:e.errors})},E=d=>{e.errors=d,m.state.next({errors:e.errors,isValid:!1})},R=(d,x,w,I)=>{const O=M(s,d);if(O){const C=M(a,d,de(w)?M(n,d):w);de(C)||I&&I.defaultChecked||x?oe(a,d,x?C:Tr(O._f)):J(d,C),o.mount&&k()}},F=(d,x,w,I,O)=>{let C=!1,q=!1;const ie={name:d};if(!t.disabled){if(!w||I){(f.isDirty||h.isDirty)&&(q=e.isDirty,e.isDirty=ie.isDirty=V(),C=q!==ie.isDirty);const ce=Pe(M(n,d),x);q=!!M(e.dirtyFields,d),ce?he(e.dirtyFields,d):oe(e.dirtyFields,d,!0),ie.dirtyFields=e.dirtyFields,C=C||(f.dirtyFields||h.dirtyFields)&&q!==!ce}if(w){const ce=M(e.touchedFields,d);ce||(oe(e.touchedFields,d,w),ie.touchedFields=e.touchedFields,C=C||(f.touchedFields||h.touchedFields)&&ce!==w)}C&&O&&m.state.next(ie)}return C?ie:{}},Z=(d,x,w,I)=>{const O=M(e.errors,d),C=(f.isValid||h.isValid)&&we(x)&&e.isValid!==x;if(t.delayError&&w?(c=N(()=>b(d,w)),c(t.delayError)):(clearTimeout(u),c=null,w?oe(e.errors,d,w):he(e.errors,d)),(w?!Pe(O,w):O)||!ge(I)||C){const q={...I,...C&&we(x)?{isValid:x}:{},errors:e.errors,name:d};e={...e,...q},m.state.next(q)}},X=async d=>{S(d,!0);const x=await t.resolver(a,t.context,za(d||l.mount,s,t.criteriaMode,t.shouldUseNativeValidation));return S(d),x},_=async d=>{const{errors:x}=await X(d);if(d)for(const w of d){const I=M(x,w);I?oe(e.errors,w,I):he(e.errors,w)}else e.errors=x;return x},D=async(d,x,w={valid:!0})=>{for(const I in d){const O=d[I];if(O){const{_f:C,...q}=O;if(C){const ie=l.array.has(C.name),ce=O._f&&Ua(O._f);ce&&f.validatingFields&&S([I],!0);const ke=await Vr(O,l.disabled,a,g,t.shouldUseNativeValidation&&!x,ie);if(ce&&f.validatingFields&&S([I]),ke[C.name]&&(w.valid=!1,x))break;!x&&(M(ke,C.name)?ie?Ha(e.errors,ke,C.name):oe(e.errors,C.name,ke[C.name]):he(e.errors,C.name))}!ge(q)&&await D(q,x,w)}}return w.valid},P=()=>{for(const d of l.unMount){const x=M(s,d);x&&(x._f.refs?x._f.refs.every(w=>!Vt(w)):!Vt(x._f.ref))&&Q(d)}l.unMount=new Set},V=(d,x)=>!t.disabled&&(d&&x&&oe(a,d,x),!Pe(p(),n)),$=(d,x,w)=>Es(d,l,{...o.mount?a:de(x)?n:Ae(d)?{[d]:x}:x},w,x),G=d=>Tt(M(o.mount?a:n,d,t.shouldUnregister?M(n,d,[]):[])),J=(d,x,w={})=>{const I=M(s,d);let O=x;if(I){const C=I._f;C&&(!C.disabled&&oe(a,d,As(x,C)),O=Et(C.ref)&&be(x)?"":x,Ss(C.ref)?[...C.ref.options].forEach(q=>q.selected=O.includes(q.value)):C.refs?lt(C.ref)?C.refs.forEach(q=>{(!q.defaultChecked||!q.disabled)&&(Array.isArray(O)?q.checked=!!O.find(ie=>ie===q.value):q.checked=O===q.value||!!O)}):C.refs.forEach(q=>q.checked=q.value===O):nr(C.ref)?C.ref.value="":(C.ref.value=O,C.ref.type||m.state.next({name:d,values:xe(a)})))}(w.shouldDirty||w.shouldTouch)&&F(d,O,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&ae(d)},K=(d,x,w)=>{for(const I in x){if(!x.hasOwnProperty(I))return;const O=x[I],C=`${d}.${I}`,q=M(s,C);(l.array.has(d)||ue(O)||q&&!q._f)&&!Be(O)?K(C,O,w):J(C,O,w)}},Y=(d,x,w={})=>{const I=M(s,d),O=l.array.has(d),C=xe(x);oe(a,d,C),O?(m.array.next({name:d,values:xe(a)}),(f.isDirty||f.dirtyFields||h.isDirty||h.dirtyFields)&&w.shouldDirty&&m.state.next({name:d,dirtyFields:st(n,a),isDirty:V(d,C)})):I&&!I._f&&!be(C)?K(d,C,w):J(d,C,w),Or(d,l)&&m.state.next({...e}),m.state.next({name:o.mount?d:void 0,values:xe(a)})},j=async d=>{o.mount=!0;const x=d.target;let w=x.name,I=!0;const O=M(s,w),C=ce=>{I=Number.isNaN(ce)||Be(ce)&&isNaN(ce.getTime())||Pe(ce,M(a,w,ce))},q=Cr(t.mode),ie=Cr(t.reValidateMode);if(O){let ce,ke;const ut=x.type?Tr(O._f):ys(d),De=d.type===jt.BLUR||d.type===jt.FOCUS_OUT,bn=!Ba(O._f)&&!t.resolver&&!M(e.errors,w)&&!O._f.deps||qa(De,M(e.touchedFields,w),e.isSubmitted,ie,q),At=Or(w,l,De);oe(a,w,ut),De?(O._f.onBlur&&O._f.onBlur(d),c&&c(0)):O._f.onChange&&O._f.onChange(d);const Ot=F(w,ut,De),yn=!ge(Ot)||At;if(!De&&m.state.next({name:w,type:d.type,values:xe(a)}),bn)return(f.isValid||h.isValid)&&(t.mode==="onBlur"?De&&k():De||k()),yn&&m.state.next({name:w,...At?{}:Ot});if(!De&&At&&m.state.next({...e}),t.resolver){const{errors:pr}=await X([w]);if(C(ut),I){const vn=Mr(e.errors,s,w),xr=Mr(pr,s,vn.name||w);ce=xr.error,w=xr.name,ke=ge(pr)}}else S([w],!0),ce=(await Vr(O,l.disabled,a,g,t.shouldUseNativeValidation))[w],S([w]),C(ut),I&&(ce?ke=!1:(f.isValid||h.isValid)&&(ke=await D(s,!0)));I&&(O._f.deps&&ae(O._f.deps),Z(w,ke,ce,Ot))}},A=(d,x)=>{if(M(e.errors,x)&&d.focus)return d.focus(),1},ae=async(d,x={})=>{let w,I;const O=at(d);if(t.resolver){const C=await _(de(d)?d:O);w=ge(C),I=d?!O.some(q=>M(C,q)):w}else d?(I=(await Promise.all(O.map(async C=>{const q=M(s,C);return await D(q&&q._f?{[C]:q}:q)}))).every(Boolean),!(!I&&!e.isValid)&&k()):I=w=await D(s);return m.state.next({...!Ae(d)||(f.isValid||h.isValid)&&w!==e.isValid?{}:{name:d},...t.resolver||!d?{isValid:w}:{},errors:e.errors}),x.shouldFocus&&!I&&ot(s,A,d?O:l.mount),I},p=d=>{const x={...o.mount?a:n};return de(d)?x:Ae(d)?M(x,d):d.map(w=>M(x,w))},T=(d,x)=>({invalid:!!M((x||e).errors,d),isDirty:!!M((x||e).dirtyFields,d),error:M((x||e).errors,d),isValidating:!!M(e.validatingFields,d),isTouched:!!M((x||e).touchedFields,d)}),z=d=>{d&&at(d).forEach(x=>he(e.errors,x)),m.state.next({errors:d?e.errors:{}})},H=(d,x,w)=>{const I=(M(s,d,{_f:{}})._f||{}).ref,O=M(e.errors,d)||{},{ref:C,message:q,type:ie,...ce}=O;oe(e.errors,d,{...ce,...x,ref:I}),m.state.next({name:d,errors:e.errors,isValid:!1}),w&&w.shouldFocus&&I&&I.focus&&I.focus()},re=(d,x)=>Ne(d)?m.state.subscribe({next:w=>d($(void 0,x),w)}):$(d,x,!0),le=d=>m.state.subscribe({next:x=>{Wa(d.name,x.name,d.exact)&&Za(x,d.formState||f,gn,d.reRenderRoot)&&d.callback({values:{...a},...e,...x})}}).unsubscribe,ee=d=>(o.mount=!0,h={...h,...d.formState},le({...d,formState:h})),Q=(d,x={})=>{for(const w of d?at(d):l.mount)l.mount.delete(w),l.array.delete(w),x.keepValue||(he(s,w),he(a,w)),!x.keepError&&he(e.errors,w),!x.keepDirty&&he(e.dirtyFields,w),!x.keepTouched&&he(e.touchedFields,w),!x.keepIsValidating&&he(e.validatingFields,w),!t.shouldUnregister&&!x.keepDefaultValue&&he(n,w);m.state.next({values:xe(a)}),m.state.next({...e,...x.keepDirty?{isDirty:V()}:{}}),!x.keepIsValid&&k()},ne=({disabled:d,name:x})=>{(we(d)&&o.mount||d||l.disabled.has(x))&&(d?l.disabled.add(x):l.disabled.delete(x))},se=(d,x={})=>{let w=M(s,d);const I=we(x.disabled)||we(t.disabled);return oe(s,d,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:d}},name:d,mount:!0,...x}}),l.mount.add(d),w?ne({disabled:we(x.disabled)?x.disabled:t.disabled,name:d}):R(d,!0,x.value),{...I?{disabled:x.disabled||t.disabled}:{},...t.progressive?{required:!!x.required,min:nt(x.min),max:nt(x.max),minLength:nt(x.minLength),maxLength:nt(x.maxLength),pattern:nt(x.pattern)}:{},name:d,onChange:j,onBlur:j,ref:O=>{if(O){se(d,x),w=M(s,d);const C=de(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,q=Ia(C),ie=w._f.refs||[];if(q?ie.find(ce=>ce===C):C===w._f.ref)return;oe(s,d,{_f:{...w._f,...q?{refs:[...ie.filter(Vt),C,...Array.isArray(M(n,d))?[{}]:[]],ref:{type:C.type,name:d}}:{ref:C}}}),R(d,!1,void 0,C)}else w=M(s,d,{}),w._f&&(w._f.mount=!1),(t.shouldUnregister||x.shouldUnregister)&&!(vs(l.array,d)&&o.action)&&l.unMount.add(d)}}},me=()=>t.shouldFocusError&&ot(s,A,l.mount),Se=d=>{we(d)&&(m.state.next({disabled:d}),ot(s,(x,w)=>{const I=M(s,w);I&&(x.disabled=I._f.disabled||d,Array.isArray(I._f.refs)&&I._f.refs.forEach(O=>{O.disabled=I._f.disabled||d}))},0,!1))},Fe=(d,x)=>async w=>{let I;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let O=xe(a);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:C,values:q}=await X();e.errors=C,O=q}else await D(s);if(l.disabled.size)for(const C of l.disabled)oe(O,C,void 0);if(he(e.errors,"root"),ge(e.errors)){m.state.next({errors:{}});try{await d(O,w)}catch(C){I=C}}else x&&await x({...e.errors},w),me(),setTimeout(me);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ge(e.errors)&&!I,submitCount:e.submitCount+1,errors:e.errors}),I)throw I},pn=(d,x={})=>{M(s,d)&&(de(x.defaultValue)?Y(d,xe(M(n,d))):(Y(d,x.defaultValue),oe(n,d,xe(x.defaultValue))),x.keepTouched||he(e.touchedFields,d),x.keepDirty||(he(e.dirtyFields,d),e.isDirty=x.defaultValue?V(d,xe(M(n,d))):V()),x.keepError||(he(e.errors,d),f.isValid&&k()),m.state.next({...e}))},fr=(d,x={})=>{const w=d?xe(d):n,I=xe(w),O=ge(d),C=O?n:I;if(x.keepDefaultValues||(n=w),!x.keepValues){if(x.keepDirtyValues){const q=new Set([...l.mount,...Object.keys(st(n,a))]);for(const ie of Array.from(q))M(e.dirtyFields,ie)?oe(C,ie,M(a,ie)):Y(ie,M(C,ie))}else{if(er&&de(d))for(const q of l.mount){const ie=M(s,q);if(ie&&ie._f){const ce=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(Et(ce)){const ke=ce.closest("form");if(ke){ke.reset();break}}}}for(const q of l.mount)Y(q,M(C,q))}a=xe(C),m.array.next({values:{...C}}),m.state.next({values:{...C}})}l={mount:x.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!x.keepIsValid||!!x.keepDirtyValues,o.watch=!!t.shouldUnregister,m.state.next({submitCount:x.keepSubmitCount?e.submitCount:0,isDirty:O?!1:x.keepDirty?e.isDirty:!!(x.keepDefaultValues&&!Pe(d,n)),isSubmitted:x.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:O?{}:x.keepDirtyValues?x.keepDefaultValues&&a?st(n,a):e.dirtyFields:x.keepDefaultValues&&d?st(n,d):x.keepDirty?e.dirtyFields:{},touchedFields:x.keepTouched?e.touchedFields:{},errors:x.keepErrors?e.errors:{},isSubmitSuccessful:x.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},hr=(d,x)=>fr(Ne(d)?d(a):d,x),xn=(d,x={})=>{const w=M(s,d),I=w&&w._f;if(I){const O=I.refs?I.refs[0]:I.ref;O.focus&&(O.focus(),x.shouldSelect&&Ne(O.select)&&O.select())}},gn=d=>{e={...e,...d}},mr={control:{register:se,unregister:Q,getFieldState:T,handleSubmit:Fe,setError:H,_subscribe:le,_runSchema:X,_getWatch:$,_getDirty:V,_setValid:k,_setFieldArray:y,_setDisabledField:ne,_setErrors:E,_getFieldArray:G,_reset:fr,_resetDefaultValues:()=>Ne(t.defaultValues)&&t.defaultValues().then(d=>{hr(d,t.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:P,_disableForm:Se,_subjects:m,_proxyFormState:f,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(d){o=d},get _defaultValues(){return n},get _names(){return l},set _names(d){l=d},get _formState(){return e},get _options(){return t},set _options(d){t={...t,...d}}},subscribe:ee,trigger:ae,register:se,handleSubmit:Fe,watch:re,setValue:Y,getValues:p,reset:hr,resetField:pn,clearErrors:z,unregister:Q,setError:H,setFocus:xn,getFieldState:T};return{...mr,formControl:mr}}function Ja(r={}){const t=v.useRef(void 0),e=v.useRef(void 0),[s,n]=v.useState({isDirty:!1,isValidating:!1,isLoading:Ne(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,isReady:!1,defaultValues:Ne(r.defaultValues)?void 0:r.defaultValues});t.current||(t.current={...r.formControl?r.formControl:Xa(r),formState:s},r.formControl&&r.defaultValues&&!Ne(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const a=t.current.control;return a._options=r,rr(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(l=>({...l,isReady:!0})),a._formState.isReady=!0,o},[a]),v.useEffect(()=>a._disableForm(r.disabled),[a,r.disabled]),v.useEffect(()=>{r.mode&&(a._options.mode=r.mode),r.reValidateMode&&(a._options.reValidateMode=r.reValidateMode),r.errors&&!ge(r.errors)&&a._setErrors(r.errors)},[a,r.errors,r.mode,r.reValidateMode]),v.useEffect(()=>{r.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,r.shouldUnregister]),v.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),v.useEffect(()=>{r.values&&!Pe(r.values,e.current)?(a._reset(r.values,a._options.resetOptions),e.current=r.values,n(o=>({...o}))):a._resetDefaultValues()},[a,r.values]),v.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=js(s,a),t.current}const Ms={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Ka={sm:"h-6",md:"h-10",lg:"h-12"},Qa={sm:"px-2",md:"px-2.5",lg:"px-3"};function $r(r,t,e,s,n,a,o){const l=t?"datetime-local":"date",c=L("box-border w-full rounded-lg border outline-none transition font-[var(--font-primary)]",Ms[e],Ka[e],Qa[e],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]"),h=Ma(c,n?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-disabled)] cursor-not-allowed opacity-60":"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",o);return i.jsxs(i.Fragment,{children:[i.jsx("input",{id:r,type:l,disabled:n,"aria-disabled":n,"data-disabled":n?"true":"false",...s,className:h}),i.jsx("div",{children:a!=null&&a.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Rs(r){const{control:t,name:e,rules:s,defaultValue:n,showTime:a=!1,size:o="sm",width:l="100%",label:c,labelHidden:u=!1,hasError:f=!1,errorMessage:h="",disabled:m=!1,className:g,onChange:N}=r,k=v.useId(),S=e||k;return i.jsxs("div",{className:L("flex flex-col",g),style:{width:l,maxWidth:"100%"},children:[c&&i.jsx("label",{htmlFor:S,className:L("pb-2 text-[var(--color-ds-text-primary)]",Ms[o],u&&"sr-only"),children:c}),t&&e?i.jsx(_e,{name:e,control:t,rules:s,defaultValue:n,render:({field:y,fieldState:b})=>$r(S,a,o,{value:y.value,onChange:y.onChange,onBlur:y.onBlur},m,b.error,g)}):$r(S,a,o,{defaultValue:n,onChange:N},m,f?{message:h}:void 0,g)]})}const eo=({trigger:r,items:t,align:e="left",className:s})=>{const[n,a]=v.useState(!1),o=v.useRef(null),l=v.useRef([]);v.useEffect(()=>{const u=f=>{o.current&&!o.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const c=u=>{var h,m;const f=l.current.findIndex(g=>g===document.activeElement);if(u.key==="Escape")a(!1);else if(u.key==="ArrowDown"){u.preventDefault();const g=(f+1)%t.length;(h=l.current[g])==null||h.focus()}else if(u.key==="ArrowUp"){u.preventDefault();const g=(f-1+t.length)%t.length;(m=l.current[g])==null||m.focus()}};return i.jsxs("div",{className:L("relative inline-block",s),ref:o,children:[i.jsx("button",{type:"button",onClick:()=>a(u=>!u),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":n,children:r}),n&&i.jsx("div",{role:"menu","aria-orientation":"vertical",className:L("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",e==="right"?"right-0":"left-0"),onKeyDown:c,children:t.map((u,f)=>{const{label:h,onSelect:m,disabled:g,icon:N}=u;return i.jsxs("button",{role:"menuitem",type:"button",disabled:g,ref:k=>{l.current[f]=k},className:L("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",g?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{g||(m(),a(!1))},children:[N&&i.jsx(N,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),h]},f)})})]})},to=(r,t,e,s)=>{var a,o,l,c;const n=[e,{code:t,...s||{}}];if((o=(a=r==null?void 0:r.services)==null?void 0:a.logger)!=null&&o.forward)return r.services.logger.forward(n,"warn","react-i18next::",!0);Ze(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),(c=(l=r==null?void 0:r.services)==null?void 0:l.logger)!=null&&c.warn?r.services.logger.warn(...n):console!=null&&console.warn&&console.warn(...n)},Dr={},Wt=(r,t,e,s)=>{Ze(e)&&Dr[e]||(Ze(e)&&(Dr[e]=new Date),to(r,t,e,s))},Vs=(r,t)=>()=>{if(r.isInitialized)t();else{const e=()=>{setTimeout(()=>{r.off("initialized",e)},0),t()};r.on("initialized",e)}},qt=(r,t,e)=>{r.loadNamespaces(t,Vs(r,e))},Ir=(r,t,e,s)=>{if(Ze(e)&&(e=[e]),r.options.preload&&r.options.preload.indexOf(t)>-1)return qt(r,e,s);e.forEach(n=>{r.options.ns.indexOf(n)<0&&r.options.ns.push(n)}),r.loadLanguages(t,Vs(r,s))},ro=(r,t,e={})=>!t.languages||!t.languages.length?(Wt(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(r,{lng:e.lng,precheck:(s,n)=>{var a;if(((a=e.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!n(s.isLanguageChangingTo,r))return!1}}),Ze=r=>typeof r=="string",so=r=>typeof r=="object"&&r!==null,no=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ao={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},oo=r=>ao[r],io=r=>r.replace(no,oo);let lo={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:io};const co=()=>lo;let uo;const fo=()=>uo,ho=v.createContext();class mo{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const po=(r,t)=>{const e=v.useRef();return v.useEffect(()=>{e.current=r},[r,t]),e.current},$s=(r,t,e,s)=>r.getFixedT(t,e,s),xo=(r,t,e,s)=>v.useCallback($s(r,t,e,s),[r,t,e,s]),or=(r,t={})=>{var R,F,Z,X;const{i18n:e}=t,{i18n:s,defaultNS:n}=v.useContext(ho)||{},a=e||s||fo();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new mo),!a){Wt(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const _=(P,V)=>Ze(V)?V:so(V)&&Ze(V.defaultValue)?V.defaultValue:Array.isArray(P)?P[P.length-1]:P,D=[_,{},!1];return D.t=_,D.i18n={},D.ready=!1,D}(R=a.options.react)!=null&&R.wait&&Wt(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...co(),...a.options.react,...t},{useSuspense:l,keyPrefix:c}=o;let u=n||((F=a.options)==null?void 0:F.defaultNS);u=Ze(u)?[u]:u||["translation"],(X=(Z=a.reportNamespaces).addUsedNamespaces)==null||X.call(Z,u);const f=(a.isInitialized||a.initializedStoreOnce)&&u.every(_=>ro(_,a,o)),h=xo(a,t.lng||null,o.nsMode==="fallback"?u:u[0],c),m=()=>h,g=()=>$s(a,t.lng||null,o.nsMode==="fallback"?u:u[0],c),[N,k]=v.useState(m);let S=u.join();t.lng&&(S=`${t.lng}${S}`);const y=po(S),b=v.useRef(!0);v.useEffect(()=>{const{bindI18n:_,bindI18nStore:D}=o;b.current=!0,!f&&!l&&(t.lng?Ir(a,t.lng,u,()=>{b.current&&k(g)}):qt(a,u,()=>{b.current&&k(g)})),f&&y&&y!==S&&b.current&&k(g);const P=()=>{b.current&&k(g)};return _&&(a==null||a.on(_,P)),D&&(a==null||a.store.on(D,P)),()=>{b.current=!1,a&&(_==null||_.split(" ").forEach(V=>a.off(V,P))),D&&a&&D.split(" ").forEach(V=>a.store.off(V,P))}},[a,S]),v.useEffect(()=>{b.current&&f&&k(m)},[a,c,f]);const E=[N,a,f];if(E.t=N,E.i18n=a,E.ready=f,f||!f&&!l)return E;throw new Promise(_=>{t.lng?Ir(a,t.lng,u,()=>_()):qt(a,u,()=>_())})},Gt={sm:"text-sm",md:"text-base",lg:"text-lg"};function Lr(r,t,e,s,n,a,o,l,c){const{t:u}=or(),f=v.useRef(null),h=typeof s=="number"&&t.length>=s,m=()=>{var b;!o&&!h&&((b=f.current)==null||b.click())},g=b=>{const E=b.target.files;if(!E)return;const R=Array.from(E);let F=t.concat(R);s&&(F=F.slice(0,s)),e(F),b.target.value=""},N=b=>{if(b.preventDefault(),o||h)return;const E=Array.from(b.dataTransfer.files);let R=t.concat(E);s&&(R=R.slice(0,s)),e(R)},k=b=>{b.preventDefault()},S=b=>{const E=URL.createObjectURL(b);window.open(E)},y=b=>{const E=t.filter((R,F)=>F!==b);e(E)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"self-start mb-4 w-auto",children:i.jsx($e,{type:"button",variant:"outline",size:a,icon:vr,onClick:m,disabled:o||h,children:u("ds.fileUploader.browse","Browse files")})}),!h&&i.jsxs("div",{className:L("relative flex bg-[var(--color-ds-background-page)] flex-col items-center justify-center border-2 border-dashed border-[var(--color-ds-border-muted)] rounded-lg p-4",o?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",Gt[a],c),onDrop:N,onDragOver:k,children:[i.jsx("input",{id:r,type:"file",ref:f,className:"hidden",multiple:s!==1,accept:n,onChange:g,disabled:o}),i.jsx(Ce,{component:Pn,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),i.jsx("p",{className:"mt-3 text-[var(--color-ds-text-secondary)] text-center",children:u("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),t.length>0&&i.jsx("ul",{className:"mt-4 space-y-1",children:t.map((b,E)=>i.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(vr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),i.jsx("span",{className:"truncate pr-2",children:b.name})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx($e,{variant:"ghost",size:"sm",icon:is,ariaLabel:u("ds.fileUploader.view","View"),onClick:()=>S(b)}),i.jsx($e,{variant:"ghost",size:"sm",icon:Kt,ariaLabel:u("ds.fileUploader.remove","Remove"),onClick:()=>y(E)})]})]},E))}),i.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Ds(r){const{control:t,name:e,rules:s,defaultValue:n,maxFiles:a,accept:o,size:l="sm",width:c="100%",label:u,labelHidden:f=!1,disabled:h=!1,hasError:m=!1,errorMessage:g="",className:N}=r,k=v.useId(),S=e||k;if(t&&e)return i.jsxs("div",{className:L("flex flex-col",N),style:{width:c},children:[u&&i.jsx("label",{htmlFor:S,className:L("pb-[10px] text-[var(--color-ds-text-primary)]",Gt[l],f&&"sr-only"),children:u}),i.jsx(_e,{name:e,control:t,rules:s,defaultValue:n instanceof FileList?Array.from(n):n||[],render:({field:E,fieldState:R})=>Lr(S,E.value,F=>E.onChange(F),a,o,l,h,R.error,N)})]});const[y,b]=v.useState(n instanceof FileList?Array.from(n):n||[]);return i.jsxs("div",{className:L("flex flex-col",N),style:{width:c},children:[u&&i.jsx("label",{htmlFor:S,className:L("pb-[10px] text-[var(--color-ds-text-primary)]",Gt[l],f&&"sr-only"),children:u}),Lr(S,y,b,a,o,l,h,m?{message:g}:void 0,N)]})}const qe=({count:r=1,width:t,height:e="1em",variant:s="rect",className:n})=>{const a=Array.from({length:r});return i.jsx(i.Fragment,{children:a.map((o,l)=>i.jsx("span",{role:"status","aria-label":"Cargando...",className:L("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",n),style:{width:t??"auto",height:e}},l))})},pt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},go={sm:"h-6",md:"h-10",lg:"h-12"},bo={sm:"px-2",md:"px-2.5",lg:"px-3"},Pr={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},yo={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Ct({id:r,type:t="text",size:e="sm",width:s="100%",label:n,labelHidden:a=!1,hasError:o=!1,errorMessage:l="",prefixIcon:c,suffixIcon:u,separator:f,suffixButton:h,disabled:m=!1,control:g,name:N,rules:k,defaultValue:S,loading:y=!1,className:b,...E}){const R=v.useId(),[F,Z]=v.useState(!1),X=r||R,_=t==="password",P=c??(t==="number"?qn:void 0),V=_?F?Bn:is:u,$=L("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",pt[e],go[e],bo[e],o?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]","bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]","disabled:bg-[var(--color-ds-background-disabled)]","disabled:border-[var(--color-ds-border-muted)]","disabled:text-[var(--color-ds-text-disabled)]","disabled:cursor-not-allowed");return y?i.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!a&&n&&i.jsx("label",{htmlFor:X,className:L("pb-2",pt[e]),children:n}),i.jsx(qe,{width:"100%",height:yo[e],variant:"rect",className:"rounded-lg"}),i.jsx("div",{className:"min-h-[18px] w-full",children:i.jsx("span",{"aria-hidden":"true",children:" "})})]}):g&&N?i.jsx(_e,{name:N,control:g,rules:k,defaultValue:S,render:({field:G,fieldState:J})=>i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&i.jsx("label",{htmlFor:X,className:L("pb-2 text-[var(--color-ds-text-primary)]",pt[e]),children:n}),i.jsxs("div",{className:"relative flex items-center w-full",children:[P&&i.jsx("div",{className:L("absolute left-0 flex items-center h-full",Pr[e]),children:i.jsx(Ce,{component:P,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...G,id:X,type:_?F?"text":"password":t,disabled:m,"aria-invalid":!!J.error,className:L($,P&&"pl-9",V&&"pr-9",b),onInvalid:K=>K.preventDefault(),style:_&&!F?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),h&&i.jsx("div",{className:"flex items-center h-full pr-2",children:h}),V&&i.jsx("button",{type:"button",onClick:()=>Z(K=>!K),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:V,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:J.error?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:J.error.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}):i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&i.jsx("label",{htmlFor:X,className:L("pb-2 text-[var(--color-ds-text-primary)]",pt[e]),children:n}),i.jsxs("div",{className:"relative flex items-center w-full",children:[P&&i.jsx("div",{className:L("absolute left-0 flex items-center h-full",Pr[e]),children:i.jsx(Ce,{component:P,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...E,id:X,type:_?F?"text":"password":t,disabled:m,"aria-invalid":o,className:L($,P&&"pl-9",V&&"pr-9",b),onInvalid:G=>G.preventDefault(),style:_&&!F?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),h&&i.jsx("div",{className:"flex items-center h-full",children:h}),V&&i.jsx("button",{type:"button",onClick:()=>Z(G=>!G),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:V,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:o&&l?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}const vo={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},$t=400,xt=8,Is=({children:r,size:t="sm",position:e="top",className:s})=>{const[n,a]=v.useState(!1),[o,l]=v.useState({x:0,y:0}),c=v.useRef(null),u=v.useId();v.useEffect(()=>{if(n&&c.current){const m=c.current.getBoundingClientRect();let g=0,N=0;switch(e){case"top":g=m.left+m.width/2-$t/2,N=m.top-xt;break;case"bottom":g=m.left+m.width/2-$t/2,N=m.bottom+xt;break;case"left":g=m.left-$t-xt,N=m.top+m.height/2;break;case"right":g=m.right+xt,N=m.top+m.height/2;break}l({x:g,y:N})}},[n,e]);const f=()=>typeof r=="string"?i.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):i.jsx(i.Fragment,{children:r}),h=n?i.jsx("div",{id:u,role:"tooltip",className:L("fixed z-50 w-[250px] bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)] text-ds-sm rounded p-2 shadow-lg","pointer-events-none"),style:{top:`${o.y}px`,left:`${o.x}px`,transform:e==="left"||e==="right"?"translateY(-50%)":e==="top"?"translateY(-100%)":void 0},children:f()}):null;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button","aria-describedby":u,ref:c,className:L("inline-flex items-center justify-center focus:outline-none",vo[t],"text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]",s),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:i.jsx(Hn,{className:"w-full h-full"})}),ns.createPortal(h,document.body)]})};function wo({name:r,label:t,type:e="text",size:s="sm",width:n,placeholder:a,validation:o,loadingDefaults:l,disabled:c,info:u}){var S;const{control:f,formState:{errors:h}}=ct(),m=!!h[r],g=((S=h[r])==null?void 0:S.message)||"",N="relative",k=n??"w-full";return i.jsxs("div",{className:N,children:[i.jsx(_e,{name:r,control:f,rules:o,render:({field:y})=>i.jsx(Ct,{label:t,size:s,width:k,placeholder:a,hasError:m,errorMessage:g,loading:l,type:e,...y,disabled:c})}),u&&i.jsx(Is,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:u})]})}const ir=v.memo(wo);ir.displayName="FormFieldInput";function ko({title:r,headerButtons:t,children:e,className:s}){return i.jsxs("div",{className:L("flex flex-col h-full",s),children:[i.jsxs("div",{className:"flex items-center justify-between py-4",children:[i.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
23
23
  text-[var(--color-ds-text-on-accent)] \r
24
24
  rounded-tr-[20px] \r
25
25
  pl-4 pr-10\r
26
- text-ds-lg`,children:r}),e&&o.jsx("div",{className:"flex items-center space-x-2",children:e})]}),o.jsx("main",{className:"flex-1 overflow-auto",children:t})]})}function os({options:r,value:e,onChange:t,children:s}){const n=v.useRef(null),[a,i]=v.useState({left:0,width:0});return v.useLayoutEffect(()=>{const l=n.current;if(!l)return;const c=()=>{const d=r.findIndex(S=>S.value===e);if(d<0)return;const f=l.children[d],h=f.querySelector("span"),m=(h==null?void 0:h.offsetWidth)??f.offsetWidth,g=f.offsetWidth,j=f.offsetLeft+(g-m)/2;i({left:j,width:m})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[e,r]),o.jsxs("div",{children:[o.jsxs("div",{className:"relative",children:[o.jsx("ul",{ref:n,role:"tablist",className:"flex justify-center overflow-x-auto border-b border-[var(--color-ds-border-default-50)]",children:r.map(l=>{const c=l.value===e;return o.jsx("li",{role:"tab","aria-selected":c,onClick:()=>t(l.value),className:R("cursor-pointer whitespace-nowrap px-4 py-2 transition-colors duration-150 ease-in-out",c?"text-[var(--color-ds-background-accent)]":"text-[var(--color-ds-text-primary)]"),children:o.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),o.jsx("span",{className:"absolute bottom-0 h-1 bg-[var(--color-ds-background-accent)] transition-all duration-200 ease-in-out rounded-t-full",style:{left:a.left,width:a.width}})]}),o.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[e]})]})}const Ct={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ha={sm:"h-6",md:"h-10",lg:"h-12"},ma={sm:"px-2",md:"px-2.5",lg:"px-3"},vr={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function yr(r,e,t,s,n,a,i,l,c){return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"relative flex items-center w-full",children:[o.jsx("select",{id:r,...s,disabled:n,className:R("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Ct[t],ha[t],ma[t],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",n?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-primary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]",l),children:e.map(d=>o.jsx("option",{value:d.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:d.label},d.value))}),c&&o.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!i&&o.jsx("div",{className:"min-h-[18px] w-full",children:a!=null&&a.message?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Xe(r){const{control:e,name:t,rules:s,defaultValue:n,options:a=[],loadOptions:i,reloadDeps:l=[],value:c,onChange:d,size:f="sm",width:h="100%",label:m,labelHidden:g=!1,hasError:_=!1,errorMessage:j="",disableErrorPlaceholder:S=!1,disabled:y=!1,className:b,suffixButton:E}=r,V=v.useId(),T=t||V,[B,W]=v.useState(a),[z,L]=v.useState(!!i);if(v.useEffect(()=>{i&&(L(!0),i().then(I=>W(I)).finally(()=>L(!1)))},[i,...l]),v.useEffect(()=>{!e&&B.length>0&&(c===void 0||c===""||!B.some(I=>I.value===c))&&(d==null||d(B[0].value))},[B,c,d,e]),e&&t){const{field:I,fieldState:A}=Hr({name:t,control:e,rules:s,defaultValue:n});return v.useEffect(()=>{if(!z&&B.length>0){const D=I.value;(D===void 0||!B.some(Z=>Z.value===D))&&I.onChange(B[0].value)}},[B,z,I]),o.jsxs("div",{className:R("flex flex-col",b),style:{width:h,maxWidth:"100%"},children:[m&&o.jsx("label",{htmlFor:T,className:R("pb-2 text-[var(--color-ds-text-primary)]",Ct[f],g&&"sr-only"),children:m}),z?o.jsx(Me,{width:"100%",height:vr[f],variant:"rect",className:"rounded-lg"}):yr(T,B,f,{value:I.value,onChange:D=>I.onChange(D.target.value)},y,A.error,S,b,E)]})}return o.jsxs("div",{className:R("flex flex-col",b),style:{width:h,maxWidth:"100%"},children:[m&&o.jsx("label",{htmlFor:T,className:R("pb-2 text-[var(--color-ds-text-primary)]",Ct[f],g&&"sr-only"),children:m}),z?o.jsx(Me,{width:"100%",height:vr[f],variant:"rect",className:"rounded-lg"}):yr(T,B,f,{value:c,onChange:I=>d==null?void 0:d(I.target.value)},y,_?{message:j}:void 0,S,b,E)]})}const wr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function ls({groupLabel:r,inputs:e=[],separator:t=o.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:n,showVisibleLabel:a=!1,size:i="sm",width:l}){const c=e.length;return o.jsxs("div",{className:R("flex flex-col",n),style:l?{width:l}:void 0,children:[o.jsx("label",{className:R("sr-only pb-2",wr[i]),children:r}),a&&o.jsx("label",{className:R("pb-2",wr[i]),children:r}),o.jsx("div",{className:"flex items-center flex-nowrap",children:e.map((d,f)=>{const{width:h,className:m,options:g,loadOptions:_,...j}=d,S=Array.isArray(g)||typeof _=="function";let y="rounded-lg";!s&&c>1&&(f===0?y="rounded-l-lg rounded-r-none":f===c-1?y="rounded-r-lg rounded-l-none":y="rounded-none");const b=R("inline-flex items-center flex-shrink-0 overflow-hidden",typeof h=="string"&&h.startsWith("w-")?h:void 0),E=typeof h=="string"&&!h.startsWith("w-")?{width:h}:void 0,V=R(m,y);return o.jsxs("div",{className:b,style:E,children:[S?o.jsx(Xe,{...j,size:i,className:V,options:g,loadOptions:_}):o.jsx(bt,{...j,size:i,className:V}),s&&f<c-1&&t]},f)})})]})}const jr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},xa={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function cs({groupLabel:r,options:e,control:t,name:s,rules:n,defaultValue:a,multiple:i=!0,size:l="sm",vertical:c=!0,className:d,showVisibleLabel:f=!0}){return o.jsx(je,{name:s,control:t,rules:n,defaultValue:a,render:({field:h,fieldState:m})=>{const{value:g,onChange:_}=h;m.error;const j=y=>i?Array.isArray(g)&&g.includes(y):g===y,S=y=>{if(i){const b=Array.isArray(g)?[...g]:[],E=b.indexOf(y);E>=0?b.splice(E,1):b.push(y),_(b)}else _(y)};return o.jsxs("div",{className:R("w-full",d),children:[o.jsx("label",{className:R("sr-only pb-2 text-[var(--color-ds-text-primary)]",jr[l]),children:r}),f&&o.jsx("label",{className:R("block pb-2 text-[var(--color-ds-text-primary)]",jr[l]),children:r}),o.jsx("div",{className:R(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:e.map(y=>o.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[o.jsx("input",{type:i?"checkbox":"radio",name:s,value:y.value,checked:j(y.value),onChange:()=>S(y.value),className:R(xa[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),o.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:y.label})]},y.value))})]})}})}function pa(r){function e(i){var l,c;for(const d of Object.keys(i)){if((l=i[d])!=null&&l.types||(c=i[d])!=null&&c.message)return d;if(typeof i[d]=="object"){const f=e(i[d]);if(f)return`${d}.${f}`}}return null}const t=e(r);if(!t)return;const s=`[name="${t}"]`,n=`[name^="${t}["], [name^="${t}."]`,a=document.querySelector(s)??document.querySelector(n);a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.focus({preventScroll:!0}))}const ga={success:"bg-green-100 border-green-500 text-green-800",error:"bg-red-100 border-red-500 text-red-800",info:"bg-blue-100 border-blue-500 text-blue-800",warning:"bg-yellow-100 border-yellow-500 text-yellow-800"},us=({id:r,message:e,variant:t="info",duration:s=5e3,onClose:n})=>(v.useEffect(()=>{const a=setTimeout(()=>n(r),s);return()=>clearTimeout(a)},[r,s,n]),o.jsxs("div",{className:R("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",ga[t]),role:"alert","aria-live":"assertive",children:[o.jsx("span",{className:"flex-1",children:e}),o.jsx("button",{onClick:()=>n(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let nt;const ba=new Uint8Array(16);function va(){if(!nt&&(nt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nt(ba)}const ue=[];for(let r=0;r<256;++r)ue.push((r+256).toString(16).slice(1));function ya(r,e=0){return ue[r[e+0]]+ue[r[e+1]]+ue[r[e+2]]+ue[r[e+3]]+"-"+ue[r[e+4]]+ue[r[e+5]]+"-"+ue[r[e+6]]+ue[r[e+7]]+"-"+ue[r[e+8]]+ue[r[e+9]]+"-"+ue[r[e+10]]+ue[r[e+11]]+ue[r[e+12]]+ue[r[e+13]]+ue[r[e+14]]+ue[r[e+15]]}const wa=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kr={randomUUID:wa};function ja(r,e,t){if(kr.randomUUID&&!r)return kr.randomUUID();r=r||{};const s=r.random||(r.rng||va)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,ya(s)}const ds=v.createContext(null),fs=()=>{const r=v.useContext(ds);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},ka=({children:r})=>{const[e,t]=v.useState([]),s=(a,i="info",l=5e3)=>{const c=ja();t(d=>[...d,{id:c,message:a,variant:i,duration:l}])},n=a=>{t(i=>i.filter(l=>l.id!==a))};return o.jsxs(ds.Provider,{value:{show:s},children:[r,o.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:e.map(a=>o.jsx(us,{id:a.id,message:a.message,variant:a.variant,duration:a.duration,onClose:n},a.id))})]})},Er=(r,e,t)=>{if(r&&"reportValidity"in r){const s=C(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},hs=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?Er(s.ref,t,r):s&&s.refs&&s.refs.forEach(n=>Er(n,t,r))}},Ea=(r,e)=>{e.shouldUseNativeValidation&&hs(r,e);const t={};for(const s in r){const n=C(e.fields,s),a=Object.assign(r[s]||{},{ref:n&&n.ref});if(_a(e.names||Object.keys(r),s)){const i=Object.assign({},C(t,s));ee(i,"root",a),ee(t,s,i)}else ee(t,s,a)}return t},_a=(r,e)=>{const t=_r(e);return r.some(s=>_r(s).match(`^${t}\\.\\d+`))};function _r(r){return r.replace(/\]|\[/g,"")}function Nr(r,e,t){return t===void 0&&(t={}),function(s,n,a){try{return Promise.resolve(function(i,l){try{var c=(e!=null&&e.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(r[t.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},e,{context:n}))).then(function(d){return a.shouldUseNativeValidation&&hs({},a),{values:t.raw?Object.assign({},s):d,errors:{}}}))}catch(d){return l(d)}return c&&c.then?c.then(void 0,l):c}(0,function(i){if(!i.inner)throw i;return{values:{},errors:Ea((l=i,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(l.inner||[]).reduce(function(d,f){if(d[f.path]||(d[f.path]={message:f.message,type:f.type}),c){var h=d[f.path].types,m=h&&h[f.type];d[f.path]=Yr(f.path,c,d,f.type,m?[].concat(m,f.message):f.message)}return d},{})),a)};var l,c}))}catch(i){return Promise.reject(i)}}}var kt,Fr;function Na(){if(Fr)return kt;Fr=1;function r(y){this._maxSize=y,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(y){return this._values[y]},r.prototype.set=function(y,b){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=b};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,t=/^\d+$/,s=/^\d/,n=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,i=512,l=new r(i),c=new r(i),d=new r(i);kt={Cache:r,split:h,normalizePath:f,setter:function(y){var b=f(y);return c.get(y)||c.set(y,function(V,T){for(var B=0,W=b.length,z=V;B<W-1;){var L=b[B];if(L==="__proto__"||L==="constructor"||L==="prototype")return V;z=z[b[B++]]}z[b[B]]=T})},getter:function(y,b){var E=f(y);return d.get(y)||d.set(y,function(T){for(var B=0,W=E.length;B<W;)if(T!=null||!b)T=T[E[B++]];else return;return T})},join:function(y){return y.reduce(function(b,E){return b+(g(E)||t.test(E)?"["+E+"]":(b?".":"")+E)},"")},forEach:function(y,b,E){m(Array.isArray(y)?y:h(y),b,E)}};function f(y){return l.get(y)||l.set(y,h(y).map(function(b){return b.replace(a,"$2")}))}function h(y){return y.match(e)||[""]}function m(y,b,E){var V=y.length,T,B,W,z;for(B=0;B<V;B++)T=y[B],T&&(S(T)&&(T='"'+T+'"'),z=g(T),W=!z&&/^\d+$/.test(T),b.call(E,T,z,W,B,y))}function g(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function _(y){return y.match(s)&&!y.match(t)}function j(y){return n.test(y)}function S(y){return!g(y)&&(_(y)||j(y))}return kt}var Ve=Na(),Et,Sr;function Fa(){if(Sr)return Et;Sr=1;const r=/[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,e=f=>f.match(r)||[],t=f=>f[0].toUpperCase()+f.slice(1),s=(f,h)=>e(f).join(h).toLowerCase(),n=f=>e(f).reduce((h,m)=>`${h}${h?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return Et={words:e,upperFirst:t,camelCase:n,pascalCase:f=>t(n(f)),snakeCase:f=>s(f,"_"),kebabCase:f=>s(f,"-"),sentenceCase:f=>t(s(f," ")),titleCase:f=>e(f).map(t).join(" ")},Et}var _t=Fa(),at={exports:{}},Tr;function Sa(){if(Tr)return at.exports;Tr=1,at.exports=function(n){return r(e(n),n)},at.exports.array=r;function r(n,a){var i=n.length,l=new Array(i),c={},d=i,f=t(a),h=s(n);for(a.forEach(function(g){if(!h.has(g[0])||!h.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)c[d]||m(n[d],d,new Set);return l;function m(g,_,j){if(j.has(g)){var S;try{S=", node was:"+JSON.stringify(g)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!h.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!c[_]){c[_]=!0;var y=f.get(g)||new Set;if(y=Array.from(y),_=y.length){j.add(g);do{var b=y[--_];m(b,h.get(b),j)}while(_);j.delete(g)}l[--i]=g}}}function e(n){for(var a=new Set,i=0,l=n.length;i<l;i++){var c=n[i];a.add(c[0]),a.add(c[1])}return Array.from(a)}function t(n){for(var a=new Map,i=0,l=n.length;i<l;i++){var c=n[i];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function s(n){for(var a=new Map,i=0,l=n.length;i<l;i++)a.set(n[i],i);return a}return at.exports}var Ta=Sa();const Oa=Bs(Ta),Ca=Object.prototype.toString,Aa=Error.prototype.toString,$a=RegExp.prototype.toString,Da=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Ra=/^Symbol\((.*)\)(.*)$/;function Va(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Or(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const t=typeof r;if(t==="number")return Va(r);if(t==="string")return e?`"${r}"`:r;if(t==="function")return"[Function "+(r.name||"anonymous")+"]";if(t==="symbol")return Da.call(r).replace(Ra,"Symbol($1)");const s=Ca.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Aa.call(r)+"]":s==="RegExp"?$a.call(r):null}function $e(r,e){let t=Or(r,e);return t!==null?t:JSON.stringify(r,function(s,n){let a=Or(this[s],e);return a!==null?a:n},2)}function ms(r){return r==null?[]:[].concat(r)}let xs,ps,gs,Ma=/\$\{\s*(\w+)\s*\}/g;xs=Symbol.toStringTag;class Cr{constructor(e,t,s,n){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[xs]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=n,this.errors=[],this.inner=[],ms(e).forEach(a=>{if(xe.isError(a)){this.errors.push(...a.errors);const i=a.inner.length?a.inner:[a];this.inner.push(...i)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}ps=Symbol.hasInstance;gs=Symbol.toStringTag;class xe extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),typeof e=="string"?e.replace(Ma,(n,a)=>$e(t[a])):typeof e=="function"?e(t):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,t,s,n,a){const i=new Cr(e,t,s,n);if(a)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[gs]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,xe)}static[ps](e){return Cr[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let ke={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:r,type:e,value:t,originalValue:s})=>{const n=s!=null&&s!==t?` (cast from the value \`${$e(s,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${$e(t,!0)}\``+n:`${r} must match the configured type. The validated value was: \`${$e(t,!0)}\``+n}},me={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"},Ce={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"},At={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},La={isValue:"${path} field must be ${value}"},lt={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ia={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"},Pa={notType:r=>{const{path:e,value:t,spec:s}=r,n=s.types.length;if(Array.isArray(t)){if(t.length<n)return`${e} tuple value has too few items, expected a length of ${n} but got ${t.length} for value: \`${$e(t,!0)}\``;if(t.length>n)return`${e} tuple value has too many items, expected a length of ${n} but got ${t.length} for value: \`${$e(t,!0)}\``}return xe.formatError(ke.notType,r)}};Object.assign(Object.create(null),{mixed:ke,string:me,number:Ce,date:At,object:lt,array:Ia,boolean:La,tuple:Pa});const zt=r=>r&&r.__isYupSchema__;class xt{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:n,otherwise:a}=t,i=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new xt(e,(l,c)=>{var d;let f=i(...l)?n:a;return(d=f==null?void 0:f(c))!=null?d:c})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map(a=>a.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),n=this.fn(s,e,t);if(n===void 0||n===e)return e;if(!zt(n))throw new TypeError("conditions must return a schema object");return n.resolve(t)}}const it={context:"$",value:"."};class Le{constructor(e,t={}){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 e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===it.context,this.isValue=this.key[0]===it.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?it.context:this.isValue?it.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ve.getter(this.path,!0),this.map=t.map}getValue(e,t,s){let n=this.isContext?s:this.isValue?e:t;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}cast(e,t){return this.getValue(e,t==null?void 0:t.parent,t==null?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Le.prototype.__isYupRef=!0;const Se=r=>r==null;function Ue(r){function e({value:t,path:s="",options:n,originalValue:a,schema:i},l,c){const{name:d,test:f,params:h,message:m,skipAbsent:g}=r;let{parent:_,context:j,abortEarly:S=i.spec.abortEarly,disableStackTrace:y=i.spec.disableStackTrace}=n;function b(A){return Le.isRef(A)?A.getValue(t,_,j):A}function E(A={}){const D=Object.assign({value:t,originalValue:a,label:i.spec.label,path:A.path||s,spec:i.spec,disableStackTrace:A.disableStackTrace||y},h,A.params);for(const q of Object.keys(D))D[q]=b(D[q]);const Z=new xe(xe.formatError(A.message||m,D),t,D.path,A.type||d,D.disableStackTrace);return Z.params=D,Z}const V=S?l:c;let T={path:s,parent:_,type:d,from:n.from,createError:E,resolve:b,options:n,originalValue:a,schema:i};const B=A=>{xe.isError(A)?V(A):A?c(null):V(E())},W=A=>{xe.isError(A)?V(A):l(A)};if(g&&Se(t))return B(!0);let L;try{var I;if(L=f.call(T,t,T),typeof((I=L)==null?void 0:I.then)=="function"){if(n.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(L).then(B,W)}}catch(A){W(A);return}B(L)}return e.OPTIONS=r,e}function Ua(r,e,t,s=t){let n,a,i;return e?(Ve.forEach(e,(l,c,d)=>{let f=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:n,value:t});let h=r.type==="tuple",m=d?parseInt(f,10):0;if(r.innerType||h){if(h&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${i}" must contain an index to the tuple element, e.g. "${i}[0]"`);if(t&&m>=t.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);n=t,t=t&&t[m],r=h?r.spec.types[m]:r.innerType}if(!d){if(!r.fields||!r.fields[f])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${i} which is a type: "${r.type}")`);n=t,t=t&&t[f],r=r.fields[f]}a=f,i=c?"["+l+"]":"."+l}),{schema:r,parent:n,parentPath:a}):{parent:n,parentPath:e,schema:r}}class pt extends Set{describe(){const e=[];for(const t of this.values())e.push(Le.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new pt(this.values())}merge(e,t){const s=this.clone();return e.forEach(n=>s.add(n)),t.forEach(n=>s.delete(n)),s}}function Be(r,e=new Map){if(zt(r)||!r||typeof r!="object")return r;if(e.has(r))return e.get(r);let t;if(r instanceof Date)t=new Date(r.getTime()),e.set(r,t);else if(r instanceof RegExp)t=new RegExp(r),e.set(r,t);else if(Array.isArray(r)){t=new Array(r.length),e.set(r,t);for(let s=0;s<r.length;s++)t[s]=Be(r[s],e)}else if(r instanceof Map){t=new Map,e.set(r,t);for(const[s,n]of r.entries())t.set(s,Be(n,e))}else if(r instanceof Set){t=new Set,e.set(r,t);for(const s of r)t.add(Be(s,e))}else if(r instanceof Object){t={},e.set(r,t);for(const[s,n]of Object.entries(r))t[s]=Be(n,e)}else throw Error(`Unable to clone ${r}`);return t}class ve{constructor(e){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 pt,this._blacklist=new pt,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(ke.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(t=>{t.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Be(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(e.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const n=Object.assign({},t.spec,s.spec);return s.spec=n,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation(a=>{e.tests.forEach(i=>{a.test(i.OPTIONS)})}),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce((n,a)=>a.resolve(n,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,n,a;return Object.assign({},e,{from:e.from||[],strict:(t=e.strict)!=null?t:this.spec.strict,abortEarly:(s=e.abortEarly)!=null?s:this.spec.abortEarly,recursive:(n=e.recursive)!=null?n:this.spec.recursive,disableStackTrace:(a=e.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),n=t.assert==="ignore-optionality",a=s._cast(e,t);if(t.assert!==!1&&!s.isType(a)){if(n&&Se(a))return a;let i=$e(e),l=$e(a);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
26
+ text-ds-lg`,children:r}),t&&i.jsx("div",{className:"flex items-center space-x-2",children:t})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:e})]})}function Ls({options:r,value:t,onChange:e,children:s}){const n=v.useRef(null),[a,o]=v.useState({left:0,width:0});return v.useLayoutEffect(()=>{const l=n.current;if(!l)return;const c=()=>{const u=r.findIndex(S=>S.value===t);if(u<0)return;const f=l.children[u],h=f.querySelector("span"),m=(h==null?void 0:h.offsetWidth)??f.offsetWidth,g=f.offsetWidth,k=f.offsetLeft+(g-m)/2;o({left:k,width:m})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[t,r]),i.jsxs("div",{children:[i.jsxs("div",{className:"relative",children:[i.jsx("ul",{ref:n,role:"tablist",className:"flex justify-center overflow-x-auto border-b border-[var(--color-ds-border-default-50)]",children:r.map(l=>{const c=l.value===t;return i.jsx("li",{role:"tab","aria-selected":c,onClick:()=>e(l.value),className:L("cursor-pointer whitespace-nowrap px-4 py-2 transition-colors duration-150 ease-in-out",c?"text-[var(--color-ds-background-accent)]":"text-[var(--color-ds-text-primary)]"),children:i.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),i.jsx("span",{className:"absolute bottom-0 h-1 bg-[var(--color-ds-background-accent)] transition-all duration-200 ease-in-out rounded-t-full",style:{left:a.left,width:a.width}})]}),i.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[t]})]})}const Ht={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},jo={sm:"h-6",md:"h-10",lg:"h-12"},Eo={sm:"px-2",md:"px-2.5",lg:"px-3"},zr={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Ur(r,t,e,s,n,a,o,l,c){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative flex items-center w-full",children:[i.jsx("select",{id:r,...s,disabled:n,className:L("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Ht[e],jo[e],Eo[e],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",n?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-primary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]",l),children:t.map(u=>i.jsx("option",{value:u.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:u.label},u.value))}),c&&i.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!o&&i.jsx("div",{className:"min-h-[18px] w-full",children:a!=null&&a.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function it(r){const{control:t,name:e,rules:s,defaultValue:n,options:a=[],loadOptions:o,reloadDeps:l=[],value:c,onChange:u,size:f="sm",width:h="100%",label:m,labelHidden:g=!1,hasError:N=!1,errorMessage:k="",disableErrorPlaceholder:S=!1,disabled:y=!1,className:b,suffixButton:E}=r,R=v.useId(),F=e||R,[Z,X]=v.useState(a),[_,D]=v.useState(!!o);if(v.useEffect(()=>{o&&(D(!0),o().then(P=>X(P)).finally(()=>D(!1)))},[o,...l]),v.useEffect(()=>{!t&&Z.length>0&&(c===void 0||c===""||!Z.some(P=>P.value===c))&&(u==null||u(Z[0].value))},[Z,c,u,t]),t&&e){const{field:P,fieldState:V}=Ns({name:e,control:t,rules:s,defaultValue:n});return v.useEffect(()=>{if(!_&&Z.length>0){const $=P.value;($===void 0||!Z.some(G=>G.value===$))&&P.onChange(Z[0].value)}},[Z,_,P]),i.jsxs("div",{className:L("flex flex-col",b),style:{width:h,maxWidth:"100%"},children:[m&&i.jsx("label",{htmlFor:F,className:L("pb-2 text-[var(--color-ds-text-primary)]",Ht[f],g&&"sr-only"),children:m}),_?i.jsx(qe,{width:"100%",height:zr[f],variant:"rect",className:"rounded-lg"}):Ur(F,Z,f,{value:P.value,onChange:$=>P.onChange($.target.value)},y,V.error,S,b,E)]})}return i.jsxs("div",{className:L("flex flex-col",b),style:{width:h,maxWidth:"100%"},children:[m&&i.jsx("label",{htmlFor:F,className:L("pb-2 text-[var(--color-ds-text-primary)]",Ht[f],g&&"sr-only"),children:m}),_?i.jsx(qe,{width:"100%",height:zr[f],variant:"rect",className:"rounded-lg"}):Ur(F,Z,f,{value:c,onChange:P=>u==null?void 0:u(P.target.value)},y,N?{message:k}:void 0,S,b,E)]})}const Br={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function Ps({groupLabel:r,inputs:t=[],separator:e=i.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:n,showVisibleLabel:a=!1,size:o="sm",width:l}){const c=t.length;return i.jsxs("div",{className:L("flex flex-col",n),style:l?{width:l}:void 0,children:[i.jsx("label",{className:L("sr-only pb-2",Br[o]),children:r}),a&&i.jsx("label",{className:L("pb-2",Br[o]),children:r}),i.jsx("div",{className:"flex items-center flex-nowrap",children:t.map((u,f)=>{const{width:h,className:m,options:g,loadOptions:N,...k}=u,S=Array.isArray(g)||typeof N=="function";let y="rounded-lg";!s&&c>1&&(f===0?y="rounded-l-lg rounded-r-none":f===c-1?y="rounded-r-lg rounded-l-none":y="rounded-none");const b=L("inline-flex items-center flex-shrink-0 overflow-hidden",typeof h=="string"&&h.startsWith("w-")?h:void 0),E=typeof h=="string"&&!h.startsWith("w-")?{width:h}:void 0,R=L(m,y);return i.jsxs("div",{className:b,style:E,children:[S?i.jsx(it,{...k,size:o,className:R,options:g,loadOptions:N}):i.jsx(Ct,{...k,size:o,className:R}),s&&f<c-1&&e]},f)})})]})}const Zr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},No={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function zs({groupLabel:r,options:t,control:e,name:s,rules:n,defaultValue:a,multiple:o=!0,size:l="sm",vertical:c=!0,className:u,showVisibleLabel:f=!0}){return i.jsx(_e,{name:s,control:e,rules:n,defaultValue:a,render:({field:h,fieldState:m})=>{const{value:g,onChange:N}=h;m.error;const k=y=>o?Array.isArray(g)&&g.includes(y):g===y,S=y=>{if(o){const b=Array.isArray(g)?[...g]:[],E=b.indexOf(y);E>=0?b.splice(E,1):b.push(y),N(b)}else N(y)};return i.jsxs("div",{className:L("w-full",u),children:[i.jsx("label",{className:L("sr-only pb-2 text-[var(--color-ds-text-primary)]",Zr[l]),children:r}),f&&i.jsx("label",{className:L("block pb-2 text-[var(--color-ds-text-primary)]",Zr[l]),children:r}),i.jsx("div",{className:L(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:t.map(y=>i.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[i.jsx("input",{type:o?"checkbox":"radio",name:s,value:y.value,checked:k(y.value),onChange:()=>S(y.value),className:L(No[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:y.label})]},y.value))})]})}})}function _o(r){function t(o){var l,c;for(const u of Object.keys(o)){if((l=o[u])!=null&&l.types||(c=o[u])!=null&&c.message)return u;if(typeof o[u]=="object"){const f=t(o[u]);if(f)return`${u}.${f}`}}return null}const e=t(r);if(!e)return;const s=`[name="${e}"]`,n=`[name^="${e}["], [name^="${e}."]`,a=document.querySelector(s)??document.querySelector(n);a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.focus({preventScroll:!0}))}const So={success:"bg-green-100 border-green-500 text-green-800",error:"bg-red-100 border-red-500 text-red-800",info:"bg-blue-100 border-blue-500 text-blue-800",warning:"bg-yellow-100 border-yellow-500 text-yellow-800"},Us=({id:r,message:t,variant:e="info",duration:s=5e3,onClose:n})=>(v.useEffect(()=>{const a=setTimeout(()=>n(r),s);return()=>clearTimeout(a)},[r,s,n]),i.jsxs("div",{className:L("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",So[e]),role:"alert","aria-live":"assertive",children:[i.jsx("span",{className:"flex-1",children:t}),i.jsx("button",{onClick:()=>n(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let gt;const Fo=new Uint8Array(16);function To(){if(!gt&&(gt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gt(Fo)}const pe=[];for(let r=0;r<256;++r)pe.push((r+256).toString(16).slice(1));function Co(r,t=0){return pe[r[t+0]]+pe[r[t+1]]+pe[r[t+2]]+pe[r[t+3]]+"-"+pe[r[t+4]]+pe[r[t+5]]+"-"+pe[r[t+6]]+pe[r[t+7]]+"-"+pe[r[t+8]]+pe[r[t+9]]+"-"+pe[r[t+10]]+pe[r[t+11]]+pe[r[t+12]]+pe[r[t+13]]+pe[r[t+14]]+pe[r[t+15]]}const Ao=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Wr={randomUUID:Ao};function Oo(r,t,e){if(Wr.randomUUID&&!r)return Wr.randomUUID();r=r||{};const s=r.random||(r.rng||To)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Co(s)}const Bs=v.createContext(null),Zs=()=>{const r=v.useContext(Bs);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},Mo=({children:r})=>{const[t,e]=v.useState([]),s=(a,o="info",l=5e3)=>{const c=Oo();e(u=>[...u,{id:c,message:a,variant:o,duration:l}])},n=a=>{e(o=>o.filter(l=>l.id!==a))};return i.jsxs(Bs.Provider,{value:{show:s},children:[r,i.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:t.map(a=>i.jsx(Us,{id:a.id,message:a.message,variant:a.variant,duration:a.duration,onClose:n},a.id))})]})},qr=(r,t,e)=>{if(r&&"reportValidity"in r){const s=M(e,t);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},Ws=(r,t)=>{for(const e in t.fields){const s=t.fields[e];s&&s.ref&&"reportValidity"in s.ref?qr(s.ref,e,r):s&&s.refs&&s.refs.forEach(n=>qr(n,e,r))}},Ro=(r,t)=>{t.shouldUseNativeValidation&&Ws(r,t);const e={};for(const s in r){const n=M(t.fields,s),a=Object.assign(r[s]||{},{ref:n&&n.ref});if(Vo(t.names||Object.keys(r),s)){const o=Object.assign({},M(e,s));oe(o,"root",a),oe(e,s,o)}else oe(e,s,a)}return e},Vo=(r,t)=>{const e=Gr(t);return r.some(s=>Gr(s).match(`^${e}\\.\\d+`))};function Gr(r){return r.replace(/\]|\[/g,"")}function Hr(r,t,e){return e===void 0&&(e={}),function(s,n,a){try{return Promise.resolve(function(o,l){try{var c=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(r[e.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},t,{context:n}))).then(function(u){return a.shouldUseNativeValidation&&Ws({},a),{values:e.raw?Object.assign({},s):u,errors:{}}}))}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:Ro((l=o,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(l.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),c){var h=u[f.path].types,m=h&&h[f.type];u[f.path]=_s(f.path,c,u,f.type,m?[].concat(m,f.message):f.message)}return u},{})),a)};var l,c}))}catch(o){return Promise.reject(o)}}}var Dt,Yr;function $o(){if(Yr)return Dt;Yr=1;function r(y){this._maxSize=y,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(y){return this._values[y]},r.prototype.set=function(y,b){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=b};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,e=/^\d+$/,s=/^\d/,n=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new r(o),c=new r(o),u=new r(o);Dt={Cache:r,split:h,normalizePath:f,setter:function(y){var b=f(y);return c.get(y)||c.set(y,function(R,F){for(var Z=0,X=b.length,_=R;Z<X-1;){var D=b[Z];if(D==="__proto__"||D==="constructor"||D==="prototype")return R;_=_[b[Z++]]}_[b[Z]]=F})},getter:function(y,b){var E=f(y);return u.get(y)||u.set(y,function(F){for(var Z=0,X=E.length;Z<X;)if(F!=null||!b)F=F[E[Z++]];else return;return F})},join:function(y){return y.reduce(function(b,E){return b+(g(E)||e.test(E)?"["+E+"]":(b?".":"")+E)},"")},forEach:function(y,b,E){m(Array.isArray(y)?y:h(y),b,E)}};function f(y){return l.get(y)||l.set(y,h(y).map(function(b){return b.replace(a,"$2")}))}function h(y){return y.match(t)||[""]}function m(y,b,E){var R=y.length,F,Z,X,_;for(Z=0;Z<R;Z++)F=y[Z],F&&(S(F)&&(F='"'+F+'"'),_=g(F),X=!_&&/^\d+$/.test(F),b.call(E,F,_,X,Z,y))}function g(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function N(y){return y.match(s)&&!y.match(e)}function k(y){return n.test(y)}function S(y){return!g(y)&&(N(y)||k(y))}return Dt}var We=$o(),It,Xr;function Do(){if(Xr)return It;Xr=1;const r=/[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=f=>f.match(r)||[],e=f=>f[0].toUpperCase()+f.slice(1),s=(f,h)=>t(f).join(h).toLowerCase(),n=f=>t(f).reduce((h,m)=>`${h}${h?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return It={words:t,upperFirst:e,camelCase:n,pascalCase:f=>e(n(f)),snakeCase:f=>s(f,"_"),kebabCase:f=>s(f,"-"),sentenceCase:f=>e(s(f," ")),titleCase:f=>t(f).map(e).join(" ")},It}var Lt=Do(),bt={exports:{}},Jr;function Io(){if(Jr)return bt.exports;Jr=1,bt.exports=function(n){return r(t(n),n)},bt.exports.array=r;function r(n,a){var o=n.length,l=new Array(o),c={},u=o,f=e(a),h=s(n);for(a.forEach(function(g){if(!h.has(g[0])||!h.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)c[u]||m(n[u],u,new Set);return l;function m(g,N,k){if(k.has(g)){var S;try{S=", node was:"+JSON.stringify(g)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!h.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!c[N]){c[N]=!0;var y=f.get(g)||new Set;if(y=Array.from(y),N=y.length){k.add(g);do{var b=y[--N];m(b,h.get(b),k)}while(N);k.delete(g)}l[--o]=g}}}function t(n){for(var a=new Set,o=0,l=n.length;o<l;o++){var c=n[o];a.add(c[0]),a.add(c[1])}return Array.from(a)}function e(n){for(var a=new Map,o=0,l=n.length;o<l;o++){var c=n[o];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function s(n){for(var a=new Map,o=0,l=n.length;o<l;o++)a.set(n[o],o);return a}return bt.exports}var Lo=Io();const Po=kn(Lo),zo=Object.prototype.toString,Uo=Error.prototype.toString,Bo=RegExp.prototype.toString,Zo=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Wo=/^Symbol\((.*)\)(.*)$/;function qo(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Kr(r,t=!1){if(r==null||r===!0||r===!1)return""+r;const e=typeof r;if(e==="number")return qo(r);if(e==="string")return t?`"${r}"`:r;if(e==="function")return"[Function "+(r.name||"anonymous")+"]";if(e==="symbol")return Zo.call(r).replace(Wo,"Symbol($1)");const s=zo.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Uo.call(r)+"]":s==="RegExp"?Bo.call(r):null}function ze(r,t){let e=Kr(r,t);return e!==null?e:JSON.stringify(r,function(s,n){let a=Kr(this[s],t);return a!==null?a:n},2)}function qs(r){return r==null?[]:[].concat(r)}let Gs,Hs,Ys,Go=/\$\{\s*(\w+)\s*\}/g;Gs=Symbol.toStringTag;class Qr{constructor(t,e,s,n){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[Gs]="Error",this.name="ValidationError",this.value=e,this.path=s,this.type=n,this.errors=[],this.inner=[],qs(t).forEach(a=>{if(ve.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Hs=Symbol.hasInstance;Ys=Symbol.toStringTag;class ve extends Error{static formatError(t,e){const s=e.label||e.path||"this";return e=Object.assign({},e,{path:s,originalPath:e.path}),typeof t=="string"?t.replace(Go,(n,a)=>ze(e[a])):typeof t=="function"?t(e):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,e,s,n,a){const o=new Qr(t,e,s,n);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ys]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ve)}static[Hs](t){return Qr[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Te={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:r,type:t,value:e,originalValue:s})=>{const n=s!=null&&s!==e?` (cast from the value \`${ze(s,!0)}\`).`:".";return t!=="mixed"?`${r} must be a \`${t}\` type, but the final value was: \`${ze(e,!0)}\``+n:`${r} must match the configured type. The validated value was: \`${ze(e,!0)}\``+n}},ye={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"},Le={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"},Yt={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ho={isValue:"${path} field must be ${value}"},wt={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Yo={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"},Xo={notType:r=>{const{path:t,value:e,spec:s}=r,n=s.types.length;if(Array.isArray(e)){if(e.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${e.length} for value: \`${ze(e,!0)}\``;if(e.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${e.length} for value: \`${ze(e,!0)}\``}return ve.formatError(Te.notType,r)}};Object.assign(Object.create(null),{mixed:Te,string:ye,number:Le,date:Yt,object:wt,array:Yo,boolean:Ho,tuple:Xo});const lr=r=>r&&r.__isYupSchema__;class St{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:n,otherwise:a}=e,o=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new St(t,(l,c)=>{var u;let f=o(...l)?n:a;return(u=f==null?void 0:f(c))!=null?u:c})}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let s=this.refs.map(a=>a.getValue(e==null?void 0:e.value,e==null?void 0:e.parent,e==null?void 0:e.context)),n=this.fn(s,t,e);if(n===void 0||n===t)return t;if(!lr(n))throw new TypeError("conditions must return a schema object");return n.resolve(e)}}const yt={context:"$",value:"."};class Ge{constructor(t,e={}){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]===yt.context,this.isValue=this.key[0]===yt.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?yt.context:this.isValue?yt.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&We.getter(this.path,!0),this.map=e.map}getValue(t,e,s){let n=this.isContext?s:this.isValue?t:e;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}cast(t,e){return this.getValue(t,e==null?void 0:e.parent,e==null?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ge.prototype.__isYupRef=!0;const Ve=r=>r==null;function Xe(r){function t({value:e,path:s="",options:n,originalValue:a,schema:o},l,c){const{name:u,test:f,params:h,message:m,skipAbsent:g}=r;let{parent:N,context:k,abortEarly:S=o.spec.abortEarly,disableStackTrace:y=o.spec.disableStackTrace}=n;function b(V){return Ge.isRef(V)?V.getValue(e,N,k):V}function E(V={}){const $=Object.assign({value:e,originalValue:a,label:o.spec.label,path:V.path||s,spec:o.spec,disableStackTrace:V.disableStackTrace||y},h,V.params);for(const J of Object.keys($))$[J]=b($[J]);const G=new ve(ve.formatError(V.message||m,$),e,$.path,V.type||u,$.disableStackTrace);return G.params=$,G}const R=S?l:c;let F={path:s,parent:N,type:u,from:n.from,createError:E,resolve:b,options:n,originalValue:a,schema:o};const Z=V=>{ve.isError(V)?R(V):V?c(null):R(E())},X=V=>{ve.isError(V)?R(V):l(V)};if(g&&Ve(e))return Z(!0);let D;try{var P;if(D=f.call(F,e,F),typeof((P=D)==null?void 0:P.then)=="function"){if(n.sync)throw new Error(`Validation test of type: "${F.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(D).then(Z,X)}}catch(V){X(V);return}Z(D)}return t.OPTIONS=r,t}function Jo(r,t,e,s=e){let n,a,o;return t?(We.forEach(t,(l,c,u)=>{let f=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:n,value:e});let h=r.type==="tuple",m=u?parseInt(f,10):0;if(r.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(e&&m>=e.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);n=e,e=e&&e[m],r=h?r.spec.types[m]:r.innerType}if(!u){if(!r.fields||!r.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${r.type}")`);n=e,e=e&&e[f],r=r.fields[f]}a=f,o=c?"["+l+"]":"."+l}),{schema:r,parent:n,parentPath:a}):{parent:n,parentPath:t,schema:r}}class Ft extends Set{describe(){const t=[];for(const e of this.values())t.push(Ge.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const s of this.values())e.push(t(s));return e}clone(){return new Ft(this.values())}merge(t,e){const s=this.clone();return t.forEach(n=>s.add(n)),e.forEach(n=>s.delete(n)),s}}function Je(r,t=new Map){if(lr(r)||!r||typeof r!="object")return r;if(t.has(r))return t.get(r);let e;if(r instanceof Date)e=new Date(r.getTime()),t.set(r,e);else if(r instanceof RegExp)e=new RegExp(r),t.set(r,e);else if(Array.isArray(r)){e=new Array(r.length),t.set(r,e);for(let s=0;s<r.length;s++)e[s]=Je(r[s],t)}else if(r instanceof Map){e=new Map,t.set(r,e);for(const[s,n]of r.entries())e.set(s,Je(n,t))}else if(r instanceof Set){e=new Set,t.set(r,e);for(const s of r)e.add(Je(s,t))}else if(r instanceof Object){e={},t.set(r,e);for(const[s,n]of Object.entries(r))e[s]=Je(n,t)}else throw Error(`Unable to clone ${r}`);return e}class je{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 Ft,this._blacklist=new Ft,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Te.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(e=>{e.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=Je(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(t.length===0)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let s=t(this);return this._mutate=e,s}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 e=this,s=t.clone();const n=Object.assign({},e.spec,s.spec);return s.spec=n,s.internalTests=Object.assign({},e.internalTests,s.internalTests),s._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),s._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),s.tests=e.tests,s.exclusiveTests=e.exclusiveTests,s.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),s.transforms=[...e.transforms,...s.transforms],s}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let s=e.conditions;e=e.clone(),e.conditions=[],e=s.reduce((n,a)=>a.resolve(n,t),e),e=e.resolve(t)}return e}resolveOptions(t){var e,s,n,a;return Object.assign({},t,{from:t.from||[],strict:(e=t.strict)!=null?e:this.spec.strict,abortEarly:(s=t.abortEarly)!=null?s:this.spec.abortEarly,recursive:(n=t.recursive)!=null?n:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,e={}){let s=this.resolve(Object.assign({value:t},e)),n=e.assert==="ignore-optionality",a=s._cast(t,e);if(e.assert!==!1&&!s.isType(a)){if(n&&Ve(a))return a;let o=ze(t),l=ze(a);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
27
27
 
28
- attempted value: ${i}
29
- `+(l!==i?`result of cast: ${l}`:""))}return a}_cast(e,t){let s=e===void 0?e:this.transforms.reduce((n,a)=>a.call(this,n,e,this),e);return s===void 0&&(s=this.getDefault(t)),s}_validate(e,t={},s,n){let{path:a,originalValue:i=e,strict:l=this.spec.strict}=t,c=e;l||(c=this._cast(c,Object.assign({assert:!1},t)));let d=[];for(let f of Object.values(this.internalTests))f&&d.push(f);this.runTests({path:a,value:c,originalValue:i,options:t,tests:d},s,f=>{if(f.length)return n(f,c);this.runTests({path:a,value:c,originalValue:i,options:t,tests:this.tests},s,n)})}runTests(e,t,s){let n=!1,{tests:a,value:i,originalValue:l,path:c,options:d}=e,f=j=>{n||(n=!0,t(j,i))},h=j=>{n||(n=!0,s(j,i))},m=a.length,g=[];if(!m)return h([]);let _={value:i,originalValue:l,path:c,options:d,schema:this};for(let j=0;j<a.length;j++){const S=a[j];S(_,f,function(b){b&&(Array.isArray(b)?g.push(...b):g.push(b)),--m<=0&&h(g)})}}asNestedTest({key:e,index:t,parent:s,parentPath:n,originalParent:a,options:i}){const l=e??t;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let d=s[l];const f=Object.assign({},i,{strict:!0,parent:s,value:d,originalValue:a[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${n||""}[${c?l:`"${l}"`}]`:(n?`${n}.`:"")+e});return(h,m,g)=>this.resolve(f)._validate(d,f,m,g)}validate(e,t){var s;let n=this.resolve(Object.assign({},t,{value:e})),a=(s=t==null?void 0:t.disableStackTrace)!=null?s:n.spec.disableStackTrace;return new Promise((i,l)=>n._validate(e,t,(c,d)=>{xe.isError(c)&&(c.value=d),l(c)},(c,d)=>{c.length?l(new xe(c,d,void 0,void 0,a)):i(d)}))}validateSync(e,t){var s;let n=this.resolve(Object.assign({},t,{value:e})),a,i=(s=t==null?void 0:t.disableStackTrace)!=null?s:n.spec.disableStackTrace;return n._validate(e,Object.assign({},t,{sync:!0}),(l,c)=>{throw xe.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new xe(l,e,void 0,void 0,i);a=c}),a}isValid(e,t){return this.validate(e,t).then(()=>!0,s=>{if(xe.isError(s))return!1;throw s})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(s){if(xe.isError(s))return!1;throw s}}_getDefault(e){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this,e):Be(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=Ue({message:t,name:"nullable",test(n){return n===null?this.schema.spec.nullable:!0}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=Ue({message:t,name:"optionality",test(n){return n===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(e=ke.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=ke.notNull){return this.nullability(!1,e)}required(e=ke.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(e.length===1?typeof e[0]=="function"?t={test:e[0]}:t=e[0]:e.length===2?t={name:e[0],test:e[1]}:t={name:e[0],message:e[1],test:e[2]},t.message===void 0&&(t.message=ke.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),n=Ue(t),a=t.exclusive||t.name&&s.exclusiveTests[t.name]===!0;if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter(i=>!(i.OPTIONS.name===t.name&&(a||i.OPTIONS.test===n.OPTIONS.test))),s.tests.push(n),s}when(e,t){!Array.isArray(e)&&typeof e!="string"&&(t=e,e=".");let s=this.clone(),n=ms(e).map(a=>new Le(a));return n.forEach(a=>{a.isSibling&&s.deps.push(a.key)}),s.conditions.push(typeof t=="function"?new xt(n,t):xt.fromOptions(n,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=Ue({message:e,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=ke.oneOf){let s=this.clone();return e.forEach(n=>{s._whitelist.add(n),s._blacklist.delete(n)}),s.internalTests.whiteList=Ue({message:t,name:"oneOf",skipAbsent:!0,test(n){let a=this.schema._whitelist,i=a.resolveAll(this.resolve);return i.includes(n)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:i}})}}),s}notOneOf(e,t=ke.notOneOf){let s=this.clone();return e.forEach(n=>{s._blacklist.add(n),s._whitelist.delete(n)}),s.internalTests.blacklist=Ue({message:t,name:"notOneOf",test(n){let a=this.schema._blacklist,i=a.resolveAll(this.resolve);return i.includes(n)?this.createError({params:{values:Array.from(a).join(", "),resolved:i}}):!0}}),s}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:n,optional:a,nullable:i}=t.spec;return{meta:n,label:s,optional:a,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,d,f)=>f.findIndex(h=>h.name===c.name)===d)}}}ve.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])ve.prototype[`${r}At`]=function(e,t,s={}){const{parent:n,parentPath:a,schema:i}=Ua(this,e,t,s.context);return i[r](n&&n[a],Object.assign({},s,{parent:n,path:e}))};for(const r of["equals","is"])ve.prototype[r]=ve.prototype.oneOf;for(const r of["not","nope"])ve.prototype[r]=ve.prototype.notOneOf;const Ba=()=>!0;function $t(r){return new bs(r)}class bs extends ve{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Ba},e))}}$t.prototype=bs.prototype;const Za=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function za(r){const e=Dt(r);if(!e)return Date.parse?Date.parse(r):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let t=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(t=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(t=0-t)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+t,e.second,e.millisecond)}function Dt(r){var e,t;const s=Za.exec(r);return s?{year:Fe(s[1]),month:Fe(s[2],1)-1,day:Fe(s[3],1),hour:Fe(s[4]),minute:Fe(s[5]),second:Fe(s[6]),millisecond:s[7]?Fe(s[7].substring(0,3)):0,precision:(e=(t=s[7])==null?void 0:t.length)!=null?e:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:Fe(s[10]),minuteOffset:Fe(s[11])}:null}function Fe(r,e=0){return Number(r)||e}let Wa=/^[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])?)*$/,qa=/^((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,Ha=/^(?:[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,Ya="^\\d{4}-\\d{2}-\\d{2}",Ga="\\d{2}:\\d{2}:\\d{2}",Xa="(([+-]\\d{2}(:?\\d{2})?)|Z)",Ja=new RegExp(`${Ya}T${Ga}(\\.\\d+)?${Xa}$`),Ka=r=>Se(r)||r===r.trim(),Qa={}.toString();function vs(){return new ys}class ys extends ve{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce||s.isType(e)||Array.isArray(e))return e;const n=e!=null&&e.toString?e.toString():e;return n===Qa?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||ke.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(t=>t.OPTIONS.name!=="required"),e))}length(e,t=me.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(s){return s.length===this.resolve(e)}})}min(e,t=me.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s.length>=this.resolve(e)}})}max(e,t=me.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(s){return s.length<=this.resolve(e)}})}matches(e,t){let s=!1,n,a;return t&&(typeof t=="object"?{excludeEmptyString:s=!1,message:n,name:a}=t:n=t),this.test({name:a||"matches",message:n||me.matches,params:{regex:e},skipAbsent:!0,test:i=>i===""&&s||i.search(e)!==-1})}email(e=me.email){return this.matches(Wa,{name:"email",message:e,excludeEmptyString:!0})}url(e=me.url){return this.matches(qa,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=me.uuid){return this.matches(Ha,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t="",s,n;return e&&(typeof e=="object"?{message:t="",allowOffset:s=!1,precision:n=void 0}=e:t=e),this.matches(Ja,{name:"datetime",message:t||me.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:t||me.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:a=>{if(!a||s)return!0;const i=Dt(a);return i?!!i.z:!1}}).test({name:"datetime_precision",message:t||me.datetime_precision,params:{precision:n},skipAbsent:!0,test:a=>{if(!a||n==null)return!0;const i=Dt(a);return i?i.precision===n:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=me.trim){return this.transform(t=>t!=null?t.trim():t).test({message:e,name:"trim",test:Ka})}lowercase(e=me.lowercase){return this.transform(t=>Se(t)?t:t.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Se(t)||t===t.toLowerCase()})}uppercase(e=me.uppercase){return this.transform(t=>Se(t)?t:t.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Se(t)||t===t.toUpperCase()})}}vs.prototype=ys.prototype;let ei=r=>r!=+r;function ws(){return new js}class js extends ve{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!ei(e)}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce)return e;let n=e;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return s.isType(n)||n===null?n:parseFloat(n)})})}min(e,t=Ce.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s>=this.resolve(e)}})}max(e,t=Ce.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s<=this.resolve(e)}})}lessThan(e,t=Ce.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(s){return s<this.resolve(e)}})}moreThan(e,t=Ce.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(s){return s>this.resolve(e)}})}positive(e=Ce.positive){return this.moreThan(0,e)}negative(e=Ce.negative){return this.lessThan(0,e)}integer(e=Ce.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:t=>Number.isInteger(t)})}truncate(){return this.transform(e=>Se(e)?e:e|0)}round(e){var t;let s=["ceil","floor","round","trunc"];if(e=((t=e)==null?void 0:t.toLowerCase())||"round",e==="trunc")return this.truncate();if(s.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(n=>Se(n)?n:Math[e](n))}}ws.prototype=js.prototype;let ks=new Date(""),ti=r=>Object.prototype.toString.call(r)==="[object Date]";function Wt(){return new Qe}class Qe extends ve{constructor(){super({type:"date",check(e){return ti(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,t,s)=>!s.spec.coerce||s.isType(e)||e===null?e:(e=za(e),isNaN(e)?Qe.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let s;if(Le.isRef(e))s=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=n}return s}min(e,t=At.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(s)}})}max(e,t=At.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(s)}})}}Qe.INVALID_DATE=ks;Wt.prototype=Qe.prototype;Wt.INVALID_DATE=ks;function ri(r,e=[]){let t=[],s=new Set,n=new Set(e.map(([i,l])=>`${i}-${l}`));function a(i,l){let c=Ve.split(i)[0];s.add(c),n.has(`${l}-${c}`)||t.push([l,c])}for(const i of Object.keys(r)){let l=r[i];s.add(i),Le.isRef(l)&&l.isSibling?a(l.path,i):zt(l)&&"deps"in l&&l.deps.forEach(c=>a(c,i))}return Oa.array(Array.from(s),t).reverse()}function Ar(r,e){let t=1/0;return r.some((s,n)=>{var a;if((a=e.path)!=null&&a.includes(s))return t=n,!0}),t}function Es(r){return(e,t)=>Ar(r,e)-Ar(r,t)}const si=(r,e,t)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return t.isType(s)?s:r};function ct(r){if("fields"in r){const e={};for(const[t,s]of Object.entries(r.fields))e[t]=ct(s);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=ct(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(ct)}):"optional"in r?r.optional():r}const ni=(r,e)=>{const t=[...Ve.normalizePath(e)];if(t.length===1)return t[0]in r;let s=t.pop(),n=Ve.getter(Ve.join(t),!0)(r);return!!(n&&s in n)};let $r=r=>Object.prototype.toString.call(r)==="[object Object]";function Dr(r,e){let t=Object.keys(r.fields);return Object.keys(e).filter(s=>t.indexOf(s)===-1)}const ai=Es([]);function _s(r){return new Ns(r)}class Ns extends ve{constructor(e){super({type:"object",check(t){return $r(t)||typeof t=="function"}}),this.fields=Object.create(null),this._sortErrors=ai,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var s;let n=super._cast(e,t);if(n===void 0)return this.getDefault(t);if(!this._typeCheck(n))return n;let a=this.fields,i=(s=t.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(h=>!this._nodes.includes(h))),c={},d=Object.assign({},t,{parent:c,__validating:t.__validating||!1}),f=!1;for(const h of l){let m=a[h],g=h in n;if(m){let _,j=n[h];d.path=(t.path?`${t.path}.`:"")+h,m=m.resolve({value:j,context:t.context,parent:c});let S=m instanceof ve?m.spec:void 0,y=S==null?void 0:S.strict;if(S!=null&&S.strip){f=f||h in n;continue}_=!t.__validating||!y?m.cast(n[h],d):n[h],_!==void 0&&(c[h]=_)}else g&&!i&&(c[h]=n[h]);(g!==h in c||c[h]!==n[h])&&(f=!0)}return f?c:n}_validate(e,t={},s,n){let{from:a=[],originalValue:i=e,recursive:l=this.spec.recursive}=t;t.from=[{schema:this,value:i},...a],t.__validating=!0,t.originalValue=i,super._validate(e,t,s,(c,d)=>{if(!l||!$r(d)){n(c,d);return}i=i||d;let f=[];for(let h of this._nodes){let m=this.fields[h];!m||Le.isRef(m)||f.push(m.asNestedTest({options:t,key:h,parent:d,parentPath:t.path,originalParent:i}))}this.runTests({tests:f,value:d,originalValue:i,options:t},s,h=>{n(h.sort(this._sortErrors).concat(c),d)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[n,a]of Object.entries(this.fields)){const i=s[n];s[n]=i===void 0?a:i}return t.withMutation(n=>n.setFields(s,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(s=>{var n;const a=this.fields[s];let i=e;(n=i)!=null&&n.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[s]})),t[s]=a&&"getDefault"in a?a.getDefault(i):void 0}),t}setFields(e,t){let s=this.clone();return s.fields=e,s._nodes=ri(e,t),s._sortErrors=Es(Object.keys(e)),t&&(s._excludedEdges=t),s}shape(e,t=[]){return this.clone().withMutation(s=>{let n=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),n=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),n)})}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return ct(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter(([s,n])=>e.includes(s)&&e.includes(n)))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(e,t,s){let n=Ve.getter(e,!0);return this.transform(a=>{if(!a)return a;let i=a;return ni(a,e)&&(i=Object.assign({},a),s||delete i[e],i[t]=n(a)),i})}json(){return this.transform(si)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||lt.exact,test(t){if(t==null)return!0;const s=Dr(this.schema,t);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=lt.noUnknown){typeof e!="boolean"&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(n){if(n==null)return!0;const a=Dr(this.schema,n);return!e||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=lt.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const s={};for(const n of Object.keys(t))s[e(n)]=t[n];return s})}camelCase(){return this.transformKeys(_t.camelCase)}snakeCase(){return this.transformKeys(_t.snakeCase)}constantCase(){return this.transformKeys(e=>_t.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[a,i]of Object.entries(t.fields)){var n;let l=e;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[a]})),s.fields[a]=i.describe(l)}return s}}_s.prototype=Ns.prototype;function ii({fields:r,explicitSchema:e}){return v.useMemo(()=>{if(e)return Nr(e);const t={};r.forEach(n=>{var i,l,c,d,f,h,m;let a;switch(n.type){case"text":case"password":case"email":if(a=vs(),(i=n.validation)!=null&&i.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}(l=n.validation)!=null&&l.minLength&&(a=a.min(n.validation.minLength.value,n.validation.minLength.message)),(c=n.validation)!=null&&c.maxLength&&(a=a.max(n.validation.maxLength.value,n.validation.maxLength.message)),(d=n.validation)!=null&&d.pattern&&(a=a.matches(n.validation.pattern.value,n.validation.pattern.message)),n.type==="email"&&(a=a.email("Email inválido"));break;case"number":if(a=ws(),(f=n.validation)!=null&&f.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}break;case"select":case"optionGroup":if(a=$t(),(h=n.validation)!=null&&h.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}break;case"date":if(a=Wt(),(m=n.validation)!=null&&m.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}break;default:a=$t()}t[n.name]=a});const s=_s().shape(t);return Nr(s)},[r,e])}function oi(r){return v.useMemo(()=>{const e={};return r.forEach(t=>{e[t.name]=t}),e},[r])}function li(r){const e=v.useMemo(()=>r.filter(i=>i.type==="select"&&i.loadOptions),[r]),[t,s]=v.useState(e.length),[n,a]=v.useState({});return v.useEffect(()=>{e.length!==0&&e.forEach(i=>{i.loadOptions().then(l=>a(c=>({...c,[i.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[e]),{loadingCount:t,optionsMap:n}}function ci(r,e){const t=v.useMemo(()=>r.filter(i=>i.disabledWhen),[r]),s=v.useMemo(()=>t.map(i=>i.disabledWhen.watchField),[t]),n=It({control:e,name:s}),a={};return t.forEach(i=>{const l=s.indexOf(i.disabledWhen.watchField),c=n[l];a[i.name]=c===i.disabledWhen.watchValue}),a}const Rr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ui={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function qt({control:r,name:e,rules:t,defaultValue:s,size:n="sm",width:a="100%",label:i,labelHidden:l=!1,hasError:c=!1,errorMessage:d="",maxLength:f,showCounter:h=!1,className:m,...g}){const _=v.useId(),j=e||_,[S,y]=v.useState(s||"");if(r&&e)return o.jsx(je,{name:e,control:r,rules:t,defaultValue:s||"",render:({field:E,fieldState:V})=>{var T;return o.jsx(qt,{...g,size:n,width:a,label:i,labelHidden:l,hasError:!!V.error,errorMessage:((T=V.error)==null?void 0:T.message)||"",maxLength:f,showCounter:h,className:m,value:E.value,onChange:E.onChange})}});v.useEffect(()=>{y(s||"")},[s]);const b=E=>{var V;f!==void 0&&E.target.value.length>f||(y(E.target.value),(V=g.onChange)==null||V.call(g,E))};return o.jsxs("div",{className:R("flex flex-col",m),style:{width:a},children:[i&&o.jsx("label",{htmlFor:j,className:R("pb-2 text-[var(--color-ds-text-primary)]",Rr[n],l&&"sr-only"),children:i}),o.jsx("textarea",{id:j,className:R("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",Rr[n],ui[n],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",g.disabled?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]"),value:S,onChange:b,maxLength:f,...g}),o.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&d?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:d}):o.jsx("span",{"aria-hidden":"true",children:" "}),h&&f!==void 0&&o.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[S.length,"/",f]})]})]})}const di={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function Fs({control:r,name:e,rules:t,defaultValue:s=!1,label:n,labelHidden:a=!1,disabled:i=!1,size:l="sm",className:c,hasError:d=!1,errorMessage:f=""}){return o.jsx("div",{className:R("flex flex-col",c),children:o.jsx(je,{name:e,control:r,rules:t,defaultValue:s,render:({field:h,fieldState:m})=>{const g=m.error;return o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("input",{id:e,type:"checkbox",className:R(di[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",i&&"opacity-50 cursor-not-allowed"),checked:h.value,onChange:_=>h.onChange(_.target.checked),disabled:i}),o.jsx("span",{className:R("text-[var(--color-ds-text-primary)] text-ds-md",i&&"text-[var(--color-ds-text-secondary)]"),children:n}),d&&(g==null?void 0:g.message)&&o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:g.message})]})}})})}function Ss({name:r,control:e,searchFn:t,resolveByValue:s,label:n,size:a="sm",width:i="100%",disabled:l=!1}){const{watch:c,getValues:d,setValue:f}=Ke(),h=It({control:e,name:r}),[m,g]=v.useState([]),[_,j]=v.useState(!1),[S,y]=v.useState(!1),[b,E]=v.useState(""),V=v.useRef(null),T=v.useMemo(()=>{const L=new Map;for(const I of m)L.set(String(I.value),I.label??"");return L},[m]),B=async L=>{if(L){j(!0);try{const I=await t(L,{watch:c,getValues:d});g(I??[]),y(!0)}finally{j(!1)}}};v.useEffect(()=>{function L(I){V.current&&!V.current.contains(I.target)&&y(!1)}if(S)return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[S]),v.useEffect(()=>{const L=h?String(h):"";if(!L){E("");return}const I=T.get(L);if(I){E(I);return}let A=!1;return(async()=>{if(s)try{const D=await s(L);A||E((D==null?void 0:D.label)??L)}catch{A||E(L)}else E(L)})(),()=>{A=!0}},[h,T,s]);const W=a==="sm"?"text-ds-sm":a==="md"?"text-ds-md":"text-ds-lg",z=a==="sm"?"h-6":a==="md"?"h-10":"h-12";return o.jsx(je,{name:r,control:e,render:({field:L,fieldState:I})=>{var A;return o.jsxs("div",{ref:V,className:"relative flex flex-col",style:{width:i},children:[n&&o.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${W}`,children:n}),o.jsx(bt,{className:"rounded-r-none",type:"text",size:a,width:"100%",value:b,onChange:D=>{const Z=D.target.value;E(Z),f(r,"",{shouldDirty:!0})},disabled:l,hasError:I.invalid,errorMessage:(A=I.error)==null?void 0:A.message,onFocus:()=>b&&B(b),suffixButton:o.jsx(Te,{type:"button",className:"!rounded-l-none",size:a,variant:"primary",onClick:()=>B(b),disabled:l,children:"Buscar"})}),_&&o.jsx("div",{className:"absolute top-14 left-0 right-0 z-10",children:o.jsx(Me,{width:"100%",height:a==="sm"?"1.5rem":a==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),S&&!_&&m.length>0&&o.jsx("ul",{className:`
28
+ attempted value: ${o}
29
+ `+(l!==o?`result of cast: ${l}`:""))}return a}_cast(t,e){let s=t===void 0?t:this.transforms.reduce((n,a)=>a.call(this,n,t,this),t);return s===void 0&&(s=this.getDefault(e)),s}_validate(t,e={},s,n){let{path:a,originalValue:o=t,strict:l=this.spec.strict}=e,c=t;l||(c=this._cast(c,Object.assign({assert:!1},e)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:a,value:c,originalValue:o,options:e,tests:u},s,f=>{if(f.length)return n(f,c);this.runTests({path:a,value:c,originalValue:o,options:e,tests:this.tests},s,n)})}runTests(t,e,s){let n=!1,{tests:a,value:o,originalValue:l,path:c,options:u}=t,f=k=>{n||(n=!0,e(k,o))},h=k=>{n||(n=!0,s(k,o))},m=a.length,g=[];if(!m)return h([]);let N={value:o,originalValue:l,path:c,options:u,schema:this};for(let k=0;k<a.length;k++){const S=a[k];S(N,f,function(b){b&&(Array.isArray(b)?g.push(...b):g.push(b)),--m<=0&&h(g)})}}asNestedTest({key:t,index:e,parent:s,parentPath:n,originalParent:a,options:o}){const l=t??e;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let u=s[l];const f=Object.assign({},o,{strict:!0,parent:s,value:u,originalValue:a[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${n||""}[${c?l:`"${l}"`}]`:(n?`${n}.`:"")+t});return(h,m,g)=>this.resolve(f)._validate(u,f,m,g)}validate(t,e){var s;let n=this.resolve(Object.assign({},e,{value:t})),a=(s=e==null?void 0:e.disableStackTrace)!=null?s:n.spec.disableStackTrace;return new Promise((o,l)=>n._validate(t,e,(c,u)=>{ve.isError(c)&&(c.value=u),l(c)},(c,u)=>{c.length?l(new ve(c,u,void 0,void 0,a)):o(u)}))}validateSync(t,e){var s;let n=this.resolve(Object.assign({},e,{value:t})),a,o=(s=e==null?void 0:e.disableStackTrace)!=null?s:n.spec.disableStackTrace;return n._validate(t,Object.assign({},e,{sync:!0}),(l,c)=>{throw ve.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new ve(l,t,void 0,void 0,o);a=c}),a}isValid(t,e){return this.validate(t,e).then(()=>!0,s=>{if(ve.isError(s))return!1;throw s})}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(s){if(ve.isError(s))return!1;throw s}}_getDefault(t){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this,t):Je(e)}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,e){const s=this.clone({nullable:t});return s.internalTests.nullable=Xe({message:e,name:"nullable",test(n){return n===null?this.schema.spec.nullable:!0}}),s}optionality(t,e){const s=this.clone({optional:t});return s.internalTests.optionality=Xe({message:e,name:"optionality",test(n){return n===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(t=Te.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Te.notNull){return this.nullability(!1,t)}required(t=Te.required){return this.clone().withMutation(e=>e.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(t.length===1?typeof t[0]=="function"?e={test:t[0]}:e=t[0]:t.length===2?e={name:t[0],test:t[1]}:e={name:t[0],message:t[1],test:t[2]},e.message===void 0&&(e.message=Te.default),typeof e.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),n=Xe(e),a=e.exclusive||e.name&&s.exclusiveTests[e.name]===!0;if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(s.exclusiveTests[e.name]=!!e.exclusive),s.tests=s.tests.filter(o=>!(o.OPTIONS.name===e.name&&(a||o.OPTIONS.test===n.OPTIONS.test))),s.tests.push(n),s}when(t,e){!Array.isArray(t)&&typeof t!="string"&&(e=t,t=".");let s=this.clone(),n=qs(t).map(a=>new Ge(a));return n.forEach(a=>{a.isSibling&&s.deps.push(a.key)}),s.conditions.push(typeof e=="function"?new St(n,e):St.fromOptions(n,e)),s}typeError(t){let e=this.clone();return e.internalTests.typeError=Xe({message:t,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=Te.oneOf){let s=this.clone();return t.forEach(n=>{s._whitelist.add(n),s._blacklist.delete(n)}),s.internalTests.whiteList=Xe({message:e,name:"oneOf",skipAbsent:!0,test(n){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(n)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),s}notOneOf(t,e=Te.notOneOf){let s=this.clone();return t.forEach(n=>{s._blacklist.add(n),s._whitelist.delete(n)}),s.internalTests.blacklist=Xe({message:e,name:"notOneOf",test(n){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(n)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),s}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:s,meta:n,optional:a,nullable:o}=e.spec;return{meta:n,label:s,optional:a,nullable:o,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,u,f)=>f.findIndex(h=>h.name===c.name)===u)}}}je.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])je.prototype[`${r}At`]=function(t,e,s={}){const{parent:n,parentPath:a,schema:o}=Jo(this,t,e,s.context);return o[r](n&&n[a],Object.assign({},s,{parent:n,path:t}))};for(const r of["equals","is"])je.prototype[r]=je.prototype.oneOf;for(const r of["not","nope"])je.prototype[r]=je.prototype.notOneOf;const Ko=()=>!0;function Xt(r){return new Xs(r)}class Xs extends je{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Ko},t))}}Xt.prototype=Xs.prototype;const Qo=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ei(r){const t=Jt(r);if(!t)return Date.parse?Date.parse(r):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 e=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(e=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(e=0-e)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+e,t.second,t.millisecond)}function Jt(r){var t,e;const s=Qo.exec(r);return s?{year:Re(s[1]),month:Re(s[2],1)-1,day:Re(s[3],1),hour:Re(s[4]),minute:Re(s[5]),second:Re(s[6]),millisecond:s[7]?Re(s[7].substring(0,3)):0,precision:(t=(e=s[7])==null?void 0:e.length)!=null?t:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:Re(s[10]),minuteOffset:Re(s[11])}:null}function Re(r,t=0){return Number(r)||t}let ti=/^[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])?)*$/,ri=/^((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,si=/^(?:[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,ni="^\\d{4}-\\d{2}-\\d{2}",ai="\\d{2}:\\d{2}:\\d{2}",oi="(([+-]\\d{2}(:?\\d{2})?)|Z)",ii=new RegExp(`${ni}T${ai}(\\.\\d+)?${oi}$`),li=r=>Ve(r)||r===r.trim(),ci={}.toString();function Js(){return new Ks}class Ks extends je{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce||s.isType(t)||Array.isArray(t))return t;const n=t!=null&&t.toString?t.toString():t;return n===ci?t:n})})}required(t){return super.required(t).withMutation(e=>e.test({message:t||Te.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(e=>e.OPTIONS.name!=="required"),t))}length(t,e=ye.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(s){return s.length===this.resolve(t)}})}min(t,e=ye.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s.length>=this.resolve(t)}})}max(t,e=ye.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(s){return s.length<=this.resolve(t)}})}matches(t,e){let s=!1,n,a;return e&&(typeof e=="object"?{excludeEmptyString:s=!1,message:n,name:a}=e:n=e),this.test({name:a||"matches",message:n||ye.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&s||o.search(t)!==-1})}email(t=ye.email){return this.matches(ti,{name:"email",message:t,excludeEmptyString:!0})}url(t=ye.url){return this.matches(ri,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ye.uuid){return this.matches(si,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e="",s,n;return t&&(typeof t=="object"?{message:e="",allowOffset:s=!1,precision:n=void 0}=t:e=t),this.matches(ii,{name:"datetime",message:e||ye.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:e||ye.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:a=>{if(!a||s)return!0;const o=Jt(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:e||ye.datetime_precision,params:{precision:n},skipAbsent:!0,test:a=>{if(!a||n==null)return!0;const o=Jt(a);return o?o.precision===n:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ye.trim){return this.transform(e=>e!=null?e.trim():e).test({message:t,name:"trim",test:li})}lowercase(t=ye.lowercase){return this.transform(e=>Ve(e)?e:e.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Ve(e)||e===e.toLowerCase()})}uppercase(t=ye.uppercase){return this.transform(e=>Ve(e)?e:e.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Ve(e)||e===e.toUpperCase()})}}Js.prototype=Ks.prototype;let di=r=>r!=+r;function Qs(){return new en}class en extends je{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!di(t)}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce)return t;let n=t;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return s.isType(n)||n===null?n:parseFloat(n)})})}min(t,e=Le.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(t)}})}max(t,e=Le.max){return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(t)}})}lessThan(t,e=Le.lessThan){return this.test({message:e,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(s){return s<this.resolve(t)}})}moreThan(t,e=Le.moreThan){return this.test({message:e,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(s){return s>this.resolve(t)}})}positive(t=Le.positive){return this.moreThan(0,t)}negative(t=Le.negative){return this.lessThan(0,t)}integer(t=Le.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(t=>Ve(t)?t:t|0)}round(t){var e;let s=["ceil","floor","round","trunc"];if(t=((e=t)==null?void 0:e.toLowerCase())||"round",t==="trunc")return this.truncate();if(s.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(n=>Ve(n)?n:Math[t](n))}}Qs.prototype=en.prototype;let tn=new Date(""),ui=r=>Object.prototype.toString.call(r)==="[object Date]";function cr(){return new dt}class dt extends je{constructor(){super({type:"date",check(t){return ui(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,e,s)=>!s.spec.coerce||s.isType(t)||t===null?t:(t=ei(t),isNaN(t)?dt.INVALID_DATE:new Date(t)))})}prepareParam(t,e){let s;if(Ge.isRef(t))s=t;else{let n=this.cast(t);if(!this._typeCheck(n))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);s=n}return s}min(t,e=Yt.min){let s=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(s)}})}max(t,e=Yt.max){let s=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(s)}})}}dt.INVALID_DATE=tn;cr.prototype=dt.prototype;cr.INVALID_DATE=tn;function fi(r,t=[]){let e=[],s=new Set,n=new Set(t.map(([o,l])=>`${o}-${l}`));function a(o,l){let c=We.split(o)[0];s.add(c),n.has(`${l}-${c}`)||e.push([l,c])}for(const o of Object.keys(r)){let l=r[o];s.add(o),Ge.isRef(l)&&l.isSibling?a(l.path,o):lr(l)&&"deps"in l&&l.deps.forEach(c=>a(c,o))}return Po.array(Array.from(s),e).reverse()}function es(r,t){let e=1/0;return r.some((s,n)=>{var a;if((a=t.path)!=null&&a.includes(s))return e=n,!0}),e}function rn(r){return(t,e)=>es(r,t)-es(r,e)}const hi=(r,t,e)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return e.isType(s)?s:r};function kt(r){if("fields"in r){const t={};for(const[e,s]of Object.entries(r.fields))t[e]=kt(s);return r.setFields(t)}if(r.type==="array"){const t=r.optional();return t.innerType&&(t.innerType=kt(t.innerType)),t}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(kt)}):"optional"in r?r.optional():r}const mi=(r,t)=>{const e=[...We.normalizePath(t)];if(e.length===1)return e[0]in r;let s=e.pop(),n=We.getter(We.join(e),!0)(r);return!!(n&&s in n)};let ts=r=>Object.prototype.toString.call(r)==="[object Object]";function rs(r,t){let e=Object.keys(r.fields);return Object.keys(t).filter(s=>e.indexOf(s)===-1)}const pi=rn([]);function sn(r){return new nn(r)}class nn extends je{constructor(t){super({type:"object",check(e){return ts(e)||typeof e=="function"}}),this.fields=Object.create(null),this._sortErrors=pi,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,e={}){var s;let n=super._cast(t,e);if(n===void 0)return this.getDefault(e);if(!this._typeCheck(n))return n;let a=this.fields,o=(s=e.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(h=>!this._nodes.includes(h))),c={},u=Object.assign({},e,{parent:c,__validating:e.__validating||!1}),f=!1;for(const h of l){let m=a[h],g=h in n;if(m){let N,k=n[h];u.path=(e.path?`${e.path}.`:"")+h,m=m.resolve({value:k,context:e.context,parent:c});let S=m instanceof je?m.spec:void 0,y=S==null?void 0:S.strict;if(S!=null&&S.strip){f=f||h in n;continue}N=!e.__validating||!y?m.cast(n[h],u):n[h],N!==void 0&&(c[h]=N)}else g&&!o&&(c[h]=n[h]);(g!==h in c||c[h]!==n[h])&&(f=!0)}return f?c:n}_validate(t,e={},s,n){let{from:a=[],originalValue:o=t,recursive:l=this.spec.recursive}=e;e.from=[{schema:this,value:o},...a],e.__validating=!0,e.originalValue=o,super._validate(t,e,s,(c,u)=>{if(!l||!ts(u)){n(c,u);return}o=o||u;let f=[];for(let h of this._nodes){let m=this.fields[h];!m||Ge.isRef(m)||f.push(m.asNestedTest({options:e,key:h,parent:u,parentPath:e.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:e},s,h=>{n(h.sort(this._sortErrors).concat(c),u)})})}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),s=e.fields;for(let[n,a]of Object.entries(this.fields)){const o=s[n];s[n]=o===void 0?a:o}return e.withMutation(n=>n.setFields(s,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach(s=>{var n;const a=this.fields[s];let o=t;(n=o)!=null&&n.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[s]})),e[s]=a&&"getDefault"in a?a.getDefault(o):void 0}),e}setFields(t,e){let s=this.clone();return s.fields=t,s._nodes=fi(t,e),s._sortErrors=rn(Object.keys(t)),e&&(s._excludedEdges=e),s}shape(t,e=[]){return this.clone().withMutation(s=>{let n=s._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),n=[...s._excludedEdges,...e]),s.setFields(Object.assign(s.fields,t),n)})}partial(){const t={};for(const[e,s]of Object.entries(this.fields))t[e]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(t)}deepPartial(){return kt(this)}pick(t){const e={};for(const s of t)this.fields[s]&&(e[s]=this.fields[s]);return this.setFields(e,this._excludedEdges.filter(([s,n])=>t.includes(s)&&t.includes(n)))}omit(t){const e=[];for(const s of Object.keys(this.fields))t.includes(s)||e.push(s);return this.pick(e)}from(t,e,s){let n=We.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return mi(a,t)&&(o=Object.assign({},a),s||delete o[t],o[e]=n(a)),o})}json(){return this.transform(hi)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||wt.exact,test(e){if(e==null)return!0;const s=rs(this.schema,e);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=wt.noUnknown){typeof t!="boolean"&&(e=t,t=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:e,test(n){if(n==null)return!0;const a=rs(this.schema,n);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return s.spec.noUnknown=t,s}unknown(t=!0,e=wt.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform(e=>{if(!e)return e;const s={};for(const n of Object.keys(e))s[t(n)]=e[n];return s})}camelCase(){return this.transformKeys(Lt.camelCase)}snakeCase(){return this.transformKeys(Lt.snakeCase)}constantCase(){return this.transformKeys(t=>Lt.snakeCase(t).toUpperCase())}describe(t){const e=(t?this.resolve(t):this).clone(),s=super.describe(t);s.fields={};for(const[a,o]of Object.entries(e.fields)){var n;let l=t;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[a]})),s.fields[a]=o.describe(l)}return s}}sn.prototype=nn.prototype;function xi({fields:r,explicitSchema:t}){return v.useMemo(()=>{if(t)return Hr(t);const e={};r.forEach(n=>{var o,l,c,u,f,h,m;let a;switch(n.type){case"text":case"password":case"email":if(a=Js(),(o=n.validation)!=null&&o.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}(l=n.validation)!=null&&l.minLength&&(a=a.min(n.validation.minLength.value,n.validation.minLength.message)),(c=n.validation)!=null&&c.maxLength&&(a=a.max(n.validation.maxLength.value,n.validation.maxLength.message)),(u=n.validation)!=null&&u.pattern&&(a=a.matches(n.validation.pattern.value,n.validation.pattern.message)),n.type==="email"&&(a=a.email("Email inválido"));break;case"number":if(a=Qs(),(f=n.validation)!=null&&f.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}break;case"select":case"optionGroup":if(a=Xt(),(h=n.validation)!=null&&h.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}break;case"date":if(a=cr(),(m=n.validation)!=null&&m.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}break;default:a=Xt()}e[n.name]=a});const s=sn().shape(e);return Hr(s)},[r,t])}function gi(r){return v.useMemo(()=>{const t={};return r.forEach(e=>{t[e.name]=e}),t},[r])}function bi(r){const t=v.useMemo(()=>r.filter(o=>o.type==="select"&&o.loadOptions),[r]),[e,s]=v.useState(t.length),[n,a]=v.useState({});return v.useEffect(()=>{t.length!==0&&t.forEach(o=>{o.loadOptions().then(l=>a(c=>({...c,[o.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[t]),{loadingCount:e,optionsMap:n}}function yi(r,t){const e=v.useMemo(()=>r.filter(o=>o.disabledWhen),[r]),s=v.useMemo(()=>e.map(o=>o.disabledWhen.watchField),[e]),n=sr({control:t,name:s}),a={};return e.forEach(o=>{const l=s.indexOf(o.disabledWhen.watchField),c=n[l];a[o.name]=c===o.disabledWhen.watchValue}),a}const ss={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},vi={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function dr({control:r,name:t,rules:e,defaultValue:s,size:n="sm",width:a="100%",label:o,labelHidden:l=!1,hasError:c=!1,errorMessage:u="",maxLength:f,showCounter:h=!1,className:m,...g}){const N=v.useId(),k=t||N,[S,y]=v.useState(s||"");if(r&&t)return i.jsx(_e,{name:t,control:r,rules:e,defaultValue:s||"",render:({field:E,fieldState:R})=>{var F;return i.jsx(dr,{...g,size:n,width:a,label:o,labelHidden:l,hasError:!!R.error,errorMessage:((F=R.error)==null?void 0:F.message)||"",maxLength:f,showCounter:h,className:m,value:E.value,onChange:E.onChange})}});v.useEffect(()=>{y(s||"")},[s]);const b=E=>{var R;f!==void 0&&E.target.value.length>f||(y(E.target.value),(R=g.onChange)==null||R.call(g,E))};return i.jsxs("div",{className:L("flex flex-col",m),style:{width:a},children:[o&&i.jsx("label",{htmlFor:k,className:L("pb-2 text-[var(--color-ds-text-primary)]",ss[n],l&&"sr-only"),children:o}),i.jsx("textarea",{id:k,className:L("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",ss[n],vi[n],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",g.disabled?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]"),value:S,onChange:b,maxLength:f,...g}),i.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "}),h&&f!==void 0&&i.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[S.length,"/",f]})]})]})}const wi={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function an({control:r,name:t,rules:e,defaultValue:s=!1,label:n,labelHidden:a=!1,disabled:o=!1,size:l="sm",className:c,hasError:u=!1,errorMessage:f=""}){return i.jsx("div",{className:L("flex flex-col",c),children:i.jsx(_e,{name:t,control:r,rules:e,defaultValue:s,render:({field:h,fieldState:m})=>{const g=m.error;return i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:t,type:"checkbox",className:L(wi[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",o&&"opacity-50 cursor-not-allowed"),checked:h.value,onChange:N=>h.onChange(N.target.checked),disabled:o}),i.jsx("span",{className:L("text-[var(--color-ds-text-primary)] text-ds-md",o&&"text-[var(--color-ds-text-secondary)]"),children:n}),u&&(g==null?void 0:g.message)&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:g.message})]})}})})}function on({name:r,control:t,searchFn:e,resolveByValue:s,label:n,size:a="sm",width:o="100%",disabled:l=!1}){const{watch:c,getValues:u,setValue:f}=ct(),h=sr({control:t,name:r}),[m,g]=v.useState([]),[N,k]=v.useState(!1),[S,y]=v.useState(!1),[b,E]=v.useState(""),R=v.useRef(null),F=v.useMemo(()=>{const D=new Map;for(const P of m)D.set(String(P.value),P.label??"");return D},[m]),Z=async D=>{if(D){k(!0);try{const P=await e(D,{watch:c,getValues:u});g(P??[]),y(!0)}finally{k(!1)}}};v.useEffect(()=>{function D(P){R.current&&!R.current.contains(P.target)&&y(!1)}if(S)return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[S]),v.useEffect(()=>{const D=h?String(h):"";if(!D){E("");return}const P=F.get(D);if(P){E(P);return}let V=!1;return(async()=>{if(s)try{const $=await s(D);V||E(($==null?void 0:$.label)??D)}catch{V||E(D)}else E(D)})(),()=>{V=!0}},[h,F,s]);const X=a==="sm"?"text-ds-sm":a==="md"?"text-ds-md":"text-ds-lg",_=a==="sm"?"h-6":a==="md"?"h-10":"h-12";return i.jsx(_e,{name:r,control:t,render:({field:D,fieldState:P})=>{var V;return i.jsxs("div",{ref:R,className:"relative flex flex-col",style:{width:o},children:[n&&i.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${X}`,children:n}),i.jsx(Ct,{className:"rounded-r-none",type:"text",size:a,width:"100%",value:b,onChange:$=>{const G=$.target.value;E(G),f(r,"",{shouldDirty:!0})},disabled:l,hasError:P.invalid,errorMessage:(V=P.error)==null?void 0:V.message,onFocus:()=>b&&Z(b),suffixButton:i.jsx($e,{type:"button",className:"!rounded-l-none",size:a,variant:"primary",onClick:()=>Z(b),disabled:l,children:"Buscar"})}),N&&i.jsx("div",{className:"absolute top-14 left-0 right-0 z-10",children:i.jsx(qe,{width:"100%",height:a==="sm"?"1.5rem":a==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),S&&!N&&m.length>0&&i.jsx("ul",{className:`
30
30
  absolute top-14 left-0 right-0
31
31
  border-[var(--color-ds-border-default)]
32
32
  rounded-lg bg-[var(--color-ds-background-page)]
33
- shadow-lg ${W} max-h-48 overflow-auto z-10
34
- `,children:m.map(D=>o.jsx("li",{className:`px-2 ${z} flex items-center cursor-pointer
33
+ shadow-lg ${X} max-h-48 overflow-auto z-10
34
+ `,children:m.map($=>i.jsx("li",{className:`px-2 ${_} flex items-center cursor-pointer
35
35
  text-[var(--color-ds-text-primary)]
36
- hover:bg-[var(--color-ds-background-surface)]`,onClick:()=>{f(r,String(D.value),{shouldDirty:!0,shouldValidate:!0}),E(D.label??String(D.value)),y(!1)},children:D.label},String(D.value)))})]})}})}function fi({schema:r}){const{layout:e,fields:t,onSubmit:s,successMessage:n,errorMessage:a,footerButtons:i,defaultValues:l,loadDefaultValues:c,validationSchema:d}=r,{show:f}=fs(),{t:h}=Bt(),m=ii({fields:t,explicitSchema:d}),g=Bn({resolver:m,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),_=v.useMemo(()=>({getValues:g.getValues,watch:g.watch}),[g.getValues,g.watch]),{control:j,reset:S,watch:y,handleSubmit:b,formState:{errors:E,isSubmitting:V}}=g,[T,B]=v.useState(!1);v.useEffect(()=>{c&&(B(!0),c().then(H=>S(H)).finally(()=>B(!1)))},[c,S]);const{loadingCount:W,optionsMap:z}=li(t),L=oi(t),I=ci(t,j),A=v.useMemo(()=>{const H={};return e.forEach((k,J)=>{k.type==="tabs"&&(H[J]=k.tabs[0].key)}),H},[e]),[D,Z]=v.useState(A),q=v.useCallback(H=>{const k=y(),{watchField:J,watchValue:re}=H;return typeof re=="function"?re(k):k[J]===re},[y]),X=v.useCallback(H=>{var P,G,ne,ae;let k;if(typeof H=="string"){if(k=L[H],!k)return null}else k=H;if("visibleWhen"in k&&k.visibleWhen&&!q(k.visibleWhen))return null;let J=!!k.disabled;if("disabledWhen"in k&&k.disabledWhen&&q(k.disabledWhen)&&(J=!0),!J&&"name"in k&&k.name&&I[k.name]&&(J=!0),k.type==="search"){const Y=ie=>k.searchFn(ie,_);return o.jsx(Ss,{name:k.name,control:j,searchFn:Y,label:k.label,size:k.size,width:k.width,disabled:J||V},k.name)}if(k.type==="inputGroup"){const Y=k,ie=Y.inputs.map(Q=>{var Ze;const K=typeof Q=="string"?L[Q]:Q;if(!K)return null;let pe=!!K.disabled;K.disabledWhen&&q(K.disabledWhen)&&(pe=!0),!pe&&I[K.name]&&(pe=!0);const Ie={name:K.name,control:j,rules:K.validation,defaultValue:void 0,label:K.label,size:K.size,width:K.width,placeholder:K.placeholder,hasError:!!E[K.name],errorMessage:((Ze=E[K.name])==null?void 0:Ze.message)||"",loading:T,disabled:pe,suffixButton:K.suffixButton};return K.type==="select"?{...Ie,options:K.options??z[K.name]??[],loadOptions:K.options?void 0:K.loadOptions}:Ie}).filter(Q=>Q!==null);return o.jsx(ls,{groupLabel:Y.groupLabel,inputs:ie,separator:Y.separator,useSeparator:Y.useSeparator,className:Y.className,showVisibleLabel:Y.showVisibleLabel,size:Y.size},`inputGroup_${Y.groupLabel}`)}if(k.type==="button"){const Y=k;return o.jsx("div",{className:"self-center",children:o.jsx(Te,{type:"button",variant:Y.variant,size:Y.size,width:Y.width,icon:Y.icon,iconPosition:Y.iconPosition,ariaLabel:Y.ariaLabel,onClick:Y.onClick,disabled:J||V,children:Y.label})},Y.name)}const re=k.suffixButton,x=typeof re=="string"?X(re):re,F={name:k.name,control:j,disabled:J||V,label:k.label,size:k.size,width:k.width,placeholder:k.placeholder,info:k.info,suffixButton:x};switch(k.type){case"select":return o.jsx(je,{name:k.name,control:j,render:({field:Y})=>{var ie;return o.jsx(Xe,{...F,value:Y.value,onChange:Y.onChange,options:k.options??z[k.name]??[],loadOptions:k.options?void 0:k.loadOptions,hasError:!!E[k.name],errorMessage:(ie=E[k.name])==null?void 0:ie.message,suffixButton:x})}},k.name);case"textarea":return o.jsx(je,{name:k.name,control:j,render:({field:Y,fieldState:ie})=>{var Q;return o.jsx(qt,{...F,value:Y.value,onChange:Y.onChange,maxLength:k.maxLength,showCounter:!!k.showCounter,hasError:!!ie.error,errorMessage:((Q=ie.error)==null?void 0:Q.message)||""})}},k.name);case"file":return o.jsx(as,{...F,defaultValue:[],maxFiles:k.maxFiles,accept:k.accept,hasError:!!E[k.name],errorMessage:(P=E[k.name])==null?void 0:P.message},k.name);case"checkbox":return o.jsx(Fs,{...F,defaultValue:!1,hasError:!!E[k.name],errorMessage:(G=E[k.name])==null?void 0:G.message,name:k.name},k.name);case"date":return o.jsx(rs,{...F,defaultValue:"",showTime:!!k.showTime,hasError:!!E[k.name],errorMessage:(ne=E[k.name])==null?void 0:ne.message},k.name);case"optionGroup":return o.jsx(cs,{...F,options:k.options||[],multiple:k.multiple,vertical:k.vertical,groupLabel:k.groupLabel,defaultValue:k.defaultValue,className:k.width?void 0:"w-full",name:k.name},k.name);default:return o.jsx(Zt,{...F,type:k.type,loadingDefaults:T,hasError:!!E[k.name],errorMessage:(ae=E[k.name])==null?void 0:ae.message,suffixButton:x,name:k.name},k.name)}},[L,j,E,V,T,z,q,I]);return o.jsx(Fn,{...g,children:o.jsxs("form",{noValidate:!0,onSubmit:b(async H=>{await s(H),f(n??h("ds.form.saveSuccess"),"success")},H=>{console.log("❌ errores de validación:",H),pa(H),f(a??h("ds.form.saveError"),"error")}),className:"space-y-6",children:[e.map((H,k)=>H.type==="rows"?o.jsx(v.Fragment,{children:H.sections.map((J,re)=>o.jsx("div",{className:"mb-6",children:o.jsx(Nt,{title:J.sectionTitle,defaultOpen:J.defaultOpen,children:J.rows.map((x,F)=>o.jsxs("div",{children:[x.title&&o.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:x.title}),o.jsx("div",{className:"flex flex-wrap -mx-2",children:x.columns.map((P,G)=>{var ne;return o.jsx("div",{className:`${P.width} px-2 flex flex-col`,children:o.jsx("div",{className:"space-y-4",children:P.fields?P.fields.map(ae=>X(ae)):(ne=P.rows)==null?void 0:ne.map((ae,Y)=>o.jsx("div",{className:"mb-1",children:o.jsx("div",{className:"flex flex-wrap -mx-2",children:ae.columns.map((ie,Q)=>{var K;return o.jsx("div",{className:`${ie.width} px-2`,children:(K=ie.fields)==null?void 0:K.map(pe=>X(pe))},Q)})})},Y))})},G)})})]},F))})},re))},k):o.jsx(os,{options:H.tabs.map(J=>({label:J.label,value:J.key})),value:D[k],onChange:J=>Z(re=>({...re,[k]:J})),children:Object.fromEntries(H.tabs.map(J=>[J.key,o.jsx("div",{className:"space-y-6",children:J.sections.map((re,x)=>o.jsx("div",{className:"mb-6",children:o.jsx(Nt,{title:re.sectionTitle,defaultOpen:re.defaultOpen,children:re.rows.map((F,P)=>o.jsx("div",{children:o.jsx("div",{className:"flex flex-wrap -mx-2",children:F.columns.map((G,ne)=>{var ae;return o.jsx("div",{className:`${G.width??"flex-1"} px-2 flex flex-col`,children:o.jsx("div",{className:"space-y-4",children:(ae=G.fields)==null?void 0:ae.map((Y,ie)=>o.jsx(v.Fragment,{children:X(Y)},ie))})},ne)})})},P))})},x))},J.key)]))},k)),o.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:i??o.jsx(Te,{type:"submit",variant:"primary",icon:Qs,size:"sm",disabled:V||T||W>0,children:h(V?"ds.form.sending":"ds.form.submit")})})]})})}const hi={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function ut({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:n,...a}){return o.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:n,className:R("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",hi[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...a,children:o.jsx(r,{className:R(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function Ts({dark:r,onToggle:e}){return o.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:R("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:o.jsxs("div",{className:R("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[o.jsx(Ee,{component:wn,size:"sm",className:R("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),o.jsx(Ee,{component:gn,size:"sm",className:R("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const Os=v.createContext({theme:"light",toggle:()=>{}});function mi({children:r}){const[e,t]=v.useState(!1),[s,n]=v.useState("light");v.useEffect(()=>{if(typeof window>"u")return;const i=localStorage.getItem("ds-theme");i==="light"||i==="dark"?n(i):window.matchMedia("(prefers-color-scheme: dark)").matches&&n("dark"),t(!0)},[]),v.useEffect(()=>{e&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,e]);const a=()=>n(i=>i==="light"?"dark":"light");return e?o.jsx(Os.Provider,{value:{theme:s,toggle:a},children:r}):null}const Cs=()=>v.useContext(Os),As=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:n,languageOptions:a,onChangeLocale:i,profile:l,profileOptions:c,onChangeProfile:d})=>{const f=r.slice(0,3),{toggle:h}=Cs(),{t:m,i18n:g}=Bt(),_=j=>{g.changeLanguage(j),i(j)};return o.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(ut,{icon:vn,size:"sm",ariaLabel:m("back"),onClick:t}),o.jsx(ut,{icon:kn,size:"sm",ariaLabel:m("clearPins"),onClick:()=>r.forEach(j=>e(j.id))}),f.map(j=>o.jsxs("div",{className:"flex items-center",children:[o.jsx("a",{href:j.href,className:R("inline-flex items-center rounded-lg","py-1 px-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:j.label}),o.jsx(ut,{icon:Rt,size:"sm",ariaLabel:`${m("remove")} ${j.label}`,onClick:()=>e(j.id)})]},j.id))]}),o.jsx("div",{className:"flex-grow"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Xe,{size:"sm",width:"auto",options:a,value:n,onChange:_,disableErrorPlaceholder:!0}),o.jsx(Xe,{size:"sm",width:"auto",options:c,value:l,onChange:d,disableErrorPlaceholder:!0}),o.jsx(Ts,{dark:s,onToggle:h})]})]})},xi=({loading:r=!1,ariaLabel:e="Cargando..."})=>r?o.jsxs("div",{className:`\r
36
+ hover:bg-[var(--color-ds-background-surface)]`,onClick:()=>{f(r,String($.value),{shouldDirty:!0,shouldValidate:!0}),E($.label??String($.value)),y(!1)},children:$.label},String($.value)))})]})}})}function ki({schema:r}){const{layout:t,fields:e,onSubmit:s,successMessage:n,errorMessage:a,footerButtons:o,defaultValues:l,loadDefaultValues:c,validationSchema:u}=r,{show:f}=Zs(),{t:h}=or(),m=xi({fields:e,explicitSchema:u}),g=Ja({resolver:m,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),N=v.useMemo(()=>({getValues:g.getValues,watch:g.watch}),[g.getValues,g.watch]),{control:k,reset:S,watch:y,handleSubmit:b,formState:{errors:E,isSubmitting:R}}=g,[F,Z]=v.useState(!1);v.useEffect(()=>{c&&(Z(!0),c().then(Y=>S(Y)).finally(()=>Z(!1)))},[c,S]);const{loadingCount:X,optionsMap:_}=bi(e),D=gi(e),P=yi(e,k),V=v.useMemo(()=>{const Y={};return t.forEach((j,A)=>{j.type==="tabs"&&(Y[A]=j.tabs[0].key)}),Y},[t]),[$,G]=v.useState(V),J=v.useCallback(Y=>{const j=y(),{watchField:A,watchValue:ae}=Y;return typeof ae=="function"?ae(j):j[A]===ae},[y]),K=v.useCallback(Y=>{var z,H,re,le;let j;if(typeof Y=="string"){if(j=D[Y],!j)return null}else j=Y;if("visibleWhen"in j&&j.visibleWhen&&!J(j.visibleWhen))return null;let A=!!j.disabled;if("disabledWhen"in j&&j.disabledWhen&&J(j.disabledWhen)&&(A=!0),!A&&"name"in j&&j.name&&P[j.name]&&(A=!0),j.type==="search"){const ee=Q=>j.searchFn(Q,N);return i.jsx(on,{name:j.name,control:k,searchFn:ee,label:j.label,size:j.size,width:j.width,disabled:A||R},j.name)}if(j.type==="inputGroup"){const ee=j,Q=ee.inputs.map(ne=>{var Fe;const se=typeof ne=="string"?D[ne]:ne;if(!se)return null;let me=!!se.disabled;se.disabledWhen&&J(se.disabledWhen)&&(me=!0),!me&&P[se.name]&&(me=!0);const Se={name:se.name,control:k,rules:se.validation,defaultValue:void 0,label:se.label,size:se.size,width:se.width,placeholder:se.placeholder,hasError:!!E[se.name],errorMessage:((Fe=E[se.name])==null?void 0:Fe.message)||"",loading:F,disabled:me,suffixButton:se.suffixButton};return se.type==="select"?{...Se,options:se.options??_[se.name]??[],loadOptions:se.options?void 0:se.loadOptions}:Se}).filter(ne=>ne!==null);return i.jsx(Ps,{groupLabel:ee.groupLabel,inputs:Q,separator:ee.separator,useSeparator:ee.useSeparator,className:ee.className,showVisibleLabel:ee.showVisibleLabel,size:ee.size},`inputGroup_${ee.groupLabel}`)}if(j.type==="button"){const ee=j;return i.jsx("div",{className:"self-center",children:i.jsx($e,{type:"button",variant:ee.variant,size:ee.size,width:ee.width,icon:ee.icon,iconPosition:ee.iconPosition,ariaLabel:ee.ariaLabel,onClick:ee.onClick,disabled:A||R,children:ee.label})},ee.name)}const ae=j.suffixButton,p=typeof ae=="string"?K(ae):ae,T={name:j.name,control:k,disabled:A||R,label:j.label,size:j.size,width:j.width,placeholder:j.placeholder,info:j.info,suffixButton:p};switch(j.type){case"select":return i.jsx(_e,{name:j.name,control:k,render:({field:ee})=>{var Q;return i.jsx(it,{...T,value:ee.value,onChange:ee.onChange,options:j.options??_[j.name]??[],loadOptions:j.options?void 0:j.loadOptions,hasError:!!E[j.name],errorMessage:(Q=E[j.name])==null?void 0:Q.message,suffixButton:p})}},j.name);case"textarea":return i.jsx(_e,{name:j.name,control:k,render:({field:ee,fieldState:Q})=>{var ne;return i.jsx(dr,{...T,value:ee.value,onChange:ee.onChange,maxLength:j.maxLength,showCounter:!!j.showCounter,hasError:!!Q.error,errorMessage:((ne=Q.error)==null?void 0:ne.message)||""})}},j.name);case"file":return i.jsx(Ds,{...T,defaultValue:[],maxFiles:j.maxFiles,accept:j.accept,hasError:!!E[j.name],errorMessage:(z=E[j.name])==null?void 0:z.message},j.name);case"checkbox":return i.jsx(an,{...T,defaultValue:!1,hasError:!!E[j.name],errorMessage:(H=E[j.name])==null?void 0:H.message,name:j.name},j.name);case"date":return i.jsx(Rs,{...T,defaultValue:"",showTime:!!j.showTime,hasError:!!E[j.name],errorMessage:(re=E[j.name])==null?void 0:re.message},j.name);case"optionGroup":return i.jsx(zs,{...T,options:j.options||[],multiple:j.multiple,vertical:j.vertical,groupLabel:j.groupLabel,defaultValue:j.defaultValue,className:j.width?void 0:"w-full",name:j.name},j.name);default:return i.jsx(ir,{...T,type:j.type,loadingDefaults:F,hasError:!!E[j.name],errorMessage:(le=E[j.name])==null?void 0:le.message,suffixButton:p,name:j.name},j.name)}},[D,k,E,R,F,_,J,P]);return i.jsx($a,{...g,children:i.jsxs("form",{noValidate:!0,onSubmit:b(async Y=>{await s(Y),f(n??h("ds.form.saveSuccess"),"success")},Y=>{console.log("❌ errores de validación:",Y),_o(Y),f(a??h("ds.form.saveError"),"error")}),className:"space-y-6",children:[t.map((Y,j)=>Y.type==="rows"?i.jsx(v.Fragment,{children:Y.sections.map((A,ae)=>i.jsx("div",{className:"mb-6",children:i.jsx(Pt,{title:A.sectionTitle,defaultOpen:A.defaultOpen,children:A.rows.map((p,T)=>i.jsxs("div",{children:[p.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:p.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:p.columns.map((z,H)=>{var re;return i.jsx("div",{className:`${z.width} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:z.fields?z.fields.map(le=>K(le)):(re=z.rows)==null?void 0:re.map((le,ee)=>i.jsx("div",{className:"mb-1",children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:le.columns.map((Q,ne)=>{var se;return i.jsx("div",{className:`${Q.width} px-2`,children:(se=Q.fields)==null?void 0:se.map(me=>K(me))},ne)})})},ee))})},H)})})]},T))})},ae))},j):i.jsx(Ls,{options:Y.tabs.map(A=>({label:A.label,value:A.key})),value:$[j],onChange:A=>G(ae=>({...ae,[j]:A})),children:Object.fromEntries(Y.tabs.map(A=>[A.key,i.jsx("div",{className:"space-y-6",children:A.sections.map((ae,p)=>i.jsx("div",{className:"mb-6",children:i.jsx(Pt,{title:ae.sectionTitle,defaultOpen:ae.defaultOpen,children:ae.rows.map((T,z)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:T.columns.map((H,re)=>{var le;return i.jsx("div",{className:`${H.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(le=H.fields)==null?void 0:le.map((ee,Q)=>i.jsx(v.Fragment,{children:K(ee)},Q))})},re)})})},z))})},p))},A.key)]))},j)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:o??i.jsx($e,{type:"submit",variant:"primary",icon:Mn,size:"sm",disabled:R||F||X>0,children:h(R?"ds.form.sending":"ds.form.submit")})})]})})}const ji={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function ln({icon:r,size:t="md",ariaLabel:e,disabled:s=!1,onClick:n,...a}){return i.jsx("button",{type:"button","aria-label":e,disabled:s,onClick:n,className:L("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",ji[t],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...a,children:i.jsx(r,{className:L(t==="sm"?"h-4 w-4":t==="md"?"h-5 w-5":"h-6 w-6")})})}function cn({dark:r,onToggle:t}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:t,className:L("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:i.jsxs("div",{className:L("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[i.jsx(Ce,{component:Kn,size:"sm",className:L("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(Ce,{component:Xn,size:"sm",className:L("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const dn=v.createContext({theme:"light",toggle:()=>{}});function Ei({children:r}){const[t,e]=v.useState(!1),[s,n]=v.useState("light");v.useEffect(()=>{if(typeof window>"u")return;const o=localStorage.getItem("ds-theme");o==="light"||o==="dark"?n(o):window.matchMedia("(prefers-color-scheme: dark)").matches&&n("dark"),e(!0)},[]),v.useEffect(()=>{t&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,t]);const a=()=>n(o=>o==="light"?"dark":"light");return t?i.jsx(dn.Provider,{value:{theme:s,toggle:a},children:r}):null}const un=()=>v.useContext(dn),fn=({pinnedPages:r,onRemovePinned:t,onBack:e,dark:s,locale:n,languageOptions:a,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:u})=>{const f=r.slice(0,3),{toggle:h}=un(),{t:m,i18n:g}=or(),N=k=>{g.changeLanguage(k),o(k)};return i.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[i.jsx("div",{className:"flex items-center space-x-2",children:f.map(k=>i.jsxs("div",{className:"flex items-center",children:[i.jsx("a",{href:k.href,className:L("inline-flex items-center rounded-lg","py-1 px-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:k.label}),i.jsx(ln,{icon:Kt,size:"sm",ariaLabel:`${m("remove")} ${k.label}`,onClick:()=>t(k.id)})]},k.id))}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(it,{size:"sm",width:"auto",options:a,value:n,onChange:N,disableErrorPlaceholder:!0}),i.jsx(it,{size:"sm",width:"auto",options:c,value:l,onChange:u,disableErrorPlaceholder:!0}),i.jsx(cn,{dark:s,onToggle:h})]})]})},Ni=({loading:r=!1,ariaLabel:t="Cargando..."})=>r?i.jsxs("div",{className:`\r
37
37
  fixed inset-0\r
38
38
  flex items-center justify-center\r
39
39
  bg-[var(--color-ds-background-surface)]/90\r
40
40
  z-50\r
41
- `,role:"status","aria-live":"polite","aria-label":e,children:[o.jsx("div",{className:`\r
41
+ `,role:"status","aria-live":"polite","aria-label":t,children:[i.jsx("div",{className:`\r
42
42
  w-12 h-12\r
43
43
  border-4 rounded-full\r
44
44
  border-gray-200\r
45
45
  border-t-[var(--color-ds-button-primary-bg)]\r
46
46
  animate-spin\r
47
- `}),o.jsx("span",{className:"sr-only",children:e})]}):null,pi=({isOpen:r,onClose:e,title:t,children:s,footer:n})=>(v.useEffect(()=>{const a=i=>i.key==="Escape"&&e();return r&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[r,e]),r?Vr.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 bg-[var(--color-ds-text-primary)]/50 z-40",onClick:e}),o.jsx("div",{className:"fixed inset-0 flex items-center justify-center px-4 z-50",children:o.jsxs("div",{className:`\r
47
+ `}),i.jsx("span",{className:"sr-only",children:t})]}):null,_i=({isOpen:r,onClose:t,title:e,children:s,footer:n})=>(v.useEffect(()=>{const a=o=>o.key==="Escape"&&t();return r&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[r,t]),r?ns.createPortal(i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed inset-0 bg-[var(--color-ds-text-primary)]/50 z-40",onClick:t}),i.jsx("div",{className:"fixed inset-0 flex items-center justify-center px-4 z-50",children:i.jsxs("div",{className:`\r
48
48
  relative\r
49
49
  bg-[var(--color-ds-background-page)]\r
50
50
  dark:bg-[var(--color-ds-background-surface)]\r
@@ -52,10 +52,10 @@ attempted value: ${i}
52
52
  shadow-2xl\r
53
53
  w-full max-w-lg\r
54
54
  overflow-hidden\r
55
- `,children:[o.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-[var(--color-ds-border-muted)]",children:[t?o.jsx("h3",{className:"text-ds-lg font-semibold text-[var(--color-ds-text-primary)]",children:t}):o.jsx("div",{}),o.jsxs("button",{onClick:e,className:`\r
55
+ `,children:[i.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-[var(--color-ds-border-muted)]",children:[e?i.jsx("h3",{className:"text-ds-lg font-semibold text-[var(--color-ds-text-primary)]",children:e}):i.jsx("div",{}),i.jsxs("button",{onClick:t,className:`\r
56
56
  p-1 rounded-full\r
57
57
  bg-[var(--color-ds-background-page)]\r
58
58
  dark:bg-[var(--color-ds-background-surface)]\r
59
59
  hover:bg-[var(--color-ds-background-accent)]/10\r
60
60
  focus:outline-none\r
61
- `,children:[o.jsx(Rt,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),o.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),o.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),n&&o.jsx("div",{className:"px-6 py-4 border-t border-[var(--color-ds-border-muted)] bg-[var(--color-ds-background-surface)]",children:n})]})})]}),document.body):null),Ht=({items:r,selected:e,onSelect:t,level:s=0})=>{const[n,a]=v.useState(new Set),i=l=>{const c=new Set(n);s===0?(c.clear(),n.has(l)||c.add(l)):c.has(l)?c.delete(l):c.add(l),a(c)};return o.jsx("ul",{className:R(s>0?"mt-1":"mt-0"),children:r.map(l=>{var _;const c=l.value===e,d=n.has(l.value),f=["pl-2","pl-2","pl-2"][s]||"pl-4",h=s===0?d||c?"bg-[var(--color-ds-background-accent)] text-[var(--color-ds-text-on-accent)] rounded-r-lg":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]":c?"bg-[var(--color-ds-background-surface)] text-[var(--color-ds-text-primary)]":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]",m=s===0&&(d||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]",g=!!((_=l.children)!=null&&_.length);return o.jsxs("li",{children:[o.jsxs("button",{type:"button",onClick:()=>g?i(l.value):t(l.value),"aria-expanded":g?d:void 0,className:R("w-full flex items-center justify-between h-8 transition-colors",f,h),children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&o.jsx(l.icon,{className:"w-5 h-5 ml-2"}),o.jsx("span",{className:"text-ds-sm",children:l.label})]}),g&&(d?o.jsx(Lr,{className:R("w-4 h-4",m)}):o.jsx(rn,{className:R("w-4 h-4",m)}))]}),g&&o.jsx("div",{className:R("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",d?"max-h-screen":"max-h-0"),children:o.jsx(Ht,{items:l.children,selected:e,onSelect:t,level:s+1})})]},l.value)})})},gi="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23FFFFFF;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",bi="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23005751;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",$s=({appName:r,orgName:e,username:t,footerText:s,navItems:n,selectedNav:a,onSelectNav:i,width:l="200px"})=>{const{theme:c}=Cs(),d=c==="dark"?gi:bi;return o.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[o.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[o.jsx("img",{src:d,alt:"Logo Diputación",className:"w-20 h-20"}),o.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),o.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),o.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),o.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),o.jsx("nav",{className:"flex-1 overflow-auto pt-6",children:o.jsx(Ht,{items:n,selected:a,onSelect:i})}),o.jsx("div",{className:"px-4 w-full py-3",children:o.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function vi({sidebar:r,header:e,children:t}){return o.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[o.jsx($s,{...r}),o.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[o.jsx(As,{...e}),o.jsx("main",{className:"flex-1 ",children:t})]})]})}function yi({columns:r,data:e,loadData:t,loading:s,idAccessor:n,multiSelect:a=!1,onSelectionChange:i,pageSize:l=10,initialSort:c,onSort:d,className:f}){const h=e!==void 0,[m,g]=v.useState([]),[_,j]=v.useState(!1),S=v.useRef(null);v.useEffect(()=>{var F;if(!t||h)return;(F=S.current)==null||F.abort();const x=new AbortController;return S.current=x,j(!0),t().then(P=>{x.signal.aborted||g(P)}).finally(()=>{x.signal.aborted||j(!1)}),()=>x.abort()},[t,h]);const y=v.useMemo(()=>h?e:m,[e,m,h]),b=s??(t?_:!1),[E,V]=v.useState(new Set),[T,B]=v.useState(1),[W,z]=v.useState(c==null?void 0:c.sortBy),[L,I]=v.useState((c==null?void 0:c.sortDir)??"asc"),A=x=>typeof n=="function"?n(x):x[n],D=v.useRef(null);v.useEffect(()=>{D.current!==y&&(V(new Set),B(1),D.current=y)},[y]);const Z=v.useMemo(()=>{if(!W)return y;const x=L==="asc"?1:-1;return[...y].sort((F,P)=>{const G=F[W],ne=P[W];return G==null?-x:ne==null||G>ne?x:G<ne?-x:0})},[y,W,L]),q=Math.max(1,Math.ceil(Z.length/l)),X=v.useMemo(()=>{const x=(T-1)*l;return Z.slice(x,x+l)},[Z,T,l]),H=x=>{const F=new Set(E);F.has(x)?F.delete(x):F.add(x),V(F),i==null||i(y.filter(P=>F.has(A(P))))},k=()=>{const x=X.every(P=>E.has(A(P))),F=new Set(E);X.forEach(P=>{x?F.delete(A(P)):F.add(A(P))}),V(F),i==null||i(y.filter(P=>F.has(A(P))))},J=x=>{if(!x.sortable)return;const F=typeof x.accessor=="string"?x.accessor:x.sortKey;if(W===F){const P=L==="asc"?"desc":"asc";I(P),d==null||d(F,P)}else z(F),I("asc"),d==null||d(F,"asc");B(1)},re=()=>b?o.jsx("tbody",{children:Array.from({length:l}).map((x,F)=>o.jsxs("tr",{children:[a&&o.jsx("td",{children:o.jsx(Me,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((P,G)=>o.jsx("td",{children:o.jsx(Me,{width:"100%",height:"1em",variant:"rect"})},G))]},F))}):X.length?o.jsx("tbody",{children:X.map(x=>{const F=A(x);return o.jsxs("tr",{className:"hover:bg-gray-50",children:[a&&o.jsx("td",{children:o.jsx("input",{type:"checkbox",checked:E.has(F),onChange:()=>H(F)})}),r.map((P,G)=>{const ne=P.render?P.render(x):typeof P.accessor=="function"?P.accessor(x):x[P.accessor];return o.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm",children:ne},G)})]},F)})}):o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{colSpan:r.length+(a?1:0),children:"No hay datos"})})});return o.jsxs("div",{className:R("w-full overflow-auto",f),children:[o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[a&&o.jsx("th",{children:o.jsx("input",{type:"checkbox",checked:X.length>0&&X.every(x=>E.has(A(x))),onChange:k})}),r.map(x=>{const F=typeof x.accessor=="string"?x.accessor:x.header,P=W===(typeof x.accessor=="string"?x.accessor:x.sortKey);return o.jsx("th",{className:R("px-4 py-2 text-left text-sm font-medium text-gray-700",x.width),onClick:()=>J(x),children:o.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer",children:[o.jsx("span",{children:x.header}),x.sortable&&o.jsx("span",{className:"text-xs",children:P?L==="asc"?"▲":"▼":"⇵"})]})},F)})]})}),re()]}),o.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[o.jsx("span",{className:"text-sm text-gray-700",children:b?"Cargando...":`Página ${T} de ${q}`}),o.jsxs("div",{className:"space-x-2",children:[o.jsx(Te,{size:"sm",variant:"outline",disabled:b||T<=1,onClick:()=>B(x=>Math.max(1,x-1)),children:"Prev"}),o.jsx(Te,{size:"sm",variant:"outline",disabled:b||T>=q,onClick:()=>B(x=>Math.min(q,x+1)),children:"Next"})]})]})]})}function Ds({control:r,name:e,rules:t,defaultValue:s=!1,checked:n,onChange:a,disabled:i=!1,label:l,labelPosition:c="right",errorMessage:d="",className:f}){const h=v.useId();if(r&&e)return o.jsx(je,{name:e,control:r,rules:t,defaultValue:s,render:({field:g,fieldState:_})=>{var j;return o.jsx(Ds,{checked:g.value,onChange:g.onChange,disabled:i,label:l,labelPosition:c,errorMessage:((j=_.error)==null?void 0:j.message)||"",className:f})}});const m=!!n;return o.jsxs("div",{className:R("flex flex-col",f),children:[o.jsxs("label",{className:R("inline-flex items-center space-x-3 select-none",i&&"opacity-50 cursor-not-allowed"),htmlFor:h,children:[l&&c==="left"&&o.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),o.jsx("button",{id:h,type:"button",role:"switch","aria-checked":m,disabled:i,onClick:()=>!i&&(a==null?void 0:a(!m)),className:R("relative inline-flex items-center h-8 w-16","bg-[var(--color-ds-background-accent)] rounded-full transition-colors duration-200","focus:outline-none "),children:o.jsx("div",{className:R("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",m?"translate-x-9":"translate-x-1")})}),l&&c==="right"&&o.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),o.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:d?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:d}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}exports.Button=Te;exports.Checkbox=Fs;exports.CollapsibleSection=Nt;exports.DateInput=rs;exports.DropdownMenu=Wn;exports.FileUploader=as;exports.FormFieldInput=Zt;exports.FormPageLayout=fa;exports.FormRenderer=fi;exports.Header=As;exports.Icon=Ee;exports.IconButton=ut;exports.InfoButton=is;exports.Input=bt;exports.InputGroup=ls;exports.LoadingScreen=xi;exports.Modal=pi;exports.OptionGroup=cs;exports.PageLayout=vi;exports.SearchField=Ss;exports.Select=Xe;exports.Sidebar=$s;exports.SidebarNav=Ht;exports.SkeletonLoader=Me;exports.Table=yi;exports.Tabs=os;exports.TextArea=qt;exports.ThemeProvider=mi;exports.ThemeToggle=Ts;exports.Toast=us;exports.ToastProvider=ka;exports.ToggleSwitch=Ds;exports.useToast=fs;
61
+ `,children:[i.jsx(Kt,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),i.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),i.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),n&&i.jsx("div",{className:"px-6 py-4 border-t border-[var(--color-ds-border-muted)] bg-[var(--color-ds-background-surface)]",children:n})]})})]}),document.body):null),ur=({items:r,selected:t,onSelect:e,level:s=0})=>{const[n,a]=v.useState(new Set),o=l=>{const c=new Set(n);s===0?(c.clear(),n.has(l)||c.add(l)):c.has(l)?c.delete(l):c.add(l),a(c)};return i.jsx("ul",{className:L(s>0?"mt-1":"mt-0"),children:r.map(l=>{var N;const c=l.value===t,u=n.has(l.value),f=["pl-2","pl-2","pl-2"][s]||"pl-4",h=s===0?u||c?"bg-[var(--color-ds-background-accent)] text-[var(--color-ds-text-on-accent)] rounded-r-lg":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]":c?"bg-[var(--color-ds-background-surface)] text-[var(--color-ds-text-primary)]":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]",m=s===0&&(u||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]",g=!!((N=l.children)!=null&&N.length);return i.jsxs("li",{children:[i.jsxs("button",{type:"button",onClick:()=>g?o(l.value):e(l.value),"aria-expanded":g?u:void 0,className:L("w-full flex items-center justify-between h-8 transition-colors",f,h),children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&i.jsx(l.icon,{className:"w-5 h-5 ml-2"}),i.jsx("span",{className:"text-ds-sm",children:l.label})]}),g&&(u?i.jsx(os,{className:L("w-4 h-4",m)}):i.jsx($n,{className:L("w-4 h-4",m)}))]}),g&&i.jsx("div",{className:L("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",u?"max-h-screen":"max-h-0"),children:i.jsx(ur,{items:l.children,selected:t,onSelect:e,level:s+1})})]},l.value)})})},Si="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23FFFFFF;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",Fi="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23005751;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",hn=({appName:r,orgName:t,username:e,footerText:s,navItems:n,selectedNav:a,onSelectNav:o,width:l="200px"})=>{const{theme:c}=un(),u=c==="dark"?Si:Fi;return i.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[i.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[i.jsx("img",{src:u,alt:"Logo Diputación",className:"w-20 h-20"}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),i.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),i.jsx("nav",{className:"flex-1 overflow-auto pt-3",children:i.jsx(ur,{items:n,selected:a,onSelect:o})}),i.jsx("div",{className:"px-4 w-full py-3",children:i.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function Ti({sidebar:r,header:t,children:e}){return i.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[i.jsx(hn,{...r}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[i.jsx(fn,{...t}),i.jsx("main",{className:"flex-1 ",children:e})]})]})}function Ci({columns:r,data:t,loadData:e,loading:s,idAccessor:n,multiSelect:a=!1,onSelectionChange:o,pageSize:l=10,initialSort:c,onSort:u,className:f}){const h=t!==void 0,[m,g]=v.useState([]),[N,k]=v.useState(!1),S=v.useRef(null);v.useEffect(()=>{var T;if(!e||h)return;(T=S.current)==null||T.abort();const p=new AbortController;return S.current=p,k(!0),e().then(z=>{p.signal.aborted||g(z)}).finally(()=>{p.signal.aborted||k(!1)}),()=>p.abort()},[e,h]);const y=v.useMemo(()=>h?t:m,[t,m,h]),b=s??(e?N:!1),[E,R]=v.useState(new Set),[F,Z]=v.useState(1),[X,_]=v.useState(c==null?void 0:c.sortBy),[D,P]=v.useState((c==null?void 0:c.sortDir)??"asc"),V=p=>typeof n=="function"?n(p):p[n],$=v.useRef(null);v.useEffect(()=>{$.current!==y&&(R(new Set),Z(1),$.current=y)},[y]);const G=v.useMemo(()=>{if(!X)return y;const p=D==="asc"?1:-1;return[...y].sort((T,z)=>{const H=T[X],re=z[X];return H==null?-p:re==null||H>re?p:H<re?-p:0})},[y,X,D]),J=Math.max(1,Math.ceil(G.length/l)),K=v.useMemo(()=>{const p=(F-1)*l;return G.slice(p,p+l)},[G,F,l]),Y=p=>{const T=new Set(E);T.has(p)?T.delete(p):T.add(p),R(T),o==null||o(y.filter(z=>T.has(V(z))))},j=()=>{const p=K.every(z=>E.has(V(z))),T=new Set(E);K.forEach(z=>{p?T.delete(V(z)):T.add(V(z))}),R(T),o==null||o(y.filter(z=>T.has(V(z))))},A=p=>{if(!p.sortable)return;const T=typeof p.accessor=="string"?p.accessor:p.sortKey;if(X===T){const z=D==="asc"?"desc":"asc";P(z),u==null||u(T,z)}else _(T),P("asc"),u==null||u(T,"asc");Z(1)},ae=()=>b?i.jsx("tbody",{children:Array.from({length:l}).map((p,T)=>i.jsxs("tr",{children:[a&&i.jsx("td",{children:i.jsx(qe,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((z,H)=>i.jsx("td",{children:i.jsx(qe,{width:"100%",height:"1em",variant:"rect"})},H))]},T))}):K.length?i.jsx("tbody",{children:K.map(p=>{const T=V(p);return i.jsxs("tr",{className:"hover:bg-gray-50",children:[a&&i.jsx("td",{children:i.jsx("input",{type:"checkbox",checked:E.has(T),onChange:()=>Y(T)})}),r.map((z,H)=>{const re=z.render?z.render(p):typeof z.accessor=="function"?z.accessor(p):p[z.accessor];return i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm",children:re},H)})]},T)})}):i.jsx("tbody",{children:i.jsx("tr",{children:i.jsx("td",{colSpan:r.length+(a?1:0),children:"No hay datos"})})});return i.jsxs("div",{className:L("w-full overflow-auto",f),children:[i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsxs("tr",{children:[a&&i.jsx("th",{children:i.jsx("input",{type:"checkbox",checked:K.length>0&&K.every(p=>E.has(V(p))),onChange:j})}),r.map(p=>{const T=typeof p.accessor=="string"?p.accessor:p.header,z=X===(typeof p.accessor=="string"?p.accessor:p.sortKey);return i.jsx("th",{className:L("px-4 py-2 text-left text-sm font-medium text-gray-700",p.width),onClick:()=>A(p),children:i.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer",children:[i.jsx("span",{children:p.header}),p.sortable&&i.jsx("span",{className:"text-xs",children:z?D==="asc"?"▲":"▼":"⇵"})]})},T)})]})}),ae()]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[i.jsx("span",{className:"text-sm text-gray-700",children:b?"Cargando...":`Página ${F} de ${J}`}),i.jsxs("div",{className:"space-x-2",children:[i.jsx($e,{size:"sm",variant:"outline",disabled:b||F<=1,onClick:()=>Z(p=>Math.max(1,p-1)),children:"Prev"}),i.jsx($e,{size:"sm",variant:"outline",disabled:b||F>=J,onClick:()=>Z(p=>Math.min(J,p+1)),children:"Next"})]})]})]})}function mn({control:r,name:t,rules:e,defaultValue:s=!1,checked:n,onChange:a,disabled:o=!1,label:l,labelPosition:c="right",errorMessage:u="",className:f}){const h=v.useId();if(r&&t)return i.jsx(_e,{name:t,control:r,rules:e,defaultValue:s,render:({field:g,fieldState:N})=>{var k;return i.jsx(mn,{checked:g.value,onChange:g.onChange,disabled:o,label:l,labelPosition:c,errorMessage:((k=N.error)==null?void 0:k.message)||"",className:f})}});const m=!!n;return i.jsxs("div",{className:L("flex flex-col",f),children:[i.jsxs("label",{className:L("inline-flex items-center space-x-3 select-none",o&&"opacity-50 cursor-not-allowed"),htmlFor:h,children:[l&&c==="left"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),i.jsx("button",{id:h,type:"button",role:"switch","aria-checked":m,disabled:o,onClick:()=>!o&&(a==null?void 0:a(!m)),className:L("relative inline-flex items-center h-8 w-16","bg-[var(--color-ds-background-accent)] rounded-full transition-colors duration-200","focus:outline-none "),children:i.jsx("div",{className:L("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",m?"translate-x-9":"translate-x-1")})}),l&&c==="right"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),i.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}exports.Button=$e;exports.Checkbox=an;exports.CollapsibleSection=Pt;exports.DateInput=Rs;exports.DropdownMenu=eo;exports.FileUploader=Ds;exports.FormFieldInput=ir;exports.FormPageLayout=ko;exports.FormRenderer=ki;exports.Header=fn;exports.Icon=Ce;exports.IconButton=ln;exports.InfoButton=Is;exports.Input=Ct;exports.InputGroup=Ps;exports.LoadingScreen=Ni;exports.Modal=_i;exports.OptionGroup=zs;exports.PageLayout=Ti;exports.SearchField=on;exports.Select=it;exports.Sidebar=hn;exports.SidebarNav=ur;exports.SkeletonLoader=qe;exports.Table=Ci;exports.Tabs=Ls;exports.TextArea=dr;exports.ThemeProvider=Ei;exports.ThemeToggle=cn;exports.Toast=Us;exports.ToastProvider=Mo;exports.ToggleSwitch=mn;exports.useToast=Zs;