@kaitranntt/ccs 7.74.0-dev.1 → 7.74.0-dev.11

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 (95) hide show
  1. package/dist/api/services/profile-writer.d.ts +1 -1
  2. package/dist/api/services/profile-writer.d.ts.map +1 -1
  3. package/dist/api/services/profile-writer.js +11 -5
  4. package/dist/api/services/profile-writer.js.map +1 -1
  5. package/dist/bin/ccsxp-runtime.d.ts +8 -0
  6. package/dist/bin/ccsxp-runtime.d.ts.map +1 -1
  7. package/dist/bin/ccsxp-runtime.js +60 -3
  8. package/dist/bin/ccsxp-runtime.js.map +1 -1
  9. package/dist/cliproxy/binary/lifecycle.d.ts.map +1 -1
  10. package/dist/cliproxy/binary/lifecycle.js +2 -1
  11. package/dist/cliproxy/binary/lifecycle.js.map +1 -1
  12. package/dist/cliproxy/codex-plan-compatibility.d.ts.map +1 -1
  13. package/dist/cliproxy/codex-plan-compatibility.js +1 -0
  14. package/dist/cliproxy/codex-plan-compatibility.js.map +1 -1
  15. package/dist/cliproxy/model-catalog.d.ts.map +1 -1
  16. package/dist/cliproxy/model-catalog.js +12 -0
  17. package/dist/cliproxy/model-catalog.js.map +1 -1
  18. package/dist/cliproxy/service-manager.d.ts +17 -1
  19. package/dist/cliproxy/service-manager.d.ts.map +1 -1
  20. package/dist/cliproxy/service-manager.js +10 -5
  21. package/dist/cliproxy/service-manager.js.map +1 -1
  22. package/dist/cliproxy/sync/profile-mapper.d.ts.map +1 -1
  23. package/dist/cliproxy/sync/profile-mapper.js +21 -0
  24. package/dist/cliproxy/sync/profile-mapper.js.map +1 -1
  25. package/dist/cliproxy/types.d.ts +8 -0
  26. package/dist/cliproxy/types.d.ts.map +1 -1
  27. package/dist/cliproxy/types.js.map +1 -1
  28. package/dist/commands/api-command/create-command.d.ts.map +1 -1
  29. package/dist/commands/api-command/create-command.js +4 -1
  30. package/dist/commands/api-command/create-command.js.map +1 -1
  31. package/dist/commands/api-command/help.d.ts.map +1 -1
  32. package/dist/commands/api-command/help.js +4 -0
  33. package/dist/commands/api-command/help.js.map +1 -1
  34. package/dist/commands/api-command/shared.d.ts +2 -1
  35. package/dist/commands/api-command/shared.d.ts.map +1 -1
  36. package/dist/commands/api-command/shared.js +9 -0
  37. package/dist/commands/api-command/shared.js.map +1 -1
  38. package/dist/commands/command-catalog.d.ts.map +1 -1
  39. package/dist/commands/command-catalog.js +4 -1
  40. package/dist/commands/command-catalog.js.map +1 -1
  41. package/dist/targets/target-metadata.js +1 -1
  42. package/dist/targets/target-metadata.js.map +1 -1
  43. package/dist/ui/assets/{accounts-D0Z5AVKW.js → accounts-ld6H4qVb.js} +1 -1
  44. package/dist/ui/assets/{alert-dialog-CzJucE0e.js → alert-dialog-BZ2goqtW.js} +1 -1
  45. package/dist/ui/assets/{api-DXAf4i-v.js → api-CthvA4sH.js} +1 -1
  46. package/dist/ui/assets/{auth-section-BrnnHBi-.js → auth-section-o5qejfmB.js} +1 -1
  47. package/dist/ui/assets/{backups-section-DCBcfZ-C.js → backups-section-DH2I1yD9.js} +1 -1
  48. package/dist/ui/assets/{channels-BSapONLx.js → channels-PcQ1oO0o.js} +1 -1
  49. package/dist/ui/assets/{checkbox-Bd7X5Xud.js → checkbox-DehBjrNH.js} +1 -1
  50. package/dist/ui/assets/{claude-extension-BYJxm4B5.js → claude-extension-PyHYNmSG.js} +1 -1
  51. package/dist/ui/assets/{cliproxy-ai-providers-D7r2Us_Y.js → cliproxy-ai-providers-BEHZy9gR.js} +1 -1
  52. package/dist/ui/assets/{cliproxy-control-panel-Cmo3ArVL.js → cliproxy-control-panel-34szpAk4.js} +1 -1
  53. package/dist/ui/assets/{cliproxy-G5JuFm2j.js → cliproxy-lrpHXFMA.js} +1 -1
  54. package/dist/ui/assets/codex-UKB2QUN1.js +27 -0
  55. package/dist/ui/assets/{confirm-dialog--zJgz4y0.js → confirm-dialog-64G67ESH.js} +1 -1
  56. package/dist/ui/assets/{copilot-2ARJ9YVb.js → copilot-Bd-ViL4n.js} +1 -1
  57. package/dist/ui/assets/{cursor-CQNCrVt0.js → cursor-DH3z6BLJ.js} +1 -1
  58. package/dist/ui/assets/{droid-Dl5wRjDv.js → droid-Cng3BkQg.js} +1 -1
  59. package/dist/ui/assets/{globalenv-section-T1imQsSA.js → globalenv-section-D3aT-fYK.js} +1 -1
  60. package/dist/ui/assets/health-BRqYO0xG.js +1 -0
  61. package/dist/ui/assets/index-1MP3pDe8.js +1 -0
  62. package/dist/ui/assets/index-B2XY4MhT.js +72 -0
  63. package/dist/ui/assets/{index-DH916Tyi.js → index-CDoChLrM.js} +1 -1
  64. package/dist/ui/assets/{index-fV5BBuAO.js → index-DA5G610p.js} +1 -1
  65. package/dist/ui/assets/{index-BcLnqcxD.js → index-DJmpCPja.js} +1 -1
  66. package/dist/ui/assets/{index-DFgCoUVv.js → index-DLIKuUBI.js} +1 -1
  67. package/dist/ui/assets/{index-CqJFugM4.js → index-FPQVUJ_q.js} +1 -1
  68. package/dist/ui/assets/index-yeM6bOxL.css +1 -0
  69. package/dist/ui/assets/{logs-CZsWbq7X.js → logs-DNAtdY6A.js} +1 -1
  70. package/dist/ui/assets/masked-input-B4x8rBbs.js +1 -0
  71. package/dist/ui/assets/proxy-g4_N-fbB.js +9 -0
  72. package/dist/ui/assets/{proxy-status-widget-D82T2X4F.js → proxy-status-widget-EuDHDJAP.js} +1 -1
  73. package/dist/ui/assets/{raw-json-settings-editor-panel-DNmb_vR-.js → raw-json-settings-editor-panel-DZRYrywv.js} +1 -1
  74. package/dist/ui/assets/{searchable-select--iFe00dY.js → searchable-select-CwJpfFVb.js} +1 -1
  75. package/dist/ui/assets/{separator-CaGbNw8E.js → separator-CD-HBQ24.js} +1 -1
  76. package/dist/ui/assets/{shared-Cgk48Wu3.js → shared-BlqdoNm4.js} +1 -1
  77. package/dist/ui/assets/{table-CKuoPAz4.js → table-FmKRMU4a.js} +1 -1
  78. package/dist/ui/assets/updates-Bo-HBoN0.js +1 -0
  79. package/dist/ui/index.html +2 -2
  80. package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
  81. package/dist/web-server/routes/profile-routes.js +13 -3
  82. package/dist/web-server/routes/profile-routes.js.map +1 -1
  83. package/dist/web-server/routes/route-helpers.d.ts +1 -0
  84. package/dist/web-server/routes/route-helpers.d.ts.map +1 -1
  85. package/dist/web-server/routes/route-helpers.js +11 -0
  86. package/dist/web-server/routes/route-helpers.js.map +1 -1
  87. package/lib/mcp/ccs-browser-server.cjs +309 -121
  88. package/package.json +1 -1
  89. package/dist/ui/assets/codex-4VNBJ4Nb.js +0 -27
  90. package/dist/ui/assets/health-CNous3WN.js +0 -1
  91. package/dist/ui/assets/index-2X8-14xr.js +0 -72
  92. package/dist/ui/assets/index-Be3dhMW3.js +0 -9
  93. package/dist/ui/assets/index-DuTB1_9r.css +0 -1
  94. package/dist/ui/assets/masked-input-_EkW1Pzo.js +0 -1
  95. package/dist/ui/assets/updates-Dr8Yq-Pm.js +0 -1
