vendor: 4,562 bytes, line 1
1import{r as c,az as jn,j as v,at as $e,aA as Mn,ay as Dn,aB as $n,ao as _n,aq as In,aC as Fn,aD as Pe,ax as ht,aE as Ln}from"./index-BUm1srQw.js";import{P as Oe,e as Qe,a as Nt,b as Tn,u as ue,c as Se,d as jt}from"./index-CxhHXqoB.js";import{u as ze,c as we}from"./index-CJSKqn58.js";import{u as zn,P as Wn,h as Hn,R as Vn,e as Bn,F as Kn,f as Xn,g as Yn,i as qn,O as Gn,C as Un}from"./dialog-C7_cYwC8.js";import{c as pe}from"./utils-BQHNewu7.js";import{c as Zn}from"./index-DOT2LqR4.js";import{S as Jn}from"./search-DosPd7MY.js";import{C as Qn}from"./chevron-down-CLEFmASG.js";import{C as er}from"./check-D-GJdVN-.js";import{f as tr}from"./visitor-context-CZy3ifRV.js";const nr=["top","right","bottom","left"],oe=Math.min,q=Math.max,Ie=Math.round,De=Math.floor,Q=e=>({x:e,y:e}),rr={left:"right",right:"left",bottom:"top",top:"bottom"};function et(e,t,n){return q(e,oe(t,n))}function te(e,t){return typeof e=="function"?e(t):e}function ne(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function it(e){return e==="x"?"y":"x"}function st(e){return e==="y"?"height":"width"}function J(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function at(e){return it(J(e))}function or(e,t,n){n===void 0&&(n=!1);const r=be(e),o=at(e),i=st(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Fe(s)),[s,Fe(s)]}function ir(e){const t=Fe(e);return[tt(e),t,tt(t)]}function tt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gt=["left","right"],vt=["right","left"],sr=["top","bottom"],ar=["bottom","top"];function lr(e,t,n){switch(e){case"top":case"bottom":return n?t?vt:gt:t?gt:vt;case"left":case"right":return t?sr:ar;default:return[]}}function cr(e,t,n,r){const o=be(e);let i=lr(ne(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(tt)))),i}function Fe(e){const t=ne(e);return rr[t]+e.slice(t.length)}function ur(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mt(e){return typeof e!="number"?ur(e):{top:e,right:e,bottom:e,left:e}}function Le(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function wt(e,t,n){let{reference:r,floating:o}=e;const i=J(t),s=at(t),a=st(s),u=ne(t),l=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let p;switch(u){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(be(t)){case"start":p[s]-=m*(n&&l?-1:1);break;case"end":p[s]+=m*(n&&l?-1:1);break}return p}async function fr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=te(t,e),g=Mt(p),y=a[m?d==="floating"?"reference":"floating":d],x=Le(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:f,strategy:u})),A=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),R=await(i.isElement==null?void 0:i.isElement(P))?await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1}:{x:1,y:1},E=Le(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:P,strategy:u}):A);return{top:(x.top-E.top+g.top)/R.y,bottom:(E.bottom-x.bottom+g.bottom)/R.y,left:(x.left-E.left+g.left)/R.x,right:(E.right-x.right+g.right)/R.x}}const dr=50,pr=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:fr},u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=wt(l,r,u),m=r,p=0;const g={};for(let w=0;w<i.length;w++){const y=i[w];if(!y)continue;const{name:x,fn:A}=y,{x:P,y:R,data:E,reset:b}=await A({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:l,platform:a,elements:{reference:e,floating:t}});f=P??f,d=R??d,g[x]={...g[x],...E},b&&p<dr&&(p++,typeof b=="object"&&(b.placement&&(m=b.placement),b.rects&&(l=b.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:f,y:d}=wt(l,m,u)),w=-1)}return{x:f,y:d,placement:m,strategy:o,middlewareData:g}}
vendor: 5,105 bytes, line 1
1,mr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:l,padding:f=0}=te(e,t)||{};if(l==null)return{};const d=Mt(f),m={x:n,y:r},p=at(o),g=st(p),w=await s.getDimensions(l),y=p==="y",x=y?"top":"left",A=y?"bottom":"right",P=y?"clientHeight":"clientWidth",R=i.reference[g]+i.reference[p]-m[p]-i.floating[g],E=m[p]-i.reference[p],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let O=b?b[P]:0;(!O||!await(s.isElement==null?void 0:s.isElement(b)))&&(O=a.floating[P]||i.floating[g]);const L=R/2-E/2,V=O/2-w[g]/2-1,I=oe(d[x],V),T=oe(d[A],V),z=I,F=O-w[g]-T,D=O/2-w[g]/2+L,W=et(z,D,F),$=!u.arrow&&be(o)!=null&&D!==W&&i.reference[g]/2-(D<z?I:T)-w[g]/2<0,_=$?D<z?D-z:D-F:0;return{[p]:m[p]+_,data:{[p]:W,centerOffset:D-W-_,...$&&{alignmentOffset:_}},reset:$}}}),hr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:w=!0,...y}=te(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=ne(o),A=J(a),P=ne(a)===a,R=await(u.isRTL==null?void 0:u.isRTL(l.floating)),E=m||(P||!w?[Fe(a)]:ir(a)),b=g!=="none";!m&&b&&E.push(...cr(a,w,g,R));const O=[a,...E],L=await u.detectOverflow(t,y),V=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&V.push(L[x]),d){const D=or(o,s,R);V.push(L[D[0]],L[D[1]])}if(I=[...I,{placement:o,overflows:V}],!V.every(D=>D<=0)){var T,z;const D=(((T=i.flip)==null?void 0:T.index)||0)+1,W=O[D];if(W&&(!(d==="alignment"?A!==J(W):!1)||I.every(k=>J(k.placement)===A?k.overflows[0]>0:!0)))return{data:{index:D,overflows:I},reset:{placement:W}};let $=(z=I.filter(_=>_.overflows[0]<=0).sort((_,k)=>_.overflows[1]-k.overflows[1])[0])==null?void 0:z.placement;if(!$)switch(p){case"bestFit":{var F;const _=(F=I.filter(k=>{if(b){const H=J(k.placement);return H===A||H==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(H=>H>0).reduce((H,Y)=>H+Y,0)]).sort((k,H)=>k[1]-H[1])[0])==null?void 0:F[0];_&&($=_);break}case"initialPlacement":$=a;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function xt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yt(e){return nr.some(t=>e[t]>=0)}const gr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=te(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=xt(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:yt(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=xt(s,n.floating);return{data:{escapedOffsets:a,escaped:yt(a)}}}default:return{}}}}},Dt=new Set(["left","top"]);async function vr(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ne(n),a=be(n),u=J(n)==="y",l=Dt.has(s)?-1:1,f=i&&u?-1:1,d=te(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),u?{x:p*f,y:m*l}:{x:m*l,y:p*f}}const wr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await vr(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},xr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:x=>{let{x:A,y:P}=x;return{x:A,y:P}}},...l}=te(e,t),f={x:n,y:r},d=await i.detectOverflow(t,l),m=J(ne(o)),p=it(m);let g=f[p],w=f[m];if(s){const x=p==="y"?"top":"left",A=p==="y"?"bottom":"right",P=g+d[x],R=g-d[A];g=et(P,g,R)}if(a){const x=m==="y"?"top":"left",A=m==="y"?"bottom":"right",P=w+d[x],R=w-d[A];w=et(P,w,R)}const y=u.fn({...t,[p]:g,[m]:w});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:s,[m]:a}}}}}},yr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:u=!0,crossAxis:l=!0}=te(e,t),f={x:n,y:r},d=J(o),m=it(d);let p=f[m],g=f[d];const w=te(a,t),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){const P=m==="y"?"height":"width",R=i.reference[m]-i.floating[P]+y.mainAxis,E=i.reference[m]+i.reference[P]-y.mainAxis;p<R?p=R:p>E&&(p=E)}if(l){var x,A;const P=m==="y"?"width":"height",R=Dt.has(ne(o)),E=i.reference[d]-i.floating[P]+(R&&((x=s.offset)==null?void 0:x[d])||0)+(R?0:y.crossAxis),b=i.reference[d]+i.reference[P]+(R?0:((A=s.offset)==null?void 0:A[d])||0)-(R?y.crossAxis:0);g<E?g=E:g>b&&(g=b)}return{[m]:p,[d]:g}}}},br=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...l}
1=te(e,t),f=await s.detectOverflow(t,l),d=ne(o),m=be(o),p=J(o)==="y",{width:g,height:w}=i.floating;let y,x;d==="top"||d==="bottom"?(y=d,x=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(x=d,y=m==="end"?"top":"bottom");const A=w-f.top-f.bottom,P=g-f.left-f.right,R=oe(w-f[y],A),E=oe(g-f[x],P),b=!t.middlewareData.shift;let O=R,L=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=P),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=A),b&&!m){const I=q(f.left,0),T=q(f.right,0),z=q(f.top,0),F=q(f.bottom,0);p?L=g-2*(I!==0||T!==0?I+T:q(f.left,f.right)):O=w-2*(z!==0||F!==0?z+F:q(f.top,f.bottom))}await u({...t,availableWidth:L,availableHeight:O});const V=await s.getDimensions(a.floating);return g!==V.width||w!==V.height?{reset:{rects:!0}}:{}}}};function We(){return typeof window<"u"}function Ce(e){return $t(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ee(e){var t;return(t=($t(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $t(e){return We()?e instanceof Node||e instanceof G(e).Node:!1}function U(e){return We()?e instanceof Element||e instanceof G(e).Element:!1}function re(e){return We()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function bt(e){return!We()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}function ke(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Cr(e){return/^(table|td|th)$/.test(Ce(e))}function He(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Rr=/transform|translate|scale|rotate|perspective|filter/,Ar=/paint|layout|strict|content/,ce=e=>!!e&&e!=="none";let Ye;function lt(e){const t=U(e)?Z(e):e;return ce(t.transform)||ce(t.translate)||ce(t.scale)||ce(t.rotate)||ce(t.perspective)||!ct()&&(ce(t.backdropFilter)||ce(t.filter))||Rr.test(t.willChange||"")||Ar.test(t.contain||"")}function Sr(e){let t=ie(e);for(;re(t)&&!xe(t);){if(lt(t))return t;if(He(t))return null;t=ie(t)}return null}function ct(){return Ye==null&&(Ye=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ye}function xe(e){return/^(html|body|#document)$/.test(Ce(e))}function Z(e){return G(e).getComputedStyle(e)}function Ve(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ie(e){if(Ce(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bt(e)&&e.host||ee(e);return bt(t)?t.host:t}function _t(e){const t=ie(e);return xe(t)?e.ownerDocument?e.ownerDocument.body:e.body:re(t)&&ke(t)?t:_t(t)}function Ee(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_t(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=G(o);if(i){const a=nt(s);return t.concat(s,s.visualViewport||[],ke(o)?o:[],a&&n?Ee(a):[])}else return t.concat(o,Ee(o,[],n))}function nt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function It(e){const t=Z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=re(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ie(n)!==i||Ie(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ut(e){return U(e)?e:e.contextElement}function ve(e){const t=ut(e);if(!re(t))return Q(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=It(t);let s=(i?Ie(n.width):n.width)/r,a=(i?Ie(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Pr=Q(0);function Ft(e){const t=G(e);return!ct()||!t.visualViewport?Pr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Er(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==G(e)?!1:t}function fe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ut(e);let s=Q(1);t&&(r?U(r)&&(s=ve(r)):s=ve(e));const a=Er(i,n,r)?Ft(i):Q(0);let u=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const m=G(i),p=r&&U(r)?G(r):r;let g=m,w=nt(g);for(;w&&r&&p!==g;){const y=ve(w),x=w.getBoundingClientRect(),A=Z(w),P=x.left+(w.clientLeft+parseFloat(A.paddingLeft))*y.x,R=x.top+(w.clientTop+parseFloat(A.paddingTop))*y.y;u*=y.x,l*=y.y,f*=y.x,d*=y.y,u+=P,l+=R,g=G(w),w=nt(g)}}return Le({width:f,height:d,x:u,y:l})}function Be(e,t){const n=Ve(e).scrollLeft;return t?t.left+n:fe(ee(e)).left+n}function Lt(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Be(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Or(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=ee(r),a=t?He(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},l=Q(1);const f=Q(0),d=re(r);
1if((d||!d&&!i)&&((Ce(r)!=="body"||ke(s))&&(u=Ve(r)),d)){const p=fe(r);l=ve(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const m=s&&!d&&!i?Lt(s,u):Q(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+m.x,y:n.y*l.y-u.scrollTop*l.y+f.y+m.y}}function kr(e){return Array.from(e.getClientRects())}function Nr(e){const t=ee(e),n=Ve(e),r=e.ownerDocument.body,o=q(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=q(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Be(e);const a=-n.scrollTop;return Z(r).direction==="rtl"&&(s+=q(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Ct=25;function jr(e,t){const n=G(e),r=ee(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const f=ct();(!f||f&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const l=Be(r);if(l<=0){const f=r.ownerDocument,d=f.body,m=getComputedStyle(d),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=Ct&&(i-=g)}else l<=Ct&&(i+=l);return{width:i,height:s,x:a,y:u}}function Mr(e,t){const n=fe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=re(e)?ve(e):Q(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,l=r*i.y;return{width:s,height:a,x:u,y:l}}function Rt(e,t,n){let r;if(t==="viewport")r=jr(e,n);else if(t==="document")r=Nr(ee(e));else if(U(t))r=Mr(t,n);else{const o=Ft(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Le(r)}function Tt(e,t){const n=ie(e);return n===t||!U(n)||xe(n)?!1:Z(n).position==="fixed"||Tt(n,t)}function Dr(e,t){const n=t.get(e);if(n)return n;let r=Ee(e,[],!1).filter(a=>U(a)&&Ce(a)!=="body"),o=null;const i=Z(e).position==="fixed";let s=i?ie(e):e;for(;U(s)&&!xe(s);){const a=Z(s),u=lt(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ke(s)&&!u&&Tt(e,s))?r=r.filter(f=>f!==s):o=a,s=ie(s)}return t.set(e,r),r}function $r(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?He(t)?[]:Dr(t,this._c):[].concat(n),r],a=Rt(t,s[0],o);let u=a.top,l=a.right,f=a.bottom,d=a.left;for(let m=1;m<s.length;m++){const p=Rt(t,s[m],o);u=q(p.top,u),l=oe(p.right,l),f=oe(p.bottom,f),d=q(p.left,d)}return{width:l-d,height:f-u,x:d,y:u}}function _r(e){const{width:t,height:n}=It(e);return{width:t,height:n}}function Ir(e,t,n){const r=re(t),o=ee(t),i=n==="fixed",s=fe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=Q(0);function l(){u.x=Be(o)}if(r||!r&&!i)if((Ce(t)!=="body"||ke(o))&&(a=Ve(t)),r){const p=fe(t,!0,i,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&l();i&&!r&&o&&l();const f=o&&!r&&!i?Lt(o,a):Q(0),d=s.left+a.scrollLeft-u.x-f.x,m=s.top+a.scrollTop-u.y-f.y;return{x:d,y:m,width:s.width,height:s.height}}function qe(e){return Z(e).position==="static"}function At(e,t){if(!re(e)||Z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ee(e)===n&&(n=n.ownerDocument.body),n}function zt(e,t){const n=G(e);if(He(e))return n;if(!re(e)){let o=ie(e);for(;o&&!xe(o);){if(U(o)&&!qe(o))return o;o=ie(o)}return n}let r=At(e,t);for(;r&&Cr(r)&&qe(r);)r=At(r,t);return r&&xe(r)&&qe(r)&&!lt(r)?n:r||Sr(e)||n}const Fr=async function(e){const t=this.getOffsetParent||zt,n=this.getDimensions,r=await n(e.floating);return{reference:Ir(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lr(e){return Z(e).direction==="rtl"}const Tr={convertOffsetParentRelativeRectToViewportRelativeRect:Or,getDocumentElement:ee,getClippingRect:$r,getOffsetParent:zt,getElementRects:Fr,getClientRects:kr,getDimensions:_r,getScale:ve,isElement:U,isRTL:Lr};function Wt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zr(e,t){let n=null,r;const o=ee(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const l=e.getBoundingClientRect(),{left:f,top:d,width:m,height:p}=l;if(a||t(),!m||!p)return;const g=De(d),w=De(o.clientWidth-(f+m)),y=De(o.clientHeight-(d+p)),x=De(f),P={rootMargin:-g+"px "+-w+"px "+-y+"px "+-x+"px",threshold:q(0,oe(1,u))||1};let R=!0;function E(b){const O=b[0].intersectionRatio;if(O!==u){if(!R)return s();O?s(!1,O):r=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!Wt(l,e.getBoundingClientRect())&&s(),R=!1}try{n=new IntersectionObserver(E,{...P,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,P)}n.observe(e)}return s(!0),i}function Wr(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=ut(e),f=o||i?[...l?Ee(l):[],...t?Ee(t):[]]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const d=l&&a?zr(l,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(x=>{let[A]=x;A&&A.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var P;(P=p)==null||P.observe(t)})),n()}),l&&!u&&p.observe(l),t&&p.observe(t));let g,w=u?fe(e):null;u&&y();function y(){const x=fe(e);w&&!Wt(w,x)&&n(),w=x,g=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(A=>{o&&A.removeEventListener("scroll",n),i&&A.removeEventListener("resize",n)}),d?.(),(x=p)==null||x.disconnect(),p=null,u&&cancelAnimationFrame(g)}}const Hr=wr,Vr=xr,Br=hr,Kr=br,Xr=gr,St=mr,Yr=yr,qr=(e,t,n)=>{const r=new Map,o={platform:Tr,...n},i={...o.platform,_c:r};return pr(e,t,{...o,platform:i})};var Gr=typeof document<"u",Ur=function(){},_e=Gr?c.useLayoutEffect:Ur;function Te(e,t){if(e===t)return!0;
1if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Te(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Te(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ht(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pt(e,t){const n=Ht(e);return Math.round(t*n)/n}function Ge(e){const t=c.useRef(e);return _e(()=>{t.current=e}),t}function Zr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:u,open:l}=e,[f,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=c.useState(r);Te(m,r)||p(r);const[g,w]=c.useState(null),[y,x]=c.useState(null),A=c.useCallback(k=>{k!==b.current&&(b.current=k,w(k))},[]),P=c.useCallback(k=>{k!==O.current&&(O.current=k,x(k))},[]),R=i||g,E=s||y,b=c.useRef(null),O=c.useRef(null),L=c.useRef(f),V=u!=null,I=Ge(u),T=Ge(o),z=Ge(l),F=c.useCallback(()=>{if(!b.current||!O.current)return;const k={placement:t,strategy:n,middleware:m};T.current&&(k.platform=T.current),qr(b.current,O.current,k).then(H=>{const Y={...H,isPositioned:z.current!==!1};D.current&&!Te(L.current,Y)&&(L.current=Y,jn.flushSync(()=>{d(Y)}))})},[m,t,n,T,z]);_e(()=>{l===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[l]);const D=c.useRef(!1);_e(()=>(D.current=!0,()=>{D.current=!1}),[]),_e(()=>{if(R&&(b.current=R),E&&(O.current=E),R&&E){if(I.current)return I.current(R,E,F);F()}},[R,E,F,I,V]);const W=c.useMemo(()=>({reference:b,floating:O,setReference:A,setFloating:P}),[A,P]),$=c.useMemo(()=>({reference:R,floating:E}),[R,E]),_=c.useMemo(()=>{const k={position:n,left:0,top:0};if(!$.floating)return k;const H=Pt($.floating,f.x),Y=Pt($.floating,f.y);return a?{...k,transform:"translate("+H+"px, "+Y+"px)",...Ht($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:Y}},[n,a,$.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:F,refs:W,elements:$,floatingStyles:_}),[f,F,W,$,_])}const Jr=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?St({element:r.current,padding:o}).fn(n):{}:r?St({element:r,padding:o}).fn(n):{}}}},Qr=(e,t)=>{const n=Hr(e);return{name:n.name,fn:n.fn,options:[e,t]}},eo=(e,t)=>{const n=Vr(e);return{name:n.name,fn:n.fn,options:[e,t]}},to=(e,t)=>({fn:Yr(e).fn,options:[e,t]}),no=(e,t)=>{const n=Br(e);return{name:n.name,fn:n.fn,options:[e,t]}},ro=(e,t)=>{const n=Kr(e);return{name:n.name,fn:n.fn,options:[e,t]}},oo=(e,t)=>{const n=Xr(e);return{name:n.name,fn:n.fn,options:[e,t]}},io=(e,t)=>{const n=Jr(e);return{name:n.name,fn:n.fn,options:[e,t]}};var so="Arrow",Vt=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return v.jsx(Oe.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vt.displayName=so;var ao=Vt;function lo(e){const[t,n]=c.useState(void 0);return Qe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const u=i.borderBoxSize,l=Array.isArray(u)?u[0]:u;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ft="Popper",[Bt,Kt]=Nt(ft),[co,Xt]=Bt(ft),Yt=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return v.jsx(co,{scope:t,anchor:r,onAnchorChange:o,children:n})};Yt.displayName=ft;var qt="PopperAnchor",Gt=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Xt(qt,n),s=c.useRef(null),a=ze(t,s),u=c.useRef(null);return c.useEffect(()=>{const l=u.current;u.current=r?.current||s.current,l!==u.current&&i.onAnchorChange(u.current)}),r?null:v.jsx(Oe.div,{...o,ref:a})});Gt.displayName=qt;var dt="PopperContent",[uo,fo]=Bt(dt),Ut=c.forwardRef((e,t)=>
1{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:g,...w}=e,y=Xt(dt,n),[x,A]=c.useState(null),P=ze(t,M=>A(M)),[R,E]=c.useState(null),b=lo(R),O=b?.width??0,L=b?.height??0,V=r+(i!=="center"?"-"+i:""),I=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},T=Array.isArray(l)?l:[l],z=T.length>0,F={padding:I,boundary:T.filter(mo),altBoundary:z},{refs:D,floatingStyles:W,placement:$,isPositioned:_,middlewareData:k}=Zr({strategy:"fixed",placement:V,whileElementsMounted:(...M)=>Wr(...M,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[Qr({mainAxis:o+L,alignmentAxis:s}),u&&eo({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?to():void 0,...F}),u&&no({...F}),ro({...F,apply:({elements:M,rects:K,availableWidth:B,availableHeight:me})=>{const{width:kn,height:Nn}=K.reference,Me=M.floating.style;Me.setProperty("--radix-popper-available-width",`${B}px`),Me.setProperty("--radix-popper-available-height",`${me}px`),Me.setProperty("--radix-popper-anchor-width",`${kn}px`),Me.setProperty("--radix-popper-anchor-height",`${Nn}px`)}}),R&&io({element:R,padding:a}),ho({arrowWidth:O,arrowHeight:L}),m&&oo({strategy:"referenceHidden",...F})]}),[H,Y]=Qt($),Re=zn(g);Qe(()=>{_&&Re?.()},[_,Re]);const h=k.arrow?.x,S=k.arrow?.y,N=k.arrow?.centerOffset!==0,[C,j]=c.useState();return Qe(()=>{x&&j(window.getComputedStyle(x).zIndex)},[x]),v.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:_?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:C,"--radix-popper-transform-origin":[k.transformOrigin?.x,k.transformOrigin?.y].join(" "),...k.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(uo,{scope:n,placedSide:H,onArrowChange:E,arrowX:h,arrowY:S,shouldHideArrow:N,children:v.jsx(Oe.div,{"data-side":H,"data-align":Y,...w,ref:P,style:{...w.style,animation:_?void 0:"none"}})})})});Ut.displayName=dt;var Zt="PopperArrow",po={top:"bottom",right:"left",bottom:"top",left:"right"},Jt=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=fo(Zt,r),s=po[i.placedSide];return v.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:v.jsx(ao,{...o,ref:n,style:{...o.style,display:"block"}})})});Jt.displayName=Zt;function mo(e){return e!==null}var ho=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[l,f]=Qt(n),d={start:"0%",center:"50%",end:"100%"}[f],m=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+u/2;let g="",w="";return l==="bottom"?(g=s?d:`${m}px`,w=`${-u}px`):l==="top"?(g=s?d:`${m}px`,w=`${r.floating.height+u}px`):l==="right"?(g=`${-u}px`,w=s?d:`${p}px`):l==="left"&&(g=`${r.floating.width+u}px`,w=s?d:`${p}px`),{data:{x:g,y:w}}}});function Qt(e){const[t,n="center"]=e.split("-");return[t,n]}var go=Yt,en=Gt,vo=Ut,wo=Jt;function xo(e){const t=yo(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),u=a.find(Co);if(u){const l=u.props.children,f=a.map(d=>d===u?c.Children.count(l)>1?c.Children.only(null):c.isValidElement(l)?l.props.children:null:d);return v.jsx(t,{...s,ref:o,children:c.isValidElement(l)?c.cloneElement(l,void 0,f):null})}return v.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function yo(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=Ao(o),a=Ro(i,o.props);return o.type!==c.Fragment&&(a.ref=r?we(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bo=Symbol("radix.slottable");function Co(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bo}function Ro(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const u=i(...a);return o(...a),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}
1:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ao(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ke="Popover",[tn]=Nt(Ke,[Kt]),Ne=Kt(),[So,ae]=tn(Ke),nn=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=Ne(t),u=c.useRef(null),[l,f]=c.useState(!1),[d,m]=Tn({prop:r,defaultProp:o??!1,onChange:i,caller:Ke});return v.jsx(go,{...a,children:v.jsx(So,{scope:t,contentId:ue(),triggerRef:u,open:d,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:l,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:s,children:n})})};nn.displayName=Ke;var rn="PopoverAnchor",Po=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae(rn,n),i=Ne(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return c.useEffect(()=>(s(),()=>a()),[s,a]),v.jsx(en,{...i,...r,ref:t})});Po.displayName=rn;var on="PopoverTrigger",sn=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ae(on,n),i=Ne(n),s=ze(t,o.triggerRef),a=v.jsx(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":fn(o.open),...r,ref:s,onClick:Se(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:v.jsx(en,{asChild:!0,...i,children:a})});sn.displayName=on;var pt="PopoverPortal",[Eo,Oo]=tn(pt,{forceMount:void 0}),an=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=ae(pt,t);return v.jsx(Eo,{scope:t,forceMount:n,children:v.jsx(jt,{present:n||i.open,children:v.jsx(Wn,{asChild:!0,container:o,children:r})})})};an.displayName=pt;var ye="PopoverContent",ln=c.forwardRef((e,t)=>{const n=Oo(ye,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=ae(ye,e.__scopePopover);return v.jsx(jt,{present:r||i.open,children:i.modal?v.jsx(No,{...o,ref:t}):v.jsx(jo,{...o,ref:t})})});ln.displayName=ye;var ko=xo("PopoverContent.RemoveScroll"),No=c.forwardRef((e,t)=>{const n=ae(ye,e.__scopePopover),r=c.useRef(null),o=ze(t,r),i=c.useRef(!1);return c.useEffect(()=>{const s=r.current;if(s)return Hn(s)},[]),v.jsx(Vn,{as:ko,allowPinchZoom:!0,children:v.jsx(cn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,s=>{s.preventDefault(),i.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,l=a.button===2||u;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Se(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),jo=c.forwardRef((e,t)=>{const n=ae(ye,e.__scopePopover),r=c.useRef(!1),o=c.useRef(!1);return v.jsx(cn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),cn=c.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:f,...d}=e,m=ae(ye,n),p=Ne(n);return Bn(),v.jsx(Kn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:v.jsx(Xn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>m.onOpenChange(!1),children:v.jsx(vo,{"data-state":fn(m.open),role:"dialog",id:m.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),un="PopoverClose",Mo=c.forwardRef((e,t)=>
1{const{__scopePopover:n,...r}=e,o=ae(un,n);return v.jsx(Oe.button,{type:"button",...r,ref:t,onClick:Se(e.onClick,()=>o.onOpenChange(!1))})});Mo.displayName=un;var Do="PopoverArrow",$o=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ne(n);return v.jsx(wo,{...o,...r,ref:t})});$o.displayName=Do;function fn(e){return e?"open":"closed"}var _o=nn,Io=sn,Fo=an,dn=ln;const Lo=_o,To=Io,pn=c.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>v.jsx(Fo,{children:v.jsx(dn,{ref:o,align:t,sideOffset:n,className:pe("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)",e),...r})}));pn.displayName=dn.displayName;var Et=1,zo=.9,Wo=.8,Ho=.17,Ue=.1,Ze=.999,Vo=.9999,Bo=.99,Ko=/[\\\/_+.#"@\[\(\{&]/,Xo=/[\\\/_+.#"@\[\(\{&]/g,Yo=/[\s-]/,mn=/[\s-]/g;function rt(e,t,n,r,o,i,s){if(i===t.length)return o===e.length?Et:Bo;var a=`${o},${i}`;if(s[a]!==void 0)return s[a];for(var u=r.charAt(i),l=n.indexOf(u,o),f=0,d,m,p,g;l>=0;)d=rt(e,t,n,r,l+1,i+1,s),d>f&&(l===o?d*=Et:Ko.test(e.charAt(l-1))?(d*=Wo,p=e.slice(o,l-1).match(Xo),p&&o>0&&(d*=Math.pow(Ze,p.length))):Yo.test(e.charAt(l-1))?(d*=zo,g=e.slice(o,l-1).match(mn),g&&o>0&&(d*=Math.pow(Ze,g.length))):(d*=Ho,o>0&&(d*=Math.pow(Ze,l-o))),e.charAt(l)!==t.charAt(i)&&(d*=Vo)),(d<Ue&&n.charAt(l-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(l-1)!==r.charAt(i))&&(m=rt(e,t,n,r,l+1,i+2,s),m*Ue>d&&(d=m*Ue)),d>f&&(f=d),l=n.indexOf(u,l+1);return s[a]=f,f}function Ot(e){return e.toLowerCase().replace(mn," ")}function qo(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,rt(e,t,Ot(e),Ot(t),0,0,{})}var Go=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],le=Go.reduce((e,t)=>{const n=Zn(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ae='[cmdk-group=""]',Je='[cmdk-group-items=""]',Uo='[cmdk-group-heading=""]',hn='[cmdk-item=""]',kt=`${hn}:not([aria-disabled="true"])`,ot="cmdk-item-select",he="data-value",Zo=(e,t,n)=>qo(e,t,n),gn=c.createContext(void 0),je=()=>c.useContext(gn),vn=c.createContext(void 0),mt=()=>c.useContext(vn),wn=c.createContext(void 0),xn=c.forwardRef((e,t)=>{let n=ge(()=>{var h,S;return{search:"",value:(S=(h=e.value)!=null?h:e.defaultValue)!=null?S:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ge(()=>new Set),o=ge(()=>new Map),i=ge(()=>new Map),s=ge(()=>new Set),a=yn(e),{label:u,children:l,value:f,onValueChange:d,filter:m,shouldFilter:p,loop:g,disablePointerSelection:w=!1,vimBindings:y=!0,...x}=e,A=ue(),P=ue(),R=ue(),E=c.useRef(null),b=li();de(()=>{if(f!==void 0){let h=f.trim();n.current.value=h,O.emit()}},[f]),de(()=>{b(6,F)},[]);let O=c.useMemo(()=>({subscribe:h=>(s.current.add(h),()=>s.current.delete(h)),snapshot:()=>n.current,setState:(h,S,N)=>{var C,j,M,K;if(!Object.is(n.current[h],S)){if(n.current[h]=S,h==="search")z(),I(),b(1,T);else if(h==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let B=document.getElementById(R);B?B.focus():(C=document.getElementById(A))==null||C.focus()}if(b(7,()=>{var B;n.current.selectedItemId=(B=D())==null?void 0:B.id,O.emit()}),N||b(5,F),((j=a.current)==null?void 0:j.value)!==void 0){let B=S??"";(K=(M=a.current).onValueChange)==null||K.call(M,B);return}}O.emit()}},emit:()=>{s.current.forEach(h=>h())}}),[]),L=c.useMemo(()=>({value:(h,S,N)=>{var C;S!==((C=i.current.get(h))==null?void 0:C.value)&&(i.current.set(h,{value:S,keywords:N}),n.current.filtered.items.set(h,V(S,N)),b(2,()=>{I(),O.emit()}))},item:(h,S)=>(r.current.add(h),S&&(o.current.has(S)?o.current.get(S).add(h):o.current.set(S,new Set([h]))),b(3,()=>{z(),I(),n.current.value||T(),O.emit()}),()=>{i.current.delete(h),r.current.delete(h),n.current.filtered.items.delete(h);let N=D();b(4,()=>{z(),N?.getAttribute("id")===h&&T(),O.emit()})}),group:h=>(o.current.has(h)||o.current.set(h,new Set),()=>{i.current.delete(h),o.current.delete(h)}),filter:()=>a.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:A,inputId:R,labelId:P,listInnerRef:E}),[]);function V(h,S){var N,C;let j=(C=(N=a.current)==null?void 0:N.filter)!=null?C:Zo;return h?j(h,n.current.search,S):0}function I(){if(!n.current.search||a.current.shouldFilter===!1)return;let h=n.current.filtered.items,S=[];n.current.filtered.groups.forEach(C=>{let j=o.current.get(C),M=0;
1j.forEach(K=>{let B=h.get(K);M=Math.max(B,M)}),S.push([C,M])});let N=E.current;W().sort((C,j)=>{var M,K;let B=C.getAttribute("id"),me=j.getAttribute("id");return((M=h.get(me))!=null?M:0)-((K=h.get(B))!=null?K:0)}).forEach(C=>{let j=C.closest(Je);j?j.appendChild(C.parentElement===j?C:C.closest(`${Je} > *`)):N.appendChild(C.parentElement===N?C:C.closest(`${Je} > *`))}),S.sort((C,j)=>j[1]-C[1]).forEach(C=>{var j;let M=(j=E.current)==null?void 0:j.querySelector(`${Ae}[${he}="${encodeURIComponent(C[0])}"]`);M?.parentElement.appendChild(M)})}function T(){let h=W().find(N=>N.getAttribute("aria-disabled")!=="true"),S=h?.getAttribute(he);O.setState("value",S||void 0)}function z(){var h,S,N,C;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let j=0;for(let M of r.current){let K=(S=(h=i.current.get(M))==null?void 0:h.value)!=null?S:"",B=(C=(N=i.current.get(M))==null?void 0:N.keywords)!=null?C:[],me=V(K,B);n.current.filtered.items.set(M,me),me>0&&j++}for(let[M,K]of o.current)for(let B of K)if(n.current.filtered.items.get(B)>0){n.current.filtered.groups.add(M);break}n.current.filtered.count=j}function F(){var h,S,N;let C=D();C&&(((h=C.parentElement)==null?void 0:h.firstChild)===C&&((N=(S=C.closest(Ae))==null?void 0:S.querySelector(Uo))==null||N.scrollIntoView({block:"nearest"})),C.scrollIntoView({block:"nearest"}))}function D(){var h;return(h=E.current)==null?void 0:h.querySelector(`${hn}[aria-selected="true"]`)}function W(){var h;return Array.from(((h=E.current)==null?void 0:h.querySelectorAll(kt))||[])}function $(h){let S=W()[h];S&&O.setState("value",S.getAttribute(he))}function _(h){var S;let N=D(),C=W(),j=C.findIndex(K=>K===N),M=C[j+h];(S=a.current)!=null&&S.loop&&(M=j+h<0?C[C.length-1]:j+h===C.length?C[0]:C[j+h]),M&&O.setState("value",M.getAttribute(he))}function k(h){let S=D(),N=S?.closest(Ae),C;for(;N&&!C;)N=h>0?si(N,Ae):ai(N,Ae),C=N?.querySelector(kt);C?O.setState("value",C.getAttribute(he)):_(h)}let H=()=>$(W().length-1),Y=h=>{h.preventDefault(),h.metaKey?H():h.altKey?k(1):_(1)},Re=h=>{h.preventDefault(),h.metaKey?$(0):h.altKey?k(-1):_(-1)};return c.createElement(le.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:h=>{var S;(S=x.onKeyDown)==null||S.call(x,h);let N=h.nativeEvent.isComposing||h.keyCode===229;if(!(h.defaultPrevented||N))switch(h.key){case"n":case"j":{y&&h.ctrlKey&&Y(h);break}case"ArrowDown":{Y(h);break}case"p":case"k":{y&&h.ctrlKey&&Re(h);break}case"ArrowUp":{Re(h);break}case"Home":{h.preventDefault(),$(0);break}case"End":{h.preventDefault(),H();break}case"Enter":{h.preventDefault();let C=D();if(C){let j=new Event(ot);C.dispatchEvent(j)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:ui},u),Xe(e,h=>c.createElement(vn.Provider,{value:O},c.createElement(gn.Provider,{value:L},h))))}),Jo=c.forwardRef((e,t)=>{var n,r;let o=ue(),i=c.useRef(null),s=c.useContext(wn),a=je(),u=yn(e),l=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:s?.forceMount;de(()=>{if(!l)return a.item(o,s?.id)},[l]);let f=bn(o,i,[e.value,e.children,i],e.keywords),d=mt(),m=se(b=>b.value&&b.value===f.current),p=se(b=>l||a.filter()===!1?!0:b.search?b.filtered.items.get(o)>0:!0);c.useEffect(()=>{let b=i.current;if(!(!b||e.disabled))return b.addEventListener(ot,g),()=>b.removeEventListener(ot,g)},[p,e.onSelect,e.disabled]);function g(){var b,O;w(),(O=(b=u.current).onSelect)==null||O.call(b,f.current)}function w(){d.setState("value",f.current,!0)}if(!p)return null;let{disabled:y,value:x,onSelect:A,forceMount:P,keywords:R,...E}=e;return c.createElement(le.div,{ref:we(i,t),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!m,"data-disabled":!!y,"data-selected":!!m,onPointerMove:y||a.getDisablePointerSelection()?void 0:w,onClick:y?void 0:g},e.children)}),Qo=c.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,s=ue(),a=c.useRef(null),u=c.useRef(null),l=ue(),f=je(),d=se(p=>o||f.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);de(()=>f.group(s),[]),bn(s,a,[e.value,e.heading,u]);let m=c.useMemo(()=>({id:s,forceMount:o}),[o]);return c.createElement(le.div,{ref:we(a,t),...i,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&c.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),Xe(e,p=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},c.createElement(wn.Provider,{value:m},p))))}),ei=c.forwardRef((e,t)=>
vendor: 4,482 bytes, line 1
1{let{alwaysRender:n,...r}=e,o=c.useRef(null),i=se(s=>!s.search);return!n&&!i?null:c.createElement(le.div,{ref:we(o,t),...r,"cmdk-separator":"",role:"separator"})}),ti=c.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=mt(),s=se(l=>l.search),a=se(l=>l.selectedItemId),u=je();return c.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),c.createElement(le.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":a,id:u.inputId,type:"text",value:o?e.value:s,onChange:l=>{o||i.setState("search",l.target.value),n?.(l.target.value)}})}),ni=c.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=c.useRef(null),s=c.useRef(null),a=se(l=>l.selectedItemId),u=je();return c.useEffect(()=>{if(s.current&&i.current){let l=s.current,f=i.current,d,m=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=l.offsetHeight;f.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return m.observe(l),()=>{cancelAnimationFrame(d),m.unobserve(l)}}},[]),c.createElement(le.div,{ref:we(i,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:u.listId},Xe(e,l=>c.createElement("div",{ref:we(s,u.listInnerRef),"cmdk-list-sizer":""},l)))}),ri=c.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:s,...a}=e;return c.createElement(Yn,{open:n,onOpenChange:r},c.createElement(qn,{container:s},c.createElement(Gn,{"cmdk-overlay":"",className:o}),c.createElement(Un,{"aria-label":e.label,"cmdk-dialog":"",className:i},c.createElement(xn,{ref:t,...a}))))}),oi=c.forwardRef((e,t)=>se(n=>n.filtered.count===0)?c.createElement(le.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),ii=c.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return c.createElement(le.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Xe(e,s=>c.createElement("div",{"aria-hidden":!0},s)))}),X=Object.assign(xn,{List:ni,Item:Jo,Input:ti,Group:Qo,Separator:ei,Dialog:ri,Empty:oi,Loading:ii});function si(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ai(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function yn(e){let t=c.useRef(e);return de(()=>{t.current=e}),t}var de=typeof window>"u"?c.useEffect:c.useLayoutEffect;function ge(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function se(e){let t=mt(),n=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,n,n)}function bn(e,t,n,r=[]){let o=c.useRef(),i=je();return de(()=>{var s;let a=(()=>{var l;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(l=f.current.textContent)==null?void 0:l.trim():o.current}})(),u=r.map(l=>l.trim());i.value(e,a,u),(s=t.current)==null||s.setAttribute(he,a),o.current=a}),o}var li=()=>{let[e,t]=c.useState(),n=ge(()=>new Map);return de(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function ci(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Xe({asChild:e,children:t},n){return e&&c.isValidElement(t)?c.cloneElement(ci(t),{ref:t.ref},n(t.props.children)):n(t)}var ui={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Cn=c.forwardRef(({className:e,...t},n)=>v.jsx(X,{ref:n,className:pe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Cn.displayName=X.displayName;const Rn=c.forwardRef(({className:e,...t},n)=>v.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[v.jsx(Jn,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),v.jsx(X.Input,{ref:n,className:pe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Rn.displayName=X.Input.displayName;const An=c.forwardRef(({className:e,...t},n)=>v.jsx(X.List,{ref:n,className:pe("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));An.displayName=X.List.displayName;const Sn=c.forwardRef((e,t)=>
1v.jsx(X.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Sn.displayName=X.Empty.displayName;const Pn=c.forwardRef(({className:e,...t},n)=>v.jsx(X.Group,{ref:n,className:pe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Pn.displayName=X.Group.displayName;const fi=c.forwardRef(({className:e,...t},n)=>v.jsx(X.Separator,{ref:n,className:pe("-mx-1 h-px bg-border",e),...t}));fi.displayName=X.Separator.displayName;const En=c.forwardRef(({className:e,...t},n)=>v.jsx(X.Item,{ref:n,className:pe("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));En.displayName=X.Item.displayName;function Mi({vehicle:e,onPick:t}){const[n,r]=c.useState(!1);return v.jsxs(Lo,{open:n,onOpenChange:r,children:[v.jsx(To,{asChild:!0,children:v.jsxs("button",{type:"button",className:"savings-picker","aria-label":`Choose your Flexcar: ${$e(e)}`,"aria-haspopup":"listbox","aria-expanded":n,children:[v.jsx("strong",{children:$e(e)}),v.jsxs("span",{children:["Change model ",v.jsx(Qn,{size:16,"aria-hidden":!0})]})]})}),v.jsx(pn,{align:"start",className:"savings-picker-pop",children:v.jsxs(Cn,{children:[v.jsx(Rn,{placeholder:"Search makes and models","aria-label":"Search makes and models"}),v.jsxs(An,{className:"savings-picker-list",children:[v.jsx(Sn,{children:"No matching model. Try another make or model."}),v.jsx(Pn,{children:Mn.map(o=>v.jsxs(En,{value:`${o.make} ${o.model}`,onSelect:()=>{t(o.id),r(!1)},className:"savings-picker-item",children:[v.jsx("span",{children:$e(o)}),o.id===e.id&&v.jsx(er,{size:18,"aria-label":"Current model"})]},o.id))})]})]})})]})}function Di({vehicle:e,priority:t=!1}){const n=$n(e),[r,o]=c.useState(null);return!n||r===n.url?null:v.jsx("img",{className:"savings-car-photo",src:n.url,alt:`A ${n.year} ${$e(e)} from Flexcarâs fleet`,width:480,height:320,decoding:"async",loading:t?void 0:"lazy",fetchPriority:t?"high":void 0,onError:()=>o(n.url)})}function $i({upfront:e,monthly:t,link:n}){const r=[{delta:e,noun:"Upfront",monthly:!1},{delta:t,noun:"Additional Monthly",monthly:!0}];return v.jsxs(v.Fragment,{children:[v.jsx("dl",{className:"savings-amounts","aria-live":"polite","aria-atomic":"true",children:r.map(({delta:o,noun:i,monthly:s})=>{const a=_n(o);return v.jsxs("div",{className:"savings-amount","data-winner":a,children:[v.jsx("dt",{className:"savings-amount-head",children:a==="flex"?`${i} Savings`:i}),v.jsxs("dd",{children:[v.jsx("strong",{children:a==="tie"?"About the same":v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"sr-only",children:"about "}),v.jsx("span",{className:"savings-approx","aria-hidden":!0,children:"~"}),Dn(o,s)]})}),a==="buy"&&v.jsx("span",{children:"less with buying"})]})]},i)})}),n]})}const On="flexcar:savings-market";function di(){if(typeof window>"u")return{};try{const t=JSON.parse(window.sessionStorage.getItem(On)??"{}"),n=Pe.safeParse(t);if(n.success&&n.data.market)return{market:n.data.market,zipadj:n.data.zipadj}}catch{}const e=window.dataLayer??[];for(let t=e.length-1;t>=0;t--){const n=Pe.safeParse({market:e[t]?.market_link});if(n.success&&n.data.market)return{market:n.data.market}}return{}}function pi(e){if(!(typeof window>"u"||!e.market))try{window.sessionStorage.setItem(On,JSON.stringify(e))}catch{}}function mi(e){const t=Pe.safeParse({market:e});return t.success?t.data.market:void 0}const hi={"21_to_24":"0_to_24"};function gi(e){if(typeof e!="string")return;const t=Pe.safeParse({age:hi[e]??e});return t.success?t.data.age:void 0}function vi(e){const t=Pe.safeParse({credit:e});return t.success?t.data.credit:void 0}function wi(e){if(!e)return null;const t=mi(e.market);if(t)return e.source==="cart"&&e.zipcode?{market:t,zip:e.zipcode,source:"cart"}:{market:t,source:e.source==="cart"?"cart":"ip"};if(e.source==="cart"&&e.zipcode){const n=ht(e.zipcode);if(n.kind==="served")return{market:n.market,zip:e.zipcode,source:"cart"}}if(e.ipZipcode){const n=ht(e.ipZipcode);if(n.kind==="served")return{market:n.market,source:"ip"}}return null}function xi(e){if(!e)return{};const t=gi(e.ageRangeId),n=vi(e.creditScoreId);return{...t&&{age:t},...n&&{credit:n}}}function _i(e){const[t,n]=c.useState({}),[r,o]=c.useState(null),[i,s]=c.useState({});c.useEffect(()=>{n(di());let w=!1;return tr().then(y=>{if(w)return;const x=wi(y);x&&o(x),s(xi(y))}),()=>{w=!0}},[]);const{age:a,credit:u,miles:l,years:f,car:d,market:m,zipadj:p}=e,g=c.useMemo(()=>{const w=m??t.market??r?.market,y=m?"url":t.market?"session":r?r.source:"default",x=m?p:t.market?t.zipadj:r?.zip?In(r.market,r.zip)??void 0:void 0;return{...Fn({age:a??i.age,credit:u??i.credit,miles:l,years:f,car:d,market:w,zipadj:x}),customized:[a,u,l,f,m,d].some(A=>A!==void 0),location:r,marketSource:y,cartProfile:i}},[a,u,l,f,d,m,p,t,r,i]);return c.useEffect(()=>{m&&pi({market:m,zipadj:g.zipAdjustment??void 0})},[m,g.zipAdjustment]),g}function yi(e,t){if(!(typeof window>"u"))try{window.FS?.event?.(e,t)}catch{}}function bi(e){const{event:t,...n}=e,r={};for(const[o,i]of Object.entries(n))i!==void 0&&(typeof i=="string"||typeof i=="number"||typeof i=="boolean")&&(r[o]=i);return r}function Ii(e){if(typeof window>"u")return;const t={...e,dataset_version:Ln.generated_at.slice(0,10)};window.dataLayer=window.dataLayer||[],window.dataLayer.push(t),yi(e.event,{...bi(e),dataset_version:t.dataset_version})}export{Di as C,Mi as M,$i as S,lo as a,Ii as t,_i as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.