@texturehq/edges 1.25.3 → 1.26.1
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/{TimeField-DC3iyts9.d.cts → TimeField-DT3apBHn.d.cts} +6 -1
- package/dist/{TimeField-C2O3KVaW.d.ts → TimeField-TmPbBV-t.d.ts} +6 -1
- package/dist/{colors-DCUq7Ywi.d.ts → colors-BER6l3p0.d.ts} +10 -2
- package/dist/{colors-DVn78Aex.d.cts → colors-DdsCnLrp.d.cts} +10 -2
- package/dist/components.manifest.json +3 -3
- package/dist/form/index.cjs.map +1 -1
- package/dist/form/index.js.map +1 -1
- package/dist/index.cjs +20 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +116 -15
- package/dist/index.d.ts +116 -15
- package/dist/index.js +20 -14
- package/dist/index.js.map +1 -1
- package/dist/rhf/index.cjs +1 -1
- package/dist/rhf/index.cjs.map +1 -1
- package/dist/rhf/index.d.cts +1 -1
- package/dist/rhf/index.d.ts +1 -1
- package/dist/rhf/index.js +1 -1
- package/dist/rhf/index.js.map +1 -1
- package/dist/server.cjs +2 -2
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/styles/utilities.css +0 -2
- package/dist/styles.css +38 -18
- package/dist/utilities.manifest.json +1 -1
- package/package.json +1 -1
package/dist/rhf/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var reactHookForm=require('react-hook-form'),pe=require('react'),reactAriaComponents=require('react-aria-components'),reactStately=require('react-stately'),tailwindMerge=require('tailwind-merge'),Cr=require('@phosphor-icons/react'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),reactColorful=require('react-colorful'),Kn=require('@tiptap/extension-link'),react=require('@tiptap/react'),menus=require('@tiptap/react/menus'),Xn=require('@tiptap/starter-kit');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var pe__namespace=/*#__PURE__*/_interopNamespace(pe);var Cr__namespace=/*#__PURE__*/_interopNamespace(Cr);var Kn__default=/*#__PURE__*/_interopDefault(Kn);var Xn__default=/*#__PURE__*/_interopDefault(Xn);var He={prefix:String(Math.round(Math.random()*1e10)),current:0},_t=pe__namespace.default.createContext(He),tr=pe__namespace.default.createContext(false);var or=!!(typeof window<"u"&&window.document&&window.document.createElement),Ze=new WeakMap;function rr(e=false){let o=pe.useContext(_t),t=pe.useRef(null);if(t.current===null&&!e){var r,a;let n=(a=pe__namespace.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=Ze.get(n);i==null?Ze.set(n,{id:o.current,state:n.memoizedState}):n.memoizedState!==i.state&&(o.current=i.id,Ze.delete(n));}t.current=++o.current;}return t.current}function ar(e){let o=pe.useContext(_t);o===He&&!or&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let t=rr(!!e),r=o===He&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${o.prefix}`;return e||`${r}-${t}`}function nr(e){let o=pe__namespace.default.useId(),[t]=pe.useState(Ge()),r=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${He.prefix}`;return e||`${r}-${o}`}typeof pe__namespace.default.useId=="function"?nr:ar;function sr(){return false}function lr(){return true}function dr(e){return ()=>{}}function Ge(){return typeof pe__namespace.default.useSyncExternalStore=="function"?pe__namespace.default.useSyncExternalStore(dr,sr,lr):pe.useContext(tr)}var cr=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),ur=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function tt(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r=typeof t.getTextInfo=="function"?t.getTextInfo():t.textInfo;if(r)return r.direction==="rtl";if(t.script)return cr.has(t.script)}let o=e.split("-")[0];return ur.has(o)}var fr=Symbol.for("react-aria.i18n.locale");function Kt(){let e=typeof window<"u"&&window[fr]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e]);}catch{e="en-US";}return {locale:e,direction:tt(e)?"rtl":"ltr"}}var ot=Kt(),$e=new Set;function Wt(){ot=Kt();for(let e of $e)e(ot);}function Ut(){let e=Ge(),[o,t]=pe.useState(ot);return pe.useEffect(()=>($e.size===0&&window.addEventListener("languagechange",Wt),$e.add(t),()=>{$e.delete(t),$e.size===0&&window.removeEventListener("languagechange",Wt);}),[]),e?{locale:"en-US",direction:"ltr"}:o}var gr=pe__namespace.default.createContext(null);function rt(){let e=Ut();return pe.useContext(gr)||e}var at=new Map;function nt(e){let{locale:o}=rt(),t=o+(e?Object.entries(e).sort((a,n)=>a[0]<n[0]?-1:1).join():"");if(at.has(t))return at.get(t);let r=new Intl.Collator(o,e);return at.set(t,r),r}function Oe(e){let o=nt({usage:"search",...e}),t=pe.useCallback((n,i)=>i.length===0?true:(n=n.normalize("NFC"),i=i.normalize("NFC"),o.compare(n.slice(0,i.length),i)===0),[o]),r=pe.useCallback((n,i)=>i.length===0?true:(n=n.normalize("NFC"),i=i.normalize("NFC"),o.compare(n.slice(-i.length),i)===0),[o]),a=pe.useCallback((n,i)=>{if(i.length===0)return true;n=n.normalize("NFC"),i=i.normalize("NFC");let s=0,l=i.length;for(;s+l<=n.length;s++){let u=n.slice(s,s+l);if(o.compare(i,u)===0)return true}return false},[o]);return pe.useMemo(()=>({startsWith:t,endsWith:r,contains:a}),[t,r,a])}function jt(e,o=300){let[t,r]=pe.useState(e);return pe.useEffect(()=>{let a=setTimeout(()=>r(e),o);return ()=>clearTimeout(a)},[e,o]),t}function fe(e=false){return `${e?"outline outline-1 outline-border-input data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none data-[focus-visible]:outline data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function z(e,o){return reactAriaComponents.composeRenderProps(e,t=>tailwindMerge.twMerge(o,t))}var B={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",paddingY:"py-[var(--control-gap-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",paddingY:"py-[var(--control-gap-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",paddingY:"py-[var(--control-gap-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",paddingY:"py-[var(--control-gap-xl)]",gap:"gap-[var(--control-gap-xl)]"}};var Ce={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},f=pe.memo(({name:e,size:o="md",color:t,weight:r="regular",className:a,ariaLabel:n,...i})=>{let s=Cr__namespace[e];if(!s)return process.env.NODE_ENV==="development"&&console.error(`Icon "${e}" not found in @phosphor-icons/react`),null;let l=typeof o=="string"&&o in Ce?Ce[o]:o,u=tailwindMerge.twMerge("inline-block flex-shrink-0",!t&&"text-current",a);return jsxRuntime.jsx(s,{...i,size:l,color:t,weight:r,className:u,"aria-label":n||`${e} icon`,"data-testid":`icon-${e}`})});f.displayName="Icon";var Yt=pe.memo(({variant:e="subtle",shape:o="square",containerSize:t,containerClassName:r,size:a="md",className:n,name:i,color:s,weight:l,ariaLabel:u,ref:c,...d})=>{let x=typeof a=="string"&&a in Ce?Ce[a]:a,y=t?typeof t=="string"&&t in Ce?Ce[t]:t:x*1.75,b=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",o==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-gray-100 dark:bg-gray-800",e==="solid"&&"bg-brand text-white",e==="outline"&&"border-2 border-current",r);return jsxRuntime.jsx("div",{className:b,style:{width:y,height:y},children:jsxRuntime.jsx(f,{...d,name:i,size:a,color:s,weight:l,className:n,ariaLabel:u})})});Yt.displayName="IconWithContainer";var wr=({isEntering:e,isExiting:o,className:t})=>["max-w-[200px] group bg-slate-700 dark:bg-slate-600 border border-slate-800 dark:border-white/10 shadow-[inset_0_1px_0_0_theme(colors.gray.600)] dark:shadow-none text-white text-sm rounded-lg drop-shadow-lg will-change-transform px-3 py-1",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",o?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",t].filter(Boolean).join(" ");function Zt({children:e,content:o,...t}){return jsxRuntime.jsxs(reactAriaComponents.TooltipTrigger,{delay:200,children:[e,jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...t,offset:10,className:reactAriaComponents.composeRenderProps(t.className,(r,a)=>wr({...a,className:r})),children:[jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-slate-700 stroke-gray-800 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-slate-600 dark:stroke-white/10 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),o]})]})}function de(){let[e,o]=pe__namespace.default.useState(false),t=pe__namespace.default.useCallback((a,n)=>{o(true),n?.(a);},[]),r=pe__namespace.default.useCallback((a,n)=>{o(false),n?.(a);},[]);return {isFocused:e,handleFocus:t,handleBlur:r}}function Y({children:e,className:o}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative w-full",o),children:e})}function eo({onClick:e,size:o="md",className:t}){return jsxRuntime.jsx("button",{type:"button",onClick:r=>{r.preventDefault(),r.stopPropagation(),e();},className:tailwindMerge.twMerge("absolute right-2 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body",t),"aria-label":"Clear input",onMouseDown:r=>{r.preventDefault(),r.stopPropagation();},children:jsxRuntime.jsx(f,{name:"X",size:o==="sm"?16:20})})}function Re(e){let{isInvalid:o,isDisabled:t,isFocused:r}=e,a="border rounded-[var(--control-border-radius)] !outline-none ";return t?`${a} border-border-muted`:o&&r?`${a} border-feedback-error-border shadow-[inset_0_0_0_1px_var(--color-feedback-error-border)]`:o?`${a} border-feedback-error-border`:r?`${a} border-border-focus shadow-[inset_0_0_0_1px_var(--color-border-focus)]`:`${a} border-border-input`}function to(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function kr(e){return e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":""}function oe(e){let{isInvalid:o,isDisabled:t,isFocused:r,transparent:a,size:n="md",className:i}=e;return tailwindMerge.twMerge("w-full",Re({isInvalid:o,isDisabled:t,isFocused:r}),to({transparent:a,isDisabled:t}),B[n].text,B[n].height,B[n].padding,kr(n),i)}function oo(e){let{size:o="md",isFocusWithin:t,isInvalid:r,isDisabled:a,transparent:n,className:i}=e;return tailwindMerge.twMerge("group flex items-center rounded-[var(--control-border-radius)] overflow-hidden",to({transparent:n,isDisabled:a}),B[o].height,Re({isFocused:t,isInvalid:r,isDisabled:a}),i)}function M({children:e,size:o="md",tooltip:t,description:r,descriptionPlacement:a="below",isRequired:n,className:i,htmlFor:s}){let l=t||r&&a==="tooltip",u=t||r,c=r&&a==="inline",d=jsxRuntime.jsxs("label",{htmlFor:s,className:tailwindMerge.twMerge(B[o].text,"!text-text-label font-semibold flex items-center gap-1",i),children:[e,n&&jsxRuntime.jsx("span",{children:"*"}),l&&jsxRuntime.jsx("span",{className:"text-text-muted",children:jsxRuntime.jsx(f,{name:"Info",size:o==="sm"?16:20})}),c&&jsxRuntime.jsx("span",{className:"text-text-caption font-normal ml-1",children:r})]});return l&&u?jsxRuntime.jsx(Zt,{content:u,children:d}):d}function N({size:e="md",className:o,children:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("leading-[2.25] text-text-caption",B[e].text,o),children:t})}function p({children:e,size:o="md",className:t}){return jsxRuntime.jsx("div",{role:"alert",className:tailwindMerge.twMerge(B[o].text,"text-feedback-error-text",t),children:e})}function qe({size:e="md",isInvalid:o,isDisabled:t,isFocused:r,transparent:a,className:n,...i}){return jsxRuntime.jsx("input",{className:oe({isInvalid:o,isDisabled:t,isFocused:r,transparent:a,size:e,className:n}),...i})}var Vr="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",Lr={default:"bg-action-default text-[color:var(--color-action-default-text)] hover:bg-action-default-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",brand:"bg-action-brand text-[color:var(--color-action-brand-text)] hover:bg-action-brand-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",secondary:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-feedback-error-text border-2 border-border-muted hover:bg-feedback-error-background/50 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-brand hover:text-action-brand/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-body hover:bg-background-hover hover:text-text-heading forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-1 flex-shrink-0 rounded-[var(--control-border-radius)]",unstyled:"bg-transparent"},ao={full:"w-full",default:"w-fit"},Er="opacity-50 cursor-not-allowed pointer-events-none",Dr="opacity-100 cursor-pointer",Ar={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},zr={primary:"bg-action-brand text-white",destructive:"bg-action-destructive text-white"};function Mr(e){return e?e==="primary"?"brand":e:"default"}function Hr(e){let{variant:o="default",size:t="md",isDisabled:r,fullWidth:a=false,isLoading:n=false}=e,i=Mr(o),s=i==="unstyled"?"":`${Vr} ${Lr[i]}`;i!=="unstyled"&&(s+=` ${B[t].text} ${B[t].height} ${B[t].padding} ${B[t].gap}`),r||n?s+=` ${Er}`:s+=` ${Dr}`,a?s+=` ${ao.full}`:s+=` ${ao.default}`;let l=i==="brand"?"focus-visible:outline-action-brand":void 0;return [s,fe(),l].filter(Boolean).join(" ")}function v(e){let{icon:o,children:t,isLoading:r=false,loadingText:a,loadingIndicator:n,size:i="md",iconPosition:s="left",iconWeight:l,href:u,className:c,badgeNumber:d,badgeVariant:x="primary",badgePosition:y="top-right",style:b,target:m,rel:P,...h}=e,F=o?jsxRuntime.jsx(f,{name:o,size:i,weight:l}):null,$=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&F,typeof t=="function"?null:t,s==="right"&&F]}),L=jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n||jsxRuntime.jsx(f,{name:"CircleNotch",size:i,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:$}),a&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:a})]}),g=(d??0)>0,S=tailwindMerge.twMerge(Hr(e),c),T=u?{href:u,target:m,rel:P,...h}:{};if(u){let{onPress:Q,onPressStart:X,onPressEnd:O,onPressChange:Pe,onPressUp:se,onAuxClick:le,onContextMenu:ue,onDoubleClick:E,...C}=h;Object.assign(T,C);}let k=u?jsxRuntime.jsx(reactAriaComponents.Link,{...T,...r&&{"aria-busy":true},style:g?void 0:b,className:S,children:r?L:typeof t=="function"?(function(Q){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&F,t(Q),s==="right"&&F]})}):$}):jsxRuntime.jsx(reactAriaComponents.Button,{...h,...r&&{"aria-busy":true},style:g?void 0:b,className:S,children:r?L:typeof t=="function"?(function(Q){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&F,t(Q),s==="right"&&F]})}):$});return g?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",c),style:b,children:[k,jsxRuntime.jsx("span",{className:`absolute ${Ar[y]} flex h-5 w-5 items-center justify-center rounded-full ${zr[x]} text-xs font-medium`,"aria-label":`${d} items`,children:d})]}):k}function Ve({transparent:e=false,className:o,children:t,...r}){return jsxRuntime.jsx(reactAriaComponents.ModalOverlay,{...r,className:reactAriaComponents.composeRenderProps(o,(a,n)=>tailwindMerge.twMerge("fixed inset-0 z-50","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",e?"bg-transparent":["bg-gradient-to-br from-black/20 via-black/15 to-black/20","backdrop-blur-[2px]","supports-[backdrop-filter]:bg-black/15"].join(" "),n.isEntering&&["animate-in fade-in","duration-300 ease-out"].join(" "),n.isExiting&&["animate-out fade-out","duration-200 ease-in"].join(" "),a)),children:t})}function Yr({isEntering:e,isExiting:o,className:t="",disableGroup:r=false}){let a=[!r&&"group","bg-background-surface","forced-colors:bg-[Canvas]","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none"].filter(Boolean).join(" "),n=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",i=o?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [a,n,i,t].filter(Boolean).join(" ")}function Ne({children:e,showArrow:o=false,withBackdrop:t=false,className:r,isDismissable:a=true,disableGroup:n=false,...i}){let l=reactAriaComponents.useSlottedContext(reactAriaComponents.PopoverContext)?.trigger==="SubmenuTrigger",u=o?12:8;u=l?u-6:u;let c=jsxRuntime.jsxs(reactAriaComponents.Popover,{offset:u,...i,className:reactAriaComponents.composeRenderProps(r,(d,x)=>Yr({...x,className:d,disableGroup:n})),children:[o&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});return t?jsxRuntime.jsx(Ve,{isDismissable:a,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:a,children:c})}):c}var uo=pe.createContext("md");function mo(){return pe.useContext(uo)}function lo(e="md"){return `flex-1 text-start data-[placeholder]:text-text-placeholder overflow-hidden text-ellipsis whitespace-nowrap ${B[e].text}`}function aa(){let e=pe__namespace.default.useCallback((t,r)=>{r?.(t);},[]),o=pe__namespace.default.useCallback((t,r)=>{r?.(t);},[]);return {handleFocus:e,handleBlur:o}}function mt({label:e,description:o,errorMessage:t,children:r,items:a,renderItem:n,renderSelectedValue:i,size:s="md",selectedKey:l,defaultSelectedKey:u,onSelectionChange:c,placeholder:d,showErrors:x=false,tooltip:y,isRequired:b,transparent:m,reserveErrorSpace:P=false,placement:h="bottom start",shouldFlip:F=true,menuWidth:$="match",descriptionPlacement:L="below",...g}){let[S,T]=pe.useState(null),[k,Q]=pe.useState(null),X=l??S??u,{handleFocus:O,handleBlur:Pe}=aa(),se=pe__namespace.default.useMemo(()=>!i||!X||!a?null:Array.from(a).find(me=>me.id===X)??null,[i,X,a]),le=C=>{c&&C!==null&&c(C),c||T(C);},ue=pe.useRef(null),E=pe.useRef(null);return jsxRuntime.jsx(reactAriaComponents.Select,{...g,selectedKey:X,defaultSelectedKey:u,onSelectionChange:le,placeholder:d,className:z(g.className,"group flex w-full flex-col"),ref:ue,onOpenChange:C=>{C&&E.current?Q(E.current.offsetWidth):C||ue.current?.blur();},children:({isDisabled:C,isInvalid:me,isOpen:Fe})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(M,{size:s,tooltip:y,description:L==="tooltip"||L==="inline"?o:void 0,descriptionPlacement:L,isRequired:b,children:e}),jsxRuntime.jsx(Y,{children:jsxRuntime.jsx("div",{ref:E,children:jsxRuntime.jsxs(v,{variant:"unstyled",className:tailwindMerge.twMerge(oe({isInvalid:me||x&&!!t,isDisabled:C,isFocused:Fe,transparent:m,size:s}),"flex items-center text-start gap-4 cursor-pointer pl-[var(--control-padding-sm)]"),onFocus:q=>O(q,g.onFocus),onBlur:q=>Pe(q,g.onBlur),"data-open":Fe,children:[i&&se?jsxRuntime.jsx("div",{className:lo(s),children:i(se)}):jsxRuntime.jsx(reactAriaComponents.SelectValue,{className:lo(s)}),jsxRuntime.jsx(f,{name:"CaretDown","aria-hidden":true,className:tailwindMerge.twMerge("h-4 w-4 text-text-body group-disabled:text-gray-200 forced-colors:text-[ButtonText] transition-transform",Fe&&"rotate-180")})]})})}),P?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:x?jsxRuntime.jsx(p,{size:s,className:"text-feedback-error-text",children:typeof t=="function"&&g.validationResult?t(g.validationResult):typeof t=="string"?t:null}):o&&L==="below"?jsxRuntime.jsx(N,{size:s,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:x?jsxRuntime.jsx(p,{size:s,className:"mt-1 text-feedback-error-text",children:typeof t=="function"&&g.validationResult?t(g.validationResult):typeof t=="string"?t:null}):o&&L==="below"?jsxRuntime.jsx(N,{size:s,className:"mt-1",children:o}):null}),jsxRuntime.jsx(Ne,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-[var(--control-border-radius)]",style:{width:$==="match"&&k?`${k}px`:void 0,minWidth:$==="auto"&&k?`${k}px`:void 0,maxWidth:$==="auto"?"min(600px, 90vw)":void 0},placement:h,shouldFlip:F,children:jsxRuntime.jsx(uo.Provider,{value:s,children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:a,className:"w-full max-h-[300px] overflow-auto bg-background-input p-0 outline-0",children:n&&a?q=>jsxRuntime.jsx(Se,{id:q.id,textValue:q.label,size:s,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:n(q)})},q.id):r})})})]})})}function Se({size:e,className:o,...t}){let r=mo(),a=e??r;return jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{...t,className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 outline-none text-text-body data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-default data-[focus-visible]:ring-inset data-[selected]:bg-background-selected data-[selected]:font-medium overflow-hidden",B[a].paddingY,B[a].text,o)})}var xa={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},ga={sm:"pl-7",md:"pl-9",lg:"pl-10",xl:"pl-12"},po={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"};function ha(){let e=pe__namespace.default.useContext(reactAriaComponents.ComboBoxStateContext);return jsxRuntime.jsx(reactAriaComponents.Button,{slot:null,className:"clear-button","aria-label":"Clear",onPress:()=>e?.setSelectedKey(null),children:"\u2715"})}var xt=(e,o,t)=>{if(e==null||e==="")return "";let a=(t?t.flatMap(n=>n.items):o||[]).find(n=>n.id===e);return a?a.name:""};async function va(e,o,t){try{let r=e.url.replace("{q}",o),a=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([l,u])=>{a.append(l,u.toString());});let n=`${r}${a.toString()?"?"+a.toString():""}`,i=await fetch(n,{method:"GET",headers:e.headers,signal:t});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);let s=await i.json();return {items:e.transformResponse(s)}}catch(r){console.error("Error in REST request:",r);let a=r instanceof Error?r.message:"Unknown error occurred";return {items:[],error:a}}}async function ya(e,o,t){try{let r=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${o}"`),a=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:r}),signal:t});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let n=await a.json();if(n.errors)throw new Error(n.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(n=e.responsePath.split(".").reduce((i,s)=>i?.[s],n)),{items:e.transformResponse(n)}}catch(r){console.error("Error in GraphQL request:",r);let a=r instanceof Error?r.message:"Unknown error occurred";return {items:[],error:a}}}function ht({label:e,staticItems:o=[],sections:t,selectedKey:r,defaultSelectedKey:a,onSelectionChange:n,requestConfig:i,defaultFilter:s,placeholder:l,errorMessage:u,description:c,size:d="md",tooltip:x,isRequired:y,isDisabled:b,isInvalid:m,validationResult:P,showErrors:h=true,renderItem:F,renderLeftIcon:$,renderSection:L,autoFocus:g=false,reserveErrorSpace:S=false}){let T=pe__namespace.default.useRef(null),[k,Q]=pe__namespace.default.useState(),[X,O]=pe.useState(()=>xt(r||a,o,t)),[Pe,se]=pe.useState(false),le=jt(X),{contains:ue}=Oe({sensitivity:"base"}),[E,C]=pe.useState(),me=B[d].text,Fe=B[d].height,q=null;pe.useEffect(()=>{g&&se(true);},[g]),pe.useEffect(()=>{let W=()=>{T.current&&Q(T.current.offsetWidth);};return W(),window.addEventListener("resize",W),()=>window.removeEventListener("resize",W)},[]),pe.useEffect(()=>{q&&q.setFilterText(le);},[le,q]),i&&(q=reactStately.useAsyncList({async load({signal:W,filterText:A=""}){if(!i.url||i.shouldLoad&&!i.shouldLoad(A))return {items:[]};try{let ee;return i.requestType==="GraphQL"?ee=await ya(i,A,W):ee=await va(i,A,W),C(ee.error),{items:ee.items}}catch(ee){return console.error("Error loading items:",ee),C(ee instanceof Error?ee.message:"Unknown error occurred"),{items:[]}}},initialFilterText:""})),le===""&&(q=null);let Yo=W=>{let A=xt(W,o,t);O(A),n&&n(W);},Jo=W=>{O(W);let A=xt(r,o,t);r!=null&&W!==A&&n&&n(null);};return jsxRuntime.jsx(reactAriaComponents.ComboBox,{onSelectionChange:Yo,selectedKey:r||void 0,defaultSelectedKey:a||void 0,defaultItems:t?t.flatMap(W=>W.items):o,items:q?q.items:void 0,className:z("group flex flex-col","w-full"),menuTrigger:"focus",isDisabled:b,isInvalid:m||!!u,inputValue:X,onInputChange:Jo,autoFocus:g,defaultFilter:s||ue,"aria-label":e||l||"Autocomplete",children:W=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(M,{size:d,tooltip:x,isRequired:y,children:e}),jsxRuntime.jsxs(reactAriaComponents.Group,{ref:T,className:oo({size:d,isInvalid:m||!!u,isDisabled:b,isFocusWithin:Pe||W.isOpen,className:"w-full cursor-pointer"}),"aria-label":e||l||"Autocomplete",style:{position:"relative"},children:[$?jsxRuntime.jsx("div",{className:"absolute left-3",children:$(!!q?.isLoading)}):jsxRuntime.jsx(f,{name:"MagnifyingGlass",className:`${xa[d]} absolute left-3 text-inherit`}),jsxRuntime.jsx(reactAriaComponents.Input,{className:`flex-1 min-w-0 border-none pr-3 outline-0 placeholder:text-text-placeholder ${ga[d]} ${me} ${Fe} ${b?"bg-background-muted":"bg-background-input"}`,placeholder:l,disabled:b,onFocus:()=>se(true),onBlur:()=>se(false)}),X&&!b&&jsxRuntime.jsx(ha,{}),jsxRuntime.jsx(reactAriaComponents.Button,{className:`px-2 text-text-body ${me} ${Fe} ${b?"bg-background-muted":"bg-background-input"}`,"aria-label":"Toggle menu",isDisabled:b,children:({isPressed:A})=>jsxRuntime.jsx(f,{name:A?"CaretUp":"CaretDown",className:"h-4 w-4"})})]}),S?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:h&&E?jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text",children:E}):h&&typeof u=="string"?jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text",children:u}):h&&typeof u=="function"&&P?jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text",children:u(P)}):c?jsxRuntime.jsx(N,{size:d,children:c}):null}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[c&&jsxRuntime.jsx(N,{size:d,className:"mt-1",children:c}),h&&E&&jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text mt-1",children:E}),h&&typeof u=="string"&&jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text mt-1",children:u}),h&&typeof u=="function"&&P&&jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text mt-1",children:u(P)})]}),jsxRuntime.jsx(Ne,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm ring-1 ring-black/5 rounded-[var(--control-border-radius)]",style:{minWidth:k?`${k}px`:void 0},children:jsxRuntime.jsx(reactAriaComponents.ListBox,{className:`max-h-[300px] overflow-auto bg-background-input outline-none ${me}`,children:t?t.map(A=>{let ee=A.items.map(ae=>jsxRuntime.jsx(Se,{id:ae.id,textValue:ae.name,size:d,className:`flex cursor-default items-center gap-2 px-3 ${po[d]} text-text-body outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium`,children:F?F(ae):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ae.name,jsxRuntime.jsx(f,{name:"X",className:"ml-auto h-4 w-4 text-text-muted opacity-0 data-[focused]:opacity-100 data-[selected]:opacity-100"})]})},ae.id));if(L){let ae=L(A,ee);return pe__namespace.default.isValidElement(ae)&&ae.type===reactAriaComponents.ListBoxSection?ae:jsxRuntime.jsx(reactAriaComponents.ListBoxSection,{children:ae},A.name)}return jsxRuntime.jsxs(reactAriaComponents.ListBoxSection,{children:[jsxRuntime.jsx(reactAriaComponents.Header,{className:"px-3 py-1 text-sm font-bold text-text-muted",children:A.name}),ee]},A.name)}):A=>jsxRuntime.jsx(Se,{id:A.id,textValue:A.name,size:d,className:`flex cursor-default items-center gap-2 px-3 ${po[d]} text-text-body outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium`,children:F?F(A):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[A.name,jsxRuntime.jsx(f,{name:"X",className:"ml-auto h-4 w-4 text-text-muted opacity-0 data-[focused]:opacity-100 data-[selected]:opacity-100"})]})},A.id)})})]})})}function I(e,o){let t=o.split("."),r=e;for(let n of t)if(r&&typeof r=="object"&&n in r)r=r[n];else {r=void 0;break}let a=r?.message;return typeof a=="string"?a:void 0}function cd({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(ht,{...t,selectedKey:i.value??null,onSelectionChange:s=>i.onChange(s),showErrors:!!n,errorMessage:n})})}function go(e){return jsxRuntime.jsxs(reactAriaComponents.CheckboxGroup,{...e,className:z(e.className,"flex flex-col gap-2"),children:[jsxRuntime.jsx(M,{children:e.label}),e.children,e.description&&jsxRuntime.jsx(N,{children:e.description}),jsxRuntime.jsx(p,{children:typeof e.errorMessage=="function"?void 0:e.errorMessage})]})}function wa({isDisabled:e}){return `flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-caption"}`}function ka({isSelected:e,isInvalid:o,isDisabled:t,isIndeterminate:r,variant:a="default"}){let n="w-5 h-5 flex-shrink-0 rounded-[var(--control-border-radius)] flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2",i=a==="brand"?"focus:ring-action-brand":"focus:ring-action-default",s="";if(t)s="border-border-muted bg-background-muted";else if(o)s="border-feedback-error-border bg-feedback-error-background";else if(e||r){let l=a==="brand"?"action-brand":"action-default";s=`bg-${l} border-${l} hover:bg-${l}-hover hover:border-${l}-hover`;}else s="bg-background-input border-border-input hover:border-border-focus";return `${n} ${i} ${s}`}var xo="w-4 h-4 text-text-onPrimary group-disabled:text-text-disabled";function ho(e){let{children:o,variant:t="default",...r}=e;return jsxRuntime.jsx(reactAriaComponents.Checkbox,{...r,className:reactAriaComponents.composeRenderProps(e.className,(a,n)=>`${wa(n)} ${a||""}`),children:a=>{let{isSelected:n,isIndeterminate:i,...s}=a,l=jsxRuntime.jsx("div",{className:ka({isSelected:n,isIndeterminate:i,variant:t,...s}),children:i?jsxRuntime.jsx(lucideReact.Minus,{"aria-hidden":true,className:xo}):n?jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":true,className:xo}):null});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l,typeof o=="function"?o(a):o]})}})}function Td({name:e,defaultValue:o,errorBelow:t=false,...r}){let{control:a,formState:n}=reactHookForm.useFormContext(),i=I(n.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:a,name:e,defaultValue:o,render:({field:s})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(ho,{...r,isSelected:!!s.value,onChange:l=>s.onChange(l),"aria-invalid":!!i,children:r.children}),t&&i&&jsxRuntime.jsx(p,{children:i})]})})}function Vd({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(go,{...t,value:i.value||[],onChange:s=>i.onChange(s),errorMessage:n,children:t.children})})}function we(e){if(!e)return false;let o=e.startsWith("#")?e.slice(1):e;return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(o)}function Pt(e){if(!e)return "";let o=e.startsWith("#")?e.slice(1):e;return o.length===3&&(o=o.split("").map(t=>t+t).join("")),`#${o.toUpperCase()}`}function Fo({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,transparent:i,className:s,validationResult:l,value:u,defaultValue:c,onChange:d,placeholder:x="#000000",showColorSwatch:y=true,reserveErrorSpace:b=true,...m}){let[P,h]=pe.useState(c||""),[F,$]=pe.useState(u||c||""),[L,g]=pe.useState(false),[S,T]=pe.useState(null),{isFocused:k,handleFocus:Q,handleBlur:X}=de(),O=u!==void 0?u:P;pe.useEffect(()=>{u!==void 0&&$(u);},[u]);let Pe=O?!we(O):false,se=pe.useCallback(E=>{if($(E),we(E)){let C=Pt(E);d?d(C):h(C);}else E===""&&(d?d(""):h(""));},[d]),le=pe.useCallback(E=>{let C=Pt(E);$(C),d?d(C):h(C);},[d]),ue=pe.useCallback(E=>{if(we(F)){let C=Pt(F);$(C),d&&C!==O?d(C):!d&&C!==P&&h(C);}X(E,m.onBlur);},[F,O,P,d,X,m.onBlur]);return jsxRuntime.jsx(reactAriaComponents.TextField,{...m,isRequired:n,className:z(s,"group flex flex-col"),children:({isDisabled:E})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(M,{size:r,tooltip:a,isRequired:n,children:e}),jsxRuntime.jsx(Y,{children:jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 relative",children:[jsxRuntime.jsx(qe,{size:r,disabled:E,type:"text",value:F,placeholder:x,onFocus:C=>Q(C,m.onFocus),onBlur:ue,onChange:C=>se(C.target.value),className:tailwindMerge.twMerge(oe({isInvalid:Pe,isDisabled:E,isFocused:k,size:r,transparent:i}),y?"pr-12":"pr-3","pl-3")}),y&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none",style:{width:B[r].height},children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-6 h-6 rounded border shadow-sm",we(O)?"border-border-default":"border-border-default bg-background-muted"),style:we(O)?{backgroundColor:O}:void 0,"aria-hidden":"true",children:!we(O)&&jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full border-2 border-border-muted"})})})})]}),jsxRuntime.jsx("div",{ref:T,children:jsxRuntime.jsx(v,{variant:"secondary",size:r,icon:"Palette",onPress:()=>g(!L),isDisabled:E,className:"flex-shrink-0",children:"Pick"})})]})}),b?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&l?jsxRuntime.jsx(p,{size:r,children:t(l)}):o?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&l?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(l)}):o?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null}),L&&S&&jsxRuntime.jsx(Ne,{triggerRef:{current:S},isOpen:L,onOpenChange:g,placement:"bottom end",className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-lg p-4",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:O||"#000000",onChange:le,style:{width:"200px",height:"200px"}}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded border border-border-default shadow-sm flex-shrink-0",style:{backgroundColor:O||"#000000"}}),jsxRuntime.jsx("div",{className:"flex-1 text-text-body text-[length:var(--control-text-sm)] font-mono",children:O||"#000000"})]})]})})]})})}function Yd({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(Fo,{...t,value:i.value??"",onChange:s=>i.onChange(s),isInvalid:!!n,errorMessage:n})})}function Ya({isSelected:e,isDisabled:o}){let t=[fe,"w-9 h-9 text-sm cursor-default rounded-sm flex items-center justify-center forced-color-adjust-none font-semibold"];return o?t.push("text-text-disabled forced-colors:text-[GrayText]"):e?t.push("bg-action-default text-text-onPrimary invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):t.push("text-text-body hover:bg-background-hover pressed:bg-background-selected"),t.join(" ")}function Ct({errorMessage:e,...o}){return jsxRuntime.jsxs(reactAriaComponents.Calendar,{...o,children:[jsxRuntime.jsx(Ro,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(So,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:t=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:t,className:({isSelected:r,isDisabled:a})=>`${Ya({isSelected:r,isDisabled:a})} border-0`})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}function Ro(){let{direction:e}=reactAriaComponents.useLocale(),o=18;return jsxRuntime.jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsxRuntime.jsx(v,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsxRuntime.jsx(f,{name:"CaretRight","aria-hidden":true,size:o}):jsxRuntime.jsx(f,{name:"CaretLeft","aria-hidden":true,size:o})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-zinc-900 dark:text-zinc-200"}),jsxRuntime.jsx(v,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsxRuntime.jsx(f,{name:"CaretLeft","aria-hidden":true,size:o}):jsxRuntime.jsx(f,{name:"CaretRight","aria-hidden":true,size:o})})]})}function So(){return jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:e=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:"text-xs font-semibold text-text-caption",children:e})})}function St({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,isDisabled:i,isInvalid:s,showCalendar:l=true,reserveErrorSpace:u=true,validationResult:c,className:d,...x}){let[y,b]=pe.useState(false),m=P=>{x.onChange&&P&&x.onChange(P),b(false);};return jsxRuntime.jsxs(reactAriaComponents.DateField,{...x,isDisabled:i,isRequired:n,isInvalid:s,className:z(d,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(M,{size:r,tooltip:a,isRequired:n,children:e}),jsxRuntime.jsx(Y,{children:jsxRuntime.jsxs("div",{className:"relative w-full",children:[jsxRuntime.jsx(To,{size:r,isDisabled:i,isInvalid:s,hasCalendar:l}),l&&!i&&jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:y,onOpenChange:b,children:[jsxRuntime.jsx(v,{variant:"unstyled",className:"absolute right-2 top-1/2 -translate-y-1/2 flex h-8 w-8 items-center justify-center rounded hover:bg-background-hover text-text-muted hover:text-text-body transition-colors","aria-label":"Open calendar",children:jsxRuntime.jsx(f,{name:"Calendar",size:18})}),jsxRuntime.jsx(reactAriaComponents.Popover,{className:"bg-background-surface rounded-lg border border-border-default shadow-xl",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"p-4 outline-none",children:jsxRuntime.jsx(Ct,{value:x.value,onChange:m,minValue:x.minValue,maxValue:x.maxValue,isDisabled:i,isReadOnly:x.isReadOnly,isDateUnavailable:x.isDateUnavailable})})})]})]})}),u?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&c?jsxRuntime.jsx(p,{size:r,children:t(c)}):o?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&c?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(c)}):o?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})}function nn({isPlaceholder:e,isDisabled:o,size:t="md"}){return tailwindMerge.twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[t],e?"text-text-placeholder italic":"text-text-body",o?"text-text-disabled cursor-not-allowed":"cursor-text",!o&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-body")}function To({size:e="md",isDisabled:o,isInvalid:t,hasCalendar:r,className:a,...n}){return jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(Re({isInvalid:t,isDisabled:o}),"px-3 py-2 flex items-center gap-0.5 w-full",r&&"pr-10",a),...n,children:i=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:i,className:nn({isPlaceholder:i.isPlaceholder,isDisabled:!i.isEditable||o,size:e})})})}function Ic({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(St,{...t,value:i.value??null,onChange:s=>i.onChange(s),isInvalid:!!n,errorMessage:n})})}function Nt({value:e,onChange:o,onUrlChange:t,accept:r="image/*",maxSize:a,isDisabled:n=false,onUpload:i,className:s,showPreview:l=true,placeholder:u="Drop files here or click to browse"}){let[c,d]=pe.useState(false),[x,y]=pe.useState(false),[b,m]=pe.useState(null),[P,h]=pe.useState(e),F=pe.useRef(null),$=async S=>{if(m(null),a&&S.size>a){m(`File size must be less than ${(a/1024/1024).toFixed(2)}MB`);return}if(l&&S.type.startsWith("image/")){let T=new FileReader;T.onloadend=()=>{h(T.result);},T.readAsDataURL(S);}if(i){y(true);try{let T=await i(S);h(T),t?.(T);}catch(T){m("Failed to upload file"),console.error("Upload error:",T);}finally{y(false);}}o?.(S,P);},L=S=>{let T=S.items;if(T.length>0){let k=T[0];if(k.kind==="file"){let Q=k.getAsFile();Q&&$(Q);}}d(false);},g=()=>{h(void 0),m(null),o?.(null),t?.(""),F.current&&(F.current.value="");};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",s),children:[jsxRuntime.jsxs(reactAriaComponents.DropZone,{className:tailwindMerge.twMerge("relative flex min-h-[200px] w-full flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",c?"border-action-brand bg-action-brand/5":"border-border-muted hover:border-border-default",n&&"pointer-events-none opacity-50",b&&"border-feedback-error-border bg-feedback-error-background/50"),onDrop:L,onDropEnter:()=>d(true),onDropExit:()=>d(false),children:[P?jsxRuntime.jsxs("div",{className:"relative flex h-full w-full items-center justify-center p-4",children:[l&&P.startsWith("data:image")?jsxRuntime.jsx("img",{src:P,alt:"Preview",className:"max-h-48 max-w-full rounded-md object-contain"}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-12 w-12 text-text-muted"}),jsxRuntime.jsx("span",{className:"text-sm text-text-muted",children:"File uploaded"})]}),!n&&jsxRuntime.jsx(v,{variant:"icon",size:"sm",onPress:g,className:"absolute right-2 top-2 bg-background-surface shadow-md",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[jsxRuntime.jsx(lucideReact.Upload,{className:"h-12 w-12 text-text-muted"}),jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("p",{className:"text-sm text-text-body",children:u}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-text-muted",children:r==="image/*"?"PNG, JPG, GIF up to 10MB":`Accepts ${r}`})]}),jsxRuntime.jsx(reactAriaComponents.FileTrigger,{acceptedFileTypes:r.split(","),onSelect:S=>{let T=Array.from(S||[]);T.length>0&&$(T[0]);},children:jsxRuntime.jsx(v,{variant:"secondary",size:"sm",isDisabled:n,children:"Choose File"})})]}),x&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-lg bg-background-surface/80",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-action-brand border-t-transparent"}),jsxRuntime.jsx("span",{className:"text-sm text-text-muted",children:"Uploading..."})]})})]}),b&&jsxRuntime.jsx("p",{className:"mt-2 text-sm text-feedback-error-text",children:b})]})}function Kc({name:e,defaultValue:o,errorBelow:t=true,...r}){let{control:a,formState:n}=reactHookForm.useFormContext(),i=I(n.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:a,name:e,defaultValue:o,render:({field:s})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(Nt,{...r,value:s.value??"",onChange:(l,u)=>s.onChange(u||"")}),t&&i&&jsxRuntime.jsx(p,{children:i})]})})}var Rn=e=>{let o=oe({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return tailwindMerge.twMerge(o,"pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className)};function kt({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,transparent:i,validationResult:s,reserveErrorSpace:l=true,descriptionPlacement:u="below",...c}){let d=pe.useId(),{isFocused:x,handleFocus:y,handleBlur:b}=de();return jsxRuntime.jsx(reactAriaComponents.NumberField,{...c,id:d,isRequired:n,className:z(c.className,"group flex flex-col gap-1"),step:c.step??1,onChange:m=>{typeof m=="number"&&(c.maxValue!=null&&m>c.maxValue?c.onChange?.(c.maxValue):c.minValue!=null&&m<c.minValue?c.onChange?.(c.minValue):c.onChange?.(m));},isInvalid:!!t||typeof c.value=="number"&&(c.maxValue!=null&&c.value>c.maxValue||c.minValue!=null&&c.value<c.minValue),children:({isDisabled:m,isInvalid:P})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[e&&jsxRuntime.jsx(M,{size:r,tooltip:a,description:u==="tooltip"||u==="inline"?o:void 0,descriptionPlacement:u,isRequired:n,htmlFor:d,children:e}),jsxRuntime.jsx("div",{className:"relative",children:jsxRuntime.jsxs(reactAriaComponents.Group,{className:"relative",children:[jsxRuntime.jsx(reactAriaComponents.Input,{onFocus:F=>y(F,c.onFocus),onBlur:F=>b(F,c.onBlur),className:Rn({isInvalid:P||!!t,isDisabled:m,isFocused:x,transparent:i,size:r,className:typeof c.className=="string"?c.className:void 0})}),jsxRuntime.jsxs("div",{className:"absolute inset-y-[2px] right-[2px] flex flex-col divide-y divide-border-default border-l border-border-default overflow-hidden rounded-r-[calc(var(--control-border-radius)-2px)]",children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"increment",isDisabled:m,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(f,{name:"CaretUp",size:14})}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"decrement",isDisabled:m,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(f,{name:"CaretDown",size:14})})]})]})}),l?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:t?jsxRuntime.jsx(p,{size:r,children:typeof t=="function"?t(s):t}):o&&u==="below"?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:t?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:typeof t=="function"?t(s):t}):o&&u==="below"?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})})}function uu({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(kt,{...t,value:typeof i.value=="number"?i.value:void 0,onChange:s=>i.onChange(s),isInvalid:!!n,errorMessage:n,isRequired:t.isRequired})})}var In=pe.createContext({variant:"brand"});function It(e){let{variant:o="default",...t}=e;return jsxRuntime.jsx(In.Provider,{value:{variant:o},children:jsxRuntime.jsxs(reactAriaComponents.RadioGroup,{...t,className:z(e.className,"group flex flex-col gap-2"),children:[jsxRuntime.jsx(M,{children:e.label}),jsxRuntime.jsx("div",{className:"flex gap-2 group-orientation-horizontal:gap-4 group-orientation-vertical:flex-col",children:e.children}),e.description&&jsxRuntime.jsx(N,{children:e.description}),jsxRuntime.jsx(p,{children:typeof e.errorMessage=="function"&&e.validationResult?e.errorMessage(e.validationResult):typeof e.errorMessage=="string"?e.errorMessage:null})]})})}function Bu({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(It,{...t,value:i.value,onChange:s=>i.onChange(s),errorMessage:n,children:t.children})})}var En={xs:"text-lg font-semibold",sm:"text-xl font-semibold",md:"text-2xl font-semibold",lg:"text-3xl font-semibold",xl:"text-4xl font-semibold"},Dn={page:"h-16 leading-[62px]"};function Ae({tag:e="h1",size:o="lg",height:t,className:r="",children:a}){let n=En[o],i=t?Dn[t]:"";return jsxRuntime.jsx(e,{className:tailwindMerge.twMerge(n,i,r),children:a})}var $t=({title:e,onClose:o,hideCloseIcon:t=false,titleAlign:r="left",hasBackArrow:a=false,onBack:n,headerContent:i})=>jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex h-16 w-full flex-shrink-0 items-center justify-between border-b px-6",e&&"border-b",r==="center"?"justify-center":""),children:[a&&jsxRuntime.jsx(v,{variant:"icon",onPress:n,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(f,{name:"CaretLeft","data-testid":"back-arrow"})}),i||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(Ae,{size:"xs",children:e}),o&&!t&&jsxRuntime.jsx(v,{variant:"icon",onPress:o,"aria-label":"Close dialog",children:jsxRuntime.jsx(f,{name:"X","data-testid":"close-button"})})]})]});var Bt=({className:e,size:o=24,color:t="text-action-brand"})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",t,e),style:{width:o,height:o},role:"status","aria-label":"loading",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Loading..."})});var _n=e=>{let o=oe({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),t=[e.showSearchIcon?"pl-8":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return tailwindMerge.twMerge(o,t,e.className)};function Me({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,transparent:i,showSearchIcon:s,isClearable:l,onClear:u,type:c,validationResult:d,reserveErrorSpace:x=true,isLoading:y=false,descriptionPlacement:b="below",...m}){let[P,h]=pe__namespace.default.useState(false),{isFocused:F,handleFocus:$,handleBlur:L}=de(),g=c==="password";return jsxRuntime.jsx(reactAriaComponents.TextField,{...m,isRequired:n,className:z(m.className,"group flex flex-col"),children:({isDisabled:S,isInvalid:T})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(M,{size:r,tooltip:a,description:b==="tooltip"||b==="inline"?o:void 0,descriptionPlacement:b,isRequired:n,children:e}),jsxRuntime.jsxs(Y,{children:[s&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 transform flex items-center",children:y?jsxRuntime.jsx(Bt,{size:16,color:"text-text-muted"}):jsxRuntime.jsx(f,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-muted translate-y-[0.5px]"})}),jsxRuntime.jsx(qe,{size:r,disabled:S,type:g?P?"text":"password":c,value:m.value,defaultValue:m.defaultValue,placeholder:m.placeholder,onFocus:k=>$(k,m.onFocus),onBlur:k=>L(k,m.onBlur),onChange:k=>m.onChange?.(k.target.value),className:_n({isInvalid:T,isDisabled:S,isFocused:F,size:r,transparent:i,showSearchIcon:s,isClearable:l,hasValue:!!m.value,isPassword:g,className:typeof m.className=="string"?m.className:void 0})}),l&&m.value&&!S&&jsxRuntime.jsx(eo,{onClick:()=>{u?u():m.onChange&&m.onChange("");},size:r}),g&&!S&&jsxRuntime.jsx("button",{type:"button",onClick:()=>h(!P),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body","aria-label":P?"Hide password":"Show password",onMouseDown:k=>{k.preventDefault(),k.stopPropagation();},children:jsxRuntime.jsx(f,{name:P?"EyeSlash":"Eye",size:r==="sm"?16:20,className:"text-text-body"})})]}),x?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&d?jsxRuntime.jsx(p,{size:r,children:t(d)}):o&&b==="below"?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&d?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(d)}):o&&b==="below"?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})})}var he=({isActive:e=false,onPress:o,children:t})=>jsxRuntime.jsx(v,{variant:e?"secondary":"ghost",size:"sm",onPress:o,className:"p-1",children:t});function ei({initialUrl:e,isOpen:o,onClose:t,onSubmit:r}){let[a,n]=pe.useState(e);return pe__namespace.default.useEffect(()=>{n(e);},[e]),jsxRuntime.jsx(Ve,{isDismissable:true,isOpen:o,onOpenChange:s=>!s&&t(),children:jsxRuntime.jsx(reactAriaComponents.Modal,{isDismissable:true,className:"flex items-center justify-center p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"relative bg-background-surface rounded-lg shadow-xl max-w-md w-full",children:jsxRuntime.jsxs("form",{onSubmit:s=>{s.preventDefault(),r(a),t();},children:[jsxRuntime.jsx($t,{title:"Insert Link",onClose:t}),jsxRuntime.jsx("div",{className:"p-6",children:jsxRuntime.jsx(Me,{label:"URL",type:"url",value:a,onChange:n,autoFocus:true,className:"w-full"})}),jsxRuntime.jsxs("div",{className:"flex justify-end gap-2 border-t border-border-muted p-4",children:[jsxRuntime.jsx(v,{variant:"secondary",onPress:t,children:"Cancel"}),jsxRuntime.jsx(v,{type:"submit",children:"Save"})]})]})})})})}function Lt({initialContent:e="",onChange:o,className:t,isDisabled:r=false,placeholder:a="Start typing...",id:n}){let[i,s]=pe.useState(false),l=react.useEditor({immediatelyRender:false,extensions:[Xn__default.default.configure({heading:{levels:[1,2]}}),Kn__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-text-link-default hover:text-text-link-hover underline decoration-text-link-default/30 hover:decoration-text-link-hover cursor-pointer"}})],content:e,editable:!r,onUpdate:({editor:d})=>{o?.(d.getHTML());},editorProps:{attributes:{class:tailwindMerge.twMerge("prose prose-sm max-w-none","focus:outline-none","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0")}}}),u=()=>{s(true);},c=d=>{d===""?l?.chain().focus().unsetLink().run():l?.chain().focus().setLink({href:d}).run();};return l?jsxRuntime.jsxs("div",{id:n,"data-richtexteditor":true,className:tailwindMerge.twMerge("flex flex-col rounded-md border border-border-input bg-background-input","outline-none focus-within:outline-none focus-within:border-border-input focus-within:ring-0 focus-within:shadow-none",r&&"opacity-50",t),style:{outline:"none"},children:[l&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(menus.BubbleMenu,{editor:l,shouldShow:({editor:d})=>d.isActive("link")&&!i,className:"flex items-center gap-1 rounded-md border border-border-input bg-background-surface p-1 shadow-md",children:[jsxRuntime.jsxs(v,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>{let d=l.getAttributes("link").href;window.open(d,"_blank");},children:[jsxRuntime.jsx(f,{name:"ArrowSquareOut",className:"mr-1 h-4 w-4"}),"Open"]}),jsxRuntime.jsxs(v,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:u,children:[jsxRuntime.jsx(f,{name:"PencilSimple",className:"mr-1 h-4 w-4"}),"Edit"]}),jsxRuntime.jsxs(v,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>l.chain().focus().unsetLink().run(),children:[jsxRuntime.jsx(f,{name:"X",className:"mr-1 h-4 w-4"}),"Remove"]})]}),jsxRuntime.jsx(ei,{isOpen:i,onClose:()=>s(false),onSubmit:c,initialUrl:l.getAttributes("link").href||""})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1 border-b border-border-input p-2",children:[jsxRuntime.jsx(he,{isActive:l.isActive("heading",{level:1}),onPress:()=>l.chain().focus().toggleHeading({level:1}).run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"H1"})}),jsxRuntime.jsx(he,{isActive:l.isActive("heading",{level:2}),onPress:()=>l.chain().focus().toggleHeading({level:2}).run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"H2"})}),jsxRuntime.jsx(he,{isActive:l.isActive("bold"),onPress:()=>l.chain().focus().toggleBold().run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"B"})}),jsxRuntime.jsx(he,{isActive:l.isActive("italic"),onPress:()=>l.chain().focus().toggleItalic().run(),children:jsxRuntime.jsx("span",{className:"text-xs italic",children:"I"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(he,{isActive:l.isActive("bulletList"),onPress:()=>l.chain().focus().toggleBulletList().run(),children:jsxRuntime.jsx(f,{name:"ListBullets",className:"h-4 w-4"})}),jsxRuntime.jsx(he,{isActive:l.isActive("orderedList"),onPress:()=>l.chain().focus().toggleOrderedList().run(),children:jsxRuntime.jsx(f,{name:"ListNumbers",className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(he,{isActive:l.isActive("link"),onPress:u,children:jsxRuntime.jsx(f,{name:"PaperclipHorizontal",className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:"relative min-h-[200px] w-full outline-none focus:outline-none",children:[jsxRuntime.jsx(react.EditorContent,{editor:l,className:tailwindMerge.twMerge("w-full p-4 outline-none focus:outline-none","[&_.ProseMirror]:min-h-[inherit]","[&_.ProseMirror]:outline-none [&_.ProseMirror]:focus:outline-none","[&_.ProseMirror_h1]:mb-4 [&_.ProseMirror_h1]:text-2xl [&_.ProseMirror_h1]:font-bold","[&_.ProseMirror_h2]:mb-3 [&_.ProseMirror_h2]:text-xl [&_.ProseMirror_h2]:font-semibold","[&_.ProseMirror_p]:mb-2","[&_.ProseMirror_ul]:mb-2 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ul]:list-disc","[&_.ProseMirror_ol]:mb-2 [&_.ProseMirror_ol]:ml-6 [&_.ProseMirror_ol]:list-decimal","[&_.ProseMirror_li]:mb-1","[&_.ProseMirror_blockquote]:border-l-4 [&_.ProseMirror_blockquote]:border-border-muted [&_.ProseMirror_blockquote]:pl-4 [&_.ProseMirror_blockquote]:italic","[&_.ProseMirror_code]:rounded [&_.ProseMirror_code]:bg-background-muted [&_.ProseMirror_code]:px-1 [&_.ProseMirror_code]:py-0.5 [&_.ProseMirror_code]:font-mono [&_.ProseMirror_code]:text-sm","[&_.ProseMirror_pre]:rounded-md [&_.ProseMirror_pre]:bg-background-muted [&_.ProseMirror_pre]:p-3 [&_.ProseMirror_pre]:font-mono [&_.ProseMirror_pre]:text-sm","[&_.ProseMirror_hr]:border-border-muted",r&&"pointer-events-none")}),l.isEmpty&&!r&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-4 top-4 text-text-muted",children:a})]})]}):null}function Im({name:e,defaultValue:o,label:t,description:r,reserveErrorSpace:a=true,...n}){let{control:i,formState:s}=reactHookForm.useFormContext(),l=I(s.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:i,name:e,defaultValue:o,render:({field:u})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[t&&jsxRuntime.jsx("label",{htmlFor:e,className:"text-sm font-medium text-text-heading",children:t}),r&&jsxRuntime.jsx("p",{className:"text-sm text-text-muted",children:r}),jsxRuntime.jsx(Lt,{...n,id:e,initialContent:u.value??"",onChange:c=>u.onChange(c)}),l&&jsxRuntime.jsx("p",{className:"text-sm text-feedback-error-text",children:l}),a&&!l&&jsxRuntime.jsx("div",{className:"h-5"})]})})}function Mm({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(mt,{...t,selectedKey:i.value??null,onSelectionChange:s=>i.onChange(s),showErrors:!!n,errorMessage:n})})}var Dt={sm:{track:"h-4 w-7",handle:"h-3.5 w-3.5",text:"text-xs"},md:{track:"h-5 w-9",handle:"h-4 w-4",text:"text-sm"},lg:{track:"h-6 w-11",handle:"h-5 w-5",text:"text-base"},xl:{track:"h-7 w-14",handle:"h-6 w-6",text:"text-lg"}};function li({isSelected:e,isDisabled:o,variant:t="default",size:r="md"}){let a="flex px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",n=Dt[r].track,i=fe,s=t==="brand"?"focus-visible:outline-action-brand":"focus-visible:outline-action-default",l="";return e?t==="brand"?l="bg-action-brand forced-colors:!bg-[Highlight] group-pressed:bg-action-brand-hover":l="bg-action-default forced-colors:!bg-[Highlight] group-pressed:bg-action-default-hover":l="bg-gray-400 dark:bg-zinc-400 group-pressed:bg-gray-500 dark:group-pressed:bg-zinc-300",[a,n,i,s,l,o?"bg-gray-200 dark:bg-zinc-700 forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function di({isSelected:e,isDisabled:o,size:t="md"}){let r="transform rounded-full bg-white dark:bg-zinc-900 outline-none shadow transition duration-200 ease-in-out",a=Dt[t].handle;return [r,a,e?"translate-x-[100%]":"translate-x-0",o?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function At({children:e,variant:o="default",size:t="md",...r}){return jsxRuntime.jsx(reactAriaComponents.Switch,{...r,className:z(r.className,`group flex items-center gap-2 ${Dt[t].text} text-gray-800 transition disabled:text-gray-300 dark:text-zinc-200 dark:disabled:text-zinc-600 forced-colors:disabled:text-[GrayText]`),children:a=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:li({...a,variant:o,size:t}),children:jsxRuntime.jsx("span",{className:di({...a,size:t})})}),e]})})}function Ym({name:e,defaultValue:o,...t}){let{control:r}=reactHookForm.useFormContext();return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:a})=>jsxRuntime.jsx(At,{...t,isSelected:!!a.value,onChange:n=>a.onChange(n),children:t.children})})}var bi=e=>{let o=oe({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),t=`min-h-[100px] py-2 ${e.isDisabled?"resize-none":e.isResizable?"resize-y":"resize-none"}`;return tailwindMerge.twMerge(o,t,e.className)};function zt({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,required:n,transparent:i,isInvalid:s,isDisabled:l,isResizable:u=false,className:c,validationResult:d,reserveErrorSpace:x=true,...y}){let{isFocused:b,handleFocus:m,handleBlur:P}=de();return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(M,{size:r,tooltip:a,isRequired:n,children:e}),jsxRuntime.jsx(Y,{children:jsxRuntime.jsx("textarea",{...y,required:n,onFocus:h=>{y.onFocus&&y.onFocus(h),m(h);},onBlur:h=>{y.onBlur&&y.onBlur(h),P(h);},className:bi({isInvalid:s,isDisabled:l,isResizable:u,isFocused:b,size:r,transparent:i,className:c}),disabled:l})}),x?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&d?jsxRuntime.jsx(p,{size:r,children:t(d)}):o?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&d?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(d)}):o?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})})}function cp({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(zt,{...t,value:i.value??"",onChange:s=>i.onChange(s.target.value),onBlur:s=>{i.onBlur(),t.onBlur?.(s);},isInvalid:!!n,errorMessage:n,required:t.required})})}function xp({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(Me,{...t,value:i.value??"",onChange:s=>i.onChange(s),onBlur:s=>{i.onBlur(),t.onBlur?.(s);},isInvalid:!!n,errorMessage:n,isRequired:t.isRequired})})}function Si({isPlaceholder:e,isDisabled:o,size:t="md"}){return tailwindMerge.twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[t],e?"text-text-placeholder italic":"text-text-body",o?"text-text-disabled cursor-not-allowed":"cursor-text",!o&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-body")}function Mt({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,isDisabled:i,isInvalid:s,reserveErrorSpace:l=true,validationResult:u,className:c,descriptionPlacement:d="below",...x}){return jsxRuntime.jsxs(reactAriaComponents.TimeField,{...x,isDisabled:i,isRequired:n,isInvalid:s,className:z(c,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(M,{size:r,tooltip:a,description:d==="tooltip"||d==="inline"?o:void 0,descriptionPlacement:d,isRequired:n,children:e}),jsxRuntime.jsx(Y,{children:jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(Re({isInvalid:s,isDisabled:i}),"px-3 py-2 flex items-center gap-0.5 w-full"),children:y=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:y,className:Si({isPlaceholder:y.isPlaceholder,isDisabled:!y.isEditable||i,size:r})})})}),l?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&u?jsxRuntime.jsx(p,{size:r,children:t(u)}):o&&d==="below"?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&u?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(u)}):o&&d==="below"?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})}function Dp({name:e,...o}){let{control:t,formState:{errors:r}}=reactHookForm.useFormContext(),a=r[e],n=a?.message;return jsxRuntime.jsx(reactHookForm.Controller,{name:e,control:t,render:({field:i})=>jsxRuntime.jsx(Mt,{...o,value:i.value,onChange:i.onChange,isInvalid:!!a,errorMessage:n})})}function Gp({className:e,title:o="Please fix the following errors:",autoFocus:t=true}){let{formState:r}=reactHookForm.useFormContext(),a=pe__namespace.useRef(null),n=r.errors,i=Object.entries(n||{}),s=i.length>0;if(pe__namespace.useEffect(()=>{t&&s&&a.current?.focus();},[t,s]),!s)return null;let l=u=>{let c=`[name="${CSS.escape(u)}"]`,d=document.querySelector(c);d&&(d.focus(),d.scrollIntoView({block:"center",behavior:"smooth"}));};return jsxRuntime.jsxs("div",{ref:a,role:"alert",tabIndex:-1,className:tailwindMerge.twMerge("rounded-md border border-feedback-error-border bg-feedback-error-background p-3 text-sm text-feedback-error-text",e),children:[jsxRuntime.jsx("div",{className:"font-medium",children:o}),jsxRuntime.jsx("ul",{className:"mt-2 list-disc pl-5",children:i.map(([u,c])=>{let d=c?.message||"Invalid value";return jsxRuntime.jsx("li",{children:jsxRuntime.jsx("button",{type:"button",className:"underline underline-offset-2",onClick:()=>l(u),children:d})},u)})})]})}function Kp({formId:e,disableWhenInvalid:o,disableWhenPristine:t,isDisabled:r,children:a,...n}){let{formState:i}=reactHookForm.useFormContext(),s=r||i.isSubmitting||o&&!i.isValid||t&&!i.isDirty;return jsxRuntime.jsx(v,{type:"submit",form:e,isDisabled:s,...n,children:a})}var re=({width:e,height:o,variant:t="rect",animation:r="pulse",gradient:a=false,flex:n=false,stack:i,responsive:s,delay:l=0,adjustAnimationSpeedBasedOnWidth:u=false,ariaLabel:c,className:d,"data-testid":x})=>{let[y,b]=pe.useState(l===0);if(pe.useEffect(()=>{if(l>0){let g=setTimeout(()=>b(true),l);return ()=>clearTimeout(g)}},[l]),!y)return null;let m=a?"bg-gradient-to-r from-[var(--color-skeleton-base)] via-[var(--color-skeleton-highlight)] to-[var(--color-skeleton-base)]":"bg-[var(--color-skeleton-base)]",P=u&&e?(()=>{let g=typeof e=="number"?e:parseFloat(String(e));return isNaN(g)?"":`animation-duration-[${Math.max(.8,g/100)}s]`})():"",h=r==="pulse"?`animate-pulse ${P}`:r==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--color-skeleton-wave)] before:to-transparent before:animate-wave ${P}`:"",F="rounded-sm";t==="circle"&&(F="rounded-full"),t==="text"&&(F="h-4 w-full rounded-sm");let $=n?"flex-1 min-w-0":"",L=s?Object.entries(s).map(([g,S])=>`${g}:w-[${S}]`).join(" "):"";return i?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":x,children:i.map((g,S)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(m,h,F,$,L,d),style:{width:g,height:o}},S))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(m,h,F,$,L,d),style:{width:e,height:o},role:"presentation","aria-hidden":!c,"aria-label":c??void 0,"data-testid":x})};var Ai={outlined:"bg-background-surface border border-border-default",elevated:"bg-background-surface border-0 shadow-md",filled:"bg-background-muted border-0",ghost:"bg-transparent border-0 shadow-none"},zi="rounded-lg",Gt={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},Mi={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function ve({variant:e="outlined",className:o,children:t,isLoading:r=false}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",Ai[e],zi,o),"data-testid":"card",children:r?jsxRuntime.jsx(re,{width:"100%",height:"100%",className:"rounded-none"}):t})}function Qe({title:e,subtitle:o,actions:t,className:r,isLoading:a=false}){return a?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",r),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx(re,{width:120,height:20}),jsxRuntime.jsx(re,{width:24,height:24})]}),o&&jsxRuntime.jsx(re,{width:200,height:16})]}):!e&&!o&&!t?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",r),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(Ae,{tag:"h3",size:"sm",className:"text-text-heading",children:e}):e}),o&&jsxRuntime.jsx("div",{className:"text-sm text-text-muted",children:o})]}),t&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:t})]})})}function _o({src:e,alt:o,aspectRatio:t="auto",className:r,children:a,isLoading:n=false}){return n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("bg-background-muted",Gt[t],r),children:jsxRuntime.jsx(re,{width:"100%",height:"100%"})}):a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Gt[t],r),children:a}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Gt[t],r),children:jsxRuntime.jsx("img",{src:e,alt:o||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function Xe({className:e,children:o,isLoading:t=false}){let a=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(a,e),children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(re,{width:"100%",height:16}),jsxRuntime.jsx(re,{width:"80%",height:16}),jsxRuntime.jsx(re,{width:"60%",height:16})]})}):o?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 text-text-body",e),children:o}):null}function Wo({className:e,children:o,align:t="end",isLoading:r=false}){return r?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("px-6 py-4 flex gap-2 justify-end",e),children:[jsxRuntime.jsx(re,{width:80,height:32}),jsxRuntime.jsx(re,{width:60,height:32})]}):o?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 flex items-center gap-2",Mi[t],e),children:o}):null}ve.Header=Qe;ve.Media=_o;ve.Content=Xe;ve.Footer=Wo;function uf({name:e,getItemTitle:o,renderItem:t,onAdd:r}){let{control:a}=reactHookForm.useFormContext(),{fields:n,append:i,remove:s,swap:l}=reactHookForm.useFieldArray({control:a,name:e});return jsxRuntime.jsxs("div",{className:"flex flex-col gap-3",children:[n.map((u,c)=>jsxRuntime.jsxs(ve,{children:[jsxRuntime.jsx(Qe,{title:o?o(c):`Item ${c+1}`,actions:jsxRuntime.jsxs("div",{className:"flex gap-2",children:[c>0&&jsxRuntime.jsx(v,{size:"sm",variant:"secondary",onPress:()=>l(c,c-1),children:"Up"}),c<n.length-1&&jsxRuntime.jsx(v,{size:"sm",variant:"secondary",onPress:()=>l(c,c+1),children:"Down"}),jsxRuntime.jsx(v,{size:"sm",variant:"secondary",onPress:()=>s(c),children:"Remove"})]})}),jsxRuntime.jsx(Xe,{children:t(c)})]},u.id)),jsxRuntime.jsx("div",{children:jsxRuntime.jsx(v,{variant:"secondary",onPress:()=>i(r?.()||{}),children:"Add item"})})]})}function qt(e){return jsxRuntime.jsx(reactAriaComponents.Form,{validationBehavior:"aria",...e,className:tailwindMerge.twMerge("flex flex-col gap-6",e.className)})}function Ko(e){let o=e.querySelector("[aria-invalid='true'], .aria-invalid, [data-invalid='true']")||e.querySelector("input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true']")||e.querySelector("input, select, textarea");o&&(o.focus({preventScroll:false}),o instanceof HTMLElement&&o.scrollIntoView({block:"center",behavior:"smooth"}));}function Sf({id:e,onSubmit:o,onInvalid:t,children:r,shouldFocusError:a=true,className:n,...i}){let s=reactHookForm.useForm(i),l=(u,c)=>{if(a&&e){let d=document.getElementById(e);d&&Ko(d);}t?.(u,c);};return jsxRuntime.jsx(reactHookForm.FormProvider,{...s,children:jsxRuntime.jsx(qt,{id:e,className:n,onSubmit:s.handleSubmit(o,l),children:r})})}function Qo({formId:e,show:o,isSubmitting:t,onCancel:r,primaryLabel:a="Save changes",secondaryLabel:n="Cancel",className:i}){return o?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("fixed inset-x-0 bottom-0 z-40 border-t border-border-muted bg-background-surface/95 backdrop-blur supports-[backdrop-filter]:bg-background-surface/70",i),children:jsxRuntime.jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsxRuntime.jsx("div",{className:"text-sm text-text-muted",children:"You have unsaved changes"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(v,{variant:"secondary",onPress:r,children:n}),jsxRuntime.jsx(v,{type:"submit",form:e,isDisabled:!!t,children:t?"Saving...":a})]})]})}):null}function Lf({formId:e,onCancel:o,primaryLabel:t,secondaryLabel:r,className:a}){let{formState:n}=reactHookForm.useFormContext();return jsxRuntime.jsx(Qo,{formId:e,show:n.isDirty,isSubmitting:n.isSubmitting,onCancel:o,primaryLabel:t,secondaryLabel:r,className:a})}function zf(e=true){let{formState:o}=reactHookForm.useFormContext();pe__namespace.useEffect(()=>{if(!e||!o.isSubmitted||!o.errors||Object.keys(o.errors).length===0)return;let t=document.querySelector("[aria-invalid='true'], .aria-invalid, [data-invalid='true']")||document.querySelector("input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true']");t&&t.scrollIntoView({block:"center",behavior:"smooth"});},[e,o.isSubmitted,o.errors]);}function Gf({delayMs:e=800,onAutoSave:o}){let{watch:t,formState:r,getValues:a}=reactHookForm.useFormContext(),n=pe__namespace.useRef(void 0);pe__namespace.useEffect(()=>{let i=t(()=>{r.isDirty&&(n.current&&window.clearTimeout(n.current),n.current=window.setTimeout(async()=>{let s=a();await o(s);},e));});return ()=>{i.unsubscribe(),n.current&&window.clearTimeout(n.current);}},[t,r.isDirty,a,e,o]);}exports.ErrorSummary=Gp;exports.FieldArrayList=uf;exports.FormAutocomplete=cd;exports.FormCheckbox=Td;exports.FormCheckboxGroup=Vd;exports.FormColorField=Yd;exports.FormDateField=Ic;exports.FormFileUpload=Kc;exports.FormNumberField=uu;exports.FormProvider=Sf;exports.FormRadioGroup=Bu;exports.FormRichTextEditor=Im;exports.FormSaveBar=Lf;exports.FormSelect=Mm;exports.FormSwitch=Ym;exports.FormTextArea=cp;exports.FormTextField=xp;exports.FormTimeField=Dp;exports.SubmitButton=Kp;exports.focusFirstError=Ko;exports.useAutoSave=Gf;exports.useScrollIntoViewOnError=zf;//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use strict';var reactHookForm=require('react-hook-form'),be=require('react'),reactAriaComponents=require('react-aria-components'),reactStately=require('react-stately'),tailwindMerge=require('tailwind-merge'),Rr=require('@phosphor-icons/react'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),reactColorful=require('react-colorful'),Un=require('@tiptap/extension-link'),react=require('@tiptap/react'),menus=require('@tiptap/react/menus'),Yn=require('@tiptap/starter-kit');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var be__namespace=/*#__PURE__*/_interopNamespace(be);var Rr__namespace=/*#__PURE__*/_interopNamespace(Rr);var Un__default=/*#__PURE__*/_interopDefault(Un);var Yn__default=/*#__PURE__*/_interopDefault(Yn);var Ge={prefix:String(Math.round(Math.random()*1e10)),current:0},Wt=be__namespace.default.createContext(Ge),or=be__namespace.default.createContext(false);var rr=!!(typeof window<"u"&&window.document&&window.document.createElement),et=new WeakMap;function ar(e=false){let o=be.useContext(Wt),t=be.useRef(null);if(t.current===null&&!e){var r,a;let n=(a=be__namespace.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=et.get(n);i==null?et.set(n,{id:o.current,state:n.memoizedState}):n.memoizedState!==i.state&&(o.current=i.id,et.delete(n));}t.current=++o.current;}return t.current}function nr(e){let o=be.useContext(Wt);o===Ge&&!rr&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let t=ar(!!e),r=o===Ge&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${o.prefix}`;return e||`${r}-${t}`}function ir(e){let o=be__namespace.default.useId(),[t]=be.useState(Oe()),r=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Ge.prefix}`;return e||`${r}-${o}`}typeof be__namespace.default.useId=="function"?ir:nr;function lr(){return false}function dr(){return true}function cr(e){return ()=>{}}function Oe(){return typeof be__namespace.default.useSyncExternalStore=="function"?be__namespace.default.useSyncExternalStore(cr,lr,dr):be.useContext(or)}var ur=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),mr=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function ot(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r=typeof t.getTextInfo=="function"?t.getTextInfo():t.textInfo;if(r)return r.direction==="rtl";if(t.script)return ur.has(t.script)}let o=e.split("-")[0];return mr.has(o)}var br=Symbol.for("react-aria.i18n.locale");function Ut(){let e=typeof window<"u"&&window[br]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e]);}catch{e="en-US";}return {locale:e,direction:ot(e)?"rtl":"ltr"}}var rt=Ut(),Be=new Set;function Kt(){rt=Ut();for(let e of Be)e(rt);}function jt(){let e=Oe(),[o,t]=be.useState(rt);return be.useEffect(()=>(Be.size===0&&window.addEventListener("languagechange",Kt),Be.add(t),()=>{Be.delete(t),Be.size===0&&window.removeEventListener("languagechange",Kt);}),[]),e?{locale:"en-US",direction:"ltr"}:o}var hr=be__namespace.default.createContext(null);function at(){let e=jt();return be.useContext(hr)||e}var nt=new Map;function it(e){let{locale:o}=at(),t=o+(e?Object.entries(e).sort((a,n)=>a[0]<n[0]?-1:1).join():"");if(nt.has(t))return nt.get(t);let r=new Intl.Collator(o,e);return nt.set(t,r),r}function qe(e){let o=it({usage:"search",...e}),t=be.useCallback((n,i)=>i.length===0?true:(n=n.normalize("NFC"),i=i.normalize("NFC"),o.compare(n.slice(0,i.length),i)===0),[o]),r=be.useCallback((n,i)=>i.length===0?true:(n=n.normalize("NFC"),i=i.normalize("NFC"),o.compare(n.slice(-i.length),i)===0),[o]),a=be.useCallback((n,i)=>{if(i.length===0)return true;n=n.normalize("NFC"),i=i.normalize("NFC");let s=0,l=i.length;for(;s+l<=n.length;s++){let u=n.slice(s,s+l);if(o.compare(i,u)===0)return true}return false},[o]);return be.useMemo(()=>({startsWith:t,endsWith:r,contains:a}),[t,r,a])}function Qt(e,o=300){let[t,r]=be.useState(e);return be.useEffect(()=>{let a=setTimeout(()=>r(e),o);return ()=>clearTimeout(a)},[e,o]),t}function xe(e=false){return `${e?"outline outline-1 outline-border-input data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none data-[focus-visible]:outline data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function A(e,o){return reactAriaComponents.composeRenderProps(e,t=>tailwindMerge.twMerge(o,t))}var B={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",paddingY:"py-[var(--control-gap-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",paddingY:"py-[var(--control-gap-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",paddingY:"py-[var(--control-gap-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",paddingY:"py-[var(--control-gap-xl)]",gap:"gap-[var(--control-gap-xl)]"}};var Re={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},f=be.memo(({name:e,size:o="md",color:t,weight:r="regular",className:a,ariaLabel:n,...i})=>{let s=Rr__namespace[e];if(!s)return process.env.NODE_ENV==="development"&&console.error(`Icon "${e}" not found in @phosphor-icons/react`),null;let l=typeof o=="string"&&o in Re?Re[o]:o,u=tailwindMerge.twMerge("inline-block flex-shrink-0",!t&&"text-current",a);return jsxRuntime.jsx(s,{...i,size:l,color:t,weight:r,className:u,"aria-label":n||`${e} icon`,"data-testid":`icon-${e}`})});f.displayName="Icon";var Jt=be.memo(({variant:e="subtle",shape:o="square",containerSize:t,containerClassName:r,size:a="md",className:n,name:i,color:s,weight:l,ariaLabel:u,ref:c,...d})=>{let x=typeof a=="string"&&a in Re?Re[a]:a,F=t?typeof t=="string"&&t in Re?Re[t]:t:x*1.75,b=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",o==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-gray-100 dark:bg-gray-800",e==="solid"&&"bg-brand text-white",e==="outline"&&"border-2 border-current",r);return jsxRuntime.jsx("div",{className:b,style:{width:F,height:F},children:jsxRuntime.jsx(f,{...d,name:i,size:a,color:s,weight:l,className:n,ariaLabel:u})})});Jt.displayName="IconWithContainer";var kr=({isEntering:e,isExiting:o,className:t})=>["max-w-[200px] group bg-slate-700 dark:bg-slate-600 border border-slate-800 dark:border-white/10 shadow-[inset_0_1px_0_0_theme(colors.gray.600)] dark:shadow-none text-white text-sm rounded-lg drop-shadow-lg will-change-transform px-3 py-1",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",o?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",t].filter(Boolean).join(" ");function eo({children:e,content:o,...t}){return jsxRuntime.jsxs(reactAriaComponents.TooltipTrigger,{delay:200,children:[e,jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...t,offset:10,className:reactAriaComponents.composeRenderProps(t.className,(r,a)=>kr({...a,className:r})),children:[jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-slate-700 stroke-gray-800 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-slate-600 dark:stroke-white/10 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),o]})]})}function ce(){let[e,o]=be__namespace.default.useState(false),t=be__namespace.default.useCallback((a,n)=>{o(true),n?.(a);},[]),r=be__namespace.default.useCallback((a,n)=>{o(false),n?.(a);},[]);return {isFocused:e,handleFocus:t,handleBlur:r}}function Q({children:e,className:o}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative w-full",o),children:e})}function to({onClick:e,size:o="md",className:t}){return jsxRuntime.jsx("button",{type:"button",onClick:r=>{r.preventDefault(),r.stopPropagation(),e();},className:tailwindMerge.twMerge("absolute right-2 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body cursor-pointer",t),"aria-label":"Clear input",onMouseDown:r=>{r.preventDefault(),r.stopPropagation();},children:jsxRuntime.jsx(f,{name:"X",size:o==="sm"?16:20})})}function Se(e){let{isInvalid:o,isDisabled:t,isFocused:r}=e,a="border rounded-[var(--control-border-radius)] !outline-none ";return t?`${a} border-border-muted`:o&&r?`${a} border-feedback-error-border shadow-[inset_0_0_0_1px_var(--color-feedback-error-border)]`:o?`${a} border-feedback-error-border`:r?`${a} border-border-focus shadow-[inset_0_0_0_1px_var(--color-border-focus)]`:`${a} border-border-input`}function oo(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function Ir(e){return e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":""}function te(e){let{isInvalid:o,isDisabled:t,isFocused:r,transparent:a,size:n="md",className:i}=e;return tailwindMerge.twMerge("w-full",Se({isInvalid:o,isDisabled:t,isFocused:r}),oo({transparent:a,isDisabled:t}),B[n].text,B[n].height,B[n].padding,Ir(n),i)}function ro(e){let{size:o="md",isFocusWithin:t,isInvalid:r,isDisabled:a,transparent:n,className:i}=e;return tailwindMerge.twMerge("group flex items-center rounded-[var(--control-border-radius)] overflow-hidden",oo({transparent:n,isDisabled:a}),B[o].height,Se({isFocused:t,isInvalid:r,isDisabled:a}),i)}function z({children:e,size:o="md",tooltip:t,description:r,descriptionPlacement:a="below",isRequired:n,className:i,htmlFor:s}){let l=t||r&&a==="tooltip",u=t||r,c=r&&a==="inline",d=jsxRuntime.jsxs("label",{htmlFor:s,className:tailwindMerge.twMerge(B[o].text,"!text-text-label font-semibold flex items-center gap-1",i),children:[e,n&&jsxRuntime.jsx("span",{children:"*"}),l&&jsxRuntime.jsx("span",{className:"text-text-muted",children:jsxRuntime.jsx(f,{name:"Info",size:o==="sm"?16:20})}),c&&jsxRuntime.jsx("span",{className:"text-text-caption font-normal ml-1",children:r})]});return l&&u?jsxRuntime.jsx(eo,{content:u,children:d}):d}function N({size:e="md",className:o,children:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("leading-[2.25] text-text-caption",B[e].text,o),children:t})}function p({children:e,size:o="md",className:t}){return jsxRuntime.jsx("div",{role:"alert",className:tailwindMerge.twMerge(B[o].text,"text-feedback-error-text",t),children:e})}function _e({size:e="md",isInvalid:o,isDisabled:t,isFocused:r,transparent:a,className:n,...i}){return jsxRuntime.jsx("input",{className:te({isInvalid:o,isDisabled:t,isFocused:r,transparent:a,size:e,className:n}),...i})}var Lr="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",Er={default:"bg-action-default text-[color:var(--color-action-default-text)] hover:bg-action-default-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",brand:"bg-action-brand text-[color:var(--color-action-brand-text)] hover:bg-action-brand-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",secondary:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-feedback-error-text border-2 border-border-muted hover:bg-feedback-error-background/50 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-brand hover:text-action-brand/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-body hover:bg-background-hover hover:text-text-heading forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-1 flex-shrink-0 rounded-[var(--control-border-radius)]",unstyled:"bg-transparent"},no={full:"w-full",default:"w-fit"},Dr="opacity-50 cursor-not-allowed pointer-events-none",Ar="opacity-100 cursor-pointer",zr={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},Mr={primary:"bg-action-brand text-white",destructive:"bg-action-destructive text-white"};function Hr(e){return e?e==="primary"?"brand":e:"default"}function Gr(e){let{variant:o="default",size:t="md",isDisabled:r,fullWidth:a=false,isLoading:n=false}=e,i=Hr(o),s=i==="unstyled"?"":`${Lr} ${Er[i]}`;i!=="unstyled"&&(s+=` ${B[t].text} ${B[t].height} ${B[t].padding} ${B[t].gap}`),r||n?s+=` ${Dr}`:s+=` ${Ar}`,a?s+=` ${no.full}`:s+=` ${no.default}`;let l=i==="brand"?"focus-visible:outline-action-brand":void 0;return [s,xe(),l].filter(Boolean).join(" ")}function P(e){let{icon:o,children:t,isLoading:r=false,loadingText:a,loadingIndicator:n,size:i="md",iconPosition:s="left",iconWeight:l,href:u,className:c,badgeNumber:d,badgeVariant:x="primary",badgePosition:F="top-right",style:b,target:m,rel:C,...h}=e,v=o?jsxRuntime.jsx(f,{name:o,size:i,weight:l}):null,$=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,typeof t=="function"?null:t,s==="right"&&v]}),L=jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n||jsxRuntime.jsx(f,{name:"CircleNotch",size:i,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:$}),a&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:a})]}),g=(d??0)>0,S=tailwindMerge.twMerge(Gr(e),c),w=u?{href:u,target:m,rel:C,...h}:{};if(u){let{onPress:W,onPressStart:re,onPressEnd:H,onPressChange:me,onPressUp:pe,onAuxClick:le,onContextMenu:se,onDoubleClick:M,...y}=h;Object.assign(w,y);}let k=u?jsxRuntime.jsx(reactAriaComponents.Link,{...w,...r&&{"aria-busy":true},style:g?void 0:b,className:S,children:r?L:typeof t=="function"?(function(W){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,t(W),s==="right"&&v]})}):$}):jsxRuntime.jsx(reactAriaComponents.Button,{...h,...r&&{"aria-busy":true},style:g?void 0:b,className:S,children:r?L:typeof t=="function"?(function(W){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,t(W),s==="right"&&v]})}):$});return g?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",c),style:b,children:[k,jsxRuntime.jsx("span",{className:`absolute ${zr[F]} flex h-5 w-5 items-center justify-center rounded-full ${Mr[x]} text-xs font-medium`,"aria-label":`${d} items`,children:d})]}):k}function Le({transparent:e=false,className:o,children:t,...r}){return jsxRuntime.jsx(reactAriaComponents.ModalOverlay,{...r,className:reactAriaComponents.composeRenderProps(o,(a,n)=>tailwindMerge.twMerge("fixed inset-0 z-50","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",e?"bg-transparent":["bg-gradient-to-br from-black/20 via-black/15 to-black/20","backdrop-blur-[2px]","supports-[backdrop-filter]:bg-black/15"].join(" "),n.isEntering&&["animate-in fade-in","duration-300 ease-out"].join(" "),n.isExiting&&["animate-out fade-out","duration-200 ease-in"].join(" "),a)),children:t})}function Jr({isEntering:e,isExiting:o,className:t="",disableGroup:r=false}){let a=[!r&&"group","bg-background-surface","forced-colors:bg-[Canvas]","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none"].filter(Boolean).join(" "),n=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",i=o?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [a,n,i,t].filter(Boolean).join(" ")}function Te({children:e,showArrow:o=false,withBackdrop:t=false,className:r,isDismissable:a=true,disableGroup:n=false,...i}){let l=reactAriaComponents.useSlottedContext(reactAriaComponents.PopoverContext)?.trigger==="SubmenuTrigger",u=o?12:8;u=l?u-6:u;let c=jsxRuntime.jsxs(reactAriaComponents.Popover,{offset:u,...i,className:reactAriaComponents.composeRenderProps(r,(d,x)=>Jr({...x,className:d,disableGroup:n})),children:[o&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});return t?jsxRuntime.jsx(Le,{isDismissable:a,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:a,children:c})}):c}var mo=be.createContext("md");function po(){return be.useContext(mo)}function co(e="md"){return `flex-1 text-start data-[placeholder]:text-text-placeholder overflow-hidden text-ellipsis whitespace-nowrap ${B[e].text}`}function na(){let e=be__namespace.default.useCallback((t,r)=>{r?.(t);},[]),o=be__namespace.default.useCallback((t,r)=>{r?.(t);},[]);return {handleFocus:e,handleBlur:o}}function pt({label:e,description:o,errorMessage:t,children:r,items:a,renderItem:n,renderSelectedValue:i,size:s="md",selectedKey:l,defaultSelectedKey:u,onSelectionChange:c,placeholder:d,showErrors:x=false,tooltip:F,isRequired:b,transparent:m,reserveErrorSpace:C=false,placement:h="bottom start",shouldFlip:v=true,menuWidth:$="match",descriptionPlacement:L="below",...g}){let[S,w]=be.useState(null),[k,W]=be.useState(null),re=l??S??u,{handleFocus:H,handleBlur:me}=na(),pe=be__namespace.default.useMemo(()=>!i||!re||!a?null:Array.from(a).find(Ce=>Ce.id===re)??null,[i,re,a]),le=y=>{c&&y!==null&&c(y),c||w(y);},se=be.useRef(null),M=be.useRef(null);return jsxRuntime.jsx(reactAriaComponents.Select,{...g,selectedKey:re,defaultSelectedKey:u,onSelectionChange:le,placeholder:d,className:A(g.className,"group flex w-full flex-col"),ref:se,onOpenChange:y=>{y&&M.current?W(M.current.offsetWidth):y||se.current?.blur();},children:({isDisabled:y,isInvalid:Ce,isOpen:fe})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(z,{size:s,tooltip:F,description:L==="tooltip"||L==="inline"?o:void 0,descriptionPlacement:L,isRequired:b,children:e}),jsxRuntime.jsx(Q,{children:jsxRuntime.jsx("div",{ref:M,children:jsxRuntime.jsxs(P,{variant:"unstyled",className:tailwindMerge.twMerge(te({isInvalid:Ce||x&&!!t,isDisabled:y,isFocused:fe,transparent:m,size:s}),"flex items-center text-start gap-4 cursor-pointer pl-[var(--control-padding-sm)]"),onFocus:J=>H(J,g.onFocus),onBlur:J=>me(J,g.onBlur),"data-open":fe,children:[i&&pe?jsxRuntime.jsx("div",{className:co(s),children:i(pe)}):jsxRuntime.jsx(reactAriaComponents.SelectValue,{className:co(s)}),jsxRuntime.jsx(f,{name:"CaretDown","aria-hidden":true,className:tailwindMerge.twMerge("h-4 w-4 text-text-body group-disabled:text-gray-200 forced-colors:text-[ButtonText] transition-transform",fe&&"rotate-180")})]})})}),C?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:x?jsxRuntime.jsx(p,{size:s,className:"text-feedback-error-text",children:typeof t=="function"&&g.validationResult?t(g.validationResult):typeof t=="string"?t:null}):o&&L==="below"?jsxRuntime.jsx(N,{size:s,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:x?jsxRuntime.jsx(p,{size:s,className:"mt-1 text-feedback-error-text",children:typeof t=="function"&&g.validationResult?t(g.validationResult):typeof t=="string"?t:null}):o&&L==="below"?jsxRuntime.jsx(N,{size:s,className:"mt-1",children:o}):null}),jsxRuntime.jsx(Te,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-[var(--control-border-radius)]",style:{width:$==="match"&&k?`${k}px`:void 0,minWidth:$==="auto"&&k?`${k}px`:void 0,maxWidth:$==="auto"?"min(600px, 90vw)":void 0},placement:h,shouldFlip:v,children:jsxRuntime.jsx(mo.Provider,{value:s,children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:a,className:"w-full max-h-[300px] overflow-auto bg-background-input p-0 outline-0",children:n&&a?J=>jsxRuntime.jsx(Ne,{id:J.id,textValue:J.label,size:s,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:n(J)})},J.id):r})})})]})})}function Ne({size:e,className:o,...t}){let r=po(),a=e??r;return jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{...t,className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 outline-none text-text-body data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-default data-[focus-visible]:ring-inset data-[selected]:bg-background-selected data-[selected]:font-medium overflow-hidden",B[a].paddingY,B[a].text,o)})}var ga={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},ha={sm:"pl-7",md:"pl-9",lg:"pl-10",xl:"pl-12"},fo={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"};function va(){let e=be__namespace.default.useContext(reactAriaComponents.ComboBoxStateContext);return jsxRuntime.jsx(reactAriaComponents.Button,{slot:null,className:"clear-button","aria-label":"Clear",onPress:()=>e?.setSelectedKey(null),children:"\u2715"})}var gt=(e,o,t)=>{if(e==null||e==="")return "";let a=(t?t.flatMap(n=>n.items):o||[]).find(n=>n.id===e);return a?a.name:""};async function ya(e,o,t){try{let r=e.url.replace("{q}",o),a=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([l,u])=>{a.append(l,u.toString());});let n=`${r}${a.toString()?"?"+a.toString():""}`,i=await fetch(n,{method:"GET",headers:e.headers,signal:t});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);let s=await i.json();return {items:e.transformResponse(s)}}catch(r){console.error("Error in REST request:",r);let a=r instanceof Error?r.message:"Unknown error occurred";return {items:[],error:a}}}async function Pa(e,o,t){try{let r=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${o}"`),a=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:r}),signal:t});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let n=await a.json();if(n.errors)throw new Error(n.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(n=e.responsePath.split(".").reduce((i,s)=>i?.[s],n)),{items:e.transformResponse(n)}}catch(r){console.error("Error in GraphQL request:",r);let a=r instanceof Error?r.message:"Unknown error occurred";return {items:[],error:a}}}function vt({label:e,staticItems:o=[],sections:t,selectedKey:r,defaultSelectedKey:a,onSelectionChange:n,requestConfig:i,defaultFilter:s,placeholder:l,errorMessage:u,description:c,size:d="md",tooltip:x,isRequired:F,isDisabled:b,isInvalid:m,validationResult:C,showErrors:h=true,renderItem:v,renderLeftIcon:$,renderSection:L,autoFocus:g=false,reserveErrorSpace:S=false,hideChevron:w=false}){let k=be__namespace.default.useRef(null),[W,re]=be__namespace.default.useState(),[H,me]=be.useState(()=>gt(r||a,o,t)),[pe,le]=be.useState(false),se=Qt(H),{contains:M}=qe({sensitivity:"base"}),[y,Ce]=be.useState(),fe=B[d].text,J=B[d].height,de=null;be.useEffect(()=>{g&&le(true);},[g]),be.useEffect(()=>{let _=()=>{k.current&&re(k.current.offsetWidth);};return _(),window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[]),be.useEffect(()=>{de&&de.setFilterText(se);},[se,de]),i&&(de=reactStately.useAsyncList({async load({signal:_,filterText:D=""}){if(!i.url||i.shouldLoad&&!i.shouldLoad(D))return {items:[]};try{let Z;return i.requestType==="GraphQL"?Z=await Pa(i,D,_):Z=await ya(i,D,_),Ce(Z.error),{items:Z.items}}catch(Z){return console.error("Error loading items:",Z),Ce(Z instanceof Error?Z.message:"Unknown error occurred"),{items:[]}}},initialFilterText:""})),se===""&&(de=null);let Jo=_=>{let D=gt(_,o,t);me(D),n&&n(_);},Zo=_=>{me(_);let D=gt(r,o,t);r!=null&&_!==D&&n&&n(null);};return jsxRuntime.jsx(reactAriaComponents.ComboBox,{onSelectionChange:Jo,selectedKey:r||void 0,defaultSelectedKey:a||void 0,defaultItems:t?t.flatMap(_=>_.items):o,items:de?de.items:void 0,className:A("group flex flex-col","w-full"),menuTrigger:"focus",isDisabled:b,isInvalid:m||!!u,inputValue:H,onInputChange:Zo,autoFocus:g,defaultFilter:s||M,"aria-label":e||l||"Autocomplete",children:_=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(z,{size:d,tooltip:x,isRequired:F,children:e}),jsxRuntime.jsxs(reactAriaComponents.Group,{ref:k,className:ro({size:d,isInvalid:m||!!u,isDisabled:b,isFocusWithin:pe||_.isOpen,className:"w-full cursor-pointer"}),"aria-label":e||l||"Autocomplete",style:{position:"relative"},children:[$?jsxRuntime.jsx("div",{className:"absolute left-3",children:$(!!de?.isLoading)}):jsxRuntime.jsx(f,{name:"MagnifyingGlass",className:`${ga[d]} absolute left-3 text-inherit`}),jsxRuntime.jsx(reactAriaComponents.Input,{className:`flex-1 min-w-0 border-none pr-3 outline-0 placeholder:text-text-placeholder ${ha[d]} ${fe} ${J} ${b?"bg-background-muted":"bg-background-input"}`,placeholder:l,disabled:b,onFocus:()=>le(true),onBlur:()=>le(false)}),H&&!b&&jsxRuntime.jsx(va,{}),!w&&jsxRuntime.jsx(reactAriaComponents.Button,{className:`px-2 text-text-body ${fe} ${J} ${b?"bg-background-muted":"bg-background-input"}`,"aria-label":"Toggle menu",isDisabled:b,children:({isPressed:D})=>jsxRuntime.jsx(f,{name:D?"CaretUp":"CaretDown",className:"h-4 w-4"})})]}),S?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:h&&y?jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text",children:y}):h&&typeof u=="string"?jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text",children:u}):h&&typeof u=="function"&&C?jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text",children:u(C)}):c?jsxRuntime.jsx(N,{size:d,children:c}):null}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[c&&jsxRuntime.jsx(N,{size:d,className:"mt-1",children:c}),h&&y&&jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text mt-1",children:y}),h&&typeof u=="string"&&jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text mt-1",children:u}),h&&typeof u=="function"&&C&&jsxRuntime.jsx(p,{size:d,className:"text-feedback-error-text mt-1",children:u(C)})]}),jsxRuntime.jsx(Te,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm ring-1 ring-black/5 rounded-[var(--control-border-radius)]",style:{minWidth:W?`${W}px`:void 0},children:jsxRuntime.jsx(reactAriaComponents.ListBox,{className:`max-h-[300px] overflow-auto bg-background-input outline-none ${fe}`,children:t?t.map(D=>{let Z=D.items.map(ae=>jsxRuntime.jsx(Ne,{id:ae.id,textValue:ae.name,size:d,className:`flex cursor-default items-center gap-2 px-3 ${fo[d]} text-text-body outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium`,children:v?v(ae):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ae.name,jsxRuntime.jsx(f,{name:"X",className:"ml-auto h-4 w-4 text-text-muted opacity-0 data-[focused]:opacity-100 data-[selected]:opacity-100"})]})},ae.id));if(L){let ae=L(D,Z);return be__namespace.default.isValidElement(ae)&&ae.type===reactAriaComponents.ListBoxSection?ae:jsxRuntime.jsx(reactAriaComponents.ListBoxSection,{children:ae},D.name)}return jsxRuntime.jsxs(reactAriaComponents.ListBoxSection,{children:[jsxRuntime.jsx(reactAriaComponents.Header,{className:"px-3 py-1 text-sm font-bold text-text-muted",children:D.name}),Z]},D.name)}):D=>jsxRuntime.jsx(Ne,{id:D.id,textValue:D.name,size:d,className:`flex cursor-default items-center gap-2 px-3 ${fo[d]} text-text-body outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium`,children:v?v(D):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[D.name,jsxRuntime.jsx(f,{name:"X",className:"ml-auto h-4 w-4 text-text-muted opacity-0 data-[focused]:opacity-100 data-[selected]:opacity-100"})]})},D.id)})})]})})}function I(e,o){let t=o.split("."),r=e;for(let n of t)if(r&&typeof r=="object"&&n in r)r=r[n];else {r=void 0;break}let a=r?.message;return typeof a=="string"?a:void 0}function ud({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(vt,{...t,selectedKey:i.value??null,onSelectionChange:s=>i.onChange(s),showErrors:!!n,errorMessage:n})})}function ho(e){return jsxRuntime.jsxs(reactAriaComponents.CheckboxGroup,{...e,className:A(e.className,"flex flex-col gap-2"),children:[jsxRuntime.jsx(z,{children:e.label}),e.children,e.description&&jsxRuntime.jsx(N,{children:e.description}),jsxRuntime.jsx(p,{children:typeof e.errorMessage=="function"?void 0:e.errorMessage})]})}function ka({isDisabled:e}){return `flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-caption"}`}function Ia({isSelected:e,isInvalid:o,isDisabled:t,isIndeterminate:r,variant:a="default"}){let n="w-5 h-5 flex-shrink-0 rounded-[var(--control-border-radius)] flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2",i=a==="brand"?"focus:ring-action-brand":"focus:ring-action-default",s="";if(t)s="border-border-muted bg-background-muted";else if(o)s="border-feedback-error-border bg-feedback-error-background";else if(e||r){let l=a==="brand"?"action-brand":"action-default";s=`bg-${l} border-${l} hover:bg-${l}-hover hover:border-${l}-hover`;}else s="bg-background-input border-border-input hover:border-border-focus";return `${n} ${i} ${s}`}var go="w-4 h-4 text-text-onPrimary group-disabled:text-text-disabled";function vo(e){let{children:o,variant:t="default",...r}=e;return jsxRuntime.jsx(reactAriaComponents.Checkbox,{...r,className:reactAriaComponents.composeRenderProps(e.className,(a,n)=>`${ka(n)} ${a||""}`),children:a=>{let{isSelected:n,isIndeterminate:i,...s}=a,l=jsxRuntime.jsx("div",{className:Ia({isSelected:n,isIndeterminate:i,variant:t,...s}),children:i?jsxRuntime.jsx(lucideReact.Minus,{"aria-hidden":true,className:go}):n?jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":true,className:go}):null});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l,typeof o=="function"?o(a):o]})}})}function wd({name:e,defaultValue:o,errorBelow:t=false,...r}){let{control:a,formState:n}=reactHookForm.useFormContext(),i=I(n.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:a,name:e,defaultValue:o,render:({field:s})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(vo,{...r,isSelected:!!s.value,onChange:l=>s.onChange(l),"aria-invalid":!!i,children:r.children}),t&&i&&jsxRuntime.jsx(p,{children:i})]})})}function Ld({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(ho,{...t,value:i.value||[],onChange:s=>i.onChange(s),errorMessage:n,children:t.children})})}function ke(e){if(!e)return false;let o=e.startsWith("#")?e.slice(1):e;return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(o)}function Ft(e){if(!e)return "";let o=e.startsWith("#")?e.slice(1):e;return o.length===3&&(o=o.split("").map(t=>t+t).join("")),`#${o.toUpperCase()}`}function Co({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,transparent:i,className:s,validationResult:l,value:u,defaultValue:c,onChange:d,placeholder:x="#000000",showColorSwatch:F=true,reserveErrorSpace:b=true,...m}){let[C,h]=be.useState(c||""),[v,$]=be.useState(u||c||""),[L,g]=be.useState(false),[S,w]=be.useState(null),{isFocused:k,handleFocus:W,handleBlur:re}=ce(),H=u!==void 0?u:C;be.useEffect(()=>{u!==void 0&&$(u);},[u]);let me=H?!ke(H):false,pe=be.useCallback(M=>{if($(M),ke(M)){let y=Ft(M);d?d(y):h(y);}else M===""&&(d?d(""):h(""));},[d]),le=be.useCallback(M=>{let y=Ft(M);$(y),d?d(y):h(y);},[d]),se=be.useCallback(M=>{if(ke(v)){let y=Ft(v);$(y),d&&y!==H?d(y):!d&&y!==C&&h(y);}re(M,m.onBlur);},[v,H,C,d,re,m.onBlur]);return jsxRuntime.jsx(reactAriaComponents.TextField,{...m,isRequired:n,className:A(s,"group flex flex-col"),children:({isDisabled:M})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(z,{size:r,tooltip:a,isRequired:n,children:e}),jsxRuntime.jsx(Q,{children:jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 relative",children:[jsxRuntime.jsx(_e,{size:r,disabled:M,type:"text",value:v,placeholder:x,onFocus:y=>W(y,m.onFocus),onBlur:se,onChange:y=>pe(y.target.value),className:tailwindMerge.twMerge(te({isInvalid:me,isDisabled:M,isFocused:k,size:r,transparent:i}),F?"pr-12":"pr-3","pl-3")}),F&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none",style:{width:B[r].height},children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-6 h-6 rounded border shadow-sm",ke(H)?"border-border-default":"border-border-default bg-background-muted"),style:ke(H)?{backgroundColor:H}:void 0,"aria-hidden":"true",children:!ke(H)&&jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full border-2 border-border-muted"})})})})]}),jsxRuntime.jsx("div",{ref:w,children:jsxRuntime.jsx(P,{variant:"secondary",size:r,icon:"Palette",onPress:()=>g(!L),isDisabled:M,className:"flex-shrink-0",children:"Pick"})})]})}),b?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&l?jsxRuntime.jsx(p,{size:r,children:t(l)}):o?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&l?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(l)}):o?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null}),L&&S&&jsxRuntime.jsx(Te,{triggerRef:{current:S},isOpen:L,onOpenChange:g,placement:"bottom end",className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-lg p-4",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:H||"#000000",onChange:le,style:{width:"200px",height:"200px"}}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded border border-border-default shadow-sm flex-shrink-0",style:{backgroundColor:H||"#000000"}}),jsxRuntime.jsx("div",{className:"flex-1 text-text-body text-[length:var(--control-text-sm)] font-mono",children:H||"#000000"})]})]})})]})})}function Jd({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(Co,{...t,value:i.value??"",onChange:s=>i.onChange(s),isInvalid:!!n,errorMessage:n})})}function Ja({isSelected:e,isDisabled:o}){let t=[xe,"w-9 h-9 text-sm cursor-default rounded-sm flex items-center justify-center forced-color-adjust-none font-semibold"];return o?t.push("text-text-disabled forced-colors:text-[GrayText]"):e?t.push("bg-action-default text-text-onPrimary invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):t.push("text-text-body hover:bg-background-hover pressed:bg-background-selected"),t.join(" ")}function Rt({errorMessage:e,...o}){return jsxRuntime.jsxs(reactAriaComponents.Calendar,{...o,children:[jsxRuntime.jsx(So,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(No,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:t=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:t,className:({isSelected:r,isDisabled:a})=>`${Ja({isSelected:r,isDisabled:a})} border-0`})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}function So(){let{direction:e}=reactAriaComponents.useLocale(),o=18;return jsxRuntime.jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsxRuntime.jsx(P,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsxRuntime.jsx(f,{name:"CaretRight","aria-hidden":true,size:o}):jsxRuntime.jsx(f,{name:"CaretLeft","aria-hidden":true,size:o})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-zinc-900 dark:text-zinc-200"}),jsxRuntime.jsx(P,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsxRuntime.jsx(f,{name:"CaretLeft","aria-hidden":true,size:o}):jsxRuntime.jsx(f,{name:"CaretRight","aria-hidden":true,size:o})})]})}function No(){return jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:e=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:"text-xs font-semibold text-text-caption",children:e})})}function Nt({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,isDisabled:i,isInvalid:s,showCalendar:l=true,reserveErrorSpace:u=true,validationResult:c,className:d,...x}){let[F,b]=be.useState(false),m=C=>{x.onChange&&C&&x.onChange(C),b(false);};return jsxRuntime.jsxs(reactAriaComponents.DateField,{...x,isDisabled:i,isRequired:n,isInvalid:s,className:A(d,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(z,{size:r,tooltip:a,isRequired:n,children:e}),jsxRuntime.jsx(Q,{children:jsxRuntime.jsxs("div",{className:"relative w-full",children:[jsxRuntime.jsx(wo,{size:r,isDisabled:i,isInvalid:s,hasCalendar:l}),l&&!i&&jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:F,onOpenChange:b,children:[jsxRuntime.jsx(P,{variant:"unstyled",className:"absolute right-2 top-1/2 -translate-y-1/2 flex h-8 w-8 items-center justify-center rounded hover:bg-background-hover text-text-muted hover:text-text-body transition-colors","aria-label":"Open calendar",children:jsxRuntime.jsx(f,{name:"Calendar",size:18})}),jsxRuntime.jsx(reactAriaComponents.Popover,{className:"bg-background-surface rounded-lg border border-border-default shadow-xl",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"p-4 outline-none",children:jsxRuntime.jsx(Rt,{value:x.value,onChange:m,minValue:x.minValue,maxValue:x.maxValue,isDisabled:i,isReadOnly:x.isReadOnly,isDateUnavailable:x.isDateUnavailable})})})]})]})}),u?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&c?jsxRuntime.jsx(p,{size:r,children:t(c)}):o?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&c?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(c)}):o?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})}function sn({isPlaceholder:e,isDisabled:o,size:t="md"}){return tailwindMerge.twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[t],e?"text-text-placeholder italic":"text-text-body",o?"text-text-disabled cursor-not-allowed":"cursor-text",!o&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-body")}function wo({size:e="md",isDisabled:o,isInvalid:t,hasCalendar:r,className:a,...n}){return jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(Se({isInvalid:t,isDisabled:o}),"px-3 py-2 flex items-center gap-0.5 w-full",r&&"pr-10",a),...n,children:i=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:i,className:sn({isPlaceholder:i.isPlaceholder,isDisabled:!i.isEditable||o,size:e})})})}function $c({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(Nt,{...t,value:i.value??null,onChange:s=>i.onChange(s),isInvalid:!!n,errorMessage:n})})}function Tt({value:e,onChange:o,onUrlChange:t,accept:r="image/*",maxSize:a,isDisabled:n=false,onUpload:i,className:s,showPreview:l=true,placeholder:u="Drop files here or click to browse"}){let[c,d]=be.useState(false),[x,F]=be.useState(false),[b,m]=be.useState(null),[C,h]=be.useState(e),v=be.useRef(null),$=async S=>{if(m(null),a&&S.size>a){m(`File size must be less than ${(a/1024/1024).toFixed(2)}MB`);return}if(l&&S.type.startsWith("image/")){let w=new FileReader;w.onloadend=()=>{h(w.result);},w.readAsDataURL(S);}if(i){F(true);try{let w=await i(S);h(w),t?.(w);}catch(w){m("Failed to upload file"),console.error("Upload error:",w);}finally{F(false);}}o?.(S,C);},L=S=>{let w=S.items;if(w.length>0){let k=w[0];if(k.kind==="file"){let W=k.getAsFile();W&&$(W);}}d(false);},g=()=>{h(void 0),m(null),o?.(null),t?.(""),v.current&&(v.current.value="");};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",s),children:[jsxRuntime.jsxs(reactAriaComponents.DropZone,{className:tailwindMerge.twMerge("relative flex min-h-[200px] w-full flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",c?"border-action-brand bg-action-brand/5":"border-border-muted hover:border-border-default",n&&"pointer-events-none opacity-50",b&&"border-feedback-error-border bg-feedback-error-background/50"),onDrop:L,onDropEnter:()=>d(true),onDropExit:()=>d(false),children:[C?jsxRuntime.jsxs("div",{className:"relative flex h-full w-full items-center justify-center p-4",children:[l&&C.startsWith("data:image")?jsxRuntime.jsx("img",{src:C,alt:"Preview",className:"max-h-48 max-w-full rounded-md object-contain"}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-12 w-12 text-text-muted"}),jsxRuntime.jsx("span",{className:"text-sm text-text-muted",children:"File uploaded"})]}),!n&&jsxRuntime.jsx(P,{variant:"icon",size:"sm",onPress:g,className:"absolute right-2 top-2 bg-background-surface shadow-md",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[jsxRuntime.jsx(lucideReact.Upload,{className:"h-12 w-12 text-text-muted"}),jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("p",{className:"text-sm text-text-body",children:u}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-text-muted",children:r==="image/*"?"PNG, JPG, GIF up to 10MB":`Accepts ${r}`})]}),jsxRuntime.jsx(reactAriaComponents.FileTrigger,{acceptedFileTypes:r.split(","),onSelect:S=>{let w=Array.from(S||[]);w.length>0&&$(w[0]);},children:jsxRuntime.jsx(P,{variant:"secondary",size:"sm",isDisabled:n,children:"Choose File"})})]}),x&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-lg bg-background-surface/80",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-action-brand border-t-transparent"}),jsxRuntime.jsx("span",{className:"text-sm text-text-muted",children:"Uploading..."})]})})]}),b&&jsxRuntime.jsx("p",{className:"mt-2 text-sm text-feedback-error-text",children:b})]})}function Uc({name:e,defaultValue:o,errorBelow:t=true,...r}){let{control:a,formState:n}=reactHookForm.useFormContext(),i=I(n.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:a,name:e,defaultValue:o,render:({field:s})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(Tt,{...r,value:s.value??"",onChange:(l,u)=>s.onChange(u||"")}),t&&i&&jsxRuntime.jsx(p,{children:i})]})})}var Sn=e=>{let o=te({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return tailwindMerge.twMerge(o,"pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className)};function It({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,transparent:i,validationResult:s,reserveErrorSpace:l=true,descriptionPlacement:u="below",...c}){let d=be.useId(),{isFocused:x,handleFocus:F,handleBlur:b}=ce();return jsxRuntime.jsx(reactAriaComponents.NumberField,{...c,id:d,isRequired:n,className:A(c.className,"group flex flex-col gap-1"),step:c.step??1,onChange:m=>{typeof m=="number"&&(c.maxValue!=null&&m>c.maxValue?c.onChange?.(c.maxValue):c.minValue!=null&&m<c.minValue?c.onChange?.(c.minValue):c.onChange?.(m));},isInvalid:!!t||typeof c.value=="number"&&(c.maxValue!=null&&c.value>c.maxValue||c.minValue!=null&&c.value<c.minValue),children:({isDisabled:m,isInvalid:C})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[e&&jsxRuntime.jsx(z,{size:r,tooltip:a,description:u==="tooltip"||u==="inline"?o:void 0,descriptionPlacement:u,isRequired:n,htmlFor:d,children:e}),jsxRuntime.jsx("div",{className:"relative",children:jsxRuntime.jsxs(reactAriaComponents.Group,{className:"relative",children:[jsxRuntime.jsx(reactAriaComponents.Input,{onFocus:v=>F(v,c.onFocus),onBlur:v=>b(v,c.onBlur),className:Sn({isInvalid:C||!!t,isDisabled:m,isFocused:x,transparent:i,size:r,className:typeof c.className=="string"?c.className:void 0})}),jsxRuntime.jsxs("div",{className:"absolute inset-y-[2px] right-[2px] flex flex-col divide-y divide-border-default border-l border-border-default overflow-hidden rounded-r-[calc(var(--control-border-radius)-2px)]",children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"increment",isDisabled:m,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(f,{name:"CaretUp",size:14})}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"decrement",isDisabled:m,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(f,{name:"CaretDown",size:14})})]})]})}),l?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:t?jsxRuntime.jsx(p,{size:r,children:typeof t=="function"?t(s):t}):o&&u==="below"?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:t?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:typeof t=="function"?t(s):t}):o&&u==="below"?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})})}function mu({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(It,{...t,value:typeof i.value=="number"?i.value:void 0,onChange:s=>i.onChange(s),isInvalid:!!n,errorMessage:n,isRequired:t.isRequired})})}var $n=be.createContext({variant:"brand"});function $t(e){let{variant:o="default",...t}=e;return jsxRuntime.jsx($n.Provider,{value:{variant:o},children:jsxRuntime.jsxs(reactAriaComponents.RadioGroup,{...t,className:A(e.className,"group flex flex-col gap-2"),children:[jsxRuntime.jsx(z,{children:e.label}),jsxRuntime.jsx("div",{className:"flex gap-2 group-orientation-horizontal:gap-4 group-orientation-vertical:flex-col",children:e.children}),e.description&&jsxRuntime.jsx(N,{children:e.description}),jsxRuntime.jsx(p,{children:typeof e.errorMessage=="function"&&e.validationResult?e.errorMessage(e.validationResult):typeof e.errorMessage=="string"?e.errorMessage:null})]})})}function Vu({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx($t,{...t,value:i.value,onChange:s=>i.onChange(s),errorMessage:n,children:t.children})})}var Dn={xs:"text-lg font-semibold",sm:"text-xl font-semibold",md:"text-2xl font-semibold",lg:"text-3xl font-semibold",xl:"text-4xl font-semibold"},An={page:"h-16 leading-[62px]"};function ze({tag:e="h1",size:o="lg",height:t,className:r="",children:a}){let n=Dn[o],i=t?An[t]:"";return jsxRuntime.jsx(e,{className:tailwindMerge.twMerge(n,i,r),children:a})}var Bt=({title:e,onClose:o,hideCloseIcon:t=false,titleAlign:r="left",hasBackArrow:a=false,onBack:n,headerContent:i})=>jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex h-16 w-full flex-shrink-0 items-center justify-between border-b px-6",e&&"border-b",r==="center"?"justify-center":""),children:[a&&jsxRuntime.jsx(P,{variant:"icon",onPress:n,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(f,{name:"CaretLeft","data-testid":"back-arrow"})}),i||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(ze,{size:"xs",children:e}),o&&!t&&jsxRuntime.jsx(P,{variant:"icon",onPress:o,"aria-label":"Close dialog",children:jsxRuntime.jsx(f,{name:"X","data-testid":"close-button"})})]})]});var Vt=({className:e,size:o=24,color:t="text-action-brand"})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",t,e),style:{width:o,height:o},role:"status","aria-label":"loading",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Loading..."})});var Wn=e=>{let o=te({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),t=[e.showSearchIcon?"pl-8":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return tailwindMerge.twMerge(o,t,e.className)};function He({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,transparent:i,showSearchIcon:s,isClearable:l,onClear:u,type:c,validationResult:d,reserveErrorSpace:x=true,isLoading:F=false,descriptionPlacement:b="below",...m}){let[C,h]=be__namespace.default.useState(false),{isFocused:v,handleFocus:$,handleBlur:L}=ce(),g=c==="password";return jsxRuntime.jsx(reactAriaComponents.TextField,{...m,isRequired:n,className:A(m.className,"group flex flex-col"),children:({isDisabled:S,isInvalid:w})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(z,{size:r,tooltip:a,description:b==="tooltip"||b==="inline"?o:void 0,descriptionPlacement:b,isRequired:n,children:e}),jsxRuntime.jsxs(Q,{children:[s&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 transform flex items-center z-10",children:F?jsxRuntime.jsx(Vt,{size:16,color:"text-text-muted"}):jsxRuntime.jsx(f,{name:"MagnifyingGlass",className:`h-4 w-4 translate-y-[0.5px] transition-colors ${v?"text-action-brand":"text-text-muted"}`})}),jsxRuntime.jsx(_e,{size:r,disabled:S,type:g?C?"text":"password":c,value:m.value,defaultValue:m.defaultValue,placeholder:m.placeholder,onFocus:k=>$(k,m.onFocus),onBlur:k=>L(k,m.onBlur),onChange:k=>m.onChange?.(k.target.value),className:Wn({isInvalid:w,isDisabled:S,isFocused:v,size:r,transparent:i,showSearchIcon:s,isClearable:l,hasValue:!!m.value,isPassword:g,className:typeof m.className=="string"?m.className:void 0})}),l&&m.value&&!S&&jsxRuntime.jsx(to,{onClick:()=>{u?u():m.onChange&&m.onChange("");},size:r}),g&&!S&&jsxRuntime.jsx("button",{type:"button",onClick:()=>h(!C),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body","aria-label":C?"Hide password":"Show password",onMouseDown:k=>{k.preventDefault(),k.stopPropagation();},children:jsxRuntime.jsx(f,{name:C?"EyeSlash":"Eye",size:r==="sm"?16:20,className:"text-text-body"})})]}),x?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&d?jsxRuntime.jsx(p,{size:r,children:t(d)}):o&&b==="below"?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&d?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(d)}):o&&b==="below"?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})})}var ye=({isActive:e=false,onPress:o,children:t})=>jsxRuntime.jsx(P,{variant:e?"secondary":"ghost",size:"sm",onPress:o,className:"p-1",children:t});function ti({initialUrl:e,isOpen:o,onClose:t,onSubmit:r}){let[a,n]=be.useState(e);return be__namespace.default.useEffect(()=>{n(e);},[e]),jsxRuntime.jsx(Le,{isDismissable:true,isOpen:o,onOpenChange:s=>!s&&t(),children:jsxRuntime.jsx(reactAriaComponents.Modal,{isDismissable:true,className:"flex items-center justify-center p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"relative bg-background-surface rounded-lg shadow-xl max-w-md w-full",children:jsxRuntime.jsxs("form",{onSubmit:s=>{s.preventDefault(),r(a),t();},children:[jsxRuntime.jsx(Bt,{title:"Insert Link",onClose:t}),jsxRuntime.jsx("div",{className:"p-6",children:jsxRuntime.jsx(He,{label:"URL",type:"url",value:a,onChange:n,autoFocus:true,className:"w-full"})}),jsxRuntime.jsxs("div",{className:"flex justify-end gap-2 border-t border-border-muted p-4",children:[jsxRuntime.jsx(P,{variant:"secondary",onPress:t,children:"Cancel"}),jsxRuntime.jsx(P,{type:"submit",children:"Save"})]})]})})})})}function Et({initialContent:e="",onChange:o,className:t,isDisabled:r=false,placeholder:a="Start typing...",id:n}){let[i,s]=be.useState(false),l=react.useEditor({immediatelyRender:false,extensions:[Yn__default.default.configure({heading:{levels:[1,2]}}),Un__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-text-link-default hover:text-text-link-hover underline decoration-text-link-default/30 hover:decoration-text-link-hover cursor-pointer"}})],content:e,editable:!r,onUpdate:({editor:d})=>{o?.(d.getHTML());},editorProps:{attributes:{class:tailwindMerge.twMerge("prose prose-sm max-w-none","focus:outline-none","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0")}}}),u=()=>{s(true);},c=d=>{d===""?l?.chain().focus().unsetLink().run():l?.chain().focus().setLink({href:d}).run();};return l?jsxRuntime.jsxs("div",{id:n,"data-richtexteditor":true,className:tailwindMerge.twMerge("flex flex-col rounded-md border border-border-input bg-background-input","outline-none focus-within:outline-none focus-within:border-border-input focus-within:ring-0 focus-within:shadow-none",r&&"opacity-50",t),style:{outline:"none"},children:[l&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(menus.BubbleMenu,{editor:l,shouldShow:({editor:d})=>d.isActive("link")&&!i,className:"flex items-center gap-1 rounded-md border border-border-input bg-background-surface p-1 shadow-md",children:[jsxRuntime.jsxs(P,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>{let d=l.getAttributes("link").href;window.open(d,"_blank");},children:[jsxRuntime.jsx(f,{name:"ArrowSquareOut",className:"mr-1 h-4 w-4"}),"Open"]}),jsxRuntime.jsxs(P,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:u,children:[jsxRuntime.jsx(f,{name:"PencilSimple",className:"mr-1 h-4 w-4"}),"Edit"]}),jsxRuntime.jsxs(P,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>l.chain().focus().unsetLink().run(),children:[jsxRuntime.jsx(f,{name:"X",className:"mr-1 h-4 w-4"}),"Remove"]})]}),jsxRuntime.jsx(ti,{isOpen:i,onClose:()=>s(false),onSubmit:c,initialUrl:l.getAttributes("link").href||""})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1 border-b border-border-input p-2",children:[jsxRuntime.jsx(ye,{isActive:l.isActive("heading",{level:1}),onPress:()=>l.chain().focus().toggleHeading({level:1}).run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"H1"})}),jsxRuntime.jsx(ye,{isActive:l.isActive("heading",{level:2}),onPress:()=>l.chain().focus().toggleHeading({level:2}).run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"H2"})}),jsxRuntime.jsx(ye,{isActive:l.isActive("bold"),onPress:()=>l.chain().focus().toggleBold().run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"B"})}),jsxRuntime.jsx(ye,{isActive:l.isActive("italic"),onPress:()=>l.chain().focus().toggleItalic().run(),children:jsxRuntime.jsx("span",{className:"text-xs italic",children:"I"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(ye,{isActive:l.isActive("bulletList"),onPress:()=>l.chain().focus().toggleBulletList().run(),children:jsxRuntime.jsx(f,{name:"ListBullets",className:"h-4 w-4"})}),jsxRuntime.jsx(ye,{isActive:l.isActive("orderedList"),onPress:()=>l.chain().focus().toggleOrderedList().run(),children:jsxRuntime.jsx(f,{name:"ListNumbers",className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(ye,{isActive:l.isActive("link"),onPress:u,children:jsxRuntime.jsx(f,{name:"PaperclipHorizontal",className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:"relative min-h-[200px] w-full outline-none focus:outline-none",children:[jsxRuntime.jsx(react.EditorContent,{editor:l,className:tailwindMerge.twMerge("w-full p-4 outline-none focus:outline-none","[&_.ProseMirror]:min-h-[inherit]","[&_.ProseMirror]:outline-none [&_.ProseMirror]:focus:outline-none","[&_.ProseMirror_h1]:mb-4 [&_.ProseMirror_h1]:text-2xl [&_.ProseMirror_h1]:font-bold","[&_.ProseMirror_h2]:mb-3 [&_.ProseMirror_h2]:text-xl [&_.ProseMirror_h2]:font-semibold","[&_.ProseMirror_p]:mb-2","[&_.ProseMirror_ul]:mb-2 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ul]:list-disc","[&_.ProseMirror_ol]:mb-2 [&_.ProseMirror_ol]:ml-6 [&_.ProseMirror_ol]:list-decimal","[&_.ProseMirror_li]:mb-1","[&_.ProseMirror_blockquote]:border-l-4 [&_.ProseMirror_blockquote]:border-border-muted [&_.ProseMirror_blockquote]:pl-4 [&_.ProseMirror_blockquote]:italic","[&_.ProseMirror_code]:rounded [&_.ProseMirror_code]:bg-background-muted [&_.ProseMirror_code]:px-1 [&_.ProseMirror_code]:py-0.5 [&_.ProseMirror_code]:font-mono [&_.ProseMirror_code]:text-sm","[&_.ProseMirror_pre]:rounded-md [&_.ProseMirror_pre]:bg-background-muted [&_.ProseMirror_pre]:p-3 [&_.ProseMirror_pre]:font-mono [&_.ProseMirror_pre]:text-sm","[&_.ProseMirror_hr]:border-border-muted",r&&"pointer-events-none")}),l.isEmpty&&!r&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-4 top-4 text-text-muted",children:a})]})]}):null}function $m({name:e,defaultValue:o,label:t,description:r,reserveErrorSpace:a=true,...n}){let{control:i,formState:s}=reactHookForm.useFormContext(),l=I(s.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:i,name:e,defaultValue:o,render:({field:u})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[t&&jsxRuntime.jsx("label",{htmlFor:e,className:"text-sm font-medium text-text-heading",children:t}),r&&jsxRuntime.jsx("p",{className:"text-sm text-text-muted",children:r}),jsxRuntime.jsx(Et,{...n,id:e,initialContent:u.value??"",onChange:c=>u.onChange(c)}),l&&jsxRuntime.jsx("p",{className:"text-sm text-feedback-error-text",children:l}),a&&!l&&jsxRuntime.jsx("div",{className:"h-5"})]})})}function Hm({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(pt,{...t,selectedKey:i.value??null,onSelectionChange:s=>i.onChange(s),showErrors:!!n,errorMessage:n})})}var At={sm:{track:"h-4 w-7",handle:"h-3.5 w-3.5",text:"text-xs"},md:{track:"h-5 w-9",handle:"h-4 w-4",text:"text-sm"},lg:{track:"h-6 w-11",handle:"h-5 w-5",text:"text-base"},xl:{track:"h-7 w-14",handle:"h-6 w-6",text:"text-lg"}};function di({isSelected:e,isDisabled:o,variant:t="default",size:r="md"}){let a="flex px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",n=At[r].track,i=xe,s=t==="brand"?"focus-visible:outline-action-brand":"focus-visible:outline-action-default",l="";return e?t==="brand"?l="bg-action-brand forced-colors:!bg-[Highlight] group-pressed:bg-action-brand-hover":l="bg-action-default forced-colors:!bg-[Highlight] group-pressed:bg-action-default-hover":l="bg-gray-400 dark:bg-zinc-400 group-pressed:bg-gray-500 dark:group-pressed:bg-zinc-300",[a,n,i,s,l,o?"bg-gray-200 dark:bg-zinc-700 forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function ci({isSelected:e,isDisabled:o,size:t="md"}){let r="transform rounded-full bg-white dark:bg-zinc-900 outline-none shadow transition duration-200 ease-in-out",a=At[t].handle;return [r,a,e?"translate-x-[100%]":"translate-x-0",o?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function zt({children:e,variant:o="default",size:t="md",...r}){return jsxRuntime.jsx(reactAriaComponents.Switch,{...r,className:A(r.className,`group flex items-center gap-2 ${At[t].text} text-gray-800 transition disabled:text-gray-300 dark:text-zinc-200 dark:disabled:text-zinc-600 forced-colors:disabled:text-[GrayText]`),children:a=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:di({...a,variant:o,size:t}),children:jsxRuntime.jsx("span",{className:ci({...a,size:t})})}),e]})})}function Jm({name:e,defaultValue:o,...t}){let{control:r}=reactHookForm.useFormContext();return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:a})=>jsxRuntime.jsx(zt,{...t,isSelected:!!a.value,onChange:n=>a.onChange(n),children:t.children})})}var xi=e=>{let o=te({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),t=`min-h-[100px] py-2 ${e.isDisabled?"resize-none":e.isResizable?"resize-y":"resize-none"}`;return tailwindMerge.twMerge(o,t,e.className)};function Mt({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,required:n,transparent:i,isInvalid:s,isDisabled:l,isResizable:u=false,className:c,validationResult:d,reserveErrorSpace:x=true,...F}){let{isFocused:b,handleFocus:m,handleBlur:C}=ce();return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(z,{size:r,tooltip:a,isRequired:n,children:e}),jsxRuntime.jsx(Q,{children:jsxRuntime.jsx("textarea",{...F,required:n,onFocus:h=>{F.onFocus&&F.onFocus(h),m(h);},onBlur:h=>{F.onBlur&&F.onBlur(h),C(h);},className:xi({isInvalid:s,isDisabled:l,isResizable:u,isFocused:b,size:r,transparent:i,className:c}),disabled:l})}),x?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&d?jsxRuntime.jsx(p,{size:r,children:t(d)}):o?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&d?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(d)}):o?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})})}function up({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(Mt,{...t,value:i.value??"",onChange:s=>i.onChange(s.target.value),onBlur:s=>{i.onBlur(),t.onBlur?.(s);},isInvalid:!!n,errorMessage:n,required:t.required})})}function gp({name:e,defaultValue:o,...t}){let{control:r,formState:a}=reactHookForm.useFormContext(),n=I(a.errors,e);return jsxRuntime.jsx(reactHookForm.Controller,{control:r,name:e,defaultValue:o,render:({field:i})=>jsxRuntime.jsx(He,{...t,value:i.value??"",onChange:s=>i.onChange(s),onBlur:s=>{i.onBlur(),t.onBlur?.(s);},isInvalid:!!n,errorMessage:n,isRequired:t.isRequired})})}function Ni({isPlaceholder:e,isDisabled:o,size:t="md"}){return tailwindMerge.twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[t],e?"text-text-placeholder italic":"text-text-body",o?"text-text-disabled cursor-not-allowed":"cursor-text",!o&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-body")}function Ht({label:e,description:o,errorMessage:t,size:r="md",tooltip:a,isRequired:n,isDisabled:i,isInvalid:s,reserveErrorSpace:l=true,validationResult:u,className:c,descriptionPlacement:d="below",...x}){return jsxRuntime.jsxs(reactAriaComponents.TimeField,{...x,isDisabled:i,isRequired:n,isInvalid:s,className:A(c,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(z,{size:r,tooltip:a,description:d==="tooltip"||d==="inline"?o:void 0,descriptionPlacement:d,isRequired:n,children:e}),jsxRuntime.jsx(Q,{children:jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(Se({isInvalid:s,isDisabled:i}),"px-3 py-2 flex items-center gap-0.5 w-full"),children:F=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:F,className:Ni({isPlaceholder:F.isPlaceholder,isDisabled:!F.isEditable||i,size:r})})})}),l?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,children:t}):typeof t=="function"&&u?jsxRuntime.jsx(p,{size:r,children:t(u)}):o&&d==="below"?jsxRuntime.jsx(N,{size:r,children:o}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof t=="string"?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t}):typeof t=="function"&&u?jsxRuntime.jsx(p,{size:r,className:"mt-1",children:t(u)}):o&&d==="below"?jsxRuntime.jsx(N,{size:r,className:"mt-1",children:o}):null})]})}function Ap({name:e,...o}){let{control:t,formState:{errors:r}}=reactHookForm.useFormContext(),a=r[e],n=a?.message;return jsxRuntime.jsx(reactHookForm.Controller,{name:e,control:t,render:({field:i})=>jsxRuntime.jsx(Ht,{...o,value:i.value,onChange:i.onChange,isInvalid:!!a,errorMessage:n})})}function Op({className:e,title:o="Please fix the following errors:",autoFocus:t=true}){let{formState:r}=reactHookForm.useFormContext(),a=be__namespace.useRef(null),n=r.errors,i=Object.entries(n||{}),s=i.length>0;if(be__namespace.useEffect(()=>{t&&s&&a.current?.focus();},[t,s]),!s)return null;let l=u=>{let c=`[name="${CSS.escape(u)}"]`,d=document.querySelector(c);d&&(d.focus(),d.scrollIntoView({block:"center",behavior:"smooth"}));};return jsxRuntime.jsxs("div",{ref:a,role:"alert",tabIndex:-1,className:tailwindMerge.twMerge("rounded-md border border-feedback-error-border bg-feedback-error-background p-3 text-sm text-feedback-error-text",e),children:[jsxRuntime.jsx("div",{className:"font-medium",children:o}),jsxRuntime.jsx("ul",{className:"mt-2 list-disc pl-5",children:i.map(([u,c])=>{let d=c?.message||"Invalid value";return jsxRuntime.jsx("li",{children:jsxRuntime.jsx("button",{type:"button",className:"underline underline-offset-2",onClick:()=>l(u),children:d})},u)})})]})}function Up({formId:e,disableWhenInvalid:o,disableWhenPristine:t,isDisabled:r,children:a,...n}){let{formState:i}=reactHookForm.useFormContext(),s=r||i.isSubmitting||o&&!i.isValid||t&&!i.isDirty;return jsxRuntime.jsx(P,{type:"submit",form:e,isDisabled:s,...n,children:a})}var oe=({width:e,height:o,variant:t="rect",animation:r="pulse",gradient:a=false,flex:n=false,stack:i,responsive:s,delay:l=0,adjustAnimationSpeedBasedOnWidth:u=false,ariaLabel:c,className:d,"data-testid":x})=>{let[F,b]=be.useState(l===0);if(be.useEffect(()=>{if(l>0){let g=setTimeout(()=>b(true),l);return ()=>clearTimeout(g)}},[l]),!F)return null;let m=a?"bg-gradient-to-r from-[var(--color-skeleton-base)] via-[var(--color-skeleton-highlight)] to-[var(--color-skeleton-base)]":"bg-[var(--color-skeleton-base)]",C=u&&e?(()=>{let g=typeof e=="number"?e:parseFloat(String(e));return isNaN(g)?"":`animation-duration-[${Math.max(.8,g/100)}s]`})():"",h=r==="pulse"?`animate-pulse ${C}`:r==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--color-skeleton-wave)] before:to-transparent before:animate-wave ${C}`:"",v="rounded-sm";t==="circle"&&(v="rounded-full"),t==="text"&&(v="h-4 w-full rounded-sm");let $=n?"flex-1 min-w-0":"",L=s?Object.entries(s).map(([g,S])=>`${g}:w-[${S}]`).join(" "):"";return i?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":x,children:i.map((g,S)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(m,h,v,$,L,d),style:{width:g,height:o}},S))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(m,h,v,$,L,d),style:{width:e,height:o},role:"presentation","aria-hidden":!c,"aria-label":c??void 0,"data-testid":x})};var zi={outlined:"bg-background-surface border border-border-default",elevated:"bg-background-surface border-0 shadow-md",filled:"bg-background-muted border-0",ghost:"bg-transparent border-0 shadow-none"},Mi="rounded-lg",Ot={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},Hi={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function Pe({variant:e="outlined",className:o,children:t,isLoading:r=false}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",zi[e],Mi,o),"data-testid":"card",children:r?jsxRuntime.jsx(oe,{width:"100%",height:"100%",className:"rounded-none"}):t})}function Xe({title:e,subtitle:o,actions:t,className:r,isLoading:a=false}){return a?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",r),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx(oe,{width:120,height:20}),jsxRuntime.jsx(oe,{width:24,height:24})]}),o&&jsxRuntime.jsx(oe,{width:200,height:16})]}):!e&&!o&&!t?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",r),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(ze,{tag:"h3",size:"sm",className:"text-text-heading",children:e}):e}),o&&jsxRuntime.jsx("div",{className:"text-sm text-text-muted",children:o})]}),t&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:t})]})})}function Wo({src:e,alt:o,aspectRatio:t="auto",className:r,children:a,isLoading:n=false}){return n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("bg-background-muted",Ot[t],r),children:jsxRuntime.jsx(oe,{width:"100%",height:"100%"})}):a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Ot[t],r),children:a}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Ot[t],r),children:jsxRuntime.jsx("img",{src:e,alt:o||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function Ye({className:e,children:o,isLoading:t=false}){let a=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(a,e),children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(oe,{width:"100%",height:16}),jsxRuntime.jsx(oe,{width:"80%",height:16}),jsxRuntime.jsx(oe,{width:"60%",height:16})]})}):o?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 text-text-body",e),children:o}):null}function Ko({className:e,children:o,align:t="end",isLoading:r=false}){return r?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("px-6 py-4 flex gap-2 justify-end",e),children:[jsxRuntime.jsx(oe,{width:80,height:32}),jsxRuntime.jsx(oe,{width:60,height:32})]}):o?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 flex items-center gap-2",Hi[t],e),children:o}):null}Pe.Header=Xe;Pe.Media=Wo;Pe.Content=Ye;Pe.Footer=Ko;function mf({name:e,getItemTitle:o,renderItem:t,onAdd:r}){let{control:a}=reactHookForm.useFormContext(),{fields:n,append:i,remove:s,swap:l}=reactHookForm.useFieldArray({control:a,name:e});return jsxRuntime.jsxs("div",{className:"flex flex-col gap-3",children:[n.map((u,c)=>jsxRuntime.jsxs(Pe,{children:[jsxRuntime.jsx(Xe,{title:o?o(c):`Item ${c+1}`,actions:jsxRuntime.jsxs("div",{className:"flex gap-2",children:[c>0&&jsxRuntime.jsx(P,{size:"sm",variant:"secondary",onPress:()=>l(c,c-1),children:"Up"}),c<n.length-1&&jsxRuntime.jsx(P,{size:"sm",variant:"secondary",onPress:()=>l(c,c+1),children:"Down"}),jsxRuntime.jsx(P,{size:"sm",variant:"secondary",onPress:()=>s(c),children:"Remove"})]})}),jsxRuntime.jsx(Ye,{children:t(c)})]},u.id)),jsxRuntime.jsx("div",{children:jsxRuntime.jsx(P,{variant:"secondary",onPress:()=>i(r?.()||{}),children:"Add item"})})]})}function _t(e){return jsxRuntime.jsx(reactAriaComponents.Form,{validationBehavior:"aria",...e,className:tailwindMerge.twMerge("flex flex-col gap-6",e.className)})}function Uo(e){let o=e.querySelector("[aria-invalid='true'], .aria-invalid, [data-invalid='true']")||e.querySelector("input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true']")||e.querySelector("input, select, textarea");o&&(o.focus({preventScroll:false}),o instanceof HTMLElement&&o.scrollIntoView({block:"center",behavior:"smooth"}));}function Nf({id:e,onSubmit:o,onInvalid:t,children:r,shouldFocusError:a=true,className:n,...i}){let s=reactHookForm.useForm(i),l=(u,c)=>{if(a&&e){let d=document.getElementById(e);d&&Uo(d);}t?.(u,c);};return jsxRuntime.jsx(reactHookForm.FormProvider,{...s,children:jsxRuntime.jsx(_t,{id:e,className:n,onSubmit:s.handleSubmit(o,l),children:r})})}function Xo({formId:e,show:o,isSubmitting:t,onCancel:r,primaryLabel:a="Save changes",secondaryLabel:n="Cancel",className:i}){return o?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("fixed inset-x-0 bottom-0 z-40 border-t border-border-muted bg-background-surface/95 backdrop-blur supports-[backdrop-filter]:bg-background-surface/70",i),children:jsxRuntime.jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsxRuntime.jsx("div",{className:"text-sm text-text-muted",children:"You have unsaved changes"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(P,{variant:"secondary",onPress:r,children:n}),jsxRuntime.jsx(P,{type:"submit",form:e,isDisabled:!!t,children:t?"Saving...":a})]})]})}):null}function Ef({formId:e,onCancel:o,primaryLabel:t,secondaryLabel:r,className:a}){let{formState:n}=reactHookForm.useFormContext();return jsxRuntime.jsx(Xo,{formId:e,show:n.isDirty,isSubmitting:n.isSubmitting,onCancel:o,primaryLabel:t,secondaryLabel:r,className:a})}function Mf(e=true){let{formState:o}=reactHookForm.useFormContext();be__namespace.useEffect(()=>{if(!e||!o.isSubmitted||!o.errors||Object.keys(o.errors).length===0)return;let t=document.querySelector("[aria-invalid='true'], .aria-invalid, [data-invalid='true']")||document.querySelector("input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true']");t&&t.scrollIntoView({block:"center",behavior:"smooth"});},[e,o.isSubmitted,o.errors]);}function Of({delayMs:e=800,onAutoSave:o}){let{watch:t,formState:r,getValues:a}=reactHookForm.useFormContext(),n=be__namespace.useRef(void 0);be__namespace.useEffect(()=>{let i=t(()=>{r.isDirty&&(n.current&&window.clearTimeout(n.current),n.current=window.setTimeout(async()=>{let s=a();await o(s);},e));});return ()=>{i.unsubscribe(),n.current&&window.clearTimeout(n.current);}},[t,r.isDirty,a,e,o]);}exports.ErrorSummary=Op;exports.FieldArrayList=mf;exports.FormAutocomplete=ud;exports.FormCheckbox=wd;exports.FormCheckboxGroup=Ld;exports.FormColorField=Jd;exports.FormDateField=$c;exports.FormFileUpload=Uc;exports.FormNumberField=mu;exports.FormProvider=Nf;exports.FormRadioGroup=Vu;exports.FormRichTextEditor=$m;exports.FormSaveBar=Ef;exports.FormSelect=Hm;exports.FormSwitch=Jm;exports.FormTextArea=up;exports.FormTextField=gp;exports.FormTimeField=Ap;exports.SubmitButton=Up;exports.focusFirstError=Uo;exports.useAutoSave=Of;exports.useScrollIntoViewOnError=Mf;//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|