@matthiaskrijgsman/mat-ui 0.0.1 → 0.0.3

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.
Files changed (45) hide show
  1. package/README.md +0 -129
  2. package/dist/{Badge.d.ts → components/Badge.d.ts} +2 -2
  3. package/dist/{Modal.d.ts → components/Modal.d.ts} +4 -2
  4. package/dist/{Button.d.ts → components/button/Button.d.ts} +1 -1
  5. package/dist/{ButtonIconRound.d.ts → components/button-icon-round/ButtonIconRound.d.ts} +1 -1
  6. package/dist/{ButtonIconSquare.d.ts → components/button-icon-square/ButtonIconSquare.d.ts} +1 -1
  7. package/dist/{InputCheck.d.ts → components/inputs/InputCheck.d.ts} +1 -2
  8. package/dist/{InputPassword.d.ts → components/inputs/InputPassword.d.ts} +1 -1
  9. package/dist/{InputSelectOption.d.ts → components/inputs/InputSelectOption.d.ts} +1 -2
  10. package/dist/hooks/use-dismiss.d.ts +1 -0
  11. package/dist/index.d.ts +12 -10
  12. package/dist/index.js +7378 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/index.umd.cjs +114 -0
  15. package/dist/index.umd.cjs.map +1 -0
  16. package/dist/style.css +1 -1
  17. package/dist/types.d.ts +31 -0
  18. package/package.json +11 -12
  19. package/dist/ScrollArea.d.ts +0 -5
  20. package/dist/mat-ui.js +0 -6700
  21. package/dist/mat-ui.js.map +0 -1
  22. package/dist/mat-ui.umd.cjs +0 -80
  23. package/dist/mat-ui.umd.cjs.map +0 -1
  24. package/dist/style.d.ts +0 -2
  25. package/dist/style.js +0 -1
  26. /package/dist/{BadgeColors.d.ts → components/BadgeColors.d.ts} +0 -0
  27. /package/dist/{Divider.d.ts → components/Divider.d.ts} +0 -0
  28. /package/dist/{Panel.d.ts → components/Panel.d.ts} +0 -0
  29. /package/dist/{TabButtons.d.ts → components/TabButtons.d.ts} +0 -0
  30. /package/dist/{Test.d.ts → components/Test.d.ts} +0 -0
  31. /package/dist/{Tooltip.d.ts → components/Tooltip.d.ts} +0 -0
  32. /package/dist/{Input.d.ts → components/inputs/Input.d.ts} +0 -0
  33. /package/dist/{InputDescription.d.ts → components/inputs/InputDescription.d.ts} +0 -0
  34. /package/dist/{InputError.d.ts → components/inputs/InputError.d.ts} +0 -0
  35. /package/dist/{InputErrorIcon.d.ts → components/inputs/InputErrorIcon.d.ts} +0 -0
  36. /package/dist/{InputIconButton.d.ts → components/inputs/InputIconButton.d.ts} +0 -0
  37. /package/dist/{InputIconButtonTray.d.ts → components/inputs/InputIconButtonTray.d.ts} +0 -0
  38. /package/dist/{InputLabel.d.ts → components/inputs/InputLabel.d.ts} +0 -0
  39. /package/dist/{InputRadio.d.ts → components/inputs/InputRadio.d.ts} +0 -0
  40. /package/dist/{InputSelect.d.ts → components/inputs/InputSelect.d.ts} +0 -0
  41. /package/dist/{InputSelectNative.d.ts → components/inputs/InputSelectNative.d.ts} +0 -0
  42. /package/dist/{InputSelectSearchable.d.ts → components/inputs/InputSelectSearchable.d.ts} +0 -0
  43. /package/dist/{InputSelectSearchableAsync.d.ts → components/inputs/InputSelectSearchableAsync.d.ts} +0 -0
  44. /package/dist/{InputTextArea.d.ts → components/inputs/InputTextArea.d.ts} +0 -0
  45. /package/dist/{InputToggle.d.ts → components/inputs/InputToggle.d.ts} +0 -0
