@surdeddd/bottom-sheet 0.9.0 → 0.10.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/README.md +108 -66
- package/dist/{BottomSheetEngine-CBRcBwV-.d.ts → BottomSheetEngine-DRjCU73e.d.ts} +6 -5
- package/dist/{BottomSheetEngine-BcyruNP1.d.cts → BottomSheetEngine-DzsIwD28.d.cts} +6 -5
- package/dist/element.cjs +161 -99
- package/dist/element.d.cts +1 -1
- package/dist/element.d.ts +1 -1
- package/dist/element.iife.global.js +2 -2
- package/dist/element.js +161 -99
- package/dist/index.cjs +155 -115
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +155 -115
- package/dist/integrations/formik.d.cts +1 -1
- package/dist/integrations/formik.d.ts +1 -1
- package/dist/integrations/react-hook-form.d.cts +1 -1
- package/dist/integrations/react-hook-form.d.ts +1 -1
- package/dist/overlay.cjs +34 -25
- package/dist/overlay.d.cts +3 -0
- package/dist/overlay.d.ts +3 -0
- package/dist/overlay.js +34 -25
- package/dist/preact.d.cts +2 -1
- package/dist/preact.d.ts +2 -1
- package/dist/qwik.cjs +179 -93
- package/dist/qwik.d.cts +11 -2
- package/dist/qwik.d.ts +11 -2
- package/dist/qwik.js +179 -93
- package/dist/react.cjs +266 -181
- package/dist/react.d.cts +26 -4
- package/dist/react.d.ts +26 -4
- package/dist/react.js +266 -181
- package/dist/solid.cjs +145 -92
- package/dist/solid.d.cts +14 -4
- package/dist/solid.d.ts +14 -4
- package/dist/solid.js +145 -92
- package/dist/solid.source.jsx +145 -92
- package/dist/styles.css +17 -1
- package/dist/svelte-core.cjs +128 -90
- package/dist/svelte-core.js +128 -90
- package/dist/svelte-src/BottomSheet.svelte +6 -0
- package/dist/svelte.cjs +130 -90
- package/dist/svelte.d.cts +2 -0
- package/dist/svelte.d.ts +2 -0
- package/dist/svelte.js +130 -90
- package/dist/teleport-7uYNiEAT.d.cts +3 -0
- package/dist/teleport-7uYNiEAT.d.ts +3 -0
- package/dist/vue.cjs +136 -91
- package/dist/vue.d.cts +3 -1
- package/dist/vue.d.ts +3 -1
- package/dist/vue.js +136 -91
- package/package.json +6 -6
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var surdeddd_bottomSheet=(()=>{var $=Object.defineProperty;var zi=Object.getOwnPropertyDescriptor;var ki=Object.getOwnPropertyNames;var Ri=Object.prototype.hasOwnProperty;var Di=(i,e,t)=>e in i?$(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var m=(i,e)=>()=>(i&&(e=i(i=0)),e);var Ve=(i,e)=>{for(var t in e)$(i,t,{get:e[t],enumerable:!0})},Ii=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ki(e))!Ri.call(i,s)&&s!==t&&$(i,s,{get:()=>e[s],enumerable:!(n=zi(e,s))||n.enumerable});return i};var Oi=i=>Ii($({},"__esModule",{value:!0}),i);var o=(i,e,t)=>Di(i,typeof e!="symbol"?e+"":e,t);var ce,A,Ue=m(()=>{"use strict";ce=class{constructor(){o(this,"entries",[])}push(e){return this.entries.push(e),this.recompute(),()=>this.remove(e.id)}remove(e){let t=this.entries.findIndex(n=>n.id===e);t!==-1&&(this.entries.splice(t,1),this.recompute())}promote(e){let t=this.entries.findIndex(n=>n.id===e);if(t!==-1){if(t!==this.entries.length-1){let[n]=this.entries.splice(t,1);this.entries.push(n)}this.recompute()}}update(){this.recompute()}size(){return this.entries.length}depthOf(e){let t=[];for(let s of this.entries)(!s.isOpen||s.isOpen())&&t.push(s);let n=t.findIndex(s=>s.id===e);return n===-1?0:t.length-1-n}clear(){this.entries=[]}recompute(){let e=null,t=[];for(let n of this.entries)(!n.isOpen||n.isOpen())&&(e=n,t.push(n));!e&&this.entries.length>0&&(e=this.entries[this.entries.length-1]),this.entries.forEach((n,s)=>{if(n.setZIndex(100+s*10),n.setIsTop(n===e),n.setDepth){let r=t.indexOf(n);n.setDepth(r===-1?0:t.length-1-r)}})}},A=new ce});function We(i){switch(i){case"bottom":return e=>`translate3d(0, ${e}px, 0)`;case"top":return e=>`translate3d(0, ${-e}px, 0)`;case"left":return e=>`translate3d(${-e}px, 0, 0)`;case"right":return e=>`translate3d(${e}px, 0, 0)`}}var I,he=m(()=>{"use strict";I=i=>i==="left"||i==="right"?"width":"height"});function ue(i){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${i}-${crypto.randomUUID()}`:(pe[i]=(pe[i]??0)+1,`${i}-${pe[i]}`)}var pe,Ye=m(()=>{"use strict";pe={}});function $e(){let i=new Map;return{on(e,t){let n=i.get(e);return n||(n=new Set,i.set(e,n)),n.add(t),()=>{n.delete(t)}},emit(e,t){let n=i.get(e);if(n)for(let s of[...n])s(t)},listenerCount(e){return i.get(e)?.size??0},clear(){i.clear()}}}var qe=m(()=>{"use strict"});var y,Ge,Li,Xe,Ze,Pi,q,je=m(()=>{"use strict";y=null,Ge="data-bs-probe",Li=i=>{if(typeof document>"u")return null;if(!y||!y.isConnected){let e=document.querySelector(`[${Ge}]`);e?y=e:(y=document.createElement("div"),y.setAttribute("aria-hidden","true"),y.setAttribute(Ge,""),y.style.cssText="position:absolute;visibility:hidden;pointer-events:none;contain:strict;left:0;top:0;width:0;height:0;",document.body.appendChild(y))}return i==="vertical"?(y.style.width="0",y.style.height=""):(y.style.height="0",y.style.width=""),y},Xe=i=>i==="bottom"||i==="top",Ze=i=>typeof window>"u"?0:Xe(i)?window.innerHeight:window.innerWidth,Pi=/^(-?\d+(?:\.\d+)?)%$/,q=(i,e,t)=>{if(typeof i=="number")return Math.max(0,i);if(i==="full")return Ze(e);if(i==="fit"||i==="content")return Math.max(0,t?.()??0);let n=i.match(Pi);if(n){let a=parseFloat(n[1])/100;return Math.max(0,Ze(e)*a)}let s=Xe(e)?"vertical":"horizontal",r=Li(s);return r?s==="vertical"?(r.style.height=i,Math.max(0,r.getBoundingClientRect().height)):(r.style.width=i,Math.max(0,r.getBoundingClientRect().width)):0}});var Qe,Hi,me,_i,Je,O,Bi,Fi,Ni,et,G=m(()=>{"use strict";je();Qe=(i,e,t)=>i.map(n=>{let s=q(n.size,e,t);return!Number.isFinite(s)||s<0?(console.warn(`[BottomSheet] snap "${n.id}" resolved to invalid size (${String(n.size)} \u2192 ${s}); clamped to 0.`),{id:n.id,size:0}):{id:n.id,size:s}}).sort((n,s)=>n.size-s.size),Hi=/(^|[^a-z])vh\b/i,me=i=>{for(let e of i)typeof e.size=="string"&&Hi.test(e.size)&&console.warn(`[BottomSheet] snap "${e.id}" uses "vh" \u2014 prefer "dvh" on mobile (iOS Safari URL bar makes vh unstable). See https://web.dev/blog/viewport-units`)},_i=(i,e,t,n=0,s=0)=>{let r=e.filter(d=>t.includes(d.id));if(r.length===0)return null;let a=i+n*s,l=r[0],h=Math.abs(a-l.size);for(let d=1;d<r.length;d++){let c=r[d],p=Math.abs(a-c.size);p<h&&(l=c,h=p)}return l},Je=(i,e)=>{let t=i.filter(n=>e.includes(n.id));return t.length===0?{min:0,max:0}:{min:t[0].size,max:t[t.length-1].size}},O=(i,e)=>e.find(t=>t.id===i)??null,Bi=.4,Fi=12,Ni=.15,et=i=>{let e=Math.abs(i.velocity),t=i.pointerKind==="mouse"?Bi:i.flickVelocity,n=i.pointerKind==="mouse"?Fi:i.dragThreshold,s=0;if((e>t||e>Ni)&&(s=i.velocity>0?1:-1),Math.abs(i.delta)<n&&s===0)return O(i.activeId,i.resolved);let r=e>t?Math.min(e*180,i.maxAxisSize):0;return _i(i.size,i.resolved,i.allowed,s,r)}});var Z,tt=m(()=>{"use strict";G();Z=class{constructor(e,t,n,s,r){o(this,"mode",n);o(this,"measureFit",s);o(this,"onMaxAxisSizeChange",r);o(this,"raw");o(this,"allowedIds");o(this,"resolved",[]);o(this,"maxAxisSize",0);o(this,"rangeCache",null);o(this,"notified",!1);this.raw=e,this.allowedIds=t??e.map(a=>a.id),this.recompute()}recompute(){let e=this.measureFit,t,n=e?()=>t??(t=e()):void 0;this.resolved=Qe(this.raw,this.mode,n);let s=this.resolved.reduce((a,l)=>l.size>a?l.size:a,0);this.rangeCache=null;let r=s!==this.maxAxisSize||!this.notified;this.maxAxisSize=s,this.notified=!0,r&&this.onMaxAxisSizeChange?.(this.maxAxisSize)}setRaw(e){this.raw=e,this.recompute()}setAllowedIds(e){this.allowedIds=e,this.rangeCache=null}findById(e){return O(e,this.resolved)}findDragSettleTarget(e){return et({...e,resolved:this.resolved,allowed:this.allowedIds,maxAxisSize:this.maxAxisSize})}getAllowedRange(){return this.rangeCache??(this.rangeCache=Je(this.resolved,this.allowedIds))}getResolvedSnaps(){return this.resolved}getAllowedIds(){return this.allowedIds}getMaxAxisSize(){return this.maxAxisSize}setMaxAxisSize(e){this.maxAxisSize=e,this.onMaxAxisSizeChange?.(e)}}});function it(i){if(!i||typeof window>"u"||typeof localStorage>"u")return null;try{return localStorage.getItem(i)}catch{return null}}function nt(i,e){return i.on("snap",({id:n})=>{if(!(typeof window>"u")&&!(typeof localStorage>"u"))try{localStorage.setItem(e,n)}catch{}})}var fe=m(()=>{"use strict"});function st(i){let{ms:e}=i;if(e===void 0||e<=0)return()=>{};let t=null,n=()=>{t!==null&&(clearTimeout(t),t=null)},s=()=>{if(i.isDestroyed()||i.isDragging())return;let l=i.resolveSnap(i.getActiveId());if(!l||l.size===0)return;let h=null;for(let d of i.getAllowedIds()){let c=i.resolveSnap(d);!c||c.size<=0||(!h||c.size<h.size)&&(h=c)}h&&(h.id===l.id||h.size>=l.size||i.snapTo(h.id))},r=()=>{n(),!i.isDestroyed()&&(t=setTimeout(()=>{t=null,s()},e))},a=i.on("snap",()=>r());return(i.resolveSnap(i.getActiveId())?.size??0)>0&&r(),()=>{n(),a()}}var rt=m(()=>{"use strict"});function ot(i,e){if(i.length!==0){for(let t of i)if(t!==e)try{if(t.state.size===0)continue;let s=t.getAllowedIds().find(r=>r!=="closed");s&&s!==t.state.activeId&&t.snapTo(s)}catch(n){queueMicrotask(()=>{throw n})}}}var at=m(()=>{"use strict"});function dt(i){if(typeof window>"u")return()=>{};if(!i.routedTo&&!i.closeOnBack)return()=>{};let e=!1,t=null,n=()=>{if(t){let d=T.indexOf(t);d!==-1&&T.splice(d,1)}let h=t?.consumed??!1;t=null,e&&!h?(e=!1,Vi()):e=!1},s=()=>{try{i.routedTo!==void 0?history.pushState({__bsRouted:i.sheetId},"",i.routedTo):history.pushState({__bsSheet:i.sheetId},""),e=!0}catch{e=!1}},r=()=>{if(t)return;let h={isOpen:()=>!i.isDestroyed()&&i.getSize()>0,isTop:()=>i.isTopSheet(),close:()=>i.close(),restore:()=>{i.isDestroyed()||t!==h||(h.consumed=!1,T.includes(h)||T.push(h),s())},consumed:!1};t=h,Ki(),T.push(h),s()},a=i.on("open",r),l=i.on("close",n);return i.getSize()>0&&r(),()=>{a(),l(),n()}}function ct(i){if(typeof window>"u"||typeof history>"u")return()=>{};let e=()=>{i.isDestroyed()||i.getSize()<=0||i.close()},t=r=>{let a=history[r],l=function(...h){a.apply(this,h),e()};return history[r]=l,()=>{history[r]===l&&(history[r]=a)}};window.addEventListener("popstate",e);let n=t("pushState"),s=t("replaceState");return()=>{window.removeEventListener("popstate",e),n(),s()}}var T,lt,L,Ki,Vi,ht=m(()=>{"use strict";T=[],lt=!1,L=0,Ki=()=>{lt||typeof window>"u"||(lt=!0,window.addEventListener("popstate",()=>{if(L>0){L-=1;return}let i=null;for(let n=T.length-1;n>=0;n-=1){let s=T[n];if(s.isOpen()&&(i||(i=s),s.isTop())){i=s;break}}if(!i)return;i.consumed=!0;let e=T.indexOf(i);e!==-1&&T.splice(e,1);let t=i;Promise.resolve(t.close()).then(()=>{t.isOpen()&&t.restore()})}))},Vi=()=>{L+=1;try{history.back()}catch{L=Math.max(0,L-1)}}});function pt(i){let{container:e}=i,t=0,n=0,s=!1,r=h=>{let d=h.touches[0];d&&(t=d.clientY,n=e.scrollTop,s=!1)},a=h=>{let d=h.touches[0];d&&Math.abs(d.clientY-t)>60&&(s=!0)},l=h=>{if(!s||i.isDragging()||i.isAnimating()||e.scrollTop!==n)return;let d=h.changedTouches[0];if(!d)return;let c=d.clientY-t,p=e.scrollTop<=0,u=i.getAllowedIds(),g=u.indexOf(i.getActiveId());g!==-1&&(p&&c>60&&g>0?i.snapTo(u[g-1]):c<-60&&g<u.length-1&&i.snapTo(u[g+1]))};return e.addEventListener("touchstart",r,{passive:!0}),e.addEventListener("touchmove",a,{passive:!0}),e.addEventListener("touchend",l,{passive:!0}),()=>{e.removeEventListener("touchstart",r),e.removeEventListener("touchmove",a),e.removeEventListener("touchend",l)}}var ut=m(()=>{"use strict"});function mt(i){if(typeof window>"u"||!window.visualViewport)return()=>{};let e=window.visualViewport,t=null,n=()=>{t===null&&(t=requestAnimationFrame(()=>{if(t=null,i.isDestroyed())return;i.recomputeSnaps();let s=i.isVerticalAxis(),r=s?e.height:e.width,a=s?window.innerHeight:window.innerWidth,l=Math.max(0,Math.min(a,r)-8);l<i.getMaxAxisSize()&&i.setMaxAxisSize(l);let h=i.getMaxAxisSize();i.setSize(Math.min(i.getSize(),h));let d=i.resolveActiveSnap();d&&!i.isDragging()?i.applySize(Math.min(d.size,h)):i.applySize(i.getSize())}))};return e.addEventListener("resize",n),()=>{e.removeEventListener("resize",n),t!==null&&cancelAnimationFrame(t)}}var ft=m(()=>{"use strict"});function gt(i){if(typeof window>"u")return()=>{};let e=()=>{if(i.isDestroyed())return;i.recomputeSnaps();let s=i.getMode(),a=s==="bottom"||s==="top"?window.innerHeight:window.innerWidth,l=i.getMaxAxisSize();a>0&&a<l&&i.setMaxAxisSize(a);let h=i.isAnimating?.()??!1;i.cancelInFlight(),i.newCycle();let d=i.resolveActiveSnap(),c=i.getMaxAxisSize(),p=Math.min(d?d.size:i.getSize(),c);i.setSize(p),d&&!i.isDragging()&&(i.applySize(p),h&&i.resyncAfterCancel?.())},t=null;typeof ResizeObserver<"u"?(t=new ResizeObserver(e),t.observe(document.documentElement)):window.addEventListener("resize",e),window.addEventListener("orientationchange",e);let n=()=>{i.isDestroyed()||document.hidden&&i.cancelInFlight()};return document.addEventListener("visibilitychange",n),()=>{t?.disconnect(),window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),document.removeEventListener("visibilitychange",n)}}var bt=m(()=>{"use strict"});function vt(i){if(typeof ResizeObserver>"u")return()=>{};if(!i.hasFitSnap())return()=>{};let e=0,t=()=>{e||(e=requestAnimationFrame(()=>{e=0,!(i.isDestroyed()||i.isDragging())&&i.recompute()}))},n=new ResizeObserver(t);n.observe(i.handle);let s=i.scrollContainer,r=new Set,a=new Set,l=typeof HTMLSlotElement<"u",h=()=>c(),d=()=>{if(!(!s||!l))for(let u of Array.from(s.children))u instanceof HTMLSlotElement&&!a.has(u)&&(u.addEventListener("slotchange",h),a.add(u))},c=()=>{d();let u=Ui(s);for(let g of r)u.includes(g)||(n.unobserve(g),r.delete(g));for(let g of u)r.has(g)||(n.observe(g),r.add(g));t()},p;return s&&(c(),typeof MutationObserver<"u"&&(p=new MutationObserver(c),p.observe(s,{childList:!0}))),()=>{n.disconnect(),p?.disconnect();for(let u of a)u.removeEventListener("slotchange",h);e&&cancelAnimationFrame(e)}}var Ui,yt=m(()=>{"use strict";Ui=i=>{if(!i)return[];let e=typeof HTMLSlotElement<"u",t=[];for(let n of Array.from(i.children))if(e&&n instanceof HTMLSlotElement)for(let s of n.assignedElements())t.push(s);else t.push(n);return t}});var Wi,Yi,St,xt=m(()=>{"use strict";he();Wi=(i,e,t)=>{if(!e)return t?i.offsetHeight:i.offsetWidth;let n=t?"height":"width",s=i.style,r=e.style,a=s[n],l=r.flex,h=t?r.height:r.width;s[n]="auto",r.flex="none",t?r.height="auto":r.width="auto";let d=t?i.offsetHeight:i.offsetWidth,c=t?e.clientHeight:e.clientWidth,p=t?e.scrollHeight:e.scrollWidth,u=Math.max(d,d-c+p);return s[n]=a,r.flex=l,t?r.height=h:r.width=h,u},Yi=(i,e)=>{let t=i.offsetParent;return t&&t!==document.body&&t!==document.documentElement?e?t.clientHeight:t.clientWidth:e?window.innerHeight:window.innerWidth},St=i=>{let e=I(i.mode)==="height",t=Wi(i.element,i.scrollContainer,e),n=i.getMaxHeightCap(),s=n!==void 0?Math.min(t,n):t;if(typeof window>"u")return s;let r=Yi(i.element,e);return r>0?Math.min(s,r):s}});function Tt(i){let e=i.mode==="bottom"||i.mode==="top",t=e?"ArrowUp":"ArrowRight",n=e?"ArrowDown":"ArrowLeft",s=i.mode==="top"?n:t,r=i.mode==="top"?t:n,a=l=>{if(i.isDestroyed())return;let h=i.getAllowedIds(),d=h.indexOf(i.getActiveId());d!==-1&&(l.key===s&&d<h.length-1?(l.preventDefault(),i.snapTo(h[d+1])):l.key===r&&d>0?(l.preventDefault(),i.snapTo(h[d-1])):l.key==="Home"?(l.preventDefault(),i.snapTo(h[0])):l.key==="End"&&(l.preventDefault(),i.snapTo(h[h.length-1])))};return i.handle.addEventListener("keydown",a),()=>i.handle.removeEventListener("keydown",a)}var Et=m(()=>{"use strict"});var ge,At=m(()=>{"use strict";ge=Object.freeze({subtle:{color:"rgba(0,0,0,0.2)",blur:void 0,range:[.3,1],interactive:!1},standard:{color:"rgba(0,0,0,0.4)",blur:void 0,range:[0,1],interactive:!1},monitoring:{color:"rgba(15,15,20,0.55)",blur:"4px",range:[0,1],interactive:!1},cinematic:{color:"rgba(0,0,0,0.7)",blur:"12px",range:[0,1],interactive:!1}})});var E,be=m(()=>{"use strict";E=class{constructor(){o(this,"last",-1)}shouldWrite(e,t){return Math.abs(e-this.last)<=t?!1:(this.last=e,!0)}invalidate(){this.last=-1}setLastWritten(e){this.last=e}get value(){return this.last}}});function X(...i){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.warn(...i)}var wt=m(()=>{"use strict"});function $i(i,e,t){let n=`calc(var(--bs-size, 0px) + ${t})`;switch(i){case"bottom":return e==="sheet-top-left"?{bottom:n,left:t}:e==="sheet-top-right"?{bottom:n,right:t}:{bottom:n,left:"50%",transform:"translateX(-50%)"};case"top":return e==="sheet-top-left"?{top:n,left:t}:e==="sheet-top-right"?{top:n,right:t}:{top:n,left:"50%",transform:"translateX(-50%)"};case"left":return e==="sheet-top-left"?{left:n,top:t}:e==="sheet-top-right"?{left:n,bottom:t}:{left:n,top:"50%",transform:"translateY(-50%)"};case"right":return e==="sheet-top-left"?{right:n,top:t}:e==="sheet-top-right"?{right:n,bottom:t}:{right:n,top:"50%",transform:"translateY(-50%)"}}}function M(i,e,t,n){switch(t){case"top-left":i.top=n,i.left=n;break;case"top-center":i.top=n,i.left="50%",i.transform="translateX(-50%)";break;case"top-right":i.top=n,i.right=n;break;case"center-left":i.top="50%",i.left=n,i.transform="translateY(-50%)";break;case"center":i.top="50%",i.left="50%",i.transform="translate(-50%, -50%)";break;case"center-right":i.top="50%",i.right=n,i.transform="translateY(-50%)";break;case"bottom-left":i.bottom=n,i.left=n;break;case"bottom-center":i.bottom=n,i.left="50%",i.transform="translateX(-50%)";break;case"bottom-right":i.bottom=n,i.right=n;break;case"sheet-top-left":case"sheet-top-center":case"sheet-top-right":{let s=$i(e,t,n);s.top!==void 0&&(i.top=s.top),s.bottom!==void 0&&(i.bottom=s.bottom),s.left!==void 0&&(i.left=s.left),s.right!==void 0&&(i.right=s.right),s.transform!==void 0&&(i.transform=s.transform);break}}}var j=m(()=>{"use strict"});var Gi,Zi,Q,Mt=m(()=>{"use strict";At();G();be();wt();j();Gi=/^-?\d+(?:\.\d+)?(?:px|em|rem|%)$/,Zi="rgba(0, 0, 0, 0.4)",Q=class{constructor(e,t){o(this,"screenComponent");o(this,"backdrop");o(this,"mode");o(this,"isDestroyed");o(this,"isTopSheet");o(this,"getAllowedIds");o(this,"getResolvedSnaps");o(this,"snapToFn");o(this,"closeFn");o(this,"scrimInteractive",!1);o(this,"scrimMode");o(this,"backdropRange");o(this,"screenRange");o(this,"scrimEnabled",!0);o(this,"savedScrimRanges",null);o(this,"scrimTapToCloseEnabled",!1);o(this,"detachScrimTap",null);o(this,"scrimOverlayTeardown",null);o(this,"backdropOpacitySentinel",new E);o(this,"screenOpacitySentinel",new E);o(this,"lastBackdropPointer","");o(this,"lastScreenDisplay","");this.screenComponent=e.screenComponent,this.backdrop=e.backdrop,this.mode=e.mode,this.isDestroyed=e.isDestroyed,this.isTopSheet=e.isTopSheet,this.getAllowedIds=e.getAllowedIds,this.getResolvedSnaps=e.getResolvedSnaps,this.snapToFn=e.snapTo,this.closeFn=e.close,this.scrimMode=t.scrimMode??"full";let n=t.scrimPreset?ge[t.scrimPreset]:null;this.backdropRange=t.backdropRange??n?.range??[0,1],this.screenRange=t.screenRange??n?.range??[0,1],this.scrimTapToCloseEnabled=t.scrimTapToClose??!1;let r=t.scrimColor??n?.color??(this.scrimMode!=="off"&&!this.backdrop?Zi:void 0);if(this.screenComponent){if(this.applyScrimStyles({color:r,blur:t.scrimBlur??n?.blur,interactive:t.scrimInteractive??n?.interactive??!1}),this.scrimMode==="above-sheet")this.applyAboveSheetInset();else if(this.scrimMode==="off"){let a=this.screenComponent.style;a.opacity="0",a.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"}}}invalidateOpacityCache(){this.backdropOpacitySentinel.invalidate(),this.screenOpacitySentinel.invalidate()}attach(){this.scrimTapToCloseEnabled&&this.setScrimTapToClose(!0)}applyOpacity(e,t){if(!(!t&&this.backdropOpacitySentinel.value!==-1&&this.screenOpacitySentinel.value!==-1)){if(this.backdrop&&this.isTopSheet()){let[n,s]=this.backdropRange,r=Math.max(s-n,1e-4),a=Math.min(Math.max((e-n)/r,0),1);this.backdropOpacitySentinel.shouldWrite(a,.005)&&(this.backdrop.style.opacity=String(a));let l=a>.05?"auto":"none";l!==this.lastBackdropPointer&&(this.backdrop.style.pointerEvents=l,this.lastBackdropPointer=l)}if(this.screenComponent&&this.scrimMode!=="off"){let[n,s]=this.screenRange,r=Math.min(1,Math.max(0,(e-n)/Math.max(1e-4,s-n)));this.screenOpacitySentinel.shouldWrite(r,.005)&&(this.screenComponent.style.opacity=String(r));let a=r>0?"":"none";a!==this.lastScreenDisplay&&(this.screenComponent.style.display=a,this.lastScreenDisplay=a)}}}setBackdropRange(e,t){this.isDestroyed()||(this.backdropRange=e,this.invalidateOpacityCache(),t())}setScreenRange(e,t){this.isDestroyed()||(this.screenRange=e,this.invalidateOpacityCache(),t())}setScrimColor(e){this.isDestroyed()||this.applyScrimStyles({color:e===void 0?null:e})}setScrimBlur(e){this.isDestroyed()||this.applyScrimStyles({blur:e===void 0?null:e})}setScrimInteractive(e){this.isDestroyed()||this.applyScrimStyles({interactive:e})}setScrimMode(e,t){if(this.isDestroyed()||e===this.scrimMode)return;this.invalidateOpacityCache();let n=this.scrimMode;if(this.scrimMode=e,this.screenComponent){let s=this.screenComponent.style;n==="above-sheet"&&e!=="above-sheet"&&(s.position="",s.inset="",s.pointerEvents=""),e==="above-sheet"?this.applyAboveSheetInset():e==="off"?(s.opacity="0",s.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"):this.lastScreenDisplay==="none"&&(s.display="",this.lastScreenDisplay="")}t()}setScrimTapToClose(e){if(this.isDestroyed()||!this.screenComponent)return;let t=this.detachScrimTap!==null;if(e!==t)if(e){let n=this.screenComponent;n.style.pointerEvents==="none"&&(n.style.pointerEvents="auto");let s=()=>{if(this.isDestroyed())return;if(this.closeFn){this.closeFn();return}let r=this.getAllowedIds(),a=this.getResolvedSnaps(),l=r.find(h=>{let d=O(h,a);return d!==null&&d.size===0});l&&this.snapToFn(l)};n.addEventListener("click",s),this.detachScrimTap=()=>n.removeEventListener("click",s),this.scrimTapToCloseEnabled=!0}else this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimTapToCloseEnabled=!1}setScrimEnabled(e,t){this.isDestroyed()||e!==this.scrimEnabled&&(this.scrimEnabled=e,this.invalidateOpacityCache(),e?(this.screenRange=this.savedScrimRanges?.screen??[0,1],this.backdropRange=this.savedScrimRanges?.backdrop??[0,1],this.savedScrimRanges=null):(this.savedScrimRanges={screen:this.screenRange,backdrop:this.backdropRange},this.screenRange=[1,1],this.backdropRange=[1,1]),t())}setScrim(e,t){if(this.isDestroyed())return;if(e.preset){let s=ge[e.preset];this.applyScrimStyles({color:s.color,blur:s.blur??null,interactive:s.interactive}),!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:s.range,backdrop:s.range}:(this.screenRange=s.range,this.backdropRange=s.range)}let n=()=>{};e.mode!==void 0&&this.setScrimMode(e.mode,n),e.enabled!==void 0&&this.setScrimEnabled(e.enabled,n),e.tapToClose!==void 0&&this.setScrimTapToClose(e.tapToClose),this.applyScrimStyles({color:e.color,blur:e.blur,interactive:e.interactive}),e.range!==void 0&&(!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:e.range,backdrop:this.savedScrimRanges.backdrop}:this.screenRange=e.range),this.invalidateOpacityCache(),t()}setScrimOverlay(e){if(this.isDestroyed())return()=>{};if(!this.screenComponent)return()=>{};this.scrimOverlayTeardown?.();let t=this.screenComponent,n=e.inset??"16px",s=Gi.test(n)?n:"16px";s!==n&&X(`[bottom-sheet] setScrimOverlay: invalid inset ${JSON.stringify(n)}; expected a CSS length like "16px" / "1rem" / "5%". Falling back to "16px".`),e.children.ownerDocument&&e.children.ownerDocument!==t.ownerDocument&&X("[bottom-sheet] setScrimOverlay: children belong to a different document than the scrim. Cross-document adoption can drop event listeners; construct children via the same document as the sheet root.");let r=e.position??"top-right",a=e.interactive??!0,l=t.ownerDocument.createElement("div");l.className="bs-scrim-overlay";let h=l.style;h.position="absolute",M(h,this.mode,r,s),a&&(h.pointerEvents="auto"),l.appendChild(e.children);let d=t.parentElement;if(!d)return X("[bottom-sheet] setScrimOverlay: scrim element has no parent, skipping overlay injection. Mount the sheet root before calling setScrimOverlay."),()=>{};d.appendChild(l);let c=()=>{l.parentNode&&l.parentNode.removeChild(l),this.scrimOverlayTeardown===c&&(this.scrimOverlayTeardown=null)};return this.scrimOverlayTeardown=c,c}destroy(){if(this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimOverlayTeardown?.(),this.scrimOverlayTeardown=null,this.screenComponent){let e=this.screenComponent.style;e.opacity="",e.display="",e.position="",e.inset="",e.pointerEvents=""}this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents=""),this.invalidateOpacityCache(),this.lastBackdropPointer="",this.lastScreenDisplay=""}applyScrimStyles(e){if(!this.screenComponent)return;let t=this.screenComponent.style;if(e.color!==void 0&&(t.background=e.color===null?"":e.color),e.blur!==void 0){let n=t;if(e.blur===null)t.backdropFilter="",n.webkitBackdropFilter="";else{let s=`blur(${e.blur})`;t.backdropFilter=s,n.webkitBackdropFilter=s}}e.interactive!==void 0&&(this.scrimInteractive=e.interactive,t.pointerEvents=e.interactive?"auto":"none")}applyAboveSheetInset(){if(!this.screenComponent)return;let e={bottom:"0 0 var(--bs-size) 0",top:"var(--bs-size) 0 0 0",left:"0 0 0 var(--bs-size)",right:"0 var(--bs-size) 0 0"},t=this.screenComponent.style;t.position="fixed",t.inset=e[this.mode],t.pointerEvents=this.scrimInteractive||this.scrimTapToCloseEnabled?"auto":"none"}}});var zt,Xi,kt,Rt,Dt,It,J=m(()=>{"use strict";zt=i=>1+2.40158*Math.pow(i-1,3)+1.40158*Math.pow(i-1,2),Xi=i=>1-Math.pow(1-i,3),kt=i=>i,Rt=i=>1-Math.pow(1-i,5),Dt=({from:i,to:e,duration:t,easing:n=Xi,onUpdate:s})=>{let r=!1,a=0,l=null,h=performance.now(),d=new Promise(c=>{if(l=c,t<=0){s(e),c();return}let p=u=>{if(r)return;let g=u-h,b=Math.min(g/t,1),f=i+(e-i)*n(b);s(f),b<1?a=requestAnimationFrame(p):c()};a=requestAnimationFrame(p)});return{cancel:()=>{r=!0,cancelAnimationFrame(a),l?.()},promise:d}},It=()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches});var ji,Qi,Ot,Lt=m(()=>{"use strict";ji={stiffness:220,damping:26,mass:1,restDelta:.5,restSpeed:.5},Qi=1/30,Ot=({from:i,to:e,velocity:t=0,config:n,onUpdate:s})=>{let r={...ji,...n},a=!1,l=0,h=null,d=i,c=t,p=performance.now(),u=new Promise(g=>{h=g;let b=f=>{if(a)return;let S=Math.min((f-p)/1e3,Qi);p=f;let Y=Math.max(1,Math.ceil(S*240)),v=S/Y,C=Y;for(;C-- >0;){let D=(-r.stiffness*(d-e)-r.damping*c)/r.mass;c+=D*v,d+=c*v}if(!Number.isFinite(d)||!Number.isFinite(c)){s(e,0),g();return}s(d,c),Math.abs(e-d)<(r.restDelta??.5)&&Math.abs(c)<(r.restSpeed??.5)?(s(e,0),g()):l=requestAnimationFrame(b)};l=requestAnimationFrame(b)});return{cancel:()=>{a=!0,cancelAnimationFrame(l),h?.()},promise:u}}});function Pt(i){switch(i){case"ios-spring":return{kind:"spring",spring:{stiffness:300,damping:30,mass:1}};case"material-bounce":return{kind:"spring",spring:{stiffness:200,damping:22,mass:1}};case"linear":return{kind:"tween",duration:Ji,easing:kt};case"snappy":return{kind:"tween",duration:180,easing:Rt};case"tween":return{kind:"tween"};default:return{kind:"spring"}}}var Ji,Ht=m(()=>{"use strict";J();Ji=220});var en,tn,ee,_t=m(()=>{"use strict";J();Lt();Ht();en=220,tn=1e3,ee=class{constructor(e,t){o(this,"element");o(this,"getRootEl");o(this,"applySizeFn");o(this,"getSize");o(this,"isDragging");o(this,"animationKind");o(this,"springConfig");o(this,"duration");o(this,"easing");o(this,"respectReducedMotion");o(this,"reducedMotion",!1);o(this,"detachReducedMotion",null);o(this,"viewTransitionsAvailable");o(this,"currentTween",null);o(this,"currentSpring",null);this.element=e.element,this.getRootEl=e.getRootEl,this.applySizeFn=e.applySize,this.getSize=e.getSize,this.isDragging=e.isDragging;let n=Pt(t.animation);this.animationKind=n.kind,this.duration=t.duration??n.duration??en,this.easing=t.easing??n.easing??zt,this.springConfig={...n.spring??{},...t.spring??{}},this.respectReducedMotion=t.respectReducedMotion??!0;let s=t.viewTransitions??!1;if(this.viewTransitionsAvailable=s&&typeof document<"u"&&typeof document.startViewTransition=="function",this.respectReducedMotion&&typeof window<"u"&&typeof window.matchMedia=="function"){let r=window.matchMedia("(prefers-reduced-motion: reduce)");this.reducedMotion=r.matches;let a=l=>{this.reducedMotion=l.matches};typeof r.addEventListener=="function"?(r.addEventListener("change",a),this.detachReducedMotion=()=>r.removeEventListener("change",a)):typeof r.addListener=="function"&&(r.addListener(a),this.detachReducedMotion=()=>r.removeListener(a))}}get isAnimating(){return this.currentTween!==null||this.currentSpring!==null}cancel(){this.currentTween?.cancel(),this.currentSpring?.cancel()}async animateTo(e,t){if(e===this.getSize()){!this.isAnimating&&!this.isDragging()&&(this.element.style.willChange="");return}if(this.currentTween?.cancel(),this.currentSpring?.cancel(),this.getRootEl()?.setAttribute("data-animating","true"),this.element.style.willChange="transform",this.reducedMotion){this.applySizeFn(e),this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange="");return}if(this.animationKind==="spring"){let n=Ot({from:this.getSize(),to:e,velocity:t*tn,config:this.springConfig,onUpdate:s=>this.applySizeFn(s)});this.currentSpring=n,await n.promise,this.currentSpring===n&&(this.currentSpring=null)}else{let n=Dt({from:this.getSize(),to:e,duration:this.duration,easing:this.easing,onUpdate:s=>this.applySizeFn(s)});this.currentTween=n,await n.promise,this.currentTween===n&&(this.currentTween=null)}this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange=""))}destroy(){this.detachReducedMotion?.(),this.detachReducedMotion=null,this.currentTween=null,this.currentSpring=null}}});var Bt,nn,Ft,ve,sn,P,Nt,Kt=m(()=>{"use strict";Bt=["a[href]","area[href]","button:not([disabled])","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","iframe","object","embed","[contenteditable='true']","[tabindex]:not([tabindex='-1'])"].join(","),nn=i=>typeof i.checkVisibility=="function"?i.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0}):i.offsetParent!==null,Ft=i=>{let e=Array.from(i.querySelectorAll(Bt));if(typeof HTMLSlotElement<"u")for(let t of Array.from(i.querySelectorAll("slot")))for(let n of t.assignedElements())n.matches(Bt)&&e.push(n),e.push(...Ft(n));return e},ve=i=>Ft(i).filter(e=>!e.hasAttribute("inert")&&nn(e)&&!e.matches("[aria-hidden='true']")),sn=(i,e)=>{let t=e;for(;t;){if(t===i)return!0;let n=t.assignedSlot;if(n){t=n;continue}let s=t.parentNode;t=s instanceof ShadowRoot?s.host:s}return!1},P=[],Nt=(i,e={})=>{if(typeof document>"u")return()=>{};let t={};P.push(t);let n=()=>P[P.length-1]===t,s=document.activeElement;(()=>{let d=e.initialFocus;if(d===!1){i.hasAttribute("tabindex")||(i.tabIndex=-1),i.focus({preventScroll:!0});return}(typeof d=="string"?i.querySelector(d):d??ve(i)[0]??i)?.focus({preventScroll:!0})})();let a=d=>{if(!n())return;if(d.key==="Escape"&&e.onEscape){e.onEscape();return}if(d.key!=="Tab")return;let c=ve(i);if(c.length===0){d.preventDefault();return}let p=c[0],u=c[c.length-1],g=document.activeElement;d.shiftKey&&g===p?(d.preventDefault(),u.focus()):!d.shiftKey&&g===u&&(d.preventDefault(),p.focus())},l=d=>{if(!n())return;let c=d.target;c&&!sn(i,c)&&ve(i)[0]?.focus({preventScroll:!0})};document.addEventListener("keydown",a,!0),document.addEventListener("focusin",l,!0);let h=!1;return()=>{if(h)return;h=!0;let d=P.indexOf(t);d!==-1&&P.splice(d,1),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",l,!0),s&&document.contains(s)?s.focus({preventScroll:!0}):document.querySelector("[data-bs-restore-fallback]")?.focus({preventScroll:!0})}}});var H,x,Vt,Ut=m(()=>{"use strict";H=0,x=null,Vt=()=>{if(typeof document>"u")return()=>{};if(H===0){let e=document.body;x={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:window.scrollY};let t=window.innerWidth-document.documentElement.clientWidth;if(t>0){let n=parseFloat(getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${n+t}px`}e.style.overflow="hidden",e.style.position="fixed",e.style.top=`-${x.scrollY}px`,e.style.width="100%"}H++;let i=!1;return()=>{if(!i&&(i=!0,H=Math.max(0,H-1),H===0&&x)){let e=document.body;e.style.overflow=x.overflow,e.style.position=x.position,e.style.top=x.top,e.style.width=x.width,e.style.paddingRight=x.paddingRight,window.scrollTo(0,x.scrollY),x=null}}}});function Wt(i){let e=[];return{apply(){if(typeof document>"u")return;let t=i();for(;t.parentElement&&t.parentElement!==document.body;)t=t.parentElement;let n=t.parentElement??document.body;for(let s of Array.from(n.children))s!==t&&(s.hasAttribute("inert")||s.classList.contains("bs-backdrop")||s.classList.contains("bs-screen")||s.classList.contains("bs-root")||(s.setAttribute("inert",""),e.push(s)))},remove(){for(let t of e)t.removeAttribute("inert");e.length=0}}}var Yt=m(()=>{"use strict"});var te,$t=m(()=>{"use strict";Kt();Ut();Yt();te=class{constructor(e,t){o(this,"element");o(this,"focusTrapEnabled");o(this,"initialFocus");o(this,"closeOnEscape");o(this,"bodyScrollLockEnabled");o(this,"inertSiblingsEnabled");o(this,"inertSiblings");o(this,"shouldApplyInertSiblings");o(this,"returnFocus");o(this,"releaseFocusTrap",null);o(this,"releaseScrollLock",null);o(this,"installed",!1);o(this,"destroyed",!1);this.element=e.element,this.focusTrapEnabled=t.focusTrap??!1,this.initialFocus=t.initialFocus,this.closeOnEscape=t.closeOnEscape??!0,this.bodyScrollLockEnabled=t.lockBodyScroll??!0,this.inertSiblingsEnabled=t.inertSiblings??!1,this.shouldApplyInertSiblings=t.shouldApplyInertSiblings??(()=>!0),this.returnFocus=t.returnFocus,this.inertSiblings=Wt(()=>this.element)}get isInstalled(){return this.installed}install(){this.destroyed||(this.installed=!0,this.bodyScrollLockEnabled&&!this.releaseScrollLock&&(this.releaseScrollLock=Vt()),this.focusTrapEnabled&&!this.releaseFocusTrap&&(this.releaseFocusTrap=Nt(this.element,{initialFocus:this.initialFocus})),this.inertSiblingsEnabled&&this.shouldApplyInertSiblings()&&this.inertSiblings.apply())}setReturnFocus(e){this.destroyed||(this.returnFocus=e)}release(){this.installed&&(this.installed=!1,this.releaseFocusTrap?.(),this.releaseFocusTrap=null,this.releaseScrollLock?.(),this.releaseScrollLock=null,this.inertSiblings.remove(),this.returnFocus&&(typeof this.returnFocus=="function"?this.returnFocus():typeof this.returnFocus=="string"?typeof document<"u"?document.querySelector(this.returnFocus):null:this.returnFocus)?.focus?.())}destroy(){this.release(),this.destroyed=!0}}});var qt,ye,Gt,Zt=m(()=>{"use strict";qt=i=>i==="bottom"||i==="top",ye=class{constructor(e){o(this,"slots");o(this,"capacity");o(this,"head",0);o(this,"size",0);this.capacity=e,this.slots=new Array(e);for(let t=0;t<e;t++)this.slots[t]={t:0,v:0}}push(e,t){let n=this.slots[this.head];n.t=e,n.v=t,this.head=(this.head+1)%this.capacity,this.size<this.capacity&&this.size++}pruneBefore(e,t){for(;this.size>t;){let n=(this.head-this.size+this.capacity)%this.capacity;if(this.slots[n].t<e)this.size--;else break}}get length(){return this.size}oldest(){if(this.size!==0)return this.slots[(this.head-this.size+this.capacity)%this.capacity]}newest(){if(this.size!==0)return this.slots[(this.head-1+this.capacity)%this.capacity]}reset(){this.head=0,this.size=0}},Gt=(i,e,t)=>{let n=null,s="touch",r=0,a=0,l=v=>v==="mouse"?160:120,h=32,d=new ye(h),c=qt(e)?"Y":"X",p=e==="bottom"||e==="right"?-1:1,u=v=>c==="Y"?v.clientY:v.clientX,g=v=>{if(n===null&&!(v.button!==void 0&&v.button!==0)){n=v.pointerId,s=v.pointerType||"touch",r=u(v),a=r,d.reset(),d.push(v.timeStamp,r);try{i.setPointerCapture(v.pointerId)}catch{}t.onStart(r,s)}},b=v=>{if(v.pointerId!==n)return;let C=u(v),R=(C-r)*p;a=C,d.push(v.timeStamp,C);let D=v.timeStamp-l(s);d.pruneBefore(D,2),t.onMove(R)},f=v=>{if(v.pointerId!==n)return;let de=(a-r)*p,R=0;if(d.length>=3){let Fe=d.oldest(),Ne=d.newest(),Ke=Ne.t-Fe.t;Ke>0&&(R=(Ne.v-Fe.v)/Ke*p)}let D=s;n=null,d.reset();try{i.hasPointerCapture(v.pointerId)&&i.releasePointerCapture(v.pointerId)}catch{}t.onEnd(de,R,D)},S=v=>{v.pointerId===n&&(n=null,d.reset(),t.onCancel?.())};i.addEventListener("pointerdown",g),i.addEventListener("pointermove",b),i.addEventListener("pointerup",f),i.addEventListener("pointercancel",S);let Y=i.style.touchAction;return i.style.touchAction=qt(e)?"pan-x":"pan-y",()=>{i.removeEventListener("pointerdown",g),i.removeEventListener("pointermove",b),i.removeEventListener("pointerup",f),i.removeEventListener("pointercancel",S),i.style.touchAction=Y,n!==null&&i.hasPointerCapture(n)&&i.releasePointerCapture(n)}}});function Se(i,e){let t=Math.min(e*.15,80);if(t<=0)return 0;let n=Math.abs(i);return Math.sign(i)*(t*n/(n+t))}var Xt=m(()=>{"use strict"});function jt(i){if(typeof document>"u")return!1;let e=document.activeElement;if(!e||!i.contains(e))return!1;let t=e.tagName;if(!(t==="INPUT"||t==="TEXTAREA"||e.isContentEditable===!0))return!1;try{return e.blur(),!0}catch{return!1}}var Qt=m(()=>{"use strict"});var ie,Jt=m(()=>{"use strict";Zt();Xt();Qt();ie=class{constructor(e){o(this,"deps");o(this,"detach",null);o(this,"isDragging_",!1);o(this,"dragStartSize",0);o(this,"currentPointerKind","touch");o(this,"keyboardDismissed",!1);o(this,"dragSuppressed",!1);o(this,"dragPayload",{size:0,delta:0});this.deps=e}get isDragging(){return this.isDragging_}install(){return this.detach?this.detach:(this.detach=Gt(this.deps.handle,this.deps.mode,{onStart:(e,t)=>{if(this.deps.getDisableDrag?.()){this.dragSuppressed=!0;return}this.dragSuppressed=!1,this.deps.cancelAnimation(),this.isDragging_=!0,this.dragStartSize=this.deps.getDragContext().size,this.currentPointerKind=t,this.keyboardDismissed=!1,this.deps.getRoot()?.setAttribute("data-dragging","true"),this.deps.element.style.willChange="transform",this.deps.emit("dragstart",{size:this.dragStartSize})},onMove:e=>{if(this.dragSuppressed)return;let t=this.deps.getDragContext(),{min:n,max:s}=t.range,r=t.maxAxisSize,a=t.rubberBandEnabled,l=this.dragStartSize+e;l>s?l=a?s+Se(l-s,r):s:l<n&&(l=a?n-Se(n-l,r):n),this.deps.applySize(l),!this.keyboardDismissed&&this.currentPointerKind==="touch"&&this.deps.mode==="bottom"&&l<this.dragStartSize&&jt(this.deps.element)&&(this.keyboardDismissed=!0),this.deps.listenerCount("drag")>0&&(this.dragPayload.size=l,this.dragPayload.delta=e,this.deps.emit("drag",this.dragPayload))},onEnd:(e,t,n)=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:t}),this.deps.settleAfterDrag(e,t,n)},onCancel:()=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:0});let e=this.dragStartSize;this.deps.animateTo(e,0)}}),this.detach)}forceClearDragState(){this.isDragging_&&(this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.element.style.willChange="")}}});var ne,ei=m(()=>{"use strict";ne=class{constructor(e,t){o(this,"handle",e);e.setAttribute("aria-orientation",t==="bottom"||t==="top"?"vertical":"horizontal")}setValue(e,t){if(e.length===0){this.handle.removeAttribute("aria-valuemin"),this.handle.removeAttribute("aria-valuemax"),this.handle.removeAttribute("aria-valuenow"),this.handle.removeAttribute("aria-valuetext");return}let n=Math.max(e.length-1,0),s=Math.max(e.indexOf(t),0);this.handle.setAttribute("aria-valuemin","0"),this.handle.setAttribute("aria-valuemax",String(n)),this.handle.setAttribute("aria-valuenow",String(s)),this.handle.setAttribute("aria-valuetext",t)}}});function ti(i){let e=new Map,t=n=>{let s=i.getMaxAxisSize();return s<=0?!1:n<s/2};return{cache(n,s,r){let a=i.scrollContainer;a&&(t(s)||t(r)&&e.set(n,a.scrollTop))},restore(n,s,r){let a=i.scrollContainer;if(!a||t(r)||!t(s))return;let l=e.get(n);l!==void 0&&(a.scrollTop=l,e.delete(n))},clear(){e.clear()}}}var ii=m(()=>{"use strict"});function rn(i,e){let t={frames:null,duration:0,easing:se};if(i==="none")return t;if(i===void 0||typeof i=="string")return{frames:ni[i??"fade"][e],duration:xe,easing:se};let n=e==="enter"?i.enter:i.exit;return n?{frames:n,duration:i.duration??xe,easing:i.easing??se}:i.preset==="none"?t:{frames:ni[i.preset??"fade"][e],duration:i.duration??xe,easing:i.easing??se}}function z(i,e,t){if((typeof e=="object"?e.respectReducedMotion!==!1:!0)&&It())return Te;let{frames:s,duration:r,easing:a}=rn(e,t);if(!s||r<=0||typeof i.animate!="function")return Te;let l=i.animate(s,{duration:r,easing:a,fill:"both"});return{finished:l.finished.then(()=>{}).catch(()=>{}),cancel:()=>{try{l.cancel()}catch{return}}}}var xe,se,ni,Te,Ee=m(()=>{"use strict";J();xe=200,se="cubic-bezier(0.22, 1, 0.36, 1)",ni={fade:{enter:[{opacity:0},{opacity:1}],exit:[{opacity:1},{opacity:0}]},scale:{enter:[{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}]},slide:{enter:[{opacity:0,transform:"translateY(10px)"},{opacity:1,transform:"translateY(0)"}],exit:[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(10px)"}]},pop:{enter:[{opacity:0,transform:"scale(0.6)",offset:0},{opacity:1,transform:"scale(1.06)",offset:.7},{opacity:1,transform:"scale(1)",offset:1}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.6)"}]}},Te={finished:Promise.resolve(),cancel:()=>{}}});function si(i,e){let n=i.host.ownerDocument.createElement("div");n.className="bs-anchor";let s=e.interactive??!0,r=e.position??"sheet-top-right",a=r==="dock-bottom"||r==="dock-top",l=n.style;if(l.position="fixed",a?(l.left="0",l.right="0",r==="dock-bottom"?l.bottom="0":l.top="0"):M(l,i.mode,r,e.inset??"16px"),e.fadeRange){let[b,f]=e.fadeRange,S=Math.max(f-b,1e-4);l.opacity=`clamp(0, calc((var(--bs-progress, 0) - ${b}) / ${S}), 1)`}n.appendChild(e.element),i.host.appendChild(n);let h=null,d=null,c=b=>typeof e.showOn=="function"?e.showOn(b):Array.isArray(e.showOn)?e.showOn.includes(b.activeId):a||b.size>0,p=(b,f)=>{if(b===h)return;if(h=b,d?.cancel(),d=null,n.style.pointerEvents=b&&s?"auto":"none",b){n.style.visibility="",f&&(d=z(e.element,e.animation,"enter"));return}if(!f){n.style.visibility="hidden";return}let S=z(e.element,e.animation,"exit");d=S,S.finished.then(()=>{d===S&&h===!1&&(n.style.visibility="hidden")})},u=b=>{i.isDestroyed()||p(c(i.getState()),b)},g=[i.on("snap",()=>u(!0)),i.on("open",()=>u(!0)),i.on("close",()=>u(!0))];return u(!1),{wrapper:n,detach:()=>{g.forEach(b=>b()),d?.cancel(),d=null,n.parentNode&&n.parentNode.removeChild(n)},syncZ:b=>{n.style.zIndex=String(b)}}}var ri=m(()=>{"use strict";j();Ee()});function ai(i,e){let t=i.host.ownerDocument,n=e.stages.map(c=>{let p=t.createElement("div");p.className="bs-scrim-stage";let u=p.style;return u.position="absolute",M(u,i.mode,c.position??e.position??"center",c.inset??e.inset??"16px"),u.visibility="hidden",u.pointerEvents="none",p.appendChild(c.element),i.host.appendChild(p),{def:c,wrapper:p,inFlight:null}}),s=null,r=()=>{let c=i.getState();return c.size===0?n.find(p=>oi(p.def,c.activeId))??null:n.find(p=>oi(p.def,c.activeId))??n.find(p=>on(p.def,c.progress))??null},a=(c,p)=>{if(c.inFlight?.cancel(),c.wrapper.style.pointerEvents="none",!p){c.inFlight=null,c.wrapper.style.visibility="hidden";return}let u=z(c.def.element,c.def.animation??e.animation,"exit");c.inFlight=u,u.finished.then(()=>{c.inFlight===u&&s!==c&&(c.wrapper.style.visibility="hidden")})},l=(c,p)=>{c.inFlight?.cancel(),c.inFlight=null,c.wrapper.style.visibility="",c.wrapper.style.pointerEvents=c.def.interactive??e.interactive??!1?"auto":"none",p&&(c.inFlight=z(c.def.element,c.def.animation??e.animation,"enter"))},h=c=>{if(i.isDestroyed())return;let p=r();if(p===s)return;let u=s;s=p,u&&a(u,c),p&&l(p,c)},d=[i.on("snap",()=>h(!0)),i.on("open",()=>h(!0)),i.on("close",()=>h(!0))];return n.some(c=>c.def.forRange)&&d.push(i.on("progress",()=>h(!0))),h(!1),()=>{d.forEach(c=>c());for(let c of n)c.inFlight?.cancel(),c.inFlight=null,c.wrapper.parentNode&&c.wrapper.parentNode.removeChild(c.wrapper);s=null}}var oi,on,li=m(()=>{"use strict";j();Ee();oi=(i,e)=>i.for===void 0?!1:Array.isArray(i.for)?i.for.includes(e):i.for===e,on=(i,e)=>{if(!i.forRange)return!1;let[t,n]=i.forRange;return e>=t&&e<=n}});function di(i,e){let t=i.allowed??i.snapPoints.map(s=>s.id),n=i.initial??t[0]??i.snapPoints[0]?.id??"default";if(i.persistKey){let s=it(i.persistKey);s&&t.includes(s)&&(n=s)}return{mode:i.mode??"bottom",flickVelocity:i.flickVelocity??an,dragThreshold:i.dragThreshold??ln,rubberBandEnabled:i.rubberBand??!0,closeOnBack:i.closeOnBack??!1,persistent:i.persistent??!1,disableClose:i.disableClose??!1,disableDrag:i.disableDrag??!1,closeOnRouteChange:i.closeOnRouteChange??!1,radius:i.radius,maxHeight:i.maxHeight,initialAllowed:t,initialId:n,scrim:{scrimMode:i.scrimMode,scrimColor:i.scrimColor,scrimBlur:i.scrimBlur,scrimInteractive:i.scrimInteractive??(i.scrimTapToClose?!0:void 0),scrimTapToClose:i.scrimTapToClose,scrimPreset:i.scrimPreset,screenRange:i.screenRange,backdropRange:i.backdropRange},animation:{animation:i.animation,duration:i.duration,easing:i.easing,spring:i.spring,respectReducedMotion:i.respectReducedMotion,viewTransitions:i.viewTransitions},lifecycle:{focusTrap:i.focusTrap,initialFocus:i.initialFocus,closeOnEscape:i.closeOnEscape,lockBodyScroll:i.lockBodyScroll,inertSiblings:i.inertSiblings,shouldApplyInertSiblings:e?.shouldApplyInertSiblings,returnFocus:i.returnFocusTo}}}var an,ln,ci=m(()=>{"use strict";fe();an=.65,ln=18});var re,hi=m(()=>{"use strict";re=class{constructor(){o(this,"fns",[])}add(e){e&&this.fns.push(e)}drain(){for(;this.fns.length;)try{this.fns.pop()()}catch(e){queueMicrotask(()=>{throw e})}}}});var dn,oe,pi=m(()=>{"use strict";Ue();he();Ye();qe();G();tt();fe();rt();at();ht();ut();ft();bt();yt();xt();Et();Mt();_t();$t();Jt();ei();ii();ri();li();ci();hi();be();dn=8,oe=class{constructor(e){o(this,"id",ue("bs"));o(this,"element");o(this,"handle");o(this,"scrollContainer");o(this,"backdrop");o(this,"screenComponent");o(this,"scrimParent",null);o(this,"mode");o(this,"flickVelocity");o(this,"dragThreshold");o(this,"rubberBandEnabled");o(this,"scrim");o(this,"aria");o(this,"animation");o(this,"lifecycle");o(this,"closeOnBack");o(this,"routedTo");o(this,"persistent");o(this,"disableCloseFlag");o(this,"disableDragFlag");o(this,"closeOnRouteChange");o(this,"maxHeightCap");o(this,"maxHeightRaw");o(this,"snapPointsRaw");o(this,"snaps");o(this,"activeId");o(this,"size",0);o(this,"gesture");o(this,"rootEl",null);o(this,"destroyed",!1);o(this,"currentViewTransition",null);o(this,"currentAbort",new AbortController);o(this,"sizeWriteSentinel",new E);o(this,"progressWriteSentinel",new E);o(this,"isTopSheet",!0);o(this,"opening",!1);o(this,"allowOvershoot",!1);o(this,"progressPayload",{value:0,size:0});o(this,"dragContextBuf",{size:0,maxAxisSize:0,range:{min:0,max:0},rubberBandEnabled:!1});o(this,"bus",$e());o(this,"persistKey");o(this,"linkedSheets",[]);o(this,"scrollCache");o(this,"teardowns",new re);o(this,"anchors",[]);o(this,"anchorHost",null);o(this,"stackZ",100);o(this,"detachScrimStages",null);o(this,"stackEffectEnabled",!1);o(this,"stackEffectPrimed",!1);o(this,"fitDeps");o(this,"transformTemplate");let t=di(e,{shouldApplyInertSiblings:()=>typeof document>"u"?!1:Array.from(document.body.children).some(r=>r===e.element||r.contains(e.element))});this.element=e.element,this.handle=e.handle??e.element,this.scrollContainer=e.scrollContainer,this.backdrop=e.backdrop,this.screenComponent=e.scrim??e.screenComponent,this.scrimParent=this.screenComponent?.parentElement??null,this.mode=t.mode,this.transformTemplate=We(this.mode),this.aria=new ne(this.handle,this.mode),this.flickVelocity=t.flickVelocity,this.dragThreshold=t.dragThreshold,this.rubberBandEnabled=t.rubberBandEnabled,this.scrim=new Q({mode:this.mode,screenComponent:this.screenComponent,backdrop:this.backdrop,isDestroyed:()=>this.destroyed,isTopSheet:()=>this.isTopSheet,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),getResolvedSnaps:()=>this.snaps.getResolvedSnaps().slice(),snapTo:s=>{this.snapTo(s)},close:()=>{this.canDismiss()&&this.close("backdrop")}},t.scrim),this.animation=new ee({element:this.element,getRootEl:()=>this.rootEl,applySize:s=>this.applySize(s),getSize:()=>this.size,isDragging:()=>this.gesture?.isDragging??!1},t.animation),this.lifecycle=new te({element:this.element,close:()=>this.close()},t.lifecycle),this.closeOnBack=t.closeOnBack,this.routedTo=e.routedTo,this.persistent=t.persistent,this.disableCloseFlag=t.disableClose,this.disableDragFlag=t.disableDrag,this.closeOnRouteChange=t.closeOnRouteChange,this.stackEffectEnabled=e.stackEffect??!1,this.snapPointsRaw=e.snapPoints,this.persistKey=e.persistKey,e.linkedSheets&&(this.linkedSheets=e.linkedSheets),this.activeId=t.initialId,me(this.snapPointsRaw),this.auditDuplicateSnapIds(this.snapPointsRaw),this.rootEl=this.element.closest(".bs-root"),this.fitDeps={element:this.element,scrollContainer:this.scrollContainer,mode:this.mode,getMaxHeightCap:()=>this.maxHeightCap},this.snaps=new Z(this.snapPointsRaw,t.initialAllowed,this.mode,()=>St(this.fitDeps),s=>{this.element.style[I(this.mode)]=`${s}px`});let n=this.snaps.findById(this.activeId);if(n&&(this.size=n.size),this.applySize(this.size),this.updateAriaSlider(),this.scrollCache=ti({scrollContainer:this.scrollContainer,getMaxAxisSize:()=>this.snaps.getMaxAxisSize()}),this.attach(),this.registerInStack(),this.snaps.getMaxAxisSize()===0&&typeof IntersectionObserver<"u"&&typeof document<"u"){let s=new IntersectionObserver(r=>{for(let a of r){if(!a.isIntersecting)continue;if(this.destroyed)return;this.snaps.recompute();let l=this.snaps.findById(this.activeId);l&&(this.size=l.size,this.applySize(this.size),this.updateAriaSlider()),s.disconnect();return}});s.observe(this.element),this.teardowns.add(()=>s.disconnect())}this.teardowns.add(vt({handle:this.handle,scrollContainer:this.scrollContainer,hasFitSnap:()=>this.snapPointsRaw.some(s=>s.size==="fit"||s.size==="content"),isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,recompute:()=>this.recompute()})),t.radius!==void 0&&this.setRadius(t.radius),t.maxHeight!==void 0&&this.setMaxHeight(t.maxHeight),this.applyAutoAriaLabelledBy(),this.closeOnRouteChange&&this.teardowns.add(ct({isDestroyed:()=>this.destroyed,getSize:()=>this.size,close:()=>this.close()})),this.persistKey&&this.teardowns.add(nt(this,this.persistKey)),this.teardowns.add(st({ms:e.autoCollapseAfter,isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),getActiveId:()=>this.activeId,resolveSnap:s=>this.snaps.findById(s),snapTo:s=>{this.snapTo(s)},on:(s,r)=>this.on(s,r)})),this.teardowns.add(dt({routedTo:this.routedTo,closeOnBack:this.closeOnBack,isTopSheet:()=>this.isTopSheet,getSize:()=>this.size,isDestroyed:()=>this.destroyed,close:()=>this.close("back"),on:(s,r)=>this.on(s,r),sheetId:this.id})),this.size>0&&this.handleOpen()}get state(){return{size:this.size,activeId:this.activeId,isDragging:this.gesture?.isDragging??!1,isAnimating:this.animation.isAnimating,progress:this.computeProgress(this.size)}}on(e,t){return this.bus.on(e,t)}use(e){if(this.destroyed)return console.warn(`[BottomSheet] use("${e.name}") called on destroyed engine \u2014 ignored.`),this;let t=[],n={add:r=>{typeof r=="function"&&t.push(r)}},s;try{s=e.install(this,n)}catch(r){for(let a=t.length-1;a>=0;a--)try{t[a]()}catch(l){queueMicrotask(()=>{throw l})}return queueMicrotask(()=>{throw r}),this}for(let r of t)this.teardowns.add(r);return typeof s=="function"&&this.teardowns.add(s),this}setLinkedSheets(e){this.destroyed||(this.linkedSheets=e)}getAllowedIds(){return this.snaps.getAllowedIds().slice()}async snapTo(e,t=0,n=!1){if(this.destroyed)return;let s=typeof t=="object"?t:{velocity:t},r=s.velocity??0,a=s.signal;if(a?.aborted)return;let l=this.snaps.findById(e);if(!l){console.warn(`[BottomSheet] unknown snap id: ${e}`);return}if(!this.snaps.getAllowedIds().includes(e)){console.warn(`[BottomSheet] snap "${e}" is not in allowed list`);return}if(!n&&this.emitBeforeSnap(l,this.activeId))return;let h=this.newCycle(),d=()=>{this.animation.cancel(),this.newCycle()};a?.addEventListener("abort",d,{once:!0});let c=this.size===0,p=this.activeId,u=this.size;this.scrollCache.cache(p,u,l.size),this.activeId=e;let g=this.snapPointsRaw.find(f=>f.id===e)?.size;if(c&&!(e==="closed"||g===0)&&(this.opening=!0,A.promote(this.id)),this.animation.viewTransitionsAvailable){this.currentViewTransition?.skipTransition?.();let f=document.startViewTransition(()=>{this.applySize(l.size)});this.currentViewTransition=f;try{await f.finished}catch{}this.currentViewTransition===f&&(this.currentViewTransition=null)}else await this.animation.animateTo(l.size,r);a?.removeEventListener("abort",d),!h.aborted&&(this.opening=!1,this.completeSnap(e,l.size,u,c,!1))}completeSnap(e,t,n,s,r){this.scrollCache.restore(e,n,t),this.updateAriaSlider(),this.emit("snap",{id:e,size:this.size,progress:this.computeProgress(this.size)}),r&&this.haptic(),s&&t>0&&this.emitOpenSequence(e),t===0&&this.emitCloseSequence()}emitOpenSequence(e){this.emit("open",{id:e}),this.handleOpen(),ot(this.linkedSheets,this),this.emit("opened",{id:e})}emitCloseSequence(){this.emit("close",void 0),this.handleClose(),this.emit("closed",void 0)}async dragTo(e,t=0){if(this.destroyed)return;let n=typeof t=="object"?t:{velocity:t},s=n.velocity??0,r=n.signal;if(r?.aborted)return;this.newCycle();let a=()=>{this.animation.cancel(),this.newCycle()};r?.addEventListener("abort",a,{once:!0});let l=Math.max(0,Math.min(e,this.snaps.getMaxAxisSize()));await this.animation.animateTo(l,s),r?.removeEventListener("abort",a),this.destroyed||r?.aborted}open(e){if(this.destroyed)return Promise.resolve();let t=e??this.snaps.getAllowedIds().find(n=>(this.snaps.findById(n)?.size??0)>0)??this.activeId;return this.snapTo(t)}close(e="programmatic"){if(this.destroyed||this.disableCloseFlag||this.size>0&&this.emitBeforeClose(e))return Promise.resolve();let t=this.snapPointsRaw.find(n=>n.id==="closed")?.id??this.snaps.getAllowedIds().find(n=>this.snaps.findById(n)?.size===0)??this.snaps.getAllowedIds()[0];return this.snapTo(t??this.activeId)}canDismiss(){return!this.persistent&&!this.disableCloseFlag&&!this.destroyed}setPersistent(e){this.destroyed||(this.persistent=e)}setDisableClose(e){this.destroyed||(this.disableCloseFlag=e)}setDisableDrag(e){this.destroyed||(this.disableDragFlag=e)}isTop(){return this.isTopSheet}depth(){return A.depthOf(this.id)}expand(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),t=e[e.length-1];return t?this.snapTo(t):Promise.resolve()}collapse(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),n=e.find(s=>(this.snaps.findById(s)?.size??0)>0)??e[0];return n?this.snapTo(n):Promise.resolve()}setRadius(e){this.destroyed||this.element.style.setProperty("--bs-radius",typeof e=="number"?`${e}px`:e)}setMaxHeight(e){if(this.destroyed)return;let t=typeof e=="number"?`${e}px`:e,n=I(this.mode);this.element.style.setProperty(n==="height"?"max-height":"max-width",t),this.maxHeightRaw=e,this.resolveMaxHeightCap(),this.recompute()}resolveMaxHeightCap(){let e=this.maxHeightRaw;if(e===void 0){this.maxHeightCap=void 0;return}if(typeof e=="number"){this.maxHeightCap=e;return}if(typeof window>"u")return;let t=q(e,this.mode);this.maxHeightCap=t>0?t:void 0}clampToMaxHeight(){this.maxHeightCap!==void 0&&this.snaps.getMaxAxisSize()>this.maxHeightCap&&this.snaps.setMaxAxisSize(this.maxHeightCap)}setAllowed(e,t){if(!this.destroyed){if(this.snaps.setAllowedIds(e),this.updateAriaSlider(),t&&e.includes(t))this.snapTo(t,0,!0);else if(!e.includes(this.activeId)){let n=e[0];n&&this.snapTo(n,0,!0)}}}setBackdropRange(e){this.scrim.setBackdropRange(e,()=>this.applySize(this.size))}setScreenRange(e){this.scrim.setScreenRange(e,()=>this.applySize(this.size))}setScrimColor(e){this.scrim.setScrimColor(e)}setScrimBlur(e){this.scrim.setScrimBlur(e)}setScrimInteractive(e){this.scrim.setScrimInteractive(e)}setScrim(e){this.scrim.setScrim(e,()=>this.applySize(this.size))}setScrimMode(e){this.scrim.setScrimMode(e,()=>this.applySize(this.size))}setScrimTapToClose(e){this.scrim.setScrimTapToClose(e)}setScrimEnabled(e){this.scrim.setScrimEnabled(e,()=>this.applySize(this.size))}setScrimOverlay(e){return this.scrim.setScrimOverlay(e)}addAnchor(e){if(this.destroyed||typeof document>"u")return()=>{};this.anchorHost||(this.anchorHost=this.rootEl??this.element.parentElement??document.body,this.anchorHost.style.setProperty("--bs-size",`${this.size}px`),this.anchorHost.style.setProperty("--bs-progress",String(this.computeProgress(this.size))));let t=si({mode:this.mode,host:this.anchorHost,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(s,r)=>this.on(s,r),isDestroyed:()=>this.destroyed},e);t.syncZ(this.stackZ+1),this.anchors.push(t);let n=()=>{let s=this.anchors.indexOf(t);s!==-1&&(this.anchors.splice(s,1),t.detach())};return this.teardowns.add(n),n}setScrimStages(e){if(this.destroyed||typeof document>"u")return()=>{};if(this.detachScrimStages?.(),this.detachScrimStages=null,!e)return()=>{};let t=this.screenComponent?.parentElement;if(!t)return console.warn("[BottomSheet] setScrimStages: no scrim element mounted \u2014 pass `scrim` to the engine first."),()=>{};let n=ai({mode:this.mode,host:t,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(r,a)=>this.on(r,a),isDestroyed:()=>this.destroyed},e),s=()=>{this.detachScrimStages===s&&(this.detachScrimStages=null),n()};return this.detachScrimStages=s,this.teardowns.add(()=>this.detachScrimStages?.()),s}getScrimState(){return{mode:this.scrim.scrimMode,enabled:this.scrim.scrimEnabled}}setSnapPoints(e,t){if(this.destroyed)return;this.animation.cancel(),this.newCycle(),this.snapPointsRaw=e,me(e),this.auditDuplicateSnapIds(e),this.snaps.setRaw(e),t&&this.snaps.setAllowedIds(t),this.scrollCache.clear(),this.scrim.invalidateOpacityCache();let n=this.snaps.findById(this.activeId);n&&this.applySize(n.size),this.updateAriaSlider()}recompute(){if(this.destroyed||(this.resolveMaxHeightCap(),this.snaps.recompute(),this.clampToMaxHeight(),this.scrim.invalidateOpacityCache(),this.gesture?.isDragging))return;let e=this.snaps.findById(this.activeId);e&&(this.size=e.size,this.applySize(this.size),this.updateAriaSlider())}destroy(){this.destroyed=!0,this.opening=!1,this.currentAbort.abort(),this.currentViewTransition?.skipTransition?.(),this.currentViewTransition=null,this.bus.clear(),this.animation.cancel(),this.gesture?.forceClearDragState(),this.teardowns.drain(),this.scrim.destroy(),this.animation.destroy(),this.lifecycle.destroy(),this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents="");for(let e of[this.anchorHost,this.scrimParent,this.rootEl])e&&(e.style.removeProperty("--bs-size"),e.style.removeProperty("--bs-progress"));this.screenComponent&&(this.screenComponent.style.opacity="",this.screenComponent.style.display=""),this.sizeWriteSentinel.invalidate(),this.progressWriteSentinel.invalidate()}emit(e,t){this.bus.emit(e,t)}newCycle(){return this.allowOvershoot=!1,this.opening=!1,this.currentAbort.abort(),this.currentAbort=new AbortController,this.currentAbort.signal}emitBeforeSnap(e,t){let n=!1,s=!1;return this.emit("before-snap",{id:e.id,size:e.size,previousId:t,cancel:()=>{if(s){console.warn("[BottomSheet] before-snap.cancel() called asynchronously \u2014 ignored. cancel() must be invoked synchronously inside the listener.");return}n=!0}}),s=!0,n}emitBeforeClose(e){let t=!1,n=!1;return this.emit("before-close",{reason:e,cancel:()=>{if(n){console.warn("[BottomSheet] before-close.cancel() called asynchronously \u2014 ignored. cancel() must be invoked synchronously inside the listener.");return}t=!0}}),n=!0,t}applyAutoAriaLabelledBy(){if(typeof document>"u"||!this.lifecycle.focusTrapEnabled||this.element.getAttribute("aria-labelledby"))return;let e=this.handle??this.element,t=e.querySelector("[data-bs-title]")??e.querySelector("h1,h2,h3,h4,h5,h6");t&&(t.id||(t.id=ue("bs-title")),this.element.setAttribute("aria-labelledby",t.id))}recomputeSnaps(){this.resolveMaxHeightCap(),this.snaps.setRaw(this.snapPointsRaw),this.clampToMaxHeight(),this.scrim.invalidateOpacityCache()}auditDuplicateSnapIds(e){let t=new Set;for(let n of e)t.has(n.id)&&console.warn(`[BottomSheet] duplicate snap id "${n.id}" \u2014 only the first occurrence is reachable.`),t.add(n.id)}getAllowedRange(){return this.snaps.getAllowedRange()}allowedIdsBySize(){return this.snaps.getAllowedIds().slice().sort((e,t)=>(this.snaps.findById(e)?.size??0)-(this.snaps.findById(t)?.size??0))}updateAriaSlider(){this.aria.setValue(this.allowedIdsBySize(),this.activeId)}registerInStack(){this.teardowns.add(A.push({id:this.id,setZIndex:e=>{this.stackZ=e,this.element.style.zIndex=String(e),this.backdrop&&(this.backdrop.style.zIndex=String(e-1));for(let t of this.anchors)t.syncZ(e+1)},setIsTop:e=>{this.isTopSheet=e},isOpen:()=>this.size>0||this.opening,setDepth:e=>this.applyStackDepth(e)}))}applyStackDepth(e){if(!this.stackEffectEnabled)return;if(this.element.setAttribute("data-stack-depth",String(e)),!this.stackEffectPrimed){this.stackEffectPrimed=!0;let n=this.mode==="bottom"||this.mode==="top";this.element.style.transformOrigin=n?"50% 100%":"0% 50%",this.element.style.transition="scale 320ms cubic-bezier(0.29, 1.04, 0.84, 0.99)"}let t=Math.max(1-e*.04,.86);this.element.style.scale=t===1?"":String(t)}attach(){this.gesture=new ie({handle:this.handle,element:this.element,mode:this.mode,getRoot:()=>this.rootEl,getDragContext:()=>{let e=this.dragContextBuf,t=this.getAllowedRange();return e.size=this.size,e.maxAxisSize=this.snaps.getMaxAxisSize(),e.range.min=t.min,e.range.max=t.max,e.rubberBandEnabled=this.rubberBandEnabled,e},getDisableDrag:()=>this.disableDragFlag,cancelAnimation:()=>this.animation.cancel(),applySize:e=>this.applySize(e),animateTo:(e,t)=>this.animation.animateTo(e,t),settleAfterDrag:(e,t,n)=>this.settleAfterDrag(e,t,n),emit:(e,t)=>this.emit(e,t),listenerCount:e=>this.bus.listenerCount(e)}),this.teardowns.add(this.gesture.install());try{this.attachFeatures()}catch(e){this.teardowns.drain();try{this.scrim.destroy()}catch(t){queueMicrotask(()=>{throw t})}try{this.animation.destroy()}catch(t){queueMicrotask(()=>{throw t})}try{this.lifecycle.destroy()}catch(t){queueMicrotask(()=>{throw t})}throw this.destroyed=!0,e}}attachFeatures(){if(this.scrollContainer&&this.teardowns.add(pt({container:this.scrollContainer,isDragging:()=>this.gesture?.isDragging??!1,isAnimating:()=>this.animation.isAnimating,getAllowedIds:()=>this.allowedIdsBySize(),getActiveId:()=>this.activeId,snapTo:e=>{this.snapTo(e)}})),typeof window<"u"){if(this.teardowns.add(gt({element:this.element,getMode:()=>this.mode,isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,resolveActiveSnap:()=>this.snaps.findById(this.activeId),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),getSize:()=>this.size,setMaxAxisSize:e=>{this.snaps.setMaxAxisSize(e)},setSize:e=>{this.size=e},recomputeSnaps:()=>this.recomputeSnaps(),applySize:e=>this.applySize(e),cancelInFlight:()=>{this.animation.cancel()},newCycle:()=>{this.newCycle()},isAnimating:()=>this.animation.isAnimating,resyncAfterCancel:()=>this.resyncAfterResize()})),this.lifecycle.closeOnEscape){let e=t=>{this.destroyed||t.defaultPrevented||this.canDismiss()&&t.key==="Escape"&&this.isTopSheet&&this.size>0&&this.close("escape")};document.addEventListener("keydown",e),this.teardowns.add(()=>document.removeEventListener("keydown",e))}this.teardowns.add(mt({element:this.element,isVerticalAxis:()=>this.mode==="bottom"||this.mode==="top",isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,recomputeSnaps:()=>this.recomputeSnaps(),resolveActiveSnap:()=>this.snaps.findById(this.activeId),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),getSize:()=>this.size,setMaxAxisSize:e=>{this.snaps.setMaxAxisSize(e)},setSize:e=>{this.size=e},applySize:e=>this.applySize(e)}))}this.teardowns.add(Tt({handle:this.handle,mode:this.mode,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.allowedIdsBySize(),getActiveId:()=>this.activeId,snapTo:e=>{this.snapTo(e)}})),this.scrim.attach()}settleAfterDrag(e,t,n="touch"){let s=this.newCycle(),r=this.snaps.findDragSettleTarget({delta:e,velocity:t,pointerKind:n,size:this.size,activeId:this.activeId,flickVelocity:this.flickVelocity,dragThreshold:this.dragThreshold});if(!r){this.clearWillChangeIfIdle();return}let a=this.activeId;if(r.id===a&&r.size===this.size){this.clearWillChangeIfIdle();return}if(this.emitBeforeSnap(r,a)){let p=this.snaps.findById(a);p&&this.animation.animateTo(p.size,0);return}let l=this.size,h=this.snaps.findById(a)?.size;this.scrollCache.cache(a,l,r.size),this.activeId=r.id,h===0&&r.size>0&&(this.opening=!0,A.promote(this.id));let d=this.snaps.getMaxAxisSize(),c=d>0?Math.min(r.size,d):r.size;this.allowOvershoot=!0,this.animation.animateTo(c,t).then(()=>{s.aborted||(this.allowOvershoot=!1,this.opening=!1,this.completeSnap(r.id,r.size,l,h===0,!0))})}clearWillChangeIfIdle(){this.animation.isAnimating||this.gesture?.isDragging||(this.element.style.willChange="")}haptic(){if(typeof navigator<"u"&&"vibrate"in navigator)try{navigator.vibrate(dn)}catch{}}applySize(e){let t=this.snaps.getMaxAxisSize(),n=t>0&&e>t&&!this.gesture?.isDragging&&!this.allowOvershoot?t:e;this.size=n;let s=t-n,r=this.element.style;r.transform=this.transformTemplate(s),this.sizeWriteSentinel.shouldWrite(n,.5)&&(r.setProperty("--bs-size",`${n}px`),this.scrimParent&&this.scrimParent.style.setProperty("--bs-size",`${n}px`),this.anchorHost&&this.anchorHost!==this.scrimParent&&this.anchorHost.style.setProperty("--bs-size",`${n}px`),this.rootEl&&this.rootEl!==this.scrimParent&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-size",`${n}px`));let a=this.computeProgress(n),l=this.progressWriteSentinel.shouldWrite(a,.005);l&&(r.setProperty("--bs-progress",String(a)),this.anchorHost&&this.anchorHost.style.setProperty("--bs-progress",String(a)),this.rootEl&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-progress",String(a))),this.scrim.applyOpacity(a,l),l&&this.bus.listenerCount("progress")>0&&(this.progressPayload.value=a,this.progressPayload.size=n,this.emit("progress",this.progressPayload))}computeProgress(e){let{min:t,max:n}=this.getAllowedRange(),s=Math.min(n,this.snaps.getMaxAxisSize());return s<=t?0:Math.min(Math.max((e-t)/(s-t),0),1)}handleOpen(){A.promote(this.id);try{this.lifecycle.install()}catch(e){this.destroyed||this.newCycle(),this.handleClose(),this.applySize(0),this.activeId=this.snapPointsRaw.find(t=>t.id==="closed")?.id??this.activeId,this.size=0,queueMicrotask(()=>{throw e})}}resyncAfterResize(){if(this.destroyed)return;let e=this.snaps.findById(this.activeId);e&&(this.updateAriaSlider(),this.emit("snap",{id:e.id,size:this.size,progress:this.computeProgress(this.size)}),e.size>0&&!this.lifecycle.isInstalled?this.emitOpenSequence(e.id):e.size===0&&this.lifecycle.isInstalled&&this.emitCloseSequence())}handleClose(){this.opening=!1,this.lifecycle.release(),A.update()}}});var ui,mi=m(()=>{"use strict";ui=':where(.bs-root){--bs-surface-d:#ffffff;--bs-surface-border-d:rgba(225,227,237,1);--bs-radius-d:20px;--bs-handle-color-d:rgba(26,22,20,0.3);--bs-handle-width:40px;--bs-handle-height:5px;--bs-z-backdrop:90;--bs-z-sheet:100;--bs-header-min-height:80px;--bs-backdrop-color-d:rgba(0,0,0,0.5);--bs-scrim-color-d:transparent;--bs-scrim-blur:0px;--bs-z-scrim:calc(var(--bs-z-sheet) - 1);--bs-size:0px;--bs-progress:0}.bs-backdrop{position:fixed;inset:0;background:var(--bs-backdrop-color,var(--bs-backdrop-color-d));opacity:0;pointer-events:none;z-index:var(--bs-z-backdrop);transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-backdrop,.bs-root[data-animating="true"] .bs-backdrop{transition:none}.bs-sheet{position:fixed;background:var(--bs-surface,var(--bs-surface-d));box-shadow:var(--bs-shadow,var(--bs-shadow-auto,none));z-index:var(--bs-z-sheet);pointer-events:auto;overflow:hidden;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;user-select:none;overscroll-behavior:contain}.bs-sheet[data-mode="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));padding-bottom:env(safe-area-inset-bottom);--bs-shadow-auto:0 calc(var(--bs-progress,0) * -2px - 3px) calc(var(--bs-progress,0) * 18px + 12px) rgba(0,0,0,calc(var(--bs-progress,0) * 0.15 + 0.12))}.bs-sheet[data-mode="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom:1px solid var(--bs-surface-border,var(--bs-surface-border-d));flex-direction:column-reverse;--bs-shadow-auto:0 3px 12px rgba(0,0,0,0.12);padding-top:env(safe-area-inset-top)}.bs-sheet[data-mode="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:3px 0 12px rgba(0,0,0,0.12)}.bs-sheet[data-mode="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:-3px 0 12px rgba(0,0,0,0.12)}.bs-sheet[data-mode="left"] .bs-content{padding-right:36px}.bs-sheet[data-mode="right"] .bs-content{padding-left:36px}.bs-handle{flex-shrink:0;min-height:44px;display:flex;flex-direction:column;justify-content:center;padding:var(--bs-handle-padding,8px 16px 4px);cursor:grab;touch-action:none;user-select:none;background:var(--bs-surface,var(--bs-surface-d));-webkit-tap-highlight-color:transparent;outline:none;position:relative}.bs-handle:active{cursor:grabbing}.bs-handle:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:var(--bs-radius,var(--bs-radius-d))}.bs-handle::before{content:"";display:block;width:var(--bs-handle-width);height:var(--bs-handle-height);background:var(--bs-handle-color,var(--bs-handle-color-d));border-radius:calc(var(--bs-handle-height) / 2);margin:0 auto 8px;transition:width 0.15s ease,background 0.15s ease,transform 0.15s ease;pointer-events:none}.bs-sheet[data-mode="left"] .bs-handle,.bs-sheet[data-mode="right"] .bs-handle{position:absolute;top:0;bottom:0;width:28px;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;background:var(--bs-surface,var(--bs-surface-d));z-index:1;overflow:hidden}.bs-sheet[data-mode="left"] .bs-handle>*,.bs-sheet[data-mode="right"] .bs-handle>*{display:none}.bs-sheet[data-mode="left"] .bs-handle{right:0;border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="right"] .bs-handle{left:0;border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="left"] .bs-handle::before,.bs-sheet[data-mode="right"] .bs-handle::before{width:var(--bs-handle-height);height:var(--bs-handle-width);margin:0}.bs-sheet:hover .bs-handle::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 15%)}.bs-handle:active::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 35%);transform:scaleX(1.15)}.bs-handle.bs-handle--ticks::after{content:"";display:block;position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:calc(var(--bs-handle-width) * 2);height:3px;background-image:radial-gradient( circle,var(--bs-handle-color,var(--bs-handle-color-d)) 0 1.5px,transparent 1.6px );background-size:8px 3px;background-repeat:repeat-x;background-position:center;opacity:0;transition:opacity 0.18s ease-out;pointer-events:none}.bs-root[data-dragging="true"] .bs-handle.bs-handle--ticks::after{opacity:0.4}.bs-sheet[data-mode="top"] .bs-handle.bs-handle--ticks::after{bottom:auto;top:6px}.bs-sheet[data-mode="left"] .bs-handle.bs-handle--ticks::after,.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:3px;height:calc(var(--bs-handle-width) * 2);background-size:3px 8px;background-repeat:repeat-y;margin-left:calc(var(--bs-handle-height) + 6px)}.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{margin-left:calc(-1 * (var(--bs-handle-height) + 6px))}.bs-header{flex:0 0 auto;padding:var(--bs-header-padding,0 16px 8px);background:var(--bs-surface,var(--bs-surface-d))}.bs-content{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;user-select:text;padding:var(--bs-content-padding,0 16px 16px)}.bs-footer{flex:0 0 auto;padding:var(--bs-footer-padding,12px 16px calc(12px + env(safe-area-inset-bottom)));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-mode="bottom"]:has(.bs-footer:not([hidden]):has(*)){padding-bottom:0}.bs-header:not(:has(*)),.bs-footer:not(:has(*)),.bs-header[hidden],.bs-footer[hidden]{display:none}.bs-screen{position:absolute;inset:0;pointer-events:none;z-index:var(--bs-z-scrim);background:var(--bs-scrim-color,var(--bs-scrim-color-d));transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-screen,.bs-root[data-animating="true"] .bs-screen{transition:none}.bs-scrim-overlay{z-index:calc(var(--bs-z-sheet) + 1);pointer-events:none}.bs-button-slot{position:fixed;z-index:calc(var(--bs-z-sheet) + 1);pointer-events:auto}.bs-button-slot[data-side="left"]{left:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-side="right"]{right:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="top"]{bottom:auto;top:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="left"]{left:calc(var(--bs-size,0px) + 12px);right:auto;bottom:auto;top:16px}.bs-button-slot[data-mode="right"]{right:calc(var(--bs-size,0px) + 12px);left:auto;bottom:auto;top:16px}@media (prefers-reduced-motion:reduce){.bs-backdrop,.bs-handle::before,.bs-button-slot[data-side="left"],.bs-button-slot[data-side="right"]{transition:none !important}}@media (prefers-color-scheme:dark){:where(.bs-root){--bs-surface-d:#1a1a1d;--bs-surface-border-d:rgba(255,255,255,0.08);--bs-handle-color-d:rgba(255,255,255,0.45);--bs-shadow-auto:0 -3px 16px rgba(0,0,0,0.5)}}.bs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:where(.ovl-root){--ovl-surface:var(--bs-surface,var(--bs-surface-d,#ffffff));--ovl-surface-border:var(--bs-surface-border,var(--bs-surface-border-d,rgba(0,0,0,0.08)));--ovl-shadow:0 -8px 40px rgba(0,0,0,0.35);--ovl-radius:var(--bs-radius,var(--bs-radius-d,20px));--ovl-backdrop-color:rgba(0,0,0,0.5);--ovl-z-backdrop:200;--ovl-z-panel:201}.ovl-backdrop{position:fixed;inset:0;background:var(--ovl-backdrop-color);opacity:0;pointer-events:none;z-index:var(--ovl-z-backdrop)}.ovl-panel{position:fixed;background:var(--ovl-surface);box-shadow:var(--ovl-shadow);z-index:var(--ovl-z-panel);-webkit-tap-highlight-color:transparent;outline:none;transition:transform 0.32s cubic-bezier(0.29,1.24,0.84,0.99),opacity 0.32s ease-out}.ovl-panel[data-state="open"]{transform:translate3d(0,0,0);opacity:1}@starting-style{.ovl-panel[data-edge="bottom"][data-state="open"]{transform:translate3d(0,100%,0);opacity:0}.ovl-panel[data-edge="top"][data-state="open"]{transform:translate3d(0,-100%,0);opacity:0}.ovl-panel[data-edge="left"][data-state="open"]{transform:translate3d(-100%,0,0);opacity:0}.ovl-panel[data-edge="right"][data-state="open"]{transform:translate3d(100%,0,0);opacity:0}}.ovl-panel[data-edge="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--ovl-radius);border-top-right-radius:var(--ovl-radius);border-top:1px solid var(--ovl-surface-border);padding-bottom:env(safe-area-inset-bottom)}.ovl-panel[data-edge="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-bottom:1px solid var(--ovl-surface-border);padding-top:env(safe-area-inset-top)}.ovl-panel[data-edge="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-right:1px solid var(--ovl-surface-border)}.ovl-panel[data-edge="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--ovl-radius);border-bottom-left-radius:var(--ovl-radius);border-left:1px solid var(--ovl-surface-border)}@media (prefers-reduced-motion:reduce){.ovl-panel,.ovl-backdrop{transition:none !important}}'});var ae,fi,gi,bi=m(()=>{"use strict";ae=i=>{let e=document.createElement("slot");return e.name=i,e},fi=(i,e)=>{let t=document.createElement("div");t.className=e,t.setAttribute("part",i);let n=ae(i);t.appendChild(n);let s=()=>{t.hidden=n.assignedNodes({flatten:!0}).length===0};return n.addEventListener("slotchange",s),s(),t},gi=()=>{let i=document.createElement("div");i.className="bs-root";let e=document.createElement("div");e.className="bs-backdrop",e.setAttribute("part","backdrop");let t=document.createElement("div");t.className="bs-screen",t.setAttribute("part","screen"),t.appendChild(ae("screen"));let n=document.createElement("section");n.className="bs-sheet",n.setAttribute("part","sheet"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false");let s=document.createElement("div");s.className="bs-button-slot",s.setAttribute("data-side","left"),s.setAttribute("part","left-button"),s.appendChild(ae("leftButton"));let r=document.createElement("div");r.className="bs-button-slot",r.setAttribute("data-side","right"),r.setAttribute("part","right-button"),r.appendChild(ae("rightButton"));let a=document.createElement("div");a.className="bs-handle",a.setAttribute("part","handle"),a.setAttribute("role","slider"),a.setAttribute("tabindex","0"),a.setAttribute("aria-label","Resize sheet");let l=fi("header","bs-header"),h=document.createElement("div");h.className="bs-content",h.setAttribute("part","content"),h.setAttribute("tabindex","0"),h.setAttribute("role","region"),h.setAttribute("aria-label","Sheet content");let d=document.createElement("slot");h.appendChild(d);let c=fi("footer","bs-footer"),p=document.createElement("span");p.className="bs-sr-announce",p.setAttribute("role","status"),p.setAttribute("aria-live","polite"),p.setAttribute("aria-atomic","true"),p.style.cssText="position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);",n.append(a,l,h,c),i.append(e,t,n,s,r,p);let u=document.createDocumentFragment();return u.appendChild(i),{fragment:u,refs:{sheet:n,handle:a,header:l,content:h,footer:c,backdrop:e,screen:t,leftButton:s,rightButton:r,announcer:p}}}});var Ae,we,Ce,Me,ze,yi,ke,Re,De,Ie,Oe,Le,_,B,F,Pe,N,K,He,V,U,w,Si,xi,cn,vi,Ti,hn,pn,Ei,Ai,le,W,un,mn,wi,Ci=m(()=>{"use strict";Ae="snap-points",we="allowed",Ce="initial",Me="mode",ze="backdrop",yi="stylesheet",ke="animation",Re="focus-trap",De="close-on-escape",Ie="lock-body-scroll",Oe="sheet-label",Le="stack-effect",_="persistent",B="disable-close",F="disable-drag",Pe="close-on-route-change",N="radius",K="max-height",He="return-focus-to",V="backdrop-color",U="scrim-color",w="snap",Si=new Set([N,K,V,U,w,_,B,F]),xi=[Ae,we,Ce,Me,ze,ke,Re,De,Ie,Oe,Le,_,B,F,Pe,N,K,He,V,U,w],cn=i=>!!i&&typeof i=="object"&&typeof i.id=="string"&&(typeof i.size=="number"||typeof i.size=="string"),vi=[{id:"full",size:"full"}],Ti=i=>{if(!i)return vi;try{let e=JSON.parse(i);if(Array.isArray(e)&&e.length>0&&e.every(cn))return e;if(Array.isArray(e))return vi}catch{}return i.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let[t,n]=e.split(":").map(a=>a.trim()),s=Number(n),r=Number.isFinite(s)?s:n;return{id:t??"default",size:r}})},hn=["bottom","top","left","right"],pn=["spring","tween","ios-spring","material-bounce","linear","snappy"],Ei=i=>i&&hn.includes(i)?i:"bottom",Ai=i=>i&&pn.includes(i)?i:void 0,le=i=>i?i.split(",").map(e=>e.trim()).filter(Boolean):void 0,W=i=>{if(i===null)return;let e=Number(i);return Number.isFinite(e)&&i.trim()!==""?e:i},un=["top-left","top-center","top-right","center-left","center","center-right","bottom-left","bottom-center","bottom-right","sheet-top-left","sheet-top-center","sheet-top-right","dock-bottom","dock-top"],mn=["fade","scale","slide","pop","none"],wi=i=>{let e=i.getAttribute("data-position"),t=i.getAttribute("data-animation"),n=le(i.getAttribute("data-show-on")),s=le(i.getAttribute("data-fade-range")),r=s?.length===2&&s.every(a=>Number.isFinite(Number(a)))?[Number(s[0]),Number(s[1])]:void 0;return{position:e&&un.includes(e)?e:void 0,inset:i.getAttribute("data-inset")??void 0,showOn:n,fadeRange:r,interactive:i.getAttribute("data-interactive")!=="false",animation:t&&mn.includes(t)?t:void 0}}});var Mi={};Ve(Mi,{BottomSheetElement:()=>k,defineBottomSheet:()=>_e});var fn,k,_e,Be=m(()=>{"use strict";pi();mi();bi();Ci();fn=typeof HTMLElement<"u"?HTMLElement:class{},k=class extends fn{constructor(){super();o(this,"engine",null);o(this,"root");o(this,"offHandlers",[]);o(this,"refs");o(this,"backdropClickHandler",null);o(this,"stylesheetLinked",!1);o(this,"declarativeAnchors",[]);o(this,"lastActiveId",null);this.root=this.attachShadow({mode:"open"});let t=document.createElement("style");t.textContent=ui,this.root.appendChild(t);let n=document.createElement("style");n.textContent=[":host { display: contents; }",".bs-handle:focus-visible {"," outline: 2px solid currentColor;"," outline-offset: -2px;"," border-radius: var(--bs-radius, 20px);","}","@media (forced-colors: active) {"," .bs-handle:focus-visible { outline: 2px solid CanvasText; }","}"].join(`
|
|
2
|
-
`),this.root.appendChild(n);let{fragment:s,refs:r}=
|
|
1
|
+
"use strict";var surdeddd_bottomSheet=(()=>{var j=Object.defineProperty;var Di=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var Li=Object.prototype.hasOwnProperty;var Pi=(t,e,i)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var m=(t,e)=>()=>(t&&(e=t(t=0)),e);var We=(t,e)=>{for(var i in e)j(t,i,{get:e[i],enumerable:!0})},Hi=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Oi(e))!Li.call(t,s)&&s!==i&&j(t,s,{get:()=>e[s],enumerable:!(n=Di(e,s))||n.enumerable});return t};var _i=t=>Hi(j({},"__esModule",{value:!0}),t);var o=(t,e,i)=>Pi(t,typeof e!="symbol"?e+"":e,i);var pe,w,$e=m(()=>{"use strict";pe=class{constructor(){o(this,"entries",[])}push(e){return this.entries.push(e),this.recompute(),()=>this.remove(e.id)}remove(e){let i=this.entries.findIndex(n=>n.id===e);i!==-1&&(this.entries.splice(i,1),this.recompute())}promote(e){let i=this.entries.findIndex(n=>n.id===e);if(i!==-1){if(i!==this.entries.length-1){let[n]=this.entries.splice(i,1);this.entries.push(n)}this.recompute()}}update(){this.recompute()}size(){return this.entries.length}depthOf(e){let i=[];for(let s of this.entries)(!s.isOpen||s.isOpen())&&i.push(s);let n=i.findIndex(s=>s.id===e);return n===-1?0:i.length-1-n}clear(){this.entries=[]}recompute(){let e=null,i=[];for(let n of this.entries)(!n.isOpen||n.isOpen())&&(e=n,i.push(n));!e&&this.entries.length>0&&(e=this.entries[this.entries.length-1]),this.entries.forEach((n,s)=>{if(n.setZIndex(100+s*10),n.setIsTop(n===e),n.setDepth){let r=i.indexOf(n);n.setDepth(r===-1?0:i.length-1-r)}})}},w=new pe});function Ye(t){switch(t){case"bottom":return e=>`translate3d(0, ${e}px, 0)`;case"top":return e=>`translate3d(0, ${-e}px, 0)`;case"left":return e=>`translate3d(${-e}px, 0, 0)`;case"right":return e=>`translate3d(${e}px, 0, 0)`}}var z,Z=m(()=>{"use strict";z=t=>t==="left"||t==="right"?"width":"height"});function me(t){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${t}-${crypto.randomUUID()}`:(ue[t]=(ue[t]??0)+1,`${t}-${ue[t]}`)}var ue,qe=m(()=>{"use strict";ue={}});function Ge(){let t=new Map;return{on(e,i){let n=t.get(e);return n||(n=new Set,t.set(e,n)),n.add(i),()=>{n.delete(i)}},emit(e,i){let n=t.get(e);if(n)for(let s of[...n])s(i)},listenerCount(e){return t.get(e)?.size??0},clear(){t.clear()}}}var je=m(()=>{"use strict"});var x,Ze,Bi,Qe,Xe,Fi,X,Je=m(()=>{"use strict";x=null,Ze="data-bs-probe",Bi=t=>{if(typeof document>"u")return null;if(!x||!x.isConnected){let e=document.querySelector(`[${Ze}]`);e?x=e:(x=document.createElement("div"),x.setAttribute("aria-hidden","true"),x.setAttribute(Ze,""),x.style.cssText="position:absolute;visibility:hidden;pointer-events:none;contain:strict;left:0;top:0;width:0;height:0;",document.body.appendChild(x))}return t==="vertical"?(x.style.width="0",x.style.height=""):(x.style.height="0",x.style.width=""),x},Qe=t=>t==="bottom"||t==="top",Xe=t=>typeof window>"u"?0:Qe(t)?window.innerHeight:window.innerWidth,Fi=/^(-?\d+(?:\.\d+)?)%$/,X=(t,e,i)=>{if(typeof t=="number")return Math.max(0,t);if(t==="full")return Xe(e);if(t==="fit"||t==="content")return Math.max(0,i?.()??0);let n=t.match(Fi);if(n){let a=parseFloat(n[1])/100;return Math.max(0,Xe(e)*a)}let s=Qe(e)?"vertical":"horizontal",r=Bi(s);return r?s==="vertical"?(r.style.height=t,Math.max(0,r.getBoundingClientRect().height)):(r.style.width=t,Math.max(0,r.getBoundingClientRect().width)):0}});function y(...t){typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.warn(...t)}var L=m(()=>{"use strict"});var et,Ni,fe,Ki,tt,P,Vi,Ui,Wi,it,H=m(()=>{"use strict";Je();L();et=(t,e,i)=>t.map(n=>{let s=X(n.size,e,i);return!Number.isFinite(s)||s<0?(y(`[BottomSheet] snap "${n.id}" resolved to invalid size (${String(n.size)} \u2192 ${s}); clamped to 0.`),{id:n.id,size:0}):{id:n.id,size:s}}).sort((n,s)=>n.size-s.size),Ni=/(^|[^a-z])vh\b/i,fe=t=>{for(let e of t)typeof e.size=="string"&&Ni.test(e.size)&&y(`[BottomSheet] snap "${e.id}" uses "vh" \u2014 prefer "dvh" on mobile (iOS Safari URL bar makes vh unstable). See https://web.dev/blog/viewport-units`)},Ki=(t,e,i,n=0,s=0)=>{let r=e.filter(c=>i.includes(c.id));if(r.length===0)return null;let a=t+n*s,l=r[0],h=Math.abs(a-l.size);for(let c=1;c<r.length;c++){let d=r[c],p=Math.abs(a-d.size);p<h&&(l=d,h=p)}return l},tt=(t,e)=>{let i=t.filter(n=>e.includes(n.id));return i.length===0?{min:0,max:0}:{min:i[0].size,max:i[i.length-1].size}},P=(t,e)=>e.find(i=>i.id===t)??null,Vi=.4,Ui=12,Wi=.15,it=t=>{let e=Math.abs(t.velocity),i=t.pointerKind==="mouse"?Vi:t.flickVelocity,n=t.pointerKind==="mouse"?Ui:t.dragThreshold,s=0;if((e>i||e>Wi)&&(s=t.velocity>0?1:-1),Math.abs(t.delta)<n&&s===0)return P(t.activeId,t.resolved);let r=e>i?Math.min(e*180,t.maxAxisSize):0;return Ki(t.size,t.resolved,t.allowed,s,r)}});function ge(t,e,i){let n=!1,s=!1;return t({...e,cancel:()=>{if(s){y(`[BottomSheet] ${i}.cancel() called asynchronously \u2014 ignored. cancel() must be invoked synchronously inside the listener.`);return}n=!0}}),s=!0,n}var nt=m(()=>{"use strict";L()});var Q,st=m(()=>{"use strict";H();Q=class{constructor(e,i,n,s,r){o(this,"mode",n);o(this,"measureFit",s);o(this,"onMaxAxisSizeChange",r);o(this,"raw");o(this,"allowedIds");o(this,"resolved",[]);o(this,"maxAxisSize",0);o(this,"rangeCache",null);o(this,"notified",!1);this.raw=e,this.allowedIds=i??e.map(a=>a.id),this.recompute()}recompute(){let e=this.measureFit,i,n=e?()=>i??(i=e()):void 0;this.resolved=et(this.raw,this.mode,n);let s=this.resolved.reduce((a,l)=>l.size>a?l.size:a,0);this.rangeCache=null;let r=s!==this.maxAxisSize||!this.notified;this.maxAxisSize=s,this.notified=!0,r&&this.onMaxAxisSizeChange?.(this.maxAxisSize)}setRaw(e){this.raw=e,this.recompute()}setAllowedIds(e){this.allowedIds=e,this.rangeCache=null}findById(e){return P(e,this.resolved)}findDragSettleTarget(e){return it({...e,resolved:this.resolved,allowed:this.allowedIds,maxAxisSize:this.maxAxisSize})}getAllowedRange(){return this.rangeCache??(this.rangeCache=tt(this.resolved,this.allowedIds))}getResolvedSnaps(){return this.resolved}getAllowedIds(){return this.allowedIds}getMaxAxisSize(){return this.maxAxisSize}setMaxAxisSize(e){this.maxAxisSize=e,this.onMaxAxisSizeChange?.(e)}}});function rt(t){if(!t||typeof window>"u"||typeof localStorage>"u")return null;try{return localStorage.getItem(t)}catch{return null}}function ot(t,e){return t.on("snap",({id:n})=>{if(!(typeof window>"u")&&!(typeof localStorage>"u"))try{localStorage.setItem(e,n)}catch{}})}var be=m(()=>{"use strict"});function at(t){let{ms:e}=t;if(e===void 0||e<=0)return()=>{};let i=null,n=()=>{i!==null&&(clearTimeout(i),i=null)},s=()=>{if(t.isDestroyed()||t.isDragging())return;let l=t.resolveSnap(t.getActiveId());if(!l||l.size===0)return;let h=null;for(let c of t.getAllowedIds()){let d=t.resolveSnap(c);!d||d.size<=0||(!h||d.size<h.size)&&(h=d)}h&&(h.id===l.id||h.size>=l.size||t.snapTo(h.id))},r=()=>{n(),!t.isDestroyed()&&(i=setTimeout(()=>{i=null,s()},e))},a=t.on("snap",()=>r());return(t.resolveSnap(t.getActiveId())?.size??0)>0&&r(),()=>{n(),a()}}var lt=m(()=>{"use strict"});function dt(t,e){if(t.length!==0){for(let i of t)if(i!==e)try{if(i.state.size===0)continue;let n=i.getAllowedIds(),s=i.getResolvedSnaps(),r=l=>s.find(h=>h.id===l)?.size??0,a=n.find(l=>r(l)>0);a&&a!==i.state.activeId&&i.snapTo(a)}catch(n){queueMicrotask(()=>{throw n})}}}var ct=m(()=>{"use strict"});function pt(t){if(typeof window>"u")return()=>{};if(!t.routedTo&&!t.closeOnBack)return()=>{};let e=!1,i=null,n=()=>{if(i){let c=A.indexOf(i);c!==-1&&A.splice(c,1)}let h=i?.consumed??!1;i=null,e&&!h?(e=!1,Yi()):e=!1},s=()=>{try{t.routedTo!==void 0?history.pushState({__bsRouted:t.sheetId},"",t.routedTo):history.pushState({__bsSheet:t.sheetId},""),e=!0}catch{e=!1}},r=()=>{if(i)return;let h={isOpen:()=>!t.isDestroyed()&&t.getSize()>0,isTop:()=>t.isTopSheet(),close:()=>t.close(),restore:()=>{t.isDestroyed()||i!==h||(h.consumed=!1,A.includes(h)||A.push(h),s())},consumed:!1};i=h,$i(),A.push(h),s()},a=t.on("open",r),l=t.on("close",n);return t.getSize()>0&&r(),()=>{a(),l(),n()}}function ut(t){if(typeof window>"u"||typeof history>"u")return()=>{};let e=()=>{t.isDestroyed()||t.getSize()<=0||t.close()},i=r=>{let a=history[r],l=function(...h){a.apply(this,h),e()};return history[r]=l,()=>{history[r]===l&&(history[r]=a)}};window.addEventListener("popstate",e);let n=i("pushState"),s=i("replaceState");return()=>{window.removeEventListener("popstate",e),n(),s()}}var A,ht,_,$i,Yi,mt=m(()=>{"use strict";A=[],ht=!1,_=0,$i=()=>{ht||typeof window>"u"||(ht=!0,window.addEventListener("popstate",()=>{if(_>0){_-=1;return}let t=null;for(let n=A.length-1;n>=0;n-=1){let s=A[n];if(s.isOpen()&&(t||(t=s),s.isTop())){t=s;break}}if(!t)return;t.consumed=!0;let e=A.indexOf(t);e!==-1&&A.splice(e,1);let i=t;Promise.resolve(i.close()).then(()=>{i.isOpen()&&i.restore()})}))},Yi=()=>{_+=1;try{history.back()}catch{_=Math.max(0,_-1)}}});function ft(t){let{container:e}=t,i=0,n=0,s=!1,r=h=>{let c=h.touches[0];c&&(i=c.clientY,n=e.scrollTop,s=!1)},a=h=>{let c=h.touches[0];c&&Math.abs(c.clientY-i)>60&&(s=!0)},l=h=>{if(!s||t.isDragging()||t.isAnimating()||e.scrollTop!==n)return;let c=h.changedTouches[0];if(!c)return;let d=c.clientY-i,p=e.scrollTop<=0,u=t.getAllowedIds(),g=u.indexOf(t.getActiveId());g!==-1&&(p&&d>60&&g>0?t.snapTo(u[g-1]):d<-60&&g<u.length-1&&t.snapTo(u[g+1]))};return e.addEventListener("touchstart",r,{passive:!0}),e.addEventListener("touchmove",a,{passive:!0}),e.addEventListener("touchend",l,{passive:!0}),()=>{e.removeEventListener("touchstart",r),e.removeEventListener("touchmove",a),e.removeEventListener("touchend",l)}}var gt=m(()=>{"use strict"});function bt(t){if(typeof window>"u"||!window.visualViewport)return()=>{};let e=window.visualViewport,i=null,n=()=>{i===null&&(i=requestAnimationFrame(()=>{if(i=null,t.isDestroyed())return;t.recomputeSnaps();let s=t.isVerticalAxis(),r=s?e.height:e.width,a=s?window.innerHeight:window.innerWidth,l=Math.max(0,Math.min(a,r)-8);l<t.getMaxAxisSize()&&t.setMaxAxisSize(l);let h=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let c=t.getMaxAxisSize();t.setSize(Math.min(t.getSize(),c));let d=t.resolveActiveSnap();d&&!t.isDragging()?(t.applySize(Math.min(d.size,c)),h&&t.resyncAfterCancel?.()):t.applySize(t.getSize())}))};return e.addEventListener("resize",n),()=>{e.removeEventListener("resize",n),i!==null&&cancelAnimationFrame(i)}}var vt=m(()=>{"use strict"});function yt(t){if(typeof window>"u")return()=>{};let e=()=>{if(t.isDestroyed())return;t.recomputeSnaps();let s=t.getMode(),a=s==="bottom"||s==="top"?window.innerHeight:window.innerWidth,l=t.getMaxAxisSize();a>0&&a<l&&t.setMaxAxisSize(a);let h=t.isAnimating?.()??!1;t.cancelInFlight(),t.newCycle();let c=t.resolveActiveSnap(),d=t.getMaxAxisSize(),p=Math.min(c?c.size:t.getSize(),d);t.setSize(p),c&&!t.isDragging()&&(t.applySize(p),h&&t.resyncAfterCancel?.())},i=null;typeof ResizeObserver<"u"?(i=new ResizeObserver(e),i.observe(document.documentElement)):window.addEventListener("resize",e),window.addEventListener("orientationchange",e);let n=()=>{t.isDestroyed()||document.hidden&&t.cancelInFlight()};return document.addEventListener("visibilitychange",n),()=>{i?.disconnect(),window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),document.removeEventListener("visibilitychange",n)}}var St=m(()=>{"use strict"});function xt(t){if(typeof ResizeObserver>"u")return()=>{};if(!t.hasFitSnap())return()=>{};let e=0,i=()=>{e||(e=requestAnimationFrame(()=>{e=0,!(t.isDestroyed()||t.isDragging())&&t.recompute()}))},n=new ResizeObserver(i);n.observe(t.handle);let s=t.scrollContainer,r=new Set,a=new Set,l=typeof HTMLSlotElement<"u",h=()=>d(),c=()=>{if(!(!s||!l))for(let u of Array.from(s.children))u instanceof HTMLSlotElement&&!a.has(u)&&(u.addEventListener("slotchange",h),a.add(u))},d=()=>{c();let u=qi(s);for(let g of r)u.includes(g)||(n.unobserve(g),r.delete(g));for(let g of u)r.has(g)||(n.observe(g),r.add(g));i()},p;return s&&(d(),typeof MutationObserver<"u"&&(p=new MutationObserver(d),p.observe(s,{childList:!0}))),()=>{n.disconnect(),p?.disconnect();for(let u of a)u.removeEventListener("slotchange",h);e&&cancelAnimationFrame(e)}}var qi,Tt=m(()=>{"use strict";qi=t=>{if(!t)return[];let e=typeof HTMLSlotElement<"u",i=[];for(let n of Array.from(t.children))if(e&&n instanceof HTMLSlotElement)for(let s of n.assignedElements())i.push(s);else i.push(n);return i}});function At(t){let e,i,n=()=>{let r=i;if(r===void 0){e=void 0;return}if(typeof r=="number"){e=r;return}if(typeof window>"u")return;let a=X(r,t.mode);e=a>0?a:void 0};return{setRadius(r){t.element.style.setProperty("--bs-radius",typeof r=="number"?`${r}px`:r)},setMaxHeight(r){let a=typeof r=="number"?`${r}px`:r,l=z(t.mode);t.element.style.setProperty(l==="height"?"max-height":"max-width",a),i=r,n(),t.recompute()},resolveCap:n,clampTo:()=>{e!==void 0&&t.getMaxAxisSize()>e&&t.setMaxAxisSize(e)},getCap:()=>e}}var Et=m(()=>{"use strict";H();Z()});var Gi,ji,wt,Ct=m(()=>{"use strict";Z();Gi=(t,e,i)=>{if(!e)return i?t.offsetHeight:t.offsetWidth;let n=i?"height":"width",s=t.style,r=e.style,a=s[n],l=r.flex,h=i?r.height:r.width;s[n]="auto",r.flex="none",i?r.height="auto":r.width="auto";let c=i?t.offsetHeight:t.offsetWidth,d=i?e.clientHeight:e.clientWidth,p=i?e.scrollHeight:e.scrollWidth,u=Math.max(c,c-d+p);return s[n]=a,r.flex=l,i?r.height=h:r.width=h,u},ji=(t,e)=>{let i=t.offsetParent;return i&&i!==document.body&&i!==document.documentElement?e?i.clientHeight:i.clientWidth:e?window.innerHeight:window.innerWidth},wt=t=>{let e=z(t.mode)==="height",i=Gi(t.element,t.scrollContainer,e),n=t.getMaxHeightCap(),s=n!==void 0?Math.min(i,n):i;if(typeof window>"u")return s;let r=ji(t.element,e);return r>0?Math.min(s,r):s}});function Mt(t){let e=t.mode==="bottom"||t.mode==="top",i=e?"ArrowUp":"ArrowRight",n=e?"ArrowDown":"ArrowLeft",s=t.mode==="top"?n:i,r=t.mode==="top"?i:n,a=l=>{if(t.isDestroyed())return;let h=t.getAllowedIds(),c=h.indexOf(t.getActiveId());c!==-1&&(l.key===s&&c<h.length-1?(l.preventDefault(),t.snapTo(h[c+1])):l.key===r&&c>0?(l.preventDefault(),t.snapTo(h[c-1])):l.key==="Home"?(l.preventDefault(),t.snapTo(h[0])):l.key==="End"&&(l.preventDefault(),t.snapTo(h[h.length-1])))};return t.handle.addEventListener("keydown",a),()=>t.handle.removeEventListener("keydown",a)}var zt=m(()=>{"use strict"});var ve,kt=m(()=>{"use strict";ve=Object.freeze({subtle:{color:"rgba(0,0,0,0.2)",blur:void 0,range:[.3,1],interactive:!1},standard:{color:"rgba(0,0,0,0.4)",blur:void 0,range:[0,1],interactive:!1},monitoring:{color:"rgba(15,15,20,0.55)",blur:"4px",range:[0,1],interactive:!1},cinematic:{color:"rgba(0,0,0,0.7)",blur:"12px",range:[0,1],interactive:!1}})});var E,ye=m(()=>{"use strict";E=class{constructor(){o(this,"last",-1)}shouldWrite(e,i){return Math.abs(e-this.last)<=i?!1:(this.last=e,!0)}invalidate(){this.last=-1}setLastWritten(e){this.last=e}get value(){return this.last}}});function Zi(t,e,i){let n=`calc(var(--bs-size, 0px) + ${i})`;switch(t){case"bottom":return e==="sheet-top-left"?{bottom:n,left:i}:e==="sheet-top-right"?{bottom:n,right:i}:{bottom:n,left:"50%",transform:"translateX(-50%)"};case"top":return e==="sheet-top-left"?{top:n,left:i}:e==="sheet-top-right"?{top:n,right:i}:{top:n,left:"50%",transform:"translateX(-50%)"};case"left":return e==="sheet-top-left"?{left:n,top:i}:e==="sheet-top-right"?{left:n,bottom:i}:{left:n,top:"50%",transform:"translateY(-50%)"};case"right":return e==="sheet-top-left"?{right:n,top:i}:e==="sheet-top-right"?{right:n,bottom:i}:{right:n,top:"50%",transform:"translateY(-50%)"}}}function k(t,e,i,n){switch(i){case"top-left":t.top=n,t.left=n;break;case"top-center":t.top=n,t.left="50%",t.transform="translateX(-50%)";break;case"top-right":t.top=n,t.right=n;break;case"center-left":t.top="50%",t.left=n,t.transform="translateY(-50%)";break;case"center":t.top="50%",t.left="50%",t.transform="translate(-50%, -50%)";break;case"center-right":t.top="50%",t.right=n,t.transform="translateY(-50%)";break;case"bottom-left":t.bottom=n,t.left=n;break;case"bottom-center":t.bottom=n,t.left="50%",t.transform="translateX(-50%)";break;case"bottom-right":t.bottom=n,t.right=n;break;case"sheet-top-left":case"sheet-top-center":case"sheet-top-right":{let s=Zi(e,i,n);s.top!==void 0&&(t.top=s.top),s.bottom!==void 0&&(t.bottom=s.bottom),s.left!==void 0&&(t.left=s.left),s.right!==void 0&&(t.right=s.right),s.transform!==void 0&&(t.transform=s.transform);break}}}var J=m(()=>{"use strict"});var Qi,Ji,ee,It=m(()=>{"use strict";kt();H();ye();L();J();Qi=/^-?\d+(?:\.\d+)?(?:px|em|rem|%)$/,Ji="rgba(0, 0, 0, 0.4)",ee=class{constructor(e,i){o(this,"screenComponent");o(this,"backdrop");o(this,"mode");o(this,"isDestroyed");o(this,"isTopSheet");o(this,"getAllowedIds");o(this,"getResolvedSnaps");o(this,"snapToFn");o(this,"closeFn");o(this,"scrimInteractive",!1);o(this,"scrimMode");o(this,"backdropRange");o(this,"screenRange");o(this,"scrimEnabled",!0);o(this,"savedScrimRanges",null);o(this,"scrimTapToCloseEnabled",!1);o(this,"detachScrimTap",null);o(this,"scrimOverlayTeardown",null);o(this,"backdropOpacitySentinel",new E);o(this,"screenOpacitySentinel",new E);o(this,"lastBackdropPointer","");o(this,"lastScreenDisplay","");this.screenComponent=e.screenComponent,this.backdrop=e.backdrop,this.mode=e.mode,this.isDestroyed=e.isDestroyed,this.isTopSheet=e.isTopSheet,this.getAllowedIds=e.getAllowedIds,this.getResolvedSnaps=e.getResolvedSnaps,this.snapToFn=e.snapTo,this.closeFn=e.close,this.scrimMode=i.scrimMode??"full";let n=i.scrimPreset?ve[i.scrimPreset]:null;this.backdropRange=i.backdropRange??n?.range??[0,1],this.screenRange=i.screenRange??n?.range??[0,1],this.scrimTapToCloseEnabled=i.scrimTapToClose??!1;let r=i.scrimColor??n?.color??(this.scrimMode!=="off"&&!this.backdrop?Ji:void 0);if(this.screenComponent){if(this.applyScrimStyles({color:r,blur:i.scrimBlur??n?.blur,interactive:i.scrimInteractive??n?.interactive??!1}),this.scrimMode==="above-sheet")this.applyAboveSheetInset();else if(this.scrimMode==="off"){let a=this.screenComponent.style;a.opacity="0",a.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"}}}invalidateOpacityCache(){this.backdropOpacitySentinel.invalidate(),this.screenOpacitySentinel.invalidate()}attach(){this.scrimTapToCloseEnabled&&this.setScrimTapToClose(!0)}applyOpacity(e,i){if(!(!i&&this.backdropOpacitySentinel.value!==-1&&this.screenOpacitySentinel.value!==-1)){if(this.backdrop&&this.isTopSheet()){let[n,s]=this.backdropRange,r=Math.max(s-n,1e-4),a=Math.min(Math.max((e-n)/r,0),1);this.backdropOpacitySentinel.shouldWrite(a,.005)&&(this.backdrop.style.opacity=String(a));let l=a>.05?"auto":"none";l!==this.lastBackdropPointer&&(this.backdrop.style.pointerEvents=l,this.lastBackdropPointer=l)}if(this.screenComponent&&this.scrimMode!=="off"){let[n,s]=this.screenRange,r=Math.min(1,Math.max(0,(e-n)/Math.max(1e-4,s-n)));this.screenOpacitySentinel.shouldWrite(r,.005)&&(this.screenComponent.style.opacity=String(r));let a=r>0?"":"none";a!==this.lastScreenDisplay&&(this.screenComponent.style.display=a,this.lastScreenDisplay=a)}}}setBackdropRange(e,i){this.isDestroyed()||(this.backdropRange=e,this.invalidateOpacityCache(),i())}setScreenRange(e,i){this.isDestroyed()||(this.screenRange=e,this.invalidateOpacityCache(),i())}setScrimColor(e){this.isDestroyed()||this.applyScrimStyles({color:e===void 0?null:e})}setScrimBlur(e){this.isDestroyed()||this.applyScrimStyles({blur:e===void 0?null:e})}setScrimInteractive(e){this.isDestroyed()||this.applyScrimStyles({interactive:e})}setScrimMode(e,i){if(this.isDestroyed()||e===this.scrimMode)return;this.invalidateOpacityCache();let n=this.scrimMode;if(this.scrimMode=e,this.screenComponent){let s=this.screenComponent.style;n==="above-sheet"&&e!=="above-sheet"&&(s.position="",s.inset="",s.pointerEvents=""),e==="above-sheet"?this.applyAboveSheetInset():e==="off"?(s.opacity="0",s.display="none",this.screenOpacitySentinel.setLastWritten(0),this.lastScreenDisplay="none"):this.lastScreenDisplay==="none"&&(s.display="",this.lastScreenDisplay="")}i()}setScrimTapToClose(e){if(this.isDestroyed()||!this.screenComponent)return;let i=this.detachScrimTap!==null;if(e!==i)if(e){let n=this.screenComponent;n.style.pointerEvents==="none"&&(n.style.pointerEvents="auto");let s=()=>{if(this.isDestroyed())return;if(this.closeFn){this.closeFn();return}let r=this.getAllowedIds(),a=this.getResolvedSnaps(),l=r.find(h=>{let c=P(h,a);return c!==null&&c.size===0});l&&this.snapToFn(l)};n.addEventListener("click",s),this.detachScrimTap=()=>n.removeEventListener("click",s),this.scrimTapToCloseEnabled=!0}else this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimTapToCloseEnabled=!1}setScrimEnabled(e,i){this.isDestroyed()||e!==this.scrimEnabled&&(this.scrimEnabled=e,this.invalidateOpacityCache(),e?(this.screenRange=this.savedScrimRanges?.screen??[0,1],this.backdropRange=this.savedScrimRanges?.backdrop??[0,1],this.savedScrimRanges=null):(this.savedScrimRanges={screen:this.screenRange,backdrop:this.backdropRange},this.screenRange=[1,1],this.backdropRange=[1,1]),i())}setScrim(e,i){if(this.isDestroyed())return;if(e.preset){let s=ve[e.preset];this.applyScrimStyles({color:s.color,blur:s.blur??null,interactive:s.interactive}),!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:s.range,backdrop:s.range}:(this.screenRange=s.range,this.backdropRange=s.range)}let n=()=>{};e.mode!==void 0&&this.setScrimMode(e.mode,n),e.enabled!==void 0&&this.setScrimEnabled(e.enabled,n),e.tapToClose!==void 0&&this.setScrimTapToClose(e.tapToClose),this.applyScrimStyles({color:e.color,blur:e.blur,interactive:e.interactive}),e.range!==void 0&&(!this.scrimEnabled&&this.savedScrimRanges?this.savedScrimRanges={screen:e.range,backdrop:this.savedScrimRanges.backdrop}:this.screenRange=e.range),this.invalidateOpacityCache(),i()}setScrimOverlay(e){if(this.isDestroyed())return()=>{};if(!this.screenComponent)return()=>{};this.scrimOverlayTeardown?.();let i=this.screenComponent,n=e.inset??"16px",s=Qi.test(n)?n:"16px";s!==n&&y(`[bottom-sheet] setScrimOverlay: invalid inset ${JSON.stringify(n)}; expected a CSS length like "16px" / "1rem" / "5%". Falling back to "16px".`),e.children.ownerDocument&&e.children.ownerDocument!==i.ownerDocument&&y("[bottom-sheet] setScrimOverlay: children belong to a different document than the scrim. Cross-document adoption can drop event listeners; construct children via the same document as the sheet root.");let r=e.position??"top-right",a=e.interactive??!0,l=i.ownerDocument.createElement("div");l.className="bs-scrim-overlay";let h=l.style;h.position="absolute",k(h,this.mode,r,s),a&&(h.pointerEvents="auto"),l.appendChild(e.children);let c=i.parentElement;if(!c)return y("[bottom-sheet] setScrimOverlay: scrim element has no parent, skipping overlay injection. Mount the sheet root before calling setScrimOverlay."),()=>{};c.appendChild(l);let d=()=>{l.parentNode&&l.parentNode.removeChild(l),this.scrimOverlayTeardown===d&&(this.scrimOverlayTeardown=null)};return this.scrimOverlayTeardown=d,d}destroy(){if(this.detachScrimTap?.(),this.detachScrimTap=null,this.scrimOverlayTeardown?.(),this.scrimOverlayTeardown=null,this.screenComponent){let e=this.screenComponent.style;e.opacity="",e.display="",e.position="",e.inset="",e.pointerEvents=""}this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents=""),this.invalidateOpacityCache(),this.lastBackdropPointer="",this.lastScreenDisplay=""}applyScrimStyles(e){if(!this.screenComponent)return;let i=this.screenComponent.style;if(e.color!==void 0&&(i.background=e.color===null?"":e.color),e.blur!==void 0){let n=i;if(e.blur===null)i.backdropFilter="",n.webkitBackdropFilter="";else{let s=`blur(${e.blur})`;i.backdropFilter=s,n.webkitBackdropFilter=s}}e.interactive!==void 0&&(this.scrimInteractive=e.interactive,i.pointerEvents=e.interactive?"auto":"none")}applyAboveSheetInset(){if(!this.screenComponent)return;let e={bottom:"0 0 var(--bs-size) 0",top:"var(--bs-size) 0 0 0",left:"0 0 0 var(--bs-size)",right:"0 var(--bs-size) 0 0"},i=this.screenComponent.style;i.position="fixed",i.inset=e[this.mode],i.pointerEvents=this.scrimInteractive||this.scrimTapToCloseEnabled?"auto":"none"}}});var Dt,en,Ot,Lt,Pt,Ht,te=m(()=>{"use strict";Dt=t=>1+2.40158*Math.pow(t-1,3)+1.40158*Math.pow(t-1,2),en=t=>1-Math.pow(1-t,3),Ot=t=>t,Lt=t=>1-Math.pow(1-t,5),Pt=({from:t,to:e,duration:i,easing:n=en,onUpdate:s})=>{let r=!1,a=0,l=null,h=performance.now(),c=new Promise(d=>{if(l=d,i<=0){s(e),d();return}let p=u=>{if(r)return;let g=u-h,b=Math.min(g/i,1),f=t+(e-t)*n(b);s(f),b<1?a=requestAnimationFrame(p):d()};a=requestAnimationFrame(p)});return{cancel:()=>{r=!0,cancelAnimationFrame(a),l?.()},promise:c}},Ht=()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches});var tn,nn,_t,Bt=m(()=>{"use strict";tn={stiffness:220,damping:26,mass:1,restDelta:.5,restSpeed:.5},nn=1/30,_t=({from:t,to:e,velocity:i=0,config:n,onUpdate:s})=>{let r={...tn,...n},a=!1,l=0,h=null,c=t,d=i,p=performance.now(),u=new Promise(g=>{h=g;let b=f=>{if(a)return;let S=Math.min((f-p)/1e3,nn);p=f;let G=Math.max(1,Math.ceil(S*240)),v=S/G,M=G;for(;M-- >0;){let O=(-r.stiffness*(c-e)-r.damping*d)/r.mass;d+=O*v,c+=d*v}if(!Number.isFinite(c)||!Number.isFinite(d)){s(e,0),g();return}s(c,d),Math.abs(e-c)<(r.restDelta??.5)&&Math.abs(d)<(r.restSpeed??.5)?(s(e,0),g()):l=requestAnimationFrame(b)};l=requestAnimationFrame(b)});return{cancel:()=>{a=!0,cancelAnimationFrame(l),h?.()},promise:u}}});function Ft(t){switch(t){case"ios-spring":return{kind:"spring",spring:{stiffness:300,damping:30,mass:1}};case"material-bounce":return{kind:"spring",spring:{stiffness:200,damping:22,mass:1}};case"linear":return{kind:"tween",duration:sn,easing:Ot};case"snappy":return{kind:"tween",duration:180,easing:Lt};case"tween":return{kind:"tween"};default:return{kind:"spring"}}}var sn,Nt=m(()=>{"use strict";te();sn=220});var rn,on,ie,Kt=m(()=>{"use strict";te();Bt();Nt();rn=220,on=1e3,ie=class{constructor(e,i){o(this,"element");o(this,"getRootEl");o(this,"applySizeFn");o(this,"getSize");o(this,"isDragging");o(this,"animationKind");o(this,"springConfig");o(this,"duration");o(this,"easing");o(this,"respectReducedMotion");o(this,"reducedMotion",!1);o(this,"detachReducedMotion",null);o(this,"viewTransitionsAvailable");o(this,"currentTween",null);o(this,"currentSpring",null);this.element=e.element,this.getRootEl=e.getRootEl,this.applySizeFn=e.applySize,this.getSize=e.getSize,this.isDragging=e.isDragging;let n=Ft(i.animation);this.animationKind=n.kind,this.duration=i.duration??n.duration??rn,this.easing=i.easing??n.easing??Dt,this.springConfig={...n.spring??{},...i.spring??{}},this.respectReducedMotion=i.respectReducedMotion??!0;let s=i.viewTransitions??!1;if(this.viewTransitionsAvailable=s&&typeof document<"u"&&typeof document.startViewTransition=="function",this.respectReducedMotion&&typeof window<"u"&&typeof window.matchMedia=="function"){let r=window.matchMedia("(prefers-reduced-motion: reduce)");this.reducedMotion=r.matches;let a=l=>{this.reducedMotion=l.matches};typeof r.addEventListener=="function"?(r.addEventListener("change",a),this.detachReducedMotion=()=>r.removeEventListener("change",a)):typeof r.addListener=="function"&&(r.addListener(a),this.detachReducedMotion=()=>r.removeListener(a))}}get isAnimating(){return this.currentTween!==null||this.currentSpring!==null}cancel(){this.currentTween?.cancel(),this.currentSpring?.cancel()}async animateTo(e,i){if(e===this.getSize()){!this.isAnimating&&!this.isDragging()&&(this.element.style.willChange="");return}if(this.currentTween?.cancel(),this.currentSpring?.cancel(),this.getRootEl()?.setAttribute("data-animating","true"),this.element.style.willChange="transform",this.reducedMotion){this.applySizeFn(e),this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange="");return}if(this.animationKind==="spring"){let n=_t({from:this.getSize(),to:e,velocity:i*on,config:this.springConfig,onUpdate:s=>this.applySizeFn(s)});this.currentSpring=n,await n.promise,this.currentSpring===n&&(this.currentSpring=null)}else{let n=Pt({from:this.getSize(),to:e,duration:this.duration,easing:this.easing,onUpdate:s=>this.applySizeFn(s)});this.currentTween=n,await n.promise,this.currentTween===n&&(this.currentTween=null)}this.isAnimating||(this.getRootEl()?.removeAttribute("data-animating"),this.isDragging()||(this.element.style.willChange=""))}destroy(){this.detachReducedMotion?.(),this.detachReducedMotion=null,this.currentTween=null,this.currentSpring=null}}});var Vt,an,Ut,Se,ln,B,Wt,$t=m(()=>{"use strict";Vt=["a[href]","area[href]","button:not([disabled])","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","iframe","object","embed","[contenteditable='true']","[tabindex]:not([tabindex='-1'])"].join(","),an=t=>typeof t.checkVisibility=="function"?t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0}):t.offsetParent!==null,Ut=t=>{let e=Array.from(t.querySelectorAll(Vt));if(typeof HTMLSlotElement<"u")for(let i of Array.from(t.querySelectorAll("slot")))for(let n of i.assignedElements())n.matches(Vt)&&e.push(n),e.push(...Ut(n));return e},Se=t=>Ut(t).filter(e=>!e.hasAttribute("inert")&&an(e)&&!e.matches("[aria-hidden='true']")),ln=(t,e)=>{let i=e;for(;i;){if(i===t)return!0;let n=i.assignedSlot;if(n){i=n;continue}let s=i.parentNode;i=s instanceof ShadowRoot?s.host:s}return!1},B=[],Wt=(t,e={})=>{if(typeof document>"u")return()=>{};let i={};B.push(i);let n=()=>B[B.length-1]===i,s=document.activeElement;(()=>{let c=e.initialFocus;if(c===!1){t.hasAttribute("tabindex")||(t.tabIndex=-1),t.focus({preventScroll:!0});return}(typeof c=="string"?t.querySelector(c):c??Se(t)[0]??t)?.focus({preventScroll:!0})})();let a=c=>{if(!n())return;if(c.key==="Escape"&&e.onEscape){e.onEscape();return}if(c.key!=="Tab")return;let d=Se(t);if(d.length===0){c.preventDefault();return}let p=d[0],u=d[d.length-1],g=document.activeElement;c.shiftKey&&g===p?(c.preventDefault(),u.focus()):!c.shiftKey&&g===u&&(c.preventDefault(),p.focus())},l=c=>{if(!n())return;let d=c.target;d&&!ln(t,d)&&Se(t)[0]?.focus({preventScroll:!0})};document.addEventListener("keydown",a,!0),document.addEventListener("focusin",l,!0);let h=!1;return()=>{if(h)return;h=!0;let c=B.indexOf(i);c!==-1&&B.splice(c,1),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",l,!0),s&&document.contains(s)?s.focus({preventScroll:!0}):document.querySelector("[data-bs-restore-fallback]")?.focus({preventScroll:!0})}}});var F,T,Yt,qt=m(()=>{"use strict";F=0,T=null,Yt=()=>{if(typeof document>"u")return()=>{};if(F===0){let e=document.body;T={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:window.scrollY};let i=window.innerWidth-document.documentElement.clientWidth;if(i>0){let n=parseFloat(getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${n+i}px`}e.style.overflow="hidden",e.style.position="fixed",e.style.top=`-${T.scrollY}px`,e.style.width="100%"}F++;let t=!1;return()=>{if(!t&&(t=!0,F=Math.max(0,F-1),F===0&&T)){let e=document.body;e.style.overflow=T.overflow,e.style.position=T.position,e.style.top=T.top,e.style.width=T.width,e.style.paddingRight=T.paddingRight,window.scrollTo(0,T.scrollY),T=null}}}});function Gt(t){let e=[];return{apply(){if(typeof document>"u")return;let i=t();for(;i.parentElement&&i.parentElement!==document.body;)i=i.parentElement;let n=i.parentElement??document.body;for(let s of Array.from(n.children))s!==i&&(s.hasAttribute("inert")||s.classList.contains("bs-backdrop")||s.classList.contains("bs-screen")||s.classList.contains("bs-root")||(s.setAttribute("inert",""),e.push(s)))},remove(){for(let i of e)i.removeAttribute("inert");e.length=0}}}var jt=m(()=>{"use strict"});var ne,Zt=m(()=>{"use strict";$t();qt();jt();ne=class{constructor(e,i){o(this,"element");o(this,"focusTrapEnabled");o(this,"initialFocus");o(this,"closeOnEscape");o(this,"bodyScrollLockEnabled");o(this,"inertSiblingsEnabled");o(this,"inertSiblings");o(this,"shouldApplyInertSiblings");o(this,"returnFocus");o(this,"releaseFocusTrap",null);o(this,"releaseScrollLock",null);o(this,"installed",!1);o(this,"destroyed",!1);this.element=e.element,this.focusTrapEnabled=i.focusTrap??!1,this.initialFocus=i.initialFocus,this.closeOnEscape=i.closeOnEscape??!0,this.bodyScrollLockEnabled=i.lockBodyScroll??!0,this.inertSiblingsEnabled=i.inertSiblings??!1,this.shouldApplyInertSiblings=i.shouldApplyInertSiblings??(()=>!0),this.returnFocus=i.returnFocus,this.inertSiblings=Gt(()=>this.element)}get isInstalled(){return this.installed}install(){this.destroyed||(this.installed=!0,this.bodyScrollLockEnabled&&!this.releaseScrollLock&&(this.releaseScrollLock=Yt()),this.focusTrapEnabled&&!this.releaseFocusTrap&&(this.releaseFocusTrap=Wt(this.element,{initialFocus:this.initialFocus})),this.inertSiblingsEnabled&&this.shouldApplyInertSiblings()&&this.inertSiblings.apply())}setReturnFocus(e){this.destroyed||(this.returnFocus=e)}release(){this.installed&&(this.installed=!1,this.releaseFocusTrap?.(),this.releaseFocusTrap=null,this.releaseScrollLock?.(),this.releaseScrollLock=null,this.inertSiblings.remove(),this.returnFocus&&(typeof this.returnFocus=="function"?this.returnFocus():typeof this.returnFocus=="string"?typeof document<"u"?document.querySelector(this.returnFocus):null:this.returnFocus)?.focus?.())}destroy(){this.release(),this.destroyed=!0}}});var Xt,xe,Qt,Jt=m(()=>{"use strict";Xt=t=>t==="bottom"||t==="top",xe=class{constructor(e){o(this,"slots");o(this,"capacity");o(this,"head",0);o(this,"size",0);this.capacity=e,this.slots=new Array(e);for(let i=0;i<e;i++)this.slots[i]={t:0,v:0}}push(e,i){let n=this.slots[this.head];n.t=e,n.v=i,this.head=(this.head+1)%this.capacity,this.size<this.capacity&&this.size++}pruneBefore(e,i){for(;this.size>i;){let n=(this.head-this.size+this.capacity)%this.capacity;if(this.slots[n].t<e)this.size--;else break}}get length(){return this.size}oldest(){if(this.size!==0)return this.slots[(this.head-this.size+this.capacity)%this.capacity]}newest(){if(this.size!==0)return this.slots[(this.head-1+this.capacity)%this.capacity]}reset(){this.head=0,this.size=0}},Qt=(t,e,i)=>{let n=null,s="touch",r=0,a=0,l=v=>v==="mouse"?160:120,h=32,c=new xe(h),d=Xt(e)?"Y":"X",p=e==="bottom"||e==="right"?-1:1,u=v=>d==="Y"?v.clientY:v.clientX,g=v=>{if(n===null&&!(v.button!==void 0&&v.button!==0)){n=v.pointerId,s=v.pointerType||"touch",r=u(v),a=r,c.reset(),c.push(v.timeStamp,r);try{t.setPointerCapture(v.pointerId)}catch{}i.onStart(r,s)}},b=v=>{if(v.pointerId!==n)return;let M=u(v),D=(M-r)*p;a=M,c.push(v.timeStamp,M);let O=v.timeStamp-l(s);c.pruneBefore(O,2),i.onMove(D)},f=v=>{if(v.pointerId!==n)return;let he=(a-r)*p,D=0;if(c.length>=3){let Ke=c.oldest(),Ve=c.newest(),Ue=Ve.t-Ke.t;Ue>0&&(D=(Ve.v-Ke.v)/Ue*p)}let O=s;n=null,c.reset();try{t.hasPointerCapture(v.pointerId)&&t.releasePointerCapture(v.pointerId)}catch{}i.onEnd(he,D,O)},S=v=>{v.pointerId===n&&(n=null,c.reset(),i.onCancel?.())};t.addEventListener("pointerdown",g),t.addEventListener("pointermove",b),t.addEventListener("pointerup",f),t.addEventListener("pointercancel",S);let G=t.style.touchAction;return t.style.touchAction=Xt(e)?"pan-x":"pan-y",()=>{t.removeEventListener("pointerdown",g),t.removeEventListener("pointermove",b),t.removeEventListener("pointerup",f),t.removeEventListener("pointercancel",S),t.style.touchAction=G,n!==null&&t.hasPointerCapture(n)&&t.releasePointerCapture(n)}}});function Te(t,e){let i=Math.min(e*.15,80);if(i<=0)return 0;let n=Math.abs(t);return Math.sign(t)*(i*n/(n+i))}var ei=m(()=>{"use strict"});function ti(t){if(typeof document>"u")return!1;let e=document.activeElement;if(!e||!t.contains(e))return!1;let i=e.tagName;if(!(i==="INPUT"||i==="TEXTAREA"||e.isContentEditable===!0))return!1;try{return e.blur(),!0}catch{return!1}}var ii=m(()=>{"use strict"});var se,ni=m(()=>{"use strict";Jt();ei();ii();se=class{constructor(e){o(this,"deps");o(this,"detach",null);o(this,"isDragging_",!1);o(this,"dragStartSize",0);o(this,"currentPointerKind","touch");o(this,"keyboardDismissed",!1);o(this,"dragSuppressed",!1);o(this,"dragPayload",{size:0,delta:0});this.deps=e}get isDragging(){return this.isDragging_}install(){return this.detach?this.detach:(this.detach=Qt(this.deps.handle,this.deps.mode,{onStart:(e,i)=>{if(this.deps.getDisableDrag?.()){this.dragSuppressed=!0;return}this.dragSuppressed=!1,this.deps.cancelAnimation(),this.isDragging_=!0,this.dragStartSize=this.deps.getDragContext().size,this.currentPointerKind=i,this.keyboardDismissed=!1,this.deps.getRoot()?.setAttribute("data-dragging","true"),this.deps.element.style.willChange="transform",this.deps.emit("dragstart",{size:this.dragStartSize})},onMove:e=>{if(this.dragSuppressed)return;let i=this.deps.getDragContext(),{min:n,max:s}=i.range,r=i.maxAxisSize,a=i.rubberBandEnabled,l=this.dragStartSize+e;l>s?l=a?s+Te(l-s,r):s:l<n&&(l=a?n-Te(n-l,r):n),this.deps.applySize(l),!this.keyboardDismissed&&this.currentPointerKind==="touch"&&this.deps.mode==="bottom"&&l<this.dragStartSize&&ti(this.deps.element)&&(this.keyboardDismissed=!0),this.deps.listenerCount("drag")>0&&(this.dragPayload.size=l,this.dragPayload.delta=e,this.deps.emit("drag",this.dragPayload))},onEnd:(e,i,n)=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:i}),this.deps.settleAfterDrag(e,i,n)},onCancel:()=>{if(this.dragSuppressed){this.dragSuppressed=!1;return}this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.emit("dragend",{size:this.deps.getDragContext().size,velocity:0});let e=this.dragStartSize;this.deps.animateTo(e,0)}}),this.detach)}forceClearDragState(){this.isDragging_&&(this.isDragging_=!1,this.keyboardDismissed=!1,this.deps.getRoot()?.removeAttribute("data-dragging"),this.deps.element.style.willChange="")}}});var re,si=m(()=>{"use strict";re=class{constructor(e,i){o(this,"handle",e);e.setAttribute("aria-orientation",i==="bottom"||i==="top"?"vertical":"horizontal")}setValue(e,i){if(e.length===0){this.handle.removeAttribute("aria-valuemin"),this.handle.removeAttribute("aria-valuemax"),this.handle.removeAttribute("aria-valuenow"),this.handle.removeAttribute("aria-valuetext");return}let n=Math.max(e.length-1,0),s=Math.max(e.indexOf(i),0);this.handle.setAttribute("aria-valuemin","0"),this.handle.setAttribute("aria-valuemax",String(n)),this.handle.setAttribute("aria-valuenow",String(s)),this.handle.setAttribute("aria-valuetext",i)}}});function ri(t){let e=new Map,i=n=>{let s=t.getMaxAxisSize();return s<=0?!1:n<s/2};return{cache(n,s,r){let a=t.scrollContainer;a&&(i(s)||i(r)&&e.set(n,a.scrollTop))},restore(n,s,r){let a=t.scrollContainer;if(!a||i(r)||!i(s))return;let l=e.get(n);l!==void 0&&(a.scrollTop=l,e.delete(n))},clear(){e.clear()}}}var oi=m(()=>{"use strict"});function dn(t,e){let i={frames:null,duration:0,easing:oe};if(t==="none")return i;if(t===void 0||typeof t=="string")return{frames:ai[t??"fade"][e],duration:Ae,easing:oe};let n=e==="enter"?t.enter:t.exit;return n?{frames:n,duration:t.duration??Ae,easing:t.easing??oe}:t.preset==="none"?i:{frames:ai[t.preset??"fade"][e],duration:t.duration??Ae,easing:t.easing??oe}}function R(t,e,i){if((typeof e=="object"?e.respectReducedMotion!==!1:!0)&&Ht())return Ee;let{frames:s,duration:r,easing:a}=dn(e,i);if(!s||r<=0||typeof t.animate!="function")return Ee;let l=t.animate(s,{duration:r,easing:a,fill:"both"});return{finished:l.finished.then(()=>{}).catch(()=>{}),cancel:()=>{try{l.cancel()}catch{return}}}}var Ae,oe,ai,Ee,we=m(()=>{"use strict";te();Ae=200,oe="cubic-bezier(0.22, 1, 0.36, 1)",ai={fade:{enter:[{opacity:0},{opacity:1}],exit:[{opacity:1},{opacity:0}]},scale:{enter:[{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}]},slide:{enter:[{opacity:0,transform:"translateY(10px)"},{opacity:1,transform:"translateY(0)"}],exit:[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(10px)"}]},pop:{enter:[{opacity:0,transform:"scale(0.6)",offset:0},{opacity:1,transform:"scale(1.06)",offset:.7},{opacity:1,transform:"scale(1)",offset:1}],exit:[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.6)"}]}},Ee={finished:Promise.resolve(),cancel:()=>{}}});function li(t,e){let n=t.host.ownerDocument.createElement("div");n.className="bs-anchor";let s=e.interactive??!0,r=e.position??"sheet-top-right",a=r==="dock-bottom"||r==="dock-top",l=n.style;if(l.position="fixed",a?(l.left="0",l.right="0",r==="dock-bottom"?l.bottom="0":l.top="0"):k(l,t.mode,r,e.inset??"16px"),e.fadeRange){let[b,f]=e.fadeRange,S=Math.max(f-b,1e-4);l.opacity=`clamp(0, calc((var(--bs-progress, 0) - ${b}) / ${S}), 1)`}n.appendChild(e.element),t.host.appendChild(n);let h=null,c=null,d=b=>typeof e.showOn=="function"?e.showOn(b):Array.isArray(e.showOn)?e.showOn.includes(b.activeId):a||b.size>0,p=(b,f)=>{if(b===h)return;if(h=b,c?.cancel(),c=null,n.style.pointerEvents=b&&s?"auto":"none",b){n.style.visibility="",f&&(c=R(e.element,e.animation,"enter"));return}if(!f){n.style.visibility="hidden";return}let S=R(e.element,e.animation,"exit");c=S,S.finished.then(()=>{c===S&&h===!1&&(n.style.visibility="hidden")})},u=b=>{t.isDestroyed()||p(d(t.getState()),b)},g=[t.on("snap",()=>u(!0)),t.on("open",()=>u(!0)),t.on("close",()=>u(!0))];return u(!1),{wrapper:n,detach:()=>{g.forEach(b=>b()),c?.cancel(),c=null,n.parentNode&&n.parentNode.removeChild(n)},syncZ:b=>{n.style.zIndex=String(b)}}}var di=m(()=>{"use strict";J();we()});function hi(t,e){let i=t.host.ownerDocument,n=e.stages.map(d=>{let p=i.createElement("div");p.className="bs-scrim-stage";let u=p.style;return u.position="absolute",k(u,t.mode,d.position??e.position??"center",d.inset??e.inset??"16px"),u.visibility="hidden",u.pointerEvents="none",p.appendChild(d.element),t.host.appendChild(p),{def:d,wrapper:p,inFlight:null}}),s=null,r=()=>{let d=t.getState();return d.size===0?n.find(p=>ci(p.def,d.activeId))??null:n.find(p=>ci(p.def,d.activeId))??n.find(p=>cn(p.def,d.progress))??null},a=(d,p)=>{if(d.inFlight?.cancel(),d.wrapper.style.pointerEvents="none",!p){d.inFlight=null,d.wrapper.style.visibility="hidden";return}let u=R(d.def.element,d.def.animation??e.animation,"exit");d.inFlight=u,u.finished.then(()=>{d.inFlight===u&&s!==d&&(d.wrapper.style.visibility="hidden")})},l=(d,p)=>{d.inFlight?.cancel(),d.inFlight=null,d.wrapper.style.visibility="",d.wrapper.style.pointerEvents=d.def.interactive??e.interactive??!1?"auto":"none",p&&(d.inFlight=R(d.def.element,d.def.animation??e.animation,"enter"))},h=d=>{if(t.isDestroyed())return;let p=r();if(p===s)return;let u=s;s=p,u&&a(u,d),p&&l(p,d)},c=[t.on("snap",()=>h(!0)),t.on("open",()=>h(!0)),t.on("close",()=>h(!0))];return n.some(d=>d.def.forRange)&&c.push(t.on("progress",()=>h(!0))),h(!1),()=>{c.forEach(d=>d());for(let d of n)d.inFlight?.cancel(),d.inFlight=null,d.wrapper.parentNode&&d.wrapper.parentNode.removeChild(d.wrapper);s=null}}var ci,cn,pi=m(()=>{"use strict";J();we();ci=(t,e)=>t.for===void 0?!1:Array.isArray(t.for)?t.for.includes(e):t.for===e,cn=(t,e)=>{if(!t.forRange)return!1;let[i,n]=t.forRange;return e>=i&&e<=n}});function ui(t,e){let i=t.allowed??t.snapPoints.map(s=>s.id),n=t.initial??i[0]??t.snapPoints[0]?.id??"default";if(t.persistKey){let s=rt(t.persistKey);s&&i.includes(s)&&(n=s)}return{mode:t.mode??"bottom",flickVelocity:t.flickVelocity??hn,dragThreshold:t.dragThreshold??pn,rubberBandEnabled:t.rubberBand??!0,closeOnBack:t.closeOnBack??!1,persistent:t.persistent??!1,disableClose:t.disableClose??!1,disableDrag:t.disableDrag??!1,closeOnRouteChange:t.closeOnRouteChange??!1,radius:t.radius,maxHeight:t.maxHeight,initialAllowed:i,initialId:n,scrim:{scrimMode:t.scrimMode,scrimColor:t.scrimColor,scrimBlur:t.scrimBlur,scrimInteractive:t.scrimInteractive??(t.scrimTapToClose?!0:void 0),scrimTapToClose:t.scrimTapToClose,scrimPreset:t.scrimPreset,screenRange:t.screenRange,backdropRange:t.backdropRange},animation:{animation:t.animation,duration:t.duration,easing:t.easing,spring:t.spring,respectReducedMotion:t.respectReducedMotion,viewTransitions:t.viewTransitions},lifecycle:{focusTrap:t.focusTrap,initialFocus:t.initialFocus,closeOnEscape:t.closeOnEscape,lockBodyScroll:t.lockBodyScroll,inertSiblings:t.inertSiblings,shouldApplyInertSiblings:e?.shouldApplyInertSiblings,returnFocus:t.returnFocusTo}}}var hn,pn,mi=m(()=>{"use strict";be();hn=.65,pn=18});var ae,fi=m(()=>{"use strict";ae=class{constructor(){o(this,"fns",[])}add(e){e&&this.fns.push(e)}drain(){for(;this.fns.length;)try{this.fns.pop()()}catch(e){queueMicrotask(()=>{throw e})}}}});var un,le,gi=m(()=>{"use strict";$e();Z();qe();je();H();nt();L();st();be();lt();ct();mt();gt();vt();St();Tt();Et();Ct();zt();It();Kt();Zt();ni();si();oi();di();pi();mi();fi();ye();un=8,le=class{constructor(e){o(this,"id",me("bs"));o(this,"element");o(this,"handle");o(this,"scrollContainer");o(this,"backdrop");o(this,"screenComponent");o(this,"scrimParent",null);o(this,"mode");o(this,"flickVelocity");o(this,"dragThreshold");o(this,"rubberBandEnabled");o(this,"scrim");o(this,"aria");o(this,"animation");o(this,"lifecycle");o(this,"closeOnBack");o(this,"routedTo");o(this,"persistent");o(this,"disableCloseFlag");o(this,"disableDragFlag");o(this,"closeOnRouteChange");o(this,"maxHeight");o(this,"snapPointsRaw");o(this,"snaps");o(this,"activeId");o(this,"size",0);o(this,"gesture");o(this,"rootEl",null);o(this,"destroyed",!1);o(this,"currentViewTransition",null);o(this,"currentAbort",new AbortController);o(this,"sizeWriteSentinel",new E);o(this,"progressWriteSentinel",new E);o(this,"isTopSheet",!0);o(this,"opening",!1);o(this,"allowOvershoot",!1);o(this,"progressPayload",{value:0,size:0});o(this,"dragContextBuf",{size:0,maxAxisSize:0,range:{min:0,max:0},rubberBandEnabled:!1});o(this,"bus",Ge());o(this,"persistKey");o(this,"linkedSheets",[]);o(this,"scrollCache");o(this,"teardowns",new ae);o(this,"anchors",[]);o(this,"anchorHost",null);o(this,"stackZ",100);o(this,"detachScrimStages",null);o(this,"stackEffectEnabled",!1);o(this,"stackEffectPrimed",!1);o(this,"fitDeps");o(this,"transformTemplate");let i=ui(e,{shouldApplyInertSiblings:()=>typeof document>"u"?!1:Array.from(document.body.children).some(r=>r===e.element||r.contains(e.element))});this.element=e.element,this.handle=e.handle??e.element,this.scrollContainer=e.scrollContainer,this.backdrop=e.backdrop,this.screenComponent=e.scrim??e.screenComponent,this.scrimParent=this.screenComponent?.parentElement??null,this.mode=i.mode,this.transformTemplate=Ye(this.mode),this.aria=new re(this.handle,this.mode),this.flickVelocity=i.flickVelocity,this.dragThreshold=i.dragThreshold,this.rubberBandEnabled=i.rubberBandEnabled,this.scrim=new ee({mode:this.mode,screenComponent:this.screenComponent,backdrop:this.backdrop,isDestroyed:()=>this.destroyed,isTopSheet:()=>this.isTopSheet,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),getResolvedSnaps:()=>this.snaps.getResolvedSnaps().slice(),snapTo:s=>{this.snapTo(s)},close:()=>{this.canDismiss()&&this.close("backdrop")}},i.scrim),this.animation=new ie({element:this.element,getRootEl:()=>this.rootEl,applySize:s=>this.applySize(s),getSize:()=>this.size,isDragging:()=>this.gesture?.isDragging??!1},i.animation),this.lifecycle=new ne({element:this.element,close:()=>this.close()},i.lifecycle),this.closeOnBack=i.closeOnBack,this.routedTo=e.routedTo,this.persistent=i.persistent,this.disableCloseFlag=i.disableClose,this.disableDragFlag=i.disableDrag,this.closeOnRouteChange=i.closeOnRouteChange,this.stackEffectEnabled=e.stackEffect??!1,this.snapPointsRaw=e.snapPoints,this.persistKey=e.persistKey,e.linkedSheets&&(this.linkedSheets=e.linkedSheets),this.activeId=i.initialId,fe(this.snapPointsRaw),this.auditDuplicateSnapIds(this.snapPointsRaw),this.rootEl=this.element.closest(".bs-root"),this.maxHeight=At({element:this.element,mode:this.mode,getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),setMaxAxisSize:s=>{this.snaps.setMaxAxisSize(s)},recompute:()=>this.recompute()}),this.fitDeps={element:this.element,scrollContainer:this.scrollContainer,mode:this.mode,getMaxHeightCap:()=>this.maxHeight.getCap()},this.snaps=new Q(this.snapPointsRaw,i.initialAllowed,this.mode,()=>wt(this.fitDeps),s=>{this.element.style[z(this.mode)]=`${s}px`});let n=this.snaps.findById(this.activeId);if(n&&(this.size=n.size),this.applySize(this.size),this.updateAriaSlider(),this.scrollCache=ri({scrollContainer:this.scrollContainer,getMaxAxisSize:()=>this.snaps.getMaxAxisSize()}),this.attach(),this.registerInStack(),this.snaps.getMaxAxisSize()===0&&typeof IntersectionObserver<"u"&&typeof document<"u"){let s=new IntersectionObserver(r=>{for(let a of r){if(!a.isIntersecting)continue;if(this.destroyed)return;this.snaps.recompute();let l=this.snaps.findById(this.activeId);l&&(this.size=l.size,this.applySize(this.size),this.updateAriaSlider()),s.disconnect();return}});s.observe(this.element),this.teardowns.add(()=>s.disconnect())}this.teardowns.add(xt({handle:this.handle,scrollContainer:this.scrollContainer,hasFitSnap:()=>this.snapPointsRaw.some(s=>s.size==="fit"||s.size==="content"),isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,recompute:()=>this.recompute()})),i.radius!==void 0&&this.setRadius(i.radius),i.maxHeight!==void 0&&this.setMaxHeight(i.maxHeight),this.applyAutoAriaLabelledBy(),this.closeOnRouteChange&&this.teardowns.add(ut({isDestroyed:()=>this.destroyed,getSize:()=>this.size,close:()=>this.close()})),this.persistKey&&this.teardowns.add(ot(this,this.persistKey)),this.teardowns.add(at({ms:e.autoCollapseAfter,isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,getAllowedIds:()=>this.snaps.getAllowedIds().slice(),getActiveId:()=>this.activeId,resolveSnap:s=>this.snaps.findById(s),snapTo:s=>{this.snapTo(s)},on:(s,r)=>this.on(s,r)})),this.teardowns.add(pt({routedTo:this.routedTo,closeOnBack:this.closeOnBack,isTopSheet:()=>this.isTopSheet,getSize:()=>this.size,isDestroyed:()=>this.destroyed,close:()=>this.close("back"),on:(s,r)=>this.on(s,r),sheetId:this.id})),this.size>0&&this.handleOpen()}get state(){return{size:this.size,activeId:this.activeId,isDragging:this.gesture?.isDragging??!1,isAnimating:this.animation.isAnimating,progress:this.computeProgress(this.size)}}on(e,i){return this.bus.on(e,i)}use(e){if(this.destroyed)return y(`[BottomSheet] use("${e.name}") called on destroyed engine \u2014 ignored.`),this;let i=[],n={add:r=>{typeof r=="function"&&i.push(r)}},s;try{s=e.install(this,n)}catch(r){for(let a=i.length-1;a>=0;a--)try{i[a]()}catch(l){queueMicrotask(()=>{throw l})}return queueMicrotask(()=>{throw r}),this}for(let r of i)this.teardowns.add(r);return typeof s=="function"&&this.teardowns.add(s),this}setLinkedSheets(e){this.destroyed||(this.linkedSheets=e)}getAllowedIds(){return this.snaps.getAllowedIds().slice()}getResolvedSnaps(){return this.snaps.getResolvedSnaps()}async snapTo(e,i=0,n=!1){if(this.destroyed)return;let s=typeof i=="object"?i:{velocity:i},r=s.velocity??0,a=s.signal;if(a?.aborted)return;let l=this.snaps.findById(e);if(!l){y(`[BottomSheet] unknown snap id: ${e}`);return}if(!this.snaps.getAllowedIds().includes(e)){y(`[BottomSheet] snap "${e}" is not in allowed list`);return}if(!n&&this.emitBeforeSnap(l,this.activeId))return;let h=this.newCycle(),c=()=>{this.animation.cancel(),this.newCycle()};a?.addEventListener("abort",c,{once:!0});let d=this.size===0,p=this.activeId,u=this.size;this.scrollCache.cache(p,u,l.size),this.activeId=e;let g=this.snapPointsRaw.find(f=>f.id===e)?.size;if(d&&!(e==="closed"||g===0)&&(this.opening=!0,w.promote(this.id)),this.animation.viewTransitionsAvailable){this.currentViewTransition?.skipTransition?.();let f=document.startViewTransition(()=>{this.applySize(l.size)});this.currentViewTransition=f;try{await f.finished}catch{}this.currentViewTransition===f&&(this.currentViewTransition=null)}else await this.animation.animateTo(l.size,r);a?.removeEventListener("abort",c),!h.aborted&&(this.opening=!1,this.completeSnap(e,l.size,u,d,!1))}completeSnap(e,i,n,s,r){this.scrollCache.restore(e,n,i),this.updateAriaSlider(),this.emit("snap",{id:e,size:this.size,progress:this.computeProgress(this.size)}),r&&this.haptic(),s&&i>0&&this.emitOpenSequence(e),i===0&&this.emitCloseSequence()}emitOpenSequence(e){this.emit("open",{id:e}),this.handleOpen(),dt(this.linkedSheets,this),this.emit("opened",{id:e})}emitCloseSequence(){this.emit("close",void 0),this.handleClose(),this.emit("closed",void 0)}async dragTo(e,i=0){if(this.destroyed)return;let n=typeof i=="object"?i:{velocity:i},s=n.velocity??0,r=n.signal;if(r?.aborted)return;this.newCycle();let a=()=>{this.animation.cancel(),this.newCycle()};r?.addEventListener("abort",a,{once:!0});let l=Math.max(0,Math.min(e,this.snaps.getMaxAxisSize()));await this.animation.animateTo(l,s),r?.removeEventListener("abort",a),this.destroyed||r?.aborted}open(e){if(this.destroyed)return Promise.resolve();let i=e??this.snaps.getAllowedIds().find(n=>(this.snaps.findById(n)?.size??0)>0)??this.activeId;return this.snapTo(i)}close(e="programmatic"){if(this.destroyed||this.disableCloseFlag||this.size>0&&this.emitBeforeClose(e))return Promise.resolve();let i=this.snapPointsRaw.find(n=>n.id==="closed")?.id??this.snaps.getAllowedIds().find(n=>this.snaps.findById(n)?.size===0)??this.snaps.getAllowedIds()[0];return this.snapTo(i??this.activeId)}canDismiss(){return!this.persistent&&!this.disableCloseFlag&&!this.destroyed}setPersistent(e){this.destroyed||(this.persistent=e)}setDisableClose(e){this.destroyed||(this.disableCloseFlag=e)}setDisableDrag(e){this.destroyed||(this.disableDragFlag=e)}isTop(){return this.isTopSheet}depth(){return w.depthOf(this.id)}expand(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),i=e[e.length-1];return i?this.snapTo(i):Promise.resolve()}collapse(){if(this.destroyed)return Promise.resolve();let e=this.allowedIdsBySize(),n=e.find(s=>(this.snaps.findById(s)?.size??0)>0)??e[0];return n?this.snapTo(n):Promise.resolve()}setRadius(e){this.destroyed||this.maxHeight.setRadius(e)}setMaxHeight(e){this.destroyed||this.maxHeight.setMaxHeight(e)}setAllowed(e,i){if(!this.destroyed){if(this.snaps.setAllowedIds(e),this.updateAriaSlider(),i&&e.includes(i))this.snapTo(i,0,!0);else if(!e.includes(this.activeId)){let n=e[0];n&&this.snapTo(n,0,!0)}}}setBackdropRange(e){this.scrim.setBackdropRange(e,()=>this.applySize(this.size))}setScreenRange(e){this.scrim.setScreenRange(e,()=>this.applySize(this.size))}setScrimColor(e){this.scrim.setScrimColor(e)}setScrimBlur(e){this.scrim.setScrimBlur(e)}setScrimInteractive(e){this.scrim.setScrimInteractive(e)}setScrim(e){this.scrim.setScrim(e,()=>this.applySize(this.size))}setScrimMode(e){this.scrim.setScrimMode(e,()=>this.applySize(this.size))}setScrimTapToClose(e){this.scrim.setScrimTapToClose(e)}setScrimEnabled(e){this.scrim.setScrimEnabled(e,()=>this.applySize(this.size))}setScrimOverlay(e){return this.scrim.setScrimOverlay(e)}addAnchor(e){if(this.destroyed||typeof document>"u")return()=>{};this.anchorHost||(this.anchorHost=this.rootEl??this.element.parentElement??document.body,this.anchorHost.style.setProperty("--bs-size",`${this.size}px`),this.anchorHost.style.setProperty("--bs-progress",String(this.computeProgress(this.size))));let i=li({mode:this.mode,host:this.anchorHost,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(s,r)=>this.on(s,r),isDestroyed:()=>this.destroyed},e);i.syncZ(this.stackZ+1),this.anchors.push(i);let n=()=>{let s=this.anchors.indexOf(i);s!==-1&&(this.anchors.splice(s,1),i.detach())};return this.teardowns.add(n),n}setScrimStages(e){if(this.destroyed||typeof document>"u")return()=>{};if(this.detachScrimStages?.(),this.detachScrimStages=null,!e)return()=>{};let i=this.screenComponent?.parentElement;if(!i)return y("[BottomSheet] setScrimStages: no scrim element mounted \u2014 pass `scrim` to the engine first."),()=>{};let n=hi({mode:this.mode,host:i,getState:()=>({activeId:this.activeId,size:this.size,progress:this.computeProgress(this.size)}),on:(r,a)=>this.on(r,a),isDestroyed:()=>this.destroyed},e),s=()=>{this.detachScrimStages===s&&(this.detachScrimStages=null),n()};return this.detachScrimStages=s,this.teardowns.add(()=>this.detachScrimStages?.()),s}getScrimState(){return{mode:this.scrim.scrimMode,enabled:this.scrim.scrimEnabled}}setSnapPoints(e,i){if(this.destroyed)return;this.animation.cancel(),this.newCycle(),this.snapPointsRaw=e,fe(e),this.auditDuplicateSnapIds(e),this.snaps.setRaw(e),i&&this.snaps.setAllowedIds(i),this.scrollCache.clear(),this.scrim.invalidateOpacityCache();let n=this.snaps.findById(this.activeId);n&&this.applySize(n.size),this.updateAriaSlider()}recompute(){if(this.destroyed||(this.maxHeight.resolveCap(),this.snaps.recompute(),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache(),this.gesture?.isDragging))return;let e=this.snaps.findById(this.activeId);e&&(this.size=e.size,this.applySize(this.size),this.updateAriaSlider())}destroy(){this.destroyed=!0,this.opening=!1,this.currentAbort.abort(),this.currentViewTransition?.skipTransition?.(),this.currentViewTransition=null,this.bus.clear(),this.animation.cancel(),this.gesture?.forceClearDragState(),this.teardowns.drain(),this.scrim.destroy(),this.animation.destroy(),this.lifecycle.destroy(),this.backdrop&&(this.backdrop.style.opacity="",this.backdrop.style.pointerEvents="");for(let e of[this.anchorHost,this.scrimParent,this.rootEl])e&&(e.style.removeProperty("--bs-size"),e.style.removeProperty("--bs-progress"));this.screenComponent&&(this.screenComponent.style.opacity="",this.screenComponent.style.display=""),this.sizeWriteSentinel.invalidate(),this.progressWriteSentinel.invalidate()}emit(e,i){this.bus.emit(e,i)}newCycle(){return this.allowOvershoot=!1,this.opening=!1,this.currentAbort.abort(),this.currentAbort=new AbortController,this.currentAbort.signal}emitBeforeSnap(e,i){return ge(n=>this.emit("before-snap",n),{id:e.id,size:e.size,previousId:i},"before-snap")}emitBeforeClose(e){return ge(i=>this.emit("before-close",i),{reason:e},"before-close")}applyAutoAriaLabelledBy(){if(typeof document>"u"||!this.lifecycle.focusTrapEnabled||this.element.getAttribute("aria-labelledby"))return;let e=this.handle??this.element,i=e.querySelector("[data-bs-title]")??e.querySelector("h1,h2,h3,h4,h5,h6");i&&(i.id||(i.id=me("bs-title")),this.element.setAttribute("aria-labelledby",i.id))}recomputeSnaps(){this.maxHeight.resolveCap(),this.snaps.setRaw(this.snapPointsRaw),this.maxHeight.clampTo(),this.scrim.invalidateOpacityCache()}auditDuplicateSnapIds(e){let i=new Set;for(let n of e)i.has(n.id)&&y(`[BottomSheet] duplicate snap id "${n.id}" \u2014 only the first occurrence is reachable.`),i.add(n.id)}getAllowedRange(){return this.snaps.getAllowedRange()}allowedIdsBySize(){return this.snaps.getAllowedIds().slice().sort((e,i)=>(this.snaps.findById(e)?.size??0)-(this.snaps.findById(i)?.size??0))}updateAriaSlider(){this.aria.setValue(this.allowedIdsBySize(),this.activeId)}registerInStack(){this.teardowns.add(w.push({id:this.id,setZIndex:e=>{this.stackZ=e,this.element.style.zIndex=String(e),this.backdrop&&(this.backdrop.style.zIndex=String(e-1));for(let i of this.anchors)i.syncZ(e+1)},setIsTop:e=>{this.isTopSheet=e},isOpen:()=>this.size>0||this.opening,setDepth:e=>this.applyStackDepth(e)}))}applyStackDepth(e){if(!this.stackEffectEnabled)return;if(this.element.setAttribute("data-stack-depth",String(e)),!this.stackEffectPrimed){this.stackEffectPrimed=!0;let n=this.mode==="bottom"||this.mode==="top";this.element.style.transformOrigin=n?"50% 100%":"0% 50%",this.element.style.transition="scale 320ms cubic-bezier(0.29, 1.04, 0.84, 0.99)"}let i=Math.max(1-e*.04,.86);this.element.style.scale=i===1?"":String(i)}attach(){this.gesture=new se({handle:this.handle,element:this.element,mode:this.mode,getRoot:()=>this.rootEl,getDragContext:()=>{let e=this.dragContextBuf,i=this.getAllowedRange();return e.size=this.size,e.maxAxisSize=this.snaps.getMaxAxisSize(),e.range.min=i.min,e.range.max=i.max,e.rubberBandEnabled=this.rubberBandEnabled,e},getDisableDrag:()=>this.disableDragFlag,cancelAnimation:()=>this.animation.cancel(),applySize:e=>this.applySize(e),animateTo:(e,i)=>this.animation.animateTo(e,i),settleAfterDrag:(e,i,n)=>this.settleAfterDrag(e,i,n),emit:(e,i)=>this.emit(e,i),listenerCount:e=>this.bus.listenerCount(e)}),this.teardowns.add(this.gesture.install());try{this.attachFeatures()}catch(e){this.teardowns.drain();try{this.scrim.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.animation.destroy()}catch(i){queueMicrotask(()=>{throw i})}try{this.lifecycle.destroy()}catch(i){queueMicrotask(()=>{throw i})}throw this.destroyed=!0,e}}attachFeatures(){if(this.scrollContainer&&this.teardowns.add(ft({container:this.scrollContainer,isDragging:()=>this.gesture?.isDragging??!1,isAnimating:()=>this.animation.isAnimating,getAllowedIds:()=>this.allowedIdsBySize(),getActiveId:()=>this.activeId,snapTo:e=>{this.snapTo(e)}})),typeof window<"u"){if(this.teardowns.add(yt({element:this.element,getMode:()=>this.mode,isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,resolveActiveSnap:()=>this.snaps.findById(this.activeId),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),getSize:()=>this.size,setMaxAxisSize:e=>{this.snaps.setMaxAxisSize(e)},setSize:e=>{this.size=e},recomputeSnaps:()=>this.recomputeSnaps(),applySize:e=>this.applySize(e),cancelInFlight:()=>{this.animation.cancel()},newCycle:()=>{this.newCycle()},isAnimating:()=>this.animation.isAnimating,resyncAfterCancel:()=>this.resyncAfterResize()})),this.lifecycle.closeOnEscape){let e=i=>{this.destroyed||i.defaultPrevented||this.canDismiss()&&i.key==="Escape"&&this.isTopSheet&&this.size>0&&this.close("escape")};document.addEventListener("keydown",e),this.teardowns.add(()=>document.removeEventListener("keydown",e))}this.teardowns.add(bt({element:this.element,isVerticalAxis:()=>this.mode==="bottom"||this.mode==="top",isDestroyed:()=>this.destroyed,isDragging:()=>this.gesture?.isDragging??!1,recomputeSnaps:()=>this.recomputeSnaps(),resolveActiveSnap:()=>this.snaps.findById(this.activeId),getMaxAxisSize:()=>this.snaps.getMaxAxisSize(),getSize:()=>this.size,setMaxAxisSize:e=>{this.snaps.setMaxAxisSize(e)},setSize:e=>{this.size=e},applySize:e=>this.applySize(e),cancelInFlight:()=>{this.animation.cancel()},newCycle:()=>{this.newCycle()},isAnimating:()=>this.animation.isAnimating,resyncAfterCancel:()=>this.resyncAfterResize()}))}this.teardowns.add(Mt({handle:this.handle,mode:this.mode,isDestroyed:()=>this.destroyed,getAllowedIds:()=>this.allowedIdsBySize(),getActiveId:()=>this.activeId,snapTo:e=>{this.snapTo(e)}})),this.scrim.attach()}settleAfterDrag(e,i,n="touch"){let s=this.newCycle(),r=this.snaps.findDragSettleTarget({delta:e,velocity:i,pointerKind:n,size:this.size,activeId:this.activeId,flickVelocity:this.flickVelocity,dragThreshold:this.dragThreshold});if(!r){this.clearWillChangeIfIdle();return}let a=this.activeId;if(r.id===a&&r.size===this.size){this.clearWillChangeIfIdle();return}if(this.emitBeforeSnap(r,a)){let p=this.snaps.findById(a);p&&this.animation.animateTo(p.size,0);return}let l=this.size,h=this.snaps.findById(a)?.size;this.scrollCache.cache(a,l,r.size),this.activeId=r.id,h===0&&r.size>0&&(this.opening=!0,w.promote(this.id));let c=this.snaps.getMaxAxisSize(),d=c>0?Math.min(r.size,c):r.size;this.allowOvershoot=!0,this.animation.animateTo(d,i).then(()=>{s.aborted||(this.allowOvershoot=!1,this.opening=!1,this.completeSnap(r.id,r.size,l,h===0,!0))})}clearWillChangeIfIdle(){this.animation.isAnimating||this.gesture?.isDragging||(this.element.style.willChange="")}haptic(){if(typeof navigator<"u"&&"vibrate"in navigator)try{navigator.vibrate(un)}catch{}}applySize(e){let i=this.snaps.getMaxAxisSize(),n=i>0&&e>i&&!this.gesture?.isDragging&&!this.allowOvershoot?i:e;this.size=n;let s=i-n,r=this.element.style;r.transform=this.transformTemplate(s),this.sizeWriteSentinel.shouldWrite(n,.5)&&(r.setProperty("--bs-size",`${n}px`),this.scrimParent&&this.scrimParent.style.setProperty("--bs-size",`${n}px`),this.anchorHost&&this.anchorHost!==this.scrimParent&&this.anchorHost.style.setProperty("--bs-size",`${n}px`),this.rootEl&&this.rootEl!==this.scrimParent&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-size",`${n}px`));let a=this.computeProgress(n),l=this.progressWriteSentinel.shouldWrite(a,.005);l&&(r.setProperty("--bs-progress",String(a)),this.anchorHost&&this.anchorHost.style.setProperty("--bs-progress",String(a)),this.rootEl&&this.rootEl!==this.anchorHost&&this.rootEl.style.setProperty("--bs-progress",String(a))),this.scrim.applyOpacity(a,l),l&&this.bus.listenerCount("progress")>0&&(this.progressPayload.value=a,this.progressPayload.size=n,this.emit("progress",this.progressPayload))}computeProgress(e){let{min:i,max:n}=this.getAllowedRange(),s=Math.min(n,this.snaps.getMaxAxisSize());return s<=i?0:Math.min(Math.max((e-i)/(s-i),0),1)}handleOpen(){w.promote(this.id);try{this.lifecycle.install()}catch(e){this.destroyed||this.newCycle(),this.handleClose(),this.applySize(0),this.activeId=this.snapPointsRaw.find(i=>i.id==="closed")?.id??this.activeId,this.size=0,queueMicrotask(()=>{throw e})}}resyncAfterResize(){if(this.destroyed)return;let e=this.snaps.findById(this.activeId);e&&(this.updateAriaSlider(),this.emit("snap",{id:e.id,size:this.size,progress:this.computeProgress(this.size)}),e.size>0&&!this.lifecycle.isInstalled?this.emitOpenSequence(e.id):e.size===0&&this.lifecycle.isInstalled&&this.emitCloseSequence())}handleClose(){this.opening=!1,this.lifecycle.release(),w.update()}}});var bi,vi=m(()=>{"use strict";bi=':where(.bs-root){--bs-surface-d:#ffffff;--bs-surface-border-d:rgba(225,227,237,1);--bs-radius-d:20px;--bs-handle-color-d:rgba(26,22,20,0.3);--bs-handle-width:40px;--bs-handle-height:5px;--bs-z-backdrop:90;--bs-z-sheet:100;--bs-backdrop-color-d:rgba(0,0,0,0.5);--bs-scrim-color-d:transparent;--bs-scrim-blur:0px;--bs-z-scrim:calc(var(--bs-z-sheet) - 1);--bs-size:0px;--bs-progress:0}.bs-backdrop{position:fixed;inset:0;background:var(--bs-backdrop-color,var(--bs-backdrop-color-d));opacity:0;pointer-events:none;z-index:var(--bs-z-backdrop);transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-backdrop,.bs-root[data-animating="true"] .bs-backdrop{transition:none}.bs-sheet{position:fixed;background:var(--bs-surface,var(--bs-surface-d));box-shadow:var(--bs-shadow,var(--bs-shadow-auto,none));z-index:var(--bs-z-sheet);pointer-events:auto;overflow:hidden;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;user-select:none;overscroll-behavior:contain}.bs-sheet[data-mode="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));padding-bottom:env(safe-area-inset-bottom);--bs-shadow-auto:0 calc(var(--bs-progress,0) * -2px - 3px) calc(var(--bs-progress,0) * 18px + 12px) rgba(0,0,0,calc(var(--bs-progress,0) * 0.15 + 0.12))}.bs-sheet[data-mode="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom:1px solid var(--bs-surface-border,var(--bs-surface-border-d));flex-direction:column-reverse;--bs-shadow-auto:0 3px 12px rgba(0,0,0,0.12);padding-top:env(safe-area-inset-top)}.bs-sheet[data-mode="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-right-radius:var(--bs-radius,var(--bs-radius-d));border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:3px 0 12px rgba(0,0,0,0.12)}.bs-sheet[data-mode="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--bs-radius,var(--bs-radius-d));border-bottom-left-radius:var(--bs-radius,var(--bs-radius-d));border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d));--bs-shadow-auto:-3px 0 12px rgba(0,0,0,0.12)}.bs-sheet[data-mode="left"] .bs-content{padding-right:36px}.bs-sheet[data-mode="right"] .bs-content{padding-left:36px}.bs-handle{flex-shrink:0;min-height:44px;display:flex;flex-direction:column;justify-content:center;padding:var(--bs-handle-padding,8px 16px 4px);cursor:grab;touch-action:none;user-select:none;background:var(--bs-surface,var(--bs-surface-d));-webkit-tap-highlight-color:transparent;outline:none;position:relative}.bs-handle:active{cursor:grabbing}.bs-handle:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:var(--bs-radius,var(--bs-radius-d))}.bs-handle::before{content:"";display:block;width:var(--bs-handle-width);height:var(--bs-handle-height);background:var(--bs-handle-color,var(--bs-handle-color-d));border-radius:calc(var(--bs-handle-height) / 2);margin:0 auto 8px;transition:width 0.15s ease,background 0.15s ease,transform 0.15s ease;pointer-events:none}.bs-sheet[data-mode="left"] .bs-handle,.bs-sheet[data-mode="right"] .bs-handle{position:absolute;top:0;bottom:0;width:28px;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;background:var(--bs-surface,var(--bs-surface-d));z-index:1;overflow:hidden}.bs-sheet[data-mode="left"] .bs-handle>*,.bs-sheet[data-mode="right"] .bs-handle>*{display:none}.bs-sheet[data-mode="left"] .bs-handle{right:0;border-left:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="right"] .bs-handle{left:0;border-right:1px solid var(--bs-surface-border,var(--bs-surface-border-d))}.bs-sheet[data-mode="left"] .bs-handle::before,.bs-sheet[data-mode="right"] .bs-handle::before{width:var(--bs-handle-height);height:var(--bs-handle-width);margin:0}.bs-sheet:hover .bs-handle::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 15%)}.bs-handle:active::before{background:color-mix(in oklab,var(--bs-handle-color,var(--bs-handle-color-d)),#000 35%);transform:scaleX(1.15)}.bs-handle.bs-handle--ticks::after{content:"";display:block;position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:calc(var(--bs-handle-width) * 2);height:3px;background-image:radial-gradient( circle,var(--bs-handle-color,var(--bs-handle-color-d)) 0 1.5px,transparent 1.6px );background-size:8px 3px;background-repeat:repeat-x;background-position:center;opacity:0;transition:opacity 0.18s ease-out;pointer-events:none}.bs-root[data-dragging="true"] .bs-handle.bs-handle--ticks::after{opacity:0.4}.bs-sheet[data-mode="top"] .bs-handle.bs-handle--ticks::after{bottom:auto;top:6px}.bs-sheet[data-mode="left"] .bs-handle.bs-handle--ticks::after,.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:3px;height:calc(var(--bs-handle-width) * 2);background-size:3px 8px;background-repeat:repeat-y;margin-left:calc(var(--bs-handle-height) + 6px)}.bs-sheet[data-mode="right"] .bs-handle.bs-handle--ticks::after{margin-left:calc(-1 * (var(--bs-handle-height) + 6px))}.bs-header{flex:0 0 auto;min-height:var(--bs-header-min-height,0px);padding:var(--bs-header-padding,0 16px 8px);background:var(--bs-surface,var(--bs-surface-d))}.bs-content{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;user-select:text;padding:var(--bs-content-padding,0 16px 16px)}.bs-footer{flex:0 0 auto;padding:var(--bs-footer-padding,12px 16px calc(12px + env(safe-area-inset-bottom)));border-top:1px solid var(--bs-surface-border,var(--bs-surface-border-d));background:var(--bs-surface,var(--bs-surface-d))}.bs-sheet[data-mode="bottom"]:has(.bs-footer:not([hidden]):has(*)){padding-bottom:0}.bs-header:not(:has(*)),.bs-footer:not(:has(*)),.bs-header[hidden],.bs-footer[hidden]{display:none}.bs-screen{position:absolute;inset:0;pointer-events:none;z-index:var(--bs-z-scrim);background:var(--bs-scrim-color,var(--bs-scrim-color-d));backdrop-filter:blur(var(--bs-scrim-blur,0px));-webkit-backdrop-filter:blur(var(--bs-scrim-blur,0px));transition:opacity 0.24s cubic-bezier(0.22,1,0.36,1);will-change:opacity}.bs-root[data-dragging="true"] .bs-screen,.bs-root[data-animating="true"] .bs-screen{transition:none}.bs-scrim-overlay{z-index:calc(var(--bs-z-sheet) + 1);pointer-events:none}.bs-button-slot{position:fixed;z-index:calc(var(--bs-z-sheet) + 1);pointer-events:auto}.bs-button-slot[data-side="left"]{left:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-side="right"]{right:16px;bottom:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="top"]{bottom:auto;top:calc(var(--bs-size,0px) + 12px)}.bs-button-slot[data-mode="left"]{left:calc(var(--bs-size,0px) + 12px);right:auto;bottom:auto;top:16px}.bs-button-slot[data-mode="right"]{right:calc(var(--bs-size,0px) + 12px);left:auto;bottom:auto;top:16px}@media (prefers-reduced-motion:reduce){.bs-backdrop,.bs-handle::before,.bs-button-slot[data-side="left"],.bs-button-slot[data-side="right"]{transition:none !important}}@media (prefers-color-scheme:dark){:where(.bs-root){--bs-surface-d:#1a1a1d;--bs-surface-border-d:rgba(255,255,255,0.08);--bs-handle-color-d:rgba(255,255,255,0.45);--bs-shadow-auto:0 -3px 16px rgba(0,0,0,0.5)}}@media (forced-colors:active){.bs-sheet{border:1px solid CanvasText}.bs-handle::before{background:CanvasText;forced-color-adjust:none}.bs-backdrop,.bs-screen{forced-color-adjust:none}}.bs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:where(.ovl-root){--ovl-surface:var(--bs-surface,var(--bs-surface-d,#ffffff));--ovl-surface-border:var(--bs-surface-border,var(--bs-surface-border-d,rgba(0,0,0,0.08)));--ovl-shadow:0 -8px 40px rgba(0,0,0,0.35);--ovl-radius:var(--bs-radius,var(--bs-radius-d,20px));--ovl-backdrop-color:rgba(0,0,0,0.5);--ovl-z-backdrop:200;--ovl-z-panel:201}.ovl-backdrop{position:fixed;inset:0;background:var(--ovl-backdrop-color);opacity:0;pointer-events:none;z-index:var(--ovl-z-backdrop)}.ovl-panel{position:fixed;background:var(--ovl-surface);box-shadow:var(--ovl-shadow);z-index:var(--ovl-z-panel);-webkit-tap-highlight-color:transparent;outline:none;transition:transform 0.32s cubic-bezier(0.29,1.24,0.84,0.99),opacity 0.32s ease-out}.ovl-panel[data-state="open"]{transform:translate3d(0,0,0);opacity:1}@starting-style{.ovl-panel[data-edge="bottom"][data-state="open"]{transform:translate3d(0,100%,0);opacity:0}.ovl-panel[data-edge="top"][data-state="open"]{transform:translate3d(0,-100%,0);opacity:0}.ovl-panel[data-edge="left"][data-state="open"]{transform:translate3d(-100%,0,0);opacity:0}.ovl-panel[data-edge="right"][data-state="open"]{transform:translate3d(100%,0,0);opacity:0}}.ovl-panel[data-edge="bottom"]{left:0;right:0;bottom:0;width:100%;border-top-left-radius:var(--ovl-radius);border-top-right-radius:var(--ovl-radius);border-top:1px solid var(--ovl-surface-border);padding-bottom:env(safe-area-inset-bottom)}.ovl-panel[data-edge="top"]{left:0;right:0;top:0;width:100%;border-bottom-left-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-bottom:1px solid var(--ovl-surface-border);padding-top:env(safe-area-inset-top)}.ovl-panel[data-edge="left"]{top:0;bottom:0;left:0;height:100%;border-top-right-radius:var(--ovl-radius);border-bottom-right-radius:var(--ovl-radius);border-right:1px solid var(--ovl-surface-border)}.ovl-panel[data-edge="right"]{top:0;bottom:0;right:0;height:100%;border-top-left-radius:var(--ovl-radius);border-bottom-left-radius:var(--ovl-radius);border-left:1px solid var(--ovl-surface-border)}@media (prefers-reduced-motion:reduce){.ovl-panel,.ovl-backdrop{transition:none !important}}'});var de,yi,Si,xi=m(()=>{"use strict";de=t=>{let e=document.createElement("slot");return e.name=t,e},yi=(t,e)=>{let i=document.createElement("div");i.className=e,i.setAttribute("part",t);let n=de(t);i.appendChild(n);let s=()=>{i.hidden=n.assignedNodes({flatten:!0}).length===0};return n.addEventListener("slotchange",s),s(),i},Si=()=>{let t=document.createElement("div");t.className="bs-root";let e=document.createElement("div");e.className="bs-backdrop",e.setAttribute("part","backdrop");let i=document.createElement("div");i.className="bs-screen",i.setAttribute("part","screen"),i.appendChild(de("screen"));let n=document.createElement("section");n.className="bs-sheet",n.setAttribute("part","sheet"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false");let s=document.createElement("div");s.className="bs-button-slot",s.setAttribute("data-side","left"),s.setAttribute("part","left-button"),s.appendChild(de("leftButton"));let r=document.createElement("div");r.className="bs-button-slot",r.setAttribute("data-side","right"),r.setAttribute("part","right-button"),r.appendChild(de("rightButton"));let a=document.createElement("div");a.className="bs-handle",a.setAttribute("part","handle"),a.setAttribute("role","slider"),a.setAttribute("tabindex","0"),a.setAttribute("aria-label","Resize sheet");let l=yi("header","bs-header"),h=document.createElement("div");h.className="bs-content",h.setAttribute("part","content"),h.setAttribute("tabindex","0"),h.setAttribute("role","region"),h.setAttribute("aria-label","Sheet content");let c=document.createElement("slot");h.appendChild(c);let d=yi("footer","bs-footer"),p=document.createElement("span");p.className="bs-sr-announce",p.setAttribute("role","status"),p.setAttribute("aria-live","polite"),p.setAttribute("aria-atomic","true"),p.style.cssText="position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);",n.append(a,l,h,d),t.append(e,i,n,s,r,p);let u=document.createDocumentFragment();return u.appendChild(t),{fragment:u,refs:{sheet:n,handle:a,header:l,content:h,footer:d,backdrop:e,screen:i,leftButton:s,rightButton:r,announcer:p}}}});var Ce,Me,ze,ke,Re,Ai,Ie,De,Oe,Le,Pe,He,N,K,V,_e,U,W,Be,$,Y,C,Ei,wi,mn,Ti,Ci,fn,gn,Mi,zi,ce,q,bn,vn,ki,Ri=m(()=>{"use strict";Ce="snap-points",Me="allowed",ze="initial",ke="mode",Re="backdrop",Ai="stylesheet",Ie="animation",De="focus-trap",Oe="close-on-escape",Le="lock-body-scroll",Pe="sheet-label",He="stack-effect",N="persistent",K="disable-close",V="disable-drag",_e="close-on-route-change",U="radius",W="max-height",Be="return-focus-to",$="backdrop-color",Y="scrim-color",C="snap",Ei=new Set([U,W,$,Y,C,N,K,V]),wi=[Ce,Me,ze,ke,Re,Ie,De,Oe,Le,Pe,He,N,K,V,_e,U,W,Be,$,Y,C],mn=t=>!!t&&typeof t=="object"&&typeof t.id=="string"&&(typeof t.size=="number"||typeof t.size=="string"),Ti=[{id:"full",size:"full"}],Ci=t=>{if(!t)return Ti;try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&e.every(mn))return e;if(Array.isArray(e))return Ti}catch{}return t.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let[i,n]=e.split(":").map(a=>a.trim()),s=Number(n),r=Number.isFinite(s)?s:n;return{id:i??"default",size:r}})},fn=["bottom","top","left","right"],gn=["spring","tween","ios-spring","material-bounce","linear","snappy"],Mi=t=>t&&fn.includes(t)?t:"bottom",zi=t=>t&&gn.includes(t)?t:void 0,ce=t=>t?t.split(",").map(e=>e.trim()).filter(Boolean):void 0,q=t=>{if(t===null)return;let e=Number(t);return Number.isFinite(e)&&t.trim()!==""?e:t},bn=["top-left","top-center","top-right","center-left","center","center-right","bottom-left","bottom-center","bottom-right","sheet-top-left","sheet-top-center","sheet-top-right","dock-bottom","dock-top"],vn=["fade","scale","slide","pop","none"],ki=t=>{let e=t.getAttribute("data-position"),i=t.getAttribute("data-animation"),n=ce(t.getAttribute("data-show-on")),s=ce(t.getAttribute("data-fade-range")),r=s?.length===2&&s.every(a=>Number.isFinite(Number(a)))?[Number(s[0]),Number(s[1])]:void 0;return{position:e&&bn.includes(e)?e:void 0,inset:t.getAttribute("data-inset")??void 0,showOn:n,fadeRange:r,interactive:t.getAttribute("data-interactive")!=="false",animation:i&&vn.includes(i)?i:void 0}}});var Ii={};We(Ii,{BottomSheetElement:()=>I,defineBottomSheet:()=>Fe});var yn,I,Fe,Ne=m(()=>{"use strict";gi();vi();xi();Ri();yn=typeof HTMLElement<"u"?HTMLElement:class{},I=class extends yn{constructor(){super();o(this,"engine",null);o(this,"root");o(this,"offHandlers",[]);o(this,"refs");o(this,"backdropClickHandler",null);o(this,"stylesheetLinked",!1);o(this,"declarativeAnchors",[]);o(this,"lastActiveId",null);this.root=this.attachShadow({mode:"open"});let i=document.createElement("style");i.textContent=bi,this.root.appendChild(i);let n=document.createElement("style");n.textContent=[":host { display: contents; }",".bs-handle:focus-visible {"," outline: 2px solid currentColor;"," outline-offset: -2px;"," border-radius: var(--bs-radius, 20px);","}","@media (forced-colors: active) {"," .bs-handle:focus-visible { outline: 2px solid CanvasText; }","}"].join(`
|
|
2
|
+
`),this.root.appendChild(n);let{fragment:s,refs:r}=Si();this.refs=r,this.root.appendChild(s)}static get observedAttributes(){return wi.slice()}connectedCallback(){if(!this.stylesheetLinked){this.stylesheetLinked=!0;let i=this.getAttribute(Ai);if(i){let n=document.createElement("link");n.rel="stylesheet",n.href=i,this.root.appendChild(n)}}this.initEngine()}disconnectedCallback(){this.teardownEngine()}attributeChangedCallback(i,n,s){if(this.engine){if(Ei.has(i)){this.applyLiveAttribute(i,s);return}this.teardownEngine(),this.initEngine()}}applyLiveAttribute(i,n){if(this.engine)switch(i){case U:{let s=q(n);s!==void 0&&this.engine.setRadius(s);break}case W:{let s=q(n);s!==void 0&&this.engine.setMaxHeight(s);break}case $:case Y:this.engine.setScrimColor(n);break;case N:this.engine.setPersistent(n==="true");break;case K:this.engine.setDisableClose(n==="true");break;case V:this.engine.setDisableDrag(n==="true");break;case C:n&&n!==this.engine.state.activeId&&this.engine.snapTo(n);break}}getEngine(){return this.engine}teardownEngine(){this.lastActiveId=this.engine?.state.activeId??this.lastActiveId,this.offHandlers.forEach(i=>i()),this.offHandlers=[],this.backdropClickHandler&&(this.refs.backdrop.removeEventListener("click",this.backdropClickHandler),this.backdropClickHandler=null),this.engine?.destroy(),this.engine=null;for(let i of this.declarativeAnchors)this.appendChild(i);this.declarativeAnchors=[]}initEngine(){let{sheet:i,handle:n,content:s,backdrop:r,announcer:a}=this.refs,l=Mi(this.getAttribute(ke));i.setAttribute("data-mode",l),this.refs.leftButton.setAttribute("data-mode",l),this.refs.rightButton.setAttribute("data-mode",l);let h=this.getAttribute(De)==="true";h?i.setAttribute("aria-modal","true"):i.removeAttribute("aria-modal"),i.setAttribute("aria-label",this.getAttribute(Pe)??"Bottom sheet");let c=this.getAttribute(Re)!=="false";r.style.display=c?"":"none",c&&(this.backdropClickHandler=()=>{this.engine?.canDismiss()&&this.engine.close("backdrop")},r.addEventListener("click",this.backdropClickHandler));let d=Ci(this.getAttribute(Ce)),p=this.getAttribute(ze)??void 0,u=this.lastActiveId&&d.some(f=>f.id===this.lastActiveId)?this.lastActiveId:p,g={element:i,handle:n,scrollContainer:s,backdrop:c?r:void 0,scrim:this.refs.screen,mode:l,snapPoints:d,allowed:ce(this.getAttribute(Me)),initial:u,animation:zi(this.getAttribute(Ie)),focusTrap:h,closeOnEscape:this.getAttribute(Oe)!=="false",lockBodyScroll:this.getAttribute(Le)!=="false",stackEffect:this.getAttribute(He)==="true",persistent:this.getAttribute(N)==="true",disableClose:this.getAttribute(K)==="true",disableDrag:this.getAttribute(V)==="true",closeOnRouteChange:this.getAttribute(_e)==="true",radius:q(this.getAttribute(U)),maxHeight:q(this.getAttribute(W)),returnFocusTo:this.getAttribute(Be)??void 0};this.engine=new le(g),i.setAttribute("data-active",this.engine.state.activeId);let b=this.getAttribute(Y)??this.getAttribute($);b!==null&&this.engine.setScrimColor(b);for(let f of Array.from(this.querySelectorAll('[slot="anchor"]')))this.declarativeAnchors.push(f),this.engine.addAnchor({...ki(f),element:f});this.offHandlers=[this.engine.on("snap",f=>{i.setAttribute("data-active",f.id),a.textContent=f.id,this.dispatchEvent(new CustomEvent("snap",{detail:f}))}),this.engine.on("before-snap",f=>{this.dispatchEvent(new CustomEvent("before-snap",{detail:f,cancelable:!0}))||f.cancel()}),this.engine.on("open",f=>this.dispatchEvent(new CustomEvent("open",{detail:f}))),this.engine.on("close",()=>this.dispatchEvent(new CustomEvent("close"))),this.engine.on("progress",f=>this.dispatchEvent(new CustomEvent("progress",{detail:f}))),this.engine.on("before-close",f=>{this.dispatchEvent(new CustomEvent("before-close",{detail:f,cancelable:!0}))||f.cancel()}),this.engine.on("opened",f=>this.dispatchEvent(new CustomEvent("opened",{detail:f}))),this.engine.on("closed",()=>this.dispatchEvent(new CustomEvent("closed"))),this.engine.on("dragstart",f=>this.dispatchEvent(new CustomEvent("drag-start",{detail:f}))),this.engine.on("dragend",f=>this.dispatchEvent(new CustomEvent("drag-end",{detail:f}))),this.engine.on("drag",f=>this.dispatchEvent(new CustomEvent("drag",{detail:f})))]}snapTo(i){return this.engine?.snapTo(i)??Promise.resolve()}open(i){return this.engine?.open(i)??Promise.resolve()}close(i){return this.engine?.close(i)??Promise.resolve()}expand(){return this.engine?.expand()??Promise.resolve()}collapse(){return this.engine?.collapse()??Promise.resolve()}isTop(){return this.engine?.isTop()??!1}depth(){return this.engine?.depth()??0}canDismiss(){return this.engine?.canDismiss()??!1}setRadius(i){this.engine?.setRadius(i)}setMaxHeight(i){this.engine?.setMaxHeight(i)}setAllowed(i,n){this.engine?.setAllowed(i,n)}addAnchor(i){return this.engine?.addAnchor(i)??(()=>{})}setScrimStages(i){return this.engine?.setScrimStages(i)??(()=>{})}recompute(){this.engine?.recompute()}get sheetState(){return this.engine?.state??null}get snap(){return this.engine?.state.activeId??this.getAttribute(C)}set snap(i){if(i===null){this.removeAttribute(C);return}this.engine?i!==this.engine.state.activeId&&this.engine.snapTo(i):this.setAttribute(C,i)}},Fe=(t="bottom-sheet")=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,class extends I{})}});var Sn={};We(Sn,{BottomSheetElement:()=>I,defineBottomSheet:()=>Fe});Ne();typeof window<"u"&&typeof customElements<"u"&&Promise.resolve().then(()=>(Ne(),Ii)).then(({defineBottomSheet:t})=>{t()});return _i(Sn);})();
|
|
3
3
|
//# sourceMappingURL=element.iife.global.js.map
|