@purpurds/modal 4.0.1 → 4.1.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/LICENSE.txt CHANGED
@@ -398,42 +398,42 @@ Homepage: https://radix-ui.com/primitives
398
398
  ---
399
399
 
400
400
  Name: @purpurds/button
401
- Version: 4.0.0
401
+ Version: 4.0.2
402
402
  License: AGPL-3.0-only
403
403
  Private: false
404
404
 
405
405
  ---
406
406
 
407
407
  Name: @purpurds/heading
408
- Version: 4.0.0
408
+ Version: 4.0.2
409
409
  License: AGPL-3.0-only
410
410
  Private: false
411
411
 
412
412
  ---
413
413
 
414
414
  Name: @purpurds/icon
415
- Version: 4.0.0
415
+ Version: 4.0.2
416
416
  License: AGPL-3.0-only
417
417
  Private: false
418
418
 
419
419
  ---
420
420
 
421
421
  Name: @purpurds/paragraph
422
- Version: 4.0.0
422
+ Version: 4.0.2
423
423
  License: AGPL-3.0-only
424
424
  Private: false
425
425
 
426
426
  ---
427
427
 
428
- Name: @purpurds/visually-hidden
429
- Version: 4.0.0
428
+ Name: @purpurds/tokens
429
+ Version: 4.0.2
430
430
  License: AGPL-3.0-only
431
431
  Private: false
432
432
 
433
433
  ---
434
434
 
435
- Name: @purpurds/tokens
436
- Version: 4.0.0
435
+ Name: @purpurds/visually-hidden
436
+ Version: 4.0.2
437
437
  License: AGPL-3.0-only
438
438
  Private: false
439
439
 
