intlayer-editor 9.3.2 → 9.4.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,41 @@
1
+ import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{t as n}from"./react-CwJFpaho.js";import{n as r,r as i,t as a}from"./dist-KPVyyi8J.js";var o=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),s=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()})),c={locales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],requiredLocales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],strictMode:`strict`,defaultLocale:`en`},l={mode:`prefix-no-default`,storage:{cookies:[{name:`INTLAYER_LOCALE`,attributes:{path:`/`}}],headers:[{name:`x-intlayer-locale`}]},basePath:``},u={editorURL:`http://localhost:8000`,cmsURL:`https://app.intlayer.org`,backendURL:`https://back.intlayer.org`,port:8e3,enabled:!1,dictionaryPriorityStrategy:`local_first`,liveSync:!1,liveSyncPort:4e3,liveSyncURL:`http://localhost:4000`},d={mode:`default`,prefix:`\x1B[38;5;239m[intlayer] \x1B[0m`},f=i(),p=e(n(),1),m=r(),h=({children:e,value:t,additionalProps:n})=>{let r=(0,p.isValidElement)(e)?e:(0,m.jsx)(m.Fragment,{children:e});return new Proxy(r,{get(e,r,i){if(r===`value`)return t;if(r===Symbol.toPrimitive)return()=>t??``;if(r===`toString`)return()=>String(t??``);if(r===`valueOf`)return()=>t;if(n&&Object.hasOwn(n,r))return n[r];if(t!=null&&typeof r==`string`&&r!==`constructor`&&!(r in e)){let e=Object(t);if(r in e){let n=e[r];return typeof n==`function`?n.bind(t):n}}return Reflect.get(e,r,i)}})},g=(e,t)=>{let n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},_=`translation`,v=`enumeration`,y=`plural`,b=`condition`,x=`insertion`,S=`file`,C=`object`,w=`array`,T=`nested`,E=`reactNode`,D=`preactNode`,O=`solidNode`,k=`markdown`,A=`html`,j=`text`,ee=`number`,M=`boolean`,te=`gender`,ne=`select`,re=`null`,ie=`unknown`,ae=(e,t)=>{for(let n of t.plugins??[])if(n.canHandle(e))return n.transform(e,t,(e,t)=>ae(e,t));if(typeof e!=`object`||!e||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0||typeof e==`function`)return e;if(Array.isArray(e))return e.map((e,n)=>ae(e,{...t,children:e,keyPath:[...t.keyPath,{type:w,key:n}]}));let n={};for(let r in e){let i={...t,children:e[r],keyPath:[...t.keyPath,{type:C,key:r}]};if(t.eager){n[r]=ae(e[r],i);continue}Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:function(){let t=ae(e[r],i);return Object.defineProperty(this,r,{value:t,enumerable:!0,configurable:!0}),t}})}return n},oe=(e,t)=>e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString()),se=`default`,ce=/[^A-Za-z0-9._&=-]/g,le=/[^A-Za-z0-9._-]/g,ue=e=>`%${e.charCodeAt(0).toString(16).toUpperCase().padStart(4,`0`)}`,de=(e,t)=>{if(e===``)return`%`;let n=e.replace(t,ue);return n===`.`||n===`..`?n.replace(/\./g,`%002E`):n},fe=e=>e===void 0?se:typeof e==`string`?de(e,ce):Object.keys(e).sort().map(t=>`${de(t,le)}=${de(String(e[t]),le)}`).join(`&`),pe=e=>Array.isArray(e)?e.length===0?[se]:e.map(fe):[fe(e)],me=(e,t)=>{for(let n of e)if(t(n))return n;return t(`default`)?se:e[0]??`default`},he=(e,t,n,r)=>{let i=e.split(`/`);return t.every((e,t)=>e===`variant`?i[t]===r:n?.item===void 0||i[t]===String(n.item))},ge=e=>typeof e==`object`&&!!e&&`qualifierTypes`in e&&Array.isArray(e.qualifierTypes)&&`content`in e,_e=(e,t)=>{let n=t.split(`/`),r={key:e.key,content:e.content[t]};return e.qualifierTypes.forEach((e,t)=>{e===`variant`?r.variant=n[t]:e===`item`&&(r.item=Number(n[t]))}),r},ve=(e,t)=>{if(!ge(e))return e;let{qualifierTypes:n,content:r}=e,i=n.includes(`item`)&&t?.item===void 0,a=Object.keys(r),o=n.indexOf(`variant`),s=o===-1?se:me(pe(t?.variant),e=>a.some(t=>t.split(`/`)[o]===e)),c=a.filter(e=>he(e,n,t,s)).map(t=>_e(e,t));return i?c.sort((e,t)=>(e.item??0)-(t.item??0)):c[0]??null},ye=e=>typeof e==`object`&&e?{locale:e.locale,selector:e}:{locale:e},be=e=>e?Object.keys(e).filter(e=>e!==`locale`).sort().map(t=>{let n=e[t];return`${t}:${t===`variant`?pe(n).join(`,`):String(n)}`}).join(`|`):``,xe=`\x1B[0m`,Se=`\x1B[34m`,Ce=`\x1B[31m`,we=`\x1B[32m`,Te=`\x1B[38;5;3m`,Ee=e=>e,De=(e,t)=>{let n=t?.config??{},r=n.mode??`default`;if(r===`disabled`||t?.isVerbose&&r!==`verbose`)return;let i=Ee(n.prefix),a=i?[i,...[e].flat()]:[e].flat(),o=t?.level??`info`;(n[o]??console[o]??n.log??console.log)(...a)},Oe=(e,t)=>(n,r)=>De(n,{...r??{},config:{...e?.log,...t?.config,...r?.config??{}}}),ke=(e,t,n)=>t&&typeof window>`u`?`${t}${e}${n?typeof n==`boolean`?xe:n:xe}`:e,Ae=(e,t=Te,n=xe)=>[e].flat().map(e=>ke(e,t,n)).join(`, `);ke(`✗`,Ce),ke(`✓`,we),ke(`⏲`,Se);var je={},Me=()=>je,Ne=(e=``)=>new Proxy({},{get:(t,n)=>n===`toJSON`||n===Symbol.toPrimitive||n===`toString`||n===`valueOf`?()=>e:n===`then`?void 0:n===Symbol.iterator?function*(){yield e}:Ne(e?`${e}.${String(n)}`:String(n))}),Pe=new Map,Fe=new Set,Ie=(e,t,n)=>{let r=Me()[e];if(!r)return Fe.has(e)||(Oe({log:d})(typeof window>`u`?`Dictionary ${Ae(e)} was not found. Using fallback proxy.`:`Dictionary ${e} was not found. Using fallback proxy.`,{level:`warn`}),Fe.add(e)),Ne(e);let i;i=t;let a=`${e}_${i??`default`}__${n?`custom_plugins`:`default_plugins`}`;if(Pe.has(a))return Pe.get(a);let o=tt(r,t,n);return Pe.set(a,o),o},Le=e=>{if(typeof e!=`object`||!e||typeof e.then==`function`||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Array.isArray(e)},Re=(e,t)=>{if(e===void 0)return t;if(t===void 0||Array.isArray(e))return e;if(Le(e)&&Le(t)){let n={...e};for(let r of Object.keys(t))r!==`__proto__`&&r!==`constructor`&&t[r]!==void 0&&(n[r]=e[r]===void 0?t[r]:Re(e[r],t[r]));return n}return e},ze=(e,t,n)=>{let r=t=>e[t],i=new Set,a=[],o=e=>{e&&!i.has(e)&&(i.add(e),a.push(e))};o(t),t.includes(`-`)&&o(t.split(`-`)[0]),o(n),n?.includes(`-`)&&o(n.split(`-`)[0]);let s=[];for(let e of a){let t=r(e);if(t!==void 0){if(typeof t==`string`){if(s.length===0)return t;continue}s.push(t)}}if(s.length!==0)return s.length===1||Array.isArray(s[0])?s[0]:s.reduce((e,t)=>Re(e,t))},Be=e=>{if(typeof e!=`object`||!e||!(`nodeType`in e))return!1;let{nodeType:t}=e;return!1},Ve=e=>{if(typeof e==`string`)return e;if(Be(e))return e.nodeType===`html`?e[A]:e[k]},He=(e,t)=>{if(typeof e==`string`)return t;if(Be(e)){let n=e.nodeType===`html`?A:k;return{...e,[n]:t}}return e},Ue=(e,t,n,r,i)=>{let a=He(e,oe(Ve(e),t));return i(a,{...n,plugins:r,children:a})},N={id:`fallback-plugin`,canHandle:()=>!1,transform:e=>e},We=(e,t)=>({}).INTLAYER_NODE_TYPE_TRANSLATION===`false`?N:{id:`translation-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`translation`,transform:(n,r,i)=>{let a=n.translation??{},o={};for(let e in a){let t={...r,children:a[e],keyPath:[...r.keyPath,{type:_,key:e}]};o[e]=i(a[e],t)}return ze(o,e,t)}},Ge=N,Ke=e=>N,qe={}.INTLAYER_NODE_TYPE_CONDITION===`false`?N:{id:`condition-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`condition`,transform:(e,t,n)=>{let r=e[b],i={};for(let e in r){let a=r[e];i[e]=n(a,{...t,children:a,keyPath:[...t.keyPath,{type:b,key:e}]})}return e=>{let t=typeof e==`boolean`?e:e.value,n=g(i,t);return typeof n==`function`&&typeof e==`object`?n(e):n}}},Je={}.INTLAYER_NODE_TYPE_INSERTION===`false`?N:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:x}],i=e[x],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||Be(e),transform:(e,n,r)=>{if(Be(e))return i=>Ue(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=oe(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},Ye=N,Xe=N,Ze=e=>N,Qe=N,$e=(e,t=!0)=>[We(e??c.defaultLocale,t?c.defaultLocale:void 0),Ge,qe,Je,Ze(e??c.defaultLocale),Qe,Ye,Xe],et=(e,t,n=[])=>ae(e,{...t,plugins:n}),tt=(e,t,n)=>{let{locale:r,selector:i}=ye(t),a=n??$e(r),o=ve(e,i),s=e=>{let t={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:a,nestedDictionaries:e.nestedDictionaries};return et(e.content,t,a)};return o===null?null:Array.isArray(o)?o.map(s):s(o)},nt=e=>e!=null&&typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`,rt=/\{\{\s*(.*?)\s*\}\}/g,it=(e,t={})=>{if(!Object.values(t).some(nt))return{isSimple:!0,parts:e.replace(rt,(e,n)=>(t[n.trim()]??``).toString())};let n=e.split(rt),r=[];for(let e=0;e<n.length;e++)if(e%2==0)n[e]&&r.push(n[e]);else{let i=t[n[e].trim()];i!=null&&r.push(i)}return{isSimple:!1,parts:r}},at={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{plugins:t,...n})=>h({...n,value:n.children,children:n.children})},ot=N,st=(e,t)=>{let n=it(e,t);return n.isSimple?n.parts:(0,p.createElement)(p.Fragment,null,...n.parts.map((e,t)=>(0,p.createElement)(p.Fragment,{key:t},e)))},ct={}.INTLAYER_NODE_TYPE_INSERTION===`false`?N:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:x}],i=e[x],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||Be(e),transform:(e,n,r)=>{if(Be(e))return i=>Ue(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=st(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}},o=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return typeof i==`object`&&i&&`nodeType`in i&&[`enumeration`,`condition`].includes(i.nodeType)?e=>t=>{let n=o(t);return typeof n==`function`?n(e):n}:o}},lt=N,ut=N,dt=new Map,ft=(e,t=!0)=>{let n=`${e??c.defaultLocale}_${t}`;if(dt.has(n))return dt.get(n);let r=[We(e??c.defaultLocale,t?c.defaultLocale:void 0),Ge,Ke(e??c.defaultLocale),qe,Ze(e??c.defaultLocale),Qe,Ye,Xe,at,ot,ct,lt,ut];return dt.set(n,r),r},pt=(e,t)=>Ie(e,t,ft(typeof t==`object`&&t?t.locale:t)),mt=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),ht=e=>{if(typeof e==`number`)return Date.now()+e*1e3;if(typeof e==`string`){let t=Date.parse(e);return Number.isNaN(t)?void 0:t}},gt=(e,t,n)=>{let r=[`${e}=${encodeURIComponent(t)}`];n.path&&r.push(`Path=${n.path}`),n.domain&&r.push(`Domain=${n.domain}`);let i=ht(n.expires);return i!==void 0&&r.push(`Expires=${new Date(i).toUTCString()}`),n.secure&&r.push(`Secure`),n.sameSite&&r.push(`SameSite=${n.sameSite}`),r.join(`; `)},_t={}.INTLAYER_ROUTING_STORAGE_COOKIES===`false`;({}).INTLAYER_ROUTING_STORAGE_HEADERS;var vt={getCookie:e=>document.cookie.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.split(`=`)[1],getLocaleStorage:e=>localStorage.getItem(e),getSessionStorage:e=>sessionStorage.getItem(e),isCookieEnabled:!0,setCookieStore:(e,t,n)=>cookieStore.set({name:e,value:t,path:n.path,domain:n.domain,expires:n.expires,sameSite:n.sameSite}),setCookieString:(e,t)=>{document.cookie=t},setSessionStorage:(e,t)=>sessionStorage.setItem(e,t),setLocaleStorage:(e,t)=>localStorage.setItem(e,t)},yt=(e=vt)=>{let{locales:t}=c;if(e?.isCookieEnabled===!1)return;let n=e=>!!e&&t.includes(e);if(!_t)for(let t=0;t<(l.storage.cookies??[]).length;t++)try{let r=e?.getCookie?.(l.storage.cookies[t].name);if(n(r))return r}catch{}},bt=(e,t)=>{if(t?.isCookieEnabled!==!1&&!_t&&l.storage.cookies)for(let n=0;n<l.storage.cookies.length;n++){let{name:r,attributes:i}=l.storage.cookies[n];try{t?.setCookieStore&&t.setCookieStore(r,e,{...i,expires:ht(i.expires)})}catch{try{t?.setCookieString&&t.setCookieString(r,gt(r,e,i))}catch{}}}},xt=yt(vt),St=(e,t)=>bt(e,{...vt,isCookieEnabled:t}),Ct=()=>{typeof window<`u`&&(window.intlayer={enabled:!0})},wt=[`en`],Tt=(e,t=c?.locales)=>{let n=mt(e),r=e;e?.endsWith(`/`)&&(r=e.slice(0,-1));let i=n?new URL(r):new URL(r,`http://e.com`),a=i.pathname;a.startsWith(`/`)||(i.pathname=`/${a}`);{let e=a.split(`/`),n=e[1];t?.includes(n)&&(e.splice(1,1),i.pathname=e.join(`/`)??`/`)}return n?i.toString():i.toString().replace(`http://e.com`,``)},Et=(e={})=>({defaultLocale:c?.defaultLocale??`en`,mode:l?.mode??`prefix-no-default`,locales:c?.locales??wt,rewrite:l?.rewrite,domains:l?.domains,...e}),Dt=(e,t)=>!!e&&(t??c.locales).includes(e),Ot=(e,t={})=>{let{defaultLocale:n,mode:r,locales:i,domains:a}=Et(t);return!e||!Dt(e,i)?{prefix:``,localePrefix:void 0}:r===`prefix-all`||r===`prefix-no-default`&&n!==e?{prefix:`${e}/`,localePrefix:e}:{prefix:``,localePrefix:void 0}},kt=(e,t,n)=>e,At=(e,t,n)=>({path:e,isRewritten:!1}),jt=(e,t=c?.defaultLocale,n={})=>{let{defaultLocale:r,mode:i,locales:a,rewrite:o,domains:s}=Et(n),l=Tt(e,a),u=new URL(l,`http://e.com`),d=At(kt(u.pathname,void 0,void 0),t,void 0).path,{prefix:f}=Ot(t,{defaultLocale:r,mode:i,locales:a,domains:s}),p=`/${f}${d}`.replace(/\/+/g,`/`);return p.length>1&&p.endsWith(`/`)&&(p=p.slice(0,-1)),`${p}${u.search}${u.hash}`},Mt=(e,t=c?.defaultLocale,n={})=>{let{domains:r,currentDomain:i}=Et(n),a=mt(e),o=a?new URL(e):new URL(e,`http://e.com`);return`${a?`${o.protocol}//${o.host}`:``}${jt(`${o.pathname}${o.search}${o.hash}`,t,n)}`},Nt=(e,t=c?.locales,n=c?.defaultLocale)=>{let r=[e].flat(),i=e=>e.trim().toLowerCase();try{for(let e of r){let n=i(e),r=t.find(e=>i(e)===n);if(r)return r;let[a]=n.split(`-`),o=t.find(e=>i(e).split(`-`)[0]===a);if(o)return o}}catch{}return n},Pt=(0,p.createContext)({locale:xt??c?.defaultLocale,setLocale:()=>null,isCookieEnabled:!0}),Ft=e=>{let t=(0,f.c)(6),{locale:n,defaultLocale:r,variant:i,children:a,setLocale:o,disableEditor:s,isCookieEnabled:l}=e,{locales:u,defaultLocale:d}=c??{},[h,g]=(0,p.useState)(n??xt??r??d),_;t[0]!==h||t[1]!==n?(_=()=>{n&&n!==h&&g(n)},t[0]=h,t[1]=n,t[2]=_):_=t[2];let v;t[3]===n?v=t[4]:(v=[n],t[3]=n,t[4]=v),(0,p.useEffect)(_,v);let y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[5]=y):y=t[5],(0,p.useEffect)(It,y);let b=o??(e=>{if(h.toString()!==e.toString()){if(!u?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}g(e),St(e,l)}}),x=Nt(h);return(0,m.jsx)(Pt.Provider,{value:{locale:x,setLocale:b,variant:i,disableEditor:s},children:a})};function It(){Ct()}var Lt=(e,t)=>{let{locale:n,variant:r}=(0,p.useContext)(Pt)??{},i=t??n,a=typeof i==`object`&&i?`${i.locale??``}|${be(i)}`:i;return(0,p.useMemo)(()=>pt(e,i),[e,a])},Rt=e(s(),1),zt=Object.defineProperty,Bt=(e,t)=>zt(e,`name`,{value:t,configurable:!0}),Vt=!!(typeof window<`u`&&window.document&&window.document.createElement);function P(e,t,{checkForDefaultPrevented:n=!0}={}){return Bt(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Bt(P,`composeEventHandlers`);function Ht(e){if(!Vt)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Bt(Ht,`getOwnerWindow`);function Ut(e){if(!Vt)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Bt(Ut,`getOwnerDocument`);function Wt(e,t=!1){let{activeElement:n}=Ut(e);if(!n?.nodeName)return null;if(Gt(n)&&n.contentDocument)return Wt(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Ut(n).getElementById(e);if(t)return t}}return n}Bt(Wt,`getActiveElement`);function Gt(e){return e.tagName===`IFRAME`}Bt(Gt,`isFrame`);var Kt=Object.defineProperty,qt=(e,t)=>Kt(e,`name`,{value:t,configurable:!0});function Jt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}qt(Jt,`setRef`);function Yt(...e){return t=>{let n=!1,r=e.map(e=>{let r=Jt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Jt(e[t],null)}}}}qt(Yt,`composeRefs`);function F(...e){return p.useCallback(Yt(...e),e)}qt(F,`useComposedRefs`);var Xt=Object.defineProperty,Zt=(e,t)=>Xt(e,`name`,{value:t,configurable:!0});function Qt(e,t){let n=p.createContext(t);n.displayName=e+`Context`;let r=Zt(e=>{let{children:t,...r}=e,i=p.useMemo(()=>r,Object.values(r));return(0,m.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=p.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Zt(i,`useContext`),[r,i]}Zt(Qt,`createContext`);function $t(e,t=[]){let n=[];function r(t,r){let i=p.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Zt(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=p.useMemo(()=>o,Object.values(o));return(0,m.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=p.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Zt(s,`useContext`),[o,s]}Zt(r,`createContext`);let i=Zt(()=>{let t=n.map(e=>p.createContext(e));return Zt(function(n){let r=n?.[e]||t;return p.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,en(i,...t)]}Zt($t,`createContextScope`);function en(...e){let t=e[0];if(e.length===1)return t;let n=Zt(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Zt(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Zt(en,`composeContextScopes`);var tn=Object.defineProperty,nn=(e,t)=>tn(e,`name`,{value:t,configurable:!0});function rn(e){let t=p.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];pn(r)&&typeof _n==`function`&&(r=_n(r._payload)),p.Children.forEach(r,e=>{if(dn(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;pn(n)&&typeof _n==`function`&&(n=_n(n._payload)),a=cn(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=p.cloneElement(a,void 0,s):!o&&p.Children.count(r)===1&&p.isValidElement(r)&&(a=r);let c=a?un(a):void 0,l=F(n,c);if(!a){if(r||r===0)throw Error(o?gn(e):hn(e));return r}let u=ln(i,a.props??{});return a.type!==p.Fragment&&(u.ref=n?l:c),p.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}nn(rn,`createSlot`);var an=rn(`Slot`),on=Symbol.for(`radix.slottable`);function sn(e){let t=nn(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=on,t}nn(sn,`createSlottable`);var cn=nn((e,t)=>{if(`child`in e.props){let t=e.props.child;return p.isValidElement(t)?p.cloneElement(t,void 0,e.props.children(t.props.children)):null}return p.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function ln(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}nn(ln,`mergeProps`);function un(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)}nn(un,`getElementRef`);function dn(e){return p.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===on}nn(dn,`isSlottable`);var fn=Symbol.for(`react.lazy`);function pn(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===fn&&`_payload`in e&&mn(e._payload)}nn(pn,`isLazyComponent`);function mn(e){return typeof e==`object`&&!!e&&`then`in e}nn(mn,`isPromiseLike`);var hn=nn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),gn=nn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),_n=p.use,vn=Object.defineProperty,I=(e,t)=>vn(e,`name`,{value:t,configurable:!0});function yn(e){let t=e+`CollectionProvider`,[n,r]=$t(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=I(e=>{let{scope:t,children:n}=e,r=p.useRef(null),a=p.useRef(new Map).current;return(0,m.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=rn(s),l=p.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=F(t,a(s,n).collectionRef);return(0,m.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=rn(u),h=p.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=p.useRef(null),s=F(t,o),c=a(u,n);return p.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,m.jsx)(f,{[d]:``,ref:s,children:r})});h.displayName=u;function g(t){let n=a(e+`CollectionConsumer`,t);return p.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return I(g,`useCollection`),[{Provider:o,Slot:l,ItemSlot:h},g,r]}I(yn,`createCollection`);var bn=new WeakMap,xn=class e extends Map{static{I(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],bn.set(this,!0)}set(e,t){return bn.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=wn(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=Sn(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Sn(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Sn(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Sn(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Cn(e,t);return n===-1?void 0:e[n]}I(Sn,`at`);function Cn(e,t){let n=e.length,r=wn(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}I(Cn,`toSafeIndex`);function wn(e){return e!==e||e===0?0:Math.trunc(e)}I(wn,`toSafeInteger`);function Tn(e){let t=e+`CollectionProvider`,[n,r]=$t(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new xn,setItemMap:I(()=>void 0,`setItemMap`)}),o=I(({state:e,...t})=>e?(0,m.jsx)(c,{...t,state:e}):(0,m.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=I(e=>{let t=_();return(0,m.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=I(e=>{let{scope:t,children:n,state:r}=e,a=p.useRef(null),[o,s]=p.useState(null),c=F(a,s),[l,u]=r;return p.useEffect(()=>{if(!o)return;let e=kn(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,m.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=rn(l),d=p.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=F(t,a(l,n).collectionRef);return(0,m.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,h=rn(f),g=p.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=p.useRef(null),[s,c]=p.useState(null),l=F(t,o,c),{setItemMap:u}=a(f,n),d=p.useRef(i);En(d.current,i)||(d.current=i);let g=d.current;return p.useEffect(()=>{let e=g;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(On):(t.set(s,{...e,element:s}),t.toSorted(On)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new xn(e)))}},[s,g,u]),(0,m.jsx)(h,{"data-radix-collection-item":``,ref:l,children:r})});g.displayName=f;function _(){return p.useState(new xn)}I(_,`useInitCollection`);function v(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return I(v,`useCollection`),[{Provider:o,Slot:d,ItemSlot:g},{createCollectionScope:r,useCollection:v,useInitCollection:_}]}I(Tn,`createCollection`);function En(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}I(En,`shallowEqual`);function Dn(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}I(Dn,`isElementPreceding`);function On(e,t){return!e[1].element||!t[1].element?0:Dn(e[1].element,t[1].element)?-1:1}I(On,`sortByDocumentPosition`);function kn(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}I(kn,`getChildListObserver`);var An=Object.defineProperty,jn=(e,t)=>An(e,`name`,{value:t,configurable:!0}),L=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=rn(`Primitive.${t}`),r=p.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,m.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Mn(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}jn(Mn,`dispatchDiscreteCustomEvent`);var Nn=Object.defineProperty,Pn=(e,t)=>Nn(e,`name`,{value:t,configurable:!0});function Fn(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>((...e)=>t.current?.(...e)),[])}Pn(Fn,`useCallbackRef`);var In=Object.defineProperty,R=(e,t)=>In(e,`name`,{value:t,configurable:!0}),Ln=`dismissableLayer.update`,Rn=`dismissableLayer.pointerDownOutside`,zn=`dismissableLayer.focusOutside`,Bn,Vn=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Hn=p.forwardRef(R(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=p.useContext(Vn),[d,f]=p.useState(null),h=d?.ownerDocument??globalThis?.document,[,g]=p.useState({}),_=F(t,f),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=d?v.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=p.useRef(!1),T=Kn(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:p.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return C&&!t},[u.branches,C])}),E=qn(e=>{if(r&&w.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},h),D=d?x===v.length-1:!1,O=Fn(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return p.useEffect(()=>{if(D)return h.addEventListener(`keydown`,O,{capture:!0}),()=>h.removeEventListener(`keydown`,O,{capture:!0})},[h,D,O]),p.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Bn=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Jn(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=Bn))}},[d,h,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Jn())},[d,u]),p.useEffect(()=>{let e=R(()=>g({}),`handleUpdate`);return document.addEventListener(Ln,e),()=>document.removeEventListener(Ln,e)},[]),(0,m.jsx)(L.div,{...l,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:P(e.onFocusCapture,E.onFocusCapture),onBlurCapture:P(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`)),Un=p.forwardRef(R(function(e,t){let n=p.useContext(Vn),r=p.useRef(null),i=F(t,r);return p.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,m.jsx)(L.div,{...e,ref:i})},`DismissableLayerBranch`));function Wn(){let e=p.useContext(Vn),[t,n]=p.useState(null);return p.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}R(Wn,`useDismissableLayerSurface`);var Gn=R(()=>!0,`IS_TRUE`);function Kn(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Gn}=t,s=Fn(e),c=p.useRef(!1),l=p.useRef(!1),u=p.useRef(new Map),d=p.useRef(()=>{});return p.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}R(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}R(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}R(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}R(p,`handleInteractionBubble`);let m=R(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Yn(Rn,s,p,{discrete:!0})};if(R(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:R(()=>c.current=!0,`onPointerDownCapture`)}}R(Kn,`usePointerDownOutside`);function qn(e,t=globalThis?.document){let n=Fn(e),r=p.useRef(!1);return p.useEffect(()=>{let e=R(e=>{e.target&&!r.current&&Yn(zn,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:R(()=>r.current=!0,`onFocusCapture`),onBlurCapture:R(()=>r.current=!1,`onBlurCapture`)}}R(qn,`useFocusOutside`);function Jn(){let e=new CustomEvent(Ln);document.dispatchEvent(e)}R(Jn,`dispatchUpdate`);function Yn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Mn(i,a):i.dispatchEvent(a)}R(Yn,`handleAndDispatchCustomEvent`);var Xn=Hn,Zn=Un,z=globalThis?.document?p.useLayoutEffect:()=>{},Qn=Object.defineProperty,$n=p.forwardRef(((e,t)=>Qn(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=p.useState(!1);z(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Rt.createPortal((0,m.jsx)(L.div,{...r,ref:t}),o):null},`Portal`)),er=Object.defineProperty,tr=(e,t)=>er(e,`name`,{value:t,configurable:!0});function nr(e,t){return p.useReducer((e,n)=>t[e][n]??e,e)}tr(nr,`useStateMachine`);var rr=tr(e=>{let{present:t,children:n}=e,r=ir(t),i=typeof n==`function`?n({present:r.isPresent}):p.Children.only(n),a=or(r.ref,cr(i));return typeof n==`function`||r.isPresent?p.cloneElement(i,{ref:a}):null},`Presence`);function ir(e){let[t,n]=p.useState(),r=p.useRef(null),i=p.useRef(e),a=p.useRef(`none`),o=p.useRef(void 0),[s,c]=nr(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return p.useEffect(()=>{s===`mounted`?(a.current=o.current??sr(r.current),o.current=void 0):a.current=`none`},[s]),z(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=sr(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),z(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=tr(a=>{let o=sr(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=tr(e=>{e.target===t&&(a.current=sr(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:p.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=sr(t)}else r.current=null;n(e)},[])}}tr(ir,`usePresence`);function ar(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}tr(ar,`setRef`);function or(...e){let t=p.useRef(e);return t.current=e,p.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=ar(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():ar(n[e],null)}}},[])}tr(or,`useStableComposedRefs`);function sr(e){return e?.animationName||`none`}tr(sr,`getAnimationName`);function cr(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)}tr(cr,`getElementRef`);var lr=Object.defineProperty,ur=(e,t)=>lr(e,`name`,{value:t,configurable:!0}),dr=p.useEffectEvent,fr=p.useInsertionEffect;function pr(e){if(typeof dr==`function`)return dr(e);let t=p.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof fr==`function`?fr(()=>{t.current=e}):z(()=>{t.current=e}),p.useMemo(()=>((...e)=>t.current?.(...e)),[])}ur(pr,`useEffectEvent`);var mr=Object.defineProperty,hr=(e,t)=>mr(e,`name`,{value:t,configurable:!0}),gr=p.useInsertionEffect||z;function _r({prop:e,defaultProp:t,onChange:n=hr(()=>{},`onChange`),caller:r}){let[i,a,o]=vr({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,p.useCallback(t=>{if(s){let n=yr(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}hr(_r,`useControllableState`);function vr({defaultProp:e,onChange:t}){let[n,r]=p.useState(e),i=p.useRef(n),a=p.useRef(t);return gr(()=>{a.current=t},[t]),p.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}hr(vr,`useUncontrolledState`);function yr(e){return typeof e==`function`}hr(yr,`isFunction`);var br=Symbol(`RADIX:SYNC_STATE`);function xr(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=pr(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=p.useReducer((t,n)=>{if(n.type===br)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),m=d.state,h=p.useRef(m);p.useEffect(()=>{h.current!==m&&(h.current=m,c||l(m))},[m,h,c]);let g=p.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return p.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:br,state:i})},[i,d.state,c]),[g,f]}hr(xr,`useControllableStateReducer`);var Sr=Object.defineProperty,Cr=(e,t)=>Sr(e,`name`,{value:t,configurable:!0}),wr=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`}),Tr=p.forwardRef(Cr(function(e,t){return(0,m.jsx)(L.span,{...e,ref:t,style:{...wr,...e.style}})},`VisuallyHidden`));function Er(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Er(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Dr(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Er(e))&&(r&&(r+=` `),r+=t);return r}var Or=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,kr=Dr,Ar=(e,t)=>n=>{if(t?.variants==null)return kr(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Or(t)||Or(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return kr(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},jr=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Mr=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Nr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Pr=e=>{let t=Nr(e);return t.charAt(0).toUpperCase()+t.slice(1)},Fr={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Ir=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Lr=(0,p.createContext)({}),Rr=()=>(0,p.useContext)(Lr),zr=(0,p.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:m=``}=Rr()??{},h=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,p.createElement)(`svg`,{ref:c,...Fr,width:t??l??Fr.width,height:t??l??Fr.height,stroke:e??f,strokeWidth:h,className:jr(`lucide`,m,i),...!a&&!Ir(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Br=(e,t)=>{let n=(0,p.forwardRef)(({className:n,...r},i)=>(0,p.createElement)(zr,{ref:i,iconNode:t,className:jr(`lucide-${Mr(Pr(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Pr(e),n},Vr=Br(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Hr=Br(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ur=Br(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Wr=Br(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Gr=Br(`copy-check`,[[`path`,{d:`m12 15 2 2 4-4`,key:`2c609p`}],[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Kr=Br(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),qr=Br(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Jr=Br(`move-right`,[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]),Yr=Br(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Xr=(0,p.createContext)({});function Zr(e){let t=(0,p.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Qr=typeof window<`u`?p.useLayoutEffect:p.useEffect,$r=(0,p.createContext)(null);function ei(e,t){e.indexOf(t)===-1&&e.push(t)}function ti(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var ni=(e,t,n)=>n>t?t:n<e?e:n,ri={},ii=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ai=e=>typeof e==`object`&&!!e,oi=e=>/^0[^.\s]+$/u.test(e);function si(e){let t;return()=>(t===void 0&&(t=e()),t)}var ci=e=>e,li=(...e)=>e.reduce((e,t)=>n=>t(e(n))),ui=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},di=class{constructor(){this.subscriptions=[]}add(e){return ei(this.subscriptions,e),()=>ti(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},B=e=>e*1e3,fi=e=>e/1e3,pi=(e,t)=>t?1e3/t*e:0,mi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,hi=1e-7,gi=12;function _i(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=mi(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>hi&&++s<gi);return o}function vi(e,t,n,r){if(e===t&&n===r)return ci;let i=t=>_i(t,0,1,e,n);return e=>e===0||e===1?e:mi(i(e),t,r)}var yi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,bi=e=>t=>1-e(1-t),xi=vi(.33,1.53,.69,.99),Si=bi(xi),Ci=yi(Si),wi=e=>e>=1?1:(e*=2)<1?.5*Si(e):.5*(2-2**(-10*(e-1))),Ti=e=>1-Math.sin(Math.acos(e)),Ei=bi(Ti),Di=yi(Ti),Oi=vi(.42,0,1,1),ki=vi(0,0,.58,1),Ai=vi(.42,0,.58,1),ji=e=>Array.isArray(e)&&typeof e[0]!=`number`,Mi=e=>Array.isArray(e)&&typeof e[0]==`number`,Ni={linear:ci,easeIn:Oi,easeInOut:Ai,easeOut:ki,circIn:Ti,circInOut:Di,circOut:Ei,backIn:Si,backInOut:Ci,backOut:xi,anticipate:wi},Pi=e=>typeof e==`string`,Fi=e=>{if(Mi(e)){e.length;let[t,n,r,i]=e;return vi(t,n,r,i)}return Pi(e)?(Ni[e],`${e}`,Ni[e]):e},Ii=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Li(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Ri=40;function zi(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ii.reduce((e,t)=>(e[t]=Li(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ri.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ri),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ii.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ii.length;t++)o[Ii[t]].cancel(e)},state:i,steps:o}}var{schedule:V,cancel:Bi,state:H,steps:Vi}=zi(typeof requestAnimationFrame<`u`?requestAnimationFrame:ci,!0),Hi;function Ui(){Hi=void 0}var U={now:()=>(Hi===void 0&&U.set(H.isProcessing||ri.useManualTiming?H.timestamp:performance.now()),Hi),set:e=>{Hi=e,queueMicrotask(Ui)}},Wi=e=>t=>typeof t==`string`&&t.startsWith(e),Gi=Wi(`--`),Ki=Wi(`var(--`),qi=e=>Ki(e)?Ji.test(e.split(`/*`)[0].trim()):!1,Ji=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Yi(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Xi={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Zi={...Xi,transform:e=>ni(0,1,e)},Qi={...Xi,default:1},$i=e=>Math.round(e*1e5)/1e5,ea=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ta(e){return e==null}var na=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ra=(e,t)=>n=>!!(typeof n==`string`&&na.test(n)&&n.startsWith(e)||t&&!ta(n)&&Object.prototype.hasOwnProperty.call(n,t)),ia=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ea);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},aa=e=>ni(0,255,e),oa={...Xi,transform:e=>Math.round(aa(e))},sa={test:ra(`rgb`,`red`),parse:ia(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+oa.transform(e)+`, `+oa.transform(t)+`, `+oa.transform(n)+`, `+$i(Zi.transform(r))+`)`};function ca(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var la={test:ra(`#`),parse:ca,transform:sa.transform},ua=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),da=ua(`deg`),fa=ua(`%`),W=ua(`px`),pa=ua(`vh`),ma=ua(`vw`),ha={...fa,parse:e=>fa.parse(e)/100,transform:e=>fa.transform(e*100)},ga={test:ra(`hsl`,`hue`),parse:ia(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+fa.transform($i(t))+`, `+fa.transform($i(n))+`, `+$i(Zi.transform(r))+`)`},G={test:e=>sa.test(e)||la.test(e)||ga.test(e),parse:e=>sa.test(e)?sa.parse(e):ga.test(e)?ga.parse(e):la.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?sa.transform(e):ga.transform(e),getAnimatableNone:e=>{let t=G.parse(e);return t.alpha=0,G.transform(t)}},_a=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function va(e){return isNaN(e)&&typeof e==`string`&&(e.match(ea)?.length||0)+(e.match(_a)?.length||0)>0}var ya=`number`,ba=`color`,xa=`var`,Sa=`var(`,Ca="${}",wa=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ta(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(wa,e=>(G.test(e)?(r.color.push(a),i.push(ba),n.push(G.parse(e))):e.startsWith(Sa)?(r.var.push(a),i.push(xa),n.push(e)):(r.number.push(a),i.push(ya),n.push(parseFloat(e))),++a,Ca)).split(Ca),indexes:r,types:i}}function Ea(e){return Ta(e).values}function Da({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===ya?$i(r[a]):e===ba?G.transform(r[a]):r[a]}return i}}function Oa(e){return Da(Ta(e))}var ka=e=>typeof e==`number`?0:G.test(e)?G.getAnimatableNone(e):e,Aa=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ka(e);function ja(e){let t=Ta(e);return Da(t)(t.values.map((e,n)=>Aa(e,t.split[n])))}var Ma={test:va,parse:Ea,createTransformer:Oa,getAnimatableNone:ja};function Na(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Pa({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Na(s,r,e+1/3),a=Na(s,r,e),o=Na(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Fa(e,t){return n=>n>0?t:e}var K=(e,t,n)=>e+(t-e)*n,Ia=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},La=[la,sa,ga],Ra=e=>La.find(t=>t.test(e));function za(e){let t=Ra(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===ga&&(n=Pa(n)),n}var Ba=(e,t)=>{let n=za(e),r=za(t);if(!n||!r)return Fa(e,t);let i={...n};return e=>(i.red=Ia(n.red,r.red,e),i.green=Ia(n.green,r.green,e),i.blue=Ia(n.blue,r.blue,e),i.alpha=K(n.alpha,r.alpha,e),sa.transform(i))},Va=new Set([`none`,`hidden`]);function Ha(e,t){return Va.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ua(e,t){return n=>K(e,t,n)}function Wa(e){return typeof e==`number`?Ua:typeof e==`string`?qi(e)?Fa:G.test(e)?Ba:Ja:Array.isArray(e)?Ga:typeof e==`object`?G.test(e)?Ba:Ka:Fa}function Ga(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Wa(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Ka(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Wa(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function qa(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Ja=(e,t)=>{let n=Ma.createTransformer(t),r=Ta(e),i=Ta(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Va.has(e)&&!i.values.length||Va.has(t)&&!r.values.length?Ha(e,t):li(Ga(qa(r,i),i.values),n):(`${e}${t}`,Fa(e,t))};function Ya(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?K(e,t,n):Wa(e)(e,t)}var Xa=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>V.update(t,e),stop:()=>Bi(t),now:()=>H.isProcessing?H.timestamp:U.now()}},Za=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Qa=2e4;function $a(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function eo(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min($a(r),Qa);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:fi(i)}}var q={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function to(e,t){return e*Math.sqrt(1-t*t)}var no=12;function ro(e,t,n){let r=n;for(let n=1;n<no;n++)r-=e(r)/t(r);return r}var io=.001;function ao({duration:e=q.duration,bounce:t=q.bounce,velocity:n=q.velocity,mass:r=q.mass}){let i,a;q.maxDuration;let o=1-t;o=ni(q.minDamping,q.maxDamping,o),e=ni(q.minDuration,q.maxDuration,fi(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=to(t,o),c=Math.exp(-i);return io-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=to(t**2,o);return(-i(t)+io>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=ro(i,a,s);if(e=B(e),isNaN(c))return{stiffness:q.stiffness,damping:q.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var oo=[`duration`,`bounce`],so=[`stiffness`,`damping`,`mass`];function co(e,t){return t.some(t=>e[t]!==void 0)}function lo(e){let t={velocity:q.velocity,stiffness:q.stiffness,damping:q.damping,mass:q.mass,isResolvedFromDuration:!1,...e};if(!co(e,so)&&co(e,oo)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ni(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:q.mass,stiffness:i,damping:a}}else{let n=ao({...e,velocity:0});t={...t,...n,mass:q.mass},t.isResolvedFromDuration=!0}}return t}function uo(e=q.visualDuration,t=q.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=lo({...n,velocity:-fi(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=fi(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?q.restSpeed.granular:q.restSpeed.default,i||=v?q.restDelta.granular:q.restDelta.default;let y,b,x,S,C,w;if(h<1)x=to(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(S*Math.sin(x*e)+g*Math.cos(x*e))},C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>B(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=B(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=B(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min($a(T),Qa),t=Za(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}uo.applyToOptions=e=>{let t=eo(e,100,uo);return e.ease=t.ease,e.duration=B(t.duration),e.type=`keyframes`,e};var fo=5;function po(e,t,n){let r=Math.max(t-fo,0);return pi(n-e(r),t-r)}function mo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=uo({keyframes:[f.value,m(f.value)],velocity:po(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function ho(e,t,n){let r=[],i=n||ri.mix||Ya,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=li(Array.isArray(t)?t[n]||ci:t,a)),r.push(a)}return r}function go(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=ho(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ui(e[r],e[r+1],n);return s[r](i)};return n?t=>l(ni(e[0],e[a-1],t)):l}function _o(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ui(0,t,r);e.push(K(n,1,i))}}function vo(e){let t=[0];return _o(t,e.length-1),t}function yo(e,t){return e.map(e=>e*t)}function bo(e,t){return e.map(()=>t||Ai).splice(0,e.length-1)}function xo({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ji(r)?r.map(Fi):Fi(r),a={done:!1,value:t[0]},o=go(yo(n&&n.length===t.length?n:vo(t),e),t,{ease:Array.isArray(i)?i:bo(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var So=e=>e!==null;function Co(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(So),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var wo={decay:mo,inertia:mo,tween:xo,keyframes:xo,spring:uo};function To(e){typeof e.type==`string`&&(e.type=wo[e.type])}var Eo=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Do=e=>e/100,Oo=class extends Eo{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==U.now()&&this.tick(U.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;To(e);let{type:t=xo,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||xo;s!==xo&&typeof o[0]!=`number`&&(this.mixKeyframes=li(Do,Ya(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=$a(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=ni(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==mo&&(b.value=Co(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return fi(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+fi(e)}get time(){return fi(this.currentTime)}set time(e){e=B(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return po(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(U.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=fi(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Xa,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(U.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function ko(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Ao=e=>e*180/Math.PI,jo=e=>No(Ao(Math.atan2(e[1],e[0]))),Mo={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:jo,rotateZ:jo,skewX:e=>Ao(Math.atan(e[1])),skewY:e=>Ao(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},No=e=>(e%=360,e<0&&(e+=360),e),Po=jo,Fo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Io=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Lo={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fo,scaleY:Io,scale:e=>(Fo(e)+Io(e))/2,rotateX:e=>No(Ao(Math.atan2(e[6],e[5]))),rotateY:e=>No(Ao(Math.atan2(-e[2],e[0]))),rotateZ:Po,rotate:Po,skewX:e=>Ao(Math.atan(e[4])),skewY:e=>Ao(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ro(e){return+!!e.includes(`scale`)}function zo(e,t){if(!e||e===`none`)return Ro(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Lo,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Mo,i=t}if(!i)return Ro(t);let a=r[t],o=i[1].split(`,`).map(Vo);return typeof a==`function`?a(o):o[a]}var Bo=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return zo(n,t)};function Vo(e){return parseFloat(e.trim())}var Ho=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Uo=new Set([...Ho,`pathRotation`]),Wo=e=>e===Xi||e===W,Go=new Set([`x`,`y`,`z`]),Ko=Ho.filter(e=>!Go.has(e));function qo(e){let t=[];return Ko.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var Jo={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>zo(t,`x`),y:(e,{transform:t})=>zo(t,`y`)};Jo.translateX=Jo.x,Jo.translateY=Jo.y;var Yo=new Set,Xo=!1,Zo=!1,Qo=!1;function $o(){if(Zo){let e=Array.from(Yo).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=qo(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Zo=!1,Xo=!1,Yo.forEach(e=>e.complete(Qo)),Yo.clear()}function es(){Yo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zo=!0)})}function ts(){Qo=!0,es(),$o(),Qo=!1}var ns=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Yo.add(this),Xo||(Xo=!0,V.read(es),V.resolveKeyframes($o))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}ko(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Yo.delete(this)}cancel(){this.state===`scheduled`&&(Yo.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},rs=e=>e.startsWith(`--`);function is(e,t,n){rs(t)?e.style.setProperty(t,n):e.style[t]=n}var as={};function os(e,t){let n=si(e);return()=>as[t]??n()}var ss=os(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),cs=os(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),ls=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,us={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:ls([0,.65,.55,1]),circOut:ls([.55,0,1,.45]),backIn:ls([.31,.01,.66,-.59]),backOut:ls([.33,1.53,.69,.99])};function ds(e,t){if(e)return typeof e==`function`?cs()?Za(e,t):`ease-out`:Mi(e)?ls(e):Array.isArray(e)?e.map(e=>ds(e,t)||us.easeOut):us[e]}function fs(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=ds(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function ps(e){return typeof e==`function`&&`applyToOptions`in e}function ms({type:e,...t}){return ps(e)&&cs()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var hs=class extends Eo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=ms(e);this.animation=fs(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Co(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),is(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return fi(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+fi(e)}get time(){return fi(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=B(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&ss()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ci):r(this)}},gs={anticipate:wi,backInOut:Ci,circInOut:Di};function _s(e){return e in gs}function vs(e){typeof e.ease==`string`&&_s(e.ease)&&(e.ease=gs[e.ease])}var ys=10,bs=class extends hs{constructor(e){vs(e),To(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Oo({...a,autoplay:!1}),s=Math.max(ys,U.now()-this.startTime),c=ni(0,ys,s-ys),l=o.sample(s).value,{name:u}=this.options;i&&u&&is(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},xs=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Ma.test(e)||e===`0`)&&!e.startsWith(`url(`));function Ss(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Cs(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=xs(i,t),s=xs(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Ss(e)||(n===`spring`||ps(n))&&r}function ws(e){e.duration=0,e.type=`keyframes`}var Ts=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),Es=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ds(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Es.test(e[t]))return!0;return!1}var Os=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ks=si(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function As(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return ks()&&n&&(Ts.has(n)||Os.has(n)&&Ds(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var js=40,Ms=class extends Eo{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=U.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||ns;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=U.now();let u=!0;Cs(e,i,a,o)||(u=!1,(ri.instantAnimations||!s)&&l?.(Co(e,n,t)),e[0]=e[e.length-1],ws(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>js?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&As(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new bs({...d,element:p})}catch{m=new Oo(d)}else m=new Oo(d);m.finished.then(()=>{this.notifyFinished()}).catch(ci),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ts()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Ns(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Ps=30,Fs=e=>!isNaN(parseFloat(e)),Is={current:void 0},Ls=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=U.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=U.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Fs(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new di);let n=this.events[e].add(t);return e===`change`?()=>{n(),V.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Is.current&&Is.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=U.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ps)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Ps);return pi(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Rs(e,t){return new Ls(e,t)}function zs(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Bs(e,t){let n=e?.[t]??e?.default??e;return n===e?n:zs(n,e)}var Vs={type:`spring`,stiffness:500,damping:25,restSpeed:10},Hs=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Us={type:`keyframes`,duration:.8},Ws={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Gs=(e,{keyframes:t})=>t.length>2?Us:Uo.has(e)?e.startsWith(`scale`)?Hs(t[1]):Vs:Ws,Ks=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function qs(e){for(let t in e)if(!Ks.has(t))return!0;return!1}var Js=(e,t,n,r={},i,a)=>o=>{let s=Bs(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=B(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};qs(s)||Object.assign(u,Gs(e,u)),u.duration&&=B(u.duration),u.repeatDelay&&=B(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ws(u),u.delay===0&&(d=!0)),(ri.instantAnimations||ri.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,ws(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Co(u.keyframes,s);if(e!==void 0){V.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Oo(u):new Ms(u)},Ys=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Xs(e){let t=Ys.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Zs(e,t,n=1){`${e}`;let[r,i]=Xs(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ii(e)?parseFloat(e):e}return qi(i)?Zs(i,t,n+1):i}function Qs(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function $s(e,t,n,r){if(typeof t==`function`){let[i,a]=Qs(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Qs(r);t=t(n===void 0?e.custom:n,i,a)}return t}function ec(e,t,n){let r=e.getProps();return $s(r,t,n===void 0?r.custom:n,e)}var tc=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Ho]),nc=e=>Array.isArray(e);function rc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Rs(n))}function ic(e){return nc(e)?e[e.length-1]||0:e}function ac(e,t){let{transitionEnd:n={},transition:r={},...i}=ec(e,t)||{};i={...i,...n};for(let t in i)rc(e,t,ic(i[t]))}var J=e=>!!(e&&e.getVelocity);function oc(e){return!!(J(e)&&e.add)}function sc(e,t){let n=e.getValue(`willChange`);if(oc(n))return n.add(t);if(!n&&ri.WillChange){let n=new ri.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function cc(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var lc=`data-`+cc(`framerAppearId`);function uc(e){return e.props[lc]}var dc=typeof window<`u`;function fc({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?zs(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&fc(f,t))continue;let o={delay:n,...Bs(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){V.update(()=>r.set(i));continue}let p=!1;if(dc&&window.MotionHandoffAnimation){let n=uc(e);if(n){let e=window.MotionHandoffAnimation(n,t,V);e!==null&&(o.startTime=e,p=!0)}}sc(e,t);let m=l??e.shouldReduceMotion;r.start(Js(t,r,i,m&&tc.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>V.update(()=>{o&&ac(e,o)});d.length?Promise.all(d).then(t):t()}return d}function mc(e,t,n={}){let r=ec(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(pc(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return hc(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function hc(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(mc(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Ns(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function gc(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>mc(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=mc(e,t,n);else{let i=typeof t==`function`?ec(e,t,n.custom):t;r=Promise.all(pc(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var _c={test:e=>e===`auto`,parse:e=>e},vc=e=>t=>t.test(e),yc=[Xi,W,fa,da,ma,pa,_c],bc=e=>yc.find(vc(e));function xc(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||oi(e)}var Sc=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Cc(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ea)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Sc.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var wc=/\b([a-z-]*)\(.*?\)/gu,Tc={...Ma,getAnimatableNone:e=>{let t=e.match(wc);return t?t.map(Cc).join(` `):e}},Ec={...Ma,getAnimatableNone:e=>{let t=Ma.parse(e);return Ma.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Dc={...Xi,transform:Math.round},Oc={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,rotate:da,pathRotation:da,rotateX:da,rotateY:da,rotateZ:da,scale:Qi,scaleX:Qi,scaleY:Qi,scaleZ:Qi,skew:da,skewX:da,skewY:da,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:Zi,originX:ha,originY:ha,originZ:W,zIndex:Dc,fillOpacity:Zi,strokeOpacity:Zi,numOctaves:Dc},kc={...Oc,color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:Tc,WebkitFilter:Tc,mask:Ec,WebkitMask:Ec},Ac=e=>kc[e],jc=new Set([Tc,Ec]);function Mc(e,t){let n=Ac(e);return jc.has(n)||(n=Ma),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Nc=new Set([`auto`,`none`,`0`]);function Pc(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Nc.has(t)&&Ta(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Mc(n,i)}var Fc=class extends ns{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),qi(r))){let i=Zs(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!tc.has(n)||e.length!==2)return;let[r,i]=e,a=bc(r),o=bc(i);if(Yi(r)!==Yi(i)&&Jo[n]){this.needsMeasurement=!0;return}if(a!==o){if(Wo(a)&&Wo(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Jo[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||xc(e[t]))&&n.push(t);n.length&&Pc(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=Jo[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},Ic=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function Lc(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Rc=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function zc(e){return ai(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Bc,cancel:Vc}=zi(queueMicrotask,!1),Hc={x:!1,y:!1};function Uc(){return Hc.x||Hc.y}function Wc(e){return e===`x`||e===`y`?Hc[e]?null:(Hc[e]=!0,()=>{Hc[e]=!1}):Hc.x||Hc.y?null:(Hc.x=Hc.y=!0,()=>{Hc.x=Hc.y=!1})}function Gc(e,t){let n=Lc(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Kc(e){return!(e.pointerType===`touch`||Uc())}function qc(e,t,n={}){let[r,i,a]=Gc(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Kc(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Jc=(e,t)=>t?e===t||Jc(e,t.parentElement):!1,Yc=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Xc=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Zc(e){return Xc.has(e.tagName)||e.isContentEditable===!0}var Qc=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function $c(e){return Qc.has(e.tagName)||e.isContentEditable===!0}var el=new WeakSet;function tl(e){return t=>{t.key===`Enter`&&e(t)}}function nl(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var rl=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=tl(()=>{if(el.has(n))return;nl(n,`down`);let e=tl(()=>{nl(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>nl(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function il(e){return Yc(e)&&!Uc()}var al=new WeakSet;function ol(e,t,n={}){let[r,i,a]=Gc(e,n),o=e=>{let r=e.currentTarget;if(!il(e)||al.has(e))return;el.add(r),n.stopPropagation&&al.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),el.has(r)&&el.delete(r),il(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Jc(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),zc(e)&&(e.addEventListener(`focus`,e=>rl(e,i)),!Zc(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function sl(e){return ai(e)&&`ownerSVGElement`in e}var cl=new WeakMap,ll,ul=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:sl(r)&&`getBBox`in r?r.getBBox()[t]:r[n],dl=ul(`inline`,`width`,`offsetWidth`),fl=ul(`block`,`height`,`offsetHeight`);function pl({target:e,borderBoxSize:t}){cl.get(e)?.forEach(n=>{n(e,{get width(){return dl(e,t)},get height(){return fl(e,t)}})})}function ml(e){e.forEach(pl)}function hl(){typeof ResizeObserver>`u`||(ll=new ResizeObserver(ml))}function gl(e,t){ll||hl();let n=Lc(e);return n.forEach(e=>{let n=cl.get(e);n||(n=new Set,cl.set(e,n)),n.add(t),ll?.observe(e)}),()=>{n.forEach(e=>{let n=cl.get(e);n?.delete(t),n?.size||ll?.unobserve(e)})}}var _l=new Set,vl;function yl(){vl=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};_l.forEach(t=>t(e))},window.addEventListener(`resize`,vl)}function bl(e){return _l.add(e),vl||yl(),()=>{_l.delete(e),!_l.size&&typeof vl==`function`&&(window.removeEventListener(`resize`,vl),vl=void 0)}}function xl(e,t){return typeof e==`function`?bl(e):gl(e,t)}var Sl={value:null,addProjectionMetrics:null};function Cl(e){return sl(e)&&e.tagName===`svg`}var wl=[...yc,G,Ma],Tl=e=>wl.find(vc(e)),El=()=>({translate:0,scale:1,origin:0,originPoint:0}),Dl=()=>({x:El(),y:El()}),Ol=()=>({min:0,max:0}),Y=()=>({x:Ol(),y:Ol()}),kl=new WeakMap;function Al(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function jl(e){return typeof e==`string`||Array.isArray(e)}var Ml=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Nl=[`initial`,...Ml];function Pl(e){return Al(e.animate)||Nl.some(t=>jl(e[t]))}function Fl(e){return!!(Pl(e)||e.variants)}function Il(e,t,n){for(let r in t){let i=t[r],a=n[r];if(J(i))e.addValue(r,i);else if(J(a))e.addValue(r,Rs(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Rs(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Ll={current:null},Rl={current:!1},zl=typeof window<`u`;function Bl(){if(Rl.current=!0,zl){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Ll.current=e.matches;e.addEventListener(`change`,t),t()}else Ll.current=!1}}var Vl=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Hl={};function Ul(e){Hl=e}function Wl(){return Hl}var Gl=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ns,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=U.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,V.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Pl(t),this.isVariantNode=Fl(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&J(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,kl.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Rl.current||Bl(),this.shouldReduceMotion=Ll.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Bi(this.notifyUpdate),Bi(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Ts.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new hs({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:B(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Uo.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&V.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Hl){let t=Hl[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Vl.length;t++){let n=Vl[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Il(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Rs(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ii(n)||oi(n))?n=parseFloat(n):!Tl(n)&&Ma.test(t)&&(n=Mc(e,t)),this.setBaseTarget(e,J(n)?n.get():n)),J(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=$s(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!J(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new di),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Bc.render(this.render)}},Kl=class extends Gl{constructor(){super(...arguments),this.KeyframeResolver=Fc}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;J(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},ql=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Jl({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Yl({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xl(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zl(e){return e===void 0||e===1}function Ql({scale:e,scaleX:t,scaleY:n}){return!Zl(e)||!Zl(t)||!Zl(n)}function $l(e){return Ql(e)||eu(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function eu(e){return tu(e.x)||tu(e.y)}function tu(e){return e&&e!==`0%`}function nu(e,t,n){return n+t*(e-n)}function ru(e,t,n,r,i){return i!==void 0&&(e=nu(e,i,r)),nu(e,n,r)+t}function iu(e,t=0,n=1,r,i){e.min=ru(e.min,t,n,r,i),e.max=ru(e.max,t,n,r,i)}function au(e,{x:t,y:n}){iu(e.x,t.translate,t.scale,t.originPoint),iu(e.y,n.translate,n.scale,n.originPoint)}var ou=.999999999999,su=1.0000000000001;function cu(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(lu(e.x,-a.scroll.offset.x),lu(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,au(e,o)),r&&$l(a.latestValues)&&fu(e,a.latestValues,a.layout?.layoutBox))}t.x<su&&t.x>ou&&(t.x=1),t.y<su&&t.y>ou&&(t.y=1)}function lu(e,t){e.min+=t,e.max+=t}function uu(e,t,n,r,i=.5){iu(e,t,n,K(e.min,e.max,i),r)}function du(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function fu(e,t,n){let r=n??e;uu(e.x,du(t.x,r.x),t.scaleX,t.scale,t.originX),uu(e.y,du(t.y,r.y),t.scaleY,t.scale,t.originY)}function pu(e,t){return Jl(Xl(e.getBoundingClientRect(),t))}function mu(e,t,n){let r=pu(e,n),{scroll:i}=t;return i&&(lu(r.x,i.offset.x),lu(r.y,i.offset.y)),r}var hu={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},gu=Ho.length;function _u(e,t,n){let r=``,i=!0;for(let a=0;a<gu;a++){let o=Ho[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Rc(s,Oc[o]);if(!c){i=!1;let t=hu[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${Rc(a,Oc.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function vu(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Uo.has(e)){o=!0;continue}if(Gi(e)){i[e]=n;continue}{let t=Rc(n,Oc[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=_u(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function yu(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function bu(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var xu={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(W.test(e))e=parseFloat(e);else return e}return`${bu(e,t.target.x)}% ${bu(e,t.target.y)}%`}},Su={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Ma.parse(e);if(i.length>5)return r;let a=Ma.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=K(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Cu={borderRadius:{...xu,applyTo:[...Ic]},borderTopLeftRadius:xu,borderTopRightRadius:xu,borderBottomLeftRadius:xu,borderBottomRightRadius:xu,boxShadow:Su};function wu(e,{layout:t,layoutId:n}){return Uo.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Cu[e]||e===`opacity`)}function Tu(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(J(r[t])||i&&J(i[t])||wu(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Eu(e){return window.getComputedStyle(e)}var Du=class extends Kl{constructor(){super(...arguments),this.type=`html`,this.renderInstance=yu}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Uo.has(t))return this.projection?.isProjecting?Ro(t):Bo(e,t);{let n=Eu(e),r=(Gi(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return pu(e,t)}build(e,t,n){vu(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Tu(e,t,n)}},Ou={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ku={offset:`strokeDashoffset`,array:`strokeDasharray`};function Au(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Ou:ku;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var ju=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Mu(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(vu(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of ju)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Au(d,i,a,o,!1)}var Nu=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),Pu=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Fu(e,t,n,r){yu(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Nu.has(n)?n:cc(n),t.attrs[n])}function Iu(e,t,n){let r=Tu(e,t,n);for(let n in e)if(J(e[n])||J(t[n])){let t=Ho.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Lu=class extends Kl{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Uo.has(t)){let e=Ac(t);return e&&e.default||0}if(ju.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Nu.has(t)?t:cc(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Iu(e,t,n)}build(e,t,n){Mu(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Fu(e,t,n,r)}mount(e){this.isSVGTag=Pu(e.tagName),super.mount(e)}},Ru=Nl.length;function zu(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&zu(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Ru;n++){let r=Nl[n],i=e.props[r];(jl(i)||i===!1)&&(t[r]=i)}return t}function Bu(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Vu=[...Ml].reverse(),Hu=Ml.length;function Uu(e){return t=>Promise.all(t.map(({animation:t,options:n})=>gc(e,t,n)))}function Wu(e){let t=Uu(e),n=qu(),r=!0,i=!1,a=t=>(n,r)=>{let i=ec(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=zu(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<Hu;t++){let p=Vu[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=jl(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Al(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=Gu(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=nc(t)&&nc(n)?!Bu(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=ec(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Ns(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=ec(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=qu(),i=!0}}}function Gu(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Bu(t,e):!1}function Ku(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qu(){return{animate:Ku(!0),whileInView:Ku(),whileHover:Ku(),whileTap:Ku(),whileDrag:Ku(),whileFocus:Ku(),exit:Ku()}}function Ju(e,t){e.min=t.min,e.max=t.max}function Yu(e,t){Ju(e.x,t.x),Ju(e.y,t.y)}function Xu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Zu=.9999,Qu=1.0001,$u=-.01,ed=.01;function X(e){return e.max-e.min}function td(e,t,n){return Math.abs(e-t)<=n}function nd(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=X(n)/X(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Zu&&e.scale<=Qu||isNaN(e.scale))&&(e.scale=1),(e.translate>=$u&&e.translate<=ed||isNaN(e.translate))&&(e.translate=0)}function rd(e,t,n,r){nd(e.x,t.x,n.x,r?r.originX:void 0),nd(e.y,t.y,n.y,r?r.originY:void 0)}function id(e,t,n,r=0){e.min=(r?K(n.min,n.max,r):n.min)+t.min,e.max=e.min+X(t)}function ad(e,t,n,r){id(e.x,t.x,n.x,r?.x),id(e.y,t.y,n.y,r?.y)}function od(e,t,n,r=0){let i=r?K(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+X(t)}function sd(e,t,n,r){od(e.x,t.x,n.x,r?.x),od(e.y,t.y,n.y,r?.y)}function cd(e,t,n,r,i){return e-=t,e=nu(e,1/n,r),i!==void 0&&(e=nu(e,1/i,r)),e}function ld(e,t=0,n=1,r=.5,i,a=e,o=e){if(fa.test(t)&&(t=parseFloat(t),t=K(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=K(a.min,a.max,r);e===a&&(s-=t),e.min=cd(e.min,t,n,s,i),e.max=cd(e.max,t,n,s,i)}function ud(e,t,[n,r,i],a,o){ld(e,t[n],t[r],t[i],t.scale,a,o)}var dd=[`x`,`scaleX`,`originX`],fd=[`y`,`scaleY`,`originY`];function pd(e,t,n,r){ud(e.x,t,dd,n?n.x:void 0,r?r.x:void 0),ud(e.y,t,fd,n?n.y:void 0,r?r.y:void 0)}function md(e){return e.translate===0&&e.scale===1}function hd(e){return md(e.x)&&md(e.y)}function gd(e,t){return e.min===t.min&&e.max===t.max}function _d(e,t){return gd(e.x,t.x)&&gd(e.y,t.y)}function vd(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yd(e,t){return vd(e.x,t.x)&&vd(e.y,t.y)}function bd(e){return X(e.x)/X(e.y)}function xd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Sd(e){return[e(`x`),e(`y`)]}function Cd(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var wd=Ic.length,Td=e=>typeof e==`string`?parseFloat(e):e,Ed=e=>typeof e==`number`||W.test(e);function Dd(e,t,n,r,i,a){i?(e.opacity=K(0,n.opacity??1,kd(r)),e.opacityExit=K(t.opacity??1,0,Ad(r))):a&&(e.opacity=K(t.opacity??1,n.opacity??1,r));for(let i=0;i<wd;i++){let a=Ic[i],o=Od(t,a),s=Od(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Ed(o)===Ed(s)?(e[a]=Math.max(K(Td(o),Td(s),r),0),(fa.test(s)||fa.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=K(t.rotate||0,n.rotate||0,r))}function Od(e,t){return e[t]===void 0?e.borderRadius:e[t]}var kd=jd(0,.5,Ei),Ad=jd(.5,.95,ci);function jd(e,t,n){return r=>r<e?0:r>t?1:n(ui(e,t,r))}function Md(e,t,n){let r=J(e)?e:Rs(e);return r.start(Js(``,r,t,n)),r.animation}function Nd(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Pd=(e,t)=>e.depth-t.depth,Fd=class{constructor(){this.children=[],this.isDirty=!1}add(e){ei(this.children,e),this.isDirty=!0}remove(e){ti(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Pd),this.isDirty=!1,this.children.forEach(e)}};function Id(e,t){let n=U.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Bi(r),e(a-t))};return V.setup(r,!0),()=>Bi(r)}function Ld(e){return J(e)?e.get():e}var Rd=class{constructor(){this.members=[]}add(e){ei(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(ti(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(ti(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},zd={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Bd={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Vd=[``,`X`,`Y`,`Z`],Hd=1e3,Ud=0;function Wd(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Gd(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=uc(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,V,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Gd(r)}function Kd({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Ud++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Sl.value&&(Bd.nodes=Bd.calculatedTargetDeltas=Bd.calculatedProjections=0),this.nodes.forEach(Yd),this.nodes.forEach(af),this.nodes.forEach(of),this.nodes.forEach(Xd),Sl.addProjectionMetrics&&Sl.addProjectionMetrics(Bd)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Fd)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new di),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=sl(t)&&!Cl(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;V.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Id(i,250),zd.hasAnimatedSinceResize&&(zd.hasAnimatedSinceResize=!1,this.nodes.forEach(rf)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||pf,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!yd(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Bs(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||rf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Bi(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(sf),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Gd(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach($d),this.nodes.forEach(Qd);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ef);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tf),this.nodes.forEach(nf),this.nodes.forEach(qd),this.nodes.forEach(Jd)):this.nodes.forEach(ef),this.clearAllSnapshots();let e=U.now();H.delta=ni(0,1e3/60,e-H.timestamp),H.timestamp=e,H.isProcessing=!0,Vi.update.process(H),Vi.preRender.process(H),Vi.render.process(H),H.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Zd),this.sharedNodes.forEach(cf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!X(this.snapshot.measuredBox.x)&&!X(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Y(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!hd(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||$l(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),_f(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Y();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(yf))){let{scroll:e}=this.root;e&&(lu(t.x,e.offset.x),lu(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Y();if(Yu(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Yu(t,e),lu(t.x,i.offset.x),lu(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Y();Yu(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(lu(r.x,-n.scroll.offset.x),lu(r.y,-n.scroll.offset.y)),$l(n.latestValues)&&fu(r,n.latestValues,n.layout?.layoutBox)}return $l(this.latestValues)&&fu(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Y();Yu(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!$l(n.latestValues))continue;let r;n.instance&&(Ql(n.latestValues)&&n.updateSnapshot(),r=Y(),Yu(r,n.measurePageBox())),pd(t,n.latestValues,n.snapshot?.layoutBox,r)}return $l(this.latestValues)&&pd(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==H.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=H.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ad(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Yu(this.target,this.layout.layoutBox),au(this.target,this.targetDelta)):Yu(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Sl.value&&Bd.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Ql(this.parent.latestValues)||eu(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),sd(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Yu(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===H.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Yu(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;cu(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Y());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Xu(this.prevProjectionDelta.x,this.projectionDelta.x),Xu(this.prevProjectionDelta.y,this.projectionDelta.y)),rd(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!xd(this.projectionDelta.x,this.prevProjectionDelta.x)||!xd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Sl.value&&Bd.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Dl(),this.projectionDelta=Dl(),this.projectionDeltaWithTransform=Dl()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Dl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Y(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(ff));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=K(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=K(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(lf(o.x,e.x,n),lf(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sd(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),df(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&_d(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Y(),Yu(f,this.relativeTarget)),c&&(this.animationValues=a,Dd(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Bi(this.pendingAnimation),void 0),this.pendingAnimation=V.update(()=>{zd.hasAnimatedSinceResize=!0,this.motionValue||=Rs(0),this.motionValue.jump(0,!1),this.currentAnimation=Md(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Hd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&vf(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Y();let t=X(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=X(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Yu(t,n),fu(t,i),rd(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Rd),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Wd(`z`,e,r,this.animationValues);for(let t=0;t<Vd.length;t++)Wd(`rotate${Vd[t]}`,e,r,this.animationValues),Wd(`skew${Vd[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Ld(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Ld(t?.pointerEvents)||``),this.hasProjected&&!$l(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Cd(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Cu){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Cu[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Ld(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Qd),this.root.sharedNodes.clear()}}}function qd(e){e.updateLayout()}function Jd(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Sd(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=X(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Ju(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else vf(i,t.layoutBox,n)&&Sd(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=X(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Dl();rd(o,n,t.layoutBox);let s=Dl();a?rd(s,e.applyTransform(r,!0),t.measuredBox):rd(s,n,t.layoutBox);let c=!hd(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Y();sd(s,t.layoutBox,i.layoutBox,o);let c=Y();sd(c,n,a.layoutBox,o),yd(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Yd(e){Sl.value&&Bd.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Xd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Zd(e){e.clearSnapshot()}function Qd(e){e.clearMeasurements()}function $d(e){e.isLayoutDirty=!0,e.updateLayout()}function ef(e){e.isLayoutDirty=!1}function tf(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function nf(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function rf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function af(e){e.resolveTargetDelta()}function of(e){e.calcProjection()}function sf(e){e.resetSkewAndRotation()}function cf(e){e.removeLeadSnapshot()}function lf(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uf(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function df(e,t,n,r){uf(e.x,t.x,n.x,r),uf(e.y,t.y,n.y,r)}function ff(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var pf={duration:.45,ease:[.4,0,.1,1]},mf=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),hf=mf(`applewebkit/`)&&!mf(`chrome/`)?Math.round:ci;function gf(e){e.min=hf(e.min),e.max=hf(e.max)}function _f(e){gf(e.x),gf(e.y)}function vf(e,t,n){return e===`position`||e===`preserve-aspect`&&!td(bd(t),bd(n),.2)}function yf(e){return e!==e.root&&e.scroll?.wasRoot}var bf=Kd({attachResizeListener:(e,t)=>Nd(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),xf={current:void 0},Sf=Kd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xf.current){let e=new bf({});e.mount(window),e.setOptions({layoutScroll:!0}),xf.current=e}return xf.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Cf=(0,p.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function wf(e=!0){let t=(0,p.useContext)($r);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,p.useId)();(0,p.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,p.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Tf=(0,p.createContext)({strict:!1}),Ef={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Df=!1;function Of(){if(Df)return;let e={};for(let t in Ef)e[t]={isEnabled:e=>Ef[t].some(t=>!!e[t])};Ul(e),Df=!0}function kf(){return Of(),Wl()}function Af(e){let t=kf();for(let n in e)t[n]={...t[n],...e[n]};Ul(t)}var jf=(0,p.createContext)({});function Mf(e,t){if(Pl(e)){let{initial:t,animate:n}=e;return{initial:t===!1||jl(t)?t:void 0,animate:jl(n)?n:void 0}}return e.inherit===!1?{}:t}function Nf(e){let{initial:t,animate:n}=Mf(e,(0,p.useContext)(jf));return(0,p.useMemo)(()=>({initial:t,animate:n}),[Pf(t),Pf(n)])}function Pf(e){return Array.isArray(e)?e.join(` `):e}var Ff=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function If(e,t,n){for(let r in t)!J(t[r])&&!wu(r,n)&&(e[r]=t[r])}function Lf({transformTemplate:e},t){return(0,p.useMemo)(()=>{let n=Ff();return vu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Rf(e,t){let n=e.style||{},r={};return If(r,n,e),Object.assign(r,Lf(e,t)),r}function zf(e,t){let n={},r=Rf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Bf=()=>({...Ff(),attrs:{}});function Vf(e,t,n,r){let i=(0,p.useMemo)(()=>{let n=Bf();return Mu(n,t,Pu(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};If(t,e.style,e),i.style={...t,...i.style}}return i}var Hf=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Uf(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Hf.has(e)}function Wf(e,t){return e.startsWith(`on`)?!Uf(e):t?.(e)??!Uf(e)}function Gf(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(J(e[a])||(Wf(a,r)||n===!0&&Uf(a)||!t&&!Uf(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Kf=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function qf(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Kf.indexOf(e)>-1||/[A-Z]/u.test(e))}function Jf(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??qf(e)?Vf:zf)(t,r,i,e),l=Gf(t,typeof e==`string`,a,s),u=e===p.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,p.useMemo)(()=>J(d)?d.get():d,[d]);return(0,p.createElement)(e,{...u,children:f})}function Yf({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Xf(n,r,i,e),renderState:t()}}function Xf(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Ld(a[e]);let{initial:o,animate:s}=e,c=Pl(e),l=Fl(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Al(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=$s(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Zf=e=>(t,n)=>{let r=(0,p.useContext)(jf),i=(0,p.useContext)($r),a=()=>Yf(e,t,r,i);return n?a():Zr(a)},Qf=Zf({scrapeMotionValuesFromProps:Tu,createRenderState:Ff}),$f=Zf({scrapeMotionValuesFromProps:Iu,createRenderState:Bf}),ep=Symbol.for(`motionComponentSymbol`);function tp(e,t,n){let r=(0,p.useRef)(n);(0,p.useInsertionEffect)(()=>{r.current=n});let i=(0,p.useRef)(null);return(0,p.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var np=(0,p.createContext)({});function rp(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function ip(e,t,n,r,i,a){let{visualElement:o}=(0,p.useContext)(jf),s=(0,p.useContext)(Tf),c=(0,p.useContext)($r),l=(0,p.useContext)(Cf),u=l.reducedMotion,d=l.skipAnimations,f=(0,p.useRef)(null),m=(0,p.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=(0,p.useContext)(np);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&ap(f.current,n,i,g);let _=(0,p.useRef)(!1);(0,p.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[lc],y=(0,p.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Qr(()=>{m.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,p.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function ap(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:op(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&rp(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function op(e){if(e)return e.options.allowProjection===!1?op(e.parent):e.projection}function sp(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Af(r);let a=n?n===`svg`:qf(e),o=a?$f:Qf;function s(n,s){let c,l={...(0,p.useContext)(Cf),...n,layoutId:cp(n)},{isStatic:u,isValidProp:d}=l,f=Nf(n),h=o(n,u);if(!u&&typeof window<`u`){lp(l,r);let t=up(l);c=t.MeasureLayout,f.visualElement=ip(e,h,l,i,t.ProjectionNode,a)}return(0,m.jsxs)(jf.Provider,{value:f,children:[c&&f.visualElement?(0,m.jsx)(c,{visualElement:f.visualElement,...l}):null,Jf(e,n,tp(h,f.visualElement,s),h,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,p.forwardRef)(s);return c[ep]=e,c}function cp({layoutId:e}){let t=(0,p.useContext)(Xr).id;return t&&e!==void 0?t+`-`+e:e}function lp(e,t){(0,p.useContext)(Tf).strict}function up(e){let{drag:t,layout:n}=kf();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function dp(e,t){if(typeof Proxy>`u`)return sp;let n=new Map,r=(n,r)=>sp(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,sp(a,void 0,e,t)),n.get(a))})}var fp=(e,t)=>t.isSVG??qf(e)?new Lu(t):new Du(t,{allowProjection:e!==p.Fragment}),pp=class extends ql{constructor(e){super(e),e.animationState||=Wu(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Al(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},mp=0,hp={animation:{Feature:pp},exit:{Feature:class extends ql{constructor(){super(...arguments),this.id=mp++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=ec(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function gp(e){return{point:{x:e.pageX,y:e.pageY}}}var _p=e=>t=>Yc(t)&&e(t,gp(t));function vp(e,t,n,r){return Nd(e,t,_p(n),r)}var yp=({current:e})=>e?e.ownerDocument.defaultView:null,bp=(e,t)=>Math.abs(e-t);function xp(e,t){let n=bp(e.x,t.x),r=bp(e.y,t.y);return Math.sqrt(n**2+r**2)}var Sp=new Set([`auto`,`scroll`]),Cp=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=wp(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Ep(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=xp(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=H;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=wp(t,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Ep(e.type===`pointercancel`?this.lastMoveEventInfo:wp(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Yc(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=wp(gp(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=H;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Ep(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=li(vp(this.contextWindow,`pointermove`,this.handlePointerMove,d),vp(this.contextWindow,`pointerup`,this.handlePointerUp,d),vp(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Sp.has(e.overflowX)||Sp.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),V.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Bi(this.updatePoint)}};function wp(e,t){return t?{point:t(e.point)}:e}function Tp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ep({point:e},t){return{point:e,delta:Tp(e,Op(t)),offset:Tp(e,Dp(t)),velocity:kp(t,.1)}}function Dp(e){return e[0]}function Op(e){return e[e.length-1]}function kp(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Op(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>B(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>B(t)*2&&(r=e[1]);let a=fi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ap(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?K(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function jp(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Mp(e,{top:t,left:n,bottom:r,right:i}){return{x:jp(e.x,n,i),y:jp(e.y,t,r)}}function Np(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Pp(e,t){return{x:Np(e.x,t.x),y:Np(e.y,t.y)}}function Fp(e,t){let n=.5,r=X(e),i=X(t);return i>r?n=ui(t.min,t.max-r,e.min):r>i&&(n=ui(e.min,e.max-i,t.min)),ni(0,1,n)}function Ip(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Lp=.35;function Rp(e=Lp){return e===!1?e=0:e===!0&&(e=Lp),{x:zp(e,`left`,`right`),y:zp(e,`top`,`bottom`)}}function zp(e,t,n){return{min:Bp(e,t),max:Bp(e,n)}}function Bp(e,t){return typeof e==`number`?e:e[t]||0}var Vp=new WeakMap,Hp=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Y(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(gp(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Wc(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Sd(e=>{let t=this.getAxisMotionValue(e).get()||0;if(fa.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=X(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&V.update(()=>i(e,t),!1,!0),sc(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Kp(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&V.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Cp(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:yp(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&V.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Gp(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Ap(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&rp(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Mp(n.layoutBox,e):!1,this.elastic=Rp(t),r!==this.constraints&&!rp(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Sd(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Ip(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!rp(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=mu(n,r.root,this.visualElement.getTransformPagePoint()),a=Pp(r.layout.layoutBox,i);if(t){let e=t(Yl(a));this.hasMutatedConstraints=!!e,e&&(a=Jl(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Sd(o=>{if(!Gp(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return sc(this.visualElement,e),n.start(Js(e,n,0,t,this.visualElement,!1))}stopAnimation(){Sd(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Sd(t=>{let{drag:n}=this.getProps();if(!Gp(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-K(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!rp(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Sd(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Fp({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Sd(t=>{if(!Gp(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(K(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Vp.set(this.visualElement,this);let e=this.visualElement.current,t=vp(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&$c(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();rp(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Wp(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),V.read(r);let o=Nd(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Sd(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Lp,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Up(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Wp(e,t,n){let r=xl(e,Up(n)),i=xl(t,Up(n));return()=>{r(),i()}}function Gp(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Kp(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var qp=class extends ql{constructor(e){super(e),this.removeGroupControls=ci,this.removeListeners=ci,this.controls=new Hp(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ci}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Jp=e=>(t,n)=>{e&&V.update(()=>e(t,n),!1,!0)},Yp=class extends ql{constructor(){super(...arguments),this.removePointerDownListener=ci}onPointerDown(e){this.session=new Cp(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yp(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Jp(e),onStart:Jp(t),onMove:Jp(n),onEnd:(e,t)=>{delete this.session,r&&V.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=vp(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Xp=!1,Zp=class extends p.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Xp&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),zd.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Xp=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||V.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Bc.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Xp=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Qp(e){let[t,n]=wf(),r=(0,p.useContext)(Xr);return(0,m.jsx)(Zp,{...e,layoutGroup:r,switchLayoutGroup:(0,p.useContext)(np),isPresent:t,safeToRemove:n})}var $p={pan:{Feature:Yp},drag:{Feature:qp,ProjectionNode:Sf,MeasureLayout:Qp}};function em(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&V.postRender(()=>i(t,gp(t)))}var tm=class extends ql{mount(){let{current:e}=this.node;e&&(this.unmount=qc(e,(e,t)=>(em(this.node,t,`Start`),e=>em(this.node,e,`End`))))}unmount(){}},nm=class extends ql{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=li(Nd(this.node.current,`focus`,()=>this.onFocus()),Nd(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function rm(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&V.postRender(()=>i(t,gp(t)))}var im=class extends ql{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=ol(e,(e,t)=>(rm(this.node,t,`Start`),(e,{success:t})=>rm(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},am=new WeakMap,om=new WeakMap,sm=e=>{let t=am.get(e.target);t&&t(e)},cm=e=>{e.forEach(sm)};function lm({root:e,...t}){let n=e||document;om.has(n)||om.set(n,{});let r=om.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(cm,{root:e,...t})),r[i]}function um(e,t,n){let r=lm(t);return am.set(e,n),r.observe(e),()=>{am.delete(e),r.unobserve(e)}}var dm={some:0,all:1},fm=class extends ql{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:dm[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=um(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(pm(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function pm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var mm={inView:{Feature:fm},tap:{Feature:im},focus:{Feature:nm},hover:{Feature:tm}},hm={layout:{ProjectionNode:Sf,MeasureLayout:Qp}},gm=dp({...hp,...mm,...$p,...hm},fp),_m=({className:e,strokeWidth:t=4})=>(0,m.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`44`,height:`44`,viewBox:`0 0 44 44`,stroke:`currentColor`,role:`img`,"aria-label":`Spinner`,className:a(`size-full`,e),children:(0,m.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[(0,m.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,m.jsx)(`animate`,{attributeName:`r`,begin:`0s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,m.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`0s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]}),(0,m.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,m.jsx)(`animate`,{attributeName:`r`,begin:`-0.9s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,m.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`-0.9s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]})]})}),vm=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>(0,m.jsx)(m.Fragment,{children:t&&n?(0,m.jsxs)(`div`,{className:`relative size-full`,children:[(0,m.jsx)(`div`,{className:a(`absolute top-0 left-0 flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,m.jsx)(_m,{className:`size-10 max-h-full max-w-full`})}),e]}):t?(0,m.jsx)(`div`,{className:a(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,m.jsx)(_m,{className:`size-10 max-h-full max-w-full`})}):e??(0,m.jsx)(m.Fragment,{})}),ym=Ar(`flex-none shrink-0`,{variants:{size:{xs:`size-2`,sm:`size-3`,md:`size-4`,lg:`size-5`,xl:`size-6`,"icon-sm":`size-3`,"icon-md":`size-4`,"icon-lg":`size-5`,"icon-xl":`size-6`,custom:``}},defaultVariants:{size:`md`}}),bm=Ar(`relative inline-flex cursor-pointer items-center justify-center font-medium ring-0 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{xs:`min-h-7 px-3 text-xs max-md:py-1`,sm:`min-h-7 px-3 text-xs max-md:py-1`,md:`min-h-8 px-6 text-sm max-md:py-2`,lg:`min-h-10 px-8 text-lg max-md:py-3`,xl:`min-h-11 px-10 text-xl max-md:py-4`,"icon-sm":`p-1.5`,"icon-md":`p-1.5`,"icon-lg":`p-1.5`,"icon-xl":`p-3`,custom:``},color:{primary:`hover-primary-500/20 text-primary ring-primary-500/20 *:text-text-light`,secondary:`hover-secondary-500/20 text-secondary ring-secondary-500/20 *:text-text-light`,neutral:`text-neutral ring-neutral-500/5 *:text-text-light`,card:`hover-card-500/20 text-card ring-card-500/20 *:text-text-light`,light:`hover-white-500/20 text-white ring-white/20 *:text-text-light`,dark:`text-neutral-800 ring-text-light/50 *:text-text-light`,text:`text-text ring-text/20 *:text-text-opposite`,current:`hover-current-500/10 text-current ring-current/10 *:text-text-light`,"text-inverse":`text-text-opposite ring-text-opposite/20 *:text-text`,error:`hover-error-500/20 text-error ring-error/20 *:text-text-light`,success:`hover-success-500/20 text-success ring-success/20 *:text-text-light`,custom:``},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,"4xl":`rounded-[3rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[4rem]`,"5xl":`rounded-[4rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[5rem]`,full:`rounded-full`},variant:{default:[`bg-current`,`hover:bg-current/90`,`hover:ring-5`,`aria-selected:ring-5`],outline:[`rounded-2xl border-[1.3px] border-current bg-current/0 *:text-current!`,`hover:bg-current/20 focus-visible:bg-current/20`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],none:`border-none bg-current/0 text-inherit hover:bg-current/0`,link:`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent hover:underline`,"invisible-link":`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/10 aria-[current]:bg-current/5`,fade:[`rounded-lg border-none bg-current/10 ring-current/5 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],input:[`text-text`,`w-full select-text resize-none rounded-2xl text-base shadow-none outline-none supports-[corner-shape:squircle]:rounded-4xl`,`transition-shadow duration-100 md:text-sm`,`ring-0`,`disabled:opacity-50`,`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-neutral-100 dark:ring-neutral-700`,`hover:ring-3`,`aria-selected:ring-4`,`focus-visible:ring-3`,`disabled:ring-0`,`focus-visible:outline-none`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`]},textAlign:{left:`justify-start text-left`,center:`justify-center text-center`,right:`justify-end text-right`},isFullWidth:{true:`w-full`,false:``}},defaultVariants:{variant:`default`,size:`md`,color:`text`,roundedSize:`md`,textAlign:`center`,isFullWidth:!1}}),xm=({variant:e,size:t,color:n,children:r,Icon:i,IconRight:o,iconClassName:s,isLoading:c=!1,isActive:l,isSelected:u,isFullWidth:d,roundedSize:f,textAlign:p,disabled:h,label:g,className:_,type:v=`button`,"aria-describedby":y,"aria-expanded":b,"aria-haspopup":x,"aria-pressed":S,...C})=>{let w=e===`link`||e===`invisible-link`,T=!r&&(i||o),E={"aria-label":T?g??void 0:void 0,"aria-labelledby":void 0,"aria-describedby":y,"aria-expanded":b,"aria-haspopup":x,"aria-pressed":l===void 0?S:l,"aria-busy":c,"aria-current":l?`page`:void 0,"aria-disabled":h||c,"aria-selected":u},D=t===`icon-sm`||t===`icon-md`||t===`icon-lg`||t===`icon-xl`;return(0,m.jsxs)(`button`,{disabled:c||h,role:w?`link`:`button`,type:v,className:bm({variant:e,size:t,color:n,isFullWidth:d,roundedSize:f,textAlign:p??(o?`left`:`center`),className:_}),...E,...C,children:[i&&!c&&(0,m.jsx)(i,{className:ym({size:t,className:a(!D&&`mr-3`,s)}),"aria-hidden":`true`}),(0,m.jsx)(`div`,{className:a(`flex items-center justify-center transition-[width] duration-300`,c&&t===`sm`&&`w-3`,c&&t===`md`&&`w-4`,c&&t===`lg`&&`w-6`,c&&t===`xl`&&`w-8`),children:(0,m.jsx)(vm,{className:ym({size:t,className:a(!D&&`mr-3`,s)}),isLoading:c,"aria-hidden":`true`,"data-testid":`loader`})}),r&&(0,m.jsx)(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&T&&(0,m.jsx)(`span`,{className:`sr-only`,children:g}),o&&(0,m.jsx)(o,{className:ym({size:t,className:a(!D&&`ml-3`,s)}),"aria-hidden":`true`})]})},Sm=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:o=0,...s})=>(0,m.jsx)(`div`,{"aria-hidden":i?t:void 0,tabIndex:i?0:void 0,role:i?`button`:`none`,className:a(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-[grid-template-rows] duration-700 ease-in-out`,t!==void 0&&!t&&`grid-rows-[1fr] overflow-x-auto`,r&&`hover:grid-rows-[1fr] hover:overflow-x-auto`,i&&`focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto`,n),...s,children:(0,m.jsx)(`div`,{style:{minHeight:`${o}px`},className:a(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})}),Cm=new Set,wm=null,Tm=()=>{wm=null;let e=[...Cm];Cm.clear();for(let t of e)t()},Em=e=>typeof requestAnimationFrame>`u`?()=>{}:(Cm.add(e),wm??=requestAnimationFrame(Tm),()=>{Cm.delete(e),Cm.size===0&&wm!==null&&(cancelAnimationFrame(wm),wm=null)}),Dm=e=>e?.getAttribute(`aria-selected`)===`true`,Om=[`aria-selected`,`data-active`,`data-indicator`],km=150,Am=(e,{selector:t=Dm,isHoverable:n=!1,orientation:r=`horizontal`}={selector:Dm,isHoverable:!1,orientation:`horizontal`})=>{let[i,a]=(0,p.useState)(null),o=(0,p.useRef)(null),s=(0,p.useRef)(null),c=(0,p.useRef)(null),l=(0,p.useRef)(null),u=(0,p.useRef)(t);u.current=t;let d=(0,p.useRef)(r);d.current=r;let f=e.current.length,m=(0,p.useCallback)(()=>{let t=o.current??e.current.find(u.current)??null;o.current&&s.current&&(clearTimeout(s.current),s.current=null);let n=d.current===`vertical`;if(!t){if(c.current?.opacity===0)return;let e=n?{top:c.current?.top??0,height:c.current?.height??0,opacity:0}:{left:c.current?.left??0,width:c.current?.width??0,opacity:0};a(e),c.current=e;return}if(n){let e=t.offsetTop,n=t.offsetHeight,r=c.current;if(r?.top===e&&r.height===n&&r.opacity===1)return;let i={top:e,height:n,opacity:1};a(i),c.current=i;return}let r=t.offsetLeft,i=t.offsetWidth,l=c.current;if(l?.left===r&&l.width===i&&l.opacity===1)return;let f={left:r,width:i,opacity:1};a(f),c.current=f},[e]),h=(0,p.useCallback)(()=>{l.current===null&&(l.current=Em(()=>{l.current=null,m()}))},[m]);return(0,p.useEffect)(()=>{h(),window.addEventListener(`resize`,h,{passive:!0}),window.addEventListener(`DOMContentLoaded`,h);let t=e.current.filter(Boolean),r=new MutationObserver(h),i=new ResizeObserver(h),a=e=>{s.current&&=(clearTimeout(s.current),null),o.current=e.currentTarget,h()},c=()=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=null,h()},km)};for(let e of t)r.observe(e,{attributes:!0,attributeFilter:Om}),i.observe(e),n&&(e.addEventListener(`mouseenter`,a,{passive:!0}),e.addEventListener(`mouseleave`,c,{passive:!0}));return()=>{if(l.current?.(),l.current=null,s.current&&=(clearTimeout(s.current),null),window.removeEventListener(`resize`,h),window.removeEventListener(`DOMContentLoaded`,h),r.disconnect(),i.disconnect(),n)for(let e of t)e.removeEventListener(`mouseenter`,a),e.removeEventListener(`mouseleave`,c)}},[e,f,n,r,h]),{choiceIndicatorPosition:i,calculatePosition:m,scheduleMeasurement:h,orientation:r}},jm=Ar(`flex flex-col text-text backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-md`,md:`rounded-md [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-lg`,lg:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,xl:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,"2xl":`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,"3xl":`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"4xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,full:`rounded-full`},transparency:{none:`bg-card`,xs:`bg-card/95`,sm:`bg-card/90`,md:`bg-card/70`,lg:`bg-card/40`,xl:`bg-card/20`,full:``},padding:{none:`p-0`,sm:`px-3 py-2`,md:`px-4 py-3`,lg:`px-6 py-4`,xl:`px-8 py-6`,"2xl":`px-10 py-8`},separator:{without:``,x:`divide-x divide-dashed divide-text/20`,y:`divide-y divide-dashed divide-text/20`,both:`divide-x divide-y divide-dashed divide-text/20`},border:{none:``,with:`border-[1.3px]`},borderColor:{primary:`border-primary`,secondary:`border-secondary`,neutral:`border-neutral/20`,card:`border-card`,text:`border-text`,error:`border-error`,warning:`border-warning`,success:`border-success`},background:{none:`backdrop-blur-none`,hoverable:`bg-opacity-5! backdrop-blur-0 hover:bg-opacity-10! hover:backdrop-blur focus:bg-opacity-10! focus:backdrop-blur aria-selected:bg-opacity-15! aria-selected:backdrop-blur`,with:``},gap:{none:`gap-0`,sm:`gap-1`,md:`gap-3`,lg:`gap-5`,xl:`gap-8`,"2xl":`gap-10`}},defaultVariants:{roundedSize:`lg`,border:`none`,borderColor:`text`,transparency:`md`,padding:`none`,separator:`without`,gap:`none`},compoundVariants:[{background:`none`,class:`bg-transparent`}]}),Mm=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:o,border:s,borderColor:c,background:l,gap:u,...d})=>(0,m.jsx)(`div`,{className:a(jm({roundedSize:t,transparency:r,padding:n,separator:i,border:typeof s==`boolean`?s?`with`:`none`:void 0,background:l,borderColor:c,gap:u}),o),...d,children:e}),Nm=(e,t)=>{let n=(0,f.c)(21),r;n[0]!==t||n[1]!==e?(r=()=>{if(t!==void 0){let n=typeof t==`function`?t():t;if(typeof window>`u`)return n;let r=localStorage?.getItem(e);if(r)try{return JSON.parse(r)}catch(e){console.error(e)}return n}},n[0]=t,n[1]=e,n[2]=r):r=n[2];let[i,a]=(0,p.useState)(r),o;n[3]!==t||n[4]!==e||n[5]!==i?(o=()=>{let n=localStorage?.getItem(e);if(n&&n!==`undefined`&&i===void 0)try{a(JSON.parse(n))}catch(e){console.error(e)}else t!==void 0&&i===void 0&&a(t)},n[3]=t,n[4]=e,n[5]=i,n[6]=o):o=n[6];let s;n[7]!==e||n[8]!==i?(s=[e,i],n[7]=e,n[8]=i,n[9]=s):s=n[9],(0,p.useEffect)(o,s);let c;n[10]===e?c=n[11]:(c=t=>{a(n=>{let r=typeof t==`function`?t(n):t;return r===void 0?n:(localStorage?.setItem(e,JSON.stringify(r)),r)})},n[10]=e,n[11]=c);let l=c,u;n[12]===e?u=n[13]:(u=()=>{let t=localStorage?.getItem(e);t&&a(JSON.parse(t))},n[12]=e,n[13]=u);let d=u,m;n[14]===e?m=n[15]:(m=()=>{localStorage?.removeItem(e),a(void 0)},n[14]=e,n[15]=m);let h=m,g;return n[16]!==h||n[17]!==d||n[18]!==l||n[19]!==i?(g=[i,l,d,h],n[16]=h,n[17]=d,n[18]=l,n[19]=i,n[20]=g):g=n[20],g},Pm=Object.defineProperty,Fm=(e,t)=>Pm(e,`name`,{value:t,configurable:!0});function Im(e,[t,n]){return Math.min(n,Math.max(t,e))}Fm(Im,`clamp`);var Lm=Object.defineProperty,Rm=(e,t)=>Lm(e,`name`,{value:t,configurable:!0}),zm=p.createContext(void 0);function Bm(e){let t=p.useContext(zm);return e||t||`ltr`}Rm(Bm,`useDirection`);var Vm=Object.defineProperty,Hm=(e,t)=>Vm(e,`name`,{value:t,configurable:!0}),Um=0,Wm=null;function Gm(e){return Km(),e.children}Hm(Gm,`FocusGuards`);function Km(){p.useEffect(()=>{Wm||={start:qm(),end:qm()};let{start:e,end:t}=Wm;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Um++,()=>{Um===1&&(Wm?.start.remove(),Wm?.end.remove(),Wm=null),Um=Math.max(0,Um-1)}},[])}Hm(Km,`useFocusGuards`);function qm(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}Hm(qm,`createFocusGuard`);var Jm=Object.defineProperty,Z=(e,t)=>Jm(e,`name`,{value:t,configurable:!0}),Ym=`focusScope.autoFocusOnMount`,Xm=`focusScope.autoFocusOnUnmount`,Zm={bubbles:!1,cancelable:!0},Qm=p.forwardRef(Z(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=p.useState(null),l=Fn(i),u=Fn(a),d=p.useRef(null),f=F(t,c),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:ah(d.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||ah(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ah(s)};Z(e,`handleFocusIn`),Z(t,`handleFocusOut`),Z(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){oh.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ym,Zm);s.addEventListener(Ym,l),s.dispatchEvent(t),t.defaultPrevented||($m(lh(th(s)),{select:!0}),document.activeElement===e&&ah(s))}return()=>{s.removeEventListener(Ym,l),setTimeout(()=>{let t=new CustomEvent(Xm,Zm);s.addEventListener(Xm,u),s.dispatchEvent(t),t.defaultPrevented||ah(e??document.body,{select:!0}),s.removeEventListener(Xm,u),oh.remove(h)},0)}}},[s,l,u,h]);let g=p.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=eh(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&ah(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&ah(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,m.jsx)(L.div,{tabIndex:-1,...o,ref:f,onKeyDown:g})},`FocusScope`));function $m(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(ah(r,{select:t}),document.activeElement!==n)return}Z($m,`focusFirst`);function eh(e){let t=th(e);return[nh(t,e),nh(t.reverse(),e)]}Z(eh,`getTabbableEdges`);function th(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Z(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Z(th,`getTabbableCandidates`);function nh(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):rh(r,{upTo:t})))return r}Z(nh,`findVisible`);function rh(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}Z(rh,`isHidden`);function ih(e){return e instanceof HTMLInputElement&&`select`in e}Z(ih,`isSelectableInput`);function ah(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ih(e)&&t&&e.select()}}Z(ah,`focus`);var oh=sh();function sh(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ch(e,t),e.unshift(t)},remove(t){e=ch(e,t),e[0]?.resume()}}}Z(sh,`createFocusScopesStack`);function ch(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Z(ch,`arrayRemove`);function lh(e){return e.filter(e=>e.tagName!==`A`)}Z(lh,`removeLinks`);var uh=Object.defineProperty,dh=(e,t)=>uh(e,`name`,{value:t,configurable:!0}),fh=p.useId||(()=>void 0),ph=0;function mh(e){let[t,n]=p.useState(fh());return z(()=>{e||n(e=>e??String(ph++))},[e]),e||(t?`radix-${t}`:``)}dh(mh,`useId`);var hh=[`top`,`right`,`bottom`,`left`],gh=[`start`,`end`],_h=hh.reduce((e,t)=>e.concat(t,t+`-`+gh[0],t+`-`+gh[1]),[]),vh=Math.min,yh=Math.max,bh=Math.round,xh=Math.floor,Sh=e=>({x:e,y:e}),Ch={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function wh(e,t,n){return yh(e,vh(t,n))}function Th(e,t){return typeof e==`function`?e(t):e}function Eh(e){return e.split(`-`)[0]}function Dh(e){return e.split(`-`)[1]}function Oh(e){return e===`x`?`y`:`x`}function kh(e){return e===`y`?`height`:`width`}function Ah(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function jh(e){return Oh(Ah(e))}function Mh(e,t,n){n===void 0&&(n=!1);let r=Dh(e),i=jh(e),a=kh(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Vh(o)),[o,Vh(o)]}function Nh(e){let t=Vh(e);return[Ph(e),t,Ph(t)]}function Ph(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Fh=[`left`,`right`],Ih=[`right`,`left`],Lh=[`top`,`bottom`],Rh=[`bottom`,`top`];function zh(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ih:Fh:t?Fh:Ih;case`left`:case`right`:return t?Lh:Rh;default:return[]}}function Bh(e,t,n,r){let i=Dh(e),a=zh(Eh(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ph)))),a}function Vh(e){let t=Eh(e);return Ch[t]+e.slice(t.length)}function Hh(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Uh(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Hh(e)}function Wh(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Gh(e,t,n){let{reference:r,floating:i}=e,a=Ah(t),o=jh(t),s=kh(o),c=Eh(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Dh(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Kh(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Th(t,e),p=Uh(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Wh(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Wh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var qh=50,Jh=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Kh},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Gh(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<qh&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Gh(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Yh=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Th(e,t)||{};if(l==null)return{};let d=Uh(u),f={x:n,y:r},p=jh(i),m=kh(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=vh(d[_],T),D=vh(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=wh(E,k,O),j=!c.arrow&&Dh(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,ee=j?k<E?k-E:k-O:0;return{[p]:f[p]+ee,data:{[p]:A,centerOffset:k-A-ee,...j&&{alignmentOffset:ee}},reset:j}}});function Xh(e,t,n){return(e?[...n.filter(t=>Dh(t)===e),...n.filter(t=>Dh(t)!==e)]:n.filter(e=>Eh(e)===e)).filter(n=>!e||Dh(n)===e||(t?Ph(n)!==n:!1))}var Zh=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=_h,autoAlignment:u=!0,...d}=Th(e,t),f=c!==void 0||l===_h?Xh(c||null,u,l):l,p=r.autoPlacement?.index||0,m=f[p];if(m==null)return{};if(i!==m)return{reset:{placement:f[0]}};let h=await a.detectOverflow(t,d),g=Mh(m,n,await(a.isRTL==null?void 0:a.isRTL(o.floating))),_=[h[Eh(m)],h[g[0]],h[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:m,overflows:_}],y=f[p+1];if(y)return{data:{index:p+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Dh(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,Dh(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:p+1,overflows:v},reset:{placement:x}}}}},Qh=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Th(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Eh(r),_=Ah(o),v=Eh(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Vh(o)]:Nh(o)),x=p!==`none`;!d&&x&&b.push(...Bh(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Mh(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ah(t)||T.every(e=>Ah(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ah(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function $h(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eg(e){return hh.some(t=>e[t]>=0)}var tg=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Th(e,t);switch(i){case`referenceHidden`:{let e=$h(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:eg(e)}}}case`escaped`:{let e=$h(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:eg(e)}}}default:return{}}}}};function ng(e){let t=vh(...e.map(e=>e.left)),n=vh(...e.map(e=>e.top)),r=yh(...e.map(e=>e.right)),i=yh(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function rg(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>Wh(ng(e)))}var ig=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=Th(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=rg(u),f=Wh(ng(u)),p=Uh(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(Ah(n)===`y`){let e=d[0],t=d[d.length-1],r=Eh(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return Wh({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=Eh(n)===`left`,t=yh(...d.map(e=>e.right)),r=vh(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return Wh({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},ag=new Set([`left`,`top`]);async function og(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Eh(n),s=Dh(n),c=Ah(n)===`y`,l=ag.has(o)?-1:1,u=a&&c?-1:1,d=Th(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var sg=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await og(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},cg=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Th(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ah(i),p=Oh(f),m=u[p],h=u[f],g=(e,t)=>wh(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},lg=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Th(e,t),u={x:n,y:r},d=Ah(i),f=Oh(d),p=u[f],m=u[d],h=Th(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ag.has(Eh(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ug=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Th(e,t),c=await i.detectOverflow(t,s),l=Eh(n),u=Dh(n),d=Ah(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=vh(p-c[m],g),y=vh(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*yh(c.left,c.right):S=p-2*yh(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function dg(){return typeof window<`u`}function fg(e){return mg(e)?(e.nodeName||``).toLowerCase():`#document`}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pg(e){return((mg(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function mg(e){return dg()?e instanceof Node||e instanceof Q(e).Node:!1}function hg(e){return dg()?e instanceof Element||e instanceof Q(e).Element:!1}function gg(e){return dg()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function _g(e){return!dg()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function vg(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=kg(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function yg(e){return/^(table|td|th)$/.test(fg(e))}function bg(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xg=/transform|translate|scale|rotate|perspective|filter/,Sg=/paint|layout|strict|content/,Cg=e=>!!e&&e!==`none`,wg;function Tg(e){let t=hg(e)?kg(e):e;return Cg(t.transform)||Cg(t.translate)||Cg(t.scale)||Cg(t.rotate)||Cg(t.perspective)||!Dg()&&(Cg(t.backdropFilter)||Cg(t.filter))||xg.test(t.willChange||``)||Sg.test(t.contain||``)}function Eg(e){let t=jg(e);for(;gg(t)&&!Og(t);){if(Tg(t))return t;if(bg(t))return null;t=jg(t)}return null}function Dg(){return wg??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),wg}function Og(e){return/^(html|body|#document)$/.test(fg(e))}function kg(e){return Q(e).getComputedStyle(e)}function Ag(e){return hg(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jg(e){if(fg(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_g(e)&&e.host||pg(e);return _g(t)?t.host:t}function Mg(e){let t=jg(e);return Og(t)?(e.ownerDocument||e).body:gg(t)&&vg(t)?t:Mg(t)}function Ng(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Mg(e),i=r===e.ownerDocument?.body,a=Q(r);if(i){let e=Pg(a);return t.concat(a,a.visualViewport||[],vg(r)?r:[],e&&n?Ng(e):[])}return t.concat(r,Ng(r,[],n))}function Pg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fg(e){let t=kg(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=gg(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bh(n)!==a||bh(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ig(e){return hg(e)?e:e.contextElement}function Lg(e){let t=Ig(e);if(!gg(t))return Sh(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Fg(t),o=(a?bh(n.width):n.width)/r,s=(a?bh(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Rg=Sh(0);function zg(e){let t=Q(e);return!Dg()||!t.visualViewport?Rg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bg(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Q(e)}function Vg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ig(e),o=Sh(1);t&&(r?hg(r)&&(o=Lg(r)):o=Lg(e));let s=Bg(a,n,r)?zg(a):Sh(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Q(a),t=hg(r)?Q(r):r,n=e,i=Pg(n);for(;i&&t!==n;){let e=Lg(i),t=i.getBoundingClientRect(),r=kg(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Q(i),i=Pg(n)}}return Wh({width:u,height:d,x:c,y:l})}function Hg(e,t){let n=Ag(e).scrollLeft;return t?t.left+n:Vg(pg(e)).left+n}function Ug(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Hg(e,n),y:n.top+t.scrollTop}}function Wg(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=pg(r),s=t?bg(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Sh(1),u=Sh(0),d=gg(r);if((d||!a)&&((fg(r)!==`body`||vg(o))&&(c=Ag(r)),d)){let e=Vg(r);l=Lg(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ug(o,c):Sh(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Gg(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Kg(e){let t=Ag(e),n=e.ownerDocument.body,r=yh(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=yh(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Hg(e),o=-t.scrollTop;return kg(n).direction===`rtl`&&(a+=yh(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var qg=25;function Jg(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Q(e),a=pg(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Dg()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Hg(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=qg&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Yg(e,t){let n=Vg(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Lg(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Xg(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Jg(e,n,t);else if(t===`document`)r=Kg(pg(e));else if(hg(t))r=Yg(t,n);else{let n=zg(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Wh(r)}function Zg(e,t){let n=t.get(e);if(n)return n;let r=Ng(e,[],!1).filter(e=>hg(e)&&fg(e)!==`body`),i=null,a=kg(e).position===`fixed`,o=a?jg(e):e;for(;hg(o)&&!Og(o);){let e=kg(o),t=Tg(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=jg(o)}return t.set(e,r),r}function Qg(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?bg(t)?[]:Zg(t,this._c):[].concat(n),r],o=Xg(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Xg(t,a[e],i);s=yh(n.top,s),c=vh(n.right,c),l=vh(n.bottom,l),u=yh(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function $g(e){let{width:t,height:n}=Fg(e);return{width:t,height:n}}function e_(e,t,n){let r=gg(t),i=pg(t),a=n===`fixed`,o=Vg(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Sh(0);if((r||!a)&&((fg(t)!==`body`||vg(i))&&(s=Ag(t)),r)){let e=Vg(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Hg(i));let l=i&&!r&&!a?Ug(i,s):Sh(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function t_(e){return kg(e).position===`static`}function n_(e,t){if(!gg(e)||kg(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return pg(e)===n&&(n=n.ownerDocument.body),n}function r_(e,t){let n=Q(e);if(bg(e))return n;if(!gg(e)){let t=jg(e);for(;t&&!Og(t);){if(hg(t)&&!t_(t))return t;t=jg(t)}return n}let r=n_(e,t);for(;r&&yg(r)&&t_(r);)r=n_(r,t);return r&&Og(r)&&t_(r)&&!Tg(r)?n:r||Eg(e)||n}var i_=async function(e){let t=this.getOffsetParent||r_,n=this.getDimensions,r=await n(e.floating);return{reference:e_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function a_(e){return kg(e).direction===`rtl`}var o_={convertOffsetParentRelativeRectToViewportRelativeRect:Wg,getDocumentElement:pg,getClippingRect:Qg,getOffsetParent:r_,getElementRects:i_,getClientRects:Gg,getDimensions:$g,getScale:Lg,isElement:hg,isRTL:a_};function s_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function c_(e,t,n){let r=null,i,a=pg(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=xh(d),h=xh(a.clientWidth-(u+f)),g=xh(a.clientHeight-(d+p)),_=xh(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:yh(0,vh(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!s_(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Q(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function l_(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ig(e),u=i||a?[...l?Ng(l):[],...t?Ng(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?c_(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Vg(e):null;c&&g();function g(){let t=Vg(e);h&&!s_(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var u_=sg,d_=Zh,f_=cg,p_=Qh,m_=ug,h_=tg,g_=Yh,__=ig,v_=lg,y_=(e,t,n)=>{let r=new Map,i=n??{},a={...o_,...i.platform,_c:r};return Jh(e,t,{...i,platform:a})},b_=typeof document<`u`?p.useLayoutEffect:function(){};function x_(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,i;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(!x_(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!x_(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function S_(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function C_(e,t){let n=S_(e);return Math.round(t*n)/n}function w_(e){let t=p.useRef(e);return b_(()=>{t.current=e}),t}function T_(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(r);x_(f,r)||m(r);let[h,g]=p.useState(null),[_,v]=p.useState(null),y=p.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=p.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=p.useRef(null),w=p.useRef(null),T=p.useRef(u),E=c!=null,D=w_(c),O=w_(i),k=w_(l),A=p.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),y_(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!x_(T.current,t)&&(T.current=t,Rt.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);b_(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=p.useRef(!1);b_(()=>(j.current=!0,()=>{j.current=!1}),[]),b_(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let ee=p.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),M=p.useMemo(()=>({reference:x,floating:S}),[x,S]),te=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=C_(M.floating,u.x),r=C_(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...S_(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:A,refs:ee,elements:M,floatingStyles:te}),[u,A,ee,M,te])}var E_=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:g_({element:r.current,padding:i}).fn(n):r?g_({element:r,padding:i}).fn(n):{}}}},D_=(e,t)=>{let n=u_(e);return{name:n.name,fn:n.fn,options:[e,t]}},O_=(e,t)=>{let n=f_(e);return{name:n.name,fn:n.fn,options:[e,t]}},k_=(e,t)=>({fn:v_(e).fn,options:[e,t]}),A_=(e,t)=>{let n=p_(e);return{name:n.name,fn:n.fn,options:[e,t]}},j_=(e,t)=>{let n=m_(e);return{name:n.name,fn:n.fn,options:[e,t]}},M_=(e,t)=>{let n=h_(e);return{name:n.name,fn:n.fn,options:[e,t]}},N_=(e,t)=>{let n=E_(e);return{name:n.name,fn:n.fn,options:[e,t]}},P_=Object.defineProperty,F_=(e,t)=>P_(e,`name`,{value:t,configurable:!0});function I_(e){let[t,n]=p.useState(void 0);return z(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}F_(I_,`useSize`);var L_=Object.defineProperty,R_=(e,t)=>L_(e,`name`,{value:t,configurable:!0}),z_=`Popper`,[B_,V_]=$t(z_),[H_,U_]=B_(z_),W_=R_(e=>{let{__scopePopper:t,children:n}=e,[r,i]=p.useState(null),[a,o]=p.useState(void 0);return(0,m.jsx)(H_,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),G_=`PopperAnchor`,K_=p.forwardRef(R_(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=U_(G_,n),o=p.useRef(null),s=a.onAnchorChange,c=F(t,p.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=p.useRef(null);p.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&$_(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,m.jsx)(L.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),q_=`PopperContent`,[J_,Y_]=B_(q_),X_=p.forwardRef(R_(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=U_(q_,n),[y,b]=p.useState(null),x=F(t,b),[S,C]=p.useState(null),w=I_(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(Z_),altBoundary:A},{refs:ee,floatingStyles:M,placement:te,isPositioned:ne,middlewareData:re}=T_({strategy:`fixed`,placement:D,whileElementsMounted:R_((...e)=>l_(...e,{animationFrame:h===`always`}),`whileElementsMounted`),elements:{reference:v.anchor},middleware:[D_({mainAxis:i+E,alignmentAxis:o}),c&&O_({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?k_():void 0,...j}),c&&A_({...j}),j_({...j,apply:R_(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&N_({element:S,padding:s}),Q_({arrowWidth:T,arrowHeight:E}),f&&M_({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),ie=v.setPlacementState;z(()=>(ie(te),()=>{ie(void 0)}),[te,ie]);let[ae,oe]=$_(te),se=Fn(g);z(()=>{ne&&se?.()},[ne,se]);let ce=re.arrow?.x,le=re.arrow?.y,ue=re.arrow?.centerOffset!==0,[de,fe]=p.useState();return z(()=>{y&&fe(window.getComputedStyle(y).zIndex)},[y]),(0,m.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:ne?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(` `),...re.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,m.jsx)(J_,{scope:n,placedSide:ae,placedAlign:oe,onArrowChange:C,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,m.jsx)(L.div,{"data-side":ae,"data-align":oe,..._,ref:x,style:{..._.style,animation:ne?_.style?.animation:`none`}})})})},`PopperContent`));function Z_(e){return e!==null}R_(Z_,`isNotNull`);var Q_=R_(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=$_(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function $_(e){let[t,n=`center`]=e.split(`-`);return[t,n]}R_($_,`getSideAndAlignFromPlacement`);var ev=W_,tv=K_,nv=X_,rv=Object.defineProperty,iv=(e,t)=>rv(e,`name`,{value:t,configurable:!0});function av(e){let t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}iv(av,`usePrevious`);var ov=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},sv=new WeakMap,cv=new WeakMap,lv={},uv=0,dv=function(e){return e&&(e.host||dv(e.parentNode))},fv=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=dv(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},pv=function(e,t,n,r){var i=fv(t,Array.isArray(e)?e:[e]);lv[n]||(lv[n]=new WeakMap);var a=lv[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(sv.get(e)||0)+1,l=(a.get(e)||0)+1;sv.set(e,c),a.set(e,l),o.push(e),c===1&&i&&cv.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),uv++,function(){o.forEach(function(e){var t=sv.get(e)-1,i=a.get(e)-1;sv.set(e,t),a.set(e,i),t||(cv.has(e)||e.removeAttribute(r),cv.delete(e)),i||e.removeAttribute(n)}),uv--,uv||(sv=new WeakMap,sv=new WeakMap,cv=new WeakMap,lv={})}},mv=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ov(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),pv(r,i,n,`aria-hidden`)):function(){return null}},hv=function(){return hv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hv.apply(this,arguments)};function gv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function _v(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var vv=`right-scroll-bar-position`,yv=`width-before-scroll-bar`,bv=`with-scroll-bars-hidden`,xv=`--removed-body-scroll-bar-size`;function Sv(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Cv(e,t){var n=(0,p.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var wv=typeof window<`u`?p.useLayoutEffect:p.useEffect,Tv=new WeakMap;function Ev(e,t){var n=Cv(t||null,function(t){return e.forEach(function(e){return Sv(e,t)})});return wv(function(){var t=Tv.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Sv(e,null)}),i.forEach(function(e){r.has(e)||Sv(e,a)})}Tv.set(n,e)},[e]),n}function Dv(e){return e}function Ov(e,t){t===void 0&&(t=Dv);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function kv(e){e===void 0&&(e={});var t=Ov(null);return t.options=hv({async:!0,ssr:!1},e),t}var Av=function(e){var t=e.sideCar,n=gv(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return p.createElement(r,hv({},n))};Av.isSideCarExport=!0;function jv(e,t){return e.useMedium(t),Av}var Mv=kv(),Nv=function(){},Pv=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Nv,onWheelCapture:Nv,onTouchMoveCapture:Nv}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=gv(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Ev([n,t]),w=hv(hv({},x),i);return p.createElement(p.Fragment,null,u&&p.createElement(S,{sideCar:Mv,removeScrollBar:l,shards:d,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?p.cloneElement(p.Children.only(s),hv(hv({},w),{ref:C})):p.createElement(y,hv({},w,{className:c,ref:C}),s))});Pv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Pv.classNames={fullWidth:yv,zeroRight:vv};var Fv=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Iv(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Fv();return t&&e.setAttribute(`nonce`,t),e}function Lv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Rv(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var zv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Iv())&&(Lv(t,n),Rv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bv=function(){var e=zv();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Vv=function(){var e=Bv();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Hv={left:0,top:0,right:0,gap:0},Uv=function(e){return parseInt(e||``,10)||0},Wv=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Uv(n),Uv(r),Uv(i)]},Gv=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Hv;var t=Wv(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])}},Kv=Vv(),qv=`data-scroll-locked`,Jv=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
+ .${bv} {
3
+ overflow: hidden ${r};
4
+ padding-right: ${s}px ${r};
5
+ }
6
+ body[${qv}] {
7
+ overflow: hidden ${r};
8
+ overscroll-behavior: contain;
9
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
10
+ padding-left: ${i}px;
11
+ padding-top: ${a}px;
12
+ padding-right: ${o}px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: ${s}px ${r};
16
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17
+ }
18
+
19
+ .${vv} {
20
+ right: ${s}px ${r};
21
+ }
22
+
23
+ .${yv} {
24
+ margin-right: ${s}px ${r};
25
+ }
26
+
27
+ .${vv} .${vv} {
28
+ right: 0 ${r};
29
+ }
30
+
31
+ .${yv} .${yv} {
32
+ margin-right: 0 ${r};
33
+ }
34
+
35
+ body[${qv}] {
36
+ ${xv}: ${s}px;
37
+ }
38
+ `},Yv=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Xv=function(){p.useEffect(function(){return document.body.setAttribute(qv,(Yv()+1).toString()),function(){var e=Yv()-1;e<=0?document.body.removeAttribute(qv):document.body.setAttribute(qv,e.toString())}},[])},Zv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Xv();var a=p.useMemo(function(){return Gv(i)},[i]);return p.createElement(Kv,{styles:Jv(a,!t,i,n?``:`!important`)})},Qv=!1;if(typeof window<`u`)try{var $v=Object.defineProperty({},"passive",{get:function(){return Qv=!0,!0}});window.addEventListener(`test`,$v,$v),window.removeEventListener(`test`,$v,$v)}catch{Qv=!1}var ey=Qv?{passive:!1}:!1,ty=function(e){return e.tagName===`TEXTAREA`},ny=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ty(e)&&n[t]===`visible`)},ry=function(e){return ny(e,`overflowY`)},iy=function(e){return ny(e,`overflowX`)},ay=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),cy(e,r)){var i=ly(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},oy=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},sy=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},cy=function(e,t){return e===`v`?ry(t):iy(t)},ly=function(e,t){return e===`v`?oy(t):sy(t)},uy=function(e,t){return e===`h`&&t===`rtl`?-1:1},dy=function(e,t,n,r,i){var a=uy(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=ly(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&cy(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},fy=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},py=function(e){return[e.deltaX,e.deltaY]},my=function(e){return e&&`current`in e?e.current:e},hy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gy=function(e){return`
39
+ .block-interactivity-${e} {pointer-events: none;}
40
+ .allow-interactivity-${e} {pointer-events: all;}
41
+ `},_y=0,vy=[];function yy(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),i=p.useState(_y++)[0],a=p.useState(Vv)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=_v([e.lockRef.current],(e.shards||[]).map(my),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=fy(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ay(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ay(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return dy(h,t,e,h===`h`?s:c,!0)},[]),c=p.useCallback(function(e){var n=e;if(!(!vy.length||vy[vy.length-1]!==a)){var r=`deltaY`in n?py(n):fy(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&hy(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(my).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=p.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:by(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=p.useCallback(function(e){n.current=fy(e),r.current=void 0},[]),d=p.useCallback(function(t){l(t.type,py(t),t.target,s(t,e.lockRef.current))},[]),f=p.useCallback(function(t){l(t.type,fy(t),t.target,s(t,e.lockRef.current))},[]);p.useEffect(function(){return vy.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,ey),document.addEventListener(`touchmove`,c,ey),document.addEventListener(`touchstart`,u,ey),function(){vy=vy.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,ey),document.removeEventListener(`touchmove`,c,ey),document.removeEventListener(`touchstart`,u,ey)}},[]);var m=e.removeScrollBar,h=e.inert;return p.createElement(p.Fragment,null,h?p.createElement(a,{styles:gy(i)}):null,m?p.createElement(Zv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function by(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var xy=jv(Mv,yy),Sy=p.forwardRef(function(e,t){return p.createElement(Pv,hv({},e,{ref:t,sideCar:xy}))});Sy.classNames=Pv.classNames;var Cy=Object.defineProperty,$=(e,t)=>Cy(e,`name`,{value:t,configurable:!0}),wy=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Ty=[` `,`Enter`],Ey=`Select`,[Dy,Oy,ky]=yn(Ey),[Ay,jy]=$t(Ey,[ky,V_]),My=V_(),[Ny,Py]=Ay(Ey),[Fy,Iy]=Ay(Ey);function Ly(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:h,form:g,internal_do_not_use_render:_}=e,v=My(t),[y,b]=p.useState(null),[x,S]=p.useState(null),[C,w]=p.useState(!1),T=Bm(l),[E,D]=_r({prop:r,defaultProp:i??!1,onChange:a,caller:Ey}),[O,k]=_r({prop:o,defaultProp:s,onChange:c,caller:Ey}),A=p.useRef(null),j=p.useRef(O);p.useEffect(()=>{let e=g?y?.ownerDocument.getElementById(g):y?.form;if(e instanceof HTMLFormElement){let t=$(()=>k(j.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[g,y,k]);let ee=!y||!!g||!!y.closest(`form`),[M,te]=p.useState(new Set),ne=mh(),re=Array.from(M).map(e=>e.props.value).join(`;`),ie=p.useCallback(e=>{te(t=>new Set(t).add(e))},[]),ae=p.useCallback(e=>{te(t=>{let n=new Set(t);return n.delete(e),n})},[]),oe={required:h,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:ne,value:O,onValueChange:k,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:A,disabled:f,name:u,autoComplete:d,form:g,nativeOptions:M,nativeSelectKey:re,isFormControl:ee};return(0,m.jsx)(ev,{...v,children:(0,m.jsx)(Ny,{scope:t,...oe,children:(0,m.jsx)(Dy.Provider,{scope:t,children:(0,m.jsx)(Fy,{scope:t,onNativeOptionAdd:ie,onNativeOptionRemove:ae,children:Ob(_)?_(oe):n})})})})}$(Ly,`SelectProvider`);var Ry=$(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,m.jsx)(Ly,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,m.jsxs)(m.Fragment,{children:[n,e?(0,m.jsx)(Db,{__scopeSelect:t}):null]})})},`Select`),zy=`SelectTrigger`,By=p.forwardRef($(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=My(n),o=Py(zy,n),s=o.disabled||r,c=F(t,o.onTriggerChange),l=Oy(n),u=p.useRef(`touch`),[d,f,h]=Ab(e=>{let t=l().filter(e=>!e.disabled),n=jb(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),g=$(e=>{s||(o.onOpenChange(!0),h()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,m.jsx)(tv,{asChild:!0,...a,children:(0,m.jsx)(L.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":kb(o.value)?``:void 0,...i,ref:c,onClick:P(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&g(e)}),onPointerDown:P(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:P(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&wy.includes(e.key)&&(g(),e.preventDefault())})})})},`SelectTrigger`)),Vy=`SelectValue`,Hy=p.forwardRef($(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Py(Vy,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=F(t,c.onValueNodeChange);z(()=>{l(u)},[l,u]);let f=kb(c.value);return(0,m.jsx)(L.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,m.jsx)(p.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),Uy=p.forwardRef($(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,m.jsx)(L.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Wy,Gy]=Ay(`SelectPortal`,{forceMount:void 0}),Ky=$(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,m.jsx)(Wy,{scope:e.__scopeSelect,forceMount:n,children:(0,m.jsx)($n,{asChild:!0,...r})})},`SelectPortal`),qy=`SelectContent`,Jy=p.forwardRef($(function(e,t){let n=Gy(qy,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Py(qy,e.__scopeSelect),[o,s]=p.useState();return z(()=>{s(new DocumentFragment)},[]),(0,m.jsx)(rr,{present:r||a.open,children:({present:e})=>e?(0,m.jsx)(eb,{...i,ref:t}):(0,m.jsx)(Yy,{...i,fragment:o})})},`SelectContent`)),Yy=p.forwardRef($(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Rt.createPortal((0,m.jsx)(Zy,{scope:n,children:(0,m.jsx)(Dy.Slot,{scope:n,children:(0,m.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Xy=10,[Zy,Qy]=Ay(qy),$y=rn(`SelectContent.RemoveScroll`),eb=p.forwardRef($(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=Py(qy,n),[x,S]=p.useState(null),[C,w]=p.useState(null),T=F(t,S),[E,D]=p.useState(null),[O,k]=p.useState(null),A=Oy(n),[j,ee]=p.useState(!1),M=p.useRef(!1);p.useEffect(()=>{if(x)return mv(x)},[x]),Km();let te=p.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),ne=p.useCallback(()=>te([E,x]),[te,E,x]);p.useEffect(()=>{j&&ne()},[j,ne]);let{onOpenChange:re,triggerPointerDownPosRef:ie}=b;p.useEffect(()=>{if(x){let e={x:0,y:0},t=$(t=>{e={x:Math.abs(Math.round(t.pageX)-(ie.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ie.current?.y??0))}},`handlePointerMove`),n=$(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(x)||re(!1),document.removeEventListener(`pointermove`,t),ie.current=null},`handlePointerUp`);return ie.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,re,ie]),p.useEffect(()=>{let e=$(()=>re(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[re]);let[ae,oe]=Ab(e=>{let t=A().filter(e=>!e.disabled),n=jb(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),se=p.useCallback((e,t,n)=>{let r=!M.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(M.current=!0))},[b.value]),ce=p.useCallback(()=>x?.focus(),[x]),le=p.useCallback((e,t,n)=>{let r=!M.current&&!n;(b.value!==void 0&&b.value===t||r)&&k(e)},[b.value]),ue=r===`popper`?nb:tb,de=ue===nb?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,m.jsx)(Zy,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:se,selectedItem:E,onItemLeave:ce,itemTextRefCallback:le,focusSelectedItem:ne,selectedItemText:O,position:r,isPositioned:j,searchRef:ae,children:(0,m.jsx)(Sy,{as:$y,allowPinchZoom:!0,children:(0,m.jsx)(Qm,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:P(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,m.jsx)(Hn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,m.jsx)(ue,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...de,onPlaced:()=>ee(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:P(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&oe(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>te(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),tb=p.forwardRef($(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Py(qy,n),o=Qy(qy,n),[s,c]=p.useState(null),[l,u]=p.useState(null),d=F(t,u),f=Oy(n),h=p.useRef(!1),g=p.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=o,x=p.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Xy,d=Im(a,[Xy,Math.max(Xy,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Xy,d=Im(a,[Xy,Math.max(Xy,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Xy*2,u=_.scrollHeight,d=window.getComputedStyle(l),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=p+m+u+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Xy,D=c-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=p+m+k,j=x-A;if(A<=E){let e=o.length>0&&v===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);s.style.height=n+`px`}else{let e=o.length>0&&v===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,p+_.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}s.style.margin=`${Xy}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[f,a.trigger,a.valueNode,s,l,_,v,y,a.dir,r]);z(()=>x(),[x]);let[S,C]=p.useState();z(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);let w=p.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]);return(0,m.jsx)(rb,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:w,children:(0,m.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,m.jsx)(L.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),nb=p.forwardRef($(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Xy,...a}=e,o=My(n);return(0,m.jsx)(nv,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.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)`}})},`SelectPopperPosition`)),[rb,ib]=Ay(qy,{}),ab=`SelectViewport`,ob=p.forwardRef($(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Qy(ab,n),o=ib(ab,n),s=F(t,a.onViewportChange),c=p.useRef(0);return(0,m.jsxs)(m.Fragment,{children:[(0,m.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}),(0,m.jsx)(Dy.Slot,{scope:n,children:(0,m.jsx)(L.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:P(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Xy*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[sb,cb]=Ay(`SelectGroup`),lb=p.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e,i=mh();return(0,m.jsx)(sb,{scope:n,id:i,children:(0,m.jsx)(L.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),ub=`SelectLabel`,db=p.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e,i=cb(ub,n);return(0,m.jsx)(L.div,{id:i.id,...r,ref:t})},`SelectLabel`)),fb=`SelectItem`,[pb,mb]=Ay(fb),hb=p.forwardRef($(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Py(fb,n),c=Qy(fb,n),l=s.value===r,[u,d]=p.useState(a??``),[f,h]=p.useState(!1),g=F(t,Fn(e=>c.itemRefCallback?.(e,r,i))),_=mh(),v=p.useRef(`touch`),y=$(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,m.jsx)(pb,{scope:n,value:r,disabled:i,textId:_,isSelected:l,onItemTextChange:p.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,m.jsx)(Dy.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,m.jsx)(L.div,{role:`option`,"aria-labelledby":_,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:P(o.onFocus,()=>h(!0)),onBlur:P(o.onBlur,()=>h(!1)),onClick:P(o.onClick,()=>{v.current!==`mouse`&&y()}),onPointerUp:P(o.onPointerUp,()=>{v.current===`mouse`&&y()}),onPointerDown:P(o.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:P(o.onPointerMove,e=>{v.current=e.pointerType,i?c.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:P(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Ty.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),gb=`SelectItemText`,_b=p.forwardRef($(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Py(gb,n),s=Qy(gb,n),c=mb(gb,n),l=Iy(gb,n),[u,d]=p.useState(null),f=Fn(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),h=F(t,d,c.onItemTextChange,f),g=u?.textContent,_=p.useMemo(()=>(0,m.jsx)(`option`,{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=l;return z(()=>(v(_),()=>y(_)),[v,y,_]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(L.span,{id:c.textId,...a,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!kb(o.value)?Rt.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),vb=`SelectItemIndicator`,yb=p.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e;return mb(vb,n).isSelected?(0,m.jsx)(L.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),bb=`SelectScrollUpButton`,xb=p.forwardRef($(function(e,t){let n=Qy(bb,e.__scopeSelect),r=ib(bb,e.__scopeSelect),[i,a]=p.useState(!1),o=F(t,r.onScrollButtonChange);return z(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};$(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,m.jsx)(wb,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Sb=`SelectScrollDownButton`,Cb=p.forwardRef($(function(e,t){let n=Qy(Sb,e.__scopeSelect),r=ib(Sb,e.__scopeSelect),[i,a]=p.useState(!1),o=F(t,r.onScrollButtonChange);return z(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};$(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,m.jsx)(wb,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),wb=p.forwardRef($(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Qy(`SelectScrollButton`,n),o=p.useRef(null),s=Oy(n),c=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),z(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,m.jsx)(L.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:P(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:P(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:P(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),Tb=p.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e;return(0,m.jsx)(L.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),Eb=`SelectBubbleInput`,Db=p.forwardRef($(function({__scopeSelect:e,...t},n){let r=Py(Eb,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,h=p.useRef(null),g=F(n,h),_=i??``,v=av(_),y=Array.from(d).some(e=>(e.props.value??``)===``);return p.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(v!==_&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,_),e.dispatchEvent(t)}},[v,_]),(0,m.jsxs)(L.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...wr,...t.style},ref:g,defaultValue:_,children:[kb(i)&&!y?(0,m.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function Ob(e){return typeof e==`function`}$(Ob,`isFunction`);function kb(e){return e===``||e===void 0}$(kb,`shouldShowPlaceholder`);function Ab(e){let t=Fn(e),n=p.useRef(``),r=p.useRef(0),i=p.useCallback(e=>{let i=n.current+e;t(i),$((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=p.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}$(Ab,`useTypeaheadSearch`);function jb(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Mb(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}$(jb,`findNextItem`);function Mb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}$(Mb,`wrapArray`);var Nb=Ry,Pb=lb,Fb=Hy,Ib=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,m.jsxs)(By,{suppressHydrationWarning:!0,className:a(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,m.jsx)(Uy,{asChild:!0,children:(0,m.jsx)(Wr,{className:`size-4 opacity-50`})})]}),Lb=({className:e,...t})=>(0,m.jsx)(xb,{className:a(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,m.jsx)(Ur,{})}),Rb=({className:e,...t})=>(0,m.jsx)(Cb,{className:a(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,m.jsx)(Hr,{})}),zb=({className:e,children:t,position:n=`popper`,...r})=>(0,m.jsx)(Ky,{children:(0,m.jsxs)(Jy,{className:a(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`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`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,m.jsx)(Lb,{}),(0,m.jsx)(ob,{className:a(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,m.jsx)(Rb,{})]})}),Bb=({className:e,...t})=>(0,m.jsx)(db,{className:a(`px-1 py-0.5 font-semibold text-sm`,e),...t}),Vb=({className:e,children:t,...n})=>(0,m.jsxs)(hb,{className:a(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,m.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,m.jsx)(yb,{children:(0,m.jsx)(Vr,{className:`size-4`})})}),(0,m.jsx)(_b,{children:t})]}),Hb=({className:e,...t})=>(0,m.jsx)(Tb,{className:a(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),Ub=Nb;Ub.Group=Pb,Ub.Value=Fb,Ub.Trigger=Ib,Ub.ScrollUpButton=Lb,Ub.ScrollDownButton=Rb,Ub.Content=zb,Ub.Label=Bb,Ub.Item=Vb,Ub.Separator=Hb;var Wb=Ar(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:text-current/80 hover:underline hover:underline-offset-6`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1`,button:`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current px-6 text-center font-medium text-sm text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,"button-outlined":`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current px-6 text-center font-medium text-sm text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/10 aria-[current]:bg-current/5`},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,full:`rounded-full`},color:{primary:`text-primary`,secondary:`text-secondary`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,custom:``},size:{sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`,custom:``},underlined:{default:``,true:`underline`,false:`no-underline`}},compoundVariants:[{variant:`button`,color:`text-inverse`,class:`*:text-text`},{variant:`button-outlined`,color:`text-inverse`,class:`text-text-opposite *:text-text-opposite`},{variant:[`button`,`button-outlined`],size:`sm`,class:`min-h-7 px-3 text-xs max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 text-sm max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 text-lg max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 text-xl max-md:py-4`},{variant:[`button`,`button-outlined`],color:`primary`,class:`ring-primary/20`},{variant:[`button`,`button-outlined`],color:`secondary`,class:`ring-secondary/20`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`light`,class:`ring-white/20`},{variant:[`button`,`button-outlined`],color:`dark`,class:`ring-neutral-800/20`},{variant:[`button`,`button-outlined`],color:`text`,class:`ring-text/20`},{variant:[`button`,`button-outlined`],color:`text-inverse`,class:`ring-text-opposite/20`},{variant:[`button`,`button-outlined`],color:`error`,class:`ring-error/20`},{variant:[`button`,`button-outlined`],color:`success`,class:`ring-success/20`}],defaultVariants:{variant:`default`,roundedSize:`md`,underlined:`default`,size:`custom`}}),Gb=({href:e,isExternalLink:t},n)=>{if(typeof t==`boolean`)return t;if(typeof e!=`string`||e.trim()===``||!/^https?:\/\//.test(e))return!1;if(n)try{let t=new URL(e).hostname,r=new URL(n.startsWith(`http`)?n:`https://${n}`).hostname,i=e=>e.split(`.`).slice(-2).join(`.`);return i(t)!==i(r)}catch{return!0}return!0},Kb=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(Kb):(0,p.isValidElement)(e)?Kb(e.props.children):!1,qb=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:o,className:s,isActive:c,underlined:l,locale:u,size:d,isExternalLink:f,isPageSection:p,href:h,rel:g,target:_,...v}=e,y=t===`button`||t===`button-outlined`,b=d??(y?`md`:`custom`),x=f??Gb(e),S=p??h?.startsWith(`#`)??!1,C=Kb(i),w=x?`noopener noreferrer nofollow`:g,T=x?`_blank`:_??`_self`,E=u&&h&&!x&&!S?Mt(h,u):h,D=E===``?void 0:E;return(0,m.jsxs)(`a`,{...v,href:D,"aria-label":o,rel:w,target:T,"aria-current":c?`page`:void 0,suppressHydrationWarning:!0,className:a(Wb({variant:t,color:n,roundedSize:r,underlined:l,size:b,className:s})),children:[y&&C?(0,m.jsx)(`span`,{children:i}):i,x&&C&&(0,m.jsx)(qr,{className:`ml-2 inline-block size-4`}),S&&(0,m.jsx)(Jr,{className:`ml-2 inline-block size-4`})]})},Jb=e=>{let t=(0,f.c)(3),[n,r]=(0,p.useState)(e),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{r(e??window.document.body)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,p.useEffect)(i,a),n},Yb=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}},Xb=[],Zb=()=>{let e=(0,f.c)(2),t=(0,p.useSyncExternalStore)(Yb.subscribe,Yb.getSnapshot,Qb),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:Yb.addBlockage,removeBlockage:Yb.removeBlockage,isElementScrollBlocked:Yb.isElementScrollBlocked},e[0]=t,e[1]=n),n};function Qb(){return Xb}var $b=e=>{let{disableScroll:t=!1,element:n,key:r=`unnamed_blocker`}=e??{},{isElementScrollBlocked:i,addBlockage:a,removeBlockage:o}=Zb(),s=Jb(n);return(0,p.useEffect)(()=>{let e=n??window.document.body;return t?a(r,e):o(r,e),()=>{o(r,e)}},[a,t,n,r,o]),{isScrollBlocked:s?i(s):!1}},ex=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,tx=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,nx=({className:e,...t})=>(0,m.jsx)(`h1`,{className:a(`text-3xl`,e),...t}),rx=({className:e,...t})=>(0,m.jsx)(`h2`,{className:a(`mb-2 text-2xl`,ex,e),...t}),ix=({className:e,...t})=>(0,m.jsx)(`h3`,{className:a(`mb-2 text-xl`,ex,e),...t}),ax=({className:e,...t})=>(0,m.jsx)(`h4`,{className:a(`text-lg`,ex,e),...t}),ox=({className:e,...t})=>(0,m.jsx)(`h5`,{className:a(`text-base`,ex,e),...t}),sx=({className:e,...t})=>(0,m.jsx)(`h6`,{className:a(`ml-3 text-base`,ex,e),...t}),cx=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),lx=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},ux=(e,t)=>{let n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,i=window.getComputedStyle(e,`:after`),a=n+parseInt(i.getPropertyValue(`left`),10),o=a+parseInt(i.width,10),s=r+parseInt(i.getPropertyValue(`top`),10),c=s+parseInt(i.height,10),l=t.clientX,u=t.clientY;return l>=a&&l<=o&&u>=s&&u<=c},dx=({H:e,children:t,className:n,isClickable:r,...i})=>{let o=typeof t==`string`?cx(t):void 0;return(0,m.jsx)(e,{id:o,onClick:r?e=>{let{id:t}=e.currentTarget;if(ux(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),lx(t)}}:void 0,"aria-label":r?`Click to scroll to section ${o} and copy the link to the clipboard`:void 0,className:a(r&&tx,n),...i,children:t})},fx=({isClickable:e,...t})=>(0,m.jsx)(nx,{...t}),px=({isClickable:e=!1,...t})=>(0,m.jsx)(dx,{H:rx,isClickable:e,...t}),mx=({isClickable:e=!1,...t})=>(0,m.jsx)(dx,{H:ix,isClickable:e,...t}),hx=({isClickable:e=!1,...t})=>(0,m.jsx)(dx,{H:ax,isClickable:e,...t}),gx=({isClickable:e=!1,...t})=>(0,m.jsx)(dx,{H:ox,isClickable:e,...t}),_x=({isClickable:e=!1,...t})=>(0,m.jsx)(dx,{H:sx,isClickable:e,...t}),vx=Ar(`flex cursor-default flex-col overflow-hidden shadow-sm`,{variants:{size:{sm:`h-auto max-h-[30vh] w-[95vw] max-w-xl`,md:`h-auto max-h-[50vh] w-[95vw] max-w-xl`,lg:`h-auto max-h-[70vh] w-[95vw] max-w-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),yx={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},bx=gm.create(Mm),xx=({children:e,isOpen:t,container:n,onClose:r,hasCloseButton:i=!1,title:o,size:s=`md`,className:c,isScrollable:l=!1,disableScroll:u=!0,padding:d=`none`,...f})=>{let h=Jb(n);if($b({key:`modal`,disableScroll:t&&u}),(0,p.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t&&r&&r()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,r]),!h)return(0,m.jsx)(m.Fragment,{});let g=!!o,_=yx[d||`none`];return(0,Rt.createPortal)((0,m.jsx)(gm.div,{className:`invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:t?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:e=>{e.stopPropagation(),r?.()},"aria-hidden":!t,children:(0,m.jsxs)(bx,{onClick:e=>e.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:vx({size:s,className:c}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...f,children:[(0,m.jsxs)(`div`,{className:a(`relative flex-none px-4 pt-4`,i&&g?`flex items-start`:i?`flex justify-end`:g?`items-center`:`hidden`),children:[g&&(0,m.jsx)(mx,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:o}),i&&(0,m.jsx)(xm,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),r?.()},Icon:Yr,size:`icon-md`})]}),(0,m.jsx)(`div`,{className:a(`flex min-h-0 w-full flex-1 flex-col`,l===!0&&`overflow-auto`,l===`y`&&`overflow-y-auto overflow-x-hidden`,l===`x`&&`overflow-x-auto overflow-y-hidden`,!l&&`overflow-visible`),children:(0,m.jsx)(`div`,{className:a(`flex size-full flex-1 flex-col`,_),children:e})})]})}),h)},Sx=Ar(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,error:`border-error bg-error text-error`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-text`}},defaultVariants:{color:`primary`}}),Cx=Ar(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary/10 aria-selected:text-text`,secondary:`bg-secondary/10 aria-selected:text-text`,error:`bg-error/10 aria-selected:text-text`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-text-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`left-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),wx=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:o=`horizontal`,className:s})=>{let c=(0,p.useRef)([]),l=(0,p.useRef)(null),{choiceIndicatorPosition:u,scheduleMeasurement:d}=Am(c,{isHoverable:i,orientation:o});return(0,p.useEffect)(()=>{d()},[t]),(0,m.jsxs)(`div`,{className:a(Sx({color:r}),s),"aria-orientation":o,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return(0,p.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{c.current[r]=e}})}),u&&(0,m.jsx)(`div`,{className:a(Cx({color:r,orientation:o})),style:u,ref:l},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},Tx=({content:e,...t})=>{let[n,r]=(0,p.useState)(!1),[i,a]=(0,p.useState)(!1),{label:o}=Lt(`copy-button`),s=async()=>{try{a(!1);let t=typeof e==`function`?await e():e;await navigator.clipboard.writeText(t),r(!0)}catch(e){console.error(`Failed to copy text: `,e),a(!0)}};(0,p.useEffect)(()=>{if(n||i){let e=setTimeout(()=>{r(!1),a(!1)},1e3);return()=>clearTimeout(e)}},[n,i]);let c=()=>n?`Content copied to clipboard`:i?`Failed to copy content`:t.label??o.value;return(0,m.jsx)(xm,{Icon:n?Gr:Kr,onClick:s,variant:`hoverable`,color:`text`,size:`icon-sm`,tabIndex:0,title:c(),...t,label:c(),"aria-describedby":n?`copy-success`:i?`copy-error`:void 0})},Ex=(0,p.createContext)(null),Dx=e=>{let t=(0,f.c)(3),n=(0,p.useContext)(Ex)??e,r=`unrollable-panel-button-${n}`,i=`unrollable-panel-${n}`,a;return t[0]!==r||t[1]!==i?(a={triggerId:r,panelId:i},t[0]=r,t[1]=i,t[2]=a):a=t[2],a},Ox=e=>{let{children:t,className:n,identifier:r,...i}=e,o=`${r}${(0,p.useId)()}`,{triggerId:s}=Dx(o);return(0,m.jsx)(Ex,{value:o,children:(0,m.jsx)(`div`,{className:a(`group/popover relative flex cursor-pointer`,n),id:s,"aria-haspopup":!0,...i,children:t})})},kx=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=`start`,yAlign:o=`below`,identifier:s,className:c,displayArrow:l=!0,...u})=>{let{triggerId:d,panelId:f}=Dx(s);return(0,m.jsx)(Mm,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":d,id:f,className:a(`absolute z-60 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`left-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`right-0`,o===`below`&&`top-[calc(100%+1rem)]`,o===`above`&&`bottom-[calc(100%+1rem)]`,l&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,l&&i===`start`&&`before:left-2`,l&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,l&&i===`end`&&`before:right-2`,l&&o===`below`&&`before:-top-2.5 before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent`,l&&o===`above`&&`before:-bottom-2.5 before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,c),...u,children:e})};Ox.Detail=kx;var Ax=16,jx=16,Mx=e=>(0,m.jsx)(Ox,{...e}),Nx=({xAlign:e=`start`,yAlign:t=`below`,...n})=>{let r=(0,p.useRef)(null),{triggerId:i}=Dx(n.identifier),[a,o]=(0,p.useState)(e),[s,c]=(0,p.useState)(t),[l,u]=(0,p.useState)(void 0);return(0,p.useLayoutEffect)(()=>{let n=null,a=null,s=!1,l=()=>{let n=r.current,s=document.getElementById(i);if(!n||!s)return;let l=s.getBoundingClientRect(),d=window.innerWidth,f=window.innerHeight,p=d-l.left-jx,m=l.right-jx;u(Math.max(p,m));let h=n.classList.contains(`invisible`);h&&(n.style.visibility=`hidden`,n.classList.remove(`invisible`)),a=Em(()=>{a=null;let r=n.getBoundingClientRect();h&&(n.style.visibility=``,n.classList.add(`invisible`));let i=t,s=f-l.bottom-Ax,u=l.top-Ax;t===`below`&&s<r.height?u>=r.height&&(i=`above`):t===`above`&&u<r.height&&s>=r.height&&(i=`below`);let p=e,m=d-l.left-jx,g=l.right-jx;e===`start`&&m<r.width?g>=r.width&&(p=`end`):e===`end`&&g<r.width&&m>=r.width&&(p=`start`),c(i),o(p)})},d=()=>{n||=Em(()=>{n=null,l()})},f=()=>{s||(s=!0,window.addEventListener(`scroll`,d,{passive:!0,capture:!0})),d()},p=()=>{s&&(s=!1,window.removeEventListener(`scroll`,d,!0))},m=document.getElementById(i);m&&(m.addEventListener(`mouseenter`,f,{passive:!0}),m.addEventListener(`focusin`,f,{passive:!0}),m.addEventListener(`mouseleave`,p,{passive:!0}),m.addEventListener(`focusout`,p,{passive:!0}));let h=new ResizeObserver(()=>{s&&d()});return r.current&&h.observe(r.current),window.addEventListener(`resize`,d,{passive:!0}),()=>{n?.(),a?.(),m&&(m.removeEventListener(`mouseenter`,f),m.removeEventListener(`focusin`,f),m.removeEventListener(`mouseleave`,p),m.removeEventListener(`focusout`,p)),h.disconnect(),window.removeEventListener(`resize`,d),window.removeEventListener(`scroll`,d,!0)}},[i,e,t]),(0,m.jsx)(kx,{...n,xAlign:a,yAlign:s,ref:r,style:{...n.style,maxWidth:l?`${l}px`:void 0}})},Px=Mx;Px.Detail=Nx;export{Vr as $,u as $t,Nm as A,Ie as At,Af as B,k as Bt,__ as C,Pt as Ct,mh as D,tt as Dt,m_ as E,ft as Et,vm as F,v as Ft,$r as G,y as Gt,wf as H,re as Ht,gm as I,S as It,Xr as J,ne as Jt,Qr as K,D as Kt,mm as L,te as Lt,Am as M,w as Mt,Sm as N,M as Nt,Qm as O,$e as Ot,xm as P,b as Pt,Hr as Q,ie as Qt,hp as R,A as Rt,h_ as S,Lt as St,f_ as T,St as Tt,Cf as U,ee as Ut,Tf as V,T as Vt,zc as W,C as Wt,Kr as X,j as Xt,Yr as Y,O as Yt,Gr as Z,_ as Zt,g_ as _,rn as _t,fx as a,rr as at,y_ as b,F as bt,hx as c,Zn as ct,$b as d,Wn as dt,c as en,Br as et,Jb as f,Fn as ft,mv as g,an as gt,Sy as h,yn as ht,xx as i,_r as it,Mm as j,be as jt,Km as k,et as kt,gx as l,Hn as lt,Ub as m,Mn as mt,Tx as n,kr as nt,px as o,$n as ot,qb as p,L as pt,Zr as q,E as qt,wx as r,Tr as rt,mx as s,z as st,Px as t,s as tn,Ar as tt,_x as u,Xn as ut,d_ as v,$t as vt,u_ as w,Ft as wt,p_ as x,P as xt,l_ as y,Yt as yt,fp as z,x as zt};