@@ -0,0 +1,114 @@
1
+ (function(U,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(U=typeof globalThis<"u"?globalThis:U||self,S(U.MatUI={},U.React,U.ReactDOM))})(this,(function(U,S,Ea){"use strict";function Bs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const P=Bs(S),_s=Bs(Ea);var be={exports:{}},Jt={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var $s;function Ra(){if($s)return Jt;$s=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(s,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:t,type:s,key:r,ref:i!==void 0?i:null,props:o}}return Jt.Fragment=e,Jt.jsx=n,Jt.jsxs=n,Jt}var Qt={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Ws;function Ma(){return Ws||(Ws=1,process.env.NODE_ENV!=="production"&&(function(){function t(b){if(b==null)return null;if(typeof b=="function")return b.$$typeof===O?null:b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case g:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case T:return"Suspense";case R:return"SuspenseList";case j:return"Activity"}if(typeof b=="object")switch(typeof b.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),b.$$typeof){case m:return"Portal";case x:return(b.displayName||"Context")+".Provider";case w:return(b._context.displayName||"Context")+".Consumer";case C:var D=b.render;return b=b.displayName,b||(b=D.displayName||D.name||"",b=b!==""?"ForwardRef("+b+")":"ForwardRef"),b;case E:return D=b.displayName||null,D!==null?D:t(b.type)||"Memo";case A:D=b._payload,b=b._init;try{return t(b(D))}catch{}}return null}function e(b){return""+b}function n(b){try{e(b);var D=!1}catch{D=!0}if(D){D=console;var F=D.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&b[Symbol.toStringTag]||b.constructor.name||"Object";return F.call(D,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),e(b)}}function s(b){if(b===g)return"<>";if(typeof b=="object"&&b!==null&&b.$$typeof===A)return"<...>";try{var D=t(b);return D?"<"+D+">":"<...>"}catch{return"<...>"}}function i(){var b=W.A;return b===null?null:b.getOwner()}function o(){return Error("react-stack-top-frame")}function r(b){if(at.call(b,"key")){var D=Object.getOwnPropertyDescriptor(b,"key").get;if(D&&D.isReactWarning)return!1}return b.key!==void 0}function a(b,D){function F(){Ct||(Ct=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",D))}F.isReactWarning=!0,Object.defineProperty(b,"key",{get:F,configurable:!0})}function l(){var b=t(this.type);return lt[b]||(lt[b]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),b=this.props.ref,b!==void 0?b:null}function u(b,D,F,H,At,pt,Is,Ls){return F=pt.ref,b={$$typeof:h,type:b,key:D,props:pt,_owner:At},(F!==void 0?F:null)!==null?Object.defineProperty(b,"ref",{enumerable:!1,get:l}):Object.defineProperty(b,"ref",{enumerable:!1,value:null}),b._store={},Object.defineProperty(b._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(b,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(b,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Is}),Object.defineProperty(b,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ls}),Object.freeze&&(Object.freeze(b.props),Object.freeze(b)),b}function c(b,D,F,H,At,pt,Is,Ls){var G=D.children;if(G!==void 0)if(H)if(st(G)){for(H=0;H<G.length;H++)f(G[H]);Object.freeze&&Object.freeze(G)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(G);if(at.call(D,"key")){G=t(b);var Zt=Object.keys(D).filter(function(xm){return xm!=="key"});H=0<Zt.length?"{key: someKey, "+Zt.join(": ..., ")+": ...}":"{key: someKey}",q[G+H]||(Zt=0<Zt.length?"{"+Zt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
+ let props = %s;
19
+ <%s {...props} />
20
+ React keys must be passed directly to JSX without using spread:
21
+ let props = %s;
22
+ <%s key={someKey} {...props} />`,H,G,Zt,G),q[G+H]=!0)}if(G=null,F!==void 0&&(n(F),G=""+F),r(D)&&(n(D.key),G=""+D.key),"key"in D){F={};for(var Fs in D)Fs!=="key"&&(F[Fs]=D[Fs])}else F=D;return G&&a(F,typeof b=="function"?b.displayName||b.name||"Unknown":b),u(b,G,pt,At,i(),F,Is,Ls)}function f(b){typeof b=="object"&&b!==null&&b.$$typeof===h&&b._store&&(b._store.validated=1)}var d=S,h=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),x=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),W=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at=Object.prototype.hasOwnProperty,st=Array.isArray,mt=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(b){return b()}};var Ct,lt={},L=d.react_stack_bottom_frame.bind(d,o)(),V=mt(s(o)),q={};Qt.Fragment=g,Qt.jsx=function(b,D,F,H,At){var pt=1e4>W.recentlyCreatedOwnerStacks++;return c(b,D,F,!1,H,At,pt?Error("react-stack-top-frame"):L,pt?mt(s(b)):V)},Qt.jsxs=function(b,D,F,H,At){var pt=1e4>W.recentlyCreatedOwnerStacks++;return c(b,D,F,!0,H,At,pt?Error("react-stack-top-frame"):L,pt?mt(s(b)):V)}})()),Qt}var Us;function Da(){return Us||(Us=1,process.env.NODE_ENV==="production"?be.exports=Ra():be.exports=Ma()),be.exports}var p=Da();const B=(...t)=>t.filter(Boolean).join(" "),Je=S.createContext({});function Qe(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const tn=typeof window<"u",zs=tn?S.useLayoutEffect:S.useEffect,we=S.createContext(null);function en(t,e){t.indexOf(e)===-1&&t.push(e)}function nn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const gt=(t,e,n)=>n>e?e:n<t?t:n;function sn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Nt=()=>{},yt=()=>{};process.env.NODE_ENV!=="production"&&(Nt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(sn(e,n))},yt=(t,e,n)=>{if(!t)throw new Error(sn(e,n))});const vt={},Ks=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ys(t){return typeof t=="object"&&t!==null}const Hs=t=>/^0[^.\s]+$/u.test(t);function rn(t){let e;return()=>(e===void 0&&(e=t()),e)}const Q=t=>t,Va=(t,e)=>n=>e(t(n)),te=(...t)=>t.reduce(Va),ee=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class on{constructor(){this.subscriptions=[]}add(e){return en(this.subscriptions,e),()=>nn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const it=t=>t*1e3,ct=t=>t/1e3;function Gs(t,e){return e?t*(1e3/e):0}const Xs=new Set;function an(t,e,n){t||Xs.has(e)||(console.warn(sn(e,n)),Xs.add(e))}const qs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ja=1e-7,ka=12;function Oa(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=qs(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>ja&&++a<ka);return r}function ne(t,e,n,s){if(t===e&&n===s)return Q;const i=o=>Oa(o,0,1,t,n);return o=>o===0||o===1?o:qs(i(o),e,s)}const Zs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Js=t=>e=>1-t(1-e),Qs=ne(.33,1.53,.69,.99),ln=Js(Qs),ti=Zs(ln),ei=t=>(t*=2)<1?.5*ln(t):.5*(2-Math.pow(2,-10*(t-1))),cn=t=>1-Math.sin(Math.acos(t)),ni=Js(cn),si=Zs(cn),Na=ne(.42,0,1,1),Ia=ne(0,0,.58,1),ii=ne(.42,0,.58,1),La=t=>Array.isArray(t)&&typeof t[0]!="number",ri=t=>Array.isArray(t)&&typeof t[0]=="number",oi={linear:Q,easeIn:Na,easeInOut:ii,easeOut:Ia,circIn:cn,circInOut:si,circOut:ni,backIn:ln,backInOut:ti,backOut:Qs,anticipate:ei},Fa=t=>typeof t=="string",ai=t=>{if(ri(t)){yt(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return ne(e,n,s,i)}else if(Fa(t))return yt(oi[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),oi[t];return t},Te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ba(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,f=!1,d=!1)=>{const m=d&&i?n:s;return f&&r.add(c),m.has(c)||m.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const _a=40;function li(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Te.reduce((x,C)=>(x[C]=Ba(o),x),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:h,postRender:m}=r,g=()=>{const x=vt.useManualTiming?i.timestamp:performance.now();n=!1,vt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,_a),1)),i.timestamp=x,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},v=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:Te.reduce((x,C)=>{const T=r[C];return x[C]=(R,E=!1,A=!1)=>(n||v(),T.schedule(R,E,A)),x},{}),cancel:x=>{for(let C=0;C<Te.length;C++)r[Te[C]].cancel(x)},state:i,steps:r}}const{schedule:k,cancel:xt,state:z,steps:un}=li(typeof requestAnimationFrame<"u"?requestAnimationFrame:Q,!0);let Se;function $a(){Se=void 0}const Z={now:()=>(Se===void 0&&Z.set(z.isProcessing||vt.useManualTiming?z.timestamp:performance.now()),Se),set:t=>{Se=t,queueMicrotask($a)}},ci=t=>e=>typeof e=="string"&&e.startsWith(t),fn=ci("--"),Wa=ci("var(--"),dn=t=>Wa(t)?Ua.test(t.split("/*")[0].trim()):!1,Ua=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,It={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},se={...It,transform:t=>gt(0,1,t)},Pe={...It,default:1},ie=t=>Math.round(t*1e5)/1e5,hn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function za(t){return t==null}const Ka=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mn=(t,e)=>n=>!!(typeof n=="string"&&Ka.test(n)&&n.startsWith(t)||e&&!za(n)&&Object.prototype.hasOwnProperty.call(n,e)),ui=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(hn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ya=t=>gt(0,255,t),pn={...It,transform:t=>Math.round(Ya(t))},Et={test:mn("rgb","red"),parse:ui("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+pn.transform(t)+", "+pn.transform(e)+", "+pn.transform(n)+", "+ie(se.transform(s))+")"};function Ha(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const gn={test:mn("#"),parse:Ha,transform:Et.transform},re=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),bt=re("deg"),ut=re("%"),M=re("px"),Ga=re("vh"),Xa=re("vw"),fi={...ut,parse:t=>ut.parse(t)/100,transform:t=>ut.transform(t*100)},Lt={test:mn("hsl","hue"),parse:ui("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ut.transform(ie(e))+", "+ut.transform(ie(n))+", "+ie(se.transform(s))+")"},$={test:t=>Et.test(t)||gn.test(t)||Lt.test(t),parse:t=>Et.test(t)?Et.parse(t):Lt.test(t)?Lt.parse(t):gn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Et.transform(t):Lt.transform(t),getAnimatableNone:t=>{const e=$.parse(t);return e.alpha=0,$.transform(e)}},qa=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Za(t){return isNaN(t)&&typeof t=="string"&&(t.match(hn)?.length||0)+(t.match(qa)?.length||0)>0}const di="number",hi="color",Ja="var",Qa="var(",mi="${}",tl=/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 oe(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(tl,l=>($.test(l)?(s.color.push(o),i.push(hi),n.push($.parse(l))):l.startsWith(Qa)?(s.var.push(o),i.push(Ja),n.push(l)):(s.number.push(o),i.push(di),n.push(parseFloat(l))),++o,mi)).split(mi);return{values:n,split:a,indexes:s,types:i}}function pi(t){return oe(t).values}function gi(t){const{split:e,types:n}=oe(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===di?o+=ie(i[r]):a===hi?o+=$.transform(i[r]):o+=i[r]}return o}}const el=t=>typeof t=="number"?0:$.test(t)?$.getAnimatableNone(t):t;function nl(t){const e=pi(t);return gi(t)(e.map(el))}const wt={test:Za,parse:pi,createTransformer:gi,getAnimatableNone:nl};function yn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function sl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=yn(l,a,t+1/3),o=yn(l,a,t),r=yn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Ce(t,e){return n=>n>0?e:t}const N=(t,e,n)=>t+(e-t)*n,vn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},il=[gn,Et,Lt],rl=t=>il.find(e=>e.test(t));function yi(t){const e=rl(t);if(Nt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Lt&&(n=sl(n)),n}const vi=(t,e)=>{const n=yi(t),s=yi(e);if(!n||!s)return Ce(t,e);const i={...n};return o=>(i.red=vn(n.red,s.red,o),i.green=vn(n.green,s.green,o),i.blue=vn(n.blue,s.blue,o),i.alpha=N(n.alpha,s.alpha,o),Et.transform(i))},xn=new Set(["none","hidden"]);function ol(t,e){return xn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function al(t,e){return n=>N(t,e,n)}function bn(t){return typeof t=="number"?al:typeof t=="string"?dn(t)?Ce:$.test(t)?vi:ul:Array.isArray(t)?xi:typeof t=="object"?$.test(t)?vi:ll:Ce}function xi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>bn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function ll(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=bn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function cl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const ul=(t,e)=>{const n=wt.createTransformer(e),s=oe(t),i=oe(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?xn.has(t)&&!i.values.length||xn.has(e)&&!s.values.length?ol(t,e):te(xi(cl(s,i),i.values),n):(Nt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ce(t,e))};function bi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?N(t,e,n):bn(t)(t,e)}const fl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>k.update(e,n),stop:()=>xt(e),now:()=>z.isProcessing?z.timestamp:Z.now()}},wi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ae=2e4;function wn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Ae;)e+=n,s=t.next(e);return e>=Ae?1/0:e}function dl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(wn(s),Ae);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:ct(i)}}const hl=5;function Ti(t,e,n){const s=Math.max(e-hl,0);return Gs(n-t(s),e-s)}const I={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},Tn=.001;function ml({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,o;Nt(t<=it(I.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=gt(I.minDamping,I.maxDamping,r),t=gt(I.minDuration,I.maxDuration,ct(t)),r<1?(i=u=>{const c=u*r,f=c*t,d=c-n,h=Sn(u,r),m=Math.exp(-f);return Tn-d/h*m},o=u=>{const f=u*r*t,d=f*n+n,h=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-f),g=Sn(Math.pow(u,2),r);return(-i(u)+Tn>0?-1:1)*((d-h)*m)/g}):(i=u=>{const c=Math.exp(-u*t),f=(u-n)*t+1;return-Tn+c*f},o=u=>{const c=Math.exp(-u*t),f=(n-u)*(t*t);return c*f});const a=5/t,l=gl(i,o,a);if(t=it(t),isNaN(l))return{stiffness:I.stiffness,damping:I.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const pl=12;function gl(t,e,n){let s=n;for(let i=1;i<pl;i++)s=s-t(s)/e(s);return s}function Sn(t,e){return t*Math.sqrt(1-e*e)}const yl=["duration","bounce"],vl=["stiffness","damping","mass"];function Si(t,e){return e.some(n=>t[n]!==void 0)}function xl(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!Si(t,vl)&&Si(t,yl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*gt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:I.mass,stiffness:i,damping:o}}else{const n=ml(t);e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function Ee(t=I.visualDuration,e=I.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:h}=xl({...n,velocity:-ct(n.velocity||0)}),m=d||0,g=u/(2*Math.sqrt(l*c)),v=r-o,y=ct(Math.sqrt(l/c)),w=Math.abs(v)<5;s||(s=w?I.restSpeed.granular:I.restSpeed.default),i||(i=w?I.restDelta.granular:I.restDelta.default);let x;if(g<1){const T=Sn(y,g);x=R=>{const E=Math.exp(-g*y*R);return r-E*((m+g*y*v)/T*Math.sin(T*R)+v*Math.cos(T*R))}}else if(g===1)x=T=>r-Math.exp(-y*T)*(v+(m+y*v)*T);else{const T=y*Math.sqrt(g*g-1);x=R=>{const E=Math.exp(-g*y*R),A=Math.min(T*R,300);return r-E*((m+g*y*v)*Math.sinh(A)+T*v*Math.cosh(A))/T}}const C={calculatedDuration:h&&f||null,next:T=>{const R=x(T);if(h)a.done=T>=f;else{let E=T===0?m:0;g<1&&(E=T===0?it(m):Ti(x,T,R));const A=Math.abs(E)<=s,j=Math.abs(r-R)<=i;a.done=A&&j}return a.value=a.done?r:R,a},toString:()=>{const T=Math.min(wn(C),Ae),R=wi(E=>C.next(T*E).value,T,30);return T+"ms "+R},toTransition:()=>{}};return C}Ee.applyToOptions=t=>{const e=dl(t,100,Ee);return t.ease=e.ease,t.duration=it(e.duration),t.type="keyframes",t};function Pn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=t[0],d={done:!1,value:f},h=A=>a!==void 0&&A<a||l!==void 0&&A>l,m=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=n*e;const v=f+g,y=r===void 0?v:r(v);y!==v&&(g=y-f);const w=A=>-g*Math.exp(-A/s),x=A=>y+w(A),C=A=>{const j=w(A),O=x(A);d.done=Math.abs(j)<=u,d.value=d.done?y:O};let T,R;const E=A=>{h(d.value)&&(T=A,R=Ee({keyframes:[d.value,m(d.value)],velocity:Ti(x,A,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:A=>{let j=!1;return!R&&T===void 0&&(j=!0,C(A),E(A)),T!==void 0&&A>=T?R.next(A-T):(!j&&C(A),d)}}}function bl(t,e,n){const s=[],i=n||vt.mix||bi,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||Q:e;a=te(l,a)}s.push(a)}return s}function wl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(yt(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=bl(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let f=0;if(l>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const d=ee(t[f],t[f+1],c);return a[f](d)};return n?c=>u(gt(t[0],t[o-1],c)):u}function Tl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ee(0,e,s);t.push(N(n,1,i))}}function Sl(t){const e=[0];return Tl(e,t.length-1),e}function Pl(t,e){return t.map(n=>n*e)}function Cl(t,e){return t.map(()=>e||ii).splice(0,t.length-1)}function Ft({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=La(s)?s.map(ai):ai(s),o={done:!1,value:e[0]},r=Pl(n&&n.length===e.length?n:Sl(e),t),a=wl(r,e,{ease:Array.isArray(i)?i:Cl(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Al=t=>t!==null;function Cn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Al),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const El={decay:Pn,inertia:Pn,tween:Ft,keyframes:Ft,spring:Ee};function Pi(t){typeof t.type=="string"&&(t.type=El[t.type])}class An{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Rl=t=>t/100;class En extends An{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Z.now()&&this.tick(Z.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(){const{options:e}=this;Pi(e);const{type:n=Ft,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Ft;process.env.NODE_ENV!=="production"&&l!==Ft&&yt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ft&&typeof a[0]!="number"&&(this.mixKeyframes=te(Rl,bi(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=wn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,C=s;if(f){const A=Math.min(this.currentTime,i)/a;let j=Math.floor(A),O=A%1;!O&&A>=1&&(O=1),O===1&&j--,j=Math.min(j,f+1),!!(j%2)&&(d==="reverse"?(O=1-O,h&&(O-=h/a)):d==="mirror"&&(C=r)),x=gt(0,1,O)*a}const T=w?{done:!1,value:c[0]}:C.next(x);o&&(T.value=o(T.value));let{done:R}=T;!w&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return E&&m!==Pn&&(T.value=Cn(c,this.options,v,this.speed)),g&&g(T.value),E&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return ct(this.calculatedDuration)}get time(){return ct(this.currentTime)}set time(e){e=it(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?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Z.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=ct(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=fl,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(Z.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(),this.driver=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 Ml(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Rt=t=>t*180/Math.PI,Rn=t=>{const e=Rt(Math.atan2(t[1],t[0]));return Mn(e)},Dl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Rn,rotateZ:Rn,skewX:t=>Rt(Math.atan(t[1])),skewY:t=>Rt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Mn=t=>(t=t%360,t<0&&(t+=360),t),Ci=Rn,Ai=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ei=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Vl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ai,scaleY:Ei,scale:t=>(Ai(t)+Ei(t))/2,rotateX:t=>Mn(Rt(Math.atan2(t[6],t[5]))),rotateY:t=>Mn(Rt(Math.atan2(-t[2],t[0]))),rotateZ:Ci,rotate:Ci,skewX:t=>Rt(Math.atan(t[4])),skewY:t=>Rt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Dn(t){return t.includes("scale")?1:0}function Vn(t,e){if(!t||t==="none")return Dn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Vl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Dl,i=a}if(!i)return Dn(e);const o=s[e],r=i[1].split(",").map(kl);return typeof o=="function"?o(r):r[o]}const jl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Vn(n,e)};function kl(t){return parseFloat(t.trim())}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_t=new Set(Bt),Ri=t=>t===It||t===M,Ol=new Set(["x","y","z"]),Nl=Bt.filter(t=>!Ol.has(t));function Il(t){const e=[];return Nl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Mt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Vn(e,"x"),y:(t,{transform:e})=>Vn(e,"y")};Mt.translateX=Mt.x,Mt.translateY=Mt.y;const Dt=new Set;let jn=!1,kn=!1,On=!1;function Mi(){if(kn){const t=Array.from(Dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Il(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}kn=!1,jn=!1,Dt.forEach(t=>t.complete(On)),Dt.clear()}function Di(){Dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(kn=!0)})}function Ll(){On=!0,Di(),Mi(),On=!1}class Nn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Dt.add(this),jn||(jn=!0,k.read(Di),k.resolveKeyframes(Mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Ml(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Dt.delete(this)}cancel(){this.state==="scheduled"&&(Dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Fl=t=>t.startsWith("--");function Bl(t,e,n){Fl(e)?t.style.setProperty(e,n):t.style[e]=n}const _l=rn(()=>window.ScrollTimeline!==void 0),$l={};function Wl(t,e){const n=rn(t);return()=>$l[e]??n()}const Vi=Wl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ae=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ji={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ae([0,.65,.55,1]),circOut:ae([.55,0,1,.45]),backIn:ae([.31,.01,.66,-.59]),backOut:ae([.33,1.53,.69,.99])};function ki(t,e){if(t)return typeof t=="function"?Vi()?wi(t,e):"ease-out":ri(t)?ae(t):Array.isArray(t)?t.map(n=>ki(n,e)||ji.easeOut):ji[t]}function Ul(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const f=ki(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(c,d)}function Oi(t){return typeof t=="function"&&"applyToOptions"in t}function zl({type:t,...e}){return Oi(t)&&Vi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Kl extends An{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,yt(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=zl(e);this.animation=Ul(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Cn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Bl(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(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;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ct(Number(e))}get time(){return ct(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=it(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&_l()?(this.animation.timeline=e,Q):n(this)}}const Ni={anticipate:ei,backInOut:ti,circInOut:si};function Yl(t){return t in Ni}function Hl(t){typeof t.ease=="string"&&Yl(t.ease)&&(t.ease=Ni[t.ease])}const Ii=10;class Gl extends Kl{constructor(e){Hl(e),Pi(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new En({...r,autoplay:!1}),l=it(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ii).value,a.sample(l).value,Ii),a.stop()}}const Li=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wt.test(t)||t==="0")&&!t.startsWith("url("));function Xl(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ql(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Li(i,e),a=Li(o,e);return Nt(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Xl(t)||(n==="spring"||Oi(n))&&s}function In(t){t.duration=0,t.type}const Zl=new Set(["opacity","clipPath","filter","transform"]),Jl=rn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ql(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Jl()&&n&&Zl.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const tc=40;class ec extends An{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Z.now();const d={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...f},h=c?.KeyframeResolver||Nn;this.keyframeResolver=new h(a,(m,g,v)=>this.onKeyframesResolved(m,g,d,!v),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=Z.now(),ql(e,o,r,a)||((vt.instantAnimations||!l)&&c?.(Cn(e,s,n)),e[0]=e[e.length-1],In(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>tc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!u&&Ql(d)?new Gl({...d,element:d.motionValue.owner.current}):new En(d);h.finished.then(()=>this.notifyFinished()).catch(Q),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ll()),this._animation}get duration(){return this.animation.duration}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()}}const nc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sc(t){const e=nc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const ic=4;function Fi(t,e,n=1){yt(n<=ic,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=sc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ks(r)?parseFloat(r):r}return dn(i)?Fi(i,e,n+1):i}function Ln(t,e){return t?.[e]??t?.default??t}const Bi=new Set(["width","height","top","left","right","bottom",...Bt]),rc={test:t=>t==="auto",parse:t=>t},_i=t=>e=>e.test(t),$i=[It,M,ut,bt,Xa,Ga,rc],Wi=t=>$i.find(_i(t));function oc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Hs(t):!0}const ac=new Set(["brightness","contrast","saturate","opacity"]);function lc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(hn)||[];if(!s)return t;const i=n.replace(s,"");let o=ac.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const cc=/\b([a-z-]*)\(.*?\)/gu,Fn={...wt,getAnimatableNone:t=>{const e=t.match(cc);return e?e.map(lc).join(" "):t}},Ui={...It,transform:Math.round},Bn={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,...{rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:Pe,scaleX:Pe,scaleY:Pe,scaleZ:Pe,skew:bt,skewX:bt,skewY:bt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:se,originX:fi,originY:fi,originZ:M},zIndex:Ui,fillOpacity:se,strokeOpacity:se,numOctaves:Ui},uc={...Bn,color:$,backgroundColor:$,outlineColor:$,fill:$,stroke:$,borderColor:$,borderTopColor:$,borderRightColor:$,borderBottomColor:$,borderLeftColor:$,filter:Fn,WebkitFilter:Fn},zi=t=>uc[t];function Ki(t,e){let n=zi(t);return n!==Fn&&(n=wt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const fc=new Set(["auto","none","0"]);function dc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!fc.has(o)&&oe(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ki(n,i)}class hc extends Nn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),dn(u))){const c=Fi(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Bi.has(s)||e.length!==2)return;const[i,o]=e,r=Wi(i),a=Wi(o);if(r!==a)if(Ri(r)&&Ri(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else Mt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||oc(e[i]))&&s.push(i);s.length&&dc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Mt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function mc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Yi=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Hi(t){return Ys(t)&&"offsetHeight"in t}const Gi=30,pc=t=>!isNaN(parseFloat(t));class gc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Z.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=pc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&an(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new on);const s=this.events[e].add(n);return e==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Gi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Gi);return Gs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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 $t(t,e){return new gc(t,e)}const{schedule:_n}=li(queueMicrotask,!1),rt={x:!1,y:!1};function Xi(){return rt.x||rt.y}function yc(t){return t==="x"||t==="y"?rt[t]?null:(rt[t]=!0,()=>{rt[t]=!1}):rt.x||rt.y?null:(rt.x=rt.y=!0,()=>{rt.x=rt.y=!1})}function qi(t,e){const n=mc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Zi(t){return!(t.pointerType==="touch"||Xi())}function vc(t,e,n={}){const[s,i,o]=qi(t,n),r=a=>{if(!Zi(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=f=>{Zi(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Ji=(t,e)=>e?t===e?!0:Ji(t,e.parentElement):!1,$n=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,xc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function bc(t){return xc.has(t.tagName)||t.tabIndex!==-1}const Re=new WeakSet;function Qi(t){return e=>{e.key==="Enter"&&t(e)}}function Wn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const wc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Qi(()=>{if(Re.has(n))return;Wn(n,"down");const i=Qi(()=>{Wn(n,"up")}),o=()=>Wn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function tr(t){return $n(t)&&!Xi()}function Tc(t,e,n={}){const[s,i,o]=qi(t,n),r=a=>{const l=a.currentTarget;if(!tr(a))return;Re.add(l);const u=e(l,a),c=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Re.has(l)&&Re.delete(l),tr(h)&&typeof u=="function"&&u(h,{success:m})},f=h=>{c(h,l===window||l===document||n.useGlobalTarget||Ji(l,h.target))},d=h=>{c(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Hi(a)&&(a.addEventListener("focus",u=>wc(u,i)),!bc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function er(t){return Ys(t)&&"ownerSVGElement"in t}function Sc(t){return er(t)&&t.tagName==="svg"}const K=t=>!!(t&&t.getVelocity),Pc=[...$i,$,wt],Cc=t=>Pc.find(_i(t)),Un=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Ac extends P.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Hi(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Ec({children:t,isPresent:e,anchorX:n,root:s}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=S.useContext(Un);return S.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:f,right:d}=r.current;if(e||!o.current||!l||!u)return;const h=n==="left"?`left: ${f}`:`right: ${d}`;o.current.dataset.motionPopId=i;const m=document.createElement("style");a&&(m.nonce=a);const g=s??document.head;return g.appendChild(m),m.sheet&&m.sheet.insertRule(`
23
+ [data-motion-pop-id="${i}"] {
24
+ position: absolute !important;
25
+ width: ${l}px !important;
26
+ height: ${u}px !important;
27
+ ${h}px !important;
28
+ top: ${c}px !important;
29
+ }
30
+ `),()=>{g.contains(m)&&g.removeChild(m)}},[e]),p.jsx(Ac,{isPresent:e,childRef:o,sizeRef:r,children:P.cloneElement(t,{ref:o})})}const Rc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=Qe(Mc),c=S.useId();let f=!0,d=S.useMemo(()=>(f=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:h=>{u.set(h,!0);for(const m of u.values())if(!m)return;s&&s()},register:h=>(u.set(h,!1),()=>u.delete(h))}),[n,u,s]);return o&&f&&(d={...d}),S.useMemo(()=>{u.forEach((h,m)=>u.set(m,!1))},[n]),P.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=p.jsx(Ec,{isPresent:n,anchorX:a,root:l,children:t})),p.jsx(we.Provider,{value:d,children:t})};function Mc(){return new Map}function nr(t=!0){const e=S.useContext(we);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=S.useId();S.useEffect(()=>{if(t)return i(o)},[t]);const r=S.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Me=t=>t.key||"";function sr(t){const e=[];return S.Children.forEach(t,n=>{S.isValidElement(n)&&e.push(n)}),e}const ir=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=nr(r),f=S.useMemo(()=>sr(t),[t]),d=r&&!u?[]:f.map(Me),h=S.useRef(!0),m=S.useRef(f),g=Qe(()=>new Map),[v,y]=S.useState(f),[w,x]=S.useState(f);zs(()=>{h.current=!1,m.current=f;for(let R=0;R<w.length;R++){const E=Me(w[R]);d.includes(E)?g.delete(E):g.get(E)!==!0&&g.set(E,!1)}},[w,d.length,d.join("-")]);const C=[];if(f!==v){let R=[...f];for(let E=0;E<w.length;E++){const A=w[E],j=Me(A);d.includes(j)||(R.splice(E,0,A),C.push(A))}return o==="wait"&&C.length&&(R=C),x(sr(R)),y(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=S.useContext(Je);return p.jsx(p.Fragment,{children:w.map(R=>{const E=Me(R),A=r&&!u?!1:f===w||d.includes(E),j=()=>{if(g.has(E))g.set(E,!0);else return;let O=!0;g.forEach(W=>{W||(O=!1)}),O&&(T?.(),x(m.current),r&&c?.(),s&&s())};return p.jsx(Rc,{isPresent:A,initial:!h.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:A?void 0:j,anchorX:a,children:R},E)})})},rr=S.createContext({strict:!1}),or={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"]},Wt={};for(const t in or)Wt[t]={isEnabled:e=>or[t].some(n=>!!e[n])};function Dc(t){for(const e in t)Wt[e]={...Wt[e],...t[e]}}const Vc=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","ignoreStrict","viewport"]);function De(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Vc.has(t)}let ar=t=>!De(t);function jc(t){typeof t=="function"&&(ar=e=>e.startsWith("on")?!De(e):t(e))}try{jc(require("@emotion/is-prop-valid").default)}catch{}function kc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(ar(i)||n===!0&&De(i)||!e&&!De(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ve=S.createContext({});function je(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function le(t){return typeof t=="string"||Array.isArray(t)}const zn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kn=["initial",...zn];function ke(t){return je(t.animate)||Kn.some(e=>le(t[e]))}function lr(t){return!!(ke(t)||t.variants)}function Oc(t,e){if(ke(t)){const{initial:n,animate:s}=t;return{initial:n===!1||le(n)?n:void 0,animate:le(s)?s:void 0}}return t.inherit!==!1?e:{}}function Nc(t){const{initial:e,animate:n}=Oc(t,S.useContext(Ve));return S.useMemo(()=>({initial:e,animate:n}),[cr(e),cr(n)])}function cr(t){return Array.isArray(t)?t.join(" "):t}const ce={};function Ic(t){for(const e in t)ce[e]=t[e],fn(e)&&(ce[e].isCSSVariable=!0)}function ur(t,{layout:e,layoutId:n}){return _t.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ce[t]||t==="opacity")}const Lc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Fc=Bt.length;function Bc(t,e,n){let s="",i=!0;for(let o=0;o<Fc;o++){const r=Bt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Yi(a,Bn[r]);if(!l){i=!1;const c=Lc[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Yn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(_t.has(l)){r=!0;continue}else if(fn(l)){i[l]=u;continue}else{const c=Yi(u,Bn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Bc(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const Hn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fr(t,e,n){for(const s in e)!K(e[s])&&!ur(s,n)&&(t[s]=e[s])}function _c({transformTemplate:t},e){return S.useMemo(()=>{const n=Hn();return Yn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function $c(t,e){const n=t.style||{},s={};return fr(s,n,t),Object.assign(s,_c(t,e)),s}function Wc(t,e){const n={},s=$c(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Uc={offset:"stroke-dashoffset",array:"stroke-dasharray"},zc={offset:"strokeDashoffset",array:"strokeDasharray"};function Kc(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Uc:zc;t[o.offset]=M.transform(-s);const r=M.transform(e),a=M.transform(n);t[o.array]=`${r} ${a}`}function dr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Yn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&Kc(f,i,o,r,!1)}const hr=()=>({...Hn(),attrs:{}}),mr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Yc(t,e,n,s){const i=S.useMemo(()=>{const o=hr();return dr(o,e,mr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};fr(o,t.style,t),i.style={...o,...i.style}}return i}const Hc=["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 Gn(t){return typeof t!="string"||t.includes("-")?!1:!!(Hc.indexOf(t)>-1||/[A-Z]/u.test(t))}function Gc(t,e,n,{latestValues:s},i,o=!1){const a=(Gn(t)?Yc:Wc)(e,s,i,t),l=kc(e,typeof t=="string",o),u=t!==S.Fragment?{...l,...a,ref:n}:{},{children:c}=e,f=S.useMemo(()=>K(c)?c.get():c,[c]);return S.createElement(t,{...u,children:f})}function pr(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Xn(t,e,n,s){if(typeof e=="function"){const[i,o]=pr(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=pr(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Oe(t){return K(t)?t.get():t}function Xc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:qc(n,s,i,t),renderState:e()}}function qc(t,e,n,s){const i={},o=s(t,{});for(const d in o)i[d]=Oe(o[d]);let{initial:r,animate:a}=t;const l=ke(t),u=lr(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const f=c?a:r;if(f&&typeof f!="boolean"&&!je(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=Xn(t,d[h]);if(m){const{transitionEnd:g,transition:v,...y}=m;for(const w in y){let x=y[w];if(Array.isArray(x)){const C=c?x.length-1:0;x=x[C]}x!==null&&(i[w]=x)}for(const w in g)i[w]=g[w]}}}return i}const gr=t=>(e,n)=>{const s=S.useContext(Ve),i=S.useContext(we),o=()=>Xc(t,e,s,i);return n?o():Qe(o)};function qn(t,e,n){const{style:s}=t,i={};for(const o in s)(K(s[o])||e.style&&K(e.style[o])||ur(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const Zc=gr({scrapeMotionValuesFromProps:qn,createRenderState:Hn});function yr(t,e,n){const s=qn(t,e,n);for(const i in t)if(K(t[i])||K(e[i])){const o=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const Jc=gr({scrapeMotionValuesFromProps:yr,createRenderState:hr}),Qc=Symbol.for("motionComponentSymbol");function Ut(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function tu(t,e,n){return S.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Ut(n)&&(n.current=s))},[e])}const Zn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vr="data-"+Zn("framerAppearId"),xr=S.createContext({});function eu(t,e,n,s,i){const{visualElement:o}=S.useContext(Ve),r=S.useContext(rr),a=S.useContext(we),l=S.useContext(Un).reducedMotion,u=S.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=S.useContext(xr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&nu(u.current,n,i,f);const d=S.useRef(!1);S.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const h=n[vr],m=S.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return zs(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),S.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),m.current=!1),c.enteringChildren=void 0)}),c}function nu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:br(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Ut(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function br(t){if(t)return t.options.allowProjection!==!1?t.projection:br(t.parent)}function Jn(t,{forwardMotionProps:e=!1}={},n,s){n&&Dc(n);const i=Gn(t)?Jc:Zc;function o(a,l){let u;const c={...S.useContext(Un),...a,layoutId:su(a)},{isStatic:f}=c,d=Nc(a),h=i(a,f);if(!f&&tn){iu(c,n);const m=ru(c);u=m.MeasureLayout,d.visualElement=eu(t,h,c,s,m.ProjectionNode)}return p.jsxs(Ve.Provider,{value:d,children:[u&&d.visualElement?p.jsx(u,{visualElement:d.visualElement,...c}):null,Gc(t,a,tu(h,d.visualElement,l),h,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=S.forwardRef(o);return r[Qc]=t,r}function su({layoutId:t}){const e=S.useContext(Je).id;return e&&t!==void 0?e+"-"+t:t}function iu(t,e){const n=S.useContext(rr).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Nt(!1,s,"lazy-strict-mode"):yt(!1,s,"lazy-strict-mode")}}function ru(t){const{drag:e,layout:n}=Wt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function ou(t,e){if(typeof Proxy>"u")return Jn;const n=new Map,s=(o,r)=>Jn(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&an(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,Jn(r,void 0,t,e)),n.get(r))})}function wr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function au({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function lu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Qn(t){return t===void 0||t===1}function ts({scale:t,scaleX:e,scaleY:n}){return!Qn(t)||!Qn(e)||!Qn(n)}function Vt(t){return ts(t)||Tr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Tr(t){return Sr(t.x)||Sr(t.y)}function Sr(t){return t&&t!=="0%"}function Ne(t,e,n){const s=t-n,i=e*s;return n+i}function Pr(t,e,n,s,i){return i!==void 0&&(t=Ne(t,i,s)),Ne(t,n,s)+e}function es(t,e=0,n=1,s,i){t.min=Pr(t.min,e,n,s,i),t.max=Pr(t.max,e,n,s,i)}function Cr(t,{x:e,y:n}){es(t.x,e.translate,e.scale,e.originPoint),es(t.y,n.translate,n.scale,n.originPoint)}const Ar=.999999999999,Er=1.0000000000001;function cu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Kt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Cr(t,r)),s&&Vt(o.latestValues)&&Kt(t,o.latestValues))}e.x<Er&&e.x>Ar&&(e.x=1),e.y<Er&&e.y>Ar&&(e.y=1)}function zt(t,e){t.min=t.min+e,t.max=t.max+e}function Rr(t,e,n,s,i=.5){const o=N(t.min,t.max,i);es(t,e,n,o,s)}function Kt(t,e){Rr(t.x,e.x,e.scaleX,e.scale,e.originX),Rr(t.y,e.y,e.scaleY,e.scale,e.originY)}function Mr(t,e){return wr(lu(t.getBoundingClientRect(),e))}function uu(t,e,n){const s=Mr(t,n),{scroll:i}=e;return i&&(zt(s.x,i.offset.x),zt(s.y,i.offset.y)),s}const Dr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yt=()=>({x:Dr(),y:Dr()}),Vr=()=>({min:0,max:0}),_=()=>({x:Vr(),y:Vr()}),ns={current:null},jr={current:!1};function fu(){if(jr.current=!0,!!tn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ns.current=t.matches;t.addEventListener("change",e),e()}else ns.current=!1}const du=new WeakMap;function hu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(K(i))t.addValue(s,i);else if(K(o))t.addValue(s,$t(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,$t(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const kr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class mu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Nn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=()=>{const d=Z.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,k.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ke(n),this.isVariantNode=lr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&K(h)&&h.set(l[d])}}mount(e){this.current=e,du.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((n,s)=>this.bindToMotionValue(s,n)),jr.current||fu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ns.current,process.env.NODE_ENV!=="production"&&an(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),xt(this.notifyUpdate),xt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=_t.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}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 Wt){const n=Wt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<kr.length;s++){const i=kr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=hu(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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=$t(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ks(s)||Hs(s))?s=parseFloat(s):!Cc(s)&&wt.test(n)&&(s=Ki(e,n)),this.setBaseTarget(e,K(s)?s.get():s)),K(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Xn(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!K(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new on),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){_n.render(this.render)}}class Or extends mu{constructor(){super(...arguments),this.KeyframeResolver=hc}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;K(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Nr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function pu(t){return window.getComputedStyle(t)}class gu extends Or{constructor(){super(...arguments),this.type="html",this.renderInstance=Nr}readValueFromInstance(e,n){if(_t.has(n))return this.projection?.isProjecting?Dn(n):jl(e,n);{const s=pu(e),i=(fn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Mr(e,n)}build(e,n,s){Yn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return qn(e,n,s)}}const Ir=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"]);function yu(t,e,n,s){Nr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ir.has(i)?i:Zn(i),e.attrs[i])}class vu extends Or{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_t.has(n)){const s=zi(n);return s&&s.default||0}return n=Ir.has(n)?n:Zn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return yr(e,n,s)}build(e,n,s){dr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){yu(e,n,s,i)}mount(e){this.isSVGTag=mr(e.tagName),super.mount(e)}}const xu=(t,e)=>Gn(t)?new vu(e):new gu(e,{allowProjection:t!==S.Fragment});function Ht(t,e,n){const s=t.getProps();return Xn(s,e,n!==void 0?n:s.custom,t)}const ss=t=>Array.isArray(t);function bu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,$t(n))}function wu(t){return ss(t)?t[t.length-1]||0:t}function Tu(t,e){const n=Ht(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=wu(o[r]);bu(t,r,a)}}function Su(t){return!!(K(t)&&t.add)}function is(t,e){const n=t.getValue("willChange");if(Su(n))return n.add(e);if(!n&&vt.WillChange){const s=new vt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Lr(t){return t.props[vr]}const Pu=t=>t!==null;function Cu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Pu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Au={type:"spring",stiffness:500,damping:25,restSpeed:10},Eu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ru={type:"keyframes",duration:.8},Mu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Du=(t,{keyframes:e})=>e.length>2?Ru:_t.has(t)?t.startsWith("scale")?Eu(e[1]):Au:Mu;function Vu({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const rs=(t,e,n,s={},i,o)=>r=>{const a=Ln(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-it(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Vu(a)||Object.assign(c,Du(t,c)),c.duration&&(c.duration=it(c.duration)),c.repeatDelay&&(c.repeatDelay=it(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(In(c),c.delay===0&&(f=!0)),(vt.instantAnimations||vt.skipAnimations)&&(f=!0,In(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const d=Cu(c.keyframes,a);if(d!==void 0){k.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new En(c):new ec(c)};function ju({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Fr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const f=t.getValue(c,t.latestValues[c]??null),d=a[c];if(d===void 0||u&&ju(u,c))continue;const h={delay:n,...Ln(o||{},c)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=Lr(t);if(y){const w=window.MotionHandoffAnimation(y,c,k);w!==null&&(h.startTime=w,g=!0)}}is(t,c),f.start(rs(c,f,d,t.shouldReduceMotion&&Bi.has(c)?{type:!1}:h,t,g));const v=f.animation;v&&l.push(v)}return r&&Promise.all(l).then(()=>{k.update(()=>{r&&Tu(t,r)})}),l}function Br(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function os(t,e,n={}){const s=Ht(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Fr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return ku(t,e,l,u,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function ku(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(os(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Br(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Ou(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>os(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=os(t,e,n);else{const i=typeof e=="function"?Ht(t,e,n.custom):e;s=Promise.all(Fr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function _r(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Nu=Kn.length;function $r(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?$r(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Nu;n++){const s=Kn[n],i=t.props[s];(le(i)||i===!1)&&(e[s]=i)}return e}const Iu=[...zn].reverse(),Lu=zn.length;function Fu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ou(t,n,s)))}function Bu(t){let e=Fu(t),n=Wr(),s=!0;const i=l=>(u,c)=>{const f=Ht(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...m}=f;u={...u,...m,...h}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=$r(t.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let v=0;v<Lu;v++){const y=Iu[v],w=n[y],x=u[y]!==void 0?u[y]:c[y],C=le(x),T=y===l?w.isActive:null;T===!1&&(m=v);let R=x===c[y]&&x!==u[y]&&C;if(R&&s&&t.manuallyAnimateOnMount&&(R=!1),w.protectedKeys={...h},!w.isActive&&T===null||!x&&!w.prevProp||je(x)||typeof x=="boolean")continue;const E=_u(w.prevProp,x);let A=E||y===l&&w.isActive&&!R&&C||v>m&&C,j=!1;const O=Array.isArray(x)?x:[x];let W=O.reduce(i(y),{});T===!1&&(W={});const{prevResolvedValues:at={}}=w,st={...at,...W},mt=L=>{A=!0,d.has(L)&&(j=!0,d.delete(L)),w.needsAnimating[L]=!0;const V=t.getValue(L);V&&(V.liveStyle=!1)};for(const L in st){const V=W[L],q=at[L];if(h.hasOwnProperty(L))continue;let b=!1;ss(V)&&ss(q)?b=!_r(V,q):b=V!==q,b?V!=null?mt(L):d.add(L):V!==void 0&&d.has(L)?mt(L):w.protectedKeys[L]=!0}w.prevProp=x,w.prevResolvedValues=W,w.isActive&&(h={...h,...W}),s&&t.blockInitialAnimation&&(A=!1);const Ct=R&&E;A&&(!Ct||j)&&f.push(...O.map(L=>{const V={type:y};if(typeof L=="string"&&s&&!Ct&&t.manuallyAnimateOnMount&&t.parent){const{parent:q}=t,b=Ht(q,L);if(q.enteringChildren&&b){const{delayChildren:D}=b.transition||{};V.delay=Br(q.enteringChildren,t,D)}}return{animation:L,options:V}}))}if(d.size){const v={};if(typeof u.initial!="boolean"){const y=Ht(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(v.transition=y.transition)}d.forEach(y=>{const w=t.getBaseTarget(y),x=t.getValue(y);x&&(x.liveStyle=!0),v[y]=w??null}),f.push({animation:v})}let g=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(f):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Wr(),s=!0}}}function _u(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!_r(e,t):!1}function jt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wr(){return{animate:jt(!0),whileInView:jt(),whileHover:jt(),whileTap:jt(),whileDrag:jt(),whileFocus:jt(),exit:jt()}}class Tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class $u extends Tt{constructor(e){super(e),e.animationState||(e.animationState=Bu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();je(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Wu=0;class Uu extends Tt{constructor(){super(...arguments),this.id=Wu++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const zu={animation:{Feature:$u},exit:{Feature:Uu}};function ue(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function fe(t){return{point:{x:t.pageX,y:t.pageY}}}const Ku=t=>e=>$n(e)&&t(e,fe(e));function de(t,e,n,s){return ue(t,e,Ku(n),s)}const Ur=1e-4,Yu=1-Ur,Hu=1+Ur,zr=.01,Gu=0-zr,Xu=0+zr;function X(t){return t.max-t.min}function qu(t,e,n){return Math.abs(t-e)<=n}function Kr(t,e,n,s=.5){t.origin=s,t.originPoint=N(e.min,e.max,t.origin),t.scale=X(n)/X(e),t.translate=N(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Yu&&t.scale<=Hu||isNaN(t.scale))&&(t.scale=1),(t.translate>=Gu&&t.translate<=Xu||isNaN(t.translate))&&(t.translate=0)}function he(t,e,n,s){Kr(t.x,e.x,n.x,s?s.originX:void 0),Kr(t.y,e.y,n.y,s?s.originY:void 0)}function Yr(t,e,n){t.min=n.min+e.min,t.max=t.min+X(e)}function Zu(t,e,n){Yr(t.x,e.x,n.x),Yr(t.y,e.y,n.y)}function Hr(t,e,n){t.min=e.min-n.min,t.max=t.min+X(e)}function me(t,e,n){Hr(t.x,e.x,n.x),Hr(t.y,e.y,n.y)}function tt(t){return[t("x"),t("y")]}const Gr=({current:t})=>t?t.ownerDocument.defaultView:null,Xr=(t,e)=>Math.abs(t-e);function Ju(t,e){const n=Xr(t.x,e.x),s=Xr(t.y,e.y);return Math.sqrt(n**2+s**2)}class qr{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=ls(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=Ju(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=d,{timestamp:v}=z;this.history.push({...g,timestamp:v});const{onStart:y,onMove:w}=this.handlers;h||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=as(h,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ls(d.type==="pointercancel"?this.lastMoveEventInfo:as(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,y),g&&g(d,y)},!$n(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=fe(e),l=as(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=z;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(e,ls(l,this.history)),this.removeListeners=te(de(this.contextWindow,"pointermove",this.handlePointerMove),de(this.contextWindow,"pointerup",this.handlePointerUp),de(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),xt(this.updatePoint)}}function as(t,e){return e?{point:e(t.point)}:t}function Zr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ls({point:t},e){return{point:t,delta:Zr(t,Jr(e)),offset:Zr(t,Qu(e)),velocity:tf(e,.1)}}function Qu(t){return t[0]}function Jr(t){return t[t.length-1]}function tf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Jr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>it(e)));)n--;if(!s)return{x:0,y:0};const o=ct(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function ef(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?N(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?N(n,t,s.max):Math.min(t,n)),t}function Qr(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function nf(t,{top:e,left:n,bottom:s,right:i}){return{x:Qr(t.x,n,i),y:Qr(t.y,e,s)}}function to(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function sf(t,e){return{x:to(t.x,e.x),y:to(t.y,e.y)}}function rf(t,e){let n=.5;const s=X(t),i=X(e);return i>s?n=ee(e.min,e.max-s,t.min):s>i&&(n=ee(t.min,t.max-i,e.min)),gt(0,1,n)}function of(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const cs=.35;function af(t=cs){return t===!1?t=0:t===!0&&(t=cs),{x:eo(t,"left","right"),y:eo(t,"top","bottom")}}function eo(t,e,n){return{min:no(t,e),max:no(t,n)}}function no(t,e){return typeof t=="number"?t:t[e]||0}const lf=new WeakMap;class cf{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=_(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(fe(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yc(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tt(y=>{let w=this.getAxisMotionValue(y).get()||0;if(ut.test(w)){const{projection:x}=this.visualElement;if(x&&x.layout){const C=x.layout.layoutBox[y];C&&(w=X(C)*(parseFloat(w)/100))}}this.originPoint[y]=w}),g&&k.postRender(()=>g(f,d)),is(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=d;if(m&&this.currentDirection===null){this.currentDirection=uf(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),v&&v(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>tt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qr(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Gr(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&k.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ie(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=ef(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Ut(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=nf(s.layoutBox,e):this.constraints=!1,this.elastic=af(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&tt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=of(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ut(e))return!1;const s=e.current;yt(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=uu(s,i.root,this.visualElement.getTransformPagePoint());let r=sf(i.layout.layoutBox,o);if(n){const a=n(au(r));this.hasMutatedConstraints=!!a,a&&(r=wr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=tt(c=>{if(!Ie(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return is(this.visualElement,e),s.start(rs(e,s,0,n,this.visualElement,!1))}stopAnimation(){tt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){tt(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){tt(n=>{const{drag:s}=this.getProps();if(!Ie(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-N(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ut(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};tt(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=rf({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),tt(r=>{if(!Ie(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(N(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;lf.set(this.visualElement,this);const e=this.visualElement.current,n=de(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Ut(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),k.read(s);const r=ue(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(tt(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=cs,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ie(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function uf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ff extends Tt{constructor(e){super(e),this.removeGroupControls=Q,this.removeListeners=Q,this.controls=new cf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Q}unmount(){this.removeGroupControls(),this.removeListeners()}}const so=t=>(e,n)=>{t&&k.postRender(()=>t(e,n))};class df extends Tt{constructor(){super(...arguments),this.removePointerDownListener=Q}onPointerDown(e){this.session=new qr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:so(e),onStart:so(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&k.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=de(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Le={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function io(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const pe={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const n=io(t,e.target.x),s=io(t,e.target.y);return`${n}% ${s}%`}},hf={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=wt.parse(t);if(i.length>5)return s;const o=wt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=N(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let us=!1;class mf extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Ic(pf),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),us&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Le.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,us=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||k.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),_n.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;us=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ro(t){const[e,n]=nr(),s=S.useContext(Je);return p.jsx(mf,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(xr),isPresent:e,safeToRemove:n})}const pf={borderRadius:{...pe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pe,borderTopRightRadius:pe,borderBottomLeftRadius:pe,borderBottomRightRadius:pe,boxShadow:hf};function gf(t,e,n){const s=K(t)?t:$t(t);return s.start(rs("",s,e,n)),s.animation}const yf=(t,e)=>t.depth-e.depth;class vf{constructor(){this.children=[],this.isDirty=!1}add(e){en(this.children,e),this.isDirty=!0}remove(e){nn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(yf),this.isDirty=!1,this.children.forEach(e)}}function xf(t,e){const n=Z.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(xt(s),t(o-e))};return k.setup(s,!0),()=>xt(s)}const oo=["TopLeft","TopRight","BottomLeft","BottomRight"],bf=oo.length,ao=t=>typeof t=="string"?parseFloat(t):t,lo=t=>typeof t=="number"||M.test(t);function wf(t,e,n,s,i,o){i?(t.opacity=N(0,n.opacity??1,Tf(s)),t.opacityExit=N(e.opacity??1,0,Sf(s))):o&&(t.opacity=N(e.opacity??1,n.opacity??1,s));for(let r=0;r<bf;r++){const a=`border${oo[r]}Radius`;let l=co(e,a),u=co(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||lo(l)===lo(u)?(t[a]=Math.max(N(ao(l),ao(u),s),0),(ut.test(u)||ut.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=N(e.rotate||0,n.rotate||0,s))}function co(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Tf=uo(0,.5,ni),Sf=uo(.5,.95,Q);function uo(t,e,n){return s=>s<t?0:s>e?1:n(ee(t,e,s))}function fo(t,e){t.min=e.min,t.max=e.max}function et(t,e){fo(t.x,e.x),fo(t.y,e.y)}function ho(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function mo(t,e,n,s,i){return t-=e,t=Ne(t,1/n,s),i!==void 0&&(t=Ne(t,1/i,s)),t}function Pf(t,e=0,n=1,s=.5,i,o=t,r=t){if(ut.test(e)&&(e=parseFloat(e),e=N(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=N(o.min,o.max,s);t===o&&(a-=e),t.min=mo(t.min,e,n,a,i),t.max=mo(t.max,e,n,a,i)}function po(t,e,[n,s,i],o,r){Pf(t,e[n],e[s],e[i],e.scale,o,r)}const Cf=["x","scaleX","originX"],Af=["y","scaleY","originY"];function go(t,e,n,s){po(t.x,e,Cf,n?n.x:void 0,s?s.x:void 0),po(t.y,e,Af,n?n.y:void 0,s?s.y:void 0)}function yo(t){return t.translate===0&&t.scale===1}function vo(t){return yo(t.x)&&yo(t.y)}function xo(t,e){return t.min===e.min&&t.max===e.max}function Ef(t,e){return xo(t.x,e.x)&&xo(t.y,e.y)}function bo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function wo(t,e){return bo(t.x,e.x)&&bo(t.y,e.y)}function To(t){return X(t.x)/X(t.y)}function So(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Rf{constructor(){this.members=[]}add(e){en(this.members,e),e.scheduleRender()}remove(e){if(nn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Mf(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),h&&(s+=`skewX(${h}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const fs=["","X","Y","Z"],Df=1e3;let Vf=0;function ds(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Po(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Lr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",k,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Po(s)}function Co({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Vf++,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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Of),this.nodes.forEach(Ff),this.nodes.forEach(Bf),this.nodes.forEach(Nf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new vf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new on),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=er(r)&&!Sc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,f=0;const d=()=>this.root.updateBlockedByResize=!1;k.read(()=>{f=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,c&&c(),c=xf(d,250),Le.hasAnimatedSinceResize&&(Le.hasAnimatedSinceResize=!1,this.nodes.forEach(Ro)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||zf,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!wo(this.targetLayout,h),w=!f&&d;if(this.options.layoutRoot||this.resumeFrom||w||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Ln(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,w)}else f||Ro(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xt(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(_f),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Po(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ao);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Eo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Lf),this.nodes.forEach(jf),this.nodes.forEach(kf)):this.nodes.forEach(Eo),this.clearAllSnapshots();const a=Z.now();z.delta=gt(0,1e3/60,a-z.timestamp),z.timestamp=a,z.isProcessing=!0,un.update.process(z),un.preRender.process(z),un.render.process(z),z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_n.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(If),this.sharedNodes.forEach($f)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!vo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Vt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Kf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return _();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Yf))){const{scroll:u}=this.root;u&&(zt(a.x,u.offset.x),zt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=_();if(et(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;u!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&et(a,r),zt(a.x,c.offset.x),zt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=_();et(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Kt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Vt(c.latestValues)&&Kt(l,c.latestValues)}return Vt(this.latestValues)&&Kt(l,this.latestValues),l}removeTransform(r){const a=_();et(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Vt(u.latestValues))continue;ts(u.latestValues)&&u.updateSnapshot();const c=_(),f=u.measurePageBox();et(c,f),go(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Vt(this.latestValues)&&go(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}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!==z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=z.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_(),this.relativeTargetOrigin=_(),me(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_(),this.targetWithTransforms=_()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):et(this.target,this.layout.layoutBox),Cr(this.target,this.targetDelta)):et(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_(),this.relativeTargetOrigin=_(),me(this.relativeTargetOrigin,this.target,d.target),et(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ts(this.parent.latestValues)||Tr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===z.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;et(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;cu(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=_());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ho(this.prevProjectionDelta.x,this.projectionDelta.x),ho(this.prevProjectionDelta.y,this.projectionDelta.y)),he(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!So(this.projectionDelta.x,this.prevProjectionDelta.x)||!So(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Yt(),this.projectionDelta=Yt(),this.projectionDeltaWithTransform=Yt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Yt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=_(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,v=this.getStack(),y=!v||v.members.length<=1,w=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Uf));this.animationProgress=0;let x;this.mixTargetDelta=C=>{const T=C/1e3;Mo(f.x,r.x,T),Mo(f.y,r.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(me(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wf(this.relativeTarget,this.relativeTargetOrigin,d,T),x&&Ef(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=_()),et(x,this.relativeTarget)),g&&(this.animationValues=c,wf(c,u,this.latestValues,T,w,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=k.update(()=>{Le.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$t(0)),this.currentAnimation=gf(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Df),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Oo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||_();const f=X(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const d=X(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}et(a,l),Kt(a,c),he(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Rf),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ds("z",r,u,this.animationValues);for(let c=0;c<fs.length;c++)ds(`rotate${fs[c]}`,r,u,this.animationValues),ds(`skew${fs[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Oe(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Oe(a?.pointerEvents)||""),this.hasProjected&&!Vt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Mf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in ce){if(c[m]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:y}=ce[m],w=f==="none"?c[m]:g(c[m],u);if(v){const x=v.length;for(let C=0;C<x;C++)r[v[C]]=w}else y?this.options.visualElement.renderState.vars[m]=w:r[m]=w}this.options.layoutId&&(r.pointerEvents=u===this?Oe(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Ao),this.root.sharedNodes.clear()}}}function jf(t){t.updateLayout()}function kf(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?tt(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=X(f);f.min=n[c].min,f.max=f.min+d}):Oo(i,e.layoutBox,n)&&tt(c=>{const f=o?e.measuredBox[c]:e.layoutBox[c],d=X(n[c]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+d)});const r=Yt();he(r,n,e.layoutBox);const a=Yt();o?he(a,t.applyTransform(s,!0),e.measuredBox):he(a,n,e.layoutBox);const l=!vo(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:d}=c;if(f&&d){const h=_();me(h,e.layoutBox,f.layoutBox);const m=_();me(m,n,d.layoutBox),wo(h,m)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=h,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Of(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Nf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function If(t){t.clearSnapshot()}function Ao(t){t.clearMeasurements()}function Eo(t){t.isLayoutDirty=!1}function Lf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ro(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ff(t){t.resolveTargetDelta()}function Bf(t){t.calcProjection()}function _f(t){t.resetSkewAndRotation()}function $f(t){t.removeLeadSnapshot()}function Mo(t,e,n){t.translate=N(e.translate,0,n),t.scale=N(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Do(t,e,n,s){t.min=N(e.min,n.min,s),t.max=N(e.max,n.max,s)}function Wf(t,e,n,s){Do(t.x,e.x,n.x,s),Do(t.y,e.y,n.y,s)}function Uf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const zf={duration:.45,ease:[.4,0,.1,1]},Vo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),jo=Vo("applewebkit/")&&!Vo("chrome/")?Math.round:Q;function ko(t){t.min=jo(t.min),t.max=jo(t.max)}function Kf(t){ko(t.x),ko(t.y)}function Oo(t,e,n){return t==="position"||t==="preserve-aspect"&&!qu(To(e),To(n),.2)}function Yf(t){return t!==t.root&&t.scroll?.wasRoot}const Hf=Co({attachResizeListener:(t,e)=>ue(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hs={current:void 0},No=Co({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!hs.current){const t=new Hf({});t.mount(window),t.setOptions({layoutScroll:!0}),hs.current=t}return hs.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Gf={pan:{Feature:df},drag:{Feature:ff,ProjectionNode:No,MeasureLayout:ro}};function Io(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&k.postRender(()=>o(e,fe(e)))}class Xf extends Tt{mount(){const{current:e}=this.node;e&&(this.unmount=vc(e,(n,s)=>(Io(this.node,s,"Start"),i=>Io(this.node,i,"End"))))}unmount(){}}class qf extends Tt{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=te(ue(this.node.current,"focus",()=>this.onFocus()),ue(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Lo(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&k.postRender(()=>o(e,fe(e)))}class Zf extends Tt{mount(){const{current:e}=this.node;e&&(this.unmount=Tc(e,(n,s)=>(Lo(this.node,s,"Start"),(i,{success:o})=>Lo(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ms=new WeakMap,ps=new WeakMap,Jf=t=>{const e=ms.get(t.target);e&&e(t)},Qf=t=>{t.forEach(Jf)};function td({root:t,...e}){const n=t||document;ps.has(n)||ps.set(n,{});const s=ps.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Qf,{root:t,...e})),s[i]}function ed(t,e,n){const s=td(e);return ms.set(t,n),s.observe(t),()=>{ms.delete(t),s.unobserve(t)}}const nd={some:0,all:1};class sd extends Tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:nd[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return ed(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(id(e,n))&&this.startObserver()}unmount(){}}function id({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const rd={...zu,...{inView:{Feature:sd},tap:{Feature:Zf},focus:{Feature:qf},hover:{Feature:Xf}},...Gf,...{layout:{ProjectionNode:No,MeasureLayout:ro}}},gs=ou(rd,xu),od=["polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)","polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)","polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)","polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"],ad=t=>{const{speed:e=1,className:n}=t,s=1/e,i=2/e;return p.jsx(ir,{children:p.jsx(gs.div,{role:"status",className:B("relative rounded-full",n),animate:{rotate:360},transition:{repeat:1/0,ease:"linear",duration:s},children:p.jsx(gs.div,{className:"absolute inset-0 rounded-full",style:{boxSizing:"border-box",borderStyle:"solid",borderWidth:2},animate:{clipPath:od},transition:{repeat:1/0,ease:"linear",duration:i,times:[0,.25,.5,.75,1]}})})})},ld=`
31
+ inline-flex flex-row items-center justify-center
32
+ button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
33
+ rounded-[var(--border-radius-input)]
34
+ cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
35
+ disabled:cursor-default
36
+ `,cd={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},ud={sm:"h-10 px-4",md:"h-12 px-6",lg:"h-14 px-8"},fd=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,children:o,loading:r=!1,...a}=t;return p.jsxs("button",{ref:e,className:B(ld,cd[n],ud[s],i),...a,children:[r&&p.jsx(ad,{className:"h-5 w-5"}),!r&&p.jsx(p.Fragment,{children:o})]})}),dd=`
37
+ inline-flex flex-row items-center justify-center aspect-square
38
+ button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
39
+ rounded-[var(--border-radius-input)]
40
+ cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
41
+ disabled:cursor-default
42
+ `,hd={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},md={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},Fo=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return p.jsx("button",{ref:e,className:B(dd,hd[n],md[s],i),...r,children:p.jsx(o,{className:"h-5 w-5"})})}),pd=`
43
+ inline-flex flex-row items-center justify-center aspect-square
44
+ button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1 rounded-full cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
45
+ disabled:cursor-default
46
+ `,gd={primary:"border button-primary shadow-sm",secondary:"border button-secondary shadow-sm",tertiary:"border button-tertiary",white:"border button-white shadow-sm",black:"border button-black shadow-sm",transparent:"border button-transparent"},yd={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},vd=P.forwardRef((t,e)=>{const{variant:n="white",size:s="md",className:i,Icon:o,...r}=t;return p.jsx("button",{ref:e,className:B(pd,gd[n],yd[s],i),...r,children:p.jsx(o,{className:"h-5 w-5"})})});/**
47
+ * @license @tabler/icons-react v3.34.1 - MIT
48
+ *
49
+ * This source code is licensed under the MIT license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */var xd={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
52
+ * @license @tabler/icons-react v3.34.1 - MIT
53
+ *
54
+ * This source code is licensed under the MIT license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const kt=(t,e,n,s)=>{const i=S.forwardRef(({color:o="currentColor",size:r=24,stroke:a=2,title:l,className:u,children:c,...f},d)=>S.createElement("svg",{ref:d,...xd[t],width:r,height:r,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),...t==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...f},[l&&S.createElement("title",{key:"svg-title"},l),...s.map(([h,m])=>S.createElement(h,m)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};/**
57
+ * @license @tabler/icons-react v3.34.1 - MIT
58
+ *
59
+ * This source code is licensed under the MIT license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const bd=kt("outline","check","Check",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
62
+ * @license @tabler/icons-react v3.34.1 - MIT
63
+ *
64
+ * This source code is licensed under the MIT license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const Bo=kt("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
67
+ * @license @tabler/icons-react v3.34.1 - MIT
68
+ *
69
+ * This source code is licensed under the MIT license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const wd=kt("outline","search","Search",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
72
+ * @license @tabler/icons-react v3.34.1 - MIT
73
+ *
74
+ * This source code is licensed under the MIT license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const Td=kt("outline","settings","Settings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
77
+ * @license @tabler/icons-react v3.34.1 - MIT
78
+ *
79
+ * This source code is licensed under the MIT license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const _o=kt("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
82
+ * @license @tabler/icons-react v3.34.1 - MIT
83
+ *
84
+ * This source code is licensed under the MIT license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Sd=kt("filled","exclamation-circle-filled","ExclamationCircleFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-5 11.66a1 1 0 0 0 -1 1v.01a1 1 0 0 0 2 0v-.01a1 1 0 0 0 -1 -1m0 -7a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1",key:"svg-0"}]]);/**
87
+ * @license @tabler/icons-react v3.34.1 - MIT
88
+ *
89
+ * This source code is licensed under the MIT license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const Pd=kt("filled","mail-filled","MailFilled",[["path",{d:"M22 7.535v9.465a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-9.465l9.445 6.297l.116 .066a1 1 0 0 0 .878 0l.116 -.066l9.445 -6.297z",key:"svg-0"}],["path",{d:"M19 4c1.08 0 2.027 .57 2.555 1.427l-9.555 6.37l-9.555 -6.37a2.999 2.999 0 0 1 2.354 -1.42l.201 -.007h14z",key:"svg-1"}]]),ys=t=>{const{children:e}=t;return e?p.jsx("label",{className:"text-gray-900 font-medium mb-1",children:e}):null},vs=()=>p.jsx("div",{className:"h-5 w-5",children:p.jsx(Sd,{className:"h-5 w-5 text-red-600"})}),xs=t=>{const{children:e,className:n}=t;return p.jsx("div",{className:B("absolute top-1/2 -translate-y-1/2 right-3.5 flex flex-row items-center gap-1",n),children:e})},Fe=t=>{const{children:e}=t;return e?p.jsx("div",{className:"text-gray-500 text-sm font-medium mt-2",children:e}):null},Be=t=>{const{children:e}=t;return e?p.jsx("div",{className:"text-red-600 text-sm font-medium mt-2",children:e}):null},$o=t=>{const{className:e,label:n,description:s,Icon:i,error:o,buttonTray:r,...a}=t;return p.jsxs("div",{className:B("flex flex-col",e),children:[p.jsx(ys,{children:n}),p.jsxs("div",{className:"flex flex-col relative",children:[i&&p.jsx(i,{className:"h-5 w-5 text-gray-900/60 absolute left-4 top-1/2 -translate-y-1/2"}),p.jsx("input",{className:B("h-12 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none",i?"pl-12 pr-4":"px-4",o&&"border-red-600 focus:ring-red-600/20 !pr-10"),...a}),p.jsxs(xs,{children:[o&&p.jsx(vs,{}),r]})]}),p.jsx(Fe,{children:s}),p.jsx(Be,{children:o})]})},Cd=t=>{const{className:e,label:n,description:s,error:i,...o}=t;return p.jsxs("div",{className:B("flex flex-col",e),children:[p.jsxs("div",{className:"flex flex-row gap-3",children:[p.jsx("input",{type:"checkbox",className:"h-6 w-6 shrink-0 rounded-lg border border-gray-300 shadow-sm ring-0 hover:ring-4 focus:ring-4 ring-gray-900/10 ring-offset-0 focus:outline-0 transition-all duration-150",...o}),n&&p.jsx("label",{htmlFor:t.id,className:B("text-gray-900 font-medium mb-1",t.id&&"cursor-pointer"),children:n})]}),p.jsx(Fe,{children:s}),p.jsx(Be,{children:i})]})},Ad=t=>{const{children:e,onClick:n,selected:s,disabled:i=!1}=t;return p.jsxs("div",{onClick:()=>!i&&n&&n(),className:B("hover:bg-gray-100 active:bg-gray-200 px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",s&&!i&&"bg-blue-50 hover:bg-blue-100 active:bg-blue-100",i&&"text-gray-400 cursor-not-allowed hover:bg-transparent active:bg-transparent"),children:[p.jsx("div",{className:"flex-1",children:e}),s&&!i&&p.jsx("div",{className:"shrink-0",children:p.jsx(bd,{className:"h-5 w-5"})})]})};function _e(){return typeof window<"u"}function Gt(t){return bs(t)?(t.nodeName||"").toLowerCase():"#document"}function J(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ft(t){var e;return(e=(bs(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function bs(t){return _e()?t instanceof Node||t instanceof J(t).Node:!1}function Y(t){return _e()?t instanceof Element||t instanceof J(t).Element:!1}function dt(t){return _e()?t instanceof HTMLElement||t instanceof J(t).HTMLElement:!1}function ws(t){return!_e()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof J(t).ShadowRoot}const Ed=new Set(["inline","contents"]);function ge(t){const{overflow:e,overflowX:n,overflowY:s,display:i}=ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!Ed.has(i)}const Rd=new Set(["table","td","th"]);function Md(t){return Rd.has(Gt(t))}const Dd=[":popover-open",":modal"];function $e(t){return Dd.some(e=>{try{return t.matches(e)}catch{return!1}})}const Vd=["transform","translate","scale","rotate","perspective"],jd=["transform","translate","scale","rotate","perspective","filter"],kd=["paint","layout","strict","content"];function Ts(t){const e=Ss(),n=Y(t)?ot(t):t;return Vd.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||jd.some(s=>(n.willChange||"").includes(s))||kd.some(s=>(n.contain||"").includes(s))}function Od(t){let e=St(t);for(;dt(e)&&!Xt(e);){if(Ts(e))return e;if($e(e))return null;e=St(e)}return null}function Ss(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Nd=new Set(["html","body","#document"]);function Xt(t){return Nd.has(Gt(t))}function ot(t){return J(t).getComputedStyle(t)}function We(t){return Y(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function St(t){if(Gt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ws(t)&&t.host||ft(t);return ws(e)?e.host:e}function Wo(t){const e=St(t);return Xt(e)?t.ownerDocument?t.ownerDocument.body:t.body:dt(e)&&ge(e)?e:Wo(e)}function ye(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Wo(t),o=i===((s=t.ownerDocument)==null?void 0:s.body),r=J(i);if(o){const a=Ps(r);return e.concat(r,r.visualViewport||[],ge(i)?i:[],a&&n?ye(a):[])}return e.concat(i,ye(i,[],n))}function Ps(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const ve=Math.min,nt=Math.max,Ue=Math.round,ze=Math.floor,ht=t=>({x:t,y:t});function Uo(t,e){return typeof t=="function"?t(e):t}function Cs(t){return t.split("-")[0]}function zo(t){return t.split("-")[1]}function Id(t){return t==="x"?"y":"x"}function Ld(t){return t==="y"?"height":"width"}const Fd=new Set(["top","bottom"]);function As(t){return Fd.has(Cs(t))?"y":"x"}function Bd(t){return Id(As(t))}function _d(t){return{top:0,right:0,bottom:0,left:0,...t}}function $d(t){return typeof t!="number"?_d(t):{top:t,right:t,bottom:t,left:t}}function Ke(t){const{x:e,y:n,width:s,height:i}=t;return{width:s,height:i,top:n,left:e,right:e+s,bottom:n+i,x:e,y:n}}/*!
92
+ * tabbable 6.2.0
93
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
94
+ */var Wd=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Es=Wd.join(","),Ko=typeof Element>"u",xe=Ko?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ye=!Ko&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},He=function t(e,n){var s;n===void 0&&(n=!0);var i=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),o=i===""||i==="true",r=o||n&&e&&t(e.parentNode);return r},Ud=function(e){var n,s=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return s===""||s==="true"},zd=function(e,n,s){if(He(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Es));return n&&xe.call(e,Es)&&i.unshift(e),i=i.filter(s),i},Kd=function t(e,n,s){for(var i=[],o=Array.from(e);o.length;){var r=o.shift();if(!He(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,u=t(l,!0,s);s.flatten?i.push.apply(i,u):i.push({scopeParent:r,candidates:u})}else{var c=xe.call(r,Es);c&&s.filter(r)&&(n||!e.includes(r))&&i.push(r);var f=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),d=!He(f,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(f&&d){var h=t(f===!0?r.children:f.children,!0,s);s.flatten?i.push.apply(i,h):i.push({scopeParent:r,candidates:h})}else o.unshift.apply(o,r.children)}}return i},Yo=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ho=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ud(e))&&!Yo(e)?0:e.tabIndex},Yd=function(e,n){var s=Ho(e);return s<0&&n&&!Yo(e)?0:s},Hd=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Go=function(e){return e.tagName==="INPUT"},Gd=function(e){return Go(e)&&e.type==="hidden"},Xd=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return n},qd=function(e,n){for(var s=0;s<e.length;s++)if(e[s].checked&&e[s].form===n)return e[s]},Zd=function(e){if(!e.name)return!0;var n=e.form||Ye(e),s=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=s(window.CSS.escape(e.name));else try{i=s(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var o=qd(i,e.form);return!o||o===e},Jd=function(e){return Go(e)&&e.type==="radio"},Qd=function(e){return Jd(e)&&!Zd(e)},th=function(e){var n,s=e&&Ye(e),i=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==e){var r,a,l;for(o=!!((r=i)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&i;){var u,c,f;s=Ye(i),i=(u=s)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},Xo=function(e){var n=e.getBoundingClientRect(),s=n.width,i=n.height;return s===0&&i===0},eh=function(e,n){var s=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=xe.call(e,"details>summary:first-of-type"),r=o?e.parentElement:e;if(xe.call(r,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof i=="function"){for(var a=e;e;){var l=e.parentElement,u=Ye(e);if(l&&!l.shadowRoot&&i(l)===!0)return Xo(e);e.assignedSlot?e=e.assignedSlot:!l&&u!==e.ownerDocument?e=u.host:e=l}e=a}if(th(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return Xo(e);return!1},nh=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var s=0;s<n.children.length;s++){var i=n.children.item(s);if(i.tagName==="LEGEND")return xe.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},sh=function(e,n){return!(n.disabled||He(n)||Gd(n)||eh(n,e)||Xd(n)||nh(n))},qo=function(e,n){return!(Qd(n)||Ho(n)<0||!sh(e,n))},ih=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},rh=function t(e){var n=[],s=[];return e.forEach(function(i,o){var r=!!i.scopeParent,a=r?i.scopeParent:i,l=Yd(a,r),u=r?t(i.candidates):a;l===0?r?n.push.apply(n,u):n.push(a):s.push({documentOrder:o,tabIndex:l,item:i,isScope:r,content:u})}),s.sort(Hd).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Zo=function(e,n){n=n||{};var s;return n.getShadowRoot?s=Kd([e],n.includeContainer,{filter:qo.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ih}):s=zd(e,n.includeContainer,qo.bind(null,n)),rh(s)};function oh(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function ah(){return/apple/i.test(navigator.vendor)}function lh(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function ch(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&ws(n)){let s=e;for(;s;){if(t===s)return!0;s=s.parentNode||s.host}}return!1}function Rs(t){return t?.ownerDocument||document}var uh=typeof document<"u",fh=function(){},Pt=uh?S.useLayoutEffect:fh;const dh={...P}.useInsertionEffect||(t=>t());function hh(t){const e=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return dh(()=>{e.current=t}),P.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return e.current==null?void 0:e.current(...s)},[])}const Jo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Qo(t,e){const n=Zo(t,Jo()),s=n.length;if(s===0)return;const i=lh(Rs(t)),o=n.indexOf(i),r=o===-1?e===1?0:s-1:o+e;return n[r]}function mh(t){return Qo(Rs(t).body,1)||t}function ph(t){return Qo(Rs(t).body,-1)||t}function Ms(t,e){const n=e||t.currentTarget,s=t.relatedTarget;return!s||!ch(n,s)}function gh(t){Zo(t,Jo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ta(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function ea(t,e,n){let{reference:s,floating:i}=t;const o=As(e),r=Bd(e),a=Ld(r),l=Cs(e),u=o==="y",c=s.x+s.width/2-i.width/2,f=s.y+s.height/2-i.height/2,d=s[a]/2-i[a]/2;let h;switch(l){case"top":h={x:c,y:s.y-i.height};break;case"bottom":h={x:c,y:s.y+s.height};break;case"right":h={x:s.x+s.width,y:f};break;case"left":h={x:s.x-i.width,y:f};break;default:h={x:s.x,y:s.y}}switch(zo(e)){case"start":h[r]-=d*(n&&u?-1:1);break;case"end":h[r]+=d*(n&&u?-1:1);break}return h}const yh=async(t,e,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:f}=ea(u,s,l),d=s,h={},m=0;for(let g=0;g<a.length;g++){const{name:v,fn:y}=a[g],{x:w,y:x,data:C,reset:T}=await y({x:c,y:f,initialPlacement:s,placement:d,strategy:i,middlewareData:h,rects:u,platform:r,elements:{reference:t,floating:e}});c=w??c,f=x??f,h={...h,[v]:{...h[v],...C}},T&&m<=50&&(m++,typeof T=="object"&&(T.placement&&(d=T.placement),T.rects&&(u=T.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):T.rects),{x:c,y:f}=ea(u,d,l)),g=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:h}};async function vh(t,e){var n;e===void 0&&(e={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Uo(e,t),m=$d(h),v=a[d?f==="floating"?"reference":"floating":f],y=Ke(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},T=Ke(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(y.top-T.top+m.top)/C.y,bottom:(T.bottom-y.bottom+m.bottom)/C.y,left:(y.left-T.left+m.left)/C.x,right:(T.right-y.right+m.right)/C.x}}const xh=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,s;const{placement:i,rects:o,platform:r,elements:a}=e,{apply:l=()=>{},...u}=Uo(t,e),c=await vh(e,u),f=Cs(i),d=zo(i),h=As(i)==="y",{width:m,height:g}=o.floating;let v,y;f==="top"||f==="bottom"?(v=f,y=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,v=d==="end"?"top":"bottom");const w=g-c.top-c.bottom,x=m-c.left-c.right,C=ve(g-c[v],w),T=ve(m-c[y],x),R=!e.middlewareData.shift;let E=C,A=T;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(A=x),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(E=w),R&&!d){const O=nt(c.left,0),W=nt(c.right,0),at=nt(c.top,0),st=nt(c.bottom,0);h?A=m-2*(O!==0||W!==0?O+W:nt(c.left,c.right)):E=g-2*(at!==0||st!==0?at+st:nt(c.top,c.bottom))}await l({...e,availableWidth:A,availableHeight:E});const j=await r.getDimensions(a.floating);return m!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function na(t){const e=ot(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=dt(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=Ue(n)!==o||Ue(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function Ds(t){return Y(t)?t:t.contextElement}function qt(t){const e=Ds(t);if(!dt(e))return ht(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=na(e);let r=(o?Ue(n.width):n.width)/s,a=(o?Ue(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const bh=ht(0);function sa(t){const e=J(t);return!Ss()||!e.visualViewport?bh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function wh(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==J(t)?!1:e}function Ot(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Ds(t);let r=ht(1);e&&(s?Y(s)&&(r=qt(s)):r=qt(t));const a=wh(o,n,s)?sa(o):ht(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,f=i.height/r.y;if(o){const d=J(o),h=s&&Y(s)?J(s):s;let m=d,g=Ps(m);for(;g&&s&&h!==m;){const v=qt(g),y=g.getBoundingClientRect(),w=ot(g),x=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,C=y.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,f*=v.y,l+=x,u+=C,m=J(g),g=Ps(m)}}return Ke({width:c,height:f,x:l,y:u})}function Ge(t,e){const n=We(t).scrollLeft;return e?e.left+n:Ot(ft(t)).left+n}function ia(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-Ge(t,n),i=n.top+e.scrollTop;return{x:s,y:i}}function Th(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=ft(s),a=e?$e(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ht(1);const c=ht(0),f=dt(s);if((f||!f&&!o)&&((Gt(s)!=="body"||ge(r))&&(l=We(s)),dt(s))){const h=Ot(s);u=qt(s),c.x=h.x+s.clientLeft,c.y=h.y+s.clientTop}const d=r&&!f&&!o?ia(r,l):ht(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}}function Sh(t){return Array.from(t.getClientRects())}function Ph(t){const e=ft(t),n=We(t),s=t.ownerDocument.body,i=nt(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=nt(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+Ge(t);const a=-n.scrollTop;return ot(s).direction==="rtl"&&(r+=nt(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}const ra=25;function Ch(t,e){const n=J(t),s=ft(t),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Ss();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=Ge(s);if(u<=0){const c=s.ownerDocument,f=c.body,d=getComputedStyle(f),h=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(s.clientWidth-f.clientWidth-h);m<=ra&&(o-=m)}else u<=ra&&(o+=u);return{width:o,height:r,x:a,y:l}}const Ah=new Set(["absolute","fixed"]);function Eh(t,e){const n=Ot(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=dt(t)?qt(t):ht(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,u=s*o.y;return{width:r,height:a,x:l,y:u}}function oa(t,e,n){let s;if(e==="viewport")s=Ch(t,n);else if(e==="document")s=Ph(ft(t));else if(Y(e))s=Eh(e,n);else{const i=sa(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ke(s)}function aa(t,e){const n=St(t);return n===e||!Y(n)||Xt(n)?!1:ot(n).position==="fixed"||aa(n,e)}function Rh(t,e){const n=e.get(t);if(n)return n;let s=ye(t,[],!1).filter(a=>Y(a)&&Gt(a)!=="body"),i=null;const o=ot(t).position==="fixed";let r=o?St(t):t;for(;Y(r)&&!Xt(r);){const a=ot(r),l=Ts(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&Ah.has(i.position)||ge(r)&&!l&&aa(t,r))?s=s.filter(c=>c!==r):i=a,r=St(r)}return e.set(t,s),s}function Mh(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?$e(e)?[]:Rh(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((u,c)=>{const f=oa(e,c,i);return u.top=nt(f.top,u.top),u.right=ve(f.right,u.right),u.bottom=ve(f.bottom,u.bottom),u.left=nt(f.left,u.left),u},oa(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Dh(t){const{width:e,height:n}=na(t);return{width:e,height:n}}function Vh(t,e,n){const s=dt(e),i=ft(e),o=n==="fixed",r=Ot(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=ht(0);function u(){l.x=Ge(i)}if(s||!s&&!o)if((Gt(e)!=="body"||ge(i))&&(a=We(e)),s){const h=Ot(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&u();o&&!s&&i&&u();const c=i&&!s&&!o?ia(i,a):ht(0),f=r.left+a.scrollLeft-l.x-c.x,d=r.top+a.scrollTop-l.y-c.y;return{x:f,y:d,width:r.width,height:r.height}}function Vs(t){return ot(t).position==="static"}function la(t,e){if(!dt(t)||ot(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ft(t)===n&&(n=n.ownerDocument.body),n}function ca(t,e){const n=J(t);if($e(t))return n;if(!dt(t)){let i=St(t);for(;i&&!Xt(i);){if(Y(i)&&!Vs(i))return i;i=St(i)}return n}let s=la(t,e);for(;s&&Md(s)&&Vs(s);)s=la(s,e);return s&&Xt(s)&&Vs(s)&&!Ts(s)?n:s||Od(t)||n}const jh=async function(t){const e=this.getOffsetParent||ca,n=this.getDimensions,s=await n(t.floating);return{reference:Vh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function kh(t){return ot(t).direction==="rtl"}const Oh={convertOffsetParentRelativeRectToViewportRelativeRect:Th,getDocumentElement:ft,getClippingRect:Mh,getOffsetParent:ca,getElementRects:jh,getClientRects:Sh,getDimensions:Dh,getScale:qt,isElement:Y,isRTL:kh};function ua(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Nh(t,e){let n=null,s;const i=ft(t);function o(){var a;clearTimeout(s),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=t.getBoundingClientRect(),{left:c,top:f,width:d,height:h}=u;if(a||e(),!d||!h)return;const m=ze(f),g=ze(i.clientWidth-(c+d)),v=ze(i.clientHeight-(f+h)),y=ze(c),x={rootMargin:-m+"px "+-g+"px "+-v+"px "+-y+"px",threshold:nt(0,ve(1,l))||1};let C=!0;function T(R){const E=R[0].intersectionRatio;if(E!==l){if(!C)return r();E?r(!1,E):s=setTimeout(()=>{r(!1,1e-7)},1e3)}E===1&&!ua(u,t.getBoundingClientRect())&&r(),C=!1}try{n=new IntersectionObserver(T,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(t)}return r(!0),o}function Ih(t,e,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,u=Ds(t),c=i||o?[...u?ye(u):[],...ye(e)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&a?Nh(u,n):null;let d=-1,h=null;r&&(h=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),n()}),u&&!l&&h.observe(u),h.observe(e));let m,g=l?Ot(t):null;l&&v();function v(){const y=Ot(t);g&&!ua(g,y)&&n(),g=y,m=requestAnimationFrame(v)}return n(),()=>{var y;c.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Lh=xh,Fh=(t,e,n)=>{const s=new Map,i={platform:Oh,...n},o={...i.platform,_c:s};return yh(t,e,{...i,platform:o})};var Bh=typeof document<"u",_h=function(){},Xe=Bh?S.useLayoutEffect:_h;function qe(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,s,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(s=n;s--!==0;)if(!qe(t[s],e[s]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(e,i[s]))return!1;for(s=n;s--!==0;){const o=i[s];if(!(o==="_owner"&&t.$$typeof)&&!qe(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function fa(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function da(t,e){const n=fa(t);return Math.round(e*n)/n}function js(t){const e=P.useRef(t);return Xe(()=>{e.current=t}),e}function $h(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:o,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,f]=P.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=P.useState(s);qe(d,s)||h(s);const[m,g]=P.useState(null),[v,y]=P.useState(null),w=P.useCallback(V=>{V!==R.current&&(R.current=V,g(V))},[]),x=P.useCallback(V=>{V!==E.current&&(E.current=V,y(V))},[]),C=o||m,T=r||v,R=P.useRef(null),E=P.useRef(null),A=P.useRef(c),j=l!=null,O=js(l),W=js(i),at=js(u),st=P.useCallback(()=>{if(!R.current||!E.current)return;const V={placement:e,strategy:n,middleware:d};W.current&&(V.platform=W.current),Fh(R.current,E.current,V).then(q=>{const b={...q,isPositioned:at.current!==!1};mt.current&&!qe(A.current,b)&&(A.current=b,_s.flushSync(()=>{f(b)}))})},[d,e,n,W,at]);Xe(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[u]);const mt=P.useRef(!1);Xe(()=>(mt.current=!0,()=>{mt.current=!1}),[]),Xe(()=>{if(C&&(R.current=C),T&&(E.current=T),C&&T){if(O.current)return O.current(C,T,st);st()}},[C,T,st,O,j]);const Ct=P.useMemo(()=>({reference:R,floating:E,setReference:w,setFloating:x}),[w,x]),lt=P.useMemo(()=>({reference:C,floating:T}),[C,T]),L=P.useMemo(()=>{const V={position:n,left:0,top:0};if(!lt.floating)return V;const q=da(lt.floating,c.x),b=da(lt.floating,c.y);return a?{...V,transform:"translate("+q+"px, "+b+"px)",...fa(lt.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:b}},[n,a,lt.floating,c.x,c.y]);return P.useMemo(()=>({...c,update:st,refs:Ct,elements:lt,floatingStyles:L}),[c,st,Ct,lt,L])}const Wh=(t,e)=>({...Lh(t),options:[t,e]}),Uh={...P};let ha=!1,zh=0;const ma=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+zh++;function Kh(){const[t,e]=P.useState(()=>ha?ma():void 0);return Pt(()=>{t==null&&e(ma())},[]),P.useEffect(()=>{ha=!0},[]),t}const pa=Uh.useId||Kh;let ks;process.env.NODE_ENV!=="production"&&(ks=new Set);function Yh(){for(var t,e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];const i="Floating UI: "+n.join(" ");if(!((t=ks)!=null&&t.has(i))){var o;(o=ks)==null||o.add(i),console.error(i)}}function Hh(){const t=new Map;return{emit(e,n){var s;(s=t.get(e))==null||s.forEach(i=>i(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var s;(s=t.get(e))==null||s.delete(n)}}}const Gh=P.createContext(null),Xh=P.createContext(null),qh=()=>{var t;return((t=P.useContext(Gh))==null?void 0:t.id)||null},Zh=()=>P.useContext(Xh);function ga(t){return"data-floating-ui-"+t}const ya={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},va=P.forwardRef(function(e,n){const[s,i]=P.useState();Pt(()=>{ah()&&i("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[ga("focus-guard")]:"",style:ya};return p.jsx("span",{...e,...o})}),xa=P.createContext(null),ba=ga("portal");function Jh(t){t===void 0&&(t={});const{id:e,root:n}=t,s=pa(),i=tm(),[o,r]=P.useState(null),a=P.useRef(null);return Pt(()=>()=>{o?.remove(),queueMicrotask(()=>{a.current=null})},[o]),Pt(()=>{if(!s||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const u=document.createElement("div");u.id=s,u.setAttribute(ba,""),l.appendChild(u),a.current=u,r(u)},[e,s]),Pt(()=>{if(n===null||!s||a.current)return;let l=n||i?.portalNode;l&&!bs(l)&&(l=l.current),l=l||document.body;let u=null;e&&(u=document.createElement("div"),u.id=e,l.appendChild(u));const c=document.createElement("div");c.id=s,c.setAttribute(ba,""),l=u||l,l.appendChild(c),a.current=c,r(c)},[e,n,s,i]),o}function Qh(t){const{children:e,id:n,root:s,preserveTabOrder:i=!0}=t,o=Jh({id:n,root:s}),[r,a]=P.useState(null),l=P.useRef(null),u=P.useRef(null),c=P.useRef(null),f=P.useRef(null),d=r?.modal,h=r?.open,m=!!r&&!r.modal&&r.open&&i&&!!(s||o);return P.useEffect(()=>{if(!o||!i||d)return;function g(v){o&&Ms(v)&&(v.type==="focusin"?ta:gh)(o)}return o.addEventListener("focusin",g,!0),o.addEventListener("focusout",g,!0),()=>{o.removeEventListener("focusin",g,!0),o.removeEventListener("focusout",g,!0)}},[o,i,d]),P.useEffect(()=>{o&&(h||ta(o))},[h,o]),p.jsxs(xa.Provider,{value:P.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o]),children:[m&&o&&p.jsx(va,{"data-type":"outside",ref:l,onFocus:g=>{if(Ms(g,o)){var v;(v=c.current)==null||v.focus()}else{const y=r?r.domReference:null,w=ph(y);w?.focus()}}}),m&&o&&p.jsx("span",{"aria-owns":o.id,style:ya}),o&&_s.createPortal(e,o),m&&o&&p.jsx(va,{"data-type":"outside",ref:u,onFocus:g=>{if(Ms(g,o)){var v;(v=f.current)==null||v.focus()}else{const y=r?r.domReference:null,w=mh(y);w?.focus(),r?.closeOnFocusOut&&r?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const tm=()=>P.useContext(xa);let Ze=0;const wa="--floating-ui-scrollbar-width";function em(){const t=oh(),e=/iP(hone|ad|od)|iOS/.test(t)||t==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,r=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(wa,o+"px"),o&&(n[i]=o+"px"),e){var l,u;const c=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,f=((u=window.visualViewport)==null?void 0:u.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(f))+"px",left:-(r-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[i]:""}),n.removeProperty(wa),e&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(r,a))}}let Ta=()=>{};const nm=P.forwardRef(function(e,n){const{lockScroll:s=!1,...i}=e;return Pt(()=>{if(s)return Ze++,Ze===1&&(Ta=em()),()=>{Ze--,Ze===0&&Ta()}},[s]),p.jsx("div",{ref:n,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});function sm(t){const{open:e=!1,onOpenChange:n,elements:s}=t,i=pa(),o=P.useRef({}),[r]=P.useState(()=>Hh()),a=qh()!=null;if(process.env.NODE_ENV!=="production"){const h=s.reference;h&&!Y(h)&&Yh("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=P.useState(s.reference),c=hh((h,m,g)=>{o.current.openEvent=h?m:void 0,r.emit("openchange",{open:h,event:m,reason:g,nested:a}),n?.(h,m,g)}),f=P.useMemo(()=>({setPositionReference:u}),[]),d=P.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return P.useMemo(()=>({dataRef:o,open:e,onOpenChange:c,elements:d,events:r,floatingId:i,refs:f}),[e,c,d,r,i,f])}function im(t){t===void 0&&(t={});const{nodeId:e}=t,n=sm({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||n,i=s.elements,[o,r]=P.useState(null),[a,l]=P.useState(null),c=i?.domReference||o,f=P.useRef(null),d=Zh();Pt(()=>{c&&(f.current=c)},[c]);const h=$h({...t,elements:{...i,...a&&{reference:a}}}),m=P.useCallback(x=>{const C=Y(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(C),h.refs.setReference(C)},[h.refs]),g=P.useCallback(x=>{(Y(x)||x===null)&&(f.current=x,r(x)),(Y(h.refs.reference.current)||h.refs.reference.current===null||x!==null&&!Y(x))&&h.refs.setReference(x)},[h.refs]),v=P.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:f}),[h.refs,g,m]),y=P.useMemo(()=>({...h.elements,domReference:c}),[h.elements,c]),w=P.useMemo(()=>({...h,...s,refs:v,elements:y,nodeId:e}),[h,v,y,e,s]);return Pt(()=>{s.dataRef.current.floatingContext=w;const x=d?.nodesRef.current.find(C=>C.id===e);x&&(x.context=w)}),P.useMemo(()=>({...h,context:w,refs:v,elements:y}),[h,v,y,w])}const rm={top:"bottom center","top-start":"bottom left","top-end":"bottom right",right:"left center","right-start":"top left","right-end":"bottom left",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"top right","left-end":"bottom right"},om=P.memo(({open:t,children:e,className:n,onOutsideClick:s,floatingStyles:i,setFloating:o,placement:r})=>p.jsx(Qh,{children:p.jsx(ir,{children:t&&p.jsxs(p.Fragment,{children:[s&&p.jsx(nm,{onClick:s}),p.jsx("div",{ref:o,style:i,className:"z-10",children:p.jsx(gs.div,{className:n,style:{transformOrigin:rm[r]},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeInOut"},children:e})})]})})})),Sa=t=>{const{placement:e="bottom",onOutsideClick:n,fullWidth:s,minWidth:i,maxWidth:o}=t,r=P.useMemo(()=>[Wh({apply({rects:f,elements:d}){s&&(d.floating.style.width=`${f.reference.width}px`),i&&(d.floating.style.minWidth=`${i}px`),o&&(d.floating.style.maxWidth=`${o}px`)}})],[s,o,i]),{refs:a,floatingStyles:l}=im({placement:e,middleware:r,whileElementsMounted:Ih}),u=P.useRef({onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e});u.current={onOutsideClick:n,floatingStyles:l,setFloating:a.setFloating,placement:e};const c=P.useMemo(()=>{const f=d=>{const{floatingStyles:h,setFloating:m,onOutsideClick:g,placement:v}=u.current,{className:y,open:w,children:x}=d;return p.jsx(om,{open:w,className:y,onOutsideClick:g,floatingStyles:h,setFloating:m,placement:v,children:x})};return P.memo(f)},[]);return{anchorRef:a.setReference,Popover:c}},am="flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg p-3 overflow-y-auto relative",Pa=t=>{const{className:e,children:n,...s}=t;return p.jsx("div",{className:B(am,e),...s,children:n})},Os=t=>{const{onClick:e,Icon:n}=t;return p.jsx("div",{onClick:e,className:B("h-6 w-6 select-none rounded-full p-0.5",e&&"ring-0 transition-all duration-150 ring-gray-200 active:ring-2 cursor-pointer hover:ring-4 group"),children:p.jsx(n,{className:B("h-5 w-5 text-gray-500",e&&"group-active:scale-[0.8] transition-transform origin-center")})})},lm=(t,e)=>{S.useEffect(()=>{if(!t)return;const n=s=>{s.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[t,e])},Ca=t=>{const{className:e,label:n,description:s,options:i,onChange:o,value:r,placeholder:a,maxHeight:l=300,error:u}=t,[c,f]=S.useState(!1),d=P.useRef(null),h=i?.find(v=>v.value===r);lm(c,()=>f(!1)),S.useEffect(()=>{c&&d.current?.focus({preventScroll:!0})},[c]);const{anchorRef:m,Popover:g}=Sa({placement:"bottom",fullWidth:!0,onOutsideClick:()=>f(!1)});return p.jsxs("div",{className:B("flex flex-col",e),children:[p.jsx(ys,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",ref:m,children:[p.jsxs("div",{ref:d,role:"button",tabIndex:0,className:B("flex flex-row items-center h-12 pl-4 pr-10 border border-gray-200 text-gray-900 placeholder:text-gray-400 bg-white transition-all duration-150 rounded-xl shadow-sm ring-0 ring-gray-900/10 focus:ring-4 focus:outline-none select-none",u&&"border-red-600 ring-red-600/20 !pr-10",c&&"ring-4"),onKeyDown:v=>v.key===" "&&f(y=>!y),onClick:()=>f(!c),children:[h&&p.jsx("span",{children:h.label}),!h&&a&&p.jsx("span",{className:"text-gray-500",children:a})]}),p.jsxs(xs,{children:[u&&p.jsx(vs,{}),!!r&&p.jsx(Os,{Icon:_o,onClick:()=>o(null)}),p.jsx(Os,{Icon:Bo})]}),p.jsx(g,{open:c,children:p.jsx(Pa,{className:"!p-0",style:{maxHeight:l},children:p.jsx("div",{className:"flex flex-col p-2 gap-1",children:i.map(v=>{const y=v.value===r;return p.jsx(Ad,{onClick:()=>{!v.disabled&&o&&(o(v.value),f(!1))},selected:y,disabled:v.disabled,children:v.label},String(v.value))})})})})]}),p.jsx(Fe,{children:s}),p.jsx(Be,{children:u})]})},cm=t=>{const{className:e,label:n,description:s,options:i,error:o,...r}=t;return p.jsxs("div",{className:B("flex flex-col",e),children:[p.jsx(ys,{children:n}),p.jsxs("div",{className:"relative flex w-full flex-col",children:[p.jsx("select",{className:`
95
+ appearance-none
96
+ h-12
97
+ pl-4
98
+ pr-10
99
+ border
100
+ border-gray-200
101
+ text-gray-900
102
+ placeholder:text-gray-400
103
+ bg-white
104
+ bg-none
105
+ transition-all
106
+ duration-150
107
+ rounded-xl
108
+ shadow-sm
109
+ ring-0
110
+ ring-gray-900/10
111
+ focus:ring-4
112
+ focus:outline-none
113
+ `,...r,children:i&&i.map((a,l)=>p.jsx("option",{value:a.value,disabled:a.disabled,children:a.label},l))}),p.jsxs(xs,{children:[o&&p.jsx(vs,{}),p.jsx(Os,{Icon:Bo})]})]}),p.jsx(Fe,{children:s}),p.jsx(Be,{children:o})]})},um=P.forwardRef((t,e)=>{const{className:n,children:s,...i}=t;return p.jsx("div",{ref:e,className:B("flex flex-col gap-6 border border-gray-200 rounded-xl bg-white shadow-sm px-6 py-6",n),...i,children:s})}),fm=t=>{const{className:e,vertical:n=!1,...s}=t;return p.jsx("div",{className:B(n?"w-px h-full bg-gray-200":"w-full h-px bg-gray-200",e),...s})},dm=t=>{const{columns:e,rows:n}=t;return p.jsx("div",{className:"border border-gray-200 rounded-xl shadow-sm overflow-hidden",children:p.jsxs("table",{className:"table-fixed",children:[p.jsx("colgroup",{children:e.map(s=>p.jsx("col",{width:250},s.id))}),p.jsx("thead",{children:p.jsx("tr",{className:"divide-gray-200 divide-x text-left bg-gray-50 text-gray-400 border-b border-b-gray-200",children:e.map(s=>p.jsx("th",{className:"font-medium h-[3rem] relative hover:bg-gray-100 cursor-pointer active:bg-gray-200 transition-colors duration-150",children:p.jsx("div",{className:"absolute inset-0",children:p.jsx("div",{className:"flex items-center h-full w-full px-4",children:s.header})})},s.id))})}),p.jsx("tbody",{className:"divide-y divide-gray-200",children:n.map((s,i)=>p.jsx("tr",{className:"divide-gray-200 divide-x",children:e.map(o=>p.jsx("td",{className:"h-[3rem] relative",children:p.jsx("div",{className:"absolute inset-0 ",children:p.jsx("div",{className:"flex items-center h-full w-full px-4",children:o.renderCell(s)})})},o.id))},i))})]})})},hm={red:"bg-red-100 text-red-700 ring-red-200",orange:"bg-orange-100 text-orange-700 ring-orange-200",amber:"bg-amber-100 text-amber-700 ring-amber-200",yellow:"bg-yellow-100 text-yellow-700 ring-yellow-200",lime:"bg-lime-100 text-lime-700 ring-lime-200",green:"bg-green-100 text-green-700 ring-green-200",emerald:"bg-emerald-100 text-emerald-700 ring-emerald-200",teal:"bg-teal-100 text-teal-700 ring-teal-200",cyan:"bg-cyan-100 text-cyan-700 ring-cyan-200",sky:"bg-sky-100 text-sky-700 ring-sky-200",blue:"bg-blue-100 text-blue-700 ring-blue-200",indigo:"bg-indigo-100 text-indigo-700 ring-indigo-200",violet:"bg-violet-100 text-violet-700 ring-violet-200",purple:"bg-purple-100 text-purple-700 ring-purple-200",fuchsia:"bg-fuchsia-100 text-fuchsia-700 ring-fuchsia-200",pink:"bg-pink-100 text-pink-700 ring-pink-200",rose:"bg-rose-100 text-rose-700 ring-rose-200",slate:"bg-slate-100 text-slate-700 ring-slate-200",gray:"bg-gray-100 text-gray-700 ring-gray-200",zinc:"bg-zinc-100 text-zinc-700 ring-zinc-200",neutral:"bg-neutral-100 text-neutral-700 ring-neutral-200",stone:"bg-stone-100 text-stone-700 ring-stone-200",white:"bg-white text-gray-900 ring-stone-200",black:"bg-black text-white ring-stone-200"},Aa=P.forwardRef((t,e)=>{const{className:n,children:s,onClick:i,showCloseIcon:o,Icon:r,color:a="gray"}=t,l=B("inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",hm[a],n);return i?p.jsx("div",{ref:e,children:p.jsxs("button",{className:B("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4",l),onClick:i,children:[r&&p.jsx(r,{className:"h-4 w-4 shrink-0"}),p.jsx("div",{className:"break-all line-clamp-1 text-left",children:s}),o&&p.jsx(_o,{className:"h-4 w-4 shrink-0"})]})}):p.jsxs("div",{className:l,ref:e,children:[r&&p.jsx(r,{className:"h-4 w-4 shrink-0"}),p.jsx("div",{className:"break-all line-clamp-1 text-left",children:s})]})}),mm="inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 hover:bg-gray-100 active:bg-gray-200 rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent text-gray-900 bg-transparent ring-gray-900/10",Ns=P.forwardRef((t,e)=>{const{className:n,children:s,Icon:i,...o}=t;return p.jsxs("button",{ref:e,className:B(mm,n),...o,children:[i&&p.jsx(i,{className:"h-5 w-5"}),s]})}),pm=[{id:1,email:"matthiaskrijgsman@gmail.com",firstname:"Matthias",lastname:"Krijgsman",status:"active"},{id:2,email:"dennis@snijder.io",firstname:"Dennis",lastname:"Snijder",status:"inactive"},{id:3,email:"arcokrijgsman@gmail.com",firstname:"Arco",lastname:"Krijgsman",status:"active"}],gm=[{id:"id",header:"ID",renderCell:t=>t.id},{id:"email",header:"Email",renderCell:t=>p.jsx(Aa,{Icon:Pd,onClick:()=>{},children:t.email})},{id:"firstname",header:"First Name",renderCell:t=>t.firstname},{id:"lastname",header:"Last Name",renderCell:t=>t.lastname},{id:"status",header:"Status",renderCell:()=>p.jsx(vm,{})}],ym=()=>p.jsxs("div",{className:"flex flex-col gap-6",children:[p.jsxs("div",{className:"flex flex-row items-center justify-start gap-3",children:[p.jsx($o,{Icon:wd,placeholder:"Search..."}),p.jsx(Fo,{Icon:Td})]}),p.jsx(dm,{columns:gm,rows:pm}),p.jsx(Ca,{options:[{label:"Option 1",value:1},{label:"Option 2",value:2},{label:"Option 3",value:3}],value:null,onChange:()=>{}})]}),vm=()=>{const[t,e]=S.useState(!1),{Popover:n,anchorRef:s}=Sa({fullWidth:!0,onOutsideClick:()=>e(!1),minWidth:150});return p.jsxs(p.Fragment,{children:[p.jsx(Aa,{onClick:()=>e(!0),ref:s,children:"Test"}),p.jsx(n,{open:t,children:p.jsxs(Pa,{children:[p.jsx(Ns,{children:"Option 1"}),p.jsx(Ns,{children:"Option 2"}),p.jsx(Ns,{children:"Option 3"})]})})]})};U.Button=fd,U.ButtonIconRound=vd,U.ButtonIconSquare=Fo,U.Divider=fm,U.Input=$o,U.InputCheck=Cd,U.InputSelect=Ca,U.InputSelectNative=cm,U.Panel=um,U.Test=ym,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})}));
114
+ //# sourceMappingURL=index.umd.cjs.map