@@ -1 +1 @@
1
- {"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../src/modal-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAYf,eAAO,MAAM,qBAAqB,mDAAoD,CAAC;AAEvF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB;;SAEK;IACL,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;SAEK;IACL,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;SAEK;IACL,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;SAEK;IACL,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;SAEK;IACL,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;SAEK;IACL,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C;;SAEK;IACL,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;SAEK;IACL,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB;;SAEK;IACL,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B;;SAEK;IACL,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB;;SAEK;IACL,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;SAEK;IACL,eAAe,EAAE,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,CAAC;AASvF,eAAO,MAAM,YAAY,0FAkKxB,CAAC;AAyBF,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,eAAO,MAAM,YAAY,uCAGtB,KAAK,iBAAiB,EAAE,SAAS,GAAG,sBAAsB,CAAC,6BAkB7D,CAAC"}
1
+ {"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../src/modal-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAYf,eAAO,MAAM,qBAAqB,mDAAoD,CAAC;AAEvF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB;;SAEK;IACL,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;SAEK;IACL,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;SAEK;IACL,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;SAEK;IACL,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;SAEK;IACL,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;SAEK;IACL,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C;;SAEK;IACL,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;SAEK;IACL,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB;;SAEK;IACL,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B;;SAEK;IACL,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB;;SAEK;IACL,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;SAEK;IACL,eAAe,EAAE,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,CAAC;AASvF,eAAO,MAAM,YAAY,0FA+JxB,CAAC;AAyBF,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,eAAO,MAAM,YAAY,uCAGtB,KAAK,iBAAiB,EAAE,SAAS,GAAG,sBAAsB,CAAC,6BAqB7D,CAAC"}
package/dist/modal.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),u=require("react"),xe=require("react-dom");function bt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const b=bt(u);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},C.apply(this,arguments)}function I(e,n,{checkForDefaultPrevented:t=!0}={}){return function(a){if(e==null||e(a),t===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function _t(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function He(...e){return n=>e.forEach(t=>_t(t,n))}function V(...e){return u.useCallback(He(...e),e)}function $t(e,n=[]){let t=[];function o(r,i){const c=u.createContext(i),d=t.length;t=[...t,i];function f(l){const{scope:m,children:v,...E}=l,s=(m==null?void 0:m[e][d])||c,h=u.useMemo(()=>E,Object.values(E));return u.createElement(s.Provider,{value:h},v)}function p(l,m){const v=(m==null?void 0:m[e][d])||c,E=u.useContext(v);if(E)return E;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${r}\``)}return f.displayName=r+"Provider",[f,p]}const a=()=>{const r=t.map(i=>u.createContext(i));return function(c){const d=(c==null?void 0:c[e])||r;return u.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return a.scopeName=e,[o,yt(a,...n)]}function yt(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(r){const i=o.reduce((c,{useScope:d,scopeName:f})=>{const l=d(r)[`__scope${f}`];return{...c,...l}},{});return u.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return t.scopeName=n.scopeName,t}const ge=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Et=b.useId||(()=>{});let xt=0;function ue(e){const[n,t]=b.useState(Et());return ge(()=>{e||t(o=>o??String(xt++))},[e]),e||(n?`radix-${n}`:"")}function B(e){const n=u.useRef(e);return u.useEffect(()=>{n.current=e}),u.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function wt({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,a]=St({defaultProp:n,onChange:t}),r=e!==void 0,i=r?e:o,c=B(t),d=u.useCallback(f=>{if(r){const l=typeof f=="function"?f(e):f;l!==e&&c(l)}else a(f)},[r,e,a,c]);return[i,d]}function St({defaultProp:e,onChange:n}){const t=u.useState(e),[o]=t,a=u.useRef(o),r=B(n);return u.useEffect(()=>{a.current!==o&&(r(o),a.current=o)},[o,a,r]),t}const we=u.forwardRef((e,n)=>{const{children:t,...o}=e,a=u.Children.toArray(t),r=a.find(Ot);if(r){const i=r.props.children,c=a.map(d=>d===r?u.Children.count(i)>1?u.Children.only(null):u.isValidElement(i)?i.props.children:null:d);return u.createElement(be,C({},o,{ref:n}),u.isValidElement(i)?u.cloneElement(i,void 0,c):null)}return u.createElement(be,C({},o,{ref:n}),t)});we.displayName="Slot";const be=u.forwardRef((e,n)=>{const{children:t,...o}=e;return u.isValidElement(t)?u.cloneElement(t,{...Pt(o,t.props),ref:n?He(n,t.ref):t.ref}):u.Children.count(t)>1?u.Children.only(null):null});be.displayName="SlotClone";const Ct=({children:e})=>u.createElement(u.Fragment,null,e);function Ot(e){return u.isValidElement(e)&&e.type===Ct}function Pt(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...c)=>{r(...c),a(...c)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Nt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],L=Nt.reduce((e,n)=>{const t=u.forwardRef((o,a)=>{const{asChild:r,...i}=o,c=r?we:n;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(c,C({},i,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function Rt(e,n){e&&xe.flushSync(()=>e.dispatchEvent(n))}function At(e,n=globalThis==null?void 0:globalThis.document){const t=B(e);u.useEffect(()=>{const o=a=>{a.key==="Escape"&&t(a)};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[t,n])}const _e="dismissableLayer.update",Tt="dismissableLayer.pointerDownOutside",Dt="dismissableLayer.focusOutside";let Oe;const Mt=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),It=u.forwardRef((e,n)=>{var t;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:c,onDismiss:d,...f}=e,p=u.useContext(Mt),[l,m]=u.useState(null),v=(t=l==null?void 0:l.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,E]=u.useState({}),s=V(n,x=>m(x)),h=Array.from(p.layers),[_]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=h.indexOf(_),$=l?h.indexOf(l):-1,y=p.layersWithOutsidePointerEventsDisabled.size>0,w=$>=S,j=Lt(x=>{const A=x.target,K=[...p.branches].some(R=>R.contains(A));!w||K||(r==null||r(x),c==null||c(x),x.defaultPrevented||d==null||d())},v),P=jt(x=>{const A=x.target;[...p.branches].some(R=>R.contains(A))||(i==null||i(x),c==null||c(x),x.defaultPrevented||d==null||d())},v);return At(x=>{$===p.layers.size-1&&(a==null||a(x),!x.defaultPrevented&&d&&(x.preventDefault(),d()))},v),u.useEffect(()=>{if(l)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Oe=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(l)),p.layers.add(l),Pe(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Oe)}},[l,v,o,p]),u.useEffect(()=>()=>{l&&(p.layers.delete(l),p.layersWithOutsidePointerEventsDisabled.delete(l),Pe())},[l,p]),u.useEffect(()=>{const x=()=>E({});return document.addEventListener(_e,x),()=>document.removeEventListener(_e,x)},[]),u.createElement(L.div,C({},f,{ref:s,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,P.onFocusCapture),onBlurCapture:I(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,j.onPointerDownCapture)}))});function Lt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=u.useRef(!1),a=u.useRef(()=>{});return u.useEffect(()=>{const r=c=>{if(c.target&&!o.current){let f=function(){Ve(Tt,t,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=f,n.addEventListener("click",a.current,{once:!0})):f()}else n.removeEventListener("click",a.current);o.current=!1},i=window.setTimeout(()=>{n.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(i),n.removeEventListener("pointerdown",r),n.removeEventListener("click",a.current)}},[n,t]),{onPointerDownCapture:()=>o.current=!0}}function jt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=u.useRef(!1);return u.useEffect(()=>{const a=r=>{r.target&&!o.current&&Ve(Dt,t,{originalEvent:r},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Pe(){const e=new CustomEvent(_e);document.dispatchEvent(e)}function Ve(e,n,t,{discrete:o}){const a=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&a.addEventListener(e,n,{once:!0}),o?Rt(a,r):a.dispatchEvent(r)}const se="focusScope.autoFocusOnMount",le="focusScope.autoFocusOnUnmount",Ne={bubbles:!1,cancelable:!0},Ft=u.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:r,...i}=e,[c,d]=u.useState(null),f=B(a),p=B(r),l=u.useRef(null),m=V(n,s=>d(s)),v=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(o){let s=function($){if(v.paused||!c)return;const y=$.target;c.contains(y)?l.current=y:M(l.current,{select:!0})},h=function($){if(v.paused||!c)return;const y=$.relatedTarget;y!==null&&(c.contains(y)||M(l.current,{select:!0}))},_=function($){if(document.activeElement===document.body)for(const w of $)w.removedNodes.length>0&&M(c)};document.addEventListener("focusin",s),document.addEventListener("focusout",h);const S=new MutationObserver(_);return c&&S.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",h),S.disconnect()}}},[o,c,v.paused]),u.useEffect(()=>{if(c){Ae.add(v);const s=document.activeElement;if(!c.contains(s)){const _=new CustomEvent(se,Ne);c.addEventListener(se,f),c.dispatchEvent(_),_.defaultPrevented||(kt(Ht(Ge(c)),{select:!0}),document.activeElement===s&&M(c))}return()=>{c.removeEventListener(se,f),setTimeout(()=>{const _=new CustomEvent(le,Ne);c.addEventListener(le,p),c.dispatchEvent(_),_.defaultPrevented||M(s??document.body,{select:!0}),c.removeEventListener(le,p),Ae.remove(v)},0)}}},[c,f,p,v]);const E=u.useCallback(s=>{if(!t&&!o||v.paused)return;const h=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,_=document.activeElement;if(h&&_){const S=s.currentTarget,[$,y]=Bt(S);$&&y?!s.shiftKey&&_===y?(s.preventDefault(),t&&M($,{select:!0})):s.shiftKey&&_===$&&(s.preventDefault(),t&&M(y,{select:!0})):_===S&&s.preventDefault()}},[t,o,v.paused]);return u.createElement(L.div,C({tabIndex:-1},i,{ref:m,onKeyDown:E}))});function kt(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(M(o,{select:n}),document.activeElement!==t)return}function Bt(e){const n=Ge(e),t=Re(n,e),o=Re(n.reverse(),e);return[t,o]}function Ge(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function Re(e,n){for(const t of e)if(!Wt(t,{upTo:n}))return t}function Wt(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ut(e){return e instanceof HTMLInputElement&&"select"in e}function M(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Ut(e)&&n&&e.select()}}const Ae=zt();function zt(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=Te(e,n),e.unshift(n)},remove(n){var t;e=Te(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function Te(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function Ht(e){return e.filter(n=>n.tagName!=="A")}const Vt=u.forwardRef((e,n)=>{var t;const{container:o=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...a}=e;return o?xe.createPortal(u.createElement(L.div,C({},a,{ref:n})),o):null});function Gt(e,n){return u.useReducer((t,o)=>{const a=n[t][o];return a??t},e)}const ae=e=>{const{present:n,children:t}=e,o=Kt(n),a=typeof t=="function"?t({present:o.isPresent}):u.Children.only(t),r=V(o.ref,a.ref);return typeof t=="function"||o.isPresent?u.cloneElement(a,{ref:r}):null};ae.displayName="Presence";function Kt(e){const[n,t]=u.useState(),o=u.useRef({}),a=u.useRef(e),r=u.useRef("none"),i=e?"mounted":"unmounted",[c,d]=Gt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const f=X(o.current);r.current=c==="mounted"?f:"none"},[c]),ge(()=>{const f=o.current,p=a.current;if(p!==e){const m=r.current,v=X(f);e?d("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(p&&m!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),ge(()=>{if(n){const f=l=>{const v=X(o.current).includes(l.animationName);l.target===n&&v&&xe.flushSync(()=>d("ANIMATION_END"))},p=l=>{l.target===n&&(r.current=X(o.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:u.useCallback(f=>{f&&(o.current=getComputedStyle(f)),t(f)},[])}}function X(e){return(e==null?void 0:e.animationName)||"none"}let de=0;function Xt(){u.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:De()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:De()),de++,()=>{de===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),de--}},[])}function De(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var D=function(){return D=Object.assign||function(n){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},D.apply(this,arguments)};function Ke(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)n.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]]);return t}function Yt(e,n,t){if(t||arguments.length===2)for(var o=0,a=n.length,r;o<a;o++)(r||!(o in n))&&(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var re="right-scroll-bar-position",oe="width-before-scroll-bar",qt="with-scroll-bars-hidden",Zt="--removed-body-scroll-bar-size";function Qt(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function Jt(e,n){var t=u.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(o){var a=t.value;a!==o&&(t.value=o,t.callback(o,a))}}}})[0];return t.callback=n,t.facade}function en(e,n){return Jt(n||null,function(t){return e.forEach(function(o){return Qt(o,t)})})}function tn(e){return e}function nn(e,n){n===void 0&&(n=tn);var t=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(r){var i=n(r,o);return t.push(i),function(){t=t.filter(function(c){return c!==i})}},assignSyncMedium:function(r){for(o=!0;t.length;){var i=t;t=[],i.forEach(r)}t={push:function(c){return r(c)},filter:function(){return t}}},assignMedium:function(r){o=!0;var i=[];if(t.length){var c=t;t=[],c.forEach(r),i=t}var d=function(){var p=i;i=[],p.forEach(r)},f=function(){return Promise.resolve().then(d)};f(),t={push:function(p){i.push(p),f()},filter:function(p){return i=i.filter(p),t}}}};return a}function rn(e){e===void 0&&(e={});var n=nn(null);return n.options=D({async:!0,ssr:!1},e),n}var Xe=function(e){var n=e.sideCar,t=Ke(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return b.createElement(o,D({},t))};Xe.isSideCarExport=!0;function on(e,n){return e.useMedium(n),Xe}var Ye=rn(),fe=function(){},ie=b.forwardRef(function(e,n){var t=b.useRef(null),o=b.useState({onScrollCapture:fe,onWheelCapture:fe,onTouchMoveCapture:fe}),a=o[0],r=o[1],i=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,l=e.shards,m=e.sideCar,v=e.noIsolation,E=e.inert,s=e.allowPinchZoom,h=e.as,_=h===void 0?"div":h,S=Ke(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),$=m,y=en([t,n]),w=D(D({},S),a);return b.createElement(b.Fragment,null,p&&b.createElement($,{sideCar:Ye,removeScrollBar:f,shards:l,noIsolation:v,inert:E,setCallbacks:r,allowPinchZoom:!!s,lockRef:t}),i?b.cloneElement(b.Children.only(c),D(D({},w),{ref:y})):b.createElement(_,D({},w,{className:d,ref:y}),c))});ie.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ie.classNames={fullWidth:oe,zeroRight:re};var an=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=an();return n&&e.setAttribute("nonce",n),e}function un(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function sn(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var ln=function(){var e=0,n=null;return{add:function(t){e==0&&(n=cn())&&(un(n,t),sn(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},dn=function(){var e=ln();return function(n,t){b.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},qe=function(){var e=dn(),n=function(t){var o=t.styles,a=t.dynamic;return e(o,a),null};return n},fn={left:0,top:0,right:0,gap:0},pe=function(e){return parseInt(e||"",10)||0},pn=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],a=n[e==="padding"?"paddingRight":"marginRight"];return[pe(t),pe(o),pe(a)]},vn=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fn;var n=pn(e),t=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-t+n[2]-n[0])}},hn=qe(),mn=function(e,n,t,o){var a=e.left,r=e.top,i=e.right,c=e.gap;return t===void 0&&(t="margin"),`
2
- .`.concat(qt,` {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),u=require("react"),xe=require("react-dom");function _t(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const _=_t(u);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},C.apply(this,arguments)}function I(e,n,{checkForDefaultPrevented:t=!0}={}){return function(a){if(e==null||e(a),t===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function bt(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function ze(...e){return n=>e.forEach(t=>bt(t,n))}function H(...e){return u.useCallback(ze(...e),e)}function $t(e,n=[]){let t=[];function o(r,i){const c=u.createContext(i),d=t.length;t=[...t,i];function f(l){const{scope:h,children:v,...E}=l,s=(h==null?void 0:h[e][d])||c,m=u.useMemo(()=>E,Object.values(E));return u.createElement(s.Provider,{value:m},v)}function p(l,h){const v=(h==null?void 0:h[e][d])||c,E=u.useContext(v);if(E)return E;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${r}\``)}return f.displayName=r+"Provider",[f,p]}const a=()=>{const r=t.map(i=>u.createContext(i));return function(c){const d=(c==null?void 0:c[e])||r;return u.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return a.scopeName=e,[o,yt(a,...n)]}function yt(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(r){const i=o.reduce((c,{useScope:d,scopeName:f})=>{const l=d(r)[`__scope${f}`];return{...c,...l}},{});return u.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return t.scopeName=n.scopeName,t}const ge=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Et=_.useId||(()=>{});let xt=0;function ue(e){const[n,t]=_.useState(Et());return ge(()=>{e||t(o=>o??String(xt++))},[e]),e||(n?`radix-${n}`:"")}function B(e){const n=u.useRef(e);return u.useEffect(()=>{n.current=e}),u.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function wt({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,a]=St({defaultProp:n,onChange:t}),r=e!==void 0,i=r?e:o,c=B(t),d=u.useCallback(f=>{if(r){const l=typeof f=="function"?f(e):f;l!==e&&c(l)}else a(f)},[r,e,a,c]);return[i,d]}function St({defaultProp:e,onChange:n}){const t=u.useState(e),[o]=t,a=u.useRef(o),r=B(n);return u.useEffect(()=>{a.current!==o&&(r(o),a.current=o)},[o,a,r]),t}const we=u.forwardRef((e,n)=>{const{children:t,...o}=e,a=u.Children.toArray(t),r=a.find(Ot);if(r){const i=r.props.children,c=a.map(d=>d===r?u.Children.count(i)>1?u.Children.only(null):u.isValidElement(i)?i.props.children:null:d);return u.createElement(_e,C({},o,{ref:n}),u.isValidElement(i)?u.cloneElement(i,void 0,c):null)}return u.createElement(_e,C({},o,{ref:n}),t)});we.displayName="Slot";const _e=u.forwardRef((e,n)=>{const{children:t,...o}=e;return u.isValidElement(t)?u.cloneElement(t,{...Pt(o,t.props),ref:n?ze(n,t.ref):t.ref}):u.Children.count(t)>1?u.Children.only(null):null});_e.displayName="SlotClone";const Ct=({children:e})=>u.createElement(u.Fragment,null,e);function Ot(e){return u.isValidElement(e)&&e.type===Ct}function Pt(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...c)=>{r(...c),a(...c)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Nt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],L=Nt.reduce((e,n)=>{const t=u.forwardRef((o,a)=>{const{asChild:r,...i}=o,c=r?we:n;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(c,C({},i,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function Rt(e,n){e&&xe.flushSync(()=>e.dispatchEvent(n))}function At(e,n=globalThis==null?void 0:globalThis.document){const t=B(e);u.useEffect(()=>{const o=a=>{a.key==="Escape"&&t(a)};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[t,n])}const be="dismissableLayer.update",Tt="dismissableLayer.pointerDownOutside",Dt="dismissableLayer.focusOutside";let Oe;const Mt=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),It=u.forwardRef((e,n)=>{var t;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:c,onDismiss:d,...f}=e,p=u.useContext(Mt),[l,h]=u.useState(null),v=(t=l==null?void 0:l.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,E]=u.useState({}),s=H(n,x=>h(x)),m=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=m.indexOf(b),$=l?m.indexOf(l):-1,y=p.layersWithOutsidePointerEventsDisabled.size>0,w=$>=S,j=Lt(x=>{const R=x.target,G=[...p.branches].some(A=>A.contains(R));!w||G||(r==null||r(x),c==null||c(x),x.defaultPrevented||d==null||d())},v),P=jt(x=>{const R=x.target;[...p.branches].some(A=>A.contains(R))||(i==null||i(x),c==null||c(x),x.defaultPrevented||d==null||d())},v);return At(x=>{$===p.layers.size-1&&(a==null||a(x),!x.defaultPrevented&&d&&(x.preventDefault(),d()))},v),u.useEffect(()=>{if(l)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Oe=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(l)),p.layers.add(l),Pe(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Oe)}},[l,v,o,p]),u.useEffect(()=>()=>{l&&(p.layers.delete(l),p.layersWithOutsidePointerEventsDisabled.delete(l),Pe())},[l,p]),u.useEffect(()=>{const x=()=>E({});return document.addEventListener(be,x),()=>document.removeEventListener(be,x)},[]),u.createElement(L.div,C({},f,{ref:s,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,P.onFocusCapture),onBlurCapture:I(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,j.onPointerDownCapture)}))});function Lt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=u.useRef(!1),a=u.useRef(()=>{});return u.useEffect(()=>{const r=c=>{if(c.target&&!o.current){let f=function(){He(Tt,t,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=f,n.addEventListener("click",a.current,{once:!0})):f()}else n.removeEventListener("click",a.current);o.current=!1},i=window.setTimeout(()=>{n.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(i),n.removeEventListener("pointerdown",r),n.removeEventListener("click",a.current)}},[n,t]),{onPointerDownCapture:()=>o.current=!0}}function jt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=u.useRef(!1);return u.useEffect(()=>{const a=r=>{r.target&&!o.current&&He(Dt,t,{originalEvent:r},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Pe(){const e=new CustomEvent(be);document.dispatchEvent(e)}function He(e,n,t,{discrete:o}){const a=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&a.addEventListener(e,n,{once:!0}),o?Rt(a,r):a.dispatchEvent(r)}const se="focusScope.autoFocusOnMount",le="focusScope.autoFocusOnUnmount",Ne={bubbles:!1,cancelable:!0},Ft=u.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:r,...i}=e,[c,d]=u.useState(null),f=B(a),p=B(r),l=u.useRef(null),h=H(n,s=>d(s)),v=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(o){let s=function($){if(v.paused||!c)return;const y=$.target;c.contains(y)?l.current=y:M(l.current,{select:!0})},m=function($){if(v.paused||!c)return;const y=$.relatedTarget;y!==null&&(c.contains(y)||M(l.current,{select:!0}))},b=function($){if(document.activeElement===document.body)for(const w of $)w.removedNodes.length>0&&M(c)};document.addEventListener("focusin",s),document.addEventListener("focusout",m);const S=new MutationObserver(b);return c&&S.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",m),S.disconnect()}}},[o,c,v.paused]),u.useEffect(()=>{if(c){Ae.add(v);const s=document.activeElement;if(!c.contains(s)){const b=new CustomEvent(se,Ne);c.addEventListener(se,f),c.dispatchEvent(b),b.defaultPrevented||(kt(zt(Ve(c)),{select:!0}),document.activeElement===s&&M(c))}return()=>{c.removeEventListener(se,f),setTimeout(()=>{const b=new CustomEvent(le,Ne);c.addEventListener(le,p),c.dispatchEvent(b),b.defaultPrevented||M(s??document.body,{select:!0}),c.removeEventListener(le,p),Ae.remove(v)},0)}}},[c,f,p,v]);const E=u.useCallback(s=>{if(!t&&!o||v.paused)return;const m=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,b=document.activeElement;if(m&&b){const S=s.currentTarget,[$,y]=Bt(S);$&&y?!s.shiftKey&&b===y?(s.preventDefault(),t&&M($,{select:!0})):s.shiftKey&&b===$&&(s.preventDefault(),t&&M(y,{select:!0})):b===S&&s.preventDefault()}},[t,o,v.paused]);return u.createElement(L.div,C({tabIndex:-1},i,{ref:h,onKeyDown:E}))});function kt(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(M(o,{select:n}),document.activeElement!==t)return}function Bt(e){const n=Ve(e),t=Re(n,e),o=Re(n.reverse(),e);return[t,o]}function Ve(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function Re(e,n){for(const t of e)if(!Wt(t,{upTo:n}))return t}function Wt(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ut(e){return e instanceof HTMLInputElement&&"select"in e}function M(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Ut(e)&&n&&e.select()}}const Ae=qt();function qt(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=Te(e,n),e.unshift(n)},remove(n){var t;e=Te(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function Te(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function zt(e){return e.filter(n=>n.tagName!=="A")}const Ht=u.forwardRef((e,n)=>{var t;const{container:o=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...a}=e;return o?xe.createPortal(u.createElement(L.div,C({},a,{ref:n})),o):null});function Vt(e,n){return u.useReducer((t,o)=>{const a=n[t][o];return a??t},e)}const ae=e=>{const{present:n,children:t}=e,o=Gt(n),a=typeof t=="function"?t({present:o.isPresent}):u.Children.only(t),r=H(o.ref,a.ref);return typeof t=="function"||o.isPresent?u.cloneElement(a,{ref:r}):null};ae.displayName="Presence";function Gt(e){const[n,t]=u.useState(),o=u.useRef({}),a=u.useRef(e),r=u.useRef("none"),i=e?"mounted":"unmounted",[c,d]=Vt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const f=K(o.current);r.current=c==="mounted"?f:"none"},[c]),ge(()=>{const f=o.current,p=a.current;if(p!==e){const h=r.current,v=K(f);e?d("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(p&&h!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),ge(()=>{if(n){const f=l=>{const v=K(o.current).includes(l.animationName);l.target===n&&v&&xe.flushSync(()=>d("ANIMATION_END"))},p=l=>{l.target===n&&(r.current=K(o.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:u.useCallback(f=>{f&&(o.current=getComputedStyle(f)),t(f)},[])}}function K(e){return(e==null?void 0:e.animationName)||"none"}let de=0;function Kt(){u.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:De()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:De()),de++,()=>{de===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),de--}},[])}function De(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var D=function(){return D=Object.assign||function(n){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},D.apply(this,arguments)};function Ge(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)n.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]]);return t}function Xt(e,n,t){if(t||arguments.length===2)for(var o=0,a=n.length,r;o<a;o++)(r||!(o in n))&&(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var re="right-scroll-bar-position",oe="width-before-scroll-bar",Yt="with-scroll-bars-hidden",Zt="--removed-body-scroll-bar-size";function Qt(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function Jt(e,n){var t=u.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(o){var a=t.value;a!==o&&(t.value=o,t.callback(o,a))}}}})[0];return t.callback=n,t.facade}function en(e,n){return Jt(n||null,function(t){return e.forEach(function(o){return Qt(o,t)})})}function tn(e){return e}function nn(e,n){n===void 0&&(n=tn);var t=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(r){var i=n(r,o);return t.push(i),function(){t=t.filter(function(c){return c!==i})}},assignSyncMedium:function(r){for(o=!0;t.length;){var i=t;t=[],i.forEach(r)}t={push:function(c){return r(c)},filter:function(){return t}}},assignMedium:function(r){o=!0;var i=[];if(t.length){var c=t;t=[],c.forEach(r),i=t}var d=function(){var p=i;i=[],p.forEach(r)},f=function(){return Promise.resolve().then(d)};f(),t={push:function(p){i.push(p),f()},filter:function(p){return i=i.filter(p),t}}}};return a}function rn(e){e===void 0&&(e={});var n=nn(null);return n.options=D({async:!0,ssr:!1},e),n}var Ke=function(e){var n=e.sideCar,t=Ge(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return _.createElement(o,D({},t))};Ke.isSideCarExport=!0;function on(e,n){return e.useMedium(n),Ke}var Xe=rn(),fe=function(){},ie=_.forwardRef(function(e,n){var t=_.useRef(null),o=_.useState({onScrollCapture:fe,onWheelCapture:fe,onTouchMoveCapture:fe}),a=o[0],r=o[1],i=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,l=e.shards,h=e.sideCar,v=e.noIsolation,E=e.inert,s=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,S=Ge(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),$=h,y=en([t,n]),w=D(D({},S),a);return _.createElement(_.Fragment,null,p&&_.createElement($,{sideCar:Xe,removeScrollBar:f,shards:l,noIsolation:v,inert:E,setCallbacks:r,allowPinchZoom:!!s,lockRef:t}),i?_.cloneElement(_.Children.only(c),D(D({},w),{ref:y})):_.createElement(b,D({},w,{className:d,ref:y}),c))});ie.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ie.classNames={fullWidth:oe,zeroRight:re};var an=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=an();return n&&e.setAttribute("nonce",n),e}function un(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function sn(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var ln=function(){var e=0,n=null;return{add:function(t){e==0&&(n=cn())&&(un(n,t),sn(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},dn=function(){var e=ln();return function(n,t){_.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},Ye=function(){var e=dn(),n=function(t){var o=t.styles,a=t.dynamic;return e(o,a),null};return n},fn={left:0,top:0,right:0,gap:0},pe=function(e){return parseInt(e||"",10)||0},pn=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],a=n[e==="padding"?"paddingRight":"marginRight"];return[pe(t),pe(o),pe(a)]},vn=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fn;var n=pn(e),t=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-t+n[2]-n[0])}},mn=Ye(),hn=function(e,n,t,o){var a=e.left,r=e.top,i=e.right,c=e.gap;return t===void 0&&(t="margin"),`
2
+ .`.concat(Yt,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(c,"px ").concat(o,`;
5
5
  }
@@ -35,10 +35,10 @@
35
35
  body {
36
36
  `).concat(Zt,": ").concat(c,`px;
37
37
  }
38
- `)},gn=function(e){var n=e.noRelative,t=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o,r=b.useMemo(function(){return vn(a)},[a]);return b.createElement(hn,{styles:mn(r,!n,a,t?"":"!important")})},$e=!1;if(typeof window<"u")try{var Y=Object.defineProperty({},"passive",{get:function(){return $e=!0,!0}});window.addEventListener("test",Y,Y),window.removeEventListener("test",Y,Y)}catch{$e=!1}var W=$e?{passive:!1}:!1,bn=function(e){return e.tagName==="TEXTAREA"},Ze=function(e,n){var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!bn(e)&&t[n]==="visible")},_n=function(e){return Ze(e,"overflowY")},$n=function(e){return Ze(e,"overflowX")},Me=function(e,n){var t=n;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var o=Qe(e,t);if(o){var a=Je(e,t),r=a[1],i=a[2];if(r>i)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},yn=function(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;return[n,t,o]},En=function(e){var n=e.scrollLeft,t=e.scrollWidth,o=e.clientWidth;return[n,t,o]},Qe=function(e,n){return e==="v"?_n(n):$n(n)},Je=function(e,n){return e==="v"?yn(n):En(n)},xn=function(e,n){return e==="h"&&n==="rtl"?-1:1},wn=function(e,n,t,o,a){var r=xn(e,window.getComputedStyle(n).direction),i=r*o,c=t.target,d=n.contains(c),f=!1,p=i>0,l=0,m=0;do{var v=Je(e,c),E=v[0],s=v[1],h=v[2],_=s-h-r*E;(E||_)&&Qe(e,c)&&(l+=_,m+=E),c=c.parentNode}while(!d&&c!==document.body||d&&(n.contains(c)||n===c));return(p&&(a&&l===0||!a&&i>l)||!p&&(a&&m===0||!a&&-i>m))&&(f=!0),f},q=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ie=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},Sn=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Cn=function(e){return`
38
+ `)},gn=function(e){var n=e.noRelative,t=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o,r=_.useMemo(function(){return vn(a)},[a]);return _.createElement(mn,{styles:hn(r,!n,a,t?"":"!important")})},$e=!1;if(typeof window<"u")try{var X=Object.defineProperty({},"passive",{get:function(){return $e=!0,!0}});window.addEventListener("test",X,X),window.removeEventListener("test",X,X)}catch{$e=!1}var W=$e?{passive:!1}:!1,_n=function(e){return e.tagName==="TEXTAREA"},Ze=function(e,n){var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!_n(e)&&t[n]==="visible")},bn=function(e){return Ze(e,"overflowY")},$n=function(e){return Ze(e,"overflowX")},Me=function(e,n){var t=n;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var o=Qe(e,t);if(o){var a=Je(e,t),r=a[1],i=a[2];if(r>i)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},yn=function(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;return[n,t,o]},En=function(e){var n=e.scrollLeft,t=e.scrollWidth,o=e.clientWidth;return[n,t,o]},Qe=function(e,n){return e==="v"?bn(n):$n(n)},Je=function(e,n){return e==="v"?yn(n):En(n)},xn=function(e,n){return e==="h"&&n==="rtl"?-1:1},wn=function(e,n,t,o,a){var r=xn(e,window.getComputedStyle(n).direction),i=r*o,c=t.target,d=n.contains(c),f=!1,p=i>0,l=0,h=0;do{var v=Je(e,c),E=v[0],s=v[1],m=v[2],b=s-m-r*E;(E||b)&&Qe(e,c)&&(l+=b,h+=E),c=c.parentNode}while(!d&&c!==document.body||d&&(n.contains(c)||n===c));return(p&&(a&&l===0||!a&&i>l)||!p&&(a&&h===0||!a&&-i>h))&&(f=!0),f},Y=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ie=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},Sn=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Cn=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},On=0,U=[];function Pn(e){var n=b.useRef([]),t=b.useRef([0,0]),o=b.useRef(),a=b.useState(On++)[0],r=b.useState(function(){return qe()})[0],i=b.useRef(e);b.useEffect(function(){i.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var s=Yt([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return s.forEach(function(h){return h.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),s.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=b.useCallback(function(s,h){if("touches"in s&&s.touches.length===2)return!i.current.allowPinchZoom;var _=q(s),S=t.current,$="deltaX"in s?s.deltaX:S[0]-_[0],y="deltaY"in s?s.deltaY:S[1]-_[1],w,j=s.target,P=Math.abs($)>Math.abs(y)?"h":"v";if("touches"in s&&P==="h"&&j.type==="range")return!1;var x=Me(P,j);if(!x)return!0;if(x?w=P:(w=P==="v"?"h":"v",x=Me(P,j)),!x)return!1;if(!o.current&&"changedTouches"in s&&($||y)&&(o.current=w),!w)return!0;var A=o.current||w;return wn(A,h,s,A==="h"?$:y,!0)},[]),d=b.useCallback(function(s){var h=s;if(!(!U.length||U[U.length-1]!==r)){var _="deltaY"in h?Ie(h):q(h),S=n.current.filter(function(w){return w.name===h.type&&w.target===h.target&&Sn(w.delta,_)})[0];if(S&&S.should){h.cancelable&&h.preventDefault();return}if(!S){var $=(i.current.shards||[]).map(Le).filter(Boolean).filter(function(w){return w.contains(h.target)}),y=$.length>0?c(h,$[0]):!i.current.noIsolation;y&&h.cancelable&&h.preventDefault()}}},[]),f=b.useCallback(function(s,h,_,S){var $={name:s,delta:h,target:_,should:S};n.current.push($),setTimeout(function(){n.current=n.current.filter(function(y){return y!==$})},1)},[]),p=b.useCallback(function(s){t.current=q(s),o.current=void 0},[]),l=b.useCallback(function(s){f(s.type,Ie(s),s.target,c(s,e.lockRef.current))},[]),m=b.useCallback(function(s){f(s.type,q(s),s.target,c(s,e.lockRef.current))},[]);b.useEffect(function(){return U.push(r),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:m}),document.addEventListener("wheel",d,W),document.addEventListener("touchmove",d,W),document.addEventListener("touchstart",p,W),function(){U=U.filter(function(s){return s!==r}),document.removeEventListener("wheel",d,W),document.removeEventListener("touchmove",d,W),document.removeEventListener("touchstart",p,W)}},[]);var v=e.removeScrollBar,E=e.inert;return b.createElement(b.Fragment,null,E?b.createElement(r,{styles:Cn(a)}):null,v?b.createElement(gn,{gapMode:"margin"}):null)}const Nn=on(Ye,Pn);var et=b.forwardRef(function(e,n){return b.createElement(ie,D({},e,{ref:n,sideCar:Nn}))});et.classNames=ie.classNames;const Rn=et;var An=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},z=new WeakMap,Z=new WeakMap,Q={},ve=0,tt=function(e){return e&&(e.host||tt(e.parentNode))},Tn=function(e,n){return n.map(function(t){if(e.contains(t))return t;var o=tt(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Dn=function(e,n,t,o){var a=Tn(n,Array.isArray(e)?e:[e]);Q[t]||(Q[t]=new WeakMap);var r=Q[t],i=[],c=new Set,d=new Set(a),f=function(l){!l||c.has(l)||(c.add(l),f(l.parentNode))};a.forEach(f);var p=function(l){!l||d.has(l)||Array.prototype.forEach.call(l.children,function(m){if(c.has(m))p(m);else{var v=m.getAttribute(o),E=v!==null&&v!=="false",s=(z.get(m)||0)+1,h=(r.get(m)||0)+1;z.set(m,s),r.set(m,h),i.push(m),s===1&&E&&Z.set(m,!0),h===1&&m.setAttribute(t,"true"),E||m.setAttribute(o,"true")}})};return p(n),c.clear(),ve++,function(){i.forEach(function(l){var m=z.get(l)-1,v=r.get(l)-1;z.set(l,m),r.set(l,v),m||(Z.has(l)||l.removeAttribute(o),Z.delete(l)),v||l.removeAttribute(t)}),ve--,ve||(z=new WeakMap,z=new WeakMap,Z=new WeakMap,Q={})}},Mn=function(e,n,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=n||An(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live]"))),Dn(o,a,t,"aria-hidden")):function(){return null}};const nt="Dialog",[rt,no]=$t(nt),[In,T]=rt(nt),Ln=e=>{const{__scopeDialog:n,children:t,open:o,defaultOpen:a,onOpenChange:r,modal:i=!0}=e,c=u.useRef(null),d=u.useRef(null),[f=!1,p]=wt({prop:o,defaultProp:a,onChange:r});return u.createElement(In,{scope:n,triggerRef:c,contentRef:d,contentId:ue(),titleId:ue(),descriptionId:ue(),open:f,onOpenChange:p,onOpenToggle:u.useCallback(()=>p(l=>!l),[p]),modal:i},t)},jn="DialogTrigger",Fn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(jn,t),r=V(n,a.triggerRef);return u.createElement(L.button,C({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Se(a.open)},o,{ref:r,onClick:I(e.onClick,a.onOpenToggle)}))}),ot="DialogPortal",[kn,at]=rt(ot,{forceMount:void 0}),Bn=e=>{const{__scopeDialog:n,forceMount:t,children:o,container:a}=e,r=T(ot,n);return u.createElement(kn,{scope:n,forceMount:t},u.Children.map(o,i=>u.createElement(ae,{present:t||r.open},u.createElement(Vt,{asChild:!0,container:a},i))))},ye="DialogOverlay",Wn=u.forwardRef((e,n)=>{const t=at(ye,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T(ye,e.__scopeDialog);return r.modal?u.createElement(ae,{present:o||r.open},u.createElement(Un,C({},a,{ref:n}))):null}),Un=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(ye,t);return u.createElement(Rn,{as:we,allowPinchZoom:!0,shards:[a.contentRef]},u.createElement(L.div,C({"data-state":Se(a.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))}),G="DialogContent",zn=u.forwardRef((e,n)=>{const t=at(G,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T(G,e.__scopeDialog);return u.createElement(ae,{present:o||r.open},r.modal?u.createElement(Hn,C({},a,{ref:n})):u.createElement(Vn,C({},a,{ref:n})))}),Hn=u.forwardRef((e,n)=>{const t=T(G,e.__scopeDialog),o=u.useRef(null),a=V(n,t.contentRef,o);return u.useEffect(()=>{const r=o.current;if(r)return Mn(r)},[]),u.createElement(it,C({},e,{ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,r=>{var i;r.preventDefault(),(i=t.triggerRef.current)===null||i===void 0||i.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,r=>{const i=r.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&r.preventDefault()}),onFocusOutside:I(e.onFocusOutside,r=>r.preventDefault())}))}),Vn=u.forwardRef((e,n)=>{const t=T(G,e.__scopeDialog),o=u.useRef(!1),a=u.useRef(!1);return u.createElement(it,C({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,r),!r.defaultPrevented){var c;o.current||(c=t.triggerRef.current)===null||c===void 0||c.focus(),r.preventDefault()}o.current=!1,a.current=!1},onInteractOutside:r=>{var i,c;(i=e.onInteractOutside)===null||i===void 0||i.call(e,r),r.defaultPrevented||(o.current=!0,r.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const d=r.target;((c=t.triggerRef.current)===null||c===void 0?void 0:c.contains(d))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&a.current&&r.preventDefault()}}))}),it=u.forwardRef((e,n)=>{const{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:r,...i}=e,c=T(G,t),d=u.useRef(null),f=V(n,d);return Xt(),u.createElement(u.Fragment,null,u.createElement(Ft,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:r},u.createElement(It,C({role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Se(c.open)},i,{ref:f,onDismiss:()=>c.onOpenChange(!1)}))),!1)}),Gn="DialogTitle",Kn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Gn,t);return u.createElement(L.h2,C({id:a.titleId},o,{ref:n}))}),Xn="DialogDescription",Yn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Xn,t);return u.createElement(L.p,C({id:a.descriptionId},o,{ref:n}))}),qn="DialogClose",Zn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(qn,t);return u.createElement(L.button,C({type:"button"},o,{ref:n,onClick:I(e.onClick,()=>a.onOpenChange(!1))}))});function Se(e){return e?"open":"closed"}const Qn=Ln,Jn=Fn,er=Bn,tr=Wn,nr=zn,rr=Kn,je=Yn,or=Zn,Fe={SM:"sm",MD:"md",LG:"lg"};function ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}};/*!
41
+ `)},On=0,U=[];function Pn(e){var n=_.useRef([]),t=_.useRef([0,0]),o=_.useRef(),a=_.useState(On++)[0],r=_.useState(function(){return Ye()})[0],i=_.useRef(e);_.useEffect(function(){i.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var s=Xt([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return s.forEach(function(m){return m.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),s.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=_.useCallback(function(s,m){if("touches"in s&&s.touches.length===2)return!i.current.allowPinchZoom;var b=Y(s),S=t.current,$="deltaX"in s?s.deltaX:S[0]-b[0],y="deltaY"in s?s.deltaY:S[1]-b[1],w,j=s.target,P=Math.abs($)>Math.abs(y)?"h":"v";if("touches"in s&&P==="h"&&j.type==="range")return!1;var x=Me(P,j);if(!x)return!0;if(x?w=P:(w=P==="v"?"h":"v",x=Me(P,j)),!x)return!1;if(!o.current&&"changedTouches"in s&&($||y)&&(o.current=w),!w)return!0;var R=o.current||w;return wn(R,m,s,R==="h"?$:y,!0)},[]),d=_.useCallback(function(s){var m=s;if(!(!U.length||U[U.length-1]!==r)){var b="deltaY"in m?Ie(m):Y(m),S=n.current.filter(function(w){return w.name===m.type&&w.target===m.target&&Sn(w.delta,b)})[0];if(S&&S.should){m.cancelable&&m.preventDefault();return}if(!S){var $=(i.current.shards||[]).map(Le).filter(Boolean).filter(function(w){return w.contains(m.target)}),y=$.length>0?c(m,$[0]):!i.current.noIsolation;y&&m.cancelable&&m.preventDefault()}}},[]),f=_.useCallback(function(s,m,b,S){var $={name:s,delta:m,target:b,should:S};n.current.push($),setTimeout(function(){n.current=n.current.filter(function(y){return y!==$})},1)},[]),p=_.useCallback(function(s){t.current=Y(s),o.current=void 0},[]),l=_.useCallback(function(s){f(s.type,Ie(s),s.target,c(s,e.lockRef.current))},[]),h=_.useCallback(function(s){f(s.type,Y(s),s.target,c(s,e.lockRef.current))},[]);_.useEffect(function(){return U.push(r),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:h}),document.addEventListener("wheel",d,W),document.addEventListener("touchmove",d,W),document.addEventListener("touchstart",p,W),function(){U=U.filter(function(s){return s!==r}),document.removeEventListener("wheel",d,W),document.removeEventListener("touchmove",d,W),document.removeEventListener("touchstart",p,W)}},[]);var v=e.removeScrollBar,E=e.inert;return _.createElement(_.Fragment,null,E?_.createElement(r,{styles:Cn(a)}):null,v?_.createElement(gn,{gapMode:"margin"}):null)}const Nn=on(Xe,Pn);var et=_.forwardRef(function(e,n){return _.createElement(ie,D({},e,{ref:n,sideCar:Nn}))});et.classNames=ie.classNames;const Rn=et;var An=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},q=new WeakMap,Z=new WeakMap,Q={},ve=0,tt=function(e){return e&&(e.host||tt(e.parentNode))},Tn=function(e,n){return n.map(function(t){if(e.contains(t))return t;var o=tt(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Dn=function(e,n,t,o){var a=Tn(n,Array.isArray(e)?e:[e]);Q[t]||(Q[t]=new WeakMap);var r=Q[t],i=[],c=new Set,d=new Set(a),f=function(l){!l||c.has(l)||(c.add(l),f(l.parentNode))};a.forEach(f);var p=function(l){!l||d.has(l)||Array.prototype.forEach.call(l.children,function(h){if(c.has(h))p(h);else{var v=h.getAttribute(o),E=v!==null&&v!=="false",s=(q.get(h)||0)+1,m=(r.get(h)||0)+1;q.set(h,s),r.set(h,m),i.push(h),s===1&&E&&Z.set(h,!0),m===1&&h.setAttribute(t,"true"),E||h.setAttribute(o,"true")}})};return p(n),c.clear(),ve++,function(){i.forEach(function(l){var h=q.get(l)-1,v=r.get(l)-1;q.set(l,h),r.set(l,v),h||(Z.has(l)||l.removeAttribute(o),Z.delete(l)),v||l.removeAttribute(t)}),ve--,ve||(q=new WeakMap,q=new WeakMap,Z=new WeakMap,Q={})}},Mn=function(e,n,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=n||An(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live]"))),Dn(o,a,t,"aria-hidden")):function(){return null}};const nt="Dialog",[rt,no]=$t(nt),[In,T]=rt(nt),Ln=e=>{const{__scopeDialog:n,children:t,open:o,defaultOpen:a,onOpenChange:r,modal:i=!0}=e,c=u.useRef(null),d=u.useRef(null),[f=!1,p]=wt({prop:o,defaultProp:a,onChange:r});return u.createElement(In,{scope:n,triggerRef:c,contentRef:d,contentId:ue(),titleId:ue(),descriptionId:ue(),open:f,onOpenChange:p,onOpenToggle:u.useCallback(()=>p(l=>!l),[p]),modal:i},t)},jn="DialogTrigger",Fn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(jn,t),r=H(n,a.triggerRef);return u.createElement(L.button,C({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Se(a.open)},o,{ref:r,onClick:I(e.onClick,a.onOpenToggle)}))}),ot="DialogPortal",[kn,at]=rt(ot,{forceMount:void 0}),Bn=e=>{const{__scopeDialog:n,forceMount:t,children:o,container:a}=e,r=T(ot,n);return u.createElement(kn,{scope:n,forceMount:t},u.Children.map(o,i=>u.createElement(ae,{present:t||r.open},u.createElement(Ht,{asChild:!0,container:a},i))))},ye="DialogOverlay",Wn=u.forwardRef((e,n)=>{const t=at(ye,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T(ye,e.__scopeDialog);return r.modal?u.createElement(ae,{present:o||r.open},u.createElement(Un,C({},a,{ref:n}))):null}),Un=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(ye,t);return u.createElement(Rn,{as:we,allowPinchZoom:!0,shards:[a.contentRef]},u.createElement(L.div,C({"data-state":Se(a.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))}),V="DialogContent",qn=u.forwardRef((e,n)=>{const t=at(V,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T(V,e.__scopeDialog);return u.createElement(ae,{present:o||r.open},r.modal?u.createElement(zn,C({},a,{ref:n})):u.createElement(Hn,C({},a,{ref:n})))}),zn=u.forwardRef((e,n)=>{const t=T(V,e.__scopeDialog),o=u.useRef(null),a=H(n,t.contentRef,o);return u.useEffect(()=>{const r=o.current;if(r)return Mn(r)},[]),u.createElement(it,C({},e,{ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,r=>{var i;r.preventDefault(),(i=t.triggerRef.current)===null||i===void 0||i.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,r=>{const i=r.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&r.preventDefault()}),onFocusOutside:I(e.onFocusOutside,r=>r.preventDefault())}))}),Hn=u.forwardRef((e,n)=>{const t=T(V,e.__scopeDialog),o=u.useRef(!1),a=u.useRef(!1);return u.createElement(it,C({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,r),!r.defaultPrevented){var c;o.current||(c=t.triggerRef.current)===null||c===void 0||c.focus(),r.preventDefault()}o.current=!1,a.current=!1},onInteractOutside:r=>{var i,c;(i=e.onInteractOutside)===null||i===void 0||i.call(e,r),r.defaultPrevented||(o.current=!0,r.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const d=r.target;((c=t.triggerRef.current)===null||c===void 0?void 0:c.contains(d))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&a.current&&r.preventDefault()}}))}),it=u.forwardRef((e,n)=>{const{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:r,...i}=e,c=T(V,t),d=u.useRef(null),f=H(n,d);return Kt(),u.createElement(u.Fragment,null,u.createElement(Ft,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:r},u.createElement(It,C({role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Se(c.open)},i,{ref:f,onDismiss:()=>c.onOpenChange(!1)}))),!1)}),Vn="DialogTitle",Gn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Vn,t);return u.createElement(L.h2,C({id:a.titleId},o,{ref:n}))}),Kn="DialogDescription",Xn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Kn,t);return u.createElement(L.p,C({id:a.descriptionId},o,{ref:n}))}),Yn="DialogClose",Zn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Yn,t);return u.createElement(L.button,C({type:"button"},o,{ref:n,onClick:I(e.onClick,()=>a.onOpenChange(!1))}))});function Se(e){return e?"open":"closed"}const Qn=Ln,Jn=Fn,er=Bn,tr=Wn,nr=qn,rr=Gn,je=Xn,or=Zn,Fe={SM:"sm",MD:"md",LG:"lg"};function ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}};/*!
42
42
  Copyright (c) 2018 Jed Watson.
43
43
  Licensed under the MIT License (MIT), see
44
44
  http://jedwatson.github.io/classnames
@@ -46,11 +46,11 @@
46
46
  Copyright (c) 2018 Jed Watson.
47
47
  Licensed under the MIT License (MIT), see
48
48
  http://jedwatson.github.io/classnames
49
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o(c)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ut);var pr=ut.exports;const vr=fr(pr),F={"purpur-button":"_purpur-button_1fna2_1","purpur-button--sm":"_purpur-button--sm_1fna2_33","purpur-button--icon-only":"_purpur-button--icon-only_1fna2_36","purpur-button--md":"_purpur-button--md_1fna2_39","purpur-button--lg":"_purpur-button--lg_1fna2_45","purpur-button--full-width":"_purpur-button--full-width_1fna2_51","purpur-button--primary":"_purpur-button--primary_1fna2_54","purpur-button--disabled":"_purpur-button--disabled_1fna2_58","purpur-button--primary-negative":"_purpur-button--primary-negative_1fna2_64","purpur-button--secondary":"_purpur-button--secondary_1fna2_76","purpur-button--secondary-negative":"_purpur-button--secondary-negative_1fna2_87","purpur-button--expressive":"_purpur-button--expressive_1fna2_98","purpur-button--expressive-negative":"_purpur-button--expressive-negative_1fna2_108","purpur-button--negative":"_purpur-button--negative_1fna2_120","purpur-button--destructive":"_purpur-button--destructive_1fna2_127","purpur-button--destructive-negative":"_purpur-button--destructive-negative_1fna2_137","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_1fna2_147","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_1fna2_160","purpur-button--text-negative":"_purpur-button--text-negative_1fna2_175","purpur-button--text":"_purpur-button--text_1fna2_175"},k="purpur-button",hr=({children:e,className:n,["data-testid"]:t,disabled:o=!1,fullWidth:a=!1,iconOnly:r,loading:i=!1,onClick:c,size:d=Fe.MD,variant:f,type:p="button",...l},m)=>{if(r&&f==="destructive")return null;const v=vr([F[k],F[`${k}--${f}`],F[`${k}--${d}`]],{[F[`${k}--icon-only`]]:r,[F[`${k}--negative`]]:f.endsWith("negative"),[F[`${k}--full-width`]]:a,[F[`${k}--disabled`]]:o||i},n),E=h=>{o||i?h.preventDefault():c&&c(h)},s=()=>f.endsWith("negative")?"negative-disabled":"disabled";return g.jsxs("button",{className:v,"data-testid":t,type:p,ref:m,"aria-disabled":l["aria-disabled"]||o||i,onClick:E,...l,children:[i&&g.jsx(dr,{size:d===Fe.LG?"xs":"xxs",variant:s()})," ",e]})},Ce=u.forwardRef(hr);Ce.displayName="Button";function mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}};/*!
49
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o(c)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ut);var pr=ut.exports;const vr=fr(pr),F={"purpur-button":"_purpur-button_1fna2_1","purpur-button--sm":"_purpur-button--sm_1fna2_33","purpur-button--icon-only":"_purpur-button--icon-only_1fna2_36","purpur-button--md":"_purpur-button--md_1fna2_39","purpur-button--lg":"_purpur-button--lg_1fna2_45","purpur-button--full-width":"_purpur-button--full-width_1fna2_51","purpur-button--primary":"_purpur-button--primary_1fna2_54","purpur-button--disabled":"_purpur-button--disabled_1fna2_58","purpur-button--primary-negative":"_purpur-button--primary-negative_1fna2_64","purpur-button--secondary":"_purpur-button--secondary_1fna2_76","purpur-button--secondary-negative":"_purpur-button--secondary-negative_1fna2_87","purpur-button--expressive":"_purpur-button--expressive_1fna2_98","purpur-button--expressive-negative":"_purpur-button--expressive-negative_1fna2_108","purpur-button--negative":"_purpur-button--negative_1fna2_120","purpur-button--destructive":"_purpur-button--destructive_1fna2_127","purpur-button--destructive-negative":"_purpur-button--destructive-negative_1fna2_137","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_1fna2_147","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_1fna2_160","purpur-button--text-negative":"_purpur-button--text-negative_1fna2_175","purpur-button--text":"_purpur-button--text_1fna2_175"},k="purpur-button",mr=({children:e,className:n,["data-testid"]:t,disabled:o=!1,fullWidth:a=!1,iconOnly:r,loading:i=!1,onClick:c,size:d=Fe.MD,variant:f,type:p="button",...l},h)=>{if(r&&f==="destructive")return null;const v=vr([F[k],F[`${k}--${f}`],F[`${k}--${d}`]],{[F[`${k}--icon-only`]]:r,[F[`${k}--negative`]]:f.endsWith("negative"),[F[`${k}--full-width`]]:a,[F[`${k}--disabled`]]:o||i},n),E=m=>{o||i?m.preventDefault():c&&c(m)},s=()=>f.endsWith("negative")?"negative-disabled":"disabled";return g.jsxs("button",{className:v,"data-testid":t,type:p,ref:h,"aria-disabled":l["aria-disabled"]||o||i,onClick:E,...l,children:[i&&g.jsx(dr,{size:d===Fe.LG?"xs":"xxs",variant:s()})," ",e]})},Ce=u.forwardRef(mr);Ce.displayName="Button";function hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}};/*!
50
50
  Copyright (c) 2018 Jed Watson.
51
51
  Licensed under the MIT License (MIT), see
52
52
  http://jedwatson.github.io/classnames
53
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o(c)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(st);var gr=st.exports;const br=mr(gr),he={"purpur-heading":"_purpur-heading_1abfh_1","purpur-heading--hyphens":"_purpur-heading--hyphens_1abfh_8","purpur-heading--subsection-100":"_purpur-heading--subsection-100_1abfh_11","purpur-heading--title-100":"_purpur-heading--title-100_1abfh_17","purpur-heading--title-200":"_purpur-heading--title-200_1abfh_23","purpur-heading--title-300":"_purpur-heading--title-300_1abfh_29","purpur-heading--title-400":"_purpur-heading--title-400_1abfh_35","purpur-heading--title-500":"_purpur-heading--title-500_1abfh_41","purpur-heading--title-600":"_purpur-heading--title-600_1abfh_47","purpur-heading--title-700":"_purpur-heading--title-700_1abfh_53","purpur-heading--display-25":"_purpur-heading--display-25_1abfh_59","purpur-heading--display-50":"_purpur-heading--display-50_1abfh_65","purpur-heading--display-100":"_purpur-heading--display-100_1abfh_71","purpur-heading--display-200":"_purpur-heading--display-200_1abfh_77"},_r={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},me="purpur-heading",$r=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,tag:a,variant:r=_r.TITLE100,...i})=>{const c=a,d=br([t,he[me],he[`${me}--${r}`],{[he[`${me}--hyphens`]]:o}]);return g.jsx(c,{...i,className:d,"data-testid":e,children:n})};function yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}};/*!
53
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o(c)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(st);var gr=st.exports;const _r=hr(gr),me={"purpur-heading":"_purpur-heading_1abfh_1","purpur-heading--hyphens":"_purpur-heading--hyphens_1abfh_8","purpur-heading--subsection-100":"_purpur-heading--subsection-100_1abfh_11","purpur-heading--title-100":"_purpur-heading--title-100_1abfh_17","purpur-heading--title-200":"_purpur-heading--title-200_1abfh_23","purpur-heading--title-300":"_purpur-heading--title-300_1abfh_29","purpur-heading--title-400":"_purpur-heading--title-400_1abfh_35","purpur-heading--title-500":"_purpur-heading--title-500_1abfh_41","purpur-heading--title-600":"_purpur-heading--title-600_1abfh_47","purpur-heading--title-700":"_purpur-heading--title-700_1abfh_53","purpur-heading--display-25":"_purpur-heading--display-25_1abfh_59","purpur-heading--display-50":"_purpur-heading--display-50_1abfh_65","purpur-heading--display-100":"_purpur-heading--display-100_1abfh_71","purpur-heading--display-200":"_purpur-heading--display-200_1abfh_77"},br={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},he="purpur-heading",$r=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,tag:a,variant:r=br.TITLE100,...i})=>{const c=a,d=_r([t,me[he],me[`${he}--${r}`],{[me[`${he}--hyphens`]]:o}]);return g.jsx(c,{...i,className:d,"data-testid":e,children:n})};function yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}};/*!
54
54
  Copyright (c) 2018 Jed Watson.
55
55
  Licensed under the MIT License (MIT), see
56
56
  http://jedwatson.github.io/classnames
@@ -58,9 +58,9 @@
58
58
  Copyright (c) 2018 Jed Watson.
59
59
  Licensed under the MIT License (MIT), see
60
60
  http://jedwatson.github.io/classnames
61
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o(c)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ft);var Dr=ft.exports;const Mr=Tr(Dr),te={"purpur-paragraph":"_purpur-paragraph_1fzxr_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1fzxr_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1fzxr_10","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1fzxr_13","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1fzxr_19","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1fzxr_26","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1fzxr_33","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1fzxr_39","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1fzxr_45","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1fzxr_51","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1fzxr_57","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1fzxr_64","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1fzxr_71"},Ir={PARAGRAPH100:"paragraph-100",PARAGRAPH100MEDIUM:"paragraph-100-medium",PARAGRAPH100BOLD:"paragraph-100-bold",PARAGRAPH200:"paragraph-200",PREAMBLE100:"preamble-100",PREAMBLE200:"preamble-200",ADDITIONAL100:"additional-100",ADDITIONAL100MEDIUM:"additional-100-medium",OVERLINE100:"overline-100",OVERLINE200:"overline-200"},ne="purpur-paragraph",Lr=({["data-testid"]:e,children:n,className:t="",disabled:o,enableHyphenation:a=!1,variant:r=Ir.PARAGRAPH100,...i})=>{const c=Mr([t,te[ne],te[`${ne}--${r}`],{[te[`${ne}--hyphens`]]:a,[te[`${ne}--disabled`]]:o}]);return g.jsx("p",{...i,className:c,"data-testid":e,children:n})};function H(){return H=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},H.apply(this,arguments)}function jr(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function Fr(...e){return n=>e.forEach(t=>jr(t,n))}const pt=u.forwardRef((e,n)=>{const{children:t,...o}=e,a=u.Children.toArray(t),r=a.find(Br);if(r){const i=r.props.children,c=a.map(d=>d===r?u.Children.count(i)>1?u.Children.only(null):u.isValidElement(i)?i.props.children:null:d);return u.createElement(Ee,H({},o,{ref:n}),u.isValidElement(i)?u.cloneElement(i,void 0,c):null)}return u.createElement(Ee,H({},o,{ref:n}),t)});pt.displayName="Slot";const Ee=u.forwardRef((e,n)=>{const{children:t,...o}=e;return u.isValidElement(t)?u.cloneElement(t,{...Wr(o,t.props),ref:n?Fr(n,t.ref):t.ref}):u.Children.count(t)>1?u.Children.only(null):null});Ee.displayName="SlotClone";const kr=({children:e})=>u.createElement(u.Fragment,null,e);function Br(e){return u.isValidElement(e)&&e.type===kr}function Wr(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...i)=>{r(...i),a(...i)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Ur=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zr=Ur.reduce((e,n)=>{const t=u.forwardRef((o,a)=>{const{asChild:r,...i}=o,c=r?pt:n;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(c,H({},i,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{}),Hr=u.forwardRef((e,n)=>u.createElement(zr.span,H({},e,{ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),Vr=Hr,Gr=({asChild:e,children:n,className:t="",["data-testid"]:o})=>g.jsx(Vr,{asChild:e,"data-testid":o,className:t,children:n}),Kr="600px";function Xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vt={exports:{}};/*!
61
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o(c)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ft);var Dr=ft.exports;const Mr=Tr(Dr),te={"purpur-paragraph":"_purpur-paragraph_1fzxr_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1fzxr_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1fzxr_10","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1fzxr_13","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1fzxr_19","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1fzxr_26","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1fzxr_33","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1fzxr_39","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1fzxr_45","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1fzxr_51","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1fzxr_57","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1fzxr_64","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1fzxr_71"},Ir={PARAGRAPH100:"paragraph-100",PARAGRAPH100MEDIUM:"paragraph-100-medium",PARAGRAPH100BOLD:"paragraph-100-bold",PARAGRAPH200:"paragraph-200",PREAMBLE100:"preamble-100",PREAMBLE200:"preamble-200",ADDITIONAL100:"additional-100",ADDITIONAL100MEDIUM:"additional-100-medium",OVERLINE100:"overline-100",OVERLINE200:"overline-200"},ne="purpur-paragraph",Lr=({["data-testid"]:e,children:n,className:t="",disabled:o,enableHyphenation:a=!1,variant:r=Ir.PARAGRAPH100,...i})=>{const c=Mr([t,te[ne],te[`${ne}--${r}`],{[te[`${ne}--hyphens`]]:a,[te[`${ne}--disabled`]]:o}]);return g.jsx("p",{...i,className:c,"data-testid":e,children:n})},jr="600px";function z(){return z=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},z.apply(this,arguments)}function Fr(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function kr(...e){return n=>e.forEach(t=>Fr(t,n))}const pt=u.forwardRef((e,n)=>{const{children:t,...o}=e,a=u.Children.toArray(t),r=a.find(Wr);if(r){const i=r.props.children,c=a.map(d=>d===r?u.Children.count(i)>1?u.Children.only(null):u.isValidElement(i)?i.props.children:null:d);return u.createElement(Ee,z({},o,{ref:n}),u.isValidElement(i)?u.cloneElement(i,void 0,c):null)}return u.createElement(Ee,z({},o,{ref:n}),t)});pt.displayName="Slot";const Ee=u.forwardRef((e,n)=>{const{children:t,...o}=e;return u.isValidElement(t)?u.cloneElement(t,{...Ur(o,t.props),ref:n?kr(n,t.ref):t.ref}):u.Children.count(t)>1?u.Children.only(null):null});Ee.displayName="SlotClone";const Br=({children:e})=>u.createElement(u.Fragment,null,e);function Wr(e){return u.isValidElement(e)&&e.type===Br}function Ur(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...i)=>{r(...i),a(...i)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const qr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zr=qr.reduce((e,n)=>{const t=u.forwardRef((o,a)=>{const{asChild:r,...i}=o,c=r?pt:n;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(c,z({},i,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{}),Hr=u.forwardRef((e,n)=>u.createElement(zr.span,z({},e,{ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),Vr=Hr,Gr=({asChild:e,children:n,className:t="",["data-testid"]:o})=>g.jsx(Vr,{asChild:e,"data-testid":o,className:t,children:n});function Kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vt={exports:{}};/*!
62
62
  Copyright (c) 2018 Jed Watson.
63
63
  Licensed under the MIT License (MIT), see
64
64
  http://jedwatson.github.io/classnames
65
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o.call(this,c)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,this&&this[c]||c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(vt);var Yr=vt.exports;const qr=Xr(Yr),Zr="_fadeIn_1fnes_1",Qr={"purpur-modal-content":"_purpur-modal-content_1fnes_1",fadeIn:Zr,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_1fnes_30","purpur-modal-content__close-button":"_purpur-modal-content__close-button_1fnes_37","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_1fnes_48","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_1fnes_59","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_1fnes_68","purpur-modal-content__header":"_purpur-modal-content__header_1fnes_91","purpur-modal-content__title":"_purpur-modal-content__title_1fnes_104","purpur-modal-content__description":"_purpur-modal-content__description_1fnes_107","purpur-modal-content__body":"_purpur-modal-content__body_1fnes_110","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_1fnes_120","purpur-modal-content__actions":"_purpur-modal-content__actions_1fnes_133","purpur-modal-content__button":"_purpur-modal-content__button_1fnes_145","purpur-modal-content--with-image":"_purpur-modal-content--with-image_1fnes_156","purpur-modal-content--overflow":"_purpur-modal-content--overflow_1fnes_156","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_1fnes_194"},We=e=>e.showCloseButton===!0,N=qr.bind(Qr),O="purpur-modal-content",Jr=u.forwardRef(({["data-testid"]:e,actions:n,children:t,className:o,description:a,disableCloseOnClickOutside:r,hideDescription:i,image:c,primaryActionVariant:d="primary",stickyButtons:f=!0,title:p,...l},m)=>{const{closeButtonAllyLabel:v,showCloseButton:E,...s}=l,[h,_]=u.useState(!1),S=u.useRef(null),$=u.useRef(null),y=u.useRef(null),w=u.useRef(null),j=N([O,{[`${O}--with-image`]:!!c},{[`${O}--overflow`]:h},{[`${O}--sticky-footer`]:f},o]),P=R=>e?`${e} ${R}`:void 0,x=R=>{r&&R.preventDefault()},A=u.useCallback(()=>{if(!S.current||!$.current||!y.current||!w.current)return;const R=window.innerWidth<parseInt(Kr),ht=window.getComputedStyle(R?S.current:y.current,null),mt=parseFloat(ht.getPropertyValue("height")),gt=R?$.current.offsetHeight:w.current.offsetHeight;_(mt<gt)},[]),K=R=>{r&&!E&&R.preventDefault()};return u.useEffect(()=>(window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}),[]),g.jsxs(er,{children:[g.jsx(tr,{className:N(`${O}__overlay`)}),g.jsxs(nr,{...s,className:j,"data-testid":e,ref:m,...!a&&{"aria-describedby":void 0},onPointerDownOutside:x,onOpenAutoFocus:A,onEscapeKeyDown:K,children:[g.jsxs("div",{ref:S,className:N(`${O}__wrapper`),children:[We(l)&&v&&c&&g.jsx(Ue,{allyLabel:v,hasImage:!0,"data-testid":P("close-button")}),g.jsxs("div",{ref:$,className:N(`${O}__wrapper-inner`),children:[g.jsxs("div",{className:N(`${O}__header`),children:[We(l)&&v&&!c&&g.jsx(Ue,{allyLabel:v,"data-testid":P("close-button")}),g.jsx(rr,{asChild:!0,className:N(`${O}__title`),"data-testid":P("title"),children:g.jsx($r,{tag:"h2",variant:"title-200",children:p})})]}),c&&g.jsx("div",{className:N(`${O}__image-wrapper`),"data-testid":P("image"),children:c}),g.jsx("div",{ref:y,className:N(`${O}__body`),children:g.jsxs("div",{ref:w,className:N(`${O}__body-inner`),children:[a&&g.jsx(g.Fragment,{children:i?g.jsx(Gr,{asChild:!0,children:g.jsx(je,{"data-testid":P("description"),children:a})}):g.jsx(je,{asChild:!0,className:N(`${O}__description`),"data-testid":P("description"),children:g.jsx(Lr,{variant:"paragraph-100",children:a})})}),g.jsx("div",{children:t}),!f&&g.jsx(ze,{actions:n,primaryActionVariant:d})]})})]})]}),f&&g.jsx(ze,{actions:n,primaryActionVariant:d})]})]})}),Ue=({allyLabel:e,hasImage:n,["data-testid"]:t})=>g.jsx(or,{asChild:!0,children:g.jsx(Ce,{variant:n?"primary-negative":"tertiary-purple",size:"sm",iconOnly:!0,"aria-label":e,className:N(`${O}__close-button`),"data-testid":t,children:g.jsx(dt,{})})}),eo=3,ze=({actions:e,primaryActionVariant:n})=>{const t=[n,"secondary","text"];return e&&e.length>0?g.jsx("div",{className:N(`${O}__actions`),"data-testid":"modal actions",children:e.slice(0,eo).map(({label:o,onClick:a},r)=>g.jsx(Ce,{"data-testid":"modal actions button",variant:t[r]||"",onClick:a,className:N(`${O}__button`),children:o},o))}):null},to=u.forwardRef(({["data-testid"]:e,children:n,className:t,...o},a)=>g.jsx(Jn,{asChild:!0,ref:a,"data-testid":e,className:t,...o,children:n})),ce=({["data-testid"]:e,children:n,open:t,onOpenChange:o})=>g.jsx(Qn,{open:t,onOpenChange:o,"data-testid":e,children:n});ce.Trigger=to;ce.Content=Jr;ce.displayName="Modal";exports.Modal=ce;
65
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o.call(this,c)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,this&&this[c]||c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(vt);var Xr=vt.exports;const Yr=Kr(Xr),Zr="_fadeIn_1qmv6_1",Qr={"purpur-modal-content":"_purpur-modal-content_1qmv6_1",fadeIn:Zr,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_1qmv6_30","purpur-modal-content__close-button":"_purpur-modal-content__close-button_1qmv6_37","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_1qmv6_48","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_1qmv6_59","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_1qmv6_68","purpur-modal-content__header":"_purpur-modal-content__header_1qmv6_91","purpur-modal-content__title":"_purpur-modal-content__title_1qmv6_104","purpur-modal-content__description":"_purpur-modal-content__description_1qmv6_107","purpur-modal-content__body":"_purpur-modal-content__body_1qmv6_110","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_1qmv6_120","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_1qmv6_132","purpur-modal-content__actions-button":"_purpur-modal-content__actions-button_1qmv6_132","purpur-modal-content--with-image":"_purpur-modal-content--with-image_1qmv6_155","purpur-modal-content--overflow":"_purpur-modal-content--overflow_1qmv6_155","purpur-modal-content__actions":"_purpur-modal-content__actions_1qmv6_132","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_1qmv6_186","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_1qmv6_196"},We=e=>e.showCloseButton===!0,N=Yr.bind(Qr),O="purpur-modal-content",Jr=u.forwardRef(({["data-testid"]:e,actions:n,children:t,className:o,description:a,disableCloseOnClickOutside:r,hideDescription:i,image:c,primaryActionVariant:d="primary",stickyButtons:f=!0,title:p,...l},h)=>{const{closeButtonAllyLabel:v,showCloseButton:E,...s}=l,[m,b]=u.useState(!1),S=u.useRef(null),$=u.useRef(null),y=u.useRef(null),w=u.useRef(null),j=N([O,{[`${O}--with-image`]:!!c},{[`${O}--overflow`]:m},{[`${O}--sticky-footer`]:f},o]),P=A=>e?`${e} ${A}`:void 0,x=A=>{r&&A.preventDefault()},R=u.useCallback(()=>{if(!S.current||!$.current||!y.current||!w.current)return;const A=window.innerWidth<parseInt(jr),mt=window.getComputedStyle(A?S.current:y.current,null),ht=parseFloat(mt.getPropertyValue("height")),gt=A?$.current.offsetHeight:w.current.offsetHeight;b(ht<gt)},[]),G=A=>{r&&!E&&A.preventDefault()};return u.useEffect(()=>(window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}),[R]),g.jsxs(er,{children:[g.jsx(tr,{className:N(`${O}__overlay`)}),g.jsxs(nr,{...s,className:j,"data-testid":e,ref:h,...!a&&{"aria-describedby":void 0},onPointerDownOutside:x,onOpenAutoFocus:R,onEscapeKeyDown:G,children:[g.jsxs("div",{ref:S,className:N(`${O}__wrapper`),children:[We(l)&&v&&c&&g.jsx(Ue,{allyLabel:v,hasImage:!0,"data-testid":P("close-button")}),g.jsxs("div",{ref:$,className:N(`${O}__wrapper-inner`),children:[g.jsxs("div",{className:N(`${O}__header`),children:[We(l)&&v&&!c&&g.jsx(Ue,{allyLabel:v,"data-testid":P("close-button")}),g.jsx(rr,{asChild:!0,className:N(`${O}__title`),"data-testid":P("title"),children:g.jsx($r,{tag:"h2",variant:"title-200",children:p})})]}),c&&g.jsx("div",{className:N(`${O}__image-wrapper`),"data-testid":P("image"),children:c}),g.jsx("div",{ref:y,className:N(`${O}__body`),children:g.jsxs("div",{ref:w,className:N(`${O}__body-inner`),children:[a&&i&&g.jsx(Gr,{asChild:!0,children:g.jsx(je,{"data-testid":P("description"),children:a})}),a&&!i&&g.jsx(je,{asChild:!0,className:N(`${O}__description`),"data-testid":P("description"),children:g.jsx(Lr,{variant:"paragraph-100",children:a})}),g.jsx("div",{children:t}),!f&&g.jsx(qe,{actions:n,primaryActionVariant:d})]})})]})]}),f&&g.jsx(qe,{actions:n,primaryActionVariant:d})]})]})}),Ue=({allyLabel:e,hasImage:n,["data-testid"]:t})=>g.jsx(or,{asChild:!0,children:g.jsx(Ce,{variant:n?"primary-negative":"tertiary-purple",size:"sm",iconOnly:!0,"aria-label":e,className:N(`${O}__close-button`),"data-testid":t,children:g.jsx(dt,{})})}),eo=3,qe=({actions:e,primaryActionVariant:n})=>{const t=[n,"secondary","text"];return e&&e.length>0?g.jsxs("div",{className:N(`${O}__actions`),children:[g.jsx("div",{className:N(`${O}__actions-buttons`),"data-testid":"modal actions",children:e.slice(0,eo).map(({label:o,onClick:a},r)=>g.jsx(Ce,{"data-testid":"modal actions button",variant:t[r]||"",onClick:a,className:N(`${O}__actions-button`),children:o},o))}),g.jsx("span",{className:N(`${O}__actions-separator`)})]}):null},to=u.forwardRef(({["data-testid"]:e,children:n,className:t,...o},a)=>g.jsx(Jn,{asChild:!0,ref:a,"data-testid":e,className:t,...o,children:n})),ce=({["data-testid"]:e,children:n,open:t,onOpenChange:o})=>g.jsx(Qn,{open:t,onOpenChange:o,"data-testid":e,children:n});ce.Trigger=to;ce.Content=Jr;ce.displayName="Modal";exports.Modal=ce;
66
66
  //# sourceMappingURL=modal.cjs.js.map