@ctlyst.id/voila-ui 1.33.4 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -143,7 +143,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
143
143
|
*/var Dm=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ba=Dm.join(","),Nm=typeof Element>"u",Lr=Nm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ha=!Nm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Wa=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},_C=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},km=function(t,n,r){if(Wa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ba));return n&&Lr.call(t,Ba)&&o.unshift(t),o=o.filter(r),o},Mm=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Wa(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,u=e(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var d=Lr.call(a,Ba);d&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Wa(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&m){var h=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:a,candidates:h})}else i.unshift.apply(i,a.children)}}return o},jm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rr=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||_C(t))&&!jm(t)?0:t.tabIndex},SC=function(t,n){var r=Rr(t);return r<0&&n&&!jm(t)?0:r},CC=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Lm=function(t){return t.tagName==="INPUT"},$C=function(t){return Lm(t)&&t.type==="hidden"},TC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},IC=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},RC=function(t){if(!t.name)return!0;var n=t.form||Ha(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=IC(o,t.form);return!i||i===t},OC=function(t){return Lm(t)&&t.type==="radio"},PC=function(t){return OC(t)&&!RC(t)},AC=function(t){var n,r=t&&Ha(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var u,d,f;r=Ha(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},wh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},DC=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Lr.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Lr.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,u=Ha(t);if(c&&!c.shadowRoot&&o(c)===!0)return wh(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=s}if(AC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wh(t);return!1},NC=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Lr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},za=function(t,n){return!(n.disabled||Wa(n)||$C(n)||DC(n,t)||TC(n)||NC(n))},ru=function(t,n){return!(PC(n)||Rr(n)<0||!za(t,n))},kC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},MC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=SC(s,a),u=a?e(o.candidates):s;c===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:u})}),r.sort(CC).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},jC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mm([t],n.includeContainer,{filter:ru.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:kC}):r=km(t,n.includeContainer,ru.bind(null,n)),MC(r)},LC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mm([t],n.includeContainer,{filter:za.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=km(t,n.includeContainer,za.bind(null,n)),r},Qr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,Ba)===!1?!1:ru(n,t)},FC=Dm.concat("iframe").join(","),lc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,FC)===!1?!1:za(n,t)};/*!
|
|
144
144
|
* focus-trap 7.5.2
|
|
145
145
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
146
|
-
*/function Eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Eh(Object(n),!0).forEach(function(r){VC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VC(e,t,n){return t=HC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HC(e){var t=BC(e,"string");return typeof t=="symbol"?t:String(t)}var _h={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},WC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},zC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},UC=function(t){return Jo(t)&&!t.shiftKey},YC=function(t){return Jo(t)&&t.shiftKey},Sh=function(t){return setTimeout(t,0)},Ch=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},oa=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},KC=[],qC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||KC,i=xh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:UC,isKeyBackward:YC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,w,p){return R&&R[w]!==void 0?R[w]:i[p||w]},u=function(R,w){var p=typeof(w==null?void 0:w.composedPath)=="function"?w.composedPath():void 0;return a.containerGroups.findIndex(function($){var P=$.container,j=$.tabbableNodes;return P.contains(R)||(p==null?void 0:p.includes(P))||j.find(function(W){return W===R})})},d=function(R){var w=i[R];if(typeof w=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),P=1;P<p;P++)$[P-1]=arguments[P];w=w.apply(void 0,$)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=w;if(typeof w=="string"&&(j=r.querySelector(w),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},f=function(){var R=d("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var w=a.tabbableGroups[0],p=w&&w.firstTabbableNode;R=p||d("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var w=jC(R,i.tabbableOptions),p=LC(R,i.tabbableOptions),$=w.length>0?w[0]:void 0,P=w.length>0?w[w.length-1]:void 0,j=p.find(function(ne){return Qr(ne)}),W=p.slice().reverse().find(function(ne){return Qr(ne)}),Y=!!w.find(function(ne){return Rr(ne)>0});return{container:R,tabbableNodes:w,focusableNodes:p,posTabIndexesFound:Y,firstTabbableNode:$,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(H){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=w.indexOf(H);return oe<0?L?p.slice(p.indexOf(H)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(H)).reverse().find(function(G){return Qr(G)}):w[oe+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,WC(R)&&R.select()}},b=function(R){var w=d("setReturnFocus",R);return w||(w===!1?!1:R)},y=function(R){var w=R.target,p=R.event,$=R.isBackward,P=$===void 0?!1:$;w=w||oa(p),m();var j=null;if(a.tabbableGroups.length>0){var W=u(w,p),Y=W>=0?a.containerGroups[W]:void 0;if(W<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var ne=Ch(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return w===ce});if(ne<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w,!1))&&(ne=W),ne>=0){var H=ne===0?a.tabbableGroups.length-1:ne-1,L=a.tabbableGroups[H];j=Rr(w)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w,!1))}else{var oe=Ch(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return w===ce});if(oe<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w))&&(oe=W),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];j=Rr(w)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w))}}else j=d("fallbackFocus");return j},T=function(R){var w=oa(R);if(!(u(w,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var w=oa(R),p=u(w,R)>=0;if(p||w instanceof Document)p&&(a.mostRecentlyFocusedNode=w);else{R.stopImmediatePropagation();var $,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var Y=W.findIndex(function(ne){return ne===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<W.length&&($=W[Y+1],P=!1):Y-1>=0&&($=W[Y-1],P=!1))}}else a.containerGroups.some(function(ne){return ne.tabbableNodes.some(function(H){return Rr(H)>0})})||(P=!1);else P=!1;P&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:w});p&&(Jo(R)&&R.preventDefault(),h(p))},E=function(R){if(zC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},C=function(R){var w=oa(R);u(w,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return _h.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Sh(function(){h(f())}):h(f()),r.addEventListener("focusin",S,!0),r.addEventListener("mousedown",T,{capture:!0,passive:!1}),r.addEventListener("touchstart",T,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",E,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",S,!0),r.removeEventListener("mousedown",T,!0),r.removeEventListener("touchstart",T,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",E,!0),s},A=function(R){var w=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(P){return P===a.mostRecentlyFocusedNode})});w&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var w=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,w==null||w();var P=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var w=xh({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),_h.deactivateTrap(o,s);var p=c(w,"onDeactivate"),$=c(w,"onPostDeactivate"),P=c(w,"checkCanReturnFocus"),j=c(w,"returnFocus","returnFocusOnDeactivate");p==null||p();var W=function(){Sh(function(){j&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var w=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,w==null||w(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var w=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,w==null||w(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var w=[].concat(R).filter(Boolean);return a.containers=w.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function XC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=qC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const wi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function GC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function ZC(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function QC(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var al=!1;if(typeof window<"u"){var $h={get passive(){al=!0}};window.addEventListener("testPassive",null,$h),window.removeEventListener("testPassive",null,$h)}var Fm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],Ua=!1,Vm=-1,ei=void 0,ti=void 0,Bm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ya=function(t){var n=t||window.event;return Bm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},JC=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},e$=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},t$=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},n$=function(t,n){var r=t.targetTouches[0].clientY-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||t$(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},r$=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(QC(fr),[r]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&n$(o,t)},Ua||(document.addEventListener("touchmove",Ya,al?{passive:!1}:void 0),Ua=!0)):JC(n)}},o$=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),Fm?(t.ontouchstart=null,t.ontouchmove=null,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,al?{passive:!1}:void 0),Ua=!1)):fr.length||e$()};function i$({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,r$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,o$(o))}}},[t,e,n]),r}var Ar=[],a$=function(){return Ar.some(function(e){return e.activeTargets.length>0})},s$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},Th="ResizeObserver loop completed with undelivered notifications.",c$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Th}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Th),window.dispatchEvent(e)},Ei;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ei||(Ei={}));var Dr=function(e){return Object.freeze(e)},u$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(this)}return e}(),Hm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),sl=function(e){return e instanceof SVGElement&&"getBBox"in e},Wm=function(e){if(sl(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Ih=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},l$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},ia=new WeakMap,Rh=/auto|scroll/,d$=/^tb|vertical/,f$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},so=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new u$((n?t:e)||0,(n?e:t)||0)},Oh=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Wm(e))return ia.set(e,Oh),Oh;var n=getComputedStyle(e),r=sl(e)&&e.ownerSVGElement&&e.getBBox(),o=!f$&&n.boxSizing==="border-box",i=d$.test(n.writingMode||""),a=!r&&Rh.test(n.overflowY||""),s=!r&&Rh.test(n.overflowX||""),c=r?0:jn(n.paddingTop),u=r?0:jn(n.paddingRight),d=r?0:jn(n.paddingBottom),f=r?0:jn(n.paddingLeft),m=r?0:jn(n.borderTopWidth),h=r?0:jn(n.borderRightWidth),b=r?0:jn(n.borderBottomWidth),y=r?0:jn(n.borderLeftWidth),T=f+u,S=c+d,v=y+h,E=m+b,C=s?e.offsetHeight-E-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,A=o?S+E:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-A-C,B=F+T+I+v,R=k+S+C+E,w=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(B,R,i),contentBoxSize:so(F,k,i),contentRect:new Hm(f,c,F,k)});return ia.set(e,w),w},Um=function(e,t,n){var r=zm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Ei.DEVICE_PIXEL_CONTENT_BOX:return a;case Ei.BORDER_BOX:return o;default:return i}},h$=function(){function e(t){var n=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Dr([n.borderBoxSize]),this.contentBoxSize=Dr([n.contentBoxSize]),this.devicePixelContentBoxSize=Dr([n.devicePixelContentBoxSize])}return e}(),Ym=function(e){if(Wm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},p$=function(){var e=1/0,t=[];Ar.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new h$(u.target),f=Ym(u.target);s.push(d),u.lastReportedSize=Um(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Ph=function(e){Ar.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Ym(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},v$=function(){var e=0;for(Ph(e);a$();)e=p$(),Ph(e);return s$()&&c$(),e>0},dc,Km=[],m$=function(){return Km.splice(0).forEach(function(e){return e()})},g$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return m$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Km.push(e),dc()},y$=function(e){g$(function(){requestAnimationFrame(e)})},xa=0,b$=function(){return!!xa},w$=250,E$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ah=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Dh=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,x$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=w$),!fc){fc=!0;var r=Dh(t);y$(function(){var o=!1;try{o=v$()}finally{if(fc=!1,t=r-Dh(),!b$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,E$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ah.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ah.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new x$,Nh=function(e){!xa&&e>0&&ou.start(),xa+=e,!xa&&ou.stop()},_$=function(e){return!sl(e)&&!l$(e)&&getComputedStyle(e).display==="inline"},S$=function(){function e(t,n){this.target=t,this.observedBox=n||Ei.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Um(this.target,this.observedBox,!0);return _$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),C$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,kh=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},sa=function(){function e(){}return e.connect=function(t,n){var r=new C$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;kh(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new S$(n,r&&r.box)),Nh(1),ou.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=kh(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Nh(-1))},e.disconnect=function(t){var n=this,r=aa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),$$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");sa.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ih(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ih(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.unobserve(this,t)},e.prototype.disconnect=function(){sa.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ka(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function T$(e,t){const r=[].concat(e).map(Ka).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const I$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,R$={box:"border-box"};function hc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return wi(()=>{if(!e.current||!n)return;const s=new $$(a);return s.observe(e.current,R$),()=>s.disconnect()},[e,a,n]),n?o:0}function O$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.85,[i,a]=l.useState(()=>Ka(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),wi(()=>{if(e){a(Ka(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function P$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),d=O$(t,a,s),f=hc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=hc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=hc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,T=c!=null&&c.hasCustomHeader?16:0,S=Math.min(d-f-h,m+b)+(f+y+T)+h;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:h}}function A$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:d,resizeSourceRef:f,conditions:m}){const{maxHeight:h,minHeight:b,headerHeight:y,footerHeight:T}=P$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:E}=T$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:h}):[0],h);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:h,snapPoints:S,lastSnap:c.current}):D=I;const A=Ka(D);return S.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${E}`),{minSnap:v,maxSnap:E,findSnap:C,maxHeight:h}}function D$(){return wS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function N$({spring:e}){const t=Zr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Zr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Zr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),d=Math.min(c/2+45,c),f=0,h=(1-f)/(d-u),b=(s-u)*(h+f);return Wo(b,0,1)}),a=Zr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function Xt(e=1e3){return new Promise(t=>setTimeout(t,e))}const k$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Mh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},jh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},M$=({initialState:e})=>e==="OPEN",j$=({initialState:e})=>e==="CLOSED",L$=e_({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:{...Mh,...jh}}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:{...Mh,...jh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...k$},onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[t_({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await Xt()},onOpenStart:async()=>{await Xt()},onCloseStart:async()=>{await Xt()},onResizeStart:async()=>{await Xt()},onSnapEnd:async()=>{await Xt()},onOpenEnd:async()=>{await Xt()},onCloseEnd:async()=>{await Xt()},onResizeEnd:async()=>{await Xt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()}},guards:{initiallyClosed:j$,initiallyOpen:M$}}),{tension:F$,friction:ca}=cm.default,V$=["closed","opening","open","closing","dragging","snapping","resizing"];function B$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function H$({minHeight:e}){return e}const W$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:d,maxHeight:f,defaultSnap:m=B$,snapPoints:h=H$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:E,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":w,padding:p,...$},P){const{ready:j,registerReady:W}=GC(),Y=l.useRef(!1),ne=l.useRef(S),H=l.useRef(v),L=l.useRef(E);l.useEffect(()=>{ne.current=S,H.current=v,L.current=E},[v,S,E]);const[oe,G]=D$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),U=l.useRef(null),ee=l.useRef(null),Q=l.useRef(0),ie=l.useRef(),re=l.useRef(!1),me=ZC(),{x:Te="default",y:Pe="default"}=p??{},Ne=Te==="default",Oe=Pe==="default",We=i$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=xC({targetRef:K,enabled:j&&b}),ot=XC({targetRef:K,fallbackRef:ee,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=A$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:U,getSnapPoints:h,headerEnabled:i!==!1,headerRef:z,heightRef:Q,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:ie,conditions:{hasPaddingY:Oe,hasHeader:i!==!1,hasCustomHeader:!!i}}),xe=l.useRef(Xe),ct=l.useRef(ze),je=l.useRef(xt),Zt=l.useRef(Pt),Ct=l.useRef(0);wi(()=>{xe.current=Xe,je.current=xt,ct.current=ze,Zt.current=Pt,Ct.current=Pt(m)},[Pt,m,Xe,xt,ze]);const tt=l.useCallback(({onRest:he,config:{velocity:Ye=1,...kt}={},...At})=>new Promise(Jt=>G({...At,config:{velocity:Ye,...kt,mass:1,tension:F$,friction:Math.max(ca,ca+(ca-ca*Ye))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,gt]=d_(L$,{devTools:I$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ye;return(Ye=H.current)==null?void 0:Ye.call(H,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"RESIZE",source:ie.current})},[]),onOpenEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(he=>{var Ye;return(Ye=L.current)==null?void 0:Ye.call(L,{type:"SNAP",source:he.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ye)=>{var kt;return(kt=ne.current)==null?void 0:kt.call(ne,{type:"SNAP",source:Ye.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"RESIZE",source:ie.current})},[]),onSnapEnd:l.useCallback(async he=>{var Ye;return(Ye=L.current)==null?void 0:Ye.call(L,{type:"SNAP",source:he.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:Ct.current,ready:0,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{Y.current=!0,await Promise.all([We.current.activate(),ot.current.activate(),De.current.activate()])},[De,ot,We]),deactivate:l.useCallback(async()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate(),Y.current=!1},[De,ot,We]),openImmediately:l.useCallback(async()=>{Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0}),Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:me.current})},[tt,me]),snapSmoothly:l.useCallback(async he=>{const Ye=Zt.current(he.y);Q.current=Ye,c.current=Ye,await tt({y:Ye,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:me.current,config:{velocity:he.velocity}})},[tt,c,me]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(Q.current);Q.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?me.current:!0})},[tt,c,me]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:Q.current,immediate:!0}),Q.current=0,await tt({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:me.current}),await tt({ready:0,immediate:!0})},[tt,me])}});l.useEffect(()=>{j&>(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&>("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate()},[De,ot,We]),l.useImperativeHandle(P,()=>({snapTo:(he,{velocity:Ye=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Zt.current(he),velocity:Ye,source:kt}})},get height(){return Q.current}}),[gt]),l.useEffect(()=>{const he=Z.current,Ye=At=>{re.current&&At.preventDefault()},kt=At=>{he&&he.scrollTop<0&&(requestAnimationFrame(()=>{he.style.overflow="hidden",he.scrollTop=0,he.style.removeProperty("overflow")}),At.preventDefault())};return I&&(he==null||he.addEventListener("scroll",Ye),he==null||he.addEventListener("touchmove",Ye),he==null||he.addEventListener("touchstart",kt)),()=>{he==null||he.removeEventListener("scroll",Ye),he==null||he.removeEventListener("touchmove",Ye),he==null||he.removeEventListener("touchstart",kt)}},[I,Z]);const rn=wC(({args:[{closeOnTap:he=!1,isContentDragging:Ye=!1}={}]=[],cancel:kt,direction:[,At],down:Jt,first:Ot,last:yn,memo:Lt=oe.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!Y.current)return console.log("handleDrag cancelled dragging because canDragRef is false"),kt(),Lt;if(d&&he&&tr)return kt(),setTimeout(()=>d(),0),Lt;if(tr)return Lt;const Ht=Lt+$n,en=$n*un,Nn=Math.max(ct.current,Math.min(je.current,Ht+en*2));if(!Jt&&d&&At>0&&Ht+en<ct.current/2)return kt(),d(),Lt;let Kt=Jt?!d&&ct.current===je.current?Ht<ct.current?Qo(Ht,ct.current,je.current*2,.55):Qo(Ht,ct.current/2,je.current,.55):Qo(Ht,d?0:ct.current,je.current,.55):Nn;return I&&Ye?(Kt>=je.current&&(Kt=je.current),Lt===je.current&&Z.current&&Z.current.scrollTop>0&&(Kt=je.current),re.current=Kt<je.current):re.current=!1,Ot&>("DRAG"),yn?(gt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ct.current))throw new TypeError("minSnapRef is NaN!!");const Qt=N$({spring:oe});return M.jsxs(DS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":V$.find(Fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:K,style:{...Qt,...T,opacity:oe.ready},"data-test-id":w,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...rn({closeOnTap:B})},"backdrop"),M.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Oe,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ee,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Am,{ref:z,title:D,header:i,showBack:F,showClose:A,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Oe,ref:Z,...I?rn({isContentDragging:!0}):{},children:M.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(et,{ref:U,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),z$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),d=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{d.current="CLOSED"}):()=>{d.current="CLOSED"},[o.isOpen]);const f=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?M.jsx(_v,{"data-rsbs-portal":!0,children:M.jsx(W$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:M.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const U$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[e,t]),n},Y$=U$;process.env.NODE_ENV;var K$=dt({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),q$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},X$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Lh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var G$="p9dczu0";const cl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=Y$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,d=s.clientY-c.top,f=i.clientHeight,m=i.clientWidth,h=Math.max(m,f);r([...n,{top:d-h/2,left:u-h/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?$t.theme.colors.primary:q$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>M.jsx("span",{className:G$,style:{...i}},a))},vo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:d,noRipple:f,...m},h)=>{const b=l.useRef(null),y=cl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Ie(K$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?X$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Lh[r||"primary"]:Lh.white}):M.jsxs(M.Fragment,{children:[!f&&y,t]})})});vo.displayName="Button";vo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[Z$,AP]=mn(qm),[Q$,J$]=Z$(qm),eT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),h=st(t,E=>m(E)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const C=()=>S(v.current);return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[f,S]),l.createElement(Q$,{scope:n,state:T,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":Nr(T)?"mixed":T,"aria-required":a,"data-state":Xm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ae(e.onClick,E=>{S(C=>Nr(C)?!0:!C),y&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})),y&&l.createElement(rT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),tT="CheckboxIndicator",nT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=J$(tT,n);return l.createElement(yr,{present:r||Nr(i.state)||i.state===!0},l.createElement(Ue.span,ae({"data-state":Xm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),rT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=Nr(n),f.call(c,Nr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:Nr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Nr(e){return e==="indeterminate"}function Xm(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const oT=eT,iT=nT;var aT="glci2q0",Fh="glci2q3",sT="glci2q4",Vh={disabled:"glci2q1",enabled:"glci2q2"},cT=dt({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const Gm=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,d]=l.useState(n);return l.useEffect(()=>{d(n)},[n]),M.jsxs("div",{className:aT,children:[M.jsx(oT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:cT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(iT,{className:sT,children:[u==="indeterminate"&&M.jsx(I0,{color:"white",className:Fh}),u===!0&&M.jsx(Eu,{color:"white",className:Fh})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Vh.disabled:Vh.enabled,children:e})]})});Gm.defaultProps={"data-test-id":"base"};const uT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var lT=dt({defaultClassName:"_5046e70",variantClassNames:{variant:{filled:"_5046e71",outline:"_5046e72"},isActive:{true:"_5046e73"},isFluid:{true:"_5046e74"}},defaultVariants:{variant:"filled",isActive:!1},compoundVariants:[[{isActive:!0,variant:"outline"},"_5046e75"]]}),dT="_5046e76";const ul=l.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:o,prefixIcon:i,withCloseButton:a,className:s,disabled:c,style:u,...d},f)=>{const m=e||"button";return M.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Ie(lT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&M.jsx($0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&M.jsx(xo,{"data-test-id":"chips-close-button",className:dT,isDisabled:c})]})});ul.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};ul.displayName="Chips";const Zm="Dialog",[Qm,DP]=mn(Zm),[fT,wr]=Qm(Zm),hT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,d]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(fT,{scope:t,triggerRef:s,contentRef:c,contentId:Xn(),titleId:Xn(),descriptionId:Xn(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a},n)},pT="DialogTrigger",vT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(pT,n),i=st(t,o.triggerRef);return l.createElement(Ue.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ll(o.open)},r,{ref:i,onClick:Ae(e.onClick,o.onOpenToggle)}))}),mT="DialogPortal",[NP,Jm]=Qm(mT,{forceMount:void 0}),iu="DialogOverlay",gT=l.forwardRef((e,t)=>{const n=Jm(iu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(iu,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(yT,ae({},o,{ref:t}))):null}),yT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(dv,{as:uo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ue.div,ae({"data-state":ll(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",bT=l.forwardRef((e,t)=>{const n=Jm(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(xi,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(wT,ae({},o,{ref:t})):l.createElement(ET,ae({},o,{ref:t})))}),wT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=st(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return nv(i)},[]),l.createElement(eg,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,i=>i.preventDefault())}))}),ET=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(eg,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),eg=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=st(t,c);return Np(),l.createElement(l.Fragment,null,l.createElement(kp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(is,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ll(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),xT="DialogClose",_T=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(xT,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function ll(e){return e?"open":"closed"}const ST=hT,CT=vT,$T=gT,TT=bT,IT=_T;var RT="_1jc0z8o4",OT="_1jc0z8o0",PT=dt({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),AT="_1jc0z8o1",DT=dt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),NT=dt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(TT,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const kT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx($T,{className:t,ref:r,...n,children:e})),MT=({children:e,className:t,...n})=>M.jsx(ms,{className:t,...n,children:e}),jT=({children:e,...t})=>M.jsx(ST,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(CT,{className:t,...n,ref:r,children:e}));const Ai=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:d,isCloseWhenEscape:f,...m},h)=>!n&&i?null:M.jsx(jT,{open:n,onOpenChange:r,children:M.jsxs(MT,{children:[M.jsx(kT,{className:Ie(NT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Ie(PT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&M.jsx(IT,{asChild:!0,"aria-label":"Close",children:M.jsx(xo,{className:RT,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Ai.displayName="Modal";Ai.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0};const Is=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,ref:o,className:OT,...r,children:t})});Is.displayName="modalBody";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,className:AT,ref:o,...r,children:t})});Rs.displayName="modalFooter";Rs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Di=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return M.jsx(a,{"data-test-id":r,as:e,ref:i,className:DT({bold:t}),...o,children:M.jsx(sn,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Di.displayName="modalHeader";Di.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var LT="ayjm8u0";const dl=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:d,classNameBody:f,actionDirection:m})=>M.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Di,{children:o}),M.jsx(Is,{children:M.jsx(sn,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:LT,children:r})}),M.jsx(Rs,{style:{maxHeight:"none"},children:M.jsxs(Yt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(vo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});dl.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const fl=l.createContext({}),FT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({...d})=>{n(!0),o(d)}}),[n,o]);return M.jsxs(fl.Provider,{value:c,children:[M.jsx(dl,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},VT=()=>{const{openDialog:e}=l.useContext(fl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var BT=dt({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:HT}=$t.atoms,hl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=HT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Ie(BT({variant:n}),u,r),style:o,...a,children:e})});hl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};hl.displayName="Divider";const pl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Ie(CE({isDisabled:t}),n),children:e});pl.displayName="ActionIcon";pl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Ie(DE({state:Du({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.defaultProps={isTextarea:!1,className:""};const vl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,...d},f)=>{const{addonLeft:m,addonRight:h,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,elementLeft:C,elementRight:I,className:D,...A}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[B,R]=l.useState(!1),[w,p]=l.useState(!1),$=j=>{if(B){const W=k.current;W&&W.focus(),w&&(R(!1),p(!1))}else o==null||o(j)},P=()=>{const j=k.current;j&&j.focus(),w&&(R(!1),p(!1))};return l.useEffect(()=>{w&&R(!0)},[w]),M.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,className:u,inputAreaClassName:OE,children:[M.jsx("input",{ref:k,type:t,className:Ie(RE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...A}),M.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Ie(PE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:P,"aria-hidden":"true",children:M.jsxs(pl,{isDisabled:v,className:Ie(s&&!i&&!F&&IE),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:$t.theme.colors.green1})]})})]})});vl.displayName="Input";vl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const ml=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,...h}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return M.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Ie(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Ie(NE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),M.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});ml.displayName="Textarea";ml.defaultProps={containerStyles:void 0,"data-test-id":void 0};var WT=dt({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Bh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const gl=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},d)=>{const f=l.useRef(null),m=cl({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const h=e||"button";return M.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Ie(WT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Bh[r||"primary"]:Bh.white}):M.jsxs(M.Fragment,{children:[m,o]})})});gl.displayName="Button";gl.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var zT=dt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const UT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),yl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:d,"data-test-id":f,...m},h)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),T=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[S,v]=l.useState(!1),[E,C]=l.useState(n),I=A=>{C("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!S?M.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(UT,{width:y,height:T}):M.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:h,className:Ie(zT({fit:E})),...m})});yl.displayName="Image";yl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var ng=dt({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const rg=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Ie(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var YT="_1cq2k9i0";const bl=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Ie(YT,n),...r,children:e})});bl.displayName="List";bl.defaultProps={"data-test-id":void 0,as:"ul"};var KT=dt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Hh="xw6nfa2",qT="xw6nfa3";const wl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,...s},c)=>{const u=i||"li",d=!!r;return M.jsx(u,{"data-test-id":s["data-test-id"],className:Ie(KT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:qT,children:[t,M.jsx("div",{className:Hh,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Hh,children:e}),n]})})});wl.displayName="ListItem";wl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var og={},ig={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(zy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>d});var u=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var h=m,b,y;h.ready=new Promise((_,g)=>{b=_,y=g});function T(){function _(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),q&&q.nb()}let g=0,O=0,N=new Map,q=null,te=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(_.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),q=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){te&&(document.body.remove(te),te=null),q=null},this.Qa=function(){}}function S(_){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<_)-1)>>_,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<_}}const v=new function(){function _(){if(!g){let Et=function(Dt,Ve,Ke){if(Ve=ye.createShader(Ve),ye.shaderSource(Ve,Ke),ye.compileShader(Ve),Ke=ye.getShaderInfoLog(Ve),0<Ke.length)throw Ke;ye.attachShader(Dt,Ve)};var Ce=document.createElement("canvas"),Me={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Ce.getContext("webgl2",Me);if(ye)O=2;else if(ye=Ce.getContext("webgl",Me))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Ce=ye.createProgram(),Et(Ce,ye.VERTEX_SHADER,`attribute vec2 vertex;
|
|
146
|
+
*/function Eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Eh(Object(n),!0).forEach(function(r){VC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VC(e,t,n){return t=HC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HC(e){var t=BC(e,"string");return typeof t=="symbol"?t:String(t)}var _h={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},WC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},zC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},UC=function(t){return Jo(t)&&!t.shiftKey},YC=function(t){return Jo(t)&&t.shiftKey},Sh=function(t){return setTimeout(t,0)},Ch=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},oa=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},KC=[],qC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||KC,i=xh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:UC,isKeyBackward:YC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,w,p){return R&&R[w]!==void 0?R[w]:i[p||w]},u=function(R,w){var p=typeof(w==null?void 0:w.composedPath)=="function"?w.composedPath():void 0;return a.containerGroups.findIndex(function($){var P=$.container,j=$.tabbableNodes;return P.contains(R)||(p==null?void 0:p.includes(P))||j.find(function(W){return W===R})})},d=function(R){var w=i[R];if(typeof w=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),P=1;P<p;P++)$[P-1]=arguments[P];w=w.apply(void 0,$)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=w;if(typeof w=="string"&&(j=r.querySelector(w),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},f=function(){var R=d("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var w=a.tabbableGroups[0],p=w&&w.firstTabbableNode;R=p||d("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var w=jC(R,i.tabbableOptions),p=LC(R,i.tabbableOptions),$=w.length>0?w[0]:void 0,P=w.length>0?w[w.length-1]:void 0,j=p.find(function(ne){return Qr(ne)}),W=p.slice().reverse().find(function(ne){return Qr(ne)}),Y=!!w.find(function(ne){return Rr(ne)>0});return{container:R,tabbableNodes:w,focusableNodes:p,posTabIndexesFound:Y,firstTabbableNode:$,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(H){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=w.indexOf(H);return oe<0?L?p.slice(p.indexOf(H)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(H)).reverse().find(function(G){return Qr(G)}):w[oe+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,WC(R)&&R.select()}},b=function(R){var w=d("setReturnFocus",R);return w||(w===!1?!1:R)},y=function(R){var w=R.target,p=R.event,$=R.isBackward,P=$===void 0?!1:$;w=w||oa(p),m();var j=null;if(a.tabbableGroups.length>0){var W=u(w,p),Y=W>=0?a.containerGroups[W]:void 0;if(W<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var ne=Ch(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return w===ce});if(ne<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w,!1))&&(ne=W),ne>=0){var H=ne===0?a.tabbableGroups.length-1:ne-1,L=a.tabbableGroups[H];j=Rr(w)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w,!1))}else{var oe=Ch(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return w===ce});if(oe<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w))&&(oe=W),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];j=Rr(w)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w))}}else j=d("fallbackFocus");return j},T=function(R){var w=oa(R);if(!(u(w,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var w=oa(R),p=u(w,R)>=0;if(p||w instanceof Document)p&&(a.mostRecentlyFocusedNode=w);else{R.stopImmediatePropagation();var $,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var Y=W.findIndex(function(ne){return ne===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<W.length&&($=W[Y+1],P=!1):Y-1>=0&&($=W[Y-1],P=!1))}}else a.containerGroups.some(function(ne){return ne.tabbableNodes.some(function(H){return Rr(H)>0})})||(P=!1);else P=!1;P&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:w});p&&(Jo(R)&&R.preventDefault(),h(p))},E=function(R){if(zC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},C=function(R){var w=oa(R);u(w,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return _h.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Sh(function(){h(f())}):h(f()),r.addEventListener("focusin",S,!0),r.addEventListener("mousedown",T,{capture:!0,passive:!1}),r.addEventListener("touchstart",T,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",E,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",S,!0),r.removeEventListener("mousedown",T,!0),r.removeEventListener("touchstart",T,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",E,!0),s},A=function(R){var w=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(P){return P===a.mostRecentlyFocusedNode})});w&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var w=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,w==null||w();var P=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var w=xh({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),_h.deactivateTrap(o,s);var p=c(w,"onDeactivate"),$=c(w,"onPostDeactivate"),P=c(w,"checkCanReturnFocus"),j=c(w,"returnFocus","returnFocusOnDeactivate");p==null||p();var W=function(){Sh(function(){j&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var w=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,w==null||w(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var w=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,w==null||w(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var w=[].concat(R).filter(Boolean);return a.containers=w.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function XC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=qC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const wi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function GC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function ZC(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function QC(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var al=!1;if(typeof window<"u"){var $h={get passive(){al=!0}};window.addEventListener("testPassive",null,$h),window.removeEventListener("testPassive",null,$h)}var Fm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],Ua=!1,Vm=-1,ei=void 0,ti=void 0,Bm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ya=function(t){var n=t||window.event;return Bm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},JC=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},e$=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},t$=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},n$=function(t,n){var r=t.targetTouches[0].clientY-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||t$(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},r$=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(QC(fr),[r]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&n$(o,t)},Ua||(document.addEventListener("touchmove",Ya,al?{passive:!1}:void 0),Ua=!0)):JC(n)}},o$=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),Fm?(t.ontouchstart=null,t.ontouchmove=null,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,al?{passive:!1}:void 0),Ua=!1)):fr.length||e$()};function i$({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,r$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,o$(o))}}},[t,e,n]),r}var Ar=[],a$=function(){return Ar.some(function(e){return e.activeTargets.length>0})},s$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},Th="ResizeObserver loop completed with undelivered notifications.",c$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Th}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Th),window.dispatchEvent(e)},Ei;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ei||(Ei={}));var Dr=function(e){return Object.freeze(e)},u$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(this)}return e}(),Hm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),sl=function(e){return e instanceof SVGElement&&"getBBox"in e},Wm=function(e){if(sl(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Ih=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},l$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},ia=new WeakMap,Rh=/auto|scroll/,d$=/^tb|vertical/,f$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},so=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new u$((n?t:e)||0,(n?e:t)||0)},Oh=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Wm(e))return ia.set(e,Oh),Oh;var n=getComputedStyle(e),r=sl(e)&&e.ownerSVGElement&&e.getBBox(),o=!f$&&n.boxSizing==="border-box",i=d$.test(n.writingMode||""),a=!r&&Rh.test(n.overflowY||""),s=!r&&Rh.test(n.overflowX||""),c=r?0:jn(n.paddingTop),u=r?0:jn(n.paddingRight),d=r?0:jn(n.paddingBottom),f=r?0:jn(n.paddingLeft),m=r?0:jn(n.borderTopWidth),h=r?0:jn(n.borderRightWidth),b=r?0:jn(n.borderBottomWidth),y=r?0:jn(n.borderLeftWidth),T=f+u,S=c+d,v=y+h,E=m+b,C=s?e.offsetHeight-E-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,A=o?S+E:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-A-C,B=F+T+I+v,R=k+S+C+E,w=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(B,R,i),contentBoxSize:so(F,k,i),contentRect:new Hm(f,c,F,k)});return ia.set(e,w),w},Um=function(e,t,n){var r=zm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Ei.DEVICE_PIXEL_CONTENT_BOX:return a;case Ei.BORDER_BOX:return o;default:return i}},h$=function(){function e(t){var n=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Dr([n.borderBoxSize]),this.contentBoxSize=Dr([n.contentBoxSize]),this.devicePixelContentBoxSize=Dr([n.devicePixelContentBoxSize])}return e}(),Ym=function(e){if(Wm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},p$=function(){var e=1/0,t=[];Ar.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new h$(u.target),f=Ym(u.target);s.push(d),u.lastReportedSize=Um(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Ph=function(e){Ar.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Ym(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},v$=function(){var e=0;for(Ph(e);a$();)e=p$(),Ph(e);return s$()&&c$(),e>0},dc,Km=[],m$=function(){return Km.splice(0).forEach(function(e){return e()})},g$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return m$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Km.push(e),dc()},y$=function(e){g$(function(){requestAnimationFrame(e)})},xa=0,b$=function(){return!!xa},w$=250,E$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ah=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Dh=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,x$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=w$),!fc){fc=!0;var r=Dh(t);y$(function(){var o=!1;try{o=v$()}finally{if(fc=!1,t=r-Dh(),!b$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,E$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ah.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ah.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new x$,Nh=function(e){!xa&&e>0&&ou.start(),xa+=e,!xa&&ou.stop()},_$=function(e){return!sl(e)&&!l$(e)&&getComputedStyle(e).display==="inline"},S$=function(){function e(t,n){this.target=t,this.observedBox=n||Ei.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Um(this.target,this.observedBox,!0);return _$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),C$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,kh=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},sa=function(){function e(){}return e.connect=function(t,n){var r=new C$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;kh(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new S$(n,r&&r.box)),Nh(1),ou.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=kh(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Nh(-1))},e.disconnect=function(t){var n=this,r=aa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),$$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");sa.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ih(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ih(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.unobserve(this,t)},e.prototype.disconnect=function(){sa.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ka(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function T$(e,t){const r=[].concat(e).map(Ka).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const I$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,R$={box:"border-box"};function hc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return wi(()=>{if(!e.current||!n)return;const s=new $$(a);return s.observe(e.current,R$),()=>s.disconnect()},[e,a,n]),n?o:0}function O$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.75,[i,a]=l.useState(()=>Ka(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),wi(()=>{if(e){a(Ka(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function P$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),d=O$(t,a,s),f=hc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=hc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=hc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,T=c!=null&&c.hasCustomHeader?16:0,S=Math.min(d-f-h,m+b)+(f+y+T)+h;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:h}}function A$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:d,resizeSourceRef:f,conditions:m}){const{maxHeight:h,minHeight:b,headerHeight:y,footerHeight:T}=P$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:E}=T$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:h}):[0],h);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:h,snapPoints:S,lastSnap:c.current}):D=I;const A=Ka(D);return S.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${E}`),{minSnap:v,maxSnap:E,findSnap:C,maxHeight:h}}function D$(){return wS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function N$({spring:e}){const t=Zr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Zr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Zr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),d=Math.min(c/2+45,c),f=0,h=(1-f)/(d-u),b=(s-u)*(h+f);return Wo(b,0,1)}),a=Zr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function Xt(e=1e3){return new Promise(t=>setTimeout(t,e))}const k$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Mh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},jh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},M$=({initialState:e})=>e==="OPEN",j$=({initialState:e})=>e==="CLOSED",L$=e_({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:{...Mh,...jh}}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:{...Mh,...jh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...k$},onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[t_({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await Xt()},onOpenStart:async()=>{await Xt()},onCloseStart:async()=>{await Xt()},onResizeStart:async()=>{await Xt()},onSnapEnd:async()=>{await Xt()},onOpenEnd:async()=>{await Xt()},onCloseEnd:async()=>{await Xt()},onResizeEnd:async()=>{await Xt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()}},guards:{initiallyClosed:j$,initiallyOpen:M$}}),{tension:F$,friction:ca}=cm.default,V$=["closed","opening","open","closing","dragging","snapping","resizing"];function B$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function H$({minHeight:e}){return e}const W$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:d,maxHeight:f,defaultSnap:m=B$,snapPoints:h=H$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:E,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":w,padding:p,...$},P){const{ready:j,registerReady:W}=GC(),Y=l.useRef(!1),ne=l.useRef(S),H=l.useRef(v),L=l.useRef(E);l.useEffect(()=>{ne.current=S,H.current=v,L.current=E},[v,S,E]);const[oe,G]=D$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),U=l.useRef(null),ee=l.useRef(null),Q=l.useRef(0),ie=l.useRef(),re=l.useRef(!1),me=ZC(),{x:Te="default",y:Pe="default"}=p??{},Ne=Te==="default",Oe=Pe==="default",We=i$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=xC({targetRef:K,enabled:j&&b}),ot=XC({targetRef:K,fallbackRef:ee,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=A$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:U,getSnapPoints:h,headerEnabled:i!==!1,headerRef:z,heightRef:Q,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:ie,conditions:{hasPaddingY:Oe,hasHeader:i!==!1,hasCustomHeader:!!i}}),xe=l.useRef(Xe),ct=l.useRef(ze),je=l.useRef(xt),Zt=l.useRef(Pt),Ct=l.useRef(0);wi(()=>{xe.current=Xe,je.current=xt,ct.current=ze,Zt.current=Pt,Ct.current=Pt(m)},[Pt,m,Xe,xt,ze]);const tt=l.useCallback(({onRest:he,config:{velocity:Ye=1,...kt}={},...At})=>new Promise(Jt=>G({...At,config:{velocity:Ye,...kt,mass:1,tension:F$,friction:Math.max(ca,ca+(ca-ca*Ye))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,gt]=d_(L$,{devTools:I$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ye;return(Ye=H.current)==null?void 0:Ye.call(H,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"RESIZE",source:ie.current})},[]),onOpenEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(he=>{var Ye;return(Ye=L.current)==null?void 0:Ye.call(L,{type:"SNAP",source:he.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ye)=>{var kt;return(kt=ne.current)==null?void 0:kt.call(ne,{type:"SNAP",source:Ye.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"RESIZE",source:ie.current})},[]),onSnapEnd:l.useCallback(async he=>{var Ye;return(Ye=L.current)==null?void 0:Ye.call(L,{type:"SNAP",source:he.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:Ct.current,ready:0,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{Y.current=!0,await Promise.all([We.current.activate(),ot.current.activate(),De.current.activate()])},[De,ot,We]),deactivate:l.useCallback(async()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate(),Y.current=!1},[De,ot,We]),openImmediately:l.useCallback(async()=>{Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0}),Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:me.current})},[tt,me]),snapSmoothly:l.useCallback(async he=>{const Ye=Zt.current(he.y);Q.current=Ye,c.current=Ye,await tt({y:Ye,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:me.current,config:{velocity:he.velocity}})},[tt,c,me]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(Q.current);Q.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?me.current:!0})},[tt,c,me]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:Q.current,immediate:!0}),Q.current=0,await tt({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:me.current}),await tt({ready:0,immediate:!0})},[tt,me])}});l.useEffect(()=>{j&>(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&>("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate()},[De,ot,We]),l.useImperativeHandle(P,()=>({snapTo:(he,{velocity:Ye=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Zt.current(he),velocity:Ye,source:kt}})},get height(){return Q.current}}),[gt]),l.useEffect(()=>{const he=Z.current,Ye=At=>{re.current&&At.preventDefault()},kt=At=>{he&&he.scrollTop<0&&(requestAnimationFrame(()=>{he.style.overflow="hidden",he.scrollTop=0,he.style.removeProperty("overflow")}),At.preventDefault())};return I&&(he==null||he.addEventListener("scroll",Ye),he==null||he.addEventListener("touchmove",Ye),he==null||he.addEventListener("touchstart",kt)),()=>{he==null||he.removeEventListener("scroll",Ye),he==null||he.removeEventListener("touchmove",Ye),he==null||he.removeEventListener("touchstart",kt)}},[I,Z]);const rn=wC(({args:[{closeOnTap:he=!1,isContentDragging:Ye=!1}={}]=[],cancel:kt,direction:[,At],down:Jt,first:Ot,last:yn,memo:Lt=oe.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!Y.current)return console.log("handleDrag cancelled dragging because canDragRef is false"),kt(),Lt;if(d&&he&&tr)return kt(),setTimeout(()=>d(),0),Lt;if(tr)return Lt;const Ht=Lt+$n,en=$n*un,Nn=Math.max(ct.current,Math.min(je.current,Ht+en*2));if(!Jt&&d&&At>0&&Ht+en<ct.current/2)return kt(),d(),Lt;let Kt=Jt?!d&&ct.current===je.current?Ht<ct.current?Qo(Ht,ct.current,je.current*2,.55):Qo(Ht,ct.current/2,je.current,.55):Qo(Ht,d?0:ct.current,je.current,.55):Nn;return I&&Ye?(Kt>=je.current&&(Kt=je.current),Lt===je.current&&Z.current&&Z.current.scrollTop>0&&(Kt=je.current),re.current=Kt<je.current):re.current=!1,Ot&>("DRAG"),yn?(gt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ct.current))throw new TypeError("minSnapRef is NaN!!");const Qt=N$({spring:oe});return M.jsxs(DS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":V$.find(Fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:K,style:{...Qt,...T,opacity:oe.ready},"data-test-id":w,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...rn({closeOnTap:B})},"backdrop"),M.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Oe,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ee,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Am,{ref:z,title:D,header:i,showBack:F,showClose:A,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Oe,ref:Z,...I?rn({isContentDragging:!0}):{},children:M.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(et,{ref:U,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),z$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),d=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{d.current="CLOSED"}):()=>{d.current="CLOSED"},[o.isOpen]);const f=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?M.jsx(_v,{"data-rsbs-portal":!0,children:M.jsx(W$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:M.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const U$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[e,t]),n},Y$=U$;process.env.NODE_ENV;var K$=dt({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),q$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},X$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Lh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var G$="p9dczu0";const cl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=Y$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,d=s.clientY-c.top,f=i.clientHeight,m=i.clientWidth,h=Math.max(m,f);r([...n,{top:d-h/2,left:u-h/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?$t.theme.colors.primary:q$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>M.jsx("span",{className:G$,style:{...i}},a))},vo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:d,noRipple:f,...m},h)=>{const b=l.useRef(null),y=cl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Ie(K$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?X$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Lh[r||"primary"]:Lh.white}):M.jsxs(M.Fragment,{children:[!f&&y,t]})})});vo.displayName="Button";vo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[Z$,AP]=mn(qm),[Q$,J$]=Z$(qm),eT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),h=st(t,E=>m(E)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const C=()=>S(v.current);return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[f,S]),l.createElement(Q$,{scope:n,state:T,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":Nr(T)?"mixed":T,"aria-required":a,"data-state":Xm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ae(e.onClick,E=>{S(C=>Nr(C)?!0:!C),y&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})),y&&l.createElement(rT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),tT="CheckboxIndicator",nT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=J$(tT,n);return l.createElement(yr,{present:r||Nr(i.state)||i.state===!0},l.createElement(Ue.span,ae({"data-state":Xm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),rT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=Nr(n),f.call(c,Nr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:Nr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Nr(e){return e==="indeterminate"}function Xm(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const oT=eT,iT=nT;var aT="glci2q0",Fh="glci2q3",sT="glci2q4",Vh={disabled:"glci2q1",enabled:"glci2q2"},cT=dt({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const Gm=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,d]=l.useState(n);return l.useEffect(()=>{d(n)},[n]),M.jsxs("div",{className:aT,children:[M.jsx(oT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:cT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(iT,{className:sT,children:[u==="indeterminate"&&M.jsx(I0,{color:"white",className:Fh}),u===!0&&M.jsx(Eu,{color:"white",className:Fh})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Vh.disabled:Vh.enabled,children:e})]})});Gm.defaultProps={"data-test-id":"base"};const uT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var lT=dt({defaultClassName:"_5046e70",variantClassNames:{variant:{filled:"_5046e71",outline:"_5046e72"},isActive:{true:"_5046e73"},isFluid:{true:"_5046e74"}},defaultVariants:{variant:"filled",isActive:!1},compoundVariants:[[{isActive:!0,variant:"outline"},"_5046e75"]]}),dT="_5046e76";const ul=l.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:o,prefixIcon:i,withCloseButton:a,className:s,disabled:c,style:u,...d},f)=>{const m=e||"button";return M.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Ie(lT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&M.jsx($0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&M.jsx(xo,{"data-test-id":"chips-close-button",className:dT,isDisabled:c})]})});ul.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};ul.displayName="Chips";const Zm="Dialog",[Qm,DP]=mn(Zm),[fT,wr]=Qm(Zm),hT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,d]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(fT,{scope:t,triggerRef:s,contentRef:c,contentId:Xn(),titleId:Xn(),descriptionId:Xn(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a},n)},pT="DialogTrigger",vT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(pT,n),i=st(t,o.triggerRef);return l.createElement(Ue.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ll(o.open)},r,{ref:i,onClick:Ae(e.onClick,o.onOpenToggle)}))}),mT="DialogPortal",[NP,Jm]=Qm(mT,{forceMount:void 0}),iu="DialogOverlay",gT=l.forwardRef((e,t)=>{const n=Jm(iu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(iu,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(yT,ae({},o,{ref:t}))):null}),yT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(dv,{as:uo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ue.div,ae({"data-state":ll(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",bT=l.forwardRef((e,t)=>{const n=Jm(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(xi,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(wT,ae({},o,{ref:t})):l.createElement(ET,ae({},o,{ref:t})))}),wT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=st(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return nv(i)},[]),l.createElement(eg,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,i=>i.preventDefault())}))}),ET=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(eg,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),eg=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=st(t,c);return Np(),l.createElement(l.Fragment,null,l.createElement(kp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(is,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ll(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),xT="DialogClose",_T=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(xT,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function ll(e){return e?"open":"closed"}const ST=hT,CT=vT,$T=gT,TT=bT,IT=_T;var RT="_1jc0z8o4",OT="_1jc0z8o0",PT=dt({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),AT="_1jc0z8o1",DT=dt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),NT=dt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(TT,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const kT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx($T,{className:t,ref:r,...n,children:e})),MT=({children:e,className:t,...n})=>M.jsx(ms,{className:t,...n,children:e}),jT=({children:e,...t})=>M.jsx(ST,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(CT,{className:t,...n,ref:r,children:e}));const Ai=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:d,isCloseWhenEscape:f,...m},h)=>!n&&i?null:M.jsx(jT,{open:n,onOpenChange:r,children:M.jsxs(MT,{children:[M.jsx(kT,{className:Ie(NT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Ie(PT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&M.jsx(IT,{asChild:!0,"aria-label":"Close",children:M.jsx(xo,{className:RT,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Ai.displayName="Modal";Ai.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0};const Is=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,ref:o,className:OT,...r,children:t})});Is.displayName="modalBody";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,className:AT,ref:o,...r,children:t})});Rs.displayName="modalFooter";Rs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Di=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return M.jsx(a,{"data-test-id":r,as:e,ref:i,className:DT({bold:t}),...o,children:M.jsx(sn,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Di.displayName="modalHeader";Di.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var LT="ayjm8u0";const dl=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:d,classNameBody:f,actionDirection:m})=>M.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Di,{children:o}),M.jsx(Is,{children:M.jsx(sn,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:LT,children:r})}),M.jsx(Rs,{style:{maxHeight:"none"},children:M.jsxs(Yt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(vo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});dl.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const fl=l.createContext({}),FT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({...d})=>{n(!0),o(d)}}),[n,o]);return M.jsxs(fl.Provider,{value:c,children:[M.jsx(dl,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},VT=()=>{const{openDialog:e}=l.useContext(fl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var BT=dt({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:HT}=$t.atoms,hl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=HT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Ie(BT({variant:n}),u,r),style:o,...a,children:e})});hl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};hl.displayName="Divider";const pl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Ie(CE({isDisabled:t}),n),children:e});pl.displayName="ActionIcon";pl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Ie(DE({state:Du({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.defaultProps={isTextarea:!1,className:""};const vl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,...d},f)=>{const{addonLeft:m,addonRight:h,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,elementLeft:C,elementRight:I,className:D,...A}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[B,R]=l.useState(!1),[w,p]=l.useState(!1),$=j=>{if(B){const W=k.current;W&&W.focus(),w&&(R(!1),p(!1))}else o==null||o(j)},P=()=>{const j=k.current;j&&j.focus(),w&&(R(!1),p(!1))};return l.useEffect(()=>{w&&R(!0)},[w]),M.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,className:u,inputAreaClassName:OE,children:[M.jsx("input",{ref:k,type:t,className:Ie(RE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...A}),M.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Ie(PE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:P,"aria-hidden":"true",children:M.jsxs(pl,{isDisabled:v,className:Ie(s&&!i&&!F&&IE),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:$t.theme.colors.green1})]})})]})});vl.displayName="Input";vl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const ml=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,...h}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return M.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Ie(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Ie(NE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),M.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});ml.displayName="Textarea";ml.defaultProps={containerStyles:void 0,"data-test-id":void 0};var WT=dt({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Bh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const gl=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},d)=>{const f=l.useRef(null),m=cl({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const h=e||"button";return M.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Ie(WT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Bh[r||"primary"]:Bh.white}):M.jsxs(M.Fragment,{children:[m,o]})})});gl.displayName="Button";gl.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var zT=dt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const UT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),yl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:d,"data-test-id":f,...m},h)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),T=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[S,v]=l.useState(!1),[E,C]=l.useState(n),I=A=>{C("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!S?M.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(UT,{width:y,height:T}):M.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:h,className:Ie(zT({fit:E})),...m})});yl.displayName="Image";yl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var ng=dt({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const rg=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Ie(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var YT="_1cq2k9i0";const bl=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Ie(YT,n),...r,children:e})});bl.displayName="List";bl.defaultProps={"data-test-id":void 0,as:"ul"};var KT=dt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Hh="xw6nfa2",qT="xw6nfa3";const wl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,...s},c)=>{const u=i||"li",d=!!r;return M.jsx(u,{"data-test-id":s["data-test-id"],className:Ie(KT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:qT,children:[t,M.jsx("div",{className:Hh,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Hh,children:e}),n]})})});wl.displayName="ListItem";wl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var og={},ig={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(zy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>d});var u=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var h=m,b,y;h.ready=new Promise((_,g)=>{b=_,y=g});function T(){function _(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),q&&q.nb()}let g=0,O=0,N=new Map,q=null,te=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(_.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),q=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){te&&(document.body.remove(te),te=null),q=null},this.Qa=function(){}}function S(_){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<_)-1)>>_,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<_}}const v=new function(){function _(){if(!g){let Et=function(Dt,Ve,Ke){if(Ve=ye.createShader(Ve),ye.shaderSource(Ve,Ke),ye.compileShader(Ve),Ke=ye.getShaderInfoLog(Ve),0<Ke.length)throw Ke;ye.attachShader(Dt,Ve)};var Ce=document.createElement("canvas"),Me={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Ce.getContext("webgl2",Me);if(ye)O=2;else if(ye=Ce.getContext("webgl",Me))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Ce=ye.createProgram(),Et(Ce,ye.VERTEX_SHADER,`attribute vec2 vertex;
|
|
147
147
|
attribute vec2 uv;
|
|
148
148
|
uniform vec4 mat;
|
|
149
149
|
uniform vec2 translate;
|
package/dist/index.mjs
CHANGED
|
@@ -14365,7 +14365,7 @@ function Tc(e, {
|
|
|
14365
14365
|
}, [e, a, n]), n ? o : 0;
|
|
14366
14366
|
}
|
|
14367
14367
|
function D$(e, t, n) {
|
|
14368
|
-
const r = gt(() => t("maxHeight"), [t]), o = window.innerHeight * 0.
|
|
14368
|
+
const r = gt(() => t("maxHeight"), [t]), o = window.innerHeight * 0.75, [i, a] = Ce(
|
|
14369
14369
|
() => cs(e) || typeof window < "u" ? o : 0
|
|
14370
14370
|
), s = i > 0, c = ae(0);
|
|
14371
14371
|
return Tr(e ? "controlled" : "auto"), me(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctlyst.id/voila-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"description": "UI library for voila user facing library.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"jest-environment-jsdom": "29.4.1",
|
|
95
95
|
"polished": "^4.2.2"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "457b5b7f4b6bd56886f280fadb7f4c5c0ef5f7f8"
|
|
98
98
|
}
|