vendor: 10,443 bytes, line 1
1import{c as Bt,r as a,j as p,a as ie,b as Wt,R as we,u as z,d as rt,e as On,f as Jr,_ as fe,g as In,h as eo,i as to,s as se,k as no,S as ht,L as ro,B as Ie,l as Qt,m as Q,I as Se,t as Jt}from"./index-BRItV2gJ.js";const oo=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],so=Bt("check",oo);const io=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_n=Bt("chevron-down",io);const co=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],ao=Bt("chevron-up",co),Pt=a.forwardRef(({className:e,...t},n)=>p.jsx("textarea",{className:ie("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Pt.displayName="Textarea";function en(e,[t,n]){return Math.min(n,Math.max(t,e))}function U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function $t(e,t=[]){let n=[];function r(s,c){const i=a.createContext(c),l=n.length;n=[...n,c];const u=d=>{const{scope:h,children:v,...x}=d,f=h?.[e]?.[l]||i,g=a.useMemo(()=>x,Object.values(x));return p.jsx(f.Provider,{value:g,children:v})};u.displayName=s+"Provider";function m(d,h){const v=h?.[e]?.[l]||i,x=a.useContext(v);if(x)return x;if(c!==void 0)return c;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,m]}const o=()=>{const s=n.map(c=>a.createContext(c));return function(i){const l=i?.[e]||s;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,lo(o,...t)]}function lo(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=r.reduce((i,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...i,...d}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function tn(e){const t=uo(e),n=a.forwardRef((r,o)=>{const{children:s,...c}=r,i=a.Children.toArray(s),l=i.find(po);if(l){const u=l.props.children,m=i.map(d=>d===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,m):null})}return p.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function uo(e){const t=a.forwardRef((n,r)=>{const{children:o,...s}=n;if(a.isValidElement(o)){const c=ho(o),i=mo(s,o.props);return o.type!==a.Fragment&&(i.ref=r?Wt(r,c):c),a.cloneElement(o,i)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fo=Symbol("radix.slottable");function po(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fo}function mo(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ho(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function vo(e){const t=e+"CollectionProvider",[n,r]=$t(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=f=>{const{scope:g,children:w}=f,y=we.useRef(null),S=we.useRef(new Map).current;return p.jsx(o,{scope:g,itemMap:S,collectionRef:y,children:w})};c.displayName=t;const i=e+"CollectionSlot",l=tn(i),u=we.forwardRef((f,g)=>{const{scope:w,children:y}=f,S=s(i,w),b=z(g,S.collectionRef);return p.jsx(l,{ref:b,children:y})});u.displayName=i;const m=e+"CollectionItemSlot",d="data-radix-collection-item",h=tn(m),v=we.forwardRef((f,g)=>{const{scope:w,children:y,...S}=f,b=we.useRef(null),E=z(g,b),R=s(m,w);return we.useEffect(()=>(R.itemMap.set(b,{ref:b,...S}),()=>{R.itemMap.delete(b)})),p.jsx(h,{[d]:"",ref:E,children:y})});v.displayName=m;function x(f){const g=s(e+"CollectionConsumer",f);return we.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const S=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((R,C)=>S.indexOf(R.ref.current)-S.indexOf(C.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:c,Slot:u,ItemSlot:v},x,r]}var go=a.createContext(void 0);function xo(e){const t=a.useContext(go);return e||t||"ltr"}function yo(e){const t=wo(e),n=a.forwardRef((r,o)=>{const{children:s,...c}=r,i=a.Children.toArray(s),l=i.find(bo);if(l){const u=l.props.children,m=i.map(d=>d===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,m):null})}return p.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function wo(e){const t=a.forwardRef((n,r)=>{const{children:o,...s}=n;if(a.isValidElement(o)){const c=Eo(o),i=Co(s,o.props);return o.type!==a.Fragment&&(i.ref=r?Wt(r,c):c),a.cloneElement(o,i)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var So=Symbol("radix.slottable");function bo(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===So}function Co(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Eo(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 Ro=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=Ro.reduce((e,t)=>{const n=yo(`Primitive.${t}`),r=a.forwardRef((o,s)=>{const{asChild:c,...i}=o,l=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Po(e,t){e&&rt.flushSync(()=>e.dispatchEvent(t))}function Ce(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ao(e,t=globalThis?.document){const n=Ce(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var No="DismissableLayer",At="dismissableLayer.update",To="dismissableLayer.pointerDownOutside",Oo="dismissableLayer.focusOutside",nn,jn=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mn=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:i,...l}=e,u=a.useContext(jn),[m,d]=a.useState(null),h=m?.ownerDocument??globalThis?.document,[,v]=a.useState({}),x=z(t,C=>d(C)),f=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=f.indexOf(g),y=m?f.indexOf(m):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,b=y>=w,E=jo(C=>{const N=C.target,_=[...u.branches].some(O=>O.contains(N));!b||_||(o?.(C),c?.(C),C.defaultPrevented||i?.())},h),R=Mo(C=>{const N=C.target;[...u.branches].some(O=>O.contains(N))||(s?.(C),c?.(C),C.defaultPrevented||i?.())},h);return Ao(C=>{y===u.layers.size-1&&(r?.(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},h),a.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(nn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),rn(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=nn)}},[m,h,n,u]),a.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),rn())},[m,u]),a.useEffect(()=>{const C=()=>v({});return document.addEventListener(At,C),()=>document.removeEventListener(At,C)},[]),p.jsx(H.div,{...l,ref:x,style:{pointerEvents:S?b?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,R.onFocusCapture),onBlurCapture:U(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,E.onPointerDownCapture)})});Mn.displayName=No;var Io="DismissableLayerBranch",_o=a.forwardRef((e,t)=>{const n=a.useContext(jn),r=a.useRef(null),o=z(t,r);return a.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(H.div,{...e,ref:o})});_o.displayName=Io;function jo(e,t=globalThis?.document){const n=Ce(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let l=function(){Ln(To,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Mo(e,t=globalThis?.document){const n=Ce(e),r=a.useRef(!1);return a.useEffect(()=>{const o=s=>{s.target&&!r.current&&Ln(Oo,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rn(){const e=new CustomEvent(At);document.dispatchEvent(e)}function Ln(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Po(o,s):o.dispatchEvent(s)}var vt=0;function Lo(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??on()),document.body.insertAdjacentElement("beforeend",e[1]??on()),vt++,()=>{vt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),vt--}},[])}function on(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 4,369 bytes, line 1
1style.position="fixed",e.style.pointerEvents="none",e}var gt="focusScope.autoFocusOnMount",xt="focusScope.autoFocusOnUnmount",sn={bubbles:!1,cancelable:!0},Do="FocusScope",Dn=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[i,l]=a.useState(null),u=Ce(o),m=Ce(s),d=a.useRef(null),h=z(t,f=>l(f)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let f=function(S){if(v.paused||!i)return;const b=S.target;i.contains(b)?d.current=b:de(d.current,{select:!0})},g=function(S){if(v.paused||!i)return;const b=S.relatedTarget;b!==null&&(i.contains(b)||de(d.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&de(i)};document.addEventListener("focusin",f),document.addEventListener("focusout",g);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",g),y.disconnect()}}},[r,i,v.paused]),a.useEffect(()=>{if(i){an.add(v);const f=document.activeElement;if(!i.contains(f)){const w=new CustomEvent(gt,sn);i.addEventListener(gt,u),i.dispatchEvent(w),w.defaultPrevented||(ko(Ho(kn(i)),{select:!0}),document.activeElement===f&&de(i))}return()=>{i.removeEventListener(gt,u),setTimeout(()=>{const w=new CustomEvent(xt,sn);i.addEventListener(xt,m),i.dispatchEvent(w),w.defaultPrevented||de(f??document.body,{select:!0}),i.removeEventListener(xt,m),an.remove(v)},0)}}},[i,u,m,v]);const x=a.useCallback(f=>{if(!n&&!r||v.paused)return;const g=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,w=document.activeElement;if(g&&w){const y=f.currentTarget,[S,b]=Fo(y);S&&b?!f.shiftKey&&w===b?(f.preventDefault(),n&&de(S,{select:!0})):f.shiftKey&&w===S&&(f.preventDefault(),n&&de(b,{select:!0})):w===y&&f.preventDefault()}},[n,r,v.paused]);return p.jsx(H.div,{tabIndex:-1,...c,ref:h,onKeyDown:x})});Dn.displayName=Do;function ko(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(de(r,{select:t}),document.activeElement!==n)return}function Fo(e){const t=kn(e),n=cn(t,e),r=cn(t.reverse(),e);return[n,r]}function kn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cn(e,t){for(const n of e)if(!Bo(n,{upTo:t}))return n}function Bo(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wo(e){return e instanceof HTMLInputElement&&"select"in e}function de(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wo(e)&&t&&e.select()}}var an=$o();function $o(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ln(e,t),e.unshift(t)},remove(t){e=ln(e,t),e[0]?.resume()}}}function ln(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ho(e){return e.filter(t=>t.tagName!=="A")}var X=globalThis?.document?a.useLayoutEffect:()=>{},Vo=On[" useId ".trim().toString()]||(()=>{}),Uo=0;function Ht(e){const[t,n]=a.useState(Vo());return X(()=>{n(r=>r??String(Uo++))},[e]),e||(t?`radix-${t}`:"")}const zo=["top","right","bottom","left"],pe=Math.min,G=Math.max,Qe=Math.round,Ve=Math.floor,re=e=>({x:e,y:e}),Ko={left:"right",right:"left",bottom:"top",top:"bottom"};function Nt(e,t,n){return G(e,pe(t,n))}function ce(e,t){return typeof e=="function"?e(t):e}function ae(e){return e.split("-")[0]}function Le(e){return e.split("-")[1]}function Vt(e){return e==="x"?"y":"x"}function Ut(e){return e==="y"?"height":"width"}function ne(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function zt(e){return Vt(ne(e))}function Yo(e,t,n){n===void 0&&(n=!1);const r=Le(e),o=zt(e),s=Ut(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=Je(c)),[c,Je(c)]}function Xo(e){const t=Je(e);return[Tt(e),t,Tt(t)]}function Tt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const un=["left","right"],dn=["right","left"],Go=["top","bottom"],qo=["bottom","top"];
vendor: 11,002 bytes, line 1
1function Zo(e,t,n){switch(e){case"top":case"bottom":return n?t?dn:un:t?un:dn;case"left":case"right":return t?Go:qo;default:return[]}}function Qo(e,t,n,r){const o=Le(e);let s=Zo(ae(e),n==="start",r);return o&&(s=s.map(c=>c+"-"+o),t&&(s=s.concat(s.map(Tt)))),s}function Je(e){const t=ae(e);return Ko[t]+e.slice(t.length)}function Jo(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fn(e){return typeof e!="number"?Jo(e):{top:e,right:e,bottom:e,left:e}}function et(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 fn(e,t,n){let{reference:r,floating:o}=e;const s=ne(t),c=zt(t),i=Ut(c),l=ae(t),u=s==="y",m=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let v;switch(l){case"top":v={x:m,y:r.y-o.height};break;case"bottom":v={x:m,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-o.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Le(t)){case"start":v[c]-=h*(n&&u?-1:1);break;case"end":v[c]+=h*(n&&u?-1:1);break}return v}async function es(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:c,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:d="floating",altBoundary:h=!1,padding:v=0}=ce(t,e),x=Fn(v),g=i[h?d==="floating"?"reference":"floating":d],w=et(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:u,rootBoundary:m,strategy:l})),y=d==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),b=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},E=et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:S,strategy:l}):y);return{top:(w.top-E.top+x.top)/b.y,bottom:(E.bottom-w.bottom+x.bottom)/b.y,left:(w.left-E.left+x.left)/b.x,right:(E.right-w.right+x.right)/b.x}}const ts=50,ns=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:c}=n,i=c.detectOverflow?c:{...c,detectOverflow:es},l=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:d}=fn(u,r,l),h=r,v=0;const x={};for(let f=0;f<s.length;f++){const g=s[f];if(!g)continue;const{name:w,fn:y}=g,{x:S,y:b,data:E,reset:R}=await y({x:m,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:x,rects:u,platform:i,elements:{reference:e,floating:t}});m=S??m,d=b??d,x[w]={...x[w],...E},R&&v<ts&&(v++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(u=R.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:m,y:d}=fn(u,h,l)),f=-1)}return{x:m,y:d,placement:h,strategy:o,middlewareData:x}},rs=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:c,elements:i,middlewareData:l}=t,{element:u,padding:m=0}=ce(e,t)||{};if(u==null)return{};const d=Fn(m),h={x:n,y:r},v=zt(o),x=Ut(v),f=await c.getDimensions(u),g=v==="y",w=g?"top":"left",y=g?"bottom":"right",S=g?"clientHeight":"clientWidth",b=s.reference[x]+s.reference[v]-h[v]-s.floating[x],E=h[v]-s.reference[v],R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(u));let C=R?R[S]:0;(!C||!await(c.isElement==null?void 0:c.isElement(R)))&&(C=i.floating[S]||s.floating[x]);const N=b/2-E/2,_=C/2-f[x]/2-1,O=pe(d[w],_),j=pe(d[y],_),L=O,D=C-f[x]-j,I=C/2-f[x]/2+N,W=Nt(L,I,D),T=!l.arrow&&Le(o)!=null&&I!==W&&s.reference[x]/2-(I<L?O:j)-f[x]/2<0,M=T?I<L?I-L:I-D:0;return{[v]:h[v]+M,data:{[v]:W,centerOffset:I-W-M,...T&&{alignmentOffset:M}},reset:T}}}),os=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:c,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:m=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:f=!0,...g}=ce(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=ae(o),y=ne(i),S=ae(i)===i,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=h||(S||!f?[Je(i)]:Xo(i)),R=x!=="none";!h&&R&&E.push(...Qo(i,f,x,b));const C=[i,...E],N=await l.detectOverflow(t,g),_=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&_.push(N[w]),d){const I=Yo(o,c,b);_.push(N[I[0]],N[I[1]])}if(O=[...O,{placement:o,overflows:_}],!_.every(I=>I<=0)){var j,L;const I=(((j=s.flip)==null?void 0:j.index)||0)+1,W=C[I];if(W&&(!(d==="alignment"?y!==ne(W):!1)||O.every(A=>ne(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:I,overflows:O},reset:{placement:W}};let T=(L=O.filter(M=>M.overflows[0]<=0).sort((M,A)=>M.overflows[1]-A.overflows[1])[0])==null?void 0:L.placement;if(!T)switch(v){case"bestFit":{var D;const M=(D=O.filter(A=>{if(R){const k=ne(A.placement);return k===y||k==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(k=>k>0).reduce((k,Y)=>k+Y,0)]).sort((A,k)=>A[1]-k[1])[0])==null?void 0:D[0];M&&(T=M);break}case"initialPlacement":T=i;break}if(o!==T)return{reset:{placement:T}}}return{}}}};function pn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mn(e){return zo.some(t=>e[t]>=0)}const ss=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=ce(e,t);switch(o){case"referenceHidden":{const c=await r.detectOverflow(t,{...s,elementContext:"reference"}),i=pn(c,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:mn(i)}}}case"escaped":{const c=await r.detectOverflow(t,{...s,altBoundary:!0}),i=pn(c,n.floating);return{data:{escapedOffsets:i,escaped:mn(i)}}}default:return{}}}}},Bn=new Set(["left","top"]);async function is(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=ae(n),i=Le(n),l=ne(n)==="y",u=Bn.has(c)?-1:1,m=s&&l?-1:1,d=ce(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof x=="number"&&(v=i==="end"?x*-1:x),l?{x:v*m,y:h*u}:{x:h*u,y:v*m}}const cs=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:c,middlewareData:i}=t,l=await is(t,e);return c===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:c}}}}},as=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:c=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:y,y:S}=w;return{x:y,y:S}}},...u}=ce(e,t),m={x:n,y:r},d=await s.detectOverflow(t,u),h=ne(ae(o)),v=Vt(h);let x=m[v],f=m[h];if(c){const w=v==="y"?"top":"left",y=v==="y"?"bottom":"right",S=x+d[w],b=x-d[y];x=Nt(S,x,b)}if(i){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",S=f+d[w],b=f-d[y];f=Nt(S,f,b)}const g=l.fn({...t,[v]:x,[h]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[v]:c,[h]:i}}}}}},ls=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:c}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=ce(e,t),m={x:n,y:r},d=ne(o),h=Vt(d);let v=m[h],x=m[d];const f=ce(i,t),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const S=h==="y"?"height":"width",b=s.reference[h]-s.floating[S]+g.mainAxis,E=s.reference[h]+s.reference[S]-g.mainAxis;v<b?v=b:v>E&&(v=E)}if(u){var w,y;const S=h==="y"?"width":"height",b=Bn.has(ae(o)),E=s.reference[d]-s.floating[S]+(b&&((w=c.offset)==null?void 0:w[d])||0)+(b?0:g.crossAxis),R=s.reference[d]+s.reference[S]+(b?0:((y=c.offset)==null?void 0:y[d])||0)-(b?g.crossAxis:0);x<E?x=E:x>R&&(x=R)}return{[h]:v,[d]:x}}}},us=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:c,elements:i}=t,{apply:l=()=>{},...u}=ce(e,t),m=await c.detectOverflow(t,u),d=ae(o),h=Le(o),v=ne(o)==="y",{width:x,height:f}=s.floating;let g,w;d==="top"||d==="bottom"?(g=d,w=h===(await(c.isRTL==null?void 0:c.isRTL(i.floating))?"start":"end")?"left":"right"):(w=d,g=h==="end"?"top":"bottom");const y=f-m.top-m.bottom,S=x-m.left-m.right,b=pe(f-m[g],y),E=pe(x-m[w],S),R=!t.middlewareData.shift;let C=b,N=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=y),R&&!h){const O=G(m.left,0),j=G(m.right,0),L=G(m.top,0),D=G(m.bottom,0);v?N=x-2*(O!==0||j!==0?O+j:G(m.left,m.right)):C=f-2*(L!==0||D!==0?L+D:G(m.top,m.bottom))}await l({...t,availableWidth:N,availableHeight:C});const _=await c.getDimensions(i.floating);return x!==_.width||f!==_.height?{reset:{rects:!0}}:{}}}};function ot(){return typeof window<"u"}function De(e){return Wn(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function oe(e){var t;return(t=(Wn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wn(e){return ot()?e instanceof Node||e instanceof q(e).Node:!1}function ee(e){return ot()?e instanceof Element||e instanceof q(e).Element:!1}function le(e){return ot()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function hn(e){return!ot()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}function He(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ds(e){return/^(table|td|th)$/.test(De(e))}function st(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const fs=/transform|translate|scale|rotate|perspective|filter/,ps=/paint|layout|strict|content/,be=e=>!!e&&e!=="none";let yt;function Kt(e){const t=ee(e)?te(e):e;return be(t.transform)||be(t.translate)||be(t.scale)||be(t.rotate)||be(t.perspective)||!Yt()&&(be(t.backdropFilter)||be(t.filter))||fs.test(t.willChange||"")||ps.test(t.contain||"")}function ms(e){let t=me(e);for(;le(t)&&!Me(t);){if(Kt(t))return t;if(st(t))return null;t=me(t)}return null}function Yt(){return yt==null&&(yt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yt}function Me(e){return/^(html|body|#document)$/.test(De(e))}function te(e){return q(e).getComputedStyle(e)}function it(e){return ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function me(e){if(De(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hn(e)&&e.host||oe(e);return hn(t)?t.host:t}function $n(e){const t=me(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:le(t)&&He(t)?t:$n(t)}function $e(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=$n(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),c=q(o);if(s){const i=Ot(c);
vendor: 4,433 bytes, line 1
1return t.concat(c,c.visualViewport||[],He(o)?o:[],i&&n?$e(i):[])}else return t.concat(o,$e(o,[],n))}function Ot(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Hn(e){const t=te(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=le(e),s=o?e.offsetWidth:n,c=o?e.offsetHeight:r,i=Qe(n)!==s||Qe(r)!==c;return i&&(n=s,r=c),{width:n,height:r,$:i}}function Xt(e){return ee(e)?e:e.contextElement}function _e(e){const t=Xt(e);if(!le(t))return re(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Hn(t);let c=(s?Qe(n.width):n.width)/r,i=(s?Qe(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!i||!Number.isFinite(i))&&(i=1),{x:c,y:i}}const hs=re(0);function Vn(e){const t=q(e);return!Yt()||!t.visualViewport?hs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Ee(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Xt(e);let c=re(1);t&&(r?ee(r)&&(c=_e(r)):c=_e(e));const i=vs(s,n,r)?Vn(s):re(0);let l=(o.left+i.x)/c.x,u=(o.top+i.y)/c.y,m=o.width/c.x,d=o.height/c.y;if(s){const h=q(s),v=r&&ee(r)?q(r):r;let x=h,f=Ot(x);for(;f&&r&&v!==x;){const g=_e(f),w=f.getBoundingClientRect(),y=te(f),S=w.left+(f.clientLeft+parseFloat(y.paddingLeft))*g.x,b=w.top+(f.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,u*=g.y,m*=g.x,d*=g.y,l+=S,u+=b,x=q(f),f=Ot(x)}}return et({width:m,height:d,x:l,y:u})}function ct(e,t){const n=it(e).scrollLeft;return t?t.left+n:Ee(oe(e)).left+n}function Un(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ct(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function gs(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",c=oe(r),i=t?st(t.floating):!1;if(r===c||i&&s)return n;let l={scrollLeft:0,scrollTop:0},u=re(1);const m=re(0),d=le(r);if((d||!d&&!s)&&((De(r)!=="body"||He(c))&&(l=it(r)),d)){const v=Ee(r);u=_e(r),m.x=v.x+r.clientLeft,m.y=v.y+r.clientTop}const h=c&&!d&&!s?Un(c,l):re(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+m.x+h.x,y:n.y*u.y-l.scrollTop*u.y+m.y+h.y}}function xs(e){return Array.from(e.getClientRects())}function ys(e){const t=oe(e),n=it(e),r=e.ownerDocument.body,o=G(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=G(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+ct(e);const i=-n.scrollTop;return te(r).direction==="rtl"&&(c+=G(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:c,y:i}}const vn=25;function ws(e,t){const n=q(e),r=oe(e),o=n.visualViewport;let s=r.clientWidth,c=r.clientHeight,i=0,l=0;if(o){s=o.width,c=o.height;const m=Yt();(!m||m&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const u=ct(r);if(u<=0){const m=r.ownerDocument,d=m.body,h=getComputedStyle(d),v=m.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,x=Math.abs(r.clientWidth-d.clientWidth-v);x<=vn&&(s-=x)}else u<=vn&&(s+=u);return{width:s,height:c,x:i,y:l}}function Ss(e,t){const n=Ee(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=le(e)?_e(e):re(1),c=e.clientWidth*s.x,i=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:c,height:i,x:l,y:u}}function gn(e,t,n){let r;if(t==="viewport")r=ws(e,n);else if(t==="document")r=ys(oe(e));else if(ee(t))r=Ss(t,n);else{const o=Vn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return et(r)}function zn(e,t){const n=me(e);return n===t||!ee(n)||Me(n)?!1:te(n).position==="fixed"||zn(n,t)}function bs(e,t){const n=t.get(e);if(n)return n;let r=$e(e,[],!1).filter(i=>ee(i)&&De(i)!=="body"),o=null;const s=te(e).position==="fixed";let c=s?me(e):e;for(;ee(c)&&!Me(c);){const i=te(c),l=Kt(c);!l&&i.position==="fixed"&&(o=null),(s?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||He(c)&&!l&&zn(e,c))?r=r.filter(m=>m!==c):o=i,c=me(c)}return t.set(e,r),r}function Cs(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?st(t)?[]:bs(t,this._c):[].concat(n),r],i=gn(t,c[0],o);let l=i.top,u=i.right,m=i.bottom,d=i.left;for(let h=1;h<c.length;h++){const v=gn(t,c[h],o);l=G(v.top,l),u=pe(v.right,u),m=pe(v.bottom,m),d=G(v.left,d)}return{width:u-d,height:m-l,x:d,y:l}}function Es(e){const{width:t,height:n}=Hn(e);return{width:t,height:n}}function Rs(e,t,n){const r=le(t),o=oe(t),s=n==="fixed",c=Ee(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const l=re(0);function u(){l.x=ct(o)}
vendor: 4,437 bytes, line 1
1if(r||!r&&!s)if((De(t)!=="body"||He(o))&&(i=it(t)),r){const v=Ee(t,!0,s,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else o&&u();s&&!r&&o&&u();const m=o&&!r&&!s?Un(o,i):re(0),d=c.left+i.scrollLeft-l.x-m.x,h=c.top+i.scrollTop-l.y-m.y;return{x:d,y:h,width:c.width,height:c.height}}function wt(e){return te(e).position==="static"}function xn(e,t){if(!le(e)||te(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oe(e)===n&&(n=n.ownerDocument.body),n}function Kn(e,t){const n=q(e);if(st(e))return n;if(!le(e)){let o=me(e);for(;o&&!Me(o);){if(ee(o)&&!wt(o))return o;o=me(o)}return n}let r=xn(e,t);for(;r&&ds(r)&&wt(r);)r=xn(r,t);return r&&Me(r)&&wt(r)&&!Kt(r)?n:r||ms(e)||n}const Ps=async function(e){const t=this.getOffsetParent||Kn,n=this.getDimensions,r=await n(e.floating);return{reference:Rs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function As(e){return te(e).direction==="rtl"}const Ns={convertOffsetParentRelativeRectToViewportRelativeRect:gs,getDocumentElement:oe,getClippingRect:Cs,getOffsetParent:Kn,getElementRects:Ps,getClientRects:xs,getDimensions:Es,getScale:_e,isElement:ee,isRTL:As};function Yn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ts(e,t){let n=null,r;const o=oe(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function c(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:m,top:d,width:h,height:v}=u;if(i||t(),!h||!v)return;const x=Ve(d),f=Ve(o.clientWidth-(m+h)),g=Ve(o.clientHeight-(d+v)),w=Ve(m),S={rootMargin:-x+"px "+-f+"px "+-g+"px "+-w+"px",threshold:G(0,pe(1,l))||1};let b=!0;function E(R){const C=R[0].intersectionRatio;if(C!==l){if(!b)return c();C?c(!1,C):r=setTimeout(()=>{c(!1,1e-7)},1e3)}C===1&&!Yn(u,e.getBoundingClientRect())&&c(),b=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return c(!0),s}function Os(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Xt(e),m=o||s?[...u?$e(u):[],...t?$e(t):[]]:[];m.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const d=u&&i?Ts(u,n):null;let h=-1,v=null;c&&(v=new ResizeObserver(w=>{let[y]=w;y&&y.target===u&&v&&t&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(t)})),n()}),u&&!l&&v.observe(u),t&&v.observe(t));let x,f=l?Ee(e):null;l&&g();function g(){const w=Ee(e);f&&!Yn(f,w)&&n(),f=w,x=requestAnimationFrame(g)}return n(),()=>{var w;m.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d?.(),(w=v)==null||w.disconnect(),v=null,l&&cancelAnimationFrame(x)}}const Is=cs,_s=as,js=os,Ms=us,Ls=ss,yn=rs,Ds=ls,ks=(e,t,n)=>{const r=new Map,o={platform:Ns,...n},s={...o.platform,_c:r};return ns(e,t,{...o,platform:s})};var Fs=typeof document<"u",Bs=function(){},Xe=Fs?a.useLayoutEffect:Bs;function tt(e,t){if(e===t)return!0;if(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(!tt(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!tt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Xn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wn(e,t){const n=Xn(e);return Math.round(t*n)/n}function St(e){const t=a.useRef(e);return Xe(()=>{t.current=e}),t}function Ws(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:c}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[m,d]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=a.useState(r);tt(h,r)||v(r);const[x,f]=a.useState(null),[g,w]=a.useState(null),y=a.useCallback(A=>{A!==R.current&&(R.current=A,f(A))},[]),S=a.useCallback(A=>{A!==C.current&&(C.current=A,w(A))},[]),b=s||x,E=c||g,R=a.useRef(null),C=a.useRef(null),N=a.useRef(m),_=l!=null,O=St(l),j=St(o),L=St(u),D=a.useCallback(()=>
vendor: 2,591 bytes, line 1
1{if(!R.current||!C.current)return;const A={placement:t,strategy:n,middleware:h};j.current&&(A.platform=j.current),ks(R.current,C.current,A).then(k=>{const Y={...k,isPositioned:L.current!==!1};I.current&&!tt(N.current,Y)&&(N.current=Y,rt.flushSync(()=>{d(Y)}))})},[h,t,n,j,L]);Xe(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);const I=a.useRef(!1);Xe(()=>(I.current=!0,()=>{I.current=!1}),[]),Xe(()=>{if(b&&(R.current=b),E&&(C.current=E),b&&E){if(O.current)return O.current(b,E,D);D()}},[b,E,D,O,_]);const W=a.useMemo(()=>({reference:R,floating:C,setReference:y,setFloating:S}),[y,S]),T=a.useMemo(()=>({reference:b,floating:E}),[b,E]),M=a.useMemo(()=>{const A={position:n,left:0,top:0};if(!T.floating)return A;const k=wn(T.floating,m.x),Y=wn(T.floating,m.y);return i?{...A,transform:"translate("+k+"px, "+Y+"px)",...Xn(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:Y}},[n,i,T.floating,m.x,m.y]);return a.useMemo(()=>({...m,update:D,refs:W,elements:T,floatingStyles:M}),[m,D,W,T,M])}const $s=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?yn({element:r.current,padding:o}).fn(n):{}:r?yn({element:r,padding:o}).fn(n):{}}}},Hs=(e,t)=>{const n=Is(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vs=(e,t)=>{const n=_s(e);return{name:n.name,fn:n.fn,options:[e,t]}},Us=(e,t)=>({fn:Ds(e).fn,options:[e,t]}),zs=(e,t)=>{const n=js(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ks=(e,t)=>{const n=Ms(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ys=(e,t)=>{const n=Ls(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xs=(e,t)=>{const n=$s(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Gs="Arrow",Gn=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(H.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Gn.displayName=Gs;var qs=Gn;function Zs(e){const[t,n]=a.useState(void 0);return X(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,i;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;c=u.inlineSize,i=u.blockSize}else c=e.offsetWidth,i=e.offsetHeight;n({width:c,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Gt="Popper",[qn,Zn]=$t(Gt),[Qs,Qn]=qn(Gt),Jn=e=>{const{__scopePopper:t,children:n}
vendor: 1,369 bytes, line 1
1=e,[r,o]=a.useState(null);return p.jsx(Qs,{scope:t,anchor:r,onAnchorChange:o,children:n})};Jn.displayName=Gt;var er="PopperAnchor",tr=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Qn(er,n),c=a.useRef(null),i=z(t,c),l=a.useRef(null);return a.useEffect(()=>{const u=l.current;l.current=r?.current||c.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:p.jsx(H.div,{...o,ref:i})});tr.displayName=er;var qt="PopperContent",[Js,ei]=qn(qt),nr=a.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:x,...f}=e,g=Qn(qt,n),[w,y]=a.useState(null),S=z(t,P=>y(P)),[b,E]=a.useState(null),R=Zs(b),C=R?.width??0,N=R?.height??0,_=r+(s!=="center"?"-"+s:""),O=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},j=Array.isArray(u)?u:[u],L=j.length>0,D={padding:O,boundary:j.filter(ni),altBoundary:L},{refs:I,floatingStyles:W,placement:T,isPositioned:M,middlewareData:A}=Ws({strategy:"fixed",placement:_,whileElementsMounted:(...P)=>Os(...P,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Hs({mainAxis:o+N,alignmentAxis:c}),l&&Vs({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Us():void 0,...D}),l&&zs({...D}
vendor: 11,791 bytes, lines 1-16
1),Ks({...D,apply:({elements:P,rects:$,availableWidth:K,availableHeight:F})=>{const{width:B,height:V}=$.reference,Z=P.floating.style;Z.setProperty("--radix-popper-available-width",`${K}px`),Z.setProperty("--radix-popper-available-height",`${F}px`),Z.setProperty("--radix-popper-anchor-width",`${B}px`),Z.setProperty("--radix-popper-anchor-height",`${V}px`)}}),b&&Xs({element:b,padding:i}),ri({arrowWidth:C,arrowHeight:N}),h&&Ys({strategy:"referenceHidden",...D})]}),[k,Y]=sr(T),ge=Ce(x);X(()=>{M&&ge?.()},[M,ge]);const Fe=A.arrow?.x,Be=A.arrow?.y,ue=A.arrow?.centerOffset!==0,[Ae,xe]=a.useState();return X(()=>{w&&xe(window.getComputedStyle(w).zIndex)},[w]),p.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:M?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ae,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Js,{scope:n,placedSide:k,onArrowChange:E,arrowX:Fe,arrowY:Be,shouldHideArrow:ue,children:p.jsx(H.div,{"data-side":k,"data-align":Y,...f,ref:S,style:{...f.style,animation:M?void 0:"none"}})})})});nr.displayName=qt;var rr="PopperArrow",ti={top:"bottom",right:"left",bottom:"top",left:"right"},or=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=ei(rr,r),c=ti[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(qs,{...o,ref:n,style:{...o.style,display:"block"}})})});or.displayName=rr;function ni(e){return e!==null}var ri=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,c=o.arrow?.centerOffset!==0,i=c?0:e.arrowWidth,l=c?0:e.arrowHeight,[u,m]=sr(n),d={start:"0%",center:"50%",end:"100%"}[m],h=(o.arrow?.x??0)+i/2,v=(o.arrow?.y??0)+l/2;let x="",f="";return u==="bottom"?(x=c?d:`${h}px`,f=`${-l}px`):u==="top"?(x=c?d:`${h}px`,f=`${r.floating.height+l}px`):u==="right"?(x=`${-l}px`,f=c?d:`${v}px`):u==="left"&&(x=`${r.floating.width+l}px`,f=c?d:`${v}px`),{data:{x,y:f}}}});function sr(e){const[t,n="center"]=e.split("-");return[t,n]}var oi=Jn,si=tr,ii=nr,ci=or,ai="Portal",ir=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=a.useState(!1);X(()=>s(!0),[]);const c=n||o&&globalThis?.document?.body;return c?Jr.createPortal(p.jsx(H.div,{...r,ref:t}),c):null});ir.displayName=ai;function li(e){const t=ui(e),n=a.forwardRef((r,o)=>{const{children:s,...c}=r,i=a.Children.toArray(s),l=i.find(fi);if(l){const u=l.props.children,m=i.map(d=>d===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,m):null})}return p.jsx(t,{...c,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function ui(e){const t=a.forwardRef((n,r)=>{const{children:o,...s}=n;if(a.isValidElement(o)){const c=mi(o),i=pi(s,o.props);return o.type!==a.Fragment&&(i.ref=r?Wt(r,c):c),a.cloneElement(o,i)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var di=Symbol("radix.slottable");function fi(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===di}function pi(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function mi(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 hi=On[" useInsertionEffect ".trim().toString()]||X;function Sn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,c]=vi({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const m=a.useRef(e!==void 0);a.useEffect(()=>{const d=m.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,r])}const u=a.useCallback(m=>{if(i){const d=gi(m)?m(e):m;d!==e&&c.current?.(d)}else s(m)},[i,e,s,c]);return[l,u]}function vi({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),s=a.useRef(t);return hi(()=>{s.current=t},[t]),a.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function gi(e){return typeof e=="function"}function xi(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var cr=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),yi="VisuallyHidden",wi=a.forwardRef((e,t)=>p.jsx(H.span,{...e,ref:t,style:{...cr,...e.style}}));wi.displayName=yi;var Si=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ne=new WeakMap,Ue=new WeakMap,ze={},bt=0,ar=function(e){return e&&(e.host||ar(e.parentNode))},bi=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ar(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ci=function(e,t,n,r){var o=bi(t,Array.isArray(e)?e:[e]);ze[n]||(ze[n]=new WeakMap);var s=ze[n],c=[],i=new Set,l=new Set(o),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};o.forEach(u);var m=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(i.has(h))m(h);else try{var v=h.getAttribute(r),x=v!==null&&v!=="false",f=(Ne.get(h)||0)+1,g=(s.get(h)||0)+1;Ne.set(h,f),s.set(h,g),c.push(h),f===1&&x&&Ue.set(h,!0),g===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return m(t),i.clear(),bt++,function(){c.forEach(function(d){var h=Ne.get(d)-1,v=s.get(d)-1;Ne.set(d,h),s.set(d,v),h||(Ue.has(d)||d.removeAttribute(r),Ue.delete(d)),v||d.removeAttribute(n)}),bt--,bt||(Ne=new WeakMap,Ne=new WeakMap,Ue=new WeakMap,ze={})}},Ei=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Si(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Ci(r,o,n,"aria-hidden")):function(){return null}},Ge="right-scroll-bar-position",qe="width-before-scroll-bar",Ri="with-scroll-bars-hidden",Pi="--removed-body-scroll-bar-size";function Ct(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ai(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ni=typeof window<"u"?a.useLayoutEffect:a.useEffect,bn=new WeakMap;function Ti(e,t){var n=Ai(null,function(r){return e.forEach(function(o){return Ct(o,r)})});return Ni(function(){var r=bn.get(n);if(r){var o=new Set(r),s=new Set(e),c=n.current;o.forEach(function(i){s.has(i)||Ct(i,null)}),s.forEach(function(i){o.has(i)||Ct(i,c)})}bn.set(n,e)},[e]),n}function Oi(e){return e}function Ii(e,t){t===void 0&&(t=Oi);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,r);return n.push(c),function(){n=n.filter(function(i){return i!==c})}},assignSyncMedium:function(s){for(r=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var c=[];if(n.length){var i=n;n=[],i.forEach(s),c=n}var l=function(){var m=c;c=[],m.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(m){c.push(m),u()},filter:function(m){return c=c.filter(m),n}}}};return o}function _i(e){e===void 0&&(e={});var t=Ii(null);return t.options=fe({async:!0,ssr:!1},e),t}var lr=function(e){var t=e.sideCar,n=In(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,fe({},n))};lr.isSideCarExport=!0;function ji(e,t){return e.useMedium(t),lr}var ur=_i(),Et=function(){},at=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Et,onWheelCapture:Et,onTouchMoveCapture:Et}),o=r[0],s=r[1],c=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,m=e.enabled,d=e.shards,h=e.sideCar,v=e.noRelative,x=e.noIsolation,f=e.inert,g=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,S=e.gapMode,b=In(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,R=Ti([n,t]),C=fe(fe({},b),o);return a.createElement(a.Fragment,null,m&&a.createElement(E,{sideCar:ur,removeScrollBar:u,shards:d,noRelative:v,noIsolation:x,inert:f,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:S}),c?a.cloneElement(a.Children.only(i),fe(fe({},C),{ref:R})):a.createElement(y,fe({},C,{className:l,ref:R}),i))});at.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};at.classNames={fullWidth:qe,zeroRight:Ge};var Mi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Li(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Mi();return t&&e.setAttribute("nonce",t),e}function Di(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ki(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Li())&&(Di(t,n),ki(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bi=function(){var e=Fi();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dr=function(){var e=Bi(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Wi={left:0,top:0,right:0,gap:0},Rt=function(e){return parseInt(e||"",10)||0},$i=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Rt(n),Rt(r),Rt(o)]},Hi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wi;var t=$i(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vi=dr(),je="data-scroll-locked",Ui=function(e,t,n,r){var o=e.left,s=e.top,c=e.right,i=e.gap;return n===void 0&&(n="margin"),` 2 .`.concat(Ri,` { 3 overflow: hidden `).concat(r,`; 4 padding-right: `).concat(i,"px ").concat(r,`; 5 } 6 body[`).concat(je,`] { 7 overflow: hidden `).concat(r,`; 8 overscroll-behavior: contain; 9 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 10 padding-left: `.concat(o,`px; 11 padding-top: `).concat(s,`px; 12 padding-right: `).concat(c,`px; 13 margin-left:0; 14 margin-top:0; 15 margin-right: `).concat(i,"px ").concat(r,`; 16 `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";
16")].filter(Boolean).join(""),` 17 } 18 19 .`).concat(Ge,` { 20 right: `).concat(i,"px ").concat(r,`; 21 } 22 23 .`).concat(qe,` { 24 margin-right: `).concat(i,"px ").concat(r,`; 25 } 26 27 .`).concat(Ge," .").concat(Ge,` { 28 right: 0 `).concat(r,`; 29 } 30 31 .`).concat(qe," .").concat(qe,` { 32 margin-right: 0 `).concat(r,`; 33 } 34 35 body[`).concat(je,`] { 36 `).concat(Pi,": ").concat(i,`px; 37 } 38`)},Cn=function(){var e=parseInt(document.body.getAttribute(je)||"0",10);return isFinite(e)?e:0},zi=function(){a.useEffect(function(){return document.body.setAttribute(je,(Cn()+1).toString()),function(){var e=Cn()-1;e<=0?document.body.removeAttribute(je):document.body.setAttribute(je,e.toString())}},[])},Ki=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;zi();var s=a.useMemo(function(){return Hi(o)},[o]);return a.createElement(Vi,{styles:Ui(s,!t,o,n?"":"!important")})},It=!1;if(typeof window<"u")try{var Ke=Object.defineProperty({},"passive",{get:function(){return It=!0,!0}});window.addEventListener("test",Ke,Ke),window.removeEventListener("test",Ke,Ke)}catch{It=!1}var Te=It?{passive:!1}:!1,Yi=function(e){return e.tagName==="TEXTAREA"},fr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Yi(e)&&n[t]==="visible")},Xi=function(e){return fr(e,"overflowY")},Gi=function(e){return fr(e,"overflowX")},En=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=pr(e,r);if(o){var s=mr(e,r),c=s[1],i=s[2];if(c>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qi=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Zi=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},pr=function(e,t){return e==="v"?Xi(t):Gi(t)},mr=function(e,t){return e==="v"?qi(t):Zi(t)},Qi=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ji=function(e,t,n,r,o){var s=Qi(e,window.getComputedStyle(t).direction),c=s*r,i=n.target,l=t.contains(i),u=!1,m=c>0,d=0,h=0;do{if(!i)break;var v=mr(e,i),x=v[0],f=v[1],g=v[2],w=f-g-s*x;(x||w)&&pr(e,i)&&(d+=w,h+=x);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(m&&Math.abs(d)<1||!m&&Math.abs(h)<1)&&(u=!0),u},Ye=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rn=function(e){return[e.deltaX,e.deltaY]},Pn=function(e){return e&&"current"in e?e.current:e},ec=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tc=function(e){return` 39 .block-interactivity-`.concat(e,` {pointer-events: none;} 40 .allow-interactivity-`).concat(e,` {pointer-events: all;} 41`)},nc=0,Oe=[];function rc(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(nc++)[0],s=a.useState(dr)[0],c=a.useRef(e);a.useEffect(function(){c.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=eo([e.lockRef.current],(e.shards||[]).map(Pn),!0).filter(Boolean);return f.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=a.useCallback(function(f,g){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!c.current.allowPinchZoom;var w=Ye(f),y=n.current,S="deltaX"in f?f.deltaX:y[0]-w[0],b="deltaY"in f?f.deltaY:y[1]-w[1],E,R=f.target,C=Math.abs(S)>Math.abs(b)?"h":"v";if("touches"in f&&C==="h"&&R.type==="range")return!1;var N=window.getSelection(),_=N&&N.anchorNode,O=_?_===R||_.contains(R):!1;if(O)return!1;var j=En(C,R);if(!j)return!0;if(j?E=C:(E=C==="v"?"h":"v",j=En(C,R)),!j)return!1;if(!r.current&&"changedTouches"in f&&(S||b)&&(r.current=E),!E)return!0;var L=r.current||E;return Ji(L,g,f,L==="h"?S:b)},[]),l=a.useCallback(function(f){var g=f;if(!(!Oe.length||Oe[Oe.length-1]!==s)){var w="deltaY"in g?Rn(g):Ye(g),y=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&ec(E.delta,w)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}
vendor: 4,212 bytes, line 41
41if(!y){var S=(c.current.shards||[]).map(Pn).filter(Boolean).filter(function(E){return E.contains(g.target)}),b=S.length>0?i(g,S[0]):!c.current.noIsolation;b&&g.cancelable&&g.preventDefault()}}},[]),u=a.useCallback(function(f,g,w,y){var S={name:f,delta:g,target:w,should:y,shadowParent:oc(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(b){return b!==S})},1)},[]),m=a.useCallback(function(f){n.current=Ye(f),r.current=void 0},[]),d=a.useCallback(function(f){u(f.type,Rn(f),f.target,i(f,e.lockRef.current))},[]),h=a.useCallback(function(f){u(f.type,Ye(f),f.target,i(f,e.lockRef.current))},[]);a.useEffect(function(){return Oe.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Te),document.addEventListener("touchmove",l,Te),document.addEventListener("touchstart",m,Te),function(){Oe=Oe.filter(function(f){return f!==s}),document.removeEventListener("wheel",l,Te),document.removeEventListener("touchmove",l,Te),document.removeEventListener("touchstart",m,Te)}},[]);var v=e.removeScrollBar,x=e.inert;return a.createElement(a.Fragment,null,x?a.createElement(s,{styles:tc(o)}):null,v?a.createElement(Ki,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function oc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sc=ji(ur,rc);var hr=a.forwardRef(function(e,t){return a.createElement(at,fe({},e,{ref:t,sideCar:sc}))});hr.classNames=at.classNames;var ic=[" ","Enter","ArrowUp","ArrowDown"],cc=[" ","Enter"],Re="Select",[lt,ut,ac]=vo(Re),[ke]=$t(Re,[ac,Zn]),dt=Zn(),[lc,he]=ke(Re),[uc,dc]=ke(Re),vr=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:c,defaultValue:i,onValueChange:l,dir:u,name:m,autoComplete:d,disabled:h,required:v,form:x}=e,f=dt(t),[g,w]=a.useState(null),[y,S]=a.useState(null),[b,E]=a.useState(!1),R=xo(u),[C,N]=Sn({prop:r,defaultProp:o??!1,onChange:s,caller:Re}),[_,O]=Sn({prop:c,defaultProp:i,onChange:l,caller:Re}),j=a.useRef(null),L=g?x||!!g.closest("form"):!0,[D,I]=a.useState(new Set),W=Array.from(D).map(T=>T.props.value).join(";");return p.jsx(oi,{...f,children:p.jsxs(lc,{required:v,scope:t,trigger:g,onTriggerChange:w,valueNode:y,onValueNodeChange:S,valueNodeHasChildren:b,onValueNodeHasChildrenChange:E,contentId:Ht(),value:_,onValueChange:O,open:C,onOpenChange:N,dir:R,triggerPointerDownPosRef:j,disabled:h,children:[p.jsx(lt.Provider,{scope:t,children:p.jsx(uc,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(T=>{I(M=>new Set(M).add(T))},[]),onNativeOptionRemove:a.useCallback(T=>{I(M=>{const A=new Set(M);return A.delete(T),A})},[]),children:n})}),L?p.jsxs(Wr,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:d,value:_,onChange:T=>O(T.target.value),disabled:h,form:x,children:[_===void 0?p.jsx("option",{value:""}):null,Array.from(D)]},W):null]})})};vr.displayName=Re;var gr="SelectTrigger",xr=a.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=dt(n),c=he(gr,n),i=c.disabled||r,l=z(t,c.onTriggerChange),u=ut(n),m=a.useRef("touch"),[d,h,v]=Hr(f=>{const g=u().filter(S=>!S.disabled),w=g.find(S=>S.value===c.value),y=Vr(g,f,w);y!==void 0&&c.onValueChange(y.value)}),x=f=>{i||(c.onOpenChange(!0),v()),f&&(c.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return p.jsx(si,{asChild:!0,...s,children:p.jsx(H.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":$r(c.value)?"":void 0,...o,ref:l,onClick:U(o.onClick,f=>{f.currentTarget.focus(),m.current!=="mouse"&&x(f)}),onPointerDown:U(o.onPointerDown,f=>{m.current=f.pointerType;const g=f.target;g.hasPointerCapture(f.pointerId)&&g.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(x(f),f.preventDefault())}),onKeyDown:U(o.onKeyDown,f=>{const g=d.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&h(f.key),!(g&&f.key===" ")&&ic.includes(f.key)&&(x(),f.preventDefault())})})})});xr.displayName=gr;var yr="SelectValue",wr=a.forwardRef((e,t)=>
vendor: 16,369 bytes, line 41
41{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:c="",...i}=e,l=he(yr,n),{onValueNodeHasChildrenChange:u}=l,m=s!==void 0,d=z(t,l.onValueNodeChange);return X(()=>{u(m)},[u,m]),p.jsx(H.span,{...i,ref:d,style:{pointerEvents:"none"},children:$r(l.value)?p.jsx(p.Fragment,{children:c}):s})});wr.displayName=yr;var fc="SelectIcon",Sr=a.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(H.span,{"aria-hidden":!0,...o,ref:t,children:r||"â¼"})});Sr.displayName=fc;var pc="SelectPortal",br=e=>p.jsx(ir,{asChild:!0,...e});br.displayName=pc;var Pe="SelectContent",Cr=a.forwardRef((e,t)=>{const n=he(Pe,e.__scopeSelect),[r,o]=a.useState();if(X(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?rt.createPortal(p.jsx(Er,{scope:e.__scopeSelect,children:p.jsx(lt.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Rr,{...e,ref:t})});Cr.displayName=Pe;var J=10,[Er,ve]=ke(Pe),mc="SelectContentImpl",hc=li("SelectContent.RemoveScroll"),Rr=a.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:c,side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:f,avoidCollisions:g,...w}=e,y=he(Pe,n),[S,b]=a.useState(null),[E,R]=a.useState(null),C=z(t,P=>b(P)),[N,_]=a.useState(null),[O,j]=a.useState(null),L=ut(n),[D,I]=a.useState(!1),W=a.useRef(!1);a.useEffect(()=>{if(S)return Ei(S)},[S]),Lo();const T=a.useCallback(P=>{const[$,...K]=L().map(V=>V.ref.current),[F]=K.slice(-1),B=document.activeElement;for(const V of P)if(V===B||(V?.scrollIntoView({block:"nearest"}),V===$&&E&&(E.scrollTop=0),V===F&&E&&(E.scrollTop=E.scrollHeight),V?.focus(),document.activeElement!==B))return},[L,E]),M=a.useCallback(()=>T([N,S]),[T,N,S]);a.useEffect(()=>{D&&M()},[D,M]);const{onOpenChange:A,triggerPointerDownPosRef:k}=y;a.useEffect(()=>{if(S){let P={x:0,y:0};const $=F=>{P={x:Math.abs(Math.round(F.pageX)-(k.current?.x??0)),y:Math.abs(Math.round(F.pageY)-(k.current?.y??0))}},K=F=>{P.x<=10&&P.y<=10?F.preventDefault():S.contains(F.target)||A(!1),document.removeEventListener("pointermove",$),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",$),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",$),document.removeEventListener("pointerup",K,{capture:!0})}}},[S,A,k]),a.useEffect(()=>{const P=()=>A(!1);return window.addEventListener("blur",P),window.addEventListener("resize",P),()=>{window.removeEventListener("blur",P),window.removeEventListener("resize",P)}},[A]);const[Y,ge]=Hr(P=>{const $=L().filter(B=>!B.disabled),K=$.find(B=>B.ref.current===document.activeElement),F=Vr($,P,K);F&&setTimeout(()=>F.ref.current.focus())}),Fe=a.useCallback((P,$,K)=>{const F=!W.current&&!K;(y.value!==void 0&&y.value===$||F)&&(_(P),F&&(W.current=!0))},[y.value]),Be=a.useCallback(()=>S?.focus(),[S]),ue=a.useCallback((P,$,K)=>{const F=!W.current&&!K;(y.value!==void 0&&y.value===$||F)&&j(P)},[y.value]),Ae=r==="popper"?_t:Pr,xe=Ae===_t?{side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:d,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:f,avoidCollisions:g}:{};return p.jsx(Er,{scope:n,content:S,viewport:E,onViewportChange:R,itemRefCallback:Fe,selectedItem:N,onItemLeave:Be,itemTextRefCallback:ue,focusSelectedItem:M,selectedItemText:O,position:r,isPositioned:D,searchRef:Y,children:p.jsx(hr,{as:hc,allowPinchZoom:!0,children:p.jsx(Dn,{asChild:!0,trapped:y.open,onMountAutoFocus:P=>{P.preventDefault()},onUnmountAutoFocus:U(o,P=>{y.trigger?.focus({preventScroll:!0}),P.preventDefault()}),children:p.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:P=>P.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:p.jsx(Ae,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:P=>P.preventDefault(),...w,...xe,onPlaced:()=>I(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:U(w.onKeyDown,P=>{const $=P.ctrlKey||P.altKey||P.metaKey;if(P.key==="Tab"&&P.preventDefault(),!$&&P.key.length===1&&ge(P.key),["ArrowUp","ArrowDown","Home","End"].includes(P.key)){let F=L().filter(B=>!B.disabled).map(B=>B.ref.current);if(["ArrowUp","End"].includes(P.key)&&(F=F.slice().reverse()),["ArrowUp","ArrowDown"].includes(P.key)){const B=P.target,V=F.indexOf(B);F=F.slice(V+1)}setTimeout(()=>T(F)),P.preventDefault()}})})})})})})});Rr.displayName=mc;var vc="SelectItemAlignedPosition",Pr=a.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=he(Pe,n),c=ve(Pe,n),[i,l]=a.useState(null),[u,m]=a.useState(null),d=z(t,C=>m(C)),h=ut(n),v=a.useRef(!1),x=a.useRef(!0),{viewport:f,selectedItem:g,selectedItemText:w,focusSelectedItem:y}=c,S=a.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&u&&f&&g&&w){const C=s.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),_=s.valueNode.getBoundingClientRect(),O=w.getBoundingClientRect();if(s.dir!=="rtl"){const B=O.left-N.left,V=_.left-B,Z=C.left-V,ye=C.width+Z,ft=Math.max(ye,N.width),pt=window.innerWidth-J,mt=en(V,[J,Math.max(J,pt-ft)]);i.style.minWidth=ye+"px",i.style.left=mt+"px"}else{const B=N.right-O.right,V=window.innerWidth-_.right-B,Z=window.innerWidth-C.right-V,ye=C.width+Z,ft=Math.max(ye,N.width),pt=window.innerWidth-J,mt=en(V,[J,Math.max(J,pt-ft)]);i.style.minWidth=ye+"px",i.style.right=mt+"px"}const j=h(),L=window.innerHeight-J*2,D=f.scrollHeight,I=window.getComputedStyle(u),W=parseInt(I.borderTopWidth,10),T=parseInt(I.paddingTop,10),M=parseInt(I.borderBottomWidth,10),A=parseInt(I.paddingBottom,10),k=W+T+D+A+M,Y=Math.min(g.offsetHeight*5,k),ge=window.getComputedStyle(f),Fe=parseInt(ge.paddingTop,10),Be=parseInt(ge.paddingBottom,10),ue=C.top+C.height/2-J,Ae=L-ue,xe=g.offsetHeight/2,P=g.offsetTop+xe,$=W+T+P,K=k-$;if($<=ue){const B=j.length>0&&g===j[j.length-1].ref.current;i.style.bottom="0px";const V=u.clientHeight-f.offsetTop-f.offsetHeight,Z=Math.max(Ae,xe+(B?Be:0)+V+M),ye=$+Z;i.style.height=ye+"px"}else{const B=j.length>0&&g===j[0].ref.current;i.style.top="0px";const Z=Math.max(ue,W+f.offsetTop+(B?Fe:0)+xe)+K;i.style.height=Z+"px",f.scrollTop=$-ue+f.offsetTop}i.style.margin=`${J}px 0`,i.style.minHeight=Y+"px",i.style.maxHeight=L+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,i,u,f,g,w,s.dir,r]);X(()=>S(),[S]);const[b,E]=a.useState();X(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const R=a.useCallback(C=>{C&&x.current===!0&&(S(),y?.(),x.current=!1)},[S,y]);return p.jsx(xc,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:R,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:p.jsx(H.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Pr.displayName=vc;var gc="SelectPopperPosition",_t=a.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=J,...s}=e,c=dt(n);return p.jsx(ii,{...c,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});_t.displayName=gc;var[xc,Zt]=ke(Pe,{}),jt="SelectViewport",Ar=a.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=ve(jt,n),c=Zt(jt,n),i=z(t,s.onViewportChange),l=a.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(lt.Slot,{scope:n,children:p.jsx(H.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:U(o.onScroll,u=>{const m=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=c;if(h?.current&&d){const v=Math.abs(l.current-m.scrollTop);if(v>0){const x=window.innerHeight-J*2,f=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),w=Math.max(f,g);if(w<x){const y=w+v,S=Math.min(x,y),b=y-S;d.style.height=S+"px",d.style.bottom==="0px"&&(m.scrollTop=b>0?b:0,d.style.justifyContent="flex-end")}}}l.current=m.scrollTop})})})]})});Ar.displayName=jt;var Nr="SelectGroup",[yc,wc]=ke(Nr),Sc=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ht();return p.jsx(yc,{scope:n,id:o,children:p.jsx(H.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Sc.displayName=Nr;var Tr="SelectLabel",Or=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=wc(Tr,n);return p.jsx(H.div,{id:o.id,...r,ref:t})});Or.displayName=Tr;var nt="SelectItem",[bc,Ir]=ke(nt),_r=a.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...c}=e,i=he(nt,n),l=ve(nt,n),u=i.value===r,[m,d]=a.useState(s??""),[h,v]=a.useState(!1),x=z(t,y=>l.itemRefCallback?.(y,r,o)),f=Ht(),g=a.useRef("touch"),w=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(bc,{scope:n,value:r,disabled:o,textId:f,isSelected:u,onItemTextChange:a.useCallback(y=>{d(S=>S||(y?.textContent??"").trim())},[]),children:p.jsx(lt.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:p.jsx(H.div,{role:"option","aria-labelledby":f,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:x,onFocus:U(c.onFocus,()=>v(!0)),onBlur:U(c.onBlur,()=>v(!1)),onClick:U(c.onClick,()=>{g.current!=="mouse"&&w()}),onPointerUp:U(c.onPointerUp,()=>{g.current==="mouse"&&w()}),onPointerDown:U(c.onPointerDown,y=>{g.current=y.pointerType}),onPointerMove:U(c.onPointerMove,y=>{g.current=y.pointerType,o?l.onItemLeave?.():g.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:U(c.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:U(c.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(cc.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});_r.displayName=nt;var We="SelectItemText",jr=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,c=he(We,n),i=ve(We,n),l=Ir(We,n),u=dc(We,n),[m,d]=a.useState(null),h=z(t,w=>d(w),l.onItemTextChange,w=>i.itemTextRefCallback?.(w,l.value,l.disabled)),v=m?.textContent,x=a.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:f,onNativeOptionRemove:g}=u;return X(()=>(f(x),()=>g(x)),[f,g,x]),p.jsxs(p.Fragment,{children:[p.jsx(H.span,{id:l.textId,...s,ref:h}),l.isSelected&&c.valueNode&&!c.valueNodeHasChildren?rt.createPortal(s.children,c.valueNode):null]})});jr.displayName=We;var Mr="SelectItemIndicator",Lr=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ir(Mr,n).isSelected?p.jsx(H.span,{"aria-hidden":!0,...r,ref:t}):null});Lr.displayName=Mr;var Mt="SelectScrollUpButton",Dr=a.forwardRef((e,t)=>{const n=ve(Mt,e.__scopeSelect),r=Zt(Mt,e.__scopeSelect),[o,s]=a.useState(!1),c=z(t,r.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?p.jsx(Fr,{...e,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});Dr.displayName=Mt;var Lt="SelectScrollDownButton",kr=a.forwardRef((e,t)=>{const n=ve(Lt,e.__scopeSelect),r=Zt(Lt,e.__scopeSelect),[o,s]=a.useState(!1),c=z(t,r.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,m=Math.ceil(l.scrollTop)<u;s(m)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?p.jsx(Fr,{...e,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});kr.displayName=Lt;var Fr=a.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=ve("SelectScrollButton",n),c=a.useRef(null),i=ut(n),l=a.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return a.useEffect(()=>()=>l(),[l]),X(()=>{i().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),p.jsx(H.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:U(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:U(o.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:U(o.onPointerLeave,()=>{l()})})}),Cc="SelectSeparator",Br=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(H.div,{"aria-hidden":!0,...r,ref:t})});Br.displayName=Cc;var Dt="SelectArrow",Ec=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dt(n),s=he(Dt,n),c=ve(Dt,n);return s.open&&c.position==="popper"?p.jsx(ci,{...o,...r,ref:t}):null});Ec.displayName=Dt;var Rc="SelectBubbleInput",Wr=a.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=a.useRef(null),s=z(r,o),c=xi(t);return a.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==t&&m){const d=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(d)}},[c,t]),p.jsx(H.select,{...n,style:{...cr,...n.style},ref:s,defaultValue:t})});Wr.displayName=Rc;function $r(e){return e===""||e===void 0}function Hr(e){const t=Ce(e),n=a.useRef(""),r=a.useRef(0),o=a.useCallback(c=>{const i=n.current+c;t(i),(function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),s=a.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Vr(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=Pc(e,Math.max(s,0));o.length===1&&(c=c.filter(u=>u!==n));const l=c.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Pc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ac=vr,Ur=xr,Nc=wr,Tc=Sr,Oc=br,zr=Cr,Ic=Ar,Kr=Or,Yr=_r,_c=jr,jc=Lr,Xr=Dr,Gr=kr,qr=Br;const An=Ac,Nn=Nc,kt=a.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Ur,{ref:r,className:ie("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,p.jsx(Tc,{asChild:!0,children:p.jsx(_n,{className:"h-4 w-4 opacity-50"})})]}));kt.displayName=Ur.displayName;const Zr=a.forwardRef(({className:e,...t},n)=>p.jsx(Xr,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(ao,{className:"h-4 w-4"})}));Zr.displayName=Xr.displayName;const Qr=a.forwardRef(({className:e,...t},n)=>p.jsx(Gr,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(_n,{className:"h-4 w-4"})}));Qr.displayName=Gr.displayName;const Ft=a.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(Oc,{children:p.jsxs(zr,{ref:o,className:ie("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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]:sli
41de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-select-content-transform-origin)",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(Zr,{}),p.jsx(Ic,{className:ie("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(Qr,{})]})}));Ft.displayName=zr.displayName;const Mc=a.forwardRef(({className:e,...t},n)=>p.jsx(Kr,{ref:n,className:ie("px-2 py-1.5 text-sm font-semibold",e),...t}));Mc.displayName=Kr.displayName;const Ze=a.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Yr,{ref:r,className:ie("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(jc,{children:p.jsx(so,{className:"h-4 w-4"})})}),p.jsx(_c,{children:t})]}));Ze.displayName=Yr.displayName;const Lc=a.forwardRef(({className:e,...t},n)=>p.jsx(qr,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",e),...t}));Lc.displayName=qr.displayName;function Tn(e){return e.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"").slice(0,80)}function Fc(){const e=to(),[t,n]=a.useState(null),[r,o]=a.useState(!1),[s,c]=a.useState([]),[i,l]=a.useState([]),[u,m]=a.useState(null);if(a.useEffect(()=>{const{data:h}=se.auth.onAuthStateChange((v,x)=>{n(x?.user?.id??null)});return se.auth.getSession().then(({data:v})=>n(v.session?.user?.id??null)),()=>h.subscription.unsubscribe()},[]),a.useEffect(()=>{t&&(async()=>{const{data:h}=await se.from("user_roles").select("role").eq("user_id",t),v=!!h?.some(g=>g.role==="admin"||g.role==="editor");o(v);const x=await no();c(x);const{data:f}=await se.from("posts").select("*, category:categories(*)").order("created_at",{ascending:!1});l(f??[])})()},[t]),!t)return p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsx(ht,{}),p.jsx("div",{className:"mx-auto max-w-2xl px-4 py-20",children:p.jsxs("p",{children:["You need to sign in. ",p.jsx(ro,{to:"/login",className:"text-primary underline",children:"Go to login"})]})})]});if(!r)return p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsx(ht,{}),p.jsxs("div",{className:"mx-auto max-w-2xl px-4 py-20 prose-mag",children:[p.jsx("h1",{children:"Access pending"}),p.jsxs("p",{children:["Your account doesn't yet have ",p.jsx("code",{children:"admin"})," or ",p.jsx("code",{children:"editor"})," role. Ask the site owner to grant access from the Lovable Cloud backend (",p.jsx("code",{children:"user_roles"})," table â insert role ",p.jsx("code",{children:"admin"})," for your user id ",p.jsx("code",{children:t}),")."]}),p.jsx(Ie,{variant:"outline",onClick:async()=>{await se.auth.signOut(),e({to:"/login"})},children:"Sign out"})]}),p.jsx(Qt,{})]});async function d(){const{data:h}=await se.from("posts").select("*, category:categories(*)").order("created_at",{ascending:!1});l(h??[])}return p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsx(ht,{}),p.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-10",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("div",{className:"mag-rule mb-3"}),p.jsx("h1",{className:"font-display text-4xl font-black",children:"Editor Studio"})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Ie,{onClick:()=>m({title:"",slug:"",content:"",status:"draft"}),children:"+ New Post"}),p.jsx(Ie,{variant:"outline",onClick:async()=>{await se.auth.signOut(),e({to:"/"})},children:"Sign out"})]})]}),u?p.jsx(Dc,{editing:u,cats:s,userId:t,onClose:()=>m(null),onSaved:()=>{d(),m(null)}}):p.jsxs("div",{className:"mt-8 space-y-3",children:[i.map(h=>p.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border p-4",children:[p.jsxs("div",{children:[p.jsx("div",{className:"font-semibold",children:h.title}),p.jsxs("div",{className:"text-xs text-muted-foreground",children:[h.status," · ",h.category?.name??"â"," · /",h.slug]})]}),p.jsx("div",{className:"flex gap-2",children:p.jsx(Ie,{size:"sm",variant:"outline",onClick:()=>m(h),children:"Edit"})})]}
41,h.id)),i.length===0&&p.jsx("p",{className:"text-muted-foreground",children:"No posts yet."})]})]}),p.jsx(Qt,{})]})}function Dc({editing:e,cats:t,userId:n,onClose:r,onSaved:o}){const[s,c]=a.useState({title:e.title??"",slug:e.slug??"",excerpt:e.excerpt??"",content:e.content??"",featured_image:e.featured_image??"",featured_image_alt:e.featured_image_alt??"",meta_title:e.meta_title??"",meta_description:e.meta_description??"",keywords:e.keywords??"",category_id:e.category_id??"",status:e.status??"draft",reading_minutes:e.reading_minutes??8}),[i,l]=a.useState(!1);function u(d,h){c(v=>({...v,[d]:h}))}async function m(){l(!0);try{const d={...s};if(d.slug||(d.slug=Tn(d.title)),d.status==="published"&&!e.published_at&&(d.published_at=new Date().toISOString()),d.author_id=n,d.category_id||(d.category_id=null),e.id){const{error:h}=await se.from("posts").update(d).eq("id",e.id);if(h)throw h}else{const{error:h}=await se.from("posts").insert(d);if(h)throw h}Jt.success("Saved"),o()}catch(d){Jt.error(d.message)}finally{l(!1)}}return p.jsxs("div",{className:"mt-8 grid gap-4 rounded-md border border-border p-6",children:[p.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[p.jsxs("div",{children:[p.jsx(Q,{children:"Title"}),p.jsx(Se,{value:s.title,onChange:d=>{u("title",d.target.value),s.slug||u("slug",Tn(d.target.value))}})]}),p.jsxs("div",{children:[p.jsx(Q,{children:"Slug"}),p.jsx(Se,{value:s.slug,onChange:d=>u("slug",d.target.value)})]})]}),p.jsxs("div",{children:[p.jsx(Q,{children:"Excerpt"}),p.jsx(Pt,{rows:2,value:s.excerpt,onChange:d=>u("excerpt",d.target.value)})]}),p.jsxs("div",{children:[p.jsx(Q,{children:"Content (HTML)"}),p.jsx(Pt,{rows:20,value:s.content,onChange:d=>u("content",d.target.value),className:"font-mono text-sm"})]}),p.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[p.jsxs("div",{children:[p.jsx(Q,{children:"Featured image URL"}),p.jsx(Se,{value:s.featured_image,onChange:d=>u("featured_image",d.target.value)})]}),p.jsxs("div",{children:[p.jsx(Q,{children:"Featured image ALT text"}),p.jsx(Se,{value:s.featured_image_alt,onChange:d=>u("featured_image_alt",d.target.value)})]})]}),p.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[p.jsxs("div",{children:[p.jsx(Q,{children:"Meta title (SEO)"}),p.jsx(Se,{maxLength:70,value:s.meta_title,onChange:d=>u("meta_title",d.target.value)})]}),p.jsxs("div",{children:[p.jsx(Q,{children:"Meta description (150-160 chars)"}),p.jsx(Se,{maxLength:170,value:s.meta_description,onChange:d=>u("meta_description",d.target.value)})]})]}),p.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[p.jsxs("div",{children:[p.jsx(Q,{children:"Keywords"}),p.jsx(Se,{value:s.keywords,onChange:d=>u("keywords",d.target.value)})]}),p.jsxs("div",{children:[p.jsx(Q,{children:"Category"}),p.jsxs(An,{value:s.category_id||"",onValueChange:d=>u("category_id",d),children:[p.jsx(kt,{children:p.jsx(Nn,{placeholder:"Choose..."})}),p.jsx(Ft,{children:t.map(d=>p.jsx(Ze,{value:d.id,children:d.name},d.id))})]})]}),p.jsxs("div",{children:[p.jsx(Q,{children:"Status"}),p.jsxs(An,{value:s.status,onValueChange:d=>u("status",d),children:[p.jsx(kt,{children:p.jsx(Nn,{})}),p.jsxs(Ft,{children:[p.jsx(Ze,{value:"draft",children:"Draft"}),p.jsx(Ze,{value:"published",children:"Published"})]})]})]})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Ie,{onClick:m,disabled:i,children:i?"Saving...":"Save"}),p.jsx(Ie,{variant:"outline",onClick:r,children:"Cancel"})]})]})}export{Fc as component};
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.