@@ -1,9 +0,0 @@
1
- import{j as f}from"./radix-ui-Zb8sVEtn.js";import{r as b}from"./react-vendor-CNOkPC89.js";import{bt as io,bu as ro,Y as we,a as pi,bv as oo,bi as On,bk as zn,d as yt,n as ao,c as Tt,L as xt,I as Un,r as Wn,s as Kn,t as $n,v as Hn,w as _n,aI as Gn,M as lo,N as co,O as uo}from"./index-2X8-14xr.js";import{R as Dt,I as Zt,x as Et,ab as ho,_ as fo,ba as mo,w as gi,$ as po,a6 as go,e as yo,s as xo}from"./icons-DyorC3Xk.js";import"./tanstack-CrmUhA7Z.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function vo(t,e){return{claude:{...t.claude,...e.claude},codex:{...t.codex,...e.codex}}}function bo(){const{state:t}=io(),e=ro(),n=b.useCallback(async()=>{try{e.setBrowserLoading(!0),e.setBrowserError(null);const o=await we.browser.get();e.setBrowserConfig(o.config),e.setBrowserStatus(o.status)}catch(o){e.setBrowserError(o.message)}finally{e.setBrowserLoading(!1),e.setBrowserStatusLoading(!1)}},[e]),s=b.useCallback(async()=>{try{e.setBrowserStatusLoading(!0),e.setBrowserError(null);const o=await we.browser.getStatus();return e.setBrowserStatus(o),o}catch(o){return e.setBrowserError(o.message),null}finally{e.setBrowserStatusLoading(!1)}},[e]),i=b.useCallback(async o=>{const r=t.browserConfig;if(!r)return!1;const a=vo(r,o);e.setBrowserConfig(a);try{e.setBrowserSaving(!0),e.setBrowserError(null);const c=await we.browser.update(o);return e.setBrowserConfig(c.browser.config),e.setBrowserStatus(c.browser.status),e.setBrowserSuccess(!0),window.setTimeout(()=>e.setBrowserSuccess(!1),1500),!0}catch(c){return e.setBrowserConfig(r),e.setBrowserError(c.message),!1}finally{e.setBrowserSaving(!1)}},[e,t.browserConfig]);return{config:t.browserConfig,status:t.browserStatus,loading:t.browserLoading,statusLoading:t.browserStatusLoading,saving:t.browserSaving,error:t.browserError,success:t.browserSuccess,fetchConfig:n,fetchStatus:s,saveConfig:i}}const un=b.createContext({});function dn(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const wo=typeof window<"u",yi=wo?b.useLayoutEffect:b.useEffect,ge=b.createContext(null);function hn(t,e){t.indexOf(e)===-1&&t.push(e)}function ae(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const nt=(t,e,n)=>n>e?e:n<t?t:n;let fn=()=>{};const rt={},xi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function vi(t){return typeof t=="object"&&t!==null}const bi=t=>/^0[^.\s]+$/u.test(t);function wi(t){let e;return()=>(e===void 0&&(e=t()),e)}const G=t=>t,So=(t,e)=>n=>e(t(n)),Ut=(...t)=>t.reduce(So),It=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class mn{constructor(){this.subscriptions=[]}add(e){return hn(this.subscriptions,e),()=>ae(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 $=t=>t*1e3,_=t=>t/1e3;function Si(t,e){return e?t*(1e3/e):0}const Ti=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,To=1e-7,Po=12;function Co(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Ti(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>To&&++a<Po);return r}function Wt(t,e,n,s){if(t===e&&n===s)return G;const i=o=>Co(o,0,1,t,n);return o=>o===0||o===1?o:Ti(i(o),e,s)}const Pi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ci=t=>e=>1-t(1-e),Ai=Wt(.33,1.53,.69,.99),pn=Ci(Ai),Vi=Pi(pn),Mi=t=>t>=1?1:(t*=2)<1?.5*pn(t):.5*(2-Math.pow(2,-10*(t-1))),gn=t=>1-Math.sin(Math.acos(t)),Di=Ci(gn),ki=Pi(gn),Ao=Wt(.42,0,1,1),Vo=Wt(0,0,.58,1),Ei=Wt(.42,0,.58,1),Mo=t=>Array.isArray(t)&&typeof t[0]!="number",ji=t=>Array.isArray(t)&&typeof t[0]=="number",Do={linear:G,easeIn:Ao,easeInOut:Ei,easeOut:Vo,circIn:gn,circInOut:ki,circOut:Di,backIn:pn,backInOut:Vi,backOut:Ai,anticipate:Mi},ko=t=>typeof t=="string",Xn=t=>{if(ji(t)){fn(t.length===4);const[e,n,s,i]=t;return Wt(e,n,s,i)}else if(ko(t))return Do[t];return t},Ht=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Eo(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 c(l){r.has(l)&&(u.schedule(l),t()),l(a)}const u={schedule:(l,d=!1,h=!1)=>{const p=h&&i?n:s;return d&&r.add(l),p.add(l),l},cancel:l=>{s.delete(l),r.delete(l)},process:l=>{if(a=l,i){o=!0;return}i=!0;const d=n;n=s,s=d,n.forEach(c),n.clear(),i=!1,o&&(o=!1,u.process(l))}};return u}const jo=40;function Ri(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Ht.reduce((w,S)=>(w[S]=Eo(o),w),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:l,update:d,preRender:h,render:m,postRender:p}=r,y=()=>{const w=rt.useManualTiming,S=w?i.timestamp:performance.now();n=!1,w||(i.delta=s?1e3/60:Math.max(Math.min(S-i.timestamp,jo),1)),i.timestamp=S,i.isProcessing=!0,a.process(i),c.process(i),u.process(i),l.process(i),d.process(i),h.process(i),m.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},x=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:Ht.reduce((w,S)=>{const P=r[S];return w[S]=(D,L=!1,A=!1)=>(n||x(),P.schedule(D,L,A)),w},{}),cancel:w=>{for(let S=0;S<Ht.length;S++)r[Ht[S]].cancel(w)},state:i,steps:r}}const{schedule:k,cancel:ot,state:z,steps:Se}=Ri(typeof requestAnimationFrame<"u"?requestAnimationFrame:G,!0);let Jt;function Ro(){Jt=void 0}const W={now:()=>(Jt===void 0&&W.set(z.isProcessing||rt.useManualTiming?z.timestamp:performance.now()),Jt),set:t=>{Jt=t,queueMicrotask(Ro)}},Li=t=>e=>typeof e=="string"&&e.startsWith(t),Ni=Li("--"),Lo=Li("var(--"),yn=t=>Lo(t)?No.test(t.split("/*")[0].trim()):!1,No=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Yn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const At={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ft={...At,transform:t=>nt(0,1,t)},_t={...At,default:1},Rt=t=>Math.round(t*1e5)/1e5,xn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Bo(t){return t==null}const Io=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vn=(t,e)=>n=>!!(typeof n=="string"&&Io.test(n)&&n.startsWith(t)||e&&!Bo(n)&&Object.prototype.hasOwnProperty.call(n,e)),Bi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(xn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Fo=t=>nt(0,255,t),Te={...At,transform:t=>Math.round(Fo(t))},ht={test:vn("rgb","red"),parse:Bi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Te.transform(t)+", "+Te.transform(e)+", "+Te.transform(n)+", "+Rt(Ft.transform(s))+")"};function Oo(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 Oe={test:vn("#"),parse:Oo,transform:ht.transform},Kt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Kt("deg"),et=Kt("%"),T=Kt("px"),zo=Kt("vh"),Uo=Kt("vw"),qn={...et,parse:t=>et.parse(t)/100,transform:t=>et.transform(t*100)},bt={test:vn("hsl","hue"),parse:Bi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+et.transform(Rt(e))+", "+et.transform(Rt(n))+", "+Rt(Ft.transform(s))+")"},N={test:t=>ht.test(t)||Oe.test(t)||bt.test(t),parse:t=>ht.test(t)?ht.parse(t):bt.test(t)?bt.parse(t):Oe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ht.transform(t):bt.transform(t),getAnimatableNone:t=>{const e=N.parse(t);return e.alpha=0,N.transform(e)}},Wo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ko(t){return isNaN(t)&&typeof t=="string"&&(t.match(xn)?.length||0)+(t.match(Wo)?.length||0)>0}const Ii="number",Fi="color",$o="var",Ho="var(",Zn="${}",_o=/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 Pt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(_o,c=>(N.test(c)?(s.color.push(o),i.push(Fi),n.push(N.parse(c))):c.startsWith(Ho)?(s.var.push(o),i.push($o),n.push(c)):(s.number.push(o),i.push(Ii),n.push(parseFloat(c))),++o,Zn)).split(Zn);return{values:n,split:a,indexes:s,types:i}}function Go(t){return Pt(t).values}function Oi({split:t,types:e}){const n=t.length;return s=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],s[o]!==void 0){const r=e[o];r===Ii?i+=Rt(s[o]):r===Fi?i+=N.transform(s[o]):i+=s[o]}return i}}function Xo(t){return Oi(Pt(t))}const Yo=t=>typeof t=="number"?0:N.test(t)?N.getAnimatableNone(t):t,qo=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Yo(t);function Zo(t){const e=Pt(t);return Oi(e)(e.values.map((s,i)=>qo(s,e.split[i])))}const Z={test:Ko,parse:Go,createTransformer:Xo,getAnimatableNone:Zo};function Pe(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 Jo({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,c=2*n-a;i=Pe(c,a,t+1/3),o=Pe(c,a,t),r=Pe(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function le(t,e){return n=>n>0?e:t}const j=(t,e,n)=>t+(e-t)*n,Ce=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Qo=[Oe,ht,bt],ta=t=>Qo.find(e=>e.test(t));function Jn(t){const e=ta(t);if(!e)return!1;let n=e.parse(t);return e===bt&&(n=Jo(n)),n}const Qn=(t,e)=>{const n=Jn(t),s=Jn(e);if(!n||!s)return le(t,e);const i={...n};return o=>(i.red=Ce(n.red,s.red,o),i.green=Ce(n.green,s.green,o),i.blue=Ce(n.blue,s.blue,o),i.alpha=j(n.alpha,s.alpha,o),ht.transform(i))},ze=new Set(["none","hidden"]);function ea(t,e){return ze.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function na(t,e){return n=>j(t,e,n)}function bn(t){return typeof t=="number"?na:typeof t=="string"?yn(t)?le:N.test(t)?Qn:ra:Array.isArray(t)?zi:typeof t=="object"?N.test(t)?Qn:sa:le}function zi(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 sa(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 ia(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 ra=(t,e)=>{const n=Z.createTransformer(e),s=Pt(t),i=Pt(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?ze.has(t)&&!i.values.length||ze.has(e)&&!s.values.length?ea(t,e):Ut(zi(ia(s,i),i.values),n):le(t,e)};function Ui(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?j(t,e,n):bn(t)(t,e)}const oa=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>k.update(e,n),stop:()=>ot(e),now:()=>z.isProcessing?z.timestamp:W.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)})`},ce=2e4;function wn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ce;)e+=n,s=t.next(e);return e>=ce?1/0:e}function aa(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(wn(s),ce);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:_(i)}}const R={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ue(t,e){return t*Math.sqrt(1-e*e)}const la=12;function ca(t,e,n){let s=n;for(let i=1;i<la;i++)s=s-t(s)/e(s);return s}const Ae=.001;function ua({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,o,r=1-e;r=nt(R.minDamping,R.maxDamping,r),t=nt(R.minDuration,R.maxDuration,_(t)),r<1?(i=u=>{const l=u*r,d=l*t,h=l-n,m=Ue(u,r),p=Math.exp(-d);return Ae-h/m*p},o=u=>{const d=u*r*t,h=d*n+n,m=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-d),y=Ue(Math.pow(u,2),r);return(-i(u)+Ae>0?-1:1)*((h-m)*p)/y}):(i=u=>{const l=Math.exp(-u*t),d=(u-n)*t+1;return-Ae+l*d},o=u=>{const l=Math.exp(-u*t),d=(n-u)*(t*t);return l*d});const a=5/t,c=ca(i,o,a);if(t=$(t),isNaN(c))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const da=["duration","bounce"],ha=["stiffness","damping","mass"];function ts(t,e){return e.some(n=>t[n]!==void 0)}function fa(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!ts(t,ha)&&ts(t,da))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*nt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:o}}else{const n=ua({...t,velocity:0});e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function ue(t=R.visualDuration,e=R.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:c,damping:u,mass:l,duration:d,velocity:h,isResolvedFromDuration:m}=fa({...n,velocity:-_(n.velocity||0)}),p=h||0,y=u/(2*Math.sqrt(c*l)),x=r-o,v=_(Math.sqrt(c/l)),g=Math.abs(x)<5;s||(s=g?R.restSpeed.granular:R.restSpeed.default),i||(i=g?R.restDelta.granular:R.restDelta.default);let w,S,P,D,L,A;if(y<1)P=Ue(v,y),D=(p+y*v*x)/P,w=C=>{const E=Math.exp(-y*v*C);return r-E*(D*Math.sin(P*C)+x*Math.cos(P*C))},L=y*v*D+x*P,A=y*v*x-D*P,S=C=>Math.exp(-y*v*C)*(L*Math.sin(P*C)+A*Math.cos(P*C));else if(y===1){w=E=>r-Math.exp(-v*E)*(x+(p+v*x)*E);const C=p+v*x;S=E=>Math.exp(-v*E)*(v*C*E-p)}else{const C=v*Math.sqrt(y*y-1);w=M=>{const I=Math.exp(-y*v*M),J=Math.min(C*M,300);return r-I*((p+y*v*x)*Math.sinh(J)+C*x*Math.cosh(J))/C};const E=(p+y*v*x)/C,B=y*v*E-x*C,X=y*v*x-E*C;S=M=>{const I=Math.exp(-y*v*M),J=Math.min(C*M,300);return I*(B*Math.sinh(J)+X*Math.cosh(J))}}const V={calculatedDuration:m&&d||null,velocity:C=>$(S(C)),next:C=>{if(!m&&y<1){const B=Math.exp(-y*v*C),X=Math.sin(P*C),M=Math.cos(P*C),I=r-B*(D*X+x*M),J=$(B*(L*X+A*M));return a.done=Math.abs(J)<=s&&Math.abs(r-I)<=i,a.value=a.done?r:I,a}const E=w(C);if(m)a.done=C>=d;else{const B=$(S(C));a.done=Math.abs(B)<=s&&Math.abs(r-E)<=i}return a.value=a.done?r:E,a},toString:()=>{const C=Math.min(wn(V),ce),E=Wi(B=>V.next(C*B).value,C,30);return C+"ms "+E},toTransition:()=>{}};return V}ue.applyToOptions=t=>{const e=aa(t,100,ue);return t.ease=e.ease,t.duration=$(e.duration),t.type="keyframes",t};const ma=5;function Ki(t,e,n){const s=Math.max(e-ma,0);return Si(n-t(s),e-s)}function We({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:u=.5,restSpeed:l}){const d=t[0],h={done:!1,value:d},m=A=>a!==void 0&&A<a||c!==void 0&&A>c,p=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let y=n*e;const x=d+y,v=r===void 0?x:r(x);v!==x&&(y=v-d);const g=A=>-y*Math.exp(-A/s),w=A=>v+g(A),S=A=>{const V=g(A),C=w(A);h.done=Math.abs(V)<=u,h.value=h.done?v:C};let P,D;const L=A=>{m(h.value)&&(P=A,D=ue({keyframes:[h.value,p(h.value)],velocity:Ki(w,A,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:l}))};return L(0),{calculatedDuration:null,next:A=>{let V=!1;return!D&&P===void 0&&(V=!0,S(A),L(A)),P!==void 0&&A>=P?D.next(A-P):(!V&&S(A),h)}}}function pa(t,e,n){const s=[],i=n||rt.mix||Ui,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]||G:e;a=Ut(c,a)}s.push(a)}return s}function ga(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(fn(o===e.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=pa(e,s,i),c=a.length,u=l=>{if(r&&l<t[0])return e[0];let d=0;if(c>1)for(;d<t.length-2&&!(l<t[d+1]);d++);const h=It(t[d],t[d+1],l);return a[d](h)};return n?l=>u(nt(t[0],t[o-1],l)):u}function ya(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=It(0,e,s);t.push(j(n,1,i))}}function xa(t){const e=[0];return ya(e,t.length-1),e}function va(t,e){return t.map(n=>n*e)}function ba(t,e){return t.map(()=>e||Ei).splice(0,t.length-1)}function Lt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Mo(s)?s.map(Xn):Xn(s),o={done:!1,value:e[0]},r=va(n&&n.length===e.length?n:xa(e),t),a=ga(r,e,{ease:Array.isArray(i)?i:ba(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const wa=t=>t!==null;function ye(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(wa),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Sa={decay:We,inertia:We,tween:Lt,keyframes:Lt,spring:ue};function $i(t){typeof t.type=="string"&&(t.type=Sa[t.type])}class Sn{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 Ta=t=>t/100;class de extends Sn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==W.now()&&this.tick(W.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;$i(e);const{type:n=Lt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const c=n||Lt;c!==Lt&&typeof a[0]!="number"&&(this.mixKeyframes=Ut(Ta,Ui(a[0],a[1])),a=[0,100]);const u=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=wn(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+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:c}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:l,repeat:d,repeatType:h,repeatDelay:m,type:p,onUpdate:y,finalKeyframe:x}=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 v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,S=s;if(d){const A=Math.min(this.currentTime,i)/a;let V=Math.floor(A),C=A%1;!C&&A>=1&&(C=1),C===1&&V--,V=Math.min(V,d+1),!!(V%2)&&(h==="reverse"?(C=1-C,m&&(C-=m/a)):h==="mirror"&&(S=r)),w=nt(0,1,C)*a}let P;g?(this.delayState.value=l[0],P=this.delayState):P=S.next(w),o&&!g&&(P.value=o(P.value));let{done:D}=P;!g&&c!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return L&&p!==We&&(P.value=ye(l,this.options,x,this.speed)),y&&y(P.value),L&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return _(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+_(e)}get time(){return _(this.currentTime)}set time(e){e=$(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return Ki(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(W.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=_(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=oa,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(W.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 Pa(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ft=t=>t*180/Math.PI,Ke=t=>{const e=ft(Math.atan2(t[1],t[0]));return $e(e)},Ca={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ke,rotateZ:Ke,skewX:t=>ft(Math.atan(t[1])),skewY:t=>ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},$e=t=>(t=t%360,t<0&&(t+=360),t),es=Ke,ns=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ss=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Aa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ns,scaleY:ss,scale:t=>(ns(t)+ss(t))/2,rotateX:t=>$e(ft(Math.atan2(t[6],t[5]))),rotateY:t=>$e(ft(Math.atan2(-t[2],t[0]))),rotateZ:es,rotate:es,skewX:t=>ft(Math.atan(t[4])),skewY:t=>ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function He(t){return t.includes("scale")?1:0}function _e(t,e){if(!t||t==="none")return He(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Aa,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ca,i=a}if(!i)return He(e);const o=s[e],r=i[1].split(",").map(Ma);return typeof o=="function"?o(r):r[o]}const Va=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return _e(n,e)};function Ma(t){return parseFloat(t.trim())}const Vt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Mt=new Set(Vt),is=t=>t===At||t===T,Da=new Set(["x","y","z"]),ka=Vt.filter(t=>!Da.has(t));function Ea(t){const e=[];return ka.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const it={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-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})=>_e(e,"x"),y:(t,{transform:e})=>_e(e,"y")};it.translateX=it.x;it.translateY=it.y;const mt=new Set;let Ge=!1,Xe=!1,Ye=!1;function Hi(){if(Xe){const t=Array.from(mt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Ea(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)})}Xe=!1,Ge=!1,mt.forEach(t=>t.complete(Ye)),mt.clear()}function _i(){mt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Xe=!0)})}function ja(){Ye=!0,_i(),Hi(),Ye=!1}class Tn{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?(mt.add(this),Ge||(Ge=!0,k.read(_i),k.resolveKeyframes(Hi))):(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])}Pa(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),mt.delete(this)}cancel(){this.state==="scheduled"&&(mt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ra=t=>t.startsWith("--");function Gi(t,e,n){Ra(e)?t.style.setProperty(e,n):t.style[e]=n}const La={};function Xi(t,e){const n=wi(t);return()=>La[e]??n()}const Na=Xi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Yi=Xi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,rs={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jt([0,.65,.55,1]),circOut:jt([.55,0,1,.45]),backIn:jt([.31,.01,.66,-.59]),backOut:jt([.33,1.53,.69,.99])};function qi(t,e){if(t)return typeof t=="function"?Yi()?Wi(t,e):"ease-out":ji(t)?jt(t):Array.isArray(t)?t.map(n=>qi(n,e)||rs.easeOut):rs[t]}function Ba(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:c}={},u=void 0){const l={[e]:n};c&&(l.offset=c);const d=qi(a,i);Array.isArray(d)&&(l.easing=d);const h={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),t.animate(l,h)}function Zi(t){return typeof t=="function"&&"applyToOptions"in t}function Ia({type:t,...e}){return Zi(t)&&Yi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ji extends Sn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,fn(typeof e.type!="string");const u=Ia(e);this.animation=Ba(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const l=ye(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(l),Gi(n,s,l),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return _(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+_(e)}get time(){return _(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Na()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),G):i(this)}}const Qi={anticipate:Mi,backInOut:Vi,circInOut:ki};function Fa(t){return t in Qi}function Oa(t){typeof t.ease=="string"&&Fa(t.ease)&&(t.ease=Qi[t.ease])}const Ve=10;class za extends Ji{constructor(e){Oa(e),$i(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(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 de({...r,autoplay:!1}),c=Math.max(Ve,W.now()-this.startTime),u=nt(0,Ve,c-Ve),l=a.sample(c).value,{name:d}=this.options;o&&d&&Gi(o,d,l),n.setWithVelocity(a.sample(Math.max(0,c-u)).value,l,u),a.stop()}}const os=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Z.test(t)||t==="0")&&!t.startsWith("url("));function Ua(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 Wa(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=os(i,e),a=os(o,e);return!r||!a?!1:Ua(t)||(n==="spring"||Zi(n))&&s}function qe(t){t.duration=0,t.type="keyframes"}const tr=new Set(["opacity","clipPath","filter","transform"]),Ka=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function $a(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Ka.test(t[e]))return!0;return!1}const Ha=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),_a=wi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ga(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return _a()&&n&&(tr.has(n)||Ha.has(n)&&$a(a))&&(n!=="transform"||!l)&&!u&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Xa=40;class Ya extends Sn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:c,motionValue:u,element:l,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=W.now();const h={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:c,motionValue:u,element:l,...d},m=l?.KeyframeResolver||Tn;this.keyframeResolver=new m(a,(p,y,x)=>this.onKeyframesResolved(p,y,h,!x),c,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:c,isHandoff:u,onUpdate:l}=s;this.resolvedAt=W.now();let d=!0;Wa(e,o,r,a)||(d=!1,(rt.instantAnimations||!c)&&l?.(ye(e,s,n)),e[0]=e[e.length-1],qe(s),s.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Xa?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},p=d&&!u&&Ga(m),y=m.motionValue?.owner?.current;let x;if(p)try{x=new za({...m,element:y})}catch{x=new de(m)}else x=new de(m);x.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}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(),ja()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function er(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,l)=>u.sortNodePosition(l)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}const qa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Za(t){const e=qa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function nr(t,e,n=1){const[s,i]=Za(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return xi(r)?parseFloat(r):r}return yn(i)?nr(i,e,n+1):i}const Ja={type:"spring",stiffness:500,damping:25,restSpeed:10},Qa=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),tl={type:"keyframes",duration:.8},el={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nl=(t,{keyframes:e})=>e.length>2?tl:Mt.has(t)?t.startsWith("scale")?Qa(e[1]):Ja:el;function sr(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Pn(t,e){const n=t?.[e]??t?.default??t;return n!==t?sr(n,t):n}const sl=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function il(t){for(const e in t)if(!sl.has(e))return!0;return!1}const Cn=(t,e,n,s={},i,o)=>r=>{const a=Pn(s,t)||{},c=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-$(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};il(a)||Object.assign(l,nl(t,l)),l.duration&&(l.duration=$(l.duration)),l.repeatDelay&&(l.repeatDelay=$(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let d=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(qe(l),l.delay===0&&(d=!0)),(rt.instantAnimations||rt.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,qe(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){const h=ye(l.keyframes,a);if(h!==void 0){k.update(()=>{l.onUpdate(h),l.onComplete()});return}}return a.isSync?new de(l):new Ya(l)};function as(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function An(t,e,n,s){if(typeof e=="function"){const[i,o]=as(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]=as(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function pt(t,e,n){const s=t.getProps();return An(s,e,n!==void 0?n:s.custom,t)}const ir=new Set(["width","height","top","left","right","bottom",...Vt]),ls=30,rl=t=>!isNaN(parseFloat(t));class ol{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=W.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=W.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=rl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new mn);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=W.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ls)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ls);return Si(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 Ct(t,e){return new ol(t,e)}const Ze=t=>Array.isArray(t);function al(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ct(n))}function ll(t){return Ze(t)?t[t.length-1]||0:t}function cl(t,e){const n=pt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=ll(o[r]);al(t,r,a)}}const U=t=>!!(t&&t.getVelocity);function ul(t){return!!(U(t)&&t.add)}function Je(t,e){const n=t.getValue("willChange");if(ul(n))return n.add(e);if(!n&&rt.WillChange){const s=new rt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Vn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const dl="framerAppearId",rr="data-"+Vn(dl);function or(t){return t.props[rr]}function hl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ar(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o,transitionEnd:r,...a}=e;const c=t.getDefaultTransition();o=o?sr(o,c):c;const u=o?.reduceMotion;s&&(o=s);const l=[],d=i&&t.animationState&&t.animationState.getState()[i];for(const h in a){const m=t.getValue(h,t.latestValues[h]??null),p=a[h];if(p===void 0||d&&hl(d,h))continue;const y={delay:n,...Pn(o||{},h)},x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(p)&&p===x&&!y.velocity){k.update(()=>m.set(p));continue}let v=!1;if(window.MotionHandoffAnimation){const S=or(t);if(S){const P=window.MotionHandoffAnimation(S,h,k);P!==null&&(y.startTime=P,v=!0)}}Je(t,h);const g=u??t.shouldReduceMotion;m.start(Cn(h,m,p,g&&ir.has(h)?{type:!1}:y,t,v));const w=m.animation;w&&l.push(w)}if(r){const h=()=>k.update(()=>{r&&cl(t,r)});l.length?Promise.all(l).then(h):h()}return l}function Qe(t,e,n={}){const s=pt(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(ar(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:d}=i;return fl(t,e,c,u,l,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function fl(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Qe(c,e,{...r,delay:n+(typeof s=="function"?0:s)+er(t.variantChildren,c,s,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function ml(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Qe(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Qe(t,e,n);else{const i=typeof e=="function"?pt(t,e,n.custom):e;s=Promise.all(ar(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const pl={test:t=>t==="auto",parse:t=>t},lr=t=>e=>e.test(t),cr=[At,T,et,st,Uo,zo,pl],cs=t=>cr.find(lr(t));function gl(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||bi(t):!0}const yl=new Set(["brightness","contrast","saturate","opacity"]);function xl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(xn)||[];if(!s)return t;const i=n.replace(s,"");let o=yl.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const vl=/\b([a-z-]*)\(.*?\)/gu,tn={...Z,getAnimatableNone:t=>{const e=t.match(vl);return e?e.map(xl).join(" "):t}},en={...Z,getAnimatableNone:t=>{const e=Z.parse(t);return Z.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},us={...At,transform:Math.round},bl={rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:_t,scaleX:_t,scaleY:_t,scaleZ:_t,skew:st,skewX:st,skewY:st,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Ft,originX:qn,originY:qn,originZ:T},Mn={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...bl,zIndex:us,fillOpacity:Ft,strokeOpacity:Ft,numOctaves:us},wl={...Mn,color:N,backgroundColor:N,outlineColor:N,fill:N,stroke:N,borderColor:N,borderTopColor:N,borderRightColor:N,borderBottomColor:N,borderLeftColor:N,filter:tn,WebkitFilter:tn,mask:en,WebkitMask:en},ur=t=>wl[t],Sl=new Set([tn,en]);function dr(t,e){let n=ur(t);return Sl.has(n)||(n=Z),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Tl=new Set(["auto","none","0"]);function Pl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Tl.has(o)&&Pt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=dr(n,i)}class Cl extends Tn{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 d=e[l];if(typeof d=="string"&&(d=d.trim(),yn(d))){const h=nr(d,n.current);h!==void 0&&(e[l]=h),l===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ir.has(s)||e.length!==2)return;const[i,o]=e,r=cs(i),a=cs(o),c=Yn(i),u=Yn(o);if(c!==u&&it[s]){this.needsMeasurement=!0;return}if(r!==a)if(is(r)&&is(a))for(let l=0;l<e.length;l++){const d=e[l];typeof d=="string"&&(e[l]=parseFloat(d))}else it[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||gl(e[i]))&&s.push(i);s.length&&Pl(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=it[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]=it[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function hr(t,e,n){if(t==null)return[];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).filter(s=>s!=null)}const fr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Qt(t){return vi(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Dn}=Ri(queueMicrotask,!1),q={x:!1,y:!1};function mr(){return q.x||q.y}function Al(t){return t==="x"||t==="y"?q[t]?null:(q[t]=!0,()=>{q[t]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}function pr(t,e){const n=hr(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Vl(t){return!(t.pointerType==="touch"||mr())}function Ml(t,e,n={}){const[s,i,o]=pr(t,n);return s.forEach(r=>{let a=!1,c=!1,u;const l=()=>{r.removeEventListener("pointerleave",p)},d=x=>{u&&(u(x),u=void 0),l()},h=x=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,d(x))},m=()=>{a=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},p=x=>{if(x.pointerType!=="touch"){if(a){c=!0;return}d(x)}},y=x=>{if(!Vl(x))return;c=!1;const v=e(r,x);typeof v=="function"&&(u=v,r.addEventListener("pointerleave",p,i))};r.addEventListener("pointerenter",y,i),r.addEventListener("pointerdown",m,i)}),o}const gr=(t,e)=>e?t===e?!0:gr(t,e.parentElement):!1,kn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Dl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function kl(t){return Dl.has(t.tagName)||t.isContentEditable===!0}const El=new Set(["INPUT","SELECT","TEXTAREA"]);function jl(t){return El.has(t.tagName)||t.isContentEditable===!0}const te=new WeakSet;function ds(t){return e=>{e.key==="Enter"&&t(e)}}function Me(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Rl=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ds(()=>{if(te.has(n))return;Me(n,"down");const i=ds(()=>{Me(n,"up")}),o=()=>Me(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 hs(t){return kn(t)&&!mr()}const fs=new WeakSet;function Ll(t,e,n={}){const[s,i,o]=pr(t,n),r=a=>{const c=a.currentTarget;if(!hs(a)||fs.has(a))return;te.add(c),n.stopPropagation&&fs.add(a);const u=e(c,a),l=(m,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),te.has(c)&&te.delete(c),hs(m)&&typeof u=="function"&&u(m,{success:p})},d=m=>{l(m,c===window||c===document||n.useGlobalTarget||gr(c,m.target))},h=m=>{l(m,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Qt(a)&&(a.addEventListener("focus",u=>Rl(u,i)),!kl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function En(t){return vi(t)&&"ownerSVGElement"in t}const ee=new WeakMap;let ne;const yr=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:En(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Nl=yr("inline","width","offsetWidth"),Bl=yr("block","height","offsetHeight");function Il({target:t,borderBoxSize:e}){ee.get(t)?.forEach(n=>{n(t,{get width(){return Nl(t,e)},get height(){return Bl(t,e)}})})}function Fl(t){t.forEach(Il)}function Ol(){typeof ResizeObserver>"u"||(ne=new ResizeObserver(Fl))}function zl(t,e){ne||Ol();const n=hr(t);return n.forEach(s=>{let i=ee.get(s);i||(i=new Set,ee.set(s,i)),i.add(e),ne?.observe(s)}),()=>{n.forEach(s=>{const i=ee.get(s);i?.delete(e),i?.size||ne?.unobserve(s)})}}const se=new Set;let wt;function Ul(){wt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};se.forEach(e=>e(t))},window.addEventListener("resize",wt)}function Wl(t){return se.add(t),wt||Ul(),()=>{se.delete(t),!se.size&&typeof wt=="function"&&(window.removeEventListener("resize",wt),wt=void 0)}}function ms(t,e){return typeof t=="function"?Wl(t):zl(t,e)}function Kl(t){return En(t)&&t.tagName==="svg"}const $l=[...cr,N,Z],Hl=t=>$l.find(lr(t)),ps=()=>({translate:0,scale:1,origin:0,originPoint:0}),St=()=>({x:ps(),y:ps()}),gs=()=>({min:0,max:0}),F=()=>({x:gs(),y:gs()}),_l=new WeakMap;function xe(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ot(t){return typeof t=="string"||Array.isArray(t)}const jn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rn=["initial",...jn];function ve(t){return xe(t.animate)||Rn.some(e=>Ot(t[e]))}function xr(t){return!!(ve(t)||t.variants)}function Gl(t,e,n){for(const s in e){const i=e[s],o=n[s];if(U(i))t.addValue(s,i);else if(U(o))t.addValue(s,Ct(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,Ct(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const nn={current:null},vr={current:!1},Xl=typeof window<"u";function Yl(){if(vr.current=!0,!!Xl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>nn.current=t.matches;t.addEventListener("change",e),e()}else nn.current=!1}const ys=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let he={};function br(t){he=t}function ql(){return he}class Zl{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:r,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Tn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=W.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,k.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=c,this.blockInitialAnimation=!!r,this.isControllingVariants=ve(n),this.isVariantNode=xr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const p=h[m];u[m]!==void 0&&U(p)&&p.set(u[m])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,_l.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)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(vr.current||Yl(),this.shouldReduceMotion=nn.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ot(this.notifyUpdate),ot(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){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&tr.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:a,times:c,ease:u,duration:l}=n.accelerate,d=new Ji({element:this.current,name:e,keyframes:a,times:c,ease:u,duration:$(l)}),h=r(d);this.valueSubscriptions.set(e,()=>{h(),d.cancel()});return}const s=Mt.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;typeof window<"u"&&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 he){const n=he[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):F()}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<ys.length;s++){const i=ys[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=Gl(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=Ct(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"&&(xi(s)||bi(s))?s=parseFloat(s):!Hl(s)&&Z.test(n)&&(s=dr(e,n)),this.setBaseTarget(e,U(s)?s.get():s)),U(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=An(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&&!U(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 mn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Dn.render(this.render)}}class wr extends Zl{constructor(){super(...arguments),this.KeyframeResolver=Cl}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[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;U(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class at{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Sr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Jl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ql(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 De(t){return t===void 0||t===1}function sn({scale:t,scaleX:e,scaleY:n}){return!De(t)||!De(e)||!De(n)}function ut(t){return sn(t)||Tr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Tr(t){return xs(t.x)||xs(t.y)}function xs(t){return t&&t!=="0%"}function fe(t,e,n){const s=t-n,i=e*s;return n+i}function vs(t,e,n,s,i){return i!==void 0&&(t=fe(t,i,s)),fe(t,n,s)+e}function rn(t,e=0,n=1,s,i){t.min=vs(t.min,e,n,s,i),t.max=vs(t.max,e,n,s,i)}function Pr(t,{x:e,y:n}){rn(t.x,e.translate,e.scale,e.originPoint),rn(t.y,n.translate,n.scale,n.originPoint)}const bs=.999999999999,ws=1.0000000000001;function tc(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:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(tt(t.x,-o.scroll.offset.x),tt(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Pr(t,r)),s&&ut(o.latestValues)&&ie(t,o.latestValues,o.layout?.layoutBox))}e.x<ws&&e.x>bs&&(e.x=1),e.y<ws&&e.y>bs&&(e.y=1)}function tt(t,e){t.min+=e,t.max+=e}function Ss(t,e,n,s,i=.5){const o=j(t.min,t.max,i);rn(t,e,n,o,s)}function Ts(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function ie(t,e,n){const s=n??t;Ss(t.x,Ts(e.x,s.x),e.scaleX,e.scale,e.originX),Ss(t.y,Ts(e.y,s.y),e.scaleY,e.scale,e.originY)}function Cr(t,e){return Sr(Ql(t.getBoundingClientRect(),e))}function ec(t,e,n){const s=Cr(t,n),{scroll:i}=e;return i&&(tt(s.x,i.offset.x),tt(s.y,i.offset.y)),s}const nc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sc=Vt.length;function ic(t,e,n){let s="",i=!0;for(let o=0;o<sc;o++){const r=Vt[o],a=t[r];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(r.startsWith("scale")?1:0);else{const u=parseFloat(a);c=r.startsWith("scale")?u===1:u===0}if(!c||n){const u=fr(a,Mn[r]);if(!c){i=!1;const l=nc[r]||r;s+=`${l}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Ln(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const c in e){const u=e[c];if(Mt.has(c)){r=!0;continue}else if(Ni(c)){i[c]=u;continue}else{const l=fr(u,Mn[c]);c.startsWith("origin")?(a=!0,o[c]=l):s[c]=l}}if(e.transform||(r||n?s.transform=ic(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:l=0}=o;s.transformOrigin=`${c} ${u} ${l}`}}function Ar(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 Ps(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const kt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=Ps(t,e.target.x),s=Ps(t,e.target.y);return`${n}% ${s}%`}},rc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Z.parse(t);if(i.length>5)return s;const o=Z.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const u=j(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}},on={borderRadius:{...kt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:kt,borderTopRightRadius:kt,borderBottomLeftRadius:kt,borderBottomRightRadius:kt,boxShadow:rc};function Vr(t,{layout:e,layoutId:n}){return Mt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!on[t]||t==="opacity")}function Nn(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(U(s[r])||i&&U(i[r])||Vr(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function oc(t){return window.getComputedStyle(t)}class ac extends wr{constructor(){super(...arguments),this.type="html",this.renderInstance=Ar}readValueFromInstance(e,n){if(Mt.has(n))return this.projection?.isProjecting?He(n):Va(e,n);{const s=oc(e),i=(Ni(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Cr(e,n)}build(e,n,s){Ln(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Nn(e,n,s)}}const lc={offset:"stroke-dashoffset",array:"stroke-dasharray"},cc={offset:"strokeDashoffset",array:"strokeDasharray"};function uc(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?lc:cc;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const dc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Mr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},c,u,l){if(Ln(t,a,u),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h}=t;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=l?.transformBox??"fill-box",delete d.transformBox);for(const m of dc)d[m]!==void 0&&(h[m]=d[m],delete d[m]);e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&uc(d,i,o,r,!1)}const Dr=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"]),kr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function hc(t,e,n,s){Ar(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Dr.has(i)?i:Vn(i),e.attrs[i])}function Er(t,e,n){const s=Nn(t,e,n);for(const i in t)if(U(t[i])||U(e[i])){const o=Vt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class fc extends wr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Mt.has(n)){const s=ur(n);return s&&s.default||0}return n=Dr.has(n)?n:Vn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Er(e,n,s)}build(e,n,s){Mr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){hc(e,n,s,i)}mount(e){this.isSVGTag=kr(e.tagName),super.mount(e)}}const mc=Rn.length;function jr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?jr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<mc;n++){const s=Rn[n],i=t.props[s];(Ot(i)||i===!1)&&(e[s]=i)}return e}function Rr(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 pc=[...jn].reverse(),gc=jn.length;function yc(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ml(t,n,s)))}function xc(t){let e=yc(t),n=Cs(),s=!0,i=!1;const o=u=>(l,d)=>{const h=pt(t,d,u==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:m,transitionEnd:p,...y}=h;l={...l,...y,...p}}return l};function r(u){e=u(t)}function a(u){const{props:l}=t,d=jr(t.parent)||{},h=[],m=new Set;let p={},y=1/0;for(let v=0;v<gc;v++){const g=pc[v],w=n[g],S=l[g]!==void 0?l[g]:d[g],P=Ot(S),D=g===u?w.isActive:null;D===!1&&(y=v);let L=S===d[g]&&S!==l[g]&&P;if(L&&(s||i)&&t.manuallyAnimateOnMount&&(L=!1),w.protectedKeys={...p},!w.isActive&&D===null||!S&&!w.prevProp||xe(S)||typeof S=="boolean")continue;if(g==="exit"&&w.isActive&&D!==!0){w.prevResolvedValues&&(p={...p,...w.prevResolvedValues});continue}const A=vc(w.prevProp,S);let V=A||g===u&&w.isActive&&!L&&P||v>y&&P,C=!1;const E=Array.isArray(S)?S:[S];let B=E.reduce(o(g),{});D===!1&&(B={});const{prevResolvedValues:X={}}=w,M={...X,...B},I=O=>{V=!0,m.has(O)&&(C=!0,m.delete(O)),w.needsAnimating[O]=!0;const H=t.getValue(O);H&&(H.liveStyle=!1)};for(const O in M){const H=B[O],lt=X[O];if(p.hasOwnProperty(O))continue;let gt=!1;Ze(H)&&Ze(lt)?gt=!Rr(H,lt):gt=H!==lt,gt?H!=null?I(O):m.add(O):H!==void 0&&m.has(O)?I(O):w.protectedKeys[O]=!0}w.prevProp=S,w.prevResolvedValues=B,w.isActive&&(p={...p,...B}),(s||i)&&t.blockInitialAnimation&&(V=!1);const J=L&&A;V&&(!J||C)&&h.push(...E.map(O=>{const H={type:g};if(typeof O=="string"&&(s||i)&&!J&&t.manuallyAnimateOnMount&&t.parent){const{parent:lt}=t,gt=pt(lt,O);if(lt.enteringChildren&&gt){const{delayChildren:so}=gt.transition||{};H.delay=er(lt.enteringChildren,t,so)}}return{animation:O,options:H}}))}if(m.size){const v={};if(typeof l.initial!="boolean"){const g=pt(t,Array.isArray(l.initial)?l.initial[0]:l.initial);g&&g.transition&&(v.transition=g.transition)}m.forEach(g=>{const w=t.getBaseTarget(g),S=t.getValue(g);S&&(S.liveStyle=!0),v[g]=w??null}),h.push({animation:v})}let x=!!h.length;return s&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,i=!1,x?e(h):Promise.resolve()}function c(u,l){if(n[u].isActive===l)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(u,l)),n[u].isActive=l;const d=a(u);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:a,setActive:c,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Cs(),i=!0}}}function vc(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Rr(e,t):!1}function ct(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cs(){return{animate:ct(!0),whileInView:ct(),whileHover:ct(),whileTap:ct(),whileDrag:ct(),whileFocus:ct(),exit:ct()}}function an(t,e){t.min=e.min,t.max=e.max}function Y(t,e){an(t.x,e.x),an(t.y,e.y)}function As(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Lr=1e-4,bc=1-Lr,wc=1+Lr,Nr=.01,Sc=0-Nr,Tc=0+Nr;function K(t){return t.max-t.min}function Pc(t,e,n){return Math.abs(t-e)<=n}function Vs(t,e,n,s=.5){t.origin=s,t.originPoint=j(e.min,e.max,t.origin),t.scale=K(n)/K(e),t.translate=j(n.min,n.max,t.origin)-t.originPoint,(t.scale>=bc&&t.scale<=wc||isNaN(t.scale))&&(t.scale=1),(t.translate>=Sc&&t.translate<=Tc||isNaN(t.translate))&&(t.translate=0)}function Nt(t,e,n,s){Vs(t.x,e.x,n.x,s?s.originX:void 0),Vs(t.y,e.y,n.y,s?s.originY:void 0)}function Ms(t,e,n,s=0){const i=s?j(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+K(e)}function Cc(t,e,n,s){Ms(t.x,e.x,n.x,s?.x),Ms(t.y,e.y,n.y,s?.y)}function Ds(t,e,n,s=0){const i=s?j(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+K(e)}function me(t,e,n,s){Ds(t.x,e.x,n.x,s?.x),Ds(t.y,e.y,n.y,s?.y)}function ks(t,e,n,s,i){return t-=e,t=fe(t,1/n,s),i!==void 0&&(t=fe(t,1/i,s)),t}function Ac(t,e=0,n=1,s=.5,i,o=t,r=t){if(et.test(e)&&(e=parseFloat(e),e=j(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=j(o.min,o.max,s);t===o&&(a-=e),t.min=ks(t.min,e,n,a,i),t.max=ks(t.max,e,n,a,i)}function Es(t,e,[n,s,i],o,r){Ac(t,e[n],e[s],e[i],e.scale,o,r)}const Vc=["x","scaleX","originX"],Mc=["y","scaleY","originY"];function js(t,e,n,s){Es(t.x,e,Vc,n?n.x:void 0,s?s.x:void 0),Es(t.y,e,Mc,n?n.y:void 0,s?s.y:void 0)}function Rs(t){return t.translate===0&&t.scale===1}function Br(t){return Rs(t.x)&&Rs(t.y)}function Ls(t,e){return t.min===e.min&&t.max===e.max}function Dc(t,e){return Ls(t.x,e.x)&&Ls(t.y,e.y)}function Ns(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ir(t,e){return Ns(t.x,e.x)&&Ns(t.y,e.y)}function Bs(t){return K(t.x)/K(t.y)}function Is(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Q(t){return[t("x"),t("y")]}function kc(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:l,rotateX:d,rotateY:h,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),l&&(s+=`rotate(${l}deg) `),d&&(s+=`rotateX(${d}deg) `),h&&(s+=`rotateY(${h}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Fr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Ec=Fr.length,Fs=t=>typeof t=="string"?parseFloat(t):t,Os=t=>typeof t=="number"||T.test(t);function jc(t,e,n,s,i,o){i?(t.opacity=j(0,n.opacity??1,Rc(s)),t.opacityExit=j(e.opacity??1,0,Lc(s))):o&&(t.opacity=j(e.opacity??1,n.opacity??1,s));for(let r=0;r<Ec;r++){const a=Fr[r];let c=zs(e,a),u=zs(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Os(c)===Os(u)?(t[a]=Math.max(j(Fs(c),Fs(u),s),0),(et.test(u)||et.test(c))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=j(e.rotate||0,n.rotate||0,s))}function zs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Rc=Or(0,.5,Di),Lc=Or(.5,.95,G);function Or(t,e,n){return s=>s<t?0:s>e?1:n(It(t,e,s))}function Nc(t,e,n){const s=U(t)?t:Ct(t);return s.start(Cn("",s,e,n)),s.animation}function zt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Bc=(t,e)=>t.depth-e.depth;class Ic{constructor(){this.children=[],this.isDirty=!1}add(e){hn(this.children,e),this.isDirty=!0}remove(e){ae(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Bc),this.isDirty=!1,this.children.forEach(e)}}function Fc(t,e){const n=W.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(ot(s),t(o-e))};return k.setup(s,!0),()=>ot(s)}function re(t){return U(t)?t.get():t}class Oc{constructor(){this.members=[]}add(e){hn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(ae(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(ae(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){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:o}=e.options;(i===void 0||i!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const oe={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ke=["","X","Y","Z"],zc=1e3;let Uc=0;function Ee(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function zr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=or(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&&zr(s)}function Ur({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Uc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach($c),this.nodes.forEach(qc),this.nodes.forEach(Zc),this.nodes.forEach(Hc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ic)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new mn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const c=this.eventHandlers.get(r);c&&c.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=En(r)&&!Kl(r),this.instance=r;const{layoutId:a,layout:c,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&&(c||a)&&(this.isLayoutDirty=!0),t){let l,d=0;const h=()=>this.root.updateBlockedByResize=!1;k.read(()=>{d=window.innerWidth}),t(r,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,l&&l(),l=Fc(h,250),oe.hasAnimatedSinceResize&&(oe.hasAnimatedSinceResize=!1,this.nodes.forEach(Ks)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||nu,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!Ir(this.targetLayout,m),g=!d&&h;if(this.options.layoutRoot||this.resumeFrom||g||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Pn(p,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(l,g)}else d||Ks(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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(),ot(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(Jc),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&&zr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const d=this.path[l];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)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()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(Gc),this.nodes.forEach(Us);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ws);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Xc),this.nodes.forEach(Yc),this.nodes.forEach(Wc),this.nodes.forEach(Kc)):this.nodes.forEach(Ws),this.clearAllSnapshots();const a=W.now();z.delta=nt(0,1e3/60,a-z.timestamp),z.timestamp=a,z.isProcessing=!0,Se.update.process(z),Se.preRender.process(z),Se.render.process(z),z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Dn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_c),this.sharedNodes.forEach(Qc)}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&&!K(this.snapshot.measuredBox.x)&&!K(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=F()),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 c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Br(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,l=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||ut(this.latestValues)||l)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return r&&(c=this.removeTransform(c)),su(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return F();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(iu))){const{scroll:u}=this.root;u&&(tt(a.x,u.offset.x),tt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=F();if(Y(a,r),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:l,options:d}=u;u!==this.root&&l&&d.layoutScroll&&(l.wasRoot&&Y(a,r),tt(a.x,l.offset.x),tt(a.y,l.offset.y))}return a}applyTransform(r,a=!1,c){const u=c||F();Y(u,r);for(let l=0;l<this.path.length;l++){const d=this.path[l];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(tt(u.x,-d.scroll.offset.x),tt(u.y,-d.scroll.offset.y)),ut(d.latestValues)&&ie(u,d.latestValues,d.layout?.layoutBox)}return ut(this.latestValues)&&ie(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(r){const a=F();Y(a,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!ut(u.latestValues))continue;let l;u.instance&&(sn(u.latestValues)&&u.updateSnapshot(),l=F(),Y(l,u.measurePageBox())),js(a,u.latestValues,u.snapshot?.layoutBox,l)}return ut(this.latestValues)&&js(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 c=!!this.resumingFrom||this!==a;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:d}=this.options;if(!this.layout||!(l||d))return;this.resolvedRelativeTargetAt=z.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cc(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Y(this.target,this.layout.layoutBox),Pr(this.target,this.targetDelta)):Y(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||sn(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)}createRelativeTarget(r,a,c){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),me(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),Y(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===z.timestamp&&(c=!1),c)return;const{layout:u,layoutId:l}=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||l))return;Y(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;tc(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=F());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(As(this.prevProjectionDelta.x,this.projectionDelta.x),As(this.prevProjectionDelta.y,this.projectionDelta.y)),Nt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Is(this.projectionDelta.x,this.prevProjectionDelta.x)||!Is(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}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=St(),this.projectionDelta=St(),this.projectionDeltaWithTransform=St()}setAnimationOrigin(r,a=!1){const c=this.snapshot,u=c?c.latestValues:{},l={...this.latestValues},d=St();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=F(),m=c?c.source:void 0,p=this.layout?this.layout.source:void 0,y=m!==p,x=this.getStack(),v=!x||x.members.length<=1,g=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(eu));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const P=S/1e3;$s(d.x,r.x,P),$s(d.y,r.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(me(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),tu(this.relativeTarget,this.relativeTargetOrigin,h,P),w&&Dc(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=F()),Y(w,this.relativeTarget)),y&&(this.animationValues=l,jc(l,u,this.latestValues,P,g,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=k.update(()=>{oe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ct(0)),this.motionValue.jump(0,!1),this.currentAnimation=Nc(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(zc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=r;if(!(!a||!c||!u)){if(this!==r&&this.layout&&u&&Wr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||F();const d=K(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+d;const h=K(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+h}Y(a,c),ie(a,l),Nt(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Oc),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:c}={}){const u=this.getStack();u&&u.promote(this,c),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:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&Ee("z",r,u,this.animationValues);for(let l=0;l<ke.length;l++)Ee(`rotate${ke[l]}`,r,u,this.animationValues),Ee(`skew${ke[l]}`,r,u,this.animationValues);r.render();for(const l in u)r.setStaticValue(l,u[l]),this.animationValues&&(this.animationValues[l]=u[l]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=re(a?.pointerEvents)||"",r.transform=c?c(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=re(a?.pointerEvents)||""),this.hasProjected&&!ut(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const l=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=kc(this.projectionDeltaWithTransform,this.treeScale,l);c&&(d=c(l,d)),r.transform=d;const{x:h,y:m}=this.projectionDelta;r.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?r.opacity=u===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:r.opacity=u===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const p in on){if(l[p]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:v}=on[p],g=d==="none"?l[p]:y(l[p],u);if(x){const w=x.length;for(let S=0;S<w;S++)r[x[S]]=g}else v?this.options.visualElement.renderState.vars[p]=g:r[p]=g}this.options.layoutId&&(r.pointerEvents=u===this?re(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Us),this.root.sharedNodes.clear()}}}function Wc(t){t.updateLayout()}function Kc(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;if(i==="size")Q(l=>{const d=o?e.measuredBox[l]:e.layoutBox[l],h=K(d);d.min=n[l].min,d.max=d.min+h});else if(i==="x"||i==="y"){const l=i==="x"?"y":"x";an(o?e.measuredBox[l]:e.layoutBox[l],n[l])}else Wr(i,e.layoutBox,n)&&Q(l=>{const d=o?e.measuredBox[l]:e.layoutBox[l],h=K(n[l]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[l].max=t.relativeTarget[l].min+h)});const r=St();Nt(r,n,e.layoutBox);const a=St();o?Nt(a,t.applyTransform(s,!0),e.measuredBox):Nt(a,n,e.layoutBox);const c=!Br(r);let u=!1;if(!t.resumeFrom){const l=t.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:d,layout:h}=l;if(d&&h){const m=t.options.layoutAnchor||void 0,p=F();me(p,e.layoutBox,d.layoutBox,m);const y=F();me(y,n,h.layoutBox,m),Ir(p,y)||(u=!0),l.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=l)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function $c(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 Hc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function _c(t){t.clearSnapshot()}function Us(t){t.clearMeasurements()}function Gc(t){t.isLayoutDirty=!0,t.updateLayout()}function Ws(t){t.isLayoutDirty=!1}function Xc(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Yc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ks(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function qc(t){t.resolveTargetDelta()}function Zc(t){t.calcProjection()}function Jc(t){t.resetSkewAndRotation()}function Qc(t){t.removeLeadSnapshot()}function $s(t,e,n){t.translate=j(e.translate,0,n),t.scale=j(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Hs(t,e,n,s){t.min=j(e.min,n.min,s),t.max=j(e.max,n.max,s)}function tu(t,e,n,s){Hs(t.x,e.x,n.x,s),Hs(t.y,e.y,n.y,s)}function eu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const nu={duration:.45,ease:[.4,0,.1,1]},_s=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Gs=_s("applewebkit/")&&!_s("chrome/")?Math.round:G;function Xs(t){t.min=Gs(t.min),t.max=Gs(t.max)}function su(t){Xs(t.x),Xs(t.y)}function Wr(t,e,n){return t==="position"||t==="preserve-aspect"&&!Pc(Bs(e),Bs(n),.2)}function iu(t){return t!==t.root&&t.scroll?.wasRoot}const ru=Ur({attachResizeListener:(t,e)=>zt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),je={current:void 0},Kr=Ur({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!je.current){const t=new ru({});t.mount(window),t.setOptions({layoutScroll:!0}),je.current=t}return je.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Bn=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Ys(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function ou(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Ys(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():Ys(t[i],null)}}}}function au(...t){return b.useCallback(ou(...t),t)}class lu extends b.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(Qt(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=Qt(s)&&s.offsetWidth||0,o=Qt(s)&&s.offsetHeight||0,r=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(r.height),a.width=parseFloat(r.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=o-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function cu({children:t,isPresent:e,anchorX:n,anchorY:s,root:i,pop:o}){const r=b.useId(),a=b.useRef(null),c=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=b.useContext(Bn),l=t.props?.ref??t?.ref,d=au(a,l);return b.useInsertionEffect(()=>{const{width:h,height:m,top:p,left:y,right:x,bottom:v}=c.current;if(e||o===!1||!a.current||!h||!m)return;const g=n==="left"?`left: ${y}`:`right: ${x}`,w=s==="bottom"?`bottom: ${v}`:`top: ${p}`;a.current.dataset.motionPopId=r;const S=document.createElement("style");u&&(S.nonce=u);const P=i??document.head;return P.appendChild(S),S.sheet&&S.sheet.insertRule(`
2
- [data-motion-pop-id="${r}"] {
3
- position: absolute !important;
4
- width: ${h}px !important;
5
- height: ${m}px !important;
6
- ${g}px !important;
7
- ${w}px !important;
8
- }
9
- `),()=>{a.current?.removeAttribute("data-motion-pop-id"),P.contains(S)&&P.removeChild(S)}},[e]),f.jsx(lu,{isPresent:e,childRef:a,sizeRef:c,pop:o,children:o===!1?t:b.cloneElement(t,{ref:d})})}const uu=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,anchorY:c,root:u})=>{const l=dn(du),d=b.useId();let h=!0,m=b.useMemo(()=>(h=!1,{id:d,initial:e,isPresent:n,custom:i,onExitComplete:p=>{l.set(p,!0);for(const y of l.values())if(!y)return;s&&s()},register:p=>(l.set(p,!1),()=>l.delete(p))}),[n,l,s]);return o&&h&&(m={...m}),b.useMemo(()=>{l.forEach((p,y)=>l.set(y,!1))},[n]),b.useEffect(()=>{!n&&!l.size&&s&&s()},[n]),t=f.jsx(cu,{pop:r==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:t}),f.jsx(ge.Provider,{value:m,children:t})};function du(){return new Map}function $r(t=!0){const e=b.useContext(ge);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=b.useId();b.useEffect(()=>{if(t)return i(o)},[t]);const r=b.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Gt=t=>t.key||"";function qs(t){const e=[];return b.Children.forEach(t,n=>{b.isValidElement(n)&&e.push(n)}),e}const hu=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[l,d]=$r(r),h=b.useMemo(()=>qs(t),[t]),m=r&&!l?[]:h.map(Gt),p=b.useRef(!0),y=b.useRef(h),x=dn(()=>new Map),v=b.useRef(new Set),[g,w]=b.useState(h),[S,P]=b.useState(h);yi(()=>{p.current=!1,y.current=h;for(let A=0;A<S.length;A++){const V=Gt(S[A]);m.includes(V)?(x.delete(V),v.current.delete(V)):x.get(V)!==!0&&x.set(V,!1)}},[S,m.length,m.join("-")]);const D=[];if(h!==g){let A=[...h];for(let V=0;V<S.length;V++){const C=S[V],E=Gt(C);m.includes(E)||(A.splice(V,0,C),D.push(C))}return o==="wait"&&D.length&&(A=D),P(qs(A)),w(h),null}const{forceRender:L}=b.useContext(un);return f.jsx(f.Fragment,{children:S.map(A=>{const V=Gt(A),C=r&&!l?!1:h===S||m.includes(V),E=()=>{if(v.current.has(V))return;if(x.has(V))v.current.add(V),x.set(V,!0);else return;let B=!0;x.forEach(X=>{X||(B=!1)}),B&&(L?.(),P(y.current),r&&d?.(),s&&s())};return f.jsx(uu,{isPresent:C,initial:!p.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:u,onExitComplete:C?void 0:E,anchorX:a,anchorY:c,children:A},V)})})},Hr=b.createContext({strict:!1}),Zs={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"]};let Js=!1;function fu(){if(Js)return;const t={};for(const e in Zs)t[e]={isEnabled:n=>Zs[e].some(s=>!!n[s])};br(t),Js=!0}function _r(){return fu(),ql()}function mu(t){const e=_r();for(const n in t)e[n]={...e[n],...t[n]};br(e)}const pu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function pe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||pu.has(t)}let Gr=t=>!pe(t);function gu(t){typeof t=="function"&&(Gr=e=>e.startsWith("on")?!pe(e):t(e))}try{gu(require("@emotion/is-prop-valid").default)}catch{}function yu(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||U(t[i])||(Gr(i)||n===!0&&pe(i)||!e&&!pe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const be=b.createContext({});function xu(t,e){if(ve(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ot(n)?n:void 0,animate:Ot(s)?s:void 0}}return t.inherit!==!1?e:{}}function vu(t){const{initial:e,animate:n}=xu(t,b.useContext(be));return b.useMemo(()=>({initial:e,animate:n}),[Qs(e),Qs(n)])}function Qs(t){return Array.isArray(t)?t.join(" "):t}const In=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Xr(t,e,n){for(const s in e)!U(e[s])&&!Vr(s,n)&&(t[s]=e[s])}function bu({transformTemplate:t},e){return b.useMemo(()=>{const n=In();return Ln(n,e,t),Object.assign({},n.vars,n.style)},[e])}function wu(t,e){const n=t.style||{},s={};return Xr(s,n,t),Object.assign(s,bu(t,e)),s}function Su(t,e){const n={},s=wu(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 Yr=()=>({...In(),attrs:{}});function Tu(t,e,n,s){const i=b.useMemo(()=>{const o=Yr();return Mr(o,e,kr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Xr(o,t.style,t),i.style={...o,...i.style}}return i}const Pu=["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 Fn(t){return typeof t!="string"||t.includes("-")?!1:!!(Pu.indexOf(t)>-1||/[A-Z]/u.test(t))}function Cu(t,e,n,{latestValues:s},i,o=!1,r){const c=(r??Fn(t)?Tu:Su)(e,s,i,t),u=yu(e,typeof t=="string",o),l=t!==b.Fragment?{...u,...c,ref:n}:{},{children:d}=e,h=b.useMemo(()=>U(d)?d.get():d,[d]);return b.createElement(t,{...l,children:h})}function Au({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Vu(n,s,i,t),renderState:e()}}function Vu(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=re(o[h]);let{initial:r,animate:a}=t;const c=ve(t),u=xr(t);e&&u&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||r===!1;const d=l?a:r;if(d&&typeof d!="boolean"&&!xe(d)){const h=Array.isArray(d)?d:[d];for(let m=0;m<h.length;m++){const p=An(t,h[m]);if(p){const{transitionEnd:y,transition:x,...v}=p;for(const g in v){let w=v[g];if(Array.isArray(w)){const S=l?w.length-1:0;w=w[S]}w!==null&&(i[g]=w)}for(const g in y)i[g]=y[g]}}}return i}const qr=t=>(e,n)=>{const s=b.useContext(be),i=b.useContext(ge),o=()=>Au(t,e,s,i);return n?o():dn(o)},Mu=qr({scrapeMotionValuesFromProps:Nn,createRenderState:In}),Du=qr({scrapeMotionValuesFromProps:Er,createRenderState:Yr}),ku=Symbol.for("motionComponentSymbol");function Eu(t,e,n){const s=b.useRef(n);b.useInsertionEffect(()=>{s.current=n});const i=b.useRef(null);return b.useCallback(o=>{o&&t.onMount?.(o);const r=s.current;if(typeof r=="function")if(o){const a=r(o);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):r(o);else r&&(r.current=o);e&&(o?e.mount(o):e.unmount())},[e])}const Zr=b.createContext({});function vt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ju(t,e,n,s,i,o){const{visualElement:r}=b.useContext(be),a=b.useContext(Hr),c=b.useContext(ge),u=b.useContext(Bn),l=u.reducedMotion,d=u.skipAnimations,h=b.useRef(null),m=b.useRef(!1);s=s||a.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:r,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,skipAnimations:d,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const p=h.current,y=b.useContext(Zr);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&Ru(h.current,n,i,y);const x=b.useRef(!1);b.useInsertionEffect(()=>{p&&x.current&&p.update(n,c)});const v=n[rr],g=b.useRef(!!v&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return yi(()=>{m.current=!0,p&&(x.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),g.current&&p.animationState&&p.animationState.animateChanges())}),b.useEffect(()=>{p&&(!g.current&&p.animationState&&p.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),g.current=!1),p.enteringChildren=void 0)}),p}function Ru(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:l,layoutCrossfade:d}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Jr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&vt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:d,layoutScroll:c,layoutRoot:u,layoutAnchor:l})}function Jr(t){if(t)return t.options.allowProjection!==!1?t.projection:Jr(t.parent)}function Re(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&mu(s);const o=n?n==="svg":Fn(t),r=o?Du:Mu;function a(u,l){let d;const h={...b.useContext(Bn),...u,layoutId:Lu(u)},{isStatic:m}=h,p=vu(u),y=r(u,m);if(!m&&typeof window<"u"){Nu();const x=Bu(h);d=x.MeasureLayout,p.visualElement=ju(t,y,h,i,x.ProjectionNode,o)}return f.jsxs(be.Provider,{value:p,children:[d&&p.visualElement?f.jsx(d,{visualElement:p.visualElement,...h}):null,Cu(t,u,Eu(y,p.visualElement,l),y,m,e,o)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=b.forwardRef(a);return c[ku]=t,c}function Lu({layoutId:t}){const e=b.useContext(un).id;return e&&t!==void 0?e+"-"+t:t}function Nu(t,e){b.useContext(Hr).strict}function Bu(t){const e=_r(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Iu(t,e){if(typeof Proxy>"u")return Re;const n=new Map,s=(o,r)=>Re(o,r,t,e),i=(o,r)=>s(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,Re(r,void 0,t,e)),n.get(r))})}const Fu=(t,e)=>e.isSVG??Fn(t)?new fc(e):new ac(e,{allowProjection:t!==b.Fragment});class Ou extends at{constructor(e){super(e),e.animationState||(e.animationState=xc(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();xe(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 zu=0;class Uu extends at{constructor(){super(...arguments),this.id=zu++,this.isExitComplete=!1}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;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:r}=this.node.getProps();if(typeof o=="string"){const a=pt(this.node,o,r);if(a){const{transition:c,transitionEnd:u,...l}=a;for(const d in l)this.node.getValue(d)?.jump(l[d])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Wu={animation:{Feature:Ou},exit:{Feature:Uu}};function $t(t){return{point:{x:t.pageX,y:t.pageY}}}const Ku=t=>e=>kn(e)&&t(e,$t(e));function Bt(t,e,n,s){return zt(t,e,Ku(n),s)}const Qr=({current:t})=>t?t.ownerDocument.defaultView:null,ti=(t,e)=>Math.abs(t-e);function $u(t,e){const n=ti(t.x,e.x),s=ti(t.y,e.y);return Math.sqrt(n**2+s**2)}const ei=new Set(["auto","scroll"]);class to{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Xt(this.lastRawMoveEventInfo,this.transformPagePoint));const m=Le(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=$u(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!y)return;const{point:x}=m,{timestamp:v}=z;this.history.push({...x,timestamp:v});const{onStart:g,onMove:w}=this.handlers;p||(g&&g(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,p)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=p,this.lastMoveEventInfo=Xt(p,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(m,p)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Le(m.type==="pointercancel"?this.lastMoveEventInfo:Xt(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,g),x&&x(m,g)},!kn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const c=$t(e),u=Xt(c,this.transformPagePoint),{point:l}=u,{timestamp:d}=z;this.history=[{...l,timestamp:d}];const{onSessionStart:h}=n;h&&h(e,Le(u,this.history)),this.removeListeners=Ut(Bt(this.contextWindow,"pointermove",this.handlePointerMove),Bt(this.contextWindow,"pointerup",this.handlePointerUp),Bt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(ei.has(s.overflowX)||ei.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(e,i),k.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ot(this.updatePoint)}}function Xt(t,e){return e?{point:e(t.point)}:t}function ni(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Le({point:t},e){return{point:t,delta:ni(t,eo(e)),offset:ni(t,Hu(e)),velocity:_u(e,.1)}}function Hu(t){return t[0]}function eo(t){return t[t.length-1]}function _u(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=eo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>$(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>$(e)*2&&(s=t[1]);const o=_(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 Gu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?j(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?j(n,t,s.max):Math.min(t,n)),t}function si(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 Xu(t,{top:e,left:n,bottom:s,right:i}){return{x:si(t.x,n,i),y:si(t.y,e,s)}}function ii(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 Yu(t,e){return{x:ii(t.x,e.x),y:ii(t.y,e.y)}}function qu(t,e){let n=.5;const s=K(t),i=K(e);return i>s?n=It(e.min,e.max-s,t.min):s>i&&(n=It(t.min,t.max-i,e.min)),nt(0,1,n)}function Zu(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 ln=.35;function Ju(t=ln){return t===!1?t=0:t===!0&&(t=ln),{x:ri(t,"left","right"),y:ri(t,"top","bottom")}}function ri(t,e,n){return{min:oi(t,e),max:oi(t,n)}}function oi(t,e){return typeof t=="number"?t:t[e]||0}const Qu=new WeakMap;class td{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=F(),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=d=>{n&&this.snapToCursor($t(d).point),this.stopAnimation()},r=(d,h)=>{const{drag:m,dragPropagation:p,onDragStart:y}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Al(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(v=>{let g=this.getAxisMotionValue(v).get()||0;if(et.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[v];S&&(g=K(S)*(parseFloat(g)/100))}}this.originPoint[v]=g}),y&&k.update(()=>y(d,h),!1,!0),Je(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:y,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=h;if(p&&this.currentDirection===null){this.currentDirection=nd(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),x&&k.update(()=>x(d,h),!1,!0)},c=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new to(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:s,contextWindow:Qr(this.visualElement),element:this.visualElement.current})}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.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Yt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Gu(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&&vt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Xu(s.layoutBox,e):this.constraints=!1,this.elastic=Ju(n),i!==this.constraints&&!vt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&Q(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Zu(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!vt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=ec(s,i.root,this.visualElement.getTransformPagePoint());let r=Yu(i.layout.layoutBox,o);if(n){const a=n(Jl(r));this.hasMutatedConstraints=!!a,a&&(r=Sr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=Q(l=>{if(!Yt(l,n,this.currentDirection))return;let d=c&&c[l]||{};(r===!0||r===l)&&(d={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:s?e[l]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(l,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Je(this.visualElement,e),s.start(Cn(e,s,0,n,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}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){Q(n=>{const{drag:s}=this.getProps();if(!Yt(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],c=o.get()||0;o.set(e[n]-j(r,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!vt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Q(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const c=a.get();i[r]=qu({min:c,max:c},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.constraints=!1,this.resolveConstraints(),Q(r=>{if(!Yt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:u}=this.constraints[r];a.set(j(c,u,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Qu.set(this.visualElement,this);const e=this.visualElement.current,n=Bt(e,"pointerdown",u=>{const{drag:l,dragListener:d=!0}=this.getProps(),h=u.target,m=h!==e&&jl(h);l&&d&&!m&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();vt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=ed(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,r=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),k.read(i);const a=zt(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(Q(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),r(),c&&c(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=ln,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ai(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function ed(t,e,n){const s=ms(t,ai(n)),i=ms(e,ai(n));return()=>{s(),i()}}function Yt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function nd(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class sd extends at{constructor(e){super(e),this.removeGroupControls=G,this.removeListeners=G,this.controls=new td(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ne=t=>(e,n)=>{t&&k.update(()=>t(e,n),!1,!0)};class id extends at{constructor(){super(...arguments),this.removePointerDownListener=G}onPointerDown(e){this.session=new to(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Qr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ne(e),onStart:Ne(n),onMove:Ne(s),onEnd:(o,r)=>{delete this.session,i&&k.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Bt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Be=!1;class rd extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Be&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),oe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,e.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),Be=!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{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Dn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Be=!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 no(t){const[e,n]=$r(),s=b.useContext(un);return f.jsx(rd,{...t,layoutGroup:s,switchLayoutGroup:b.useContext(Zr),isPresent:e,safeToRemove:n})}const od={pan:{Feature:id},drag:{Feature:sd,ProjectionNode:Kr,MeasureLayout:no}};function li(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,$t(e)))}class ad extends at{mount(){const{current:e}=this.node;e&&(this.unmount=Ml(e,(n,s)=>(li(this.node,s,"Start"),i=>li(this.node,i,"End"))))}unmount(){}}class ld extends at{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=Ut(zt(this.node.current,"focus",()=>this.onFocus()),zt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ci(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,$t(e)))}class cd extends at{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ll(e,(i,o)=>(ci(this.node,o,"Start"),(r,{success:a})=>ci(this.node,r,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const cn=new WeakMap,Ie=new WeakMap,ud=t=>{const e=cn.get(t.target);e&&e(t)},dd=t=>{t.forEach(ud)};function hd({root:t,...e}){const n=t||document;Ie.has(n)||Ie.set(n,{});const s=Ie.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(dd,{root:t,...e})),s[i]}function fd(t,e,n){const s=hd(e);return cn.set(t,n),s.observe(t),()=>{cn.delete(t),s.unobserve(t)}}const md={some:0,all:1};class pd extends at{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();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:md[i]},a=c=>{const{isIntersecting:u}=c;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:l,onViewportLeave:d}=this.node.getProps(),h=u?l:d;h&&h(c)};this.stopObserver=fd(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(gd(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function gd({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const yd={inView:{Feature:pd},tap:{Feature:cd},focus:{Feature:ld},hover:{Feature:ad}},xd={layout:{ProjectionNode:Kr,MeasureLayout:no}},vd={...Wu,...yd,...od,...xd},dt=Iu(vd,Fu);function bd(t){const e=t.toLowerCase();return e.includes("mac")?"darwin":e.includes("win")?"win32":"linux"}function wd(t=navigator){const e=typeof t.userAgentData?.platform=="string"?t.userAgentData.platform:"",n=typeof t.platform=="string"&&t.platform.trim()?t.platform:t.userAgent;return bd(e||n||"")}function Sd(t){if(!/^\d+$/.test(t.trim()))return null;const e=Number.parseInt(t.trim(),10);return e<1||e>65535?null:e}const ui=["disabled","readonly","readwrite"];function qt(t,e){return t(`settingsPage.browserSection.evalMode.options.${e}`)}function Td(t,e,n){const s=JSON.stringify(t);return n==="darwin"?`open -na "Google Chrome" --args --remote-debugging-port=${e} --user-data-dir=${s}`:n==="win32"?`chrome.exe --remote-debugging-port=${e} --user-data-dir=${s}`:`google-chrome --remote-debugging-port=${e} --user-data-dir=${s}`}function di({children:t,className:e,title:n,description:s,badge:i,action:o}){return f.jsx("div",{className:Tt("group relative overflow-hidden rounded-[2.5rem] border border-border/60 bg-muted/20 p-1.5 transition-all duration-700 ease-[cubic-bezier(0.32,0.72,0,1)] dark:border-white/[0.08] dark:bg-zinc-900/35",e),children:f.jsxs("div",{className:"relative overflow-hidden rounded-[calc(2.5rem-0.375rem)] border border-border/70 bg-card/90 shadow-[0_12px_36px_-18px_rgba(15,23,42,0.18)] dark:border-white/[0.08] dark:bg-zinc-900/70 dark:shadow-[0_18px_44px_-24px_rgba(0,0,0,0.55)]",children:[f.jsx("div",{className:"pointer-events-none absolute inset-0 shadow-[inset_0_1px_0_rgba(255,255,255,0.28)] dark:shadow-[inset_0_1px_0_rgba(255,255,255,0.04)]"}),(n||o)&&f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-border/60 px-8 py-6 dark:border-white/[0.06]",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("h3",{className:"text-xl font-semibold tracking-tight",children:n}),i]}),s&&f.jsx("p",{className:"text-sm text-muted-foreground",children:s})]}),o&&f.jsx("div",{className:"flex items-center gap-2",children:o})]}),f.jsx("div",{className:"px-8 py-8",children:t})]})})}function hi({state:t,title:e,detail:n,nextStep:s}){const{t:i}=pi(),o=t==="ready"||t==="enabled",r=!o&&t!=="disabled";return f.jsx("div",{className:Tt("relative overflow-hidden rounded-2xl border p-4 transition-all duration-500",o?"border-emerald-500/20 bg-emerald-500/[0.03] dark:bg-emerald-500/[0.02]":r?"border-amber-500/20 bg-amber-500/[0.03] dark:bg-amber-500/[0.02]":"border-border/60 bg-muted/30 dark:border-white/[0.06] dark:bg-zinc-900/45"),children:f.jsxs("div",{className:"flex items-start gap-4",children:[f.jsx("div",{className:Tt("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl transition-transform duration-500 group-hover:scale-110",o?"bg-emerald-500/10 text-emerald-600":r?"bg-amber-500/10 text-amber-600":"bg-slate-500/10 text-slate-500"),children:o?f.jsx(Et,{size:24}):r?f.jsx(gi,{size:24}):f.jsx(Zt,{size:24})}),f.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground/60",children:i("settingsPage.browserSection.readiness")}),o&&f.jsx(dt.span,{animate:{opacity:[.4,1,.4]},transition:{duration:2,repeat:1/0},className:"h-1.5 w-1.5 rounded-full bg-emerald-500"})]}),f.jsx("h4",{className:"font-medium text-foreground",children:e}),f.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:n}),s&&f.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-lg border border-border/50 bg-muted/35 p-3 dark:border-white/[0.05] dark:bg-zinc-900/45",children:[f.jsx(go,{size:14,className:"mt-0.5 shrink-0 text-primary"}),f.jsxs("p",{className:"text-xs leading-normal",children:[f.jsxs("span",{className:"font-semibold text-primary",children:[i("settingsPage.browserSection.nextStep"),":"]})," ",s]})]})]})]})})}function fi({title:t,children:e,defaultOpen:n=!1}){const[s,i]=b.useState(n);return f.jsxs(lo,{open:s,onOpenChange:i,className:"overflow-hidden rounded-2xl border border-border/60 bg-muted/20 dark:border-white/[0.06] dark:bg-zinc-900/30",children:[f.jsx(co,{asChild:!0,children:f.jsxs("button",{className:"flex w-full items-center justify-between px-6 py-4 text-sm font-medium transition-colors hover:bg-muted/40 dark:hover:bg-zinc-900/50",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(yo,{size:16,className:"text-muted-foreground"}),t]}),f.jsx(xo,{size:16,className:Tt("transition-transform duration-300",s&&"rotate-180")})]})}),f.jsx(uo,{children:f.jsx("div",{className:"border-t border-border/60 px-6 py-6 dark:border-white/[0.06]",children:e})})]})}function Nd(){const{t}=pi(),{fetchRawConfig:e}=oo(),{config:n,status:s,loading:i,statusLoading:o,saving:r,error:a,success:c,fetchConfig:u,fetchStatus:l,saveConfig:d}=bo(),[h,m]=b.useState(null),[p,y]=b.useState(null),[x,v]=b.useState(null);b.useEffect(()=>{u()},[u]),b.useEffect(()=>{if(!x&&!c)return;const M=window.setTimeout(()=>v(null),2500);return()=>window.clearTimeout(M)},[x,c]);const g=h??n,w=b.useMemo(()=>g?Td(g.claude.userDataDir,g.claude.devtoolsPort,wd()):"",[g]),S=p??String(g?.claude.devtoolsPort??9222),P=Sd(S),D=S.trim().length>0&&P===null,L=n!==null&&g!==null&&(n.claude.enabled!==g.claude.enabled||n.claude.userDataDir!==g.claude.userDataDir||n.claude.devtoolsPort!==P||n.claude.evalMode!==g.claude.evalMode),A=n!==null&&g!==null&&(n.codex.enabled!==g.codex.enabled||n.codex.evalMode!==g.codex.evalMode),V=b.useCallback(async()=>{v(null),m(null),y(null),await Promise.all([u(),e()])},[u,e]),C=b.useCallback(async()=>{await l()&&v(t("settingsPage.browserSection.messages.statusRefreshed"))},[l,t]),E=b.useCallback(async()=>{if(!g||P===null)return;await d({claude:{enabled:g.claude.enabled,userDataDir:g.claude.userDataDir.trim(),devtoolsPort:P,evalMode:g.claude.evalMode}})&&(await e(),v(null),m(null),y(null))},[P,g,e,d]),B=b.useCallback(async()=>{if(!g)return;await d({codex:{enabled:g.codex.enabled,evalMode:g.codex.evalMode}})&&(await e(),v(null),m(null),y(null))},[g,e,d]),X=b.useCallback(async()=>{w&&(await navigator.clipboard.writeText(w),v(t("settingsPage.browserSection.messages.launchCommandCopied")))},[w,t]);return i?f.jsx("div",{className:"flex flex-1 items-center justify-center",children:f.jsxs("div",{className:"flex flex-col items-center gap-4 text-muted-foreground",children:[f.jsx(dt.div,{animate:{rotate:360},transition:{duration:1.5,repeat:1/0,ease:"linear"},children:f.jsx(Dt,{size:32})}),f.jsx("span",{className:"text-sm font-medium uppercase tracking-widest opacity-60",children:t("settings.loading")})]})}):!n||!s||!g?f.jsx("div",{className:"p-8",children:f.jsxs(On,{variant:"destructive",className:"rounded-[2rem] p-8 shadow-xl",children:[f.jsx(Zt,{size:24}),f.jsx(zn,{className:"mt-2 text-md leading-relaxed",children:a??t("settingsPage.browserSection.description")}),f.jsx("div",{className:"mt-6",children:f.jsxs(yt,{variant:"outline",className:"rounded-full px-6 transition-transform active:scale-95",onClick:V,children:[f.jsx(Dt,{className:"mr-2 h-4 w-4"}),t("sharedPage.retry")]})})]})}):f.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:[f.jsx(hu,{children:(a||c||x)&&f.jsx(dt.div,{initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-20,scale:.95},className:"absolute left-1/2 top-6 z-50 -translate-x-1/2",children:a?f.jsxs("div",{className:"flex items-center gap-3 rounded-full border border-rose-500/20 bg-card/95 px-6 py-2.5 text-sm font-medium text-rose-600 shadow-2xl dark:bg-zinc-900/85",children:[f.jsx(Zt,{size:18}),a]}):f.jsxs("div",{className:"flex items-center gap-3 rounded-full border border-emerald-500/20 bg-card/95 px-6 py-2.5 text-sm font-medium text-emerald-600 shadow-2xl dark:bg-zinc-900/85",children:[f.jsx(Et,{size:18}),x??t("commonToast.settingsSaved")]})})}),f.jsx(ao,{className:"flex-1",children:f.jsxs("div",{className:"mx-auto max-w-[1240px] space-y-12 p-8 py-16",children:[f.jsxs(dt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-wrap items-end justify-between gap-6",children:[f.jsx("div",{className:"space-y-4",children:f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:f.jsx(ho,{size:28})}),f.jsxs("div",{children:[f.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:t("settingsPage.browserSection.title")}),f.jsx("p",{className:"mt-1 text-muted-foreground",children:t("settingsPage.browserSection.description")})]})]})}),f.jsxs(yt,{variant:"outline",className:"rounded-full border-border/70 bg-background/85 shadow-sm transition-all hover:bg-muted/50 active:scale-95 dark:border-white/[0.08] dark:bg-zinc-900/70 dark:hover:bg-zinc-900",onClick:V,disabled:r||i,children:[f.jsx(Dt,{className:Tt("mr-2 h-4 w-4",o&&"animate-spin")}),t("settings.refresh")]})]}),f.jsx(dt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:f.jsxs(On,{className:"items-center rounded-3xl border-primary/10 bg-primary/[0.04] p-6 py-4 dark:border-primary/15 dark:bg-primary/[0.05]",children:[f.jsx(fo,{className:"h-5 w-5 text-primary"}),f.jsxs(zn,{className:"ml-2 text-sm",children:[f.jsx("span",{className:"font-semibold text-primary/80",children:t("settingsPage.browserSection.primaryTitle")})," ",t("settingsPage.browserSection.primaryDescription")]})]})}),f.jsx(dt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:f.jsx(di,{title:t("settingsPage.browserSection.claude.title"),description:t("settingsPage.browserSection.claude.description"),action:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-border/60 bg-muted/30 px-4 py-2 dark:border-white/[0.06] dark:bg-zinc-900/45",children:[f.jsx(xt,{htmlFor:"browser-claude-enabled",className:"cursor-pointer text-xs font-semibold leading-none",children:g.claude.enabled?"ENABLED":"DISABLED"}),f.jsx(Gn,{id:"browser-claude-enabled",checked:g.claude.enabled,onCheckedChange:M=>m(I=>Fe(I??g,{enabled:M}))})]}),f.jsxs(yt,{onClick:E,disabled:r||D||!L,className:"rounded-full px-6 shadow-md transition-transform active:scale-95",children:[r?f.jsx(Dt,{className:"mr-2 h-4 w-4 animate-spin"}):f.jsx(Et,{size:16,className:"mr-2"}),t("settingsPage.browserSection.actions.saveClaude")]}),f.jsxs(yt,{variant:"outline",className:"rounded-full border-border/70 bg-background/85 shadow-sm transition-all hover:bg-muted/50 active:scale-95 dark:border-white/[0.08] dark:bg-zinc-900/70 dark:hover:bg-zinc-900",onClick:C,disabled:r||o||L||D,children:[f.jsx(po,{size:16,className:"mr-2"}),t("settingsPage.browserSection.actions.testConnection")]})]}),children:f.jsxs("div",{className:"grid gap-12",children:[f.jsx(hi,{state:s.claude.state,title:s.claude.title,detail:s.claude.detail,nextStep:s.claude.nextStep}),f.jsxs("div",{className:"grid gap-8 lg:grid-cols-2",children:[f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"space-y-3",children:[f.jsx(xt,{htmlFor:"browser-claude-user-data-dir",className:"text-sm font-semibold tracking-wide text-muted-foreground/80",children:t("settingsPage.browserSection.claude.userDataDir")}),f.jsx(Un,{id:"browser-claude-user-data-dir",value:g.claude.userDataDir,onChange:M=>m(I=>Fe(I??g,{userDataDir:M.target.value})),className:"rounded-xl border-border/70 bg-background/85 dark:border-white/[0.08] dark:bg-zinc-900/70",placeholder:s.claude.recommendedUserDataDir}),f.jsx("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:t("settingsPage.browserSection.claude.userDataDirHint")})]}),f.jsxs("div",{className:"space-y-3",children:[f.jsx(xt,{htmlFor:"browser-claude-devtools-port",className:"text-sm font-semibold tracking-wide text-muted-foreground/80",children:t("settingsPage.browserSection.claude.devtoolsPort")}),f.jsx(Un,{id:"browser-claude-devtools-port",value:S,onChange:M=>y(M.target.value),inputMode:"numeric",className:"max-w-[120px] rounded-xl border-border/70 bg-background/85 dark:border-white/[0.08] dark:bg-zinc-900/70"}),f.jsx("p",{className:Tt("text-[11px] leading-relaxed text-muted-foreground/70",D&&"text-rose-500"),children:t(D?"settingsPage.browserSection.claude.devtoolsPortInvalid":"settingsPage.browserSection.claude.devtoolsPortHint")})]}),f.jsxs("div",{className:"space-y-3",children:[f.jsx(xt,{className:"text-sm font-semibold tracking-wide text-muted-foreground/80",children:t("settingsPage.browserSection.evalMode.label")}),f.jsxs(Wn,{value:g.claude.evalMode,onValueChange:M=>m(I=>Fe(I??g,{evalMode:M})),children:[f.jsx(Kn,{className:"rounded-xl border-border/70 bg-background/85 dark:border-white/[0.08] dark:bg-zinc-900/70",children:f.jsx($n,{})}),f.jsx(Hn,{children:ui.map(M=>f.jsx(_n,{value:M,children:qt(t,M)},M))})]}),f.jsx("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:t("settingsPage.browserSection.claude.evalModeHint")})]})]}),f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"group/launch relative overflow-hidden rounded-2xl border border-border/60 bg-muted/20 p-5 transition-all hover:bg-muted/35 dark:border-white/[0.06] dark:bg-zinc-900/35 dark:hover:bg-zinc-900/50",children:[f.jsxs("div",{className:"flex items-start justify-between gap-4",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.15em] text-primary/70",children:t("settingsPage.browserSection.claude.launchGuidance")}),f.jsx("p",{className:"text-xs text-muted-foreground",children:t("settingsPage.browserSection.claude.launchGuidanceHint")})]}),f.jsx(yt,{variant:"ghost",size:"sm",className:"h-8 w-8 rounded-full p-0 transition-transform active:scale-90",onClick:X,disabled:!w,children:f.jsx(mo,{size:18})})]}),f.jsx("code",{className:"mt-4 block break-all rounded-lg border border-border/50 bg-background/80 p-3 font-mono text-[10px] leading-relaxed dark:border-white/[0.05] dark:bg-zinc-900/60",children:w})]}),s.claude.overrideActive&&f.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-amber-500/10 bg-amber-500/[0.05] p-4 text-xs font-medium text-amber-700 dark:text-amber-300",children:[f.jsx(gi,{size:18}),t("settingsPage.browserSection.claude.overrideMessage",{source:s.claude.source})]})]})]}),f.jsx(fi,{title:t("settingsPage.browserSection.technicalDetails"),defaultOpen:s.claude.state!=="ready",children:f.jsxs("div",{className:"grid gap-6 sm:grid-cols-2",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground/50",children:t("settingsPage.browserSection.claude.effectivePath")}),f.jsx("div",{className:"rounded-lg border border-border/50 bg-muted/25 p-3 dark:border-white/[0.05] dark:bg-zinc-900/45",children:f.jsx("p",{className:"break-all font-mono text-[11px] leading-relaxed",children:s.claude.effectiveUserDataDir})}),f.jsxs("p",{className:"text-[10px] font-medium text-muted-foreground/60",children:[f.jsxs("span",{className:"font-bold",children:[t("settingsPage.browserSection.claude.recommendedPath"),":"]})," ",s.claude.recommendedUserDataDir]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground/50",children:t("settingsPage.browserSection.claude.managedRuntime")}),f.jsxs("div",{className:"rounded-lg border border-border/50 bg-muted/25 p-3 dark:border-white/[0.05] dark:bg-zinc-900/45",children:[f.jsx("p",{className:"font-semibold text-primary/80",children:s.claude.managedMcpServerName}),f.jsx("p",{className:"mt-1 break-all font-mono text-[11px] leading-relaxed text-muted-foreground/80",children:s.claude.managedMcpServerPath})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground/50",children:t("settingsPage.browserSection.evalMode.label")}),f.jsx("div",{className:"rounded-lg border border-border/50 bg-muted/25 p-3 dark:border-white/[0.05] dark:bg-zinc-900/45",children:f.jsx("p",{className:"font-mono text-[11px] font-semibold",children:qt(t,s.claude.evalMode)})})]})]})})]})})}),f.jsx(dt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:f.jsx(di,{title:t("settingsPage.browserSection.codex.title"),description:t("settingsPage.browserSection.codex.description"),action:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-border/60 bg-muted/30 px-4 py-2 dark:border-white/[0.06] dark:bg-zinc-900/45",children:[f.jsx(xt,{htmlFor:"browser-codex-enabled",className:"cursor-pointer text-xs font-semibold leading-none",children:g.codex.enabled?"ENABLED":"DISABLED"}),f.jsx(Gn,{id:"browser-codex-enabled",checked:g.codex.enabled,onCheckedChange:M=>m(I=>mi(I??g,{enabled:M}))})]}),f.jsxs(yt,{onClick:B,disabled:r||!A,className:"rounded-full px-6 shadow-md transition-transform active:scale-95",children:[r?f.jsx(Dt,{className:"mr-2 h-4 w-4 animate-spin"}):f.jsx(Et,{size:16,className:"mr-2"}),t("settingsPage.browserSection.actions.saveCodex")]})]}),children:f.jsxs("div",{className:"grid gap-12",children:[f.jsx(hi,{state:s.codex.state,title:s.codex.title,detail:s.codex.detail,nextStep:s.codex.nextStep}),f.jsxs("div",{className:"max-w-md space-y-3",children:[f.jsx(xt,{className:"text-sm font-semibold tracking-wide text-muted-foreground/80",children:t("settingsPage.browserSection.evalMode.label")}),f.jsxs(Wn,{value:g.codex.evalMode,onValueChange:M=>m(I=>mi(I??g,{evalMode:M})),children:[f.jsx(Kn,{className:"rounded-xl border-border/70 bg-background/85 dark:border-white/[0.08] dark:bg-zinc-900/70",children:f.jsx($n,{})}),f.jsx(Hn,{children:ui.map(M=>f.jsx(_n,{value:M,children:qt(t,M)},M))})]}),f.jsx("p",{className:"text-[11px] leading-relaxed text-muted-foreground/70",children:t("settingsPage.browserSection.codex.evalModeHint")})]}),f.jsx(fi,{title:t("settingsPage.browserSection.technicalDetails"),defaultOpen:s.codex.state==="unsupported_build",children:f.jsxs("div",{className:"grid gap-6 sm:grid-cols-3",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground/50",children:t("settingsPage.browserSection.codex.serverName")}),f.jsx("div",{className:"rounded-lg border border-border/50 bg-muted/25 p-3 dark:border-white/[0.05] dark:bg-zinc-900/45",children:f.jsx("p",{className:"font-mono text-[11px] font-semibold",children:s.codex.serverName})})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground/50",children:t("settingsPage.browserSection.codex.overrideSupport")}),f.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/50 bg-muted/25 p-3 font-medium text-xs dark:border-white/[0.05] dark:bg-zinc-900/45",children:[s.codex.supportsConfigOverrides?f.jsx(Et,{className:"text-emerald-500",size:16}):f.jsx(Zt,{className:"text-rose-500",size:16}),s.codex.supportsConfigOverrides?t("settingsPage.browserSection.codex.overrideSupported"):t("settingsPage.browserSection.codex.overrideUnsupported")]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground/50",children:t("settingsPage.browserSection.codex.binary")}),f.jsxs("div",{className:"rounded-lg border border-border/50 bg-muted/25 p-3 dark:border-white/[0.05] dark:bg-zinc-900/45",children:[f.jsx("p",{className:"break-all font-mono text-[11px] leading-relaxed",children:s.codex.binaryPath??t("settingsPage.browserSection.codex.notDetected")}),s.codex.version&&f.jsx("div",{className:"mt-2 inline-flex rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-bold text-primary",children:s.codex.version})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground/50",children:t("settingsPage.browserSection.evalMode.label")}),f.jsx("div",{className:"rounded-lg border border-border/50 bg-muted/25 p-3 dark:border-white/[0.05] dark:bg-zinc-900/45",children:f.jsx("p",{className:"font-mono text-[11px] font-semibold",children:qt(t,s.codex.evalMode)})})]})]})})]})})})]})})]})}function Fe(t,e){return{...t,claude:{...t.claude,...e}}}function mi(t,e){return{...t,codex:{...t.codex,...e}}}export{Nd as default};