@opentig/cli 0.1.5 → 0.1.6

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 (112) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/chunks/{cli-D_aggpu2.mjs → cli-ABzC6-gR.mjs} +1 -1
  3. package/dist/client/assets/App-CBetJ5ZN.js +74 -0
  4. package/dist/client/assets/CreatePullRequestDialog-W82oHjYm.js +2 -0
  5. package/dist/client/assets/{DiffWorkspace-CeYQ0YtE.js → DiffWorkspace-BWkTIl5n.js} +1 -1
  6. package/dist/client/assets/{EditableFileViewer-BhwE-QMO.js → EditableFileViewer-Cv3aNJBN.js} +1 -1
  7. package/dist/client/assets/{File-C10_BxOu.js → File-DiOOsHOl.js} +1 -1
  8. package/dist/client/assets/{FilesView-BT4eHbFo.js → FilesView-DIqPfRbv.js} +1 -1
  9. package/dist/client/assets/{GitHubAvatar-Ch_PaCv3.js → GitHubAvatar-DBc3Vxnk.js} +1 -1
  10. package/dist/client/assets/HistoryView-DYxWYYVx.js +1 -0
  11. package/dist/client/assets/{HtmlFileViewer-Cufzaec9.js → HtmlFileViewer-BsewwJtM.js} +1 -1
  12. package/dist/client/assets/{IconEdit-RxH71_V-.js → IconEdit-CxvzMyLV.js} +1 -1
  13. package/dist/client/assets/{IconFolderPlus-DSSB-ikf.js → IconFolderPlus-1vLDIzhC.js} +1 -1
  14. package/dist/client/assets/{ImageFileViewer-CFUkcXLH.js → ImageFileViewer-CoQZkgET.js} +1 -1
  15. package/dist/client/assets/{LocalRefsDialog-B2jUCKTx.js → LocalRefsDialog-sw-ROjfe.js} +1 -1
  16. package/dist/client/assets/{MarkdownFileViewer-BLfJ-Vof.js → MarkdownFileViewer-BedKCXTI.js} +2 -2
  17. package/dist/client/assets/{PairingPage-C5Ggk-Z_.js → PairingPage-CYJXzBZC.js} +1 -1
  18. package/dist/client/assets/{PierreDiffViewer-DYj1ZThr.js → PierreDiffViewer-uhTsb-F7.js} +1 -1
  19. package/dist/client/assets/PierreEditBoundary-Bb4dONIq.js +2 -0
  20. package/dist/client/assets/{PierreWorkerPool-7EVoquIB.js → PierreWorkerPool-BuBzE8K1.js} +9 -9
  21. package/dist/client/assets/{PullRequestDiff-DxLTcm6L.js → PullRequestDiff-CgY4QIHC.js} +1 -1
  22. package/dist/client/assets/{PullRequestViewer-CyW39MuF.js → PullRequestViewer-KZl0osME.js} +2 -2
  23. package/dist/client/assets/PullRequestsView-DkN3pW33.js +1 -0
  24. package/dist/client/assets/{QuickOpenDialog-CasQU7pk.js → QuickOpenDialog-Cn-aQRAS.js} +1 -1
  25. package/dist/client/assets/RepositoryProjectsDialog-F-EctLXx.js +1 -0
  26. package/dist/client/assets/SearchView-BtKBEJ7e.js +1 -0
  27. package/dist/client/assets/SettingsDialog-wfWhEzZY.js +9 -0
  28. package/dist/client/assets/Viewer-D-oFua7K.js +3 -0
  29. package/dist/client/assets/{abnfDiagram-N423BO3Z-DrlQwm7W.js → abnfDiagram-N423BO3Z-DLBLFOdy.js} +1 -1
  30. package/dist/client/assets/{arc-B9cXI-QL.js → arc-D-Yei3Vr.js} +1 -1
  31. package/dist/client/assets/{architectureDiagram-T3A2C74G-DZz7ZXbI.js → architectureDiagram-T3A2C74G-BOgBvzWh.js} +1 -1
  32. package/dist/client/assets/{base-ui-D4MeJpa3.js → base-ui-qeHDA5zu.js} +1 -1
  33. package/dist/client/assets/{blockDiagram-VBNYF7ZC-DZFMT63B.js → blockDiagram-VBNYF7ZC-BQXRJDyR.js} +1 -1
  34. package/dist/client/assets/{c4Diagram-5PPSVZJV-BnHIZMZp.js → c4Diagram-5PPSVZJV-DTZseD56.js} +1 -1
  35. package/dist/client/assets/channel-DrMuSkDK.js +1 -0
  36. package/dist/client/assets/{checkbox-BpmQTxn7.js → checkbox-BwbxYGgK.js} +1 -1
  37. package/dist/client/assets/{chunk-2GRJ4B5K-CJOlpI9g.js → chunk-2GRJ4B5K-spRCgfPY.js} +1 -1
  38. package/dist/client/assets/{chunk-2Q5K7J3B-DhsnoUrJ.js → chunk-2Q5K7J3B-CLVClH0M.js} +1 -1
  39. package/dist/client/assets/{chunk-5RXB4S5H-Nwsk3OIu.js → chunk-5RXB4S5H-CuQ5tYjB.js} +1 -1
  40. package/dist/client/assets/{chunk-5VM5RSS4-Dk9FYU9b.js → chunk-5VM5RSS4-DyOEOe90.js} +1 -1
  41. package/dist/client/assets/{chunk-6Q2QTUOP-C8lX8T87.js → chunk-6Q2QTUOP-CgMtuJIx.js} +1 -1
  42. package/dist/client/assets/{chunk-GF5L2VYU-DWHvTG6c.js → chunk-GF5L2VYU-BH63P4Vv.js} +1 -1
  43. package/dist/client/assets/{chunk-JWPE2WC7-BLu2-FJl.js → chunk-JWPE2WC7-BANDbaPq.js} +1 -1
  44. package/dist/client/assets/{chunk-KBJHAD2P-CEOb10I1.js → chunk-KBJHAD2P-Bfty2upo.js} +1 -1
  45. package/dist/client/assets/{chunk-RYQCIY6F-BcdMrb_e.js → chunk-RYQCIY6F-Cvu8BZS9.js} +1 -1
  46. package/dist/client/assets/{chunk-XXDRQBXY-CzPimvfs.js → chunk-XXDRQBXY-bnohf1yd.js} +1 -1
  47. package/dist/client/assets/classDiagram-JCYQIIEL-BKiL0hkR.js +1 -0
  48. package/dist/client/assets/classDiagram-v2-OCEON4UE-BKiL0hkR.js +1 -0
  49. package/dist/client/assets/{cose-bilkent-JH36ORCC-BYfzHUkR.js → cose-bilkent-JH36ORCC-DCTEAZwO.js} +1 -1
  50. package/dist/client/assets/{cynefin-VYW2F7L2-B4mEAleX.js → cynefin-VYW2F7L2-Bp2wXvdt.js} +1 -1
  51. package/dist/client/assets/{cynefinDiagram-MW4NZA55-CioMvT6V.js → cynefinDiagram-MW4NZA55-DRRWzuF0.js} +1 -1
  52. package/dist/client/assets/{dagre-VZM6K2ZE-DWPgHi5i.js → dagre-VZM6K2ZE-DDvsotRK.js} +1 -1
  53. package/dist/client/assets/{diagram-7IWD3JNH-94i9EwB_.js → diagram-7IWD3JNH-CMqhRNRq.js} +1 -1
  54. package/dist/client/assets/{diagram-B4RE2ZJO-BRgMOgy8.js → diagram-B4RE2ZJO-D_PYI1ut.js} +1 -1
  55. package/dist/client/assets/{diagram-LBJQPF4R-DHaXTl1T.js → diagram-LBJQPF4R-BSUx7mMM.js} +1 -1
  56. package/dist/client/assets/{diagram-Q27KOJAE-DtLuyYm1.js → diagram-Q27KOJAE-C8O3g6WT.js} +1 -1
  57. package/dist/client/assets/{diagram-UB23O5K3-D8R3grCW.js → diagram-UB23O5K3-C5-NDsgC.js} +1 -1
  58. package/dist/client/assets/{ebnfDiagram-BXEA7PRR-voe5GU7W.js → ebnfDiagram-BXEA7PRR-D71hx4Ww.js} +1 -1
  59. package/dist/client/assets/{erDiagram-JOGREHBK-BShMJhmY.js → erDiagram-JOGREHBK-yd9B5d8I.js} +1 -1
  60. package/dist/client/assets/{flowDiagram-UKHOOZJN-DASXB2wV.js → flowDiagram-UKHOOZJN-CWU5VVbw.js} +1 -1
  61. package/dist/client/assets/{ganttDiagram-PKOTCBZU-Da1ElnJN.js → ganttDiagram-PKOTCBZU-D2siVjfa.js} +1 -1
  62. package/dist/client/assets/{gh-utils-D00lyruw.js → gh-utils-B0Nlmxep.js} +1 -1
  63. package/dist/client/assets/{gitGraphDiagram-DS77QQ5N-DoGRli0p.js → gitGraphDiagram-DS77QQ5N-CIvIFcxR.js} +1 -1
  64. package/dist/client/assets/index-BOPi2b1j.js +47 -0
  65. package/dist/client/assets/index-CryuKDT3.css +1 -0
  66. package/dist/client/assets/{infoDiagram-6WML65LV-CxkxF5pn.js → infoDiagram-6WML65LV-DRvl8KfO.js} +1 -1
  67. package/dist/client/assets/{ishikawaDiagram-WSZJBQD7-l6dk2-PS.js → ishikawaDiagram-WSZJBQD7-H5EQq6uE.js} +1 -1
  68. package/dist/client/assets/{journeyDiagram-NVQOT4AX-wJY4ZF5o.js → journeyDiagram-NVQOT4AX-CCwLmD-U.js} +1 -1
  69. package/dist/client/assets/{kanban-definition-27J2QSJJ-CIcwUmJo.js → kanban-definition-27J2QSJJ-DS--XHEu.js} +1 -1
  70. package/dist/client/assets/{linear-Tf-dXwQ9.js → linear-Q3JNM6CR.js} +1 -1
  71. package/dist/client/assets/{mermaid.core-DnaJSnLe.js → mermaid.core-EwS_m22C.js} +4 -4
  72. package/dist/client/assets/{mindmap-definition-FAOFIHXS-jFdJ2bLh.js → mindmap-definition-FAOFIHXS-D15nrwfe.js} +1 -1
  73. package/dist/client/assets/{pegDiagram-VL7TDLO6-vq0WE66k.js → pegDiagram-VL7TDLO6-DOG19gxx.js} +1 -1
  74. package/dist/client/assets/{pieDiagram-7S7Q4E2Y-3edKDMpI.js → pieDiagram-7S7Q4E2Y-Bstdr7Wh.js} +1 -1
  75. package/dist/client/assets/{quadrantDiagram-CIZ2JOQS-B6M8U4XV.js → quadrantDiagram-CIZ2JOQS-DfKs4qZW.js} +1 -1
  76. package/dist/client/assets/{railroadDiagram-AXF67PYL-C-d5-0YS.js → railroadDiagram-AXF67PYL-DJKxyuhV.js} +1 -1
  77. package/dist/client/assets/{render-markdown-GXIpf9CM.js → render-markdown-C7X2TwRk.js} +1 -1
  78. package/dist/client/assets/{requirementDiagram-LRYGKXZP-FVzmEbFu.js → requirementDiagram-LRYGKXZP-SGJWVmBV.js} +1 -1
  79. package/dist/client/assets/{sankeyDiagram-W5VNT64P-B-qcUamt.js → sankeyDiagram-W5VNT64P-CpZFct0O.js} +1 -1
  80. package/dist/client/assets/{sequenceDiagram-SI44F4Z6-DgFXRLSt.js → sequenceDiagram-SI44F4Z6-B7plRik9.js} +1 -1
  81. package/dist/client/assets/{sizeCapture-X5ZJPWSS-CWi_pMb2.js → sizeCapture-X5ZJPWSS-CNbK285t.js} +1 -1
  82. package/dist/client/assets/{stateDiagram-OKZ733FA-amQwzlgU.js → stateDiagram-OKZ733FA-BIHk9QCC.js} +1 -1
  83. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-Cqw0H5cq.js +1 -0
  84. package/dist/client/assets/{swimlanes-SLNWSIFB-L88WlaUb.js → swimlanes-SLNWSIFB-7g_XCosC.js} +2 -2
  85. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-BzKpdiGK.js +8 -0
  86. package/dist/client/assets/{tanstack-Bsd5UOY4.js → tanstack-B8_amOz8.js} +1 -1
  87. package/dist/client/assets/{timeline-definition-Z64GVDOM-D4TJxxc3.js → timeline-definition-Z64GVDOM-B-cgSggY.js} +1 -1
  88. package/dist/client/assets/{vennDiagram-T6HMQDX7-ClJWOyzQ.js → vennDiagram-T6HMQDX7-Bt5-8VZ2.js} +1 -1
  89. package/dist/client/assets/{viewer-tabs-Cp_MC_J3.js → viewer-tabs-DxCOe0ut.js} +1 -1
  90. package/dist/client/assets/{wardleyDiagram-T6FBY63Y-Cxfjpd6V.js → wardleyDiagram-T6FBY63Y-B5Imx6zh.js} +1 -1
  91. package/dist/client/assets/{xychartDiagram-ELKLHX3M-BYqbTvmt.js → xychartDiagram-ELKLHX3M-CDaY4xFS.js} +1 -1
  92. package/dist/client/index.html +4 -4
  93. package/dist/dev.mjs +1 -1
  94. package/dist/manifest.json +1 -1
  95. package/dist/server.mjs +54 -3
  96. package/package.json +1 -1
  97. package/dist/client/assets/App-CeDVj5Hh.js +0 -118
  98. package/dist/client/assets/CreatePullRequestDialog-DMHY_u8X.js +0 -2
  99. package/dist/client/assets/HistoryView-CivGwdxV.js +0 -1
  100. package/dist/client/assets/PierreEditBoundary-UfvbKDbd.js +0 -2
  101. package/dist/client/assets/PullRequestsView-BHcnarLS.js +0 -1
  102. package/dist/client/assets/RepositoryProjectsDialog-VAiZrDlA.js +0 -1
  103. package/dist/client/assets/SearchView-Bv4bA4UJ.js +0 -1
  104. package/dist/client/assets/SettingsDialog-D33V9Fry.js +0 -9
  105. package/dist/client/assets/Viewer-I1lC_oJU.js +0 -3
  106. package/dist/client/assets/channel-CE-pdA-6.js +0 -1
  107. package/dist/client/assets/classDiagram-JCYQIIEL-2elbt6qi.js +0 -1
  108. package/dist/client/assets/classDiagram-v2-OCEON4UE-2elbt6qi.js +0 -1
  109. package/dist/client/assets/index-BdjG_WtS.js +0 -3
  110. package/dist/client/assets/index-Uku28hIV.css +0 -1
  111. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-TdV8eIV2.js +0 -1
  112. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-AWimqvIC.js +0 -8
