1import{r as n,a as b,j as t}from"./react-DV1t-RFr.js";import{u as oe}from"./Tick-kzBn0Rae.js";import{a as c}from"./Trash-C9p4crdT.js";import{f as ne,D as A,m as le}from"./GDLoadingMask-DymGFtVF.js";import{Y as B,aQ as H,ae as _,n as G,K as I,aR as ie,aS as ce,aT as ue,y as de,X as fe,d as T,ah as me,V as pe,q as M}from"./User-BwMVt-Id.js";import{W as be,l as xe,b as he,j as ge,g as ve}from"./GDSelect-Bq-1vSn6.js";import{V as O,q as ye,Z as V,e as je,N as Ce,u as we}from"./useControllable-CI2cQhIA.js";import{$ as $e,b as Re,w as Ee,e as Ne,s as Se}from"./actionConstants-CLxdrqrM.js";import{C as ke}from"./GDInput-BwLdVq7f.js";let De="div";function Te(e,s){let o=`headlessui-control-${n.useId()}`,[r,v]=O(),[y,j]=H(),i=_(),{disabled:u=i||!1,...d}=e,f=G({disabled:u}),x={ref:s,disabled:u||void 0,"aria-disabled":u||void 0},m=I();return b.createElement(ie,{value:u},b.createElement(v,{value:r},b.createElement(j,{value:y},b.createElement(ye,{id:o},m({ourProps:x,theirProps:{...d,children:b.createElement(be,null,typeof d.children=="function"?d.children(f):d.children)},slot:f,defaultTag:De,name:"Field"})))))}let Pe=B(Te),F=n.createContext(null);F.displayName="GroupContext";let Ie=n.Fragment;function Fe(e){var s;let[o,r]=n.useState(null),[v,y]=O(),[j,i]=H(),u=n.useMemo(()=>({switch:o,setSwitch:r}),[o,r]),d={},f=e,x=I();return b.createElement(i,{name:"Switch.Description",value:j},b.createElement(y,{name:"Switch.Label",value:v,props:{htmlFor:(s=u.switch)==null?void 0:s.id,onClick(m){o&&(ue(m.currentTarget)&&m.preventDefault(),o.click(),o.focus({preventScroll:!0}))}}},b.createElement(F.Provider,{value:u},x({ourProps:d,theirProps:f,slot:{},defaultTag:Ie,name:"Switch.Group"}))))}let Le="button";function Me(e,s){var o;let r=n.useId(),v=je(),y=_(),{id:j=v||`headlessui-switch-${r}`,disabled:i=y||!1,checked:u,defaultChecked:d,onChange:f,name:x,value:m,form:p,autoFocus:C=!1,...a}=e,h=n.useContext(F),[l,k]=n.useState(null),D=n.useRef(null),P=de(D,s,h===null?null:h.setSwitch,k),w=xe(d),[$,R]=he(u,f,w??!1),N=fe(),[E,S]=n.useState(!1),L=T(()=>{S(!0),R==null||R(!$),N.nextFrame(()=>{S(!1)})}),W=T(g=>{if(Se(g.currentTarget))return g.preventDefault();g.preventDefault(),L()}),K=T(g=>{g.key===M.Space?(g.preventDefault(),L()):g.key===M.Enter&&ve(g.currentTarget)}),X=T(g=>g.preventDefault()),q=Ce(),U=me(),{isFocusVisible:z,focusProps:Y}=$e({autoFocus:C}),{isHovered:J,hoverProps:Q}=Re({isDisabled:i}),{pressed:Z,pressProps:ee}=Ee({disabled:i}),te=G({checked:$,disabled:i,hover:J,focus:z,active:Z,autofocus:C,changing:E}),ae=pe({id:j,ref:P,role:"switch",type:Ne(e,l),tabIndex:e.tabIndex===-1?0:(o=e.tabIndex)!=null?o:0,"aria-checked":$,"aria-labelledby":q,"aria-describedby":U,disabled:i||void 0,autoFocus:C,onClick:W,onKeyUp:K,onKeyPress:X},Y,Q,ee),re=n.useCallback(()=>{if(w!==void 0)return R==null?void 0:R(w)},[R,w]),se=I();return b.createElement(b.Fragment,null,x!=null&&b.createElement(ge,{disabled:i,data:{[x]:m||"on"},overrides:{type:"checkbox",checked:$},form:p,onReset:re}),se({ourProps:ae,theirProps:a,slot:te,defaultTag:Le,name:"Switch"}))}let Ae=B(Me),Be=Fe,He=V,_e=ce,Ge=Object.assign(Ae,{Group:Be,Label:He,Description:_e});var Oe=(e=>(e.NONE="",e.WHITE_TO_TRANSPARANT="after:from-white after:to-white/0",e.BROWN_TO_TRANSPARANT="after:from-brown-50 after:to-brown-50/0",e))(Oe||{}),Ve=(e=>(e.XS="after:h-10",e.SM="after:h-15",e.MD="after:h-20",e.LG="after:h-25",e.XL="after:h-30",e))(Ve||{}),We=(e=>(e.DEFAULT="default",e.SIMPLE="simple",e.SIMPLE_RIGHT="simple-right",e.ELLIPSIS="Ellipsis",e))(We||{});const nt=({children:e,threshold:s=140,minCollapsableHeight:o=0,button:r="default",className:v,gradientColor:y="after:from-white after:to-white/0",gradientHeight:j="after:h-20",animationSpeed:i=1,initShow:u=!1,canToggle:d=!1,disableAnimation:f=!1,showButtonForced:x=!1})=>{const{$t:m}=oe(),[p,C]=n.useState(u),[a,h]=n.useState(null),[l,k]=n.useState(null),D=!!(r&&(x||l!==null)),P=n.useRef({"Read less":m("Read less"),"Read more":m("Read more")}),w=n.useCallback(E=>{h(E)},[]),$=n.useCallback(E=>{C(S=>(S&&a&&a.getBoundingClientRect().top<0&&a.scrollIntoView({behavior:"smooth",block:"start"}),!S))},[a]),R=n.useMemo(()=>f?0:l?Math.floor((l-s)/(2.5*i)):0,[l,i,s,f]);if(n.useEffect(()=>{const E=a==null?void 0:a.scrollHeight;E&&k(E??null)},[a==null?void 0:a.scrollHeight,e,r]),n.useEffect(()=>{!a||l===null||(a.style.maxHeight=p?`${l+7}px`:`${s}px`)},[l,p,s,a]),l&&(l<=s||l-s<=o))return e;const N={show:p,translations:P.current,onClick:$,canToggle:d};return t.jsxs("div",{className:c("GDCollapsible flex flex-col justify-center relative",v),children:[t.jsx("div",{ref:w,style:{transitionDuration:`${R}ms`,maxHeight:`${s}px`},className:c("overflow-hidden relative h-full transition-max-height ease-in-out",{"after:content-[''] after:transition after:absolute after:block after:w-full after:bottom-0 after:bg-gradient-to-t after:pointer-events-none":!p&&D},p?"":y,p?"":j),children:e}),D&&t.jsxs("div",{className:"absolute -bottom-10 w-full h-10 pb-10 select-none",children:[typeof r=="function"&&t.jsx("div",{onClick:$,children:r(p)}),r==="default"&&t.jsx(Ke,{...N}),r==="simple"&&t.jsx(Xe,{...N}),r==="Ellipsis"&&t.jsx(Ue,{...N}),r==="simple-right"&&t.jsx(qe,{...N})]})]})},Ke=({show:e,translations:s,canToggle:o,onClick:r})=>t.jsx("div",{className:c("flex justify-center duration-300 opacity-100 border-t gd-border--primary",{"opacity-0 pointer-events-none":e&&!o}),children:t.jsxs("button",{type:"button",onClick:r,className:"-mt-5 flex justify-center items-center gap-2 bottom-0 z-10 border gd-border--primary px-4 py-2 rounded text-red-700 bg-white opacity-100",children:[t.jsx("p",{children:s[e?"Read less":"Read more"]}),t.jsx(ne,{className:c("transition duration-300 ease-in-out",{"rotate-180":!e})})]})}),Xe=({show:e,translations:s,canToggle:o,onClick:r})=>t.jsxs("button",{type:"button",onClick:r,className:c("-ml-1 duration-300 opacity-100 flex items-center gap-1 text-red-800",{"opacity-0 pointer-events-none":e&&!o}),children:[t.jsx(A,{className:c("transition duration-300 ease-in-out",{"rotate-180":e})}),t.jsx("p",{children:s[e?"Read less":"Read more"]})]}),qe=({show:e,translations:s,canToggle:o,onClick:r})=>t.jsxs("button",{type:"button",onClick:r,className:c("duration-300 opacity-100 flex items-center gap-1 text-red-800",{"opacity-0 pointer-events-none":e&&!o}),children:[t.jsx("p",{children:s[e?"Read less":"Read more"]}),t.jsx(A,{className:c("transition duration-300 ease-in-out",{"rotate-180":e})})]}),Ue=({show:e,translations:s,canToggle:o,onClick:r})=>t.jsx("button",{type:"button",onClick:r,className:c("duration-300 opacity-100 flex items-center gap-1 text-red-800 hover:underline",{"opacity-0 pointer-events-none":e&&!o}),children:t.jsx("p",{children:s[e?"Read less":"Read more"]})}),ze=e=>t.jsx("svg",{viewBox:"0 0 16 16",fill:"white",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"})}),Ye=({ref:e,name:s,enabled:o,onChange:r,defaultEnabled:v=!1,value:y,label:j,theme:i="default",labelClassName:u,className:d,...f})=>{const[x,m]=we(o,r,v),p=n.useMemo(()=>({checked:{transition:{duration:.075},opacity:1,scale:1},unchecked:{transition:{duration:.15},opacity:0,scale:.5}}),[]),C=a=>{const l={default:{border:a?"border-green-400":"gd-border--primary",bg:a?"bg-green-500":"",iconColor:"text-green-500"},gray:{border:a?"border-stone-400":"gd-border--primary",bg:a?"bg-stone-400":"",iconColor:"!text-stone-500"},secondary:{border:a?"border-yellow-400":"gd-border--primary",bg:a?"bg-yellow-400":"",iconColor:"!text-yellow-400"},error:{border:"border-red-400",bg:a?"bg-red-400":"",iconColor:"!text-red-700"}}[i];return{base:"flex h-5 w-5 items-center justify-center rounded border overflow-hidden",border:l.border,bg:l.bg,iconColor:l.iconColor}};return t.jsxs(Pe,{as:"div",className:c("flex items-start justify-start",d),...f,children:[t.jsx(Ge,{ref:e,className:"focus-visible:outline-none mt-0.5 mb-1 mr-0.5",checked:x,onChange:m,name:s,value:y||ke.YES,children:({checked:a})=>{const h=C(a);return t.jsx("span",{className:c("h-5 w-5 rounded flex items-center justify-center",h.base,h.border),children:t.jsx(le.span,{initial:!1,animate:a?"checked":"unchecked",variants:p,className:c(a&&h.bg),children:t.jsx("span",{className:c("block h-5 w-5 rounded overflow-hidden",h.iconColor),children:t.jsx(ze,{fill:i==="secondary"?"stone-800":"white"})})})})}}),t.jsx(V,{className:c("text-base leading-5 text-gray-2 ml-2 cursor-pointer",u),children:j})]})};Ye.displayName="GDCheckBox";export{We as B,ze as C,Ye as G,nt as a,Ve as b,Oe as c};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.