1 line
136 KiB
JavaScript
1 line
136 KiB
JavaScript
window.yoast=window.yoast||{},window.yoast.uiLibrary=function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=397)}({0:function(e,t){e.exports=window.yoast.propTypes},1:function(e,t){e.exports=window.wp.element},188:function(e,t,a){!function(e,t){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var n=a(t);function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s={error:null},o=function(e){var t,a;function o(){for(var t,a=arguments.length,n=new Array(a),r=0;r<a;r++)n[r]=arguments[r];return(t=e.call.apply(e,[this].concat(n))||this).state=s,t.resetErrorBoundary=function(){for(var e,a=arguments.length,n=new Array(a),r=0;r<a;r++)n[r]=arguments[r];null==t.props.onReset||(e=t.props).onReset.apply(e,n),t.reset()},t}a=e,(t=o).prototype=Object.create(a.prototype),t.prototype.constructor=t,r(t,a),o.getDerivedStateFromError=function(e){return{error:e}};var l=o.prototype;return l.reset=function(){this.setState(s)},l.componentDidCatch=function(e,t){var a,n;null==(a=(n=this.props).onError)||a.call(n,e,t)},l.componentDidUpdate=function(e,t){var a,n,r,s,o=this.state.error,l=this.props.resetKeys;null!==o&&null!==t.error&&(void 0===(r=e.resetKeys)&&(r=[]),void 0===(s=l)&&(s=[]),r.length!==s.length||r.some((function(e,t){return!Object.is(e,s[t])})))&&(null==(a=(n=this.props).onResetKeysChange)||a.call(n,e.resetKeys,l),this.reset())},l.render=function(){var e=this.state.error,t=this.props,a=t.fallbackRender,r=t.FallbackComponent,s=t.fallback;if(null!==e){var o={error:e,resetErrorBoundary:this.resetErrorBoundary};if(n.isValidElement(s))return s;if("function"==typeof a)return a(o);if(r)return n.createElement(r,o);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},o}(n.Component);e.ErrorBoundary=o,e.useErrorHandler=function(e){var t=n.useState(null),a=t[0],r=t[1];if(null!=e)throw e;if(null!=a)throw a;return r},e.withErrorBoundary=function(e,t){var a=function(a){return n.createElement(o,t,n.createElement(e,a))},r=e.displayName||e.name||"Unknown";return a.displayName="withErrorBoundary("+r+")",a},Object.defineProperty(e,"__esModule",{value:!0})}(t,a(3))},189:function(e,t){e.exports=window.yoast.reduxJsToolkit},2:function(e,t){e.exports=window.lodash},3:function(e,t){e.exports=window.React},34:function(e,t){e.exports=window.ReactDOM},397:function(e,t,a){"use strict";a.r(t),a.d(t,"Alert",(function(){return S})),a.d(t,"Autocomplete",(function(){return Dt})),a.d(t,"Badge",(function(){return zt})),a.d(t,"Button",(function(){return Xt})),a.d(t,"Checkbox",(function(){return la})),a.d(t,"Code",(function(){return pa})),a.d(t,"ErrorBoundary",(function(){return ba})),a.d(t,"Label",(function(){return na})),a.d(t,"Link",(function(){return ga})),a.d(t,"Paper",(function(){return wa})),a.d(t,"ProgressBar",(function(){return Sa})),a.d(t,"Radio",(function(){return Fa})),a.d(t,"Select",(function(){return sn})),a.d(t,"SkeletonLoader",(function(){return ln})),a.d(t,"Spinner",(function(){return Kt})),a.d(t,"Table",(function(){return yn})),a.d(t,"TagInput",(function(){return jn})),a.d(t,"TextInput",(function(){return Rn})),a.d(t,"Textarea",(function(){return Sn})),a.d(t,"Title",(function(){return In})),a.d(t,"Toggle",(function(){return Zn})),a.d(t,"ValidationIcon",(function(){return E})),a.d(t,"ValidationInput",(function(){return St})),a.d(t,"ValidationMessage",(function(){return R})),a.d(t,"AutocompleteField",(function(){return ar})),a.d(t,"Card",(function(){return cr})),a.d(t,"CheckboxGroup",(function(){return dr})),a.d(t,"ChildrenLimiter",(function(){return hr})),a.d(t,"FeatureUpsell",(function(){return Nr})),a.d(t,"FileImport",(function(){return qr})),a.d(t,"Modal",(function(){return ks})),a.d(t,"Notifications",(function(){return Ds})),a.d(t,"Pagination",(function(){return Qs})),a.d(t,"RadioGroup",(function(){return Xs})),a.d(t,"Root",(function(){return ao})),a.d(t,"SelectField",(function(){return oo})),a.d(t,"SidebarNavigation",(function(){return Eo})),a.d(t,"useNavigationContext",(function(){return ho})),a.d(t,"TagField",(function(){return wo})),a.d(t,"TextField",(function(){return So})),a.d(t,"TextareaField",(function(){return Fo})),a.d(t,"ToggleField",(function(){return qo})),a.d(t,"useBeforeUnload",(function(){return Ao})),a.d(t,"useDescribedBy",(function(){return Xn})),a.d(t,"usePrevious",(function(){return Bo})),a.d(t,"useRootContext",(function(){return Ho})),a.d(t,"useSvgAria",(function(){return d})),a.d(t,"useToggleState",(function(){return gr})),a.d(t,"useMediaQuery",(function(){return zo})),a.d(t,"useModalContext",(function(){return ws})),a.d(t,"FILE_IMPORT_STATUS",(function(){return kr})),a.d(t,"VALIDATION_VARIANTS",(function(){return g})),a.d(t,"VALIDATION_ICON_MAP",(function(){return O}));var n=a(7),r=a.n(n),s=a(1),o=a(8),l=a.n(o),i=a(0),c=a.n(i),u=a(2),d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Object(s.useMemo)(()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t},[e])},p=a(3),b=a.n(p),m=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))})),f=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))})),y=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"}))}));const v=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))})),g={success:"success",warning:"warning",info:"info",error:"error"},O={success:m,warning:f,info:y,error:v},h={variant:{success:"yst-validation-icon--success",warning:"yst-validation-icon--warning",info:"yst-validation-icon--info",error:"yst-validation-icon--error"}},j=e=>{let{variant:t="info",className:a="",...n}=e;const o=Object(s.useMemo)(()=>O[t],[t]),i=d();return o?Object(s.createElement)(o,r()({},i,n,{className:l()("yst-validation-icon",h.variant[t],a)})):null};j.propTypes={variant:c.a.oneOf(Object(u.values)(g)),className:c.a.string};var E=j;const x={variant:{success:"yst-validation-message--success",warning:"yst-validation-message--warning",info:"yst-validation-message--info",error:"yst-validation-message--error"}},N=e=>{let{as:t="p",variant:a="info",children:n,className:o="",...i}=e;return Object(s.createElement)(t,r()({},i,{className:l()("yst-validation-message",x.variant[a],o)}),n)};N.propTypes={as:c.a.elementType,variant:c.a.oneOf(Object(u.keys)(x.variant)),message:c.a.node,className:c.a.string,children:c.a.node.isRequired};var R=N;const w={variant:{info:"yst-alert--info",warning:"yst-alert--warning",success:"yst-alert--success",error:"yst-alert--error"}},T={alert:"alert",status:"status"},P=Object(s.forwardRef)((e,t)=>{let{children:a,role:n="status",as:o="span",variant:i="info",className:c="",...u}=e;return Object(s.createElement)(o,r()({ref:t,className:l()("yst-alert",w.variant[i],c),role:T[n]},u),Object(s.createElement)(E,{variant:i,className:"yst-alert__icon"}),Object(s.createElement)(R,{as:"div",variant:i,className:"yst-alert__message"},a))}),C={children:c.a.node.isRequired,as:c.a.elementType,variant:c.a.oneOf(Object.keys(w.variant)),className:c.a.string,role:c.a.oneOf(Object.keys(T))};P.propTypes=C,P.defaultProps={as:"span",variant:"info",className:"",role:"status"};var S=P;const k=e=>Object(s.createElement)(P,e);k.propTypes=P.propTypes,k.DefaultProps=P.defaultProps,k.displayName="Alert";var _=Object.defineProperty,L=(e,t,a)=>(((e,t,a)=>{t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a);let F=new class{constructor(){L(this,"current",this.detect()),L(this,"handoffState","pending"),L(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},M=(e,t)=>{F.isServer?Object(p.useEffect)(e,t):Object(p.useLayoutEffect)(e,t)};function I(e){let t=Object(p.useRef)(e);return M(()=>{t.current=e},[e]),t}function D(e,t){let[a,n]=Object(p.useState)(e),r=I(e);return M(()=>n(r.current),[r,n,...t]),a}function q(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function A(){let e=[],t=[],a={enqueue(e){t.push(e)},addEventListener:(e,t,n,r)=>(e.addEventListener(t,n,r),a.add(()=>e.removeEventListener(t,n,r))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return a.add(()=>cancelAnimationFrame(t))},nextFrame:(...e)=>a.requestAnimationFrame(()=>a.requestAnimationFrame(...e)),setTimeout(...e){let t=setTimeout(...e);return a.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return q(()=>{t.current&&e[0]()}),a.add(()=>{t.current=!1})},add:t=>(e.push(t),()=>{let a=e.indexOf(t);if(a>=0){let[t]=e.splice(a,1);t()}}),dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return a}function B(){let[e]=Object(p.useState)(A);return Object(p.useEffect)(()=>()=>e.dispose(),[e]),e}let H=function(e){let t=I(e);return b.a.useCallback((...e)=>t.current(...e),[t])};function z(){let[e,t]=Object(p.useState)(F.isHandoffComplete);return e&&!1===F.isHandoffComplete&&t(!1),Object(p.useEffect)(()=>{!0!==e&&t(!0)},[e]),Object(p.useEffect)(()=>F.handoff(),[]),e}var U;let V=null!=(U=b.a.useId)?U:function(){let e=z(),[t,a]=b.a.useState(e?()=>F.nextId():null);return M(()=>{null===t&&a(F.nextId())},[t]),null!=t?""+t:void 0};function $(e,t,...a){if(e in t){let n=t[e];return"function"==typeof n?n(...a):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,$),n}function W(e){return F.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let G=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>e+":not([tabindex='-1'])").join(",");var K,Q,Y,Z=((Y=Z||{})[Y.First=1]="First",Y[Y.Previous=2]="Previous",Y[Y.Next=4]="Next",Y[Y.Last=8]="Last",Y[Y.WrapAround=16]="WrapAround",Y[Y.NoScroll=32]="NoScroll",Y),X=((Q=X||{})[Q.Error=0]="Error",Q[Q.Overflow=1]="Overflow",Q[Q.Success=2]="Success",Q[Q.Underflow=3]="Underflow",Q),J=((K=J||{})[K.Previous=-1]="Previous",K[K.Next=1]="Next",K);var ee=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ee||{});function te(e,t=0){var a;return e!==(null==(a=W(e))?void 0:a.body)&&$(t,{0:()=>e.matches(G),1(){let t=e;for(;null!==t;){if(t.matches(G))return!0;t=t.parentElement}return!1}})}function ae(e){null==e||e.focus({preventScroll:!0})}let ne=["textarea","input"].join(",");function re(e,t=(e=>e)){return e.slice().sort((e,a)=>{let n=t(e),r=t(a);if(null===n||null===r)return 0;let s=n.compareDocumentPosition(r);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function se(e,t,{sorted:a=!0,relativeTo:n=null,skipElements:r=[]}={}){let s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?a?re(e):e:function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(G)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e);r.length>0&&o.length>1&&(o=o.filter(e=>!r.includes(e))),n=null!=n?n:s.activeElement;let l,i=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,o.indexOf(n))-1;if(4&t)return Math.max(0,o.indexOf(n))+1;if(8&t)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,p=o.length;do{if(d>=p||d+p<=0)return 0;let e=c+d;if(16&t)e=(e+p)%p;else{if(e<0)return 3;if(e>=p)return 1}l=o[e],null==l||l.focus(u),d+=i}while(l!==s.activeElement);return 6&t&&function(e){var t,a;return null!=(a=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,ne))&&a}(l)&&l.select(),l.hasAttribute("tabindex")||l.setAttribute("tabindex","0"),2}function oe(e,t,a){let n=I(t);Object(p.useEffect)(()=>{function t(e){n.current(e)}return document.addEventListener(e,t,a),()=>document.removeEventListener(e,t,a)},[e,a])}function le(e,t,a=!0){let n=Object(p.useRef)(!1);function r(a,r){if(!n.current||a.defaultPrevented)return;let s=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e),o=r(a);if(null!==o&&o.getRootNode().contains(o)){for(let e of s){if(null===e)continue;let t=e instanceof HTMLElement?e:e.current;if(null!=t&&t.contains(o)||a.composed&&a.composedPath().includes(t))return}return!te(o,ee.Loose)&&-1!==o.tabIndex&&a.preventDefault(),t(a,o)}}Object(p.useEffect)(()=>{requestAnimationFrame(()=>{n.current=a})},[a]);let s=Object(p.useRef)(null);oe("mousedown",e=>{var t,a;n.current&&(s.current=(null==(a=null==(t=e.composedPath)?void 0:t.call(e))?void 0:a[0])||e.target)},!0),oe("click",e=>{!s.current||(r(e,()=>s.current),s.current=null)},!0),oe("blur",e=>r(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ie(e){var t;if(e.type)return e.type;let a=null!=(t=e.as)?t:"button";return"string"==typeof a&&"button"===a.toLowerCase()?"button":void 0}function ce(e,t){let[a,n]=Object(p.useState)(()=>ie(e));return M(()=>{n(ie(e))},[e.type,e.as]),M(()=>{a||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[a,t]),a}let ue=Symbol();function de(...e){let t=Object(p.useRef)(e);Object(p.useEffect)(()=>{t.current=e},[e]);let a=H(e=>{for(let a of t.current)null!=a&&("function"==typeof a?a(e):a.current=e)});return e.every(e=>null==e||(null==e?void 0:e[ue]))?void 0:a}var pe,be=((pe=be||{})[pe.First=0]="First",pe[pe.Previous=1]="Previous",pe[pe.Next=2]="Next",pe[pe.Last=3]="Last",pe[pe.Specific=4]="Specific",pe[pe.Nothing=5]="Nothing",pe);function me(e,t){let a=t.resolveItems();if(a.length<=0)return null;let n=t.resolveActiveIndex(),r=null!=n?n:-1,s=(()=>{switch(e.focus){case 0:return a.findIndex(e=>!t.resolveDisabled(e));case 1:{let e=a.slice().reverse().findIndex((e,a,n)=>!(-1!==r&&n.length-a-1>=r||t.resolveDisabled(e)));return-1===e?e:a.length-1-e}case 2:return a.findIndex((e,a)=>!(a<=r||t.resolveDisabled(e)));case 3:{let e=a.slice().reverse().findIndex(e=>!t.resolveDisabled(e));return-1===e?e:a.length-1-e}case 4:return a.findIndex(a=>t.resolveId(a)===e.id);case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===s?n:s}function fe(...e){return e.filter(Boolean).join(" ")}var ye,ve=((ye=ve||{})[ye.None=0]="None",ye[ye.RenderStrategy=1]="RenderStrategy",ye[ye.Static=2]="Static",ye),ge=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ge||{});function Oe({ourProps:e,theirProps:t,slot:a,defaultTag:n,features:r,visible:s=!0,name:o}){let l=je(t,e);if(s)return he(l,a,n,o);let i=null!=r?r:0;if(2&i){let{static:e=!1,...t}=l;if(e)return he(t,a,n,o)}if(1&i){let{unmount:e=!0,...t}=l;return $(e?0:1,{0:()=>null,1:()=>he({...t,hidden:!0,style:{display:"none"}},a,n,o)})}return he(l,a,n,o)}function he(e,t={},a,n){var r;let{as:s=a,children:o,refName:l="ref",...i}=Ne(e,["unmount","static"]),c=void 0!==e.ref?{[l]:e.ref}:{},u="function"==typeof o?o(t):o;i.className&&"function"==typeof i.className&&(i.className=i.className(t));let d={};if(t){let e=!1,a=[];for(let[n,r]of Object.entries(t))"boolean"==typeof r&&(e=!0),!0===r&&a.push(n);e&&(d["data-headlessui-state"]=a.join(" "))}if(s===p.Fragment&&Object.keys(xe(i)).length>0){if(!Object(p.isValidElement)(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(i).map(e=>" - "+e).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>" - "+e).join("\n")].join("\n"));let e=fe(null==(r=u.props)?void 0:r.className,i.className),t=e?{className:e}:{};return Object(p.cloneElement)(u,Object.assign({},je(u.props,xe(Ne(i,["ref"]))),d,c,function(...e){return{ref:e.every(e=>null==e)?void 0:t=>{for(let a of e)null!=a&&("function"==typeof a?a(t):a.current=t)}}}(u.ref,c.ref),t))}return Object(p.createElement)(s,Object.assign({},Ne(i,["ref"]),s!==p.Fragment&&c,s!==p.Fragment&&d),u)}function je(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},a={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=a[e]||(a[e]=[]),a[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(a).map(e=>[e,void 0])));for(let e in a)Object.assign(t,{[e](t,...n){let r=a[e];for(let e of r){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...n)}}});return t}function Ee(e){var t;return Object.assign(Object(p.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function xe(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function Ne(e,t=[]){let a=Object.assign({},e);for(let e of t)e in a&&delete a[e];return a}function Re(e){let t=e.parentElement,a=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(a=t),t=t.parentElement;let n=""===(null==t?void 0:t.getAttribute("disabled"));return(!n||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(a))&&n}function we(e={},t=null,a=[]){for(let[n,r]of Object.entries(e))Pe(a,Te(t,n),r);return a}function Te(e,t){return e?e+"["+t+"]":t}function Pe(e,t,a){if(Array.isArray(a))for(let[n,r]of a.entries())Pe(e,Te(t,n.toString()),r);else a instanceof Date?e.push([t,a.toISOString()]):"boolean"==typeof a?e.push([t,a?"1":"0"]):"string"==typeof a?e.push([t,a]):"number"==typeof a?e.push([t,""+a]):null==a?e.push([t,""]):we(a,t,e)}var Ce=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ce||{});let Se=Ee((function(e,t){let{features:a=1,...n}=e;return Oe({ourProps:{ref:t,"aria-hidden":2==(2&a)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&a)&&2!=(2&a)&&{display:"none"}}},theirProps:n,slot:{},defaultTag:"div",name:"Hidden"})})),ke=Object(p.createContext)(null);ke.displayName="OpenClosedContext";var _e=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(_e||{});function Le(){return Object(p.useContext)(ke)}function Fe({value:e,children:t}){return b.a.createElement(ke.Provider,{value:e},t)}var Me=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Me||{});function Ie(e,t,a){let[n,r]=Object(p.useState)(a),s=void 0!==e,o=Object(p.useRef)(s),l=Object(p.useRef)(!1),i=Object(p.useRef)(!1);return!s||o.current||l.current?!s&&o.current&&!i.current&&(i.current=!0,o.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(l.current=!0,o.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[s?e:n,H(e=>(s||r(e),null==t?void 0:t(e)))]}function De(e,t){let a=Object(p.useRef)([]),n=H(e);Object(p.useEffect)(()=>{let e=[...a.current];for(let[r,s]of t.entries())if(a.current[r]!==s){let r=n(t,e);return a.current=t,r}},[n,...t])}function qe(e){return[e.screenX,e.screenY]}function Ae(){let e=Object(p.useRef)([-1,-1]);return{wasMoved(t){let a=qe(t);return(e.current[0]!==a[0]||e.current[1]!==a[1])&&(e.current=a,!0)},update(t){e.current=qe(t)}}}var Be,He=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(He||{}),ze=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(ze||{}),Ue=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ue||{}),Ve=((Be=Ve||{})[Be.OpenCombobox=0]="OpenCombobox",Be[Be.CloseCombobox=1]="CloseCombobox",Be[Be.GoToOption=2]="GoToOption",Be[Be.RegisterOption=3]="RegisterOption",Be[Be.UnregisterOption=4]="UnregisterOption",Be[Be.RegisterLabel=5]="RegisterLabel",Be);function $e(e,t=(e=>e)){let a=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=re(t(e.options.slice()),e=>e.dataRef.current.domRef.current),r=a?n.indexOf(a):null;return-1===r&&(r=null),{options:n,activeOptionIndex:r}}let We={1:e=>e.dataRef.current.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1},0(e){if(e.dataRef.current.disabled||0===e.comboboxState)return e;let t=e.activeOptionIndex,{isSelected:a}=e.dataRef.current,n=e.options.findIndex(e=>a(e.dataRef.current.value));return-1!==n&&(t=n),{...e,comboboxState:0,activeOptionIndex:t}},2(e,t){var a;if(e.dataRef.current.disabled||e.dataRef.current.optionsRef.current&&!e.dataRef.current.optionsPropsRef.current.static&&1===e.comboboxState)return e;let n=$e(e);if(null===n.activeOptionIndex){let e=n.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(n.activeOptionIndex=e)}let r=me(t,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...n,activeOptionIndex:r,activationTrigger:null!=(a=t.trigger)?a:1}},3:(e,t)=>{let a={id:t.id,dataRef:t.dataRef},n=$e(e,e=>[...e,a]);null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(a));let r={...e,...n,activationTrigger:1};return e.dataRef.current.__demoMode&&void 0===e.dataRef.current.value&&(r.activeOptionIndex=0),r},4:(e,t)=>{let a=$e(e,e=>{let a=e.findIndex(e=>e.id===t.id);return-1!==a&&e.splice(a,1),e});return{...e,...a,activationTrigger:1}},5:(e,t)=>({...e,labelId:t.id})},Ge=Object(p.createContext)(null);function Ke(e){let t=Object(p.useContext)(Ge);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ke),t}return t}Ge.displayName="ComboboxActionsContext";let Qe=Object(p.createContext)(null);function Ye(e){let t=Object(p.useContext)(Qe);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ye),t}return t}function Ze(e,t){return $(t.type,We,e,t)}Qe.displayName="ComboboxDataContext";let Xe=p.Fragment,Je=Ee((function(e,t){let{value:a,defaultValue:n,onChange:r,name:s,by:o=((e,t)=>e===t),disabled:l=!1,__demoMode:i=!1,nullable:c=!1,multiple:u=!1,...d}=e,[m=(u?[]:void 0),f]=Ie(a,r,n),[y,v]=Object(p.useReducer)(Ze,{dataRef:Object(p.createRef)(),comboboxState:i?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),g=Object(p.useRef)(!1),O=Object(p.useRef)({static:!1,hold:!1}),h=Object(p.useRef)(null),j=Object(p.useRef)(null),E=Object(p.useRef)(null),x=Object(p.useRef)(null),N=H("string"==typeof o?(e,t)=>{let a=o;return(null==e?void 0:e[a])===(null==t?void 0:t[a])}:o),R=Object(p.useCallback)(e=>$(w.mode,{1:()=>m.some(t=>N(t,e)),0:()=>N(m,e)}),[m]),w=Object(p.useMemo)(()=>({...y,optionsPropsRef:O,labelRef:h,inputRef:j,buttonRef:E,optionsRef:x,value:m,defaultValue:n,disabled:l,mode:u?1:0,get activeOptionIndex(){if(g.current&&null===y.activeOptionIndex&&y.options.length>0){let e=y.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==e)return e}return y.activeOptionIndex},compare:N,isSelected:R,nullable:c,__demoMode:i}),[m,n,l,u,c,i,y]);M(()=>{y.dataRef.current=w},[w]),le([w.buttonRef,w.inputRef,w.optionsRef],()=>D.closeCombobox(),0===w.comboboxState);let T=Object(p.useMemo)(()=>({open:0===w.comboboxState,disabled:l,activeIndex:w.activeOptionIndex,activeOption:null===w.activeOptionIndex?null:w.options[w.activeOptionIndex].dataRef.current.value,value:m}),[w,l,m]),P=H(e=>{let t=w.options.find(t=>t.id===e);!t||I(t.dataRef.current.value)}),C=H(()=>{if(null!==w.activeOptionIndex){let{dataRef:e,id:t}=w.options[w.activeOptionIndex];I(e.current.value),D.goToOption(be.Specific,t)}}),S=H(()=>{v({type:0}),g.current=!0}),k=H(()=>{v({type:1}),g.current=!1}),_=H((e,t,a)=>(g.current=!1,e===be.Specific?v({type:2,focus:be.Specific,id:t,trigger:a}):v({type:2,focus:e,trigger:a}))),L=H((e,t)=>(v({type:3,id:e,dataRef:t}),()=>v({type:4,id:e}))),F=H(e=>(v({type:5,id:e}),()=>v({type:5,id:null}))),I=H(e=>$(w.mode,{0:()=>null==f?void 0:f(e),1(){let t=w.value.slice(),a=t.findIndex(t=>N(t,e));return-1===a?t.push(e):t.splice(a,1),null==f?void 0:f(t)}})),D=Object(p.useMemo)(()=>({onChange:I,registerOption:L,registerLabel:F,goToOption:_,closeCombobox:k,openCombobox:S,selectActiveOption:C,selectOption:P}),[]),q=null===t?{}:{ref:t},A=Object(p.useRef)(null),z=B();return Object(p.useEffect)(()=>{!A.current||void 0!==n&&z.addEventListener(A.current,"reset",()=>{I(n)})},[A,I]),b.a.createElement(Ge.Provider,{value:D},b.a.createElement(Qe.Provider,{value:w},b.a.createElement(Fe,{value:$(w.comboboxState,{0:_e.Open,1:_e.Closed})},null!=s&&null!=m&&we({[s]:m}).map(([e,t],a)=>b.a.createElement(Se,{features:Ce.Hidden,ref:0===a?e=>{var t;A.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...xe({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:t})})),Oe({ourProps:q,theirProps:d,slot:T,defaultTag:Xe,name:"Combobox"}))))})),et=Ee((function(e,t){var a,n,r,s;let o=V(),{id:l="headlessui-combobox-input-"+o,onChange:i,displayValue:c,type:u="text",...d}=e,b=Ye("Combobox.Input"),m=Ke("Combobox.Input"),f=de(b.inputRef,t),y=Object(p.useRef)(!1),v=B();var g;De(([e,t],[a,n])=>{y.current||!b.inputRef.current||(0===n&&1===t||e!==a)&&(b.inputRef.current.value=e)},["function"==typeof c&&void 0!==b.value?null!=(g=c(b.value))?g:"":"string"==typeof b.value?b.value:"",b.comboboxState]),De(([e],[t])=>{if(0===e&&1===t){let e=b.inputRef.current;if(!e)return;let t=e.value,{selectionStart:a,selectionEnd:n,selectionDirection:r}=e;e.value="",e.value=t,null!==r?e.setSelectionRange(a,n,r):e.setSelectionRange(a,n)}},[b.comboboxState]);let O=Object(p.useRef)(!1),h=H(()=>{O.current=!0}),j=H(()=>{setTimeout(()=>{O.current=!1})}),E=H(e=>{switch(y.current=!0,e.key){case Me.Backspace:case Me.Delete:if(0!==b.mode||!b.nullable)return;let t=e.currentTarget;v.requestAnimationFrame(()=>{""===t.value&&(m.onChange(null),b.optionsRef.current&&(b.optionsRef.current.scrollTop=0),m.goToOption(be.Nothing))});break;case Me.Enter:if(y.current=!1,0!==b.comboboxState||O.current)return;if(e.preventDefault(),e.stopPropagation(),null===b.activeOptionIndex)return void m.closeCombobox();m.selectActiveOption(),0===b.mode&&m.closeCombobox();break;case Me.ArrowDown:return y.current=!1,e.preventDefault(),e.stopPropagation(),$(b.comboboxState,{0:()=>{m.goToOption(be.Next)},1:()=>{m.openCombobox()}});case Me.ArrowUp:return y.current=!1,e.preventDefault(),e.stopPropagation(),$(b.comboboxState,{0:()=>{m.goToOption(be.Previous)},1:()=>{m.openCombobox(),v.nextFrame(()=>{b.value||m.goToOption(be.Last)})}});case Me.Home:if(e.shiftKey)break;return y.current=!1,e.preventDefault(),e.stopPropagation(),m.goToOption(be.First);case Me.PageUp:return y.current=!1,e.preventDefault(),e.stopPropagation(),m.goToOption(be.First);case Me.End:if(e.shiftKey)break;return y.current=!1,e.preventDefault(),e.stopPropagation(),m.goToOption(be.Last);case Me.PageDown:return y.current=!1,e.preventDefault(),e.stopPropagation(),m.goToOption(be.Last);case Me.Escape:return y.current=!1,0!==b.comboboxState?void 0:(e.preventDefault(),b.optionsRef.current&&!b.optionsPropsRef.current.static&&e.stopPropagation(),m.closeCombobox());case Me.Tab:if(y.current=!1,0!==b.comboboxState)return;0===b.mode&&m.selectActiveOption(),m.closeCombobox()}}),x=H(e=>{m.openCombobox(),null==i||i(e)}),N=H(()=>{y.current=!1}),R=D(()=>{if(b.labelId)return[b.labelId].join(" ")},[b.labelId]),w=Object(p.useMemo)(()=>({open:0===b.comboboxState,disabled:b.disabled}),[b]);return Oe({ourProps:{ref:f,id:l,role:"combobox",type:u,"aria-controls":null==(a=b.optionsRef.current)?void 0:a.id,"aria-expanded":b.disabled?void 0:0===b.comboboxState,"aria-activedescendant":null===b.activeOptionIndex||null==(n=b.options[b.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===b.mode||void 0,"aria-labelledby":R,"aria-autocomplete":"list",defaultValue:null!=(s=null!=(r=e.defaultValue)?r:void 0!==b.defaultValue?null==c?void 0:c(b.defaultValue):null)?s:b.defaultValue,disabled:b.disabled,onCompositionStart:h,onCompositionEnd:j,onKeyDown:E,onChange:x,onBlur:N},theirProps:d,slot:w,defaultTag:"input",name:"Combobox.Input"})})),tt=Ee((function(e,t){var a;let n=Ye("Combobox.Button"),r=Ke("Combobox.Button"),s=de(n.buttonRef,t),o=V(),{id:l="headlessui-combobox-button-"+o,...i}=e,c=B(),u=H(e=>{switch(e.key){case Me.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===n.comboboxState&&r.openCombobox(),c.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})});case Me.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===n.comboboxState&&(r.openCombobox(),c.nextFrame(()=>{n.value||r.goToOption(be.Last)})),c.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})});case Me.Escape:return 0!==n.comboboxState?void 0:(e.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&e.stopPropagation(),r.closeCombobox(),c.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})}));default:return}}),d=H(e=>{if(Re(e.currentTarget))return e.preventDefault();0===n.comboboxState?r.closeCombobox():(e.preventDefault(),r.openCombobox()),c.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})})}),b=D(()=>{if(n.labelId)return[n.labelId,l].join(" ")},[n.labelId,l]),m=Object(p.useMemo)(()=>({open:0===n.comboboxState,disabled:n.disabled,value:n.value}),[n]);return Oe({ourProps:{ref:s,id:l,type:ce(e,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(a=n.optionsRef.current)?void 0:a.id,"aria-expanded":n.disabled?void 0:0===n.comboboxState,"aria-labelledby":b,disabled:n.disabled,onClick:d,onKeyDown:u},theirProps:i,slot:m,defaultTag:"button",name:"Combobox.Button"})})),at=Ee((function(e,t){let a=V(),{id:n="headlessui-combobox-label-"+a,...r}=e,s=Ye("Combobox.Label"),o=Ke("Combobox.Label"),l=de(s.labelRef,t);M(()=>o.registerLabel(n),[n]);let i=H(()=>{var e;return null==(e=s.inputRef.current)?void 0:e.focus({preventScroll:!0})}),c=Object(p.useMemo)(()=>({open:0===s.comboboxState,disabled:s.disabled}),[s]);return Oe({ourProps:{ref:l,id:n,onClick:i},theirProps:r,slot:c,defaultTag:"label",name:"Combobox.Label"})})),nt=ve.RenderStrategy|ve.Static,rt=Ee((function(e,t){let a=V(),{id:n="headlessui-combobox-options-"+a,hold:r=!1,...s}=e,o=Ye("Combobox.Options"),l=de(o.optionsRef,t),i=Le(),c=null!==i?i===_e.Open:0===o.comboboxState;return M(()=>{var t;o.optionsPropsRef.current.static=null!=(t=e.static)&&t},[o.optionsPropsRef,e.static]),M(()=>{o.optionsPropsRef.current.hold=r},[o.optionsPropsRef,r]),function({container:e,accept:t,walk:a,enabled:n=!0}){let r=Object(p.useRef)(t),s=Object(p.useRef)(a);Object(p.useEffect)(()=>{r.current=t,s.current=a},[t,a]),M(()=>{if(!e||!n)return;let t=W(e);if(!t)return;let a=r.current,o=s.current,l=Object.assign(e=>a(e),{acceptNode:a}),i=t.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,l,!1);for(;i.nextNode();)o(i.currentNode)},[e,n,r,s])}({container:o.optionsRef.current,enabled:0===o.comboboxState,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}}),Oe({ourProps:{"aria-labelledby":D(()=>{var e,t;return null!=(t=o.labelId)?t:null==(e=o.buttonRef.current)?void 0:e.id},[o.labelId,o.buttonRef.current]),role:"listbox",id:n,ref:l},theirProps:s,slot:Object(p.useMemo)(()=>({open:0===o.comboboxState}),[o]),defaultTag:"ul",features:nt,visible:c,name:"Combobox.Options"})})),st=Ee((function(e,t){var a,n;let r=V(),{id:s="headlessui-combobox-option-"+r,disabled:o=!1,value:l,...i}=e,c=Ye("Combobox.Option"),u=Ke("Combobox.Option"),d=null!==c.activeOptionIndex&&c.options[c.activeOptionIndex].id===s,b=c.isSelected(l),m=Object(p.useRef)(null),f=I({disabled:o,value:l,domRef:m,textValue:null==(n=null==(a=m.current)?void 0:a.textContent)?void 0:n.toLowerCase()}),y=de(t,m),v=H(()=>u.selectOption(s));M(()=>u.registerOption(s,f),[f,s]);let g=Object(p.useRef)(!c.__demoMode);M(()=>{if(!c.__demoMode)return;let e=A();return e.requestAnimationFrame(()=>{g.current=!0}),e.dispose},[]),M(()=>{if(0!==c.comboboxState||!d||!g.current||0===c.activationTrigger)return;let e=A();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=m.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[m,d,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let O=H(e=>{if(o)return e.preventDefault();v(),0===c.mode&&u.closeCombobox()}),h=H(()=>{if(o)return u.goToOption(be.Nothing);u.goToOption(be.Specific,s)}),j=Ae(),E=H(e=>j.update(e)),x=H(e=>{!j.wasMoved(e)||o||d||u.goToOption(be.Specific,s,0)}),N=H(e=>{!j.wasMoved(e)||o||!d||c.optionsPropsRef.current.hold||u.goToOption(be.Nothing)}),R=Object(p.useMemo)(()=>({active:d,selected:b,disabled:o}),[d,b,o]);return Oe({ourProps:{id:s,ref:y,role:"option",tabIndex:!0===o?void 0:-1,"aria-disabled":!0===o||void 0,"aria-selected":b,disabled:void 0,onClick:O,onFocus:h,onPointerEnter:E,onMouseEnter:E,onPointerMove:x,onMouseMove:x,onPointerLeave:N,onMouseLeave:N},theirProps:i,slot:R,defaultTag:"li",name:"Combobox.Option"})})),ot=Object.assign(Je,{Input:et,Button:tt,Label:at,Options:rt,Option:st});function lt(){let e=Object(p.useRef)(!1);return M(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function it(e,...t){e&&t.length>0&&e.classList.add(...t)}function ct(e,...t){e&&t.length>0&&e.classList.remove(...t)}function ut(e=""){return e.split(" ").filter(e=>e.trim().length>1)}let dt=Object(p.createContext)(null);dt.displayName="TransitionContext";var pt,bt=((pt=bt||{}).Visible="visible",pt.Hidden="hidden",pt);let mt=Object(p.createContext)(null);function ft(e){return"children"in e?ft(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function yt(e,t){let a=I(e),n=Object(p.useRef)([]),r=lt(),s=B(),o=H((e,t=ge.Hidden)=>{let o=n.current.findIndex(({el:t})=>t===e);-1!==o&&($(t,{[ge.Unmount](){n.current.splice(o,1)},[ge.Hidden](){n.current[o].state="hidden"}}),s.microTask(()=>{var e;!ft(n)&&r.current&&(null==(e=a.current)||e.call(a))}))}),l=H(e=>{let t=n.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>o(e,ge.Unmount)}),i=Object(p.useRef)([]),c=Object(p.useRef)(Promise.resolve()),u=Object(p.useRef)({enter:[],leave:[],idle:[]}),d=H((e,a,n)=>{i.current.splice(0),t&&(t.chains.current[a]=t.chains.current[a].filter(([t])=>t!==e)),null==t||t.chains.current[a].push([e,new Promise(e=>{i.current.push(e)})]),null==t||t.chains.current[a].push([e,new Promise(e=>{Promise.all(u.current[a].map(([e,t])=>t)).then(()=>e())})]),"enter"===a?c.current=c.current.then(()=>null==t?void 0:t.wait.current).then(()=>n(a)):n(a)}),b=H((e,t,a)=>{Promise.all(u.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=i.current.shift())||e()}).then(()=>a(t))});return Object(p.useMemo)(()=>({children:n,register:l,unregister:o,onStart:d,onStop:b,wait:c,chains:u}),[l,o,n,d,b,u,c])}function vt(){}mt.displayName="NestingContext";let gt=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ot(e){var t;let a={};for(let n of gt)a[n]=null!=(t=e[n])?t:vt;return a}let ht=ve.RenderStrategy,jt=Ee((function(e,t){let{beforeEnter:a,afterEnter:n,beforeLeave:r,afterLeave:s,enter:o,enterFrom:l,enterTo:i,entered:c,leave:u,leaveFrom:d,leaveTo:m,...f}=e,y=Object(p.useRef)(null),v=de(y,t),g=f.unmount?ge.Unmount:ge.Hidden,{show:O,appear:h,initial:j}=function(){let e=Object(p.useContext)(dt);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,x]=Object(p.useState)(O?"visible":"hidden"),N=function(){let e=Object(p.useContext)(mt);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:R,unregister:w}=N,T=Object(p.useRef)(null);Object(p.useEffect)(()=>R(y),[R,y]),Object(p.useEffect)(()=>{if(g===ge.Hidden&&y.current)return O&&"visible"!==E?void x("visible"):$(E,{hidden:()=>w(y),visible:()=>R(y)})},[E,y,R,w,O,g]);let P=I({enter:ut(o),enterFrom:ut(l),enterTo:ut(i),entered:ut(c),leave:ut(u),leaveFrom:ut(d),leaveTo:ut(m)}),C=function(e){let t=Object(p.useRef)(Ot(e));return Object(p.useEffect)(()=>{t.current=Ot(e)},[e]),t}({beforeEnter:a,afterEnter:n,beforeLeave:r,afterLeave:s}),S=z();Object(p.useEffect)(()=>{if(S&&"visible"===E&&null===y.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,E,S]);let k=j&&!h,_=!S||k||T.current===O?"idle":O?"enter":"leave",L=H(e=>$(e,{enter:()=>C.current.beforeEnter(),leave:()=>C.current.beforeLeave(),idle:()=>{}})),D=H(e=>$(e,{enter:()=>C.current.afterEnter(),leave:()=>C.current.afterLeave(),idle:()=>{}})),q=yt(()=>{x("hidden"),w(y)},N);(function({container:e,direction:t,classes:a,onStart:n,onStop:r}){let s=lt(),o=B(),l=I(t);M(()=>{let t=A();o.add(t.dispose);let i=e.current;if(i&&"idle"!==l.current&&s.current)return t.dispose(),n.current(l.current),t.add(function(e,t,a,n){let r=a?"enter":"leave",s=A(),o=void 0!==n?function(e){let t={called:!1};return(...a)=>{if(!t.called)return t.called=!0,e(...a)}}(n):()=>{};"enter"===r&&(e.removeAttribute("hidden"),e.style.display="");let l=$(r,{enter:()=>t.enter,leave:()=>t.leave}),i=$(r,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=$(r,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ct(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),it(e,...l,...c),s.nextFrame(()=>{ct(e,...c),it(e,...i),function(e,t){let a=A();if(!e)return a.dispose;let{transitionDuration:n,transitionDelay:r}=getComputedStyle(e),[s,o]=[n,r].map(e=>{let[t=0]=e.split(",").filter(Boolean).map(e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e)).sort((e,t)=>t-e);return t});if(s+o!==0){let n=a.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t(),n())})}else t();a.add(()=>t()),a.dispose}(e,()=>(ct(e,...l),it(e,...t.entered),o()))}),s.dispose}(i,a.current,"enter"===l.current,()=>{t.dispose(),r.current(l.current)})),t.dispose},[t])})({container:y,classes:P,direction:_,onStart:I(e=>{q.onStart(y,e,L)}),onStop:I(e=>{q.onStop(y,e,D),"leave"===e&&!ft(q)&&(x("hidden"),w(y))})}),Object(p.useEffect)(()=>{!k||(g===ge.Hidden?T.current=null:T.current=O)},[O,k,E]);let U=f,V={ref:v};return h&&O&&F.isServer&&(U={...U,className:fe(f.className,...P.current.enter,...P.current.enterFrom)}),b.a.createElement(mt.Provider,{value:q},b.a.createElement(Fe,{value:$(E,{visible:_e.Open,hidden:_e.Closed})},Oe({ourProps:V,theirProps:U,defaultTag:"div",features:ht,visible:"visible"===E,name:"Transition.Child"})))})),Et=Ee((function(e,t){let{show:a,appear:n=!1,unmount:r,...s}=e,o=Object(p.useRef)(null),l=de(o,t);z();let i=Le();if(void 0===a&&null!==i&&(a=$(i,{[_e.Open]:!0,[_e.Closed]:!1})),![!0,!1].includes(a))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,u]=Object(p.useState)(a?"visible":"hidden"),d=yt(()=>{u("hidden")}),[m,f]=Object(p.useState)(!0),y=Object(p.useRef)([a]);M(()=>{!1!==m&&y.current[y.current.length-1]!==a&&(y.current.push(a),f(!1))},[y,a]);let v=Object(p.useMemo)(()=>({show:a,appear:n,initial:m}),[a,n,m]);Object(p.useEffect)(()=>{if(a)u("visible");else if(ft(d)){let e=o.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&u("hidden")}else u("hidden")},[a,d]);let g={unmount:r};return b.a.createElement(mt.Provider,{value:d},b.a.createElement(dt.Provider,{value:v},Oe({ourProps:{...g,as:p.Fragment,children:b.a.createElement(jt,{ref:l,...g,...s})},theirProps:{},defaultTag:p.Fragment,features:ht,visible:"visible"===c,name:"Transition"})))})),xt=Ee((function(e,t){let a=null!==Object(p.useContext)(dt),n=null!==Le();return b.a.createElement(b.a.Fragment,null,!a&&n?b.a.createElement(Et,{ref:t,...e}):b.a.createElement(jt,{ref:t,...e}))})),Nt=Object.assign(Et,{Child:xt,Root:Et});var Rt=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))})),wt=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"}))})),Tt=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}));const Pt={variant:{success:"yst-validation-input--success",warning:"yst-validation-input--warning",info:"yst-validation-input--info",error:"yst-validation-input--error"}},Ct=Object(s.forwardRef)((e,t)=>{let{as:a,validation:n={},className:o="",...i}=e;return Object(s.createElement)("div",{className:l()("yst-validation-input",(null==n?void 0:n.message)&&Pt.variant[null==n?void 0:n.variant])},Object(s.createElement)(a,r()({ref:t},i,{className:l()("yst-validation-input__input",o)})),(null==n?void 0:n.message)&&Object(s.createElement)(E,{variant:null==n?void 0:n.variant,className:"yst-validation-input__icon"}))});Ct.propTypes={as:c.a.elementType.isRequired,validation:c.a.shape({variant:c.a.string,message:c.a.node}),className:c.a.string};var St=Ct;const kt=Object(s.forwardRef)((e,t)=>Object(s.createElement)(ot.Button,r()({as:"div",ref:t},e))),_t=e=>{let{children:t,value:a}=e;const n=d(),o=Object(s.useCallback)(e=>{let{active:t,selected:a}=e;return l()("yst-autocomplete__option",a&&"yst-autocomplete__option--selected",t&&!a&&"yst-autocomplete__option--active")},[]);return Object(s.createElement)(ot.Option,{className:o,value:a},e=>{let{selected:a}=e;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("span",{className:l()("yst-autocomplete__option-label",a&&"yst-font-semibold")},t),a&&Object(s.createElement)(Rt,r()({className:"yst-autocomplete__option-check"},n)))})},Lt={children:c.a.node,value:c.a.oneOfType([c.a.string,c.a.number,c.a.bool]).isRequired};_t.propTypes=Lt;const Ft=e=>{let{onChange:t,svgAriaProps:a,screenReaderText:n}=e;const o=Object(s.useCallback)(e=>{e.preventDefault(),t(null)},[t]);return Object(s.createElement)("button",{className:"yst-mr-4 yst-flex yst-items-center",onClick:o},Object(s.createElement)("span",{className:"yst-sr-only"},n),Object(s.createElement)(Tt,r()({className:"yst-text-slate-400 yst-w-5 yst-h-5"},a)),Object(s.createElement)("div",{className:"yst-w-2 yst-mr-2 yst-border-r-slate-200 yst-border-r yst-h-7"}))};Ft.propTypes={onChange:c.a.func.isRequired,svgAriaProps:c.a.object.isRequired,screenReaderText:c.a.string.isRequired};const Mt=Object(s.forwardRef)((e,t)=>{let{id:a,value:n,children:o,selectedLabel:i,label:c,labelProps:p,labelSuffix:b,onChange:m,onQueryChange:f,validation:y,placeholder:v,className:g,buttonProps:O,clearButtonScreenReaderText:h,...j}=e;const E=Object(s.useCallback)(Object(u.constant)(i),[i]),x=d();return Object(s.createElement)(ot,r()({ref:t,as:"div",value:n,onChange:m,className:l()("yst-autocomplete",g)},j),c&&Object(s.createElement)("div",{className:"yst-flex yst-items-center yst-mb-2"},Object(s.createElement)(ot.Label,p,c),b),Object(s.createElement)("div",{className:"yst-relative"},Object(s.createElement)(St,r()({as:kt,"data-id":a,validation:y,className:"yst-autocomplete__button"},O),Object(s.createElement)(ot.Input,{className:"yst-autocomplete__input",autoComplete:"off",placeholder:v,displayValue:E,onChange:f}),j.nullable&&i&&Object(s.createElement)(Ft,{onChange:m,svgAriaProps:x,screenReaderText:h}),!(null!=y&&y.message)&&Object(s.createElement)(wt,r()({className:"yst-autocomplete__button-icon"},x))),Object(s.createElement)(Nt,{as:s.Fragment,enter:"yst-transition yst-duration-100 yst-ease-out",enterFrom:"yst-transform yst-scale-95 yst-opacity-0",enterTo:"yst-transform yst-scale-100 yst-opacity-100",leave:"yst-transition yst-duration-75 yst-ease-out",leaveFrom:"yst-transform yst-scale-100 yst-opacity-100",leaveTo:"yst-transform yst-scale-95 yst-opacity-0"},Object(s.createElement)(ot.Options,{className:"yst-autocomplete__options"},o))))});Mt.Option=_t,Mt.Option.displayName="Autocomplete.Option";const It={id:c.a.string.isRequired,value:c.a.oneOfType([c.a.string,c.a.number,c.a.bool]),children:c.a.node,selectedLabel:c.a.string,label:c.a.string,labelProps:c.a.object,labelSuffix:c.a.node,onChange:c.a.func.isRequired,onQueryChange:c.a.func.isRequired,validation:c.a.shape({variant:c.a.string,message:c.a.node}),placeholder:c.a.string,className:c.a.string,buttonProps:c.a.object,clearButtonScreenReaderText:c.a.string};Mt.propTypes=It,Mt.defaultProps={children:null,value:null,selectedLabel:"",label:"",labelProps:{},labelSuffix:null,validation:{},placeholder:"",className:"",buttonProps:{},clearButtonScreenReaderText:"Clear"};var Dt=Mt;const qt=e=>Object(s.createElement)(Mt,e);qt.propTypes=It,qt.defaultProps=Mt.defaultProps,qt.displayName="Autocomplete";const At={variant:{info:"yst-badge--info",upsell:"yst-badge--upsell",plain:"yst-badge--plain"},size:{default:"",small:"yst-badge--small",large:"yst-badge--large"}},Bt=Object(s.forwardRef)((e,t)=>{let{children:a,as:n,variant:o,size:i,className:c,...u}=e;return Object(s.createElement)(n,r()({ref:t,className:l()("yst-badge",At.variant[o],At.size[i],c)},u),a)}),Ht={children:c.a.node.isRequired,as:c.a.elementType,variant:c.a.oneOf(Object.keys(At.variant)),size:c.a.oneOf(Object.keys(At.size)),className:c.a.string};Bt.propTypes=Ht,Bt.defaultProps={as:"span",variant:"info",size:"default",className:""};var zt=Bt;const Ut=e=>Object(s.createElement)(Bt,e);Ut.propTypes=Ht,Ut.defaultProps=Bt.defaultProps,Ut.displayName="Badge";const Vt={variant:{default:"",primary:"yst-text-primary-500",white:"yst-text-white"},size:{3:"yst-w-3 yst-h-3",4:"yst-w-4 yst-h-4",8:"yst-w-8 yst-h-8"}},$t=Object(s.forwardRef)((e,t)=>{let{variant:a,size:n,className:o}=e;const i=d();return Object(s.createElement)("svg",r()({ref:t,xmlns:"http://www.w3.org/2000/svg/",fill:"none",viewBox:"0 0 24 24",className:l()("yst-animate-spin",Vt.variant[a],Vt.size[n],o)},i),Object(s.createElement)("circle",{className:"yst-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Object(s.createElement)("path",{className:"yst-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))}),Wt={variant:c.a.oneOf(Object(u.keys)(Vt.variant)),size:c.a.oneOf(Object(u.keys)(Vt.size)),className:c.a.string};$t.propTypes=Wt,$t.defaultProps={variant:"default",size:"4",className:""};const Gt=e=>Object(s.createElement)($t,e);Gt.propTypes=Wt,Gt.defaultProps=$t.defaultProps,Gt.displayName="Spinner";var Kt=$t;const Qt={variant:{primary:"yst-button--primary",secondary:"yst-button--secondary",tertiary:"yst-button--tertiary",error:"yst-button--error",upsell:"yst-button--upsell"},size:{default:"",small:"yst-button--small",large:"yst-button--large"}},Yt=Object(s.forwardRef)((e,t)=>{let{children:a,as:n,type:o,variant:i,size:c,isLoading:u,disabled:d,className:p,...b}=e;return Object(s.createElement)(n,r()({type:o||"button"===n&&"button"||void 0,disabled:d,ref:t,className:l()("yst-button",Qt.variant[i],Qt.size[c],u&&"yst-cursor-wait",d&&"yst-button--disabled",p)},b),u&&Object(s.createElement)(Kt,{size:"small"===c?"3":"4",className:"yst--ml-1 yst-mr-2"}),a)}),Zt={children:c.a.node.isRequired,as:c.a.elementType,type:c.a.oneOf(["button","submit"]),variant:c.a.oneOf(Object(u.keys)(Qt.variant)),size:c.a.oneOf(Object(u.keys)(Qt.size)),isLoading:c.a.bool,disabled:c.a.bool,className:c.a.string};Yt.propTypes=Zt,Yt.defaultProps={as:"button",type:void 0,variant:"primary",size:"default",isLoading:!1,disabled:!1,className:""};var Xt=Yt;const Jt=e=>Object(s.createElement)(Yt,e);Jt.propTypes=Zt,Jt.defaultProps=Yt.defaultProps,Jt.displayName="Button";const ea=Object(s.forwardRef)((e,t)=>{let{as:a,className:n,label:o,children:i,...c}=e;return Object(s.createElement)(a,r()({ref:t,className:l()("yst-label",n)},c),o||i||null)}),ta={label:c.a.string,children:c.a.string,as:c.a.elementType,className:c.a.string};ea.propTypes=ta,ea.defaultProps={label:"",children:"",as:"label",className:""};const aa=e=>Object(s.createElement)(ea,e);aa.propTypes=ta,aa.defaultProps=ea.defaultProps,aa.displayName="Label";var na=ea;const ra=Object(s.forwardRef)((e,t)=>{let{id:a,name:n,value:o,label:i,disabled:c,className:u,...d}=e;return Object(s.createElement)("div",{className:l()("yst-checkbox",c&&"yst-checkbox--disabled",u)},Object(s.createElement)("input",r()({ref:t,type:"checkbox",id:a,name:n,value:o,disabled:c,className:"yst-checkbox__input"},d)),Object(s.createElement)(na,{htmlFor:a,className:"yst-checkbox__label",label:i}))}),sa={id:c.a.string.isRequired,name:c.a.string.isRequired,value:c.a.string.isRequired,label:c.a.string.isRequired,className:c.a.string,disabled:c.a.bool};ra.propTypes=sa,ra.defaultProps={className:""};const oa=e=>Object(s.createElement)(ra,e);oa.propTypes=sa,oa.defaultProps=ra.defaultProps,oa.displayName="Checkbox";var la=ra;const ia={variant:{default:"",block:"yst-code--block"}},ca=Object(s.forwardRef)((e,t)=>{let{children:a,variant:n="default",className:o="",...i}=e;return Object(s.createElement)("code",r()({ref:t,className:l()("yst-code",ia.variant[n],o)},i),a)}),ua={children:c.a.node.isRequired,variant:c.a.oneOf(Object.keys(ia.variant)),className:c.a.string};ca.propTypes=ua;const da=e=>Object(s.createElement)(ca,e);da.propTypes=ua,da.defaultProps=ca.defaultProps,da.displayName="Code";var pa=ca,ba=a(188).ErrorBoundary;const ma={variant:{default:"yst-link--default",primary:"yst-link--primary",error:"yst-link--error"}},fa=Object(s.forwardRef)((e,t)=>{let{as:a,variant:n,className:o,children:i,...c}=e;return Object(s.createElement)(a,r()({ref:t,className:l()("yst-link",ma.variant[n],o)},c),i)}),ya={children:c.a.node.isRequired,variant:c.a.oneOf(Object.keys(ma.variant)),as:c.a.elementType,className:c.a.string};fa.propTypes=ya,fa.defaultProps={as:"a",variant:"default",className:""};const va=e=>Object(s.createElement)(fa,e);va.propTypes=ya,va.defaultProps=fa.defaultProps,va.displayName="Link";var ga=fa;const Oa=e=>{let{as:t,className:a,children:n}=e;return Object(s.createElement)(t,{className:l()("yst-paper__content",a)},n)};Oa.propTypes={as:c.a.node,className:c.a.string,children:c.a.node.isRequired},Oa.defaultProps={as:"div",className:""};var ha=Oa;const ja=e=>{let{as:t,className:a,children:n}=e;return Object(s.createElement)(t,{className:l()("yst-paper__header",a)},n)};ja.propTypes={as:c.a.node,className:c.a.string,children:c.a.node.isRequired},ja.defaultProps={as:"header",className:""};var Ea=ja;const xa=Object(s.forwardRef)((e,t)=>{let{as:a="div",className:n="",children:r}=e;return Object(s.createElement)(a,{ref:t,className:l()("yst-paper",n)},r)}),Na={as:c.a.node,className:c.a.string,children:c.a.node.isRequired};xa.propTypes=Na,xa.defaultProps={as:"div",className:""},xa.Header=Ea,xa.Header.displayName="Paper.Header",xa.Content=ha,xa.Content.displayName="Paper.Content";const Ra=e=>Object(s.createElement)(xa,e);Ra.propTypes=Na,Ra.defaultProps=xa.defaultProps,Ra.displayName="Paper";var wa=xa;const Ta=Object(s.forwardRef)((e,t)=>{let{min:a,max:n,progress:o,className:i,...c}=e;const u=Object(s.useMemo)(()=>o/(n-a)*100,[a,n,o]);return Object(s.createElement)("div",r()({ref:t,"aria-hidden":"true",className:l()("yst-progress-bar",i)},c),Object(s.createElement)("div",{className:"yst-progress-bar__progress",style:{width:u+"%"}}))}),Pa={min:c.a.number.isRequired,max:c.a.number.isRequired,progress:c.a.number.isRequired,className:c.a.string};Ta.propTypes=Pa,Ta.defaultProps={className:""};const Ca=e=>Object(s.createElement)(Ta,e);Ca.propTypes=Pa,Ca.defaultProps=Ta.defaultProps,Ca.displayName="ProgressBar";var Sa=Ta;const ka=Object(s.forwardRef)((e,t)=>{let{id:a,name:n,value:o,label:i,screenReaderLabel:c,variant:u,disabled:p,className:b,isLabelDangerousHtml:f,...y}=e;const v=d();return"inline-block"===u?Object(s.createElement)("div",{className:l()("yst-radio","yst-radio--inline-block",p&&"yst-radio--disabled",b)},Object(s.createElement)("input",r()({type:"radio",id:a,name:n,value:o,disabled:p,className:"yst-radio__input","aria-label":c},y)),Object(s.createElement)("span",{className:"yst-radio__content"},Object(s.createElement)(na,{htmlFor:a,className:"yst-radio__label",label:f?null:i,dangerouslySetInnerHTML:f?{__html:i}:null}),Object(s.createElement)(m,r()({className:"yst-radio__check"},v)))):Object(s.createElement)("div",{className:l()("yst-radio",p&&"yst-radio--disabled",b)},Object(s.createElement)("input",r()({ref:t,type:"radio",id:a,name:n,value:o,disabled:p,className:"yst-radio__input"},y)),Object(s.createElement)(na,{htmlFor:a,className:"yst-radio__label",label:f?null:i,dangerouslySetInnerHTML:f?{__html:i}:null}))}),_a={name:c.a.string.isRequired,id:c.a.string.isRequired,value:c.a.string.isRequired,label:c.a.string.isRequired,isLabelDangerousHtml:c.a.bool,screenReaderLabel:c.a.string,variant:c.a.oneOf(Object.keys({default:"","inline-block":"yst-radio--inline-block"})),disabled:c.a.bool,className:c.a.string};ka.propTypes=_a,ka.defaultProps={screenReaderLabel:"",variant:"default",disabled:!1,className:"",isLabelDangerousHtml:!1};const La=e=>Object(s.createElement)(ka,e);La.propTypes=_a,La.defaultProps=ka.defaultProps,La.displayName="Radio";var Fa=ka,Ma=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ma||{}),Ia=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ia||{}),Da=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Da||{}),qa=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(qa||{});function Aa(e,t=(e=>e)){let a=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=re(t(e.options.slice()),e=>e.dataRef.current.domRef.current),r=a?n.indexOf(a):null;return-1===r&&(r=null),{options:n,activeOptionIndex:r}}let Ba={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:a}=e.dataRef.current,n=e.options.findIndex(e=>a(e.dataRef.current.value));return-1!==n&&(t=n),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var a;if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=Aa(e),r=me(t,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeOptionIndex:r,activationTrigger:null!=(a=t.trigger)?a:1}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let a=""!==e.searchQuery?0:1,n=e.searchQuery+t.value.toLowerCase(),r=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+a).concat(e.options.slice(0,e.activeOptionIndex+a)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))}),s=r?e.options.indexOf(r):-1;return-1===s||s===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:s,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let a={id:t.id,dataRef:t.dataRef},n=Aa(e,e=>[...e,a]);return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(a)),{...e,...n}},6:(e,t)=>{let a=Aa(e,e=>{let a=e.findIndex(e=>e.id===t.id);return-1!==a&&e.splice(a,1),e});return{...e,...a,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},Ha=Object(p.createContext)(null);function za(e){let t=Object(p.useContext)(Ha);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,za),t}return t}Ha.displayName="ListboxActionsContext";let Ua=Object(p.createContext)(null);function Va(e){let t=Object(p.useContext)(Ua);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Va),t}return t}function $a(e,t){return $(t.type,Ba,e,t)}Ua.displayName="ListboxDataContext";let Wa=p.Fragment,Ga=Ee((function(e,t){let{value:a,defaultValue:n,name:r,onChange:s,by:o=((e,t)=>e===t),disabled:l=!1,horizontal:i=!1,multiple:c=!1,...u}=e;const d=i?"horizontal":"vertical";let m=de(t),[f=(c?[]:void 0),y]=Ie(a,s,n),[v,g]=Object(p.useReducer)($a,{dataRef:Object(p.createRef)(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),O=Object(p.useRef)({static:!1,hold:!1}),h=Object(p.useRef)(null),j=Object(p.useRef)(null),E=Object(p.useRef)(null),x=H("string"==typeof o?(e,t)=>{let a=o;return(null==e?void 0:e[a])===(null==t?void 0:t[a])}:o),N=Object(p.useCallback)(e=>$(R.mode,{1:()=>f.some(t=>x(t,e)),0:()=>x(f,e)}),[f]),R=Object(p.useMemo)(()=>({...v,value:f,disabled:l,mode:c?1:0,orientation:d,compare:x,isSelected:N,optionsPropsRef:O,labelRef:h,buttonRef:j,optionsRef:E}),[f,l,c,v]);M(()=>{v.dataRef.current=R},[R]),le([R.buttonRef,R.optionsRef],(e,t)=>{var a;g({type:1}),te(t,ee.Loose)||(e.preventDefault(),null==(a=R.buttonRef.current)||a.focus())},0===R.listboxState);let w=Object(p.useMemo)(()=>({open:0===R.listboxState,disabled:l,value:f}),[R,l,f]),T=H(e=>{let t=R.options.find(t=>t.id===e);!t||F(t.dataRef.current.value)}),P=H(()=>{if(null!==R.activeOptionIndex){let{dataRef:e,id:t}=R.options[R.activeOptionIndex];F(e.current.value),g({type:2,focus:be.Specific,id:t})}}),C=H(()=>g({type:0})),S=H(()=>g({type:1})),k=H((e,t,a)=>e===be.Specific?g({type:2,focus:be.Specific,id:t,trigger:a}):g({type:2,focus:e,trigger:a})),_=H((e,t)=>(g({type:5,id:e,dataRef:t}),()=>g({type:6,id:e}))),L=H(e=>(g({type:7,id:e}),()=>g({type:7,id:null}))),F=H(e=>$(R.mode,{0:()=>null==y?void 0:y(e),1(){let t=R.value.slice(),a=t.findIndex(t=>x(t,e));return-1===a?t.push(e):t.splice(a,1),null==y?void 0:y(t)}})),I=H(e=>g({type:3,value:e})),D=H(()=>g({type:4})),q=Object(p.useMemo)(()=>({onChange:F,registerOption:_,registerLabel:L,goToOption:k,closeListbox:S,openListbox:C,selectActiveOption:P,selectOption:T,search:I,clearSearch:D}),[]),A={ref:m},z=Object(p.useRef)(null),U=B();return Object(p.useEffect)(()=>{!z.current||void 0!==n&&U.addEventListener(z.current,"reset",()=>{F(n)})},[z,F]),b.a.createElement(Ha.Provider,{value:q},b.a.createElement(Ua.Provider,{value:R},b.a.createElement(Fe,{value:$(R.listboxState,{0:_e.Open,1:_e.Closed})},null!=r&&null!=f&&we({[r]:f}).map(([e,t],a)=>b.a.createElement(Se,{features:Ce.Hidden,ref:0===a?e=>{var t;z.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...xe({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:t})})),Oe({ourProps:A,theirProps:u,slot:w,defaultTag:Wa,name:"Listbox"}))))})),Ka=Ee((function(e,t){var a;let n=V(),{id:r="headlessui-listbox-button-"+n,...s}=e,o=Va("Listbox.Button"),l=za("Listbox.Button"),i=de(o.buttonRef,t),c=B(),u=H(e=>{switch(e.key){case Me.Space:case Me.Enter:case Me.ArrowDown:e.preventDefault(),l.openListbox(),c.nextFrame(()=>{o.value||l.goToOption(be.First)});break;case Me.ArrowUp:e.preventDefault(),l.openListbox(),c.nextFrame(()=>{o.value||l.goToOption(be.Last)})}}),d=H(e=>{switch(e.key){case Me.Space:e.preventDefault()}}),b=H(e=>{if(Re(e.currentTarget))return e.preventDefault();0===o.listboxState?(l.closeListbox(),c.nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})):(e.preventDefault(),l.openListbox())}),m=D(()=>{if(o.labelId)return[o.labelId,r].join(" ")},[o.labelId,r]),f=Object(p.useMemo)(()=>({open:0===o.listboxState,disabled:o.disabled,value:o.value}),[o]);return Oe({ourProps:{ref:i,id:r,type:ce(e,o.buttonRef),"aria-haspopup":"listbox","aria-controls":null==(a=o.optionsRef.current)?void 0:a.id,"aria-expanded":o.disabled?void 0:0===o.listboxState,"aria-labelledby":m,disabled:o.disabled,onKeyDown:u,onKeyUp:d,onClick:b},theirProps:s,slot:f,defaultTag:"button",name:"Listbox.Button"})})),Qa=Ee((function(e,t){let a=V(),{id:n="headlessui-listbox-label-"+a,...r}=e,s=Va("Listbox.Label"),o=za("Listbox.Label"),l=de(s.labelRef,t);M(()=>o.registerLabel(n),[n]);let i=H(()=>{var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}),c=Object(p.useMemo)(()=>({open:0===s.listboxState,disabled:s.disabled}),[s]);return Oe({ourProps:{ref:l,id:n,onClick:i},theirProps:r,slot:c,defaultTag:"label",name:"Listbox.Label"})})),Ya=ve.RenderStrategy|ve.Static,Za=Ee((function(e,t){var a;let n=V(),{id:r="headlessui-listbox-options-"+n,...s}=e,o=Va("Listbox.Options"),l=za("Listbox.Options"),i=de(o.optionsRef,t),c=B(),u=B(),d=Le(),b=null!==d?d===_e.Open:0===o.listboxState;Object(p.useEffect)(()=>{var e;let t=o.optionsRef.current;!t||0===o.listboxState&&t!==(null==(e=W(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})},[o.listboxState,o.optionsRef]);let m=H(e=>{switch(u.dispose(),e.key){case Me.Space:if(""!==o.searchQuery)return e.preventDefault(),e.stopPropagation(),l.search(e.key);case Me.Enter:if(e.preventDefault(),e.stopPropagation(),null!==o.activeOptionIndex){let{dataRef:e}=o.options[o.activeOptionIndex];l.onChange(e.current.value)}0===o.mode&&(l.closeListbox(),A().nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case $(o.orientation,{vertical:Me.ArrowDown,horizontal:Me.ArrowRight}):return e.preventDefault(),e.stopPropagation(),l.goToOption(be.Next);case $(o.orientation,{vertical:Me.ArrowUp,horizontal:Me.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),l.goToOption(be.Previous);case Me.Home:case Me.PageUp:return e.preventDefault(),e.stopPropagation(),l.goToOption(be.First);case Me.End:case Me.PageDown:return e.preventDefault(),e.stopPropagation(),l.goToOption(be.Last);case Me.Escape:return e.preventDefault(),e.stopPropagation(),l.closeListbox(),c.nextFrame(()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})});case Me.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(l.search(e.key),u.setTimeout(()=>l.clearSearch(),350))}}),f=D(()=>{var e,t,a;return null!=(a=null==(e=o.labelRef.current)?void 0:e.id)?a:null==(t=o.buttonRef.current)?void 0:t.id},[o.labelRef.current,o.buttonRef.current]),y=Object(p.useMemo)(()=>({open:0===o.listboxState}),[o]);return Oe({ourProps:{"aria-activedescendant":null===o.activeOptionIndex||null==(a=o.options[o.activeOptionIndex])?void 0:a.id,"aria-multiselectable":1===o.mode||void 0,"aria-labelledby":f,"aria-orientation":o.orientation,id:r,onKeyDown:m,role:"listbox",tabIndex:0,ref:i},theirProps:s,slot:y,defaultTag:"ul",features:Ya,visible:b,name:"Listbox.Options"})})),Xa=Ee((function(e,t){let a=V(),{id:n="headlessui-listbox-option-"+a,disabled:r=!1,value:s,...o}=e,l=Va("Listbox.Option"),i=za("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===n,u=l.isSelected(s),d=Object(p.useRef)(null),b=I({disabled:r,value:s,domRef:d,get textValue(){var e,t;return null==(t=null==(e=d.current)?void 0:e.textContent)?void 0:t.toLowerCase()}}),m=de(t,d);M(()=>{if(0!==l.listboxState||!c||0===l.activationTrigger)return;let e=A();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=d.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[d,c,l.listboxState,l.activationTrigger,l.activeOptionIndex]),M(()=>i.registerOption(n,b),[b,n]);let f=H(e=>{if(r)return e.preventDefault();i.onChange(s),0===l.mode&&(i.closeListbox(),A().nextFrame(()=>{var e;return null==(e=l.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),y=H(()=>{if(r)return i.goToOption(be.Nothing);i.goToOption(be.Specific,n)}),v=Ae(),g=H(e=>v.update(e)),O=H(e=>{!v.wasMoved(e)||r||c||i.goToOption(be.Specific,n,0)}),h=H(e=>{!v.wasMoved(e)||r||!c||i.goToOption(be.Nothing)}),j=Object(p.useMemo)(()=>({active:c,selected:u,disabled:r}),[c,u,r]);return Oe({ourProps:{id:n,ref:m,role:"option",tabIndex:!0===r?void 0:-1,"aria-disabled":!0===r||void 0,"aria-selected":u,disabled:void 0,onClick:f,onFocus:y,onPointerEnter:g,onMouseEnter:g,onPointerMove:O,onMouseMove:O,onPointerLeave:h,onMouseLeave:h},theirProps:o,slot:j,defaultTag:"li",name:"Listbox.Option"})})),Ja=Object.assign(Ga,{Button:Ka,Label:Qa,Options:Za,Option:Xa});const en={value:c.a.oneOfType([c.a.string,c.a.number,c.a.bool]).isRequired,label:c.a.string.isRequired},tn=e=>{let{value:t,label:a}=e;const n=d(),o=Object(s.useCallback)(e=>{let{active:t,selected:a}=e;return l()("yst-select__option",t&&"yst-select__option--active",a&&"yst-select__option--selected")},[]);return Object(s.createElement)(Ja.Option,{value:t,className:o},e=>{let{selected:t}=e;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("span",{className:l()("yst-select__option-label",t&&"yst-font-semibold")},a),t&&Object(s.createElement)(Rt,r()({className:"yst-select__option-check"},n)))})};tn.propTypes=en;const an=Object(s.forwardRef)((e,t)=>{let{id:a,value:n,options:o,children:i,selectedLabel:c,label:u,labelProps:p,labelSuffix:b,onChange:m,disabled:f,validation:y,className:v,buttonProps:g,...O}=e;const h=Object(s.useMemo)(()=>o.find(e=>n===(null==e?void 0:e.value))||o[0],[n,o]),j=d();return Object(s.createElement)(Ja,r()({ref:t,as:"div",value:n,onChange:m,disabled:f,className:l()("yst-select",f&&"yst-select--disabled",v)},O),u&&Object(s.createElement)("div",{className:"yst-flex yst-items-center yst-mb-2"},Object(s.createElement)(Ja.Label,r()({as:na},p),u),b),Object(s.createElement)(St,r()({as:Ja.Button,"data-id":a,className:"yst-select__button",validation:y},g),Object(s.createElement)("span",{className:"yst-select__button-label"},c||(null==h?void 0:h.label)||""),!(null!=y&&y.message)&&Object(s.createElement)(wt,r()({className:"yst-select__button-icon"},j))),Object(s.createElement)(Nt,{as:s.Fragment,enter:"yst-transition yst-duration-100 yst-ease-out",enterFrom:"yst-transform yst-scale-95 yst-opacity-0",enterTo:"yst-transform yst-scale-100 yst-opacity-100",leave:"yst-transition yst-duration-75 yst-ease-out",leaveFrom:"yst-transform yst-scale-100 yst-opacity-100",leaveTo:"yst-transform yst-scale-95 yst-opacity-0"},Object(s.createElement)(Ja.Options,{className:"yst-select__options"},i||o.map(e=>Object(s.createElement)(tn,r()({key:e.value},e))))))}),nn={id:c.a.string.isRequired,value:c.a.oneOfType([c.a.string,c.a.number,c.a.bool]).isRequired,options:c.a.arrayOf(c.a.shape(en)),children:c.a.node,selectedLabel:c.a.string,label:c.a.string,labelProps:c.a.object,labelSuffix:c.a.node,onChange:c.a.func.isRequired,disabled:c.a.bool,validation:c.a.shape({variant:c.a.string,message:c.a.node}),className:c.a.string,buttonProps:c.a.object};an.propTypes=nn,an.Option=tn,an.Option.displayName="Select.Option",an.defaultProps={options:[],children:null,selectedLabel:"",label:"",labelProps:{},labelSuffix:null,disabled:!1,validation:{},className:"",buttonProps:{}};const rn=e=>Object(s.createElement)(an,e);rn.propTypes=nn,rn.defaultProps=an.defaultProps,rn.displayName="Select";var sn=an;const on=e=>{let{as:t,className:a,children:n}=e;return Object(s.createElement)(t,{className:l()("yst-skeleton-loader",a)},n&&Object(s.createElement)("div",{className:"yst-pointer-events-none yst-invisible"},n))};on.propTypes={as:c.a.elementType,className:c.a.string,children:c.a.node},on.defaultProps={as:"span",className:"",children:null};var ln=on;const cn={variant:{striped:"even:yst-bg-slate-50 odd:yst-bg-white",plain:""}},un=e=>{let{children:t,className:a="",...n}=e;return Object(s.createElement)("td",r()({className:l()("yst-px-3 yst-py-4 yst-text-sm yst-text-slate-500",a)},n),t)};un.propTypes={children:c.a.node.isRequired,variant:c.a.oneOf(Object.keys(cn.variant)),className:c.a.string};const dn=e=>{let{children:t,variant:a="plain",className:n="",...o}=e;return Object(s.createElement)("tr",r()({className:l()(cn.variant[a],n)},o),t)};dn.propTypes={children:c.a.node.isRequired,variant:c.a.oneOf(Object.keys(cn.variant)),className:c.a.string};const pn=e=>{let{children:t,className:a="",...n}=e;return Object(s.createElement)("th",r()({className:l()("yst-px-3 yst-py-4 yst-text-left yst-text-sm yst-font-semibold yst-text-slate-900",a)},n),t)};pn.propTypes={children:c.a.node.isRequired,className:c.a.string};const bn=e=>{let{children:t,className:a="",...n}=e;return Object(s.createElement)("thead",r()({className:l()("yst-bg-slate-50",a)},n),t)};bn.propTypes={children:c.a.node.isRequired,className:c.a.string};const mn=e=>{let{children:t,className:a="",...n}=e;return Object(s.createElement)("tbody",r()({className:l()("yst-divide-y yst-divide-gray-200 yst-bg-white",a)},n),t)};mn.propTypes={children:c.a.node.isRequired,className:c.a.string};const fn=Object(s.forwardRef)((e,t)=>{let{children:a,className:n="",...o}=e;return Object(s.createElement)("div",{className:"yst-overflow-hidden yst-shadow yst-ring-1 yst-ring-black yst-ring-opacity-5 yst-rounded-lg"},Object(s.createElement)("table",r()({className:l()("yst-min-w-full yst-divide-y yst-divide-slate-300",n)},o,{ref:t}),a))});fn.propTypes={children:c.a.node.isRequired,className:c.a.string},fn.Head=bn,fn.Head.displayName="Table.Head",fn.Body=mn,fn.Body.displayName="Table.Body",fn.Header=pn,fn.Header.displayName="Table.Header",fn.Row=dn,fn.Row.displayName="Table.Row",fn.Cell=un,fn.Cell.displayName="Table.Cell";var yn=fn,vn=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}));const gn=e=>{let{tag:t,index:a,disabled:n=!1,onRemoveTag:o,screenReaderRemoveTag:l,...i}=e;const c=Object(s.useCallback)(e=>{if(!n)switch(null==e?void 0:e.key){case"Delete":case"Backspace":return o(a),e.preventDefault(),!0}},[a,n,o]),u=Object(s.useCallback)(e=>{if(!n)return o(a),e.preventDefault(),!0},[a,n,o]);return Object(s.createElement)(zt,r()({onKeyDown:c},i,{variant:"plain",className:"yst-tag-input__tag"}),Object(s.createElement)("span",{className:"yst-mb-px"},t),Object(s.createElement)("button",{onClick:u,className:"yst-tag-input__remove-tag"},Object(s.createElement)("span",{className:"yst-sr-only"},l),Object(s.createElement)(vn,{className:"yst-h-3 yst-w-3"})))};gn.propTypes={tag:c.a.string.isRequired,index:c.a.number.isRequired,disabled:c.a.bool,onRemoveTag:c.a.func.isRequired,screenReaderRemoveTag:c.a.string.isRequired};const On=Object(s.forwardRef)((e,t)=>{let{tags:a=[],children:n,className:o,disabled:i,onAddTag:c,onRemoveTag:d,onSetTags:p,onBlur:b,screenReaderRemoveTag:m,...f}=e;const[y,v]=Object(s.useState)(""),g=Object(s.useCallback)(e=>{var t;Object(u.isString)(null==e||null===(t=e.target)||void 0===t?void 0:t.value)&&v(e.target.value)},[v]),O=Object(s.useCallback)(e=>{switch(e.key){case",":case"Enter":return y.length>0&&(c(y),v("")),e.preventDefault(),!0;case"Backspace":if(0!==y.length||0===a.length)break;return d(a.length-1),e.ctrlKey&&p([]),e.preventDefault(),!0}},[y,a,v,c]),h=Object(s.useCallback)(e=>{y.length>0&&(c(y),v("")),b(e)},[y,c,v,b]);return Object(s.createElement)("div",{className:l()("yst-tag-input",i&&"yst-tag-input--disabled",o)},n||Object(u.map)(a,(e,t)=>Object(s.createElement)(gn,{key:"tag-"+t,tag:e,index:t,disabled:i,onRemoveTag:d,screenReaderRemoveTag:m})),Object(s.createElement)("input",r()({ref:t,type:"text",disabled:i,className:"yst-tag-input__input",onKeyDown:O},f,{onChange:g,onBlur:h,value:y})))}),hn={tags:c.a.arrayOf(c.a.string),children:c.a.node,className:c.a.string,disabled:c.a.bool,onAddTag:c.a.func,onRemoveTag:c.a.func,onSetTags:c.a.func,onBlur:c.a.func,screenReaderRemoveTag:c.a.string};On.propTypes=hn,On.Tag=gn,On.Tag.displayName="TagInput.Tag",On.defaultProps={tags:[],children:null,className:"",disabled:!1,onAddTag:u.noop,onRemoveTag:u.noop,onSetTags:u.noop,onBlur:u.noop,screenReaderRemoveTag:"Remove tag"};var jn=On;const En=e=>Object(s.createElement)(On,e);En.propTypes=hn,En.defaultProps=On.defaultProps,En.displayName="TagInput";const xn=Object(s.forwardRef)((e,t)=>{let{type:a,className:n,disabled:o,readOnly:i,...c}=e;return Object(s.createElement)("input",r()({ref:t,type:a,className:l()("yst-text-input",o&&"yst-text-input--disabled",i&&"yst-text-input--read-only",n),disabled:o,readOnly:i},c))}),Nn={type:c.a.string,className:c.a.string,disabled:c.a.bool,readOnly:c.a.bool};xn.propTypes=Nn,xn.defaultProps={type:"text",className:"",disabled:!1,readOnly:!1};var Rn=xn;const wn=e=>Object(s.createElement)(xn,e);wn.propTypes=Nn,wn.defaultProps=xn.defaultProps,wn.displayName="TextInput";const Tn=Object(s.forwardRef)((e,t)=>{let{disabled:a,rows:n,className:o,...i}=e;return Object(s.createElement)("textarea",r()({ref:t,disabled:a,rows:n,className:l()("yst-textarea",a&&"yst-textarea--disabled",o)},i))}),Pn={className:c.a.string,disabled:c.a.bool,cols:c.a.number,rows:c.a.number};Tn.propTypes=Pn,Tn.defaultProps={className:"",disabled:!1,cols:20,rows:2};const Cn=e=>Object(s.createElement)(Tn,e);Cn.propTypes=Pn,Cn.defaultProps=Tn.defaultProps,Cn.displayName="Textarea";var Sn=Tn;const kn={size:{1:"yst-title--1",2:"yst-title--2",3:"yst-title--3",4:"yst-title--4",5:"yst-title--5"}},Ln=Object(s.forwardRef)((e,t)=>{let{children:a,as:n,size:o,className:i,...c}=e;return Object(s.createElement)(n,r()({ref:t,className:l()("yst-title",kn.size[o||n[1]],i)},c),a)}),Fn={children:c.a.node.isRequired,as:c.a.elementType,size:c.a.oneOf(Object.keys(kn.size)),className:c.a.string};Ln.propTypes=Fn,Ln.defaultProps={as:"h1",size:void 0,className:""};const Mn=e=>Object(s.createElement)(Ln,e);Mn.propTypes=Fn,Mn.defaultProps=Ln.defaultProps,Mn.displayName="Title";var In=Ln;let Dn=Object(p.createContext)(null);function qn(){let e=Object(p.useContext)(Dn);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,qn),e}return e}let An=Ee((function(e,t){let a=V(),{id:n="headlessui-label-"+a,passive:r=!1,...s}=e,o=qn(),l=de(t);M(()=>o.register(n),[n,o.register]);let i={ref:l,...o.props,id:n};return r&&("onClick"in i&&delete i.onClick,"onClick"in s&&delete s.onClick),Oe({ourProps:i,theirProps:s,slot:o.slot||{},defaultTag:"label",name:o.name||"Label"})})),Bn=Object(p.createContext)(null);function Hn(){let e=Object(p.useContext)(Bn);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Hn),e}return e}function zn(){let[e,t]=Object(p.useState)([]);return[e.length>0?e.join(" "):void 0,Object(p.useMemo)(()=>function(e){let a=H(e=>(t(t=>[...t,e]),()=>t(t=>{let a=t.slice(),n=a.indexOf(e);return-1!==n&&a.splice(n,1),a}))),n=Object(p.useMemo)(()=>({register:a,slot:e.slot,name:e.name,props:e.props}),[a,e.slot,e.name,e.props]);return b.a.createElement(Bn.Provider,{value:n},e.children)},[t])]}let Un=Ee((function(e,t){let a=V(),{id:n="headlessui-description-"+a,...r}=e,s=Hn(),o=de(t);return M(()=>s.register(n),[n,s.register]),Oe({ourProps:{ref:o,...s.props,id:n},theirProps:r,slot:s.slot||{},defaultTag:"p",name:s.name||"Description"})})),Vn=Object(p.createContext)(null);Vn.displayName="GroupContext";let $n=p.Fragment,Wn=Ee((function(e,t){let a=V(),{id:n="headlessui-switch-"+a,checked:r,defaultChecked:s=!1,onChange:o,name:l,value:i,...c}=e,u=Object(p.useContext)(Vn),d=Object(p.useRef)(null),m=de(d,t,null===u?null:u.setSwitch),[f,y]=Ie(r,o,s),v=H(()=>null==y?void 0:y(!f)),g=H(e=>{if(Re(e.currentTarget))return e.preventDefault();e.preventDefault(),v()}),O=H(e=>{e.key===Me.Space?(e.preventDefault(),v()):e.key===Me.Enter&&function(e){var t;let a=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(a)for(let e of a.elements)if("INPUT"===e.tagName&&"submit"===e.type||"BUTTON"===e.tagName&&"submit"===e.type||"INPUT"===e.nodeName&&"image"===e.type)return void e.click()}(e.currentTarget)}),h=H(e=>e.preventDefault()),j=Object(p.useMemo)(()=>({checked:f}),[f]),E={id:n,ref:m,role:"switch",type:ce(e,d),tabIndex:0,"aria-checked":f,"aria-labelledby":null==u?void 0:u.labelledby,"aria-describedby":null==u?void 0:u.describedby,onClick:g,onKeyUp:O,onKeyPress:h},x=B();return Object(p.useEffect)(()=>{var e;let t=null==(e=d.current)?void 0:e.closest("form");!t||void 0!==s&&x.addEventListener(t,"reset",()=>{y(s)})},[d,y]),b.a.createElement(b.a.Fragment,null,null!=l&&f&&b.a.createElement(Se,{features:Ce.Hidden,...xe({as:"input",type:"checkbox",hidden:!0,readOnly:!0,checked:f,name:l,value:i})}),Oe({ourProps:E,theirProps:c,slot:j,defaultTag:"button",name:"Switch"}))})),Gn=Object.assign(Wn,{Group:function(e){let[t,a]=Object(p.useState)(null),[n,r]=function(){let[e,t]=Object(p.useState)([]);return[e.length>0?e.join(" "):void 0,Object(p.useMemo)(()=>function(e){let a=H(e=>(t(t=>[...t,e]),()=>t(t=>{let a=t.slice(),n=a.indexOf(e);return-1!==n&&a.splice(n,1),a}))),n=Object(p.useMemo)(()=>({register:a,slot:e.slot,name:e.name,props:e.props}),[a,e.slot,e.name,e.props]);return b.a.createElement(Dn.Provider,{value:n},e.children)},[t])]}(),[s,o]=zn(),l=Object(p.useMemo)(()=>({switch:t,setSwitch:a,labelledby:n,describedby:s}),[t,a,n,s]),i=e;return b.a.createElement(o,{name:"Switch.Description"},b.a.createElement(r,{name:"Switch.Label",props:{onClick(){!t||(t.click(),t.focus({preventScroll:!0}))}}},b.a.createElement(Vn.Provider,{value:l},Oe({ourProps:{},theirProps:i,defaultTag:$n,name:"Switch.Group"}))))},Label:An,Description:Un});const Kn=Object(s.forwardRef)((e,t)=>{let{id:a,as:n,checked:o,screenReaderLabel:i,onChange:c,disabled:p,className:b,type:m,...f}=e;const y=d();return Object(s.createElement)(Gn,r()({ref:t,as:n,checked:o,disabled:p,onChange:p?u.noop:c,className:l()("yst-toggle",o&&"yst-toggle--checked",p&&"yst-toggle--disabled",b),"data-id":a},f,{type:"button"===n?"button":m}),Object(s.createElement)("span",{className:"yst-sr-only"},i),Object(s.createElement)("span",{className:"yst-toggle__handle"},Object(s.createElement)(Nt,{show:o,unmount:!1,as:"span","aria-hidden":!o,enter:"",enterFrom:"yst-opacity-0 yst-hidden",enterTo:"yst-opacity-100",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0 yst-hidden"},Object(s.createElement)(Rt,r()({className:"yst-toggle__icon yst-toggle__icon--check"},y))),Object(s.createElement)(Nt,{show:!o,unmount:!1,as:"span","aria-hidden":o,enterFrom:"yst-opacity-0 yst-hidden",enterTo:"yst-opacity-100",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0 yst-hidden"},Object(s.createElement)(vn,r()({className:"yst-toggle__icon yst-toggle__icon--x"},y)))))}),Qn={as:c.a.elementType,id:c.a.string.isRequired,checked:c.a.bool,screenReaderLabel:c.a.string.isRequired,onChange:c.a.func.isRequired,disabled:c.a.bool,type:c.a.string,className:c.a.string};Kn.propTypes=Qn,Kn.defaultProps={as:"button",checked:!1,disabled:!1,type:"",className:""};const Yn=e=>Object(s.createElement)(Kn,e);Yn.propTypes=Qn,Yn.defaultProps=Kn.defaultProps,Yn.displayName="Toggle";var Zn=Kn,Xn=(e,t)=>{const a=Object(s.useMemo)(()=>Object(u.reduce)(t,(t,a,n)=>a?(t[n]=`${e}__${n}`,t):t,{}),[e,t]),n=Object(s.useMemo)(()=>Object(u.values)(a).join(" ")||null,[a]);return{ids:a,describedBy:n}};const Jn=Object(s.forwardRef)((e,t)=>{let{id:a,label:n,description:o,validation:i,className:c,...u}=e;const{ids:d,describedBy:p}=Xn(a,{validation:null==i?void 0:i.message,description:o});return Object(s.createElement)("div",{className:l()("yst-autocomplete-field",c)},Object(s.createElement)(Dt,r()({ref:t,id:a,label:n,labelProps:{as:"label",className:"yst-label yst-autocomplete-field__label"},validation:i,className:"yst-autocomplete-field__select",buttonProps:{"aria-describedby":p}},u)),(null==i?void 0:i.message)&&Object(s.createElement)(R,{variant:null==i?void 0:i.variant,id:d.validation,className:"yst-autocomplete-field__validation"},i.message),o&&Object(s.createElement)("div",{id:d.description,className:"yst-autocomplete-field__description"},o))}),er={id:c.a.string.isRequired,name:c.a.string.isRequired,label:c.a.string.isRequired,description:c.a.node,validation:c.a.shape({variant:c.a.string,message:c.a.node}),className:c.a.string};Jn.propTypes=er,Jn.defaultProps={validation:{},className:""},Jn.Option=Dt.Option,Jn.Option.displayName="AutocompleteField.Option";const tr=e=>Object(s.createElement)(Jn,e);tr.propTypes=er,tr.defaultProps=Jn.defaultProps,tr.displayName="AutocompleteField";var ar=Jn;const nr=e=>{let{as:t="div",children:a,className:n="",...o}=e;return Object(s.createElement)(t,r()({},o,{className:l()("yst-card__header",n)}),a)};nr.propTypes={as:i.PropTypes.element,children:i.PropTypes.node.isRequired,className:i.PropTypes.string};const rr=e=>{let{as:t="div",children:a,className:n="",...o}=e;return Object(s.createElement)(t,r()({},o,{className:l()("yst-card__content",n)}),a)};rr.propTypes={as:i.PropTypes.element,children:i.PropTypes.node.isRequired,className:i.PropTypes.string};const sr=e=>{let{as:t="div",children:a,className:n="",...o}=e;return Object(s.createElement)(t,r()({},o,{className:l()("yst-card__footer",n)}),a)};sr.propTypes={as:i.PropTypes.element,children:i.PropTypes.node.isRequired,className:i.PropTypes.string};const or=Object(s.forwardRef)((e,t)=>{let{as:a,children:n,className:o,...i}=e;return Object(s.createElement)(a,r()({},i,{className:l()("yst-card",o),ref:t}),n)}),lr={as:i.PropTypes.elementType,children:i.PropTypes.node.isRequired,className:i.PropTypes.string};or.propTypes=lr,or.defaultProps={as:"div",className:""},or.Header=nr,or.Header.displayName="Card.Header",or.Content=rr,or.Content.displayName="Card.Content",or.Footer=sr,or.Footer.displayName="Card.Footer";const ir=e=>Object(s.createElement)(or,e);ir.propTypes=lr,ir.defaultProps=or.defaultProps,ir.displayName="Card";var cr=or;const ur=e=>{let{children:t=null,id:a="",name:n="",values:o=[],label:i="",description:c="",disabled:d=!1,options:p,onChange:b=u.noop,className:m="",...f}=e;const y=Object(s.useCallback)(e=>{let{target:t}=e;if(t.checked&&!Object(u.includes)(o,t.value))return b([...o,t.value]);b(Object(u.without)(o,t.value))},[o,b]);return Object(s.createElement)("fieldset",{id:"checkbox-group-"+a,className:l()("yst-checkbox-group",d&&"yst-checkbox-group--disabled",m)},Object(s.createElement)(na,{as:"legend",className:"yst-checkbox-group__label",label:i}),c&&Object(s.createElement)("div",{className:"yst-checkbox-group__description"},c),Object(s.createElement)("div",{className:"yst-checkbox-group__options"},t||p.map((e,t)=>{const l=`checkbox-${a}-${t}`;return Object(s.createElement)(la,r()({key:l,id:l,name:n,value:e.value,label:e.label,checked:Object(u.includes)(o,e.value),disabled:d,onChange:y},f))})))};ur.propTypes={children:c.a.node,id:c.a.string,name:c.a.string,values:c.a.arrayOf(c.a.string),label:c.a.string,disabled:c.a.bool,description:c.a.string,options:c.a.arrayOf(c.a.shape({value:c.a.string.isRequired,label:c.a.string.isRequired})),onChange:c.a.func,className:c.a.string},(ur.Checkbox=la).displayName="CheckboxGroup.Checkbox";var dr=ur,pr=a(189);function br(e){return"string"==typeof e&&"%"===e[e.length-1]&&function(e){const t=parseFloat(e);return!isNaN(t)&&isFinite(t)}(e.substring(0,e.length-1))}function mr(e,t){0===t&&(null==e?void 0:e.style)&&(e.style.display="none")}const fr={animating:"rah-animating",animatingUp:"rah-animating--up",animatingDown:"rah-animating--down",animatingToHeightZero:"rah-animating--to-height-zero",animatingToHeightAuto:"rah-animating--to-height-auto",animatingToHeightSpecific:"rah-animating--to-height-specific",static:"rah-static",staticHeightZero:"rah-static--height-zero",staticHeightAuto:"rah-static--height-auto",staticHeightSpecific:"rah-static--height-specific"};function yr(e,t){return[e.static,0===t&&e.staticHeightZero,t>0&&e.staticHeightSpecific,"auto"===t&&e.staticHeightAuto].filter(e=>e).join(" ")}var vr=e=>{var{animateOpacity:t=!1,animationStateClasses:a={},applyInlineTransitions:n=!0,children:r,className:s="",contentClassName:o,delay:l=0,duration:i=500,easing:c="ease",height:u,onHeightAnimationEnd:d,onHeightAnimationStart:m,style:f}=e,y=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]])}return a}(e,["animateOpacity","animationStateClasses","applyInlineTransitions","children","className","contentClassName","delay","duration","easing","height","onHeightAnimationEnd","onHeightAnimationStart","style"]);const v=Object(p.useRef)(u),g=Object(p.useRef)(null),O=Object(p.useRef)(),h=Object(p.useRef)(),j=Object(p.useRef)(Object.assign(Object.assign({},fr),a)),E="undefined"!=typeof window,x=Object(p.useRef)(!(!E||!window.matchMedia)&&window.matchMedia("(prefers-reduced-motion)").matches),N=x.current?0:l,R=x.current?0:i;let w=u,T="visible";"number"==typeof w?(w=u<0?0:u,T="hidden"):br(w)&&(w="0%"===u?0:u,T="hidden");const[P,C]=Object(p.useState)(w),[S,k]=Object(p.useState)(T),[_,L]=Object(p.useState)(!1),[F,M]=Object(p.useState)(yr(j.current,u));Object(p.useEffect)(()=>{mr(g.current,P)},[]),Object(p.useEffect)(()=>{if(u!==v.current&&g.current){!function(e,t){0===t&&(null==e?void 0:e.style)&&(e.style.display="")}(g.current,v.current),g.current.style.overflow="hidden";const e=g.current.offsetHeight;g.current.style.overflow="";const t=R+N;let a,n,r,s="hidden";const o="auto"===v.current;"number"==typeof u?(a=u<0?0:u,n=a):br(u)?(a="0%"===u?0:u,n=a):(a=e,n="auto",s=void 0),o&&(n=a,a=e);const l=[j.current.animating,("auto"===v.current||u<v.current)&&j.current.animatingUp,("auto"===u||u>v.current)&&j.current.animatingDown,0===n&&j.current.animatingToHeightZero,"auto"===n&&j.current.animatingToHeightAuto,n>0&&j.current.animatingToHeightSpecific].filter(e=>e).join(" "),i=yr(j.current,n);C(a),k("hidden"),L(!o),M(l),clearTimeout(h.current),clearTimeout(O.current),o?(r=!0,h.current=setTimeout(()=>{C(n),k(s),L(r),null==m||m(n)},50),O.current=setTimeout(()=>{L(!1),M(i),mr(g.current,n),null==d||d(n)},t)):(null==m||m(a),h.current=setTimeout(()=>{C(n),k(s),L(!1),M(i),"auto"!==u&&mr(g.current,a),null==d||d(a)},t))}return v.current=u,()=>{clearTimeout(h.current),clearTimeout(O.current)}},[u]);const I=Object.assign(Object.assign({},f),{height:P,overflow:S||(null==f?void 0:f.overflow)});_&&n&&(I.transition=`height ${R}ms ${c} ${N}ms`,(null==f?void 0:f.transition)&&(I.transition=`${f.transition}, ${I.transition}`),I.WebkitTransition=I.transition);const D={};t&&(D.transition=`opacity ${R}ms ${c} ${N}ms`,D.WebkitTransition=D.transition,0===P&&(D.opacity=0));const q=void 0!==y["aria-hidden"]?y["aria-hidden"]:0===u;return b.a.createElement("div",Object.assign({},y,{"aria-hidden":q,className:`${F} ${s}`,style:I}),b.a.createElement("div",{className:o,style:D,ref:g},r))},gr=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const[t,a]=Object(s.useState)(e),n=Object(s.useCallback)(()=>a(!t),[t,a]),r=Object(s.useCallback)(()=>a(!0),[a]),o=Object(s.useCallback)(()=>a(!1),[a]);return[t,n,a,r,o]};const Or=e=>{let{limit:t,children:a,renderButton:n,initialShow:r=!1,id:o=""}=e;const[l,i]=gr(r),c=Object(s.useMemo)(()=>Object(u.flatten)(a),[a]),d=Object(s.useMemo)(()=>Object(u.slice)(c,0,t),[c]),p=Object(s.useMemo)(()=>Object(u.slice)(c,t),[c]),b=Object(s.useMemo)(()=>o||"yst-animate-height-"+Object(pr.nanoid)(),[o]),m=Object(s.useMemo)(()=>({"aria-expanded":l,"aria-controls":b}),[l,b]);return t<0||c.length<=t?a:Object(s.createElement)(s.Fragment,null,d,Object(s.createElement)(vr,{id:b,easing:"ease-in-out",duration:300,height:l?"auto":0,animateOpacity:!0},p),n({show:l,toggle:i,ariaProps:m}))};Or.propTypes={limit:c.a.number.isRequired,children:c.a.arrayOf(c.a.node).isRequired,renderButton:c.a.func.isRequired,initialShow:c.a.bool,id:c.a.string};var hr=Or,jr=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"}))}));const Er={variant:{default:"yst-feature-upsell--default",card:"yst-feature-upsell--card"}},xr=e=>{let{children:t,shouldUpsell:a=!0,className:n="",variant:o="card",cardLink:i="",cardText:c="",...u}=e;const p=d();return a?Object(s.createElement)("div",{className:l()("yst-feature-upsell",Er.variant[o],n)},Object(s.createElement)("div",{className:"yst-space-y-8 yst-grayscale"},t),Object(s.createElement)("div",{className:"yst-absolute yst-inset-0 yst-ring-1 yst-ring-black yst-ring-opacity-5 yst-shadow-lg yst-rounded-md"}),Object(s.createElement)("div",{className:"yst-absolute yst-inset-0 yst-flex yst-items-center yst-justify-center"},Object(s.createElement)(Xt,r()({as:"a",className:"yst-gap-2 yst-shadow-lg yst-shadow-amber-700/30",variant:"upsell",href:i,target:"_blank",rel:"noopener"},u),Object(s.createElement)(jr,r()({className:"yst-w-5 yst-h-5 yst--ml-1 yst-shrink-0"},p)),c))):t};xr.propTypes={children:c.a.node.isRequired,shouldUpsell:c.a.bool,className:c.a.string,variant:c.a.oneOf(Object.keys(Er.variant)),cardLink:c.a.string,cardText:c.a.string};var Nr=xr,Rr=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}))})),wr=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}))}));const Tr=Object(s.forwardRef)((e,t)=>{let{id:a,name:n,value:o,selectLabel:i,dropLabel:c,screenReaderLabel:d,selectDescription:p,disabled:b,iconAs:m,onChange:f,className:y,...v}=e;const[g,O]=Object(s.useState)(!1),h=Object(s.useCallback)(e=>{e.preventDefault(),Object(u.isEmpty)(e.dataTransfer.items)||O(!0)},[O]),j=Object(s.useCallback)(e=>{e.preventDefault(),O(!1)},[O]),E=Object(s.useCallback)(e=>{e.preventDefault()},[]),x=Object(s.useCallback)(e=>{e.preventDefault(),O(!1),Object(u.isEmpty)(e.dataTransfer.files)||f(e.dataTransfer.files[0])},[O,f]);return Object(s.createElement)("div",{onDragEnter:h,onDragLeave:j,onDragOver:E,onDrop:x,className:l()("yst-file-input",{"yst-is-drag-over":g,"yst-is-disabled":b,className:y})},Object(s.createElement)("div",{className:"yst-file-input__content"},Object(s.createElement)(m,{className:"yst-file-input__icon"}),Object(s.createElement)("div",{className:"yst-file-input__labels"},Object(s.createElement)("input",r()({ref:t,type:"file",id:a,name:n,value:o,onChange:f,className:"yst-file-input__input","aria-labelledby":d,disabled:b},v)),Object(s.createElement)(ga,{as:"label",htmlFor:a,className:"yst-file-input__select-label"},i),Object(s.createElement)("span",null," "),c),p&&Object(s.createElement)("span",null,p)))}),Pr={id:c.a.string.isRequired,name:c.a.string.isRequired,value:c.a.string.isRequired,selectLabel:c.a.string.isRequired,dropLabel:c.a.string.isRequired,screenReaderLabel:c.a.string.isRequired,selectDescription:c.a.string,disabled:c.a.bool,iconAs:c.a.elementType,onChange:c.a.func.isRequired,className:c.a.string};Tr.defaultProps={selectDescription:"",disabled:!1,iconAs:wr,className:""},Tr.propTypes=Pr;const Cr=e=>Object(s.createElement)(Tr,e);Cr.propTypes=Pr,Cr.defaultProps=Tr.defaultProps,Cr.displayName="FileInput";var Sr=Tr;const kr={idle:"idle",selected:"selected",loading:"loading",success:"success",aborted:"aborted",error:"error"},_r=Object(s.createContext)({status:kr.idle}),Lr={enter:"yst-transition-opacity yst-ease-in-out yst-duration-1000 yst-delay-200",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-ease-in-out yst-duration-200",leaveFrom:"yst-opacity-0",leaveTo:"yst-opacity-100",className:"yst-absolute"},Fr=e=>{const t=t=>{let{children:a}=t;const{status:n}=Object(s.useContext)(_r);return Object(s.createElement)(Nt,{show:n===e,enter:"yst-transition-opacity yst-ease-in-out yst-duration-1000 yst-delay-200",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",className:"yst-mt-6"},a)};return t.propTypes={children:c.a.node},t.displayName="FileImport."+Object(u.capitalize)(e),t},Mr=Object(s.forwardRef)((e,t)=>{let{children:a="",id:n,name:o,selectLabel:l,dropLabel:i,screenReaderLabel:c,abortScreenReaderLabel:d,selectDescription:p,status:b,onChange:m,onAbort:f,feedbackTitle:y,feedbackDescription:v,progressMin:g,progressMax:O,progress:h}=e;const j=Object(s.useMemo)(()=>b===kr.selected,[b]),x=Object(s.useMemo)(()=>b===kr.loading,[b]),N=Object(s.useMemo)(()=>b===kr.success,[b]),R=Object(s.useMemo)(()=>b===kr.aborted,[b]),w=Object(s.useMemo)(()=>b===kr.error,[b]),T=Object(s.useMemo)(()=>Object(u.includes)([kr.selected,kr.loading,kr.success,kr.aborted,kr.error],b),[b]),P=Object(s.useCallback)(e=>{Object(u.isEmpty)(e.target.files)||m(e.target.files[0])},[m]);return Object(s.createElement)(_r.Provider,{value:{status:b}},Object(s.createElement)("div",{className:"yst-file-import"},Object(s.createElement)(Sr,{ref:t,id:n,name:o,value:"",onChange:P,className:"yst-file-import__input","aria-labelledby":c,disabled:x,selectLabel:l,dropLabel:i,screenReaderLabel:c,selectDescription:p}),Object(s.createElement)(Nt,{show:T,enter:"yst-transition-opacity yst-ease-in-out yst-duration-1000 yst-delay-200",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100"},Object(s.createElement)("div",{className:"yst-file-import__feedback"},Object(s.createElement)("header",{className:"yst-file-import__feedback-header"},Object(s.createElement)("div",{className:"yst-file-import__feedback-figure"},Object(s.createElement)(Rr,null)),Object(s.createElement)("div",{className:"yst-flex-1"},Object(s.createElement)("span",{className:"yst-file-import__feedback-title"},y),Object(s.createElement)("p",{className:"yst-file-import__feedback-description"},v),!Object(u.isNull)(h)&&Object(s.createElement)(Sa,{min:g,max:O,progress:h,className:"yst-mt-1.5"})),Object(s.createElement)("div",{className:"yst-relative yst-h-5 yst-w-5"},Object(s.createElement)(Nt,r()({show:j},Lr),Object(s.createElement)(E,{variant:"info",className:"yst-w-5 yst-h-5"})),Object(s.createElement)(Nt,r()({show:x},Lr),Object(s.createElement)("button",{onClick:f,className:"yst-file-import__abort-button"},Object(s.createElement)("span",{className:"yst-sr-only"},d),Object(s.createElement)(Tt,null))),Object(s.createElement)(Nt,r()({show:N},Lr),Object(s.createElement)(E,{variant:"success",className:"yst-w-5 yst-h-5"})),Object(s.createElement)(Nt,r()({show:R},Lr),Object(s.createElement)(E,{variant:"warning",className:"yst-w-5 yst-h-5"})),Object(s.createElement)(Nt,r()({show:w},Lr),Object(s.createElement)(E,{variant:"error",className:"yst-w-5 yst-h-5"})))),a))))}),Ir={children:c.a.node,id:c.a.string.isRequired,name:c.a.string.isRequired,selectLabel:c.a.string.isRequired,dropLabel:c.a.string.isRequired,screenReaderLabel:c.a.string.isRequired,abortScreenReaderLabel:c.a.string.isRequired,selectDescription:c.a.string,feedbackTitle:c.a.string.isRequired,feedbackDescription:c.a.string,progressMin:c.a.number,progressMax:c.a.number,progress:c.a.number,status:c.a.oneOf(Object(u.values)(kr)),onChange:c.a.func.isRequired,onAbort:c.a.func.isRequired};Mr.propTypes=Ir,Mr.defaultProps={feedbackDescription:"",progressMin:null,progressMax:null,progress:null,status:kr.idle},Mr.Selected=Fr(kr.selected),Mr.Loading=Fr(kr.loading),Mr.Success=Fr(kr.success),Mr.Aborted=Fr(kr.aborted),Mr.Error=Fr(kr.error);const Dr=e=>Object(s.createElement)(Mr,e);Dr.propTypes=Ir,Dr.defaultProps=Mr.defaultProps,Dr.displayName="FileImport";var qr=Mr,Ar=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ar||{});function Br(...e){return Object(p.useMemo)(()=>W(...e),[...e])}function Hr(e,t,a,n){let r=I(a);Object(p.useEffect)(()=>{function a(e){r.current(e)}return(e=null!=e?e:window).addEventListener(t,a,n),()=>e.removeEventListener(t,a,n)},[e,t,n])}var zr,Ur=((zr=Ur||{})[zr.None=1]="None",zr[zr.InitialFocus=2]="InitialFocus",zr[zr.TabLock=4]="TabLock",zr[zr.FocusLock=8]="FocusLock",zr[zr.RestoreFocus=16]="RestoreFocus",zr[zr.All=30]="All",zr);let Vr=Object.assign(Ee((function(e,t){let a=Object(p.useRef)(null),n=de(a,t),{initialFocus:r,containers:s,features:o=30,...l}=e;z()||(o=1);let i=Br(a);!function({ownerDocument:e},t){let a=Object(p.useRef)(null);Hr(null==e?void 0:e.defaultView,"focusout",e=>{!t||a.current||(a.current=e.target)},!0),De(()=>{t||((null==e?void 0:e.activeElement)===(null==e?void 0:e.body)&&ae(a.current),a.current=null)},[t]);let n=Object(p.useRef)(!1);Object(p.useEffect)(()=>(n.current=!1,()=>{n.current=!0,q(()=>{!n.current||(ae(a.current),a.current=null)})}),[])}({ownerDocument:i},Boolean(16&o));let c=function({ownerDocument:e,container:t,initialFocus:a},n){let r=Object(p.useRef)(null),s=lt();return De(()=>{if(!n)return;let o=t.current;!o||q(()=>{if(!s.current)return;let t=null==e?void 0:e.activeElement;if(null!=a&&a.current){if((null==a?void 0:a.current)===t)return void(r.current=t)}else if(o.contains(t))return void(r.current=t);null!=a&&a.current?ae(a.current):se(o,Z.First)===X.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),r.current=null==e?void 0:e.activeElement})},[n]),r}({ownerDocument:i,container:a,initialFocus:r},Boolean(2&o));!function({ownerDocument:e,container:t,containers:a,previousActiveElement:n},r){let s=lt();Hr(null==e?void 0:e.defaultView,"focus",e=>{if(!r||!s.current)return;let o=new Set(null==a?void 0:a.current);o.add(t);let l=n.current;if(!l)return;let i=e.target;i&&i instanceof HTMLElement?$r(o,i)?(n.current=i,ae(i)):(e.preventDefault(),e.stopPropagation(),ae(l)):ae(n.current)},!0)}({ownerDocument:i,container:a,containers:s,previousActiveElement:c},Boolean(8&o));let u=function(){let e=Object(p.useRef)(0);return function(e,t,a){let n=I(t);Object(p.useEffect)(()=>{function t(e){n.current(e)}return window.addEventListener(e,t,!0),()=>window.removeEventListener(e,t,!0)},[e,!0])}("keydown",t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)}),e}(),d=H(e=>{let t=a.current;t&&$(u.current,{[Ar.Forwards]:()=>{se(t,Z.First,{skipElements:[e.relatedTarget]})},[Ar.Backwards]:()=>{se(t,Z.Last,{skipElements:[e.relatedTarget]})}})}),m=B(),f=Object(p.useRef)(!1),y={ref:n,onKeyDown(e){"Tab"==e.key&&(f.current=!0,m.requestAnimationFrame(()=>{f.current=!1}))},onBlur(e){let t=new Set(null==s?void 0:s.current);t.add(a);let n=e.relatedTarget;n instanceof HTMLElement&&"true"!==n.dataset.headlessuiFocusGuard&&($r(t,n)||(f.current?se(a.current,$(u.current,{[Ar.Forwards]:()=>Z.Next,[Ar.Backwards]:()=>Z.Previous})|Z.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&ae(e.target)))}};return b.a.createElement(b.a.Fragment,null,Boolean(4&o)&&b.a.createElement(Se,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:Ce.Focusable}),Oe({ourProps:y,theirProps:l,defaultTag:"div",name:"FocusTrap"}),Boolean(4&o)&&b.a.createElement(Se,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:Ce.Focusable}))})),{features:Ur});function $r(e,t){var a;for(let n of e)if(null!=(a=n.current)&&a.contains(t))return!0;return!1}let Wr=new Set,Gr=new Map;function Kr(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Qr(e){let t=Gr.get(e);!t||(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var Yr=a(34);let Zr=Object(p.createContext)(!1);function Xr(e){return b.a.createElement(Zr.Provider,{value:e.force},e.children)}let Jr=p.Fragment,es=Ee((function(e,t){let a=e,n=Object(p.useRef)(null),r=de(function(e,t=!0){return Object.assign(e,{[ue]:t})}(e=>{n.current=e}),t),s=Br(n),o=function(e){let t=Object(p.useContext)(Zr),a=Object(p.useContext)(as),n=Br(e),[r,s]=Object(p.useState)(()=>{if(!t&&null!==a||F.isServer)return null;let e=null==n?void 0:n.getElementById("headlessui-portal-root");if(e)return e;if(null===n)return null;let r=n.createElement("div");return r.setAttribute("id","headlessui-portal-root"),n.body.appendChild(r)});return Object(p.useEffect)(()=>{null!==r&&(null!=n&&n.body.contains(r)||null==n||n.body.appendChild(r))},[r,n]),Object(p.useEffect)(()=>{t||null!==a&&s(a.current)},[a,s,t]),r}(n),[l]=Object(p.useState)(()=>{var e;return F.isServer?null:null!=(e=null==s?void 0:s.createElement("div"))?e:null}),i=z(),c=Object(p.useRef)(!1);return M(()=>{if(c.current=!1,o&&l)return o.contains(l)||(l.setAttribute("data-headlessui-portal",""),o.appendChild(l)),()=>{c.current=!0,q(()=>{var e;!c.current||!o||!l||(l instanceof Node&&o.contains(l)&&o.removeChild(l),o.childNodes.length<=0&&(null==(e=o.parentElement)||e.removeChild(o)))})}},[o,l]),i&&o&&l?Object(Yr.createPortal)(Oe({ourProps:{ref:r},theirProps:a,defaultTag:Jr,name:"Portal"}),l):null})),ts=p.Fragment,as=Object(p.createContext)(null),ns=Ee((function(e,t){let{target:a,...n}=e,r={ref:de(t)};return b.a.createElement(as.Provider,{value:a},Oe({ourProps:r,theirProps:n,defaultTag:ts,name:"Popover.Group"}))})),rs=Object.assign(es,{Group:ns}),ss=Object(p.createContext)(()=>{});ss.displayName="StackContext";var os=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(os||{});function ls({children:e,onUpdate:t,type:a,element:n,enabled:r}){let s=Object(p.useContext)(ss),o=H((...e)=>{null==t||t(...e),s(...e)});return M(()=>{let e=void 0===r||!0===r;return e&&o(0,a,n),()=>{e&&o(1,a,n)}},[o,a,n,r]),b.a.createElement(ss.Provider,{value:o},e)}var is=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(is||{}),cs=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(cs||{});let us={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},ds=Object(p.createContext)(null);function ps(e){let t=Object(p.useContext)(ds);if(null===t){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ps),t}return t}function bs(e,t){return $(t.type,us,e,t)}ds.displayName="DialogContext";let ms=ve.RenderStrategy|ve.Static,fs=Ee((function(e,t){let a=V(),{id:n="headlessui-dialog-"+a,open:r,onClose:s,initialFocus:o,__demoMode:l=!1,...i}=e,[c,u]=Object(p.useState)(0),d=Le();void 0===r&&null!==d&&(r=$(d,{[_e.Open]:!0,[_e.Closed]:!1}));let m=Object(p.useRef)(new Set),f=Object(p.useRef)(null),y=de(f,t),v=Object(p.useRef)(null),g=Br(f),O=e.hasOwnProperty("open")||null!==d,h=e.hasOwnProperty("onClose");if(!O&&!h)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!O)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!h)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+r);if("function"!=typeof s)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: "+s);let j=r?0:1,[E,x]=Object(p.useReducer)(bs,{titleId:null,descriptionId:null,panelRef:Object(p.createRef)()}),N=H(()=>s(!1)),R=H(e=>x({type:0,id:e})),w=!!z()&&!l&&0===j,T=c>1,P=null!==Object(p.useContext)(ds),C=T?"parent":"leaf";!function(e,t=!0){M(()=>{if(!t||!e.current)return;let a=e.current,n=W(a);if(n){Wr.add(a);for(let e of Gr.keys())e.contains(a)&&(Qr(e),Gr.delete(e));return n.querySelectorAll("body > *").forEach(e=>{if(e instanceof HTMLElement){for(let t of Wr)if(e.contains(t))return;1===Wr.size&&(Gr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Kr(e))}}),()=>{if(Wr.delete(a),Wr.size>0)n.querySelectorAll("body > *").forEach(e=>{if(e instanceof HTMLElement&&!Gr.has(e)){for(let t of Wr)if(e.contains(t))return;Gr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Kr(e)}});else for(let e of Gr.keys())Qr(e),Gr.delete(e)}}},[t])}(f,!!T&&w);let S=H(()=>{var e,t;return[...Array.from(null!=(e=null==g?void 0:g.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))?e:[]).filter(e=>!(e===document.body||e===document.head||!(e instanceof HTMLElement)||e.contains(v.current)||E.panelRef.current&&e.contains(E.panelRef.current))),null!=(t=E.panelRef.current)?t:f.current]});le(()=>S(),N,w&&!T),Hr(null==g?void 0:g.defaultView,"keydown",e=>{e.defaultPrevented||e.key===Me.Escape&&0===j&&(T||(e.preventDefault(),e.stopPropagation(),N()))}),function(e,t,a=(()=>[document.body])){Object(p.useEffect)(()=>{var n;if(!t||!e)return;let r=A(),s=window.pageYOffset;function o(e,t,a){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:a}),r.add(()=>{Object.assign(e.style,{[t]:n})})}let l=e.documentElement,i=(null!=(n=e.defaultView)?n:window).innerWidth-l.clientWidth;if(o(l,"overflow","hidden"),i>0&&o(l,"paddingRight",i-(l.clientWidth-l.offsetWidth)+"px"),/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0){o(e.body,"marginTop",`-${s}px`),window.scrollTo(0,0);let t=null;r.addEventListener(e,"click",n=>{if(n.target instanceof HTMLElement)try{let r=n.target.closest("a");if(!r)return;let{hash:s}=new URL(r.href),o=e.querySelector(s);o&&!a().some(e=>e.contains(o))&&(t=o)}catch{}},!0),r.addEventListener(e,"touchmove",e=>{e.target instanceof HTMLElement&&!a().some(t=>t.contains(e.target))&&e.preventDefault()},{passive:!1}),r.add(()=>{window.scrollTo(0,window.pageYOffset+s),t&&t.isConnected&&(t.scrollIntoView({block:"nearest"}),t=null)})}return r.dispose},[e,t])}(g,0===j&&!P,S),Object(p.useEffect)(()=>{if(0!==j||!f.current)return;let e=new IntersectionObserver(e=>{for(let t of e)0===t.boundingClientRect.x&&0===t.boundingClientRect.y&&0===t.boundingClientRect.width&&0===t.boundingClientRect.height&&N()});return e.observe(f.current),()=>e.disconnect()},[j,f,N]);let[k,_]=zn(),L=Object(p.useMemo)(()=>[{dialogState:j,close:N,setTitleId:R},E],[j,E,N,R]),F=Object(p.useMemo)(()=>({open:0===j}),[j]),I={ref:y,id:n,role:"dialog","aria-modal":0===j||void 0,"aria-labelledby":E.titleId,"aria-describedby":k};return b.a.createElement(ls,{type:"Dialog",enabled:0===j,element:f,onUpdate:H((e,t,a)=>{"Dialog"===t&&$(e,{[os.Add](){m.current.add(a),u(e=>e+1)},[os.Remove](){m.current.add(a),u(e=>e-1)}})})},b.a.createElement(Xr,{force:!0},b.a.createElement(rs,null,b.a.createElement(ds.Provider,{value:L},b.a.createElement(rs.Group,{target:f},b.a.createElement(Xr,{force:!1},b.a.createElement(_,{slot:F,name:"Dialog.Description"},b.a.createElement(Vr,{initialFocus:o,containers:m,features:w?$(C,{parent:Vr.features.RestoreFocus,leaf:Vr.features.All&~Vr.features.FocusLock}):Vr.features.None},Oe({ourProps:I,theirProps:i,slot:F,defaultTag:"div",features:ms,visible:0===j,name:"Dialog"})))))))),b.a.createElement(Se,{features:Ce.Hidden,ref:v}))})),ys=Ee((function(e,t){let a=V(),{id:n="headlessui-dialog-overlay-"+a,...r}=e,[{dialogState:s,close:o}]=ps("Dialog.Overlay");return Oe({ourProps:{ref:de(t),id:n,"aria-hidden":!0,onClick:H(e=>{if(e.target===e.currentTarget){if(Re(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),o()}})},theirProps:r,slot:Object(p.useMemo)(()=>({open:0===s}),[s]),defaultTag:"div",name:"Dialog.Overlay"})})),vs=Ee((function(e,t){let a=V(),{id:n="headlessui-dialog-backdrop-"+a,...r}=e,[{dialogState:s},o]=ps("Dialog.Backdrop"),l=de(t);Object(p.useEffect)(()=>{if(null===o.panelRef.current)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[o.panelRef]);let i=Object(p.useMemo)(()=>({open:0===s}),[s]);return b.a.createElement(Xr,{force:!0},b.a.createElement(rs,null,Oe({ourProps:{ref:l,id:n,"aria-hidden":!0},theirProps:r,slot:i,defaultTag:"div",name:"Dialog.Backdrop"})))})),gs=Ee((function(e,t){let a=V(),{id:n="headlessui-dialog-panel-"+a,...r}=e,[{dialogState:s},o]=ps("Dialog.Panel"),l=de(t,o.panelRef),i=Object(p.useMemo)(()=>({open:0===s}),[s]);return Oe({ourProps:{ref:l,id:n,onClick:H(e=>{e.stopPropagation()})},theirProps:r,slot:i,defaultTag:"div",name:"Dialog.Panel"})})),Os=Ee((function(e,t){let a=V(),{id:n="headlessui-dialog-title-"+a,...r}=e,[{dialogState:s,setTitleId:o}]=ps("Dialog.Title"),l=de(t);Object(p.useEffect)(()=>(o(n),()=>o(null)),[n,o]);let i=Object(p.useMemo)(()=>({open:0===s}),[s]);return Oe({ourProps:{ref:l,id:n},theirProps:r,slot:i,defaultTag:"h2",name:"Dialog.Title"})})),hs=Object.assign(fs,{Backdrop:vs,Panel:gs,Overlay:ys,Title:Os,Description:Un});const js=Object(s.forwardRef)((e,t)=>{let{children:a,className:n}=e;return Object(s.createElement)("div",{ref:t,className:l()("yst-modal__container-header",n)},a)});js.displayName="Modal.Container.Header",js.propTypes={children:c.a.node.isRequired,className:c.a.string},js.defaultProps={className:""};const Es=Object(s.forwardRef)((e,t)=>{let{children:a,className:n}=e;return Object(s.createElement)("div",{ref:t,className:l()("yst-modal__container-content",n)},a)});Es.displayName="Modal.Container.Content",Es.propTypes={children:c.a.node.isRequired,className:c.a.string},Es.defaultProps={className:""};const xs=Object(s.forwardRef)((e,t)=>{let{children:a,className:n}=e;return Object(s.createElement)("div",{ref:t,className:l()("yst-modal__container-footer",n)},a)});xs.displayName="Modal.Container.Footer",xs.propTypes={children:c.a.node.isRequired,className:c.a.string},xs.defaultProps={className:""};const Ns=Object(s.forwardRef)((e,t)=>{let{children:a,className:n}=e;return Object(s.createElement)("div",{ref:t,className:l()("yst-modal__container",n)},a)});Ns.displayName="Modal.Container",Ns.propTypes={children:c.a.node.isRequired,className:c.a.string},Ns.defaultProps={className:""},Ns.Header=js,Ns.Content=Es,Ns.Footer=xs;const Rs=Object(s.createContext)({isOpen:!1,onClose:u.noop}),ws=()=>Object(s.useContext)(Rs),Ts=Object(s.forwardRef)((e,t)=>{let{children:a,size:n,className:o,as:i,...c}=e;return Object(s.createElement)(hs.Title,r()({as:i,ref:t,className:l()("yst-title",n?kn.size[n]:"",o)},c),a)});Ts.defaultProps={className:"",as:"h1"},Ts.propTypes={size:c.a.oneOf(Object.keys(kn.size)),className:c.a.string,children:c.a.node.isRequired,as:c.a.elementType};const Ps=Object(s.forwardRef)((e,t)=>{let{children:a,className:n="",hasCloseButton:o=!0,closeButtonScreenReaderText:i="Close",...c}=e;const{onClose:u}=ws(),p=d();return Object(s.createElement)(hs.Panel,r()({ref:t,className:l()("yst-modal__panel",n)},c),o&&Object(s.createElement)("div",{className:"yst-modal__close"},Object(s.createElement)("button",{type:"button",onClick:u,className:"yst-modal__close-button"},Object(s.createElement)("span",{className:"yst-sr-only"},i),Object(s.createElement)(Tt,r()({className:"yst-h-6 yst-w-6"},p)))),a)});Ps.propTypes={children:c.a.node.isRequired,className:c.a.string,hasCloseButton:c.a.bool,closeButtonScreenReaderText:c.a.string};const Cs={position:{center:"yst-modal--center","top-center":"yst-modal--top-center"}},Ss=Object(s.forwardRef)((e,t)=>{let{isOpen:a,onClose:n,children:o,className:i="",position:c="center",initialFocus:u=null,...d}=e;return Object(s.createElement)(Rs.Provider,{value:{isOpen:a,onClose:n,initialFocus:u}},Object(s.createElement)(Nt.Root,{show:a,as:s.Fragment},Object(s.createElement)(hs,r()({as:"div",ref:t,className:"yst-root",open:a,onClose:n,initialFocus:u},d),Object(s.createElement)("div",{className:l()("yst-modal",Cs.position[c],i)},Object(s.createElement)(Nt.Child,{as:s.Fragment,enter:"yst-ease-out yst-duration-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-ease-in yst-duration-200",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0"},Object(s.createElement)("div",{className:"yst-modal__overlay"})),Object(s.createElement)("div",{className:"yst-modal__layout"},Object(s.createElement)(Nt.Child,{as:s.Fragment,enter:"yst-ease-out yst-duration-300",enterFrom:"yst-opacity-0 yst-translate-y-4 sm:yst-translate-y-0 sm:yst-scale-95",enterTo:"yst-opacity-100 yst-translate-y-0 sm:yst-scale-100",leave:"yst-ease-in yst-duration-200",leaveFrom:"yst-opacity-100 yst-translate-y-0 sm:yst-scale-100",leaveTo:"yst-opacity-0 yst-translate-y-4 sm:yst-translate-y-0 sm:yst-scale-95"},o))))))});Ss.propTypes={isOpen:c.a.bool.isRequired,onClose:c.a.func.isRequired,children:c.a.node.isRequired,className:c.a.string,position:c.a.oneOf(Object.keys(Cs.position)),initialFocus:c.a.oneOfType([c.a.func,c.a.object])},Ss.displayName="Modal",Ss.Panel=Ps,Ss.Panel.displayName="Modal.Panel",Ss.Title=Ts,Ss.Title.displayName="Modal.Title",Ss.Description=hs.Description,Ss.Description.displayName="Modal.Description",Ss.Container=Ns;var ks=Ss;const _s=Object(s.createContext)({position:"bottom-left"}),Ls={variant:{info:"yst-notification--info",warning:"yst-notification--warning",success:"yst-notification--success",error:"yst-notification--error"},position:{"bottom-center":"yst-translate-y-full","bottom-left":"yst-translate-y-full","top-center":"yst--translate-y-full"},size:{default:"",large:"yst-notification--large"}},Fs=e=>{let{children:t,id:a,variant:n="info",size:r="default",title:o="",description:i="",onDismiss:c=u.noop,autoDismiss:d=null,dismissScreenReaderLabel:p}=e;const{position:b}=Object(s.useContext)(_s),[m,f]=Object(s.useState)(!1),y=Object(s.useCallback)(()=>{f(!1),setTimeout(()=>{c(a)},150)},[c,a]);return Object(s.useEffect)(()=>{let e;return f(!0),d&&(e=setTimeout(()=>{y()},d)),()=>clearTimeout(e)},[]),Object(s.createElement)(Nt,{show:m,enter:"yst-transition yst-ease-in-out yst-duration-150",enterFrom:l()("yst-opacity-0",Ls.position[b]),enterTo:"yst-translate-y-0",leave:"yst-transition yst-ease-in-out yst-duration-150",leaveFrom:"yst-translate-y-0",leaveTo:l()("yst-opacity-0",Ls.position[b]),className:l()("yst-notification",Ls.variant[n],Ls.size[r]),role:"alert"},Object(s.createElement)("div",{className:"yst-flex yst-items-start yst-gap-3"},Object(s.createElement)("div",{className:"yst-flex-shrink-0"},Object(s.createElement)(E,{variant:n,className:"yst-notification__icon"})),Object(s.createElement)("div",{className:"yst-w-0 yst-flex-1"},o&&Object(s.createElement)("p",{className:"yst-text-sm yst-font-medium yst-text-slate-800"},o),t||i&&(Object(u.isArray)(i)?Object(s.createElement)("ul",{className:"yst-list-disc yst-ml-4"},i.map((e,t)=>Object(s.createElement)("li",{className:"yst-pt-1",key:`${e}-${t}`},e))):Object(s.createElement)("p",null,i))),c&&Object(s.createElement)("div",{className:"yst-flex-shrink-0 yst-flex"},Object(s.createElement)("button",{onClick:y,className:"yst-bg-white yst-rounded-md yst-inline-flex yst-text-slate-400 hover:yst-text-slate-500 focus:yst-outline-none focus:yst-ring-2 focus:yst-ring-offset-2 focus:yst-ring-primary-500"},Object(s.createElement)("span",{className:"yst-sr-only"},p),Object(s.createElement)(Tt,{className:"yst-h-5 yst-w-5"})))))};Fs.propTypes={children:c.a.node,id:c.a.string.isRequired,variant:c.a.oneOf(Object(u.keys)(Ls.variant)),size:c.a.oneOf(Object(u.keys)(Ls.size)),title:c.a.string,description:c.a.oneOfType([c.a.node,c.a.arrayOf(c.a.node)]),onDismiss:c.a.func,autoDismiss:c.a.number,dismissScreenReaderLabel:c.a.string.isRequired};const Ms={position:{"bottom-center":"yst-notifications--bottom-center","bottom-left":"yst-notifications--bottom-left","top-center":"yst-notifications--top-center"}},Is=e=>{let{children:t,className:a="",position:n="bottom-left",...o}=e;return Object(s.createElement)(_s.Provider,{value:{position:n}},Object(s.createElement)("aside",r()({className:l()("yst-notifications",Ms.position[n],a)},o),t))};Is.propTypes={children:c.a.node,className:c.a.string,position:c.a.oneOf(Object(u.keys)(Ms.position))},(Is.Notification=Fs).displayName="Notifications.Notification";var Ds=Is,qs=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"}))})),As=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));const Bs=e=>{let{className:t,children:a,active:n,disabled:o,...i}=e;return Object(s.createElement)("button",r()({type:"button",className:l()("yst-pagination__button",t,n&&!o&&"yst-pagination__button--active",o&&"yst-pagination__button--disabled"),disabled:o},i),a)};Bs.displayName="Pagination.Button",Bs.propTypes={className:c.a.string,children:c.a.node.isRequired,active:c.a.bool,disabled:c.a.bool},Bs.defaultProps={className:"",active:!1,disabled:void 0};var Hs=Bs;const zs=()=>Object(s.createElement)("span",{className:"yst-pagination-display__truncated"},"..."),Us=e=>{let{current:t,total:a,onNavigate:n,maxPageButtons:r,disabled:o}=e;const l=Object(s.useMemo)(()=>Object(u.clamp)(a,1,r),[a,r]),i=Object(s.useMemo)(()=>Object(u.round)(l/2,0),[l]),c=Object(s.useMemo)(()=>a>r&&r>1&&t!==i+1,[a,r,i]),d=Object(s.useMemo)(()=>a-(l-i)+1,[a,l,i]),p=Object(s.useMemo)(()=>t>i&&t<d,[t,i,d]);return Object(s.createElement)(s.Fragment,null,Object(u.range)(i).map(e=>{const a=e+1;return Object(s.createElement)(Hs,{key:a,className:"yst-px-4",onClick:n,"data-page":a,active:a===t,disabled:o},a)}),c&&Object(s.createElement)(zs,null),p&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)(Hs,{className:"yst-px-4",onClick:n,"data-page":t,active:!0,disabled:o},t),t!==d-1&&Object(s.createElement)(zs,null)),Object(u.rangeRight)(l-i).map(e=>{const r=a-e;return Object(s.createElement)(Hs,{key:r,className:"yst-px-4",onClick:n,"data-page":r,active:r===t,disabled:o},r)}))};Us.displayName="Pagination.DisplayButtons",Us.propTypes={current:c.a.number.isRequired,total:c.a.number.isRequired,onNavigate:c.a.func.isRequired,maxPageButtons:c.a.number.isRequired,disabled:c.a.bool.isRequired};var Vs=Us;const $s=e=>{let{current:t,total:a}=e;return Object(s.createElement)("div",{className:"yst-pagination-display__text"},Object(s.createElement)("span",{className:"yst-pagination-display__current-text"},t)," / ",a)};$s.displayName="Pagination.DisplayText",$s.propTypes={current:c.a.number.isRequired,total:c.a.number.isRequired};var Ws=$s;const Gs={buttons:"buttons",text:"text"},Ks=e=>{let{className:t,current:a,total:n,onNavigate:o,variant:i,maxPageButtons:c,disabled:p,screenReaderTextPrevious:b,screenReaderTextNext:m,...f}=e;const y=d(),v=Object(s.useCallback)(e=>{let{target:t}=e;return o(Object(u.parseInt)(t.dataset.page))},[o]);return Object(s.createElement)("nav",r()({className:l()("yst-pagination",t)},f),Object(s.createElement)(Hs,{className:"yst-rounded-l-md",onClick:v,"data-page":a-1,disabled:p||a-1<1},Object(s.createElement)("span",{className:"yst-pointer-events-none yst-sr-only"},b),Object(s.createElement)(qs,r()({className:"yst-pointer-events-none yst-h-5 yst-w-5 rtl:yst-rotate-180"},y))),i===Gs.text&&Object(s.createElement)(Ws,{current:a,total:n}),i===Gs.buttons&&Object(s.createElement)(Vs,{current:a,total:n,maxPageButtons:c,onNavigate:v,disabled:p}),Object(s.createElement)(Hs,{className:"yst-rounded-r-md",onClick:v,"data-page":a+1,disabled:p||a+1>n},Object(s.createElement)("span",{className:"yst-pointer-events-none yst-sr-only"},m),Object(s.createElement)(As,r()({className:"yst-pointer-events-none yst-h-5 yst-w-5 rtl:yst-rotate-180"},y))))};Ks.propTypes={className:c.a.string,current:c.a.number.isRequired,total:c.a.number.isRequired,onNavigate:c.a.func.isRequired,variant:c.a.oneOf(Object.keys(Gs)),maxPageButtons:c.a.number,disabled:c.a.bool,screenReaderTextPrevious:c.a.string.isRequired,screenReaderTextNext:c.a.string.isRequired},Ks.defaultProps={className:"",variant:Gs.buttons,maxPageButtons:6,disabled:!1};var Qs=Ks;const Ys={variant:{default:"","inline-block":"yst-radio-group--inline-block"}},Zs=e=>{let{children:t=null,id:a="",name:n="",value:o="",label:i,description:c,options:d,onChange:p=u.noop,variant:b="default",disabled:m=!1,className:f="",...y}=e;const v=Object(s.useCallback)(e=>{let{target:t}=e;return t.checked&&p(t.value)},[p]);return Object(s.createElement)("fieldset",{id:"radio-group-"+a,className:l()("yst-radio-group",m&&"yst-radio-group--disabled",Ys.variant[b],f)},i&&Object(s.createElement)(na,{as:"legend",className:"yst-radio-group__label",label:i}),c&&Object(s.createElement)("div",{className:"yst-radio-group__description"},c),Object(s.createElement)("div",{className:"yst-radio-group__options"},t||d.map((e,t)=>{const l=`radio-${a}-${t}`;return Object(s.createElement)(Fa,r()({key:l,id:l,name:n,value:e.value,label:e.label,screenReaderLabel:e.screenReaderLabel,variant:b,checked:o===e.value,onChange:v,disabled:m},y))})))};Zs.propTypes={children:c.a.node,id:c.a.string,name:c.a.string,value:c.a.string,label:c.a.string,description:c.a.string,options:c.a.arrayOf(c.a.shape({value:c.a.string.isRequired,label:c.a.string.isRequired,screenReaderLabel:c.a.string})),onChange:c.a.func,variant:c.a.oneOf(Object.keys(Ys.variant)),disabled:c.a.bool,className:c.a.string},(Zs.Radio=Fa).displayName="RadioGroup.Radio";var Xs=Zs;const Js={isRtl:!1},eo=Object(s.createContext)(Js),to=e=>{let{children:t,context:a={},...n}=e;return Object(s.createElement)(eo.Provider,{value:{...Js,...a}},Object(s.createElement)("div",r()({className:"yst-root"},n),t))};to.propTypes={children:c.a.node.isRequired,context:c.a.shape({isRtl:c.a.bool})};var ao=to;const no=Object(s.forwardRef)((e,t)=>{let{id:a,label:n,description:o,disabled:i,validation:c,className:u,...d}=e;const{ids:p,describedBy:b}=Xn(a,{validation:null==c?void 0:c.message,description:o});return Object(s.createElement)("div",{className:l()("yst-select-field",i&&"yst-select-field--disabled",u)},Object(s.createElement)(sn,r()({ref:t,id:a,label:n,labelProps:{as:"label",className:"yst-label yst-select-field__label"},disabled:i,validation:c,className:"yst-select-field__select",buttonProps:{"aria-describedby":b}},d)),(null==c?void 0:c.message)&&Object(s.createElement)(R,{variant:null==c?void 0:c.variant,id:p.validation,className:"yst-select-field__validation"},c.message),o&&Object(s.createElement)("div",{id:p.description,className:"yst-select-field__description"},o))}),ro={id:c.a.string.isRequired,name:c.a.string.isRequired,label:c.a.string.isRequired,description:c.a.node,disabled:c.a.bool,validation:c.a.shape({variant:c.a.string,message:c.a.node}),className:c.a.string};no.propTypes=ro,no.Option=sn.Option,no.Option.displayName="SelectField.Option",no.defaultProps={disabled:!1,validation:{},className:""};const so=e=>Object(s.createElement)(no,e);so.propTypes=ro,so.defaultProps=no.defaultProps,so.displayName="SelectField";var oo=no,lo=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))})),io=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))}));const co=e=>{let{label:t,icon:a=null,children:n=null,defaultOpen:o=!0,...l}=e;const[i,c]=gr(o),u=i?lo:io;return Object(s.createElement)("div",null,Object(s.createElement)("button",r()({className:"yst-group yst-flex yst-w-full yst-items-center yst-justify-between yst-gap-3 yst-px-3 yst-py-2 yst-text-sm yst-font-medium yst-text-slate-800 yst-rounded-md yst-no-underline hover:yst-text-slate-900 hover:yst-bg-slate-50 focus:yst-outline-none focus:yst-ring-2 focus:yst-ring-primary-500",onClick:c,"aria-expanded":i},l),Object(s.createElement)("span",{className:"yst-flex yst-items-center yst-gap-3"},a&&Object(s.createElement)(a,{className:"yst-flex-shrink-0 yst--ml-1 yst-h-6 yst-w-6 yst-text-slate-400 group-hover:yst-text-slate-500"}),t),Object(s.createElement)(u,{className:"yst-h-4 yst-w-4 yst-text-slate-400 group-hover:yst-text-slate-500 yst-stroke-3"})),i&&n&&Object(s.createElement)("ul",{className:"yst-ml-8 yst-mt-1 yst-space-y-1"},n))};co.propTypes={label:c.a.string.isRequired,icon:c.a.elementType,defaultOpen:c.a.bool,children:c.a.node};var uo=co,po=p.forwardRef((function(e,t){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h7"}))}));const bo=e=>{let{children:t,openButtonId:a,closeButtonId:n,openButtonScreenReaderText:r="Open",closeButtonScreenReaderText:o="Close","aria-label":l}=e;const{isMobileMenuOpen:i,setMobileMenuOpen:c}=ho(),u=Object(s.useCallback)(()=>c(!0),[c]),d=Object(s.useCallback)(()=>c(!1),[c]);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(hs,{className:"yst-root",open:i,onClose:d,"aria-label":l},Object(s.createElement)("div",{className:"yst-mobile-navigation__dialog"},Object(s.createElement)("div",{className:"yst-fixed yst-inset-0 yst-bg-slate-600 yst-bg-opacity-75 yst-z-30","aria-hidden":"true"}),Object(s.createElement)(hs.Panel,{className:"yst-relative yst-flex yst-flex-1 yst-flex-col yst-max-w-xs yst-w-full yst-z-40 yst-bg-slate-100"},Object(s.createElement)("div",{className:"yst-absolute yst-top-0 yst-right-0 yst--mr-14 yst-p-1"},Object(s.createElement)("button",{id:n,className:"yst-flex yst-h-12 yst-w-12 yst-items-center yst-justify-center yst-rounded-full focus:yst-outline-none yst-bg-slate-600 focus:yst-ring-2 focus:yst-ring-inset focus:yst-ring-primary-500",onClick:d},Object(s.createElement)("span",{className:"yst-sr-only"},o),Object(s.createElement)(Tt,{className:"yst-h-6 yst-w-6 yst-text-white"}))),Object(s.createElement)("div",{className:"yst-flex-1 yst-h-0 yst-overflow-y-auto"},Object(s.createElement)("nav",{className:"yst-h-full yst-flex yst-flex-col yst-py-6 yst-px-2"},t))))),Object(s.createElement)("div",{className:"yst-mobile-navigation__top"},Object(s.createElement)("div",{className:"yst-flex yst-relative yst-flex-shrink-0 yst-h-16 yst-z-10 yst-bg-white yst-border-b yst-border-slate-200"},Object(s.createElement)("button",{id:a,className:"yst-px-4 yst-border-r yst-border-slate-200 yst-text-slate-500 focus:yst-outline-none focus:yst-ring-2 focus:yst-ring-inset focus:yst-ring-primary-500",onClick:u},Object(s.createElement)("span",{className:"yst-sr-only"},r),Object(s.createElement)(po,{className:"yst-w-6 yst-h-6"})))))};bo.propTypes={children:c.a.node.isRequired,openButtonId:c.a.string,closeButtonId:c.a.string,openButtonScreenReaderText:c.a.string,closeButtonScreenReaderText:c.a.string,"aria-label":c.a.string};var mo=bo;const fo=e=>{let{children:t,className:a=""}=e;return Object(s.createElement)("nav",{className:a},t)};fo.propTypes={children:c.a.node.isRequired,className:c.a.string};var yo=fo;const vo=e=>{let{as:t="a",pathProp:a="href",label:n,...o}=e;const{activePath:i,setMobileMenuOpen:c}=ho(),u=Object(s.useCallback)(()=>c(!1),[c]);return Object(s.createElement)("li",{className:"yst-m-0 yst-pb-1"},Object(s.createElement)(t,r()({className:l()("yst-group yst-flex yst-items-center yst-px-3 yst-py-2 yst-text-sm yst-font-medium yst-rounded-md yst-no-underline focus:yst-outline-none focus:yst-ring-1 focus:yst-ring-offset-1 focus:yst-ring-offset-transparent focus:yst-ring-primary-500",i===o[a]?"yst-bg-slate-200 yst-text-slate-900":"yst-text-slate-600 hover:yst-text-slate-900 hover:yst-bg-slate-50"),"aria-current":i===o[a]?"page":null,onClick:u},o),n))};vo.propTypes={as:c.a.elementType,pathProp:c.a.string,label:c.a.node.isRequired,isActive:c.a.bool};var go=vo;const Oo=Object(s.createContext)({activePath:"",isMobileMenuOpen:!1,setMobileMenuOpen:u.noop}),ho=()=>Object(s.useContext)(Oo),jo=e=>{let{activePath:t="",children:a}=e;const[n,r]=Object(s.useState)(!1);return Object(s.createElement)(Oo.Provider,{value:{activePath:t,isMobileMenuOpen:n,setMobileMenuOpen:r}},a)};jo.propTypes={activePath:c.a.string,children:c.a.node.isRequired},(jo.Sidebar=yo).displayName="SidebarNavigation.Sidebar",(jo.Mobile=mo).displayName="SidebarNavigation.Mobile",(jo.MenuItem=uo).displayName="SidebarNavigation.MenuItem",(jo.SubmenuItem=go).displayName="SidebarNavigation.SubmenuItem";var Eo=jo;const xo=Object(s.forwardRef)((e,t)=>{let{id:a,label:n,labelSuffix:o,disabled:i,className:c,description:u,validation:d,...p}=e;const{ids:b,describedBy:m}=Xn(a,{validation:null==d?void 0:d.message,description:u});return Object(s.createElement)("div",{className:l()("yst-tag-field",i&&"yst-tag-field--disabled",c)},Object(s.createElement)("div",{className:"yst-flex yst-items-center yst-mb-2"},Object(s.createElement)(na,{className:"yst-tag-field__label",htmlFor:a,label:n}),o),Object(s.createElement)(St,r()({as:jn,ref:t,id:a,disabled:i,className:"yst-tag-field__input","aria-describedby":m,validation:d},p)),(null==d?void 0:d.message)&&Object(s.createElement)(R,{variant:null==d?void 0:d.variant,id:b.validation,className:"yst-tag-field__validation"},d.message),u&&Object(s.createElement)("p",{id:b.description,className:"yst-tag-field__description"},u))}),No={id:c.a.string.isRequired,label:c.a.string.isRequired,labelSuffix:c.a.node,disabled:c.a.bool,className:c.a.string,description:c.a.node,validation:c.a.shape({variant:c.a.string,message:c.a.node})};xo.propTypes=No,xo.defaultProps={labelSuffix:null,disabled:!1,className:"",description:null,validation:{}};const Ro=e=>Object(s.createElement)(xo,e);Ro.propTypes=No,Ro.defaultProps=xo.defaultProps,Ro.displayName="TagField";var wo=xo;const To=Object(s.forwardRef)((e,t)=>{let{id:a,onChange:n,label:o,labelSuffix:i,disabled:c,readOnly:u,className:d,description:p,validation:b,...m}=e;const{ids:f,describedBy:y}=Xn(a,{validation:null==b?void 0:b.message,description:p});return Object(s.createElement)("div",{className:l()("yst-text-field",c&&"yst-text-field--disabled",u&&"yst-text-field--read-only",d)},Object(s.createElement)("div",{className:"yst-flex yst-items-center yst-mb-2"},Object(s.createElement)(na,{className:"yst-text-field__label",htmlFor:a},o),i),Object(s.createElement)(St,r()({as:Rn,ref:t,id:a,onChange:n,disabled:c,readOnly:u,className:"yst-text-field__input","aria-describedby":y,validation:b},m)),(null==b?void 0:b.message)&&Object(s.createElement)(R,{variant:null==b?void 0:b.variant,id:f.validation,className:"yst-text-field__validation"},b.message),p&&Object(s.createElement)("p",{id:f.description,className:"yst-text-field__description"},p))}),Po={id:c.a.string.isRequired,onChange:c.a.func.isRequired,label:c.a.string.isRequired,labelSuffix:c.a.node,disabled:c.a.bool,readOnly:c.a.bool,className:c.a.string,description:c.a.node,validation:c.a.shape({variant:c.a.string,message:c.a.node})};To.propTypes=Po,To.defaultProps={labelSuffix:null,disabled:!1,readOnly:!1,className:"",description:null,validation:{}};const Co=e=>Object(s.createElement)(To,e);Co.propTypes=Po,Co.defaultProps=To.defaultProps,Co.displayName="TextField";var So=To;const ko=Object(s.forwardRef)((e,t)=>{let{id:a,label:n,className:o="",description:i="",validation:c={},...u}=e;const{ids:d,describedBy:p}=Xn(a,{validation:null==c?void 0:c.message,description:i});return Object(s.createElement)("div",{className:l()("yst-textarea-field",o)},Object(s.createElement)("div",{className:"yst-flex yst-items-center yst-mb-2"},Object(s.createElement)(na,{className:"yst-textarea-field__label",htmlFor:a},n)),Object(s.createElement)(St,r()({as:Sn,ref:t,id:a,className:"yst-textarea-field__input","aria-describedby":p,validation:c},u)),(null==c?void 0:c.message)&&Object(s.createElement)(R,{variant:null==c?void 0:c.variant,id:d.validation,className:"yst-textarea-field__validation"},c.message),i&&Object(s.createElement)("p",{id:d.description,className:"yst-textarea-field__description"},i))}),_o={id:c.a.string.isRequired,label:c.a.string.isRequired,className:c.a.string,description:c.a.node,validation:c.a.shape({variant:c.a.string,message:c.a.node})};ko.propTypes=_o,ko.defaultProps={className:"",description:null,validation:{}};const Lo=e=>Object(s.createElement)(ko,e);Lo.propTypes=_o,Lo.defaultProps=ko.defaultProps,Lo.displayName="TextareaField";var Fo=ko;const Mo=Object(s.forwardRef)((e,t)=>{let{id:a,children:n,label:o,labelSuffix:i,description:c,checked:u,disabled:d,onChange:p,className:b,"aria-label":m,...f}=e;return Object(s.createElement)(Gn.Group,{as:"div",className:l()("yst-toggle-field",d&&"yst-toggle-field--disabled",b)},Object(s.createElement)("div",{className:"yst-toggle-field__header"},o&&Object(s.createElement)("div",{className:"yst-toggle-field__label-wrapper"},Object(s.createElement)(na,{as:Gn.Label,className:"yst-toggle-field__label",label:o,"aria-label":m}),i),Object(s.createElement)(Zn,r()({id:a,ref:t,checked:u,onChange:p,screenReaderLabel:o,disabled:d},f))),(c||n)&&Object(s.createElement)(Gn.Description,{as:"div",className:"yst-toggle-field__description"},c||n))}),Io={id:c.a.string.isRequired,children:c.a.node,label:c.a.string.isRequired,labelSuffix:c.a.node,description:c.a.node,checked:c.a.bool.isRequired,disabled:c.a.bool,onChange:c.a.func.isRequired,className:c.a.string,"aria-label":c.a.string};Mo.propTypes=Io,Mo.defaultProps={children:null,labelSuffix:null,description:null,disabled:!1,className:""};const Do=e=>Object(s.createElement)(Mo,e);Do.propTypes=Io,Do.defaultProps=Mo.defaultProps,Do.displayName="ToggleField";var qo=Mo,Ao=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const a=Object(s.useCallback)(e=>((e||window.event).returnValue=t,t),[t]);Object(s.useEffect)(()=>(e&&window.addEventListener("beforeunload",a),()=>window.removeEventListener("beforeunload",a)),[e,a])},Bo=e=>{const t=Object(s.useRef)(e);return Object(s.useEffect)(()=>{t.current=e},[e]),t.current},Ho=()=>Object(s.useContext)(eo),zo=e=>{const t=Object(s.useMemo)(()=>window.matchMedia(e),[e]),[a,n]=Object(s.useState)(t.matches),r=Object(s.useCallback)(e=>{n(e.matches)},[n]);return Object(s.useEffect)(()=>(t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}),[t,r]),{matches:a}}},7:function(e,t){function a(){return e.exports=a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},a.apply(this,arguments)}e.exports=a},8:function(e,t,a){var n;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var o=r.apply(null,n);o&&e.push(o)}}else if("object"===s){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)a.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}}); |