@@ -0,0 +1,47 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-CBetJ5ZN.js","assets/react-rd22PHbN.js","assets/tanstack-B8_amOz8.js","assets/base-ui-qeHDA5zu.js","assets/PairingPage-CYJXzBZC.js"])))=>i.map(i=>d[i]);
2
+ import{r as p,j as v,d as ll}from"./react-rd22PHbN.js";import{Q as cl,g as ul}from"./tanstack-B8_amOz8.js";import{a4 as dl,a5 as hl,a6 as fl,a7 as pl,a8 as ml,a9 as gl,aa as yl,ab as vl}from"./base-ui-qeHDA5zu.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const Br="opentig.theme";function bl(t){try{const e=t?.getItem(Br);return e==="light"||e==="dark"||e==="system"?e:null}catch{return null}}function Dm(t,e=globalThis.localStorage){try{e?.setItem(Br,t)}catch{}}function xl(t,e){return t==="light"?!1:t==="dark"?!0:e}function wl(t={}){const e=t.root??(typeof document>"u"?null:document.documentElement);if(!e)return!1;const n=t.storage??(typeof localStorage>"u"?null:localStorage),s=t.prefersDark??(typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches),i=xl(bl(n),s);return e.classList.toggle("dark",i),e.classList.toggle("light",!i),i}wl();const Tl="modulepreload",Sl=function(t){return"/"+t},li={},Nr=function(e,n,s){let i=Promise.resolve();if(n&&n.length>0){let u=function(a){return Promise.all(a.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),l=r?.nonce||r?.getAttribute("nonce");i=u(n.map(a=>{if(a=Sl(a),a in li)return;li[a]=!0;const c=a.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":Tl,c||(h.as="script"),h.crossOrigin="",h.href=a,l&&h.setAttribute("nonce",l),document.head.appendChild(h),c)return new Promise((g,f)=>{h.addEventListener("load",g),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return i.then(r=>{for(const l of r||[])l.status==="rejected"&&o(l.reason);return e().catch(o)})};function G(){return G=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},G.apply(this,arguments)}function kl(t,e){if(t==null)return{};var n={},s=Object.getOwnPropertyNames(t),i,o;for(o=0;o<s.length;o++)i=s[o],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i]);return n}const _r=p.createContext({});function Pl(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const Cl=typeof window<"u",Al=Cl?p.useLayoutEffect:p.useEffect,Cs=p.createContext(null);function As(t,e){t.indexOf(e)===-1&&t.push(e)}function an(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const At=(t,e,n)=>n>e?e:n<t?t:n;let vn=()=>{};const It={},zr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Wr=t=>typeof t=="object"&&t!==null,Ur=t=>/^0[^.\s]+$/u.test(t);function Gr(t){let e;return()=>(e===void 0&&(e=t()),e)}const mt=t=>t,De=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Ee=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class Es{constructor(){this.subscriptions=[]}add(e){return As(this.subscriptions,e),()=>an(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 ht=t=>t*1e3,pt=t=>t/1e3,$r=(t,e)=>e?t*(1e3/e):0,Hr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,El=1e-7,Rl=12;function Ml(t,e,n,s,i){let o,r,l=0;do r=e+(n-e)/2,o=Hr(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>El&&++l<Rl);return r}function Le(t,e,n,s){if(t===e&&n===s)return mt;const i=o=>Ml(o,0,1,t,n);return o=>o===0||o===1?o:Hr(i(o),e,s)}const qr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Kr=t=>e=>1-t(1-e),Yr=Le(.33,1.53,.69,.99),Rs=Kr(Yr),Xr=qr(Rs),Zr=t=>t>=1?1:(t*=2)<1?.5*Rs(t):.5*(2-Math.pow(2,-10*(t-1))),Ms=t=>1-Math.sin(Math.acos(t)),Jr=Kr(Ms),Qr=qr(Ms),Vl=Le(.42,0,1,1),Dl=Le(0,0,.58,1),to=Le(.42,0,.58,1),Ll=t=>Array.isArray(t)&&typeof t[0]!="number",eo=t=>Array.isArray(t)&&typeof t[0]=="number",jl={linear:mt,easeIn:Vl,easeInOut:to,easeOut:Dl,circIn:Ms,circInOut:Qr,circOut:Jr,backIn:Rs,backInOut:Xr,backOut:Yr,anticipate:Zr},Il=t=>typeof t=="string",ci=t=>{if(eo(t)){vn(t.length===4);const[e,n,s,i]=t;return Le(e,n,s,i)}else if(Il(t))return jl[t];return t},Ue=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ol(t){let e=new Set,n=new Set,s=!1,i=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function l(a){o.has(a)&&(u.schedule(a),t()),a(r)}const u={schedule:(a,c=!1,d=!1)=>{const g=d&&s?e:n;return c&&o.add(a),g.add(a),a},cancel:a=>{n.delete(a),o.delete(a)},process:a=>{if(r=a,s){i=!0;return}s=!0;const c=e;e=n,n=c,e.forEach(l),e.clear(),s=!1,i&&(i=!1,u.process(a))}};return u}const Fl=40;function no(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Ue.reduce((T,P)=>(T[P]=Ol(o),T),{}),{setup:l,read:u,resolveKeyframes:a,preUpdate:c,update:d,preRender:h,render:g,postRender:f}=r,y=()=>{const T=It.useManualTiming,P=T?i.timestamp:performance.now();n=!1,T||(i.delta=s?1e3/60:Math.max(Math.min(P-i.timestamp,Fl),1)),i.timestamp=P,i.isProcessing=!0,l.process(i),u.process(i),a.process(i),c.process(i),d.process(i),h.process(i),g.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},b=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:Ue.reduce((T,P)=>{const j=r[P];return T[P]=(B,k=!1,m=!1)=>(n||b(),j.schedule(B,k,m)),T},{}),cancel:T=>{for(let P=0;P<Ue.length;P++)r[Ue[P]].cancel(T)},state:i,steps:r}}const{schedule:z,cancel:Ot,state:it,steps:Vn}=no(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);let Ze;function Bl(){Ze=void 0}const lt={now:()=>(Ze===void 0&&lt.set(it.isProcessing||It.useManualTiming?it.timestamp:performance.now()),Ze),set:t=>{Ze=t,queueMicrotask(Bl)}},so=t=>e=>typeof e=="string"&&e.startsWith(t),io=so("--"),Nl=so("var(--"),Vs=t=>Nl(t)?_l.test(t.split("/*")[0].trim()):!1,_l=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ui(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const ue={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Re={...ue,transform:t=>At(0,1,t)},Ge={...ue,default:1},ke=t=>Math.round(t*1e5)/1e5,Ds=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zl(t){return t==null}const Wl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ls=(t,e)=>n=>!!(typeof n=="string"&&Wl.test(n)&&n.startsWith(t)||e&&!zl(n)&&Object.prototype.hasOwnProperty.call(n,e)),ro=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,l]=s.match(Ds);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:l!==void 0?parseFloat(l):1}},Ul=t=>At(0,255,t),Dn={...ue,transform:t=>Math.round(Ul(t))},qt={test:Ls("rgb","red"),parse:ro("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Dn.transform(t)+", "+Dn.transform(e)+", "+Dn.transform(n)+", "+ke(Re.transform(s))+")"};function Gl(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 Qn={test:Ls("#"),parse:Gl,transform:qt.transform},je=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mt=je("deg"),Ct=je("%"),V=je("px"),$l=je("vh"),Hl=je("vw"),di={...Ct,parse:t=>Ct.parse(t)/100,transform:t=>Ct.transform(t*100)},ie={test:Ls("hsl","hue"),parse:ro("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Ct.transform(ke(e))+", "+Ct.transform(ke(n))+", "+ke(Re.transform(s))+")"},Y={test:t=>qt.test(t)||Qn.test(t)||ie.test(t),parse:t=>qt.test(t)?qt.parse(t):ie.test(t)?ie.parse(t):Qn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?qt.transform(t):ie.transform(t),getAnimatableNone:t=>{const e=Y.parse(t);return e.alpha=0,Y.transform(e)}},ql=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Kl(t){return isNaN(t)&&typeof t=="string"&&(t.match(Ds)?.length||0)+(t.match(ql)?.length||0)>0}const oo="number",ao="color",Yl="var",Xl="var(",hi="${}",Zl=/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 le(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const l=e.replace(Zl,u=>(Y.test(u)?(s.color.push(o),i.push(ao),n.push(Y.parse(u))):u.startsWith(Xl)?(s.var.push(o),i.push(Yl),n.push(u)):(s.number.push(o),i.push(oo),n.push(parseFloat(u))),++o,hi)).split(hi);return{values:n,split:l,indexes:s,types:i}}function Jl(t){return le(t).values}function lo({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===oo?i+=ke(s[o]):r===ao?i+=Y.transform(s[o]):i+=s[o]}return i}}function Ql(t){return lo(le(t))}const tc=t=>typeof t=="number"?0:Y.test(t)?Y.getAnimatableNone(t):t,ec=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:tc(t);function nc(t){const e=le(t);return lo(e)(e.values.map((s,i)=>ec(s,e.split[i])))}const vt={test:Kl,parse:Jl,createTransformer:Ql,getAnimatableNone:nc};function Ln(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 sc({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 l=n<.5?n*(1+e):n+e-n*e,u=2*n-l;i=Ln(u,l,t+1/3),o=Ln(u,l,t),r=Ln(u,l,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function ln(t,e){return n=>n>0?e:t}const _=(t,e,n)=>t+(e-t)*n,jn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ic=[Qn,qt,ie],rc=t=>ic.find(e=>e.test(t));function fi(t){const e=rc(t);if(!e)return!1;let n=e.parse(t);return e===ie&&(n=sc(n)),n}const pi=(t,e)=>{const n=fi(t),s=fi(e);if(!n||!s)return ln(t,e);const i={...n};return o=>(i.red=jn(n.red,s.red,o),i.green=jn(n.green,s.green,o),i.blue=jn(n.blue,s.blue,o),i.alpha=_(n.alpha,s.alpha,o),qt.transform(i))},ts=new Set(["none","hidden"]);function oc(t,e){return ts.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ac(t,e){return n=>_(t,e,n)}function js(t){return typeof t=="number"?ac:typeof t=="string"?Vs(t)?ln:Y.test(t)?pi:uc:Array.isArray(t)?co:typeof t=="object"?Y.test(t)?pi:lc:ln}function co(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>js(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function lc(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=js(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function cc(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]],l=t.values[r]??0;n[i]=l,s[o]++}return n}const uc=(t,e)=>{const n=vt.createTransformer(e),s=le(t),i=le(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?ts.has(t)&&!i.values.length||ts.has(e)&&!s.values.length?oc(t,e):De(co(cc(s,i),i.values),n):ln(t,e)};function uo(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?_(t,e,n):js(t)(t,e)}const dc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>z.update(e,n),stop:()=>Ot(e),now:()=>it.isProcessing?it.timestamp:lt.now()}},ho=(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)})`},cn=2e4;function Is(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<cn;)e+=n,s=t.next(e);return e>=cn?1/0:e}function hc(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Is(s),cn);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:pt(i)}}const $={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 es(t,e){return t*Math.sqrt(1-e*e)}const fc=12;function pc(t,e,n){let s=n;for(let i=1;i<fc;i++)s=s-t(s)/e(s);return s}const In=.001;function mc({duration:t=$.duration,bounce:e=$.bounce,velocity:n=$.velocity,mass:s=$.mass}){let i,o,r=1-e;r=At($.minDamping,$.maxDamping,r),t=At($.minDuration,$.maxDuration,pt(t)),r<1?(i=a=>{const c=a*r,d=c*t,h=c-n,g=es(a,r),f=Math.exp(-d);return In-h/g*f},o=a=>{const d=a*r*t,h=d*n+n,g=Math.pow(r,2)*Math.pow(a,2)*t,f=Math.exp(-d),y=es(Math.pow(a,2),r);return(-i(a)+In>0?-1:1)*((h-g)*f)/y}):(i=a=>{const c=Math.exp(-a*t),d=(a-n)*t+1;return-In+c*d},o=a=>{const c=Math.exp(-a*t),d=(n-a)*(t*t);return c*d});const l=5/t,u=pc(i,o,l);if(t=ht(t),isNaN(u))return{stiffness:$.stiffness,damping:$.damping,duration:t};{const a=Math.pow(u,2)*s;return{stiffness:a,damping:r*2*Math.sqrt(s*a),duration:t}}}const gc=["duration","bounce"],yc=["stiffness","damping","mass"];function mi(t,e){return e.some(n=>t[n]!==void 0)}function vc(t){let e={velocity:$.velocity,stiffness:$.stiffness,damping:$.damping,mass:$.mass,isResolvedFromDuration:!1,...t};if(!mi(t,yc)&&mi(t,gc))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*At(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:$.mass,stiffness:i,damping:o}}else{const n=mc({...t,velocity:0});e={...e,...n,mass:$.mass},e.isResolvedFromDuration=!0}return e}function un(t=$.visualDuration,e=$.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],l={done:!1,value:o},{stiffness:u,damping:a,mass:c,duration:d,velocity:h,isResolvedFromDuration:g}=vc({...n,velocity:-pt(n.velocity||0)}),f=h||0,y=a/(2*Math.sqrt(u*c)),b=r-o,w=pt(Math.sqrt(u/c)),x=Math.abs(b)<5;s||(s=x?$.restSpeed.granular:$.restSpeed.default),i||(i=x?$.restDelta.granular:$.restDelta.default);let T,P,j,B,k,m;if(y<1)j=es(w,y),B=(f+y*w*b)/j,T=C=>{const D=Math.exp(-y*w*C);return r-D*(B*Math.sin(j*C)+b*Math.cos(j*C))},k=y*w*B+b*j,m=y*w*b-B*j,P=C=>Math.exp(-y*w*C)*(k*Math.sin(j*C)+m*Math.cos(j*C));else if(y===1){T=D=>r-Math.exp(-w*D)*(b+(f+w*b)*D);const C=f+w*b;P=D=>Math.exp(-w*D)*(w*C*D-f)}else{const C=w*Math.sqrt(y*y-1);T=H=>{const F=Math.exp(-y*w*H),N=Math.min(C*H,300);return r-F*((f+y*w*b)*Math.sinh(N)+C*b*Math.cosh(N))/C};const D=(f+y*w*b)/C,U=y*w*D-b*C,tt=y*w*b-D*C;P=H=>{const F=Math.exp(-y*w*H),N=Math.min(C*H,300);return F*(U*Math.sinh(N)+tt*Math.cosh(N))}}const M={calculatedDuration:g&&d||null,velocity:C=>ht(P(C)),next:C=>{if(!g&&y<1){const U=Math.exp(-y*w*C),tt=Math.sin(j*C),H=Math.cos(j*C),F=r-U*(B*tt+b*H),N=ht(U*(k*tt+m*H));return l.done=Math.abs(N)<=s&&Math.abs(r-F)<=i,l.value=l.done?r:F,l}const D=T(C);if(g)l.done=C>=d;else{const U=ht(P(C));l.done=Math.abs(U)<=s&&Math.abs(r-D)<=i}return l.value=l.done?r:D,l},toString:()=>{const C=Math.min(Is(M),cn),D=ho(U=>M.next(C*U).value,C,30);return C+"ms "+D},toTransition:()=>{}};return M}un.applyToOptions=t=>{const e=hc(t,100,un);return t.ease=e.ease,t.duration=ht(e.duration),t.type="keyframes",t};const bc=5;function fo(t,e,n){const s=Math.max(e-bc,0);return $r(n-t(s),e-s)}function ns({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:l,max:u,restDelta:a=.5,restSpeed:c}){const d=t[0],h={done:!1,value:d},g=m=>l!==void 0&&m<l||u!==void 0&&m>u,f=m=>l===void 0?u:u===void 0||Math.abs(l-m)<Math.abs(u-m)?l:u;let y=n*e;const b=d+y,w=r===void 0?b:r(b);w!==b&&(y=w-d);const x=m=>-y*Math.exp(-m/s),T=m=>w+x(m),P=m=>{const M=x(m),C=T(m);h.done=Math.abs(M)<=a,h.value=h.done?w:C};let j,B;const k=m=>{g(h.value)&&(j=m,B=un({keyframes:[h.value,f(h.value)],velocity:fo(T,m,h.value),damping:i,stiffness:o,restDelta:a,restSpeed:c}))};return k(0),{calculatedDuration:null,next:m=>{let M=!1;return!B&&j===void 0&&(M=!0,P(m),k(m)),j!==void 0&&m>=j?B.next(m-j):(!M&&P(m),h)}}}function xc(t,e,n){const s=[],i=n||It.mix||uo,o=t.length-1;for(let r=0;r<o;r++){let l=i(t[r],t[r+1]);if(e){const u=Array.isArray(e)?e[r]||mt:e;l=De(u,l)}s.push(l)}return s}function wc(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(vn(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 l=xc(e,s,i),u=l.length,a=c=>{if(r&&c<t[0])return e[0];let d=0;if(u>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const h=Ee(t[d],t[d+1],c);return l[d](h)};return n?c=>a(At(t[0],t[o-1],c)):a}function Tc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ee(0,e,s);t.push(_(n,1,i))}}function Sc(t){const e=[0];return Tc(e,t.length-1),e}function kc(t,e){return t.map(n=>n*e)}function Pc(t,e){return t.map(()=>e||to).splice(0,t.length-1)}function Pe({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ll(s)?s.map(ci):ci(s),o={done:!1,value:e[0]},r=kc(n&&n.length===e.length?n:Sc(e),t),l=wc(r,e,{ease:Array.isArray(i)?i:Pc(e,i)});return{calculatedDuration:t,next:u=>(o.value=l(u),o.done=u>=t,o)}}const Cc=t=>t!==null;function bn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Cc),l=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!l||s===void 0?o[l]:s}const Ac={decay:ns,inertia:ns,tween:Pe,keyframes:Pe,spring:un};function po(t){typeof t.type=="string"&&(t.type=Ac[t.type])}class Os{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 Ec=t=>t/100;class dn extends Os{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!==lt.now()&&this.tick(lt.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;po(e);const{type:n=Pe,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:l}=e;const u=n||Pe;u!==Pe&&typeof l[0]!="number"&&(this.mixKeyframes=De(Ec,uo(l[0],l[1])),l=[0,100]);const a=u({...e,keyframes:l});o==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...l].reverse(),velocity:-r})),a.calculatedDuration===null&&(a.calculatedDuration=Is(a));const{calculatedDuration:c}=a;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=a}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:l,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:a=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:g,type:f,onUpdate:y,finalKeyframe:b}=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 w=this.currentTime-a*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?w<0:w>i;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,P=s;if(d){const m=Math.min(this.currentTime,i)/l;let M=Math.floor(m),C=m%1;!C&&m>=1&&(C=1),C===1&&M--,M=Math.min(M,d+1),M%2&&(h==="reverse"?(C=1-C,g&&(C-=g/l)):h==="mirror"&&(P=r)),T=At(0,1,C)*l}let j;x?(this.delayState.value=c[0],j=this.delayState):j=P.next(T),o&&!x&&(j.value=o(j.value));let{done:B}=j;!x&&u!==null&&(B=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return k&&f!==ns&&(j.value=bn(c,this.options,b,this.speed)),y&&y(j.value),k&&this.finish(),j}then(e,n){return this.finished.then(e,n)}get duration(){return pt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+pt(e)}get time(){return pt(this.currentTime)}set time(e){e=ht(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 fo(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(lt.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=pt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=dc,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(lt.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 Rc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Kt=t=>t*180/Math.PI,ss=t=>{const e=Kt(Math.atan2(t[1],t[0]));return is(e)},Mc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ss,rotateZ:ss,skewX:t=>Kt(Math.atan(t[1])),skewY:t=>Kt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},is=t=>(t=t%360,t<0&&(t+=360),t),gi=ss,yi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),vi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Vc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yi,scaleY:vi,scale:t=>(yi(t)+vi(t))/2,rotateX:t=>is(Kt(Math.atan2(t[6],t[5]))),rotateY:t=>is(Kt(Math.atan2(-t[2],t[0]))),rotateZ:gi,rotate:gi,skewX:t=>Kt(Math.atan(t[4])),skewY:t=>Kt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function rs(t){return t.includes("scale")?1:0}function os(t,e){if(!t||t==="none")return rs(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Vc,i=n;else{const l=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Mc,i=l}if(!i)return rs(e);const o=s[e],r=i[1].split(",").map(Lc);return typeof o=="function"?o(r):r[o]}const Dc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return os(n,e)};function Lc(t){return parseFloat(t.trim())}const de=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],he=new Set([...de,"pathRotation"]),bi=t=>t===ue||t===V,jc=new Set(["x","y","z"]),Ic=de.filter(t=>!jc.has(t));function Oc(t){const e=[];return Ic.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const jt={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})=>os(e,"x"),y:(t,{transform:e})=>os(e,"y")};jt.translateX=jt.x;jt.translateY=jt.y;const Yt=new Set;let as=!1,ls=!1,cs=!1;function mo(){if(ls){const t=Array.from(Yt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Oc(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)})}ls=!1,as=!1,Yt.forEach(t=>t.complete(cs)),Yt.clear()}function go(){Yt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ls=!0)})}function Fc(){cs=!0,go(),mo(),cs=!1}class Fs{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?(Yt.add(this),as||(as=!0,z.read(go),z.resolveKeyframes(mo))):(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 l=s.readValue(n,r);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Rc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Yt.delete(this)}cancel(){this.state==="scheduled"&&(Yt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Bc=t=>t.startsWith("--");function yo(t,e,n){Bc(e)?t.style.setProperty(e,n):t.style[e]=n}const Nc={};function vo(t,e){const n=Gr(t);return()=>Nc[e]??n()}const _c=vo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),bo=vo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Se=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,xi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Se([0,.65,.55,1]),circOut:Se([.55,0,1,.45]),backIn:Se([.31,.01,.66,-.59]),backOut:Se([.33,1.53,.69,.99])};function xo(t,e){if(t)return typeof t=="function"?bo()?ho(t,e):"ease-out":eo(t)?Se(t):Array.isArray(t)?t.map(n=>xo(n,e)||xi.easeOut):xi[t]}function zc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:l="easeOut",times:u}={},a=void 0){const c={[e]:n};u&&(c.offset=u);const d=xo(l,i);Array.isArray(d)&&(c.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 a&&(h.pseudoElement=a),t.animate(c,h)}function wo(t){return typeof t=="function"&&"applyToOptions"in t}function Wc({type:t,...e}){return wo(t)&&bo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class To extends Os{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:l,onComplete:u}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,vn(typeof e.type!="string");const a=Wc(e);this.animation=zc(n,s,i,a,o),a.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=bn(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(c),yo(n,s,c),this.animation.cancel()}u?.(),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 pt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+pt(e)}get time(){return pt(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ht(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&&_c()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),mt):i(this)}}const So={anticipate:Zr,backInOut:Xr,circInOut:Qr};function Uc(t){return t in So}function Gc(t){typeof t.ease=="string"&&Uc(t.ease)&&(t.ease=So[t.ease])}const On=10;class $c extends To{constructor(e){Gc(e),po(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 l=new dn({...r,autoplay:!1}),u=Math.max(On,lt.now()-this.startTime),a=At(0,On,u-On),c=l.sample(u).value,{name:d}=this.options;o&&d&&yo(o,d,c),n.setWithVelocity(l.sample(Math.max(0,u-a)).value,c,a),l.stop()}}const wi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(vt.test(t)||t==="0")&&!t.startsWith("url("));function Hc(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 qc(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=wi(i,e),l=wi(o,e);return!r||!l?!1:Hc(t)||(n==="spring"||wo(n))&&s}function us(t){t.duration=0,t.type="keyframes"}const ko=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Kc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Yc(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Kc.test(t[e]))return!0;return!1}const Xc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Zc=Gr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Jc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r,keyframes:l}=t,u=e?.owner?.current;if(!(u instanceof HTMLElement)&&!(u instanceof SVGElement))return!1;const{onUpdate:a,transformTemplate:c}=e.owner.getProps();return Zc()&&n&&(ko.has(n)||Xc.has(n)&&Yc(l))&&(n!=="transform"||!c)&&!a&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Qc=40;class tu extends Os{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:l,name:u,motionValue:a,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=lt.now();const h={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:u,motionValue:a,element:c,...d},g=c?.KeyframeResolver||Fs;this.keyframeResolver=new g(l,(f,y,b)=>this.onKeyframesResolved(f,y,h,!b),u,a,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:l,delay:u,isHandoff:a,onUpdate:c}=s;this.resolvedAt=lt.now();let d=!0;qc(e,o,r,l)||(d=!1,(It.instantAnimations||!u)&&c?.(bn(e,s,n)),e[0]=e[e.length-1],us(s),s.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Qc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=d&&!a&&Jc(g),y=g.motionValue?.owner?.current;let b;if(f)try{b=new $c({...g,element:y})}catch{b=new dn(g)}else b=new dn(g);b.finished.then(()=>{this.notifyFinished()}).catch(mt),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}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(),Fc()),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 Po(t,e,n,s=0,i=1){const o=Array.from(t).sort((a,c)=>a.sortNodePosition(c)).indexOf(e),r=t.size,l=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:l-o*s}const Ti=30,eu=t=>!isNaN(parseFloat(t));class nu{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=lt.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=lt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=eu(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 Es);const s=this.events[e].add(n);return e==="change"?()=>{s(),z.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=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ti)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ti);return $r(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 ce(t,e){return new nu(t,e)}function Co(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Bs(t,e){const n=t?.[e]??t?.default??t;return n!==t?Co(n,t):n}const su={type:"spring",stiffness:500,damping:25,restSpeed:10},iu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ru={type:"keyframes",duration:.8},ou={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},au=(t,{keyframes:e})=>e.length>2?ru:he.has(t)?t.startsWith("scale")?iu(e[1]):su:ou,lu=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function cu(t){for(const e in t)if(!lu.has(e))return!0;return!1}const Ns=(t,e,n,s={},i,o)=>r=>{const l=Bs(s,t)||{},u=l.delay||s.delay||0;let{elapsed:a=0}=s;a=a-ht(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-a,onUpdate:h=>{e.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{r(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:o?void 0:i};cu(l)||Object.assign(c,au(t,c)),c.duration&&(c.duration=ht(c.duration)),c.repeatDelay&&(c.repeatDelay=ht(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(us(c),c.delay===0&&(d=!0)),(It.instantAnimations||It.skipAnimations||i?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,us(c),c.delay=0),c.allowFlatten=!l.type&&!l.ease,d&&!o&&e.get()!==void 0){const h=bn(c.keyframes,l);if(h!==void 0){z.update(()=>{c.onUpdate(h),c.onComplete()});return}}return l.isSync?new dn(c):new tu(c)},uu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function du(t){const e=uu.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ao(t,e,n=1){const[s,i]=du(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return zr(r)?parseFloat(r):r}return Vs(i)?Ao(i,e,n+1):i}function Si(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function _s(t,e,n,s){if(typeof e=="function"){const[i,o]=Si(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]=Si(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Xt(t,e,n){const s=t.getProps();return _s(s,e,n!==void 0?n:s.custom,t)}const Eo=new Set(["width","height","top","left","right","bottom",...de]),ds=t=>Array.isArray(t);function hu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ce(n))}function fu(t){return ds(t)?t[t.length-1]||0:t}function pu(t,e){const n=Xt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const l=fu(o[r]);hu(t,r,l)}}const ot=t=>!!(t&&t.getVelocity);function mu(t){return!!(ot(t)&&t.add)}function hs(t,e){const n=t.getValue("willChange");if(mu(n))return n.add(e);if(!n&&It.WillChange){const s=new It.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function zs(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const gu="framerAppearId",Ro="data-"+zs(gu);function Mo(t){return t.props[Ro]}function yu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Vo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o,transitionEnd:r,...l}=e;const u=t.getDefaultTransition();o=o?Co(o,u):u;const a=o?.reduceMotion,c=o?.skipAnimations;s&&(o=s);const d=[],h=i&&t.animationState&&t.animationState.getState()[i],g=o?.path;g&&g.animateVisualElement(t,l,o,n,d);for(const f in l){const y=t.getValue(f,t.latestValues[f]??null),b=l[f];if(b===void 0||h&&yu(h,f))continue;const w={delay:n,...Bs(o||{},f)};c&&(w.skipAnimations=!0);const x=y.get();if(x!==void 0&&!y.isAnimating()&&!Array.isArray(b)&&b===x&&!w.velocity){z.update(()=>y.set(b));continue}let T=!1;if(window.MotionHandoffAnimation){const B=Mo(t);if(B){const k=window.MotionHandoffAnimation(B,f,z);k!==null&&(w.startTime=k,T=!0)}}hs(t,f);const P=a??t.shouldReduceMotion;y.start(Ns(f,y,b,P&&Eo.has(f)?{type:!1}:w,t,T));const j=y.animation;j&&d.push(j)}if(r){const f=()=>z.update(()=>{r&&pu(t,r)});d.length?Promise.all(d).then(f):f()}return d}function fs(t,e,n={}){const s=Xt(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(Vo(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:a=0,staggerChildren:c,staggerDirection:d}=i;return vu(t,e,u,a,c,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,a]=l==="beforeChildren"?[o,r]:[r,o];return u().then(()=>a())}else return Promise.all([o(),r(n.delay)])}function vu(t,e,n=0,s=0,i=0,o=1,r){const l=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),l.push(fs(u,e,{...r,delay:n+(typeof s=="function"?0:s)+Po(t.variantChildren,u,s,i,o)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(l)}function bu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>fs(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=fs(t,e,n);else{const i=typeof e=="function"?Xt(t,e,n.custom):e;s=Promise.all(Vo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const xu={test:t=>t==="auto",parse:t=>t},Do=t=>e=>e.test(t),Lo=[ue,V,Ct,Mt,Hl,$l,xu],ki=t=>Lo.find(Do(t));function wu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ur(t):!0}const Tu=new Set(["brightness","contrast","saturate","opacity"]);function Su(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ds)||[];if(!s)return t;const i=n.replace(s,"");let o=Tu.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ku=/\b([a-z-]*)\(.*?\)/gu,ps={...vt,getAnimatableNone:t=>{const e=t.match(ku);return e?e.map(Su).join(" "):t}},ms={...vt,getAnimatableNone:t=>{const e=vt.parse(t);return vt.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Pi={...ue,transform:Math.round},Pu={rotate:Mt,pathRotation:Mt,rotateX:Mt,rotateY:Mt,rotateZ:Mt,scale:Ge,scaleX:Ge,scaleY:Ge,scaleZ:Ge,skew:Mt,skewX:Mt,skewY:Mt,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Re,originX:di,originY:di,originZ:V},hn={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...Pu,zIndex:Pi,fillOpacity:Re,strokeOpacity:Re,numOctaves:Pi},Cu={...hn,color:Y,backgroundColor:Y,outlineColor:Y,fill:Y,stroke:Y,borderColor:Y,borderTopColor:Y,borderRightColor:Y,borderBottomColor:Y,borderLeftColor:Y,filter:ps,WebkitFilter:ps,mask:ms,WebkitMask:ms},jo=t=>Cu[t],Au=new Set([ps,ms]);function Io(t,e){let n=jo(t);return Au.has(n)||(n=vt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Eu=new Set(["auto","none","0"]);function Ru(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Eu.has(o)&&le(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Io(n,i)}class Mu extends Fs{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 c=0;c<e.length;c++){let d=e[c];if(typeof d=="string"&&(d=d.trim(),Vs(d))){const h=Ao(d,n.current);h!==void 0&&(e[c]=h),c===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Eo.has(s)||e.length!==2)return;const[i,o]=e,r=ki(i),l=ki(o),u=ui(i),a=ui(o);if(u!==a&&jt[s]){this.needsMeasurement=!0;return}if(r!==l)if(bi(r)&&bi(l))for(let c=0;c<e.length;c++){const d=e[c];typeof d=="string"&&(e[c]=parseFloat(d))}else jt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||wu(e[i]))&&s.push(i);s.length&&Ru(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=jt[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]=jt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Ws=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Oo(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 gs=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Vu(t){return Wr(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Us}=no(queueMicrotask,!1),yt={x:!1,y:!1};function Fo(){return yt.x||yt.y}function Du(t){return t==="x"||t==="y"?yt[t]?null:(yt[t]=!0,()=>{yt[t]=!1}):yt.x||yt.y?null:(yt.x=yt.y=!0,()=>{yt.x=yt.y=!1})}function Bo(t,e){const n=Oo(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Lu(t){return!(t.pointerType==="touch"||Fo())}function ju(t,e,n={}){const[s,i,o]=Bo(t,n);return s.forEach(r=>{let l=!1,u=!1,a;const c=()=>{r.removeEventListener("pointerleave",f)},d=b=>{a&&(a(b),a=void 0),c()},h=b=>{l=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),u&&(u=!1,d(b))},g=()=>{l=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},f=b=>{if(b.pointerType!=="touch"){if(l){u=!0;return}d(b)}},y=b=>{if(!Lu(b))return;u=!1;const w=e(r,b);typeof w=="function"&&(a=w,r.addEventListener("pointerleave",f,i))};r.addEventListener("pointerenter",y,i),r.addEventListener("pointerdown",g,i)}),o}const No=(t,e)=>e?t===e?!0:No(t,e.parentElement):!1,Gs=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Iu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ou(t){return Iu.has(t.tagName)||t.isContentEditable===!0}const Fu=new Set(["INPUT","SELECT","TEXTAREA"]);function Bu(t){return Fu.has(t.tagName)||t.isContentEditable===!0}const Je=new WeakSet;function Ci(t){return e=>{e.key==="Enter"&&t(e)}}function Fn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Nu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ci(()=>{if(Je.has(n))return;Fn(n,"down");const i=Ci(()=>{Fn(n,"up")}),o=()=>Fn(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 Ai(t){return Gs(t)&&!Fo()}const Ei=new WeakSet;function _u(t,e,n={}){const[s,i,o]=Bo(t,n),r=l=>{const u=l.currentTarget;if(!Ai(l)||Ei.has(l))return;Je.add(u),n.stopPropagation&&Ei.add(l);const a=e(u,l),c={...i,capture:!0},d=(f,y)=>{window.removeEventListener("pointerup",h,c),window.removeEventListener("pointercancel",g,c),Je.has(u)&&Je.delete(u),Ai(f)&&typeof a=="function"&&a(f,{success:y})},h=f=>{d(f,u===window||u===document||n.useGlobalTarget||No(u,f.target))},g=f=>{d(f,!1)};window.addEventListener("pointerup",h,c),window.addEventListener("pointercancel",g,c)};return s.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",r,i),Vu(l)&&(l.addEventListener("focus",a=>Nu(a,i)),!Ou(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function $s(t){return Wr(t)&&"ownerSVGElement"in t}const Qe=new WeakMap;let tn;const _o=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:$s(s)&&"getBBox"in s?s.getBBox()[e]:s[n],zu=_o("inline","width","offsetWidth"),Wu=_o("block","height","offsetHeight");function Uu({target:t,borderBoxSize:e}){Qe.get(t)?.forEach(n=>{n(t,{get width(){return zu(t,e)},get height(){return Wu(t,e)}})})}function Gu(t){t.forEach(Uu)}function $u(){typeof ResizeObserver>"u"||(tn=new ResizeObserver(Gu))}function Hu(t,e){tn||$u();const n=Oo(t);return n.forEach(s=>{let i=Qe.get(s);i||(i=new Set,Qe.set(s,i)),i.add(e),tn?.observe(s)}),()=>{n.forEach(s=>{const i=Qe.get(s);i?.delete(e),i?.size||tn?.unobserve(s)})}}const en=new Set;let re;function qu(){re=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};en.forEach(e=>e(t))},window.addEventListener("resize",re)}function Ku(t){return en.add(t),re||qu(),()=>{en.delete(t),!en.size&&typeof re=="function"&&(window.removeEventListener("resize",re),re=void 0)}}function Ri(t,e){return typeof t=="function"?Ku(t):Hu(t,e)}function Yu(t){return $s(t)&&t.tagName==="svg"}const Xu=[...Lo,Y,vt],Zu=t=>Xu.find(Do(t)),Mi=()=>({translate:0,scale:1,origin:0,originPoint:0}),oe=()=>({x:Mi(),y:Mi()}),Vi=()=>({min:0,max:0}),Z=()=>({x:Vi(),y:Vi()}),Ju=new WeakMap;function xn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Me(t){return typeof t=="string"||Array.isArray(t)}const Hs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qs=["initial",...Hs];function wn(t){return xn(t.animate)||qs.some(e=>Me(t[e]))}function zo(t){return!!(wn(t)||t.variants)}function Qu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(ot(i))t.addValue(s,i);else if(ot(o))t.addValue(s,ce(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,ce(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ys={current:null},Wo={current:!1},td=typeof window<"u";function ed(){if(Wo.current=!0,!!td)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ys.current=t.matches;t.addEventListener("change",e),e()}else ys.current=!1}const Di=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let fn={};function Uo(t){fn=t}function nd(){return fn}class sd{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:r,visualState:l},u={}){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=Fs,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 g=lt.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,z.render(this.render,!1,!0))};const{latestValues:a,renderState:c}=l;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=u,this.blockInitialAnimation=!!r,this.isControllingVariants=wn(n),this.isVariantNode=zo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const f=h[g];a[g]!==void 0&&ot(f)&&f.set(a[g])}}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,Ju.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:(Wo.current||ed(),this.shouldReduceMotion=ys.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&&ko.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:l,times:u,ease:a,duration:c}=n.accelerate,d=new To({element:this.current,name:e,keyframes:l,times:u,ease:a,duration:ht(c)}),h=r(d);this.valueSubscriptions.set(e,()=>{h(),d.cancel()});return}const s=he.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&z.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()})}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 fn){const n=fn[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):Z()}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<Di.length;s++){const i=Di[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=Qu(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=ce(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"&&(zr(s)||Ur(s))?s=parseFloat(s):!Zu(s)&&vt.test(n)&&(s=Io(e,n)),this.setBaseTarget(e,ot(s)?s.get():s)),ot(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=_s(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&&!ot(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 Es),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Us.render(this.render)}}class Go extends sd{constructor(){super(...arguments),this.KeyframeResolver=Mu}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;ot(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ft{constructor(e){this.isMounted=!1,this.node=e}update(){}}function $o({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function id({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function rd(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 Bn(t){return t===void 0||t===1}function vs({scale:t,scaleX:e,scaleY:n}){return!Bn(t)||!Bn(e)||!Bn(n)}function Ht(t){return vs(t)||Ho(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ho(t){return Li(t.x)||Li(t.y)}function Li(t){return t&&t!=="0%"}function pn(t,e,n){const s=t-n,i=e*s;return n+i}function ji(t,e,n,s,i){return i!==void 0&&(t=pn(t,i,s)),pn(t,n,s)+e}function bs(t,e=0,n=1,s,i){t.min=ji(t.min,e,n,s,i),t.max=ji(t.max,e,n,s,i)}function qo(t,{x:e,y:n}){bs(t.x,e.translate,e.scale,e.originPoint),bs(t.y,n.translate,n.scale,n.originPoint)}const Ii=.999999999999,Oi=1.0000000000001;function od(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let l=0;l<i;l++){o=n[l],r=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Pt(t.x,-o.scroll.offset.x),Pt(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,qo(t,r)),s&&Ht(o.latestValues)&&nn(t,o.latestValues,o.layout?.layoutBox))}e.x<Oi&&e.x>Ii&&(e.x=1),e.y<Oi&&e.y>Ii&&(e.y=1)}function Pt(t,e){t.min+=e,t.max+=e}function Fi(t,e,n,s,i=.5){const o=_(t.min,t.max,i);bs(t,e,n,o,s)}function Bi(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function nn(t,e,n){const s=n??t;Fi(t.x,Bi(e.x,s.x),e.scaleX,e.scale,e.originX),Fi(t.y,Bi(e.y,s.y),e.scaleY,e.scale,e.originY)}function Ko(t,e){return $o(rd(t.getBoundingClientRect(),e))}function ad(t,e,n){const s=Ko(t,n),{scroll:i}=e;return i&&(Pt(s.x,i.offset.x),Pt(s.y,i.offset.y)),s}const ld={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cd=de.length;function ud(t,e,n){let s="",i=!0;for(let r=0;r<cd;r++){const l=de[r],u=t[l];if(u===void 0)continue;let a=!0;if(typeof u=="number")a=u===(l.startsWith("scale")?1:0);else{const c=parseFloat(u);a=l.startsWith("scale")?c===1:c===0}if(!a||n){const c=gs(u,hn[l]);if(!a){i=!1;const d=ld[l]||l;s+=`${d}(${c}) `}n&&(e[l]=c)}}const o=t.pathRotation;return o&&(i=!1,s+=`rotate(${gs(o,hn.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Ks(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,l=!1;for(const u in e){const a=e[u];if(he.has(u)){r=!0;continue}else if(io(u)){i[u]=a;continue}else{const c=gs(a,hn[u]);u.startsWith("origin")?(l=!0,o[u]=c):s[u]=c}}if(e.transform||(r||n?s.transform=ud(e,t.transform,n):s.transform&&(s.transform="none")),l){const{originX:u="50%",originY:a="50%",originZ:c=0}=o;s.transformOrigin=`${u} ${a} ${c}`}}function Yo(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 Ni(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const xe={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=Ni(t,e.target.x),s=Ni(t,e.target.y);return`${n}% ${s}%`}},dd={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=vt.parse(t);if(i.length>5)return s;const o=vt.createTransformer(t),r=typeof i[0]!="number"?1:0,l=n.x.scale*e.x,u=n.y.scale*e.y;i[0+r]/=l,i[1+r]/=u;const a=_(l,u,.5);return typeof i[2+r]=="number"&&(i[2+r]/=a),typeof i[3+r]=="number"&&(i[3+r]/=a),o(i)}},xs={borderRadius:{...xe,applyTo:[...Ws]},borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomLeftRadius:xe,borderBottomRightRadius:xe,boxShadow:dd};function Xo(t,{layout:e,layoutId:n}){return he.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!xs[t]||t==="opacity")}function Ys(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(ot(s[r])||i&&ot(i[r])||Xo(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function hd(t){return window.getComputedStyle(t)}class fd extends Go{constructor(){super(...arguments),this.type="html",this.renderInstance=Yo}mount(e){vn(!!e.style),super.mount(e)}readValueFromInstance(e,n){if(he.has(n))return this.projection?.isProjecting?rs(n):Dc(e,n);{const s=hd(e),i=(io(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ko(e,n)}build(e,n,s){Ks(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ys(e,n,s)}}const pd={offset:"stroke-dashoffset",array:"stroke-dasharray"},md={offset:"strokeDashoffset",array:"strokeDasharray"};function gd(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?pd:md;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const yd=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...l},u,a,c){if(Ks(t,l,a),u){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=c?.transformBox??"fill-box",delete d.transformBox);for(const g of yd)d[g]!==void 0&&(h[g]=d[g],delete d[g]);e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&gd(d,i,o,r,!1)}const Jo=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"]),Qo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function vd(t,e,n,s){Yo(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Jo.has(i)?i:zs(i),e.attrs[i])}function ta(t,e,n){const s=Ys(t,e,n);for(const i in t)if(ot(t[i])||ot(e[i])){const o=de.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class bd extends Go{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(he.has(n)){const s=jo(n);return s&&s.default||0}return n=Jo.has(n)?n:zs(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return ta(e,n,s)}build(e,n,s){Zo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){vd(e,n,s,i)}mount(e){this.isSVGTag=Qo(e.tagName),super.mount(e)}}const xd=qs.length;function ea(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ea(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<xd;n++){const s=qs[n],i=t.props[s];(Me(i)||i===!1)&&(e[s]=i)}return e}function na(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 wd=[...Hs].reverse(),Td=Hs.length;function Sd(t){return e=>Promise.all(e.map(({animation:n,options:s})=>bu(t,n,s)))}function kd(t){let e=Sd(t),n=_i(),s=!0,i=!1;const o=a=>(c,d)=>{const h=Xt(t,d,a==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:g,transitionEnd:f,...y}=h;c={...c,...y,...f}}return c};function r(a){e=a(t)}function l(a){const{props:c}=t,d=ea(t.parent)||{},h=[],g=new Set;let f={},y=1/0;for(let w=0;w<Td;w++){const x=wd[w],T=n[x],P=c[x]!==void 0?c[x]:d[x],j=Me(P),B=x===a?T.isActive:null;B===!1&&(y=w);let k=P===d[x]&&P!==c[x]&&j;if(k&&(s||i)&&t.manuallyAnimateOnMount&&(k=!1),T.protectedKeys={...f},!T.isActive&&B===null||!P&&!T.prevProp||xn(P)||typeof P=="boolean")continue;if(x==="exit"&&T.isActive&&B!==!0){T.prevResolvedValues&&(f={...f,...T.prevResolvedValues});continue}const m=Pd(T.prevProp,P);let M=m||x===a&&T.isActive&&!k&&j||w>y&&j,C=!1;const D=Array.isArray(P)?P:[P];let U=D.reduce(o(x),{});B===!1&&(U={});const{prevResolvedValues:tt={}}=T,H={...tt,...U},F=W=>{M=!0,g.has(W)&&(C=!0,g.delete(W)),T.needsAnimating[W]=!0;const J=t.getValue(W);J&&(J.liveStyle=!1)};for(const W in H){const J=U[W],A=tt[W];if(f.hasOwnProperty(W))continue;let dt=!1;ds(J)&&ds(A)?dt=!na(J,A)||m:dt=J!==A,dt?J!=null?F(W):g.add(W):J!==void 0&&g.has(W)?F(W):T.protectedKeys[W]=!0}T.prevProp=P,T.prevResolvedValues=U,T.isActive&&(f={...f,...U}),(s||i)&&t.blockInitialAnimation&&(M=!1);const N=k&&m;M&&(!N||C)&&h.push(...D.map(W=>{const J={type:x};if(typeof W=="string"&&(s||i)&&!N&&t.manuallyAnimateOnMount&&t.parent){const{parent:A}=t,dt=Xt(A,W);if(A.enteringChildren&&dt){const{delayChildren:Jt}=dt.transition||{};J.delay=Po(A.enteringChildren,t,Jt)}}return{animation:W,options:J}}))}if(g.size){const w={};if(typeof c.initial!="boolean"){const x=Xt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(w.transition=x.transition)}g.forEach(x=>{const T=t.getBaseTarget(x),P=t.getValue(x);P&&(P.liveStyle=!0),w[x]=T??null}),h.push({animation:w})}let b=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(b=!1),s=!1,i=!1,b?e(h):Promise.resolve()}function u(a,c){if(n[a].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(a,c)),n[a].isActive=c;const d=l(a);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:l,setActive:u,setAnimateFunction:r,getState:()=>n,reset:()=>{n=_i(),i=!0}}}function Pd(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!na(e,t):!1}function Wt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _i(){return{animate:Wt(!0),whileInView:Wt(),whileHover:Wt(),whileTap:Wt(),whileDrag:Wt(),whileFocus:Wt(),exit:Wt()}}function ws(t,e){t.min=e.min,t.max=e.max}function gt(t,e){ws(t.x,e.x),ws(t.y,e.y)}function zi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const sa=1e-4,Cd=1-sa,Ad=1+sa,ia=.01,Ed=0-ia,Rd=0+ia;function ct(t){return t.max-t.min}function Md(t,e,n){return Math.abs(t-e)<=n}function Wi(t,e,n,s=.5){t.origin=s,t.originPoint=_(e.min,e.max,t.origin),t.scale=ct(n)/ct(e),t.translate=_(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Cd&&t.scale<=Ad||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ed&&t.translate<=Rd||isNaN(t.translate))&&(t.translate=0)}function Ce(t,e,n,s){Wi(t.x,e.x,n.x,s?s.originX:void 0),Wi(t.y,e.y,n.y,s?s.originY:void 0)}function Ui(t,e,n,s=0){const i=s?_(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+ct(e)}function Vd(t,e,n,s){Ui(t.x,e.x,n.x,s?.x),Ui(t.y,e.y,n.y,s?.y)}function Gi(t,e,n,s=0){const i=s?_(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+ct(e)}function mn(t,e,n,s){Gi(t.x,e.x,n.x,s?.x),Gi(t.y,e.y,n.y,s?.y)}function $i(t,e,n,s,i){return t-=e,t=pn(t,1/n,s),i!==void 0&&(t=pn(t,1/i,s)),t}function Dd(t,e=0,n=1,s=.5,i,o=t,r=t){if(Ct.test(e)&&(e=parseFloat(e),e=_(r.min,r.max,e/100)-r.min),typeof e!="number")return;let l=_(o.min,o.max,s);t===o&&(l-=e),t.min=$i(t.min,e,n,l,i),t.max=$i(t.max,e,n,l,i)}function Hi(t,e,[n,s,i],o,r){Dd(t,e[n],e[s],e[i],e.scale,o,r)}const Ld=["x","scaleX","originX"],jd=["y","scaleY","originY"];function qi(t,e,n,s){Hi(t.x,e,Ld,n?n.x:void 0,s?s.x:void 0),Hi(t.y,e,jd,n?n.y:void 0,s?s.y:void 0)}function Ki(t){return t.translate===0&&t.scale===1}function ra(t){return Ki(t.x)&&Ki(t.y)}function Yi(t,e){return t.min===e.min&&t.max===e.max}function Id(t,e){return Yi(t.x,e.x)&&Yi(t.y,e.y)}function Xi(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function oa(t,e){return Xi(t.x,e.x)&&Xi(t.y,e.y)}function Zi(t){return ct(t.x)/ct(t.y)}function Ji(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function kt(t){return[t("x"),t("y")]}function Od(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:a,rotate:c,pathRotation:d,rotateX:h,rotateY:g,skewX:f,skewY:y}=n;a&&(s=`perspective(${a}px) ${s}`),c&&(s+=`rotate(${c}deg) `),d&&(s+=`rotate(${d}deg) `),h&&(s+=`rotateX(${h}deg) `),g&&(s+=`rotateY(${g}deg) `),f&&(s+=`skewX(${f}deg) `),y&&(s+=`skewY(${y}deg) `)}const l=t.x.scale*e.x,u=t.y.scale*e.y;return(l!==1||u!==1)&&(s+=`scale(${l}, ${u})`),s||"none"}const Fd=Ws.length,Qi=t=>typeof t=="string"?parseFloat(t):t,tr=t=>typeof t=="number"||V.test(t);function Bd(t,e,n,s,i,o){i?(t.opacity=_(0,n.opacity??1,Nd(s)),t.opacityExit=_(e.opacity??1,0,_d(s))):o&&(t.opacity=_(e.opacity??1,n.opacity??1,s));for(let r=0;r<Fd;r++){const l=Ws[r];let u=er(e,l),a=er(n,l);if(u===void 0&&a===void 0)continue;u||(u=0),a||(a=0),u===0||a===0||tr(u)===tr(a)?(t[l]=Math.max(_(Qi(u),Qi(a),s),0),(Ct.test(a)||Ct.test(u))&&(t[l]+="%")):t[l]=a}(e.rotate||n.rotate)&&(t.rotate=_(e.rotate||0,n.rotate||0,s))}function er(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Nd=aa(0,.5,Jr),_d=aa(.5,.95,mt);function aa(t,e,n){return s=>s<t?0:s>e?1:n(Ee(t,e,s))}function zd(t,e,n){const s=ot(t)?t:ce(t);return s.start(Ns("",s,e,n)),s.animation}function Ve(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const Wd=(t,e)=>t.depth-e.depth;class Ud{constructor(){this.children=[],this.isDirty=!1}add(e){As(this.children,e),this.isDirty=!0}remove(e){an(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Wd),this.isDirty=!1,this.children.forEach(e)}}function Gd(t,e){const n=lt.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Ot(s),t(o-e))};return z.setup(s,!0),()=>Ot(s)}function sn(t){return ot(t)?t.get():t}class $d{constructor(){this.members=[]}add(e){As(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&&(an(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(an(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 rn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Nn=["","X","Y","Z"],Hd=1e3;let qd=0;function _n(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function la(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Mo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",z,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&la(s)}function ca({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},l=e?.()){this.id=qd++,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(Xd),this.nodes.forEach(nh),this.nodes.forEach(sh),this.nodes.forEach(Zd)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ud)}addEventListener(r,l){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Es),this.eventHandlers.get(r).add(l)}notifyListeners(r,...l){const u=this.eventHandlers.get(r);u&&u.notify(...l)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=$s(r)&&!Yu(r),this.instance=r;const{layoutId:l,layout:u,visualElement:a}=this.options;if(a&&!a.current&&a.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),t){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;z.read(()=>{d=window.innerWidth}),t(r,()=>{const g=window.innerWidth;g!==d&&(d=g,this.root.updateBlockedByResize=!0,c&&c(),c=Gd(h,250),rn.hasAnimatedSinceResize&&(rn.hasAnimatedSinceResize=!1,this.nodes.forEach(ir)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&a&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||a.getDefaultTransition()||lh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=a.getProps(),w=!this.targetLayout||!oa(this.targetLayout,g),x=!d&&h;if(this.options.layoutRoot||this.resumeFrom||x||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...Bs(f,"layout"),onPlay:y,onComplete:b};(a.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(c,x,T.path)}else d||ir(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}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(ih),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&&la(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];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:l,layout:u}=this.options;if(l===void 0&&!u)return;const a=this.getTransformTemplate();this.prevTransformTemplateValue=a?a(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(Qd),this.nodes.forEach(nr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(sr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(th),this.nodes.forEach(eh),this.nodes.forEach(Kd),this.nodes.forEach(Yd)):this.nodes.forEach(sr),this.clearAllSnapshots();const l=lt.now();it.delta=At(0,1e3/60,l-it.timestamp),it.timestamp=l,it.isProcessing=!0,Vn.update.process(it),Vn.preRender.process(it),Vn.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Us.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Jd),this.sharedNodes.forEach(rh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,z.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){z.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(l=!1),l&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!ra(this.projectionDelta),u=this.getTransformTemplate(),a=u?u(this.latestValues,""):void 0,c=a!==this.prevTransformTemplateValue;r&&this.instance&&(l||Ht(this.latestValues)||c)&&(i(this.instance,a),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return r&&(u=this.removeTransform(u)),ch(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return Z();const l=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(uh))){const{scroll:a}=this.root;a&&(Pt(l.x,a.offset.x),Pt(l.y,a.offset.y))}return l}removeElementScroll(r){const l=Z();if(gt(l,r),this.scroll?.wasRoot)return l;for(let u=0;u<this.path.length;u++){const a=this.path[u],{scroll:c,options:d}=a;a!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&gt(l,r),Pt(l.x,c.offset.x),Pt(l.y,c.offset.y))}return l}applyTransform(r,l=!1,u){const a=u||Z();gt(a,r);for(let c=0;c<this.path.length;c++){const d=this.path[c];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(Pt(a.x,-d.scroll.offset.x),Pt(a.y,-d.scroll.offset.y)),Ht(d.latestValues)&&nn(a,d.latestValues,d.layout?.layoutBox)}return Ht(this.latestValues)&&nn(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(r){const l=Z();gt(l,r);for(let u=0;u<this.path.length;u++){const a=this.path[u];if(!Ht(a.latestValues))continue;let c;a.instance&&(vs(a.latestValues)&&a.updateSnapshot(),c=Z(),gt(c,a.measurePageBox())),qi(l,a.latestValues,a.snapshot?.layoutBox,c)}return Ht(this.latestValues)&&qi(l,this.latestValues),l}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!==it.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(r||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=it.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=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Vd(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):gt(this.target,this.layout.layoutBox),qo(this.target,this.targetDelta)):gt(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||vs(this.parent.latestValues)||Ho(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,l,u){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),mn(this.relativeTargetOrigin,l,u,this.options.layoutAnchor||void 0),gt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),l=!!this.resumingFrom||this!==r;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===it.timestamp&&(u=!1),u)return;const{layout:a,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(a||c))return;gt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;od(this.layoutCorrected,this.treeScale,this.path,l),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=Z());const{target:g}=r;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zi(this.prevProjectionDelta.x,this.projectionDelta.x),zi(this.prevProjectionDelta.y,this.projectionDelta.y)),Ce(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=oe(),this.projectionDelta=oe(),this.projectionDeltaWithTransform=oe()}setAnimationOrigin(r,l=!1,u){const a=this.snapshot,c=a?a.latestValues:{},d={...this.latestValues},h=oe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const g=Z(),f=a?a.source:void 0,y=this.layout?this.layout.source:void 0,b=f!==y,w=this.getStack(),x=!w||w.members.length<=1,T=!!(b&&!x&&this.options.crossfade===!0&&!this.path.some(ah));this.animationProgress=0;let P;const j=u?.interpolateProjection(r);this.mixTargetDelta=B=>{const k=B/1e3,m=j?.(k);m?(h.x.translate=m.x,h.x.scale=_(r.x.scale,1,k),h.x.origin=r.x.origin,h.x.originPoint=r.x.originPoint,h.y.translate=m.y,h.y.scale=_(r.y.scale,1,k),h.y.origin=r.y.origin,h.y.originPoint=r.y.originPoint):(rr(h.x,r.x,k),rr(h.y,r.y,k)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mn(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),oh(this.relativeTarget,this.relativeTargetOrigin,g,k),P&&Id(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=Z()),gt(P,this.relativeTarget)),b&&(this.animationValues=d,Bd(d,c,this.latestValues,k,T,x)),m&&m.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=m.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},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=z.update(()=>{rn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ce(0)),this.motionValue.jump(0,!1),this.currentAnimation=zd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),r.onUpdate&&r.onUpdate(l)},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(Hd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:u,layout:a,latestValues:c}=r;if(!(!l||!u||!a)){if(this!==r&&this.layout&&a&&ua(this.options.animationType,this.layout.layoutBox,a.layoutBox)){u=this.target||Z();const d=ct(this.layout.layoutBox.x);u.x.min=r.target.x.min,u.x.max=u.x.min+d;const h=ct(this.layout.layoutBox.y);u.y.min=r.target.y.min,u.y.max=u.y.min+h}gt(l,u),nn(l,c),Ce(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(r,l){this.sharedNodes.has(r)||this.sharedNodes.set(r,new $d),this.sharedNodes.get(r).add(l);const a=l.options.initialPromotionConfig;l.promote({transition:a?a.transition:void 0,preserveFollowOpacity:a&&a.shouldPreserveFollowOpacity?a.shouldPreserveFollowOpacity(l):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:l,preserveFollowOpacity:u}={}){const a=this.getStack();a&&a.promote(this,u),r&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let l=!1;const{latestValues:u}=r;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const a={};u.z&&_n("z",r,a,this.animationValues);for(let c=0;c<Nn.length;c++)_n(`rotate${Nn[c]}`,r,a,this.animationValues),_n(`skew${Nn[c]}`,r,a,this.animationValues);r.render();for(const c in a)r.setStaticValue(c,a[c]),this.animationValues&&(this.animationValues[c]=a[c]);r.scheduleRender()}applyProjectionStyles(r,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=sn(l?.pointerEvents)||"",r.transform=u?u(this.latestValues,""):"none";return}const a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=sn(l?.pointerEvents)||""),this.hasProjected&&!Ht(this.latestValues)&&(r.transform=u?u({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=a.animationValues||a.latestValues;this.applyTransformsToTarget();let d=Od(this.projectionDeltaWithTransform,this.treeScale,c);u&&(d=u(c,d)),r.transform=d;const{x:h,y:g}=this.projectionDelta;r.transformOrigin=`${h.origin*100}% ${g.origin*100}% 0`,a.animationValues?r.opacity=a===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=a===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const f in xs){if(c[f]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:w}=xs[f],x=d==="none"?c[f]:y(c[f],a);if(b){const T=b.length;for(let P=0;P<T;P++)r[b[P]]=x}else w?this.options.visualElement.renderState.vars[f]=x:r[f]=x}this.options.layoutId&&(r.pointerEvents=a===this?sn(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(nr),this.root.sharedNodes.clear()}}}function Kd(t){t.updateLayout()}function Yd(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")kt(c=>{const d=o?e.measuredBox[c]:e.layoutBox[c],h=ct(d);d.min=n[c].min,d.max=d.min+h});else if(i==="x"||i==="y"){const c=i==="x"?"y":"x";ws(o?e.measuredBox[c]:e.layoutBox[c],n[c])}else ua(i,e.layoutBox,n)&&kt(c=>{const d=o?e.measuredBox[c]:e.layoutBox[c],h=ct(n[c]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+h)});const r=oe();Ce(r,n,e.layoutBox);const l=oe();o?Ce(l,t.applyTransform(s,!0),e.measuredBox):Ce(l,n,e.layoutBox);const u=!ra(r);let a=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const g=t.options.layoutAnchor||void 0,f=Z();mn(f,e.layoutBox,d.layoutBox,g);const y=Z();mn(y,n,h.layoutBox,g),oa(f,y)||(a=!0),c.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=f,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:l,layoutDelta:r,hasLayoutChanged:u,hasRelativeLayoutChanged:a})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Xd(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 Zd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Jd(t){t.clearSnapshot()}function nr(t){t.clearMeasurements()}function Qd(t){t.isLayoutDirty=!0,t.updateLayout()}function sr(t){t.isLayoutDirty=!1}function th(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function eh(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ir(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nh(t){t.resolveTargetDelta()}function sh(t){t.calcProjection()}function ih(t){t.resetSkewAndRotation()}function rh(t){t.removeLeadSnapshot()}function rr(t,e,n){t.translate=_(e.translate,0,n),t.scale=_(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function or(t,e,n,s){t.min=_(e.min,n.min,s),t.max=_(e.max,n.max,s)}function oh(t,e,n,s){or(t.x,e.x,n.x,s),or(t.y,e.y,n.y,s)}function ah(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const lh={duration:.45,ease:[.4,0,.1,1]},ar=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),lr=ar("applewebkit/")&&!ar("chrome/")?Math.round:mt;function cr(t){t.min=lr(t.min),t.max=lr(t.max)}function ch(t){cr(t.x),cr(t.y)}function ua(t,e,n){return t==="position"||t==="preserve-aspect"&&!Md(Zi(e),Zi(n),.2)}function uh(t){return t!==t.root&&t.scroll?.wasRoot}const dh=ca({attachResizeListener:(t,e)=>Ve(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),zn={current:void 0},da=ca({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!zn.current){const t=new dh({});t.mount(window),t.setOptions({layoutScroll:!0}),zn.current=t}return zn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ha=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function hh(t=!0){const e=p.useContext(Cs);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=p.useId();p.useEffect(()=>{if(t)return i(o)},[t]);const r=p.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const fa=p.createContext({strict:!1}),ur={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 dr=!1;function fh(){if(dr)return;const t={};for(const e in ur)t[e]={isEnabled:n=>ur[e].some(s=>!!n[s])};Uo(t),dr=!0}function pa(){return fh(),nd()}function ph(t){const e=pa();for(const n in t)e[n]={...e[n],...t[n]};Uo(e)}const mh=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 gn(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||mh.has(t)}let ma=t=>!gn(t);function gh(t){typeof t=="function"&&(ma=e=>e.startsWith("on")?!gn(e):t(e))}try{gh(require("@emotion/is-prop-valid").default)}catch{}function yh(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||ot(t[i])||(ma(i)||n===!0&&gn(i)||!e&&!gn(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Tn=p.createContext({});function vh(t,e){if(wn(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Me(n)?n:void 0,animate:Me(s)?s:void 0}}return t.inherit!==!1?e:{}}function bh(t){const{initial:e,animate:n}=vh(t,p.useContext(Tn));return p.useMemo(()=>({initial:e,animate:n}),[hr(e),hr(n)])}function hr(t){return Array.isArray(t)?t.join(" "):t}const Xs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ga(t,e,n){for(const s in e)!ot(e[s])&&!Xo(s,n)&&(t[s]=e[s])}function xh({transformTemplate:t},e){return p.useMemo(()=>{const n=Xs();return Ks(n,e,t),Object.assign({},n.vars,n.style)},[e])}function wh(t,e){const n=t.style||{},s={};return ga(s,n,t),Object.assign(s,xh(t,e)),s}function Th(t,e){const n={},s=wh(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 ya=()=>({...Xs(),attrs:{}});function Sh(t,e,n,s){const i=p.useMemo(()=>{const o=ya();return Zo(o,e,Qo(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ga(o,t.style,t),i.style={...o,...i.style}}return i}const kh=["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 Zs(t){return typeof t!="string"||t.includes("-")?!1:!!(kh.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ph(t,e,n,{latestValues:s},i,o=!1,r){const u=(r??Zs(t)?Sh:Th)(e,s,i,t),a=yh(e,typeof t=="string",o),c=t!==p.Fragment?{...a,...u,ref:n}:{},{children:d}=e,h=p.useMemo(()=>ot(d)?d.get():d,[d]);return p.createElement(t,{...c,children:h})}function Ch({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ah(n,s,i,t),renderState:e()}}function Ah(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=sn(o[h]);let{initial:r,animate:l}=t;const u=wn(t),a=zo(t);e&&a&&!u&&t.inherit!==!1&&(r===void 0&&(r=e.initial),l===void 0&&(l=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const d=c?l:r;if(d&&typeof d!="boolean"&&!xn(d)){const h=Array.isArray(d)?d:[d];for(let g=0;g<h.length;g++){const f=_s(t,h[g]);if(f){const{transitionEnd:y,transition:b,...w}=f;for(const x in w){let T=w[x];if(Array.isArray(T)){const P=c?T.length-1:0;T=T[P]}T!==null&&(i[x]=T)}for(const x in y)i[x]=y[x]}}}return i}const va=t=>(e,n)=>{const s=p.useContext(Tn),i=p.useContext(Cs),o=()=>Ch(t,e,s,i);return n?o():Pl(o)},Eh=va({scrapeMotionValuesFromProps:Ys,createRenderState:Xs}),Rh=va({scrapeMotionValuesFromProps:ta,createRenderState:ya}),Mh=Symbol.for("motionComponentSymbol");function Vh(t,e,n){const s=p.useRef(n);p.useInsertionEffect(()=>{s.current=n});const i=p.useRef(null);return p.useCallback(o=>{o&&t.onMount?.(o),e&&(o?e.mount(o):e.unmount());const r=s.current;if(typeof r=="function")if(o){const l=r(o);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):r(o);else r&&(r.current=o)},[e])}const ba=p.createContext({});function se(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Dh(t,e,n,s,i,o){const{visualElement:r}=p.useContext(Tn),l=p.useContext(fa),u=p.useContext(Cs),a=p.useContext(ha),c=a.reducedMotion,d=a.skipAnimations,h=p.useRef(null),g=p.useRef(!1);s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:r,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:o}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const f=h.current,y=p.useContext(ba);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Lh(h.current,n,i,y);const b=p.useRef(!1);p.useInsertionEffect(()=>{f&&b.current&&f.update(n,u)});const w=n[Ro],x=p.useRef(!!w&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return Al(()=>{g.current=!0,f&&(b.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),x.current&&f.animationState&&f.animationState.animateChanges())}),p.useEffect(()=>{f&&(!x.current&&f.animationState&&f.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),x.current=!1),f.enteringChildren=void 0)}),f}function Lh(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:l,layoutScroll:u,layoutRoot:a,layoutAnchor:c,layoutCrossfade:d}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:xa(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||l&&se(l),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:d,layoutScroll:u,layoutRoot:a,layoutAnchor:c})}function xa(t){if(t)return t.options.allowProjection!==!1?t.projection:xa(t.parent)}function Wn(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&ph(s);const o=n?n==="svg":Zs(t),r=o?Rh:Eh;function l(a,c){let d;const h={...p.useContext(ha),...a,layoutId:jh(a)},{isStatic:g}=h,f=bh(a),y=r(a,g);if(!g&&typeof window<"u"){Ih();const b=Oh(h);d=b.MeasureLayout,f.visualElement=Dh(t,y,h,i,b.ProjectionNode,o)}return v.jsxs(Tn.Provider,{value:f,children:[d&&f.visualElement?v.jsx(d,{visualElement:f.visualElement,...h}):null,Ph(t,a,Vh(y,f.visualElement,c),y,g,e,o)]})}l.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=p.forwardRef(l);return u[Mh]=t,u}function jh({layoutId:t}){const e=p.useContext(_r).id;return e&&t!==void 0?e+"-"+t:t}function Ih(t,e){p.useContext(fa).strict}function Oh(t){const e=pa(),{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 Fh(t,e){if(typeof Proxy>"u")return Wn;const n=new Map,s=(o,r)=>Wn(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,Wn(r,void 0,t,e)),n.get(r))})}const Bh=(t,e)=>e.isSVG??Zs(t)?new bd(e):new fd(e,{allowProjection:t!==p.Fragment});class Nh extends Ft{constructor(e){super(e),e.animationState||(e.animationState=kd(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();xn(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 _h=0;class zh extends Ft{constructor(){super(...arguments),this.id=_h++,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"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=Xt(this.node,o,r);if(l){const{transition:u,transitionEnd:a,...c}=l;for(const d in c)this.node.getValue(d)?.jump(c[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 Wh={animation:{Feature:Nh},exit:{Feature:zh}};function Ie(t){return{point:{x:t.pageX,y:t.pageY}}}const Uh=t=>e=>Gs(e)&&t(e,Ie(e));function Ae(t,e,n,s){return Ve(t,e,Uh(n),s)}const wa=({current:t})=>t?t.ownerDocument.defaultView:null,fr=(t,e)=>Math.abs(t-e);function Gh(t,e){const n=fr(t.x,e.x),s=fr(t.y,e.y);return Math.sqrt(n**2+s**2)}const pr=new Set(["auto","scroll"]);class Ta{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:l}={}){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=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=$e(this.lastRawMoveEventInfo,this.transformPagePoint));const f=Un(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,b=Gh(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!b)return;const{point:w}=f,{timestamp:x}=it;this.history.push({...w,timestamp:x});const{onStart:T,onMove:P}=this.handlers;y||(T&&T(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),P&&P(this.lastMoveEvent,f)},this.handlePointerMove=(f,y)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=$e(y,this.transformPagePoint),z.update(this.updatePoint,!0)},this.handlePointerUp=(f,y)=>{this.end();const{onEnd:b,onSessionEnd:w,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Un(f.type==="pointercancel"?this.lastMoveEventInfo:$e(y,this.transformPagePoint),this.history);this.startEvent&&b&&b(f,T),w&&w(f,T)},!Gs(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const u=Ie(e),a=$e(u,this.transformPagePoint),{point:c}=a,{timestamp:d}=it;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(e,Un(a,this.history));const g={passive:!0,capture:!0};this.removeListeners=De(Ae(this.contextWindow,"pointermove",this.handlePointerMove,g),Ae(this.contextWindow,"pointerup",this.handlePointerUp,g),Ae(this.contextWindow,"pointercancel",this.handlePointerUp,g)),l&&this.startScrollTracking(l)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(pr.has(s.overflowX)||pr.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),z.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 $e(t,e){return e?{point:e(t.point)}:t}function mr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Un({point:t},e){return{point:t,delta:mr(t,Sa(e)),offset:mr(t,$h(e)),velocity:Hh(e,.1)}}function $h(t){return t[0]}function Sa(t){return t[t.length-1]}function Hh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Sa(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ht(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>ht(e)*2&&(s=t[1]);const o=pt(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 qh(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?_(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?_(n,t,s.max):Math.min(t,n)),t}function gr(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 Kh(t,{top:e,left:n,bottom:s,right:i}){return{x:gr(t.x,n,i),y:gr(t.y,e,s)}}function yr(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 Yh(t,e){return{x:yr(t.x,e.x),y:yr(t.y,e.y)}}function Xh(t,e){let n=.5;const s=ct(t),i=ct(e);return i>s?n=Ee(e.min,e.max-s,t.min):s>i&&(n=Ee(t.min,t.max-i,e.min)),At(0,1,n)}function Zh(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 Ts=.35;function Jh(t=Ts){return t===!1?t=0:t===!0&&(t=Ts),{x:vr(t,"left","right"),y:vr(t,"top","bottom")}}function vr(t,e,n){return{min:br(t,e),max:br(t,n)}}function br(t,e){return typeof t=="number"?t:t[e]||0}const Qh=new WeakMap;class tf{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=Z(),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(Ie(d).point),this.stopAnimation()},r=(d,h)=>{const{drag:g,dragPropagation:f,onDragStart:y}=this.getProps();if(g&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Du(g),!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),kt(w=>{let x=this.getAxisMotionValue(w).get()||0;if(Ct.test(x)){const{projection:T}=this.visualElement;if(T&&T.layout){const P=T.layout.layoutBox[w];P&&(x=ct(P)*(parseFloat(x)/100))}}this.originPoint[w]=x}),y&&z.update(()=>y(d,h),!1,!0),hs(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:g,dragDirectionLock:f,onDirectionLock:y,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:w}=h;if(f&&this.currentDirection===null){this.currentDirection=nf(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),b&&z.update(()=>b(d,h),!1,!0)},u=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},a=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ta(e,{onSessionStart:o,onStart:r,onMove:l,onSessionEnd:u,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:wa(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:l}=this.getProps();l&&z.postRender(()=>l(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||!He(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=qh(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&&se(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Kh(s.layoutBox,e):this.constraints=!1,this.elastic=Jh(n),i!==this.constraints&&!se(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&kt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Zh(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!se(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const o=ad(s,i.root,this.visualElement.getTransformPagePoint());let r=Yh(i.layout.layoutBox,o);if(n){const l=n(id(r));this.hasMutatedConstraints=!!l,l&&(r=$o(l))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},a=kt(c=>{if(!He(c,n,this.currentDirection))return;let d=u&&u[c]||{};(r===!0||r===c)&&(d={min:0,max:0});const h=i?200:1e6,g=i?40:1e7,f={type:"inertia",velocity:s?e[c]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,f)});return Promise.all(a).then(l)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return hs(this.visualElement,e),s.start(Ns(e,s,0,n,this.visualElement,!1))}stopAnimation(){kt(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){kt(n=>{const{drag:s}=this.getProps();if(!He(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:l}=i.layout.layoutBox[n],u=o.get()||0;o.set(e[n]-_(r,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!se(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};kt(r=>{const l=this.getAxisMotionValue(r);if(l&&this.constraints!==!1){const u=l.get();i[r]=Xh({min:u,max:u},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(),kt(r=>{if(!He(r,e,null))return;const l=this.getAxisMotionValue(r),{min:u,max:a}=this.constraints[r];l.set(_(u,a,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Qh.set(this.visualElement,this);const e=this.visualElement.current,n=Ae(e,"pointerdown",a=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=a.target,g=h!==e&&Bu(h);c&&d&&!g&&this.start(a)});let s;const i=()=>{const{dragConstraints:a}=this.getProps();se(a)&&a.current&&(this.constraints=this.resolveRefConstraints(),s||(s=ef(e,a.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,r=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),z.read(i);const l=Ve(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",(({delta:a,hasLayoutChanged:c})=>{this.isDragging&&c&&(kt(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=a[d].translate,h.set(h.get()+a[d].translate))}),this.visualElement.render())}));return()=>{l(),n(),r(),u&&u(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ts,dragMomentum:l=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:l}}}function xr(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function ef(t,e,n){const s=Ri(t,xr(n)),i=Ri(e,xr(n));return()=>{s(),i()}}function He(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function nf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class sf extends Ft{constructor(e){super(e),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new tf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}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 Gn=t=>(e,n)=>{t&&z.update(()=>t(e,n),!1,!0)};class rf extends Ft{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(e){this.session=new Ta(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wa(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gn(e),onStart:Gn(n),onMove:Gn(s),onEnd:(o,r)=>{delete this.session,i&&z.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ae(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 $n=!1;class of extends p.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),$n&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rn.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}),$n=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||z.postRender(()=>{const l=r.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Us.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;$n=!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 ka(t){const[e,n]=hh(),s=p.useContext(_r);return v.jsx(of,{...t,layoutGroup:s,switchLayoutGroup:p.useContext(ba),isPresent:e,safeToRemove:n})}const af={pan:{Feature:rf},drag:{Feature:sf,ProjectionNode:da,MeasureLayout:ka}};function wr(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&&z.postRender(()=>o(e,Ie(e)))}class lf extends Ft{mount(){const{current:e}=this.node;e&&(this.unmount=ju(e,(n,s)=>(wr(this.node,s,"Start"),i=>wr(this.node,i,"End"))))}unmount(){}}class cf extends Ft{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=De(Ve(this.node.current,"focus",()=>this.onFocus()),Ve(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Tr(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&&z.postRender(()=>o(e,Ie(e)))}class uf extends Ft{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=_u(e,(i,o)=>(Tr(this.node,o,"Start"),(r,{success:l})=>Tr(this.node,r,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Ss=new WeakMap,Hn=new WeakMap,df=t=>{const e=Ss.get(t.target);e&&e(t)},hf=t=>{t.forEach(df)};function ff({root:t,...e}){const n=t||document;Hn.has(n)||Hn.set(n,{});const s=Hn.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(hf,{root:t,...e})),s[i]}function pf(t,e,n){const s=ff(e);return Ss.set(t,n),s.observe(t),()=>{Ss.delete(t),s.unobserve(t)}}const mf={some:0,all:1};class gf extends Ft{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:mf[i]},l=u=>{const{isIntersecting:a}=u;if(this.isInView===a||(this.isInView=a,o&&!a&&this.hasEnteredView))return;a&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",a);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),h=a?c:d;h&&h(u)};this.stopObserver=pf(this.node.current,r,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(yf(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function yf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const vf={inView:{Feature:gf},tap:{Feature:uf},focus:{Feature:cf},hover:{Feature:lf}},bf={layout:{ProjectionNode:da,MeasureLayout:ka}},xf={...Wh,...vf,...af,...bf},wf=Fh(xf,Bh),Sr=wf;function Tf(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}Tf(`:root{--sileo-spring-easing:linear(
3
+ 0,
4
+ 0.002 0.6%,
5
+ 0.007 1.2%,
6
+ 0.015 1.8%,
7
+ 0.026 2.4%,
8
+ 0.041 3.1%,
9
+ 0.06 3.8%,
10
+ 0.108 5.3%,
11
+ 0.157 6.6%,
12
+ 0.214 8%,
13
+ 0.467 13.7%,
14
+ 0.577 16.3%,
15
+ 0.631 17.7%,
16
+ 0.682 19.1%,
17
+ 0.73 20.5%,
18
+ 0.771 21.8%,
19
+ 0.808 23.1%,
20
+ 0.844 24.5%,
21
+ 0.874 25.8%,
22
+ 0.903 27.2%,
23
+ 0.928 28.6%,
24
+ 0.952 30.1%,
25
+ 0.972 31.6%,
26
+ 0.988 33.1%,
27
+ 1.01 35.7%,
28
+ 1.025 38.5%,
29
+ 1.034 41.6%,
30
+ 1.038 45%,
31
+ 1.035 50.1%,
32
+ 1.012 64.2%,
33
+ 1.003 73%,
34
+ 0.999 83.7%,
35
+ 1
36
+ );--sileo-duration:600ms;--sileo-height:40px;--sileo-width:350px;--sileo-state-success:oklch(0.723 0.219 142.136);--sileo-state-loading:oklch(0.556 0 0);--sileo-state-error:oklch(0.637 0.237 25.331);--sileo-state-warning:oklch(0.795 0.184 86.047);--sileo-state-info:oklch(0.685 0.169 237.323);--sileo-state-action:oklch(0.623 0.214 259.815)}[data-sileo-toast]{position:relative;cursor:pointer;pointer-events:auto;touch-action:none;border:0;background:0 0;padding:0;width:var(--sileo-width);height:var(--_h,var(--sileo-height));opacity:0;transform:translateZ(0) scale(.95);transform-origin:center;contain:layout style;overflow:visible}[data-sileo-toast][data-state=loading]{cursor:default}[data-sileo-toast][data-ready=true]{opacity:1;transform:translateZ(0) scale(1);transition:transform calc(var(--sileo-duration) * .66) var(--sileo-spring-easing),opacity calc(var(--sileo-duration) * .66) var(--sileo-spring-easing),margin-bottom calc(var(--sileo-duration) * .66) var(--sileo-spring-easing),margin-top calc(var(--sileo-duration) * .66) var(--sileo-spring-easing),height var(--sileo-duration) var(--sileo-spring-easing)}[data-sileo-viewport][data-position^=top] [data-sileo-toast]:not([data-ready=true]){transform:translateY(-6px) scale(.95)}[data-sileo-viewport][data-position^=bottom] [data-sileo-toast]:not([data-ready=true]){transform:translateY(6px) scale(.95)}[data-sileo-toast][data-ready=true][data-exiting=true]{opacity:0;pointer-events:none}[data-sileo-viewport][data-position^=top] [data-sileo-toast][data-ready=true][data-exiting=true]{transform:translateY(-6px) scale(.95)}[data-sileo-viewport][data-position^=bottom] [data-sileo-toast][data-ready=true][data-exiting=true]{transform:translateY(6px) scale(.95)}[data-sileo-canvas]{position:absolute;left:0;right:0;pointer-events:none;transform:translateZ(0);contain:layout style;overflow:visible}[data-sileo-canvas][data-edge=top]{bottom:0;transform:scaleY(-1) translateZ(0)}[data-sileo-canvas][data-edge=bottom]{top:0}[data-sileo-svg]{overflow:visible}[data-sileo-header]{position:absolute;z-index:20;display:flex;align-items:center;padding:.5rem;height:var(--sileo-height);overflow:hidden;left:var(--_px,0);transform:var(--_ht);max-width:var(--_pw)}[data-sileo-toast][data-ready=true] [data-sileo-header]{transition:transform var(--sileo-duration) var(--sileo-spring-easing),left var(--sileo-duration) var(--sileo-spring-easing),max-width var(--sileo-duration) var(--sileo-spring-easing)}[data-sileo-header][data-edge=top]{bottom:0}[data-sileo-header][data-edge=bottom]{top:0}[data-sileo-header-stack]{position:relative;display:inline-flex;align-items:center;height:100%}[data-sileo-header-inner]{display:flex;align-items:center;gap:.5rem;white-space:nowrap;opacity:1;filter:blur(0px);transform:translateZ(0)}[data-sileo-header-inner][data-layer=current]{position:relative;z-index:1;animation:sileo-header-enter var(--sileo-duration) var(--sileo-spring-easing) both}[data-sileo-header-inner][data-exiting=true],[data-sileo-header-inner][data-layer=current]:not(:only-child){will-change:opacity,filter}[data-sileo-header-inner][data-layer=prev]{position:absolute;left:0;top:0;z-index:0;pointer-events:none}[data-sileo-header-inner][data-exiting=true]{animation:sileo-header-exit calc(var(--sileo-duration) * .7) ease forwards}[data-sileo-badge]{display:flex;height:24px;width:24px;flex-shrink:0;align-items:center;justify-content:center;padding:2px;box-sizing:border-box;border-radius:9999px;color:var(--sileo-tone,currentColor);background-color:var(--sileo-tone-bg,transparent)}[data-sileo-title]{font-size:.825rem;line-height:1rem;font-weight:500;text-transform:capitalize;color:var(--sileo-tone,currentColor)}:is([data-sileo-badge],[data-sileo-title],[data-sileo-button])[data-state]{--_c:var(--sileo-state-success)}:is(
37
+ [data-sileo-badge],[data-sileo-title],[data-sileo-button]
38
+ )[data-state=loading]{--_c:var(--sileo-state-loading)}:is(
39
+ [data-sileo-badge],[data-sileo-title],[data-sileo-button]
40
+ )[data-state=error]{--_c:var(--sileo-state-error)}:is(
41
+ [data-sileo-badge],[data-sileo-title],[data-sileo-button]
42
+ )[data-state=warning]{--_c:var(--sileo-state-warning)}:is(
43
+ [data-sileo-badge],[data-sileo-title],[data-sileo-button]
44
+ )[data-state=info]{--_c:var(--sileo-state-info)}:is(
45
+ [data-sileo-badge],[data-sileo-title],[data-sileo-button]
46
+ )[data-state=action]{--_c:var(--sileo-state-action)}:is([data-sileo-badge],[data-sileo-title])[data-state]{--sileo-tone:var(--_c);--sileo-tone-bg:color-mix(in oklch, var(--_c) 20%, transparent)}[data-sileo-content]{position:absolute;left:0;z-index:10;width:100%;pointer-events:none;opacity:var(--_co, 0)}[data-sileo-content]:not([data-visible=true]){content-visibility:hidden}[data-sileo-toast][data-ready=true] [data-sileo-content]{transition:opacity calc(var(--sileo-duration) * .08) ease calc(var(--sileo-duration) * .04)}[data-sileo-content][data-edge=top]{top:0}[data-sileo-content][data-edge=bottom]{top:var(--sileo-height)}[data-sileo-content][data-visible=true]{pointer-events:auto}[data-sileo-toast][data-ready=true] [data-sileo-content][data-visible=true]{transition:opacity calc(var(--sileo-duration) * .6) ease calc(var(--sileo-duration) * .3)}[data-sileo-description]{width:100%;text-align:left;padding:1rem;font-size:.875rem;line-height:1.25rem;contain:layout style paint;content-visibility:auto}[data-sileo-button]{display:flex;align-items:center;justify-content:center;height:1.75rem;padding:0 .625rem;margin-top:.75rem;border-radius:9999px;border:0;font-size:.75rem;font-weight:500;cursor:pointer;color:var(--sileo-btn-color,currentColor);background-color:var(--sileo-btn-bg,transparent);transition:background-color 150ms ease}[data-sileo-button]:hover{background-color:var(--sileo-btn-bg-hover,transparent)}[data-sileo-button][data-state]{--sileo-btn-color:var(--_c);--sileo-btn-bg:color-mix(in oklch, var(--_c) 15%, transparent);--sileo-btn-bg-hover:color-mix(in oklch, var(--_c) 25%, transparent)}[data-sileo-icon=spin]{animation:sileo-spin 1s linear infinite}@keyframes sileo-spin{to{transform:rotate(360deg)}}@keyframes sileo-header-enter{from{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0px)}}@keyframes sileo-header-exit{from{opacity:1;filter:blur(0px)}to{opacity:0;filter:blur(6px)}}[data-sileo-viewport]{position:fixed;z-index:50;display:flex;gap:.75rem;padding:.75rem;pointer-events:none;max-width:calc(100vw - 1.5rem);contain:layout style}[data-sileo-viewport][data-position^=top] [data-sileo-toast]:not([data-ready=true]){margin-bottom:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=bottom] [data-sileo-toast]:not([data-ready=true]){margin-top:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=top]{top:0;flex-direction:column-reverse}[data-sileo-viewport][data-position^=bottom]{bottom:0;flex-direction:column}[data-sileo-viewport][data-position$=left]{left:0;align-items:flex-start}[data-sileo-viewport][data-position$=right]{right:0;align-items:flex-end}[data-sileo-viewport][data-position$=center]{left:50%;transform:translateX(-50%);align-items:center}@media (prefers-reduced-motion:no-preference){[data-sileo-toast][data-ready=true]:hover,[data-sileo-toast][data-ready=true][data-exiting=true]{will-change:transform,opacity,height}}@media (prefers-reduced-motion:reduce){[data-sileo-viewport],[data-sileo-viewport] *,[data-sileo-viewport] ::after,[data-sileo-viewport] ::before{animation-duration:0s;animation-iteration-count:1;transition-duration:0s}}[data-sileo-viewport][data-theme=dark] [data-sileo-description]{color:rgba(0,0,0,.5)}[data-sileo-viewport][data-theme=light] [data-sileo-description]{color:rgba(255,255,255,.5)}`);const Tt=40,we=350,Sf=16,Pa=600,kf=Pa/1e3,fe=6e3,Pf=fe*.1,Cf=fe*.025,Af=fe-2e3,qn={type:"spring",bounce:.25,duration:kf},Ef=.5,qe=10,Rf=2.25,Mf=200,Vf=Pa*.7,pe=t=>{let{title:e,children:n}=t,s=kl(t,["title","children"]);return v.jsxs("svg",G({},s,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("title",{children:e}),n]}))},Df=()=>v.jsxs(pe,{title:"Arrow Right",children:[v.jsx("path",{d:"M5 12h14"}),v.jsx("path",{d:"m12 5 7 7-7 7"})]}),Lf=()=>v.jsxs(pe,{title:"Life Buoy",children:[v.jsx("circle",{cx:"12",cy:"12",r:"10"}),v.jsx("path",{d:"m4.93 4.93 4.24 4.24"}),v.jsx("path",{d:"m14.83 9.17 4.24-4.24"}),v.jsx("path",{d:"m14.83 14.83 4.24 4.24"}),v.jsx("path",{d:"m9.17 14.83-4.24 4.24"}),v.jsx("circle",{cx:"12",cy:"12",r:"4"})]}),jf=t=>v.jsx(pe,G({title:"Loader Circle"},t,{children:v.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})),If=()=>v.jsxs(pe,{title:"X",children:[v.jsx("path",{d:"M18 6 6 18"}),v.jsx("path",{d:"m6 6 12 12"})]}),Of=()=>v.jsxs(pe,{title:"Circle Alert",children:[v.jsx("circle",{cx:"12",cy:"12",r:"10"}),v.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),v.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]}),Ff=()=>v.jsx(pe,{title:"Check",children:v.jsx("path",{d:"M20 6 9 17l-5-5"})}),kr={success:v.jsx(Ff,{}),loading:v.jsx(jf,{"data-sileo-icon":"spin","aria-hidden":"true"}),error:v.jsx(If,{}),warning:v.jsx(Of,{}),info:v.jsx(Lf,{}),action:v.jsx(Df,{})},Bf=p.memo(function({filterId:e,blur:n}){return v.jsx("defs",{children:v.jsxs("filter",{id:e,x:"-20%",y:"-20%",width:"140%",height:"140%",colorInterpolationFilters:"sRGB",children:[v.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:n,result:"blur"}),v.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10",result:"goo"}),v.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})}),Nf=p.memo(function({id:e,fill:n="#FFFFFF",state:s="success",title:i=s,description:o,position:r="left",expand:l="bottom",className:u,icon:a,styles:c,button:d,roundness:h,exiting:g=!1,autoExpandDelayMs:f,autoCollapseDelayMs:y,canExpand:b,interruptKey:w,refreshKey:x,onMouseEnter:T,onMouseLeave:P,onDismiss:j}){var B,k,m,M,C,D,U,tt;const H=p.useMemo(()=>({title:i,description:o,state:s,icon:a,styles:c,button:d,fill:n}),[i,o,s,a,c,d,n]),[F,N]=p.useState(H),[bt,W]=p.useState(x),[J,A]=p.useState(!1),[dt,Jt]=p.useState(!1),[Oe,Qt]=p.useState(0),[et,Q]=p.useState(0),at=!!F.description||!!F.button,me=F.state==="loading",I=at&&J&&!me,ge=me?!1:b??(!w||w===e),xt=`${F.state}-${F.title}`,Vt=`sileo-gooey-${e}`,Et=Math.max(0,h??Sf),Nt=Et*Ef,ti=p.useRef(null),ei=p.useRef(null),_t=p.useRef(null),ye=p.useRef(null),ve=p.useRef(null),Dt=p.useRef(null),kn=p.useRef(x),zt=p.useRef(null),[q,ni]=p.useState({current:{key:xt,view:F},prev:null}),Pn=p.useRef(null),Fe=p.useRef(null),be=p.useRef(null),Cn=p.useRef(0),Be=p.useRef(null);p.useLayoutEffect(()=>{const L=Pn.current,K=ti.current;if(!L||!K)return;if(Fe.current===null){const ut=getComputedStyle(K);Fe.current=parseFloat(ut.paddingLeft)+parseFloat(ut.paddingRight)}const nt=Fe.current;(()=>{const ut=L.scrollWidth+nt+qe;ut>qe&&Qt(wt=>wt===ut?wt:ut)})(),be.current||(be.current=new ResizeObserver(()=>{cancelAnimationFrame(Cn.current),Cn.current=requestAnimationFrame(()=>{var ut;const wt=Pn.current,al=(ut=Fe.current)!=null?ut:0;if(!wt)return;const Mn=wt.scrollWidth+al+qe;Mn>qe&&Qt(ai=>ai===Mn?ai:Mn)})})),Be.current!==L&&(Be.current&&be.current.unobserve(Be.current),be.current.observe(L),Be.current=L)},[q.current.key]),p.useEffect(()=>()=>{var L;cancelAnimationFrame(Cn.current),(L=be.current)==null||L.disconnect()},[]),p.useLayoutEffect(()=>{if(!at){Q(0);return}const L=ei.current;if(!L)return;const K=()=>{const ut=L.scrollHeight;Q(wt=>wt===ut?wt:ut)};K();let nt=0;const ft=new ResizeObserver(()=>{cancelAnimationFrame(nt),nt=requestAnimationFrame(K)});return ft.observe(L),()=>{cancelAnimationFrame(nt),ft.disconnect()}},[at]),p.useEffect(()=>{const L=requestAnimationFrame(()=>Jt(!0));return()=>cancelAnimationFrame(L)},[]),p.useLayoutEffect(()=>{ni(L=>L.current.key===xt?L.current.view===F?L:G({},L,{current:{key:xt,view:F}}):{prev:L.current,current:{key:xt,view:F}})},[xt,F]),p.useEffect(()=>{if(q.prev)return _t.current&&clearTimeout(_t.current),_t.current=window.setTimeout(()=>{_t.current=null,ni(L=>G({},L,{prev:null}))},Vf),()=>{_t.current&&(clearTimeout(_t.current),_t.current=null)}},[q.prev]),p.useEffect(()=>{N(L=>L.fill===n?L:G({},L,{fill:n}))},[n]),p.useEffect(()=>{if(x===void 0){N(H),W(void 0),zt.current=null,kn.current=x;return}kn.current!==x&&(kn.current=x,Dt.current&&(clearTimeout(Dt.current),Dt.current=null),I?(zt.current={key:x,payload:H},A(!1),Dt.current=window.setTimeout(()=>{Dt.current=null;const L=zt.current;L&&(N(L.payload),W(L.key),zt.current=null)},Mf)):(zt.current=null,N(H),W(x)))},[I,x,H]),p.useEffect(()=>{if(!at)return;if(ye.current&&clearTimeout(ye.current),ve.current&&clearTimeout(ve.current),g||!ge){A(!1);return}if(f==null&&y==null)return;const L=f??0,K=y??0;return L>0?ye.current=window.setTimeout(()=>A(!0),L):A(!0),K>0&&(ve.current=window.setTimeout(()=>A(!1),K)),()=>{ye.current&&clearTimeout(ye.current),ve.current&&clearTimeout(ve.current)}},[y,f,at,ge,g,bt]);const An=Tt*Rf,En=at?Math.max(An,Tt+et):An,si=p.useRef(En);I&&(si.current=En);const Ne=I?En:si.current,ii=at?Math.max(Ne,An):Tt,ri=Math.max(0,Ne-Tt),te=Math.max(Oe||Tt,Tt),oi=Tt+Nt*3,_e=r==="right"?we-te:r==="center"?(we-te)/2:0,qa=p.useMemo(()=>({x:_e,width:te,height:I?oi:Tt}),[_e,te,I,oi]),Ka=p.useMemo(()=>({height:I?ri:0,opacity:I?1:0}),[I,ri]),Ya=p.useMemo(()=>I?qn:G({},qn,{bounce:0}),[I]),Xa=p.useMemo(()=>dt?qn:{duration:0},[dt]),Za=`0 0 ${we} ${ii}`,Ja=p.useMemo(()=>({filter:`url(#${Vt})`}),[Vt]),Qa=p.useMemo(()=>({"--_h":`${I?Ne:Tt}px`,"--_pw":`${te}px`,"--_px":`${_e}px`,"--_ht":`translateY(${I?l==="bottom"?3:-3:0}px) scale(${I?.9:1})`,"--_co":`${I?1:0}`}),[I,Ne,te,_e,l]),tl=p.useCallback(L=>{T?.(L),at&&A(!0)},[at,T]),el=p.useCallback(L=>{P?.(L),A(!1)},[P]),nl=p.useCallback(L=>{if(L.propertyName!=="height"&&L.propertyName!=="transform"||I)return;const K=zt.current;K&&(Dt.current&&(clearTimeout(Dt.current),Dt.current=null),N(K.payload),W(K.key),zt.current=null)},[I]),sl=30,il=20,ze=p.useRef(null),ee=p.useRef(null),We=p.useRef(j);We.current=j;const Rn=p.useRef(null);if(!Rn.current){const L={onMove:K=>{const nt=ze.current;if(ee.current===null||!nt)return;const ft=K.clientY-ee.current,ut=ft>0?1:-1,wt=Math.min(Math.abs(ft),il)*ut;nt.style.transform=`translateY(${wt}px)`},onUp:K=>{const nt=ze.current;if(ee.current===null||!nt)return;const ft=K.clientY-ee.current;ee.current=null,nt.style.transform="",nt.removeEventListener("pointermove",L.onMove),nt.removeEventListener("pointerup",L.onUp),Math.abs(ft)>sl&&(We.current==null||We.current.call(We))}};Rn.current=L}const rl=p.useCallback(L=>{var K;L.preventDefault(),L.stopPropagation(),(K=F.button)==null||K.onClick()},[F.button]),ol=p.useCallback(L=>{if(g||!j||L.target.closest("[data-sileo-button]"))return;ee.current=L.clientY,L.currentTarget.setPointerCapture(L.pointerId);const nt=ze.current,ft=Rn.current;nt&&ft&&(nt.addEventListener("pointermove",ft.onMove,{passive:!0}),nt.addEventListener("pointerup",ft.onUp,{passive:!0}))},[g,j]);return v.jsxs("button",{ref:ze,type:"button","data-sileo-toast":!0,"data-ready":dt,"data-expanded":I,"data-exiting":g,"data-edge":l,"data-position":r,"data-state":F.state,className:u,style:Qa,onMouseEnter:tl,onMouseLeave:el,onTransitionEnd:nl,onPointerDown:ol,children:[v.jsx("div",{"data-sileo-canvas":!0,"data-edge":l,style:Ja,children:v.jsxs("svg",{"data-sileo-svg":!0,width:we,height:ii,viewBox:Za,children:[v.jsx("title",{children:"Sileo Notification"}),v.jsx(Bf,{filterId:Vt,blur:Nt}),v.jsx(Sr.rect,{"data-sileo-pill":!0,rx:Et,ry:Et,fill:F.fill,initial:!1,animate:qa,transition:Xa}),v.jsx(Sr.rect,{"data-sileo-body":!0,y:Tt,width:we,rx:Et,ry:Et,fill:F.fill,initial:!1,animate:Ka,transition:Ya})]})}),v.jsx("div",{ref:ti,"data-sileo-header":!0,"data-edge":l,children:v.jsxs("div",{"data-sileo-header-stack":!0,children:[v.jsxs("div",{ref:Pn,"data-sileo-header-inner":!0,"data-layer":"current",children:[v.jsx("div",{"data-sileo-badge":!0,"data-state":q.current.view.state,className:(m=q.current.view.styles)==null?void 0:m.badge,children:(B=q.current.view.icon)!=null?B:kr[q.current.view.state]}),v.jsx("span",{"data-sileo-title":!0,"data-state":q.current.view.state,className:(M=q.current.view.styles)==null?void 0:M.title,children:q.current.view.title})]},q.current.key),q.prev&&v.jsxs("div",{"data-sileo-header-inner":!0,"data-layer":"prev","data-exiting":"true",children:[v.jsx("div",{"data-sileo-badge":!0,"data-state":q.prev.view.state,className:(C=q.prev.view.styles)==null?void 0:C.badge,children:(k=q.prev.view.icon)!=null?k:kr[q.prev.view.state]}),v.jsx("span",{"data-sileo-title":!0,"data-state":q.prev.view.state,className:(D=q.prev.view.styles)==null?void 0:D.title,children:q.prev.view.title})]},q.prev.key)]})}),at&&v.jsx("div",{"data-sileo-content":!0,"data-edge":l,"data-visible":I,children:v.jsxs("div",{ref:ei,"data-sileo-description":!0,className:(U=F.styles)==null?void 0:U.description,children:[F.description,F.button&&v.jsx("a",{href:"#",type:"button","data-sileo-button":!0,"data-state":F.state,className:(tt=F.styles)==null?void 0:tt.button,onClick:rl,children:F.button.title})]})})]})}),_f=t=>t.includes("right")?"right":t.includes("center")?"center":"left",zf=t=>t.startsWith("top")?"bottom":"top",rt={toasts:[],listeners:new Set,position:"top-right",options:void 0,emit(){for(const t of this.listeners)t(this.toasts)},update(t){this.toasts=t(this.toasts),this.emit()}};let Wf=0;const Uf=()=>`${++Wf}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,Pr=t=>`${t.id}:${t.instanceId}`,ks=t=>{const e=rt.toasts.find(n=>n.id===t);!e||e.exiting||(rt.update(n=>n.map(s=>s.id===t?G({},s,{exiting:!0}):s)),setTimeout(()=>rt.update(n=>n.filter(s=>s.id!==t)),Pf))},Gf=(t,e)=>{var n,s;if(t.autopilot===!1||!e||e<=0)return{};const i=typeof t.autopilot=="object"?t.autopilot:void 0,o=r=>Math.min(e,Math.max(0,r));return{expandDelayMs:o((n=i?.expand)!=null?n:Cf),collapseDelayMs:o((s=i?.collapse)!=null?s:Af)}},Ca=t=>{var e;return G({},rt.options,t,{styles:G({},(e=rt.options)==null?void 0:e.styles,t.styles)})},Aa=(t,e,n)=>{var s,i,o;const r=(s=t.duration)!=null?s:fe,l=Gf(t,r);return G({},t,{id:e,instanceId:Uf(),position:(i=(o=t.position)!=null?o:n)!=null?i:rt.position,autoExpandDelayMs:l.expandDelayMs,autoCollapseDelayMs:l.collapseDelayMs})},Ut=t=>{var e,n;const s=rt.toasts.filter(u=>!u.exiting),i=Ca(t),o=(e=i.id)!=null?e:"sileo-default",r=s.find(u=>u.id===o),l=Aa(i,o,r?.position);return r?rt.update(u=>u.map(a=>a.id===o?l:a)):rt.update(u=>[...u.filter(a=>a.id!==o),l]),{id:o,duration:(n=i.duration)!=null?n:fe}},Kn=(t,e)=>{const n=rt.toasts.find(i=>i.id===t);if(!n)return;const s=Aa(Ca(e),t,n.position);rt.update(i=>i.map(o=>o.id===t?s:o))},Yn={show:t=>Ut(G({},t,{state:t.type})).id,success:t=>Ut(G({},t,{state:"success"})).id,error:t=>Ut(G({},t,{state:"error"})).id,warning:t=>Ut(G({},t,{state:"warning"})).id,info:t=>Ut(G({},t,{state:"info"})).id,action:t=>Ut(G({},t,{state:"action"})).id,promise:(t,e)=>{const{id:n}=Ut(G({},e.loading,{state:"loading",duration:null,position:e.position})),s=typeof t=="function"?t():t;return s.then(i=>{if(e.action){const o=typeof e.action=="function"?e.action(i):e.action;Kn(n,G({},o,{state:"action",id:n}))}else{const o=typeof e.success=="function"?e.success(i):e.success;Kn(n,G({},o,{state:"success",id:n}))}}).catch(i=>{const o=typeof e.error=="function"?e.error(i):e.error;Kn(n,G({},o,{state:"error",id:n}))}),s},dismiss:ks,clear:t=>rt.update(e=>t?e.filter(n=>n.position!==t):[])},$f={light:"#1a1a1a",dark:"#f2f2f2"};function Hf(t){const[e,n]=p.useState(()=>t==="light"||t==="dark"?t:typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return p.useEffect(()=>{if(t==="light"||t==="dark"){n(t);return}const s=window.matchMedia("(prefers-color-scheme: dark)"),i=o=>n(o.matches?"dark":"light");return n(s.matches?"dark":"light"),s.addEventListener("change",i),()=>s.removeEventListener("change",i)},[t]),e}function qf({children:t,position:e="top-right",offset:n,options:s,theme:i}){const o=Hf(i),[r,l]=p.useState(rt.toasts),[u,a]=p.useState(),c=p.useRef(!1),d=p.useRef(new Map),h=p.useRef(r),g=p.useRef(void 0),f=p.useRef(new Map);p.useEffect(()=>{rt.position=e,rt.options=s},[e,s]);const y=p.useCallback(()=>{for(const k of d.current.values())clearTimeout(k);d.current.clear()},[]),b=p.useCallback(k=>{if(!c.current)for(const M of k){var m;if(M.exiting)continue;const C=Pr(M);if(d.current.has(C)||M.duration===null)continue;const D=(m=M.duration)!=null?m:fe;D<=0||d.current.set(C,window.setTimeout(()=>ks(M.id),D))}},[]);p.useEffect(()=>{const k=m=>l(m);return rt.listeners.add(k),()=>{rt.listeners.delete(k),y()}},[y]),p.useEffect(()=>{h.current=r;const k=new Set(r.map(Pr)),m=new Set(r.map(M=>M.id));for(const[M,C]of d.current)k.has(M)||(clearTimeout(C),d.current.delete(M));for(const M of f.current.keys())m.has(M)||f.current.delete(M);b(r)},[r,b]);const w=p.useRef(null),x=p.useRef(null);w.current=p.useCallback(()=>{c.current||(c.current=!0,y())},[y]),x.current=p.useCallback(()=>{c.current&&(c.current=!1,b(h.current))},[b]);const T=p.useMemo(()=>{for(let k=r.length-1;k>=0;k--)if(!r[k].exiting)return r[k].id},[r]);p.useEffect(()=>{g.current=T,a(T)},[T]);const P=p.useCallback(k=>{let m=f.current.get(k);return m||(m={enter:M=>{a(C=>C===k?C:k),w.current==null||w.current.call(w,M)},leave:M=>{a(C=>C===g.current?C:g.current),x.current==null||x.current.call(x,M)},dismiss:()=>ks(k)},f.current.set(k,m),m)},[]),j=p.useCallback(k=>{if(n===void 0)return;const m=typeof n=="object"?n:{top:n,right:n,bottom:n,left:n},M={},C=D=>typeof D=="number"?`${D}px`:D;return k.startsWith("top")&&m.top&&(M.top=C(m.top)),k.startsWith("bottom")&&m.bottom&&(M.bottom=C(m.bottom)),k.endsWith("left")&&m.left&&(M.left=C(m.left)),k.endsWith("right")&&m.right&&(M.right=C(m.right)),M},[n]),B=p.useMemo(()=>{const k=new Map;for(const M of r){var m;const C=(m=M.position)!=null?m:e,D=k.get(C);D?D.push(M):k.set(C,[M])}return k},[r,e]);return v.jsxs(v.Fragment,{children:[t,Array.from(B,([k,m])=>{const M=_f(k),C=zf(k);return v.jsx("section",{"data-sileo-viewport":!0,"data-position":k,"data-theme":i?o:void 0,"aria-live":"polite",style:j(k),children:m.map(D=>{var U;const tt=P(D.id);return v.jsx(Nf,{id:D.id,state:D.state,title:D.title,description:D.description,position:M,expand:C,icon:D.icon,fill:(U=D.fill)!=null?U:i?$f[o]:void 0,styles:D.styles,button:D.button,roundness:D.roundness,exiting:D.exiting,autoExpandDelayMs:D.autoExpandDelayMs,autoCollapseDelayMs:D.autoCollapseDelayMs,refreshKey:D.instanceId,canExpand:u===void 0||u===D.id,onMouseEnter:tt.enter,onMouseLeave:tt.leave,onDismiss:tt.dismiss},D.id)})},k)})]})}function Kf(){return p.useEffect(()=>{const t=window.visualViewport;if(!t)return;const e=()=>{Math.abs(t.scale-1)>.01||(document.documentElement.style.setProperty("--mobile-viewport-height",`${t.height}px`),document.documentElement.style.setProperty("--mobile-viewport-top",`${t.offsetTop}px`))};return e(),t.addEventListener("resize",e),t.addEventListener("scroll",e),()=>{t.removeEventListener("resize",e),t.removeEventListener("scroll",e)}},[]),null}function Yf(){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 117.9 128","aria-hidden":"true",children:[v.jsx("path",{fill:"currentColor",d:"m113.9 42.6c-3.7-11.3-10.8-21.2-20.1-28.6-7.4-5.7-16.1-10-25.4-11.5-6.5-0.9-9.4-1.1-15.9-0.3-7.4 0.9-14.3 3.4-20.7 7-15.4 9.1-27.6 26.2-29.8 44.5-0.3 2.9-0.4 5.8-0.2 8.7 0.7 15.5 9.7 33.2 27.2 44.1l3.9 2.2c1.5 1.3 2.9 1.8 5.1 1.3 3.5-0.9 5.1-6.1 0.1-8.6-7.3-3.5-13.7-8.7-18.1-14.6-5-7-9-15.8-9.3-26.9-0.2-10 3.5-21.4 11.6-31.3 4.5-5.2 10.5-9.8 16.4-12.7 10.1-4.9 20.5-6.6 31.2-3.8 13.2 3.5 25.6 13.1 32.3 26.5 2.3 4.9 4.2 10.7 4.9 17.4 0.9 9.9-1.4 19.2-6.9 27.4-4.3 6.5-9.2 11-16.1 15.8l-4.1 2.1c-4.4 2.4-3.2 9.4 2.8 9 1.2 0 2.5-0.8 3.6-1.4 3.9-2 7.5-4.3 10.8-7 9.4-8 17.6-20.3 19.1-36.8 0.6-7.4-0.4-15.6-2.4-22.5z"}),v.jsx("path",{fill:"#2266ea",d:"m88.1 42.8c-3.6 0.3-7.4 2.9-9 7.3-5.5 0.8-14.1 3.6-20.3 12-4.3-6.3-11.6-10.7-19.7-12-1.1-3.8-5-7.5-10.2-7.2-4.1 0.4-8.7 3.8-8.7 9.7 0.2 6 5.7 10.3 11.1 9.3 2.8-0.3 5.2-2 6.6-4.3 6.7 1 14.9 4.7 17.3 14.1v36.7c-3.2 1.5-5.5 4.7-5.5 8.4 0 4.8 3.7 9.3 9.4 9.3s9.5-4.5 9.4-9.1c0.1-3.6-2.3-7.3-5.8-8.7v-36.4c1-5.6 5.9-10.9 13.3-13.3l3.9-1c1.8 2.9 4.9 4.6 8.6 4.5 4.6-0.2 9.3-3.6 9.3-9.5 0-5.6-4.9-10-9.7-9.8z"})]})}function Xf({heading:t,detail:e,busy:n=!0}){return v.jsxs("div",{className:"splash",children:[v.jsx(Yf,{}),v.jsxs("div",{className:"splash-copy",children:[v.jsx("strong",{children:t}),v.jsx("span",{role:"status","aria-live":"polite",children:e??""})]}),n?v.jsx("div",{className:"splash-mark","aria-hidden":"true"}):null]})}function Ea(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Ea(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function Ra(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Ea(t))&&(s&&(s+=" "),s+=e);return s}const Cr=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Ar=Ra,Zf=(t,e)=>n=>{var s;if(e?.variants==null)return Ar(t,n?.class,n?.className);const{variants:i,defaultVariants:o}=e,r=Object.keys(i).map(a=>{const c=n?.[a],d=o?.[a];if(c===null)return null;const h=Cr(c)||Cr(d);return i[a][h]}),l=n&&Object.entries(n).reduce((a,c)=>{let[d,h]=c;return h===void 0||(a[d]=h),a},{}),u=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((a,c)=>{let{class:d,className:h,...g}=c;return Object.entries(g).every(f=>{let[y,b]=f;return Array.isArray(b)?b.includes({...o,...l}[y]):{...o,...l}[y]===b})?[...a,d,h]:a},[]);return Ar(t,r,u,n?.class,n?.className)},Jf=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s<t.length;s++)n[s]=t[s];for(let s=0;s<e.length;s++)n[t.length+s]=e[s];return n},Qf=(t,e)=>({classGroupId:t,validator:e}),Ma=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),yn="-",Er=[],tp="arbitrary..",ep=t=>{const e=sp(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return np(r);const l=r.split(yn),u=l[0]===""&&l.length>1?1:0;return Va(l,u,e)},getConflictingClassGroupIds:(r,l)=>{if(l){const u=s[r],a=n[r];return u?a?Jf(a,u):u:a||Er}return n[r]||Er}}},Va=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const a=Va(t,e+1,o);if(a)return a}const r=n.validators;if(r===null)return;const l=e===0?t.join(yn):t.slice(e).join(yn),u=r.length;for(let a=0;a<u;a++){const c=r[a];if(c.validator(l))return c.classGroupId}},np=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?tp+s:void 0})(),sp=t=>{const{theme:e,classGroups:n}=t;return ip(n,e)},ip=(t,e)=>{const n=Ma();for(const s in t){const i=t[s];Js(i,n,s,e)}return n},Js=(t,e,n,s)=>{const i=t.length;for(let o=0;o<i;o++){const r=t[o];rp(r,e,n,s)}},rp=(t,e,n,s)=>{if(typeof t=="string"){op(t,e,n);return}if(typeof t=="function"){ap(t,e,n,s);return}lp(t,e,n,s)},op=(t,e,n)=>{const s=t===""?e:Da(e,t);s.classGroupId=n},ap=(t,e,n,s)=>{if(cp(t)){Js(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(Qf(n,t))},lp=(t,e,n,s)=>{const i=Object.entries(t),o=i.length;for(let r=0;r<o;r++){const[l,u]=i[r];Js(u,Da(e,l),n,s)}},Da=(t,e)=>{let n=t;const s=e.split(yn),i=s.length;for(let o=0;o<i;o++){const r=s[o];let l=n.nextPart.get(r);l||(l=Ma(),n.nextPart.set(r,l)),n=l}return n},cp=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,up=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const i=(o,r)=>{n[o]=r,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(o){let r=n[o];if(r!==void 0)return r;if((r=s[o])!==void 0)return i(o,r),r},set(o,r){o in n?n[o]=r:i(o,r)}}},Ps="!",Rr=":",dp=[],Mr=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),hp=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const o=[];let r=0,l=0,u=0,a;const c=i.length;for(let y=0;y<c;y++){const b=i[y];if(r===0&&l===0){if(b===Rr){o.push(i.slice(u,y)),u=y+1;continue}if(b==="/"){a=y;continue}}b==="["?r++:b==="]"?r--:b==="("?l++:b===")"&&l--}const d=o.length===0?i:i.slice(u);let h=d,g=!1;d.endsWith(Ps)?(h=d.slice(0,-1),g=!0):d.startsWith(Ps)&&(h=d.slice(1),g=!0);const f=a&&a>u?a-u:void 0;return Mr(o,g,h,f)};if(e){const i=e+Rr,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):Mr(dp,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},fp=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let o=0;o<n.length;o++){const r=n[o],l=r[0]==="[",u=e.has(r);l||u?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(r)):i.push(r)}return i.length>0&&(i.sort(),s.push(...i)),s}},pp=t=>({cache:up(t.cacheSize),parseClassName:hp(t),sortModifiers:fp(t),postfixLookupClassGroupIds:mp(t),...ep(t)}),mp=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let s=0;s<n.length;s++)e[n[s]]=!0;return e},gp=/\s+/,yp=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:r}=e,l=[],u=t.trim().split(gp);let a="";for(let c=u.length-1;c>=0;c-=1){const d=u[c],{isExternal:h,modifiers:g,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:b}=n(d);if(h){a=d+(a.length>0?" "+a:a);continue}let w=!!b,x;if(w){const k=y.substring(0,b);x=s(k);const m=x&&r[x]?s(y):void 0;m&&m!==x&&(x=m,w=!1)}else x=s(y);if(!x){if(!w){a=d+(a.length>0?" "+a:a);continue}if(x=s(y),!x){a=d+(a.length>0?" "+a:a);continue}w=!1}const T=g.length===0?"":g.length===1?g[0]:o(g).join(":"),P=f?T+Ps:T,j=P+x;if(l.indexOf(j)>-1)continue;l.push(j);const B=i(x,w);for(let k=0;k<B.length;++k){const m=B[k];l.push(P+m)}a=d+(a.length>0?" "+a:a)}return a},vp=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=La(n))&&(i&&(i+=" "),i+=s);return i},La=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=La(t[s]))&&(n&&(n+=" "),n+=e);return n},bp=(t,...e)=>{let n,s,i,o;const r=u=>{const a=e.reduce((c,d)=>d(c),t());return n=pp(a),s=n.cache.get,i=n.cache.set,o=l,l(u)},l=u=>{const a=s(u);if(a)return a;const c=yp(u,n);return i(u,c),c};return o=r,(...u)=>o(vp(...u))},xp=[],X=t=>{const e=n=>n[t]||xp;return e.isThemeGetter=!0,e},ja=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ia=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wp=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Tp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lt=t=>wp.test(t),O=t=>!!t&&!Number.isNaN(Number(t)),St=t=>!!t&&Number.isInteger(Number(t)),Xn=t=>t.endsWith("%")&&O(t.slice(0,-1)),Rt=t=>Tp.test(t),Oa=()=>!0,Ap=t=>Sp.test(t)&&!kp.test(t),Qs=()=>!1,Ep=t=>Pp.test(t),Rp=t=>Cp.test(t),Mp=t=>!E(t)&&!R(t),Vp=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),Dp=t=>Bt(t,Na,Qs),E=t=>ja.test(t),Gt=t=>Bt(t,_a,Ap),Vr=t=>Bt(t,_p,O),Lp=t=>Bt(t,Wa,Oa),jp=t=>Bt(t,za,Qs),Dr=t=>Bt(t,Fa,Qs),Ip=t=>Bt(t,Ba,Rp),Ke=t=>Bt(t,Ua,Ep),R=t=>Ia.test(t),Te=t=>Zt(t,_a),Op=t=>Zt(t,za),Lr=t=>Zt(t,Fa),Fp=t=>Zt(t,Na),Bp=t=>Zt(t,Ba),Ye=t=>Zt(t,Ua,!0),Np=t=>Zt(t,Wa,!0),Bt=(t,e,n)=>{const s=ja.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Zt=(t,e,n=!1)=>{const s=Ia.exec(t);return s?s[1]?e(s[1]):n:!1},Fa=t=>t==="position"||t==="percentage",Ba=t=>t==="image"||t==="url",Na=t=>t==="length"||t==="size"||t==="bg-size",_a=t=>t==="length",_p=t=>t==="number",za=t=>t==="family-name",Wa=t=>t==="number"||t==="weight",Ua=t=>t==="shadow",zp=()=>{const t=X("color"),e=X("font"),n=X("text"),s=X("font-weight"),i=X("tracking"),o=X("leading"),r=X("breakpoint"),l=X("container"),u=X("spacing"),a=X("radius"),c=X("shadow"),d=X("inset-shadow"),h=X("text-shadow"),g=X("drop-shadow"),f=X("blur"),y=X("perspective"),b=X("aspect"),w=X("ease"),x=X("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...P(),R,E],B=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],m=()=>[R,E,u],M=()=>[Lt,"full","auto",...m()],C=()=>[St,"none","subgrid",R,E],D=()=>["auto",{span:["full",St,R,E]},St,R,E],U=()=>[St,"auto",R,E],tt=()=>["auto","min","max","fr",R,E],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...m()],bt=()=>[Lt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...m()],W=()=>[Lt,"screen","full","dvw","lvw","svw","min","max","fit",...m()],J=()=>[Lt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...m()],A=()=>[t,R,E],dt=()=>[...P(),Lr,Dr,{position:[R,E]}],Jt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Oe=()=>["auto","cover","contain",Fp,Dp,{size:[R,E]}],Qt=()=>[Xn,Te,Gt],et=()=>["","none","full",a,R,E],Q=()=>["",O,Te,Gt],at=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[O,Xn,Lr,Dr],ge=()=>["","none",f,R,E],xt=()=>["none",O,R,E],Vt=()=>["none",O,R,E],Et=()=>[O,R,E],Nt=()=>[Lt,"full",...m()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Rt],breakpoint:[Rt],color:[Oa],container:[Rt],"drop-shadow":[Rt],ease:["in","out","in-out"],font:[Mp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Rt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Rt],shadow:[Rt],spacing:["px",O],text:[Rt],"text-shadow":[Rt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lt,E,R,b]}],container:["container"],"container-type":[{"@container":["","normal","size",R,E]}],"container-named":[Vp],columns:[{columns:[O,E,R,l]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[St,"auto",R,E]}],basis:[{basis:[Lt,"full","auto",l,...m()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[O,Lt,"auto","initial","none",E]}],grow:[{grow:["",O,R,E]}],shrink:[{shrink:["",O,R,E]}],order:[{order:[St,"first","last","none",R,E]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":tt()}],"auto-rows":[{"auto-rows":tt()}],gap:[{gap:m()}],"gap-x":[{"gap-x":m()}],"gap-y":[{"gap-y":m()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:m()}],px:[{px:m()}],py:[{py:m()}],ps:[{ps:m()}],pe:[{pe:m()}],pbs:[{pbs:m()}],pbe:[{pbe:m()}],pt:[{pt:m()}],pr:[{pr:m()}],pb:[{pb:m()}],pl:[{pl:m()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":m()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":m()}],"space-y-reverse":["space-y-reverse"],size:[{size:bt()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...J()]}],"min-block-size":[{"min-block":["auto",...J()]}],"max-block-size":[{"max-block":["none",...J()]}],w:[{w:[l,"screen",...bt()]}],"min-w":[{"min-w":[l,"screen","none",...bt()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[r]},...bt()]}],h:[{h:["screen","lh",...bt()]}],"min-h":[{"min-h":["screen","lh","none",...bt()]}],"max-h":[{"max-h":["screen","lh",...bt()]}],"font-size":[{text:["base",n,Te,Gt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Np,Lp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xn,E]}],"font-family":[{font:[Op,jp,e]}],"font-features":[{"font-features":[E]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,R,E]}],"line-clamp":[{"line-clamp":[O,"none",R,Vr]}],leading:[{leading:[o,...m()]}],"list-image":[{"list-image":["none",R,E]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",R,E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...at(),"wavy"]}],"text-decoration-thickness":[{decoration:[O,"from-font","auto",R,Gt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[O,"auto",R,E]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"tab-size":[{tab:[St,R,E]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R,E]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R,E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:dt()}],"bg-repeat":[{bg:Jt()}],"bg-size":[{bg:Oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},St,R,E],radial:["",R,E],conic:[St,R,E]},Bp,Ip]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Qt()}],"gradient-via-pos":[{via:Qt()}],"gradient-to-pos":[{to:Qt()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:et()}],"rounded-s":[{"rounded-s":et()}],"rounded-e":[{"rounded-e":et()}],"rounded-t":[{"rounded-t":et()}],"rounded-r":[{"rounded-r":et()}],"rounded-b":[{"rounded-b":et()}],"rounded-l":[{"rounded-l":et()}],"rounded-ss":[{"rounded-ss":et()}],"rounded-se":[{"rounded-se":et()}],"rounded-ee":[{"rounded-ee":et()}],"rounded-es":[{"rounded-es":et()}],"rounded-tl":[{"rounded-tl":et()}],"rounded-tr":[{"rounded-tr":et()}],"rounded-br":[{"rounded-br":et()}],"rounded-bl":[{"rounded-bl":et()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...at(),"hidden","none"]}],"divide-style":[{divide:[...at(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...at(),"none","hidden"]}],"outline-offset":[{"outline-offset":[O,R,E]}],"outline-w":[{outline:["",O,Te,Gt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",c,Ye,Ke]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,Ye,Ke]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[O,Gt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Ye,Ke]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[O,R,E]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[O]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[R,E]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[O]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:dt()}],"mask-repeat":[{mask:Jt()}],"mask-size":[{mask:Oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",R,E]}],filter:[{filter:["","none",R,E]}],blur:[{blur:ge()}],brightness:[{brightness:[O,R,E]}],contrast:[{contrast:[O,R,E]}],"drop-shadow":[{"drop-shadow":["","none",g,Ye,Ke]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",O,R,E]}],"hue-rotate":[{"hue-rotate":[O,R,E]}],invert:[{invert:["",O,R,E]}],saturate:[{saturate:[O,R,E]}],sepia:[{sepia:["",O,R,E]}],"backdrop-filter":[{"backdrop-filter":["","none",R,E]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[O,R,E]}],"backdrop-contrast":[{"backdrop-contrast":[O,R,E]}],"backdrop-grayscale":[{"backdrop-grayscale":["",O,R,E]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[O,R,E]}],"backdrop-invert":[{"backdrop-invert":["",O,R,E]}],"backdrop-opacity":[{"backdrop-opacity":[O,R,E]}],"backdrop-saturate":[{"backdrop-saturate":[O,R,E]}],"backdrop-sepia":[{"backdrop-sepia":["",O,R,E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":m()}],"border-spacing-x":[{"border-spacing-x":m()}],"border-spacing-y":[{"border-spacing-y":m()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",R,E]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[O,"initial",R,E]}],ease:[{ease:["linear","initial",w,R,E]}],delay:[{delay:[O,R,E]}],animate:[{animate:["none",x,R,E]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,R,E]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:xt()}],"rotate-x":[{"rotate-x":xt()}],"rotate-y":[{"rotate-y":xt()}],"rotate-z":[{"rotate-z":xt()}],scale:[{scale:Vt()}],"scale-x":[{"scale-x":Vt()}],"scale-y":[{"scale-y":Vt()}],"scale-z":[{"scale-z":Vt()}],"scale-3d":["scale-3d"],skew:[{skew:Et()}],"skew-x":[{"skew-x":Et()}],"skew-y":[{"skew-y":Et()}],transform:[{transform:[R,E,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Nt()}],"translate-x":[{"translate-x":Nt()}],"translate-y":[{"translate-y":Nt()}],"translate-z":[{"translate-z":Nt()}],"translate-none":["translate-none"],zoom:[{zoom:[St,R,E]}],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R,E]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mbs":[{"scroll-mbs":m()}],"scroll-mbe":[{"scroll-mbe":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pbs":[{"scroll-pbs":m()}],"scroll-pbe":[{"scroll-pbe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R,E]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[O,Te,Gt,Vr]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Wp=bp(zp);function Ga(...t){return Wp(Ra(t))}const Up=Zf("group/button inline-flex cursor-pointer shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-semibold whitespace-nowrap transition-[background-color,border-color,color,box-shadow,opacity,transform] duration-150 outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/25 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-45 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm shadow-primary/15 hover:bg-primary/90 hover:shadow-md hover:shadow-primary/20",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",xs:"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",lg:"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Gp({className:t,variant:e="default",size:n="default",...s}){return v.jsx(dl,{"data-slot":"button","data-size":n,className:Ga(Up({variant:e,size:n,className:t})),...s})}var $p={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const Hp=(t,e,n,s)=>{const i=p.forwardRef(({color:o="currentColor",size:r=24,stroke:l=2,title:u,className:a,children:c,...d},h)=>p.createElement("svg",{ref:h,...$p[t],width:r,height:r,className:["tabler-icon",`tabler-icon-${e}`,a].join(" "),...t==="filled"?{fill:o}:{strokeWidth:l,stroke:o},...d},[u&&p.createElement("title",{key:"svg-title"},u),...s.map(([g,f])=>p.createElement(g,f)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};const qp=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],Kp=Hp("outline","copy","Copy",qp),Yp=new Set(["https:","http:","mailto:"]);function Xp(t){const e=t.startsWith("//")?`https:${t}`:t;let n;try{n=new URL(e)}catch{return null}return Yp.has(n.protocol)?n.toString():null}let ae=null;async function jm(){if(!navigator.clipboard?.readText)throw new Error("Text clipboard access is unavailable.");return navigator.clipboard.readText()}async function Zp(t){if(!navigator.clipboard?.writeText)throw new Error("Text clipboard access is unavailable.");await navigator.clipboard.writeText(t),ae=null}async function Im(t,e){if(!navigator.clipboard?.writeText)throw new Error("Text clipboard access is unavailable.");await navigator.clipboard.writeText(t.join(`\r
47
+ `)),ae=e?{paths:[...t],transferId:e}:null}function Om(t){return!ae||!Jp(ae.paths,t)?(ae=null,null):ae.transferId}function Fm(t){const e=Xp(t);if(!e)throw new Error("Only web or mail links can be opened.");window.open(e,"_blank","noopener,noreferrer")}function Jp(t,e){return t.length===e.length&&t.every((n,s)=>n===e[s])}const Qp=600;function Bm({delay:t=Qp,...e}){return v.jsx(hl,{"data-slot":"tooltip-provider",delay:t,...e})}function tm({...t}){return v.jsx(fl,{"data-slot":"tooltip",...t})}function em({...t}){return v.jsx(pl,{"data-slot":"tooltip-trigger",...t})}function nm({className:t,side:e="top",sideOffset:n=4,align:s="center",alignOffset:i=0,anchor:o,children:r,...l}){return v.jsx(ml,{children:v.jsx(gl,{align:s,alignOffset:i,anchor:o,side:e,sideOffset:n,className:"isolate z-50",children:v.jsxs(yl,{"data-slot":"tooltip-content",className:Ga("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-xl bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-lg data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[r,v.jsx(vl,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:translate-x-[1.5px] data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:translate-x-[-1.5px] data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:translate-x-[-1.5px] data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:translate-x-[1.5px] data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}function sm({value:t,label:e="Copy",onCopied:n,onError:s}){const[i,o]=p.useState(!1);p.useEffect(()=>{if(!i)return;const l=window.setTimeout(()=>o(!1),2e3);return()=>window.clearTimeout(l)},[i]);const r=async()=>{try{await Zp(t),o(!0),n?.()}catch{o(!1),s?.()}};return v.jsxs(v.Fragment,{children:[v.jsxs(tm,{children:[v.jsxs(em,{render:v.jsx("button",{type:"button",className:"copy-button","aria-label":i?"Copied":e,"data-copy-state":i?"copied":void 0,onClick:()=>{r()}}),children:[v.jsx(Kp,{className:"copy-button-icon","aria-hidden":"true"}),v.jsx("span",{className:"copy-button-check","aria-hidden":"true",children:"✓"})]}),v.jsx(nm,{children:i?"Copied":e})]}),v.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:i?"Copied":""})]})}const $a=document.documentElement.dataset.opentigProfile==="dev",Nm=$a?"OpenTig Dev":"OpenTig";function im(){const t=$a?"npm run pair:web:dev":"opentig pair",[e,n]=p.useState(!1);return v.jsxs("div",{className:"mt-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("code",{className:"min-w-0 select-text break-words text-sm",children:t}),v.jsx(sm,{value:t,label:"Copy command",onCopied:()=>n(!1),onError:()=>n(!0)})]}),e&&v.jsx("p",{className:"mt-2 text-sm text-destructive",role:"alert",children:"Could not copy. Select and copy the command manually."})]})}const rm=3600*1e3,om=60*1e3,am=10*1e3;function lm({request:t=fetch,page:e=document,lifecycle:n=window}={}){let s=!1,i=null,o,r;const l=()=>{s||(o=setTimeout(()=>{u()},om))},u=async()=>{if(s||i||e.visibilityState!=="visible")return;clearTimeout(o);const d=new AbortController;i=d,r=setTimeout(()=>d.abort(),am);try{const h=await t("/api/auth/renew",{method:"POST",credentials:"include",cache:"no-store",signal:d.signal});!h.ok&&h.status!==401&&h.status!==403&&l()}catch{l()}finally{clearTimeout(r),i=null}},a=()=>{u()},c=setInterval(a,rm);return e.addEventListener("visibilitychange",a),n.addEventListener("focus",a),n.addEventListener("online",a),a(),()=>{s=!0,clearInterval(c),clearTimeout(o),clearTimeout(r),i?.abort(),e.removeEventListener("visibilitychange",a),n.removeEventListener("focus",a),n.removeEventListener("online",a)}}const S={bootstrap:"app:bootstrap",capabilities:"app:capabilities",preferences:"app:preferences",filesTreeStateUpdate:"app:files-tree-state",openFilesStateUpdate:"app:open-files-state",projectCreate:"projects:create",projectRename:"projects:rename",projectRemove:"projects:remove",projectAssign:"projects:assign",repositoryOpenPath:"repository:open-path",repositoryBrowseDirectories:"repository:browse-directories",repositoryOpenRecent:"repository:open-recent",repositoryRelocateRecent:"repository:relocate-recent",repositoryForget:"repository:forget",repositoryStatus:"repository:status",repositoryFiles:"repository:files",repositoryDirectoryEntries:"repository:directory-entries",repositoryReadFile:"repository:read-file",repositoryGetFavicon:"repository:favicon",repositoryWriteFile:"repository:write-file",repositoryAbsolutePath:"repository:absolute-path",repositoryCopyEntries:"repository:copy-entries",repositoryCutEntries:"repository:cut-entries",repositoryPasteEntries:"repository:paste-entries",repositoryMoveEntry:"repository:move-entry",repositoryDeleteEntry:"repository:delete-entry",repositoryMoveEntries:"repository:move-entries",repositoryDeleteEntries:"repository:delete-entries",repositoryRenameEntry:"repository:rename-entry",repositoryCreateEntry:"repository:create-entry",repositoryFileHistoryState:"repository:file-history-state",repositoryUndoFileOperation:"repository:undo-file-operation",repositoryRedoFileOperation:"repository:redo-file-operation",repositorySearch:"repository:search",repositoryReplaceSearch:"repository:replace-search",diffGet:"diff:get",diffCommit:"diff:commit",diffCommitFile:"diff:commit-file",indexStage:"index:stage",indexUnstage:"index:unstage",indexDiscard:"index:discard",indexStageAll:"index:stage-all",indexUnstageAll:"index:unstage-all",indexPrepareCommitGroup:"index:prepare-commit-group",indexUpdateConflict:"index:update-conflict",indexResolveConflict:"index:resolve-conflict",commitCreate:"commit:create",commitUndoLatest:"commit:undo-latest",commitsList:"commits:list",commitsFiles:"commits:files",branchesList:"refs:branches",branchSwitch:"refs:switch",worktreesList:"refs:worktrees",worktreeSelect:"refs:select-worktree",refsPull:"refs:pull",refsPush:"refs:push",refsFetch:"refs:fetch",localRefsSnapshot:"refs:local-snapshot",branchDetails:"refs:branch-details",worktreeDetails:"refs:worktree-details",branchDelete:"refs:delete-branch",worktreeRemove:"refs:remove-worktree",aiStatuses:"ai:statuses",aiGenerateCommitMessage:"ai:generate-commit-message",aiCancelGeneration:"ai:cancel-generation",aiLog:"ai:log",aiClearLog:"ai:clear-log",diagnosticsList:"diagnostics:list",diagnosticsClear:"diagnostics:clear",diagnosticsRecord:"diagnostics:record",githubStatus:"github:status",githubRepositoryInfo:"github:repository-info",githubPrForBranch:"github:pr-for-branch",githubPrList:"github:pr-list",githubPrView:"github:pr-view",githubPrDiff:"github:pr-diff",githubPrCommitDiff:"github:pr-commit-diff",githubPrCreate:"github:pr-create",githubPrDraft:"github:pr-draft",githubPrDraftCancel:"github:pr-draft-cancel"},cm=9*6e4,um=cm+3e4,jr=um+3e4,dm=1,hm={protocolVersion:dm},fm=hm.protocolVersion,Zn=1;class Sn extends Error{}class ne extends Sn{}class Ir extends Sn{}class Jn extends Sn{}class Or extends Sn{}class pm{url;createSocket;requestTimeoutMs;heartbeatMs;reconnectBaseMs;reconnectMaxMs;offlineAfterAttempts;random;pending=new Map;connectionWaiters=new Set;stateListeners=new Set;eventListeners=new Set;reconnectListeners=new Set;socket=null;state="connecting";requestSequence=0;socketGeneration=0;reconnectAttempts=0;reconnectTimer=null;heartbeatTimer=null;awaitingPong=!1;started=!1;stopped=!1;connectedBefore=!1;constructor(e={}){this.url=e.url??gm(),this.createSocket=e.createSocket??(n=>new WebSocket(n)),this.requestTimeoutMs=e.requestTimeoutMs??3e4,this.heartbeatMs=e.heartbeatMs??2e4,this.reconnectBaseMs=e.reconnectBaseMs??250,this.reconnectMaxMs=e.reconnectMaxMs??5e3,this.offlineAfterAttempts=e.offlineAfterAttempts??5,this.random=e.random??Math.random}getState=()=>this.state;subscribeState=e=>(this.stateListeners.add(e),this.start(),()=>this.stateListeners.delete(e));onEvent(e){return this.eventListeners.add(e),this.start(),()=>this.eventListeners.delete(e)}onReconnect(e){return this.reconnectListeners.add(e),()=>this.reconnectListeners.delete(e)}async request(e,n,s={}){const i=s.timeoutMs??this.requestTimeoutMs,o=Date.now();if(this.start(),await this.waitForConnection(i,s.signal),s.signal?.aborted)throw Xe();const r=this.socket;if(!r||r.readyState!==Zn)throw new ne("OpenTig server disconnected.");const l=`${Date.now().toString(36)}-${(++this.requestSequence).toString(36)}`,u=Math.max(1,i-(Date.now()-o));return new Promise((a,c)=>{const d={resolve:a,reject:c,timer:setTimeout(()=>{this.finishPending(l),c(new Or(`Server request timed out: ${String(e)}`))},u),...s.signal?{signal:s.signal}:{}};s.signal&&(d.abort=()=>{this.finishPending(l),c(Xe())},s.signal.addEventListener("abort",d.abort,{once:!0})),this.pending.set(l,d);try{const h=[...n];for(;h.length>0&&h.at(-1)===void 0;)h.pop();r.send(JSON.stringify({type:"request",id:l,command:e,args:h}))}catch{this.finishPending(l),c(new ne("Could not send request to the OpenTig server."))}})}markIncompatible(){this.stopped=!0,this.clearReconnect(),this.setState("incompatible-version"),this.rejectConnectionWaiters(new Jn("OpenTig server protocol is incompatible.")),this.rejectPending(new Jn("OpenTig server protocol is incompatible.")),this.socket?.close(1e3,"Incompatible protocol")}close(){this.stopped=!0,this.clearReconnect(),this.clearHeartbeat(),this.rejectConnectionWaiters(new ne("OpenTig server connection closed.")),this.rejectPending(new ne("OpenTig server connection closed.")),this.socket?.close(1e3,"Client closing"),this.socket=null}start(){this.started||this.stopped||(this.started=!0,this.connect())}connect(){if(this.stopped)return;this.clearReconnect();const e=++this.socketGeneration;let n;try{n=this.createSocket(this.url)}catch{this.disconnected(e,0);return}this.socket=n,n.onopen=()=>{if(e!==this.socketGeneration||this.stopped)return;const s=this.connectedBefore;if(this.connectedBefore=!0,this.reconnectAttempts=0,this.setState("connected"),this.resolveConnectionWaiters(),this.startHeartbeat(),s)for(const i of this.reconnectListeners)Promise.resolve(i()).catch(()=>{})},n.onmessage=s=>this.message(e,s.data),n.onerror=()=>{},n.onclose=s=>this.disconnected(e,s.code)}message(e,n){if(e!==this.socketGeneration||typeof n!="string")return;let s;try{s=JSON.parse(n)}catch{return}if(s.type==="pong"){this.awaitingPong=!1;return}if(s.type==="event"){for(const o of this.eventListeners)o(s.event);return}if(s.type!=="result")return;const i=this.pending.get(s.id);i&&(this.finishPending(s.id),mm(i,s.result))}disconnected(e,n){if(e!==this.socketGeneration||(this.socket=null,this.clearHeartbeat(),this.rejectPending(new ne("OpenTig server disconnected before the request completed.")),this.stopped))return;if(n===1008){this.stopped=!0,this.setState("auth-required"),this.rejectConnectionWaiters(new Ir("Authentication required."));return}this.reconnectAttempts+=1,this.setState(this.reconnectAttempts>=this.offlineAfterAttempts?"offline":"reconnecting");const s=Math.min(this.reconnectMaxMs,this.reconnectBaseMs*2**(this.reconnectAttempts-1)),i=Math.max(0,Math.round(s*(.5+this.random())));this.reconnectTimer=setTimeout(()=>this.connect(),i)}waitForConnection(e,n){return this.state==="connected"&&this.socket?.readyState===Zn?Promise.resolve():this.state==="auth-required"?Promise.reject(new Ir("Authentication required.")):this.state==="incompatible-version"?Promise.reject(new Jn("OpenTig server protocol is incompatible.")):this.stopped?Promise.reject(new ne("OpenTig server connection is closed.")):n?.aborted?Promise.reject(Xe()):new Promise((s,i)=>{const o={resolve:s,reject:i,timer:setTimeout(()=>{this.removeConnectionWaiter(o),i(new Or("Timed out waiting for the OpenTig server."))},e),...n?{signal:n}:{}};n&&(o.abort=()=>{this.removeConnectionWaiter(o),i(Xe())},n.addEventListener("abort",o.abort,{once:!0})),this.connectionWaiters.add(o)})}resolveConnectionWaiters(){for(const e of[...this.connectionWaiters])this.removeConnectionWaiter(e),e.resolve()}rejectConnectionWaiters(e){for(const n of[...this.connectionWaiters])this.removeConnectionWaiter(n),n.reject(e)}removeConnectionWaiter(e){clearTimeout(e.timer),e.signal&&e.abort&&e.signal.removeEventListener("abort",e.abort),this.connectionWaiters.delete(e)}finishPending(e){const n=this.pending.get(e);n&&(clearTimeout(n.timer),n.signal&&n.abort&&n.signal.removeEventListener("abort",n.abort),this.pending.delete(e))}rejectPending(e){for(const[n,s]of[...this.pending])this.finishPending(n),s.reject(e)}startHeartbeat(){this.clearHeartbeat(),this.heartbeatTimer=setInterval(()=>{const e=this.socket;if(!(!e||e.readyState!==Zn)){if(this.awaitingPong){e.close(4e3,"Heartbeat timeout");return}this.awaitingPong=!0,e.send(JSON.stringify({type:"ping"}))}},this.heartbeatMs)}clearHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=null,this.awaitingPong=!1}clearReconnect(){this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null}setState(e){if(this.state!==e){this.state=e;for(const n of this.stateListeners)n()}}}function mm(t,e){if(e.ok){t.resolve(e.value);return}const n=new Error(e.error.message);n.detail=e.error,t.reject(n)}function gm(){const t=new URL("/ws",window.location.href);return t.protocol=t.protocol==="https:"?"wss:":"ws:",t.href}function Xe(){return new DOMException("The request was cancelled.","AbortError")}function ym(t={}){const e=t.transport??new pm,n=t.httpOrigin??globalThis.location?.origin??"http://127.0.0.1",s=t.fetch??fetch,i=new Set,o=new Set,r=(a,...c)=>e.request(a,c),u={app:{bootstrap:async()=>{const a=await e.request(S.bootstrap,[]);if(!a.server||a.server.protocolVersion!==fm)throw e.markIncompatible(),new Error("This OpenTig client is incompatible with the server.");return a},capabilities:()=>r(S.capabilities),setPreferences:a=>r(S.preferences,a),setFilesTreeExpandedPaths:(a,c)=>r(S.filesTreeStateUpdate,a,c),setOpenFilesState:(a,c,d,h)=>r(S.openFilesStateUpdate,a,c,d,h)},projects:{create:a=>r(S.projectCreate,a),rename:(a,c)=>r(S.projectRename,a,c),remove:a=>r(S.projectRemove,a),assign:(a,c)=>r(S.projectAssign,a,c)},repository:{openPath:a=>r(S.repositoryOpenPath,a),browseDirectories:a=>a===void 0?r(S.repositoryBrowseDirectories):r(S.repositoryBrowseDirectories,a),openRecent:a=>r(S.repositoryOpenRecent,a),forget:a=>r(S.repositoryForget,a),relocateRecent:(a,c)=>r(S.repositoryRelocateRecent,a,c),getStatus:(a,c)=>r(S.repositoryStatus,a,c),getFiles:a=>r(S.repositoryFiles,a),getDirectoryEntries:(a,c)=>r(S.repositoryDirectoryEntries,a,c),readFile:(a,c,d)=>r(S.repositoryReadFile,a,c,d),readImage:(a,c)=>bm(s,n,a,c),getFavicon:a=>r(S.repositoryGetFavicon,a),writeFile:(a,c,d,h)=>r(S.repositoryWriteFile,a,c,d,h),getAbsolutePath:(a,c)=>r(S.repositoryAbsolutePath,a,c),copyEntries:(a,c)=>r(S.repositoryCopyEntries,a,c),cutEntries:(a,c)=>r(S.repositoryCutEntries,a,c),pasteEntries:(a,c,d,h,g)=>r(S.repositoryPasteEntries,a,c,d,h,g),moveEntry:(a,c,d)=>r(S.repositoryMoveEntry,a,c,d),moveEntries:(a,c,d)=>r(S.repositoryMoveEntries,a,c,d),deleteEntry:(a,c)=>r(S.repositoryDeleteEntry,a,c),deleteEntries:(a,c)=>r(S.repositoryDeleteEntries,a,c),renameEntry:(a,c,d)=>r(S.repositoryRenameEntry,a,c,d),createEntry:(a,c,d,h)=>r(S.repositoryCreateEntry,a,c,d,h),search:(a,c)=>r(S.repositorySearch,a,c),replaceSearch:(a,c)=>r(S.repositoryReplaceSearch,a,c),fileHistoryState:a=>r(S.repositoryFileHistoryState,a),undoFileOperation:a=>r(S.repositoryUndoFileOperation,a),redoFileOperation:a=>r(S.repositoryRedoFileOperation,a)},diff:{get:a=>r(S.diffGet,a),getCommit:(a,c)=>r(S.diffCommit,a,c),getCommitFile:(a,c,d,h)=>r(S.diffCommitFile,a,c,d,h)},index:{stage:(a,c)=>r(S.indexStage,a,c),unstage:(a,c)=>r(S.indexUnstage,a,c),discard:(a,c)=>r(S.indexDiscard,a,c),stageAll:a=>r(S.indexStageAll,a),unstageAll:a=>r(S.indexUnstageAll,a),prepareCommitGroup:a=>r(S.indexPrepareCommitGroup,a),updateConflict:(a,c,d)=>r(S.indexUpdateConflict,a,c,d),resolveConflict:(a,c,d)=>r(S.indexResolveConflict,a,c,d)},commits:{create:(a,c)=>r(S.commitCreate,a,c),undoLatest:(a,c)=>r(S.commitUndoLatest,a,c),list:(a,c)=>r(S.commitsList,a,c),files:(a,c)=>r(S.commitsFiles,a,c)},refs:{listBranches:a=>r(S.branchesList,a),switchBranch:(a,c,d)=>r(S.branchSwitch,a,c,d),listWorktrees:a=>r(S.worktreesList,a),selectWorktree:(a,c)=>r(S.worktreeSelect,a,c),pull:a=>r(S.refsPull,a),push:(a,c)=>r(S.refsPush,a,c),fetch:a=>r(S.refsFetch,a),localRefsSnapshot:a=>r(S.localRefsSnapshot,a),branchDetails:a=>r(S.branchDetails,a),worktreeDetails:a=>r(S.worktreeDetails,a),deleteBranch:a=>r(S.branchDelete,a),removeWorktree:a=>r(S.worktreeRemove,a)},ai:{statuses:a=>r(S.aiStatuses,a),generateCommitMessage:a=>e.request(S.aiGenerateCommitMessage,[a],{timeoutMs:jr}),cancelGeneration:a=>r(S.aiCancelGeneration,a),log:()=>r(S.aiLog),clearLog:()=>r(S.aiClearLog)},github:{status:a=>r(S.githubStatus,a),repositoryInfo:a=>r(S.githubRepositoryInfo,a),findPullRequestForBranch:(a,c)=>r(S.githubPrForBranch,a,c),listPullRequests:(a,c)=>r(S.githubPrList,a,c),getPullRequest:(a,c)=>r(S.githubPrView,a,c),getPullRequestDiff:(a,c)=>r(S.githubPrDiff,a,c),getPullRequestCommitDiff:(a,c)=>r(S.githubPrCommitDiff,a,c),createPullRequest:a=>r(S.githubPrCreate,a),generateDraft:a=>e.request(S.githubPrDraft,[a],{timeoutMs:jr}),cancelDraft:a=>r(S.githubPrDraftCancel,a)},diagnostics:{list:()=>r(S.diagnosticsList),clear:()=>r(S.diagnosticsClear),record:a=>r(S.diagnosticsRecord,a)},events:{onRepositoryChanged:a=>Fr(i,a),onActiveRepositoryChanged:a=>Fr(o,a)}};return e.onEvent(a=>vm(a,i,o)),e.onReconnect(async()=>{const a=await u.app.bootstrap();if(a.activeRepository){for(const c of o)c(a.activeRepository);for(const c of i)c(a.activeRepository.id,"unknown")}}),{api:u,transport:e}}function Fr(t,e){return t.add(e),()=>t.delete(e)}function vm(t,e,n){if(t.type==="repository.changed")for(const s of e)s(t.repositoryId,t.scope);else for(const s of n)s(t.repository)}async function bm(t,e,n,s){const i=s.split("/").map(encodeURIComponent).join("/"),o=new URL(`/api/image/${encodeURIComponent(n)}/${i}`,e),r=await t(o,{credentials:"include"});if(r.status===413||r.status===415)return r.json();if(!r.ok)throw new Error(r.status===401?"Authentication required.":"Could not load image preview.");const l=r.headers.get("content-type");if(!l?.startsWith("image/"))throw new Error("Server returned an invalid image preview.");const u=new Uint8Array(await r.arrayBuffer());return{status:"ready",path:s,mimeType:l,data:u,size:Number(r.headers.get("content-length")??u.byteLength),mtimeMs:Number(r.headers.get("x-opentig-mtime-ms")??0)}}const on=ym(),st=window.opentigDesktop,$t=on.api,_m={...$t,app:{...$t.app,bootstrap:async()=>{const t=await $t.app.bootstrap();return await st?.app.preferencesChanged(t.preferences),t},capabilities:async()=>{const t=await $t.app.capabilities();return{...t,runtimeMode:st?"desktop":t.runtimeMode,nativePicker:!!st,fileClipboard:!!st,revealInFileManager:!!st}},setPreferences:async t=>{const e=await $t.app.setPreferences(t);return await st?.app.preferencesChanged(e),e},setZoomFactor:t=>{st?st.app.setZoomFactor(t):document.documentElement.style.zoom=String(Math.max(.8,Math.min(1.3,Number(t)||1)))},setTitleBarTheme:t=>st?.app.setTitleBarTheme(t)??Promise.resolve()},clipboard:{readFilePaths:()=>st?.clipboard.readFilePaths()??Promise.resolve([]),readImagePng:()=>st?.clipboard.readImagePng()??Promise.resolve(null)},repository:{...$t.repository,select:async t=>st?st.repository.select(t):window.prompt(t??"Repository path on the OpenTig server")?.trim()||null,selectRelocation:async(t,e)=>st?st.repository.selectRelocation(t,e):window.prompt(`New server path for ${t}`,e)?.trim()||null,revealEntry:async(t,e)=>{if(!st)throw new Error("Reveal in file manager is available only in the desktop app.");const n=await $t.repository.getAbsolutePath(t,e);await st.repository.revealEntry(n)}}},xm={connecting:"Connecting to OpenTig server…",connected:"Server connected",reconnecting:"Reconnecting to OpenTig server…","auth-required":"Authentication required","incompatible-version":"Client and server versions are incompatible",offline:"OpenTig server is offline"};let wm=0;function Tm({children:t}){const e=p.useSyncExternalStore(on.transport.subscribeState,on.transport.getState,on.transport.getState),[n,s]=p.useState(!1),i=p.useRef(null);if(p.useEffect(()=>{if(e==="connected"&&!window.opentigDesktop)return lm()},[e]),p.useEffect(()=>{if(n&&e!=="connected"&&e!=="auth-required"){const o={id:i.current??`server-connection:${++wm}`,title:xm[e],type:e==="connecting"||e==="reconnecting"?"warning":"error",position:"bottom-right",duration:null,autopilot:!1};i.current=Yn.show(o)}else i.current&&(Yn.dismiss(i.current),i.current=null)},[n,e]),p.useEffect(()=>()=>{i.current&&Yn.dismiss(i.current),i.current=null},[]),p.useEffect(()=>(e==="connected"&&s(!0),document.documentElement.dataset.serverConnection=e,()=>{delete document.documentElement.dataset.serverConnection}),[e]),e==="auth-required"){const o=!!window.opentigDesktop;return v.jsx("main",{className:"access-page flex min-h-dvh items-center justify-center bg-background px-4 py-6 text-foreground",children:v.jsxs("section",{className:"w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-sm",role:"status",children:[v.jsx("h1",{className:"text-lg font-semibold",children:"Authentication required"}),v.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:o?"Restart OpenTig to restore its private desktop session.":v.jsx(v.Fragment,{children:"Generate a pairing code with the command below on the server, or from Settings → Network access in the desktop app."})}),!o&&v.jsxs(v.Fragment,{children:[v.jsx(im,{}),v.jsx(Gp,{className:"mt-5",nativeButton:!1,render:v.jsx("a",{href:"/pair"}),children:"Pair this browser"})]})]})})}return!n&&(e==="offline"||e==="incompatible-version")?v.jsx(Xf,{heading:e==="offline"?"OpenTig server is offline":"OpenTig cannot continue",detail:e==="offline"?"See the server log for details, then restart OpenTig.":"Client and server versions are incompatible.",busy:!1}):t}function Sm(t,e){return t===e?t:t==="unknown"||e==="unknown"?"unknown":t==="worktree"&&e==="index"||t==="index"&&e==="worktree"?"index":"unknown"}function zm(t,e){return{scope:Sm(t.scope,e.scope),background:t.background&&e.background,view:e.view}}function Wm(t,e){return e!=="diff"&&e!=="conflict"?!1:t==="worktree"||t==="index"||t==="unknown"}function Um(t){return t==="worktree"||t==="index"||t==="unknown"}function km(t,e){const n=t==="unknown";return{status:!0,branches:n||t==="refs"||t==="worktrees",worktrees:n||t==="worktrees",files:e==="files"&&(n||t==="worktree"||t==="index"),history:e==="history"&&(n||t==="refs")}}const Pm=new cl({defaultOptions:{queries:{networkMode:"always",retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,staleTime:0},mutations:{networkMode:"always",retry:!1}}}),Gm={repository:t=>["repository",t],status:t=>["repository",t,"status"],branches:t=>["repository",t,"branches"],worktrees:t=>["repository",t,"worktrees"],files:t=>["repository",t,"files"],fileHistory:t=>["repository",t,"file-history"],history:t=>["repository",t,"history"],githubInfo:t=>["repository",t,"github-info"],pulls:(t,e)=>["repository",t,"pulls",...e],pullRequest:(t,e)=>["repository",t,"pull-request",e],pullRequestDiff:(t,e)=>["repository",t,"pull-request-diff",e],pullRequestCommitDiff:(t,e)=>["repository",t,"pull-request-commit-diff",e],search:(t,e)=>["repository",t,"search",e],localRefs:t=>["repository",t,"local-refs"],branchDetails:(t,e)=>["repository",t,"branch-details",e],branchPullRequest:(t,e)=>["repository",t,"branch-pull-request",e],worktreeDetails:(t,e)=>["repository",t,"worktree-details",e]};function $m(t,e){const n=km(t,e);return["status","branches","worktrees","files","history"].filter(s=>n[s])}const Cm=p.lazy(()=>Nr(()=>import("./App-CBetJ5ZN.js").then(t=>t.aO),__vite__mapDeps([0,1,2,3]))),Am=p.lazy(()=>Nr(()=>import("./PairingPage-CYJXzBZC.js"),__vite__mapDeps([4,1,2,3])));function Em(){const t=window.location.pathname==="/pair"?v.jsx(Am,{}):v.jsx(Tm,{children:v.jsx(Cm,{})});return v.jsxs(v.Fragment,{children:[v.jsx(Kf,{}),v.jsx(qf,{theme:"light",position:"bottom-right"}),v.jsx(ul,{client:Pm,children:v.jsx(p.Suspense,{fallback:null,children:t})})]})}const Ha=document.getElementById("root");if(!Ha)throw new Error("Root container not found.");ll.createRoot(Ha).render(v.jsx(p.StrictMode,{children:v.jsx(Em,{})}));export{Dm as A,Gp as B,km as C,$m as D,Im as E,Om as F,Kp as I,_r as L,ha as M,Yf as O,im as P,Xf as S,tm as T,Nr as _,em as a,nm as b,Hp as c,Ga as d,Fm as e,Nm as f,Al as g,Cs as h,Vu as i,hh as j,Wo as k,ed as l,Sr as m,Zf as n,_m as o,ys as p,Gm as q,jm as r,Yn as s,on as t,Pl as u,Wm as v,Zp as w,Um as x,zm as y,Bm as z};