@rovula/ui 0.1.27 → 0.1.28
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/cjs/bundle.css +12 -0
- package/dist/cjs/bundle.js +2 -2
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/Avatar/Avatar.d.ts +1 -1
- package/dist/cjs/types/components/Avatar/Avatar.stories.d.ts +1 -1
- package/dist/cjs/types/components/Avatar/Avatar.styles.d.ts +1 -0
- package/dist/components/Avatar/Avatar.js +2 -1
- package/dist/components/Avatar/Avatar.styles.js +3 -0
- package/dist/components/Avatar/AvatarBase.js +1 -1
- package/dist/esm/bundle.css +12 -0
- package/dist/esm/bundle.js +1 -1
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/Avatar/Avatar.d.ts +1 -1
- package/dist/esm/types/components/Avatar/Avatar.stories.d.ts +1 -1
- package/dist/esm/types/components/Avatar/Avatar.styles.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/src/theme/global.css +15 -0
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.styles.ts +4 -1
- package/src/components/Avatar/Avatar.tsx +3 -2
- package/src/components/Avatar/AvatarBase.tsx +3 -3
package/dist/esm/bundle.js
CHANGED
|
@@ -9244,7 +9244,7 @@ import*as e from"react";import t,{forwardRef as r,useRef as n,useCallback as a,c
|
|
|
9244
9244
|
*
|
|
9245
9245
|
* This source code is licensed under the ISC license.
|
|
9246
9246
|
* See the LICENSE file in the root directory of this source tree.
|
|
9247
|
-
*/const Wme=UM("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);var Ume=Object.freeze({__proto__:null,default:Wme});const $me=r(((e,t)=>{var{id:r,label:o,size:i="md",rounded:s="normal",variant:c="outline",type:d="text",iconMode:u="solid",helperText:h,errorMessage:f,warningMessage:p,status:v,fullwidth:m=!0,disabled:y=!1,error:g=!1,warning:b=!1,required:k=!0,isFloatingLabel:M=!0,keepCloseIconOnValue:x=!1,keepFooterSpace:j=!0,hasClearIcon:O=!0,hasSearchIcon:E=!1,startIcon:z,endIcon:C,labelClassName:P,onClickStartIcon:A,onClickEndIcon:R,renderStartIcon:L,renderEndIcon:I,classes:S,normalize:V,format:H,trimOnCommit:Z,normalizeOnCommit:N}=e,D=EM(e,["id","label","size","rounded","variant","type","iconMode","helperText","errorMessage","warningMessage","status","fullwidth","disabled","error","warning","required","isFloatingLabel","keepCloseIconOnValue","keepFooterSpace","hasClearIcon","hasSearchIcon","startIcon","endIcon","labelClassName","onClickStartIcon","onClickEndIcon","renderStartIcon","renderEndIcon","classes","normalize","format","trimOnCommit","normalizeOnCommit"]);const q=n(null),B=r||`${d}-${o}-input`,F=function(...e){const t=n();return t.current=function(...e){return t=>{e.forEach((e=>{e&&("function"==typeof e?e(t):e.current=t)}))}}(...e),a((e=>{var r;null===(r=t.current)||void 0===r||r.call(t,e)}),[])}(t,q),T=!!z||!!L,W=!!C||!!I,U=v||(g||f?"error":b||p?"warning":"default"),$="error"===U,G="warning"===U,Y="error"===U?f:"warning"===U?p:h,K=LM({size:i,rounded:s,variant:c,fullwidth:m,disabled:y,error:$,warning:G,hasSearchIcon:"flat"===u&&T||E,hasClearIcon:"flat"===u&&W||O,leftSectionIcon:"solid"===u&&T,rightSectionIcon:"solid"===u&&W}),X=IM({size:i,disabled:y,error:$,hasSearchIcon:"flat"===u&&T||E,hasLeftSectionIcon:"solid"===u&&T,isFloatingLabel:M}),Q=SM({size:i,error:$,warning:G,disabled:y}),J=HM({size:i}),ee=ZM({size:i}),te=NM({size:i}),re=DM({size:i}),ne=qM({size:i,rounded:s,error:$,warning:G,position:"start"}),ae=qM({size:i,rounded:s,error:$,warning:G,position:"end"}),oe=a((e=>{var t;V&&(e.target.value=V(e.target.value)),null===(t=D.onChange)||void 0===t||t.call(D,e)}),[V,D.onChange]),le=a((e=>{var t;const r=e.currentTarget;let n=r.value;Z&&(n=n.trim()),N&&(n=N(n)),n!==r.value&&(r.value=n,null===(t=D.onChange)||void 0===t||t.call(D,Object.assign(Object.assign({},e),{target:r})))}),[Z,N,D.onChange]),ie=a((e=>{var t;(Z||N)&&le(e),null===(t=D.onBlur)||void 0===t||t.call(D,e)}),[Z,N,le,D.onBlur]),se=a((e=>{var t;(Z||N)&&"Enter"===e.key&&le(e),null===(t=D.onKeyDown)||void 0===t||t.call(D,e)}),[Z,N,le,D.onKeyDown]),ce=H&&"string"==typeof D.value?H(D.value):D.value,de=a((()=>{q.current&&(q.current.value="",D.onChange&&(new Event("input",{bubbles:!0}),D.onChange({target:{value:""}})))}),[D.onChange]),ue=a((()=>{y||(null==A||A(),q.current&&q.current.focus())}),[y,A]),he=a((()=>{y||(null==R||R(),q.current&&q.current.focus())}),[y,R]),fe=l((()=>{if(T)return w("div",L?{className:PM(ee,"flex",null==S?void 0:S.iconSearchWrapper),children:L()}:"flat"===u?{className:PM(ee,null==S?void 0:S.iconSearchWrapper),children:w("div",{className:PM(te,null==S?void 0:S.icon),onClick:ue,children:z})}:{className:PM(ne,null==S?void 0:S.startIconWrapper),onClick:ue,children:z})}),[T,z,u,ee,ne,te,L,ue]),pe=l((()=>{if(W)return w("div",I?{className:PM(J,"flex",null==S?void 0:S.iconWrapper),children:I()}:"flat"===u?{className:PM(J,"flex",null==S?void 0:S.iconWrapper),children:w("div",{className:PM(te,null==S?void 0:S.icon),onClick:he,children:C})}:{className:PM(ae,null==S?void 0:S.endIconWrapper),onClick:he,children:C})}),[W,C,u,J,ae,te,I,he]);return _("div",{className:"inline-flex flex-col "+(m?"w-full":""),children:[_("div",{className:"relative",children:[w("input",Object.assign({},D,{placeholder:" ",ref:F,type:d,id:B,disabled:y,value:ce,className:PM(K,D.className),onChange:V?oe:D.onChange,onBlur:Z||N?ie:D.onBlur,onKeyDown:Z||N?se:D.onKeyDown})),E&&!T&&w("div",{className:PM(ee,null==S?void 0:S.iconSearchWrapper),children:w(Xne,{className:PM(re,null==S?void 0:S.icon)})}),fe,O&&!W&&w("div",{className:PM(J,null==S?void 0:S.iconWrapper),style:{display:x&&D.value?"flex":void 0},children:w(wH,{className:PM(te,null==S?void 0:S.icon),onMouseDown:de})}),pe,_("label",{htmlFor:B,className:PM(X),children:[o," ",k&&w("span",{className:PM("text-input-error",{"text-input-disable-text":y}),children:"*"})]})]}),(Y||j)&&_("span",{className:Q,children:[Y&&w("span",{className:"h-full shrink-0",children:w(YS,{width:14,height:14,className:PM("fill-none stroke-current",$?"text-input-error":G?"text-warning":"text-input-filled-text")})}),j&&!Y&&w("span",{className:"block min-h-[14px]","aria-hidden":!0}),Y||""]})]})})),Gme={0:{pattern:/[0-9]/,placeholder:"0"},9:{pattern:/[0-9\s]/,placeholder:"9"},"#":{pattern:/[0-9\s+\-]/,placeholder:"#"},L:{pattern:/[a-zA-Z]/,placeholder:"L"},"?":{pattern:/[a-zA-Z\s]/,placeholder:"?"},"&":{pattern:/[^\s]/,placeholder:"&"},C:{pattern:/./,placeholder:"C"},A:{pattern:/[a-zA-Z0-9]/,placeholder:"A"},a:{pattern:/[a-zA-Z0-9\s]/,placeholder:"a"}},Yme=(e,t,r="_",n=!0,a=!0)=>{let o="",l=0;for(let i=0;i<t.length;i++){const s=t[i];if(s.isLiteral)o+=s.placeholder;else{let t=!1;for(;l<e.length;){const r=e[l];l++;if(s.validator?s.validator(r):s.pattern.test(r)){o+=r,t=!0;break}}if(!t&&a&&n)o+=r;else if(!t)break}}return o},Kme=(e,t)=>{let r="";for(let n=0;n<e.length&&n<t.length;n++){const a=t[n],o=e[n];a.isLiteral||(r+=o)}return r},Xme=r(((e,r)=>{var{mask:o,maskChar:l="_",showMask:d=!0,guide:u=!0,keepCharPositions:h=!1,rules:f,onMaskedChange:p,onChange:v,value:m,defaultValue:y}=e,g=EM(e,["mask","maskChar","showMask","guide","keepCharPositions","rules","onMaskedChange","onChange","value","defaultValue"]);const b=n(null),[k,_]=i(""),[M,x]=i(""),j=t.useMemo((()=>o?((e,t)=>{const r=Object.assign(Object.assign({},Gme),t),n=[];let a=0;for(;a<e.length;){const t=e[a];if("\\"===t&&a+1<e.length){const t=e[a+1];n.push({pattern:new RegExp(`^${t}$`),placeholder:t,isLiteral:!0}),a+=2}else if(r[t]){const e=r[t];"function"==typeof e?n.push({pattern:/./,placeholder:t,validator:e}):e instanceof RegExp?n.push({pattern:e,placeholder:t}):n.push({pattern:e.pattern,placeholder:e.placeholder}),a++}else n.push({pattern:new RegExp(`^${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`),placeholder:t,isLiteral:!0}),a++}return n})(o,f):null),[o,f]);s((()=>{const e=m||y||"";if(j&&e){const t=Yme(e,j,l,d,u),r=Kme(t,j);_(t),x(r)}else _(e),x(e)}),[j,l,d,u,m,y]),c(r,(()=>null==b?void 0:b.current));const O=a((e=>{const t=e.target.value;if(!j)return _(t),x(t),null==v||v(e),void(null==p||p(t,t));const r=Yme(t,j,l,d,u),n=Kme(r,j);_(r),x(n);const a=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:r})});null==v||v(a),null==p||p(r,n),setTimeout((()=>{if(b.current){const e=n.replace(/[_\s]/g,"").length,t=((e,t,r)=>{let n=0,a=0;for(let o=0;o<r.length&&o<e.length;o++){const l=r[o];if(e[o],l.isLiteral)a=o+1;else if(n++,a=o+1,n>=t)break}return a})(r,e,j);b.current.setSelectionRange(t,t)}}),0)}),[j,l,d,u,v,p]),E=a((e=>{var t,r,n;if(!j)return void(null===(t=g.onKeyDown)||void 0===t||t.call(g,e));const{key:a,ctrlKey:o,metaKey:l}=e,i=e.target.selectionStart||0;if("Backspace"===a||"Delete"===a||"ArrowLeft"===a||"ArrowRight"===a||"Home"===a||"End"===a||"Tab"===a||a.length>1||o||l)return void(null===(r=g.onKeyDown)||void 0===r||r.call(g,e));let s=i;for(;s<j.length&&j[s].isLiteral;)s++;if(s<j.length){const t=j[s];if(!(t.validator?t.validator(a):t.pattern.test(a)))return void e.preventDefault()}null===(n=g.onKeyDown)||void 0===n||n.call(g,e)}),[j,g]);return w($me,Object.assign({},g,{ref:b,value:k,onChange:O,onKeyDown:E,className:PM(g.className)}))}));async function Qme(){const{default:e}=await Promise.resolve().then((function(){return ETe}));return Object.keys(e)}Xme.displayName="MaskedTextInput";const Jme=x(["text-inherit"],{variants:{color:{primary:"text-primary",secondary:"text-secondary",tertiary:"text-tertiary",success:"text-success",info:"text-info",warning:"text-warning",error:"text-error",inherit:"text-inherit"},size:{sm:"size-4",md:"size-6",lg:"size-8",inherit:""}},defaultVariants:{size:"inherit",color:"inherit"}}),eye={sm:16,md:24,lg:32},tye=e=>{var{name:r,type:n="heroicons",color:a="inherit",variant:o="solid",size:l="md",className:i}=e,s=EM(e,["name","type","color","variant","size","className"]);const[c,d]=t.useState(null);if(t.useEffect((()=>{if("lucide"===n)return void Promise.resolve().then((function(){return ETe})).then((({default:e})=>{const t=e[r];t?t().then((e=>{d((()=>e.default))})):console.warn(`Lucide icon "${r}" not found.`)}));const e=((e,t,r)=>{var n,a;return null===(a=null===(n=bM[e])||void 0===n?void 0:n[t])||void 0===a?void 0:a[r]})(n,r,o);e?d((()=>e)):console.warn(`Icon "${r}" from "${n}" not found.`)}),[r,n,o]),"lucide"===n){if(!c)return w("span",{className:PM(Jme({color:a,size:l}),i)});const e="inherit"===l?24:eye[l];return w(c,Object.assign({},s,{size:e,strokeWidth:e<=16?1.5:2,absoluteStrokeWidth:!0,shapeRendering:"geometricPrecision",className:PM(Jme({color:a,size:l}),"stroke-current",i)}))}return w(c||"svg",Object.assign({className:PM(Jme({color:a,size:l}),i)},s))},rye=r(((e,t)=>{var r,{showToggle:a=!0,hasClearIcon:o=!1,hideIcon:l,showIcon:s,endIcon:d,renderEndIcon:u,onClickEndIcon:h}=e,f=EM(e,["showToggle","hasClearIcon","hideIcon","showIcon","endIcon","renderEndIcon","onClickEndIcon"]);const p=n(null),[v,m]=i(!1);c(t,(()=>null==p?void 0:p.current));const y=v?null!=s?s:w(tye,{name:"eye",type:"lucide",size:"inherit",className:"size-full","aria-label":"Hide password"}):null!=l?l:w(tye,{name:"eye-closed",type:"lucide",size:"inherit",className:"size-full","aria-label":"Show password"});return w($me,Object.assign({iconMode:"flat"},f,{ref:p,type:v?"text":"password",hasClearIcon:o,endIcon:a?y:d,renderEndIcon:u,onClickEndIcon:a?()=>{var e;f.disabled||(m((e=>!e)),null===(e=p.current)||void 0===e||e.focus(),null==h||h())}:h,autoComplete:null!==(r=f.autoComplete)&&void 0!==r?r:"current-password"}))}));rye.displayName="PasswordInput";const nye=r(((e,r)=>{var o,{value:l,defaultValue:s,min:d,max:u,step:h=1,precision:f,hideControls:p=!1,allowDecimal:v=!0,allowNegative:m=!0,formatDisplay:y=!1,thousandSeparator:g=",",decimalSeparator:b=".",prefix:k="",suffix:M="",disabled:x=!1,onChange:j,onValueChange:O,className:E,size:z="md"}=e,C=EM(e,["value","defaultValue","min","max","step","precision","hideControls","allowDecimal","allowNegative","formatDisplay","thousandSeparator","decimalSeparator","prefix","suffix","disabled","onChange","onValueChange","className","size"]);const P=n(null),[A,R]=i((null!==(o=null!=l?l:s)&&void 0!==o?o:"").toString()),[L,I]=i(!1);c(r,(()=>null==P?void 0:P.current));const S=a((e=>{let t=e;return k&&(t=t.replace(k,"")),M&&(t=t.replace(M,"")),g&&(t=t.split(g).join("")),"."!==b&&(t=t.replace(b,".")),t.trim()}),[k,M,g,b]),V=a((e=>{if(!y||""===e||"-"===e)return e;const t=parseFloat(e);if(isNaN(t))return e;let r=t.toString();void 0!==f&&(r=t.toFixed(f));const n=r.split(".");let a=n[0];const o=n[1];return g&&(a=a.replace(/\B(?=(\d{3})+(?!\d))/g,g)),r=o?`${a}${b}${o}`:a,k&&(r=`${k}${r}`),M&&(r=`${r}${M}`),r}),[y,f,g,b,k,M]),H=a((e=>{if(""===e||"-"===e)return e;let t=parseFloat(e);return isNaN(t)?A:(void 0!==d&&t<d&&(t=d),void 0!==u&&t>u&&(t=u),void 0!==f&&(t=parseFloat(t.toFixed(f))),t.toString())}),[d,u,f,A]),Z=a((e=>{let t=e.target.value;if(y&&(t=S(t)),""===t)return R(""),null==j||j(void 0),void(null==O||O(""));if(m&&"-"===t)return R("-"),void(null==O||O("-"));if(!(v?m?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/:m?/^-?\d*$/:/^\d*$/).test(t))return;R(t),null==O||O(t);const r=parseFloat(t);isNaN(r)||null==j||j(r)}),[v,m,y,S,j,O]),N=a((e=>{var t;I(!0),null===(t=C.onFocus)||void 0===t||t.call(C,e)}),[C]),D=a((e=>{var t;I(!1);const r=H(A);R(r);const n=parseFloat(r);isNaN(n)||null==j||j(n),null===(t=C.onBlur)||void 0===t||t.call(C,e)}),[A,H,j,C]),q=a((e=>{if(x)return;e.stopPropagation(),e.preventDefault();let t=(parseFloat(A)||0)+h;void 0!==u&&t>u&&(t=u);const r=H(t.toString());R(r),null==j||j(parseFloat(r)),null==O||O(r)}),[A,h,u,x,H,j,O]),B=a((e=>{if(x)return;e.stopPropagation(),e.preventDefault();let t=(parseFloat(A)||0)-h;void 0!==d&&t<d&&(t=d);const r=H(t.toString());R(r),null==j||j(parseFloat(r)),null==O||O(r)}),[A,h,d,x,H,j,O]),F=a((e=>{var t;switch(e.key){case"ArrowUp":q(e);break;case"ArrowDown":B(e);break;case"Enter":e.currentTarget.blur()}null===(t=C.onKeyDown)||void 0===t||t.call(C,e)}),[q,B,C]);t.useEffect((()=>{void 0!==l&&R(l.toString())}),[l]);const T=t.useMemo((()=>L||!y?A:V(A)),[L,y,A,V]),W={sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6"}[z],U={sm:"absolute top-0.5",md:"absolute top-1",lg:"absolute top-1"}[z];return w($me,Object.assign({},C,{ref:P,type:"text",inputMode:"decimal",value:T,onChange:Z,onFocus:N,onBlur:D,onKeyDown:F,disabled:x,size:z,hasClearIcon:!1,endIcon:p?null:_("div",{className:PM("flex flex-col","flat"===C.iconMode&&U),children:[w("button",{type:"button",onClick:q,disabled:x||void 0!==u&&parseFloat(A)>=u,className:PM(" hover:bg-input-active-stroke/10 disabled:opacity-30 disabled:cursor-not-allowed transition-colors rounded-full text-input-filled-text"),tabIndex:-1,children:w(Bn,{className:W})}),w("button",{type:"button",onClick:B,disabled:x||void 0!==d&&parseFloat(A)<=d,className:PM(" hover:bg-input-active-stroke/10 disabled:opacity-30 disabled:cursor-not-allowed transition-colors rounded-full text-input-filled-text"),tabIndex:-1,children:w(In,{className:W})})]}),className:PM(E)}))}));nye.displayName="NumberInput";const aye=x(["peer block w-full bg-transparent outline-none placeholder:text-transparent resize-y ui-scrollbar","text-input-filled-text caret-primary"],{variants:{size:{sm:"p-2 px-3 typography-small1",md:"py-2 px-3 typography-subtitle4",lg:"p-4 typography-subtitle1"},rounded:{none:"rounded-none",normal:"rounded-md",full:"rounded-full"},variant:{flat:"",outline:["ring-1 ring-inset ring-input-default-stroke","hover:ring-input-active-stroke","focus:ring-1 focus:ring-inset focus:ring-input-active-stroke"],underline:"border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-stroke"},fullwidth:{true:"w-full"},disabled:{true:["bg-input-disable-bg text-input-disable-text ring-input-disable-stroke placeholder:text-input-disable-text","hover:ring-input-disable-stroke","cursor-not-allowed"]},error:{true:"ring-input-error focus:ring-input-error"},hasClearIcon:{true:""},isFloatingLabel:{true:"",false:"placeholder:text-input-placeholder"}},compoundVariants:[{variant:"underline",className:"rounded-none"},{hasClearIcon:!0,size:"sm",className:"focus:pe-6"},{hasClearIcon:!0,size:"md",className:"focus:pe-8"},{hasClearIcon:!0,size:"lg",className:"focus:pe-10"}],defaultVariants:{size:"md",variant:"outline",rounded:"normal",fullwidth:!1,disabled:!1,error:!1,hasClearIcon:!1,isFloatingLabel:!0}}),oye=x(["absolute block duration-450 transition-all px-[2px] text-input-default-text","peer-focus:text-input-filled-text peer-focus:bg-input-label-bg"],{variants:{size:{sm:[],md:[],lg:[]},disabled:{true:"text-input-default-text placeholder:text-input-default-text"},error:{true:"ring-error"},isFloatingLabel:{false:"hidden peer-placeholder-shown:block peer-focus:bg-transparent"}},compoundVariants:[{isFloatingLabel:!0,size:"sm",className:["left-3 -top-1.5 typography-label2 bg-input-label-bg","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label2"]},{isFloatingLabel:!0,size:"md",className:["left-3 -top-1.5 typography-label1 bg-input-label-bg","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{isFloatingLabel:!0,size:"lg",className:["left-4 -top-1.5 typography-label1 bg-input-label-bg","peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{isFloatingLabel:!1,size:"sm",className:["left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1"]},{isFloatingLabel:!1,size:"md",className:["left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4"]},{isFloatingLabel:!1,size:"lg",className:["left-4 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1"]}],defaultVariants:{size:"md",disabled:!1,error:!1,isFloatingLabel:!0}}),lye=x(["absolute inset-y-0 right-0 items-start justify-center hidden peer-focus:flex"],{variants:{size:{sm:"mr-2 pt-2",md:"mr-3 pt-2",lg:"mr-4 pt-4"}},defaultVariants:{size:"md"}}),iye=x(["cursor-pointer z-50 fill-input-active-stroke hover:fill-input-default-text"],{variants:{size:{sm:"size-3",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),sye=x(["typography-small1 flex flex-row items-center gap-1"],{variants:{size:{sm:"mt-1",md:"mt-[6px]",lg:"mt-[6px]"},disabled:{true:"text-input-disable-text"},error:{true:"text-input-error",false:"text-input-filled-text"}},defaultVariants:{size:"md",disabled:!1,error:!1}}),cye=r(((e,t)=>{var{id:r,label:o,size:i="md",rounded:s="normal",variant:d="outline",helperText:u,errorMessage:h,fullwidth:f=!0,disabled:p=!1,error:v=!1,required:m=!0,isFloatingLabel:y=!0,keepCloseIconOnValue:g=!1,hasClearIcon:b=!0,labelClassName:k,className:M,normalize:x,format:j,trimOnCommit:O,normalizeOnCommit:E}=e,z=EM(e,["id","label","size","rounded","variant","helperText","errorMessage","fullwidth","disabled","error","required","isFloatingLabel","keepCloseIconOnValue","hasClearIcon","labelClassName","className","normalize","format","trimOnCommit","normalizeOnCommit"]);const C=n(null),P=r||`textarea-${null!=o?o:""}`;c(t,(()=>null==C?void 0:C.current));const A=a((e=>{var t;x&&(e.target.value=x(e.target.value)),null===(t=z.onChange)||void 0===t||t.call(z,e)}),[x,z.onChange]),R=a((e=>{var t;const r=e.currentTarget;let n=r.value;O&&(n=n.trim()),E&&(n=E(n)),n!==r.value&&(r.value=n,null===(t=z.onChange)||void 0===t||t.call(z,Object.assign(Object.assign({},e),{target:r})))}),[O,E,z.onChange]),L=a((e=>{var t;(O||E)&&R(e),null===(t=z.onBlur)||void 0===t||t.call(z,e)}),[O,E,R,z.onBlur]),I=j&&"string"==typeof z.value?j(z.value):z.value,S=l((()=>"inline-flex flex-col "+(f?"w-full":"")),[f]),V=aye({size:i,rounded:s,variant:d,fullwidth:f,disabled:p,error:v,hasClearIcon:b,isFloatingLabel:y});return _("div",{className:S,children:[_("div",{className:"relative",children:[w("textarea",Object.assign({},z,{id:P,ref:C,disabled:p,placeholder:y?" ":z.placeholder,className:PM(V,M),value:I,onChange:x?A:z.onChange,onBlur:O||E?L:z.onBlur})),b&&w("div",{className:lye({size:i}),style:{display:g&&z.value?"flex":void 0},children:w(fu,{type:"button",className:iye({size:i}),onMouseDown:e=>{if(e.preventDefault(),C.current){const e=C.current.value;C.current.value="",z.onChange&&""!==e&&z.onChange({target:{value:""}}),C.current.focus()}}})}),o&&_("label",{htmlFor:P,className:PM(oye({size:i,disabled:p,error:v,isFloatingLabel:y}),k),children:[o," ",m&&w("span",{className:PM("text-error",{"text-input-disable-text":p}),children:"*"})]})]}),(h||u)&&w("span",{className:sye({size:i,disabled:p,error:v}),children:h||u})]})})),dye=x(["text-common-black"],{variants:{color:{primary:"text-primary",secondary:"text-secondary",success:"text-success",tertiary:"text-tertiary",info:"text-info",warning:"text-warning",error:"text-error"}}}),uye={subtitile1:"subtitle1",subtitile2:"subtitle2",subtitile3:"subtitle3",subtitile4:"subtitle4",subtitile5:"subtitle5",subtitile6:"subtitle6"},hye=r(((e,t)=>{var r,{variant:n="body1",tag:a="p",children:o,className:l="",color:i,style:s}=e,c=EM(e,["variant","tag","children","className","color","style"]);const d=null!==(r=uye[n])&&void 0!==r?r:n;return w(a,Object.assign({ref:t,className:PM(`typography-${d}`,dye({color:i}),l),style:s},c,{children:o}))})),fye=x(["box-border flex items-center justify-center outline-none focus-visible:outline-none"],{variants:{variant:{solid:["bg-action-button-solid-default border-action-button-solid-default text-action-button-solid-default fill-action-button-solid-default","hover:bg-action-button-solid-hover hover:border-action-button-solid-hover hover:text-action-button-solid-hover hover:fill-action-button-solid-hover","active:bg-action-button-solid-pressed active:border-action-button-solid-pressed active:text-action-button-solid-pressed active:fill-action-button-solid-pressed","focus-visible:ring-none focus-visible:ring-offset-2 focus-visible:ring-[var(--action-button-solid-default-border)]"],outline:["ring-1 ring-inset","bg-action-button-outline-default text-action-button-outline-default fill-action-button-outline-default ring-[var(--action-button-outline-default-border)]","hover:bg-action-button-outline-hover hover:text-action-button-outline-hover hover:fill-action-button-outline-hover hover:ring-[var(--action-button-outline-hover-border)]","active:bg-action-button-outline-pressed active:text-action-button-outline-pressed active:fill-action-button-outline-pressed active:ring-[var(--action-button-outline-pressed-border)]","focus-visible:ring-none focus-visible:ring-[var(--action-button-outline-default-border)]"],icon:["bg-action-button-icon-default border-action-button-icon-default text-action-button-icon-default fill-action-button-icon-default","hover:bg-action-button-icon-hover hover:border-action-button-icon-hover hover:text-action-button-icon-hover hover:fill-action-button-icon-hover","active:bg-action-button-icon-pressed active:border-action-button-icon-pressed active:text-action-button-icon-pressed active:fill-action-button-icon-pressed","focus-visible:ring-none focus-visible:ring-offset-2 focus-visible:ring-[var(--action-button-icon-default-border)]"]},size:{xxs:"",xs:"",sm:"",md:"",lg:""},shape:{round:"",capsule:""},disabled:{false:""},active:{false:""}},compoundVariants:[{variant:"solid",active:!0,className:["bg-action-button-solid-active border-action-button-solid-active text-action-button-solid-active fill-action-button-solid-active","hover:bg-action-button-solid-active-hover hover:border-action-button-solid-active-hover hover:text-action-button-solid-active-hover hover:fill-action-button-solid-active-hover","active:bg-action-button-solid-active-pressed active:border-action-button-solid-active-pressed active:text-action-button-solid-active-pressed active:fill-action-button-solid-active-pressed","focus-visible:ring-[var(--action-button-solid-active-border)]"]},{variant:"outline",active:!0,className:["bg-action-button-outline-active text-action-button-outline-active fill-action-button-outline-active ring-[var(--action-button-outline-active-border)]","hover:bg-action-button-outline-active-hover hover:text-action-button-outline-active-hover hover:fill-action-button-outline-active-hover hover:ring-[var(--action-button-outline-active-hover-border)]","active:bg-action-button-outline-active-pressed active:text-action-button-outline-active-pressed active:fill-action-button-outline-active-pressed active:ring-[var(--action-button-outline-active-pressed-border)]","focus-visible:ring-[var(--action-button-outline-active-border)]"]},{variant:"icon",active:!0,className:["bg-action-button-icon-active border-action-button-icon-active text-action-button-icon-active fill-action-button-icon-active","hover:bg-action-button-icon-active-hover hover:border-action-button-icon-active-hover hover:text-action-button-icon-active-hover hover:fill-action-button-icon-active-hover","active:bg-action-button-icon-active-pressed active:border-action-button-icon-active-pressed active:text-action-button-icon-active-pressed active:fill-action-button-icon-active-pressed","focus-visible:ring-[var(--action-button-icon-active-border)]"]},{size:"lg",variant:["solid","outline"],className:"px-[12px] py-[12px] [&_svg]:size-[32px]"},{size:"md",variant:["solid","outline"],className:"px-[8px] py-[8px] [&_svg]:size-[22px]"},{size:"sm",variant:["solid","outline"],className:"px-[4px] py-[4px] [&_svg]:size-[22px]"},{size:"xs",variant:["solid","outline"],className:"px-[2px] py-[2px] [&_svg]:size-[14px]"},{size:"lg",variant:"icon",className:"px-[12px] py-[12px] [&_svg]:size-[32px]"},{size:"md",variant:"icon",className:"px-[8px] py-[8px] [&_svg]:size-[22px]"},{size:"sm",variant:"icon",className:"px-[4px] py-[4px] [&_svg]:size-[22px]"},{size:"xxs",variant:"icon",className:"px-[1px] py-[1px] [&_svg]:size-[10px]"},{size:"xs",variant:"icon",className:"px-[2px] py-[2px] [&_svg]:size-[14px]"},{size:"lg",shape:"round",className:"rounded-[var(--function-button-l-round)]"},{size:"md",shape:"round",className:"rounded-[var(--function-button-m-round)]"},{size:"sm",shape:"round",className:"rounded-[var(--function-button-s-round)]"},{size:"xs",shape:"round",className:"rounded-[var(--function-button-xs-round)]"},{size:"xxs",shape:"round",className:"rounded-[var(--function-button-xxs-round)]"},{size:"lg",shape:"capsule",className:"rounded-[var(--function-button-l-capsule)]"},{size:"md",shape:"capsule",className:"rounded-[var(--function-button-m-capsule)]"},{size:"sm",shape:"capsule",className:"rounded-[var(--function-button-s-capsule)]"},{size:"xxs",shape:"capsule",className:"rounded-[var(--function-button-xxs-capsule)]"},{size:"xs",shape:"capsule",className:"rounded-[var(--function-button-xs-capsule)]"},{variant:"solid",disabled:!0,className:["pointer-events-none","bg-action-button-solid-disabled border-action-button-solid-disabled text-action-button-solid-disabled fill-action-button-solid-disabled"]},{variant:"outline",disabled:!0,className:["pointer-events-none","bg-action-button-outline-disabled text-action-button-outline-disabled fill-action-button-outline-disabled ring-[var(--action-button-outline-disabled-border)]"]},{variant:"icon",disabled:!0,className:["pointer-events-none","bg-action-button-icon-disabled border-action-button-icon-disabled text-action-button-icon-disabled fill-action-button-icon-disabled"]}],defaultVariants:{size:"md",variant:"solid",shape:"round",disabled:!1,active:!1}}),pye=r(((e,t)=>{var{children:r,disabled:n,active:a,className:o,size:l,shape:i,variant:s}=e,c=EM(e,["children","disabled","active","className","size","shape","variant"]);const d=fye({size:l,shape:i,variant:s,active:a,disabled:n});return w("button",Object.assign({},c,{ref:t,type:"button","aria-disabled":n||void 0,disabled:n,tabIndex:n?-1:0,className:PM(".action-button",d,o),children:r}))})),vye=({tabs:e=[],value:t,initialTab:r=0,tabBarSize:a=38,enableBorderLine:o=!0,enableAddTabButton:l=!1,keepIconSpace:c=!1,disabled:d=!1,keepMounted:u=!1,tabMode:h="start",className:f,tabBarClassName:p,tabBarContainerClassName:v,tabBarWrapperClassName:m,tabButtonClassName:y,tabButtonActiveClassName:g,tabButtonActiveDisableClassName:b,tabButtonDisableClassName:k,tabContentClassName:M,addTabButtonWrapperClassName:x,borderSliderClassName:j,leftAction:O,rightAction:E,onAddTab:z,onTabChange:C})=>{var P;const[A,R]=i(r),[L,I]=i(null),[S,V]=i({width:"0px",transform:"translateX(0px)"}),H=n([]),Z=n(!0);s((()=>{void 0!==t&&R(t)}),[t]);const N=()=>{const e=H.current[A];e&&V({width:`${e.offsetWidth}px`,transform:`translateX(${e.offsetLeft}px)`})};return s((()=>{let e;if(Z.current){Z.current=!1;const t=H.current[A];t&&(V({width:"0px",transform:`translateX(${t.offsetLeft+t.offsetWidth/2}px)`}),e=setTimeout((()=>{N()}),50))}else N();const t=()=>{N()};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),e&&clearTimeout(e)}}),[A,e,h,c]),_("div",{className:PM("w-full",f),children:[_("div",{className:PM(" relative flex flex-row w-full",{"border-b-[1px] border-base-stroke":o,"border-state-disable-outline":d,"flex-1":"justify"===h},v),children:[O,w("div",{className:PM("relative flex flex-row overflow-x-auto",{"flex-1":"justify"===h},m),children:_("div",{className:PM("tabs-scrollbar overflow-x-auto w-full",`relative flex gap-3 h-[${a}px] box-border`,{"gap-0":"justify"===h},p),style:{justifyContent:"justify"===h?"stretch":h},role:"tablist",children:[e.map(((e,t)=>{var r,n,a,o,l,i,s,u;return _("button",{ref:e=>H.current[t]=e,role:"tab","aria-selected":t===A,"aria-controls":`tab-content-${t}`,disabled:d||e.disabled,id:`tab-${t}`,className:PM("group relative flex justify-center flex-row items-center py-3 cursor-pointer transition-colors duration-300 box-border gap-1 flex-shrink-0 typography-subtitle6",{"text-text-contrast-max":t===A,"text-text-g-contrast-medium":t!==A,"text-state-disable-outline pointer-events-none":d||e.disabled,[null!==(n=null!==(r=e.disableClassName)&&void 0!==r?r:k)&&void 0!==n?n:""]:d||e.disabled,"text-state-disable-outline":t===A&&(d||e.disabled),[null!==(o=null!==(a=e.activeDisableClassName)&&void 0!==a?a:b)&&void 0!==o?o:""]:t===A&&(d||e.disabled),[null!==(i=null!==(l=e.className)&&void 0!==l?l:y)&&void 0!==i?i:""]:!0,[null!==(u=null!==(s=e.activeClassName)&&void 0!==s?s:g)&&void 0!==u?u:""]:t===A,"flex-1":"justify"===h}),onClick:()=>{R(t),null==C||C(t)},onMouseEnter:()=>I(t),onMouseLeave:()=>I(null),children:[(c||e.startTabContent)&&w("div",{className:"h-full w-3 flex items-center justify-center [&_svg]:size-3 [&_svg]:stroke-current [&_svg]:text-current",children:e.isLoading?w(AM,{size:12}):e.startTabContent}),e.label,(c||e.endTabContent)&&w("div",{className:"h-full w-3 flex items-center justify-center [&_svg]:size-3 [&_svg]:stroke-current [&_svg]:text-current",children:e.endTabContent}),!d&&!e.disabled&&t!==A&&w("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] rounded-[1px] bg-function-default-hover opacity-0 transition-opacity duration-150 group-hover:opacity-100"})]},t)})),w("div",{className:PM("absolute left-0 bottom-0 h-[2px] rounded-[1px] bg-function-active-solid transition-all duration-300 ease-in-out",{hidden:d||(null===(P=e[A])||void 0===P?void 0:P.disabled),"bg-function-active-hover":L===A&&!d},j),style:S})]})}),l&&w("div",{className:PM("sticky right-0 flex content-center items-center mx-4",x),children:w(pye,{variant:"outline",size:"sm",onClick:()=>null==z?void 0:z(),disabled:d,children:w(tye,{name:"plus"})})}),E]}),w("div",{className:PM("mt-4 text-text-g-contrast-high",M),role:"tabpanel",id:`tab-content-${A}`,"aria-labelledby":`tab-${A}`,children:e.map(((e,t)=>{var r;return u||A===t?w("div",{className:"transition "+(A===t?"block":"hidden"),children:e.content},null!==(r=e.id)&&void 0!==r?r:t):null}))})]})},mye="undefined"!=typeof document?t.useLayoutEffect:()=>{};const yye=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},gye=e=>{if(e&&"window"in e&&e.window===e)return e;return yye(e).defaultView||window};function bye(e){let t=null;return()=>(null==t&&(t=e()),t)}const kye=bye((function(){return function(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}(/^Mac/i)})),wye=bye((function(){return function(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}(/Android/i)}));class _ye{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function Mye(e){let t=n({isFocused:!1,observer:null});mye((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let r=function(e){const t=n(null);return mye((()=>{t.current=e}),[e]),a(((...e)=>{const r=t.current;return null==r?void 0:r(...e)}),[])}((t=>{null==e||e(t)}));return a((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target,a=e=>{t.current.isFocused=!1,n.disabled&&r(new _ye("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&n.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}})),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}}),[r])}let xye=null,jye=new Set,Oye=new Map,Eye=!1,zye=!1;const Cye={Tab:!0,Escape:!0};function Pye(e,t){for(let r of jye)r(e,t)}function Aye(e){Eye=!0,function(e){return!(e.metaKey||!kye()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(xye="keyboard",Pye("keyboard",e))}function Rye(e){xye="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(Eye=!0,Pye("pointer",e))}function Lye(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(wye()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(Eye=!0,xye="virtual")}function Iye(e){e.target!==window&&e.target!==document&&(Eye||zye||(xye="virtual",Pye("virtual",e)),Eye=!1,zye=!1)}function Sye(){Eye=!1,zye=!0}function Vye(e){if("undefined"==typeof window||Oye.get(gye(e)))return;const t=gye(e),r=yye(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Eye=!0,n.apply(this,arguments)},r.addEventListener("keydown",Aye,!0),r.addEventListener("keyup",Aye,!0),r.addEventListener("click",Lye,!0),t.addEventListener("focus",Iye,!0),t.addEventListener("blur",Sye,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",Rye,!0),r.addEventListener("pointermove",Rye,!0),r.addEventListener("pointerup",Rye,!0)):(r.addEventListener("mousedown",Rye,!0),r.addEventListener("mousemove",Rye,!0),r.addEventListener("mouseup",Rye,!0)),t.addEventListener("beforeunload",(()=>{Hye(e)}),{once:!0}),Oye.set(t,{focus:n})}const Hye=(e,t)=>{const r=gye(e),n=yye(e);t&&n.removeEventListener("DOMContentLoaded",t),Oye.has(r)&&(r.HTMLElement.prototype.focus=Oye.get(r).focus,n.removeEventListener("keydown",Aye,!0),n.removeEventListener("keyup",Aye,!0),n.removeEventListener("click",Lye,!0),r.removeEventListener("focus",Iye,!0),r.removeEventListener("blur",Sye,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",Rye,!0),n.removeEventListener("pointermove",Rye,!0),n.removeEventListener("pointerup",Rye,!0)):(n.removeEventListener("mousedown",Rye,!0),n.removeEventListener("mousemove",Rye,!0),n.removeEventListener("mouseup",Rye,!0)),Oye.delete(r))};function Zye(){return"pointer"!==xye}"undefined"!=typeof document&&function(e){const t=yye(e);let r;"loading"!==t.readyState?Vye(e):(r=()=>{Vye(e)},t.addEventListener("DOMContentLoaded",r))}();const Nye=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Dye(e,t,r){Vye(),s((()=>{let t=(t,n)=>{(function(e,t,r){var n;const a="undefined"!=typeof window?gye(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?gye(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="undefined"!=typeof window?gye(null==r?void 0:r.target).HTMLElement:HTMLElement,i="undefined"!=typeof window?gye(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==r?void 0:r.target)instanceof a&&!Nye.has(null==r||null===(n=r.target)||void 0===n?void 0:n.type)||(null==r?void 0:r.target)instanceof o||(null==r?void 0:r.target)instanceof l&&(null==r?void 0:r.target.isContentEditable))&&"keyboard"===t&&r instanceof i&&!Cye[r.key])})(!!(null==r?void 0:r.isTextInput),t,n)&&e(Zye())};return jye.add(t),()=>{jye.delete(t)}}),t)}let qye=!1,Bye=0;function Fye(){qye=!0,setTimeout((()=>{qye=!1}),50)}function Tye(e){"touch"===e.pointerType&&Fye()}function Wye(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",Tye):document.addEventListener("touchend",Fye),Bye++,()=>{Bye--,Bye>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",Tye):document.removeEventListener("touchend",Fye))}}function Uye(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:a,isDisabled:o}=e,[c,d]=i(!1),u=n({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;s(Wye,[]);let{hoverProps:h,triggerHoverEnd:f}=l((()=>{let e=(e,n)=>{if(u.pointerType=n,o||"touch"===n||u.isHovered||!e.currentTarget.contains(e.target))return;u.isHovered=!0;let a=e.currentTarget;u.target=a,t&&t({type:"hoverstart",target:a,pointerType:n}),r&&r(!0),d(!0)},n=(e,t)=>{if(u.pointerType="",u.target=null,"touch"===t||!u.isHovered)return;u.isHovered=!1;let n=e.currentTarget;a&&a({type:"hoverend",target:n,pointerType:t}),r&&r(!1),d(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{qye&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!o&&e.currentTarget.contains(e.target)&&n(e,e.pointerType)}):(l.onTouchStart=()=>{u.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{u.ignoreEmulatedMouseEvents||qye||e(t,"mouse"),u.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!o&&e.currentTarget.contains(e.target)&&n(e,"mouse")}),{hoverProps:l,triggerHoverEnd:n}}),[t,r,a,o,u]);return s((()=>{o&&f({currentTarget:u.target},u.pointerType)}),[o]),{hoverProps:h,isHovered:c}}function $ye(e={}){let{autoFocus:t=!1,isTextInput:r,within:o}=e,l=n({isFocused:!1,isFocusVisible:t||Zye()}),[s,c]=i(!1),[d,u]=i((()=>l.current.isFocused&&l.current.isFocusVisible)),h=a((()=>u(l.current.isFocused&&l.current.isFocusVisible)),[]),f=a((e=>{l.current.isFocused=e,c(e),h()}),[h]);Dye((e=>{l.current.isFocusVisible=e,h()}),[],{isTextInput:r});let{focusProps:p}=function(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const l=a((e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0}),[n,o]),i=Mye(l),s=a((e=>{const t=yye(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(r&&r(e),o&&o(!0),i(e))}),[o,r,i]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:t||!n&&!o?void 0:l}}}({isDisabled:o,onFocusChange:f}),{focusWithinProps:v}=function(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:o,onFocusWithinChange:l}=e,i=n({isFocusWithin:!1}),s=a((e=>{i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(e),l&&l(!1))}),[r,l,i]),c=Mye(s),d=a((e=>{i.current.isFocusWithin||document.activeElement!==e.target||(o&&o(e),l&&l(!0),i.current.isFocusWithin=!0,c(e))}),[o,l,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:s}}}({isDisabled:!o,onFocusWithinChange:f});return{isFocused:s,isFocusVisible:d,focusProps:o?v:p}}var Gye=Object.defineProperty,Yye=(e,t,r)=>(((e,t,r)=>{t in e?Gye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let Kye=new class{constructor(){Yye(this,"current",this.detect()),Yye(this,"handoffState","pending"),Yye(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function Xye(e){return Kye.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Qye(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Jye(){let e=[],t={addEventListener:(e,r,n,a)=>(e.addEventListener(r,n,a),t.add((()=>e.removeEventListener(r,n,a)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return Qye((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=Jye();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function ege(){let[e]=i(Jye);return s((()=>()=>e.dispose()),[e]),e}let tge=(e,t)=>{Kye.isServer?s(e,t):d(e,t)};function rge(e){let t=n(e);return tge((()=>{t.current=e}),[e]),t}let nge=function(e){let r=rge(e);return t.useCallback(((...e)=>r.current(...e)),[r])};let age=u(void 0);function oge(){return h(age)}function lge(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function ige(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ige),n}var sge=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(sge||{}),cge=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(cge||{});function dge(){let e=function(){let e=n([]),t=a((t=>{for(let r of e.current)null!=r&&("function"==typeof r?r(t):r.current=t)}),[]);return(...r)=>{if(!r.every((e=>null==e)))return e.current=r,t}}();return a((t=>function({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:a,visible:o=!0,name:l,mergeRefs:i}){i=null!=i?i:hge;let s=fge(t,e);if(o)return uge(s,r,n,l,i);let c=null!=a?a:0;if(2&c){let{static:e=!1,...t}=s;if(e)return uge(t,r,n,l,i)}if(1&c){let{unmount:e=!0,...t}=s;return ige(e?0:1,{0:()=>null,1:()=>uge({...t,hidden:!0,style:{display:"none"}},r,n,l,i)})}return uge(s,r,n,l,i)}({mergeRefs:e,...t})),[e])}function uge(e,t={},r,n,a){let{as:l=r,children:i,refName:s="ref",...c}=yge(e,["unmount","static"]),d=void 0!==e.ref?{[s]:e.ref}:{},u="function"==typeof i?i(t):i;"className"in c&&c.className&&"function"==typeof c.className&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let h={};if(t){let e=!1,r=[];for(let[n,a]of Object.entries(t))"boolean"==typeof a&&(e=!0),!0===a&&r.push(n.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){h["data-headlessui-state"]=r.join(" ");for(let e of r)h[`data-${e}`]=""}}if(l===f&&(Object.keys(mge(c)).length>0||Object.keys(mge(h)).length>0)){if(p(u)&&!(Array.isArray(u)&&u.length>1)){let e=u.props,t=null==e?void 0:e.className,r="function"==typeof t?(...e)=>lge(t(...e),c.className):lge(t,c.className),n=r?{className:r}:{},o=fge(u.props,mge(yge(c,["ref"])));for(let e in h)e in o&&delete h[e];return v(u,Object.assign({},o,h,d,{ref:a(gge(u),d.ref)},n))}if(Object.keys(mge(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(mge(c)).concat(Object.keys(mge(h))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return o(l,Object.assign({},yge(c,["ref"]),l!==f&&d,l!==f&&h),u)}function hge(...e){return e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}function fge(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])for(let e in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(r[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in r)Object.assign(t,{[e](t,...n){let a=r[e];for(let e of a){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...n)}}});return t}function pge(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];for(let e in r)Object.assign(t,{[e](...t){let n=r[e];for(let e of n)null==e||e(...t)}});return t}function vge(e){var t;return Object.assign(r(e),{displayName:null!=(t=e.displayName)?t:e.name})}function mge(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function yge(e,t=[]){let r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}function gge(e){return t.version.split(".")[0]>="19"?e.props.ref:e.ref}function bge(e={},t=null,r=[]){for(let[n,a]of Object.entries(e))wge(r,kge(t,n),a);return r}function kge(e,t){return e?e+"["+t+"]":t}function wge(e,t,r){if(Array.isArray(r))for(let[n,a]of r.entries())wge(e,kge(t,n.toString()),a);else r instanceof Date?e.push([t,r.toISOString()]):"boolean"==typeof r?e.push([t,r?"1":"0"]):"string"==typeof r?e.push([t,r]):"number"==typeof r?e.push([t,`${r}`]):null==r?e.push([t,""]):bge(r,t,e)}var _ge=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(_ge||{});let Mge=vge((function(e,t){var r;let{features:n=1,...a}=e,o={ref:t,"aria-hidden":!(2&~n)||(null!=(r=a["aria-hidden"])?r:void 0),hidden:!(4&~n)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~n)&&!!(2&~n)&&{display:"none"}}};return dge()({ourProps:o,theirProps:a,slot:{},defaultTag:"span",name:"Hidden"})})),xge=u(null);function jge({children:e}){let r=h(xge);if(!r)return t.createElement(t.Fragment,null,e);let{target:n}=r;return n?z(t.createElement(t.Fragment,null,e),n):null}function Oge({data:e,form:r,disabled:n,onReset:a,overrides:o}){let[l,c]=i(null),d=ege();return s((()=>{if(a&&l)return d.addEventListener(l,"reset",a)}),[l,r,a]),t.createElement(jge,null,t.createElement(Ege,{setForm:c,formId:r}),bge(e).map((([e,a])=>t.createElement(Mge,{features:_ge.Hidden,...mge({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:n,name:e,value:a,...o})}))))}function Ege({setForm:e,formId:r}){return s((()=>{if(r){let t=document.getElementById(r);t&&e(t)}}),[e,r]),r?null:t.createElement(Mge,{features:_ge.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let r=t.closest("form");r&&e(r)}})}let zge=u(void 0);function Cge(){return h(zge)}function Pge(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=""===(null==t?void 0:t.getAttribute("disabled"));return(!n||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}let Age=Symbol();function Rge(...e){let t=n(e);s((()=>{t.current=e}),[e]);let r=nge((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Age])))?void 0:r}let Lge=u(null);function Ige(){let e=h(Lge);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Ige),e}return e}Lge.displayName="DescriptionContext";let Sge=vge((function(e,t){let r=m(),n=oge(),{id:a=`headlessui-description-${r}`,...o}=e,i=Ige(),s=Rge(t);tge((()=>i.register(a)),[a,i.register]);let c=n||!1,d=l((()=>({...i.slot,disabled:c})),[i.slot,c]),u={ref:s,...i.props,id:a};return dge()({ourProps:u,theirProps:o,slot:d,defaultTag:"p",name:i.name||"Description"})}));Object.assign(Sge,{});var Vge=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Vge||{});let Hge=u(null);function Zge(){let e=h(Hge);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Zge),e}return e}function Nge(e){var t,r,n;let a=null!=(r=null==(t=h(Hge))?void 0:t.value)?r:void 0;return(null!=(n=null==e?void 0:e.length)?n:0)>0?[a,...e].filter(Boolean).join(" "):a}Hge.displayName="LabelContext";let Dge=vge((function(e,t){var r;let n=m(),a=Zge(),o=Cge(),i=oge(),{id:s=`headlessui-label-${n}`,htmlFor:c=(null!=o?o:null==(r=a.props)?void 0:r.htmlFor),passive:d=!1,...u}=e,h=Rge(t);tge((()=>a.register(s)),[s,a.register]);let f=nge((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),a.props&&"onClick"in a.props&&"function"==typeof a.props.onClick&&a.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let r=e.getAttribute("aria-disabled");if("true"===r||""===r)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),p=i||!1,v=l((()=>({...a.slot,disabled:p})),[a.slot,p]),y={ref:h,...a.props,id:s,htmlFor:c,onClick:f};return d&&("onClick"in y&&(delete y.htmlFor,delete y.onClick),"onClick"in u&&delete u.onClick),dge()({ourProps:y,theirProps:u,slot:v,defaultTag:c?"label":"div",name:a.name||"Label"})})),qge=Object.assign(Dge,{});function Bge(e,t,r){let n,a=r.initialDeps??[];return()=>{var o,l,i,s;let c;r.key&&(null==(o=r.debug)?void 0:o.call(r))&&(c=Date.now());const d=e(),u=d.length!==a.length||d.some(((e,t)=>a[t]!==e));if(!u)return n;let h;if(a=d,r.key&&(null==(l=r.debug)?void 0:l.call(r))&&(h=Date.now()),n=t(...d),r.key&&(null==(i=r.debug)?void 0:i.call(r))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-h))/100,n=t/16,a=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${a(t,5)} /${a(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*n,120))}deg 100% 31%);`,null==r?void 0:r.key)}return null==(s=null==r?void 0:r.onChange)||s.call(r,n),n}}function Fge(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const Tge=(e,t,r)=>{let n;return function(...a){e.clearTimeout(n),n=e.setTimeout((()=>t.apply(this,a)),r)}},Wge=e=>e,Uge=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let e=t;e<=r;e++)n.push(e);return n},$ge=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const a=e=>{const{width:r,height:n}=e;t({width:Math.round(r),height:Math.round(n)})};if(a(r.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver((e=>{const t=e[0];if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return void a({width:e.inlineSize,height:e.blockSize})}a(r.getBoundingClientRect())}));return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},Gge={passive:!0},Yge="undefined"==typeof window||"onscrollend"in window,Kge=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let a=0;const o=e.options.useScrollendEvent&&Yge?()=>{}:Tge(n,(()=>{t(a,!1)}),e.options.isScrollingResetDelay),l=n=>()=>{const{horizontal:l,isRtl:i}=e.options;a=l?r.scrollLeft*(i?-1:1):r.scrollTop,o(),t(a,n)},i=l(!0),s=l(!1);return s(),r.addEventListener("scroll",i,Gge),r.addEventListener("scrollend",s,Gge),()=>{r.removeEventListener("scroll",i),r.removeEventListener("scrollend",s)}},Xge=(e,t,r)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){return Math.round(e[r.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])},Qge=(e,{adjustments:t=0,behavior:r},n)=>{var a,o;const l=e+t;null==(o=null==(a=n.scrollElement)?void 0:a.scrollTo)||o.call(a,{[n.options.horizontal?"left":"top"]:l,behavior:r})};class Jge{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{this._measureElement(e.target,e)}))})):null);return{disconnect:()=>{var r;null==(r=t())||r.disconnect(),e=null},observe:e=>{var r;return null==(r=t())?void 0:r.observe(e,{box:"border-box"})},unobserve:e=>{var r;return null==(r=t())?void 0:r.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,r])=>{void 0===r&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Wge,rangeExtractor:Uge,onChange:()=>{},measureElement:Xge,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var t,r;null==(r=(t=this.options).onChange)||r.call(t,this,e)},this.maybeNotify=Bge((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:"production"!==process.env.NODE_ENV&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const r=new Map,n=new Map;for(let a=t-1;a>=0;a--){const t=e[a];if(r.has(t.lane))continue;const o=n.get(t.lane);if(null==o||t.end>o.end?n.set(t.lane,t):t.end<o.end&&r.set(t.lane,!0),r.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=Bge((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((e,t,r,n,a)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:r,getItemKey:n,enabled:a})),{key:!1}),this.getMeasurements=Bge((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:r,getItemKey:n,enabled:a},o)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const i=this.measurementsCache.slice(0,l);for(let a=l;a<e;a++){const e=n(a),l=1===this.options.lanes?i[a-1]:this.getFurthestMeasurement(i,a),s=l?l.end+this.options.gap:t+r,c=o.get(e),d="number"==typeof c?c:this.options.estimateSize(a),u=s+d,h=l?l.lane:a%this.options.lanes;i[a]={index:a,start:s,size:d,end:u,key:e,lane:h}}return this.measurementsCache=i,i}),{key:"production"!==process.env.NODE_ENV&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Bge((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((e,t,r)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:r}){const n=e.length-1,a=t=>e[t].start,o=ebe(0,n,a,r);let l=o;for(;l<n&&e[l].end<r+t;)l++;return{startIndex:o,endIndex:l}}({measurements:e,outerSize:t,scrollOffset:r}):null),{key:"production"!==process.env.NODE_ENV&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Bge((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,r,n)=>null===t?[]:e({startIndex:t.startIndex,endIndex:t.endIndex,overscan:r,count:n})),{key:"production"!==process.env.NODE_ENV&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,r=e.getAttribute(t);return r?parseInt(r,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const r=this.indexFromElement(e),n=this.measurementsCache[r];if(!n)return;const a=n.key,o=this.elementsCache.get(a);o!==e&&(o&&this.observer.unobserve(o),this.observer.observe(e),this.elementsCache.set(a,e)),e.isConnected&&this.resizeItem(r,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const r=this.measurementsCache[e];if(!r)return;const n=t-(this.itemSizeCache.get(r.key)??r.size);0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,n,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&("production"!==process.env.NODE_ENV&&this.options.debug&&console.info("correction",n),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}))},this.getVirtualItems=Bge((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const r=[];for(let n=0,a=e.length;n<a;n++){const a=t[e[n]];r.push(a)}return r}),{key:"production"!==process.env.NODE_ENV&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return Fge(t[ebe(0,t.length-1,(e=>Fge(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const r=this.getSize(),n=this.getScrollOffset();"auto"===t&&(t=e<=n?"start":e>=n+r?"end":"start"),"start"===t||("end"===t?e-=r:"center"===t&&(e-=r/2));const a=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-r;return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const r=this.measurementsCache[e];if(!r)return;const n=this.getSize(),a=this.getScrollOffset();if("auto"===t)if(r.end>=a+n-this.options.scrollPaddingEnd)t="end";else{if(!(r.start<=a+this.options.scrollPaddingStart))return[a,t];t="start"}const o="end"===t?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,t),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:r}={})=>{this.cancelScrollToIndex(),"smooth"===r&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:r})},this.scrollToIndex=(e,{align:t="auto",behavior:r}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===r&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const n=this.getOffsetForIndex(e,t);if(!n)return;const[a,o]=n;this._scrollToOffset(a,{adjustments:void 0,behavior:r}),"smooth"!==r&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null;if(this.elementsCache.has(this.options.getItemKey(e))){const[t]=Fge(this.getOffsetForIndex(e,o));((e,t)=>Math.abs(e-t)<1)(t,this.getScrollOffset())||this.scrollToIndex(e,{align:o,behavior:r})}else this.scrollToIndex(e,{align:o,behavior:r})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let r;return r=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:r})=>{this.options.scrollToFn(e,{behavior:r,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const ebe=(e,t,r,n)=>{for(;e<=t;){const a=(e+t)/2|0,o=r(a);if(o<n)e=a+1;else{if(!(o>n))return a;t=a-1}}return e>0?e-1:0};const tbe="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function rbe(t){return function(t){const r=e.useReducer((()=>({})),{})[1],n={...t,onChange:(e,n)=>{var a;n?C(r):r(),null==(a=t.onChange)||a.call(t,e,n)}},[a]=e.useState((()=>new Jge(n)));return a.setOptions(n),tbe((()=>a._didMount()),[]),tbe((()=>a._willUpdate())),a}({observeElementRect:$ge,observeElementOffset:Kge,scrollToFn:Qge,...t})}function nbe(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function abe(e,t=!1){let[r,n]=y((()=>({})),{}),a=l((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}(e)),[e,r]);return tge((()=>{if(!e)return;let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${a.width}px`,height:`${a.height}px`}:a}let obe=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function lbe(e,t){let r=e(),n=new Set;return{getSnapshot:()=>r,subscribe:e=>(n.add(e),()=>n.delete(e)),dispatch(e,...a){let o=t[e].call(r,...a);o&&(r=o,n.forEach((e=>e())))}}}function ibe(e){return g(e.subscribe,e.getSnapshot,e.getSnapshot)}let sbe=new obe((()=>lbe((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let r=this.slice();return r.splice(t,1),r}})));function cbe(e,t){let r=sbe.get(t),n=m(),a=ibe(r);if(tge((()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)}),[r,e]),!e)return!1;let o=a.indexOf(n),l=a.length;return-1===o&&(o=l,l+=1),o===l-1}let dbe=new Map,ube=new Map;function hbe(e){var t;let r=null!=(t=ube.get(e))?t:0;return ube.set(e,r+1),0!==r||(dbe.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>fbe(e)}function fbe(e){var t;let r=null!=(t=ube.get(e))?t:1;if(1===r?ube.delete(e):ube.set(e,r-1),1!==r)return;let n=dbe.get(e);n&&(null===n["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,dbe.delete(e))}function pbe(e,{allowed:t,disallowed:r}={}){let n=cbe(e,"inert-others");tge((()=>{var e,a;if(!n)return;let o=Jye();for(let t of null!=(e=null==r?void 0:r())?e:[])t&&o.add(hbe(t));let l=null!=(a=null==t?void 0:t())?a:[];for(let e of l){if(!e)continue;let t=Xye(e);if(!t)continue;let r=e.parentElement;for(;r&&r!==t.body;){for(let e of r.children)l.some((t=>e.contains(t)))||o.add(hbe(e));r=r.parentElement}}return o.dispose}),[n,t,r])}let vbe=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var mbe=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(mbe||{}),ybe=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ybe||{}),gbe=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(gbe||{}),bbe=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(bbe||{});var kbe=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(kbe||{});function wbe(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function _be(){return wbe()||/Android/gi.test(window.navigator.userAgent)}function Mbe(e,t,r,n){let a=rge(r);s((()=>{if(e)return document.addEventListener(t,r,n),()=>document.removeEventListener(t,r,n);function r(e){a.current(e)}}),[e,t,n])}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));function xbe(e,t,r){let o=cbe(e,"outside-click"),l=rge(r),i=a((function(e,r){if(e.defaultPrevented)return;let n=r(e);if(null===n||!n.getRootNode().contains(n)||!n.isConnected)return;let a=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a)if(null!==t&&(t.contains(n)||e.composed&&e.composedPath().includes(t)))return;return!function(e,t=0){var r;return e!==(null==(r=Xye(e))?void 0:r.body)&&ige(t,{0:()=>e.matches(vbe),1(){let t=e;for(;null!==t;){if(t.matches(vbe))return!0;t=t.parentElement}return!1}})}(n,bbe.Loose)&&-1!==n.tabIndex&&e.preventDefault(),l.current(e,n)}),[l,t]),c=n(null);Mbe(o,"pointerdown",(e=>{var t,r;c.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),Mbe(o,"mousedown",(e=>{var t,r;c.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),Mbe(o,"click",(e=>{_be()||c.current&&(i(e,(()=>c.current)),c.current=null)}),!0);let d=n({x:0,y:0});Mbe(o,"touchstart",(e=>{d.current.x=e.touches[0].clientX,d.current.y=e.touches[0].clientY}),!0),Mbe(o,"touchend",(e=>{let t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY;if(!(Math.abs(t-d.current.x)>=30||Math.abs(r-d.current.y)>=30))return i(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,r,n){let a=rge(r);s((()=>{if(e)return window.addEventListener(t,r,n),()=>window.removeEventListener(t,r,n);function r(e){a.current(e)}}),[e,t,n])}(o,"blur",(e=>i(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function jbe(...e){return l((()=>Xye(...e)),[...e])}function Obe(e){let t=n({value:"",selectionStart:null,selectionEnd:null});return function(e,t,r,n){let a=rge(r);s((()=>{function r(e){a.current(e)}return(e=null!=e?e:window).addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}),[e,t,n])}(e,"blur",(e=>{let r=e.target;r instanceof HTMLInputElement&&(t.current={value:r.value,selectionStart:r.selectionStart,selectionEnd:r.selectionEnd})})),nge((()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:r,selectionEnd:n}=t.current;null!==r&&null!==n&&e.setSelectionRange(r,n)}t.current={value:"",selectionStart:null,selectionEnd:null}}}))}function Ebe(e,t){return l((()=>{var r;if(e.type)return e.type;let n=null!=(r=e.as)?r:"button";return"string"==typeof n&&"button"===n.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function zbe(){let e;return{before({doc:t}){var r;let n=t.documentElement,a=null!=(r=t.defaultView)?r:window;e=Math.max(0,a.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,a=Math.max(0,n.clientWidth-n.offsetWidth),o=Math.max(0,e-a);r.style(n,"paddingRight",`${o}px`)}}}function Cbe(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Pbe=lbe((()=>new Map),{PUSH(e,t){var r;let n=null!=(r=this.get(e))?r:{doc:e,count:0,d:Jye(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:Cbe(r)},a=[wbe()?{before({doc:e,d:t,meta:r}){function n(e){return r.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var r;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let r=Jye();r.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>r.dispose()))))}let a=null!=(r=window.scrollY)?r:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let r=t.target.closest("a");if(!r)return;let{hash:a}=new URL(r.href),l=e.querySelector(a);l&&!n(l)&&(o=l)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(n(e.target)){let r=e.target;for(;r.parentElement&&n(r.parentElement);)r=r.parentElement;t.style(r,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(n(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;a!==t&&window.scrollTo(0,a),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},zbe(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];a.forEach((({before:e})=>null==e?void 0:e(n))),a.forEach((({after:e})=>null==e?void 0:e(n)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Abe(e,t,r=()=>[document.body]){!function(e,t,r=()=>({containers:[]})){let n=ibe(Pbe),a=t?n.get(t):void 0,o=!!a&&a.count>0;tge((()=>{if(t&&e)return Pbe.dispatch("PUSH",t,r),()=>Pbe.dispatch("POP",t,r)}),[e,t])}(cbe(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],r]}}))}function Rbe(e){return[e.screenX,e.screenY]}var Lbe,Ibe;Pbe.subscribe((()=>{let e=Pbe.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let e="hidden"===t.get(r.doc),n=0!==r.count;(n&&!e||!n&&e)&&Pbe.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),0===r.count&&Pbe.dispatch("TEARDOWN",r)}})),"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(Lbe=null==process?void 0:process.env)?void 0:Lbe.NODE_ENV)&&void 0===(null==(Ibe=null==Element?void 0:Element.prototype)?void 0:Ibe.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var Sbe=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Sbe||{});function Vbe(e){let t={};for(let r in e)!0===e[r]&&(t[`data-${r}`]="");return t}function Hbe(e,t,r,o){let[l,s]=i(r),{hasFlag:c,addFlag:d,removeFlag:u}=function(e=0){let[t,r]=i(e),n=a((e=>r(e)),[t]),o=a((e=>r((t=>t|e))),[t]),l=a((e=>(t&e)===e),[t]),s=a((e=>r((t=>t&~e))),[r]),c=a((e=>r((t=>t^e))),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:l,removeFlag:s,toggleFlag:c}}(e&&l?3:0),h=n(!1),f=n(!1),p=ege();return tge((()=>{if(e)return r&&s(!0),t?(null==void 0||undefined.call(o,r),function(e,{prepare:t,run:r,done:n,inFlight:a}){let o=Jye();return function(e,{inFlight:t,prepare:r}){if(null!=t&&t.current)return void r();let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}(e,{prepare:t,inFlight:a}),o.nextFrame((()=>{r(),o.requestAnimationFrame((()=>{o.add(function(e,t){var r,n;let a=Jye();if(!e)return a.dispose;let o=!1;a.add((()=>{o=!0}));let l=null!=(n=null==(r=e.getAnimations)?void 0:r.call(e).filter((e=>e instanceof CSSTransition)))?n:[];return 0===l.length?(t(),a.dispose):(Promise.allSettled(l.map((e=>e.finished))).then((()=>{o||t()})),a.dispose)}(e,n))}))})),o.dispose}(t,{inFlight:h,prepare(){f.current?f.current=!1:f.current=h.current,h.current=!0,!f.current&&(r?(d(3),u(4)):(d(4),u(2)))},run(){f.current?r?(u(3),d(4)):(u(4),d(3)):r?u(1):d(1)},done(){f.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(h.current=!1,u(7),r||s(!1),null==void 0||undefined.call(o,r))}})):void(r&&d(3))}),[e,r,t,p]),e?[l,{closed:c(1),enter:c(2),leave:c(4),transition:c(2)||c(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Zbe(e,t){let r=n([]),a=nge(e);s((()=>{let e=[...r.current];for(let[n,o]of t.entries())if(r.current[n]!==o){let n=a(t,e);return r.current=t,n}}),[a,...t])}function Nbe(){return"undefined"!=typeof window}function Dbe(e){return Fbe(e)?(e.nodeName||"").toLowerCase():"#document"}function qbe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Bbe(e){var t;return null==(t=(Fbe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Fbe(e){return!!Nbe()&&(e instanceof Node||e instanceof qbe(e).Node)}function Tbe(e){return!!Nbe()&&(e instanceof Element||e instanceof qbe(e).Element)}function Wbe(e){return!!Nbe()&&(e instanceof HTMLElement||e instanceof qbe(e).HTMLElement)}function Ube(e){return!(!Nbe()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof qbe(e).ShadowRoot)}function $be(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Jbe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function Gbe(e){return["table","td","th"].includes(Dbe(e))}function Ybe(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Kbe(e){const t=Xbe(),r=Tbe(e)?Jbe(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function Xbe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Qbe(e){return["html","body","#document"].includes(Dbe(e))}function Jbe(e){return qbe(e).getComputedStyle(e)}function eke(e){return Tbe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tke(e){if("html"===Dbe(e))return e;const t=e.assignedSlot||e.parentNode||Ube(e)&&e.host||Bbe(e);return Ube(t)?t.host:t}function rke(e){const t=tke(e);return Qbe(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wbe(t)&&$be(t)?t:rke(t)}function nke(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const a=rke(e),o=a===(null==(n=e.ownerDocument)?void 0:n.body),l=qbe(a);if(o){const e=ake(l);return t.concat(l,l.visualViewport||[],$be(a)?a:[],e&&r?nke(e):[])}return t.concat(a,nke(a,[],r))}function ake(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const oke=["top","right","bottom","left"],lke=Math.min,ike=Math.max,ske=Math.round,cke=Math.floor,dke=e=>({x:e,y:e}),uke={left:"right",right:"left",bottom:"top",top:"bottom"},hke={start:"end",end:"start"};function fke(e,t,r){return ike(e,lke(t,r))}function pke(e,t){return"function"==typeof e?e(t):e}function vke(e){return e.split("-")[0]}function mke(e){return e.split("-")[1]}function yke(e){return"x"===e?"y":"x"}function gke(e){return"y"===e?"height":"width"}function bke(e){return["top","bottom"].includes(vke(e))?"y":"x"}function kke(e){return yke(bke(e))}function wke(e){return e.replace(/start|end/g,(e=>hke[e]))}function _ke(e){return e.replace(/left|right|bottom|top/g,(e=>uke[e]))}function Mke(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function xke(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function jke(e,t,r){let{reference:n,floating:a}=e;const o=bke(t),l=kke(t),i=gke(l),s=vke(t),c="y"===o,d=n.x+n.width/2-a.width/2,u=n.y+n.height/2-a.height/2,h=n[i]/2-a[i]/2;let f;switch(s){case"top":f={x:d,y:n.y-a.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-a.width,y:u};break;default:f={x:n.x,y:n.y}}switch(mke(t)){case"start":f[l]-=h*(r&&c?-1:1);break;case"end":f[l]+=h*(r&&c?-1:1)}return f}async function Oke(e,t){var r;void 0===t&&(t={});const{x:n,y:a,platform:o,rects:l,elements:i,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=pke(t,e),p=Mke(f),v=i[h?"floating"===u?"reference":"floating":u],m=xke(await o.getClippingRect({element:null==(r=await(null==o.isElement?void 0:o.isElement(v)))||r?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:s})),y="floating"===u?{x:n,y:a,width:l.floating.width,height:l.floating.height}:l.reference,g=await(null==o.getOffsetParent?void 0:o.getOffsetParent(i.floating)),b=await(null==o.isElement?void 0:o.isElement(g))&&await(null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},k=xke(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:g,strategy:s}):y);return{top:(m.top-k.top+p.top)/b.y,bottom:(k.bottom-m.bottom+p.bottom)/b.y,left:(m.left-k.left+p.left)/b.x,right:(k.right-m.right+p.right)/b.x}}function Eke(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zke(e){return oke.some((t=>e[t]>=0))}function Cke(e){const t=Jbe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Wbe(e),o=a?e.offsetWidth:r,l=a?e.offsetHeight:n,i=ske(r)!==o||ske(n)!==l;return i&&(r=o,n=l),{width:r,height:n,$:i}}function Pke(e){return Tbe(e)?e:e.contextElement}function Ake(e){const t=Pke(e);if(!Wbe(t))return dke(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:o}=Cke(t);let l=(o?ske(r.width):r.width)/n,i=(o?ske(r.height):r.height)/a;return l&&Number.isFinite(l)||(l=1),i&&Number.isFinite(i)||(i=1),{x:l,y:i}}const Rke=dke(0);function Lke(e){const t=qbe(e);return Xbe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Rke}function Ike(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const a=e.getBoundingClientRect(),o=Pke(e);let l=dke(1);t&&(n?Tbe(n)&&(l=Ake(n)):l=Ake(e));const i=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==qbe(e))&&t}(o,r,n)?Lke(o):dke(0);let s=(a.left+i.x)/l.x,c=(a.top+i.y)/l.y,d=a.width/l.x,u=a.height/l.y;if(o){const e=qbe(o),t=n&&Tbe(n)?qbe(n):n;let r=e,a=ake(r);for(;a&&n&&t!==r;){const e=Ake(a),t=a.getBoundingClientRect(),n=Jbe(a),o=t.left+(a.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(a.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=o,c+=l,r=qbe(a),a=ake(r)}}return xke({width:d,height:u,x:s,y:c})}function Ske(e,t){const r=eke(e).scrollLeft;return t?t.left+r:Ike(Bbe(e)).left+r}function Vke(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Ske(e,n)),y:n.top+t.scrollTop}}function Hke(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=qbe(e),n=Bbe(e),a=r.visualViewport;let o=n.clientWidth,l=n.clientHeight,i=0,s=0;if(a){o=a.width,l=a.height;const e=Xbe();(!e||e&&"fixed"===t)&&(i=a.offsetLeft,s=a.offsetTop)}return{width:o,height:l,x:i,y:s}}(e,r);else if("document"===t)n=function(e){const t=Bbe(e),r=eke(e),n=e.ownerDocument.body,a=ike(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ike(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+Ske(e);const i=-r.scrollTop;return"rtl"===Jbe(n).direction&&(l+=ike(t.clientWidth,n.clientWidth)-a),{width:a,height:o,x:l,y:i}}(Bbe(e));else if(Tbe(t))n=function(e,t){const r=Ike(e,!0,"fixed"===t),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=Wbe(e)?Ake(e):dke(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:n*o.y}}(t,r);else{const r=Lke(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return xke(n)}function Zke(e,t){const r=tke(e);return!(r===t||!Tbe(r)||Qbe(r))&&("fixed"===Jbe(r).position||Zke(r,t))}function Nke(e,t,r){const n=Wbe(t),a=Bbe(t),o="fixed"===r,l=Ike(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const s=dke(0);if(n||!n&&!o)if(("body"!==Dbe(t)||$be(a))&&(i=eke(t)),n){const e=Ike(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=Ske(a));const c=!a||n||o?dke(0):Vke(a,i);return{x:l.left+i.scrollLeft-s.x-c.x,y:l.top+i.scrollTop-s.y-c.y,width:l.width,height:l.height}}function Dke(e){return"static"===Jbe(e).position}function qke(e,t){if(!Wbe(e)||"fixed"===Jbe(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Bbe(e)===r&&(r=r.ownerDocument.body),r}function Bke(e,t){const r=qbe(e);if(Ybe(e))return r;if(!Wbe(e)){let t=tke(e);for(;t&&!Qbe(t);){if(Tbe(t)&&!Dke(t))return t;t=tke(t)}return r}let n=qke(e,t);for(;n&&Gbe(n)&&Dke(n);)n=qke(n,t);return n&&Qbe(n)&&Dke(n)&&!Kbe(n)?r:n||function(e){let t=tke(e);for(;Wbe(t)&&!Qbe(t);){if(Kbe(t))return t;if(Ybe(t))return null;t=tke(t)}return null}(e)||r}const Fke={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const o="fixed"===a,l=Bbe(n),i=!!t&&Ybe(t.floating);if(n===l||i&&o)return r;let s={scrollLeft:0,scrollTop:0},c=dke(1);const d=dke(0),u=Wbe(n);if((u||!u&&!o)&&(("body"!==Dbe(n)||$be(l))&&(s=eke(n)),Wbe(n))){const e=Ike(n);c=Ake(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const h=!l||u||o?dke(0):Vke(l,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-s.scrollTop*c.y+d.y+h.y}},getDocumentElement:Bbe,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[..."clippingAncestors"===r?Ybe(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=nke(e,[],!1).filter((e=>Tbe(e)&&"body"!==Dbe(e))),a=null;const o="fixed"===Jbe(e).position;let l=o?tke(e):e;for(;Tbe(l)&&!Qbe(l);){const t=Jbe(l),r=Kbe(l);r||"fixed"!==t.position||(a=null),(o?!r&&!a:!r&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||$be(l)&&!r&&Zke(e,l))?n=n.filter((e=>e!==l)):a=t,l=tke(l)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=o[0],i=o.reduce(((e,r)=>{const n=Hke(t,r,a);return e.top=ike(n.top,e.top),e.right=lke(n.right,e.right),e.bottom=lke(n.bottom,e.bottom),e.left=ike(n.left,e.left),e}),Hke(t,l,a));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:Bke,getElementRects:async function(e){const t=this.getOffsetParent||Bke,r=this.getDimensions,n=await r(e.floating);return{reference:Nke(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Cke(e);return{width:t,height:r}},getScale:Ake,isElement:Tbe,isRTL:function(e){return"rtl"===Jbe(e).direction}};function Tke(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=Pke(e),d=a||o?[...c?nke(c):[],...nke(t)]:[];d.forEach((e=>{a&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)}));const u=c&&i?function(e,t){let r,n=null;const a=Bbe(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function l(i,s){void 0===i&&(i=!1),void 0===s&&(s=1),o();const{left:c,top:d,width:u,height:h}=e.getBoundingClientRect();if(i||t(),!u||!h)return;const f={rootMargin:-cke(d)+"px "+-cke(a.clientWidth-(c+u))+"px "+-cke(a.clientHeight-(d+h))+"px "+-cke(c)+"px",threshold:ike(0,lke(1,s))||1};let p=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!p)return l();t?l(!1,t):r=setTimeout((()=>{l(!1,1e-7)}),1e3)}p=!1}try{n=new IntersectionObserver(v,{...f,root:a.ownerDocument})}catch(e){n=new IntersectionObserver(v,f)}n.observe(e)}(!0),o}(c,r):null;let h,f=-1,p=null;l&&(p=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),r()})),c&&!s&&p.observe(c),p.observe(t));let v=s?Ike(e):null;return s&&function t(){const n=Ike(e);!v||n.x===v.x&&n.y===v.y&&n.width===v.width&&n.height===v.height||r();v=n,h=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach((e=>{a&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)})),null==u||u(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(h)}}const Wke=Oke,Uke=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:o,placement:l,middlewareData:i}=t,s=await async function(e,t){const{placement:r,platform:n,elements:a}=e,o=await(null==n.isRTL?void 0:n.isRTL(a.floating)),l=vke(r),i=mke(r),s="y"===bke(r),c=["left","top"].includes(l)?-1:1,d=o&&s?-1:1,u=pke(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&"number"==typeof p&&(f="end"===i?-1*p:p),s?{x:f*d,y:h*c}:{x:h*c,y:f*d}}(t,e);return l===(null==(r=i.offset)?void 0:r.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:a+s.x,y:o+s.y,data:{...s,placement:l}}}}},$ke=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:i={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=pke(e,t),c={x:r,y:n},d=await Oke(t,s),u=bke(vke(a)),h=yke(u);let f=c[h],p=c[u];if(o){const e="y"===h?"bottom":"right";f=fke(f+d["y"===h?"top":"left"],f,f-d[e])}if(l){const e="y"===u?"bottom":"right";p=fke(p+d["y"===u?"top":"left"],p,p-d[e])}const v=i.fn({...t,[h]:f,[u]:p});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[h]:o,[u]:l}}}}}},Gke=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:o,rects:l,initialPlacement:i,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=pke(e,t);if(null!=(r=o.arrow)&&r.alignmentOffset)return{};const y=vke(a),g=bke(i),b=vke(i)===i,k=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=h||(b||!v?[_ke(i)]:function(e){const t=_ke(e);return[wke(e),t,wke(t)]}(i)),_="none"!==p;!h&&_&&w.push(...function(e,t,r,n){const a=mke(e);let o=function(e,t,r){const n=["left","right"],a=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?o:l;default:return[]}}(vke(e),"start"===r,n);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(wke)))),o}(i,v,p,k));const M=[i,...w],x=await Oke(t,m),j=[];let O=(null==(n=o.flip)?void 0:n.overflows)||[];if(d&&j.push(x[y]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=mke(e),a=kke(e),o=gke(a);let l="x"===a?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=_ke(l)),[l,_ke(l)]}(a,l,k);j.push(x[e[0]],x[e[1]])}if(O=[...O,{placement:a,overflows:j}],!j.every((e=>e<=0))){var E,z;const e=((null==(E=o.flip)?void 0:E.index)||0)+1,t=M[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let r=null==(z=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:z.placement;if(!r)switch(f){case"bestFit":{var C;const e=null==(C=O.filter((e=>{if(_){const t=bke(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(r=e);break}case"initialPlacement":r=i}if(a!==r)return{reset:{placement:r}}}return{}}}},Yke=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:o,platform:l,elements:i}=t,{apply:s=()=>{},...c}=pke(e,t),d=await Oke(t,c),u=vke(a),h=mke(a),f="y"===bke(a),{width:p,height:v}=o.floating;let m,y;"top"===u||"bottom"===u?(m=u,y=h===(await(null==l.isRTL?void 0:l.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,m="end"===h?"top":"bottom");const g=v-d.top-d.bottom,b=p-d.left-d.right,k=lke(v-d[m],g),w=lke(p-d[y],b),_=!t.middlewareData.shift;let M=k,x=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(x=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(M=g),_&&!h){const e=ike(d.left,0),t=ike(d.right,0),r=ike(d.top,0),n=ike(d.bottom,0);f?x=p-2*(0!==e||0!==t?e+t:ike(d.left,d.right)):M=v-2*(0!==r||0!==n?r+n:ike(d.top,d.bottom))}await s({...t,availableWidth:x,availableHeight:M});const j=await l.getDimensions(i.floating);return p!==j.width||v!==j.height?{reset:{rects:!0}}:{}}}},Kke=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=pke(e,t);switch(n){case"referenceHidden":{const e=Eke(await Oke(t,{...a,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zke(e)}}}case"escaped":{const e=Eke(await Oke(t,{...a,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:zke(e)}}}default:return{}}}}},Xke=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:o,platform:l,elements:i,middlewareData:s}=t,{element:c,padding:d=0}=pke(e,t)||{};if(null==c)return{};const u=Mke(d),h={x:r,y:n},f=kke(a),p=gke(f),v=await l.getDimensions(c),m="y"===f,y=m?"top":"left",g=m?"bottom":"right",b=m?"clientHeight":"clientWidth",k=o.reference[p]+o.reference[f]-h[f]-o.floating[p],w=h[f]-o.reference[f],_=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let M=_?_[b]:0;M&&await(null==l.isElement?void 0:l.isElement(_))||(M=i.floating[b]||o.floating[p]);const x=k/2-w/2,j=M/2-v[p]/2-1,O=lke(u[y],j),E=lke(u[g],j),z=O,C=M-v[p]-E,P=M/2-v[p]/2+x,A=fke(z,P,C),R=!s.arrow&&null!=mke(a)&&P!==A&&o.reference[p]/2-(P<z?O:E)-v[p]/2<0,L=R?P<z?P-z:P-C:0;return{[f]:h[f]+L,data:{[f]:A,centerOffset:P-A-L,...R&&{alignmentOffset:L}},reset:R}}}),Qke=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:o,middlewareData:l}=t,{offset:i=0,mainAxis:s=!0,crossAxis:c=!0}=pke(e,t),d={x:r,y:n},u=bke(a),h=yke(u);let f=d[h],p=d[u];const v=pke(i,t),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const e="y"===h?"height":"width",t=o.reference[h]-o.floating[e]+m.mainAxis,r=o.reference[h]+o.reference[e]-m.mainAxis;f<t?f=t:f>r&&(f=r)}if(c){var y,g;const e="y"===h?"width":"height",t=["top","left"].includes(vke(a)),r=o.reference[u]-o.floating[e]+(t&&(null==(y=l.offset)?void 0:y[u])||0)+(t?0:m.crossAxis),n=o.reference[u]+o.reference[e]+(t?0:(null==(g=l.offset)?void 0:g[u])||0)-(t?m.crossAxis:0);p<r?p=r:p>n&&(p=n)}return{[h]:f,[u]:p}}}},Jke=(e,t,r)=>{const n=new Map,a={platform:Fke,...r},o={...a.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:l}=r,i=o.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:u}=jke(c,n,s),h=n,f={},p=0;for(let r=0;r<i.length;r++){const{name:o,fn:v}=i[r],{x:m,y:y,data:g,reset:b}=await v({x:d,y:u,initialPlacement:n,placement:h,strategy:a,middlewareData:f,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=m?m:d,u=null!=y?y:u,f={...f,[o]:{...f[o],...g}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:d,y:u}=jke(c,h,s))),r=-1)}return{x:d,y:u,placement:h,strategy:a,middlewareData:f}})(e,t,{...a,platform:o})};var ewe="undefined"!=typeof document?d:s;function twe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!twe(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;0!=n--;){const r=a[n];if(("_owner"!==r||!e.$$typeof)&&!twe(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function rwe(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nwe(e,t){const r=rwe(e);return Math.round(t*r)/r}function awe(t){const r=e.useRef(t);return ewe((()=>{r.current=t})),r}function owe(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:o,elements:{reference:l,floating:i}={},transform:s=!0,whileElementsMounted:c,open:d}=t,[u,h]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[f,p]=e.useState(a);twe(f,a)||p(a);const[v,m]=e.useState(null),[y,g]=e.useState(null),b=e.useCallback((e=>{e!==M.current&&(M.current=e,m(e))}),[]),k=e.useCallback((e=>{e!==x.current&&(x.current=e,g(e))}),[]),w=l||v,_=i||y,M=e.useRef(null),x=e.useRef(null),j=e.useRef(u),E=null!=c,z=awe(c),C=awe(o),P=awe(d),A=e.useCallback((()=>{if(!M.current||!x.current)return;const e={placement:r,strategy:n,middleware:f};C.current&&(e.platform=C.current),Jke(M.current,x.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};R.current&&!twe(j.current,t)&&(j.current=t,O.flushSync((()=>{h(t)})))}))}),[f,r,n,C,P]);ewe((()=>{!1===d&&j.current.isPositioned&&(j.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const R=e.useRef(!1);ewe((()=>(R.current=!0,()=>{R.current=!1})),[]),ewe((()=>{if(w&&(M.current=w),_&&(x.current=_),w&&_){if(z.current)return z.current(w,_,A);A()}}),[w,_,A,z,E]);const L=e.useMemo((()=>({reference:M,floating:x,setReference:b,setFloating:k})),[b,k]),I=e.useMemo((()=>({reference:w,floating:_})),[w,_]),S=e.useMemo((()=>{const e={position:n,left:0,top:0};if(!I.floating)return e;const t=nwe(I.floating,u.x),r=nwe(I.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...rwe(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,I.floating,u.x,u.y]);return e.useMemo((()=>({...u,update:A,refs:L,elements:I,floatingStyles:S})),[u,A,L,I,S])}const lwe=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(a=r,{}.hasOwnProperty.call(a,"current"))?null!=r.current?Xke({element:r.current,padding:n}).fn(t):{}:r?Xke({element:r,padding:n}).fn(t):{};var a}}),iwe=(e,t)=>({...Uke(e),options:[e,t]}),swe=(e,t)=>({...$ke(e),options:[e,t]}),cwe=(e,t)=>({...Qke(e),options:[e,t]}),dwe=(e,t)=>({...Gke(e),options:[e,t]}),uwe=(e,t)=>({...Yke(e),options:[e,t]}),hwe=(e,t)=>({...Kke(e),options:[e,t]}),fwe=(e,t)=>({...lwe(e),options:[e,t]}),pwe={...e},vwe=pwe.useInsertionEffect||(e=>e());function mwe(t){const r=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return vwe((()=>{r.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return null==r.current?void 0:r.current(...t)}),[])}var ywe="undefined"!=typeof document?d:s;let gwe=!1,bwe=0;const kwe=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bwe++;const wwe=pwe.useId||function(){const[t,r]=e.useState((()=>gwe?kwe():void 0));return ywe((()=>{null==t&&r(kwe())}),[]),e.useEffect((()=>{gwe=!0}),[]),t};let _we;"production"!==process.env.NODE_ENV&&(_we=new Set);const Mwe=e.createContext(null),xwe=e.createContext(null),jwe="data-floating-ui-focusable";function Owe(t){const{open:r=!1,onOpenChange:n,elements:a}=t,o=wwe(),l=e.useRef({}),[i]=e.useState((()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach((e=>e(r)))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==r)))||[])}}}())),s=null!=((null==(c=e.useContext(Mwe))?void 0:c.id)||null);var c;if("production"!==process.env.NODE_ENV){const e=a.reference;e&&!Tbe(e)&&function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a="Floating UI: "+r.join(" ");var o;null!=(e=_we)&&e.has(a)||(null==(o=_we)||o.add(a),console.error(a))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[d,u]=e.useState(a.reference),h=mwe(((e,t,r)=>{l.current.openEvent=e?t:void 0,i.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),f=e.useMemo((()=>({setPositionReference:u})),[]),p=e.useMemo((()=>({reference:d||a.reference||null,floating:a.floating||null,domReference:a.reference})),[d,a.reference,a.floating]);return e.useMemo((()=>({dataRef:l,open:r,onOpenChange:h,elements:p,events:i,floatingId:o,refs:f})),[r,h,p,i,o,f])}function Ewe(t){void 0===t&&(t={});const{nodeId:r}=t,n=Owe({...t,elements:{reference:null,floating:null,...t.elements}}),a=t.rootContext||n,o=a.elements,[l,i]=e.useState(null),[s,c]=e.useState(null),d=(null==o?void 0:o.domReference)||l,u=e.useRef(null),h=e.useContext(xwe);ywe((()=>{d&&(u.current=d)}),[d]);const f=owe({...t,elements:{...o,...s&&{reference:s}}}),p=e.useCallback((e=>{const t=Tbe(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)}),[f.refs]),v=e.useCallback((e=>{(Tbe(e)||null===e)&&(u.current=e,i(e)),(Tbe(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Tbe(e))&&f.refs.setReference(e)}),[f.refs]),m=e.useMemo((()=>({...f.refs,setReference:v,setPositionReference:p,domReference:u})),[f.refs,v,p]),y=e.useMemo((()=>({...f.elements,domReference:d})),[f.elements,d]),g=e.useMemo((()=>({...f,...a,refs:m,elements:y,nodeId:r})),[f,m,y,r,a]);return ywe((()=>{a.dataRef.current.floatingContext=g;const e=null==h?void 0:h.nodesRef.current.find((e=>e.id===r));e&&(e.context=g)})),e.useMemo((()=>({...f,context:g,refs:m,elements:y})),[f,m,y,g])}const zwe="active",Cwe="selected";function Pwe(e,t,r){const n=new Map,a="item"===r;let o=e;if(a&&e){const{[zwe]:t,[Cwe]:r,...n}=e;o=n}return{..."floating"===r&&{tabIndex:-1,[jwe]:""},...o,...t.map((t=>{const n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[r,o]=t;var l;a&&[zwe,Cwe].includes(r)||(0===r.indexOf("on")?(n.has(r)||n.set(r,[]),"function"==typeof o&&(null==(l=n.get(r))||l.push(o),e[r]=function(){for(var e,t=arguments.length,a=new Array(t),o=0;o<t;o++)a[o]=arguments[o];return null==(e=n.get(r))?void 0:e.map((e=>e(...a))).find((e=>void 0!==e))})):e[r]=o)})),e):e),{})}}function Awe(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Rwe=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:a,offset:o=0,index:l=0,minItemsVisible:i=4,referenceOverflowThreshold:s=0,scrollRef:c,...d}=pke(e,t),{rects:u,elements:{floating:h}}=t,f=r.current[l],p=(null==c?void 0:c.current)||h,v=h.clientTop||p.clientTop,m=0!==h.clientTop,y=0!==p.clientTop,g=h===p;if("production"!==process.env.NODE_ENV&&(t.placement.startsWith("bottom")||function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a="Floating UI: "+r.join(" ");var o;null!=(e=_we)&&e.has(a)||(null==(o=_we)||o.add(a),console.warn(a))}('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const b={...t,...await iwe(-f.offsetTop-h.clientTop-u.reference.height/2-f.offsetHeight/2-o).fn(t)},k=await Wke(Awe(b,p.scrollHeight+v+h.clientTop),d),w=await Wke(b,{...d,elementContext:"reference"}),_=ike(0,k.top),M=b.y+_,x=p.scrollHeight>p.clientHeight?e=>e:ske,j=x(ike(0,p.scrollHeight+(m&&g||y?2*v:0)-_-ike(0,k.bottom)));if(p.style.maxHeight=j+"px",p.scrollTop=_,a){const e=p.offsetHeight<f.offsetHeight*lke(i,r.current.length)-1||w.top>=-s||w.bottom>=-s;O.flushSync((()=>a(e)))}return n&&(n.current=await Wke(Awe({...b,y:M},p.offsetHeight+v+h.clientTop),d)),{y:M}}});function Lwe(t,r){const{open:n,elements:a}=t,{enabled:o=!0,overflowRef:l,scrollRef:i,onChange:s}=r,c=mwe(s),d=e.useRef(!1),u=e.useRef(null),h=e.useRef(null);e.useEffect((()=>{if(!o)return;function e(e){if(e.ctrlKey||!t||null==l.current)return;const r=e.deltaY,n=l.current.top>=-.5,a=l.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,i=r<0?-1:1,s=r<0?"max":"min";t.scrollHeight<=t.clientHeight||(!n&&r>0||!a&&r<0?(e.preventDefault(),O.flushSync((()=>{c((e=>e+Math[s](r,o*i)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:r}=e;return t+"/"+r})).join(" "):navigator.userAgent}())&&(t.scrollTop+=r))}const t=(null==i?void 0:i.current)||a.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{u.current=t.scrollTop,null!=l.current&&(h.current={...l.current})})),()=>{u.current=null,h.current=null,t.removeEventListener("wheel",e)}):void 0}),[o,n,a.floating,l,i,c]);const f=e.useMemo((()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const e=(null==i?void 0:i.current)||a.floating;if(l.current&&e&&d.current){if(null!==u.current){const t=e.scrollTop-u.current;(l.current.bottom<-.5&&t<-1||l.current.top<-.5&&t>1)&&O.flushSync((()=>c((e=>e+t))))}requestAnimationFrame((()=>{u.current=e.scrollTop}))}}})),[a.floating,c,l,i]);return e.useMemo((()=>o?{floating:f}:{}),[o,f])}let Iwe=u({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Iwe.displayName="FloatingContext";let Swe=u(null);Swe.displayName="PlacementContext";function Vwe({children:t,enabled:r=!0}){let[a,o]=i(null),[s,c]=i(0),d=n(null),[u,h]=i(null);!function(e){tge((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,r=parseFloat(t);if(isNaN(r))return;let n=parseInt(t);isNaN(n)||r!==n&&(e.style.maxHeight=`${Math.ceil(r)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(u);let f=r&&null!==a&&null!==u,{to:p="bottom",gap:v=0,offset:m=0,padding:y=0,inner:g}=function(e,t){var r,n,a;let o=Hwe(null!=(r=null==e?void 0:e.gap)?r:"var(--anchor-gap, 0)",t),l=Hwe(null!=(n=null==e?void 0:e.offset)?n:"var(--anchor-offset, 0)",t),i=Hwe(null!=(a=null==e?void 0:e.padding)?a:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:l,padding:i}}(a,u),[b,k="center"]=p.split(" ");tge((()=>{f&&c(0)}),[f]);let{refs:w,floatingStyles:_,context:M}=Ewe({open:f,placement:"selection"===b?"center"===k?"bottom":`bottom-${k}`:"center"===k?`${b}`:`${b}-${k}`,strategy:"absolute",transform:!1,middleware:[iwe({mainAxis:"selection"===b?0:v,crossAxis:m}),swe({padding:y}),"selection"!==b&&dwe({padding:y}),"selection"===b&&g?Rwe({...g,padding:y,overflowRef:d,offset:s,minItemsVisible:4,referenceOverflowThreshold:y,onFallbackChange(e){var t,r;if(!e)return;let n=M.elements.floating;if(!n)return;let a=parseFloat(getComputedStyle(n).scrollPaddingBottom)||0,o=Math.min(4,n.childElementCount),l=0,i=0;for(let e of null!=(r=null==(t=M.elements.floating)?void 0:t.childNodes)?r:[])if(e instanceof HTMLElement){let t=e.offsetTop,r=t+e.clientHeight+a,s=n.scrollTop,c=s+n.clientHeight;if(!(t>=s&&r<=c)){i=Math.max(0,Math.min(r,c)-Math.max(t,s)),l=e.clientHeight;break}o--}o>=1&&c((e=>{let t=l*o-i+a;return e>=t?e:t}))}}):null,uwe({padding:y,apply({availableWidth:e,availableHeight:t,elements:r}){Object.assign(r.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Tke}),[x=b,j=k]=M.placement.split("-");"selection"===b&&(x="selection");let O=l((()=>({anchor:[x,j].filter(Boolean).join(" ")})),[x,j]),E=Lwe(M,{overflowRef:d,onChange:c}),{getReferenceProps:z,getFloatingProps:C}=function(t){void 0===t&&(t=[]);const r=t.map((e=>null==e?void 0:e.reference)),n=t.map((e=>null==e?void 0:e.floating)),a=t.map((e=>null==e?void 0:e.item)),o=e.useCallback((e=>Pwe(e,t,"reference")),r),l=e.useCallback((e=>Pwe(e,t,"floating")),n),i=e.useCallback((e=>Pwe(e,t,"item")),a);return e.useMemo((()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:i})),[o,l,i])}([E]),P=nge((e=>{h(e),w.setFloating(e)}));return e.createElement(Swe.Provider,{value:o},e.createElement(Iwe.Provider,{value:{setFloating:P,setReference:w.setReference,styles:_,getReferenceProps:z,getFloatingProps:C,slot:O}},t))}function Hwe(e,t,r=void 0){let n=ege(),a=nge(((e,t)=>{if(null==e)return[r,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[r,null];let a=Nwe(e,t);return[a,r=>{let o=Zwe(e);{let l=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));n.requestAnimationFrame((function i(){n.nextFrame(i);let s=!1;for(let[e,r]of o.entries()){let n=window.getComputedStyle(t).getPropertyValue(r);if(l[e]!==n){l[e]=n,s=!0;break}}if(!s)return;let c=Nwe(e,t);a!==c&&(r(c),a=c)}))}return n.dispose}]}return[r,null]})),o=l((()=>a(e,t)[0]),[e,t]),[s=o,c]=i();return tge((()=>{let[r,n]=a(e,t);if(c(r),n)return n(c)}),[e,t]),s}function Zwe(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let r=t[1].slice(0,e).trim(),n=t[1].slice(e+1).trim();return n?[r,...Zwe(n)]:[r]}return[]}function Nwe(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function Dwe({children:e,freeze:r}){let n=qwe(r,e);return t.createElement(t.Fragment,null,n)}function qwe(e,t){let[r,n]=i(t);return!e&&r!==t&&n(t),e?r:t}let Bwe=u(null);Bwe.displayName="OpenClosedContext";var Fwe=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Fwe||{});function Twe({value:e,children:r}){return t.createElement(Bwe.Provider,{value:e},r)}let Wwe=[];!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}((()=>{function e(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Wwe[0]===e.target)return;let t=e.target;t=t.closest(vbe),Wwe.unshift(null!=t?t:e.target),Wwe=Wwe.filter((e=>null!=e&&e.isConnected)),Wwe.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})}));var Uwe=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Uwe||{});function $we(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),a=null!=n?n:-1;switch(e.focus){case 0:for(let e=0;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 1:-1===a&&(a=r.length);for(let e=a-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 2:for(let e=a+1;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 3:for(let e=r.length-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 4:for(let n=0;n<r.length;++n)if(t.resolveId(r[n],n,r)===e.id)return n;return n;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}var Gwe=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Gwe||{});function Ywe(){let t=function(){let t="undefined"==typeof document;return"useSyncExternalStore"in e&&e.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!t))}(),[r,n]=e.useState(Kye.isHandoffComplete);return r&&!1===Kye.isHandoffComplete&&n(!1),e.useEffect((()=>{!0!==r&&n(!0)}),[r]),e.useEffect((()=>Kye.handoff()),[]),!t&&r}let Kwe=u(!1);function Xwe(){return h(Kwe)}function Qwe(e){let t=Xwe(),r=h(r_e),n=jbe(e),[a,o]=i((()=>{var e;if(!t&&null!==r)return null!=(e=r.current)?e:null;if(Kye.isServer)return null;let a=null==n?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(null===n)return null;let o=n.createElement("div");return o.setAttribute("id","headlessui-portal-root"),n.body.appendChild(o)}));return s((()=>{null!==a&&(null!=n&&n.body.contains(a)||null==n||n.body.appendChild(a))}),[a,n]),s((()=>{t||null!==r&&o(r.current)}),[r,o,t]),a}let Jwe=f,e_e=vge((function(e,t){let r=e,a=n(null),o=Rge(function(e,t=!0){return Object.assign(e,{[Age]:t})}((e=>{a.current=e})),t),l=jbe(a),c=Qwe(a),[d]=i((()=>{var e;return Kye.isServer?null:null!=(e=null==l?void 0:l.createElement("div"))?e:null})),u=h(n_e),f=Ywe();tge((()=>{!c||!d||c.contains(d)||(d.setAttribute("data-headlessui-portal",""),c.appendChild(d))}),[c,d]),tge((()=>{if(d&&u)return u.register(d)}),[u,d]),function(e){let t=nge(e),r=n(!1);s((()=>(r.current=!1,()=>{r.current=!0,Qye((()=>{r.current&&t()}))})),[t])}((()=>{var e;!c||!d||(d instanceof Node&&c.contains(d)&&c.removeChild(d),c.childNodes.length<=0&&(null==(e=c.parentElement)||e.removeChild(c)))}));let p=dge();return f&&c&&d?z(p({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:Jwe,name:"Portal"}),d):null}));let t_e=f,r_e=u(null);let n_e=u(null),a_e=vge((function(e,r){let n=Rge(r),{enabled:a=!0,...o}=e,l=dge();return a?t.createElement(e_e,{...o,ref:n}):l({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:Jwe,name:"Portal"})})),o_e=vge((function(e,r){let{target:n,...a}=e,o={ref:Rge(r)},l=dge();return t.createElement(r_e.Provider,{value:n},l({ourProps:o,theirProps:a,defaultTag:t_e,name:"Popover.Group"}))})),l_e=Object.assign(a_e,{Group:o_e});var i_e=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(i_e||{}),s_e=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(s_e||{}),c_e=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(c_e||{}),d_e=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.SetTyping=3]="SetTyping",e[e.RegisterOption=4]="RegisterOption",e[e.UnregisterOption=5]="UnregisterOption",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",e[e.SetInputElement=8]="SetInputElement",e[e.SetButtonElement=9]="SetButtonElement",e[e.SetOptionsElement=10]="SetOptionsElement",e))(d_e||{});function u_e(e,t=e=>e){let r=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=t(e.options.slice()),a=n.length>0&&null!==n[0].dataRef.current.order?n.sort(((e,t)=>e.dataRef.current.order-t.dataRef.current.order)):function(e,t=e=>e){return e.slice().sort(((e,r)=>{let n=t(e),a=t(r);if(null===n||null===a)return 0;let o=n.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(n,(e=>e.dataRef.current.domRef.current)),o=r?a.indexOf(r):null;return-1===o&&(o=null),{options:a,activeOptionIndex:o}}let h_e={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,r;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(r=e.dataRef.current)&&r.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var r,n,a,o;if(null!=(r=e.dataRef.current)&&r.disabled||e.optionsElement&&(null==(n=e.dataRef.current)||!n.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:r,disabled:n}=e.virtual,o=t.focus===Uwe.Specific?t.idx:$we(t,{resolveItems:()=>r,resolveActiveIndex:()=>{var t,a;return null!=(a=null!=(t=e.activeOptionIndex)?t:r.findIndex((e=>!n(e))))?a:null},resolveDisabled:n,resolveId(){throw new Error("Function not implemented.")}}),l=null!=(a=t.trigger)?a:2;return e.activeOptionIndex===o&&e.activationTrigger===l?e:{...e,activeOptionIndex:o,activationTrigger:l,isTyping:!1,__demoMode:!1}}let l=u_e(e);if(null===l.activeOptionIndex){let e=l.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(l.activeOptionIndex=e)}let i=t.focus===Uwe.Specific?t.idx:$we(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),s=null!=(o=t.trigger)?o:2;return e.activeOptionIndex===i&&e.activationTrigger===s?e:{...e,...l,isTyping:!1,activeOptionIndex:i,activationTrigger:s,__demoMode:!1}},4:(e,t)=>{var r,n,a;if(null!=(r=e.dataRef.current)&&r.virtual)return{...e,options:[...e.options,t.payload]};let o=t.payload,l=u_e(e,(e=>(e.push(o),e)));null===e.activeOptionIndex&&null!=(n=e.dataRef.current)&&n.isSelected(t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(o));let i={...e,...l,activationTrigger:2};return null!=(a=e.dataRef.current)&&a.__demoMode&&void 0===e.dataRef.current.value&&(i.activeOptionIndex=0),i},5:(e,t)=>{var r;if(null!=(r=e.dataRef.current)&&r.virtual)return{...e,options:e.options.filter((e=>e.id!==t.id))};let n=u_e(e,(e=>{let r=e.findIndex((e=>e.id===t.id));return-1!==r&&e.splice(r,1),e}));return{...e,...n,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var r,n;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(r=t.disabled)?r:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let a=e.activeOptionIndex;if(null!==e.activeOptionIndex){let r=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);a=-1!==r?r:null}return{...e,activeOptionIndex:a,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},f_e=u(null);function p_e(e){let t=h(f_e);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,p_e),t}return t}f_e.displayName="ComboboxActionsContext";let v_e=u(null);function m_e(e){let r=g_e("VirtualProvider"),{options:n}=r.virtual,[a,o]=l((()=>{let e=r.optionsElement;if(!e)return[0,0];let t=window.getComputedStyle(e);return[parseFloat(t.paddingBlockStart||t.paddingTop),parseFloat(t.paddingBlockEnd||t.paddingBottom)]}),[r.optionsElement]),s=rbe({enabled:0!==n.length,scrollPaddingStart:a,scrollPaddingEnd:o,count:n.length,estimateSize:()=>40,getScrollElement:()=>r.optionsElement,overscan:12}),[c,d]=i(0);tge((()=>{d((e=>e+1))}),[n]);let u=s.getVirtualItems();return 0===u.length?null:t.createElement(v_e.Provider,{value:s},t.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:e=>{e&&0!==r.activationTrigger&&null!==r.activeOptionIndex&&n.length>r.activeOptionIndex&&s.scrollToIndex(r.activeOptionIndex)}},u.map((r=>{var a;return t.createElement(f,{key:r.key},t.cloneElement(null==(a=e.children)?void 0:a.call(e,{...e.slot,option:n[r.index]}),{key:`${c}-${r.key}`,"data-index":r.index,"aria-setsize":n.length,"aria-posinset":r.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}}))}))))}let y_e=u(null);function g_e(e){let t=h(y_e);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,g_e),t}return t}function b_e(e,t){return ige(t.type,h_e,e,t)}y_e.displayName="ComboboxDataContext";let k_e=f;let w_e=sge.RenderStrategy|sge.Static;let __e=vge((function(e,r){var o,s;let c=oge(),{value:d,defaultValue:u,onChange:h,form:f,name:p,by:v,disabled:m=c||!1,onClose:g,__demoMode:k=!1,multiple:w=!1,immediate:_=!1,virtual:M=null,nullable:x,...j}=e,O=function(e){let[t]=i(e);return t}(u),[E=(w?[]:void 0),z]=function(e,t,r){let[a,o]=i(r),l=void 0!==e,s=n(l),c=n(!1),d=n(!1);return!l||s.current||c.current?!l&&s.current&&!d.current&&(d.current=!0,s.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(c.current=!0,s.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[l?e:a,nge((e=>(l||o(e),null==t?void 0:t(e))))]}(d,h,O),[C,P]=y(b_e,{dataRef:b(),comboboxState:k?0:1,isTyping:!1,options:[],virtual:M?{options:M.options,disabled:null!=(o=M.disabled)?o:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:k}),A=n(!1),R=n({static:!1,hold:!1}),L=function(e=nbe){return a(((t,r)=>{if("string"==typeof e){let n=e;return(null==t?void 0:t[n])===(null==r?void 0:r[n])}return e(t,r)}),[e])}(v),I=nge((e=>M?null===v?M.options.indexOf(e):M.options.findIndex((t=>L(t,e))):C.options.findIndex((t=>L(t.dataRef.current.value,e))))),S=a((e=>ige(H.mode,{1:()=>E.some((t=>L(t,e))),0:()=>L(E,e)})),[E]),V=nge((e=>C.activeOptionIndex===I(e))),H=l((()=>({...C,immediate:_,optionsPropsRef:R,value:E,defaultValue:O,disabled:m,mode:w?1:0,virtual:M?C.virtual:null,get activeOptionIndex(){if(A.current&&null===C.activeOptionIndex&&(M?M.options.length>0:C.options.length>0)){if(M){let e=M.options.findIndex((e=>{var t,r;return!(null!=(r=null==(t=M.disabled)?void 0:t.call(M,e))&&r)}));if(-1!==e)return e}let e=C.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return C.activeOptionIndex},calculateIndex:I,compare:L,isSelected:S,isActive:V})),[E,O,m,w,k,C,M]);tge((()=>{var e;M&&P({type:7,options:M.options,disabled:null!=(e=M.disabled)?e:null})}),[M,null==M?void 0:M.options,null==M?void 0:M.disabled]),tge((()=>{C.dataRef.current=H}),[H]),xbe(0===H.comboboxState,[H.buttonElement,H.inputElement,H.optionsElement],(()=>K.closeCombobox()));let Z=l((()=>{var e,t,r;return{open:0===H.comboboxState,disabled:m,activeIndex:H.activeOptionIndex,activeOption:null===H.activeOptionIndex?null:H.virtual?H.virtual.options[null!=(e=H.activeOptionIndex)?e:0]:null!=(r=null==(t=H.options[H.activeOptionIndex])?void 0:t.dataRef.current.value)?r:null,value:E}}),[H,m,E]),N=nge((()=>{if(null!==H.activeOptionIndex){if(K.setIsTyping(!1),H.virtual)W(H.virtual.options[H.activeOptionIndex]);else{let{dataRef:e}=H.options[H.activeOptionIndex];W(e.current.value)}K.goToOption(Uwe.Specific,H.activeOptionIndex)}})),D=nge((()=>{P({type:0}),A.current=!0})),q=nge((()=>{P({type:1}),A.current=!1,null==g||g()})),B=nge((e=>{P({type:3,isTyping:e})})),F=nge(((e,t,r)=>(A.current=!1,e===Uwe.Specific?P({type:2,focus:Uwe.Specific,idx:t,trigger:r}):P({type:2,focus:e,trigger:r})))),T=nge(((e,t)=>(P({type:4,payload:{id:e,dataRef:t}}),()=>{H.isActive(t.current.value)&&(A.current=!0),P({type:5,id:e})}))),W=nge((e=>ige(H.mode,{0:()=>null==z?void 0:z(e),1(){let t=H.value.slice(),r=t.findIndex((t=>L(t,e)));return-1===r?t.push(e):t.splice(r,1),null==z?void 0:z(t)}}))),U=nge((e=>{P({type:6,trigger:e})})),$=nge((e=>{P({type:8,element:e})})),G=nge((e=>{P({type:9,element:e})})),Y=nge((e=>{P({type:10,element:e})})),K=l((()=>({onChange:W,registerOption:T,goToOption:F,setIsTyping:B,closeCombobox:q,openCombobox:D,setActivationTrigger:U,selectActiveOption:N,setInputElement:$,setButtonElement:G,setOptionsElement:Y})),[]),[X,Q]=function({inherit:e=!1}={}){let r=Nge(),[n,a]=i([]),o=e?[r,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,l((()=>function(e){let r=nge((e=>(a((t=>[...t,e])),()=>a((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),n=l((()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value})),[r,e.slot,e.name,e.props,e.value]);return t.createElement(Hge.Provider,{value:n},e.children)}),[a])]}(),J=null===r?{}:{ref:r},ee=a((()=>{if(void 0!==O)return null==z?void 0:z(O)}),[z,O]),te=dge();return t.createElement(Q,{value:X,props:{htmlFor:null==(s=H.inputElement)?void 0:s.id},slot:{open:0===H.comboboxState,disabled:m}},t.createElement(Vwe,null,t.createElement(f_e.Provider,{value:K},t.createElement(y_e.Provider,{value:H},t.createElement(Twe,{value:ige(H.comboboxState,{0:Fwe.Open,1:Fwe.Closed})},null!=p&&t.createElement(Oge,{disabled:m,data:null!=E?{[p]:E}:{},form:f,onReset:ee}),te({ourProps:J,theirProps:j,slot:Z,defaultTag:k_e,name:"Combobox"}))))))})),M_e=vge((function(e,t){var r;let a=g_e("Combobox.Button"),o=p_e("Combobox.Button"),s=Rge(t,o.setButtonElement),c=m(),{id:d=`headlessui-combobox-button-${c}`,disabled:u=a.disabled||!1,autoFocus:h=!1,...f}=e,p=Obe(a.inputElement),v=nge((e=>{switch(e.key){case Vge.Space:case Vge.Enter:return e.preventDefault(),e.stopPropagation(),1===a.comboboxState&&C((()=>o.openCombobox())),void p();case Vge.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===a.comboboxState&&(C((()=>o.openCombobox())),a.value||o.goToOption(Uwe.First)),void p();case Vge.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===a.comboboxState&&(C((()=>o.openCombobox())),a.value||o.goToOption(Uwe.Last)),void p();case Vge.Escape:if(0!==a.comboboxState)return;return e.preventDefault(),a.optionsElement&&!a.optionsPropsRef.current.static&&e.stopPropagation(),C((()=>o.closeCombobox())),void p();default:return}})),y=nge((e=>{e.preventDefault(),!Pge(e.currentTarget)&&(e.button===Gwe.Left&&(0===a.comboboxState?o.closeCombobox():o.openCombobox()),p())})),g=Nge([d]),{isFocusVisible:b,focusProps:k}=$ye({autoFocus:h}),{isHovered:w,hoverProps:_}=Uye({isDisabled:u}),{pressed:M,pressProps:x}=function({disabled:e=!1}={}){let t=n(null),[r,a]=i(!1),o=ege(),l=nge((()=>{t.current=null,a(!1),o.dispose()})),s=nge((e=>{if(o.dispose(),null===t.current){t.current=e.currentTarget,a(!0);{let r=Xye(e.currentTarget);o.addEventListener(r,"pointerup",l,!1),o.addEventListener(r,"pointermove",(e=>{if(t.current){let r=function(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}(e);a(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(r,t.current.getBoundingClientRect()))}}),!1),o.addEventListener(r,"pointercancel",l,!1)}}}));return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:l,onClick:l}}}({disabled:u}),j=l((()=>({open:0===a.comboboxState,active:M||0===a.comboboxState,disabled:u,value:a.value,hover:w,focus:b})),[a,w,b,M,u]),O=pge({ref:s,id:d,type:Ebe(e,a.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(r=a.optionsElement)?void 0:r.id,"aria-expanded":0===a.comboboxState,"aria-labelledby":g,disabled:u||void 0,autoFocus:h,onMouseDown:y,onKeyDown:v},k,_,x);return dge()({ourProps:O,theirProps:f,slot:j,defaultTag:"button",name:"Combobox.Button"})})),x_e=vge((function(e,t){var r,a,o,i,s;let c=g_e("Combobox.Input"),d=p_e("Combobox.Input"),u=m(),f=Cge(),{id:p=f||`headlessui-combobox-input-${u}`,onChange:v,displayValue:y,disabled:g=c.disabled||!1,autoFocus:b=!1,type:k="text",...w}=e,_=n(null),M=Rge(_,t,h(Iwe).setReference,d.setInputElement),x=jbe(c.inputElement),j=ege(),O=nge((()=>{d.onChange(null),c.optionsElement&&(c.optionsElement.scrollTop=0),d.goToOption(Uwe.Nothing)})),E=l((()=>{var e;return"function"==typeof y&&void 0!==c.value?null!=(e=y(c.value))?e:"":"string"==typeof c.value?c.value:""}),[c.value,y]);Zbe((([e,t],[r,n])=>{if(c.isTyping)return;let a=_.current;a&&((0===n&&1===t||e!==r)&&(a.value=e),requestAnimationFrame((()=>{if(c.isTyping||!a||(null==x?void 0:x.activeElement)!==a)return;let{selectionStart:e,selectionEnd:t}=a;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&a.setSelectionRange(a.value.length,a.value.length)})))}),[E,c.comboboxState,x,c.isTyping]),Zbe((([e],[t])=>{if(0===e&&1===t){if(c.isTyping)return;let e=_.current;if(!e)return;let t=e.value,{selectionStart:r,selectionEnd:n,selectionDirection:a}=e;e.value="",e.value=t,null!==a?e.setSelectionRange(r,n,a):e.setSelectionRange(r,n)}}),[c.comboboxState]);let z=n(!1),P=nge((()=>{z.current=!0})),A=nge((()=>{j.nextFrame((()=>{z.current=!1}))})),R=nge((e=>{switch(d.setIsTyping(!0),e.key){case Vge.Enter:if(0!==c.comboboxState||z.current)return;if(e.preventDefault(),e.stopPropagation(),null===c.activeOptionIndex)return void d.closeCombobox();d.selectActiveOption(),0===c.mode&&d.closeCombobox();break;case Vge.ArrowDown:return e.preventDefault(),e.stopPropagation(),ige(c.comboboxState,{0:()=>d.goToOption(Uwe.Next),1:()=>d.openCombobox()});case Vge.ArrowUp:return e.preventDefault(),e.stopPropagation(),ige(c.comboboxState,{0:()=>d.goToOption(Uwe.Previous),1:()=>{C((()=>d.openCombobox())),c.value||d.goToOption(Uwe.Last)}});case Vge.Home:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),d.goToOption(Uwe.First);case Vge.PageUp:return e.preventDefault(),e.stopPropagation(),d.goToOption(Uwe.First);case Vge.End:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),d.goToOption(Uwe.Last);case Vge.PageDown:return e.preventDefault(),e.stopPropagation(),d.goToOption(Uwe.Last);case Vge.Escape:return 0!==c.comboboxState?void 0:(e.preventDefault(),c.optionsElement&&!c.optionsPropsRef.current.static&&e.stopPropagation(),0===c.mode&&null===c.value&&O(),d.closeCombobox());case Vge.Tab:if(0!==c.comboboxState)return;0===c.mode&&1!==c.activationTrigger&&d.selectActiveOption(),d.closeCombobox()}})),L=nge((e=>{null==v||v(e),0===c.mode&&""===e.target.value&&O(),d.openCombobox()})),I=nge((e=>{var t,r,n;let a=null!=(t=e.relatedTarget)?t:Wwe.find((t=>t!==e.currentTarget));if(!(null!=(r=c.optionsElement)&&r.contains(a)||null!=(n=c.buttonElement)&&n.contains(a)||0!==c.comboboxState))return e.preventDefault(),0===c.mode&&null===c.value&&O(),d.closeCombobox()})),S=nge((e=>{var t,r,n;let a=null!=(t=e.relatedTarget)?t:Wwe.find((t=>t!==e.currentTarget));null!=(r=c.buttonElement)&&r.contains(a)||null!=(n=c.optionsElement)&&n.contains(a)||c.disabled||c.immediate&&0!==c.comboboxState&&j.microTask((()=>{C((()=>d.openCombobox())),d.setActivationTrigger(1)}))})),V=Nge(),H=function(){var e,t;return null!=(t=null==(e=h(Lge))?void 0:e.value)?t:void 0}(),{isFocused:Z,focusProps:N}=$ye({autoFocus:b}),{isHovered:D,hoverProps:q}=Uye({isDisabled:g}),B=l((()=>({open:0===c.comboboxState,disabled:g,hover:D,focus:Z,autofocus:b})),[c,D,Z,b,g]),F=pge({ref:M,id:p,role:"combobox",type:k,"aria-controls":null==(r=c.optionsElement)?void 0:r.id,"aria-expanded":0===c.comboboxState,"aria-activedescendant":null===c.activeOptionIndex?void 0:c.virtual?null==(a=c.options.find((e=>!e.dataRef.current.disabled&&c.compare(e.dataRef.current.value,c.virtual.options[c.activeOptionIndex]))))?void 0:a.id:null==(o=c.options[c.activeOptionIndex])?void 0:o.id,"aria-labelledby":V,"aria-describedby":H,"aria-autocomplete":"list",defaultValue:null!=(s=null!=(i=e.defaultValue)?i:void 0!==c.defaultValue?null==y?void 0:y(c.defaultValue):null)?s:c.defaultValue,disabled:g||void 0,autoFocus:b,onCompositionStart:P,onCompositionEnd:A,onKeyDown:R,onChange:L,onFocus:S,onBlur:I},N,q);return dge()({ourProps:F,theirProps:w,slot:B,defaultTag:"input",name:"Combobox.Input"})})),j_e=qge,O_e=vge((function(e,r){var o,c,d;let u=m(),{id:f=`headlessui-combobox-options-${u}`,hold:p=!1,anchor:v,portal:y=!1,modal:g=!0,transition:b=!1,...k}=e,w=g_e("Combobox.Options"),_=p_e("Combobox.Options"),M=function(e){return l((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(v);M&&(y=!0);let[x,j]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=h(Swe),r=l((()=>e),[JSON.stringify(e,((e,t)=>{var r;return null!=(r=null==t?void 0:t.outerHTML)?r:t}))]);tge((()=>{null==t||t(null!=r?r:null)}),[t,r]);let n=h(Iwe);return l((()=>[n.setFloating,e?n.styles:{}]),[n.setFloating,e,n.styles])}(M),[O,E]=i(null),z=function(){let{getFloatingProps:e,slot:t}=h(Iwe);return a(((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor})),[e,t])}(),C=Rge(r,M?x:null,_.setOptionsElement,E),P=jbe(w.optionsElement),A=h(Bwe),[R,L]=Hbe(b,O,null!==A?(A&Fwe.Open)===Fwe.Open:0===w.comboboxState);!function(e,t,r){let n=rge((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&r()}));s((()=>{if(!e)return;let r=null===t?null:t instanceof HTMLElement?t:t.current;if(!r)return;let a=Jye();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>n.current(r)));e.observe(r),a.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>n.current(r)));e.observe(r),a.add((()=>e.disconnect()))}return()=>a.dispose()}),[t,n,e])}(R,w.inputElement,_.closeCombobox),Abe(!w.__demoMode&&(g&&0===w.comboboxState),P),pbe(!w.__demoMode&&(g&&0===w.comboboxState),{allowed:a((()=>[w.inputElement,w.buttonElement,w.optionsElement]),[w.inputElement,w.buttonElement,w.optionsElement])}),tge((()=>{var t;w.optionsPropsRef.current.static=null!=(t=e.static)&&t}),[w.optionsPropsRef,e.static]),tge((()=>{w.optionsPropsRef.current.hold=p}),[w.optionsPropsRef,p]),function(e,{container:t,accept:r,walk:a}){let o=n(r),l=n(a);s((()=>{o.current=r,l.current=a}),[r,a]),tge((()=>{if(!t||!e)return;let r=Xye(t);if(!r)return;let n=o.current,a=l.current,i=Object.assign((e=>n(e)),{acceptNode:n}),s=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,i,!1);for(;s.nextNode();)a(s.currentNode)}),[t,e,o,l])}(0===w.comboboxState,{container:w.optionsElement,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let I=Nge([null==(o=w.buttonElement)?void 0:o.id]),S=l((()=>({open:0===w.comboboxState,option:void 0})),[w.comboboxState]),V=nge((()=>{_.setActivationTrigger(0)})),H=nge((e=>{e.preventDefault(),_.setActivationTrigger(0)})),Z=pge(M?z():{},{"aria-labelledby":I,role:"listbox","aria-multiselectable":1===w.mode||void 0,id:f,ref:C,style:{...k.style,...j,"--input-width":abe(w.inputElement,!0).width,"--button-width":abe(w.buttonElement,!0).width},onWheel:0===w.activationTrigger?void 0:V,onMouseDown:H,...Vbe(L)}),N=R&&1===w.comboboxState,D=qwe(N,null==(c=w.virtual)?void 0:c.options),q=qwe(N,w.value),B=nge((e=>w.compare(q,e)));if(w.virtual){if(void 0===D)throw new Error("Missing `options` in virtual mode");Object.assign(k,{children:t.createElement(y_e.Provider,{value:D!==w.virtual.options?{...w,virtual:{...w.virtual,options:D}}:w},t.createElement(m_e,{slot:S},k.children))})}let F=dge();return t.createElement(l_e,{enabled:!!y&&(e.static||R)},t.createElement(y_e.Provider,{value:1===w.mode?w:{...w,isSelected:B}},F({ourProps:Z,theirProps:{...k,children:t.createElement(Dwe,{freeze:N},"function"==typeof k.children?null==(d=k.children)?void 0:d.call(k,S):k.children)},slot:S,defaultTag:"div",features:w_e,visible:R,name:"Combobox.Options"})))})),E_e=vge((function(e,t){var r,a,o,i;let s=g_e("Combobox.Option"),c=p_e("Combobox.Option"),d=m(),{id:u=`headlessui-combobox-option-${d}`,value:f,disabled:p=null!=(o=null==(a=null==(r=s.virtual)?void 0:r.disabled)?void 0:a.call(r,f))&&o,order:v=null,...y}=e,g=Obe(s.inputElement),b=s.virtual?s.activeOptionIndex===s.calculateIndex(f):null!==s.activeOptionIndex&&(null==(i=s.options[s.activeOptionIndex])?void 0:i.id)===u,k=s.isSelected(f),w=n(null),_=rge({disabled:p,value:f,domRef:w,order:v}),M=h(v_e),x=Rge(t,w,M?M.measureElement:null),j=nge((()=>{c.setIsTyping(!1),c.onChange(f)}));tge((()=>c.registerOption(u,_)),[_,u]);let O=n(!(s.virtual||s.__demoMode));tge((()=>{if(!s.virtual&&!s.__demoMode)return Jye().requestAnimationFrame((()=>{O.current=!0}))}),[s.virtual,s.__demoMode]),tge((()=>{if(O.current&&0===s.comboboxState&&b&&0!==s.activationTrigger)return Jye().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=w.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[w,b,s.comboboxState,s.activationTrigger,s.activeOptionIndex]);let E=nge((e=>{e.preventDefault(),e.button===Gwe.Left&&(p||(j(),_be()||requestAnimationFrame((()=>g())),0===s.mode&&c.closeCombobox()))})),z=nge((()=>{if(p)return c.goToOption(Uwe.Nothing);let e=s.calculateIndex(f);c.goToOption(Uwe.Specific,e)})),C=function(){let e=n([-1,-1]);return{wasMoved(t){let r=Rbe(t);return(e.current[0]!==r[0]||e.current[1]!==r[1])&&(e.current=r,!0)},update(t){e.current=Rbe(t)}}}(),P=nge((e=>C.update(e))),A=nge((e=>{if(!C.wasMoved(e)||p||b)return;let t=s.calculateIndex(f);c.goToOption(Uwe.Specific,t,0)})),R=nge((e=>{C.wasMoved(e)&&(p||b&&(s.optionsPropsRef.current.hold||c.goToOption(Uwe.Nothing)))})),L=l((()=>({active:b,focus:b,selected:k,disabled:p})),[b,k,p]),I={id:u,ref:x,role:"option",tabIndex:!0===p?void 0:-1,"aria-disabled":!0===p||void 0,"aria-selected":k,disabled:void 0,onMouseDown:E,onFocus:z,onPointerEnter:P,onMouseEnter:P,onPointerMove:A,onMouseMove:A,onPointerLeave:R,onMouseLeave:R};return dge()({ourProps:I,theirProps:y,slot:L,defaultTag:"div",name:"Combobox.Option"})})),z_e=Object.assign(__e,{Input:x_e,Button:M_e,Label:j_e,Options:O_e,Option:E_e});x(["absolute inset-y-0 right-0 flex items-center justify-center"],{variants:{size:{sm:"mr-2",md:"mr-3",lg:"mr-4"}},defaultVariants:{size:"md"}});const C_e=x(["transition-all"],{variants:{disabled:{true:"fill-input-text-disabled",false:"fill-inherit"},isFocus:{true:"fill-input-text-active rotate-180",false:""}},defaultVariants:{disabled:!1,isFocus:!1}}),P_e=x([],{variants:{size:{sm:"pe-[30px]",md:"pe-[40px]",lg:"pe-[68px]"}},defaultVariants:{size:"md"}}),A_e=PM("relative flex gap-1 cursor-pointer select-none box-border items-center py-4 pl-4 pr-8 typography-subtitle4 outline-none transition-colors","bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]","active:opacity-75","hover:bg-[var(--dropdown-menu-hover-bg)] hover:text-[var(--dropdown-menu-hover-text)]"),R_e=r(((e,t)=>{var{id:r,options:o=[],value:d,label:u,size:h="md",rounded:p="normal",variant:v="outline",helperText:m,errorMessage:y,fullwidth:g=!0,disabled:b=!1,error:k=!1,filterMode:x=!1,required:j=!0,modal:O,onChangeText:E,onSelect:z,renderOptions:C,optionContainerClassName:P,optionItemClassName:A,optionNotFoundItemClassName:R,segmentedInput:L=!0}=e,I=EM(e,["id","options","value","label","size","rounded","variant","helperText","errorMessage","fullwidth","disabled","error","filterMode","required","modal","onChangeText","onSelect","renderOptions","optionContainerClassName","optionItemClassName","optionNotFoundItemClassName","segmentedInput"]);const S=r||`${u}-select`,[V,H]=i(null),[Z,N]=i(""),D=n(null);c(t,(()=>D.current),[]),s((()=>{H(null!=d?d:null)}),[d]);const q=l((()=>x&&Z?o.filter((e=>e.label.toLowerCase().includes(Z.toLowerCase()))):o),[o,x,Z]),B=a((e=>{H(e),N(""),e&&(null==z||z(e),setTimeout((()=>{var e;return null===(e=D.current)||void 0===e?void 0:e.blur()}),0))}),[z]),F=a((e=>{x&&N(e.target.value),null==E||E(e)}),[x,E]);return w(z_e,{value:V,onChange:B,immediate:!0,by:"value",disabled:b,children:({open:e})=>_("div",{className:PM("relative",g&&"w-full"),children:[w(x_e,Object.assign({as:$me,ref:D,hasClearIcon:!1,endIcon:w(In,{className:C_e({isFocus:e})}),label:u,placeholder:" ",autoComplete:"off",rounded:p,variant:v,helperText:m,errorMessage:y,fullwidth:g,error:k,required:j,id:S,disabled:b,size:h,className:L?P_e({size:h}):void 0,displayValue:e=>{var t;return null!==(t=null==e?void 0:e.label)&&void 0!==t?t:""},readOnly:!x,onChange:F},I)),w(O_e,{className:PM("absolute top-full left-0 w-full -mt-3 z-[51]","min-w-[154px] max-h-60 overflow-y-auto","rounded-md bg-modal-dropdown-surface border border-bg-stroke3 text-text-g-contrast-high",P),style:{boxShadow:"var(--dropdown-menu-shadow)"},children:C?C({optionsFiltered:q,selectedOption:V,onClick:B}):0===q.length?w("div",{className:PM("px-4 py-14 text-center text-input-text",R),children:"Not found"}):q.map((e=>e.renderLabel?w(f,{children:e.renderLabel({value:e.value,label:e.label,handleOnClick:()=>B(e),className:PM(A_e,(null==V?void 0:V.value)===e.value&&"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)]",A)})},e.value):w(E_e,{value:e,className:({focus:t,selected:r})=>PM(A_e,(r||(null==V?void 0:V.value)===e.value)&&"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)]",t&&"bg-[var(--dropdown-menu-hover-bg)] text-[var(--dropdown-menu-hover-text)]",A),children:({selected:t})=>_(M,{children:[w("span",{className:"shrink-0 size-4 flex items-center justify-center",children:(t||(null==V?void 0:V.value)===e.value)&&w(tye,{type:"heroicons",name:"check",className:"size-4 text-[var(--dropdown-menu-selected-text)]"})}),e.label]})},e.value)))})]})})}));function L_e(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function I_e(...t){return e.useCallback(L_e(...t),t)}function S_e(t,r=[]){let n=[];const a=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const a=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:a}})),[n,a])}};return a.scopeName=t,[function(r,a){const o=e.createContext(a),l=n.length;n=[...n,a];const i=r=>{const{scope:n,children:a,...i}=r,s=n?.[t]?.[l]||o,c=e.useMemo((()=>i),Object.values(i));return w(s.Provider,{value:c,children:a})};return i.displayName=r+"Provider",[i,function(n,i){const s=i?.[t]?.[l]||o,c=e.useContext(s);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},V_e(a,...r)]}function V_e(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const a=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:a})),[a])}};return n.scopeName=r.scopeName,n}function H_e(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Z_e(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>r.current?.(...e)),[])}function N_e({prop:t,defaultProp:r,onChange:n=()=>{}}){const[a,o]=function({defaultProp:t,onChange:r}){const n=e.useState(t),[a]=n,o=e.useRef(a),l=Z_e(r);return e.useEffect((()=>{o.current!==a&&(l(a),o.current=a)}),[a,o,l]),n}({defaultProp:r,onChange:n}),l=void 0!==t,i=l?t:a,s=Z_e(n);return[i,e.useCallback((e=>{if(l){const r="function"==typeof e?e(t):e;r!==t&&s(r)}else o(e)}),[l,t,o,s])]}function D_e(t){const r=e.useRef({value:t,previous:t});return e.useMemo((()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous)),[t])}R_e.displayName="Dropdown";var q_e=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{};function B_e(t){const[r,n]=e.useState(void 0);return q_e((()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=t.offsetWidth,o=t.offsetHeight;n({width:a,height:o})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)}),[t]),r}var F_e=t=>{const{present:r,children:n}=t,a=function(t){const[r,n]=e.useState(),a=e.useRef({}),o=e.useRef(t),l=e.useRef("none"),i=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=T_e(a.current);l.current="mounted"===s?e:"none"}),[s]),q_e((()=>{const e=a.current,r=o.current;if(r!==t){const n=l.current,a=T_e(e);if(t)c("MOUNT");else if("none"===a||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=t}}),[t,c]),q_e((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const l=T_e(a.current).includes(n.animationName);if(n.target===r&&l&&(c("ANIMATION_END"),!o.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},i=e=>{e.target===r&&(l.current=T_e(a.current))};return r.addEventListener("animationstart",i),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",i),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(a.current=getComputedStyle(e)),n(e)}),[])}}(r),o="function"==typeof n?n({present:a.isPresent}):e.Children.only(n),l=I_e(a.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||a.isPresent?e.cloneElement(o,{ref:l}):null};function T_e(e){return e?.animationName||"none"}F_e.displayName="Presence";var W_e=e.forwardRef(((t,r)=>{const{children:n,...a}=t,o=e.Children.toArray(n),l=o.find(G_e);if(l){const t=l.props.children,n=o.map((r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return w(U_e,{...a,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return w(U_e,{...a,ref:r,children:n})}));W_e.displayName="Slot";var U_e=e.forwardRef(((t,r)=>{const{children:n,...a}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n);return e.cloneElement(n,{...Y_e(a,n.props),ref:r?L_e(r,t):t})}return e.Children.count(n)>1?e.Children.only(null):null}));U_e.displayName="SlotClone";var $_e=({children:e})=>w(M,{children:e});function G_e(t){return e.isValidElement(t)&&t.type===$_e}function Y_e(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{o(...e),a(...e)}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}var K_e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...a}=e,o=n?W_e:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),w(o,{...a,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{}),X_e="Checkbox",[Q_e,J_e]=S_e(X_e),[eMe,tMe]=Q_e(X_e),rMe=e.forwardRef(((t,r)=>{const{__scopeCheckbox:n,name:a,checked:o,defaultChecked:l,required:i,disabled:s,value:c="on",onCheckedChange:d,form:u,...h}=t,[f,p]=e.useState(null),v=I_e(r,(e=>p(e))),m=e.useRef(!1),y=!f||(u||!!f.closest("form")),[g=!1,b]=N_e({prop:o,defaultProp:l,onChange:d}),k=e.useRef(g);return e.useEffect((()=>{const e=f?.form;if(e){const t=()=>b(k.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,b]),_(eMe,{scope:n,state:g,disabled:s,children:[w(K_e.button,{type:"button",role:"checkbox","aria-checked":lMe(g)?"mixed":g,"aria-required":i,"data-state":iMe(g),"data-disabled":s?"":void 0,disabled:s,value:c,...h,ref:v,onKeyDown:H_e(t.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:H_e(t.onClick,(e=>{b((e=>!!lMe(e)||!e)),y&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),y&&w(oMe,{control:f,bubbles:!m.current,name:a,value:c,checked:g,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!lMe(l)&&l})]})}));rMe.displayName=X_e;var nMe="CheckboxIndicator",aMe=e.forwardRef(((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,o=tMe(nMe,r);return w(F_e,{present:n||lMe(o.state)||!0===o.state,children:w(K_e.span,{"data-state":iMe(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));aMe.displayName=nMe;var oMe=t=>{const{control:r,checked:n,bubbles:a=!0,defaultChecked:o,...l}=t,i=e.useRef(null),s=D_e(n),c=B_e(r);e.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&r){const t=new Event("click",{bubbles:a});e.indeterminate=lMe(n),r.call(e,!lMe(n)&&n),e.dispatchEvent(t)}}),[s,n,a]);const d=e.useRef(!lMe(n)&&n);return w("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??d.current,...l,tabIndex:-1,ref:i,style:{...t.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function lMe(e){return"indeterminate"===e}function iMe(e){return lMe(e)?"indeterminate":e?"checked":"unchecked"}var sMe=rMe,cMe=aMe;const dMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(sMe,Object.assign({ref:t,className:PM("peer size-4 shrink-0 cursor-pointer rounded-[var(--spacing-spacing-xxs,2px)] border border-function-default-solid ring-offset-bg-bg1","hover:border-function-default-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-input-active-stroke focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:border-state-disable-outline disabled:text-state-disable-outline","disabled:data-[state=checked]:border-state-disable-solid disabled:data-[state=checked]:bg-state-disable-solid","disabled:data-[state=indeterminate]:border-state-disable-solid disabled:data-[state=indeterminate]:bg-state-disable-solid",{"data-[state=checked]:border-function-active-solid data-[state=checked]:bg-function-active-solid data-[state=checked]:text-function-active-icon data-[state=indeterminate]:border-function-active-solid data-[state=indeterminate]:bg-function-active-solid data-[state=indeterminate]:text-function-active-icon":!n.disabled,"hover:data-[state=checked]:border-function-active-hover hover:data-[state=checked]:bg-function-active-hover hover:data-[state=indeterminate]:border-function-active-hover hover:data-[state=indeterminate]:bg-function-active-hover":!n.disabled},r)},n,{children:_(cMe,{className:PM("flex size-[14px] items-center justify-center text-current","[&[data-state=checked]_.checkbox-check-icon]:block","[&[data-state=indeterminate]_.checkbox-minus-icon]:block"),children:[w(xn,{className:"checkbox-check-icon hidden size-[14px]"}),w(Ji,{className:"checkbox-minus-icon hidden size-[14px]"})]})}))}));dMe.displayName=sMe.displayName;var uMe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...a}=e,o=n?W_e:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),w(o,{...a,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{}),hMe=e.forwardRef(((e,t)=>w(uMe.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));hMe.displayName="Label";var fMe=hMe;const pMe=x(["block cursor-pointer duration-450 transition-all px-[2px] text-input-default-text peer-focus:text-input-text-active"],{variants:{size:{sm:"typography-small1",md:"typography-subtitle2",lg:"typography-subtitle1"},disabled:{true:"text-input-text-disabled ring-input-stroke-disabled placeholder:text-input-text-disabled peer-disabled:cursor-not-allowed"},error:{true:"ring-error"},isFloatable:{true:"absolute peer-focus:text-input-text-active peer-focus:bg-input-label-background",false:""}},compoundVariants:[{size:"sm",isFloatable:!0,className:["left-3 -top-1.5 typography-label2 bg-input-label-background","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label2"]},{size:"md",isFloatable:!0,className:["left-3 -top-1.5 typography-label1 bg-input-label-background","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{size:"lg",isFloatable:!0,className:["left-4 -top-1.5 typography-label1 bg-input-label-background","peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]}],defaultVariants:{size:"md",disabled:!1,error:!1,isFloatable:!1}}),vMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(fMe,Object.assign({ref:t,className:PM(pMe({size:n.size,disabled:n.disabled,error:n.error,isFloatable:n.isFloatable}),r)},n))}));vMe.displayName=fMe.displayName;const mMe=x(["border-0 outline-none","p-1 flex w-auto h-fit box-border","peer text-input-filled-text placeholder:text-input-default-text bg-transparent caret-primary"],{variants:{size:{sm:"p-2 px-3 typography-small1",md:"py-2 px-3 typography-subtitle4",lg:"p-4 typography-subtitle1"},rounded:{none:"rounded-none",normal:"rounded-xl",full:"rounded-full"},variant:{flat:"",outline:["ring-1 ring-inset ring-input-default-stroke","hover:ring-input-active-stroke hover:text-input-filled-text","focus:ring-1 focus:ring-inset focus:ring-input-active-stroke focus:text-input-filled-text active:text-input-filled-text"],underline:"border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-default-stroke"},hiddenPlaceholder:{true:"placeholder:text-transparent"},fullwidth:{true:"w-full"},disabled:{true:["text-input-disable-text ring-input-disable-stroke bg-input-disable-bg placeholder:text-input-disable-text","hover:text-input-disable-text hover:ring-input-disable-stroke hover:bg-input-disable-bg hover:placeholder:text-input-disable-text","active:text-input-disable-text active:ring-input-disable-stroke active:bg-input-disable-bg active:placeholder:text-input-disable-text"]},error:{true:"ring-input-error focus:ring-input-error"}},defaultVariants:{size:"md",variant:"outline",rounded:"normal",fullwidth:!1,disabled:!1,error:!1,hiddenPlaceholder:!0}}),yMe=r(((e,t)=>{var{className:r,type:n="text",size:a="md",variant:o="outline",rounded:l="normal",fullwidth:i=!1,disabled:s=!1,error:c=!1,required:d=!1,hiddenPlaceholder:u=!1}=e,h=EM(e,["className","type","size","variant","rounded","fullwidth","disabled","error","required","hiddenPlaceholder"]);return w("input",Object.assign({type:n,className:PM(mMe({size:a,variant:o,fullwidth:i,error:c,hiddenPlaceholder:u,disabled:s,rounded:l}),r),ref:t,disabled:s},h))}));yMe.displayName="Input";const gMe=({children:e,className:t,variant:r="default",scrollShadow:n=!1,center:a,leftNav:o,rightNav:l,position:c,container:d=!1,containerClassName:u,leftNavClassName:h,centerClassName:f,rightNavClassName:p})=>{const[v,m]=i(!1);s((()=>{if(!n||"undefined"==typeof window)return;const e=()=>{m(window.scrollY>4)};return e(),window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)}),[n]);const y="transparent"===r;return _("header",{className:PM("relative w-full px-4 py-6 h-[var(--navbar-height)] box-border overflow-hidden typography-subtitle2 border-solid border-b-2 text-[rgb(var(--navbar-text-color))] border-b-[rgb(var(--navbar-border-color))] transition-shadow duration-200",{position:c},n&&v&&"shadow-[var(--navbar-shadow-scrolled)]",t),children:[!y&&w("div",{className:"absolute inset-0 -z-10 bg-[rgb(var(--navbar-bg-color))]","aria-hidden":!0}),w("div",{className:PM("absolute inset-0 -z-[5] pointer-events-none",t),"aria-hidden":!0}),w("div",{className:PM("relative mx-auto flex h-full justify-between items-center",{container:d},u),children:e||_(M,{children:[w("nav",{className:PM("flex w-1/2 gap-x-[var(--navbar-gap)] text-xl",h),children:o}),w("div",{className:PM("flex flex-shrink-0 flex-wrap justify-center",f),children:a}),w("nav",{className:PM("flex w-1/2 justify-end gap-x-[var(--navbar-gap)] text-xl",p),children:l})]})})]})},bMe=({children:e,className:t,variant:r="default",copyright:n,center:a,leftNav:o,rightNav:l,position:i,container:s=!1,containerClassName:c,leftNavClassName:d,centerClassName:u,rightNavClassName:h})=>{const f="simple"===r,p="transparent"===r,v=o||n,m=f&&null!=n?n:a,y=f?null:l;return _("footer",{className:PM("relative w-full px-4 py-6 box-border overflow-hidden typography-subtitle2 border-solid border-t-2 text-[var(--footer-text-color)] border-t-[var(--footer-border-color)]",f?"h-[var(--footer-height-simple)]":"h-[var(--footer-height)]",{position:i},t),children:[!p&&w("div",{className:"absolute inset-0 -z-10 bg-[var(--footer-bg-color)]","aria-hidden":!0}),w("div",{className:PM("absolute inset-0 -z-[5] pointer-events-none",t),"aria-hidden":!0}),w("div",{className:PM("relative mx-auto flex h-full items-center",f?"justify-center":"justify-between",{container:s},c),children:null!=e?e:f?w("div",{className:PM("text-center",u),children:m}):_(M,{children:[w("nav",{className:PM("flex w-1/2 items-center gap-x-[var(--footer-gap)] text-xl",d),children:n&&o?_(M,{children:[w("span",{className:"flex-shrink-0",children:n}),o]}):v}),w("div",{className:PM("flex flex-shrink-0 flex-wrap justify-center",u),children:m}),w("nav",{className:PM("flex w-1/2 justify-end gap-x-[var(--footer-gap)] text-xl",h),children:y})]})})]})};var kMe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...a}=e,o=n?W_e:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),w(o,{...a,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{}),wMe="Avatar",[_Me,MMe]=S_e(wMe),[xMe,jMe]=_Me(wMe),OMe=e.forwardRef(((t,r)=>{const{__scopeAvatar:n,...a}=t,[o,l]=e.useState("idle");return w(xMe,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:l,children:w(kMe.span,{...a,ref:r})})}));OMe.displayName=wMe;var EMe="AvatarImage",zMe=e.forwardRef(((t,r)=>{const{__scopeAvatar:n,src:a,onLoadingStatusChange:o=()=>{},...l}=t,i=jMe(EMe,n),s=function(t,r){const[n,a]=e.useState("idle");return q_e((()=>{if(!t)return void a("error");let e=!0;const n=new window.Image,o=t=>()=>{e&&a(t)};return a("loading"),n.onload=o("loaded"),n.onerror=o("error"),n.src=t,r&&(n.referrerPolicy=r),()=>{e=!1}}),[t,r]),n}(a,l.referrerPolicy),c=Z_e((e=>{o(e),i.onImageLoadingStatusChange(e)}));return q_e((()=>{"idle"!==s&&c(s)}),[s,c]),"loaded"===s?w(kMe.img,{...l,ref:r,src:a}):null}));zMe.displayName=EMe;var CMe="AvatarFallback",PMe=e.forwardRef(((t,r)=>{const{__scopeAvatar:n,delayMs:a,...o}=t,l=jMe(CMe,n),[i,s]=e.useState(void 0===a);return e.useEffect((()=>{if(void 0!==a){const e=window.setTimeout((()=>s(!0)),a);return()=>window.clearTimeout(e)}}),[a]),i&&"loaded"!==l.imageLoadingStatus?w(kMe.span,{...o,ref:r}):null}));PMe.displayName=CMe;var AMe=OMe,RMe=zMe,LMe=PMe;const IMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(AMe,Object.assign({ref:t,className:PM("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",r)},n))}));IMe.displayName=AMe.displayName;const SMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(RMe,Object.assign({ref:t,className:PM("aspect-square h-full w-full",r)},n))}));SMe.displayName=RMe.displayName;const VMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(LMe,Object.assign({ref:t,className:PM("flex h-full w-full items-center justify-center rounded-full bg-inherit text-inherit",r)},n))}));VMe.displayName=LMe.displayName;const HMe=x(["flex items-center justify-center bg-grey2-900 text-text-white typography-subtitle6 truncate"],{variants:{size:{xxs:"w-[24px] h-[24px] typography-small3",xs:"w-[32px] h-[32px]",sm:"w-[40px] h-[40px]",md:"w-[48px] h-[48px]",lg:"w-[64px] h-[64px]"},rounded:{normal:"rounded",full:"rounded-full",none:"rounded-none"}},defaultVariants:{size:"md",rounded:"normal"}}),ZMe=e=>{var t,r,n;if(!e.length)return"-";const a=e.split(" ");return`${null==e?void 0:e.charAt(0)}${null!==(n=null!==(r=null===(t=null==a?void 0:a[1])||void 0===t?void 0:t.charAt(0))&&void 0!==r?r:null==e?void 0:e.charAt(1))&&void 0!==n?n:""}`},NMe=({text:e,imageUrl:t,icon:r,fallback:n,size:a,rounded:o,className:l,imageClassName:i,fallbackClassName:s,type:c="text",children:d,style:u})=>{const h=HMe({size:a,rounded:o});return w(IMe,{className:PM(h,l),style:u,children:d||_(M,{children:["image"===c&&_(M,{children:[w(SMe,{src:t,className:PM(i)}),w(VMe,{className:PM(s),children:"string"==typeof n?ZMe(n):n})]}),"text"===c&&ZMe(null!=e?e:""),"icon"===c&&r]})})},DMe=({borderWidth:e=2,borderColor:t="white",maxDisplay:r=4,children:n,remainingText:a,remainingAvatar:o})=>{const l=k.toArray(n),i=l.slice(0,r),s=Math.max(0,l.length-r),c=o||v(i[0],{style:{borderWidth:e,borderColor:t},className:"relative z-0",children:a||`+${s}`});return _("div",{className:"flex items-center -space-x-2",children:[i.map(((r,n)=>w("div",{className:"relative",style:{zIndex:l.length-n},children:v(r,{style:{borderWidth:e,borderColor:t}})},n))),s>0&&c]})},qMe=x(["inline-flex items-center justify-center rounded-lg px-3 py-1","typography-body3"],{variants:{color:{default:["bg-[var(--badge-default-bg)]","text-[var(--badge-default-text)]"],success:["bg-[var(--badge-success-bg)]","text-[var(--badge-success-text)]"],warning:["bg-[var(--badge-warning-bg)]","text-[var(--badge-warning-text)]"],info:["bg-[var(--badge-info-bg)]","text-[var(--badge-info-text)]"],error:["bg-[var(--badge-error-bg)]","text-[var(--badge-error-text)]"]},clickable:{true:"border border-solid",false:""}},compoundVariants:[{color:"default",clickable:!0,className:"border-[var(--badge-default-border)]"},{color:"success",clickable:!0,className:"border-[var(--badge-success-border)]"},{color:"warning",clickable:!0,className:"border-[var(--badge-warning-border)]"},{color:"info",clickable:!0,className:"border-[var(--badge-info-border)]"},{color:"error",clickable:!0,className:"border-[var(--badge-error-border)]"}],defaultVariants:{color:"default",clickable:!1}}),BMe=x(["inline-flex items-center justify-center rounded px-1 py-0.5","typography-small6 text-[var(--badge-severity-text)]"],{variants:{severity:{highest:"bg-[var(--badge-severity-highest-bg)]",high:"bg-[var(--badge-severity-high-bg)]",medium:"bg-[var(--badge-severity-medium-bg)]",low:"bg-[var(--badge-severity-low-bg)]",lowest:"bg-[var(--badge-severity-lowest-bg)]"}},defaultVariants:{severity:"medium"}}),FMe=e.forwardRef(((e,t)=>{var{label:r,color:n="default",clickable:a=!1,percent:o,className:l}=e,i=EM(e,["label","color","clickable","percent","className"]);const s=void 0!==o;return _("span",Object.assign({ref:t,className:PM(qMe({color:n,clickable:a}),s&&"flex-col gap-0.5",a&&"cursor-pointer gap-1",l)},i,{children:[_("span",{className:"flex items-center gap-1",children:[r,a&&w(In,{className:"size-4 shrink-0","aria-hidden":!0})]}),s&&_("span",{className:"tabular-nums",children:[o,"%"]})]}))}));FMe.displayName="Badge";const TMe={highest:"Highest",high:"High",medium:"Medium",low:"Low",lowest:"Lowest"},WMe=e.forwardRef(((e,t)=>{var{severity:r,className:n}=e,a=EM(e,["severity","className"]);return w("span",Object.assign({ref:t,className:PM(BMe({severity:r}),n)},a,{children:TMe[r]}))}));WMe.displayName="SeverityBadge";const UMe=u(void 0),$Me=()=>{const e=h(UMe);if(!e)throw new Error("useCollapsible must be used within a CollapsibleProvider");return e},GMe=({size:e,children:t,isExpandControlled:r,onToggle:n})=>{const[a,o]=i(!1);return s((()=>{void 0!==r&&o(r)}),[r]),w(UMe.Provider,{value:{size:e,isExpand:a,toggle:()=>{o((e=>!e)),n&&n(!a)},setIsExpand:o},children:t})},YMe=x(["flex flex-1 bg-secondary-default hover:bg-secondary-hover text-state-secondary-text-solid","focus:outline-none focus-visible:ring focus-visible:ring-gray-500 focus-visible:ring-opacity-75"],{variants:{size:{sm:"py-2 px-3",md:"py-3 px-4",lg:"py-4 px-5"}},defaultVariants:{size:"md"}}),KMe=x(["transition-all flex content-center justify-center "],{variants:{size:{sm:"size-5",md:"size-6",lg:"size-7"},isExpand:{true:"rotate-180"}},defaultVariants:{size:"md",isExpand:!1}}),XMe=x(["flex flex-1 border-t border-t-secondary","transition ease-in-out delay-150 duration-300"],{variants:{size:{sm:"py-2 px-3",md:"py-3 px-4",lg:"py-4 px-5"}},defaultVariants:{size:"md"}}),QMe=x(["flex flex-col border border-secondary rounded overflow-hidden"]),JMe=r((({children:e,className:t,hideExpandIcon:r=!1},n)=>{const{toggle:a,isExpand:o,size:l}=$Me(),i=YMe({size:l}),s=KMe({isExpand:o,size:l});return _("button",{onClick:a,className:PM(i,t),ref:n,children:[w("span",{className:"flex flex-1",children:e}),!r&&w("span",{className:PM(s),children:w(In,{className:PM("size-full")})})]})}));JMe.displayName="CollapsibleButton";const exe=r((({children:e,className:t},r)=>{const{isExpand:a,size:o}=$Me(),l=XMe({size:o}),[c,d]=i("0px"),u=n(null);return s((()=>{u.current&&d(a?`${u.current.scrollHeight}px`:"0px")}),[a,e]),w("div",{ref:r,className:PM("overflow-hidden transition-all ease-in-out"),style:{height:c},children:w("div",{ref:u,className:PM(l,t),children:e})})}));exe.displayName="CollapsiblePanel";const txe=r((({children:e,isExpand:t,size:r,className:n,onToggle:a},o)=>{const l=QMe();return w(GMe,{size:r,isExpandControlled:t,onToggle:a,children:w("div",{ref:o,className:PM(l,n),children:e})})}));var rxe,nxe,axe;txe.displayName="Collapsible",txe.Button=JMe,txe.Panel=exe,function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(rxe||(rxe={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(nxe||(nxe={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(axe||(axe={}));const oxe=6048e5,lxe=Symbol.for("constructDateFrom");function ixe(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&lxe in e?e[lxe](t):e instanceof Date?new e.constructor(t):new Date(t)}function sxe(e,t){return ixe(t||e,e)}function cxe(e,t,r){const n=sxe(e,r?.in);return isNaN(t)?ixe(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function dxe(e,t,r){const n=sxe(e,r?.in);if(isNaN(t))return ixe(e,NaN);if(!t)return n;const a=n.getDate(),o=ixe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);return a>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),a),n)}let uxe={};function hxe(){return uxe}function fxe(e,t){const r=hxe(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=sxe(e,t?.in),o=a.getDay(),l=(o<n?7:0)+o-n;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function pxe(e,t){return fxe(e,{...t,weekStartsOn:1})}function vxe(e,t){const r=sxe(e,t?.in),n=r.getFullYear(),a=ixe(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=pxe(a),l=ixe(r,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const i=pxe(l);return r.getTime()>=o.getTime()?n+1:r.getTime()>=i.getTime()?n:n-1}function mxe(e){const t=sxe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function yxe(e,...t){const r=ixe.bind(null,t.find((e=>"object"==typeof e)));return t.map(r)}function gxe(e,t){const r=sxe(e,t?.in);return r.setHours(0,0,0,0),r}function bxe(e,t,r){const[n,a]=yxe(0,e,t),o=gxe(n),l=gxe(a),i=+o-mxe(o),s=+l-mxe(l);return Math.round((i-s)/864e5)}function kxe(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function wxe(e,t){const r=sxe(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function _xe(e,t){const r=hxe(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=sxe(e,t?.in),o=a.getDay(),l=6+(o<n?-7:0)-(o-n);return a.setDate(a.getDate()+l),a.setHours(23,59,59,999),a}const Mxe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function xxe(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const jxe={date:xxe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:xxe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:xxe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Oxe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Exe(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const zxe={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Exe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Exe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Exe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Exe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Exe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Cxe(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,(e=>e.test(l))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,(e=>e.test(l)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(l.length)}}}const Pxe={ordinalNumber:(Axe={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(Axe.matchPattern);if(!r)return null;const n=r[0],a=e.match(Axe.parsePattern);if(!a)return null;let o=Axe.valueCallback?Axe.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(n.length)}}),era:Cxe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Cxe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cxe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Cxe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Cxe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Axe;const Rxe={code:"en-US",formatDistance:(e,t,r)=>{let n;const a=Mxe[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:jxe,formatRelative:(e,t,r,n)=>Oxe[e],localize:zxe,match:Pxe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Lxe(e,t){const r=sxe(e,t?.in),n=+pxe(r)-+function(e,t){const r=vxe(e,t),n=ixe(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),pxe(n)}(r);return Math.round(n/oxe)+1}function Ixe(e,t){const r=sxe(e,t?.in),n=r.getFullYear(),a=hxe(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=ixe(t?.in||e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const i=fxe(l,t),s=ixe(t?.in||e,0);s.setFullYear(n,0,o),s.setHours(0,0,0,0);const c=fxe(s,t);return+r>=+i?n+1:+r>=+c?n:n-1}function Sxe(e,t){const r=sxe(e,t?.in),n=+fxe(r,t)-+function(e,t){const r=hxe(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=Ixe(e,t),o=ixe(t?.in||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),fxe(o,t)}(r,t);return Math.round(n/oxe)+1}function Vxe(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Hxe={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Vxe("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):Vxe(r+1,2)},d:(e,t)=>Vxe(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>Vxe(e.getHours()%12||12,t.length),H:(e,t)=>Vxe(e.getHours(),t.length),m:(e,t)=>Vxe(e.getMinutes(),t.length),s:(e,t)=>Vxe(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return Vxe(Math.trunc(n*Math.pow(10,r-3)),t.length)}},Zxe="midnight",Nxe="noon",Dxe="morning",qxe="afternoon",Bxe="evening",Fxe="night",Txe={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return Hxe.y(e,t)},Y:function(e,t,r,n){const a=Ixe(e,n),o=a>0?a:1-a;if("YY"===t){return Vxe(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):Vxe(o,t.length)},R:function(e,t){return Vxe(vxe(e),t.length)},u:function(e,t){return Vxe(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Vxe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Vxe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Hxe.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Vxe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=Sxe(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):Vxe(a,t.length)},I:function(e,t,r){const n=Lxe(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Vxe(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):Hxe.d(e,t)},D:function(e,t,r){const n=function(e,t){const r=sxe(e,t?.in);return bxe(r,wxe(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Vxe(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Vxe(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Vxe(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return Vxe(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(a=12===n?Nxe:0===n?Zxe:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(a=n>=17?Bxe:n>=12?qxe:n>=4?Dxe:Fxe,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return Hxe.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):Hxe.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Vxe(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Vxe(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Hxe.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Hxe.s(e,t)},S:function(e,t){return Hxe.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return Uxe(n);case"XXXX":case"XX":return $xe(n);default:return $xe(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Uxe(n);case"xxxx":case"xx":return $xe(n);default:return $xe(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Wxe(n,":");default:return"GMT"+$xe(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Wxe(n,":");default:return"GMT"+$xe(n,":")}},t:function(e,t,r){return Vxe(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return Vxe(+e,t.length)}};function Wxe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return 0===o?r+String(a):r+String(a)+t+Vxe(o,2)}function Uxe(e,t){if(e%60==0){return(e>0?"-":"+")+Vxe(Math.abs(e)/60,2)}return $xe(e,t)}function $xe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+Vxe(Math.trunc(n/60),2)+t+Vxe(n%60,2)}const Gxe=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Yxe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Kxe={p:Yxe,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return Gxe(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Gxe(n,t)).replace("{{time}}",Yxe(a,t))}},Xxe=/^D+$/,Qxe=/^Y+$/,Jxe=["D","DD","YY","YYYY"];const eje=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tje=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rje=/^'([^]*?)'?$/,nje=/''/g,aje=/[a-zA-Z]/;function oje(e,t,r){const n=hxe(),a=r?.locale??n.locale??Rxe,o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=sxe(e,r?.in);if(!function(e){return!(!kxe(e)&&"number"!=typeof e||isNaN(+sxe(e)))}(i))throw new RangeError("Invalid time value");let s=t.match(tje).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Kxe[t])(e,a.formatLong)}return e})).join("").match(eje).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:lje(e)};if(Txe[t])return{isToken:!0,value:e};if(t.match(aje))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(s=a.localize.preprocessor(i,s));const c={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return s.map((n=>{if(!n.isToken)return n.value;const o=n.value;(!r?.useAdditionalWeekYearTokens&&function(e){return Qxe.test(e)}(o)||!r?.useAdditionalDayOfYearTokens&&function(e){return Xxe.test(e)}(o))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),Jxe.includes(e))throw new RangeError(n)}(o,t,String(e));return(0,Txe[o[0]])(i,o,a.localize,c)})).join("")}function lje(e){const t=e.match(rje);return t?t[1].replace(nje,"'"):e}function ije(e,t,r){const n=sxe(e,r?.in),a=n.getFullYear(),o=n.getDate(),l=ixe(e,0);l.setFullYear(a,t,15),l.setHours(0,0,0,0);const i=function(e,t){const r=sxe(e,t?.in),n=r.getFullYear(),a=r.getMonth(),o=ixe(r,0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}(l);return n.setMonth(t,Math.min(o,i)),n}function sje(e,t){const r=t.startOfMonth(e),n=r.getDay();return 1===n?r:0===n?t.addDays(r,-6):t.addDays(r,-1*(n-1))}class cje{constructor(e,t){this.Date=Date,this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):cxe(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):dxe(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,r){return cxe(e,7*t,r)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,r){return dxe(e,12*t,r)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):bxe(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t){const[r,n]=yxe(0,e,t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}(e,t),this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e,this):function(e,t){const r=sje(e,t),n=function(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,a=t.addDays(e,1-n),o=t.addDays(a,34);return e.getMonth()===o.getMonth()?5:4}(e,t);return t.addDays(r,7*n-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return _xe(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const r=sxe(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}(e),this.endOfWeek=e=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,this.options):_xe(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const r=sxe(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}(e),this.format=(e,t)=>this.overrides?.format?this.overrides.format(e,t,this.options):oje(e,t,this.options),this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):Lxe(e),this.getWeek=e=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):Sxe(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):function(e,t){return+sxe(e)>+sxe(t)}(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):function(e,t){return+sxe(e)<+sxe(t)}(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):kxe(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[r,n]=yxe(0,e,t);return+gxe(r)==+gxe(n)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[r,n]=yxe(0,e,t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t){const[r,n]=yxe(0,e,t);return r.getFullYear()===n.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=ixe.bind(null,e));const t=sxe(e,n);(!r||r<t||isNaN(+t))&&(r=t)})),ixe(n,r||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=ixe.bind(null,e));const t=sxe(e,n);(!r||r>t||isNaN(+t))&&(r=t)})),ixe(n,r||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):ije(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,r){const n=sxe(e,r?.in);return isNaN(+n)?ixe(e,NaN):(n.setFullYear(t),n)}(e,t),this.startOfBroadcastWeek=e=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):sje(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):gxe(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):pxe(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const r=sxe(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}(e),this.startOfWeek=e=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):fxe(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):wxe(e),this.options={locale:Rxe,...e},this.overrides=t}}const dje=new cje;const uje=u(void 0);function hje(){const e=h(uje);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}var fje=Object.freeze({__proto__:null,Button:function(e){return t.createElement("button",{...e})},CaptionLabel:function(e){return t.createElement("span",{...e})},Chevron:function(e){const{size:r=24,orientation:n="left",className:a}=e;return t.createElement("svg",{className:a,width:r,height:r,viewBox:"0 0 24 24"},"up"===n&&t.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&t.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&t.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&t.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))},Day:function(e){const{day:r,modifiers:n,...a}=e;return t.createElement("td",{...a})},DayButton:function(e){const{day:r,modifiers:n,...a}=e,o=t.useRef(null);return t.useEffect((()=>{n.focused&&o.current?.focus()}),[n.focused]),t.createElement("button",{ref:o,...a})},Dropdown:function(e){const{options:r,className:n,components:a,classNames:o,...l}=e,i=[o[rxe.Dropdown],n].join(" "),s=r?.find((({value:e})=>e===l.value));return t.createElement("span",{"data-disabled":l.disabled,className:o[rxe.DropdownRoot]},t.createElement(a.Select,{className:i,...l},r?.map((({value:e,label:r,disabled:n})=>t.createElement(a.Option,{key:e,value:e,disabled:n},r)))),t.createElement("span",{className:o[rxe.CaptionLabel],"aria-hidden":!0},s?.label,t.createElement(a.Chevron,{orientation:"down",size:18,className:o[rxe.Chevron]})))},DropdownNav:function(e){return t.createElement("div",{...e})},Footer:function(e){return t.createElement("div",{...e})},Month:function(e){const{calendarMonth:r,displayIndex:n,...a}=e;return t.createElement("div",{...a},e.children)},MonthCaption:function(e){const{calendarMonth:r,displayIndex:n,...a}=e;return t.createElement("div",{...a})},MonthGrid:function(e){return t.createElement("table",{...e})},Months:function(e){return t.createElement("div",{...e})},MonthsDropdown:function(e){const{components:r}=hje();return t.createElement(r.Dropdown,{...e})},Nav:function(e){const{onPreviousClick:r,onNextClick:n,previousMonth:a,nextMonth:o,...l}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:d}}=hje();return t.createElement("nav",{...l},t.createElement(i.PreviousMonthButton,{type:"button",className:s[rxe.PreviousMonthButton],tabIndex:a?void 0:-1,disabled:!a||void 0,"aria-label":c(a),onClick:e.onPreviousClick},t.createElement(i.Chevron,{disabled:!a||void 0,className:s[rxe.Chevron],orientation:"left"})),t.createElement(i.NextMonthButton,{type:"button",className:s[rxe.NextMonthButton],tabIndex:o?void 0:-1,disabled:!o||void 0,"aria-label":d(o),onClick:e.onNextClick},t.createElement(i.Chevron,{disabled:!o||void 0,orientation:"right",className:s[rxe.Chevron]})))},NextMonthButton:function(e){const{components:r}=hje();return t.createElement(r.Button,{...e})},Option:function(e){return t.createElement("option",{...e})},PreviousMonthButton:function(e){const{components:r}=hje();return t.createElement(r.Button,{...e})},Root:function(e){return t.createElement("div",{...e})},Select:function(e){return t.createElement("select",{...e})},Week:function(e){const{week:r,...n}=e;return t.createElement("tr",{...n})},WeekNumber:function(e){const{week:r,...n}=e;return t.createElement("th",{...n})},WeekNumberHeader:function(e){return t.createElement("th",{...e})},Weekday:function(e){return t.createElement("th",{...e})},Weekdays:function(e){return t.createElement("thead",{"aria-hidden":!0},t.createElement("tr",{...e}))},Weeks:function(e){return t.createElement("tbody",{...e})},YearsDropdown:function(e){const{components:r}=hje();return t.createElement(r.Dropdown,{...e})}});function pje(e){return{...fje,...e}}function vje(){const e={};for(const t in rxe)e[rxe[t]]=`rdp-${rxe[t]}`;for(const t in nxe)e[nxe[t]]=`rdp-${nxe[t]}`;for(const t in axe)e[axe[t]]=`rdp-${axe[t]}`;return e}function mje(e,t,r){return(r??new cje(t)).format(e,"LLLL y")}const yje=mje;function gje(e){return e.toString()}const bje=gje;var kje=Object.freeze({__proto__:null,formatCaption:mje,formatDay:function(e,t,r){return(r??new cje(t)).format(e,"d")},formatMonthCaption:yje,formatMonthDropdown:function(e,t){return t.localize?.month(e)},formatWeekNumber:function(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`},formatWeekNumberHeader:function(){return""},formatWeekdayName:function(e,t,r){return(r??new cje(t)).format(e,"cccccc")},formatYearCaption:bje,formatYearDropdown:gje});const wje={},_je={};function Mje(e,t){try{const r=(wje[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return r in _je?_je[r]:jje(r,r.split(":"))}catch{if(e in _je)return _je[e];const t=e?.match(xje);return t?jje(e,t.slice(1)):NaN}}const xje=/([+-]\d\d):?(\d\d)?/;function jje(e,t){const r=+t[0],n=+(t[1]||0);return _je[e]=r>0?60*r+n:60*r-n}class Oje extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Mje(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Cje(this),zje(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Oje(...t,e):new Oje(Date.now(),e)}withTimeZone(e){return new Oje(+this,e)}getTimezoneOffset(){return-Mje(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),zje(this),+this}[Symbol.for("constructDateFrom")](e){return new Oje(+new Date(e),this.timeZone)}}const Eje=/^(get|set)(?!UTC)/;function zje(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Cje(e){const t=Mje(e.timeZone,e),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const n=-new Date(+e).getTimezoneOffset(),a=n- -new Date(+r).getTimezoneOffset(),o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=n-t;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const i=Mje(e.timeZone,e),s=-new Date(+e).getTimezoneOffset()-i-l;if(i!==t&&s){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const t=i-Mje(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!Eje.test(e))return;const t=e.replace(Eje,"$1UTC");Oje.prototype[t]&&(e.startsWith("get")?Oje.prototype[e]=function(){return this.internal[t]()}:(Oje.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Cje(e)}(this),+this},Oje.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),zje(this),+this}))}));class Pje extends Oje{static tz(e,...t){return t.length?new Pje(...t,e):new Pje(Date.now(),e)}toISOString(){const[e,t,r]=this.tzComponents(),n=`${e}${t}:${r}`;return this.internal.toISOString().slice(0,-1)+n}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,r,n]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${r} ${t} ${n}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,r,n]=this.tzComponents();return`${e} GMT${t}${r}${n} (${function(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Pje(+this,e)}[Symbol.for("constructDateFrom")](e){return new Pje(+new Date(e),this.timeZone)}}function Aje(e,t,r){return(r??new cje(t)).format(e,"LLLL y")}const Rje=Aje;function Lje(e,t,r,n){let a=(n??new cje(r)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}const Ije=Lje;var Sje=Object.freeze({__proto__:null,labelCaption:Rje,labelDay:Ije,labelDayButton:Lje,labelGrid:Aje,labelGridcell:function(e,t,r,n){let a=(n??new cje(r)).format(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a},labelMonthDropdown:function(e){return"Choose the Month"},labelNav:function(){return""},labelNext:function(e){return"Go to the Next Month"},labelPrevious:function(e){return"Go to the Previous Month"},labelWeekNumber:function(e,t){return`Week ${e}`},labelWeekNumberHeader:function(e){return"Week Number"},labelWeekday:function(e,t,r){return(r??new cje(t)).format(e,"cccc")},labelYearDropdown:function(e){return"Choose the Year"}});function Vje(e,t){const{month:r,defaultMonth:n,today:a=(e.timeZone?Pje.tz(e.timeZone):t.Date?new t.Date:new Date),numberOfMonths:o=1,endMonth:l,startMonth:i}=e;let s=r||n||a;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:u}=t;if(l&&c(l,s)<0){s=d(l,-1*(o-1))}return i&&c(s,i)<0&&(s=i),u(s)}class Hje{constructor(e,t,r=dje){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!r.isSameMonth(e,t)),this.dateLib=r}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class Zje{constructor(e,t){this.date=e,this.weeks=t}}class Nje{constructor(e,t){this.days=t,this.weekNumber=e}}function Dje(e,t){const[r,n]=i(e);return[void 0===t?r:t,n]}function qje(e,t){const[r,n]=function(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:a,startOfDay:o,startOfMonth:l,endOfMonth:i,addYears:s,endOfYear:c}=t,{fromYear:d,toYear:u,fromMonth:h,toMonth:f}=e;!r&&h&&(r=h),!r&&d&&(r=new Date(d,0,1)),!n&&f&&(n=f),!n&&u&&(n=new Date(u,11,31));const p=e.captionLayout?.startsWith("dropdown");r?r=l(r):d?r=new Date(d,0,1):!r&&p&&(r=a(s(e.today??(e.timeZone?Pje.tz(e.timeZone):t.Date?new t.Date:new Date),-100)));n?n=i(n):u?n=new Date(u,11,31):!n&&p&&(n=c(e.today??(e.timeZone?Pje.tz(e.timeZone):t.Date?new t.Date:new Date)));return[r?o(r):r,n?o(n):n]}(e,t),{startOfMonth:a,endOfMonth:o}=t,l=Vje(e,t),[i,c]=Dje(l,e.month?a(e.month):void 0);s((()=>{const r=Vje(e,t);c(r)}),[e.timeZone]);const d=function(e,t,r,n){const{numberOfMonths:a=1}=r,o=[];for(let r=0;r<a;r++){const a=n.addMonths(e,r);if(t&&a>t)break;o.push(a)}return o}(i,n,e,t),u=function(e,t,r,n){const a=e[0],o=e[e.length-1],{ISOWeek:l,fixedWeeks:i,broadcastCalendar:s}=r??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:f,endOfMonth:p,endOfWeek:v,isAfter:m,startOfBroadcastWeek:y,startOfISOWeek:g,startOfWeek:b}=n,k=s?y(a,n):l?g(a):b(a),w=d(s?h(o,n):l?f(p(o)):v(p(o)),k),_=u(o,a)+1,M=[];for(let e=0;e<=w;e++){const r=c(k,e);if(t&&m(r,t))break;M.push(r)}const x=(s?35:42)*_;if(i&&M.length<x){const e=x-M.length;for(let t=0;t<e;t++){const e=c(M[M.length-1],1);M.push(e)}}return M}(d,e.endMonth?o(e.endMonth):void 0,e,t),h=function(e,t,r,n){const{addDays:a,endOfBroadcastWeek:o,endOfISOWeek:l,endOfMonth:i,endOfWeek:s,getISOWeek:c,getWeek:d,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:f}=n,p=e.reduce(((e,p)=>{const v=r.broadcastCalendar?u(p,n):r.ISOWeek?h(p):f(p),m=r.broadcastCalendar?o(p,n):r.ISOWeek?l(i(p)):s(i(p)),y=t.filter((e=>e>=v&&e<=m)),g=r.broadcastCalendar?35:42;if(r.fixedWeeks&&y.length<g){const e=t.filter((e=>{const t=g-y.length;return e>m&&e<=a(m,t)}));y.push(...e)}const b=y.reduce(((e,t)=>{const a=r.ISOWeek?c(t):d(t),o=e.find((e=>e.weekNumber===a)),l=new Hje(t,p,n);return o?o.days.push(l):e.push(new Nje(a,[l])),e}),[]),k=new Zje(p,b);return e.push(k),e}),[]);return r.reverseMonths?p.reverse():p}(d,u,e,t),f=function(e){return e.reduce(((e,t)=>[...e,...t.weeks]),[])}(h),p=h.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]);const v=function(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o}=r,{startOfMonth:l,addMonths:i,differenceInCalendarMonths:s}=n,c=a?o??1:1,d=l(e);return t&&s(d,t)<=0?void 0:i(d,-c)}(i,r,e,t),m=function(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o=1}=r,{startOfMonth:l,addMonths:i,differenceInCalendarMonths:s}=n,c=a?o:1,d=l(e);return t&&s(t,e)<o?void 0:i(d,c)}(i,n,e,t),{disableNavigation:y,onMonthChange:g}=e,b=e=>{if(y)return;let t=a(e);r&&t<a(r)&&(t=a(r)),n&&t>a(n)&&(t=a(n)),c(t),g?.(t)},k={months:h,weeks:f,days:p,navStart:r,navEnd:n,previousMonth:v,nextMonth:m,goToMonth:b,goToDay:e=>{(e=>f.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||b(e.date)}};return k}function Bje(e,t,r=!1,n=dje){let{from:a,to:o}=e;const{differenceInCalendarDays:l,isSameDay:i}=n;if(a&&o){l(o,a)<0&&([a,o]=[o,a]);return l(t,a)>=(r?1:0)&&l(o,t)>=(r?1:0)}return!r&&o?i(o,t):!(r||!a)&&i(a,t)}function Fje(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function Tje(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function Wje(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function Uje(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function $je(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function Gje(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Yje(e,t,r=dje){const n=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:o,isAfter:l}=r;return n.some((t=>{if("boolean"==typeof t)return t;if(r.isDate(t))return a(e,t);if(Gje(t,r))return t.includes(e);if(Tje(t))return Bje(t,e,!1,r);if($je(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(Fje(t)){const r=o(t.before,e)>0,n=o(t.after,e)<0;return l(t.before,t.after)?n&&r:r||n}return Wje(t)?o(e,t.after)>0:Uje(t)?o(t.before,e)>0:"function"==typeof t&&t(e)}))}function Kje(e,t,r,n,a,o,l,i=0){if(i>365)return;const s=function(e,t,r,n,a,o,l){const{ISOWeek:i,broadcastCalendar:s}=o,{addDays:c,addMonths:d,addWeeks:u,addYears:h,endOfBroadcastWeek:f,endOfISOWeek:p,endOfWeek:v,max:m,min:y,startOfBroadcastWeek:g,startOfISOWeek:b,startOfWeek:k}=l,w={day:c,week:u,month:d,year:h,startOfWeek:e=>s?g(e,l):i?b(e):k(e),endOfWeek:e=>s?f(e,l):i?p(e):v(e)};let _=w[e](r,"after"===t?1:-1);return"before"===t&&n?_=m([n,_]):"after"===t&&a&&(_=y([a,_])),_}(e,t,r.date,n,a,o,l),c=Boolean(o.disabled&&Yje(s,o.disabled,l)),d=Boolean(o.hidden&&Yje(s,o.hidden,l)),u=new Hje(s,s,l);return c||d?Kje(e,t,u,n,a,o,l,i+1):u}function Xje(e,t,r,n,a){const{autoFocus:o}=e,[l,s]=i(),c=function(e,t,r,n){let a,o=0,l=!1;for(;o<e.length&&!l;){const i=e[o],s=t(i);s[nxe.disabled]||s[nxe.hidden]||s[nxe.outside]||(s[nxe.focused]||n?.isEqualTo(i)||r(i.date)||s[nxe.today])&&(a=i,l=!0),o++}return a||(a=e.find((e=>{const r=t(e);return!r[nxe.disabled]&&!r[nxe.hidden]&&!r[nxe.outside]}))),a}(t.days,r,n||(()=>!1),l),[d,u]=i(o?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:u,focused:d,blur:()=>{s(d),u(void 0)},moveFocus:(r,n)=>{if(!d)return;const o=Kje(r,n,d,t.navStart,t.navEnd,e,a);o&&(t.goToDay(o),u(o))}}}function Qje(e,t,r=dje){return Bje(e,t.from,!1,r)||Bje(e,t.to,!1,r)||Bje(t,e.from,!1,r)||Bje(t,e.to,!1,r)}function Jje(e,t,r=dje){const n=Array.isArray(t)?t:[t],a=n.filter((e=>"function"!=typeof e)).some((t=>{if("boolean"==typeof t)return t;if(r.isDate(t))return Bje(e,t,!1,r);if(Gje(t,r))return t.some((t=>Bje(e,t,!1,r)));if(Tje(t))return!(!t.from||!t.to)&&Qje(e,{from:t.from,to:t.to},r);if($je(t))return function(e,t,r=dje){const n=Array.isArray(t)?t:[t];let a=e.from;const o=r.differenceInCalendarDays(e.to,e.from),l=Math.min(o,6);for(let e=0;e<=l;e++){if(n.includes(a.getDay()))return!0;a=r.addDays(a,1)}return!1}(e,t.dayOfWeek,r);if(Fje(t)){return r.isAfter(t.before,t.after)?Qje(e,{from:r.addDays(t.after,1),to:r.addDays(t.before,-1)},r):Yje(e.from,t,r)||Yje(e.to,t,r)}return!(!Wje(t)&&!Uje(t))&&(Yje(e.from,t,r)||Yje(e.to,t,r))}));if(a)return!0;const o=n.filter((e=>"function"==typeof e));if(o.length){let t=e.from;const n=r.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=n;e++){if(o.some((e=>e(t))))return!0;t=r.addDays(t,1)}}return!1}function eOe(e,t){const{disabled:r,excludeDisabled:n,selected:a,required:o,onSelect:l}=e,[i,s]=Dje(a,l?a:void 0),c=l?a:i;return{selected:c,select:(a,i,d)=>{const{min:u,max:h}=e,f=a?function(e,t,r=0,n=0,a=!1,o=dje){const{from:l,to:i}=t||{},{isSameDay:s,isAfter:c,isBefore:d}=o;let u;if(l||i){if(l&&!i)u=s(l,e)?a?{from:l,to:void 0}:void 0:d(e,l)?{from:e,to:l}:{from:l,to:e};else if(l&&i)if(s(l,e)&&s(i,e))u=a?{from:l,to:i}:void 0;else if(s(l,e))u={from:l,to:r>0?void 0:e};else if(s(i,e))u={from:e,to:r>0?void 0:e};else if(d(e,l))u={from:e,to:i};else if(c(e,l))u={from:l,to:e};else{if(!c(e,i))throw new Error("Invalid range");u={from:l,to:e}}}else u={from:e,to:r>0?void 0:e};if(u?.from&&u?.to){const t=o.differenceInCalendarDays(u.to,u.from);(n>0&&t>n||r>1&&t<r)&&(u={from:e,to:void 0})}return u}(a,c,u,h,o,t):void 0;return n&&r&&f?.from&&f.to&&Jje({from:f.from,to:f.to},r,t)&&(f.from=a,f.to=void 0),l||s(f),l?.(f,a,i,d),f},isSelected:e=>c&&Bje(c,e,!1,t)}}function tOe(e,t){const r=function(e,t){const{selected:r,required:n,onSelect:a}=e,[o,l]=Dje(r,a?r:void 0),i=a?r:o,{isSameDay:s}=t;return{selected:i,select:(e,t,r)=>{let o=e;return!n&&i&&i&&s(e,i)&&(o=void 0),a||l(o),a?.(o,e,t,r),o},isSelected:e=>!!i&&s(i,e)}}(e,t),n=function(e,t){const{selected:r,required:n,onSelect:a}=e,[o,l]=Dje(r,a?r:void 0),i=a?r:o,{isSameDay:s}=t,c=e=>i?.some((t=>s(t,e)))??!1,{min:d,max:u}=e;return{selected:i,select:(e,t,r)=>{let o=[...i??[]];if(c(e)){if(i?.length===d)return;if(n&&1===i?.length)return;o=i?.filter((t=>!s(t,e)))}else o=i?.length===u?[e]:[...o,e];return a||l(o),a?.(o,e,t,r),o},isSelected:c}}(e,t),a=eOe(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return a;default:return}}function rOe(e){const{components:r,formatters:n,labels:o,dateLib:i,locale:s,classNames:c}=l((()=>{const t={...Rxe,...e.locale};return{dateLib:new cje({locale:t,weekStartsOn:e.broadcastCalendar?1:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens},e.dateLib),components:pje(e.components),formatters:(r=e.formatters,r?.formatMonthCaption&&!r.formatCaption&&(r.formatCaption=r.formatMonthCaption),r?.formatYearCaption&&!r.formatYearDropdown&&(r.formatYearDropdown=r.formatYearCaption),{...kje,...r}),labels:{...Sje,...e.labels},locale:t,classNames:{...vje(),...e.classNames}};var r}),[e.classNames,e.components,e.dateLib,e.firstWeekContainsDate,e.formatters,e.labels,e.locale,e.useAdditionalDayOfYearTokens,e.useAdditionalWeekYearTokens,e.weekStartsOn,e.broadcastCalendar]),{captionLayout:d,mode:u,onDayBlur:h,onDayClick:f,onDayFocus:p,onDayKeyDown:v,onDayMouseEnter:m,onDayMouseLeave:y,onNextClick:g,onPrevClick:b,showWeekNumber:k,styles:w}=e,{formatCaption:_,formatDay:M,formatMonthDropdown:x,formatWeekNumber:j,formatWeekNumberHeader:O,formatWeekdayName:E,formatYearDropdown:z}=n,C=qje(e,i),{days:P,months:A,navStart:R,navEnd:L,previousMonth:I,nextMonth:S,goToMonth:V}=C,H=function(e,t,r){const{disabled:n,hidden:a,modifiers:o,showOutsideDays:l,broadcastCalendar:i,today:s}=t,{isSameDay:c,isSameMonth:d,startOfMonth:u,isBefore:h,endOfMonth:f,isAfter:p}=r,v=t.startMonth&&u(t.startMonth),m=t.endMonth&&f(t.endMonth),y={[nxe.focused]:[],[nxe.outside]:[],[nxe.disabled]:[],[nxe.hidden]:[],[nxe.today]:[]},g={};for(const u of e){const{date:e,displayMonth:f}=u,b=Boolean(f&&!d(e,f)),k=Boolean(v&&h(e,v)),w=Boolean(m&&p(e,m)),_=Boolean(n&&Yje(e,n,r)),M=Boolean(a&&Yje(e,a,r))||k||w||!i&&!l&&b||i&&!1===l&&b,x=c(e,s??(t.timeZone?Pje.tz(t.timeZone):r.Date?new r.Date:new Date));b&&y.outside.push(u),_&&y.disabled.push(u),M&&y.hidden.push(u),x&&y.today.push(u),o&&Object.keys(o).forEach((t=>{const n=o?.[t];n&&Yje(e,n,r)&&(g[t]?g[t].push(u):g[t]=[u])}))}return e=>{const t={[nxe.focused]:!1,[nxe.disabled]:!1,[nxe.hidden]:!1,[nxe.outside]:!1,[nxe.today]:!1},r={};for(const r in y){const n=y[r];t[r]=n.some((t=>t===e))}for(const t in g)r[t]=g[t].some((t=>t===e));return{...t,...r}}}(P,e,i),{isSelected:Z,select:N,selected:D}=tOe(e,i)??{},{blur:q,focused:B,isFocusTarget:F,moveFocus:T,setFocused:W}=Xje(e,C,H,Z??(()=>!1),i),{labelDayButton:U,labelGridcell:$,labelGrid:G,labelMonthDropdown:Y,labelNav:K,labelWeekday:X,labelWeekNumber:Q,labelWeekNumberHeader:J,labelYearDropdown:ee}=o,te=l((()=>function(e,t,r){const n=r?Pje.tz(r):e.Date?new e.Date:new Date,a=t?e.startOfISOWeek(n):e.startOfWeek(n),o=[];for(let t=0;t<7;t++){const r=e.addDays(a,t);o.push(r)}return o}(i,e.ISOWeek,e.timeZone)),[i,e.ISOWeek,e.timeZone]),re=void 0!==u||void 0!==f,ne=a((()=>{I&&(V(I),b?.(I))}),[I,V,b]),ae=a((()=>{S&&(V(S),g?.(S))}),[V,S,g]),oe=a(((e,t)=>r=>{r.preventDefault(),r.stopPropagation(),W(e),N?.(e.date,t,r),f?.(e.date,t,r)}),[N,f,W]),le=a(((e,t)=>r=>{W(e),p?.(e.date,t,r)}),[p,W]),ie=a(((e,t)=>r=>{q(),h?.(e.date,t,r)}),[q,h]),se=a(((t,r)=>n=>{const a={ArrowLeft:["day","rtl"===e.dir?"after":"before"],ArrowRight:["day","rtl"===e.dir?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[n.shiftKey?"year":"month","before"],PageDown:[n.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(a[n.key]){n.preventDefault(),n.stopPropagation();const[e,t]=a[n.key];T(e,t)}v?.(t.date,r,n)}),[T,v,e.dir]),ce=a(((e,t)=>r=>{m?.(e.date,t,r)}),[m]),de=a(((e,t)=>r=>{y?.(e.date,t,r)}),[y]),ue=a((e=>t=>{const r=Number(t.target.value),n=i.setMonth(i.startOfMonth(e),r);V(n)}),[i,V]),he=a((e=>t=>{const r=Number(t.target.value),n=i.setYear(i.startOfMonth(e),r);V(n)}),[i,V]),{className:fe,style:pe}=l((()=>({className:[c[rxe.Root],e.className].filter(Boolean).join(" "),style:{...w?.[rxe.Root],...e.style}})),[c,e.className,e.style,w]),ve=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0};return Object.entries(e).forEach((([e,r])=>{e.startsWith("data-")&&(t[e]=r)})),t}(e),me={dayPickerProps:e,selected:D,select:N,isSelected:Z,months:A,nextMonth:S,previousMonth:I,goToMonth:V,getModifiers:H,components:r,classNames:c,styles:w,labels:o,formatters:n};return t.createElement(uje.Provider,{value:me},t.createElement(r.Root,{className:fe,style:pe,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,role:e.role,"aria-label":e["aria-label"],...ve},t.createElement(r.Months,{className:c[rxe.Months],style:w?.[rxe.Months]},!e.hideNavigation&&t.createElement(r.Nav,{className:c[rxe.Nav],style:w?.[rxe.Nav],"aria-label":K(),onPreviousClick:ne,onNextClick:ae,previousMonth:I,nextMonth:S}),A.map(((a,o)=>{const l=function(e,t,r,n,a){if(!t)return;if(!r)return;const{addMonths:o,startOfMonth:l}=a,i=e.getFullYear(),s=[];let c=t;for(;s.length<12;)s.push(c.getMonth()),c=o(c,1);const d=s.sort(((e,t)=>e-t)),u=d.map((e=>{const o=n.formatMonthDropdown(e,a.options.locale??Rxe),s=a.Date?new a.Date(i,e):new Date(i,e);return{value:e,label:o,disabled:t&&s<l(t)||r&&s>l(r)||!1}}));return u}(a.date,R,L,n,i),h=function(e,t,r,n){if(!e)return;if(!t)return;const{startOfYear:a,endOfYear:o,addYears:l,isBefore:i,isSameYear:s}=n,c=a(e),d=o(t),u=[];let h=c;for(;i(h,d)||s(h,d);)u.push(h.getFullYear()),h=l(h,1);return u.map((e=>({value:e,label:r.formatYearDropdown(e),disabled:!1})))}(R,L,n,i);return t.createElement(r.Month,{className:c[rxe.Month],style:w?.[rxe.Month],key:o,displayIndex:o,calendarMonth:a},t.createElement(r.MonthCaption,{className:c[rxe.MonthCaption],style:w?.[rxe.MonthCaption],calendarMonth:a,displayIndex:o},d?.startsWith("dropdown")?t.createElement(r.DropdownNav,{className:c[rxe.Dropdowns],style:w?.[rxe.Dropdowns]},"dropdown"===d||"dropdown-months"===d?t.createElement(r.MonthsDropdown,{className:c[rxe.MonthsDropdown],"aria-label":Y(),classNames:c,components:r,disabled:Boolean(e.disableNavigation),onChange:ue(a.date),options:l,style:w?.[rxe.Dropdown],value:a.date.getMonth()}):t.createElement("span",{role:"status","aria-live":"polite"},x(a.date.getMonth(),s)),"dropdown"===d||"dropdown-years"===d?t.createElement(r.YearsDropdown,{className:c[rxe.YearsDropdown],"aria-label":ee(i.options),classNames:c,components:r,disabled:Boolean(e.disableNavigation),onChange:he(a.date),options:h,style:w?.[rxe.Dropdown],value:a.date.getFullYear()}):t.createElement("span",{role:"status","aria-live":"polite"},z(a.date.getFullYear()))):t.createElement(r.CaptionLabel,{className:c[rxe.CaptionLabel],role:"status","aria-live":"polite"},_(a.date,i.options,i))),t.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===u||"range"===u,"aria-label":G(a.date,i.options,i)||void 0,className:c[rxe.MonthGrid],style:w?.[rxe.MonthGrid]},!e.hideWeekdays&&t.createElement(r.Weekdays,{className:c[rxe.Weekdays],style:w?.[rxe.Weekdays]},k&&t.createElement(r.WeekNumberHeader,{"aria-label":J(i.options),className:c[rxe.WeekNumberHeader],style:w?.[rxe.WeekNumberHeader],scope:"col"},O()),te.map(((e,n)=>t.createElement(r.Weekday,{"aria-label":X(e,i.options,i),className:c[rxe.Weekday],key:n,style:w?.[rxe.Weekday],scope:"col"},E(e,i.options,i))))),t.createElement(r.Weeks,{className:c[rxe.Weeks],style:w?.[rxe.Weeks]},a.weeks.map(((n,a)=>t.createElement(r.Week,{className:c[rxe.Week],key:n.weekNumber,style:w?.[rxe.Week],week:n},k&&t.createElement(r.WeekNumber,{week:n,style:w?.[rxe.WeekNumber],"aria-label":Q(n.weekNumber,{locale:s}),className:c[rxe.WeekNumber],scope:"row",role:"rowheader"},j(n.weekNumber)),n.days.map((n=>{const{date:a}=n,o=H(n);if(o[nxe.focused]=!o.hidden&&Boolean(B?.isEqualTo(n)),o[axe.selected]=!o.disabled&&(Z?.(a)||o.selected),Tje(D)){const{from:e,to:t}=D;o[axe.range_start]=Boolean(e&&t&&i.isSameDay(a,e)),o[axe.range_end]=Boolean(e&&t&&i.isSameDay(a,t)),o[axe.range_middle]=Bje(D,a,!0,i)}const l=function(e,t={},r={}){let n={...t?.[rxe.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{n={...n,...r?.[e]}})),n}(o,w,e.modifiersStyles),s=function(e,t,r={}){const n=Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[n])=>(r[n]?e.push(r[n]):t[nxe[n]]?e.push(t[nxe[n]]):t[axe[n]]&&e.push(t[axe[n]]),e)),[t[rxe.Day]]);return n}(o,c,e.modifiersClassNames),d=re||o.hidden?void 0:$(a,o,i.options,i);return t.createElement(r.Day,{key:`${i.format(a,"yyyy-MM-dd")}_${i.format(n.displayMonth,"yyyy-MM")}`,day:n,modifiers:o,className:s.join(" "),style:l,role:"gridcell","aria-selected":o.selected||void 0,"aria-label":d,"data-day":i.format(a,"yyyy-MM-dd"),"data-month":n.outside?i.format(a,"yyyy-MM"):void 0,"data-selected":o.selected||void 0,"data-disabled":o.disabled||void 0,"data-hidden":o.hidden||void 0,"data-outside":n.outside||void 0,"data-focused":o.focused||void 0,"data-today":o.today||void 0},!o.hidden&&re?t.createElement(r.DayButton,{className:c[rxe.DayButton],style:w?.[rxe.DayButton],type:"button",day:n,modifiers:o,disabled:o.disabled||void 0,tabIndex:F(n)?0:-1,"aria-label":U(a,o,i.options,i),onClick:oe(n,o),onBlur:ie(n,o),onFocus:le(n,o),onKeyDown:se(n,o),onMouseEnter:ce(n,o),onMouseLeave:de(n,o)},M(a,i.options,i)):!o.hidden&&M(n.date,i.options,i))}))))))))}))),e.footer&&t.createElement(r.Footer,{className:c[rxe.Footer],style:w?.[rxe.Footer],role:"status","aria-live":"polite"},e.footer)))}function nOe(e){var{className:t,classNames:r,showOutsideDays:n=!0}=e,a=EM(e,["className","classNames","showOutsideDays"]);const o=vje();return w(rOe,Object.assign({showOutsideDays:n,captionLayout:"dropdown-years"},a,{className:PM("bg-bg-bg1 text-common-black border-bg-bg1",t),classNames:Object.assign(Object.assign(Object.assign({},o),{day_button:PM(o.day_button,"size-9"),day:"typography-subtitle1 ",today:"text-bold text-common-black [&_button]:rounded-full [&_button]:!border-primary [&_button]:!border [&_button]:!border-solid",selected:"bg-primary !text-state-primary-text-solid rounded-full ",weekdays:"text-gray-400",month_caption:PM(o.month_caption,"h-[54px]"),outside:"text-gray-400",nav:PM(o.nav,"gap-6 absolute flex right-0"),chevron:"fill-primary",root:PM(o.root,"px-6 py-4"),caption_label:PM(o.caption_label,"gap-2 flex items-center"),months:"flex flex-col relative",disabled:"[&_button]:rounded-full [&_button]:!text-input-disable-text"}),r),styles:{caption_label:{zIndex:1,position:"relative",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",border:0},dropdown:{zIndex:2,opacity:0,WebkitAppearance:"none",MozAppearance:"none",appearance:"none",position:"absolute",insetBlockStart:0,insetBlockEnd:0,insetInlineStart:0,width:"100%",margin:0,padding:0,cursor:"inherit",border:"none",lineHeight:"inherit"},dropdowns:{position:"relative",display:"inline-flex",alignItems:"center",gap:4},dropdown_root:{position:"relative",display:"inline-flex",alignItems:"center"}}}))}nOe.displayName="Calendar";var aOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...a}=e,o=n?W_e:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),w(o,{...a,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});function oOe(t,r=globalThis?.document){const n=Z_e(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[n,r])}var lOe,iOe="dismissableLayer.update",sOe="dismissableLayer.pointerDownOutside",cOe="dismissableLayer.focusOutside",dOe=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uOe=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:i,onDismiss:s,...c}=t,d=e.useContext(dOe),[u,h]=e.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=e.useState({}),v=I_e(r,(e=>h(e))),m=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),b=u?m.indexOf(u):-1,k=d.layersWithOutsidePointerEventsDisabled.size>0,_=b>=g,M=function(t,r=globalThis?.document){const n=Z_e(t),a=e.useRef(!1),o=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!a.current){let t=function(){fOe(sOe,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",o.current),o.current=t,r.addEventListener("click",o.current,{once:!0})):t()}else r.removeEventListener("click",o.current);a.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",o.current)}}),[r,n]),{onPointerDownCapture:()=>a.current=!0}}((e=>{const t=e.target,r=[...d.branches].some((e=>e.contains(t)));_&&!r&&(o?.(e),i?.(e),e.defaultPrevented||s?.())}),f),x=function(t,r=globalThis?.document){const n=Z_e(t),a=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!a.current){fOe(cOe,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(l?.(e),i?.(e),e.defaultPrevented||s?.())}),f);return oOe((e=>{b===d.layers.size-1&&(a?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),f),e.useEffect((()=>{if(u)return n&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(lOe=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),hOe(),()=>{n&&1===d.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=lOe)}}),[u,f,n,d]),e.useEffect((()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),hOe())}),[u,d]),e.useEffect((()=>{const e=()=>p({});return document.addEventListener(iOe,e),()=>document.removeEventListener(iOe,e)}),[]),w(aOe.div,{...c,ref:v,style:{pointerEvents:k?_?"auto":"none":void 0,...t.style},onFocusCapture:H_e(t.onFocusCapture,x.onFocusCapture),onBlurCapture:H_e(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:H_e(t.onPointerDownCapture,M.onPointerDownCapture)})}));uOe.displayName="DismissableLayer";function hOe(){const e=new CustomEvent(iOe);document.dispatchEvent(e)}function fOe(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?function(e,t){e&&O.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}e.forwardRef(((t,r)=>{const n=e.useContext(dOe),a=e.useRef(null),o=I_e(r,a);return e.useEffect((()=>{const e=a.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),w(aOe.div,{...t,ref:o})})).displayName="DismissableLayerBranch";var pOe=0;function vOe(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mOe()),document.body.insertAdjacentElement("beforeend",e[1]??mOe()),pOe++,()=>{1===pOe&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),pOe--}}),[])}function mOe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var yOe="focusScope.autoFocusOnMount",gOe="focusScope.autoFocusOnUnmount",bOe={bubbles:!1,cancelable:!0},kOe=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...i}=t,[s,c]=e.useState(null),d=Z_e(o),u=Z_e(l),h=e.useRef(null),f=I_e(r,(e=>c(e))),p=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(a){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?h.current=t:xOe(h.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||xOe(h.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&xOe(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[a,s,p.paused]),e.useEffect((()=>{if(s){jOe.add(p);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(yOe,bOe);s.addEventListener(yOe,d),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(xOe(n,{select:t}),document.activeElement!==r)return}((e=wOe(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&xOe(s))}return()=>{s.removeEventListener(yOe,d),setTimeout((()=>{const e=new CustomEvent(gOe,bOe);s.addEventListener(gOe,u),s.dispatchEvent(e),e.defaultPrevented||xOe(t??document.body,{select:!0}),s.removeEventListener(gOe,u),jOe.remove(p)}),0)}}var e}),[s,d,u,p]);const v=e.useCallback((e=>{if(!n&&!a)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[a,o]=function(e){const t=wOe(e),r=_Oe(t,e),n=_Oe(t.reverse(),e);return[r,n]}(t);a&&o?e.shiftKey||r!==o?e.shiftKey&&r===a&&(e.preventDefault(),n&&xOe(o,{select:!0})):(e.preventDefault(),n&&xOe(a,{select:!0})):r===t&&e.preventDefault()}}),[n,a,p.paused]);return w(aOe.div,{tabIndex:-1,...i,ref:f,onKeyDown:v})}));function wOe(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _Oe(e,t){for(const r of e)if(!MOe(r,{upTo:t}))return r}function MOe(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function xOe(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}kOe.displayName="FocusScope";var jOe=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=OOe(e,t),e.unshift(t)},remove(t){e=OOe(e,t),e[0]?.resume()}}}();function OOe(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var EOe=e["useId".toString()]||(()=>{}),zOe=0;function COe(t){const[r,n]=e.useState(EOe());return q_e((()=>{t||n((e=>e??String(zOe++)))}),[t]),t||(r?`radix-${r}`:"")}var POe=e.forwardRef(((e,t)=>{const{children:r,width:n=10,height:a=5,...o}=e;return w(aOe.svg,{...o,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:w("polygon",{points:"0,0 30,0 15,10"})})}));POe.displayName="Arrow";var AOe=POe;function ROe(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const a=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:a})),[a])}};return n.scopeName=r.scopeName,n}var LOe="Popper",[IOe,SOe]=function(t,r=[]){let n=[];const a=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const a=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:a}})),[n,a])}};return a.scopeName=t,[function(r,a){const o=e.createContext(a),l=n.length;function i(r){const{scope:n,children:a,...i}=r,s=n?.[t][l]||o,c=e.useMemo((()=>i),Object.values(i));return w(s.Provider,{value:c,children:a})}return n=[...n,a],i.displayName=r+"Provider",[i,function(n,i){const s=i?.[t][l]||o,c=e.useContext(s);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},ROe(a,...r)]}(LOe),[VOe,HOe]=IOe(LOe),ZOe=t=>{const{__scopePopper:r,children:n}=t,[a,o]=e.useState(null);return w(VOe,{scope:r,anchor:a,onAnchorChange:o,children:n})};ZOe.displayName=LOe;var NOe="PopperAnchor",DOe=e.forwardRef(((t,r)=>{const{__scopePopper:n,virtualRef:a,...o}=t,l=HOe(NOe,n),i=e.useRef(null),s=I_e(r,i);return e.useEffect((()=>{l.onAnchorChange(a?.current||i.current)})),a?null:w(aOe.div,{...o,ref:s})}));DOe.displayName=NOe;var qOe="PopperContent",[BOe,FOe]=IOe(qOe),TOe=e.forwardRef(((t,r)=>{const{__scopePopper:n,side:a="bottom",sideOffset:o=0,align:l="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:v,...m}=t,y=HOe(qOe,n),[g,b]=e.useState(null),k=I_e(r,(e=>b(e))),[_,M]=e.useState(null),x=B_e(_),j=x?.width??0,O=x?.height??0,E=a+("center"!==l?"-"+l:""),z="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},C=Array.isArray(d)?d:[d],P=C.length>0,A={padding:z,boundary:C.filter(GOe),altBoundary:P},{refs:R,floatingStyles:L,placement:I,isPositioned:S,middlewareData:V}=owe({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>Tke(...e,{animationFrame:"always"===p}),elements:{reference:y.anchor},middleware:[iwe({mainAxis:o+O,alignmentAxis:i}),c&&swe({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?cwe():void 0,...A}),c&&dwe({...A}),uwe({...A,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:a,height:o}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${r}px`),l.setProperty("--radix-popper-available-height",`${n}px`),l.setProperty("--radix-popper-anchor-width",`${a}px`),l.setProperty("--radix-popper-anchor-height",`${o}px`)}}),_&&fwe({element:_,padding:s}),YOe({arrowWidth:j,arrowHeight:O}),f&&hwe({strategy:"referenceHidden",...A})]}),[H,Z]=KOe(I),N=Z_e(v);q_e((()=>{S&&N?.()}),[S,N]);const D=V.arrow?.x,q=V.arrow?.y,B=0!==V.arrow?.centerOffset,[F,T]=e.useState();return q_e((()=>{g&&T(window.getComputedStyle(g).zIndex)}),[g]),w("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:S?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:w(BOe,{scope:n,placedSide:H,onArrowChange:M,arrowX:D,arrowY:q,shouldHideArrow:B,children:w(aOe.div,{"data-side":H,"data-align":Z,...m,ref:k,style:{...m.style,animation:S?void 0:"none"}})})})}));TOe.displayName=qOe;var WOe="PopperArrow",UOe={top:"bottom",right:"left",bottom:"top",left:"right"},$Oe=e.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,a=FOe(WOe,r),o=UOe[a.placedSide];return w("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:w(AOe,{...n,ref:t,style:{...n.style,display:"block"}})})}));function GOe(e){return null!==e}$Oe.displayName=WOe;var YOe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:a}=t,o=0!==a.arrow?.centerOffset,l=o?0:e.arrowWidth,i=o?0:e.arrowHeight,[s,c]=KOe(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(a.arrow?.x??0)+l/2,h=(a.arrow?.y??0)+i/2;let f="",p="";return"bottom"===s?(f=o?d:`${u}px`,p=-i+"px"):"top"===s?(f=o?d:`${u}px`,p=`${n.floating.height+i}px`):"right"===s?(f=-i+"px",p=o?d:`${h}px`):"left"===s&&(f=`${n.floating.width+i}px`,p=o?d:`${h}px`),{data:{x:f,y:p}}}});function KOe(e){const[t,r="center"]=e.split("-");return[t,r]}var XOe=ZOe,QOe=DOe,JOe=TOe,eEe=$Oe,tEe=e.forwardRef(((t,r)=>{const{container:n,...a}=t,[o,l]=e.useState(!1);q_e((()=>l(!0)),[]);const i=n||o&&globalThis?.document?.body;return i?E.createPortal(w(aOe.div,{...a,ref:r}),i):null}));tEe.displayName="Portal";var rEe=t=>{const{present:r,children:n}=t,a=function(t){const[r,n]=e.useState(),a=e.useRef({}),o=e.useRef(t),l=e.useRef("none"),i=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=nEe(a.current);l.current="mounted"===s?e:"none"}),[s]),q_e((()=>{const e=a.current,r=o.current;if(r!==t){const n=l.current,a=nEe(e);if(t)c("MOUNT");else if("none"===a||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=t}}),[t,c]),q_e((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const l=nEe(a.current).includes(n.animationName);if(n.target===r&&l&&(c("ANIMATION_END"),!o.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},i=e=>{e.target===r&&(l.current=nEe(a.current))};return r.addEventListener("animationstart",i),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",i),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(a.current=getComputedStyle(e)),n(e)}),[])}}(r),o="function"==typeof n?n({present:a.isPresent}):e.Children.only(n),l=I_e(a.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||a.isPresent?e.cloneElement(o,{ref:l}):null};function nEe(e){return e?.animationName||"none"}rEe.displayName="Presence";var aEe=new WeakMap,oEe=new WeakMap,lEe={},iEe=0,sEe=function(e){return e&&(e.host||sEe(e.parentNode))},cEe=function(e,t,r,n){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=sEe(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);lEe[r]||(lEe[r]=new WeakMap);var o=lEe[r],l=[],i=new Set,s=new Set(a),c=function(e){e&&!i.has(e)&&(i.add(e),c(e.parentNode))};a.forEach(c);var d=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))d(e);else try{var t=e.getAttribute(n),a=null!==t&&"false"!==t,s=(aEe.get(e)||0)+1,c=(o.get(e)||0)+1;aEe.set(e,s),o.set(e,c),l.push(e),1===s&&a&&oEe.set(e,!0),1===c&&e.setAttribute(r,"true"),a||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return d(t),i.clear(),iEe++,function(){l.forEach((function(e){var t=aEe.get(e)-1,a=o.get(e)-1;aEe.set(e,t),o.set(e,a),t||(oEe.has(e)||e.removeAttribute(n),oEe.delete(e)),a||e.removeAttribute(r)})),--iEe||(aEe=new WeakMap,aEe=new WeakMap,oEe=new WeakMap,lEe={})}},dEe=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),cEe(n,a,r,"aria-hidden")):function(){return null}},uEe="right-scroll-bar-position",hEe="width-before-scroll-bar";function fEe(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var pEe="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,vEe=new WeakMap;function mEe(e,t){var r,n,a,o=(r=null,n=function(t){return e.forEach((function(e){return fEe(e,t)}))},(a=i((function(){return{value:r,callback:n,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=n,a.facade);return pEe((function(){var t=vEe.get(o);if(t){var r=new Set(t),n=new Set(e),a=o.current;r.forEach((function(e){n.has(e)||fEe(e,null)})),n.forEach((function(e){r.has(e)||fEe(e,a)}))}vEe.set(o,e)}),[e]),o}function yEe(e){return e}var gEe=function(t){var r=t.sideCar,n=EM(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=r.read();if(!a)throw new Error("Sidecar medium not found");return e.createElement(a,OM({},n))};gEe.isSideCarExport=!0;var bEe=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=yEe);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var a=t(e,n);return r.push(a),function(){r=r.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var a=r;r=[],a.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},l=function(){return Promise.resolve().then(o)};l(),r={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),r}}}};return a}(null);return t.options=OM({async:!0,ssr:!1},e),t}(),kEe=function(){},wEe=e.forwardRef((function(t,r){var n=e.useRef(null),a=e.useState({onScrollCapture:kEe,onWheelCapture:kEe,onTouchMoveCapture:kEe}),o=a[0],l=a[1],i=t.forwardProps,s=t.children,c=t.className,d=t.removeScrollBar,u=t.enabled,h=t.shards,f=t.sideCar,p=t.noIsolation,v=t.inert,m=t.allowPinchZoom,y=t.as,g=void 0===y?"div":y,b=t.gapMode,k=EM(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,_=mEe([n,r]),M=OM(OM({},k),o);return e.createElement(e.Fragment,null,u&&e.createElement(w,{sideCar:bEe,removeScrollBar:d,shards:h,noIsolation:p,inert:v,setCallbacks:l,allowPinchZoom:!!m,lockRef:n,gapMode:b}),i?e.cloneElement(e.Children.only(s),OM(OM({},M),{ref:_})):e.createElement(g,OM({},M,{className:c,ref:_}),s))}));wEe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wEe.classNames={fullWidth:hEe,zeroRight:uEe};function _Ee(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var MEe=function(){var e=0,t=null;return{add:function(r){0==e&&(t=_Ee())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,r),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xEe=function(){var t=function(){var t=MEe();return function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])}}();return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},jEe={left:0,top:0,right:0,gap:0},OEe=function(e){return parseInt(e||"",10)||0},EEe=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return jEe;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[OEe(r),OEe(n),OEe(a)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},zEe=xEe(),CEe="data-scroll-locked",PEe=function(e,t,r,n){var a=e.left,o=e.top,l=e.right,i=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(i,"px ").concat(n,";\n }\n body[").concat(CEe,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(uEe," {\n right: ").concat(i,"px ").concat(n,";\n }\n \n .").concat(hEe," {\n margin-right: ").concat(i,"px ").concat(n,";\n }\n \n .").concat(uEe," .").concat(uEe," {\n right: 0 ").concat(n,";\n }\n \n .").concat(hEe," .").concat(hEe," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(CEe,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},AEe=function(){var e=parseInt(document.body.getAttribute(CEe)||"0",10);return isFinite(e)?e:0},REe=function(t){var r=t.noRelative,n=t.noImportant,a=t.gapMode,o=void 0===a?"margin":a;e.useEffect((function(){return document.body.setAttribute(CEe,(AEe()+1).toString()),function(){var e=AEe()-1;e<=0?document.body.removeAttribute(CEe):document.body.setAttribute(CEe,e.toString())}}),[]);var l=e.useMemo((function(){return EEe(o)}),[o]);return e.createElement(zEe,{styles:PEe(l,!r,o,n?"":"!important")})},LEe=!1;if("undefined"!=typeof window)try{var IEe=Object.defineProperty({},"passive",{get:function(){return LEe=!0,!0}});window.addEventListener("test",IEe,IEe),window.removeEventListener("test",IEe,IEe)}catch(e){LEe=!1}var SEe=!!LEe&&{passive:!1},VEe=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},HEe=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),ZEe(e,n)){var a=NEe(e,n);if(a[1]>a[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ZEe=function(e,t){return"v"===e?function(e){return VEe(e,"overflowY")}(t):function(e){return VEe(e,"overflowX")}(t)},NEe=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},DEe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qEe=function(e){return[e.deltaX,e.deltaY]},BEe=function(e){return e&&"current"in e?e.current:e},FEe=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},TEe=0,WEe=[];function UEe(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var $Ee,GEe=($Ee=function(t){var r=e.useRef([]),n=e.useRef([0,0]),a=e.useRef(),o=e.useState(TEe++)[0],l=e.useState(xEe)[0],i=e.useRef(t);e.useEffect((function(){i.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var e=function(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(BEe),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var r,o=DEe(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-o[0],c="deltaY"in e?e.deltaY:l[1]-o[1],d=e.target,u=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var h=HEe(u,d);if(!h)return!0;if(h?r=u:(r="v"===u?"h":"v",h=HEe(u,d)),!h)return!1;if(!a.current&&"changedTouches"in e&&(s||c)&&(a.current=r),!r)return!0;var f=a.current||r;return function(e,t,r,n,a){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),l=o*n,i=r.target,s=t.contains(i),c=!1,d=l>0,u=0,h=0;do{var f=NEe(e,i),p=f[0],v=f[1]-f[2]-o*p;(p||v)&&ZEe(e,i)&&(u+=v,h+=p),i=i instanceof ShadowRoot?i.host:i.parentNode}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return d&&(Math.abs(u)<1||!a)?c=!0:d||!(Math.abs(h)<1)&&a||(c=!0),c}(f,t,e,"h"===f?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(WEe.length&&WEe[WEe.length-1]===l){var n="deltaY"in t?qEe(t):DEe(t),a=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)}))[0];if(a&&a.should)t.cancelable&&t.preventDefault();else if(!a){var o=(i.current.shards||[]).map(BEe).filter(Boolean).filter((function(e){return e.contains(t.target)}));(o.length>0?s(t,o[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),d=e.useCallback((function(e,t,n,a){var o={name:e,delta:t,target:n,should:a,shadowParent:UEe(n)};r.current.push(o),setTimeout((function(){r.current=r.current.filter((function(e){return e!==o}))}),1)}),[]),u=e.useCallback((function(e){n.current=DEe(e),a.current=void 0}),[]),h=e.useCallback((function(e){d(e.type,qEe(e),e.target,s(e,t.lockRef.current))}),[]),f=e.useCallback((function(e){d(e.type,DEe(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return WEe.push(l),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,SEe),document.addEventListener("touchmove",c,SEe),document.addEventListener("touchstart",u,SEe),function(){WEe=WEe.filter((function(e){return e!==l})),document.removeEventListener("wheel",c,SEe),document.removeEventListener("touchmove",c,SEe),document.removeEventListener("touchstart",u,SEe)}}),[]);var p=t.removeScrollBar,v=t.inert;return e.createElement(e.Fragment,null,v?e.createElement(l,{styles:FEe(o)}):null,p?e.createElement(REe,{gapMode:t.gapMode}):null)},bEe.useMedium($Ee),gEe),YEe=e.forwardRef((function(t,r){return e.createElement(wEe,OM({},t,{ref:r,sideCar:GEe}))}));YEe.classNames=wEe.classNames;var KEe="Popover",[XEe,QEe]=S_e(KEe,[SOe]),JEe=SOe(),[eze,tze]=XEe(KEe),rze=t=>{const{__scopePopover:r,children:n,open:a,defaultOpen:o,onOpenChange:l,modal:i=!1}=t,s=JEe(r),c=e.useRef(null),[d,u]=e.useState(!1),[h=!1,f]=N_e({prop:a,defaultProp:o,onChange:l});return w(XOe,{...s,children:w(eze,{scope:r,contentId:COe(),triggerRef:c,open:h,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),hasCustomAnchor:d,onCustomAnchorAdd:e.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>u(!1)),[]),modal:i,children:n})})};rze.displayName=KEe;var nze="PopoverAnchor";e.forwardRef(((t,r)=>{const{__scopePopover:n,...a}=t,o=tze(nze,n),l=JEe(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return e.useEffect((()=>(i(),()=>s())),[i,s]),w(QOe,{...l,...a,ref:r})})).displayName=nze;var aze="PopoverTrigger",oze=e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,a=tze(aze,r),o=JEe(r),l=I_e(t,a.triggerRef),i=w(aOe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":mze(a.open),...n,ref:l,onClick:H_e(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?i:w(QOe,{asChild:!0,...o,children:i})}));oze.displayName=aze;var lze="PopoverPortal",[ize,sze]=XEe(lze,{forceMount:void 0}),cze=e=>{const{__scopePopover:t,forceMount:r,children:n,container:a}=e,o=tze(lze,t);return w(ize,{scope:t,forceMount:r,children:w(rEe,{present:r||o.open,children:w(tEe,{asChild:!0,container:a,children:n})})})};cze.displayName=lze;var dze="PopoverContent",uze=e.forwardRef(((e,t)=>{const r=sze(dze,e.__scopePopover),{forceMount:n=r.forceMount,...a}=e,o=tze(dze,e.__scopePopover);return w(rEe,{present:n||o.open,children:o.modal?w(hze,{...a,ref:t}):w(fze,{...a,ref:t})})}));uze.displayName=dze;var hze=e.forwardRef(((t,r)=>{const n=tze(dze,t.__scopePopover),a=e.useRef(null),o=I_e(r,a),l=e.useRef(!1);return e.useEffect((()=>{const e=a.current;if(e)return dEe(e)}),[]),w(YEe,{as:W_e,allowPinchZoom:!0,children:w(pze,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H_e(t.onCloseAutoFocus,(e=>{e.preventDefault(),l.current||n.triggerRef.current?.focus()})),onPointerDownOutside:H_e(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;l.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:H_e(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),fze=e.forwardRef(((t,r)=>{const n=tze(dze,t.__scopePopover),a=e.useRef(!1),o=e.useRef(!1);return w(pze,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(a.current||n.triggerRef.current?.focus(),e.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(a.current=!0,"pointerdown"===e.detail.originalEvent.type&&(o.current=!0));const r=e.target,l=n.triggerRef.current?.contains(r);l&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&o.current&&e.preventDefault()}})})),pze=e.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,...u}=e,h=tze(dze,r),f=JEe(r);return vOe(),w(kOe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:w(uOe,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:d,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:w(JOe,{"data-state":mze(h.open),role:"dialog",id:h.contentId,...f,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),vze="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,a=tze(vze,r);return w(aOe.button,{type:"button",...n,ref:t,onClick:H_e(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=vze;function mze(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,a=JEe(r);return w(eEe,{...a,...n,ref:t})})).displayName="PopoverArrow";var yze=cze,gze=uze;const bze=rze,kze=oze,wze=e.forwardRef(((e,t)=>{var{className:r,align:n="center",sideOffset:a=4}=e,o=EM(e,["className","align","sideOffset"]);return w(yze,{children:w(gze,Object.assign({ref:t,align:n,sideOffset:a,className:PM("z-50 min-w-72 rounded-md border bg-bg-bg1 border-none overflow-hidden p-0 text-common-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r)},o))})}));wze.displayName=gze.displayName;const _ze={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Mze(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const xze={date:Mze({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Mze({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Mze({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},jze={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Oze(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const Eze={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Oze({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Oze({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Oze({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Oze({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Oze({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function zze(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,(e=>e.test(l))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,(e=>e.test(l)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(l.length)}}}const Cze={ordinalNumber:function(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=r.valueCallback?r.valueCallback(l):l;return{value:l,rest:t.slice(a.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:zze({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:zze({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:zze({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:zze({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:zze({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},Pze={code:"en-US",formatDistance:(e,t,r)=>{let n;const a=_ze[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:xze,formatRelative:(e,t,r,n)=>jze[e],localize:Eze,match:Cze,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Aze={};function Rze(){return Aze}const Lze=6048e5;function Ize(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Sze(e){const t=Ize(e);return t.setHours(0,0,0,0),t}function Vze(e){const t=Ize(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Hze(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Zze(e){const t=Ize(e),r=function(e,t){const r=Sze(e),n=Sze(t),a=+r-Vze(r),o=+n-Vze(n);return Math.round((a-o)/864e5)}(t,function(e){const t=Ize(e),r=Hze(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}(t));return r+1}function Nze(e,t){const r=Rze(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Ize(e),o=a.getDay(),l=(o<n?7:0)+o-n;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function Dze(e){return Nze(e,{weekStartsOn:1})}function qze(e){const t=Ize(e),r=t.getFullYear(),n=Hze(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=Dze(n),o=Hze(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const l=Dze(o);return t.getTime()>=a.getTime()?r+1:t.getTime()>=l.getTime()?r:r-1}function Bze(e){const t=Ize(e),r=+Dze(t)-+function(e){const t=qze(e),r=Hze(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Dze(r)}(t);return Math.round(r/Lze)+1}function Fze(e,t){const r=Ize(e),n=r.getFullYear(),a=Rze(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=Hze(e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const i=Nze(l,t),s=Hze(e,0);s.setFullYear(n,0,o),s.setHours(0,0,0,0);const c=Nze(s,t);return r.getTime()>=i.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function Tze(e,t){const r=Ize(e),n=+Nze(r,t)-+function(e,t){const r=Rze(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=Fze(e,t),o=Hze(e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),Nze(o,t)}(r,t);return Math.round(n/Lze)+1}function Wze(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Uze={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Wze("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):Wze(r+1,2)},d:(e,t)=>Wze(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>Wze(e.getHours()%12||12,t.length),H:(e,t)=>Wze(e.getHours(),t.length),m:(e,t)=>Wze(e.getMinutes(),t.length),s:(e,t)=>Wze(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return Wze(Math.trunc(n*Math.pow(10,r-3)),t.length)}},$ze="midnight",Gze="noon",Yze="morning",Kze="afternoon",Xze="evening",Qze="night",Jze={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return Uze.y(e,t)},Y:function(e,t,r,n){const a=Fze(e,n),o=a>0?a:1-a;if("YY"===t){return Wze(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):Wze(o,t.length)},R:function(e,t){return Wze(qze(e),t.length)},u:function(e,t){return Wze(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Wze(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Wze(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Uze.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Wze(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=Tze(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):Wze(a,t.length)},I:function(e,t,r){const n=Bze(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Wze(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):Uze.d(e,t)},D:function(e,t,r){const n=Zze(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Wze(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Wze(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Wze(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return Wze(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(a=12===n?Gze:0===n?$ze:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(a=n>=17?Xze:n>=12?Kze:n>=4?Yze:Qze,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return Uze.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):Uze.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Wze(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Wze(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Uze.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Uze.s(e,t)},S:function(e,t){return Uze.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return tCe(n);case"XXXX":case"XX":return rCe(n);default:return rCe(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return tCe(n);case"xxxx":case"xx":return rCe(n);default:return rCe(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eCe(n,":");default:return"GMT"+rCe(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eCe(n,":");default:return"GMT"+rCe(n,":")}},t:function(e,t,r){return Wze(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,r){return Wze(e.getTime(),t.length)}};function eCe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return 0===o?r+String(a):r+String(a)+t+Wze(o,2)}function tCe(e,t){if(e%60==0){return(e>0?"-":"+")+Wze(Math.abs(e)/60,2)}return rCe(e,t)}function rCe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+Wze(Math.trunc(n/60),2)+t+Wze(n%60,2)}const nCe=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},aCe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},oCe={p:aCe,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return nCe(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",nCe(n,t)).replace("{{time}}",aCe(a,t))}},lCe=/^D+$/,iCe=/^Y+$/,sCe=["D","DD","YY","YYYY"];function cCe(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const r=Ize(e);return!isNaN(Number(r))}const dCe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uCe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hCe=/^'([^]*?)'?$/,fCe=/''/g,pCe=/[a-zA-Z]/;function vCe(e,t,r){const n=Rze(),a=n.locale??Pze,o=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,l=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ize(e);if(!cCe(i))throw new RangeError("Invalid time value");let s=t.match(uCe).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,oCe[t])(e,a.formatLong)}return e})).join("").match(dCe).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:mCe(e)};if(Jze[t])return{isToken:!0,value:e};if(t.match(pCe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(s=a.localize.preprocessor(i,s));const c={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return s.map((r=>{if(!r.isToken)return r.value;const n=r.value;(function(e){return iCe.test(e)}(n)||function(e){return lCe.test(e)}(n))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),sCe.includes(e))throw new RangeError(n)}(n,t,String(e));return(0,Jze[n[0]])(i,n,a.localize,c)})).join("")}function mCe(e){const t=e.match(hCe);return t?t[1].replace(fCe,"'"):e}const yCe=e=>{var{date:t,onSelect:r,textInputProps:n,popoverContentProps:a}=e,o=EM(e,["date","onSelect","textInputProps","popoverContentProps"]);const[l,s]=i(!1);return w("div",{children:_(bze,{modal:!0,open:l,onOpenChange:s,children:[w(kze,{asChild:!0,children:w("div",{className:"flex",children:w($me,Object.assign({fullwidth:!0,id:"date-picker",readOnly:!0,label:"Date",size:"md",value:t?vCe(t,"dd MMM yyyy"):l?" ":"",hasClearIcon:!1,endIcon:w(Yr,{fill:"inherit",className:"cursor-pointer"})},n,{labelClassName:PM("pointer-events-none",null==n?void 0:n.labelClassName)}))})}),w(wze,Object.assign({className:"w-auto p-0 z-[100]"},a,{children:w(nOe,Object.assign({defaultMonth:t},o,{mode:"single",selected:t,onSelect:(...e)=>{null==r||r(...e),s(!1)}}))}))]})})},gCe=(e,t,r)=>Array.from(e).filter((e=>t.test(e))).slice(0,r),bCe=r((({value:e,onChange:t,onBlur:r,onComplete:a,length:o=6,disabled:i=!1,invalid:s=!1,autoFocus:d=!1,inputMode:u="numeric",charPattern:h=/^\d$/,className:f,inputClassName:p},v)=>{const m=n([]),y=n(null),g=l((()=>{const t=e||"";return Array.from({length:o},((e,r)=>t[r]||""))}),[o,e]);c(v,(()=>m.current[0]),[]);const b=e=>{const r=e.join("");t(r),a&&e.every((e=>""!==e))&&a(r)},k=e=>{var t,r;const n=Math.max(0,Math.min(o-1,e));null===(t=m.current[n])||void 0===t||t.focus(),null===(r=m.current[n])||void 0===r||r.select()};return w("div",{className:PM("flex items-center gap-3",f),ref:y,children:g.map(((e,t)=>w("input",{ref:e=>{m.current[t]=e},type:"text",inputMode:u,autoComplete:0===t?"one-time-code":"off",value:e,maxLength:1,disabled:i,autoFocus:d&&0===t,"aria-invalid":s||void 0,className:PM("h-14 w-[46px] rounded-[8px] text-input-filled-text border bg-transparent text-center text-2xl font-semibold outline-none transition-all duration-200","border-input-default-stroke focus:border-input-active-stroke","disabled:cursor-not-allowed disabled:opacity-50",s&&"border-input-error focus:border-input-error",p),onFocus:e=>{e.target.select()},onBlur:e=>{var t;const n=e.relatedTarget;n&&(null===(t=y.current)||void 0===t?void 0:t.contains(n))||null==r||r()},onChange:e=>((e,t)=>{if(i)return;if(!t){const t=[...g];return t[e]="",void b(t)}const r=gCe(t,h,o);if(!r.length)return;const n=[...g];let a=e;r.forEach((e=>{a<o&&(n[a]=e,a+=1)})),b(n),k(a<o?a:o-1)})(t,e.target.value),onPaste:e=>((e,t)=>{if(t.preventDefault(),i)return;const r=t.clipboardData.getData("text"),n=gCe(r,h,o-e);if(!n.length)return;const a=[...g];n.forEach(((t,r)=>{a[e+r]=t})),b(a);const l=Math.min(e+n.length,o-1);k(l)})(t,e),onKeyDown:e=>((e,t)=>{if(!i){if("ArrowLeft"===t.key)return t.preventDefault(),void k(e-1);if("ArrowRight"===t.key)return t.preventDefault(),void k(e+1);if("Backspace"===t.key){if(g[e]){t.preventDefault();const r=[...g];return r[e]="",void b(r)}if(e>0){t.preventDefault();const r=[...g];r[e-1]="",b(r),k(e-1)}}}})(t,e)},t)))})}));bCe.displayName="OtpInput";const kCe=t.forwardRef(((e,t)=>{var{id:r,label:n,required:a=!1,helperText:o,error:l=!1,errorMessage:i,keepFooterSpace:s=!0,wrapperClassName:c,labelClassName:d,messageClassName:u}=e,h=EM(e,["id","label","required","helperText","error","errorMessage","keepFooterSpace","wrapperClassName","labelClassName","messageClassName"]);const f=Boolean(l||i),p=f?i:o;return _("div",{className:PM("inline-flex w-full flex-col gap-2",c),children:[n&&_("label",{htmlFor:r,className:PM("typography-overline text-input-default-text",f&&"text-input-error",d),children:[n,a&&w("span",{className:"ml-1 text-input-error",children:"*"})]}),w(bCe,Object.assign({},h,{ref:t,invalid:f})),(p||s)&&w("div",{className:PM("typography-small2 min-h-[18px]",f?"text-input-error":"text-text-g-contrast-medium",u),role:f?"alert":void 0,children:p||" "})]})}));kCe.displayName="OtpInputGroup";const wCe=({progress:e=0,color:t,gradientStart:r,gradientEnd:n,animationDuration:a=.5,height:o=8,trackClassName:l,progressClassName:c})=>{const[d,u]=i(0);s((()=>{u(e)}),[e]);return w("div",{className:PM("w-full bg-grey2-transparent-16 rounded-full overflow-hidden",l),style:{height:`${o}px`},children:w("div",{className:PM("h-full rounded-full transition-all ease-out bg-primary",c),style:{width:`${d}%`,background:r&&n?`linear-gradient(to right, ${r}, ${n})`:t,transition:`width ${a}s ease-out`}})})},_Ce=e.forwardRef(((e,t)=>{var{rootClassName:r,className:n,rootRef:a}=e,o=EM(e,["rootClassName","className","rootRef"]);return w("div",{className:PM("relative h-full w-full overflow-auto",r),ref:a,children:w("table",Object.assign({ref:t,className:PM("w-full caption-bottom text-sm border-collapse",n)},o))})}));_Ce.displayName="Table";const MCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("thead",Object.assign({ref:t,className:PM("[&_tr]:border-b bg-secondary-80",r)},n))}));MCe.displayName="TableHeader";const xCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("tbody",Object.assign({ref:t,className:PM("[&_tr:last-child]:border-0",r)},n))}));xCe.displayName="TableBody";const jCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("tfoot",Object.assign({ref:t,className:PM("border-t bg-transparent-grey2-8 font-medium [&>tr]:last:border-b-0",r)},n))}));jCe.displayName="TableFooter";const OCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("tr",Object.assign({ref:t,className:PM("border-b transition-colors hover:bg-transparent-grey2-8 data-[state=selected]:bg-grey-20",r)},n))}));OCe.displayName="TableRow";const ECe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("th",Object.assign({ref:t,className:PM(" h-12 py-3 px-6 text-left align-middle typography-body2 text-text-g-contrast-low [&:has([role=checkbox])]:pr-4 [&:has([role=checkbox])]:w-4",r)},n))}));ECe.displayName="TableHead";const zCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("td",Object.assign({ref:t,className:PM(" py-3 px-6 text-left align-middle typography-body3 text-text-g-contrast-low [&:has([role=checkbox])]:pr-4 [&:has([role=checkbox])]:w-4",r)},n))}));zCe.displayName="TableCell";const CCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("caption",Object.assign({ref:t,className:PM("mt-4 text-sm text-text-g-contrast-medium",r)},n))}));
|
|
9247
|
+
*/const Wme=UM("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);var Ume=Object.freeze({__proto__:null,default:Wme});const $me=r(((e,t)=>{var{id:r,label:o,size:i="md",rounded:s="normal",variant:c="outline",type:d="text",iconMode:u="solid",helperText:h,errorMessage:f,warningMessage:p,status:v,fullwidth:m=!0,disabled:y=!1,error:g=!1,warning:b=!1,required:k=!0,isFloatingLabel:M=!0,keepCloseIconOnValue:x=!1,keepFooterSpace:j=!0,hasClearIcon:O=!0,hasSearchIcon:E=!1,startIcon:z,endIcon:C,labelClassName:P,onClickStartIcon:A,onClickEndIcon:R,renderStartIcon:L,renderEndIcon:I,classes:S,normalize:V,format:H,trimOnCommit:Z,normalizeOnCommit:N}=e,D=EM(e,["id","label","size","rounded","variant","type","iconMode","helperText","errorMessage","warningMessage","status","fullwidth","disabled","error","warning","required","isFloatingLabel","keepCloseIconOnValue","keepFooterSpace","hasClearIcon","hasSearchIcon","startIcon","endIcon","labelClassName","onClickStartIcon","onClickEndIcon","renderStartIcon","renderEndIcon","classes","normalize","format","trimOnCommit","normalizeOnCommit"]);const q=n(null),B=r||`${d}-${o}-input`,F=function(...e){const t=n();return t.current=function(...e){return t=>{e.forEach((e=>{e&&("function"==typeof e?e(t):e.current=t)}))}}(...e),a((e=>{var r;null===(r=t.current)||void 0===r||r.call(t,e)}),[])}(t,q),T=!!z||!!L,W=!!C||!!I,U=v||(g||f?"error":b||p?"warning":"default"),$="error"===U,G="warning"===U,Y="error"===U?f:"warning"===U?p:h,K=LM({size:i,rounded:s,variant:c,fullwidth:m,disabled:y,error:$,warning:G,hasSearchIcon:"flat"===u&&T||E,hasClearIcon:"flat"===u&&W||O,leftSectionIcon:"solid"===u&&T,rightSectionIcon:"solid"===u&&W}),X=IM({size:i,disabled:y,error:$,hasSearchIcon:"flat"===u&&T||E,hasLeftSectionIcon:"solid"===u&&T,isFloatingLabel:M}),Q=SM({size:i,error:$,warning:G,disabled:y}),J=HM({size:i}),ee=ZM({size:i}),te=NM({size:i}),re=DM({size:i}),ne=qM({size:i,rounded:s,error:$,warning:G,position:"start"}),ae=qM({size:i,rounded:s,error:$,warning:G,position:"end"}),oe=a((e=>{var t;V&&(e.target.value=V(e.target.value)),null===(t=D.onChange)||void 0===t||t.call(D,e)}),[V,D.onChange]),le=a((e=>{var t;const r=e.currentTarget;let n=r.value;Z&&(n=n.trim()),N&&(n=N(n)),n!==r.value&&(r.value=n,null===(t=D.onChange)||void 0===t||t.call(D,Object.assign(Object.assign({},e),{target:r})))}),[Z,N,D.onChange]),ie=a((e=>{var t;(Z||N)&&le(e),null===(t=D.onBlur)||void 0===t||t.call(D,e)}),[Z,N,le,D.onBlur]),se=a((e=>{var t;(Z||N)&&"Enter"===e.key&&le(e),null===(t=D.onKeyDown)||void 0===t||t.call(D,e)}),[Z,N,le,D.onKeyDown]),ce=H&&"string"==typeof D.value?H(D.value):D.value,de=a((()=>{q.current&&(q.current.value="",D.onChange&&(new Event("input",{bubbles:!0}),D.onChange({target:{value:""}})))}),[D.onChange]),ue=a((()=>{y||(null==A||A(),q.current&&q.current.focus())}),[y,A]),he=a((()=>{y||(null==R||R(),q.current&&q.current.focus())}),[y,R]),fe=l((()=>{if(T)return w("div",L?{className:PM(ee,"flex",null==S?void 0:S.iconSearchWrapper),children:L()}:"flat"===u?{className:PM(ee,null==S?void 0:S.iconSearchWrapper),children:w("div",{className:PM(te,null==S?void 0:S.icon),onClick:ue,children:z})}:{className:PM(ne,null==S?void 0:S.startIconWrapper),onClick:ue,children:z})}),[T,z,u,ee,ne,te,L,ue]),pe=l((()=>{if(W)return w("div",I?{className:PM(J,"flex",null==S?void 0:S.iconWrapper),children:I()}:"flat"===u?{className:PM(J,"flex",null==S?void 0:S.iconWrapper),children:w("div",{className:PM(te,null==S?void 0:S.icon),onClick:he,children:C})}:{className:PM(ae,null==S?void 0:S.endIconWrapper),onClick:he,children:C})}),[W,C,u,J,ae,te,I,he]);return _("div",{className:"inline-flex flex-col "+(m?"w-full":""),children:[_("div",{className:"relative",children:[w("input",Object.assign({},D,{placeholder:" ",ref:F,type:d,id:B,disabled:y,value:ce,className:PM(K,D.className),onChange:V?oe:D.onChange,onBlur:Z||N?ie:D.onBlur,onKeyDown:Z||N?se:D.onKeyDown})),E&&!T&&w("div",{className:PM(ee,null==S?void 0:S.iconSearchWrapper),children:w(Xne,{className:PM(re,null==S?void 0:S.icon)})}),fe,O&&!W&&w("div",{className:PM(J,null==S?void 0:S.iconWrapper),style:{display:x&&D.value?"flex":void 0},children:w(wH,{className:PM(te,null==S?void 0:S.icon),onMouseDown:de})}),pe,_("label",{htmlFor:B,className:PM(X),children:[o," ",k&&w("span",{className:PM("text-input-error",{"text-input-disable-text":y}),children:"*"})]})]}),(Y||j)&&_("span",{className:Q,children:[Y&&w("span",{className:"h-full shrink-0",children:w(YS,{width:14,height:14,className:PM("fill-none stroke-current",$?"text-input-error":G?"text-warning":"text-input-filled-text")})}),j&&!Y&&w("span",{className:"block min-h-[14px]","aria-hidden":!0}),Y||""]})]})})),Gme={0:{pattern:/[0-9]/,placeholder:"0"},9:{pattern:/[0-9\s]/,placeholder:"9"},"#":{pattern:/[0-9\s+\-]/,placeholder:"#"},L:{pattern:/[a-zA-Z]/,placeholder:"L"},"?":{pattern:/[a-zA-Z\s]/,placeholder:"?"},"&":{pattern:/[^\s]/,placeholder:"&"},C:{pattern:/./,placeholder:"C"},A:{pattern:/[a-zA-Z0-9]/,placeholder:"A"},a:{pattern:/[a-zA-Z0-9\s]/,placeholder:"a"}},Yme=(e,t,r="_",n=!0,a=!0)=>{let o="",l=0;for(let i=0;i<t.length;i++){const s=t[i];if(s.isLiteral)o+=s.placeholder;else{let t=!1;for(;l<e.length;){const r=e[l];l++;if(s.validator?s.validator(r):s.pattern.test(r)){o+=r,t=!0;break}}if(!t&&a&&n)o+=r;else if(!t)break}}return o},Kme=(e,t)=>{let r="";for(let n=0;n<e.length&&n<t.length;n++){const a=t[n],o=e[n];a.isLiteral||(r+=o)}return r},Xme=r(((e,r)=>{var{mask:o,maskChar:l="_",showMask:d=!0,guide:u=!0,keepCharPositions:h=!1,rules:f,onMaskedChange:p,onChange:v,value:m,defaultValue:y}=e,g=EM(e,["mask","maskChar","showMask","guide","keepCharPositions","rules","onMaskedChange","onChange","value","defaultValue"]);const b=n(null),[k,_]=i(""),[M,x]=i(""),j=t.useMemo((()=>o?((e,t)=>{const r=Object.assign(Object.assign({},Gme),t),n=[];let a=0;for(;a<e.length;){const t=e[a];if("\\"===t&&a+1<e.length){const t=e[a+1];n.push({pattern:new RegExp(`^${t}$`),placeholder:t,isLiteral:!0}),a+=2}else if(r[t]){const e=r[t];"function"==typeof e?n.push({pattern:/./,placeholder:t,validator:e}):e instanceof RegExp?n.push({pattern:e,placeholder:t}):n.push({pattern:e.pattern,placeholder:e.placeholder}),a++}else n.push({pattern:new RegExp(`^${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`),placeholder:t,isLiteral:!0}),a++}return n})(o,f):null),[o,f]);s((()=>{const e=m||y||"";if(j&&e){const t=Yme(e,j,l,d,u),r=Kme(t,j);_(t),x(r)}else _(e),x(e)}),[j,l,d,u,m,y]),c(r,(()=>null==b?void 0:b.current));const O=a((e=>{const t=e.target.value;if(!j)return _(t),x(t),null==v||v(e),void(null==p||p(t,t));const r=Yme(t,j,l,d,u),n=Kme(r,j);_(r),x(n);const a=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:r})});null==v||v(a),null==p||p(r,n),setTimeout((()=>{if(b.current){const e=n.replace(/[_\s]/g,"").length,t=((e,t,r)=>{let n=0,a=0;for(let o=0;o<r.length&&o<e.length;o++){const l=r[o];if(e[o],l.isLiteral)a=o+1;else if(n++,a=o+1,n>=t)break}return a})(r,e,j);b.current.setSelectionRange(t,t)}}),0)}),[j,l,d,u,v,p]),E=a((e=>{var t,r,n;if(!j)return void(null===(t=g.onKeyDown)||void 0===t||t.call(g,e));const{key:a,ctrlKey:o,metaKey:l}=e,i=e.target.selectionStart||0;if("Backspace"===a||"Delete"===a||"ArrowLeft"===a||"ArrowRight"===a||"Home"===a||"End"===a||"Tab"===a||a.length>1||o||l)return void(null===(r=g.onKeyDown)||void 0===r||r.call(g,e));let s=i;for(;s<j.length&&j[s].isLiteral;)s++;if(s<j.length){const t=j[s];if(!(t.validator?t.validator(a):t.pattern.test(a)))return void e.preventDefault()}null===(n=g.onKeyDown)||void 0===n||n.call(g,e)}),[j,g]);return w($me,Object.assign({},g,{ref:b,value:k,onChange:O,onKeyDown:E,className:PM(g.className)}))}));async function Qme(){const{default:e}=await Promise.resolve().then((function(){return ETe}));return Object.keys(e)}Xme.displayName="MaskedTextInput";const Jme=x(["text-inherit"],{variants:{color:{primary:"text-primary",secondary:"text-secondary",tertiary:"text-tertiary",success:"text-success",info:"text-info",warning:"text-warning",error:"text-error",inherit:"text-inherit"},size:{sm:"size-4",md:"size-6",lg:"size-8",inherit:""}},defaultVariants:{size:"inherit",color:"inherit"}}),eye={sm:16,md:24,lg:32},tye=e=>{var{name:r,type:n="heroicons",color:a="inherit",variant:o="solid",size:l="md",className:i}=e,s=EM(e,["name","type","color","variant","size","className"]);const[c,d]=t.useState(null);if(t.useEffect((()=>{if("lucide"===n)return void Promise.resolve().then((function(){return ETe})).then((({default:e})=>{const t=e[r];t?t().then((e=>{d((()=>e.default))})):console.warn(`Lucide icon "${r}" not found.`)}));const e=((e,t,r)=>{var n,a;return null===(a=null===(n=bM[e])||void 0===n?void 0:n[t])||void 0===a?void 0:a[r]})(n,r,o);e?d((()=>e)):console.warn(`Icon "${r}" from "${n}" not found.`)}),[r,n,o]),"lucide"===n){if(!c)return w("span",{className:PM(Jme({color:a,size:l}),i)});const e="inherit"===l?24:eye[l];return w(c,Object.assign({},s,{size:e,strokeWidth:e<=16?1.5:2,absoluteStrokeWidth:!0,shapeRendering:"geometricPrecision",className:PM(Jme({color:a,size:l}),"stroke-current",i)}))}return w(c||"svg",Object.assign({className:PM(Jme({color:a,size:l}),i)},s))},rye=r(((e,t)=>{var r,{showToggle:a=!0,hasClearIcon:o=!1,hideIcon:l,showIcon:s,endIcon:d,renderEndIcon:u,onClickEndIcon:h}=e,f=EM(e,["showToggle","hasClearIcon","hideIcon","showIcon","endIcon","renderEndIcon","onClickEndIcon"]);const p=n(null),[v,m]=i(!1);c(t,(()=>null==p?void 0:p.current));const y=v?null!=s?s:w(tye,{name:"eye",type:"lucide",size:"inherit",className:"size-full","aria-label":"Hide password"}):null!=l?l:w(tye,{name:"eye-closed",type:"lucide",size:"inherit",className:"size-full","aria-label":"Show password"});return w($me,Object.assign({iconMode:"flat"},f,{ref:p,type:v?"text":"password",hasClearIcon:o,endIcon:a?y:d,renderEndIcon:u,onClickEndIcon:a?()=>{var e;f.disabled||(m((e=>!e)),null===(e=p.current)||void 0===e||e.focus(),null==h||h())}:h,autoComplete:null!==(r=f.autoComplete)&&void 0!==r?r:"current-password"}))}));rye.displayName="PasswordInput";const nye=r(((e,r)=>{var o,{value:l,defaultValue:s,min:d,max:u,step:h=1,precision:f,hideControls:p=!1,allowDecimal:v=!0,allowNegative:m=!0,formatDisplay:y=!1,thousandSeparator:g=",",decimalSeparator:b=".",prefix:k="",suffix:M="",disabled:x=!1,onChange:j,onValueChange:O,className:E,size:z="md"}=e,C=EM(e,["value","defaultValue","min","max","step","precision","hideControls","allowDecimal","allowNegative","formatDisplay","thousandSeparator","decimalSeparator","prefix","suffix","disabled","onChange","onValueChange","className","size"]);const P=n(null),[A,R]=i((null!==(o=null!=l?l:s)&&void 0!==o?o:"").toString()),[L,I]=i(!1);c(r,(()=>null==P?void 0:P.current));const S=a((e=>{let t=e;return k&&(t=t.replace(k,"")),M&&(t=t.replace(M,"")),g&&(t=t.split(g).join("")),"."!==b&&(t=t.replace(b,".")),t.trim()}),[k,M,g,b]),V=a((e=>{if(!y||""===e||"-"===e)return e;const t=parseFloat(e);if(isNaN(t))return e;let r=t.toString();void 0!==f&&(r=t.toFixed(f));const n=r.split(".");let a=n[0];const o=n[1];return g&&(a=a.replace(/\B(?=(\d{3})+(?!\d))/g,g)),r=o?`${a}${b}${o}`:a,k&&(r=`${k}${r}`),M&&(r=`${r}${M}`),r}),[y,f,g,b,k,M]),H=a((e=>{if(""===e||"-"===e)return e;let t=parseFloat(e);return isNaN(t)?A:(void 0!==d&&t<d&&(t=d),void 0!==u&&t>u&&(t=u),void 0!==f&&(t=parseFloat(t.toFixed(f))),t.toString())}),[d,u,f,A]),Z=a((e=>{let t=e.target.value;if(y&&(t=S(t)),""===t)return R(""),null==j||j(void 0),void(null==O||O(""));if(m&&"-"===t)return R("-"),void(null==O||O("-"));if(!(v?m?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/:m?/^-?\d*$/:/^\d*$/).test(t))return;R(t),null==O||O(t);const r=parseFloat(t);isNaN(r)||null==j||j(r)}),[v,m,y,S,j,O]),N=a((e=>{var t;I(!0),null===(t=C.onFocus)||void 0===t||t.call(C,e)}),[C]),D=a((e=>{var t;I(!1);const r=H(A);R(r);const n=parseFloat(r);isNaN(n)||null==j||j(n),null===(t=C.onBlur)||void 0===t||t.call(C,e)}),[A,H,j,C]),q=a((e=>{if(x)return;e.stopPropagation(),e.preventDefault();let t=(parseFloat(A)||0)+h;void 0!==u&&t>u&&(t=u);const r=H(t.toString());R(r),null==j||j(parseFloat(r)),null==O||O(r)}),[A,h,u,x,H,j,O]),B=a((e=>{if(x)return;e.stopPropagation(),e.preventDefault();let t=(parseFloat(A)||0)-h;void 0!==d&&t<d&&(t=d);const r=H(t.toString());R(r),null==j||j(parseFloat(r)),null==O||O(r)}),[A,h,d,x,H,j,O]),F=a((e=>{var t;switch(e.key){case"ArrowUp":q(e);break;case"ArrowDown":B(e);break;case"Enter":e.currentTarget.blur()}null===(t=C.onKeyDown)||void 0===t||t.call(C,e)}),[q,B,C]);t.useEffect((()=>{void 0!==l&&R(l.toString())}),[l]);const T=t.useMemo((()=>L||!y?A:V(A)),[L,y,A,V]),W={sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6"}[z],U={sm:"absolute top-0.5",md:"absolute top-1",lg:"absolute top-1"}[z];return w($me,Object.assign({},C,{ref:P,type:"text",inputMode:"decimal",value:T,onChange:Z,onFocus:N,onBlur:D,onKeyDown:F,disabled:x,size:z,hasClearIcon:!1,endIcon:p?null:_("div",{className:PM("flex flex-col","flat"===C.iconMode&&U),children:[w("button",{type:"button",onClick:q,disabled:x||void 0!==u&&parseFloat(A)>=u,className:PM(" hover:bg-input-active-stroke/10 disabled:opacity-30 disabled:cursor-not-allowed transition-colors rounded-full text-input-filled-text"),tabIndex:-1,children:w(Bn,{className:W})}),w("button",{type:"button",onClick:B,disabled:x||void 0!==d&&parseFloat(A)<=d,className:PM(" hover:bg-input-active-stroke/10 disabled:opacity-30 disabled:cursor-not-allowed transition-colors rounded-full text-input-filled-text"),tabIndex:-1,children:w(In,{className:W})})]}),className:PM(E)}))}));nye.displayName="NumberInput";const aye=x(["peer block w-full bg-transparent outline-none placeholder:text-transparent resize-y ui-scrollbar","text-input-filled-text caret-primary"],{variants:{size:{sm:"p-2 px-3 typography-small1",md:"py-2 px-3 typography-subtitle4",lg:"p-4 typography-subtitle1"},rounded:{none:"rounded-none",normal:"rounded-md",full:"rounded-full"},variant:{flat:"",outline:["ring-1 ring-inset ring-input-default-stroke","hover:ring-input-active-stroke","focus:ring-1 focus:ring-inset focus:ring-input-active-stroke"],underline:"border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-stroke"},fullwidth:{true:"w-full"},disabled:{true:["bg-input-disable-bg text-input-disable-text ring-input-disable-stroke placeholder:text-input-disable-text","hover:ring-input-disable-stroke","cursor-not-allowed"]},error:{true:"ring-input-error focus:ring-input-error"},hasClearIcon:{true:""},isFloatingLabel:{true:"",false:"placeholder:text-input-placeholder"}},compoundVariants:[{variant:"underline",className:"rounded-none"},{hasClearIcon:!0,size:"sm",className:"focus:pe-6"},{hasClearIcon:!0,size:"md",className:"focus:pe-8"},{hasClearIcon:!0,size:"lg",className:"focus:pe-10"}],defaultVariants:{size:"md",variant:"outline",rounded:"normal",fullwidth:!1,disabled:!1,error:!1,hasClearIcon:!1,isFloatingLabel:!0}}),oye=x(["absolute block duration-450 transition-all px-[2px] text-input-default-text","peer-focus:text-input-filled-text peer-focus:bg-input-label-bg"],{variants:{size:{sm:[],md:[],lg:[]},disabled:{true:"text-input-default-text placeholder:text-input-default-text"},error:{true:"ring-error"},isFloatingLabel:{false:"hidden peer-placeholder-shown:block peer-focus:bg-transparent"}},compoundVariants:[{isFloatingLabel:!0,size:"sm",className:["left-3 -top-1.5 typography-label2 bg-input-label-bg","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label2"]},{isFloatingLabel:!0,size:"md",className:["left-3 -top-1.5 typography-label1 bg-input-label-bg","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{isFloatingLabel:!0,size:"lg",className:["left-4 -top-1.5 typography-label1 bg-input-label-bg","peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{isFloatingLabel:!1,size:"sm",className:["left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1"]},{isFloatingLabel:!1,size:"md",className:["left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4"]},{isFloatingLabel:!1,size:"lg",className:["left-4 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1"]}],defaultVariants:{size:"md",disabled:!1,error:!1,isFloatingLabel:!0}}),lye=x(["absolute inset-y-0 right-0 items-start justify-center hidden peer-focus:flex"],{variants:{size:{sm:"mr-2 pt-2",md:"mr-3 pt-2",lg:"mr-4 pt-4"}},defaultVariants:{size:"md"}}),iye=x(["cursor-pointer z-50 fill-input-active-stroke hover:fill-input-default-text"],{variants:{size:{sm:"size-3",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),sye=x(["typography-small1 flex flex-row items-center gap-1"],{variants:{size:{sm:"mt-1",md:"mt-[6px]",lg:"mt-[6px]"},disabled:{true:"text-input-disable-text"},error:{true:"text-input-error",false:"text-input-filled-text"}},defaultVariants:{size:"md",disabled:!1,error:!1}}),cye=r(((e,t)=>{var{id:r,label:o,size:i="md",rounded:s="normal",variant:d="outline",helperText:u,errorMessage:h,fullwidth:f=!0,disabled:p=!1,error:v=!1,required:m=!0,isFloatingLabel:y=!0,keepCloseIconOnValue:g=!1,hasClearIcon:b=!0,labelClassName:k,className:M,normalize:x,format:j,trimOnCommit:O,normalizeOnCommit:E}=e,z=EM(e,["id","label","size","rounded","variant","helperText","errorMessage","fullwidth","disabled","error","required","isFloatingLabel","keepCloseIconOnValue","hasClearIcon","labelClassName","className","normalize","format","trimOnCommit","normalizeOnCommit"]);const C=n(null),P=r||`textarea-${null!=o?o:""}`;c(t,(()=>null==C?void 0:C.current));const A=a((e=>{var t;x&&(e.target.value=x(e.target.value)),null===(t=z.onChange)||void 0===t||t.call(z,e)}),[x,z.onChange]),R=a((e=>{var t;const r=e.currentTarget;let n=r.value;O&&(n=n.trim()),E&&(n=E(n)),n!==r.value&&(r.value=n,null===(t=z.onChange)||void 0===t||t.call(z,Object.assign(Object.assign({},e),{target:r})))}),[O,E,z.onChange]),L=a((e=>{var t;(O||E)&&R(e),null===(t=z.onBlur)||void 0===t||t.call(z,e)}),[O,E,R,z.onBlur]),I=j&&"string"==typeof z.value?j(z.value):z.value,S=l((()=>"inline-flex flex-col "+(f?"w-full":"")),[f]),V=aye({size:i,rounded:s,variant:d,fullwidth:f,disabled:p,error:v,hasClearIcon:b,isFloatingLabel:y});return _("div",{className:S,children:[_("div",{className:"relative",children:[w("textarea",Object.assign({},z,{id:P,ref:C,disabled:p,placeholder:y?" ":z.placeholder,className:PM(V,M),value:I,onChange:x?A:z.onChange,onBlur:O||E?L:z.onBlur})),b&&w("div",{className:lye({size:i}),style:{display:g&&z.value?"flex":void 0},children:w(fu,{type:"button",className:iye({size:i}),onMouseDown:e=>{if(e.preventDefault(),C.current){const e=C.current.value;C.current.value="",z.onChange&&""!==e&&z.onChange({target:{value:""}}),C.current.focus()}}})}),o&&_("label",{htmlFor:P,className:PM(oye({size:i,disabled:p,error:v,isFloatingLabel:y}),k),children:[o," ",m&&w("span",{className:PM("text-error",{"text-input-disable-text":p}),children:"*"})]})]}),(h||u)&&w("span",{className:sye({size:i,disabled:p,error:v}),children:h||u})]})})),dye=x(["text-common-black"],{variants:{color:{primary:"text-primary",secondary:"text-secondary",success:"text-success",tertiary:"text-tertiary",info:"text-info",warning:"text-warning",error:"text-error"}}}),uye={subtitile1:"subtitle1",subtitile2:"subtitle2",subtitile3:"subtitle3",subtitile4:"subtitle4",subtitile5:"subtitle5",subtitile6:"subtitle6"},hye=r(((e,t)=>{var r,{variant:n="body1",tag:a="p",children:o,className:l="",color:i,style:s}=e,c=EM(e,["variant","tag","children","className","color","style"]);const d=null!==(r=uye[n])&&void 0!==r?r:n;return w(a,Object.assign({ref:t,className:PM(`typography-${d}`,dye({color:i}),l),style:s},c,{children:o}))})),fye=x(["box-border flex items-center justify-center outline-none focus-visible:outline-none"],{variants:{variant:{solid:["bg-action-button-solid-default border-action-button-solid-default text-action-button-solid-default fill-action-button-solid-default","hover:bg-action-button-solid-hover hover:border-action-button-solid-hover hover:text-action-button-solid-hover hover:fill-action-button-solid-hover","active:bg-action-button-solid-pressed active:border-action-button-solid-pressed active:text-action-button-solid-pressed active:fill-action-button-solid-pressed","focus-visible:ring-none focus-visible:ring-offset-2 focus-visible:ring-[var(--action-button-solid-default-border)]"],outline:["ring-1 ring-inset","bg-action-button-outline-default text-action-button-outline-default fill-action-button-outline-default ring-[var(--action-button-outline-default-border)]","hover:bg-action-button-outline-hover hover:text-action-button-outline-hover hover:fill-action-button-outline-hover hover:ring-[var(--action-button-outline-hover-border)]","active:bg-action-button-outline-pressed active:text-action-button-outline-pressed active:fill-action-button-outline-pressed active:ring-[var(--action-button-outline-pressed-border)]","focus-visible:ring-none focus-visible:ring-[var(--action-button-outline-default-border)]"],icon:["bg-action-button-icon-default border-action-button-icon-default text-action-button-icon-default fill-action-button-icon-default","hover:bg-action-button-icon-hover hover:border-action-button-icon-hover hover:text-action-button-icon-hover hover:fill-action-button-icon-hover","active:bg-action-button-icon-pressed active:border-action-button-icon-pressed active:text-action-button-icon-pressed active:fill-action-button-icon-pressed","focus-visible:ring-none focus-visible:ring-offset-2 focus-visible:ring-[var(--action-button-icon-default-border)]"]},size:{xxs:"",xs:"",sm:"",md:"",lg:""},shape:{round:"",capsule:""},disabled:{false:""},active:{false:""}},compoundVariants:[{variant:"solid",active:!0,className:["bg-action-button-solid-active border-action-button-solid-active text-action-button-solid-active fill-action-button-solid-active","hover:bg-action-button-solid-active-hover hover:border-action-button-solid-active-hover hover:text-action-button-solid-active-hover hover:fill-action-button-solid-active-hover","active:bg-action-button-solid-active-pressed active:border-action-button-solid-active-pressed active:text-action-button-solid-active-pressed active:fill-action-button-solid-active-pressed","focus-visible:ring-[var(--action-button-solid-active-border)]"]},{variant:"outline",active:!0,className:["bg-action-button-outline-active text-action-button-outline-active fill-action-button-outline-active ring-[var(--action-button-outline-active-border)]","hover:bg-action-button-outline-active-hover hover:text-action-button-outline-active-hover hover:fill-action-button-outline-active-hover hover:ring-[var(--action-button-outline-active-hover-border)]","active:bg-action-button-outline-active-pressed active:text-action-button-outline-active-pressed active:fill-action-button-outline-active-pressed active:ring-[var(--action-button-outline-active-pressed-border)]","focus-visible:ring-[var(--action-button-outline-active-border)]"]},{variant:"icon",active:!0,className:["bg-action-button-icon-active border-action-button-icon-active text-action-button-icon-active fill-action-button-icon-active","hover:bg-action-button-icon-active-hover hover:border-action-button-icon-active-hover hover:text-action-button-icon-active-hover hover:fill-action-button-icon-active-hover","active:bg-action-button-icon-active-pressed active:border-action-button-icon-active-pressed active:text-action-button-icon-active-pressed active:fill-action-button-icon-active-pressed","focus-visible:ring-[var(--action-button-icon-active-border)]"]},{size:"lg",variant:["solid","outline"],className:"px-[12px] py-[12px] [&_svg]:size-[32px]"},{size:"md",variant:["solid","outline"],className:"px-[8px] py-[8px] [&_svg]:size-[22px]"},{size:"sm",variant:["solid","outline"],className:"px-[4px] py-[4px] [&_svg]:size-[22px]"},{size:"xs",variant:["solid","outline"],className:"px-[2px] py-[2px] [&_svg]:size-[14px]"},{size:"lg",variant:"icon",className:"px-[12px] py-[12px] [&_svg]:size-[32px]"},{size:"md",variant:"icon",className:"px-[8px] py-[8px] [&_svg]:size-[22px]"},{size:"sm",variant:"icon",className:"px-[4px] py-[4px] [&_svg]:size-[22px]"},{size:"xxs",variant:"icon",className:"px-[1px] py-[1px] [&_svg]:size-[10px]"},{size:"xs",variant:"icon",className:"px-[2px] py-[2px] [&_svg]:size-[14px]"},{size:"lg",shape:"round",className:"rounded-[var(--function-button-l-round)]"},{size:"md",shape:"round",className:"rounded-[var(--function-button-m-round)]"},{size:"sm",shape:"round",className:"rounded-[var(--function-button-s-round)]"},{size:"xs",shape:"round",className:"rounded-[var(--function-button-xs-round)]"},{size:"xxs",shape:"round",className:"rounded-[var(--function-button-xxs-round)]"},{size:"lg",shape:"capsule",className:"rounded-[var(--function-button-l-capsule)]"},{size:"md",shape:"capsule",className:"rounded-[var(--function-button-m-capsule)]"},{size:"sm",shape:"capsule",className:"rounded-[var(--function-button-s-capsule)]"},{size:"xxs",shape:"capsule",className:"rounded-[var(--function-button-xxs-capsule)]"},{size:"xs",shape:"capsule",className:"rounded-[var(--function-button-xs-capsule)]"},{variant:"solid",disabled:!0,className:["pointer-events-none","bg-action-button-solid-disabled border-action-button-solid-disabled text-action-button-solid-disabled fill-action-button-solid-disabled"]},{variant:"outline",disabled:!0,className:["pointer-events-none","bg-action-button-outline-disabled text-action-button-outline-disabled fill-action-button-outline-disabled ring-[var(--action-button-outline-disabled-border)]"]},{variant:"icon",disabled:!0,className:["pointer-events-none","bg-action-button-icon-disabled border-action-button-icon-disabled text-action-button-icon-disabled fill-action-button-icon-disabled"]}],defaultVariants:{size:"md",variant:"solid",shape:"round",disabled:!1,active:!1}}),pye=r(((e,t)=>{var{children:r,disabled:n,active:a,className:o,size:l,shape:i,variant:s}=e,c=EM(e,["children","disabled","active","className","size","shape","variant"]);const d=fye({size:l,shape:i,variant:s,active:a,disabled:n});return w("button",Object.assign({},c,{ref:t,type:"button","aria-disabled":n||void 0,disabled:n,tabIndex:n?-1:0,className:PM(".action-button",d,o),children:r}))})),vye=({tabs:e=[],value:t,initialTab:r=0,tabBarSize:a=38,enableBorderLine:o=!0,enableAddTabButton:l=!1,keepIconSpace:c=!1,disabled:d=!1,keepMounted:u=!1,tabMode:h="start",className:f,tabBarClassName:p,tabBarContainerClassName:v,tabBarWrapperClassName:m,tabButtonClassName:y,tabButtonActiveClassName:g,tabButtonActiveDisableClassName:b,tabButtonDisableClassName:k,tabContentClassName:M,addTabButtonWrapperClassName:x,borderSliderClassName:j,leftAction:O,rightAction:E,onAddTab:z,onTabChange:C})=>{var P;const[A,R]=i(r),[L,I]=i(null),[S,V]=i({width:"0px",transform:"translateX(0px)"}),H=n([]),Z=n(!0);s((()=>{void 0!==t&&R(t)}),[t]);const N=()=>{const e=H.current[A];e&&V({width:`${e.offsetWidth}px`,transform:`translateX(${e.offsetLeft}px)`})};return s((()=>{let e;if(Z.current){Z.current=!1;const t=H.current[A];t&&(V({width:"0px",transform:`translateX(${t.offsetLeft+t.offsetWidth/2}px)`}),e=setTimeout((()=>{N()}),50))}else N();const t=()=>{N()};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),e&&clearTimeout(e)}}),[A,e,h,c]),_("div",{className:PM("w-full",f),children:[_("div",{className:PM(" relative flex flex-row w-full",{"border-b-[1px] border-base-stroke":o,"border-state-disable-outline":d,"flex-1":"justify"===h},v),children:[O,w("div",{className:PM("relative flex flex-row overflow-x-auto",{"flex-1":"justify"===h},m),children:_("div",{className:PM("tabs-scrollbar overflow-x-auto w-full",`relative flex gap-3 h-[${a}px] box-border`,{"gap-0":"justify"===h},p),style:{justifyContent:"justify"===h?"stretch":h},role:"tablist",children:[e.map(((e,t)=>{var r,n,a,o,l,i,s,u;return _("button",{ref:e=>H.current[t]=e,role:"tab","aria-selected":t===A,"aria-controls":`tab-content-${t}`,disabled:d||e.disabled,id:`tab-${t}`,className:PM("group relative flex justify-center flex-row items-center py-3 cursor-pointer transition-colors duration-300 box-border gap-1 flex-shrink-0 typography-subtitle6",{"text-text-contrast-max":t===A,"text-text-g-contrast-medium":t!==A,"text-state-disable-outline pointer-events-none":d||e.disabled,[null!==(n=null!==(r=e.disableClassName)&&void 0!==r?r:k)&&void 0!==n?n:""]:d||e.disabled,"text-state-disable-outline":t===A&&(d||e.disabled),[null!==(o=null!==(a=e.activeDisableClassName)&&void 0!==a?a:b)&&void 0!==o?o:""]:t===A&&(d||e.disabled),[null!==(i=null!==(l=e.className)&&void 0!==l?l:y)&&void 0!==i?i:""]:!0,[null!==(u=null!==(s=e.activeClassName)&&void 0!==s?s:g)&&void 0!==u?u:""]:t===A,"flex-1":"justify"===h}),onClick:()=>{R(t),null==C||C(t)},onMouseEnter:()=>I(t),onMouseLeave:()=>I(null),children:[(c||e.startTabContent)&&w("div",{className:"h-full w-3 flex items-center justify-center [&_svg]:size-3 [&_svg]:stroke-current [&_svg]:text-current",children:e.isLoading?w(AM,{size:12}):e.startTabContent}),e.label,(c||e.endTabContent)&&w("div",{className:"h-full w-3 flex items-center justify-center [&_svg]:size-3 [&_svg]:stroke-current [&_svg]:text-current",children:e.endTabContent}),!d&&!e.disabled&&t!==A&&w("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] rounded-[1px] bg-function-default-hover opacity-0 transition-opacity duration-150 group-hover:opacity-100"})]},t)})),w("div",{className:PM("absolute left-0 bottom-0 h-[2px] rounded-[1px] bg-function-active-solid transition-all duration-300 ease-in-out",{hidden:d||(null===(P=e[A])||void 0===P?void 0:P.disabled),"bg-function-active-hover":L===A&&!d},j),style:S})]})}),l&&w("div",{className:PM("sticky right-0 flex content-center items-center mx-4",x),children:w(pye,{variant:"outline",size:"sm",onClick:()=>null==z?void 0:z(),disabled:d,children:w(tye,{name:"plus"})})}),E]}),w("div",{className:PM("mt-4 text-text-g-contrast-high",M),role:"tabpanel",id:`tab-content-${A}`,"aria-labelledby":`tab-${A}`,children:e.map(((e,t)=>{var r;return u||A===t?w("div",{className:"transition "+(A===t?"block":"hidden"),children:e.content},null!==(r=e.id)&&void 0!==r?r:t):null}))})]})},mye="undefined"!=typeof document?t.useLayoutEffect:()=>{};const yye=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},gye=e=>{if(e&&"window"in e&&e.window===e)return e;return yye(e).defaultView||window};function bye(e){let t=null;return()=>(null==t&&(t=e()),t)}const kye=bye((function(){return function(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}(/^Mac/i)})),wye=bye((function(){return function(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}(/Android/i)}));class _ye{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function Mye(e){let t=n({isFocused:!1,observer:null});mye((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let r=function(e){const t=n(null);return mye((()=>{t.current=e}),[e]),a(((...e)=>{const r=t.current;return null==r?void 0:r(...e)}),[])}((t=>{null==e||e(t)}));return a((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target,a=e=>{t.current.isFocused=!1,n.disabled&&r(new _ye("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&n.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}})),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}}),[r])}let xye=null,jye=new Set,Oye=new Map,Eye=!1,zye=!1;const Cye={Tab:!0,Escape:!0};function Pye(e,t){for(let r of jye)r(e,t)}function Aye(e){Eye=!0,function(e){return!(e.metaKey||!kye()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(xye="keyboard",Pye("keyboard",e))}function Rye(e){xye="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(Eye=!0,Pye("pointer",e))}function Lye(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(wye()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(Eye=!0,xye="virtual")}function Iye(e){e.target!==window&&e.target!==document&&(Eye||zye||(xye="virtual",Pye("virtual",e)),Eye=!1,zye=!1)}function Sye(){Eye=!1,zye=!0}function Vye(e){if("undefined"==typeof window||Oye.get(gye(e)))return;const t=gye(e),r=yye(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Eye=!0,n.apply(this,arguments)},r.addEventListener("keydown",Aye,!0),r.addEventListener("keyup",Aye,!0),r.addEventListener("click",Lye,!0),t.addEventListener("focus",Iye,!0),t.addEventListener("blur",Sye,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",Rye,!0),r.addEventListener("pointermove",Rye,!0),r.addEventListener("pointerup",Rye,!0)):(r.addEventListener("mousedown",Rye,!0),r.addEventListener("mousemove",Rye,!0),r.addEventListener("mouseup",Rye,!0)),t.addEventListener("beforeunload",(()=>{Hye(e)}),{once:!0}),Oye.set(t,{focus:n})}const Hye=(e,t)=>{const r=gye(e),n=yye(e);t&&n.removeEventListener("DOMContentLoaded",t),Oye.has(r)&&(r.HTMLElement.prototype.focus=Oye.get(r).focus,n.removeEventListener("keydown",Aye,!0),n.removeEventListener("keyup",Aye,!0),n.removeEventListener("click",Lye,!0),r.removeEventListener("focus",Iye,!0),r.removeEventListener("blur",Sye,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",Rye,!0),n.removeEventListener("pointermove",Rye,!0),n.removeEventListener("pointerup",Rye,!0)):(n.removeEventListener("mousedown",Rye,!0),n.removeEventListener("mousemove",Rye,!0),n.removeEventListener("mouseup",Rye,!0)),Oye.delete(r))};function Zye(){return"pointer"!==xye}"undefined"!=typeof document&&function(e){const t=yye(e);let r;"loading"!==t.readyState?Vye(e):(r=()=>{Vye(e)},t.addEventListener("DOMContentLoaded",r))}();const Nye=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Dye(e,t,r){Vye(),s((()=>{let t=(t,n)=>{(function(e,t,r){var n;const a="undefined"!=typeof window?gye(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?gye(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l="undefined"!=typeof window?gye(null==r?void 0:r.target).HTMLElement:HTMLElement,i="undefined"!=typeof window?gye(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==r?void 0:r.target)instanceof a&&!Nye.has(null==r||null===(n=r.target)||void 0===n?void 0:n.type)||(null==r?void 0:r.target)instanceof o||(null==r?void 0:r.target)instanceof l&&(null==r?void 0:r.target.isContentEditable))&&"keyboard"===t&&r instanceof i&&!Cye[r.key])})(!!(null==r?void 0:r.isTextInput),t,n)&&e(Zye())};return jye.add(t),()=>{jye.delete(t)}}),t)}let qye=!1,Bye=0;function Fye(){qye=!0,setTimeout((()=>{qye=!1}),50)}function Tye(e){"touch"===e.pointerType&&Fye()}function Wye(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",Tye):document.addEventListener("touchend",Fye),Bye++,()=>{Bye--,Bye>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",Tye):document.removeEventListener("touchend",Fye))}}function Uye(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:a,isDisabled:o}=e,[c,d]=i(!1),u=n({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;s(Wye,[]);let{hoverProps:h,triggerHoverEnd:f}=l((()=>{let e=(e,n)=>{if(u.pointerType=n,o||"touch"===n||u.isHovered||!e.currentTarget.contains(e.target))return;u.isHovered=!0;let a=e.currentTarget;u.target=a,t&&t({type:"hoverstart",target:a,pointerType:n}),r&&r(!0),d(!0)},n=(e,t)=>{if(u.pointerType="",u.target=null,"touch"===t||!u.isHovered)return;u.isHovered=!1;let n=e.currentTarget;a&&a({type:"hoverend",target:n,pointerType:t}),r&&r(!1),d(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{qye&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!o&&e.currentTarget.contains(e.target)&&n(e,e.pointerType)}):(l.onTouchStart=()=>{u.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{u.ignoreEmulatedMouseEvents||qye||e(t,"mouse"),u.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!o&&e.currentTarget.contains(e.target)&&n(e,"mouse")}),{hoverProps:l,triggerHoverEnd:n}}),[t,r,a,o,u]);return s((()=>{o&&f({currentTarget:u.target},u.pointerType)}),[o]),{hoverProps:h,isHovered:c}}function $ye(e={}){let{autoFocus:t=!1,isTextInput:r,within:o}=e,l=n({isFocused:!1,isFocusVisible:t||Zye()}),[s,c]=i(!1),[d,u]=i((()=>l.current.isFocused&&l.current.isFocusVisible)),h=a((()=>u(l.current.isFocused&&l.current.isFocusVisible)),[]),f=a((e=>{l.current.isFocused=e,c(e),h()}),[h]);Dye((e=>{l.current.isFocusVisible=e,h()}),[],{isTextInput:r});let{focusProps:p}=function(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const l=a((e=>{if(e.target===e.currentTarget)return n&&n(e),o&&o(!1),!0}),[n,o]),i=Mye(l),s=a((e=>{const t=yye(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(r&&r(e),o&&o(!0),i(e))}),[o,r,i]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:t||!n&&!o?void 0:l}}}({isDisabled:o,onFocusChange:f}),{focusWithinProps:v}=function(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:o,onFocusWithinChange:l}=e,i=n({isFocusWithin:!1}),s=a((e=>{i.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(e),l&&l(!1))}),[r,l,i]),c=Mye(s),d=a((e=>{i.current.isFocusWithin||document.activeElement!==e.target||(o&&o(e),l&&l(!0),i.current.isFocusWithin=!0,c(e))}),[o,l,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:s}}}({isDisabled:!o,onFocusWithinChange:f});return{isFocused:s,isFocusVisible:d,focusProps:o?v:p}}var Gye=Object.defineProperty,Yye=(e,t,r)=>(((e,t,r)=>{t in e?Gye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let Kye=new class{constructor(){Yye(this,"current",this.detect()),Yye(this,"handoffState","pending"),Yye(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function Xye(e){return Kye.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Qye(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Jye(){let e=[],t={addEventListener:(e,r,n,a)=>(e.addEventListener(r,n,a),t.add((()=>e.removeEventListener(r,n,a)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return Qye((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=Jye();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function ege(){let[e]=i(Jye);return s((()=>()=>e.dispose()),[e]),e}let tge=(e,t)=>{Kye.isServer?s(e,t):d(e,t)};function rge(e){let t=n(e);return tge((()=>{t.current=e}),[e]),t}let nge=function(e){let r=rge(e);return t.useCallback(((...e)=>r.current(...e)),[r])};let age=u(void 0);function oge(){return h(age)}function lge(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function ige(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ige),n}var sge=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(sge||{}),cge=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(cge||{});function dge(){let e=function(){let e=n([]),t=a((t=>{for(let r of e.current)null!=r&&("function"==typeof r?r(t):r.current=t)}),[]);return(...r)=>{if(!r.every((e=>null==e)))return e.current=r,t}}();return a((t=>function({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:a,visible:o=!0,name:l,mergeRefs:i}){i=null!=i?i:hge;let s=fge(t,e);if(o)return uge(s,r,n,l,i);let c=null!=a?a:0;if(2&c){let{static:e=!1,...t}=s;if(e)return uge(t,r,n,l,i)}if(1&c){let{unmount:e=!0,...t}=s;return ige(e?0:1,{0:()=>null,1:()=>uge({...t,hidden:!0,style:{display:"none"}},r,n,l,i)})}return uge(s,r,n,l,i)}({mergeRefs:e,...t})),[e])}function uge(e,t={},r,n,a){let{as:l=r,children:i,refName:s="ref",...c}=yge(e,["unmount","static"]),d=void 0!==e.ref?{[s]:e.ref}:{},u="function"==typeof i?i(t):i;"className"in c&&c.className&&"function"==typeof c.className&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let h={};if(t){let e=!1,r=[];for(let[n,a]of Object.entries(t))"boolean"==typeof a&&(e=!0),!0===a&&r.push(n.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){h["data-headlessui-state"]=r.join(" ");for(let e of r)h[`data-${e}`]=""}}if(l===f&&(Object.keys(mge(c)).length>0||Object.keys(mge(h)).length>0)){if(p(u)&&!(Array.isArray(u)&&u.length>1)){let e=u.props,t=null==e?void 0:e.className,r="function"==typeof t?(...e)=>lge(t(...e),c.className):lge(t,c.className),n=r?{className:r}:{},o=fge(u.props,mge(yge(c,["ref"])));for(let e in h)e in o&&delete h[e];return v(u,Object.assign({},o,h,d,{ref:a(gge(u),d.ref)},n))}if(Object.keys(mge(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(mge(c)).concat(Object.keys(mge(h))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return o(l,Object.assign({},yge(c,["ref"]),l!==f&&d,l!==f&&h),u)}function hge(...e){return e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}function fge(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])for(let e in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(r[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in r)Object.assign(t,{[e](t,...n){let a=r[e];for(let e of a){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...n)}}});return t}function pge(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];for(let e in r)Object.assign(t,{[e](...t){let n=r[e];for(let e of n)null==e||e(...t)}});return t}function vge(e){var t;return Object.assign(r(e),{displayName:null!=(t=e.displayName)?t:e.name})}function mge(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function yge(e,t=[]){let r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}function gge(e){return t.version.split(".")[0]>="19"?e.props.ref:e.ref}function bge(e={},t=null,r=[]){for(let[n,a]of Object.entries(e))wge(r,kge(t,n),a);return r}function kge(e,t){return e?e+"["+t+"]":t}function wge(e,t,r){if(Array.isArray(r))for(let[n,a]of r.entries())wge(e,kge(t,n.toString()),a);else r instanceof Date?e.push([t,r.toISOString()]):"boolean"==typeof r?e.push([t,r?"1":"0"]):"string"==typeof r?e.push([t,r]):"number"==typeof r?e.push([t,`${r}`]):null==r?e.push([t,""]):bge(r,t,e)}var _ge=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(_ge||{});let Mge=vge((function(e,t){var r;let{features:n=1,...a}=e,o={ref:t,"aria-hidden":!(2&~n)||(null!=(r=a["aria-hidden"])?r:void 0),hidden:!(4&~n)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~n)&&!!(2&~n)&&{display:"none"}}};return dge()({ourProps:o,theirProps:a,slot:{},defaultTag:"span",name:"Hidden"})})),xge=u(null);function jge({children:e}){let r=h(xge);if(!r)return t.createElement(t.Fragment,null,e);let{target:n}=r;return n?z(t.createElement(t.Fragment,null,e),n):null}function Oge({data:e,form:r,disabled:n,onReset:a,overrides:o}){let[l,c]=i(null),d=ege();return s((()=>{if(a&&l)return d.addEventListener(l,"reset",a)}),[l,r,a]),t.createElement(jge,null,t.createElement(Ege,{setForm:c,formId:r}),bge(e).map((([e,a])=>t.createElement(Mge,{features:_ge.Hidden,...mge({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:n,name:e,value:a,...o})}))))}function Ege({setForm:e,formId:r}){return s((()=>{if(r){let t=document.getElementById(r);t&&e(t)}}),[e,r]),r?null:t.createElement(Mge,{features:_ge.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let r=t.closest("form");r&&e(r)}})}let zge=u(void 0);function Cge(){return h(zge)}function Pge(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=""===(null==t?void 0:t.getAttribute("disabled"));return(!n||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}let Age=Symbol();function Rge(...e){let t=n(e);s((()=>{t.current=e}),[e]);let r=nge((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Age])))?void 0:r}let Lge=u(null);function Ige(){let e=h(Lge);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Ige),e}return e}Lge.displayName="DescriptionContext";let Sge=vge((function(e,t){let r=m(),n=oge(),{id:a=`headlessui-description-${r}`,...o}=e,i=Ige(),s=Rge(t);tge((()=>i.register(a)),[a,i.register]);let c=n||!1,d=l((()=>({...i.slot,disabled:c})),[i.slot,c]),u={ref:s,...i.props,id:a};return dge()({ourProps:u,theirProps:o,slot:d,defaultTag:"p",name:i.name||"Description"})}));Object.assign(Sge,{});var Vge=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Vge||{});let Hge=u(null);function Zge(){let e=h(Hge);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Zge),e}return e}function Nge(e){var t,r,n;let a=null!=(r=null==(t=h(Hge))?void 0:t.value)?r:void 0;return(null!=(n=null==e?void 0:e.length)?n:0)>0?[a,...e].filter(Boolean).join(" "):a}Hge.displayName="LabelContext";let Dge=vge((function(e,t){var r;let n=m(),a=Zge(),o=Cge(),i=oge(),{id:s=`headlessui-label-${n}`,htmlFor:c=(null!=o?o:null==(r=a.props)?void 0:r.htmlFor),passive:d=!1,...u}=e,h=Rge(t);tge((()=>a.register(s)),[s,a.register]);let f=nge((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),a.props&&"onClick"in a.props&&"function"==typeof a.props.onClick&&a.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let r=e.getAttribute("aria-disabled");if("true"===r||""===r)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),p=i||!1,v=l((()=>({...a.slot,disabled:p})),[a.slot,p]),y={ref:h,...a.props,id:s,htmlFor:c,onClick:f};return d&&("onClick"in y&&(delete y.htmlFor,delete y.onClick),"onClick"in u&&delete u.onClick),dge()({ourProps:y,theirProps:u,slot:v,defaultTag:c?"label":"div",name:a.name||"Label"})})),qge=Object.assign(Dge,{});function Bge(e,t,r){let n,a=r.initialDeps??[];return()=>{var o,l,i,s;let c;r.key&&(null==(o=r.debug)?void 0:o.call(r))&&(c=Date.now());const d=e(),u=d.length!==a.length||d.some(((e,t)=>a[t]!==e));if(!u)return n;let h;if(a=d,r.key&&(null==(l=r.debug)?void 0:l.call(r))&&(h=Date.now()),n=t(...d),r.key&&(null==(i=r.debug)?void 0:i.call(r))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-h))/100,n=t/16,a=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${a(t,5)} /${a(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*n,120))}deg 100% 31%);`,null==r?void 0:r.key)}return null==(s=null==r?void 0:r.onChange)||s.call(r,n),n}}function Fge(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const Tge=(e,t,r)=>{let n;return function(...a){e.clearTimeout(n),n=e.setTimeout((()=>t.apply(this,a)),r)}},Wge=e=>e,Uge=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let e=t;e<=r;e++)n.push(e);return n},$ge=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const a=e=>{const{width:r,height:n}=e;t({width:Math.round(r),height:Math.round(n)})};if(a(r.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver((e=>{const t=e[0];if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return void a({width:e.inlineSize,height:e.blockSize})}a(r.getBoundingClientRect())}));return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},Gge={passive:!0},Yge="undefined"==typeof window||"onscrollend"in window,Kge=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let a=0;const o=e.options.useScrollendEvent&&Yge?()=>{}:Tge(n,(()=>{t(a,!1)}),e.options.isScrollingResetDelay),l=n=>()=>{const{horizontal:l,isRtl:i}=e.options;a=l?r.scrollLeft*(i?-1:1):r.scrollTop,o(),t(a,n)},i=l(!0),s=l(!1);return s(),r.addEventListener("scroll",i,Gge),r.addEventListener("scrollend",s,Gge),()=>{r.removeEventListener("scroll",i),r.removeEventListener("scrollend",s)}},Xge=(e,t,r)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){return Math.round(e[r.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])},Qge=(e,{adjustments:t=0,behavior:r},n)=>{var a,o;const l=e+t;null==(o=null==(a=n.scrollElement)?void 0:a.scrollTo)||o.call(a,{[n.options.horizontal?"left":"top"]:l,behavior:r})};class Jge{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{this._measureElement(e.target,e)}))})):null);return{disconnect:()=>{var r;null==(r=t())||r.disconnect(),e=null},observe:e=>{var r;return null==(r=t())?void 0:r.observe(e,{box:"border-box"})},unobserve:e=>{var r;return null==(r=t())?void 0:r.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,r])=>{void 0===r&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Wge,rangeExtractor:Uge,onChange:()=>{},measureElement:Xge,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var t,r;null==(r=(t=this.options).onChange)||r.call(t,this,e)},this.maybeNotify=Bge((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:"production"!==process.env.NODE_ENV&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const r=new Map,n=new Map;for(let a=t-1;a>=0;a--){const t=e[a];if(r.has(t.lane))continue;const o=n.get(t.lane);if(null==o||t.end>o.end?n.set(t.lane,t):t.end<o.end&&r.set(t.lane,!0),r.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=Bge((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((e,t,r,n,a)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:r,getItemKey:n,enabled:a})),{key:!1}),this.getMeasurements=Bge((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:r,getItemKey:n,enabled:a},o)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const i=this.measurementsCache.slice(0,l);for(let a=l;a<e;a++){const e=n(a),l=1===this.options.lanes?i[a-1]:this.getFurthestMeasurement(i,a),s=l?l.end+this.options.gap:t+r,c=o.get(e),d="number"==typeof c?c:this.options.estimateSize(a),u=s+d,h=l?l.lane:a%this.options.lanes;i[a]={index:a,start:s,size:d,end:u,key:e,lane:h}}return this.measurementsCache=i,i}),{key:"production"!==process.env.NODE_ENV&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Bge((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((e,t,r)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:r}){const n=e.length-1,a=t=>e[t].start,o=ebe(0,n,a,r);let l=o;for(;l<n&&e[l].end<r+t;)l++;return{startIndex:o,endIndex:l}}({measurements:e,outerSize:t,scrollOffset:r}):null),{key:"production"!==process.env.NODE_ENV&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Bge((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,r,n)=>null===t?[]:e({startIndex:t.startIndex,endIndex:t.endIndex,overscan:r,count:n})),{key:"production"!==process.env.NODE_ENV&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,r=e.getAttribute(t);return r?parseInt(r,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const r=this.indexFromElement(e),n=this.measurementsCache[r];if(!n)return;const a=n.key,o=this.elementsCache.get(a);o!==e&&(o&&this.observer.unobserve(o),this.observer.observe(e),this.elementsCache.set(a,e)),e.isConnected&&this.resizeItem(r,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const r=this.measurementsCache[e];if(!r)return;const n=t-(this.itemSizeCache.get(r.key)??r.size);0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,n,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&("production"!==process.env.NODE_ENV&&this.options.debug&&console.info("correction",n),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}))},this.getVirtualItems=Bge((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const r=[];for(let n=0,a=e.length;n<a;n++){const a=t[e[n]];r.push(a)}return r}),{key:"production"!==process.env.NODE_ENV&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return Fge(t[ebe(0,t.length-1,(e=>Fge(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const r=this.getSize(),n=this.getScrollOffset();"auto"===t&&(t=e<=n?"start":e>=n+r?"end":"start"),"start"===t||("end"===t?e-=r:"center"===t&&(e-=r/2));const a=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-r;return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const r=this.measurementsCache[e];if(!r)return;const n=this.getSize(),a=this.getScrollOffset();if("auto"===t)if(r.end>=a+n-this.options.scrollPaddingEnd)t="end";else{if(!(r.start<=a+this.options.scrollPaddingStart))return[a,t];t="start"}const o="end"===t?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,t),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:r}={})=>{this.cancelScrollToIndex(),"smooth"===r&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:r})},this.scrollToIndex=(e,{align:t="auto",behavior:r}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===r&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const n=this.getOffsetForIndex(e,t);if(!n)return;const[a,o]=n;this._scrollToOffset(a,{adjustments:void 0,behavior:r}),"smooth"!==r&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null;if(this.elementsCache.has(this.options.getItemKey(e))){const[t]=Fge(this.getOffsetForIndex(e,o));((e,t)=>Math.abs(e-t)<1)(t,this.getScrollOffset())||this.scrollToIndex(e,{align:o,behavior:r})}else this.scrollToIndex(e,{align:o,behavior:r})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let r;return r=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:r})=>{this.options.scrollToFn(e,{behavior:r,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const ebe=(e,t,r,n)=>{for(;e<=t;){const a=(e+t)/2|0,o=r(a);if(o<n)e=a+1;else{if(!(o>n))return a;t=a-1}}return e>0?e-1:0};const tbe="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function rbe(t){return function(t){const r=e.useReducer((()=>({})),{})[1],n={...t,onChange:(e,n)=>{var a;n?C(r):r(),null==(a=t.onChange)||a.call(t,e,n)}},[a]=e.useState((()=>new Jge(n)));return a.setOptions(n),tbe((()=>a._didMount()),[]),tbe((()=>a._willUpdate())),a}({observeElementRect:$ge,observeElementOffset:Kge,scrollToFn:Qge,...t})}function nbe(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function abe(e,t=!1){let[r,n]=y((()=>({})),{}),a=l((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}(e)),[e,r]);return tge((()=>{if(!e)return;let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${a.width}px`,height:`${a.height}px`}:a}let obe=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function lbe(e,t){let r=e(),n=new Set;return{getSnapshot:()=>r,subscribe:e=>(n.add(e),()=>n.delete(e)),dispatch(e,...a){let o=t[e].call(r,...a);o&&(r=o,n.forEach((e=>e())))}}}function ibe(e){return g(e.subscribe,e.getSnapshot,e.getSnapshot)}let sbe=new obe((()=>lbe((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let r=this.slice();return r.splice(t,1),r}})));function cbe(e,t){let r=sbe.get(t),n=m(),a=ibe(r);if(tge((()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)}),[r,e]),!e)return!1;let o=a.indexOf(n),l=a.length;return-1===o&&(o=l,l+=1),o===l-1}let dbe=new Map,ube=new Map;function hbe(e){var t;let r=null!=(t=ube.get(e))?t:0;return ube.set(e,r+1),0!==r||(dbe.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>fbe(e)}function fbe(e){var t;let r=null!=(t=ube.get(e))?t:1;if(1===r?ube.delete(e):ube.set(e,r-1),1!==r)return;let n=dbe.get(e);n&&(null===n["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,dbe.delete(e))}function pbe(e,{allowed:t,disallowed:r}={}){let n=cbe(e,"inert-others");tge((()=>{var e,a;if(!n)return;let o=Jye();for(let t of null!=(e=null==r?void 0:r())?e:[])t&&o.add(hbe(t));let l=null!=(a=null==t?void 0:t())?a:[];for(let e of l){if(!e)continue;let t=Xye(e);if(!t)continue;let r=e.parentElement;for(;r&&r!==t.body;){for(let e of r.children)l.some((t=>e.contains(t)))||o.add(hbe(e));r=r.parentElement}}return o.dispose}),[n,t,r])}let vbe=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var mbe=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(mbe||{}),ybe=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ybe||{}),gbe=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(gbe||{}),bbe=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(bbe||{});var kbe=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(kbe||{});function wbe(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function _be(){return wbe()||/Android/gi.test(window.navigator.userAgent)}function Mbe(e,t,r,n){let a=rge(r);s((()=>{if(e)return document.addEventListener(t,r,n),()=>document.removeEventListener(t,r,n);function r(e){a.current(e)}}),[e,t,n])}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));function xbe(e,t,r){let o=cbe(e,"outside-click"),l=rge(r),i=a((function(e,r){if(e.defaultPrevented)return;let n=r(e);if(null===n||!n.getRootNode().contains(n)||!n.isConnected)return;let a=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a)if(null!==t&&(t.contains(n)||e.composed&&e.composedPath().includes(t)))return;return!function(e,t=0){var r;return e!==(null==(r=Xye(e))?void 0:r.body)&&ige(t,{0:()=>e.matches(vbe),1(){let t=e;for(;null!==t;){if(t.matches(vbe))return!0;t=t.parentElement}return!1}})}(n,bbe.Loose)&&-1!==n.tabIndex&&e.preventDefault(),l.current(e,n)}),[l,t]),c=n(null);Mbe(o,"pointerdown",(e=>{var t,r;c.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),Mbe(o,"mousedown",(e=>{var t,r;c.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),Mbe(o,"click",(e=>{_be()||c.current&&(i(e,(()=>c.current)),c.current=null)}),!0);let d=n({x:0,y:0});Mbe(o,"touchstart",(e=>{d.current.x=e.touches[0].clientX,d.current.y=e.touches[0].clientY}),!0),Mbe(o,"touchend",(e=>{let t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY;if(!(Math.abs(t-d.current.x)>=30||Math.abs(r-d.current.y)>=30))return i(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,r,n){let a=rge(r);s((()=>{if(e)return window.addEventListener(t,r,n),()=>window.removeEventListener(t,r,n);function r(e){a.current(e)}}),[e,t,n])}(o,"blur",(e=>i(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function jbe(...e){return l((()=>Xye(...e)),[...e])}function Obe(e){let t=n({value:"",selectionStart:null,selectionEnd:null});return function(e,t,r,n){let a=rge(r);s((()=>{function r(e){a.current(e)}return(e=null!=e?e:window).addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}),[e,t,n])}(e,"blur",(e=>{let r=e.target;r instanceof HTMLInputElement&&(t.current={value:r.value,selectionStart:r.selectionStart,selectionEnd:r.selectionEnd})})),nge((()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:r,selectionEnd:n}=t.current;null!==r&&null!==n&&e.setSelectionRange(r,n)}t.current={value:"",selectionStart:null,selectionEnd:null}}}))}function Ebe(e,t){return l((()=>{var r;if(e.type)return e.type;let n=null!=(r=e.as)?r:"button";return"string"==typeof n&&"button"===n.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function zbe(){let e;return{before({doc:t}){var r;let n=t.documentElement,a=null!=(r=t.defaultView)?r:window;e=Math.max(0,a.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,a=Math.max(0,n.clientWidth-n.offsetWidth),o=Math.max(0,e-a);r.style(n,"paddingRight",`${o}px`)}}}function Cbe(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Pbe=lbe((()=>new Map),{PUSH(e,t){var r;let n=null!=(r=this.get(e))?r:{doc:e,count:0,d:Jye(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:Cbe(r)},a=[wbe()?{before({doc:e,d:t,meta:r}){function n(e){return r.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var r;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let r=Jye();r.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>r.dispose()))))}let a=null!=(r=window.scrollY)?r:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let r=t.target.closest("a");if(!r)return;let{hash:a}=new URL(r.href),l=e.querySelector(a);l&&!n(l)&&(o=l)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(n(e.target)){let r=e.target;for(;r.parentElement&&n(r.parentElement);)r=r.parentElement;t.style(r,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(n(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;a!==t&&window.scrollTo(0,a),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},zbe(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];a.forEach((({before:e})=>null==e?void 0:e(n))),a.forEach((({after:e})=>null==e?void 0:e(n)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Abe(e,t,r=()=>[document.body]){!function(e,t,r=()=>({containers:[]})){let n=ibe(Pbe),a=t?n.get(t):void 0,o=!!a&&a.count>0;tge((()=>{if(t&&e)return Pbe.dispatch("PUSH",t,r),()=>Pbe.dispatch("POP",t,r)}),[e,t])}(cbe(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],r]}}))}function Rbe(e){return[e.screenX,e.screenY]}var Lbe,Ibe;Pbe.subscribe((()=>{let e=Pbe.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let e="hidden"===t.get(r.doc),n=0!==r.count;(n&&!e||!n&&e)&&Pbe.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),0===r.count&&Pbe.dispatch("TEARDOWN",r)}})),"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(Lbe=null==process?void 0:process.env)?void 0:Lbe.NODE_ENV)&&void 0===(null==(Ibe=null==Element?void 0:Element.prototype)?void 0:Ibe.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var Sbe=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Sbe||{});function Vbe(e){let t={};for(let r in e)!0===e[r]&&(t[`data-${r}`]="");return t}function Hbe(e,t,r,o){let[l,s]=i(r),{hasFlag:c,addFlag:d,removeFlag:u}=function(e=0){let[t,r]=i(e),n=a((e=>r(e)),[t]),o=a((e=>r((t=>t|e))),[t]),l=a((e=>(t&e)===e),[t]),s=a((e=>r((t=>t&~e))),[r]),c=a((e=>r((t=>t^e))),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:l,removeFlag:s,toggleFlag:c}}(e&&l?3:0),h=n(!1),f=n(!1),p=ege();return tge((()=>{if(e)return r&&s(!0),t?(null==void 0||undefined.call(o,r),function(e,{prepare:t,run:r,done:n,inFlight:a}){let o=Jye();return function(e,{inFlight:t,prepare:r}){if(null!=t&&t.current)return void r();let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}(e,{prepare:t,inFlight:a}),o.nextFrame((()=>{r(),o.requestAnimationFrame((()=>{o.add(function(e,t){var r,n;let a=Jye();if(!e)return a.dispose;let o=!1;a.add((()=>{o=!0}));let l=null!=(n=null==(r=e.getAnimations)?void 0:r.call(e).filter((e=>e instanceof CSSTransition)))?n:[];return 0===l.length?(t(),a.dispose):(Promise.allSettled(l.map((e=>e.finished))).then((()=>{o||t()})),a.dispose)}(e,n))}))})),o.dispose}(t,{inFlight:h,prepare(){f.current?f.current=!1:f.current=h.current,h.current=!0,!f.current&&(r?(d(3),u(4)):(d(4),u(2)))},run(){f.current?r?(u(3),d(4)):(u(4),d(3)):r?u(1):d(1)},done(){f.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(h.current=!1,u(7),r||s(!1),null==void 0||undefined.call(o,r))}})):void(r&&d(3))}),[e,r,t,p]),e?[l,{closed:c(1),enter:c(2),leave:c(4),transition:c(2)||c(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Zbe(e,t){let r=n([]),a=nge(e);s((()=>{let e=[...r.current];for(let[n,o]of t.entries())if(r.current[n]!==o){let n=a(t,e);return r.current=t,n}}),[a,...t])}function Nbe(){return"undefined"!=typeof window}function Dbe(e){return Fbe(e)?(e.nodeName||"").toLowerCase():"#document"}function qbe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Bbe(e){var t;return null==(t=(Fbe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Fbe(e){return!!Nbe()&&(e instanceof Node||e instanceof qbe(e).Node)}function Tbe(e){return!!Nbe()&&(e instanceof Element||e instanceof qbe(e).Element)}function Wbe(e){return!!Nbe()&&(e instanceof HTMLElement||e instanceof qbe(e).HTMLElement)}function Ube(e){return!(!Nbe()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof qbe(e).ShadowRoot)}function $be(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Jbe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function Gbe(e){return["table","td","th"].includes(Dbe(e))}function Ybe(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Kbe(e){const t=Xbe(),r=Tbe(e)?Jbe(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function Xbe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Qbe(e){return["html","body","#document"].includes(Dbe(e))}function Jbe(e){return qbe(e).getComputedStyle(e)}function eke(e){return Tbe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tke(e){if("html"===Dbe(e))return e;const t=e.assignedSlot||e.parentNode||Ube(e)&&e.host||Bbe(e);return Ube(t)?t.host:t}function rke(e){const t=tke(e);return Qbe(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wbe(t)&&$be(t)?t:rke(t)}function nke(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const a=rke(e),o=a===(null==(n=e.ownerDocument)?void 0:n.body),l=qbe(a);if(o){const e=ake(l);return t.concat(l,l.visualViewport||[],$be(a)?a:[],e&&r?nke(e):[])}return t.concat(a,nke(a,[],r))}function ake(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const oke=["top","right","bottom","left"],lke=Math.min,ike=Math.max,ske=Math.round,cke=Math.floor,dke=e=>({x:e,y:e}),uke={left:"right",right:"left",bottom:"top",top:"bottom"},hke={start:"end",end:"start"};function fke(e,t,r){return ike(e,lke(t,r))}function pke(e,t){return"function"==typeof e?e(t):e}function vke(e){return e.split("-")[0]}function mke(e){return e.split("-")[1]}function yke(e){return"x"===e?"y":"x"}function gke(e){return"y"===e?"height":"width"}function bke(e){return["top","bottom"].includes(vke(e))?"y":"x"}function kke(e){return yke(bke(e))}function wke(e){return e.replace(/start|end/g,(e=>hke[e]))}function _ke(e){return e.replace(/left|right|bottom|top/g,(e=>uke[e]))}function Mke(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function xke(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function jke(e,t,r){let{reference:n,floating:a}=e;const o=bke(t),l=kke(t),i=gke(l),s=vke(t),c="y"===o,d=n.x+n.width/2-a.width/2,u=n.y+n.height/2-a.height/2,h=n[i]/2-a[i]/2;let f;switch(s){case"top":f={x:d,y:n.y-a.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-a.width,y:u};break;default:f={x:n.x,y:n.y}}switch(mke(t)){case"start":f[l]-=h*(r&&c?-1:1);break;case"end":f[l]+=h*(r&&c?-1:1)}return f}async function Oke(e,t){var r;void 0===t&&(t={});const{x:n,y:a,platform:o,rects:l,elements:i,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=pke(t,e),p=Mke(f),v=i[h?"floating"===u?"reference":"floating":u],m=xke(await o.getClippingRect({element:null==(r=await(null==o.isElement?void 0:o.isElement(v)))||r?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:s})),y="floating"===u?{x:n,y:a,width:l.floating.width,height:l.floating.height}:l.reference,g=await(null==o.getOffsetParent?void 0:o.getOffsetParent(i.floating)),b=await(null==o.isElement?void 0:o.isElement(g))&&await(null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},k=xke(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:g,strategy:s}):y);return{top:(m.top-k.top+p.top)/b.y,bottom:(k.bottom-m.bottom+p.bottom)/b.y,left:(m.left-k.left+p.left)/b.x,right:(k.right-m.right+p.right)/b.x}}function Eke(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zke(e){return oke.some((t=>e[t]>=0))}function Cke(e){const t=Jbe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Wbe(e),o=a?e.offsetWidth:r,l=a?e.offsetHeight:n,i=ske(r)!==o||ske(n)!==l;return i&&(r=o,n=l),{width:r,height:n,$:i}}function Pke(e){return Tbe(e)?e:e.contextElement}function Ake(e){const t=Pke(e);if(!Wbe(t))return dke(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:o}=Cke(t);let l=(o?ske(r.width):r.width)/n,i=(o?ske(r.height):r.height)/a;return l&&Number.isFinite(l)||(l=1),i&&Number.isFinite(i)||(i=1),{x:l,y:i}}const Rke=dke(0);function Lke(e){const t=qbe(e);return Xbe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Rke}function Ike(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const a=e.getBoundingClientRect(),o=Pke(e);let l=dke(1);t&&(n?Tbe(n)&&(l=Ake(n)):l=Ake(e));const i=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==qbe(e))&&t}(o,r,n)?Lke(o):dke(0);let s=(a.left+i.x)/l.x,c=(a.top+i.y)/l.y,d=a.width/l.x,u=a.height/l.y;if(o){const e=qbe(o),t=n&&Tbe(n)?qbe(n):n;let r=e,a=ake(r);for(;a&&n&&t!==r;){const e=Ake(a),t=a.getBoundingClientRect(),n=Jbe(a),o=t.left+(a.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(a.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=o,c+=l,r=qbe(a),a=ake(r)}}return xke({width:d,height:u,x:s,y:c})}function Ske(e,t){const r=eke(e).scrollLeft;return t?t.left+r:Ike(Bbe(e)).left+r}function Vke(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Ske(e,n)),y:n.top+t.scrollTop}}function Hke(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=qbe(e),n=Bbe(e),a=r.visualViewport;let o=n.clientWidth,l=n.clientHeight,i=0,s=0;if(a){o=a.width,l=a.height;const e=Xbe();(!e||e&&"fixed"===t)&&(i=a.offsetLeft,s=a.offsetTop)}return{width:o,height:l,x:i,y:s}}(e,r);else if("document"===t)n=function(e){const t=Bbe(e),r=eke(e),n=e.ownerDocument.body,a=ike(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ike(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+Ske(e);const i=-r.scrollTop;return"rtl"===Jbe(n).direction&&(l+=ike(t.clientWidth,n.clientWidth)-a),{width:a,height:o,x:l,y:i}}(Bbe(e));else if(Tbe(t))n=function(e,t){const r=Ike(e,!0,"fixed"===t),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=Wbe(e)?Ake(e):dke(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:n*o.y}}(t,r);else{const r=Lke(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return xke(n)}function Zke(e,t){const r=tke(e);return!(r===t||!Tbe(r)||Qbe(r))&&("fixed"===Jbe(r).position||Zke(r,t))}function Nke(e,t,r){const n=Wbe(t),a=Bbe(t),o="fixed"===r,l=Ike(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const s=dke(0);if(n||!n&&!o)if(("body"!==Dbe(t)||$be(a))&&(i=eke(t)),n){const e=Ike(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=Ske(a));const c=!a||n||o?dke(0):Vke(a,i);return{x:l.left+i.scrollLeft-s.x-c.x,y:l.top+i.scrollTop-s.y-c.y,width:l.width,height:l.height}}function Dke(e){return"static"===Jbe(e).position}function qke(e,t){if(!Wbe(e)||"fixed"===Jbe(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Bbe(e)===r&&(r=r.ownerDocument.body),r}function Bke(e,t){const r=qbe(e);if(Ybe(e))return r;if(!Wbe(e)){let t=tke(e);for(;t&&!Qbe(t);){if(Tbe(t)&&!Dke(t))return t;t=tke(t)}return r}let n=qke(e,t);for(;n&&Gbe(n)&&Dke(n);)n=qke(n,t);return n&&Qbe(n)&&Dke(n)&&!Kbe(n)?r:n||function(e){let t=tke(e);for(;Wbe(t)&&!Qbe(t);){if(Kbe(t))return t;if(Ybe(t))return null;t=tke(t)}return null}(e)||r}const Fke={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const o="fixed"===a,l=Bbe(n),i=!!t&&Ybe(t.floating);if(n===l||i&&o)return r;let s={scrollLeft:0,scrollTop:0},c=dke(1);const d=dke(0),u=Wbe(n);if((u||!u&&!o)&&(("body"!==Dbe(n)||$be(l))&&(s=eke(n)),Wbe(n))){const e=Ike(n);c=Ake(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const h=!l||u||o?dke(0):Vke(l,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-s.scrollTop*c.y+d.y+h.y}},getDocumentElement:Bbe,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[..."clippingAncestors"===r?Ybe(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=nke(e,[],!1).filter((e=>Tbe(e)&&"body"!==Dbe(e))),a=null;const o="fixed"===Jbe(e).position;let l=o?tke(e):e;for(;Tbe(l)&&!Qbe(l);){const t=Jbe(l),r=Kbe(l);r||"fixed"!==t.position||(a=null),(o?!r&&!a:!r&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||$be(l)&&!r&&Zke(e,l))?n=n.filter((e=>e!==l)):a=t,l=tke(l)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=o[0],i=o.reduce(((e,r)=>{const n=Hke(t,r,a);return e.top=ike(n.top,e.top),e.right=lke(n.right,e.right),e.bottom=lke(n.bottom,e.bottom),e.left=ike(n.left,e.left),e}),Hke(t,l,a));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:Bke,getElementRects:async function(e){const t=this.getOffsetParent||Bke,r=this.getDimensions,n=await r(e.floating);return{reference:Nke(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Cke(e);return{width:t,height:r}},getScale:Ake,isElement:Tbe,isRTL:function(e){return"rtl"===Jbe(e).direction}};function Tke(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=Pke(e),d=a||o?[...c?nke(c):[],...nke(t)]:[];d.forEach((e=>{a&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)}));const u=c&&i?function(e,t){let r,n=null;const a=Bbe(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function l(i,s){void 0===i&&(i=!1),void 0===s&&(s=1),o();const{left:c,top:d,width:u,height:h}=e.getBoundingClientRect();if(i||t(),!u||!h)return;const f={rootMargin:-cke(d)+"px "+-cke(a.clientWidth-(c+u))+"px "+-cke(a.clientHeight-(d+h))+"px "+-cke(c)+"px",threshold:ike(0,lke(1,s))||1};let p=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!p)return l();t?l(!1,t):r=setTimeout((()=>{l(!1,1e-7)}),1e3)}p=!1}try{n=new IntersectionObserver(v,{...f,root:a.ownerDocument})}catch(e){n=new IntersectionObserver(v,f)}n.observe(e)}(!0),o}(c,r):null;let h,f=-1,p=null;l&&(p=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),r()})),c&&!s&&p.observe(c),p.observe(t));let v=s?Ike(e):null;return s&&function t(){const n=Ike(e);!v||n.x===v.x&&n.y===v.y&&n.width===v.width&&n.height===v.height||r();v=n,h=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach((e=>{a&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)})),null==u||u(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(h)}}const Wke=Oke,Uke=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:o,placement:l,middlewareData:i}=t,s=await async function(e,t){const{placement:r,platform:n,elements:a}=e,o=await(null==n.isRTL?void 0:n.isRTL(a.floating)),l=vke(r),i=mke(r),s="y"===bke(r),c=["left","top"].includes(l)?-1:1,d=o&&s?-1:1,u=pke(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&"number"==typeof p&&(f="end"===i?-1*p:p),s?{x:f*d,y:h*c}:{x:h*c,y:f*d}}(t,e);return l===(null==(r=i.offset)?void 0:r.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:a+s.x,y:o+s.y,data:{...s,placement:l}}}}},$ke=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:i={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=pke(e,t),c={x:r,y:n},d=await Oke(t,s),u=bke(vke(a)),h=yke(u);let f=c[h],p=c[u];if(o){const e="y"===h?"bottom":"right";f=fke(f+d["y"===h?"top":"left"],f,f-d[e])}if(l){const e="y"===u?"bottom":"right";p=fke(p+d["y"===u?"top":"left"],p,p-d[e])}const v=i.fn({...t,[h]:f,[u]:p});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[h]:o,[u]:l}}}}}},Gke=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:o,rects:l,initialPlacement:i,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=pke(e,t);if(null!=(r=o.arrow)&&r.alignmentOffset)return{};const y=vke(a),g=bke(i),b=vke(i)===i,k=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=h||(b||!v?[_ke(i)]:function(e){const t=_ke(e);return[wke(e),t,wke(t)]}(i)),_="none"!==p;!h&&_&&w.push(...function(e,t,r,n){const a=mke(e);let o=function(e,t,r){const n=["left","right"],a=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?o:l;default:return[]}}(vke(e),"start"===r,n);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(wke)))),o}(i,v,p,k));const M=[i,...w],x=await Oke(t,m),j=[];let O=(null==(n=o.flip)?void 0:n.overflows)||[];if(d&&j.push(x[y]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=mke(e),a=kke(e),o=gke(a);let l="x"===a?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=_ke(l)),[l,_ke(l)]}(a,l,k);j.push(x[e[0]],x[e[1]])}if(O=[...O,{placement:a,overflows:j}],!j.every((e=>e<=0))){var E,z;const e=((null==(E=o.flip)?void 0:E.index)||0)+1,t=M[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let r=null==(z=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:z.placement;if(!r)switch(f){case"bestFit":{var C;const e=null==(C=O.filter((e=>{if(_){const t=bke(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(r=e);break}case"initialPlacement":r=i}if(a!==r)return{reset:{placement:r}}}return{}}}},Yke=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:o,platform:l,elements:i}=t,{apply:s=()=>{},...c}=pke(e,t),d=await Oke(t,c),u=vke(a),h=mke(a),f="y"===bke(a),{width:p,height:v}=o.floating;let m,y;"top"===u||"bottom"===u?(m=u,y=h===(await(null==l.isRTL?void 0:l.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,m="end"===h?"top":"bottom");const g=v-d.top-d.bottom,b=p-d.left-d.right,k=lke(v-d[m],g),w=lke(p-d[y],b),_=!t.middlewareData.shift;let M=k,x=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(x=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(M=g),_&&!h){const e=ike(d.left,0),t=ike(d.right,0),r=ike(d.top,0),n=ike(d.bottom,0);f?x=p-2*(0!==e||0!==t?e+t:ike(d.left,d.right)):M=v-2*(0!==r||0!==n?r+n:ike(d.top,d.bottom))}await s({...t,availableWidth:x,availableHeight:M});const j=await l.getDimensions(i.floating);return p!==j.width||v!==j.height?{reset:{rects:!0}}:{}}}},Kke=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=pke(e,t);switch(n){case"referenceHidden":{const e=Eke(await Oke(t,{...a,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zke(e)}}}case"escaped":{const e=Eke(await Oke(t,{...a,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:zke(e)}}}default:return{}}}}},Xke=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:o,platform:l,elements:i,middlewareData:s}=t,{element:c,padding:d=0}=pke(e,t)||{};if(null==c)return{};const u=Mke(d),h={x:r,y:n},f=kke(a),p=gke(f),v=await l.getDimensions(c),m="y"===f,y=m?"top":"left",g=m?"bottom":"right",b=m?"clientHeight":"clientWidth",k=o.reference[p]+o.reference[f]-h[f]-o.floating[p],w=h[f]-o.reference[f],_=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let M=_?_[b]:0;M&&await(null==l.isElement?void 0:l.isElement(_))||(M=i.floating[b]||o.floating[p]);const x=k/2-w/2,j=M/2-v[p]/2-1,O=lke(u[y],j),E=lke(u[g],j),z=O,C=M-v[p]-E,P=M/2-v[p]/2+x,A=fke(z,P,C),R=!s.arrow&&null!=mke(a)&&P!==A&&o.reference[p]/2-(P<z?O:E)-v[p]/2<0,L=R?P<z?P-z:P-C:0;return{[f]:h[f]+L,data:{[f]:A,centerOffset:P-A-L,...R&&{alignmentOffset:L}},reset:R}}}),Qke=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:o,middlewareData:l}=t,{offset:i=0,mainAxis:s=!0,crossAxis:c=!0}=pke(e,t),d={x:r,y:n},u=bke(a),h=yke(u);let f=d[h],p=d[u];const v=pke(i,t),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const e="y"===h?"height":"width",t=o.reference[h]-o.floating[e]+m.mainAxis,r=o.reference[h]+o.reference[e]-m.mainAxis;f<t?f=t:f>r&&(f=r)}if(c){var y,g;const e="y"===h?"width":"height",t=["top","left"].includes(vke(a)),r=o.reference[u]-o.floating[e]+(t&&(null==(y=l.offset)?void 0:y[u])||0)+(t?0:m.crossAxis),n=o.reference[u]+o.reference[e]+(t?0:(null==(g=l.offset)?void 0:g[u])||0)-(t?m.crossAxis:0);p<r?p=r:p>n&&(p=n)}return{[h]:f,[u]:p}}}},Jke=(e,t,r)=>{const n=new Map,a={platform:Fke,...r},o={...a.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:l}=r,i=o.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:u}=jke(c,n,s),h=n,f={},p=0;for(let r=0;r<i.length;r++){const{name:o,fn:v}=i[r],{x:m,y:y,data:g,reset:b}=await v({x:d,y:u,initialPlacement:n,placement:h,strategy:a,middlewareData:f,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=m?m:d,u=null!=y?y:u,f={...f,[o]:{...f[o],...g}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:d,y:u}=jke(c,h,s))),r=-1)}return{x:d,y:u,placement:h,strategy:a,middlewareData:f}})(e,t,{...a,platform:o})};var ewe="undefined"!=typeof document?d:s;function twe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!twe(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;0!=n--;){const r=a[n];if(("_owner"!==r||!e.$$typeof)&&!twe(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function rwe(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nwe(e,t){const r=rwe(e);return Math.round(t*r)/r}function awe(t){const r=e.useRef(t);return ewe((()=>{r.current=t})),r}function owe(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:o,elements:{reference:l,floating:i}={},transform:s=!0,whileElementsMounted:c,open:d}=t,[u,h]=e.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[f,p]=e.useState(a);twe(f,a)||p(a);const[v,m]=e.useState(null),[y,g]=e.useState(null),b=e.useCallback((e=>{e!==M.current&&(M.current=e,m(e))}),[]),k=e.useCallback((e=>{e!==x.current&&(x.current=e,g(e))}),[]),w=l||v,_=i||y,M=e.useRef(null),x=e.useRef(null),j=e.useRef(u),E=null!=c,z=awe(c),C=awe(o),P=awe(d),A=e.useCallback((()=>{if(!M.current||!x.current)return;const e={placement:r,strategy:n,middleware:f};C.current&&(e.platform=C.current),Jke(M.current,x.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};R.current&&!twe(j.current,t)&&(j.current=t,O.flushSync((()=>{h(t)})))}))}),[f,r,n,C,P]);ewe((()=>{!1===d&&j.current.isPositioned&&(j.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const R=e.useRef(!1);ewe((()=>(R.current=!0,()=>{R.current=!1})),[]),ewe((()=>{if(w&&(M.current=w),_&&(x.current=_),w&&_){if(z.current)return z.current(w,_,A);A()}}),[w,_,A,z,E]);const L=e.useMemo((()=>({reference:M,floating:x,setReference:b,setFloating:k})),[b,k]),I=e.useMemo((()=>({reference:w,floating:_})),[w,_]),S=e.useMemo((()=>{const e={position:n,left:0,top:0};if(!I.floating)return e;const t=nwe(I.floating,u.x),r=nwe(I.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...rwe(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,I.floating,u.x,u.y]);return e.useMemo((()=>({...u,update:A,refs:L,elements:I,floatingStyles:S})),[u,A,L,I,S])}const lwe=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(a=r,{}.hasOwnProperty.call(a,"current"))?null!=r.current?Xke({element:r.current,padding:n}).fn(t):{}:r?Xke({element:r,padding:n}).fn(t):{};var a}}),iwe=(e,t)=>({...Uke(e),options:[e,t]}),swe=(e,t)=>({...$ke(e),options:[e,t]}),cwe=(e,t)=>({...Qke(e),options:[e,t]}),dwe=(e,t)=>({...Gke(e),options:[e,t]}),uwe=(e,t)=>({...Yke(e),options:[e,t]}),hwe=(e,t)=>({...Kke(e),options:[e,t]}),fwe=(e,t)=>({...lwe(e),options:[e,t]}),pwe={...e},vwe=pwe.useInsertionEffect||(e=>e());function mwe(t){const r=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return vwe((()=>{r.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return null==r.current?void 0:r.current(...t)}),[])}var ywe="undefined"!=typeof document?d:s;let gwe=!1,bwe=0;const kwe=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bwe++;const wwe=pwe.useId||function(){const[t,r]=e.useState((()=>gwe?kwe():void 0));return ywe((()=>{null==t&&r(kwe())}),[]),e.useEffect((()=>{gwe=!0}),[]),t};let _we;"production"!==process.env.NODE_ENV&&(_we=new Set);const Mwe=e.createContext(null),xwe=e.createContext(null),jwe="data-floating-ui-focusable";function Owe(t){const{open:r=!1,onOpenChange:n,elements:a}=t,o=wwe(),l=e.useRef({}),[i]=e.useState((()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach((e=>e(r)))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==r)))||[])}}}())),s=null!=((null==(c=e.useContext(Mwe))?void 0:c.id)||null);var c;if("production"!==process.env.NODE_ENV){const e=a.reference;e&&!Tbe(e)&&function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a="Floating UI: "+r.join(" ");var o;null!=(e=_we)&&e.has(a)||(null==(o=_we)||o.add(a),console.error(a))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[d,u]=e.useState(a.reference),h=mwe(((e,t,r)=>{l.current.openEvent=e?t:void 0,i.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),f=e.useMemo((()=>({setPositionReference:u})),[]),p=e.useMemo((()=>({reference:d||a.reference||null,floating:a.floating||null,domReference:a.reference})),[d,a.reference,a.floating]);return e.useMemo((()=>({dataRef:l,open:r,onOpenChange:h,elements:p,events:i,floatingId:o,refs:f})),[r,h,p,i,o,f])}function Ewe(t){void 0===t&&(t={});const{nodeId:r}=t,n=Owe({...t,elements:{reference:null,floating:null,...t.elements}}),a=t.rootContext||n,o=a.elements,[l,i]=e.useState(null),[s,c]=e.useState(null),d=(null==o?void 0:o.domReference)||l,u=e.useRef(null),h=e.useContext(xwe);ywe((()=>{d&&(u.current=d)}),[d]);const f=owe({...t,elements:{...o,...s&&{reference:s}}}),p=e.useCallback((e=>{const t=Tbe(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)}),[f.refs]),v=e.useCallback((e=>{(Tbe(e)||null===e)&&(u.current=e,i(e)),(Tbe(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Tbe(e))&&f.refs.setReference(e)}),[f.refs]),m=e.useMemo((()=>({...f.refs,setReference:v,setPositionReference:p,domReference:u})),[f.refs,v,p]),y=e.useMemo((()=>({...f.elements,domReference:d})),[f.elements,d]),g=e.useMemo((()=>({...f,...a,refs:m,elements:y,nodeId:r})),[f,m,y,r,a]);return ywe((()=>{a.dataRef.current.floatingContext=g;const e=null==h?void 0:h.nodesRef.current.find((e=>e.id===r));e&&(e.context=g)})),e.useMemo((()=>({...f,context:g,refs:m,elements:y})),[f,m,y,g])}const zwe="active",Cwe="selected";function Pwe(e,t,r){const n=new Map,a="item"===r;let o=e;if(a&&e){const{[zwe]:t,[Cwe]:r,...n}=e;o=n}return{..."floating"===r&&{tabIndex:-1,[jwe]:""},...o,...t.map((t=>{const n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[r,o]=t;var l;a&&[zwe,Cwe].includes(r)||(0===r.indexOf("on")?(n.has(r)||n.set(r,[]),"function"==typeof o&&(null==(l=n.get(r))||l.push(o),e[r]=function(){for(var e,t=arguments.length,a=new Array(t),o=0;o<t;o++)a[o]=arguments[o];return null==(e=n.get(r))?void 0:e.map((e=>e(...a))).find((e=>void 0!==e))})):e[r]=o)})),e):e),{})}}function Awe(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Rwe=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:a,offset:o=0,index:l=0,minItemsVisible:i=4,referenceOverflowThreshold:s=0,scrollRef:c,...d}=pke(e,t),{rects:u,elements:{floating:h}}=t,f=r.current[l],p=(null==c?void 0:c.current)||h,v=h.clientTop||p.clientTop,m=0!==h.clientTop,y=0!==p.clientTop,g=h===p;if("production"!==process.env.NODE_ENV&&(t.placement.startsWith("bottom")||function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a="Floating UI: "+r.join(" ");var o;null!=(e=_we)&&e.has(a)||(null==(o=_we)||o.add(a),console.warn(a))}('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const b={...t,...await iwe(-f.offsetTop-h.clientTop-u.reference.height/2-f.offsetHeight/2-o).fn(t)},k=await Wke(Awe(b,p.scrollHeight+v+h.clientTop),d),w=await Wke(b,{...d,elementContext:"reference"}),_=ike(0,k.top),M=b.y+_,x=p.scrollHeight>p.clientHeight?e=>e:ske,j=x(ike(0,p.scrollHeight+(m&&g||y?2*v:0)-_-ike(0,k.bottom)));if(p.style.maxHeight=j+"px",p.scrollTop=_,a){const e=p.offsetHeight<f.offsetHeight*lke(i,r.current.length)-1||w.top>=-s||w.bottom>=-s;O.flushSync((()=>a(e)))}return n&&(n.current=await Wke(Awe({...b,y:M},p.offsetHeight+v+h.clientTop),d)),{y:M}}});function Lwe(t,r){const{open:n,elements:a}=t,{enabled:o=!0,overflowRef:l,scrollRef:i,onChange:s}=r,c=mwe(s),d=e.useRef(!1),u=e.useRef(null),h=e.useRef(null);e.useEffect((()=>{if(!o)return;function e(e){if(e.ctrlKey||!t||null==l.current)return;const r=e.deltaY,n=l.current.top>=-.5,a=l.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,i=r<0?-1:1,s=r<0?"max":"min";t.scrollHeight<=t.clientHeight||(!n&&r>0||!a&&r<0?(e.preventDefault(),O.flushSync((()=>{c((e=>e+Math[s](r,o*i)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:r}=e;return t+"/"+r})).join(" "):navigator.userAgent}())&&(t.scrollTop+=r))}const t=(null==i?void 0:i.current)||a.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{u.current=t.scrollTop,null!=l.current&&(h.current={...l.current})})),()=>{u.current=null,h.current=null,t.removeEventListener("wheel",e)}):void 0}),[o,n,a.floating,l,i,c]);const f=e.useMemo((()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const e=(null==i?void 0:i.current)||a.floating;if(l.current&&e&&d.current){if(null!==u.current){const t=e.scrollTop-u.current;(l.current.bottom<-.5&&t<-1||l.current.top<-.5&&t>1)&&O.flushSync((()=>c((e=>e+t))))}requestAnimationFrame((()=>{u.current=e.scrollTop}))}}})),[a.floating,c,l,i]);return e.useMemo((()=>o?{floating:f}:{}),[o,f])}let Iwe=u({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Iwe.displayName="FloatingContext";let Swe=u(null);Swe.displayName="PlacementContext";function Vwe({children:t,enabled:r=!0}){let[a,o]=i(null),[s,c]=i(0),d=n(null),[u,h]=i(null);!function(e){tge((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,r=parseFloat(t);if(isNaN(r))return;let n=parseInt(t);isNaN(n)||r!==n&&(e.style.maxHeight=`${Math.ceil(r)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(u);let f=r&&null!==a&&null!==u,{to:p="bottom",gap:v=0,offset:m=0,padding:y=0,inner:g}=function(e,t){var r,n,a;let o=Hwe(null!=(r=null==e?void 0:e.gap)?r:"var(--anchor-gap, 0)",t),l=Hwe(null!=(n=null==e?void 0:e.offset)?n:"var(--anchor-offset, 0)",t),i=Hwe(null!=(a=null==e?void 0:e.padding)?a:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:l,padding:i}}(a,u),[b,k="center"]=p.split(" ");tge((()=>{f&&c(0)}),[f]);let{refs:w,floatingStyles:_,context:M}=Ewe({open:f,placement:"selection"===b?"center"===k?"bottom":`bottom-${k}`:"center"===k?`${b}`:`${b}-${k}`,strategy:"absolute",transform:!1,middleware:[iwe({mainAxis:"selection"===b?0:v,crossAxis:m}),swe({padding:y}),"selection"!==b&&dwe({padding:y}),"selection"===b&&g?Rwe({...g,padding:y,overflowRef:d,offset:s,minItemsVisible:4,referenceOverflowThreshold:y,onFallbackChange(e){var t,r;if(!e)return;let n=M.elements.floating;if(!n)return;let a=parseFloat(getComputedStyle(n).scrollPaddingBottom)||0,o=Math.min(4,n.childElementCount),l=0,i=0;for(let e of null!=(r=null==(t=M.elements.floating)?void 0:t.childNodes)?r:[])if(e instanceof HTMLElement){let t=e.offsetTop,r=t+e.clientHeight+a,s=n.scrollTop,c=s+n.clientHeight;if(!(t>=s&&r<=c)){i=Math.max(0,Math.min(r,c)-Math.max(t,s)),l=e.clientHeight;break}o--}o>=1&&c((e=>{let t=l*o-i+a;return e>=t?e:t}))}}):null,uwe({padding:y,apply({availableWidth:e,availableHeight:t,elements:r}){Object.assign(r.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Tke}),[x=b,j=k]=M.placement.split("-");"selection"===b&&(x="selection");let O=l((()=>({anchor:[x,j].filter(Boolean).join(" ")})),[x,j]),E=Lwe(M,{overflowRef:d,onChange:c}),{getReferenceProps:z,getFloatingProps:C}=function(t){void 0===t&&(t=[]);const r=t.map((e=>null==e?void 0:e.reference)),n=t.map((e=>null==e?void 0:e.floating)),a=t.map((e=>null==e?void 0:e.item)),o=e.useCallback((e=>Pwe(e,t,"reference")),r),l=e.useCallback((e=>Pwe(e,t,"floating")),n),i=e.useCallback((e=>Pwe(e,t,"item")),a);return e.useMemo((()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:i})),[o,l,i])}([E]),P=nge((e=>{h(e),w.setFloating(e)}));return e.createElement(Swe.Provider,{value:o},e.createElement(Iwe.Provider,{value:{setFloating:P,setReference:w.setReference,styles:_,getReferenceProps:z,getFloatingProps:C,slot:O}},t))}function Hwe(e,t,r=void 0){let n=ege(),a=nge(((e,t)=>{if(null==e)return[r,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[r,null];let a=Nwe(e,t);return[a,r=>{let o=Zwe(e);{let l=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));n.requestAnimationFrame((function i(){n.nextFrame(i);let s=!1;for(let[e,r]of o.entries()){let n=window.getComputedStyle(t).getPropertyValue(r);if(l[e]!==n){l[e]=n,s=!0;break}}if(!s)return;let c=Nwe(e,t);a!==c&&(r(c),a=c)}))}return n.dispose}]}return[r,null]})),o=l((()=>a(e,t)[0]),[e,t]),[s=o,c]=i();return tge((()=>{let[r,n]=a(e,t);if(c(r),n)return n(c)}),[e,t]),s}function Zwe(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let r=t[1].slice(0,e).trim(),n=t[1].slice(e+1).trim();return n?[r,...Zwe(n)]:[r]}return[]}function Nwe(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function Dwe({children:e,freeze:r}){let n=qwe(r,e);return t.createElement(t.Fragment,null,n)}function qwe(e,t){let[r,n]=i(t);return!e&&r!==t&&n(t),e?r:t}let Bwe=u(null);Bwe.displayName="OpenClosedContext";var Fwe=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Fwe||{});function Twe({value:e,children:r}){return t.createElement(Bwe.Provider,{value:e},r)}let Wwe=[];!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}((()=>{function e(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Wwe[0]===e.target)return;let t=e.target;t=t.closest(vbe),Wwe.unshift(null!=t?t:e.target),Wwe=Wwe.filter((e=>null!=e&&e.isConnected)),Wwe.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})}));var Uwe=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Uwe||{});function $we(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),a=null!=n?n:-1;switch(e.focus){case 0:for(let e=0;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 1:-1===a&&(a=r.length);for(let e=a-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 2:for(let e=a+1;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 3:for(let e=r.length-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 4:for(let n=0;n<r.length;++n)if(t.resolveId(r[n],n,r)===e.id)return n;return n;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}var Gwe=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Gwe||{});function Ywe(){let t=function(){let t="undefined"==typeof document;return"useSyncExternalStore"in e&&e.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!t))}(),[r,n]=e.useState(Kye.isHandoffComplete);return r&&!1===Kye.isHandoffComplete&&n(!1),e.useEffect((()=>{!0!==r&&n(!0)}),[r]),e.useEffect((()=>Kye.handoff()),[]),!t&&r}let Kwe=u(!1);function Xwe(){return h(Kwe)}function Qwe(e){let t=Xwe(),r=h(r_e),n=jbe(e),[a,o]=i((()=>{var e;if(!t&&null!==r)return null!=(e=r.current)?e:null;if(Kye.isServer)return null;let a=null==n?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(null===n)return null;let o=n.createElement("div");return o.setAttribute("id","headlessui-portal-root"),n.body.appendChild(o)}));return s((()=>{null!==a&&(null!=n&&n.body.contains(a)||null==n||n.body.appendChild(a))}),[a,n]),s((()=>{t||null!==r&&o(r.current)}),[r,o,t]),a}let Jwe=f,e_e=vge((function(e,t){let r=e,a=n(null),o=Rge(function(e,t=!0){return Object.assign(e,{[Age]:t})}((e=>{a.current=e})),t),l=jbe(a),c=Qwe(a),[d]=i((()=>{var e;return Kye.isServer?null:null!=(e=null==l?void 0:l.createElement("div"))?e:null})),u=h(n_e),f=Ywe();tge((()=>{!c||!d||c.contains(d)||(d.setAttribute("data-headlessui-portal",""),c.appendChild(d))}),[c,d]),tge((()=>{if(d&&u)return u.register(d)}),[u,d]),function(e){let t=nge(e),r=n(!1);s((()=>(r.current=!1,()=>{r.current=!0,Qye((()=>{r.current&&t()}))})),[t])}((()=>{var e;!c||!d||(d instanceof Node&&c.contains(d)&&c.removeChild(d),c.childNodes.length<=0&&(null==(e=c.parentElement)||e.removeChild(c)))}));let p=dge();return f&&c&&d?z(p({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:Jwe,name:"Portal"}),d):null}));let t_e=f,r_e=u(null);let n_e=u(null),a_e=vge((function(e,r){let n=Rge(r),{enabled:a=!0,...o}=e,l=dge();return a?t.createElement(e_e,{...o,ref:n}):l({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:Jwe,name:"Portal"})})),o_e=vge((function(e,r){let{target:n,...a}=e,o={ref:Rge(r)},l=dge();return t.createElement(r_e.Provider,{value:n},l({ourProps:o,theirProps:a,defaultTag:t_e,name:"Popover.Group"}))})),l_e=Object.assign(a_e,{Group:o_e});var i_e=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(i_e||{}),s_e=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(s_e||{}),c_e=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(c_e||{}),d_e=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.SetTyping=3]="SetTyping",e[e.RegisterOption=4]="RegisterOption",e[e.UnregisterOption=5]="UnregisterOption",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",e[e.SetInputElement=8]="SetInputElement",e[e.SetButtonElement=9]="SetButtonElement",e[e.SetOptionsElement=10]="SetOptionsElement",e))(d_e||{});function u_e(e,t=e=>e){let r=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=t(e.options.slice()),a=n.length>0&&null!==n[0].dataRef.current.order?n.sort(((e,t)=>e.dataRef.current.order-t.dataRef.current.order)):function(e,t=e=>e){return e.slice().sort(((e,r)=>{let n=t(e),a=t(r);if(null===n||null===a)return 0;let o=n.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(n,(e=>e.dataRef.current.domRef.current)),o=r?a.indexOf(r):null;return-1===o&&(o=null),{options:a,activeOptionIndex:o}}let h_e={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,r;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(r=e.dataRef.current)&&r.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var r,n,a,o;if(null!=(r=e.dataRef.current)&&r.disabled||e.optionsElement&&(null==(n=e.dataRef.current)||!n.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:r,disabled:n}=e.virtual,o=t.focus===Uwe.Specific?t.idx:$we(t,{resolveItems:()=>r,resolveActiveIndex:()=>{var t,a;return null!=(a=null!=(t=e.activeOptionIndex)?t:r.findIndex((e=>!n(e))))?a:null},resolveDisabled:n,resolveId(){throw new Error("Function not implemented.")}}),l=null!=(a=t.trigger)?a:2;return e.activeOptionIndex===o&&e.activationTrigger===l?e:{...e,activeOptionIndex:o,activationTrigger:l,isTyping:!1,__demoMode:!1}}let l=u_e(e);if(null===l.activeOptionIndex){let e=l.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(l.activeOptionIndex=e)}let i=t.focus===Uwe.Specific?t.idx:$we(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),s=null!=(o=t.trigger)?o:2;return e.activeOptionIndex===i&&e.activationTrigger===s?e:{...e,...l,isTyping:!1,activeOptionIndex:i,activationTrigger:s,__demoMode:!1}},4:(e,t)=>{var r,n,a;if(null!=(r=e.dataRef.current)&&r.virtual)return{...e,options:[...e.options,t.payload]};let o=t.payload,l=u_e(e,(e=>(e.push(o),e)));null===e.activeOptionIndex&&null!=(n=e.dataRef.current)&&n.isSelected(t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(o));let i={...e,...l,activationTrigger:2};return null!=(a=e.dataRef.current)&&a.__demoMode&&void 0===e.dataRef.current.value&&(i.activeOptionIndex=0),i},5:(e,t)=>{var r;if(null!=(r=e.dataRef.current)&&r.virtual)return{...e,options:e.options.filter((e=>e.id!==t.id))};let n=u_e(e,(e=>{let r=e.findIndex((e=>e.id===t.id));return-1!==r&&e.splice(r,1),e}));return{...e,...n,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var r,n;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(r=t.disabled)?r:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let a=e.activeOptionIndex;if(null!==e.activeOptionIndex){let r=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);a=-1!==r?r:null}return{...e,activeOptionIndex:a,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},f_e=u(null);function p_e(e){let t=h(f_e);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,p_e),t}return t}f_e.displayName="ComboboxActionsContext";let v_e=u(null);function m_e(e){let r=g_e("VirtualProvider"),{options:n}=r.virtual,[a,o]=l((()=>{let e=r.optionsElement;if(!e)return[0,0];let t=window.getComputedStyle(e);return[parseFloat(t.paddingBlockStart||t.paddingTop),parseFloat(t.paddingBlockEnd||t.paddingBottom)]}),[r.optionsElement]),s=rbe({enabled:0!==n.length,scrollPaddingStart:a,scrollPaddingEnd:o,count:n.length,estimateSize:()=>40,getScrollElement:()=>r.optionsElement,overscan:12}),[c,d]=i(0);tge((()=>{d((e=>e+1))}),[n]);let u=s.getVirtualItems();return 0===u.length?null:t.createElement(v_e.Provider,{value:s},t.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:e=>{e&&0!==r.activationTrigger&&null!==r.activeOptionIndex&&n.length>r.activeOptionIndex&&s.scrollToIndex(r.activeOptionIndex)}},u.map((r=>{var a;return t.createElement(f,{key:r.key},t.cloneElement(null==(a=e.children)?void 0:a.call(e,{...e.slot,option:n[r.index]}),{key:`${c}-${r.key}`,"data-index":r.index,"aria-setsize":n.length,"aria-posinset":r.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}}))}))))}let y_e=u(null);function g_e(e){let t=h(y_e);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,g_e),t}return t}function b_e(e,t){return ige(t.type,h_e,e,t)}y_e.displayName="ComboboxDataContext";let k_e=f;let w_e=sge.RenderStrategy|sge.Static;let __e=vge((function(e,r){var o,s;let c=oge(),{value:d,defaultValue:u,onChange:h,form:f,name:p,by:v,disabled:m=c||!1,onClose:g,__demoMode:k=!1,multiple:w=!1,immediate:_=!1,virtual:M=null,nullable:x,...j}=e,O=function(e){let[t]=i(e);return t}(u),[E=(w?[]:void 0),z]=function(e,t,r){let[a,o]=i(r),l=void 0!==e,s=n(l),c=n(!1),d=n(!1);return!l||s.current||c.current?!l&&s.current&&!d.current&&(d.current=!0,s.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(c.current=!0,s.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[l?e:a,nge((e=>(l||o(e),null==t?void 0:t(e))))]}(d,h,O),[C,P]=y(b_e,{dataRef:b(),comboboxState:k?0:1,isTyping:!1,options:[],virtual:M?{options:M.options,disabled:null!=(o=M.disabled)?o:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:k}),A=n(!1),R=n({static:!1,hold:!1}),L=function(e=nbe){return a(((t,r)=>{if("string"==typeof e){let n=e;return(null==t?void 0:t[n])===(null==r?void 0:r[n])}return e(t,r)}),[e])}(v),I=nge((e=>M?null===v?M.options.indexOf(e):M.options.findIndex((t=>L(t,e))):C.options.findIndex((t=>L(t.dataRef.current.value,e))))),S=a((e=>ige(H.mode,{1:()=>E.some((t=>L(t,e))),0:()=>L(E,e)})),[E]),V=nge((e=>C.activeOptionIndex===I(e))),H=l((()=>({...C,immediate:_,optionsPropsRef:R,value:E,defaultValue:O,disabled:m,mode:w?1:0,virtual:M?C.virtual:null,get activeOptionIndex(){if(A.current&&null===C.activeOptionIndex&&(M?M.options.length>0:C.options.length>0)){if(M){let e=M.options.findIndex((e=>{var t,r;return!(null!=(r=null==(t=M.disabled)?void 0:t.call(M,e))&&r)}));if(-1!==e)return e}let e=C.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return C.activeOptionIndex},calculateIndex:I,compare:L,isSelected:S,isActive:V})),[E,O,m,w,k,C,M]);tge((()=>{var e;M&&P({type:7,options:M.options,disabled:null!=(e=M.disabled)?e:null})}),[M,null==M?void 0:M.options,null==M?void 0:M.disabled]),tge((()=>{C.dataRef.current=H}),[H]),xbe(0===H.comboboxState,[H.buttonElement,H.inputElement,H.optionsElement],(()=>K.closeCombobox()));let Z=l((()=>{var e,t,r;return{open:0===H.comboboxState,disabled:m,activeIndex:H.activeOptionIndex,activeOption:null===H.activeOptionIndex?null:H.virtual?H.virtual.options[null!=(e=H.activeOptionIndex)?e:0]:null!=(r=null==(t=H.options[H.activeOptionIndex])?void 0:t.dataRef.current.value)?r:null,value:E}}),[H,m,E]),N=nge((()=>{if(null!==H.activeOptionIndex){if(K.setIsTyping(!1),H.virtual)W(H.virtual.options[H.activeOptionIndex]);else{let{dataRef:e}=H.options[H.activeOptionIndex];W(e.current.value)}K.goToOption(Uwe.Specific,H.activeOptionIndex)}})),D=nge((()=>{P({type:0}),A.current=!0})),q=nge((()=>{P({type:1}),A.current=!1,null==g||g()})),B=nge((e=>{P({type:3,isTyping:e})})),F=nge(((e,t,r)=>(A.current=!1,e===Uwe.Specific?P({type:2,focus:Uwe.Specific,idx:t,trigger:r}):P({type:2,focus:e,trigger:r})))),T=nge(((e,t)=>(P({type:4,payload:{id:e,dataRef:t}}),()=>{H.isActive(t.current.value)&&(A.current=!0),P({type:5,id:e})}))),W=nge((e=>ige(H.mode,{0:()=>null==z?void 0:z(e),1(){let t=H.value.slice(),r=t.findIndex((t=>L(t,e)));return-1===r?t.push(e):t.splice(r,1),null==z?void 0:z(t)}}))),U=nge((e=>{P({type:6,trigger:e})})),$=nge((e=>{P({type:8,element:e})})),G=nge((e=>{P({type:9,element:e})})),Y=nge((e=>{P({type:10,element:e})})),K=l((()=>({onChange:W,registerOption:T,goToOption:F,setIsTyping:B,closeCombobox:q,openCombobox:D,setActivationTrigger:U,selectActiveOption:N,setInputElement:$,setButtonElement:G,setOptionsElement:Y})),[]),[X,Q]=function({inherit:e=!1}={}){let r=Nge(),[n,a]=i([]),o=e?[r,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,l((()=>function(e){let r=nge((e=>(a((t=>[...t,e])),()=>a((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),n=l((()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value})),[r,e.slot,e.name,e.props,e.value]);return t.createElement(Hge.Provider,{value:n},e.children)}),[a])]}(),J=null===r?{}:{ref:r},ee=a((()=>{if(void 0!==O)return null==z?void 0:z(O)}),[z,O]),te=dge();return t.createElement(Q,{value:X,props:{htmlFor:null==(s=H.inputElement)?void 0:s.id},slot:{open:0===H.comboboxState,disabled:m}},t.createElement(Vwe,null,t.createElement(f_e.Provider,{value:K},t.createElement(y_e.Provider,{value:H},t.createElement(Twe,{value:ige(H.comboboxState,{0:Fwe.Open,1:Fwe.Closed})},null!=p&&t.createElement(Oge,{disabled:m,data:null!=E?{[p]:E}:{},form:f,onReset:ee}),te({ourProps:J,theirProps:j,slot:Z,defaultTag:k_e,name:"Combobox"}))))))})),M_e=vge((function(e,t){var r;let a=g_e("Combobox.Button"),o=p_e("Combobox.Button"),s=Rge(t,o.setButtonElement),c=m(),{id:d=`headlessui-combobox-button-${c}`,disabled:u=a.disabled||!1,autoFocus:h=!1,...f}=e,p=Obe(a.inputElement),v=nge((e=>{switch(e.key){case Vge.Space:case Vge.Enter:return e.preventDefault(),e.stopPropagation(),1===a.comboboxState&&C((()=>o.openCombobox())),void p();case Vge.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===a.comboboxState&&(C((()=>o.openCombobox())),a.value||o.goToOption(Uwe.First)),void p();case Vge.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===a.comboboxState&&(C((()=>o.openCombobox())),a.value||o.goToOption(Uwe.Last)),void p();case Vge.Escape:if(0!==a.comboboxState)return;return e.preventDefault(),a.optionsElement&&!a.optionsPropsRef.current.static&&e.stopPropagation(),C((()=>o.closeCombobox())),void p();default:return}})),y=nge((e=>{e.preventDefault(),!Pge(e.currentTarget)&&(e.button===Gwe.Left&&(0===a.comboboxState?o.closeCombobox():o.openCombobox()),p())})),g=Nge([d]),{isFocusVisible:b,focusProps:k}=$ye({autoFocus:h}),{isHovered:w,hoverProps:_}=Uye({isDisabled:u}),{pressed:M,pressProps:x}=function({disabled:e=!1}={}){let t=n(null),[r,a]=i(!1),o=ege(),l=nge((()=>{t.current=null,a(!1),o.dispose()})),s=nge((e=>{if(o.dispose(),null===t.current){t.current=e.currentTarget,a(!0);{let r=Xye(e.currentTarget);o.addEventListener(r,"pointerup",l,!1),o.addEventListener(r,"pointermove",(e=>{if(t.current){let r=function(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}(e);a(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(r,t.current.getBoundingClientRect()))}}),!1),o.addEventListener(r,"pointercancel",l,!1)}}}));return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:l,onClick:l}}}({disabled:u}),j=l((()=>({open:0===a.comboboxState,active:M||0===a.comboboxState,disabled:u,value:a.value,hover:w,focus:b})),[a,w,b,M,u]),O=pge({ref:s,id:d,type:Ebe(e,a.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(r=a.optionsElement)?void 0:r.id,"aria-expanded":0===a.comboboxState,"aria-labelledby":g,disabled:u||void 0,autoFocus:h,onMouseDown:y,onKeyDown:v},k,_,x);return dge()({ourProps:O,theirProps:f,slot:j,defaultTag:"button",name:"Combobox.Button"})})),x_e=vge((function(e,t){var r,a,o,i,s;let c=g_e("Combobox.Input"),d=p_e("Combobox.Input"),u=m(),f=Cge(),{id:p=f||`headlessui-combobox-input-${u}`,onChange:v,displayValue:y,disabled:g=c.disabled||!1,autoFocus:b=!1,type:k="text",...w}=e,_=n(null),M=Rge(_,t,h(Iwe).setReference,d.setInputElement),x=jbe(c.inputElement),j=ege(),O=nge((()=>{d.onChange(null),c.optionsElement&&(c.optionsElement.scrollTop=0),d.goToOption(Uwe.Nothing)})),E=l((()=>{var e;return"function"==typeof y&&void 0!==c.value?null!=(e=y(c.value))?e:"":"string"==typeof c.value?c.value:""}),[c.value,y]);Zbe((([e,t],[r,n])=>{if(c.isTyping)return;let a=_.current;a&&((0===n&&1===t||e!==r)&&(a.value=e),requestAnimationFrame((()=>{if(c.isTyping||!a||(null==x?void 0:x.activeElement)!==a)return;let{selectionStart:e,selectionEnd:t}=a;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&a.setSelectionRange(a.value.length,a.value.length)})))}),[E,c.comboboxState,x,c.isTyping]),Zbe((([e],[t])=>{if(0===e&&1===t){if(c.isTyping)return;let e=_.current;if(!e)return;let t=e.value,{selectionStart:r,selectionEnd:n,selectionDirection:a}=e;e.value="",e.value=t,null!==a?e.setSelectionRange(r,n,a):e.setSelectionRange(r,n)}}),[c.comboboxState]);let z=n(!1),P=nge((()=>{z.current=!0})),A=nge((()=>{j.nextFrame((()=>{z.current=!1}))})),R=nge((e=>{switch(d.setIsTyping(!0),e.key){case Vge.Enter:if(0!==c.comboboxState||z.current)return;if(e.preventDefault(),e.stopPropagation(),null===c.activeOptionIndex)return void d.closeCombobox();d.selectActiveOption(),0===c.mode&&d.closeCombobox();break;case Vge.ArrowDown:return e.preventDefault(),e.stopPropagation(),ige(c.comboboxState,{0:()=>d.goToOption(Uwe.Next),1:()=>d.openCombobox()});case Vge.ArrowUp:return e.preventDefault(),e.stopPropagation(),ige(c.comboboxState,{0:()=>d.goToOption(Uwe.Previous),1:()=>{C((()=>d.openCombobox())),c.value||d.goToOption(Uwe.Last)}});case Vge.Home:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),d.goToOption(Uwe.First);case Vge.PageUp:return e.preventDefault(),e.stopPropagation(),d.goToOption(Uwe.First);case Vge.End:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),d.goToOption(Uwe.Last);case Vge.PageDown:return e.preventDefault(),e.stopPropagation(),d.goToOption(Uwe.Last);case Vge.Escape:return 0!==c.comboboxState?void 0:(e.preventDefault(),c.optionsElement&&!c.optionsPropsRef.current.static&&e.stopPropagation(),0===c.mode&&null===c.value&&O(),d.closeCombobox());case Vge.Tab:if(0!==c.comboboxState)return;0===c.mode&&1!==c.activationTrigger&&d.selectActiveOption(),d.closeCombobox()}})),L=nge((e=>{null==v||v(e),0===c.mode&&""===e.target.value&&O(),d.openCombobox()})),I=nge((e=>{var t,r,n;let a=null!=(t=e.relatedTarget)?t:Wwe.find((t=>t!==e.currentTarget));if(!(null!=(r=c.optionsElement)&&r.contains(a)||null!=(n=c.buttonElement)&&n.contains(a)||0!==c.comboboxState))return e.preventDefault(),0===c.mode&&null===c.value&&O(),d.closeCombobox()})),S=nge((e=>{var t,r,n;let a=null!=(t=e.relatedTarget)?t:Wwe.find((t=>t!==e.currentTarget));null!=(r=c.buttonElement)&&r.contains(a)||null!=(n=c.optionsElement)&&n.contains(a)||c.disabled||c.immediate&&0!==c.comboboxState&&j.microTask((()=>{C((()=>d.openCombobox())),d.setActivationTrigger(1)}))})),V=Nge(),H=function(){var e,t;return null!=(t=null==(e=h(Lge))?void 0:e.value)?t:void 0}(),{isFocused:Z,focusProps:N}=$ye({autoFocus:b}),{isHovered:D,hoverProps:q}=Uye({isDisabled:g}),B=l((()=>({open:0===c.comboboxState,disabled:g,hover:D,focus:Z,autofocus:b})),[c,D,Z,b,g]),F=pge({ref:M,id:p,role:"combobox",type:k,"aria-controls":null==(r=c.optionsElement)?void 0:r.id,"aria-expanded":0===c.comboboxState,"aria-activedescendant":null===c.activeOptionIndex?void 0:c.virtual?null==(a=c.options.find((e=>!e.dataRef.current.disabled&&c.compare(e.dataRef.current.value,c.virtual.options[c.activeOptionIndex]))))?void 0:a.id:null==(o=c.options[c.activeOptionIndex])?void 0:o.id,"aria-labelledby":V,"aria-describedby":H,"aria-autocomplete":"list",defaultValue:null!=(s=null!=(i=e.defaultValue)?i:void 0!==c.defaultValue?null==y?void 0:y(c.defaultValue):null)?s:c.defaultValue,disabled:g||void 0,autoFocus:b,onCompositionStart:P,onCompositionEnd:A,onKeyDown:R,onChange:L,onFocus:S,onBlur:I},N,q);return dge()({ourProps:F,theirProps:w,slot:B,defaultTag:"input",name:"Combobox.Input"})})),j_e=qge,O_e=vge((function(e,r){var o,c,d;let u=m(),{id:f=`headlessui-combobox-options-${u}`,hold:p=!1,anchor:v,portal:y=!1,modal:g=!0,transition:b=!1,...k}=e,w=g_e("Combobox.Options"),_=p_e("Combobox.Options"),M=function(e){return l((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(v);M&&(y=!0);let[x,j]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=h(Swe),r=l((()=>e),[JSON.stringify(e,((e,t)=>{var r;return null!=(r=null==t?void 0:t.outerHTML)?r:t}))]);tge((()=>{null==t||t(null!=r?r:null)}),[t,r]);let n=h(Iwe);return l((()=>[n.setFloating,e?n.styles:{}]),[n.setFloating,e,n.styles])}(M),[O,E]=i(null),z=function(){let{getFloatingProps:e,slot:t}=h(Iwe);return a(((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor})),[e,t])}(),C=Rge(r,M?x:null,_.setOptionsElement,E),P=jbe(w.optionsElement),A=h(Bwe),[R,L]=Hbe(b,O,null!==A?(A&Fwe.Open)===Fwe.Open:0===w.comboboxState);!function(e,t,r){let n=rge((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&r()}));s((()=>{if(!e)return;let r=null===t?null:t instanceof HTMLElement?t:t.current;if(!r)return;let a=Jye();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>n.current(r)));e.observe(r),a.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>n.current(r)));e.observe(r),a.add((()=>e.disconnect()))}return()=>a.dispose()}),[t,n,e])}(R,w.inputElement,_.closeCombobox),Abe(!w.__demoMode&&(g&&0===w.comboboxState),P),pbe(!w.__demoMode&&(g&&0===w.comboboxState),{allowed:a((()=>[w.inputElement,w.buttonElement,w.optionsElement]),[w.inputElement,w.buttonElement,w.optionsElement])}),tge((()=>{var t;w.optionsPropsRef.current.static=null!=(t=e.static)&&t}),[w.optionsPropsRef,e.static]),tge((()=>{w.optionsPropsRef.current.hold=p}),[w.optionsPropsRef,p]),function(e,{container:t,accept:r,walk:a}){let o=n(r),l=n(a);s((()=>{o.current=r,l.current=a}),[r,a]),tge((()=>{if(!t||!e)return;let r=Xye(t);if(!r)return;let n=o.current,a=l.current,i=Object.assign((e=>n(e)),{acceptNode:n}),s=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,i,!1);for(;s.nextNode();)a(s.currentNode)}),[t,e,o,l])}(0===w.comboboxState,{container:w.optionsElement,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let I=Nge([null==(o=w.buttonElement)?void 0:o.id]),S=l((()=>({open:0===w.comboboxState,option:void 0})),[w.comboboxState]),V=nge((()=>{_.setActivationTrigger(0)})),H=nge((e=>{e.preventDefault(),_.setActivationTrigger(0)})),Z=pge(M?z():{},{"aria-labelledby":I,role:"listbox","aria-multiselectable":1===w.mode||void 0,id:f,ref:C,style:{...k.style,...j,"--input-width":abe(w.inputElement,!0).width,"--button-width":abe(w.buttonElement,!0).width},onWheel:0===w.activationTrigger?void 0:V,onMouseDown:H,...Vbe(L)}),N=R&&1===w.comboboxState,D=qwe(N,null==(c=w.virtual)?void 0:c.options),q=qwe(N,w.value),B=nge((e=>w.compare(q,e)));if(w.virtual){if(void 0===D)throw new Error("Missing `options` in virtual mode");Object.assign(k,{children:t.createElement(y_e.Provider,{value:D!==w.virtual.options?{...w,virtual:{...w.virtual,options:D}}:w},t.createElement(m_e,{slot:S},k.children))})}let F=dge();return t.createElement(l_e,{enabled:!!y&&(e.static||R)},t.createElement(y_e.Provider,{value:1===w.mode?w:{...w,isSelected:B}},F({ourProps:Z,theirProps:{...k,children:t.createElement(Dwe,{freeze:N},"function"==typeof k.children?null==(d=k.children)?void 0:d.call(k,S):k.children)},slot:S,defaultTag:"div",features:w_e,visible:R,name:"Combobox.Options"})))})),E_e=vge((function(e,t){var r,a,o,i;let s=g_e("Combobox.Option"),c=p_e("Combobox.Option"),d=m(),{id:u=`headlessui-combobox-option-${d}`,value:f,disabled:p=null!=(o=null==(a=null==(r=s.virtual)?void 0:r.disabled)?void 0:a.call(r,f))&&o,order:v=null,...y}=e,g=Obe(s.inputElement),b=s.virtual?s.activeOptionIndex===s.calculateIndex(f):null!==s.activeOptionIndex&&(null==(i=s.options[s.activeOptionIndex])?void 0:i.id)===u,k=s.isSelected(f),w=n(null),_=rge({disabled:p,value:f,domRef:w,order:v}),M=h(v_e),x=Rge(t,w,M?M.measureElement:null),j=nge((()=>{c.setIsTyping(!1),c.onChange(f)}));tge((()=>c.registerOption(u,_)),[_,u]);let O=n(!(s.virtual||s.__demoMode));tge((()=>{if(!s.virtual&&!s.__demoMode)return Jye().requestAnimationFrame((()=>{O.current=!0}))}),[s.virtual,s.__demoMode]),tge((()=>{if(O.current&&0===s.comboboxState&&b&&0!==s.activationTrigger)return Jye().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=w.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[w,b,s.comboboxState,s.activationTrigger,s.activeOptionIndex]);let E=nge((e=>{e.preventDefault(),e.button===Gwe.Left&&(p||(j(),_be()||requestAnimationFrame((()=>g())),0===s.mode&&c.closeCombobox()))})),z=nge((()=>{if(p)return c.goToOption(Uwe.Nothing);let e=s.calculateIndex(f);c.goToOption(Uwe.Specific,e)})),C=function(){let e=n([-1,-1]);return{wasMoved(t){let r=Rbe(t);return(e.current[0]!==r[0]||e.current[1]!==r[1])&&(e.current=r,!0)},update(t){e.current=Rbe(t)}}}(),P=nge((e=>C.update(e))),A=nge((e=>{if(!C.wasMoved(e)||p||b)return;let t=s.calculateIndex(f);c.goToOption(Uwe.Specific,t,0)})),R=nge((e=>{C.wasMoved(e)&&(p||b&&(s.optionsPropsRef.current.hold||c.goToOption(Uwe.Nothing)))})),L=l((()=>({active:b,focus:b,selected:k,disabled:p})),[b,k,p]),I={id:u,ref:x,role:"option",tabIndex:!0===p?void 0:-1,"aria-disabled":!0===p||void 0,"aria-selected":k,disabled:void 0,onMouseDown:E,onFocus:z,onPointerEnter:P,onMouseEnter:P,onPointerMove:A,onMouseMove:A,onPointerLeave:R,onMouseLeave:R};return dge()({ourProps:I,theirProps:y,slot:L,defaultTag:"div",name:"Combobox.Option"})})),z_e=Object.assign(__e,{Input:x_e,Button:M_e,Label:j_e,Options:O_e,Option:E_e});x(["absolute inset-y-0 right-0 flex items-center justify-center"],{variants:{size:{sm:"mr-2",md:"mr-3",lg:"mr-4"}},defaultVariants:{size:"md"}});const C_e=x(["transition-all"],{variants:{disabled:{true:"fill-input-text-disabled",false:"fill-inherit"},isFocus:{true:"fill-input-text-active rotate-180",false:""}},defaultVariants:{disabled:!1,isFocus:!1}}),P_e=x([],{variants:{size:{sm:"pe-[30px]",md:"pe-[40px]",lg:"pe-[68px]"}},defaultVariants:{size:"md"}}),A_e=PM("relative flex gap-1 cursor-pointer select-none box-border items-center py-4 pl-4 pr-8 typography-subtitle4 outline-none transition-colors","bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]","active:opacity-75","hover:bg-[var(--dropdown-menu-hover-bg)] hover:text-[var(--dropdown-menu-hover-text)]"),R_e=r(((e,t)=>{var{id:r,options:o=[],value:d,label:u,size:h="md",rounded:p="normal",variant:v="outline",helperText:m,errorMessage:y,fullwidth:g=!0,disabled:b=!1,error:k=!1,filterMode:x=!1,required:j=!0,modal:O,onChangeText:E,onSelect:z,renderOptions:C,optionContainerClassName:P,optionItemClassName:A,optionNotFoundItemClassName:R,segmentedInput:L=!0}=e,I=EM(e,["id","options","value","label","size","rounded","variant","helperText","errorMessage","fullwidth","disabled","error","filterMode","required","modal","onChangeText","onSelect","renderOptions","optionContainerClassName","optionItemClassName","optionNotFoundItemClassName","segmentedInput"]);const S=r||`${u}-select`,[V,H]=i(null),[Z,N]=i(""),D=n(null);c(t,(()=>D.current),[]),s((()=>{H(null!=d?d:null)}),[d]);const q=l((()=>x&&Z?o.filter((e=>e.label.toLowerCase().includes(Z.toLowerCase()))):o),[o,x,Z]),B=a((e=>{H(e),N(""),e&&(null==z||z(e),setTimeout((()=>{var e;return null===(e=D.current)||void 0===e?void 0:e.blur()}),0))}),[z]),F=a((e=>{x&&N(e.target.value),null==E||E(e)}),[x,E]);return w(z_e,{value:V,onChange:B,immediate:!0,by:"value",disabled:b,children:({open:e})=>_("div",{className:PM("relative",g&&"w-full"),children:[w(x_e,Object.assign({as:$me,ref:D,hasClearIcon:!1,endIcon:w(In,{className:C_e({isFocus:e})}),label:u,placeholder:" ",autoComplete:"off",rounded:p,variant:v,helperText:m,errorMessage:y,fullwidth:g,error:k,required:j,id:S,disabled:b,size:h,className:L?P_e({size:h}):void 0,displayValue:e=>{var t;return null!==(t=null==e?void 0:e.label)&&void 0!==t?t:""},readOnly:!x,onChange:F},I)),w(O_e,{className:PM("absolute top-full left-0 w-full -mt-3 z-[51]","min-w-[154px] max-h-60 overflow-y-auto","rounded-md bg-modal-dropdown-surface border border-bg-stroke3 text-text-g-contrast-high",P),style:{boxShadow:"var(--dropdown-menu-shadow)"},children:C?C({optionsFiltered:q,selectedOption:V,onClick:B}):0===q.length?w("div",{className:PM("px-4 py-14 text-center text-input-text",R),children:"Not found"}):q.map((e=>e.renderLabel?w(f,{children:e.renderLabel({value:e.value,label:e.label,handleOnClick:()=>B(e),className:PM(A_e,(null==V?void 0:V.value)===e.value&&"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)]",A)})},e.value):w(E_e,{value:e,className:({focus:t,selected:r})=>PM(A_e,(r||(null==V?void 0:V.value)===e.value)&&"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)]",t&&"bg-[var(--dropdown-menu-hover-bg)] text-[var(--dropdown-menu-hover-text)]",A),children:({selected:t})=>_(M,{children:[w("span",{className:"shrink-0 size-4 flex items-center justify-center",children:(t||(null==V?void 0:V.value)===e.value)&&w(tye,{type:"heroicons",name:"check",className:"size-4 text-[var(--dropdown-menu-selected-text)]"})}),e.label]})},e.value)))})]})})}));function L_e(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function I_e(...t){return e.useCallback(L_e(...t),t)}function S_e(t,r=[]){let n=[];const a=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const a=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:a}})),[n,a])}};return a.scopeName=t,[function(r,a){const o=e.createContext(a),l=n.length;n=[...n,a];const i=r=>{const{scope:n,children:a,...i}=r,s=n?.[t]?.[l]||o,c=e.useMemo((()=>i),Object.values(i));return w(s.Provider,{value:c,children:a})};return i.displayName=r+"Provider",[i,function(n,i){const s=i?.[t]?.[l]||o,c=e.useContext(s);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},V_e(a,...r)]}function V_e(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const a=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:a})),[a])}};return n.scopeName=r.scopeName,n}function H_e(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Z_e(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>r.current?.(...e)),[])}function N_e({prop:t,defaultProp:r,onChange:n=()=>{}}){const[a,o]=function({defaultProp:t,onChange:r}){const n=e.useState(t),[a]=n,o=e.useRef(a),l=Z_e(r);return e.useEffect((()=>{o.current!==a&&(l(a),o.current=a)}),[a,o,l]),n}({defaultProp:r,onChange:n}),l=void 0!==t,i=l?t:a,s=Z_e(n);return[i,e.useCallback((e=>{if(l){const r="function"==typeof e?e(t):e;r!==t&&s(r)}else o(e)}),[l,t,o,s])]}function D_e(t){const r=e.useRef({value:t,previous:t});return e.useMemo((()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous)),[t])}R_e.displayName="Dropdown";var q_e=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{};function B_e(t){const[r,n]=e.useState(void 0);return q_e((()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=t.offsetWidth,o=t.offsetHeight;n({width:a,height:o})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)}),[t]),r}var F_e=t=>{const{present:r,children:n}=t,a=function(t){const[r,n]=e.useState(),a=e.useRef({}),o=e.useRef(t),l=e.useRef("none"),i=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=T_e(a.current);l.current="mounted"===s?e:"none"}),[s]),q_e((()=>{const e=a.current,r=o.current;if(r!==t){const n=l.current,a=T_e(e);if(t)c("MOUNT");else if("none"===a||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=t}}),[t,c]),q_e((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const l=T_e(a.current).includes(n.animationName);if(n.target===r&&l&&(c("ANIMATION_END"),!o.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},i=e=>{e.target===r&&(l.current=T_e(a.current))};return r.addEventListener("animationstart",i),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",i),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(a.current=getComputedStyle(e)),n(e)}),[])}}(r),o="function"==typeof n?n({present:a.isPresent}):e.Children.only(n),l=I_e(a.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||a.isPresent?e.cloneElement(o,{ref:l}):null};function T_e(e){return e?.animationName||"none"}F_e.displayName="Presence";var W_e=e.forwardRef(((t,r)=>{const{children:n,...a}=t,o=e.Children.toArray(n),l=o.find(G_e);if(l){const t=l.props.children,n=o.map((r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r));return w(U_e,{...a,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,n):null})}return w(U_e,{...a,ref:r,children:n})}));W_e.displayName="Slot";var U_e=e.forwardRef(((t,r)=>{const{children:n,...a}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n);return e.cloneElement(n,{...Y_e(a,n.props),ref:r?L_e(r,t):t})}return e.Children.count(n)>1?e.Children.only(null):null}));U_e.displayName="SlotClone";var $_e=({children:e})=>w(M,{children:e});function G_e(t){return e.isValidElement(t)&&t.type===$_e}function Y_e(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{o(...e),a(...e)}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}var K_e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...a}=e,o=n?W_e:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),w(o,{...a,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{}),X_e="Checkbox",[Q_e,J_e]=S_e(X_e),[eMe,tMe]=Q_e(X_e),rMe=e.forwardRef(((t,r)=>{const{__scopeCheckbox:n,name:a,checked:o,defaultChecked:l,required:i,disabled:s,value:c="on",onCheckedChange:d,form:u,...h}=t,[f,p]=e.useState(null),v=I_e(r,(e=>p(e))),m=e.useRef(!1),y=!f||(u||!!f.closest("form")),[g=!1,b]=N_e({prop:o,defaultProp:l,onChange:d}),k=e.useRef(g);return e.useEffect((()=>{const e=f?.form;if(e){const t=()=>b(k.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,b]),_(eMe,{scope:n,state:g,disabled:s,children:[w(K_e.button,{type:"button",role:"checkbox","aria-checked":lMe(g)?"mixed":g,"aria-required":i,"data-state":iMe(g),"data-disabled":s?"":void 0,disabled:s,value:c,...h,ref:v,onKeyDown:H_e(t.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:H_e(t.onClick,(e=>{b((e=>!!lMe(e)||!e)),y&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),y&&w(oMe,{control:f,bubbles:!m.current,name:a,value:c,checked:g,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!lMe(l)&&l})]})}));rMe.displayName=X_e;var nMe="CheckboxIndicator",aMe=e.forwardRef(((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,o=tMe(nMe,r);return w(F_e,{present:n||lMe(o.state)||!0===o.state,children:w(K_e.span,{"data-state":iMe(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));aMe.displayName=nMe;var oMe=t=>{const{control:r,checked:n,bubbles:a=!0,defaultChecked:o,...l}=t,i=e.useRef(null),s=D_e(n),c=B_e(r);e.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&r){const t=new Event("click",{bubbles:a});e.indeterminate=lMe(n),r.call(e,!lMe(n)&&n),e.dispatchEvent(t)}}),[s,n,a]);const d=e.useRef(!lMe(n)&&n);return w("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??d.current,...l,tabIndex:-1,ref:i,style:{...t.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function lMe(e){return"indeterminate"===e}function iMe(e){return lMe(e)?"indeterminate":e?"checked":"unchecked"}var sMe=rMe,cMe=aMe;const dMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(sMe,Object.assign({ref:t,className:PM("peer size-4 shrink-0 cursor-pointer rounded-[var(--spacing-spacing-xxs,2px)] border border-function-default-solid ring-offset-bg-bg1","hover:border-function-default-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-input-active-stroke focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:border-state-disable-outline disabled:text-state-disable-outline","disabled:data-[state=checked]:border-state-disable-solid disabled:data-[state=checked]:bg-state-disable-solid","disabled:data-[state=indeterminate]:border-state-disable-solid disabled:data-[state=indeterminate]:bg-state-disable-solid",{"data-[state=checked]:border-function-active-solid data-[state=checked]:bg-function-active-solid data-[state=checked]:text-function-active-icon data-[state=indeterminate]:border-function-active-solid data-[state=indeterminate]:bg-function-active-solid data-[state=indeterminate]:text-function-active-icon":!n.disabled,"hover:data-[state=checked]:border-function-active-hover hover:data-[state=checked]:bg-function-active-hover hover:data-[state=indeterminate]:border-function-active-hover hover:data-[state=indeterminate]:bg-function-active-hover":!n.disabled},r)},n,{children:_(cMe,{className:PM("flex size-[14px] items-center justify-center text-current","[&[data-state=checked]_.checkbox-check-icon]:block","[&[data-state=indeterminate]_.checkbox-minus-icon]:block"),children:[w(xn,{className:"checkbox-check-icon hidden size-[14px]"}),w(Ji,{className:"checkbox-minus-icon hidden size-[14px]"})]})}))}));dMe.displayName=sMe.displayName;var uMe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...a}=e,o=n?W_e:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),w(o,{...a,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{}),hMe=e.forwardRef(((e,t)=>w(uMe.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));hMe.displayName="Label";var fMe=hMe;const pMe=x(["block cursor-pointer duration-450 transition-all px-[2px] text-input-default-text peer-focus:text-input-text-active"],{variants:{size:{sm:"typography-small1",md:"typography-subtitle2",lg:"typography-subtitle1"},disabled:{true:"text-input-text-disabled ring-input-stroke-disabled placeholder:text-input-text-disabled peer-disabled:cursor-not-allowed"},error:{true:"ring-error"},isFloatable:{true:"absolute peer-focus:text-input-text-active peer-focus:bg-input-label-background",false:""}},compoundVariants:[{size:"sm",isFloatable:!0,className:["left-3 -top-1.5 typography-label2 bg-input-label-background","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label2"]},{size:"md",isFloatable:!0,className:["left-3 -top-1.5 typography-label1 bg-input-label-background","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{size:"lg",isFloatable:!0,className:["left-4 -top-1.5 typography-label1 bg-input-label-background","peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]}],defaultVariants:{size:"md",disabled:!1,error:!1,isFloatable:!1}}),vMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(fMe,Object.assign({ref:t,className:PM(pMe({size:n.size,disabled:n.disabled,error:n.error,isFloatable:n.isFloatable}),r)},n))}));vMe.displayName=fMe.displayName;const mMe=x(["border-0 outline-none","p-1 flex w-auto h-fit box-border","peer text-input-filled-text placeholder:text-input-default-text bg-transparent caret-primary"],{variants:{size:{sm:"p-2 px-3 typography-small1",md:"py-2 px-3 typography-subtitle4",lg:"p-4 typography-subtitle1"},rounded:{none:"rounded-none",normal:"rounded-xl",full:"rounded-full"},variant:{flat:"",outline:["ring-1 ring-inset ring-input-default-stroke","hover:ring-input-active-stroke hover:text-input-filled-text","focus:ring-1 focus:ring-inset focus:ring-input-active-stroke focus:text-input-filled-text active:text-input-filled-text"],underline:"border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-default-stroke"},hiddenPlaceholder:{true:"placeholder:text-transparent"},fullwidth:{true:"w-full"},disabled:{true:["text-input-disable-text ring-input-disable-stroke bg-input-disable-bg placeholder:text-input-disable-text","hover:text-input-disable-text hover:ring-input-disable-stroke hover:bg-input-disable-bg hover:placeholder:text-input-disable-text","active:text-input-disable-text active:ring-input-disable-stroke active:bg-input-disable-bg active:placeholder:text-input-disable-text"]},error:{true:"ring-input-error focus:ring-input-error"}},defaultVariants:{size:"md",variant:"outline",rounded:"normal",fullwidth:!1,disabled:!1,error:!1,hiddenPlaceholder:!0}}),yMe=r(((e,t)=>{var{className:r,type:n="text",size:a="md",variant:o="outline",rounded:l="normal",fullwidth:i=!1,disabled:s=!1,error:c=!1,required:d=!1,hiddenPlaceholder:u=!1}=e,h=EM(e,["className","type","size","variant","rounded","fullwidth","disabled","error","required","hiddenPlaceholder"]);return w("input",Object.assign({type:n,className:PM(mMe({size:a,variant:o,fullwidth:i,error:c,hiddenPlaceholder:u,disabled:s,rounded:l}),r),ref:t,disabled:s},h))}));yMe.displayName="Input";const gMe=({children:e,className:t,variant:r="default",scrollShadow:n=!1,center:a,leftNav:o,rightNav:l,position:c,container:d=!1,containerClassName:u,leftNavClassName:h,centerClassName:f,rightNavClassName:p})=>{const[v,m]=i(!1);s((()=>{if(!n||"undefined"==typeof window)return;const e=()=>{m(window.scrollY>4)};return e(),window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)}),[n]);const y="transparent"===r;return _("header",{className:PM("relative w-full px-4 py-6 h-[var(--navbar-height)] box-border overflow-hidden typography-subtitle2 border-solid border-b-2 text-[rgb(var(--navbar-text-color))] border-b-[rgb(var(--navbar-border-color))] transition-shadow duration-200",{position:c},n&&v&&"shadow-[var(--navbar-shadow-scrolled)]",t),children:[!y&&w("div",{className:"absolute inset-0 -z-10 bg-[rgb(var(--navbar-bg-color))]","aria-hidden":!0}),w("div",{className:PM("absolute inset-0 -z-[5] pointer-events-none",t),"aria-hidden":!0}),w("div",{className:PM("relative mx-auto flex h-full justify-between items-center",{container:d},u),children:e||_(M,{children:[w("nav",{className:PM("flex w-1/2 gap-x-[var(--navbar-gap)] text-xl",h),children:o}),w("div",{className:PM("flex flex-shrink-0 flex-wrap justify-center",f),children:a}),w("nav",{className:PM("flex w-1/2 justify-end gap-x-[var(--navbar-gap)] text-xl",p),children:l})]})})]})},bMe=({children:e,className:t,variant:r="default",copyright:n,center:a,leftNav:o,rightNav:l,position:i,container:s=!1,containerClassName:c,leftNavClassName:d,centerClassName:u,rightNavClassName:h})=>{const f="simple"===r,p="transparent"===r,v=o||n,m=f&&null!=n?n:a,y=f?null:l;return _("footer",{className:PM("relative w-full px-4 py-6 box-border overflow-hidden typography-subtitle2 border-solid border-t-2 text-[var(--footer-text-color)] border-t-[var(--footer-border-color)]",f?"h-[var(--footer-height-simple)]":"h-[var(--footer-height)]",{position:i},t),children:[!p&&w("div",{className:"absolute inset-0 -z-10 bg-[var(--footer-bg-color)]","aria-hidden":!0}),w("div",{className:PM("absolute inset-0 -z-[5] pointer-events-none",t),"aria-hidden":!0}),w("div",{className:PM("relative mx-auto flex h-full items-center",f?"justify-center":"justify-between",{container:s},c),children:null!=e?e:f?w("div",{className:PM("text-center",u),children:m}):_(M,{children:[w("nav",{className:PM("flex w-1/2 items-center gap-x-[var(--footer-gap)] text-xl",d),children:n&&o?_(M,{children:[w("span",{className:"flex-shrink-0",children:n}),o]}):v}),w("div",{className:PM("flex flex-shrink-0 flex-wrap justify-center",u),children:m}),w("nav",{className:PM("flex w-1/2 justify-end gap-x-[var(--footer-gap)] text-xl",h),children:y})]})})]})};var kMe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...a}=e,o=n?W_e:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),w(o,{...a,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{}),wMe="Avatar",[_Me,MMe]=S_e(wMe),[xMe,jMe]=_Me(wMe),OMe=e.forwardRef(((t,r)=>{const{__scopeAvatar:n,...a}=t,[o,l]=e.useState("idle");return w(xMe,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:l,children:w(kMe.span,{...a,ref:r})})}));OMe.displayName=wMe;var EMe="AvatarImage",zMe=e.forwardRef(((t,r)=>{const{__scopeAvatar:n,src:a,onLoadingStatusChange:o=()=>{},...l}=t,i=jMe(EMe,n),s=function(t,r){const[n,a]=e.useState("idle");return q_e((()=>{if(!t)return void a("error");let e=!0;const n=new window.Image,o=t=>()=>{e&&a(t)};return a("loading"),n.onload=o("loaded"),n.onerror=o("error"),n.src=t,r&&(n.referrerPolicy=r),()=>{e=!1}}),[t,r]),n}(a,l.referrerPolicy),c=Z_e((e=>{o(e),i.onImageLoadingStatusChange(e)}));return q_e((()=>{"idle"!==s&&c(s)}),[s,c]),"loaded"===s?w(kMe.img,{...l,ref:r,src:a}):null}));zMe.displayName=EMe;var CMe="AvatarFallback",PMe=e.forwardRef(((t,r)=>{const{__scopeAvatar:n,delayMs:a,...o}=t,l=jMe(CMe,n),[i,s]=e.useState(void 0===a);return e.useEffect((()=>{if(void 0!==a){const e=window.setTimeout((()=>s(!0)),a);return()=>window.clearTimeout(e)}}),[a]),i&&"loaded"!==l.imageLoadingStatus?w(kMe.span,{...o,ref:r}):null}));PMe.displayName=CMe;var AMe=OMe,RMe=zMe,LMe=PMe;const IMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(AMe,Object.assign({ref:t,className:PM("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",r)},n))}));IMe.displayName=AMe.displayName;const SMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(RMe,Object.assign({ref:t,className:PM("object-cover object-top h-full w-full",r)},n))}));SMe.displayName=RMe.displayName;const VMe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w(LMe,Object.assign({ref:t,className:PM("flex h-full w-full items-center justify-center rounded-full bg-inherit text-inherit",r)},n))}));VMe.displayName=LMe.displayName;const HMe=x(["flex items-center justify-center bg-grey2-900 text-text-white typography-subtitle6 truncate"],{variants:{size:{xxs:"w-[24px] h-[24px] typography-small3",xs:"w-[32px] h-[32px]",sm:"w-[40px] h-[40px]",md:"w-[48px] h-[48px]",lg:"w-[64px] h-[64px]"},rounded:{normal:"rounded",full:"rounded-full",none:"rounded-none"},hasImage:{true:"bg-white"}},defaultVariants:{size:"md",rounded:"normal"}}),ZMe=e=>{var t,r,n;if(!e.length)return"-";const a=e.split(" ");return`${null==e?void 0:e.charAt(0)}${null!==(n=null!==(r=null===(t=null==a?void 0:a[1])||void 0===t?void 0:t.charAt(0))&&void 0!==r?r:null==e?void 0:e.charAt(1))&&void 0!==n?n:""}`},NMe=({text:e,imageUrl:t,icon:r,fallback:n,size:a,rounded:o,className:l,imageClassName:i,fallbackClassName:s,type:c="text",children:d,style:u})=>{const h=HMe({size:a,rounded:o,hasImage:!!t});return w(IMe,{className:PM(h,l),style:u,children:d||_(M,{children:["image"===c&&_(M,{children:[w(SMe,{src:t,className:PM(i)}),w(VMe,{className:PM(s),children:"string"==typeof n?ZMe(n):n})]}),"text"===c&&ZMe(null!=e?e:""),"icon"===c&&r]})})},DMe=({borderWidth:e=2,borderColor:t="white",maxDisplay:r=4,children:n,remainingText:a,remainingAvatar:o})=>{const l=k.toArray(n),i=l.slice(0,r),s=Math.max(0,l.length-r),c=o||v(i[0],{style:{borderWidth:e,borderColor:t},className:"relative z-0",children:a||`+${s}`});return _("div",{className:"flex items-center -space-x-2",children:[i.map(((r,n)=>w("div",{className:"relative",style:{zIndex:l.length-n},children:v(r,{style:{borderWidth:e,borderColor:t}})},n))),s>0&&c]})},qMe=x(["inline-flex items-center justify-center rounded-lg px-3 py-1","typography-body3"],{variants:{color:{default:["bg-[var(--badge-default-bg)]","text-[var(--badge-default-text)]"],success:["bg-[var(--badge-success-bg)]","text-[var(--badge-success-text)]"],warning:["bg-[var(--badge-warning-bg)]","text-[var(--badge-warning-text)]"],info:["bg-[var(--badge-info-bg)]","text-[var(--badge-info-text)]"],error:["bg-[var(--badge-error-bg)]","text-[var(--badge-error-text)]"]},clickable:{true:"border border-solid",false:""}},compoundVariants:[{color:"default",clickable:!0,className:"border-[var(--badge-default-border)]"},{color:"success",clickable:!0,className:"border-[var(--badge-success-border)]"},{color:"warning",clickable:!0,className:"border-[var(--badge-warning-border)]"},{color:"info",clickable:!0,className:"border-[var(--badge-info-border)]"},{color:"error",clickable:!0,className:"border-[var(--badge-error-border)]"}],defaultVariants:{color:"default",clickable:!1}}),BMe=x(["inline-flex items-center justify-center rounded px-1 py-0.5","typography-small6 text-[var(--badge-severity-text)]"],{variants:{severity:{highest:"bg-[var(--badge-severity-highest-bg)]",high:"bg-[var(--badge-severity-high-bg)]",medium:"bg-[var(--badge-severity-medium-bg)]",low:"bg-[var(--badge-severity-low-bg)]",lowest:"bg-[var(--badge-severity-lowest-bg)]"}},defaultVariants:{severity:"medium"}}),FMe=e.forwardRef(((e,t)=>{var{label:r,color:n="default",clickable:a=!1,percent:o,className:l}=e,i=EM(e,["label","color","clickable","percent","className"]);const s=void 0!==o;return _("span",Object.assign({ref:t,className:PM(qMe({color:n,clickable:a}),s&&"flex-col gap-0.5",a&&"cursor-pointer gap-1",l)},i,{children:[_("span",{className:"flex items-center gap-1",children:[r,a&&w(In,{className:"size-4 shrink-0","aria-hidden":!0})]}),s&&_("span",{className:"tabular-nums",children:[o,"%"]})]}))}));FMe.displayName="Badge";const TMe={highest:"Highest",high:"High",medium:"Medium",low:"Low",lowest:"Lowest"},WMe=e.forwardRef(((e,t)=>{var{severity:r,className:n}=e,a=EM(e,["severity","className"]);return w("span",Object.assign({ref:t,className:PM(BMe({severity:r}),n)},a,{children:TMe[r]}))}));WMe.displayName="SeverityBadge";const UMe=u(void 0),$Me=()=>{const e=h(UMe);if(!e)throw new Error("useCollapsible must be used within a CollapsibleProvider");return e},GMe=({size:e,children:t,isExpandControlled:r,onToggle:n})=>{const[a,o]=i(!1);return s((()=>{void 0!==r&&o(r)}),[r]),w(UMe.Provider,{value:{size:e,isExpand:a,toggle:()=>{o((e=>!e)),n&&n(!a)},setIsExpand:o},children:t})},YMe=x(["flex flex-1 bg-secondary-default hover:bg-secondary-hover text-state-secondary-text-solid","focus:outline-none focus-visible:ring focus-visible:ring-gray-500 focus-visible:ring-opacity-75"],{variants:{size:{sm:"py-2 px-3",md:"py-3 px-4",lg:"py-4 px-5"}},defaultVariants:{size:"md"}}),KMe=x(["transition-all flex content-center justify-center "],{variants:{size:{sm:"size-5",md:"size-6",lg:"size-7"},isExpand:{true:"rotate-180"}},defaultVariants:{size:"md",isExpand:!1}}),XMe=x(["flex flex-1 border-t border-t-secondary","transition ease-in-out delay-150 duration-300"],{variants:{size:{sm:"py-2 px-3",md:"py-3 px-4",lg:"py-4 px-5"}},defaultVariants:{size:"md"}}),QMe=x(["flex flex-col border border-secondary rounded overflow-hidden"]),JMe=r((({children:e,className:t,hideExpandIcon:r=!1},n)=>{const{toggle:a,isExpand:o,size:l}=$Me(),i=YMe({size:l}),s=KMe({isExpand:o,size:l});return _("button",{onClick:a,className:PM(i,t),ref:n,children:[w("span",{className:"flex flex-1",children:e}),!r&&w("span",{className:PM(s),children:w(In,{className:PM("size-full")})})]})}));JMe.displayName="CollapsibleButton";const exe=r((({children:e,className:t},r)=>{const{isExpand:a,size:o}=$Me(),l=XMe({size:o}),[c,d]=i("0px"),u=n(null);return s((()=>{u.current&&d(a?`${u.current.scrollHeight}px`:"0px")}),[a,e]),w("div",{ref:r,className:PM("overflow-hidden transition-all ease-in-out"),style:{height:c},children:w("div",{ref:u,className:PM(l,t),children:e})})}));exe.displayName="CollapsiblePanel";const txe=r((({children:e,isExpand:t,size:r,className:n,onToggle:a},o)=>{const l=QMe();return w(GMe,{size:r,isExpandControlled:t,onToggle:a,children:w("div",{ref:o,className:PM(l,n),children:e})})}));var rxe,nxe,axe;txe.displayName="Collapsible",txe.Button=JMe,txe.Panel=exe,function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(rxe||(rxe={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(nxe||(nxe={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(axe||(axe={}));const oxe=6048e5,lxe=Symbol.for("constructDateFrom");function ixe(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&lxe in e?e[lxe](t):e instanceof Date?new e.constructor(t):new Date(t)}function sxe(e,t){return ixe(t||e,e)}function cxe(e,t,r){const n=sxe(e,r?.in);return isNaN(t)?ixe(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function dxe(e,t,r){const n=sxe(e,r?.in);if(isNaN(t))return ixe(e,NaN);if(!t)return n;const a=n.getDate(),o=ixe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);return a>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),a),n)}let uxe={};function hxe(){return uxe}function fxe(e,t){const r=hxe(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=sxe(e,t?.in),o=a.getDay(),l=(o<n?7:0)+o-n;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function pxe(e,t){return fxe(e,{...t,weekStartsOn:1})}function vxe(e,t){const r=sxe(e,t?.in),n=r.getFullYear(),a=ixe(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=pxe(a),l=ixe(r,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const i=pxe(l);return r.getTime()>=o.getTime()?n+1:r.getTime()>=i.getTime()?n:n-1}function mxe(e){const t=sxe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function yxe(e,...t){const r=ixe.bind(null,t.find((e=>"object"==typeof e)));return t.map(r)}function gxe(e,t){const r=sxe(e,t?.in);return r.setHours(0,0,0,0),r}function bxe(e,t,r){const[n,a]=yxe(0,e,t),o=gxe(n),l=gxe(a),i=+o-mxe(o),s=+l-mxe(l);return Math.round((i-s)/864e5)}function kxe(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function wxe(e,t){const r=sxe(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function _xe(e,t){const r=hxe(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=sxe(e,t?.in),o=a.getDay(),l=6+(o<n?-7:0)-(o-n);return a.setDate(a.getDate()+l),a.setHours(23,59,59,999),a}const Mxe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function xxe(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const jxe={date:xxe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:xxe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:xxe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Oxe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Exe(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const zxe={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Exe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Exe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Exe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Exe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Exe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Cxe(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,(e=>e.test(l))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,(e=>e.test(l)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(l.length)}}}const Pxe={ordinalNumber:(Axe={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(Axe.matchPattern);if(!r)return null;const n=r[0],a=e.match(Axe.parsePattern);if(!a)return null;let o=Axe.valueCallback?Axe.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(n.length)}}),era:Cxe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Cxe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cxe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Cxe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Cxe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Axe;const Rxe={code:"en-US",formatDistance:(e,t,r)=>{let n;const a=Mxe[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:jxe,formatRelative:(e,t,r,n)=>Oxe[e],localize:zxe,match:Pxe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Lxe(e,t){const r=sxe(e,t?.in),n=+pxe(r)-+function(e,t){const r=vxe(e,t),n=ixe(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),pxe(n)}(r);return Math.round(n/oxe)+1}function Ixe(e,t){const r=sxe(e,t?.in),n=r.getFullYear(),a=hxe(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=ixe(t?.in||e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const i=fxe(l,t),s=ixe(t?.in||e,0);s.setFullYear(n,0,o),s.setHours(0,0,0,0);const c=fxe(s,t);return+r>=+i?n+1:+r>=+c?n:n-1}function Sxe(e,t){const r=sxe(e,t?.in),n=+fxe(r,t)-+function(e,t){const r=hxe(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=Ixe(e,t),o=ixe(t?.in||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),fxe(o,t)}(r,t);return Math.round(n/oxe)+1}function Vxe(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Hxe={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Vxe("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):Vxe(r+1,2)},d:(e,t)=>Vxe(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>Vxe(e.getHours()%12||12,t.length),H:(e,t)=>Vxe(e.getHours(),t.length),m:(e,t)=>Vxe(e.getMinutes(),t.length),s:(e,t)=>Vxe(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return Vxe(Math.trunc(n*Math.pow(10,r-3)),t.length)}},Zxe="midnight",Nxe="noon",Dxe="morning",qxe="afternoon",Bxe="evening",Fxe="night",Txe={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return Hxe.y(e,t)},Y:function(e,t,r,n){const a=Ixe(e,n),o=a>0?a:1-a;if("YY"===t){return Vxe(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):Vxe(o,t.length)},R:function(e,t){return Vxe(vxe(e),t.length)},u:function(e,t){return Vxe(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Vxe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Vxe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Hxe.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Vxe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=Sxe(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):Vxe(a,t.length)},I:function(e,t,r){const n=Lxe(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Vxe(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):Hxe.d(e,t)},D:function(e,t,r){const n=function(e,t){const r=sxe(e,t?.in);return bxe(r,wxe(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Vxe(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Vxe(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Vxe(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return Vxe(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(a=12===n?Nxe:0===n?Zxe:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(a=n>=17?Bxe:n>=12?qxe:n>=4?Dxe:Fxe,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return Hxe.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):Hxe.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Vxe(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Vxe(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Hxe.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Hxe.s(e,t)},S:function(e,t){return Hxe.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return Uxe(n);case"XXXX":case"XX":return $xe(n);default:return $xe(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Uxe(n);case"xxxx":case"xx":return $xe(n);default:return $xe(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Wxe(n,":");default:return"GMT"+$xe(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Wxe(n,":");default:return"GMT"+$xe(n,":")}},t:function(e,t,r){return Vxe(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return Vxe(+e,t.length)}};function Wxe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return 0===o?r+String(a):r+String(a)+t+Vxe(o,2)}function Uxe(e,t){if(e%60==0){return(e>0?"-":"+")+Vxe(Math.abs(e)/60,2)}return $xe(e,t)}function $xe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+Vxe(Math.trunc(n/60),2)+t+Vxe(n%60,2)}const Gxe=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Yxe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Kxe={p:Yxe,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return Gxe(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Gxe(n,t)).replace("{{time}}",Yxe(a,t))}},Xxe=/^D+$/,Qxe=/^Y+$/,Jxe=["D","DD","YY","YYYY"];const eje=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tje=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rje=/^'([^]*?)'?$/,nje=/''/g,aje=/[a-zA-Z]/;function oje(e,t,r){const n=hxe(),a=r?.locale??n.locale??Rxe,o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=sxe(e,r?.in);if(!function(e){return!(!kxe(e)&&"number"!=typeof e||isNaN(+sxe(e)))}(i))throw new RangeError("Invalid time value");let s=t.match(tje).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Kxe[t])(e,a.formatLong)}return e})).join("").match(eje).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:lje(e)};if(Txe[t])return{isToken:!0,value:e};if(t.match(aje))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(s=a.localize.preprocessor(i,s));const c={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return s.map((n=>{if(!n.isToken)return n.value;const o=n.value;(!r?.useAdditionalWeekYearTokens&&function(e){return Qxe.test(e)}(o)||!r?.useAdditionalDayOfYearTokens&&function(e){return Xxe.test(e)}(o))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),Jxe.includes(e))throw new RangeError(n)}(o,t,String(e));return(0,Txe[o[0]])(i,o,a.localize,c)})).join("")}function lje(e){const t=e.match(rje);return t?t[1].replace(nje,"'"):e}function ije(e,t,r){const n=sxe(e,r?.in),a=n.getFullYear(),o=n.getDate(),l=ixe(e,0);l.setFullYear(a,t,15),l.setHours(0,0,0,0);const i=function(e,t){const r=sxe(e,t?.in),n=r.getFullYear(),a=r.getMonth(),o=ixe(r,0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}(l);return n.setMonth(t,Math.min(o,i)),n}function sje(e,t){const r=t.startOfMonth(e),n=r.getDay();return 1===n?r:0===n?t.addDays(r,-6):t.addDays(r,-1*(n-1))}class cje{constructor(e,t){this.Date=Date,this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):cxe(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):dxe(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,r){return cxe(e,7*t,r)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,r){return dxe(e,12*t,r)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):bxe(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t){const[r,n]=yxe(0,e,t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}(e,t),this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e,this):function(e,t){const r=sje(e,t),n=function(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,a=t.addDays(e,1-n),o=t.addDays(a,34);return e.getMonth()===o.getMonth()?5:4}(e,t);return t.addDays(r,7*n-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return _xe(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const r=sxe(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}(e),this.endOfWeek=e=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,this.options):_xe(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const r=sxe(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}(e),this.format=(e,t)=>this.overrides?.format?this.overrides.format(e,t,this.options):oje(e,t,this.options),this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):Lxe(e),this.getWeek=e=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):Sxe(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):function(e,t){return+sxe(e)>+sxe(t)}(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):function(e,t){return+sxe(e)<+sxe(t)}(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):kxe(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[r,n]=yxe(0,e,t);return+gxe(r)==+gxe(n)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[r,n]=yxe(0,e,t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t){const[r,n]=yxe(0,e,t);return r.getFullYear()===n.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=ixe.bind(null,e));const t=sxe(e,n);(!r||r<t||isNaN(+t))&&(r=t)})),ixe(n,r||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=ixe.bind(null,e));const t=sxe(e,n);(!r||r>t||isNaN(+t))&&(r=t)})),ixe(n,r||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):ije(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,r){const n=sxe(e,r?.in);return isNaN(+n)?ixe(e,NaN):(n.setFullYear(t),n)}(e,t),this.startOfBroadcastWeek=e=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):sje(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):gxe(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):pxe(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const r=sxe(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}(e),this.startOfWeek=e=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):fxe(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):wxe(e),this.options={locale:Rxe,...e},this.overrides=t}}const dje=new cje;const uje=u(void 0);function hje(){const e=h(uje);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}var fje=Object.freeze({__proto__:null,Button:function(e){return t.createElement("button",{...e})},CaptionLabel:function(e){return t.createElement("span",{...e})},Chevron:function(e){const{size:r=24,orientation:n="left",className:a}=e;return t.createElement("svg",{className:a,width:r,height:r,viewBox:"0 0 24 24"},"up"===n&&t.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&t.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&t.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&t.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))},Day:function(e){const{day:r,modifiers:n,...a}=e;return t.createElement("td",{...a})},DayButton:function(e){const{day:r,modifiers:n,...a}=e,o=t.useRef(null);return t.useEffect((()=>{n.focused&&o.current?.focus()}),[n.focused]),t.createElement("button",{ref:o,...a})},Dropdown:function(e){const{options:r,className:n,components:a,classNames:o,...l}=e,i=[o[rxe.Dropdown],n].join(" "),s=r?.find((({value:e})=>e===l.value));return t.createElement("span",{"data-disabled":l.disabled,className:o[rxe.DropdownRoot]},t.createElement(a.Select,{className:i,...l},r?.map((({value:e,label:r,disabled:n})=>t.createElement(a.Option,{key:e,value:e,disabled:n},r)))),t.createElement("span",{className:o[rxe.CaptionLabel],"aria-hidden":!0},s?.label,t.createElement(a.Chevron,{orientation:"down",size:18,className:o[rxe.Chevron]})))},DropdownNav:function(e){return t.createElement("div",{...e})},Footer:function(e){return t.createElement("div",{...e})},Month:function(e){const{calendarMonth:r,displayIndex:n,...a}=e;return t.createElement("div",{...a},e.children)},MonthCaption:function(e){const{calendarMonth:r,displayIndex:n,...a}=e;return t.createElement("div",{...a})},MonthGrid:function(e){return t.createElement("table",{...e})},Months:function(e){return t.createElement("div",{...e})},MonthsDropdown:function(e){const{components:r}=hje();return t.createElement(r.Dropdown,{...e})},Nav:function(e){const{onPreviousClick:r,onNextClick:n,previousMonth:a,nextMonth:o,...l}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:d}}=hje();return t.createElement("nav",{...l},t.createElement(i.PreviousMonthButton,{type:"button",className:s[rxe.PreviousMonthButton],tabIndex:a?void 0:-1,disabled:!a||void 0,"aria-label":c(a),onClick:e.onPreviousClick},t.createElement(i.Chevron,{disabled:!a||void 0,className:s[rxe.Chevron],orientation:"left"})),t.createElement(i.NextMonthButton,{type:"button",className:s[rxe.NextMonthButton],tabIndex:o?void 0:-1,disabled:!o||void 0,"aria-label":d(o),onClick:e.onNextClick},t.createElement(i.Chevron,{disabled:!o||void 0,orientation:"right",className:s[rxe.Chevron]})))},NextMonthButton:function(e){const{components:r}=hje();return t.createElement(r.Button,{...e})},Option:function(e){return t.createElement("option",{...e})},PreviousMonthButton:function(e){const{components:r}=hje();return t.createElement(r.Button,{...e})},Root:function(e){return t.createElement("div",{...e})},Select:function(e){return t.createElement("select",{...e})},Week:function(e){const{week:r,...n}=e;return t.createElement("tr",{...n})},WeekNumber:function(e){const{week:r,...n}=e;return t.createElement("th",{...n})},WeekNumberHeader:function(e){return t.createElement("th",{...e})},Weekday:function(e){return t.createElement("th",{...e})},Weekdays:function(e){return t.createElement("thead",{"aria-hidden":!0},t.createElement("tr",{...e}))},Weeks:function(e){return t.createElement("tbody",{...e})},YearsDropdown:function(e){const{components:r}=hje();return t.createElement(r.Dropdown,{...e})}});function pje(e){return{...fje,...e}}function vje(){const e={};for(const t in rxe)e[rxe[t]]=`rdp-${rxe[t]}`;for(const t in nxe)e[nxe[t]]=`rdp-${nxe[t]}`;for(const t in axe)e[axe[t]]=`rdp-${axe[t]}`;return e}function mje(e,t,r){return(r??new cje(t)).format(e,"LLLL y")}const yje=mje;function gje(e){return e.toString()}const bje=gje;var kje=Object.freeze({__proto__:null,formatCaption:mje,formatDay:function(e,t,r){return(r??new cje(t)).format(e,"d")},formatMonthCaption:yje,formatMonthDropdown:function(e,t){return t.localize?.month(e)},formatWeekNumber:function(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`},formatWeekNumberHeader:function(){return""},formatWeekdayName:function(e,t,r){return(r??new cje(t)).format(e,"cccccc")},formatYearCaption:bje,formatYearDropdown:gje});const wje={},_je={};function Mje(e,t){try{const r=(wje[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return r in _je?_je[r]:jje(r,r.split(":"))}catch{if(e in _je)return _je[e];const t=e?.match(xje);return t?jje(e,t.slice(1)):NaN}}const xje=/([+-]\d\d):?(\d\d)?/;function jje(e,t){const r=+t[0],n=+(t[1]||0);return _je[e]=r>0?60*r+n:60*r-n}class Oje extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Mje(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Cje(this),zje(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Oje(...t,e):new Oje(Date.now(),e)}withTimeZone(e){return new Oje(+this,e)}getTimezoneOffset(){return-Mje(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),zje(this),+this}[Symbol.for("constructDateFrom")](e){return new Oje(+new Date(e),this.timeZone)}}const Eje=/^(get|set)(?!UTC)/;function zje(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Cje(e){const t=Mje(e.timeZone,e),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const n=-new Date(+e).getTimezoneOffset(),a=n- -new Date(+r).getTimezoneOffset(),o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=n-t;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const i=Mje(e.timeZone,e),s=-new Date(+e).getTimezoneOffset()-i-l;if(i!==t&&s){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const t=i-Mje(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!Eje.test(e))return;const t=e.replace(Eje,"$1UTC");Oje.prototype[t]&&(e.startsWith("get")?Oje.prototype[e]=function(){return this.internal[t]()}:(Oje.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Cje(e)}(this),+this},Oje.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),zje(this),+this}))}));class Pje extends Oje{static tz(e,...t){return t.length?new Pje(...t,e):new Pje(Date.now(),e)}toISOString(){const[e,t,r]=this.tzComponents(),n=`${e}${t}:${r}`;return this.internal.toISOString().slice(0,-1)+n}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,r,n]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${r} ${t} ${n}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,r,n]=this.tzComponents();return`${e} GMT${t}${r}${n} (${function(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Pje(+this,e)}[Symbol.for("constructDateFrom")](e){return new Pje(+new Date(e),this.timeZone)}}function Aje(e,t,r){return(r??new cje(t)).format(e,"LLLL y")}const Rje=Aje;function Lje(e,t,r,n){let a=(n??new cje(r)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}const Ije=Lje;var Sje=Object.freeze({__proto__:null,labelCaption:Rje,labelDay:Ije,labelDayButton:Lje,labelGrid:Aje,labelGridcell:function(e,t,r,n){let a=(n??new cje(r)).format(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a},labelMonthDropdown:function(e){return"Choose the Month"},labelNav:function(){return""},labelNext:function(e){return"Go to the Next Month"},labelPrevious:function(e){return"Go to the Previous Month"},labelWeekNumber:function(e,t){return`Week ${e}`},labelWeekNumberHeader:function(e){return"Week Number"},labelWeekday:function(e,t,r){return(r??new cje(t)).format(e,"cccc")},labelYearDropdown:function(e){return"Choose the Year"}});function Vje(e,t){const{month:r,defaultMonth:n,today:a=(e.timeZone?Pje.tz(e.timeZone):t.Date?new t.Date:new Date),numberOfMonths:o=1,endMonth:l,startMonth:i}=e;let s=r||n||a;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:u}=t;if(l&&c(l,s)<0){s=d(l,-1*(o-1))}return i&&c(s,i)<0&&(s=i),u(s)}class Hje{constructor(e,t,r=dje){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!r.isSameMonth(e,t)),this.dateLib=r}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class Zje{constructor(e,t){this.date=e,this.weeks=t}}class Nje{constructor(e,t){this.days=t,this.weekNumber=e}}function Dje(e,t){const[r,n]=i(e);return[void 0===t?r:t,n]}function qje(e,t){const[r,n]=function(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:a,startOfDay:o,startOfMonth:l,endOfMonth:i,addYears:s,endOfYear:c}=t,{fromYear:d,toYear:u,fromMonth:h,toMonth:f}=e;!r&&h&&(r=h),!r&&d&&(r=new Date(d,0,1)),!n&&f&&(n=f),!n&&u&&(n=new Date(u,11,31));const p=e.captionLayout?.startsWith("dropdown");r?r=l(r):d?r=new Date(d,0,1):!r&&p&&(r=a(s(e.today??(e.timeZone?Pje.tz(e.timeZone):t.Date?new t.Date:new Date),-100)));n?n=i(n):u?n=new Date(u,11,31):!n&&p&&(n=c(e.today??(e.timeZone?Pje.tz(e.timeZone):t.Date?new t.Date:new Date)));return[r?o(r):r,n?o(n):n]}(e,t),{startOfMonth:a,endOfMonth:o}=t,l=Vje(e,t),[i,c]=Dje(l,e.month?a(e.month):void 0);s((()=>{const r=Vje(e,t);c(r)}),[e.timeZone]);const d=function(e,t,r,n){const{numberOfMonths:a=1}=r,o=[];for(let r=0;r<a;r++){const a=n.addMonths(e,r);if(t&&a>t)break;o.push(a)}return o}(i,n,e,t),u=function(e,t,r,n){const a=e[0],o=e[e.length-1],{ISOWeek:l,fixedWeeks:i,broadcastCalendar:s}=r??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:f,endOfMonth:p,endOfWeek:v,isAfter:m,startOfBroadcastWeek:y,startOfISOWeek:g,startOfWeek:b}=n,k=s?y(a,n):l?g(a):b(a),w=d(s?h(o,n):l?f(p(o)):v(p(o)),k),_=u(o,a)+1,M=[];for(let e=0;e<=w;e++){const r=c(k,e);if(t&&m(r,t))break;M.push(r)}const x=(s?35:42)*_;if(i&&M.length<x){const e=x-M.length;for(let t=0;t<e;t++){const e=c(M[M.length-1],1);M.push(e)}}return M}(d,e.endMonth?o(e.endMonth):void 0,e,t),h=function(e,t,r,n){const{addDays:a,endOfBroadcastWeek:o,endOfISOWeek:l,endOfMonth:i,endOfWeek:s,getISOWeek:c,getWeek:d,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:f}=n,p=e.reduce(((e,p)=>{const v=r.broadcastCalendar?u(p,n):r.ISOWeek?h(p):f(p),m=r.broadcastCalendar?o(p,n):r.ISOWeek?l(i(p)):s(i(p)),y=t.filter((e=>e>=v&&e<=m)),g=r.broadcastCalendar?35:42;if(r.fixedWeeks&&y.length<g){const e=t.filter((e=>{const t=g-y.length;return e>m&&e<=a(m,t)}));y.push(...e)}const b=y.reduce(((e,t)=>{const a=r.ISOWeek?c(t):d(t),o=e.find((e=>e.weekNumber===a)),l=new Hje(t,p,n);return o?o.days.push(l):e.push(new Nje(a,[l])),e}),[]),k=new Zje(p,b);return e.push(k),e}),[]);return r.reverseMonths?p.reverse():p}(d,u,e,t),f=function(e){return e.reduce(((e,t)=>[...e,...t.weeks]),[])}(h),p=h.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]);const v=function(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o}=r,{startOfMonth:l,addMonths:i,differenceInCalendarMonths:s}=n,c=a?o??1:1,d=l(e);return t&&s(d,t)<=0?void 0:i(d,-c)}(i,r,e,t),m=function(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o=1}=r,{startOfMonth:l,addMonths:i,differenceInCalendarMonths:s}=n,c=a?o:1,d=l(e);return t&&s(t,e)<o?void 0:i(d,c)}(i,n,e,t),{disableNavigation:y,onMonthChange:g}=e,b=e=>{if(y)return;let t=a(e);r&&t<a(r)&&(t=a(r)),n&&t>a(n)&&(t=a(n)),c(t),g?.(t)},k={months:h,weeks:f,days:p,navStart:r,navEnd:n,previousMonth:v,nextMonth:m,goToMonth:b,goToDay:e=>{(e=>f.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||b(e.date)}};return k}function Bje(e,t,r=!1,n=dje){let{from:a,to:o}=e;const{differenceInCalendarDays:l,isSameDay:i}=n;if(a&&o){l(o,a)<0&&([a,o]=[o,a]);return l(t,a)>=(r?1:0)&&l(o,t)>=(r?1:0)}return!r&&o?i(o,t):!(r||!a)&&i(a,t)}function Fje(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function Tje(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function Wje(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function Uje(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function $je(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function Gje(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Yje(e,t,r=dje){const n=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:o,isAfter:l}=r;return n.some((t=>{if("boolean"==typeof t)return t;if(r.isDate(t))return a(e,t);if(Gje(t,r))return t.includes(e);if(Tje(t))return Bje(t,e,!1,r);if($je(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(Fje(t)){const r=o(t.before,e)>0,n=o(t.after,e)<0;return l(t.before,t.after)?n&&r:r||n}return Wje(t)?o(e,t.after)>0:Uje(t)?o(t.before,e)>0:"function"==typeof t&&t(e)}))}function Kje(e,t,r,n,a,o,l,i=0){if(i>365)return;const s=function(e,t,r,n,a,o,l){const{ISOWeek:i,broadcastCalendar:s}=o,{addDays:c,addMonths:d,addWeeks:u,addYears:h,endOfBroadcastWeek:f,endOfISOWeek:p,endOfWeek:v,max:m,min:y,startOfBroadcastWeek:g,startOfISOWeek:b,startOfWeek:k}=l,w={day:c,week:u,month:d,year:h,startOfWeek:e=>s?g(e,l):i?b(e):k(e),endOfWeek:e=>s?f(e,l):i?p(e):v(e)};let _=w[e](r,"after"===t?1:-1);return"before"===t&&n?_=m([n,_]):"after"===t&&a&&(_=y([a,_])),_}(e,t,r.date,n,a,o,l),c=Boolean(o.disabled&&Yje(s,o.disabled,l)),d=Boolean(o.hidden&&Yje(s,o.hidden,l)),u=new Hje(s,s,l);return c||d?Kje(e,t,u,n,a,o,l,i+1):u}function Xje(e,t,r,n,a){const{autoFocus:o}=e,[l,s]=i(),c=function(e,t,r,n){let a,o=0,l=!1;for(;o<e.length&&!l;){const i=e[o],s=t(i);s[nxe.disabled]||s[nxe.hidden]||s[nxe.outside]||(s[nxe.focused]||n?.isEqualTo(i)||r(i.date)||s[nxe.today])&&(a=i,l=!0),o++}return a||(a=e.find((e=>{const r=t(e);return!r[nxe.disabled]&&!r[nxe.hidden]&&!r[nxe.outside]}))),a}(t.days,r,n||(()=>!1),l),[d,u]=i(o?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:u,focused:d,blur:()=>{s(d),u(void 0)},moveFocus:(r,n)=>{if(!d)return;const o=Kje(r,n,d,t.navStart,t.navEnd,e,a);o&&(t.goToDay(o),u(o))}}}function Qje(e,t,r=dje){return Bje(e,t.from,!1,r)||Bje(e,t.to,!1,r)||Bje(t,e.from,!1,r)||Bje(t,e.to,!1,r)}function Jje(e,t,r=dje){const n=Array.isArray(t)?t:[t],a=n.filter((e=>"function"!=typeof e)).some((t=>{if("boolean"==typeof t)return t;if(r.isDate(t))return Bje(e,t,!1,r);if(Gje(t,r))return t.some((t=>Bje(e,t,!1,r)));if(Tje(t))return!(!t.from||!t.to)&&Qje(e,{from:t.from,to:t.to},r);if($je(t))return function(e,t,r=dje){const n=Array.isArray(t)?t:[t];let a=e.from;const o=r.differenceInCalendarDays(e.to,e.from),l=Math.min(o,6);for(let e=0;e<=l;e++){if(n.includes(a.getDay()))return!0;a=r.addDays(a,1)}return!1}(e,t.dayOfWeek,r);if(Fje(t)){return r.isAfter(t.before,t.after)?Qje(e,{from:r.addDays(t.after,1),to:r.addDays(t.before,-1)},r):Yje(e.from,t,r)||Yje(e.to,t,r)}return!(!Wje(t)&&!Uje(t))&&(Yje(e.from,t,r)||Yje(e.to,t,r))}));if(a)return!0;const o=n.filter((e=>"function"==typeof e));if(o.length){let t=e.from;const n=r.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=n;e++){if(o.some((e=>e(t))))return!0;t=r.addDays(t,1)}}return!1}function eOe(e,t){const{disabled:r,excludeDisabled:n,selected:a,required:o,onSelect:l}=e,[i,s]=Dje(a,l?a:void 0),c=l?a:i;return{selected:c,select:(a,i,d)=>{const{min:u,max:h}=e,f=a?function(e,t,r=0,n=0,a=!1,o=dje){const{from:l,to:i}=t||{},{isSameDay:s,isAfter:c,isBefore:d}=o;let u;if(l||i){if(l&&!i)u=s(l,e)?a?{from:l,to:void 0}:void 0:d(e,l)?{from:e,to:l}:{from:l,to:e};else if(l&&i)if(s(l,e)&&s(i,e))u=a?{from:l,to:i}:void 0;else if(s(l,e))u={from:l,to:r>0?void 0:e};else if(s(i,e))u={from:e,to:r>0?void 0:e};else if(d(e,l))u={from:e,to:i};else if(c(e,l))u={from:l,to:e};else{if(!c(e,i))throw new Error("Invalid range");u={from:l,to:e}}}else u={from:e,to:r>0?void 0:e};if(u?.from&&u?.to){const t=o.differenceInCalendarDays(u.to,u.from);(n>0&&t>n||r>1&&t<r)&&(u={from:e,to:void 0})}return u}(a,c,u,h,o,t):void 0;return n&&r&&f?.from&&f.to&&Jje({from:f.from,to:f.to},r,t)&&(f.from=a,f.to=void 0),l||s(f),l?.(f,a,i,d),f},isSelected:e=>c&&Bje(c,e,!1,t)}}function tOe(e,t){const r=function(e,t){const{selected:r,required:n,onSelect:a}=e,[o,l]=Dje(r,a?r:void 0),i=a?r:o,{isSameDay:s}=t;return{selected:i,select:(e,t,r)=>{let o=e;return!n&&i&&i&&s(e,i)&&(o=void 0),a||l(o),a?.(o,e,t,r),o},isSelected:e=>!!i&&s(i,e)}}(e,t),n=function(e,t){const{selected:r,required:n,onSelect:a}=e,[o,l]=Dje(r,a?r:void 0),i=a?r:o,{isSameDay:s}=t,c=e=>i?.some((t=>s(t,e)))??!1,{min:d,max:u}=e;return{selected:i,select:(e,t,r)=>{let o=[...i??[]];if(c(e)){if(i?.length===d)return;if(n&&1===i?.length)return;o=i?.filter((t=>!s(t,e)))}else o=i?.length===u?[e]:[...o,e];return a||l(o),a?.(o,e,t,r),o},isSelected:c}}(e,t),a=eOe(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return a;default:return}}function rOe(e){const{components:r,formatters:n,labels:o,dateLib:i,locale:s,classNames:c}=l((()=>{const t={...Rxe,...e.locale};return{dateLib:new cje({locale:t,weekStartsOn:e.broadcastCalendar?1:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens},e.dateLib),components:pje(e.components),formatters:(r=e.formatters,r?.formatMonthCaption&&!r.formatCaption&&(r.formatCaption=r.formatMonthCaption),r?.formatYearCaption&&!r.formatYearDropdown&&(r.formatYearDropdown=r.formatYearCaption),{...kje,...r}),labels:{...Sje,...e.labels},locale:t,classNames:{...vje(),...e.classNames}};var r}),[e.classNames,e.components,e.dateLib,e.firstWeekContainsDate,e.formatters,e.labels,e.locale,e.useAdditionalDayOfYearTokens,e.useAdditionalWeekYearTokens,e.weekStartsOn,e.broadcastCalendar]),{captionLayout:d,mode:u,onDayBlur:h,onDayClick:f,onDayFocus:p,onDayKeyDown:v,onDayMouseEnter:m,onDayMouseLeave:y,onNextClick:g,onPrevClick:b,showWeekNumber:k,styles:w}=e,{formatCaption:_,formatDay:M,formatMonthDropdown:x,formatWeekNumber:j,formatWeekNumberHeader:O,formatWeekdayName:E,formatYearDropdown:z}=n,C=qje(e,i),{days:P,months:A,navStart:R,navEnd:L,previousMonth:I,nextMonth:S,goToMonth:V}=C,H=function(e,t,r){const{disabled:n,hidden:a,modifiers:o,showOutsideDays:l,broadcastCalendar:i,today:s}=t,{isSameDay:c,isSameMonth:d,startOfMonth:u,isBefore:h,endOfMonth:f,isAfter:p}=r,v=t.startMonth&&u(t.startMonth),m=t.endMonth&&f(t.endMonth),y={[nxe.focused]:[],[nxe.outside]:[],[nxe.disabled]:[],[nxe.hidden]:[],[nxe.today]:[]},g={};for(const u of e){const{date:e,displayMonth:f}=u,b=Boolean(f&&!d(e,f)),k=Boolean(v&&h(e,v)),w=Boolean(m&&p(e,m)),_=Boolean(n&&Yje(e,n,r)),M=Boolean(a&&Yje(e,a,r))||k||w||!i&&!l&&b||i&&!1===l&&b,x=c(e,s??(t.timeZone?Pje.tz(t.timeZone):r.Date?new r.Date:new Date));b&&y.outside.push(u),_&&y.disabled.push(u),M&&y.hidden.push(u),x&&y.today.push(u),o&&Object.keys(o).forEach((t=>{const n=o?.[t];n&&Yje(e,n,r)&&(g[t]?g[t].push(u):g[t]=[u])}))}return e=>{const t={[nxe.focused]:!1,[nxe.disabled]:!1,[nxe.hidden]:!1,[nxe.outside]:!1,[nxe.today]:!1},r={};for(const r in y){const n=y[r];t[r]=n.some((t=>t===e))}for(const t in g)r[t]=g[t].some((t=>t===e));return{...t,...r}}}(P,e,i),{isSelected:Z,select:N,selected:D}=tOe(e,i)??{},{blur:q,focused:B,isFocusTarget:F,moveFocus:T,setFocused:W}=Xje(e,C,H,Z??(()=>!1),i),{labelDayButton:U,labelGridcell:$,labelGrid:G,labelMonthDropdown:Y,labelNav:K,labelWeekday:X,labelWeekNumber:Q,labelWeekNumberHeader:J,labelYearDropdown:ee}=o,te=l((()=>function(e,t,r){const n=r?Pje.tz(r):e.Date?new e.Date:new Date,a=t?e.startOfISOWeek(n):e.startOfWeek(n),o=[];for(let t=0;t<7;t++){const r=e.addDays(a,t);o.push(r)}return o}(i,e.ISOWeek,e.timeZone)),[i,e.ISOWeek,e.timeZone]),re=void 0!==u||void 0!==f,ne=a((()=>{I&&(V(I),b?.(I))}),[I,V,b]),ae=a((()=>{S&&(V(S),g?.(S))}),[V,S,g]),oe=a(((e,t)=>r=>{r.preventDefault(),r.stopPropagation(),W(e),N?.(e.date,t,r),f?.(e.date,t,r)}),[N,f,W]),le=a(((e,t)=>r=>{W(e),p?.(e.date,t,r)}),[p,W]),ie=a(((e,t)=>r=>{q(),h?.(e.date,t,r)}),[q,h]),se=a(((t,r)=>n=>{const a={ArrowLeft:["day","rtl"===e.dir?"after":"before"],ArrowRight:["day","rtl"===e.dir?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[n.shiftKey?"year":"month","before"],PageDown:[n.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(a[n.key]){n.preventDefault(),n.stopPropagation();const[e,t]=a[n.key];T(e,t)}v?.(t.date,r,n)}),[T,v,e.dir]),ce=a(((e,t)=>r=>{m?.(e.date,t,r)}),[m]),de=a(((e,t)=>r=>{y?.(e.date,t,r)}),[y]),ue=a((e=>t=>{const r=Number(t.target.value),n=i.setMonth(i.startOfMonth(e),r);V(n)}),[i,V]),he=a((e=>t=>{const r=Number(t.target.value),n=i.setYear(i.startOfMonth(e),r);V(n)}),[i,V]),{className:fe,style:pe}=l((()=>({className:[c[rxe.Root],e.className].filter(Boolean).join(" "),style:{...w?.[rxe.Root],...e.style}})),[c,e.className,e.style,w]),ve=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0};return Object.entries(e).forEach((([e,r])=>{e.startsWith("data-")&&(t[e]=r)})),t}(e),me={dayPickerProps:e,selected:D,select:N,isSelected:Z,months:A,nextMonth:S,previousMonth:I,goToMonth:V,getModifiers:H,components:r,classNames:c,styles:w,labels:o,formatters:n};return t.createElement(uje.Provider,{value:me},t.createElement(r.Root,{className:fe,style:pe,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,role:e.role,"aria-label":e["aria-label"],...ve},t.createElement(r.Months,{className:c[rxe.Months],style:w?.[rxe.Months]},!e.hideNavigation&&t.createElement(r.Nav,{className:c[rxe.Nav],style:w?.[rxe.Nav],"aria-label":K(),onPreviousClick:ne,onNextClick:ae,previousMonth:I,nextMonth:S}),A.map(((a,o)=>{const l=function(e,t,r,n,a){if(!t)return;if(!r)return;const{addMonths:o,startOfMonth:l}=a,i=e.getFullYear(),s=[];let c=t;for(;s.length<12;)s.push(c.getMonth()),c=o(c,1);const d=s.sort(((e,t)=>e-t)),u=d.map((e=>{const o=n.formatMonthDropdown(e,a.options.locale??Rxe),s=a.Date?new a.Date(i,e):new Date(i,e);return{value:e,label:o,disabled:t&&s<l(t)||r&&s>l(r)||!1}}));return u}(a.date,R,L,n,i),h=function(e,t,r,n){if(!e)return;if(!t)return;const{startOfYear:a,endOfYear:o,addYears:l,isBefore:i,isSameYear:s}=n,c=a(e),d=o(t),u=[];let h=c;for(;i(h,d)||s(h,d);)u.push(h.getFullYear()),h=l(h,1);return u.map((e=>({value:e,label:r.formatYearDropdown(e),disabled:!1})))}(R,L,n,i);return t.createElement(r.Month,{className:c[rxe.Month],style:w?.[rxe.Month],key:o,displayIndex:o,calendarMonth:a},t.createElement(r.MonthCaption,{className:c[rxe.MonthCaption],style:w?.[rxe.MonthCaption],calendarMonth:a,displayIndex:o},d?.startsWith("dropdown")?t.createElement(r.DropdownNav,{className:c[rxe.Dropdowns],style:w?.[rxe.Dropdowns]},"dropdown"===d||"dropdown-months"===d?t.createElement(r.MonthsDropdown,{className:c[rxe.MonthsDropdown],"aria-label":Y(),classNames:c,components:r,disabled:Boolean(e.disableNavigation),onChange:ue(a.date),options:l,style:w?.[rxe.Dropdown],value:a.date.getMonth()}):t.createElement("span",{role:"status","aria-live":"polite"},x(a.date.getMonth(),s)),"dropdown"===d||"dropdown-years"===d?t.createElement(r.YearsDropdown,{className:c[rxe.YearsDropdown],"aria-label":ee(i.options),classNames:c,components:r,disabled:Boolean(e.disableNavigation),onChange:he(a.date),options:h,style:w?.[rxe.Dropdown],value:a.date.getFullYear()}):t.createElement("span",{role:"status","aria-live":"polite"},z(a.date.getFullYear()))):t.createElement(r.CaptionLabel,{className:c[rxe.CaptionLabel],role:"status","aria-live":"polite"},_(a.date,i.options,i))),t.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===u||"range"===u,"aria-label":G(a.date,i.options,i)||void 0,className:c[rxe.MonthGrid],style:w?.[rxe.MonthGrid]},!e.hideWeekdays&&t.createElement(r.Weekdays,{className:c[rxe.Weekdays],style:w?.[rxe.Weekdays]},k&&t.createElement(r.WeekNumberHeader,{"aria-label":J(i.options),className:c[rxe.WeekNumberHeader],style:w?.[rxe.WeekNumberHeader],scope:"col"},O()),te.map(((e,n)=>t.createElement(r.Weekday,{"aria-label":X(e,i.options,i),className:c[rxe.Weekday],key:n,style:w?.[rxe.Weekday],scope:"col"},E(e,i.options,i))))),t.createElement(r.Weeks,{className:c[rxe.Weeks],style:w?.[rxe.Weeks]},a.weeks.map(((n,a)=>t.createElement(r.Week,{className:c[rxe.Week],key:n.weekNumber,style:w?.[rxe.Week],week:n},k&&t.createElement(r.WeekNumber,{week:n,style:w?.[rxe.WeekNumber],"aria-label":Q(n.weekNumber,{locale:s}),className:c[rxe.WeekNumber],scope:"row",role:"rowheader"},j(n.weekNumber)),n.days.map((n=>{const{date:a}=n,o=H(n);if(o[nxe.focused]=!o.hidden&&Boolean(B?.isEqualTo(n)),o[axe.selected]=!o.disabled&&(Z?.(a)||o.selected),Tje(D)){const{from:e,to:t}=D;o[axe.range_start]=Boolean(e&&t&&i.isSameDay(a,e)),o[axe.range_end]=Boolean(e&&t&&i.isSameDay(a,t)),o[axe.range_middle]=Bje(D,a,!0,i)}const l=function(e,t={},r={}){let n={...t?.[rxe.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{n={...n,...r?.[e]}})),n}(o,w,e.modifiersStyles),s=function(e,t,r={}){const n=Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[n])=>(r[n]?e.push(r[n]):t[nxe[n]]?e.push(t[nxe[n]]):t[axe[n]]&&e.push(t[axe[n]]),e)),[t[rxe.Day]]);return n}(o,c,e.modifiersClassNames),d=re||o.hidden?void 0:$(a,o,i.options,i);return t.createElement(r.Day,{key:`${i.format(a,"yyyy-MM-dd")}_${i.format(n.displayMonth,"yyyy-MM")}`,day:n,modifiers:o,className:s.join(" "),style:l,role:"gridcell","aria-selected":o.selected||void 0,"aria-label":d,"data-day":i.format(a,"yyyy-MM-dd"),"data-month":n.outside?i.format(a,"yyyy-MM"):void 0,"data-selected":o.selected||void 0,"data-disabled":o.disabled||void 0,"data-hidden":o.hidden||void 0,"data-outside":n.outside||void 0,"data-focused":o.focused||void 0,"data-today":o.today||void 0},!o.hidden&&re?t.createElement(r.DayButton,{className:c[rxe.DayButton],style:w?.[rxe.DayButton],type:"button",day:n,modifiers:o,disabled:o.disabled||void 0,tabIndex:F(n)?0:-1,"aria-label":U(a,o,i.options,i),onClick:oe(n,o),onBlur:ie(n,o),onFocus:le(n,o),onKeyDown:se(n,o),onMouseEnter:ce(n,o),onMouseLeave:de(n,o)},M(a,i.options,i)):!o.hidden&&M(n.date,i.options,i))}))))))))}))),e.footer&&t.createElement(r.Footer,{className:c[rxe.Footer],style:w?.[rxe.Footer],role:"status","aria-live":"polite"},e.footer)))}function nOe(e){var{className:t,classNames:r,showOutsideDays:n=!0}=e,a=EM(e,["className","classNames","showOutsideDays"]);const o=vje();return w(rOe,Object.assign({showOutsideDays:n,captionLayout:"dropdown-years"},a,{className:PM("bg-bg-bg1 text-common-black border-bg-bg1",t),classNames:Object.assign(Object.assign(Object.assign({},o),{day_button:PM(o.day_button,"size-9"),day:"typography-subtitle1 ",today:"text-bold text-common-black [&_button]:rounded-full [&_button]:!border-primary [&_button]:!border [&_button]:!border-solid",selected:"bg-primary !text-state-primary-text-solid rounded-full ",weekdays:"text-gray-400",month_caption:PM(o.month_caption,"h-[54px]"),outside:"text-gray-400",nav:PM(o.nav,"gap-6 absolute flex right-0"),chevron:"fill-primary",root:PM(o.root,"px-6 py-4"),caption_label:PM(o.caption_label,"gap-2 flex items-center"),months:"flex flex-col relative",disabled:"[&_button]:rounded-full [&_button]:!text-input-disable-text"}),r),styles:{caption_label:{zIndex:1,position:"relative",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",border:0},dropdown:{zIndex:2,opacity:0,WebkitAppearance:"none",MozAppearance:"none",appearance:"none",position:"absolute",insetBlockStart:0,insetBlockEnd:0,insetInlineStart:0,width:"100%",margin:0,padding:0,cursor:"inherit",border:"none",lineHeight:"inherit"},dropdowns:{position:"relative",display:"inline-flex",alignItems:"center",gap:4},dropdown_root:{position:"relative",display:"inline-flex",alignItems:"center"}}}))}nOe.displayName="Calendar";var aOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((e,t)=>{const{asChild:n,...a}=e,o=n?W_e:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),w(o,{...a,ref:t})}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});function oOe(t,r=globalThis?.document){const n=Z_e(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[n,r])}var lOe,iOe="dismissableLayer.update",sOe="dismissableLayer.pointerDownOutside",cOe="dismissableLayer.focusOutside",dOe=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uOe=e.forwardRef(((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:i,onDismiss:s,...c}=t,d=e.useContext(dOe),[u,h]=e.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=e.useState({}),v=I_e(r,(e=>h(e))),m=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),b=u?m.indexOf(u):-1,k=d.layersWithOutsidePointerEventsDisabled.size>0,_=b>=g,M=function(t,r=globalThis?.document){const n=Z_e(t),a=e.useRef(!1),o=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!a.current){let t=function(){fOe(sOe,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",o.current),o.current=t,r.addEventListener("click",o.current,{once:!0})):t()}else r.removeEventListener("click",o.current);a.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",o.current)}}),[r,n]),{onPointerDownCapture:()=>a.current=!0}}((e=>{const t=e.target,r=[...d.branches].some((e=>e.contains(t)));_&&!r&&(o?.(e),i?.(e),e.defaultPrevented||s?.())}),f),x=function(t,r=globalThis?.document){const n=Z_e(t),a=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!a.current){fOe(cOe,n,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(l?.(e),i?.(e),e.defaultPrevented||s?.())}),f);return oOe((e=>{b===d.layers.size-1&&(a?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),f),e.useEffect((()=>{if(u)return n&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(lOe=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),hOe(),()=>{n&&1===d.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=lOe)}}),[u,f,n,d]),e.useEffect((()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),hOe())}),[u,d]),e.useEffect((()=>{const e=()=>p({});return document.addEventListener(iOe,e),()=>document.removeEventListener(iOe,e)}),[]),w(aOe.div,{...c,ref:v,style:{pointerEvents:k?_?"auto":"none":void 0,...t.style},onFocusCapture:H_e(t.onFocusCapture,x.onFocusCapture),onBlurCapture:H_e(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:H_e(t.onPointerDownCapture,M.onPointerDownCapture)})}));uOe.displayName="DismissableLayer";function hOe(){const e=new CustomEvent(iOe);document.dispatchEvent(e)}function fOe(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?function(e,t){e&&O.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}e.forwardRef(((t,r)=>{const n=e.useContext(dOe),a=e.useRef(null),o=I_e(r,a);return e.useEffect((()=>{const e=a.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),w(aOe.div,{...t,ref:o})})).displayName="DismissableLayerBranch";var pOe=0;function vOe(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mOe()),document.body.insertAdjacentElement("beforeend",e[1]??mOe()),pOe++,()=>{1===pOe&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),pOe--}}),[])}function mOe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var yOe="focusScope.autoFocusOnMount",gOe="focusScope.autoFocusOnUnmount",bOe={bubbles:!1,cancelable:!0},kOe=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...i}=t,[s,c]=e.useState(null),d=Z_e(o),u=Z_e(l),h=e.useRef(null),f=I_e(r,(e=>c(e))),p=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(a){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?h.current=t:xOe(h.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||xOe(h.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&xOe(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return s&&n.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[a,s,p.paused]),e.useEffect((()=>{if(s){jOe.add(p);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(yOe,bOe);s.addEventListener(yOe,d),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(xOe(n,{select:t}),document.activeElement!==r)return}((e=wOe(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&xOe(s))}return()=>{s.removeEventListener(yOe,d),setTimeout((()=>{const e=new CustomEvent(gOe,bOe);s.addEventListener(gOe,u),s.dispatchEvent(e),e.defaultPrevented||xOe(t??document.body,{select:!0}),s.removeEventListener(gOe,u),jOe.remove(p)}),0)}}var e}),[s,d,u,p]);const v=e.useCallback((e=>{if(!n&&!a)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[a,o]=function(e){const t=wOe(e),r=_Oe(t,e),n=_Oe(t.reverse(),e);return[r,n]}(t);a&&o?e.shiftKey||r!==o?e.shiftKey&&r===a&&(e.preventDefault(),n&&xOe(o,{select:!0})):(e.preventDefault(),n&&xOe(a,{select:!0})):r===t&&e.preventDefault()}}),[n,a,p.paused]);return w(aOe.div,{tabIndex:-1,...i,ref:f,onKeyDown:v})}));function wOe(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _Oe(e,t){for(const r of e)if(!MOe(r,{upTo:t}))return r}function MOe(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function xOe(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}kOe.displayName="FocusScope";var jOe=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=OOe(e,t),e.unshift(t)},remove(t){e=OOe(e,t),e[0]?.resume()}}}();function OOe(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var EOe=e["useId".toString()]||(()=>{}),zOe=0;function COe(t){const[r,n]=e.useState(EOe());return q_e((()=>{t||n((e=>e??String(zOe++)))}),[t]),t||(r?`radix-${r}`:"")}var POe=e.forwardRef(((e,t)=>{const{children:r,width:n=10,height:a=5,...o}=e;return w(aOe.svg,{...o,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:w("polygon",{points:"0,0 30,0 15,10"})})}));POe.displayName="Arrow";var AOe=POe;function ROe(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const a=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:a})),[a])}};return n.scopeName=r.scopeName,n}var LOe="Popper",[IOe,SOe]=function(t,r=[]){let n=[];const a=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const a=n?.[t]||r;return e.useMemo((()=>({[`__scope${t}`]:{...n,[t]:a}})),[n,a])}};return a.scopeName=t,[function(r,a){const o=e.createContext(a),l=n.length;function i(r){const{scope:n,children:a,...i}=r,s=n?.[t][l]||o,c=e.useMemo((()=>i),Object.values(i));return w(s.Provider,{value:c,children:a})}return n=[...n,a],i.displayName=r+"Provider",[i,function(n,i){const s=i?.[t][l]||o,c=e.useContext(s);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},ROe(a,...r)]}(LOe),[VOe,HOe]=IOe(LOe),ZOe=t=>{const{__scopePopper:r,children:n}=t,[a,o]=e.useState(null);return w(VOe,{scope:r,anchor:a,onAnchorChange:o,children:n})};ZOe.displayName=LOe;var NOe="PopperAnchor",DOe=e.forwardRef(((t,r)=>{const{__scopePopper:n,virtualRef:a,...o}=t,l=HOe(NOe,n),i=e.useRef(null),s=I_e(r,i);return e.useEffect((()=>{l.onAnchorChange(a?.current||i.current)})),a?null:w(aOe.div,{...o,ref:s})}));DOe.displayName=NOe;var qOe="PopperContent",[BOe,FOe]=IOe(qOe),TOe=e.forwardRef(((t,r)=>{const{__scopePopper:n,side:a="bottom",sideOffset:o=0,align:l="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:v,...m}=t,y=HOe(qOe,n),[g,b]=e.useState(null),k=I_e(r,(e=>b(e))),[_,M]=e.useState(null),x=B_e(_),j=x?.width??0,O=x?.height??0,E=a+("center"!==l?"-"+l:""),z="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},C=Array.isArray(d)?d:[d],P=C.length>0,A={padding:z,boundary:C.filter(GOe),altBoundary:P},{refs:R,floatingStyles:L,placement:I,isPositioned:S,middlewareData:V}=owe({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>Tke(...e,{animationFrame:"always"===p}),elements:{reference:y.anchor},middleware:[iwe({mainAxis:o+O,alignmentAxis:i}),c&&swe({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?cwe():void 0,...A}),c&&dwe({...A}),uwe({...A,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:a,height:o}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${r}px`),l.setProperty("--radix-popper-available-height",`${n}px`),l.setProperty("--radix-popper-anchor-width",`${a}px`),l.setProperty("--radix-popper-anchor-height",`${o}px`)}}),_&&fwe({element:_,padding:s}),YOe({arrowWidth:j,arrowHeight:O}),f&&hwe({strategy:"referenceHidden",...A})]}),[H,Z]=KOe(I),N=Z_e(v);q_e((()=>{S&&N?.()}),[S,N]);const D=V.arrow?.x,q=V.arrow?.y,B=0!==V.arrow?.centerOffset,[F,T]=e.useState();return q_e((()=>{g&&T(window.getComputedStyle(g).zIndex)}),[g]),w("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:S?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:w(BOe,{scope:n,placedSide:H,onArrowChange:M,arrowX:D,arrowY:q,shouldHideArrow:B,children:w(aOe.div,{"data-side":H,"data-align":Z,...m,ref:k,style:{...m.style,animation:S?void 0:"none"}})})})}));TOe.displayName=qOe;var WOe="PopperArrow",UOe={top:"bottom",right:"left",bottom:"top",left:"right"},$Oe=e.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,a=FOe(WOe,r),o=UOe[a.placedSide];return w("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:w(AOe,{...n,ref:t,style:{...n.style,display:"block"}})})}));function GOe(e){return null!==e}$Oe.displayName=WOe;var YOe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:a}=t,o=0!==a.arrow?.centerOffset,l=o?0:e.arrowWidth,i=o?0:e.arrowHeight,[s,c]=KOe(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(a.arrow?.x??0)+l/2,h=(a.arrow?.y??0)+i/2;let f="",p="";return"bottom"===s?(f=o?d:`${u}px`,p=-i+"px"):"top"===s?(f=o?d:`${u}px`,p=`${n.floating.height+i}px`):"right"===s?(f=-i+"px",p=o?d:`${h}px`):"left"===s&&(f=`${n.floating.width+i}px`,p=o?d:`${h}px`),{data:{x:f,y:p}}}});function KOe(e){const[t,r="center"]=e.split("-");return[t,r]}var XOe=ZOe,QOe=DOe,JOe=TOe,eEe=$Oe,tEe=e.forwardRef(((t,r)=>{const{container:n,...a}=t,[o,l]=e.useState(!1);q_e((()=>l(!0)),[]);const i=n||o&&globalThis?.document?.body;return i?E.createPortal(w(aOe.div,{...a,ref:r}),i):null}));tEe.displayName="Portal";var rEe=t=>{const{present:r,children:n}=t,a=function(t){const[r,n]=e.useState(),a=e.useRef({}),o=e.useRef(t),l=e.useRef("none"),i=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer(((e,t)=>r[e][t]??e),t)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=nEe(a.current);l.current="mounted"===s?e:"none"}),[s]),q_e((()=>{const e=a.current,r=o.current;if(r!==t){const n=l.current,a=nEe(e);if(t)c("MOUNT");else if("none"===a||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=t}}),[t,c]),q_e((()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const l=nEe(a.current).includes(n.animationName);if(n.target===r&&l&&(c("ANIMATION_END"),!o.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)}))}},i=e=>{e.target===r&&(l.current=nEe(a.current))};return r.addEventListener("animationstart",i),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",i),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(a.current=getComputedStyle(e)),n(e)}),[])}}(r),o="function"==typeof n?n({present:a.isPresent}):e.Children.only(n),l=I_e(a.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||a.isPresent?e.cloneElement(o,{ref:l}):null};function nEe(e){return e?.animationName||"none"}rEe.displayName="Presence";var aEe=new WeakMap,oEe=new WeakMap,lEe={},iEe=0,sEe=function(e){return e&&(e.host||sEe(e.parentNode))},cEe=function(e,t,r,n){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=sEe(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);lEe[r]||(lEe[r]=new WeakMap);var o=lEe[r],l=[],i=new Set,s=new Set(a),c=function(e){e&&!i.has(e)&&(i.add(e),c(e.parentNode))};a.forEach(c);var d=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))d(e);else try{var t=e.getAttribute(n),a=null!==t&&"false"!==t,s=(aEe.get(e)||0)+1,c=(o.get(e)||0)+1;aEe.set(e,s),o.set(e,c),l.push(e),1===s&&a&&oEe.set(e,!0),1===c&&e.setAttribute(r,"true"),a||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return d(t),i.clear(),iEe++,function(){l.forEach((function(e){var t=aEe.get(e)-1,a=o.get(e)-1;aEe.set(e,t),o.set(e,a),t||(oEe.has(e)||e.removeAttribute(n),oEe.delete(e)),a||e.removeAttribute(r)})),--iEe||(aEe=new WeakMap,aEe=new WeakMap,oEe=new WeakMap,lEe={})}},dEe=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),cEe(n,a,r,"aria-hidden")):function(){return null}},uEe="right-scroll-bar-position",hEe="width-before-scroll-bar";function fEe(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var pEe="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,vEe=new WeakMap;function mEe(e,t){var r,n,a,o=(r=null,n=function(t){return e.forEach((function(e){return fEe(e,t)}))},(a=i((function(){return{value:r,callback:n,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=n,a.facade);return pEe((function(){var t=vEe.get(o);if(t){var r=new Set(t),n=new Set(e),a=o.current;r.forEach((function(e){n.has(e)||fEe(e,null)})),n.forEach((function(e){r.has(e)||fEe(e,a)}))}vEe.set(o,e)}),[e]),o}function yEe(e){return e}var gEe=function(t){var r=t.sideCar,n=EM(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=r.read();if(!a)throw new Error("Sidecar medium not found");return e.createElement(a,OM({},n))};gEe.isSideCarExport=!0;var bEe=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=yEe);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var a=t(e,n);return r.push(a),function(){r=r.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var a=r;r=[],a.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},l=function(){return Promise.resolve().then(o)};l(),r={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),r}}}};return a}(null);return t.options=OM({async:!0,ssr:!1},e),t}(),kEe=function(){},wEe=e.forwardRef((function(t,r){var n=e.useRef(null),a=e.useState({onScrollCapture:kEe,onWheelCapture:kEe,onTouchMoveCapture:kEe}),o=a[0],l=a[1],i=t.forwardProps,s=t.children,c=t.className,d=t.removeScrollBar,u=t.enabled,h=t.shards,f=t.sideCar,p=t.noIsolation,v=t.inert,m=t.allowPinchZoom,y=t.as,g=void 0===y?"div":y,b=t.gapMode,k=EM(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,_=mEe([n,r]),M=OM(OM({},k),o);return e.createElement(e.Fragment,null,u&&e.createElement(w,{sideCar:bEe,removeScrollBar:d,shards:h,noIsolation:p,inert:v,setCallbacks:l,allowPinchZoom:!!m,lockRef:n,gapMode:b}),i?e.cloneElement(e.Children.only(s),OM(OM({},M),{ref:_})):e.createElement(g,OM({},M,{className:c,ref:_}),s))}));wEe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wEe.classNames={fullWidth:hEe,zeroRight:uEe};function _Ee(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var MEe=function(){var e=0,t=null;return{add:function(r){0==e&&(t=_Ee())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,r),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xEe=function(){var t=function(){var t=MEe();return function(r,n){e.useEffect((function(){return t.add(r),function(){t.remove()}}),[r&&n])}}();return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},jEe={left:0,top:0,right:0,gap:0},OEe=function(e){return parseInt(e||"",10)||0},EEe=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return jEe;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[OEe(r),OEe(n),OEe(a)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},zEe=xEe(),CEe="data-scroll-locked",PEe=function(e,t,r,n){var a=e.left,o=e.top,l=e.right,i=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(i,"px ").concat(n,";\n }\n body[").concat(CEe,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(uEe," {\n right: ").concat(i,"px ").concat(n,";\n }\n \n .").concat(hEe," {\n margin-right: ").concat(i,"px ").concat(n,";\n }\n \n .").concat(uEe," .").concat(uEe," {\n right: 0 ").concat(n,";\n }\n \n .").concat(hEe," .").concat(hEe," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(CEe,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},AEe=function(){var e=parseInt(document.body.getAttribute(CEe)||"0",10);return isFinite(e)?e:0},REe=function(t){var r=t.noRelative,n=t.noImportant,a=t.gapMode,o=void 0===a?"margin":a;e.useEffect((function(){return document.body.setAttribute(CEe,(AEe()+1).toString()),function(){var e=AEe()-1;e<=0?document.body.removeAttribute(CEe):document.body.setAttribute(CEe,e.toString())}}),[]);var l=e.useMemo((function(){return EEe(o)}),[o]);return e.createElement(zEe,{styles:PEe(l,!r,o,n?"":"!important")})},LEe=!1;if("undefined"!=typeof window)try{var IEe=Object.defineProperty({},"passive",{get:function(){return LEe=!0,!0}});window.addEventListener("test",IEe,IEe),window.removeEventListener("test",IEe,IEe)}catch(e){LEe=!1}var SEe=!!LEe&&{passive:!1},VEe=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},HEe=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),ZEe(e,n)){var a=NEe(e,n);if(a[1]>a[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ZEe=function(e,t){return"v"===e?function(e){return VEe(e,"overflowY")}(t):function(e){return VEe(e,"overflowX")}(t)},NEe=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},DEe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qEe=function(e){return[e.deltaX,e.deltaY]},BEe=function(e){return e&&"current"in e?e.current:e},FEe=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},TEe=0,WEe=[];function UEe(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var $Ee,GEe=($Ee=function(t){var r=e.useRef([]),n=e.useRef([0,0]),a=e.useRef(),o=e.useState(TEe++)[0],l=e.useState(xEe)[0],i=e.useRef(t);e.useEffect((function(){i.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var e=function(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(BEe),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var r,o=DEe(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-o[0],c="deltaY"in e?e.deltaY:l[1]-o[1],d=e.target,u=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var h=HEe(u,d);if(!h)return!0;if(h?r=u:(r="v"===u?"h":"v",h=HEe(u,d)),!h)return!1;if(!a.current&&"changedTouches"in e&&(s||c)&&(a.current=r),!r)return!0;var f=a.current||r;return function(e,t,r,n,a){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),l=o*n,i=r.target,s=t.contains(i),c=!1,d=l>0,u=0,h=0;do{var f=NEe(e,i),p=f[0],v=f[1]-f[2]-o*p;(p||v)&&ZEe(e,i)&&(u+=v,h+=p),i=i instanceof ShadowRoot?i.host:i.parentNode}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return d&&(Math.abs(u)<1||!a)?c=!0:d||!(Math.abs(h)<1)&&a||(c=!0),c}(f,t,e,"h"===f?s:c,!0)}),[]),c=e.useCallback((function(e){var t=e;if(WEe.length&&WEe[WEe.length-1]===l){var n="deltaY"in t?qEe(t):DEe(t),a=r.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)}))[0];if(a&&a.should)t.cancelable&&t.preventDefault();else if(!a){var o=(i.current.shards||[]).map(BEe).filter(Boolean).filter((function(e){return e.contains(t.target)}));(o.length>0?s(t,o[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),d=e.useCallback((function(e,t,n,a){var o={name:e,delta:t,target:n,should:a,shadowParent:UEe(n)};r.current.push(o),setTimeout((function(){r.current=r.current.filter((function(e){return e!==o}))}),1)}),[]),u=e.useCallback((function(e){n.current=DEe(e),a.current=void 0}),[]),h=e.useCallback((function(e){d(e.type,qEe(e),e.target,s(e,t.lockRef.current))}),[]),f=e.useCallback((function(e){d(e.type,DEe(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return WEe.push(l),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,SEe),document.addEventListener("touchmove",c,SEe),document.addEventListener("touchstart",u,SEe),function(){WEe=WEe.filter((function(e){return e!==l})),document.removeEventListener("wheel",c,SEe),document.removeEventListener("touchmove",c,SEe),document.removeEventListener("touchstart",u,SEe)}}),[]);var p=t.removeScrollBar,v=t.inert;return e.createElement(e.Fragment,null,v?e.createElement(l,{styles:FEe(o)}):null,p?e.createElement(REe,{gapMode:t.gapMode}):null)},bEe.useMedium($Ee),gEe),YEe=e.forwardRef((function(t,r){return e.createElement(wEe,OM({},t,{ref:r,sideCar:GEe}))}));YEe.classNames=wEe.classNames;var KEe="Popover",[XEe,QEe]=S_e(KEe,[SOe]),JEe=SOe(),[eze,tze]=XEe(KEe),rze=t=>{const{__scopePopover:r,children:n,open:a,defaultOpen:o,onOpenChange:l,modal:i=!1}=t,s=JEe(r),c=e.useRef(null),[d,u]=e.useState(!1),[h=!1,f]=N_e({prop:a,defaultProp:o,onChange:l});return w(XOe,{...s,children:w(eze,{scope:r,contentId:COe(),triggerRef:c,open:h,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),hasCustomAnchor:d,onCustomAnchorAdd:e.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>u(!1)),[]),modal:i,children:n})})};rze.displayName=KEe;var nze="PopoverAnchor";e.forwardRef(((t,r)=>{const{__scopePopover:n,...a}=t,o=tze(nze,n),l=JEe(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return e.useEffect((()=>(i(),()=>s())),[i,s]),w(QOe,{...l,...a,ref:r})})).displayName=nze;var aze="PopoverTrigger",oze=e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,a=tze(aze,r),o=JEe(r),l=I_e(t,a.triggerRef),i=w(aOe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":mze(a.open),...n,ref:l,onClick:H_e(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?i:w(QOe,{asChild:!0,...o,children:i})}));oze.displayName=aze;var lze="PopoverPortal",[ize,sze]=XEe(lze,{forceMount:void 0}),cze=e=>{const{__scopePopover:t,forceMount:r,children:n,container:a}=e,o=tze(lze,t);return w(ize,{scope:t,forceMount:r,children:w(rEe,{present:r||o.open,children:w(tEe,{asChild:!0,container:a,children:n})})})};cze.displayName=lze;var dze="PopoverContent",uze=e.forwardRef(((e,t)=>{const r=sze(dze,e.__scopePopover),{forceMount:n=r.forceMount,...a}=e,o=tze(dze,e.__scopePopover);return w(rEe,{present:n||o.open,children:o.modal?w(hze,{...a,ref:t}):w(fze,{...a,ref:t})})}));uze.displayName=dze;var hze=e.forwardRef(((t,r)=>{const n=tze(dze,t.__scopePopover),a=e.useRef(null),o=I_e(r,a),l=e.useRef(!1);return e.useEffect((()=>{const e=a.current;if(e)return dEe(e)}),[]),w(YEe,{as:W_e,allowPinchZoom:!0,children:w(pze,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H_e(t.onCloseAutoFocus,(e=>{e.preventDefault(),l.current||n.triggerRef.current?.focus()})),onPointerDownOutside:H_e(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;l.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:H_e(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),fze=e.forwardRef(((t,r)=>{const n=tze(dze,t.__scopePopover),a=e.useRef(!1),o=e.useRef(!1);return w(pze,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(a.current||n.triggerRef.current?.focus(),e.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(a.current=!0,"pointerdown"===e.detail.originalEvent.type&&(o.current=!0));const r=e.target,l=n.triggerRef.current?.contains(r);l&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&o.current&&e.preventDefault()}})})),pze=e.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,...u}=e,h=tze(dze,r),f=JEe(r);return vOe(),w(kOe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:w(uOe,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:d,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:w(JOe,{"data-state":mze(h.open),role:"dialog",id:h.contentId,...f,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),vze="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,a=tze(vze,r);return w(aOe.button,{type:"button",...n,ref:t,onClick:H_e(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=vze;function mze(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,a=JEe(r);return w(eEe,{...a,...n,ref:t})})).displayName="PopoverArrow";var yze=cze,gze=uze;const bze=rze,kze=oze,wze=e.forwardRef(((e,t)=>{var{className:r,align:n="center",sideOffset:a=4}=e,o=EM(e,["className","align","sideOffset"]);return w(yze,{children:w(gze,Object.assign({ref:t,align:n,sideOffset:a,className:PM("z-50 min-w-72 rounded-md border bg-bg-bg1 border-none overflow-hidden p-0 text-common-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r)},o))})}));wze.displayName=gze.displayName;const _ze={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Mze(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const xze={date:Mze({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Mze({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Mze({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},jze={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Oze(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const Eze={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Oze({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Oze({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Oze({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Oze({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Oze({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function zze(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,(e=>e.test(l))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,(e=>e.test(l)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(l.length)}}}const Cze={ordinalNumber:function(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=r.valueCallback?r.valueCallback(l):l;return{value:l,rest:t.slice(a.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:zze({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:zze({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:zze({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:zze({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:zze({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},Pze={code:"en-US",formatDistance:(e,t,r)=>{let n;const a=_ze[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:xze,formatRelative:(e,t,r,n)=>jze[e],localize:Eze,match:Cze,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Aze={};function Rze(){return Aze}const Lze=6048e5;function Ize(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Sze(e){const t=Ize(e);return t.setHours(0,0,0,0),t}function Vze(e){const t=Ize(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Hze(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Zze(e){const t=Ize(e),r=function(e,t){const r=Sze(e),n=Sze(t),a=+r-Vze(r),o=+n-Vze(n);return Math.round((a-o)/864e5)}(t,function(e){const t=Ize(e),r=Hze(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}(t));return r+1}function Nze(e,t){const r=Rze(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Ize(e),o=a.getDay(),l=(o<n?7:0)+o-n;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function Dze(e){return Nze(e,{weekStartsOn:1})}function qze(e){const t=Ize(e),r=t.getFullYear(),n=Hze(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=Dze(n),o=Hze(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const l=Dze(o);return t.getTime()>=a.getTime()?r+1:t.getTime()>=l.getTime()?r:r-1}function Bze(e){const t=Ize(e),r=+Dze(t)-+function(e){const t=qze(e),r=Hze(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Dze(r)}(t);return Math.round(r/Lze)+1}function Fze(e,t){const r=Ize(e),n=r.getFullYear(),a=Rze(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=Hze(e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const i=Nze(l,t),s=Hze(e,0);s.setFullYear(n,0,o),s.setHours(0,0,0,0);const c=Nze(s,t);return r.getTime()>=i.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function Tze(e,t){const r=Ize(e),n=+Nze(r,t)-+function(e,t){const r=Rze(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=Fze(e,t),o=Hze(e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),Nze(o,t)}(r,t);return Math.round(n/Lze)+1}function Wze(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Uze={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Wze("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):Wze(r+1,2)},d:(e,t)=>Wze(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>Wze(e.getHours()%12||12,t.length),H:(e,t)=>Wze(e.getHours(),t.length),m:(e,t)=>Wze(e.getMinutes(),t.length),s:(e,t)=>Wze(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return Wze(Math.trunc(n*Math.pow(10,r-3)),t.length)}},$ze="midnight",Gze="noon",Yze="morning",Kze="afternoon",Xze="evening",Qze="night",Jze={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return Uze.y(e,t)},Y:function(e,t,r,n){const a=Fze(e,n),o=a>0?a:1-a;if("YY"===t){return Wze(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):Wze(o,t.length)},R:function(e,t){return Wze(qze(e),t.length)},u:function(e,t){return Wze(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Wze(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Wze(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Uze.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Wze(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=Tze(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):Wze(a,t.length)},I:function(e,t,r){const n=Bze(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Wze(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):Uze.d(e,t)},D:function(e,t,r){const n=Zze(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Wze(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Wze(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Wze(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return Wze(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(a=12===n?Gze:0===n?$ze:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(a=n>=17?Xze:n>=12?Kze:n>=4?Yze:Qze,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return Uze.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):Uze.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Wze(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Wze(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Uze.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Uze.s(e,t)},S:function(e,t){return Uze.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return tCe(n);case"XXXX":case"XX":return rCe(n);default:return rCe(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return tCe(n);case"xxxx":case"xx":return rCe(n);default:return rCe(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eCe(n,":");default:return"GMT"+rCe(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eCe(n,":");default:return"GMT"+rCe(n,":")}},t:function(e,t,r){return Wze(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,r){return Wze(e.getTime(),t.length)}};function eCe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return 0===o?r+String(a):r+String(a)+t+Wze(o,2)}function tCe(e,t){if(e%60==0){return(e>0?"-":"+")+Wze(Math.abs(e)/60,2)}return rCe(e,t)}function rCe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+Wze(Math.trunc(n/60),2)+t+Wze(n%60,2)}const nCe=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},aCe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},oCe={p:aCe,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return nCe(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",nCe(n,t)).replace("{{time}}",aCe(a,t))}},lCe=/^D+$/,iCe=/^Y+$/,sCe=["D","DD","YY","YYYY"];function cCe(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const r=Ize(e);return!isNaN(Number(r))}const dCe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uCe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hCe=/^'([^]*?)'?$/,fCe=/''/g,pCe=/[a-zA-Z]/;function vCe(e,t,r){const n=Rze(),a=n.locale??Pze,o=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,l=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ize(e);if(!cCe(i))throw new RangeError("Invalid time value");let s=t.match(uCe).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,oCe[t])(e,a.formatLong)}return e})).join("").match(dCe).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:mCe(e)};if(Jze[t])return{isToken:!0,value:e};if(t.match(pCe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(s=a.localize.preprocessor(i,s));const c={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return s.map((r=>{if(!r.isToken)return r.value;const n=r.value;(function(e){return iCe.test(e)}(n)||function(e){return lCe.test(e)}(n))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),sCe.includes(e))throw new RangeError(n)}(n,t,String(e));return(0,Jze[n[0]])(i,n,a.localize,c)})).join("")}function mCe(e){const t=e.match(hCe);return t?t[1].replace(fCe,"'"):e}const yCe=e=>{var{date:t,onSelect:r,textInputProps:n,popoverContentProps:a}=e,o=EM(e,["date","onSelect","textInputProps","popoverContentProps"]);const[l,s]=i(!1);return w("div",{children:_(bze,{modal:!0,open:l,onOpenChange:s,children:[w(kze,{asChild:!0,children:w("div",{className:"flex",children:w($me,Object.assign({fullwidth:!0,id:"date-picker",readOnly:!0,label:"Date",size:"md",value:t?vCe(t,"dd MMM yyyy"):l?" ":"",hasClearIcon:!1,endIcon:w(Yr,{fill:"inherit",className:"cursor-pointer"})},n,{labelClassName:PM("pointer-events-none",null==n?void 0:n.labelClassName)}))})}),w(wze,Object.assign({className:"w-auto p-0 z-[100]"},a,{children:w(nOe,Object.assign({defaultMonth:t},o,{mode:"single",selected:t,onSelect:(...e)=>{null==r||r(...e),s(!1)}}))}))]})})},gCe=(e,t,r)=>Array.from(e).filter((e=>t.test(e))).slice(0,r),bCe=r((({value:e,onChange:t,onBlur:r,onComplete:a,length:o=6,disabled:i=!1,invalid:s=!1,autoFocus:d=!1,inputMode:u="numeric",charPattern:h=/^\d$/,className:f,inputClassName:p},v)=>{const m=n([]),y=n(null),g=l((()=>{const t=e||"";return Array.from({length:o},((e,r)=>t[r]||""))}),[o,e]);c(v,(()=>m.current[0]),[]);const b=e=>{const r=e.join("");t(r),a&&e.every((e=>""!==e))&&a(r)},k=e=>{var t,r;const n=Math.max(0,Math.min(o-1,e));null===(t=m.current[n])||void 0===t||t.focus(),null===(r=m.current[n])||void 0===r||r.select()};return w("div",{className:PM("flex items-center gap-3",f),ref:y,children:g.map(((e,t)=>w("input",{ref:e=>{m.current[t]=e},type:"text",inputMode:u,autoComplete:0===t?"one-time-code":"off",value:e,maxLength:1,disabled:i,autoFocus:d&&0===t,"aria-invalid":s||void 0,className:PM("h-14 w-[46px] rounded-[8px] text-input-filled-text border bg-transparent text-center text-2xl font-semibold outline-none transition-all duration-200","border-input-default-stroke focus:border-input-active-stroke","disabled:cursor-not-allowed disabled:opacity-50",s&&"border-input-error focus:border-input-error",p),onFocus:e=>{e.target.select()},onBlur:e=>{var t;const n=e.relatedTarget;n&&(null===(t=y.current)||void 0===t?void 0:t.contains(n))||null==r||r()},onChange:e=>((e,t)=>{if(i)return;if(!t){const t=[...g];return t[e]="",void b(t)}const r=gCe(t,h,o);if(!r.length)return;const n=[...g];let a=e;r.forEach((e=>{a<o&&(n[a]=e,a+=1)})),b(n),k(a<o?a:o-1)})(t,e.target.value),onPaste:e=>((e,t)=>{if(t.preventDefault(),i)return;const r=t.clipboardData.getData("text"),n=gCe(r,h,o-e);if(!n.length)return;const a=[...g];n.forEach(((t,r)=>{a[e+r]=t})),b(a);const l=Math.min(e+n.length,o-1);k(l)})(t,e),onKeyDown:e=>((e,t)=>{if(!i){if("ArrowLeft"===t.key)return t.preventDefault(),void k(e-1);if("ArrowRight"===t.key)return t.preventDefault(),void k(e+1);if("Backspace"===t.key){if(g[e]){t.preventDefault();const r=[...g];return r[e]="",void b(r)}if(e>0){t.preventDefault();const r=[...g];r[e-1]="",b(r),k(e-1)}}}})(t,e)},t)))})}));bCe.displayName="OtpInput";const kCe=t.forwardRef(((e,t)=>{var{id:r,label:n,required:a=!1,helperText:o,error:l=!1,errorMessage:i,keepFooterSpace:s=!0,wrapperClassName:c,labelClassName:d,messageClassName:u}=e,h=EM(e,["id","label","required","helperText","error","errorMessage","keepFooterSpace","wrapperClassName","labelClassName","messageClassName"]);const f=Boolean(l||i),p=f?i:o;return _("div",{className:PM("inline-flex w-full flex-col gap-2",c),children:[n&&_("label",{htmlFor:r,className:PM("typography-overline text-input-default-text",f&&"text-input-error",d),children:[n,a&&w("span",{className:"ml-1 text-input-error",children:"*"})]}),w(bCe,Object.assign({},h,{ref:t,invalid:f})),(p||s)&&w("div",{className:PM("typography-small2 min-h-[18px]",f?"text-input-error":"text-text-g-contrast-medium",u),role:f?"alert":void 0,children:p||" "})]})}));kCe.displayName="OtpInputGroup";const wCe=({progress:e=0,color:t,gradientStart:r,gradientEnd:n,animationDuration:a=.5,height:o=8,trackClassName:l,progressClassName:c})=>{const[d,u]=i(0);s((()=>{u(e)}),[e]);return w("div",{className:PM("w-full bg-grey2-transparent-16 rounded-full overflow-hidden",l),style:{height:`${o}px`},children:w("div",{className:PM("h-full rounded-full transition-all ease-out bg-primary",c),style:{width:`${d}%`,background:r&&n?`linear-gradient(to right, ${r}, ${n})`:t,transition:`width ${a}s ease-out`}})})},_Ce=e.forwardRef(((e,t)=>{var{rootClassName:r,className:n,rootRef:a}=e,o=EM(e,["rootClassName","className","rootRef"]);return w("div",{className:PM("relative h-full w-full overflow-auto",r),ref:a,children:w("table",Object.assign({ref:t,className:PM("w-full caption-bottom text-sm border-collapse",n)},o))})}));_Ce.displayName="Table";const MCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("thead",Object.assign({ref:t,className:PM("[&_tr]:border-b bg-secondary-80",r)},n))}));MCe.displayName="TableHeader";const xCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("tbody",Object.assign({ref:t,className:PM("[&_tr:last-child]:border-0",r)},n))}));xCe.displayName="TableBody";const jCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("tfoot",Object.assign({ref:t,className:PM("border-t bg-transparent-grey2-8 font-medium [&>tr]:last:border-b-0",r)},n))}));jCe.displayName="TableFooter";const OCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("tr",Object.assign({ref:t,className:PM("border-b transition-colors hover:bg-transparent-grey2-8 data-[state=selected]:bg-grey-20",r)},n))}));OCe.displayName="TableRow";const ECe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("th",Object.assign({ref:t,className:PM(" h-12 py-3 px-6 text-left align-middle typography-body2 text-text-g-contrast-low [&:has([role=checkbox])]:pr-4 [&:has([role=checkbox])]:w-4",r)},n))}));ECe.displayName="TableHead";const zCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("td",Object.assign({ref:t,className:PM(" py-3 px-6 text-left align-middle typography-body3 text-text-g-contrast-low [&:has([role=checkbox])]:pr-4 [&:has([role=checkbox])]:w-4",r)},n))}));zCe.displayName="TableCell";const CCe=e.forwardRef(((e,t)=>{var{className:r}=e,n=EM(e,["className"]);return w("caption",Object.assign({ref:t,className:PM("mt-4 text-sm text-text-g-contrast-medium",r)},n))}));
|
|
9248
9248
|
/**
|
|
9249
9249
|
* table-core
|
|
9250
9250
|
*
|