@pfct/purple 1.11.1 → 1.13.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/assets/dotLotties/sample.lottie +0 -0
- package/dist/assets/images/fallback.png +0 -0
- package/dist/assets/images/fallback@2x.png +0 -0
- package/dist/assets/images/fallback@3x.png +0 -0
- package/dist/assets/index.css +2 -2
- package/dist/chunks/Accordion.CxDfMzK1.js +1 -0
- package/dist/chunks/{Accordion.BiAAJwmC.js → Accordion.D8caFIuT.js} +3 -2
- package/dist/chunks/{Divider.k5ROyG2W.js → Divider.CinbGPsa.js} +1 -1
- package/dist/chunks/{Divider.CfGqsPOG.js → Divider.KzhgrMYv.js} +1 -1
- package/dist/chunks/DotLottie.BEAWvPhB.js +71358 -0
- package/dist/chunks/DotLottie.DHSt1_0W.js +5 -0
- package/dist/chunks/{Switch.clBBQjY3.js → Switch.2ZixJdlG.js} +1 -1
- package/dist/chunks/{Switch.G7d5HjrW.js → Switch.Cf71RNLF.js} +2 -2
- package/dist/chunks/{bottomSheet.CbP1N3-g.js → bottomSheet.B5OrcCXx.js} +1 -1
- package/dist/chunks/{bottomSheet.BHvPqq91.js → bottomSheet.CnYVp9RP.js} +1 -1
- package/dist/chunks/{checkbox.DzMsJDRY.js → checkbox.CYGNBSUO.js} +1 -1
- package/dist/chunks/{checkbox.DjHLBzFe.js → checkbox.Dzvj-4RV.js} +2 -2
- package/dist/chunks/{dist.BbBE9J18.js → dist.6jgaVidM.js} +8 -7
- package/dist/chunks/dist.BixLWWwb.js +71 -0
- package/dist/chunks/dist.Bj_fI5rQ.js +1 -0
- package/dist/chunks/dist.BoEBrFAh.js +1 -0
- package/dist/chunks/dist.C4D-6Tcr.js +1 -0
- package/dist/chunks/{dist.D_s4kUUr.js → dist.CDZCWPu4.js} +1 -1
- package/dist/chunks/{dist.COetszRA.js → dist.CJY8LqRA.js} +1 -1
- package/dist/chunks/dist.CT8nUj9V.js +1 -0
- package/dist/chunks/dist.CYRtTgUR.js +96 -0
- package/dist/chunks/{dist.Cz5xL5vI.js → dist.CpTw9rlm.js} +1 -1
- package/dist/chunks/dist.Crl6KTg_.js +21 -0
- package/dist/chunks/dist.CwWM0zXK.js +25 -0
- package/dist/chunks/dist.DPo6XlLq.js +145 -0
- package/dist/chunks/dist.DTByVKhF.js +193 -0
- package/dist/chunks/dist.Ds9VPbBd.js +194 -0
- package/dist/chunks/dist.DvmdOncE.js +1 -0
- package/dist/chunks/dist.ERrpPEZ4.js +1 -0
- package/dist/chunks/dist.OINbhiqU.js +1 -0
- package/dist/chunks/dist.Xtc44Blp.js +1 -0
- package/dist/chunks/dist.mhQdJ8f2.js +170 -0
- package/dist/chunks/drawer.BewJ2D_w.js +1545 -0
- package/dist/chunks/drawer.Cty9wtvs.js +7 -0
- package/dist/chunks/es2015.ByVyszJo.js +562 -0
- package/dist/chunks/es2015.DoCbPEnP.js +41 -0
- package/dist/chunks/tooltip.Dv33hiJ0.js +1 -0
- package/dist/chunks/{tooltip.Bh_x0SaP.js → tooltip.w3pAhl4A.js} +5 -4
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.esm.js +1 -1
- package/dist/components/Control/Switch/index.cjs.js +1 -1
- package/dist/components/Control/Switch/index.esm.js +1 -1
- package/dist/components/Control/index.cjs.js +1 -1
- package/dist/components/Control/index.esm.js +2 -2
- package/dist/components/DatePicker/RangeDatePickerModal/index.cjs.js +1 -1
- package/dist/components/DatePicker/RangeDatePickerModal/index.esm.js +1 -1
- package/dist/components/DatePicker/SingleDatePickerModal/index.cjs.js +1 -1
- package/dist/components/DatePicker/SingleDatePickerModal/index.esm.js +1 -1
- package/dist/components/Divider/index.cjs.js +1 -1
- package/dist/components/Divider/index.esm.js +1 -1
- package/dist/components/LegacyModal/index.cjs.js +1 -1
- package/dist/components/LegacyModal/index.esm.js +4 -4
- package/dist/components/MiniButton/IconMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.esm.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.esm.js +1 -1
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.esm.js +10 -10
- package/dist/components/Pagination/index.cjs.js +1 -1
- package/dist/components/Pagination/index.esm.js +1 -1
- package/dist/components/SelectBox/index.cjs.js +1 -1
- package/dist/components/SelectBox/index.d.ts +6 -0
- package/dist/components/SelectBox/index.d.ts.map +1 -1
- package/dist/components/SelectBox/index.esm.js +42 -70
- package/dist/components/Tag/index.cjs.js +1 -1
- package/dist/components/Tag/index.esm.js +1 -1
- package/dist/components/Terms/index.cjs.js +1 -1
- package/dist/components/Terms/index.esm.js +3 -3
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.esm.js +16 -15
- package/dist/components/ui/bottomSheet.cjs.js +1 -1
- package/dist/components/ui/bottomSheet.esm.js +1 -1
- package/dist/components/ui/button.cjs.js +1 -1
- package/dist/components/ui/button.esm.js +1 -1
- package/dist/components/ui/checkbox.cjs.js +1 -1
- package/dist/components/ui/checkbox.esm.js +1 -1
- package/dist/components/ui/dialog.cjs.js +1 -1
- package/dist/components/ui/dialog.esm.js +10 -10
- package/dist/components/ui/drawer.cjs.js +1 -1
- package/dist/components/ui/drawer.esm.js +1 -1
- package/dist/components/ui/impact-tooltip.cjs.js +1 -1
- package/dist/components/ui/impact-tooltip.esm.js +83 -2
- package/dist/components/ui/select.cjs.js +1 -0
- package/dist/components/ui/select.d.ts +52 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.esm.js +182 -0
- package/dist/components/ui/tooltip.cjs.js +1 -1
- package/dist/components/ui/tooltip.esm.js +1 -1
- package/dist/components/ui/typography.cjs.js +1 -1
- package/dist/components/ui/typography.esm.js +1 -1
- package/dist/icons/src/aliases/aliases.cjs.js +1 -1
- package/dist/icons/src/aliases/aliases.d.ts +1 -1
- package/dist/icons/src/aliases/aliases.d.ts.map +1 -1
- package/dist/icons/src/aliases/aliases.esm.js +3 -3
- package/dist/icons/src/aliases/index.cjs.js +1 -1
- package/dist/icons/src/aliases/index.esm.js +3 -3
- package/dist/icons/src/aliases/prefixed.cjs.js +1 -1
- package/dist/icons/src/aliases/prefixed.d.ts +4 -4
- package/dist/icons/src/aliases/prefixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/prefixed.esm.js +3 -3
- package/dist/icons/src/aliases/suffixed.cjs.js +1 -1
- package/dist/icons/src/aliases/suffixed.d.ts +6 -6
- package/dist/icons/src/aliases/suffixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/suffixed.esm.js +3 -3
- package/dist/icons/src/icons/index.cjs.js +1 -1
- package/dist/icons/src/icons/index.esm.js +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +60 -58
- package/dist/library/DotLottie/index.cjs.js +1 -0
- package/dist/library/DotLottie/index.d.ts +21 -0
- package/dist/library/DotLottie/index.d.ts.map +1 -0
- package/dist/library/DotLottie/index.esm.js +2 -0
- package/dist/library/List/BottomSheetItemList/index.cjs.js +1 -1
- package/dist/library/List/BottomSheetItemList/index.esm.js +1 -1
- package/dist/library/Lottie/index.cjs.js +1 -1
- package/dist/library/Lottie/index.esm.js +67 -2
- package/dist/library/index.cjs.js +1 -1
- package/dist/library/index.d.ts +1 -0
- package/dist/library/index.d.ts.map +1 -1
- package/dist/library/index.esm.js +6 -5
- package/package.json +6 -5
- package/dist/chunks/Accordion.ClCq_Ey8.js +0 -1
- package/dist/chunks/Lottie.DxqtsFQi.js +0 -1
- package/dist/chunks/Lottie.RPp4wef7.js +0 -161
- package/dist/chunks/dist.CbqoUpiO.js +0 -5
- package/dist/chunks/dist.CrnGARhp.js +0 -1
- package/dist/chunks/dist.DXWLF1yO.js +0 -137
- package/dist/chunks/dist.DxuGUd9a.js +0 -93
- package/dist/chunks/dist.eT0KQJF1.js +0 -1
- package/dist/chunks/dist.o_suB-Ao.js +0 -217
- package/dist/chunks/drawer.CsTGeQfm.js +0 -987
- package/dist/chunks/drawer.Dl1NBBot.js +0 -3
- package/dist/chunks/es2015.DT_gWqJq.js +0 -705
- package/dist/chunks/es2015.YOXqRYz1.js +0 -41
- package/dist/chunks/impact-tooltip.CqzKZc1i.js +0 -268
- package/dist/chunks/impact-tooltip.MXdAL7_2.js +0 -1
- package/dist/chunks/tooltip.DXsV-PA7.js +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const e=require("./chunk.CMqjfN_6.js"),t=require("./dist.DTg4gm8w.js"),n=require("./dist.C4D-6Tcr.js"),r=require("./dist.ZyM9l2Vf.js"),i=require("./dist.BklO76Tk.js"),a=require("./utils.C67s_c-g.js"),o=require("./dist.Xtc44Blp.js"),s=require("./es2015.DoCbPEnP.js");let c=require("react");c=e.t(c,1);let l=require("react/jsx-runtime"),u=require("react-dom");u=e.t(u,1);function d(e){let t=c.forwardRef((t,r)=>{let{children:i,...a}=t,o=null,s=!1,l=[];v(i)&&typeof S==`function`&&(i=S(i._payload)),c.Children.forEach(i,e=>{if(g(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;v(n)&&typeof S==`function`&&(n=S(n._payload)),o=p(t,n),l.push(o?.props?.children)}else l.push(e)}),o?o=c.cloneElement(o,void 0,l):!s&&c.Children.count(i)===1&&c.isValidElement(i)&&(o=i);let u=o?h(o):void 0,d=n.t(r,u);if(!o){if(i||i===0)throw Error(s?x(e):b(e));return i}let f=m(a,o.props??{});return o.type!==c.Fragment&&(f.ref=r?d:u),c.cloneElement(o,f)});return t.displayName=`${e}.Slot`,t}var f=Symbol.for(`radix.slottable`),p=(e,t)=>{if(`child`in e.props){let t=e.props.child;return c.isValidElement(t)?c.cloneElement(t,void 0,e.props.children(t.props.children)):null}return c.isValidElement(t)?t:null};function m(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function h(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function g(e){return c.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===f}var _=Symbol.for(`react.lazy`);function v(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===_&&`_payload`in e&&y(e._payload)}function y(e){return typeof e==`object`&&!!e&&`then`in e}var b=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,x=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,S=c.use,C=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=d(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,l.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function w(e,t){e&&u.flushSync(()=>e.dispatchEvent(t))}var T=`DismissableLayer`,E=`dismissableLayer.update`,D=`dismissableLayer.pointerDownOutside`,O=`dismissableLayer.focusOutside`,k,A=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),j=c.forwardRef((e,r)=>{let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:d,onDismiss:f,...p}=e,m=c.useContext(A),[h,g]=c.useState(null),_=h?.ownerDocument??globalThis?.document,[,v]=c.useState({}),y=n.t(r,e=>g(e)),b=Array.from(m.layers),[x]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(x),w=h?b.indexOf(h):-1,T=m.layersWithOutsidePointerEventsDisabled.size>0,D=w>=S,O=M(e=>{let t=e.target,n=[...m.branches].some(e=>e.contains(t));!D||n||(s?.(e),d?.(e),e.defaultPrevented||f?.())},_),j=ne(e=>{let t=e.target;[...m.branches].some(e=>e.contains(t))||(u?.(e),d?.(e),e.defaultPrevented||f?.())},_);return o.t(e=>{w===m.layers.size-1&&(a?.(e),!e.defaultPrevented&&f&&(e.preventDefault(),f()))},_),c.useEffect(()=>{if(h)return i&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(k=_.body.style.pointerEvents,_.body.style.pointerEvents=`none`),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),re(),()=>{i&&(m.layersWithOutsidePointerEventsDisabled.delete(h),m.layersWithOutsidePointerEventsDisabled.size===0&&(_.body.style.pointerEvents=k))}},[h,_,i,m]),c.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),re())},[h,m]),c.useEffect(()=>{let e=()=>v({});return document.addEventListener(E,e),()=>document.removeEventListener(E,e)},[]),(0,l.jsx)(C.div,{...p,ref:y,style:{pointerEvents:T?D?`auto`:`none`:void 0,...e.style},onFocusCapture:t.r(e.onFocusCapture,j.onFocusCapture),onBlurCapture:t.r(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:t.r(e.onPointerDownCapture,O.onPointerDownCapture)})});j.displayName=T;var ee=`DismissableLayerBranch`,te=c.forwardRef((e,t)=>{let r=c.useContext(A),i=c.useRef(null),a=n.t(t,i);return c.useEffect(()=>{let e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,l.jsx)(C.div,{...e,ref:a})});te.displayName=ee;function M(e,t=globalThis?.document){let n=o.n(e),r=c.useRef(!1),i=c.useRef(()=>{});return c.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ie(D,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ne(e,t=globalThis?.document){let n=o.n(e),r=c.useRef(!1);return c.useEffect(()=>{let e=e=>{e.target&&!r.current&&ie(O,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function re(){let e=new CustomEvent(E);document.dispatchEvent(e)}function ie(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?w(i,a):i.dispatchEvent(a)}var N=`focusScope.autoFocusOnMount`,P=`focusScope.autoFocusOnUnmount`,F={bubbles:!1,cancelable:!0},ae=`FocusScope`,I=c.forwardRef((e,t)=>{let{loop:r=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...u}=e,[d,f]=c.useState(null),p=o.n(a),m=o.n(s),h=c.useRef(null),g=n.t(t,e=>f(e)),_=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(i){let e=function(e){if(_.paused||!d)return;let t=e.target;d.contains(t)?h.current=t:B(h.current,{select:!0})},t=function(e){if(_.paused||!d)return;let t=e.relatedTarget;t!==null&&(d.contains(t)||B(h.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&B(d)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return d&&r.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[i,d,_.paused]),c.useEffect(()=>{if(d){le.add(_);let e=document.activeElement;if(!d.contains(e)){let t=new CustomEvent(N,F);d.addEventListener(N,p),d.dispatchEvent(t),t.defaultPrevented||(L(fe(R(d)),{select:!0}),document.activeElement===e&&B(d))}return()=>{d.removeEventListener(N,p),setTimeout(()=>{let t=new CustomEvent(P,F);d.addEventListener(P,m),d.dispatchEvent(t),t.defaultPrevented||B(e??document.body,{select:!0}),d.removeEventListener(P,m),le.remove(_)},0)}}},[d,p,m,_]);let v=c.useCallback(e=>{if(!r&&!i||_.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[i,a]=oe(t);i&&a?!e.shiftKey&&n===a?(e.preventDefault(),r&&B(i,{select:!0})):e.shiftKey&&n===i&&(e.preventDefault(),r&&B(a,{select:!0})):n===t&&e.preventDefault()}},[r,i,_.paused]);return(0,l.jsx)(C.div,{tabIndex:-1,...u,ref:g,onKeyDown:v})});I.displayName=ae;function L(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(B(r,{select:t}),document.activeElement!==n)return}function oe(e){let t=R(e);return[z(t,e),z(t.reverse(),e)]}function R(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function z(e,t){for(let n of e)if(!se(n,{upTo:t}))return n}function se(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function ce(e){return e instanceof HTMLInputElement&&`select`in e}function B(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ce(e)&&t&&e.select()}}var le=ue();function ue(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=de(e,t),e.unshift(t)},remove(t){e=de(e,t),e[0]?.resume()}}}function de(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fe(e){return e.filter(e=>e.tagName!==`A`)}var V=`Portal`,pe=c.forwardRef((e,n)=>{let{container:r,...i}=e,[a,o]=c.useState(!1);t.n(()=>o(!0),[]);let s=r||a&&globalThis?.document?.body;return s?u.createPortal((0,l.jsx)(C.div,{...i,ref:n}),s):null});pe.displayName=V;var H=`Dialog`,[U,me]=t.a(H),[he,W]=U(H),ge=e=>{let{__scopeDialog:n,children:r,open:a,defaultOpen:o,onOpenChange:s,modal:u=!0}=e,d=c.useRef(null),f=c.useRef(null),[p,m]=t.t({prop:a,defaultProp:o??!1,onChange:s,caller:H});return(0,l.jsx)(he,{scope:n,triggerRef:d,contentRef:f,contentId:i.t(),titleId:i.t(),descriptionId:i.t(),open:p,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(e=>!e),[m]),modal:u,children:r})};ge.displayName=H;var G=`DialogTrigger`,_e=c.forwardRef((e,r)=>{let{__scopeDialog:i,...a}=e,o=W(G,i),s=n.t(r,o.triggerRef);return(0,l.jsx)(C.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Pe(o.open),...a,ref:s,onClick:t.r(e.onClick,o.onOpenToggle)})});_e.displayName=G;var K=`DialogPortal`,[ve,q]=U(K,{forceMount:void 0}),ye=e=>{let{__scopeDialog:t,forceMount:n,children:i,container:a}=e,o=W(K,t);return(0,l.jsx)(ve,{scope:t,forceMount:n,children:c.Children.map(i,e=>(0,l.jsx)(r.t,{present:n||o.open,children:(0,l.jsx)(pe,{asChild:!0,container:a,children:e})}))})};ye.displayName=K;var be=`DialogOverlay`,xe=c.forwardRef((e,t)=>{let n=q(be,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,o=W(be,e.__scopeDialog);return o.modal?(0,l.jsx)(r.t,{present:i||o.open,children:(0,l.jsx)(Ce,{...a,ref:t})}):null});xe.displayName=be;var Se=d(`DialogOverlay.RemoveScroll`),Ce=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=W(be,n);return(0,l.jsx)(s.n,{as:Se,allowPinchZoom:!0,shards:[i.contentRef],children:(0,l.jsx)(C.div,{"data-state":Pe(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),J=`DialogContent`,we=c.forwardRef((e,t)=>{let n=q(J,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,o=W(J,e.__scopeDialog);return(0,l.jsx)(r.t,{present:i||o.open,children:o.modal?(0,l.jsx)(Te,{...a,ref:t}):(0,l.jsx)(Ee,{...a,ref:t})})});we.displayName=J;var Te=c.forwardRef((e,r)=>{let i=W(J,e.__scopeDialog),a=c.useRef(null),o=n.t(r,i.contentRef,a);return c.useEffect(()=>{let e=a.current;if(e)return s.t(e)},[]),(0,l.jsx)(De,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:t.r(e.onCloseAutoFocus,e=>{e.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:t.r(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:t.r(e.onFocusOutside,e=>e.preventDefault())})}),Ee=c.forwardRef((e,t)=>{let n=W(J,e.__scopeDialog),r=c.useRef(!1),i=c.useRef(!1);return(0,l.jsx)(De,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),De=c.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,...u}=e,d=W(J,r),f=c.useRef(null),p=n.t(t,f);return s.r(),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,l.jsx)(j,{role:`dialog`,id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Pe(d.open),...u,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Re,{titleId:d.titleId}),(0,l.jsx)(Be,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Oe=`DialogTitle`,ke=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=W(Oe,n);return(0,l.jsx)(C.h2,{id:i.titleId,...r,ref:t})});ke.displayName=Oe;var Ae=`DialogDescription`,je=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=W(Ae,n);return(0,l.jsx)(C.p,{id:i.descriptionId,...r,ref:t})});je.displayName=Ae;var Me=`DialogClose`,Ne=c.forwardRef((e,n)=>{let{__scopeDialog:r,...i}=e,a=W(Me,r);return(0,l.jsx)(C.button,{type:`button`,...i,ref:n,onClick:t.r(e.onClick,()=>a.onOpenChange(!1))})});Ne.displayName=Me;function Pe(e){return e?`open`:`closed`}var Fe=`DialogTitleWarning`,[Ie,Le]=t.i(Fe,{contentName:J,titleName:Oe,docsSlug:`dialog`}),Re=({titleId:e})=>{let t=Le(Fe),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
+
|
|
3
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
+
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ze=`DialogDescriptionWarning`,Be=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Le(ze).contentName}}.`;return c.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Ve=ge,He=_e,Ue=ye,We=xe,Ge=we,Ke=ke,qe=je,Je=Ne;function Ye(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Xe=c.default.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:`bottom`,shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Y=()=>{let e=c.default.useContext(Xe);if(!e)throw Error(`useDrawerContext must be used within a Drawer.Root`);return e};Ye(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
6
|
+
[data-state=closed]
|
|
7
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function Ze(){let e=navigator.userAgent;return typeof window<`u`&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function Qe(){return rt(/^Mac/)}function $e(){return rt(/^iPhone/)}function et(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function tt(){return rt(/^iPad/)||Qe()&&navigator.maxTouchPoints>1}function nt(){return $e()||tt()}function rt(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.platform):void 0}var it=24,at=typeof window<`u`?c.useLayoutEffect:c.useEffect;function ot(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var st=typeof document<`u`&&window.visualViewport;function ct(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function lt(e){for(ct(e)&&(e=e.parentElement);e&&!ct(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var ut=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),dt=0,ft;function pt(e={}){let{isDisabled:t}=e;at(()=>{if(!t)return dt++,dt===1&&nt()&&(ft=mt()),()=>{dt--,dt===0&&ft?.()}},[t])}function mt(){let e,t=0,n=n=>{e=lt(n.target),!(e===document.documentElement&&e===document.body)&&(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}let r=n.changedTouches[0].pageY,i=e.scrollTop,a=e.scrollHeight-e.clientHeight;a!==0&&((i<=0&&r>t||i>=a&&r<t)&&n.preventDefault(),t=r)},i=e=>{let t=e.target;vt(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform=`translateY(-2000px)`,t.focus(),requestAnimationFrame(()=>{t.style.transform=``}))},a=e=>{let t=e.target;vt(t)&&(t.style.transform=`translateY(-2000px)`,requestAnimationFrame(()=>{t.style.transform=``,st&&(st.height<window.innerHeight?requestAnimationFrame(()=>{_t(t)}):st.addEventListener(`resize`,()=>_t(t),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=ot(ht(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let u=ot(gt(document,`touchstart`,n,{passive:!1,capture:!0}),gt(document,`touchmove`,r,{passive:!1,capture:!0}),gt(document,`touchend`,i,{passive:!1,capture:!0}),gt(document,`focus`,a,!0),gt(window,`scroll`,o));return()=>{l(),u(),window.scrollTo(s,c)}}function ht(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function gt(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function _t(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=lt(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+it&&(t.scrollTop+=r-n)}e=t.parentElement}}function vt(e){return e instanceof HTMLInputElement&&!ut.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function yt(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function bt(...e){return t=>e.forEach(e=>yt(e,t))}function xt(...e){return c.useCallback(bt(...e),e)}var St=new WeakMap;function X(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&St.set(e,r)}function Ct(e,t){if(!e||!(e instanceof HTMLElement))return;let n=St.get(e);n&&(e.style[t]=n[t])}var Z=e=>{switch(e){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e}};function wt(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(`, `)[Z(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(`, `)[Z(t)?5:4]):null)}function Tt(e){return 8*(Math.log(e+1)-2)}function Et(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}var Q={DURATION:.5,EASE:[.32,.72,0,1]},Dt=.4,Ot=.25,kt=100,At=8,jt=16,Mt=26,Nt=`vaul-dragging`;function Pt(e){let t=c.default.useRef(e);return c.default.useEffect(()=>{t.current=e}),c.default.useMemo(()=>(...e)=>t.current==null?void 0:t.current.call(t,...e),[])}function Ft({defaultProp:e,onChange:t}){let n=c.default.useState(e),[r]=n,i=c.default.useRef(r),a=Pt(t);return c.default.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function It({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=Ft({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Pt(n);return[o,c.default.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function Lt({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:a,onSnapPointChange:o,direction:s=`bottom`,container:l,snapToSequentialPoint:u}){let[d,f]=It({prop:e,defaultProp:n?.[0],onChange:t}),[p,m]=c.default.useState(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);c.default.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let h=c.default.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),g=c.default.useMemo(()=>n?.findIndex(e=>e===d)??null,[n,d]),_=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===d||!n,v=c.default.useMemo(()=>{let e=l?{width:l.getBoundingClientRect().width,height:l.getBoundingClientRect().height}:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return n?.map(t=>{let n=typeof t==`string`,r=0;if(n&&(r=parseInt(t,10)),Z(s)){let i=n?r:p?t*e.height:0;return p?s===`bottom`?e.height-i:-e.height+i:i}let i=n?r:p?t*e.width:0;return p?s===`right`?e.width-i:-e.width+i:i})??[]},[n,p,l]),y=c.default.useMemo(()=>g===null?null:v?.[g],[v,g]),b=c.default.useCallback(e=>{let t=v?.findIndex(t=>t===e)??null;o(t),X(r.current,{transition:`transform ${Q.DURATION}s cubic-bezier(${Q.EASE.join(`,`)})`,transform:Z(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),v&&t!==v.length-1&&a!==void 0&&t!==a&&t<a?X(i.current,{transition:`opacity ${Q.DURATION}s cubic-bezier(${Q.EASE.join(`,`)})`,opacity:`0`}):X(i.current,{transition:`opacity ${Q.DURATION}s cubic-bezier(${Q.EASE.join(`,`)})`,opacity:`1`}),f(n?.[Math.max(t,0)])},[r.current,n,v,a,i,f]);c.default.useEffect(()=>{if(d||e){let t=n?.findIndex(t=>t===e||t===d)??-1;v&&t!==-1&&typeof v[t]==`number`&&b(v[t])}},[d,e,n,v,b]);function x({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(a===void 0)return;let c=s===`bottom`||s===`right`?(y??0)-e:(y??0)+e,l=g===a-1,d=g===0,f=e>0;if(l&&X(i.current,{transition:`opacity ${Q.DURATION}s cubic-bezier(${Q.EASE.join(`,`)})`}),!u&&r>2&&!f){o?t():b(v[0]);return}if(!u&&r>2&&f&&v&&n){b(v[n.length-1]);return}let p=v?.reduce((e,t)=>typeof e!=`number`||typeof t!=`number`?e:Math.abs(t-c)<Math.abs(e-c)?t:e),m=Z(s)?window.innerHeight:window.innerWidth;if(r>Dt&&Math.abs(e)<m*.4){let e=f?1:-1;if(e>0&&h&&n){b(v[n.length-1]);return}if(d&&e<0&&o&&t(),g===null)return;b(v[g+e]);return}b(p)}function S({draggedDistance:e}){if(y===null)return;let t=s===`bottom`||s===`right`?y-e:y+e;(s===`bottom`||s===`right`)&&t<v[v.length-1]||(s===`top`||s===`left`)&&t>v[v.length-1]||X(r.current,{transform:Z(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})}function C(e,t){if(!n||typeof g!=`number`||!v||a===void 0)return null;let r=g===a-1;if(g>=a&&t)return 0;if(r&&!t)return 1;if(!_&&!r)return null;let i=r?g+1:g-1,o=r?v[i]-v[i-1]:v[i+1]-v[i],s=e/Math.abs(o);return r?1-s:s}return{isLastSnapPoint:h,activeSnapPoint:d,shouldFade:_,getPercentageDragged:C,setActiveSnapPoint:f,activeSnapPointIndex:g,onRelease:x,onDrag:S,snapPointsOffset:v}}function Rt(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=Y(),a=c.default.useRef(null),o=(0,c.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-Mt)/window.innerWidth}c.default.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);let t=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!t)return;r&&!i&&Et(document.body,{background:`black`}),Et(t,{transformOrigin:Z(e)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${Q.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Q.EASE.join(`,`)})`});let n=Et(t,{borderRadius:`${At}px`,overflow:`hidden`,...Z(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty(`background`)},Q.DURATION*1e3)}}},[t,n,o])}var zt=null;function Bt({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:a}){let[o,s]=c.default.useState(()=>typeof window<`u`?window.location.href:``),l=c.default.useRef(0),u=c.default.useCallback(()=>{if(et()&&zt===null&&e&&!a){zt={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:`unset`};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-l.current}px`,left:`${-e}px`,right:`0px`,height:`auto`}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&l.current>=t&&(document.body.style.top=`${-(l.current+e)}px`)}),300)}},[e]),d=c.default.useCallback(()=>{if(et()&&zt!==null&&!a){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,zt),window.requestAnimationFrame(()=>{if(i&&o!==window.location.href){s(window.location.href);return}window.scrollTo(t,e)}),zt=null}},[o]);return c.default.useEffect(()=>{function e(){l.current=window.scrollY}return e(),window.addEventListener(`scroll`,e),()=>{window.removeEventListener(`scroll`,e)}},[]),c.default.useEffect(()=>{if(t)return()=>{typeof document>`u`||document.querySelector(`[data-vaul-drawer]`)||d()}},[t,d]),c.default.useEffect(()=>{n||!r||(e?(!window.matchMedia(`(display-mode: standalone)`).matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,o,t,n,u,d]),{restorePositionSetting:d}}function Vt({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:a,shouldScaleBackground:o=!1,setBackgroundColorOnScale:s=!0,closeThreshold:l=Ot,scrollLockTimeout:u=kt,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:h,fixed:g,modal:_=!0,onClose:v,nested:y,noBodyStyles:b=!1,direction:x=`bottom`,defaultOpen:S=!1,disablePreventScroll:C=!0,snapToSequentialPoint:w=!1,preventScrollRestoration:T=!1,repositionInputs:E=!0,onAnimationEnd:D,container:O,autoFocus:k=!1}){let[A=!1,j]=It({defaultProp:S,prop:e,onChange:e=>{t?.(e),!e&&!y&&ge(),setTimeout(()=>{D?.(e)},Q.DURATION*1e3),e&&!_&&typeof window<`u`&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`}),e||(document.body.style.pointerEvents=`auto`)}}),[ee,te]=c.default.useState(!1),[M,ne]=c.default.useState(!1),[re,ie]=c.default.useState(!1),N=c.default.useRef(null),P=c.default.useRef(null),F=c.default.useRef(null),ae=c.default.useRef(null),I=c.default.useRef(null),L=c.default.useRef(!1),oe=c.default.useRef(null),R=c.default.useRef(0),z=c.default.useRef(!1),se=c.default.useRef(!S),ce=c.default.useRef(0),B=c.default.useRef(null),le=c.default.useRef(B.current?.getBoundingClientRect().height||0),ue=c.default.useRef(B.current?.getBoundingClientRect().width||0),de=c.default.useRef(0),{activeSnapPoint:fe,activeSnapPointIndex:V,setActiveSnapPoint:pe,onRelease:H,snapPointsOffset:U,onDrag:me,shouldFade:he,getPercentageDragged:W}=Lt({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:h,drawerRef:B,fadeFromIndex:p,overlayRef:N,onSnapPointChange:c.default.useCallback(e=>{a&&e===U.length-1&&(P.current=new Date)},[]),direction:x,container:O,snapToSequentialPoint:w});pt({isDisabled:!A||M||!_||re||!ee||!E||!C});let{restorePositionSetting:ge}=Bt({isOpen:A,modal:_,nested:y??!1,hasBeenOpened:ee,preventScrollRestoration:T,noBodyStyles:b});function G(){return(window.innerWidth-Mt)/window.innerWidth}function _e(e){!d&&!a||B.current&&!B.current.contains(e.target)||(le.current=B.current?.getBoundingClientRect().height||0,ue.current=B.current?.getBoundingClientRect().width||0,ne(!0),F.current=new Date,nt()&&window.addEventListener(`touchend`,()=>L.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),R.current=Z(x)?e.pageY:e.pageX)}function K(e,t){let n=e,r=window.getSelection()?.toString(),i=B.current?wt(B.current,x):null,a=new Date;if(n.tagName===`SELECT`||n.hasAttribute(`data-vaul-no-drag`)||n.closest(`[data-vaul-no-drag]`))return!1;if(x===`right`||x===`left`)return!0;if(P.current&&a.getTime()-P.current.getTime()<500)return!1;if(i!==null&&(x===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(I.current&&a.getTime()-I.current.getTime()<u&&i===0||t)return I.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return I.current=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function ve(e){if(B.current&&M){let t=x===`bottom`||x===`right`?1:-1,n=(R.current-(Z(x)?e.pageY:e.pageX))*t,i=n>0,s=a&&!d&&!i;if(s&&V===0)return;let c=Math.abs(n),l=document.querySelector(`[data-vaul-drawer-wrapper]`),u=c/(x===`bottom`||x===`top`?le.current:ue.current),f=W(c,i);if(f!==null&&(u=f),s&&u>=1||!L.current&&!K(e.target,i))return;if(B.current.classList.add(Nt),L.current=!0,X(B.current,{transition:`none`}),X(N.current,{transition:`none`}),a&&me({draggedDistance:n}),i&&!a){let e=Tt(n),r=Math.min(e*-1,0)*t;X(B.current,{transform:Z(x)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`});return}let m=1-u;if((he||p&&V===p-1)&&(r?.(e,u),X(N.current,{opacity:`${m}`,transition:`none`},!0)),l&&N.current&&o){let e=Math.min(G()+u*(1-G()),1),t=8-u*8,n=Math.max(0,14-u*14);X(l,{borderRadius:`${t}px`,transform:Z(x)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!a){let e=c*t;X(B.current,{transform:Z(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}}c.default.useEffect(()=>{window.requestAnimationFrame(()=>{se.current=!0})},[]),c.default.useEffect(()=>{var e;function t(){if(!B.current||!E)return;let e=document.activeElement;if(vt(e)||z.current){let e=window.visualViewport?.height||0,t=window.innerHeight,n=t-e,r=B.current.getBoundingClientRect().height||0,i=r>t*.8;de.current||=r;let o=B.current.getBoundingClientRect().top;if(Math.abs(ce.current-n)>60&&(z.current=!z.current),a&&a.length>0&&U&&V){let e=U[V]||0;n+=e}if(ce.current=n,r>e||z.current){let t=B.current.getBoundingClientRect().height,r=t;t>e&&(r=e-(i?o:Mt)),g?B.current.style.height=`${t-Math.max(n,0)}px`:B.current.style.height=`${Math.max(r,e-o)}px`}else Ze()||(B.current.style.height=`${de.current}px`);a&&a.length>0&&!z.current?B.current.style.bottom=`0px`:B.current.style.bottom=`${Math.max(n,0)}px`}}return(e=window.visualViewport)==null||e.addEventListener(`resize`,t),()=>window.visualViewport?.removeEventListener(`resize`,t)},[V,a,U]);function q(e){be(),v?.(),e||j(!1),setTimeout(()=>{a&&pe(a[0])},Q.DURATION*1e3)}function ye(){if(!B.current)return;let e=document.querySelector(`[data-vaul-drawer-wrapper]`),t=wt(B.current,x);X(B.current,{transform:`translate3d(0, 0, 0)`,transition:`transform ${Q.DURATION}s cubic-bezier(${Q.EASE.join(`,`)})`}),X(N.current,{transition:`opacity ${Q.DURATION}s cubic-bezier(${Q.EASE.join(`,`)})`,opacity:`1`}),o&&t&&t>0&&A&&X(e,{borderRadius:`${At}px`,overflow:`hidden`,...Z(x)?{transform:`scale(${G()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${G()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${Q.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Q.EASE.join(`,`)})`},!0)}function be(){!M||!B.current||(B.current.classList.remove(Nt),L.current=!1,ne(!1),ae.current=new Date)}function xe(e){if(!M||!B.current)return;B.current.classList.remove(Nt),L.current=!1,ne(!1),ae.current=new Date;let t=wt(B.current,x);if(!e||!K(e.target,!1)||!t||Number.isNaN(t)||F.current===null)return;let n=ae.current.getTime()-F.current.getTime(),r=R.current-(Z(x)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(ie(!0),setTimeout(()=>{ie(!1)},200)),a){H({draggedDistance:r*(x===`bottom`||x===`right`?1:-1),closeDrawer:q,velocity:o,dismissible:d}),i?.(e,!0);return}if(x===`bottom`||x===`right`?r>0:r<0){ye(),i?.(e,!0);return}if(o>Dt){q(),i?.(e,!1);return}let s=Math.min(B.current.getBoundingClientRect().height??0,window.innerHeight),c=Math.min(B.current.getBoundingClientRect().width??0,window.innerWidth);if(Math.abs(t)>=(x===`left`||x===`right`?c:s)*l){q(),i?.(e,!1);return}i?.(e,!0),ye()}c.default.useEffect(()=>(A&&(X(document.documentElement,{scrollBehavior:`auto`}),P.current=new Date),()=>{Ct(document.documentElement,`scrollBehavior`)}),[A]);function Se(e){let t=e?(window.innerWidth-jt)/window.innerWidth:1,n=e?-16:0;oe.current&&window.clearTimeout(oe.current),X(B.current,{transition:`transform ${Q.DURATION}s cubic-bezier(${Q.EASE.join(`,`)})`,transform:Z(x)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&B.current&&(oe.current=setTimeout(()=>{let e=wt(B.current,x);X(B.current,{transition:`none`,transform:Z(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function Ce(e,t){if(t<0)return;let n=(window.innerWidth-jt)/window.innerWidth,r=n+t*(1-n),i=-16+t*jt;X(B.current,{transform:Z(x)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function J(e,t){let n=Z(x)?window.innerHeight:window.innerWidth,r=t?(n-jt)/n:1,i=t?-16:0;t&&X(B.current,{transition:`transform ${Q.DURATION}s cubic-bezier(${Q.EASE.join(`,`)})`,transform:Z(x)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`})}return c.default.useEffect(()=>{_||window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`})},[_]),c.default.createElement(Ve,{defaultOpen:S,onOpenChange:e=>{!d&&!e||(e?te(!0):q(!0),j(e))},open:A},c.default.createElement(Xe.Provider,{value:{activeSnapPoint:fe,snapPoints:a,setActiveSnapPoint:pe,drawerRef:B,overlayRef:N,onOpenChange:t,onPress:_e,onRelease:xe,onDrag:ve,dismissible:d,shouldAnimate:se,handleOnly:f,isOpen:A,isDragging:M,shouldFade:he,closeDrawer:q,onNestedDrag:Ce,onNestedOpenChange:Se,onNestedRelease:J,keyboardIsOpen:z,modal:_,snapPointsOffset:U,activeSnapPointIndex:V,direction:x,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:b,container:O,autoFocus:k}},n))}var Ht=c.default.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:o,modal:s,shouldAnimate:l}=Y(),u=xt(t,n),d=r&&r.length>0;if(!s)return null;let f=c.default.useCallback(e=>i(e),[i]);return c.default.createElement(We,{onMouseUp:f,ref:u,"data-vaul-overlay":``,"data-vaul-snap-points":o&&d?`true`:`false`,"data-vaul-snap-points-overlay":o&&a?`true`:`false`,"data-vaul-animate":l?.current?`true`:`false`,...e})});Ht.displayName=`Drawer.Overlay`;var Ut=c.default.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){let{drawerRef:a,onPress:o,onRelease:s,onDrag:l,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:f,modal:p,isOpen:m,direction:h,snapPoints:g,container:_,handleOnly:v,shouldAnimate:y,autoFocus:b}=Y(),[x,S]=c.default.useState(!1),C=xt(i,a),w=c.default.useRef(null),T=c.default.useRef(null),E=c.default.useRef(!1),D=g&&g.length>0;Rt();let O=(e,t,n=0)=>{if(E.current)return!0;let r=Math.abs(e.y),i=Math.abs(e.x),a=i>r,o=[`bottom`,`right`].includes(t)?1:-1;if(t===`left`||t===`right`){if(!(e.x*o<0)&&i>=0&&i<=n)return a}else if(!(e.y*o<0)&&r>=0&&r<=n)return!a;return E.current=!0,!0};c.default.useEffect(()=>{D&&window.requestAnimationFrame(()=>{S(!0)})},[]);function k(e){w.current=null,E.current=!1,s(e)}return c.default.createElement(Ge,{"data-vaul-drawer-direction":h,"data-vaul-drawer":``,"data-vaul-delayed-snap-points":x?`true`:`false`,"data-vaul-snap-points":m&&D?`true`:`false`,"data-vaul-custom-container":_?`true`:`false`,"data-vaul-animate":y?.current?`true`:`false`,...r,ref:C,style:d&&d.length>0?{"--snap-point-height":`${d[f??0]}px`,...t}:t,onPointerDown:e=>{v||(r.onPointerDown==null||r.onPointerDown.call(r,e),w.current={x:e.pageX,y:e.pageY},o(e))},onOpenAutoFocus:e=>{n?.(e),b||e.preventDefault()},onPointerDownOutside:t=>{if(e?.(t),!p||t.defaultPrevented){t.preventDefault();return}u.current&&=!1},onFocusOutside:e=>{if(!p){e.preventDefault();return}},onPointerMove:e=>{if(T.current=e,v||(r.onPointerMove==null||r.onPointerMove.call(r,e),!w.current))return;let t=e.pageY-w.current.y,n=e.pageX-w.current.x,i=e.pointerType===`touch`?10:2;O({x:n,y:t},h,i)?l(e):(Math.abs(n)>i||Math.abs(t)>i)&&(w.current=null)},onPointerUp:e=>{r.onPointerUp==null||r.onPointerUp.call(r,e),w.current=null,E.current=!1,s(e)},onPointerOut:e=>{r.onPointerOut==null||r.onPointerOut.call(r,e),k(T.current)},onContextMenu:e=>{r.onContextMenu==null||r.onContextMenu.call(r,e),T.current&&k(T.current)}})});Ut.displayName=`Drawer.Content`;var Wt=250,Gt=120,Kt=c.default.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:i,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:l,dismissible:u,handleOnly:d,isOpen:f,onPress:p,onDrag:m}=Y(),h=c.default.useRef(null),g=c.default.useRef(!1);function _(){if(g.current){b();return}window.setTimeout(()=>{v()},Gt)}function v(){if(a||e||g.current){b();return}if(b(),!o||o.length===0){u||i();return}if(s===o[o.length-1]&&u){i();return}let t=o.findIndex(e=>e===s);if(t===-1)return;let n=o[t+1];l(n)}function y(){h.current=window.setTimeout(()=>{g.current=!0},Wt)}function b(){h.current&&window.clearTimeout(h.current),g.current=!1}return c.default.createElement(`div`,{onClick:_,onPointerCancel:b,onPointerDown:e=>{d&&p(e),y()},onPointerMove:e=>{d&&m(e)},ref:r,"data-vaul-drawer-visible":f?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,...n},c.default.createElement(`span`,{"data-vaul-handle-hitarea":``,"aria-hidden":`true`},t))});Kt.displayName=`Drawer.Handle`;function qt({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:i,onNestedOpenChange:a,onNestedRelease:o}=Y();if(!i)throw Error(`Drawer.NestedRoot must be placed in another drawer`);return c.default.createElement(Vt,{nested:!0,open:n,onClose:()=>{a(!1)},onDrag:(t,n)=>{i(t,n),e?.(t,n)},onOpenChange:e=>{e&&a(e),t?.(e)},onRelease:o,...r})}function Jt(e){let t=Y(),{container:n=t.container,...r}=e;return c.default.createElement(Ue,{container:n,...r})}var $={Root:Vt,NestedRoot:qt,Content:Ut,Overlay:Ht,Trigger:He,Portal:Jt,Handle:Kt,Close:Je,Title:Ke,Description:qe};function Yt({...e}){return(0,l.jsx)($.Root,{"data-slot":`drawer`,...e})}function Xt({...e}){return(0,l.jsx)($.Trigger,{"data-slot":`drawer-trigger`,...e})}function Zt({...e}){return(0,l.jsx)($.Portal,{"data-slot":`drawer-portal`,...e})}function Qt({...e}){return(0,l.jsx)($.Close,{"data-slot":`drawer-close`,...e})}function $t({className:e,...t}){return(0,l.jsx)($.Overlay,{className:a.t(`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1000 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in`,e),"data-slot":`drawer-overlay`,...t})}function en({className:e,children:t,...n}){return(0,l.jsxs)(Zt,{"data-slot":`drawer-portal`,children:[(0,l.jsx)($t,{}),(0,l.jsx)($.Content,{className:a.t(`group/drawer-content fixed z-1000 flex h-auto flex-col bg-white`,`data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b`,`data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-0`,`data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm`,e),"data-slot":`drawer-content`,...n,children:t})]})}function tn({className:e,...t}){return(0,l.jsx)(`div`,{className:a.t(`flex flex-col gap-2 p-5`,e),"data-slot":`drawer-header`,...t})}function nn({className:e,...t}){return(0,l.jsx)(`div`,{className:a.t(`mt-auto flex flex-col gap-2 p-5`,e),"data-slot":`drawer-footer`,...t})}function rn({className:e,...t}){return(0,l.jsx)($.Title,{className:a.t(`font-semibold text-foreground`,e),"data-slot":`drawer-title`,...t})}function an({className:e,...t}){return(0,l.jsx)($.Description,{className:a.t(`text-muted-foreground text-sm`,e),"data-slot":`drawer-description`,...t})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return rn}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return en}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Xt}});
|
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { useState as t } from "react";
|
|
3
|
+
//#region node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
4
|
+
var n = 0, r = null;
|
|
5
|
+
function i() {
|
|
6
|
+
e.useEffect(() => {
|
|
7
|
+
r ||= {
|
|
8
|
+
start: a(),
|
|
9
|
+
end: a()
|
|
10
|
+
};
|
|
11
|
+
let { start: e, end: t } = r;
|
|
12
|
+
return document.body.firstElementChild !== e && document.body.insertAdjacentElement("afterbegin", e), document.body.lastElementChild !== t && document.body.insertAdjacentElement("beforeend", t), n++, () => {
|
|
13
|
+
n === 1 && (r?.start.remove(), r?.end.remove(), r = null), n = Math.max(0, n - 1);
|
|
14
|
+
};
|
|
15
|
+
}, []);
|
|
16
|
+
}
|
|
17
|
+
function a() {
|
|
18
|
+
let e = document.createElement("span");
|
|
19
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region node_modules/tslib/tslib.es6.mjs
|
|
23
|
+
var o = function() {
|
|
24
|
+
return o = Object.assign || function(e) {
|
|
25
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
26
|
+
return e;
|
|
27
|
+
}, o.apply(this, arguments);
|
|
28
|
+
};
|
|
29
|
+
function s(e, t) {
|
|
30
|
+
var n = {};
|
|
31
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
32
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
33
|
+
return n;
|
|
34
|
+
}
|
|
35
|
+
function c(e, t, n) {
|
|
36
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
37
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
41
|
+
var l = "right-scroll-bar-position", u = "width-before-scroll-bar", d = "with-scroll-bars-hidden", f = "--removed-body-scroll-bar-size";
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
44
|
+
function p(e, t) {
|
|
45
|
+
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
49
|
+
function m(e, n) {
|
|
50
|
+
var r = t(function() {
|
|
51
|
+
return {
|
|
52
|
+
value: e,
|
|
53
|
+
callback: n,
|
|
54
|
+
facade: {
|
|
55
|
+
get current() {
|
|
56
|
+
return r.value;
|
|
57
|
+
},
|
|
58
|
+
set current(e) {
|
|
59
|
+
var t = r.value;
|
|
60
|
+
t !== e && (r.value = e, r.callback(e, t));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
})[0];
|
|
65
|
+
return r.callback = n, r.facade;
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
69
|
+
var h = typeof window < "u" ? e.useLayoutEffect : e.useEffect, g = /* @__PURE__ */ new WeakMap();
|
|
70
|
+
function ee(e, t) {
|
|
71
|
+
var n = m(t || null, function(t) {
|
|
72
|
+
return e.forEach(function(e) {
|
|
73
|
+
return p(e, t);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
return h(function() {
|
|
77
|
+
var t = g.get(n);
|
|
78
|
+
if (t) {
|
|
79
|
+
var r = new Set(t), i = new Set(e), a = n.current;
|
|
80
|
+
r.forEach(function(e) {
|
|
81
|
+
i.has(e) || p(e, null);
|
|
82
|
+
}), i.forEach(function(e) {
|
|
83
|
+
r.has(e) || p(e, a);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
g.set(n, e);
|
|
87
|
+
}, [e]), n;
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region node_modules/use-sidecar/dist/es2015/medium.js
|
|
91
|
+
function _(e) {
|
|
92
|
+
return e;
|
|
93
|
+
}
|
|
94
|
+
function v(e, t) {
|
|
95
|
+
t === void 0 && (t = _);
|
|
96
|
+
var n = [], r = !1;
|
|
97
|
+
return {
|
|
98
|
+
read: function() {
|
|
99
|
+
if (r) throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
100
|
+
return n.length ? n[n.length - 1] : e;
|
|
101
|
+
},
|
|
102
|
+
useMedium: function(e) {
|
|
103
|
+
var i = t(e, r);
|
|
104
|
+
return n.push(i), function() {
|
|
105
|
+
n = n.filter(function(e) {
|
|
106
|
+
return e !== i;
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
assignSyncMedium: function(e) {
|
|
111
|
+
for (r = !0; n.length;) {
|
|
112
|
+
var t = n;
|
|
113
|
+
n = [], t.forEach(e);
|
|
114
|
+
}
|
|
115
|
+
n = {
|
|
116
|
+
push: function(t) {
|
|
117
|
+
return e(t);
|
|
118
|
+
},
|
|
119
|
+
filter: function() {
|
|
120
|
+
return n;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
assignMedium: function(e) {
|
|
125
|
+
r = !0;
|
|
126
|
+
var t = [];
|
|
127
|
+
if (n.length) {
|
|
128
|
+
var i = n;
|
|
129
|
+
n = [], i.forEach(e), t = n;
|
|
130
|
+
}
|
|
131
|
+
var a = function() {
|
|
132
|
+
var n = t;
|
|
133
|
+
t = [], n.forEach(e);
|
|
134
|
+
}, o = function() {
|
|
135
|
+
return Promise.resolve().then(a);
|
|
136
|
+
};
|
|
137
|
+
o(), n = {
|
|
138
|
+
push: function(e) {
|
|
139
|
+
t.push(e), o();
|
|
140
|
+
},
|
|
141
|
+
filter: function(e) {
|
|
142
|
+
return t = t.filter(e), n;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function y(e) {
|
|
149
|
+
e === void 0 && (e = {});
|
|
150
|
+
var t = v(null);
|
|
151
|
+
return t.options = o({
|
|
152
|
+
async: !0,
|
|
153
|
+
ssr: !1
|
|
154
|
+
}, e), t;
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region node_modules/use-sidecar/dist/es2015/exports.js
|
|
158
|
+
var b = function(t) {
|
|
159
|
+
var n = t.sideCar, r = s(t, ["sideCar"]);
|
|
160
|
+
if (!n) throw Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
161
|
+
var i = n.read();
|
|
162
|
+
if (!i) throw Error("Sidecar medium not found");
|
|
163
|
+
return e.createElement(i, o({}, r));
|
|
164
|
+
};
|
|
165
|
+
b.isSideCarExport = !0;
|
|
166
|
+
function x(e, t) {
|
|
167
|
+
return e.useMedium(t), b;
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
171
|
+
var S = y(), C = function() {}, w = e.forwardRef(function(t, n) {
|
|
172
|
+
var r = e.useRef(null), i = e.useState({
|
|
173
|
+
onScrollCapture: C,
|
|
174
|
+
onWheelCapture: C,
|
|
175
|
+
onTouchMoveCapture: C
|
|
176
|
+
}), a = i[0], c = i[1], l = t.forwardProps, u = t.children, d = t.className, f = t.removeScrollBar, p = t.enabled, m = t.shards, h = t.sideCar, g = t.noRelative, _ = t.noIsolation, v = t.inert, y = t.allowPinchZoom, b = t.as, x = b === void 0 ? "div" : b, w = t.gapMode, T = s(t, [
|
|
177
|
+
"forwardProps",
|
|
178
|
+
"children",
|
|
179
|
+
"className",
|
|
180
|
+
"removeScrollBar",
|
|
181
|
+
"enabled",
|
|
182
|
+
"shards",
|
|
183
|
+
"sideCar",
|
|
184
|
+
"noRelative",
|
|
185
|
+
"noIsolation",
|
|
186
|
+
"inert",
|
|
187
|
+
"allowPinchZoom",
|
|
188
|
+
"as",
|
|
189
|
+
"gapMode"
|
|
190
|
+
]), E = h, D = ee([r, n]), O = o(o({}, T), a);
|
|
191
|
+
return e.createElement(e.Fragment, null, p && e.createElement(E, {
|
|
192
|
+
sideCar: S,
|
|
193
|
+
removeScrollBar: f,
|
|
194
|
+
shards: m,
|
|
195
|
+
noRelative: g,
|
|
196
|
+
noIsolation: _,
|
|
197
|
+
inert: v,
|
|
198
|
+
setCallbacks: c,
|
|
199
|
+
allowPinchZoom: !!y,
|
|
200
|
+
lockRef: r,
|
|
201
|
+
gapMode: w
|
|
202
|
+
}), l ? e.cloneElement(e.Children.only(u), o(o({}, O), { ref: D })) : e.createElement(x, o({}, O, {
|
|
203
|
+
className: d,
|
|
204
|
+
ref: D
|
|
205
|
+
}), u));
|
|
206
|
+
});
|
|
207
|
+
w.defaultProps = {
|
|
208
|
+
enabled: !0,
|
|
209
|
+
removeScrollBar: !0,
|
|
210
|
+
inert: !1
|
|
211
|
+
}, w.classNames = {
|
|
212
|
+
fullWidth: u,
|
|
213
|
+
zeroRight: l
|
|
214
|
+
};
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region node_modules/get-nonce/dist/es2015/index.js
|
|
217
|
+
var T, E = function() {
|
|
218
|
+
if (T) return T;
|
|
219
|
+
if (typeof __webpack_nonce__ < "u") return __webpack_nonce__;
|
|
220
|
+
};
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
223
|
+
function D() {
|
|
224
|
+
if (!document) return null;
|
|
225
|
+
var e = document.createElement("style");
|
|
226
|
+
e.type = "text/css";
|
|
227
|
+
var t = E();
|
|
228
|
+
return t && e.setAttribute("nonce", t), e;
|
|
229
|
+
}
|
|
230
|
+
function O(e, t) {
|
|
231
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
232
|
+
}
|
|
233
|
+
function te(e) {
|
|
234
|
+
(document.head || document.getElementsByTagName("head")[0]).appendChild(e);
|
|
235
|
+
}
|
|
236
|
+
var ne = function() {
|
|
237
|
+
var e = 0, t = null;
|
|
238
|
+
return {
|
|
239
|
+
add: function(n) {
|
|
240
|
+
e == 0 && (t = D()) && (O(t, n), te(t)), e++;
|
|
241
|
+
},
|
|
242
|
+
remove: function() {
|
|
243
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
}, re = function() {
|
|
247
|
+
var t = ne();
|
|
248
|
+
return function(n, r) {
|
|
249
|
+
e.useEffect(function() {
|
|
250
|
+
return t.add(n), function() {
|
|
251
|
+
t.remove();
|
|
252
|
+
};
|
|
253
|
+
}, [n && r]);
|
|
254
|
+
};
|
|
255
|
+
}, k = function() {
|
|
256
|
+
var e = re();
|
|
257
|
+
return function(t) {
|
|
258
|
+
var n = t.styles, r = t.dynamic;
|
|
259
|
+
return e(n, r), null;
|
|
260
|
+
};
|
|
261
|
+
}, ie = {
|
|
262
|
+
left: 0,
|
|
263
|
+
top: 0,
|
|
264
|
+
right: 0,
|
|
265
|
+
gap: 0
|
|
266
|
+
}, A = function(e) {
|
|
267
|
+
return parseInt(e || "", 10) || 0;
|
|
268
|
+
}, ae = function(e) {
|
|
269
|
+
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], i = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
270
|
+
return [
|
|
271
|
+
A(n),
|
|
272
|
+
A(r),
|
|
273
|
+
A(i)
|
|
274
|
+
];
|
|
275
|
+
}, j = function(e) {
|
|
276
|
+
if (e === void 0 && (e = "margin"), typeof window > "u") return ie;
|
|
277
|
+
var t = ae(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
278
|
+
return {
|
|
279
|
+
left: t[0],
|
|
280
|
+
top: t[1],
|
|
281
|
+
right: t[2],
|
|
282
|
+
gap: Math.max(0, r - n + t[2] - t[0])
|
|
283
|
+
};
|
|
284
|
+
}, oe = k(), M = "data-scroll-locked", se = function(e, t, n, r) {
|
|
285
|
+
var i = e.left, a = e.top, o = e.right, s = e.gap;
|
|
286
|
+
return n === void 0 && (n = "margin"), `
|
|
287
|
+
.${d} {
|
|
288
|
+
overflow: hidden ${r};
|
|
289
|
+
padding-right: ${s}px ${r};
|
|
290
|
+
}
|
|
291
|
+
body[${M}] {
|
|
292
|
+
overflow: hidden ${r};
|
|
293
|
+
overscroll-behavior: contain;
|
|
294
|
+
${[
|
|
295
|
+
t && `position: relative ${r};`,
|
|
296
|
+
n === "margin" && `
|
|
297
|
+
padding-left: ${i}px;
|
|
298
|
+
padding-top: ${a}px;
|
|
299
|
+
padding-right: ${o}px;
|
|
300
|
+
margin-left:0;
|
|
301
|
+
margin-top:0;
|
|
302
|
+
margin-right: ${s}px ${r};
|
|
303
|
+
`,
|
|
304
|
+
n === "padding" && `padding-right: ${s}px ${r};`
|
|
305
|
+
].filter(Boolean).join("")}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.${l} {
|
|
309
|
+
right: ${s}px ${r};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.${u} {
|
|
313
|
+
margin-right: ${s}px ${r};
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.${l} .${l} {
|
|
317
|
+
right: 0 ${r};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.${u} .${u} {
|
|
321
|
+
margin-right: 0 ${r};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
body[${M}] {
|
|
325
|
+
${f}: ${s}px;
|
|
326
|
+
}
|
|
327
|
+
`;
|
|
328
|
+
}, N = function() {
|
|
329
|
+
var e = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
|
|
330
|
+
return isFinite(e) ? e : 0;
|
|
331
|
+
}, ce = function() {
|
|
332
|
+
e.useEffect(function() {
|
|
333
|
+
return document.body.setAttribute(M, (N() + 1).toString()), function() {
|
|
334
|
+
var e = N() - 1;
|
|
335
|
+
e <= 0 ? document.body.removeAttribute(M) : document.body.setAttribute(M, e.toString());
|
|
336
|
+
};
|
|
337
|
+
}, []);
|
|
338
|
+
}, le = function(t) {
|
|
339
|
+
var n = t.noRelative, r = t.noImportant, i = t.gapMode, a = i === void 0 ? "margin" : i;
|
|
340
|
+
ce();
|
|
341
|
+
var o = e.useMemo(function() {
|
|
342
|
+
return j(a);
|
|
343
|
+
}, [a]);
|
|
344
|
+
return e.createElement(oe, { styles: se(o, !n, a, r ? "" : "!important") });
|
|
345
|
+
}, P = !1;
|
|
346
|
+
if (typeof window < "u") try {
|
|
347
|
+
var F = Object.defineProperty({}, "passive", { get: function() {
|
|
348
|
+
return P = !0, !0;
|
|
349
|
+
} });
|
|
350
|
+
window.addEventListener("test", F, F), window.removeEventListener("test", F, F);
|
|
351
|
+
} catch {
|
|
352
|
+
P = !1;
|
|
353
|
+
}
|
|
354
|
+
var I = P ? { passive: !1 } : !1, ue = function(e) {
|
|
355
|
+
return e.tagName === "TEXTAREA";
|
|
356
|
+
}, L = function(e, t) {
|
|
357
|
+
if (!(e instanceof Element)) return !1;
|
|
358
|
+
var n = window.getComputedStyle(e);
|
|
359
|
+
return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !ue(e) && n[t] === "visible");
|
|
360
|
+
}, de = function(e) {
|
|
361
|
+
return L(e, "overflowY");
|
|
362
|
+
}, fe = function(e) {
|
|
363
|
+
return L(e, "overflowX");
|
|
364
|
+
}, R = function(e, t) {
|
|
365
|
+
var n = t.ownerDocument, r = t;
|
|
366
|
+
do {
|
|
367
|
+
if (typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host), V(e, r)) {
|
|
368
|
+
var i = H(e, r);
|
|
369
|
+
if (i[1] > i[2]) return !0;
|
|
370
|
+
}
|
|
371
|
+
r = r.parentNode;
|
|
372
|
+
} while (r && r !== n.body);
|
|
373
|
+
return !1;
|
|
374
|
+
}, z = function(e) {
|
|
375
|
+
return [
|
|
376
|
+
e.scrollTop,
|
|
377
|
+
e.scrollHeight,
|
|
378
|
+
e.clientHeight
|
|
379
|
+
];
|
|
380
|
+
}, B = function(e) {
|
|
381
|
+
return [
|
|
382
|
+
e.scrollLeft,
|
|
383
|
+
e.scrollWidth,
|
|
384
|
+
e.clientWidth
|
|
385
|
+
];
|
|
386
|
+
}, V = function(e, t) {
|
|
387
|
+
return e === "v" ? de(t) : fe(t);
|
|
388
|
+
}, H = function(e, t) {
|
|
389
|
+
return e === "v" ? z(t) : B(t);
|
|
390
|
+
}, pe = function(e, t) {
|
|
391
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
392
|
+
}, me = function(e, t, n, r, i) {
|
|
393
|
+
var a = pe(e, window.getComputedStyle(t).direction), o = a * r, s = n.target, c = t.contains(s), l = !1, u = o > 0, d = 0, f = 0;
|
|
394
|
+
do {
|
|
395
|
+
if (!s) break;
|
|
396
|
+
var p = H(e, s), m = p[0], h = p[1] - p[2] - a * m;
|
|
397
|
+
(m || h) && V(e, s) && (d += h, f += m);
|
|
398
|
+
var g = s.parentNode;
|
|
399
|
+
s = g && g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? g.host : g;
|
|
400
|
+
} while (!c && s !== document.body || c && (t.contains(s) || t === s));
|
|
401
|
+
return (u && (i && Math.abs(d) < 1 || !i && o > d) || !u && (i && Math.abs(f) < 1 || !i && -o > f)) && (l = !0), l;
|
|
402
|
+
}, U = function(e) {
|
|
403
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
404
|
+
}, W = function(e) {
|
|
405
|
+
return [e.deltaX, e.deltaY];
|
|
406
|
+
}, G = function(e) {
|
|
407
|
+
return e && "current" in e ? e.current : e;
|
|
408
|
+
}, he = function(e, t) {
|
|
409
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
410
|
+
}, ge = function(e) {
|
|
411
|
+
return `
|
|
412
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
413
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
414
|
+
`;
|
|
415
|
+
}, _e = 0, K = [];
|
|
416
|
+
function ve(t) {
|
|
417
|
+
var n = e.useRef([]), r = e.useRef([0, 0]), i = e.useRef(), a = e.useState(_e++)[0], o = e.useState(k)[0], s = e.useRef(t);
|
|
418
|
+
e.useEffect(function() {
|
|
419
|
+
s.current = t;
|
|
420
|
+
}, [t]), e.useEffect(function() {
|
|
421
|
+
if (t.inert) {
|
|
422
|
+
document.body.classList.add(`block-interactivity-${a}`);
|
|
423
|
+
var e = c([t.lockRef.current], (t.shards || []).map(G), !0).filter(Boolean);
|
|
424
|
+
return e.forEach(function(e) {
|
|
425
|
+
return e.classList.add(`allow-interactivity-${a}`);
|
|
426
|
+
}), function() {
|
|
427
|
+
document.body.classList.remove(`block-interactivity-${a}`), e.forEach(function(e) {
|
|
428
|
+
return e.classList.remove(`allow-interactivity-${a}`);
|
|
429
|
+
});
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
}, [
|
|
433
|
+
t.inert,
|
|
434
|
+
t.lockRef.current,
|
|
435
|
+
t.shards
|
|
436
|
+
]);
|
|
437
|
+
var l = e.useCallback(function(e, t) {
|
|
438
|
+
if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey) return !s.current.allowPinchZoom;
|
|
439
|
+
var n = U(e), a = r.current, o = "deltaX" in e ? e.deltaX : a[0] - n[0], c = "deltaY" in e ? e.deltaY : a[1] - n[1], l, u = e.target, d = Math.abs(o) > Math.abs(c) ? "h" : "v";
|
|
440
|
+
if ("touches" in e && d === "h" && u.type === "range") return !1;
|
|
441
|
+
var f = window.getSelection(), p = f && f.anchorNode;
|
|
442
|
+
if (p && (p === u || p.contains(u))) return !1;
|
|
443
|
+
var m = R(d, u);
|
|
444
|
+
if (!m) return !0;
|
|
445
|
+
if (m ? l = d : (l = d === "v" ? "h" : "v", m = R(d, u)), !m) return !1;
|
|
446
|
+
if (!i.current && "changedTouches" in e && (o || c) && (i.current = l), !l) return !0;
|
|
447
|
+
var h = i.current || l;
|
|
448
|
+
return me(h, t, e, h === "h" ? o : c, !0);
|
|
449
|
+
}, []), u = e.useCallback(function(e) {
|
|
450
|
+
var t = e;
|
|
451
|
+
if (!(!K.length || K[K.length - 1] !== o)) {
|
|
452
|
+
var r = "deltaY" in t ? W(t) : U(t), i = n.current.filter(function(e) {
|
|
453
|
+
return e.name === t.type && (e.target === t.target || t.target === e.shadowParent) && he(e.delta, r);
|
|
454
|
+
})[0];
|
|
455
|
+
if (i && i.should) {
|
|
456
|
+
t.cancelable && t.preventDefault();
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
if (!i) {
|
|
460
|
+
var a = (s.current.shards || []).map(G).filter(Boolean).filter(function(e) {
|
|
461
|
+
return e.contains(t.target);
|
|
462
|
+
});
|
|
463
|
+
(a.length > 0 ? l(t, a[0]) : !s.current.noIsolation) && t.cancelable && t.preventDefault();
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}, []), d = e.useCallback(function(e, t, r, i) {
|
|
467
|
+
var a = {
|
|
468
|
+
name: e,
|
|
469
|
+
delta: t,
|
|
470
|
+
target: r,
|
|
471
|
+
should: i,
|
|
472
|
+
shadowParent: ye(r)
|
|
473
|
+
};
|
|
474
|
+
n.current.push(a), setTimeout(function() {
|
|
475
|
+
n.current = n.current.filter(function(e) {
|
|
476
|
+
return e !== a;
|
|
477
|
+
});
|
|
478
|
+
}, 1);
|
|
479
|
+
}, []), f = e.useCallback(function(e) {
|
|
480
|
+
r.current = U(e), i.current = void 0;
|
|
481
|
+
}, []), p = e.useCallback(function(e) {
|
|
482
|
+
d(e.type, W(e), e.target, l(e, t.lockRef.current));
|
|
483
|
+
}, []), m = e.useCallback(function(e) {
|
|
484
|
+
d(e.type, U(e), e.target, l(e, t.lockRef.current));
|
|
485
|
+
}, []);
|
|
486
|
+
e.useEffect(function() {
|
|
487
|
+
return K.push(o), t.setCallbacks({
|
|
488
|
+
onScrollCapture: p,
|
|
489
|
+
onWheelCapture: p,
|
|
490
|
+
onTouchMoveCapture: m
|
|
491
|
+
}), document.addEventListener("wheel", u, I), document.addEventListener("touchmove", u, I), document.addEventListener("touchstart", f, I), function() {
|
|
492
|
+
K = K.filter(function(e) {
|
|
493
|
+
return e !== o;
|
|
494
|
+
}), document.removeEventListener("wheel", u, I), document.removeEventListener("touchmove", u, I), document.removeEventListener("touchstart", f, I);
|
|
495
|
+
};
|
|
496
|
+
}, []);
|
|
497
|
+
var h = t.removeScrollBar, g = t.inert;
|
|
498
|
+
return e.createElement(e.Fragment, null, g ? e.createElement(o, { styles: ge(a) }) : null, h ? e.createElement(le, {
|
|
499
|
+
noRelative: t.noRelative,
|
|
500
|
+
gapMode: t.gapMode
|
|
501
|
+
}) : null);
|
|
502
|
+
}
|
|
503
|
+
function ye(e) {
|
|
504
|
+
for (var t = null; e !== null;) e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
505
|
+
return t;
|
|
506
|
+
}
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
509
|
+
var q = x(S, ve), J = e.forwardRef(function(t, n) {
|
|
510
|
+
return e.createElement(w, o({}, t, {
|
|
511
|
+
ref: n,
|
|
512
|
+
sideCar: q
|
|
513
|
+
}));
|
|
514
|
+
});
|
|
515
|
+
J.classNames = w.classNames;
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region node_modules/aria-hidden/dist/es2015/index.js
|
|
518
|
+
var be = function(e) {
|
|
519
|
+
return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
|
|
520
|
+
}, Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Z = {}, Q = 0, $ = function(e) {
|
|
521
|
+
return e && (e.host || $(e.parentNode));
|
|
522
|
+
}, xe = function(e, t) {
|
|
523
|
+
return t.map(function(t) {
|
|
524
|
+
if (e.contains(t)) return t;
|
|
525
|
+
var n = $(t);
|
|
526
|
+
return n && e.contains(n) ? n : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
527
|
+
}).filter(function(e) {
|
|
528
|
+
return !!e;
|
|
529
|
+
});
|
|
530
|
+
}, Se = function(e, t, n, r) {
|
|
531
|
+
var i = xe(t, Array.isArray(e) ? e : [e]);
|
|
532
|
+
Z[n] || (Z[n] = /* @__PURE__ */ new WeakMap());
|
|
533
|
+
var a = Z[n], o = [], s = /* @__PURE__ */ new Set(), c = new Set(i), l = function(e) {
|
|
534
|
+
!e || s.has(e) || (s.add(e), l(e.parentNode));
|
|
535
|
+
};
|
|
536
|
+
i.forEach(l);
|
|
537
|
+
var u = function(e) {
|
|
538
|
+
!e || c.has(e) || Array.prototype.forEach.call(e.children, function(e) {
|
|
539
|
+
if (s.has(e)) u(e);
|
|
540
|
+
else try {
|
|
541
|
+
var t = e.getAttribute(r), i = t !== null && t !== "false", c = (Y.get(e) || 0) + 1, l = (a.get(e) || 0) + 1;
|
|
542
|
+
Y.set(e, c), a.set(e, l), o.push(e), c === 1 && i && X.set(e, !0), l === 1 && e.setAttribute(n, "true"), i || e.setAttribute(r, "true");
|
|
543
|
+
} catch (t) {
|
|
544
|
+
console.error("aria-hidden: cannot operate on ", e, t);
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
};
|
|
548
|
+
return u(t), s.clear(), Q++, function() {
|
|
549
|
+
o.forEach(function(e) {
|
|
550
|
+
var t = Y.get(e) - 1, i = a.get(e) - 1;
|
|
551
|
+
Y.set(e, t), a.set(e, i), t || (X.has(e) || e.removeAttribute(r), X.delete(e)), i || e.removeAttribute(n);
|
|
552
|
+
}), Q--, Q || (Y = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Z = {});
|
|
553
|
+
};
|
|
554
|
+
}, Ce = function(e, t, n) {
|
|
555
|
+
n === void 0 && (n = "data-aria-hidden");
|
|
556
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), i = t || be(e);
|
|
557
|
+
return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))), Se(r, i, n, "aria-hidden")) : function() {
|
|
558
|
+
return null;
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
//#endregion
|
|
562
|
+
export { J as n, i as r, Ce as t };
|