kanbaii 0.3.1 → 0.3.2
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.
- package/dashboard/404.html +1 -1
- package/dashboard/_next/static/chunks/184-15d72b1991c86ab9.js +1 -0
- package/dashboard/_next/static/chunks/23-4a72ba4a90f008a6.js +1 -0
- package/dashboard/_next/static/chunks/{193-e4d2dea3fdc64b33.js → 759-3d8fc7952548ec08.js} +1 -1
- package/dashboard/_next/static/chunks/app/layout-5b89132efd82b0a2.js +1 -0
- package/dashboard/_next/static/chunks/app/page-e96878de09e0c519.js +1 -0
- package/dashboard/_next/static/css/85ce8ef4f13f9778.css +1 -0
- package/dashboard/index.html +1 -1
- package/dashboard/index.txt +3 -3
- package/dist/server/engines/coordinator.js +7 -2
- package/dist/server/engines/workerPool.js +9 -0
- package/dist/server/routes/projects.js +16 -3
- package/dist/server/services/projectStore.d.ts +2 -1
- package/dist/server/services/projectStore.js +11 -3
- package/package.json +1 -1
- package/dashboard/_next/static/chunks/23-2e97e53d3c5bbe2d.js +0 -1
- package/dashboard/_next/static/chunks/947-6596e9d0905e814e.js +0 -1
- package/dashboard/_next/static/chunks/app/layout-80932402bd5ccddf.js +0 -1
- package/dashboard/_next/static/chunks/app/page-81876f16bd9d3ebe.js +0 -1
- package/dashboard/_next/static/css/2671f4087ec3bbc3.css +0 -1
- /package/dashboard/_next/static/{Aokkl2r_InK8l9p19002x → A8eY-I1syJkHlELnPcf1s}/_buildManifest.js +0 -0
- /package/dashboard/_next/static/{Aokkl2r_InK8l9p19002x → A8eY-I1syJkHlELnPcf1s}/_ssgManifest.js +0 -0
- /package/dashboard/_next/static/chunks/{117-93de0183f63af83e.js → 117-749dc8b5f56031ab.js} +0 -0
package/dashboard/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/85ce8ef4f13f9778.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-5c1d03322d6ecf76.js"/><script src="/_next/static/chunks/fd9d1056-1f1f859026f5f0fa.js" async=""></script><script src="/_next/static/chunks/117-749dc8b5f56031ab.js" async=""></script><script src="/_next/static/chunks/main-app-2f313c3206a6e049.js" async=""></script><script src="/_next/static/chunks/184-15d72b1991c86ab9.js" async=""></script><script src="/_next/static/chunks/23-4a72ba4a90f008a6.js" async=""></script><script src="/_next/static/chunks/app/layout-5b89132efd82b0a2.js" async=""></script><meta name="robots" content="noindex"/><meta name="theme-color" content="#6366f1"/><title>KANBAII</title><meta name="description" content="Structure for your ideas. AI to move them forward."/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.svg" type="image/svg+xml"/><link rel="icon" href="/favicon-16x16.svg" sizes="16x16" type="image/svg+xml"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><script src="/_next/static/chunks/webpack-5c1d03322d6ecf76.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/85ce8ef4f13f9778.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[6423,[],\"\"]\n6:I[792,[\"184\",\"static/chunks/184-15d72b1991c86ab9.js\",\"23\",\"static/chunks/23-4a72ba4a90f008a6.js\",\"185\",\"static/chunks/app/layout-5b89132efd82b0a2.js\"],\"AppShell\"]\nc:I[1060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"A8eY-I1syJkHlELnPcf1s\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/85ce8ef4f13f9778.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"name\":\"theme-color\",\"content\":\"#6366f1\"}],[\"$\",\"meta\",\"2\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"3\",{\"children\":\"KANBAII\"}],[\"$\",\"meta\",\"4\",{\"name\":\"description\",\"content\":\"Structure for your ideas. AI to move them forward.\"}],[\"$\",\"link\",\"5\",{\"rel\":\"manifest\",\"href\":\"/manifest.json\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"link\",\"6\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"link\",\"7\",{\"rel\":\"icon\",\"href\":\"/favicon-16x16.svg\",\"sizes\":\"16x16\",\"type\":\"image/svg+xml\"}]]\n3:null\n"])</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[184],{2829:function(t,e,i){"use strict";i.d(e,{Z:function(){return p}});var s=i(2265);let n=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return e.filter((t,e,i)=>!!t&&""!==t.trim()&&i.indexOf(t)===e).join(" ").trim()},r=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,e,i)=>i?i.toUpperCase():e.toLowerCase()),a=t=>{let e=o(t);return e.charAt(0).toUpperCase()+e.slice(1)};var l={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"};let h=t=>{for(let e in t)if(e.startsWith("aria-")||"role"===e||"title"===e)return!0;return!1},u=(0,s.createContext)({}),c=()=>(0,s.useContext)(u),d=(0,s.forwardRef)((t,e)=>{var i,r,o;let{color:a,size:u,strokeWidth:d,absoluteStrokeWidth:p,className:f="",children:m,iconNode:y,...g}=t,{size:v=24,strokeWidth:b=2,absoluteStrokeWidth:w=!1,color:x="currentColor",className:T=""}=null!==(i=c())&&void 0!==i?i:{},k=(null!=p?p:w)?24*Number(null!=d?d:b)/Number(null!=u?u:v):null!=d?d:b;return(0,s.createElement)("svg",{ref:e,...l,width:null!==(r=null!=u?u:v)&&void 0!==r?r:l.width,height:null!==(o=null!=u?u:v)&&void 0!==o?o:l.height,stroke:null!=a?a:x,strokeWidth:k,className:n("lucide",T,f),...!m&&!h(g)&&{"aria-hidden":"true"},...g},[...y.map(t=>{let[e,i]=t;return(0,s.createElement)(e,i)}),...Array.isArray(m)?m:[m]])}),p=(t,e)=>{let i=(0,s.forwardRef)((i,o)=>{let{className:l,...h}=i;return(0,s.createElement)(d,{ref:o,iconNode:e,className:n("lucide-".concat(r(a(t))),"lucide-".concat(t),l),...h})});return i.displayName=a(t),i}},4401:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},2222:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},401:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},407:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},1723:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]])},4822:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]])},2208:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},3468:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},9397:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7168:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},9076:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},3247:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},4743:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},8728:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},1094:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},221:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},8930:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},5805:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},2489:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},1239:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(2829).Z)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},257:function(t,e,i){"use strict";var s,n;t.exports=(null==(s=i.g.process)?void 0:s.env)&&"object"==typeof(null==(n=i.g.process)?void 0:n.env)?i.g.process:i(4227)},4227:function(t){!function(){var e={229:function(t){var e,i,s,n=t.exports={};function r(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(i){try{return e.call(null,t,0)}catch(i){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:r}catch(t){e=r}try{i="function"==typeof clearTimeout?clearTimeout:o}catch(t){i=o}}();var l=[],h=!1,u=-1;function c(){h&&s&&(h=!1,s.length?l=s.concat(l):u=-1,l.length&&d())}function d(){if(!h){var t=a(c);h=!0;for(var e=l.length;e;){for(s=l,l=[];++u<e;)s&&s[u].run();u=-1,e=l.length}s=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function f(){}n.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];l.push(new p(t,e)),1!==l.length||h||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=f,n.addListener=f,n.once=f,n.off=f,n.removeListener=f,n.removeAllListeners=f,n.emit=f,n.prependListener=f,n.prependOnceListener=f,n.listeners=function(t){return[]},n.binding=function(t){throw Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw Error("process.chdir is not supported")},n.umask=function(){return 0}}},i={};function s(t){var n=i[t];if(void 0!==n)return n.exports;var r=i[t]={exports:{}},o=!0;try{e[t](r,r.exports,s),o=!1}finally{o&&delete i[t]}return r.exports}s.ab="//";var n=s(229);t.exports=n}()},1347:function(t,e,i){"use strict";let s,n,r;i.d(e,{E:function(){return rQ}});let o=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],a=new Set(o),l=(t,e,i)=>i>e?e:i<t?t:i,h={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},u={...h,transform:t=>l(0,1,t)},c={...h,default:1},d=t=>Math.round(1e5*t)/1e5,p=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,f=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,m=(t,e)=>i=>!!("string"==typeof i&&f.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),y=(t,e,i)=>s=>{if("string"!=typeof s)return s;let[n,r,o,a]=s.match(p);return{[t]:parseFloat(n),[e]:parseFloat(r),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},g=t=>l(0,255,t),v={...h,transform:t=>Math.round(g(t))},b={test:m("rgb","red"),parse:y("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:s=1})=>"rgba("+v.transform(t)+", "+v.transform(e)+", "+v.transform(i)+", "+d(u.transform(s))+")"},w={test:m("#"),parse:function(t){let e="",i="",s="",n="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),s=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),s=t.substring(3,4),n=t.substring(4,5),e+=e,i+=i,s+=s,n+=n),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:n?parseInt(n,16)/255:1}},transform:b.transform},x=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),T=x("deg"),k=x("%"),S=x("px"),E=x("vh"),A=x("vw"),P={...k,parse:t=>k.parse(t)/100,transform:t=>k.transform(100*t)},C={test:m("hsl","hue"),parse:y("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:s=1})=>"hsla("+Math.round(t)+", "+k.transform(d(e))+", "+k.transform(d(i))+", "+d(u.transform(s))+")"},M={test:t=>b.test(t)||w.test(t)||C.test(t),parse:t=>b.test(t)?b.parse(t):C.test(t)?C.parse(t):w.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?b.transform(t):C.transform(t),getAnimatableNone:t=>{let e=M.parse(t);return e.alpha=0,M.transform(e)}},_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,R="number",V="color",L=/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 D(t){let e=t.toString(),i=[],s={color:[],number:[],var:[]},n=[],r=0,o=e.replace(L,t=>(M.test(t)?(s.color.push(r),n.push(V),i.push(M.parse(t))):t.startsWith("var(")?(s.var.push(r),n.push("var"),i.push(t)):(s.number.push(r),n.push(R),i.push(parseFloat(t))),++r,"${}")).split("${}");return{values:i,split:o,indexes:s,types:n}}function B({split:t,types:e}){let i=t.length;return s=>{let n="";for(let r=0;r<i;r++)if(n+=t[r],void 0!==s[r]){let t=e[r];t===R?n+=d(s[r]):t===V?n+=M.transform(s[r]):n+=s[r]}return n}}let O=t=>"number"==typeof t?0:M.test(t)?M.getAnimatableNone(t):t,j=(t,e)=>"number"==typeof t?e?.trim().endsWith("/")?t:0:O(t),F={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(p)?.length||0)+(t.match(_)?.length||0)>0},parse:function(t){return D(t).values},createTransformer:function(t){return B(D(t))},getAnimatableNone:function(t){let e=D(t);return B(e)(e.values.map((t,i)=>j(t,e.split[i])))}},N=new Set(["brightness","contrast","saturate","opacity"]);function I(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[s]=i.match(p)||[];if(!s)return t;let n=i.replace(s,""),r=N.has(e)?1:0;return s!==i&&(r*=100),e+"("+r+n+")"}let U=/\b([a-z-]*)\(.*?\)/gu,q={...F,getAnimatableNone:t=>{let e=t.match(U);return e?e.map(I).join(" "):t}},W={...F,getAnimatableNone:t=>{let e=F.parse(t);return F.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},$={...h,transform:Math.round},z={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,fontSize:S,backgroundPositionX:S,backgroundPositionY:S,rotate:T,rotateX:T,rotateY:T,rotateZ:T,scale:c,scaleX:c,scaleY:c,scaleZ:c,skew:T,skewX:T,skewY:T,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:u,originX:P,originY:P,originZ:S,zIndex:$,fillOpacity:u,strokeOpacity:u,numOctaves:$},H={...z,color:M,backgroundColor:M,outlineColor:M,fill:M,stroke:M,borderColor:M,borderTopColor:M,borderRightColor:M,borderBottomColor:M,borderLeftColor:M,filter:q,WebkitFilter:q,mask:W,WebkitMask:W},Z=t=>H[t],Y=()=>({translate:0,scale:1,origin:0,originPoint:0}),X=()=>({x:Y(),y:Y()}),K=()=>({min:0,max:0}),G=()=>({x:K(),y:K()}),J=t=>!!(t&&t.getVelocity),Q=new Set(["width","height","top","left","right","bottom",...o]),tt=t=>e=>e.test(t),te=[h,S,k,T,A,E,{test:t=>"auto"===t,parse:t=>t}],ti=t=>te.find(tt(t));i(257);let ts=()=>{},tn=()=>{},tr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),to=t=>e=>"string"==typeof e&&e.startsWith(t),ta=to("--"),tl=to("var(--"),th=t=>!!tl(t)&&tu.test(t.split("/*")[0].trim()),tu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tc(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}let td=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,tp=t=>180*t/Math.PI,tf=t=>ty(tp(Math.atan2(t[1],t[0]))),tm={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tf,rotateZ:tf,skewX:t=>tp(Math.atan(t[1])),skewY:t=>tp(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ty=t=>((t%=360)<0&&(t+=360),t),tg=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),tv=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),tb={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tg,scaleY:tv,scale:t=>(tg(t)+tv(t))/2,rotateX:t=>ty(tp(Math.atan2(t[6],t[5]))),rotateY:t=>ty(tp(Math.atan2(-t[2],t[0]))),rotateZ:tf,rotate:tf,skewX:t=>tp(Math.atan(t[4])),skewY:t=>tp(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tw(t){return t.includes("scale")?1:0}function tx(t,e){let i,s;if(!t||"none"===t)return tw(e);let n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(n)i=tb,s=n;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=tm,s=e}if(!s)return tw(e);let r=i[e],o=s[1].split(",").map(tk);return"function"==typeof r?r(o):o[r]}let tT=(t,e)=>{let{transform:i="none"}=getComputedStyle(t);return tx(i,e)};function tk(t){return parseFloat(t.trim())}let tS=t=>t===h||t===S,tE=new Set(["x","y","z"]),tA=o.filter(t=>!tE.has(t)),tP={width:({x:t},{paddingLeft:e="0",paddingRight:i="0",boxSizing:s})=>{let n=t.max-t.min;return"border-box"===s?n:n-parseFloat(e)-parseFloat(i)},height:({y:t},{paddingTop:e="0",paddingBottom:i="0",boxSizing:s})=>{let n=t.max-t.min;return"border-box"===s?n:n-parseFloat(e)-parseFloat(i)},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})=>tx(e,"x"),y:(t,{transform:e})=>tx(e,"y")};tP.translateX=tP.x,tP.translateY=tP.y;let tC=t=>t,tM={},t_=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],tR={value:null,addProjectionMetrics:null};function tV(t,e){let i=!1,s=!0,n={delta:0,timestamp:0,isProcessing:!1},r=()=>i=!0,o=t_.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,s=new Set,n=!1,r=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function h(e){o.has(e)&&(u.schedule(e),t()),l++,e(a)}let u={schedule:(t,e=!1,r=!1)=>{let a=r&&n?i:s;return e&&o.add(t),a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{if(a=t,n){r=!0;return}n=!0;let o=i;i=s,s=o,i.forEach(h),e&&tR.value&&tR.value.frameloop[e].push(l),l=0,i.clear(),n=!1,r&&(r=!1,u.process(t))}};return u}(r,e?i:void 0),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:u,update:c,preRender:d,render:p,postRender:f}=o,m=()=>{let r=tM.useManualTiming,o=r?n.timestamp:performance.now();i=!1,r||(n.delta=s?1e3/60:Math.max(Math.min(o-n.timestamp,40),1)),n.timestamp=o,n.isProcessing=!0,a.process(n),l.process(n),h.process(n),u.process(n),c.process(n),d.process(n),p.process(n),f.process(n),n.isProcessing=!1,i&&e&&(s=!1,t(m))},y=()=>{i=!0,s=!0,n.isProcessing||t(m)};return{schedule:t_.reduce((t,e)=>{let s=o[e];return t[e]=(t,e=!1,n=!1)=>(i||y(),s.schedule(t,e,n)),t},{}),cancel:t=>{for(let e=0;e<t_.length;e++)o[t_[e]].cancel(t)},state:n,steps:o}}let{schedule:tL,cancel:tD,state:tB,steps:tO}=tV("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:tC,!0),tj=new Set,tF=!1,tN=!1,tI=!1;function tU(){if(tN){let t=Array.from(tj).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return tA.forEach(i=>{let s=t.getValue(i);void 0!==s&&(e.push([i,s.get()]),s.set(i.startsWith("scale")?1:0))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tN=!1,tF=!1,tj.forEach(t=>t.complete(tI)),tj.clear()}function tq(){tj.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tN=!0)})}class tW{constructor(t,e,i,s,n,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=s,this.element=n,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(tj.add(this),tF||(tF=!0,tL.read(tq),tL.resolveKeyframes(tU))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:s}=this;if(null===t[0]){let n=s?.get(),r=t[t.length-1];if(void 0!==n)t[0]=n;else if(i&&e){let s=i.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===n&&s.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),tj.delete(this)}cancel(){"scheduled"===this.state&&(tj.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let t$=t=>/^0[^.\s]+$/u.test(t),tz=new Set([q,W]);function tH(t,e){let i=Z(t);return tz.has(i)||(i=F),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let tZ=new Set(["auto","none","0"]);class tY extends tW{constructor(t,e,i,s,n){super(t,e,i,s,n,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i<t.length;i++){let s=t[i];if("string"==typeof s&&th(s=s.trim())){let n=function t(e,i,s=1){tn(s<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,r]=function(t){let e=td.exec(t);if(!e)return[,];let[,i,s,n]=e;return[`--${i??s}`,n]}(e);if(!n)return;let o=window.getComputedStyle(i).getPropertyValue(n);if(o){let t=o.trim();return tr(t)?parseFloat(t):t}return th(r)?t(r,i,s+1):r}(s,e.current);void 0!==n&&(t[i]=n),i===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Q.has(i)||2!==t.length)return;let[s,n]=t,r=ti(s),o=ti(n);if(tc(s)!==tc(n)&&tP[i]){this.needsMeasurement=!0;return}if(r!==o){if(tS(r)&&tS(o))for(let e=0;e<t.length;e++){let i=t[e];"string"==typeof i&&(t[e]=parseFloat(i))}else tP[i]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:e}=this,i=[];for(let e=0;e<t.length;e++){var s;(null===t[e]||("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||t$(s)))&&i.push(e)}i.length&&function(t,e,i){let s,n=0;for(;n<t.length&&!s;){let e=t[n];"string"==typeof e&&!tZ.has(e)&&D(e).values.length&&(s=t[n]),n++}if(s&&i)for(let n of e)t[n]=tH(i,s)}(t,i,e)}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=tP[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;let s=e[e.length-1];void 0!==s&&t.getValue(i,s).jump(s,!1)}measureEndState(){let{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;let s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);let n=i.length-1,r=i[n];i[n]=tP[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let tX=t=>1e3*t,tK=t=>t/1e3;function tG(t,e){-1===t.indexOf(e)&&t.push(e)}function tJ(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class tQ{constructor(){this.subscriptions=[]}add(t){return tG(this.subscriptions,t),()=>tJ(this.subscriptions,t)}notify(t,e,i){let s=this.subscriptions.length;if(s){if(1===s)this.subscriptions[0](t,e,i);else for(let n=0;n<s;n++){let s=this.subscriptions[n];s&&s(t,e,i)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let t0=t=>t.startsWith("--");function t1(t,e,i){t0(e)?t.style.setProperty(e,i):t.style[e]=i}function t2(t){let e;return()=>(void 0===e&&(e=t()),e)}let t3={};function t4(t,e){let i=t2(t);return()=>t3[e]??i()}let t5=t4(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),t9=t=>null!==t;function t6(t,{repeat:e,repeatType:i="loop"},s,n=1){let r=t.filter(t9),o=n<0||e&&"loop"!==i&&e%2==1?0:r.length-1;return o&&void 0!==s?s:r[o]}class t8{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let t7={layout:0,mainThread:0,waapi:0},et=t=>Array.isArray(t)&&"number"==typeof t[0],ee=t4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),ei=(t,e,i=10)=>{let s="",n=Math.max(Math.round(e/i),2);for(let e=0;e<n;e++)s+=Math.round(1e4*t(e/(n-1)))/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},es=([t,e,i,s])=>`cubic-bezier(${t}, ${e}, ${i}, ${s})`,en={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:es([0,.65,.55,1]),circOut:es([.55,0,1,.45]),backIn:es([.31,.01,.66,-.59]),backOut:es([.33,1.53,.69,.99])};function er(t){return"function"==typeof t&&"applyToOptions"in t}class eo extends t8{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:e,name:i,keyframes:s,pseudoElement:n,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=!!n,this.allowFlatten=r,this.options=t,tn("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:t,...e}){return er(t)&&ee()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:s=0,duration:n=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},h){let u={[e]:i};l&&(u.offset=l);let c=function t(e,i){if(e)return"function"==typeof e?ee()?ei(e,i):"ease-out":et(e)?es(e):Array.isArray(e)?e.map(e=>t(e,i)||en.easeOut):en[e]}(a,n);Array.isArray(c)&&(u.easing=c),tR.value&&t7.waapi++;let d={delay:s,duration:n,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};h&&(d.pseudoElement=h);let p=t.animate(u,d);return tR.value&&p.finished.finally(()=>{t7.waapi--}),p}(e,i,s,l,n),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let t=t6(s,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(t),t1(e,i,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){return tK(Number(this.animation.effect?.getComputedTiming?.().duration||0))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+tK(t)}get time(){return tK(Number(this.animation.currentTime)||0)}set time(t){let e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tX(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:i,observe:s}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&t5())?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),i&&(this.animation.rangeEnd=i),tC):s(this)}}let ea=new Set(["opacity","clipPath","filter","transform"]),{schedule:el,cancel:eh}=tV(queueMicrotask,!1);function eu(){s=void 0}let ec={now:()=>(void 0===s&&ec.set(tB.isProcessing||tM.useManualTiming?tB.timestamp:performance.now()),s),set:t=>{s=t,queueMicrotask(eu)}},ed=t=>!isNaN(parseFloat(t)),ep={current:void 0};class ef{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{let e=ec.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ec.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=ed(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new tQ);let i=this.events[t].add(e);return"change"===t?()=>{i(),tL.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ep.current&&ep.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=ec.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 em(t,e){return new ef(t,e)}let ey=[...te,M,F],eg=t=>ey.find(tt(t)),ev=new WeakMap;function eb(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ew(t){return"string"==typeof t||Array.isArray(t)}let ex=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eT=["initial",...ex];function ek(t){return eb(t.animate)||eT.some(e=>ew(t[e]))}function eS(t){return!!(ek(t)||t.variants)}let eE={current:null},eA={current:!1},eP="undefined"!=typeof window;function eC(t){let e=[{},{}];return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function eM(t,e,i,s){if("function"==typeof e){let[n,r]=eC(s);e=e(void 0!==i?i:t.custom,n,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[n,r]=eC(s);e=e(void 0!==i?i:t.custom,n,r)}return e}let e_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eR={};class eV{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:s,skipAnimations:n,blockInitialAnimation:r,visualState:o},a={}){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=tW,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=ec.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,tL.render(this.render,!1,!0))};let{latestValues:l,renderState:h}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=h,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=n,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=ek(e),this.isVariantNode=eS(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(let t in c){let e=c[t];void 0!==l[t]&&J(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(let t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,ev.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(eA.current||function(){if(eA.current=!0,eP){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>eE.current=t.matches;t.addEventListener("change",e),e()}else eE.current=!1}}(),this.shouldReduceMotion=eE.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let t in this.projection&&this.projection.unmount(),tD(this.notifyUpdate),tD(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){let i;if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&ea.has(t)&&this.current instanceof HTMLElement){let{factory:i,keyframes:s,times:n,ease:r,duration:o}=e.accelerate,a=new eo({element:this.current,name:t,keyframes:s,times:n,ease:r,duration:tX(o)}),l=i(a);this.valueSubscriptions.set(t,()=>{l(),a.cancel()});return}let s=a.has(t);s&&this.onBindTransform&&this.onBindTransform();let n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tL.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in eR){let e=eR[t];if(!e)continue;let{isEnabled:i,Feature:s}=e;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):G()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<e_.length;e++){let i=e_[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s=t["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=function(t,e,i){for(let s in e){let n=e[s],r=i[s];if(J(n))t.addValue(s,n);else if(J(r))t.addValue(s,em(n,{owner:t}));else if(r!==n){if(t.hasValue(s)){let e=t.getValue(s);!0===e.liveStyle?e.jump(n):e.hasAnimated||e.set(n)}else{let e=t.getStaticValue(s);t.addValue(s,em(void 0!==e?e:n,{owner:t}))}}}for(let s in i)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){let e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=em(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(tr(i)||t$(i))?i=parseFloat(i):!eg(i)&&F.test(e)&&(i=tH(t,e)),this.setBaseTarget(t,J(i)?i.get():i)),J(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e;let{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let s=eM(this.props,i,this.presenceContext?.custom);s&&(e=s[t])}if(i&&void 0!==e)return e;let s=this.getBaseTargetFromProps(this.props,t);return void 0===s||J(s)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new tQ),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){el.render(this.render)}}class eL extends eV{constructor(){super(...arguments),this.KeyframeResolver=tY}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){let i=t.style;return i?i[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;J(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function eD(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}let eB=(t,e)=>e&&"number"==typeof t?e.transform(t):t,eO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ej=o.length;function eF(t,e,i){let{style:s,vars:n,transformOrigin:r}=t,l=!1,h=!1;for(let t in e){let i=e[t];if(a.has(t)){l=!0;continue}if(ta(t)){n[t]=i;continue}{let e=eB(i,z[t]);t.startsWith("origin")?(h=!0,r[t]=e):s[t]=e}}if(!e.transform&&(l||i?s.transform=function(t,e,i){let s="",n=!0;for(let r=0;r<ej;r++){let a=o[r],l=t[a];if(void 0===l)continue;let h=!0;if("number"==typeof l)h=l===(a.startsWith("scale")?1:0);else{let t=parseFloat(l);h=a.startsWith("scale")?1===t:0===t}if(!h||i){let t=eB(l,z[a]);if(!h){n=!1;let e=eO[a]||a;s+=`${e}(${t}) `}i&&(e[a]=t)}}return s=s.trim(),i?s=i(e,n?"":s):n&&(s="none"),s}(e,t.transform,i):s.transform&&(s.transform="none")),h){let{originX:t="50%",originY:e="50%",originZ:i=0}=r;s.transformOrigin=`${t} ${e} ${i}`}}let eN={offset:"stroke-dashoffset",array:"stroke-dasharray"},eI={offset:"strokeDashoffset",array:"strokeDasharray"},eU=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function eq(t,{attrX:e,attrY:i,attrScale:s,pathLength:n,pathSpacing:r=1,pathOffset:o=0,...a},l,h,u){if(eF(t,a,h),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:c,style:d}=t;for(let t of(c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete c.transformBox),eU))void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==i&&(c.y=i),void 0!==s&&(c.scale=s),void 0!==n&&function(t,e,i=1,s=0,n=!0){t.pathLength=1;let r=n?eN:eI;t[r.offset]=`${-s}`,t[r.array]=`${e} ${i}`}(c,n,r,o,!1)}let eW=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"]),e$=t=>"string"==typeof t&&"svg"===t.toLowerCase();function ez(t,{style:e,vars:i},s,n){let r;let o=t.style;for(r in e)o[r]=e[r];for(r in n?.applyProjectionStyles(o,s),i)o.setProperty(r,i[r])}function eH(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let eZ={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!S.test(t))return t;t=parseFloat(t)}let i=eH(t,e.target.x),s=eH(t,e.target.y);return`${i}% ${s}%`}},eY=(t,e,i)=>t+(e-t)*i,eX={borderRadius:{...eZ,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:eZ,borderTopRightRadius:eZ,borderBottomLeftRadius:eZ,borderBottomRightRadius:eZ,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let s=F.parse(t);if(s.length>5)return t;let n=F.createTransformer(t),r="number"!=typeof s[0]?1:0,o=i.x.scale*e.x,a=i.y.scale*e.y;s[0+r]/=o,s[1+r]/=a;let l=eY(o,a,.5);return"number"==typeof s[2+r]&&(s[2+r]/=l),"number"==typeof s[3+r]&&(s[3+r]/=l),n(s)}}};function eK(t,{layout:e,layoutId:i}){return a.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!eX[t]||"opacity"===t)}function eG(t,e,i){let s=t.style,n=e?.style,r={};if(!s)return r;for(let e in s)(J(s[e])||n&&J(n[e])||eK(e,t)||i?.getValue(e)?.liveStyle!==void 0)&&(r[e]=s[e]);return r}function eJ(t,e,i){let s=eG(t,e,i);for(let i in t)(J(t[i])||J(e[i]))&&(s[-1!==o.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return s}class eQ extends eL{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(a.has(e)){let t=Z(e);return t&&t.default||0}return e=eW.has(e)?e:eD(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return eJ(t,e,i)}build(t,e,i){eq(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,s){!function(t,e,i,s){for(let i in ez(t,e,void 0,s),e.attrs)t.setAttribute(eW.has(i)?i:eD(i),e.attrs[i])}(t,e,0,s)}mount(t){this.isSVGTag=e$(t.tagName),super.mount(t)}}function e0({top:t,left:e,right:i,bottom:s}){return{x:{min:e,max:i},y:{min:t,max:s}}}function e1(t){return void 0===t||1===t}function e2({scale:t,scaleX:e,scaleY:i}){return!e1(t)||!e1(e)||!e1(i)}function e3(t){return e2(t)||e4(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function e4(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function e5(t,e,i,s,n){return void 0!==n&&(t=s+n*(t-s)),s+i*(t-s)+e}function e9(t,e=0,i=1,s,n){t.min=e5(t.min,e,i,s,n),t.max=e5(t.max,e,i,s,n)}function e6(t,{x:e,y:i}){e9(t.x,e.translate,e.scale,e.originPoint),e9(t.y,i.translate,i.scale,i.originPoint)}function e8(t,e){t.min+=e,t.max+=e}function e7(t,e,i,s,n=.5){let r=eY(t.min,t.max,n);e9(t,e,i,r,s)}function it(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function ie(t,e,i){let s=i??t;e7(t.x,it(e.x,s.x),e.scaleX,e.scale,e.originX),e7(t.y,it(e.y,s.y),e.scaleY,e.scale,e.originY)}function ii(t,e){return e0(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}class is extends eL{constructor(){super(...arguments),this.type="html",this.renderInstance=ez}readValueFromInstance(t,e){if(a.has(e))return this.projection?.isProjecting?tw(e):tT(t,e);{let i=window.getComputedStyle(t),s=(ta(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:e}){return ii(t,e)}build(t,e,i){eF(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return eG(t,e,i)}}var ir,io=i(2265);let ia=["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 il(t){if("string"!=typeof t||t.includes("-"));else if(ia.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var ih=i(7437);let iu=(0,io.createContext)({}),ic=(0,io.createContext)({strict:!1}),id=(0,io.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ip=(0,io.createContext)({});function im(t){return Array.isArray(t)?t.join(" "):t}let iy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ig(t,e,i){for(let s in e)J(e[s])||eK(s,i)||(t[s]=e[s])}let iv=()=>({...iy(),attrs:{}}),ib=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 iw(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ib.has(t)}let ix=t=>!iw(t);try{ir=require("@emotion/is-prop-valid").default,"function"==typeof ir&&(ix=t=>t.startsWith("on")?!iw(t):ir(t))}catch{}function iT(t){return J(t)?t.get():t}let ik=(0,io.createContext)(null),iS=t=>(e,i)=>{let s=(0,io.useContext)(ip),n=(0,io.useContext)(ik),r=()=>(function(t,e,i,s){let{scrapeMotionValuesFromProps:n,createRenderState:r}=t;return{latestValues:function(t,e,i,s){let n={},r=s(t,{});for(let t in r)n[t]=iT(r[t]);let{initial:o,animate:a}=t,l=ek(t),h=eS(t);e&&h&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let u=!!i&&!1===i.initial,c=(u=u||!1===o)?a:o;if(c&&"boolean"!=typeof c&&!eb(c)){let e=Array.isArray(c)?c:[c];for(let i=0;i<e.length;i++){let s=eM(t,e[i]);if(s){let{transitionEnd:t,transition:e,...i}=s;for(let t in i){let e=i[t];if(Array.isArray(e)){let t=u?e.length-1:0;e=e[t]}null!==e&&(n[t]=e)}for(let e in t)n[e]=t[e]}}}return n}(e,i,s,n),renderState:r()}})(t,e,s,n);return i?r():function(t){let e=(0,io.useRef)(null);return null===e.current&&(e.current=t()),e.current}(r)},iE=iS({scrapeMotionValuesFromProps:eG,createRenderState:iy}),iA=iS({scrapeMotionValuesFromProps:eJ,createRenderState:iv}),iP={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"]},iC=!1;function iM(){return!function(){if(iC)return;let t={};for(let e in iP)t[e]={isEnabled:t=>iP[e].some(e=>!!t[e])};eR=t,iC=!0}(),eR}let i_=Symbol.for("motionComponentSymbol"),iR="data-"+eD("framerAppearId"),iV=(0,io.createContext)({});function iL(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}let iD="undefined"!=typeof window?io.useLayoutEffect:io.useEffect;function iB(t){var e,i;let{forwardMotionProps:s=!1,type:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;r&&function(t){let e=iM();for(let i in t)e[i]={...e[i],...t[i]};eR=e}(r);let a=n?"svg"===n:il(t),l=a?iA:iE;function h(e,i){let n;let r={...(0,io.useContext)(id),...e,layoutId:function(t){let{layoutId:e}=t,i=(0,io.useContext)(iu).id;return i&&void 0!==e?i+"-"+e:e}(e)},{isStatic:h}=r,u=function(t){let{initial:e,animate:i}=function(t,e){if(ek(t)){let{initial:e,animate:i}=t;return{initial:!1===e||ew(e)?e:void 0,animate:ew(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,io.useContext)(ip));return(0,io.useMemo)(()=>({initial:e,animate:i}),[im(e),im(i)])}(e),c=l(e,h);if(!h&&"undefined"!=typeof window){(0,io.useContext)(ic).strict;let e=function(t){let{drag:e,layout:i}=iM();if(!e&&!i)return{};let s={...e,...i};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==i?void 0:i.isEnabled(t))?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(r);n=e.MeasureLayout,u.visualElement=function(t,e,i,s,n,r){var o,a,l,h;let{visualElement:u}=(0,io.useContext)(ip),c=(0,io.useContext)(ic),d=(0,io.useContext)(ik),p=(0,io.useContext)(id),f=p.reducedMotion,m=p.skipAnimations,y=(0,io.useRef)(null),g=(0,io.useRef)(!1);s=s||c.renderer,!y.current&&s&&(y.current=s(t,{visualState:e,parent:u,props:i,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:f,skipAnimations:m,isSVG:r}),g.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));let v=y.current,b=(0,io.useContext)(iV);v&&!v.projection&&n&&("html"===v.type||"svg"===v.type)&&function(t,e,i,s){let{layoutId:n,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:h,layoutAnchor:u,layoutCrossfade:c}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:n,layout:r,alwaysMeasureLayout:!!o||a&&iL(a),visualElement:t,animationType:"string"==typeof r?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:h,layoutAnchor:u})}(y.current,i,n,b);let w=(0,io.useRef)(!1);(0,io.useInsertionEffect)(()=>{v&&w.current&&v.update(i,d)});let x=i[iR],T=(0,io.useRef)(!!x&&"undefined"!=typeof window&&!(null===(o=(a=window).MotionHandoffIsComplete)||void 0===o?void 0:o.call(a,x))&&(null===(l=(h=window).MotionHasOptimisedAnimation)||void 0===l?void 0:l.call(h,x)));return iD(()=>{g.current=!0,v&&(w.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),T.current&&v.animationState&&v.animationState.animateChanges())}),(0,io.useEffect)(()=>{v&&(!T.current&&v.animationState&&v.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{var t,e;null===(t=(e=window).MotionHandoffMarkAsComplete)||void 0===t||t.call(e,x)}),T.current=!1),v.enteringChildren=void 0)}),v}(t,c,r,o,e.ProjectionNode,a)}return(0,ih.jsxs)(ip.Provider,{value:u,children:[n&&u.visualElement?(0,ih.jsx)(n,{visualElement:u.visualElement,...r}):null,function(t,e,i,s,n){let{latestValues:r}=s,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,l=((null!=a?a:il(t))?function(t,e,i,s){let n=(0,io.useMemo)(()=>{let i=iv();return eq(i,e,e$(s),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};ig(e,t.style,t),n.style={...e,...n.style}}return n}:function(t,e){let i={},s=function(t,e){let i=t.style||{},s={};return ig(s,i,t),Object.assign(s,function(t,e){let{transformTemplate:i}=t;return(0,io.useMemo)(()=>{let t=iy();return eF(t,e,i),Object.assign({},t.vars,t.style)},[e])}(t,e)),s}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":"pan-".concat("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i})(e,r,n,t),h=function(t,e,i){let s={};for(let n in t)("values"!==n||"object"!=typeof t.values)&&!J(t[n])&&(ix(n)||!0===i&&iw(n)||!e&&!iw(n)||t.draggable&&n.startsWith("onDrag"))&&(s[n]=t[n]);return s}(e,"string"==typeof t,o),u=t!==io.Fragment?{...h,...l,ref:i}:{},{children:c}=e,d=(0,io.useMemo)(()=>J(c)?c.get():c,[c]);return(0,io.createElement)(t,{...u,children:d})}(t,e,function(t,e,i){let s=(0,io.useRef)(i);(0,io.useInsertionEffect)(()=>{s.current=i});let n=(0,io.useRef)(null);return(0,io.useCallback)(i=>{if(i){var r;null===(r=t.onMount)||void 0===r||r.call(t,i)}let o=s.current;if("function"==typeof o){if(i){let t=o(i);"function"==typeof t&&(n.current=t)}else n.current?(n.current(),n.current=null):o(i)}else o&&(o.current=i);e&&(i?e.mount(i):e.unmount())},[e])}(c,u.visualElement,i),c,h,s,a)]})}h.displayName="motion.".concat("string"==typeof t?t:"create(".concat(null!==(i=null!==(e=t.displayName)&&void 0!==e?e:t.name)&&void 0!==i?i:"",")"));let u=(0,io.forwardRef)(h);return u[i_]=t,u}class iO{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ij(t,e,i){let s=t.getProps();return eM(s,e,void 0!==i?i:s.custom,t)}function iF(t,e){if(t?.inherit&&e){let{inherit:i,...s}=t;return{...e,...s}}return t}function iN(t,e){let i=t?.[e]??t?.default??t;return i!==t?iF(i,t):i}let iI=t=>Array.isArray(t);function iU(t,e){let i=t.getValue("willChange");if(J(i)&&i.add)return i.add(e);if(!i&&tM.WillChange){let i=new tM.WillChange("auto");t.addValue("willChange",i),i.add(e)}}let iq=(t,e)=>i=>e(t(i)),iW=(...t)=>t.reduce(iq);function i$(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function iz(t,e){return i=>i>0?e:t}let iH=(t,e,i)=>{let s=t*t,n=i*(e*e-s)+s;return n<0?0:Math.sqrt(n)},iZ=[w,b,C],iY=t=>iZ.find(e=>e.test(t));function iX(t){let e=iY(t);if(ts(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let i=e.parse(t);return e===C&&(i=function({hue:t,saturation:e,lightness:i,alpha:s}){t/=360,i/=100;let n=0,r=0,o=0;if(e/=100){let s=i<.5?i*(1+e):i+e-i*e,a=2*i-s;n=i$(a,s,t+1/3),r=i$(a,s,t),o=i$(a,s,t-1/3)}else n=r=o=i;return{red:Math.round(255*n),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}(i)),i}let iK=(t,e)=>{let i=iX(t),s=iX(e);if(!i||!s)return iz(t,e);let n={...i};return t=>(n.red=iH(i.red,s.red,t),n.green=iH(i.green,s.green,t),n.blue=iH(i.blue,s.blue,t),n.alpha=eY(i.alpha,s.alpha,t),b.transform(n))},iG=new Set(["none","hidden"]);function iJ(t,e){return i=>eY(t,e,i)}function iQ(t){return"number"==typeof t?iJ:"string"==typeof t?th(t)?iz:M.test(t)?iK:i2:Array.isArray(t)?i0:"object"==typeof t?M.test(t)?iK:i1:iz}function i0(t,e){let i=[...t],s=i.length,n=t.map((t,i)=>iQ(t)(t,e[i]));return t=>{for(let e=0;e<s;e++)i[e]=n[e](t);return i}}function i1(t,e){let i={...t,...e},s={};for(let n in i)void 0!==t[n]&&void 0!==e[n]&&(s[n]=iQ(t[n])(t[n],e[n]));return t=>{for(let e in s)i[e]=s[e](t);return i}}let i2=(t,e)=>{let i=F.createTransformer(e),s=D(t),n=D(e);return s.indexes.var.length===n.indexes.var.length&&s.indexes.color.length===n.indexes.color.length&&s.indexes.number.length>=n.indexes.number.length?iG.has(t)&&!n.values.length||iG.has(e)&&!s.values.length?iG.has(t)?i=>i<=0?t:e:i=>i>=1?e:t:iW(i0(function(t,e){let i=[],s={color:0,var:0,number:0};for(let n=0;n<e.values.length;n++){let r=e.types[n],o=t.indexes[r][s[r]],a=t.values[o]??0;i[n]=a,s[r]++}return i}(s,n),n.values),i):(ts(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),iz(t,e))};function i3(t,e,i){return"number"==typeof t&&"number"==typeof e&&"number"==typeof i?eY(t,e,i):iQ(t)(t,e)}let i4=t=>{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>tL.update(e,t),stop:()=>tD(e),now:()=>tB.isProcessing?tB.timestamp:ec.now()}};function i5(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}let i9={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 i6(t,e){return t*Math.sqrt(1-e*e)}let i8=["duration","bounce"],i7=["stiffness","damping","mass"];function st(t,e){return e.some(e=>void 0!==t[e])}function se(t=i9.visualDuration,e=i9.bounce){let i,s,n,r,o,a;let h="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:u,restDelta:c}=h,d=h.keyframes[0],p=h.keyframes[h.keyframes.length-1],f={done:!1,value:d},{stiffness:m,damping:y,mass:g,duration:v,velocity:b,isResolvedFromDuration:w}=function(t){let e={velocity:i9.velocity,stiffness:i9.stiffness,damping:i9.damping,mass:i9.mass,isResolvedFromDuration:!1,...t};if(!st(t,i7)&&st(t,i8)){if(e.velocity=0,t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),s=i*i,n=2*l(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:i9.mass,stiffness:s,damping:n}}else{let i=function({duration:t=i9.duration,bounce:e=i9.bounce,velocity:i=i9.velocity,mass:s=i9.mass}){let n,r;ts(t<=tX(i9.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=l(i9.minDamping,i9.maxDamping,o),t=l(i9.minDuration,i9.maxDuration,tK(t)),o<1?(n=e=>{let s=e*o,n=s*t;return .001-(s-i)/i6(e,o)*Math.exp(-n)},r=e=>{let s=e*o*t,r=Math.pow(o,2)*Math.pow(e,2)*t,a=i6(Math.pow(e,2),o);return(s*i+i-r)*Math.exp(-s)*(-n(e)+.001>0?-1:1)/a}):(n=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),r=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let s=i;for(let i=1;i<12;i++)s-=t(s)/e(s);return s}(n,r,5/t);if(t=tX(t),isNaN(a))return{stiffness:i9.stiffness,damping:i9.damping,duration:t};{let e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}({...t,velocity:0});(e={...e,...i,mass:i9.mass}).isResolvedFromDuration=!0}}return e}({...h,velocity:-tK(h.velocity||0)}),x=b||0,T=y/(2*Math.sqrt(m*g)),k=p-d,S=tK(Math.sqrt(m/g)),E=5>Math.abs(k);if(u||(u=E?i9.restSpeed.granular:i9.restSpeed.default),c||(c=E?i9.restDelta.granular:i9.restDelta.default),T<1)n=i6(S,T),r=(x+T*S*k)/n,i=t=>p-Math.exp(-T*S*t)*(r*Math.sin(n*t)+k*Math.cos(n*t)),o=T*S*r+k*n,a=T*S*k-r*n,s=t=>Math.exp(-T*S*t)*(o*Math.sin(n*t)+a*Math.cos(n*t));else if(1===T){i=t=>p-Math.exp(-S*t)*(k+(x+S*k)*t);let t=x+S*k;s=e=>Math.exp(-S*e)*(S*t*e-x)}else{let t=S*Math.sqrt(T*T-1);i=e=>{let i=Math.exp(-T*S*e),s=Math.min(t*e,300);return p-i*((x+T*S*k)*Math.sinh(s)+t*k*Math.cosh(s))/t};let e=(x+T*S*k)/t,n=T*S*e-k*t,r=T*S*k-e*t;s=e=>{let i=Math.exp(-T*S*e),s=Math.min(t*e,300);return i*(n*Math.sinh(s)+r*Math.cosh(s))}}let A={calculatedDuration:w&&v||null,velocity:t=>tX(s(t)),next:t=>{if(!w&&T<1){let e=Math.exp(-T*S*t),i=Math.sin(n*t),s=Math.cos(n*t),l=p-e*(r*i+k*s),h=tX(e*(o*i+a*s));return f.done=Math.abs(h)<=u&&Math.abs(p-l)<=c,f.value=f.done?p:l,f}let e=i(t);if(w)f.done=t>=v;else{let i=tX(s(t));f.done=Math.abs(i)<=u&&Math.abs(p-e)<=c}return f.value=f.done?p:e,f},toString:()=>{let t=Math.min(i5(A),2e4),e=ei(e=>A.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return A}function si(t,e,i){var s,n;let r=Math.max(e-5,0);return s=i-t(r),(n=e-r)?1e3/n*s:0}function ss({keyframes:t,velocity:e=0,power:i=.8,timeConstant:s=325,bounceDamping:n=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:h=.5,restSpeed:u}){let c,d;let p=t[0],f={done:!1,value:p},m=t=>void 0!==a&&t<a||void 0!==l&&t>l,y=t=>void 0===a?l:void 0===l?a:Math.abs(a-t)<Math.abs(l-t)?a:l,g=i*e,v=p+g,b=void 0===o?v:o(v);b!==v&&(g=b-p);let w=t=>-g*Math.exp(-t/s),x=t=>b+w(t),T=t=>{let e=w(t),i=x(t);f.done=Math.abs(e)<=h,f.value=f.done?b:i},k=t=>{m(f.value)&&(c=t,d=se({keyframes:[f.value,y(f.value)],velocity:si(x,t,f.value),damping:n,stiffness:r,restDelta:h,restSpeed:u}))};return k(0),{calculatedDuration:null,next:t=>{let e=!1;return(d||void 0!==c||(e=!0,T(t),k(t)),void 0!==c&&t>=c)?d.next(t-c):(e||T(t),f)}}}se.applyToOptions=t=>{let e=function(t,e=100,i){let s=i({...t,keyframes:[0,e]}),n=Math.min(i5(s),2e4);return{type:"keyframes",ease:t=>s.next(n*t).value/e,duration:tK(n)}}(t,100,se);return t.ease=e.ease,t.duration=tX(e.duration),t.type="keyframes",t};let sn=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function sr(t,e,i,s){if(t===e&&i===s)return tC;let n=e=>(function(t,e,i,s,n){let r,o;let a=0;do(r=sn(o=e+(i-e)/2,s,n)-t)>0?i=o:e=o;while(Math.abs(r)>1e-7&&++a<12);return o})(e,0,1,t,i);return t=>0===t||1===t?t:sn(n(t),e,s)}let so=sr(.42,0,1,1),sa=sr(0,0,.58,1),sl=sr(.42,0,.58,1),sh=t=>Array.isArray(t)&&"number"!=typeof t[0],su=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,sc=t=>e=>1-t(1-e),sd=sr(.33,1.53,.69,.99),sp=sc(sd),sf=su(sp),sm=t=>t>=1?1:(t*=2)<1?.5*sp(t):.5*(2-Math.pow(2,-10*(t-1))),sy=t=>1-Math.sin(Math.acos(t)),sg=sc(sy),sv=su(sy),sb={linear:tC,easeIn:so,easeInOut:sl,easeOut:sa,circIn:sy,circInOut:sv,circOut:sg,backIn:sp,backInOut:sf,backOut:sd,anticipate:sm},sw=t=>"string"==typeof t,sx=t=>{if(et(t)){tn(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,i,s,n]=t;return sr(e,i,s,n)}return sw(t)?(tn(void 0!==sb[t],`Invalid easing type '${t}'`,"invalid-easing-type"),sb[t]):t},sT=(t,e,i)=>{let s=e-t;return 0===s?1:(i-t)/s};function sk({duration:t=300,keyframes:e,times:i,ease:s="easeInOut"}){let n=sh(s)?s.map(sx):sx(s),r={done:!1,value:e[0]},o=function(t,e,{clamp:i=!0,ease:s,mixer:n}={}){let r=t.length;if(tn(r===e.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];let o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=function(t,e,i){let s=[],n=i||tM.mix||i3,r=t.length-1;for(let i=0;i<r;i++){let r=n(t[i],t[i+1]);e&&(r=iW(Array.isArray(e)?e[i]||tC:e,r)),s.push(r)}return s}(e,s,n),h=a.length,u=i=>{if(o&&i<t[0])return e[0];let s=0;if(h>1)for(;s<t.length-2&&!(i<t[s+1]);s++);let n=sT(t[s],t[s+1],i);return a[s](n)};return i?e=>u(l(t[0],t[r-1],e)):u}((i&&i.length===e.length?i:function(t){let e=[0];return function(t,e){let i=t[t.length-1];for(let s=1;s<=e;s++){let n=sT(0,e,s);t.push(eY(i,1,n))}}(e,t.length-1),e}(e)).map(e=>e*t),e,{ease:Array.isArray(n)?n:e.map(()=>n||sl).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}let sS={decay:ss,inertia:ss,tween:sk,keyframes:sk,spring:se};function sE(t){"string"==typeof t.type&&(t.type=sS[t.type])}let sA=t=>t/100;class sP extends t8{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==ec.now()&&this.tick(ec.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},t7.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;sE(t);let{type:e=sk,repeat:i=0,repeatDelay:s=0,repeatType:n,velocity:r=0}=t,{keyframes:o}=t,a=e||sk;a!==sk&&"number"!=typeof o[0]&&(this.mixKeyframes=iW(sA,i3(o[0],o[1])),o=[0,100]);let l=a({...t,keyframes:o});"mirror"===n&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=i5(l));let{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let i;let{generator:s,totalDuration:n,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:h}=this;if(null===this.startTime)return s.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:p,repeatDelay:f,type:m,onUpdate:y,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>n;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let w=this.currentTime,x=s;if(d){let t=Math.min(this.currentTime,n)/a,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,d+1))%2&&("reverse"===p?(i=1-i,f&&(i-=f/a)):"mirror"===p&&(x=o)),w=l(0,1,i)*a}b?(this.delayState.value=c[0],i=this.delayState):i=x.next(w),r&&!b&&(i.value=r(i.value));let{done:T}=i;b||null===h||(T=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return k&&m!==ss&&(i.value=t6(c,this.options,g,this.speed)),y&&y(i.value),k&&this.finish(),i}then(t,e){return this.finished.then(t,e)}get duration(){return tK(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+tK(t)}get time(){return tK(this.currentTime)}set time(t){t=tX(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){let t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let e=this.generator.next(t).value;return si(t=>this.generator.next(t).value,t,e)}get speed(){return this.playbackSpeed}set speed(t){let e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(ec.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=tK(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=i4,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ec.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,t7.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}let sC={anticipate:sm,backInOut:sf,circInOut:sv};class sM extends eo{constructor(t){"string"==typeof t.ease&&t.ease in sC&&(t.ease=sC[t.ease]),sE(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:s,element:n,...r}=this.options;if(!e)return;if(void 0!==t){e.set(t);return}let o=new sP({...r,autoplay:!1}),a=Math.max(10,ec.now()-this.startTime),h=l(0,10,a-10),u=o.sample(a).value,{name:c}=this.options;n&&c&&t1(n,c,u),e.setWithVelocity(o.sample(Math.max(0,a-h)).value,u,h),o.stop()}}let s_=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(F.test(t)||"0"===t)&&!t.startsWith("url("));function sR(t){t.duration=0,t.type="keyframes"}let sV=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,sL=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),sD=t2(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class sB extends t8{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:s=0,repeatDelay:n=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:h,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ec.now();let c={autoplay:t,delay:e,type:i,repeat:s,repeatDelay:n,repeatType:r,name:a,motionValue:l,element:h,...u},d=h?.KeyframeResolver||tW;this.keyframeResolver=new d(o,(t,e,i)=>this.onKeyframesResolved(t,e,c,!i),a,l,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,s){let n;this.keyframeResolver=void 0;let{name:r,type:o,velocity:a,delay:l,isHandoff:h,onUpdate:u}=i;this.resolvedAt=ec.now();let c=!0;!function(t,e,i,s){let n=t[0];if(null===n)return!1;if("display"===e||"visibility"===e)return!0;let r=t[t.length-1],o=s_(n,e),a=s_(r,e);return ts(o===a,`You are trying to animate ${e} from "${n}" to "${r}". "${o?r:n}" is not an animatable value.`,"value-not-animatable"),!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}(t)||("spring"===i||er(i))&&s)}(t,r,o,a)&&(c=!1,(tM.instantAnimations||!l)&&u?.(t6(t,i,e)),t[0]=t[t.length-1],sR(i),i.repeat=0);let d={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},p=c&&!h&&function(t){let{motionValue:e,name:i,repeatDelay:s,repeatType:n,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:h}=e.owner.getProps();return sD()&&i&&(ea.has(i)||sL.has(i)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&sV.test(t[e]))return!0;return!1}(a))&&("transform"!==i||!h)&&!l&&!s&&"mirror"!==n&&0!==r&&"inertia"!==o}(d),f=d.motionValue?.owner?.current;if(p)try{n=new sM({...d,element:f})}catch{n=new sP(d)}else n=new sP(d);n.finished.then(()=>{this.notifyFinished()}).catch(tC),this.pendingTimeline&&(this.stopTimeline=n.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=n}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tI=!0,tq(),tU(),tI=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let sO={type:"spring",stiffness:500,damping:25,restSpeed:10},sj=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),sF={type:"keyframes",duration:.8},sN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sI=(t,{keyframes:e})=>e.length>2?sF:a.has(t)?t.startsWith("scale")?sj(e[1]):sO:sN,sU=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),sq=(t,e,i,s={},n,r)=>o=>{let a=iN(s,t)||{},l=a.delay||s.delay||0,{elapsed:h=0}=s;h-=tX(l);let u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:n};!function(t){for(let e in t)if(!sU.has(e))return!0;return!1}(a)&&Object.assign(u,sI(t,u)),u.duration&&(u.duration=tX(u.duration)),u.repeatDelay&&(u.repeatDelay=tX(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let c=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(sR(u),0!==u.delay||(c=!0)),(tM.instantAnimations||tM.skipAnimations||n?.shouldSkipAnimations)&&(c=!0,sR(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,c&&!r&&void 0!==e.get()){let t=t6(u.keyframes,a);if(void 0!==t){tL.update(()=>{u.onUpdate(t),u.onComplete()});return}}return a.isSync?new sP(u):new sB(u)};function sW(t,e,{delay:i=0,transitionOverride:s,type:n}={}){let{transition:r,transitionEnd:o,...a}=e,l=t.getDefaultTransition();r=r?iF(r,l):l;let h=r?.reduceMotion;s&&(r=s);let u=[],c=n&&t.animationState&&t.animationState.getState()[n];for(let e in a){let s=t.getValue(e,t.latestValues[e]??null),n=a[e];if(void 0===n||c&&function({protectedKeys:t,needsAnimating:e},i){let s=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,s}(c,e))continue;let o={delay:i,...iN(r||{},e)},l=s.get();if(void 0!==l&&!s.isAnimating()&&!Array.isArray(n)&&n===l&&!o.velocity){tL.update(()=>s.set(n));continue}let d=!1;if(window.MotionHandoffAnimation){let i=t.props[iR];if(i){let t=window.MotionHandoffAnimation(i,e,tL);null!==t&&(o.startTime=t,d=!0)}}iU(t,e);let p=h??t.shouldReduceMotion;s.start(sq(e,s,n,p&&Q.has(e)?{type:!1}:o,t,d));let f=s.animation;f&&u.push(f)}if(o){let e=()=>tL.update(()=>{o&&function(t,e){let{transitionEnd:i={},transition:s={},...n}=ij(t,e)||{};for(let e in n={...n,...i}){var r;let i=iI(r=n[e])?r[r.length-1]||0:r;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,em(i))}}(t,o)});u.length?Promise.all(u).then(e):e()}return u}function s$(t,e,i,s=0,n=1){let r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*s;return"function"==typeof i?i(r,o):1===n?r*s:a-r*s}function sz(t,e,i={}){let s=ij(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:n=t.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(n=i.transitionOverride);let r=s?()=>Promise.all(sW(t,s,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{let{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=n;return function(t,e,i=0,s=0,n=0,r=1,o){let a=[];for(let l of t.variantChildren)l.notify("AnimationStart",e),a.push(sz(l,e,{...o,delay:i+("function"==typeof s?0:s)+s$(t.variantChildren,l,s,n,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,s,r,o,a,i)}:()=>Promise.resolve(),{when:a}=n;if(!a)return Promise.all([r(),o(i.delay)]);{let[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}}let sH=eT.length;function sZ(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s])return!1;return!0}let sY=[...ex].reverse(),sX=ex.length;function sK(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sG(){return{animate:sK(!0),whileInView:sK(),whileHover:sK(),whileTap:sK(),whileDrag:sK(),whileFocus:sK(),exit:sK()}}class sJ extends iO{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e))s=Promise.all(e.map(e=>sz(t,e,i)));else if("string"==typeof e)s=sz(t,e,i);else{let n="function"==typeof e?ij(t,e,i.custom):e;s=Promise.all(sW(t,n,i))}return s.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=sG(),s=!0,n=!1,r=e=>(i,s)=>{let n=ij(t,s,"exit"===e?t.presenceContext?.custom:void 0);if(n){let{transition:t,transitionEnd:e,...s}=n;i={...i,...s,...e}}return i};function o(o){let{props:a}=t,l=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;t<sH;t++){let s=eT[t],n=e.props[s];(ew(n)||!1===n)&&(i[s]=n)}return i}(t.parent)||{},h=[],u=new Set,c={},d=1/0;for(let e=0;e<sX;e++){var p;let f=sY[e],m=i[f],y=void 0!==a[f]?a[f]:l[f],g=ew(y),v=f===o?m.isActive:null;!1===v&&(d=e);let b=y===l[f]&&y!==a[f]&&g;if(b&&(s||n)&&t.manuallyAnimateOnMount&&(b=!1),m.protectedKeys={...c},!m.isActive&&null===v||!y&&!m.prevProp||eb(y)||"boolean"==typeof y)continue;if("exit"===f&&m.isActive&&!0!==v){m.prevResolvedValues&&(c={...c,...m.prevResolvedValues});continue}let w=(p=m.prevProp,"string"==typeof y?y!==p:!!Array.isArray(y)&&!sZ(y,p)),x=w||f===o&&m.isActive&&!b&&g||e>d&&g,T=!1,k=Array.isArray(y)?y:[y],S=k.reduce(r(f),{});!1===v&&(S={});let{prevResolvedValues:E={}}=m,A={...E,...S},P=e=>{x=!0,u.has(e)&&(T=!0,u.delete(e)),m.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in A){let e=S[t],i=E[t];if(!c.hasOwnProperty(t))(iI(e)&&iI(i)?sZ(e,i):e===i)?void 0!==e&&u.has(t)?P(t):m.protectedKeys[t]=!0:null!=e?P(t):u.add(t)}m.prevProp=y,m.prevResolvedValues=S,m.isActive&&(c={...c,...S}),(s||n)&&t.blockInitialAnimation&&(x=!1);let C=b&&w,M=!C||T;x&&M&&h.push(...k.map(e=>{let i={type:f};if("string"==typeof e&&(s||n)&&!C&&t.manuallyAnimateOnMount&&t.parent){let{parent:s}=t,n=ij(s,e);if(s.enteringChildren&&n){let{delayChildren:e}=n.transition||{};i.delay=s$(s.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(u.size){let e={};if("boolean"!=typeof a.initial){let i=ij(t,Array.isArray(a.initial)?a.initial[0]:a.initial);i&&i.transition&&(e.transition=i.transition)}u.forEach(i=>{let s=t.getBaseTarget(i),n=t.getValue(i);n&&(n.liveStyle=!0),e[i]=s??null}),h.push({animation:e})}let f=!!h.length;return s&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(f=!1),s=!1,n=!1,f?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,s){if(i[e].isActive===s)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,s)),i[e].isActive=s;let n=o(e);for(let t in i)i[t].protectedKeys={};return n},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=sG(),n=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();eb(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let sQ=0;class s0 extends iO{constructor(){super(...arguments),this.id=sQ++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&!1===i){if(this.isExitComplete){let{initial:t,custom:e}=this.node.getProps();if("string"==typeof t){let i=ij(this.node,t,e);if(i){let{transition:t,transitionEnd:e,...s}=i;for(let t in s)this.node.getValue(t)?.jump(s[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let s=this.node.animationState.setActive("exit",!t);e&&!t&&s.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}let s1={x:!1,y:!1};function s2(t){return[t("x"),t("y")]}function s3(t){return t.max-t.min}function s4(t,e,i,s=.5){t.origin=s,t.originPoint=eY(e.min,e.max,t.origin),t.scale=s3(i)/s3(e),t.translate=eY(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function s5(t,e,i,s){s4(t.x,e.x,i.x,s?s.originX:void 0),s4(t.y,e.y,i.y,s?s.originY:void 0)}function s9(t,e,i,s=0){let n=s?eY(i.min,i.max,s):i.min;t.min=n+e.min,t.max=t.min+s3(e)}function s6(t,e,i,s=0){let n=s?eY(i.min,i.max,s):i.min;t.min=e.min-n,t.max=t.min+s3(e)}function s8(t,e,i,s){s6(t.x,e.x,i.x,s?.x),s6(t.y,e.y,i.y,s?.y)}let s7=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),nt=new Set(["INPUT","SELECT","TEXTAREA"]);function ne(t,e,i,s={passive:!0}){return t.addEventListener(e,i,s),()=>t.removeEventListener(e,i)}function ni(t){return"object"==typeof t&&null!==t}function ns(t){return ni(t)&&"ownerSVGElement"in t}function nn(t,e,i){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);let n=i?.[t]??s.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(t=>null!=t)}let nr=new WeakMap,no=(t,e,i)=>(s,n)=>n&&n[0]?n[0][t+"Size"]:ns(s)&&"getBBox"in s?s.getBBox()[e]:s[i],na=no("inline","width","offsetWidth"),nl=no("block","height","offsetHeight");function nh({target:t,borderBoxSize:e}){nr.get(t)?.forEach(i=>{i(t,{get width(){return na(t,e)},get height(){return nl(t,e)}})})}function nu(t){t.forEach(nh)}let nc=new Set;function nd(t,e){return"function"==typeof t?(nc.add(t),r||(r=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};nc.forEach(e=>e(t))},window.addEventListener("resize",r)),()=>{nc.delete(t),nc.size||"function"!=typeof r||(window.removeEventListener("resize",r),r=void 0)}):function(t,e){n||"undefined"==typeof ResizeObserver||(n=new ResizeObserver(nu));let i=nn(t);return i.forEach(t=>{let i=nr.get(t);i||(i=new Set,nr.set(t,i)),i.add(e),n?.observe(t)}),()=>{i.forEach(t=>{let i=nr.get(t);i?.delete(e),i?.size||n?.unobserve(t)})}}(t,e)}let np=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function nf(t){return{point:{x:t.pageX,y:t.pageY}}}let nm=t=>e=>np(e)&&t(e,nf(e));function ny(t,e,i,s){return ne(t,e,nm(i),s)}let ng=({current:t})=>t?t.ownerDocument.defaultView:null,nv=(t,e)=>Math.abs(t-e),nb=new Set(["auto","scroll"]);class nw{constructor(t,e,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:n=!1,distanceThreshold:r=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=nx(this.lastRawMoveEventInfo,this.transformPagePoint));let i=nk(this.lastMoveEventInfo,this.history),s=null!==this.startEvent,n=(t=i.offset,e={x:0,y:0},Math.sqrt(nv(t.x,e.x)**2+nv(t.y,e.y)**2)>=this.distanceThreshold);if(!s&&!n)return;let{point:r}=i,{timestamp:o}=tB;this.history.push({...r,timestamp:o});let{onStart:a,onMove:l}=this.handlers;s||(a&&a(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=nx(e,this.transformPagePoint),tL.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:s,resumeAnimation:n}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&n&&n(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=nk("pointercancel"===t.type?this.lastMoveEventInfo:nx(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,r),s&&s(t,r)},!np(t))return;this.dragSnapToOrigin=n,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=s||window;let a=nx(nf(t),this.transformPagePoint),{point:l}=a,{timestamp:h}=tB;this.history=[{...l,timestamp:h}];let{onSessionStart:u}=e;u&&u(t,nk(a,this.history)),this.removeListeners=iW(ny(this.contextWindow,"pointermove",this.handlePointerMove),ny(this.contextWindow,"pointerup",this.handlePointerUp),ny(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(t){let e=t.parentElement;for(;e;){let t=getComputedStyle(e);(nb.has(t.overflowX)||nb.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.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(t){let e=this.scrollPositions.get(t);if(!e)return;let i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},n={x:s.x-e.x,y:s.y-e.y};(0!==n.x||0!==n.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=n.x,this.lastMoveEventInfo.point.y+=n.y):this.history.length>0&&(this.history[0].x-=n.x,this.history[0].y-=n.y),this.scrollPositions.set(t,s),tL.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),tD(this.updatePoint)}}function nx(t,e){return e?{point:e(t.point)}:t}function nT(t,e){return{x:t.x-e.x,y:t.y-e.y}}function nk({point:t},e){return{point:t,delta:nT(t,nS(e)),offset:nT(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null,n=nS(t);for(;i>=0&&(s=t[i],!(n.timestamp-s.timestamp>tX(.1)));)i--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&n.timestamp-s.timestamp>2*tX(.1)&&(s=t[1]);let r=tK(n.timestamp-s.timestamp);if(0===r)return{x:0,y:0};let o={x:(n.x-s.x)/r,y:(n.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,.1)}}function nS(t){return t[t.length-1]}function nE(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function nA(t,e){let i=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,s]=[s,i]),{min:i,max:s}}function nP(t,e,i){return{min:nC(t,e),max:nC(t,i)}}function nC(t,e){return"number"==typeof t?t:t[e]||0}let nM=new WeakMap;class n_{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=G(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){let{presenceContext:s}=this.visualElement;if(s&&!1===s.isPresent)return;let{dragSnapToOrigin:n}=this.getProps();this.panSession=new nw(t,{onSessionStart:t=>{e&&this.snapToCursor(nf(t).point),this.stopAnimation()},onStart:(t,e)=>{let{drag:i,dragPropagation:s,onDragStart:n}=this.getProps();if(i&&!s&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===i||"y"===i?s1[i]?null:(s1[i]=!0,()=>{s1[i]=!1}):s1.x||s1.y?null:(s1.x=s1.y=!0,()=>{s1.x=s1.y=!1}),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),s2(t=>{let e=this.getAxisMotionValue(t).get()||0;if(k.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let s=i.layout.layoutBox[t];if(s){let t=s3(s);e=parseFloat(e)/100*t}}}this.originPoint[t]=e}),n&&tL.update(()=>n(t,e),!1,!0),iU(this.visualElement,"transform");let{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:s,onDirectionLock:n,onDrag:r}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:o}=e;if(s&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&n&&n(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),r&&tL.update(()=>r(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{let{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:n,distanceThreshold:i,contextWindow:ng(this.visualElement),element:this.visualElement.current})}stop(t,e){let i=t||this.latestPointerEvent,s=e||this.latestPanInfo,n=this.isDragging;if(this.cancel(),!n||!s||!i)return;let{velocity:r}=s;this.startAnimation(r);let{onDragEnd:o}=this.getProps();o&&tL.postRender(()=>o(i,s))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,i){let{drag:s}=this.getProps();if(!i||!nV(t,s,this.currentDirection))return;let n=this.getAxisMotionValue(t),r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:i},s){return void 0!==e&&t<e?t=s?eY(e,t,s.min):Math.max(t,e):void 0!==i&&t>i&&(t=s?eY(i,t,s.max):Math.min(t,i)),t}(r,this.constraints[t],this.elastic[t])),n.set(r)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&iL(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:s,right:n}){return{x:nE(t.x,i,n),y:nE(t.y,e,s)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:nP(t,"left","right"),y:nP(t,"top","bottom")}}(e),s!==this.constraints&&!iL(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&s2(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!iL(e))return!1;let s=e.current;tn(null!==s,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let r=function(t,e,i){let s=ii(t,i),{scroll:n}=e;return n&&(e8(s.x,n.offset.x),e8(s.y,n.offset.y)),s}(s,n.root,this.visualElement.getTransformPagePoint()),o={x:nA((t=n.layout.layoutBox).x,r.x),y:nA(t.y,r.y)};if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=e0(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:s,dragTransition:n,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(s2(o=>{if(!nV(o,e,this.currentDirection))return;let l=a&&a[o]||{};(!0===r||r===o)&&(l={min:0,max:0});let h={type:"inertia",velocity:i?t[o]:0,bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(o,h)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return iU(this.visualElement,t),i.start(sq(t,i,0,e,this.visualElement,!1))}stopAnimation(){s2(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){s2(e=>{let{drag:i}=this.getProps();if(!nV(e,i,this.currentDirection))return;let{projection:s}=this.visualElement,n=this.getAxisMotionValue(e);if(s&&s.layout){let{min:i,max:r}=s.layout.layoutBox[e],o=n.get()||0;n.set(t[e]-eY(i,r,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!iL(e)||!i||!this.constraints)return;this.stopAnimation();let s={x:0,y:0};s2(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();s[t]=function(t,e){let i=.5,s=s3(t),n=s3(e);return n>s?i=sT(e.min,e.max-s,t.min):s>n&&(i=sT(t.min,t.max-n,e.min)),l(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),s2(e=>{if(!nV(e,t,null))return;let i=this.getAxisMotionValue(e),{min:n,max:r}=this.constraints[e];i.set(eY(n,r,s[e]))}),this.visualElement.render()}addListeners(){let t;if(!this.visualElement.current)return;nM.set(this.visualElement,this);let e=this.visualElement.current,i=ny(e,"pointerdown",t=>{let{drag:i,dragListener:s=!0}=this.getProps(),n=t.target,r=n!==e&&(nt.has(n.tagName)||!0===n.isContentEditable);i&&s&&!r&&this.start(t)}),s=()=>{let{dragConstraints:i}=this.getProps();iL(i)&&i.current&&(this.constraints=this.resolveRefConstraints(),t||(t=function(t,e,i){let s=nd(t,nR(i)),n=nd(e,nR(i));return()=>{s(),n()}}(e,i.current,()=>this.scalePositionWithinConstraints())))},{projection:n}=this.visualElement,r=n.addEventListener("measure",s);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),tL.read(s);let o=ne(window,"resize",()=>this.scalePositionWithinConstraints()),a=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(s2(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{o(),i(),r(),a&&a(),t&&t()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:n=!1,dragElastic:r=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:s,dragConstraints:n,dragElastic:r,dragMomentum:o}}}function nR(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function nV(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class nL extends iO{constructor(t){super(t),this.removeGroupControls=tC,this.removeListeners=tC,this.controls=new n_(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tC}update(){let{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let nD=t=>(e,i)=>{t&&tL.update(()=>t(e,i),!1,!0)};class nB extends iO{constructor(){super(...arguments),this.removePointerDownListener=tC}onPointerDown(t){this.session=new nw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ng(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:nD(t),onStart:nD(e),onMove:nD(i),onEnd:(t,e)=>{delete this.session,s&&tL.postRender(()=>s(t,e))}}}mount(){this.removePointerDownListener=ny(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let nO={hasAnimatedSinceResize:!0,hasEverUpdated:!1},nj=!1;class nF extends io.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:s}=this.props,{projection:n}=t;n&&(e.group&&e.group.add(n),i&&i.register&&s&&i.register(n),nj&&n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),nO.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:s,isPresent:n}=this.props,{projection:r}=i;return r&&(r.isPresent=n,t.layoutDependency!==e&&r.setOptions({...r.options,layoutDependency:e}),nj=!0,s||t.layoutDependency!==e||void 0===e||t.isPresent!==n?r.willUpdate():this.safeToRemove(),t.isPresent===n||(n?r.promote():r.relegate()||tL.postRender(()=>{let t=r.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:e}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=e,i.root.didUpdate(),el.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:s}=t;nj=!0,s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nN(t){let[e,i]=function(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],e=(0,io.useContext)(ik);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:s,register:n}=e,r=(0,io.useId)();(0,io.useEffect)(()=>{if(t)return n(r)},[t]);let o=(0,io.useCallback)(()=>t&&s&&s(r),[r,s,t]);return!i&&s?[!1,o]:[!0]}(),s=(0,io.useContext)(iu);return(0,ih.jsx)(nF,{...t,layoutGroup:s,switchLayoutGroup:(0,io.useContext)(iV),isPresent:e,safeToRemove:i})}let nI=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],nU=nI.length,nq=t=>"string"==typeof t?parseFloat(t):t,nW=t=>"number"==typeof t||S.test(t);function n$(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let nz=nZ(0,.5,sg),nH=nZ(.5,.95,tC);function nZ(t,e,i){return s=>s<t?0:s>e?1:i(sT(t,e,s))}function nY(t,e){t.min=e.min,t.max=e.max}function nX(t,e){nY(t.x,e.x),nY(t.y,e.y)}function nK(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function nG(t,e,i,s,n){return t-=e,t=s+1/i*(t-s),void 0!==n&&(t=s+1/n*(t-s)),t}function nJ(t,e,[i,s,n],r,o){!function(t,e=0,i=1,s=.5,n,r=t,o=t){if(k.test(e)&&(e=parseFloat(e),e=eY(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=eY(r.min,r.max,s);t===r&&(a-=e),t.min=nG(t.min,e,i,a,n),t.max=nG(t.max,e,i,a,n)}(t,e[i],e[s],e[n],e.scale,r,o)}let nQ=["x","scaleX","originX"],n0=["y","scaleY","originY"];function n1(t,e,i,s){nJ(t.x,e,nQ,i?i.x:void 0,s?s.x:void 0),nJ(t.y,e,n0,i?i.y:void 0,s?s.y:void 0)}function n2(t){return 0===t.translate&&1===t.scale}function n3(t){return n2(t.x)&&n2(t.y)}function n4(t,e){return t.min===e.min&&t.max===e.max}function n5(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function n9(t,e){return n5(t.x,e.x)&&n5(t.y,e.y)}function n6(t){return s3(t.x)/s3(t.y)}function n8(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class n7{constructor(){this.members=[]}add(t){tG(this.members,t);for(let e=this.members.length-1;e>=0;e--){let i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;let s=i.instance;s&&!1!==s.isConnected||i.snapshot||(tJ(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(tJ(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){let t=this.members[e];if(!1!==t.isPresent&&t.instance?.isConnected!==!1)return this.promote(t),!0}return!1}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();let{layoutDependency:s}=i.options,{layoutDependency:n}=t.options;(void 0===s||s!==n)&&(t.resumeFrom=i,e&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let rt=(t,e)=>t.depth-e.depth;class re{constructor(){this.children=[],this.isDirty=!1}add(t){tG(this.children,t),this.isDirty=!0}remove(t){tJ(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rt),this.isDirty=!1,this.children.forEach(t)}}let ri={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},rs=["","X","Y","Z"],rn=0;function rr(t,e,i,s){let{latestValues:n}=e;n[t]&&(i[t]=n[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ro({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:s,resetTransform:n}){return class{constructor(t={},i=e?.()){this.id=rn++,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,tR.value&&(ri.nodes=ri.calculatedTargetDeltas=ri.calculatedProjections=0),this.nodes.forEach(rh),this.nodes.forEach(rv),this.nodes.forEach(rb),this.nodes.forEach(ru),tR.addProjectionMetrics&&tR.addProjectionMetrics(ri)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new re)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new tQ),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){let i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=ns(e)&&!(ns(e)&&"svg"===e.tagName),this.instance=e;let{layoutId:i,layout:s,visualElement:n}=this.options;if(n&&!n.current&&n.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),t){let i;let s=0,n=()=>this.root.updateBlockedByResize=!1;tL.read(()=>{s=window.innerWidth}),t(e,()=>{let t=window.innerWidth;t!==s&&(s=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=ec.now(),s=({timestamp:e})=>{let n=e-i;n>=250&&(tD(s),t(n-250))};return tL.setup(s,!0),()=>tD(s)}(n,0),nO.hasAnimatedSinceResize&&(nO.hasAnimatedSinceResize=!1,this.nodes.forEach(rg)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&n&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||n.getDefaultTransition()||rE,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=n.getProps(),l=!this.targetLayout||!n9(this.targetLayout,s),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...iN(r,"layout"),onPlay:o,onComplete:a};(n.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h)}else e||rg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tD(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(rw),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let s=i.props[iR];if(window.MotionHasOptimisedAnimation(s,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",tL,!(t||i))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&t(n)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){let e=this.path[t];e.shouldResetTransform=!0,("string"==typeof e.latestValues.x||"string"==typeof e.latestValues.y)&&(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}let{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;let s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let t=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(rp),this.nodes.forEach(rd);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(rf);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(rm),this.nodes.forEach(ry),this.nodes.forEach(ra),this.nodes.forEach(rl)):this.nodes.forEach(rf),this.clearAllSnapshots();let t=ec.now();tB.delta=l(0,1e3/60,t-tB.timestamp),tB.timestamp=t,tB.isProcessing=!0,tO.update.process(tB),tO.preRender.process(tB),tO.render.process(tB),tB.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,el.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rc),this.sharedNodes.forEach(rx)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tL.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tL.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),!this.snapshot||s3(this.snapshot.measuredBox.x)||s3(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 t=0;t<this.path.length;t++)this.path[t].updateScroll();let t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=G()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){let e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!n)return;let t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!n3(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,r=s!==this.prevTransformTemplateValue;t&&this.instance&&(e||e3(this.latestValues)||r)&&(n(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){var e;let i=this.measurePageBox(),s=this.removeElementScroll(i);return t&&(s=this.removeTransform(s)),rC((e=s).x),rC(e.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:s,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:t}=this.options;if(!t)return G();let e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(r_))){let{scroll:t}=this.root;t&&(e8(e.x,t.offset.x),e8(e.y,t.offset.y))}return e}removeElementScroll(t){let e=G();if(nX(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){let s=this.path[i],{scroll:n,options:r}=s;s!==this.root&&n&&r.layoutScroll&&(n.wasRoot&&nX(e,t),e8(e.x,n.offset.x),e8(e.y,n.offset.y))}return e}applyTransform(t,e=!1,i){let s=i||G();nX(s,t);for(let t=0;t<this.path.length;t++){let i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(e8(s.x,-i.scroll.offset.x),e8(s.y,-i.scroll.offset.y)),e3(i.latestValues)&&ie(s,i.latestValues,i.layout?.layoutBox)}return e3(this.latestValues)&&ie(s,this.latestValues,this.layout?.layoutBox),s}removeTransform(t){let e=G();nX(e,t);for(let t=0;t<this.path.length;t++){let i;let s=this.path[t];e3(s.latestValues)&&(s.instance&&(e2(s.latestValues)&&s.updateSnapshot(),nX(i=G(),s.measurePageBox())),n1(e,s.latestValues,s.snapshot?.layoutBox,i))}return e3(this.latestValues)&&n1(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==tB.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){let e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:s,layoutId:n}=this.options;if(!this.layout||!(s||n))return;this.resolvedRelativeTargetAt=tB.timestamp;let r=this.getClosestProjectingParent();if(r&&this.linkedParentVersion!==r.layoutVersion&&!r.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var o,a,l,h;this.forceRelativeParentToResolveTarget(),o=this.target,a=this.relativeTarget,l=this.relativeParent.target,h=this.options.layoutAnchor||void 0,s9(o.x,a.x,l.x,h?.x),s9(o.y,a.y,l.y,h?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):nX(this.target,this.layout.layoutBox),e6(this.target,this.targetDelta)):nX(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&r&&!!r.resumingFrom==!!this.resumingFrom&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0),tR.value&&ri.calculatedTargetDeltas++}}getClosestProjectingParent(){return!this.parent||e2(this.parent.latestValues)||e4(this.parent.latestValues)?void 0:this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),s8(this.relativeTargetOrigin,e,i,this.options.layoutAnchor||void 0),nX(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let t=this.getLead(),e=!!this.resumingFrom||this!==t,i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===tB.timestamp&&(i=!1),i)return;let{layout:s,layoutId:n}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||n))return;nX(this.layoutCorrected,this.layout.layoutBox);let r=this.treeScale.x,o=this.treeScale.y;!function(t,e,i,s=!1){let n,r;let o=i.length;if(o){e.x=e.y=1;for(let a=0;a<o;a++){r=(n=i[a]).projectionDelta;let{visualElement:o}=n.options;(!o||!o.props.style||"contents"!==o.props.style.display)&&(s&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(e8(t.x,-n.scroll.offset.x),e8(t.y,-n.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,e6(t,r)),s&&e3(n.latestValues)&&ie(t,n.latestValues,n.layout?.layoutBox))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=G());let{target:a}=t;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(nK(this.prevProjectionDelta.x,this.projectionDelta.x),nK(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),s5(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&n8(this.projectionDelta.x,this.prevProjectionDelta.x)&&n8(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),tR.value&&ri.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=X(),this.projectionDelta=X(),this.projectionDeltaWithTransform=X()}setAnimationOrigin(t,e=!1){let i;let s=this.snapshot,n=s?s.latestValues:{},r={...this.latestValues},o=X();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let a=G(),l=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,c=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(rS));this.animationProgress=0,this.mixTargetDelta=e=>{let s=e/1e3;if(rT(o.x,t.x,s),rT(o.y,t.y,s),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,d,p,f;s8(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),p=this.relativeTarget,f=this.relativeTargetOrigin,rk(p.x,f.x,a.x,s),rk(p.y,f.y,a.y,s),i&&(h=this.relativeTarget,d=i,n4(h.x,d.x)&&n4(h.y,d.y))&&(this.isProjectionDirty=!1),i||(i=G()),nX(i,this.relativeTarget)}l&&(this.animationValues=r,function(t,e,i,s,n,r){n?(t.opacity=eY(0,i.opacity??1,nz(s)),t.opacityExit=eY(e.opacity??1,0,nH(s))):r&&(t.opacity=eY(e.opacity??1,i.opacity??1,s));for(let n=0;n<nU;n++){let r=nI[n],o=n$(e,r),a=n$(i,r);(void 0!==o||void 0!==a)&&(o||(o=0),a||(a=0),0===o||0===a||nW(o)===nW(a)?(t[r]=Math.max(eY(nq(o),nq(a),s),0),(k.test(a)||k.test(o))&&(t[r]+="%")):t[r]=a)}(e.rotate||i.rotate)&&(t.rotate=eY(e.rotate||0,i.rotate||0,s))}(r,n,this.latestValues,s,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=s},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(tD(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tL.update(()=>{nO.hasAnimatedSinceResize=!0,t7.layout++,this.motionValue||(this.motionValue=em(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(t,e,i){let s=J(t)?t:em(t);return s.start(sq("",s,e,i)),s.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{t7.layout--},onComplete:()=>{t7.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:s,latestValues:n}=t;if(e&&i&&s){if(this!==t&&this.layout&&s&&rM(this.options.animationType,this.layout.layoutBox,s.layoutBox)){i=this.target||G();let e=s3(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let s=s3(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+s}nX(e,i),ie(e,n),s5(this.projectionDeltaWithTransform,this.layoutCorrected,e,n)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new n7),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let s=this.getStack();s&&s.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let s={};i.z&&rr("z",t,s,this.animationValues);for(let e=0;e<rs.length;e++)rr(`rotate${rs[e]}`,t,s,this.animationValues),rr(`skew${rs[e]}`,t,s,this.animationValues);for(let e in t.render(),s)t.setStaticValue(e,s[e]),this.animationValues&&(this.animationValues[e]=s[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible){t.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=iT(e?.pointerEvents)||"",t.transform=i?i(this.latestValues,""):"none";return}let s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=iT(e?.pointerEvents)||""),this.hasProjected&&!e3(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1);return}t.visibility="";let n=s.animationValues||s.latestValues;this.applyTransformsToTarget();let r=function(t,e,i){let s="",n=t.x.translate/e.x,r=t.y.translate/e.y,o=i?.z||0;if((n||r||o)&&(s=`translate3d(${n}px, ${r}px, ${o}px) `),(1!==e.x||1!==e.y)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),i){let{transformPerspective:t,rotate:e,rotateX:n,rotateY:r,skewX:o,skewY:a}=i;t&&(s=`perspective(${t}px) ${s}`),e&&(s+=`rotate(${e}deg) `),n&&(s+=`rotateX(${n}deg) `),r&&(s+=`rotateY(${r}deg) `),o&&(s+=`skewX(${o}deg) `),a&&(s+=`skewY(${a}deg) `)}let a=t.x.scale*e.x,l=t.y.scale*e.y;return(1!==a||1!==l)&&(s+=`scale(${a}, ${l})`),s||"none"}(this.projectionDeltaWithTransform,this.treeScale,n);i&&(r=i(n,r)),t.transform=r;let{x:o,y:a}=this.projectionDelta;for(let e in t.transformOrigin=`${100*o.origin}% ${100*a.origin}% 0`,s.animationValues?t.opacity=s===this?n.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:n.opacityExit:t.opacity=s===this?void 0!==n.opacity?n.opacity:"":void 0!==n.opacityExit?n.opacityExit:0,eX){if(void 0===n[e])continue;let{correct:i,applyTo:o,isCSSVariable:a}=eX[e],l="none"===r?n[e]:i(n[e],s);if(o){let e=o.length;for(let i=0;i<e;i++)t[o[i]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=s===this?iT(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(rd),this.root.sharedNodes.clear()}}}function ra(t){t.updateLayout()}function rl(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:s}=t.layout,{animationType:n}=t.options,r=e.source!==t.layout.source;if("size"===n)s2(t=>{let s=r?e.measuredBox[t]:e.layoutBox[t],n=s3(s);s.min=i[t].min,s.max=s.min+n});else if("x"===n||"y"===n){let t="x"===n?"y":"x";nY(r?e.measuredBox[t]:e.layoutBox[t],i[t])}else rM(n,e.layoutBox,i)&&s2(s=>{let n=r?e.measuredBox[s]:e.layoutBox[s],o=s3(i[s]);n.max=n.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+o)});let o=X();s5(o,i,e.layoutBox);let a=X();r?s5(a,t.applyTransform(s,!0),e.measuredBox):s5(a,i,e.layoutBox);let l=!n3(o),h=!1;if(!t.resumeFrom){let s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){let{snapshot:n,layout:r}=s;if(n&&r){let o=t.options.layoutAnchor||void 0,a=G();s8(a,e.layoutBox,n.layoutBox,o);let l=G();s8(l,i,r.layoutBox,o),n9(a,l)||(h=!0),s.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function rh(t){tR.value&&ri.nodes++,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 ru(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rc(t){t.clearSnapshot()}function rd(t){t.clearMeasurements()}function rp(t){t.isLayoutDirty=!0,t.updateLayout()}function rf(t){t.isLayoutDirty=!1}function rm(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ry(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rg(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rv(t){t.resolveTargetDelta()}function rb(t){t.calcProjection()}function rw(t){t.resetSkewAndRotation()}function rx(t){t.removeLeadSnapshot()}function rT(t,e,i){t.translate=eY(e.translate,0,i),t.scale=eY(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function rk(t,e,i,s){t.min=eY(e.min,i.min,s),t.max=eY(e.max,i.max,s)}function rS(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let rE={duration:.45,ease:[.4,0,.1,1]},rA=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),rP=rA("applewebkit/")&&!rA("chrome/")?Math.round:tC;function rC(t){t.min=rP(t.min),t.max=rP(t.max)}function rM(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(n6(e)-n6(i)))}function r_(t){return t!==t.root&&t.scroll?.wasRoot}let rR=ro({attachResizeListener:(t,e)=>ne(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),rV={current:void 0},rL=ro({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rV.current){let t=new rR({});t.mount(window),t.setOptions({layoutScroll:!0}),rV.current=t}return rV.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function rD(t,e){let i=nn(t),s=new AbortController;return[i,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function rB(t,e,i){let{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover","Start"===i);let n=s["onHover"+i];n&&tL.postRender(()=>n(e,nf(e)))}class rO extends iO{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[s,n,r]=rD(t,i);return s.forEach(t=>{let i,s=!1,r=!1,o=()=>{t.removeEventListener("pointerleave",h)},a=t=>{i&&(i(t),i=void 0),o()},l=t=>{s=!1,window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l),r&&(r=!1,a(t))},h=t=>{if("touch"!==t.pointerType){if(s){r=!0;return}a(t)}};t.addEventListener("pointerenter",s=>{if("touch"===s.pointerType||s1.x||s1.y)return;r=!1;let o=e(t,s);"function"==typeof o&&(i=o,t.addEventListener("pointerleave",h,n))},n),t.addEventListener("pointerdown",()=>{s=!0,window.addEventListener("pointerup",l,n),window.addEventListener("pointercancel",l,n)},n)}),r}(t,(t,e)=>(rB(this.node,e,"Start"),t=>rB(this.node,t,"End"))))}unmount(){}}class rj extends iO{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&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=iW(ne(this.node.current,"focus",()=>this.onFocus()),ne(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let rF=(t,e)=>!!e&&(t===e||rF(t,e.parentElement)),rN=new WeakSet;function rI(t){return e=>{"Enter"===e.key&&t(e)}}function rU(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}let rq=(t,e)=>{let i=t.currentTarget;if(!i)return;let s=rI(()=>{if(rN.has(i))return;rU(i,"down");let t=rI(()=>{rU(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>rU(i,"cancel"),e)});i.addEventListener("keydown",s,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),e)};function rW(t){return np(t)&&!(s1.x||s1.y)}let r$=new WeakSet;function rz(t,e,i){let{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap","Start"===i);let n=s["onTap"+("End"===i?"":i)];n&&tL.postRender(()=>n(e,nf(e)))}class rH extends iO{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:e,propagate:i}=this.node.props;this.unmount=function(t,e,i={}){let[s,n,r]=rD(t,i),o=t=>{let s=t.currentTarget;if(!rW(t)||r$.has(t))return;rN.add(s),i.stopPropagation&&r$.add(t);let r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),rN.has(s)&&rN.delete(s),rW(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,s===window||s===document||i.useGlobalTarget||rF(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,n),window.addEventListener("pointercancel",l,n)};return s.forEach(t=>{(i.useGlobalTarget?window:t).addEventListener("pointerdown",o,n),!ni(t)||!("offsetHeight"in t)||"ownerSVGElement"in t||(t.addEventListener("focus",t=>rq(t,n)),s7.has(t.tagName)||!0===t.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}(t,(t,e)=>(rz(this.node,e,"Start"),(t,{success:e})=>rz(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:i?.tap===!1})}unmount(){}}let rZ=new WeakMap,rY=new WeakMap,rX=t=>{let e=rZ.get(t.target);e&&e(t)},rK=t=>{t.forEach(rX)},rG={some:0,all:1};class rJ extends iO{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:s="some",once:n}=t,r={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof s?s:rG[s]};this.stopObserver=function(t,e,i){let s=function({root:t,...e}){let i=t||document;rY.has(i)||rY.set(i,{});let s=rY.get(i),n=JSON.stringify(e);return s[n]||(s[n]=new IntersectionObserver(rK,{root:t,...e})),s[n]}(e);return rZ.set(t,i),s.observe(t),()=>{rZ.delete(t),s.unobserve(t)}}(this.node.current,r,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,n&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:s}=this.node.getProps(),r=e?i:s;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}let rQ=function(t,e){if("undefined"==typeof Proxy)return iB;let i=new Map,s=(i,s)=>iB(i,s,t,e);return new Proxy((t,e)=>s(t,e),{get:(n,r)=>"create"===r?s:(i.has(r)||i.set(r,iB(r,void 0,t,e)),i.get(r))})}({animation:{Feature:sJ},exit:{Feature:s0},inView:{Feature:rJ},tap:{Feature:rH},focus:{Feature:rj},hover:{Feature:rO},pan:{Feature:nB},drag:{Feature:nL,ProjectionNode:rL,MeasureLayout:nN},layout:{ProjectionNode:rL,MeasureLayout:nN}},(t,e)=>e.isSVG??il(t)?new eQ(e):new is(e,{allowProjection:t!==io.Fragment}))},8680:function(t,e,i){"use strict";let s,n;i.d(e,{io:function(){return tC}});var r,o,a={};i.r(a),i.d(a,{Decoder:function(){return tg},Encoder:function(){return ty},PacketType:function(){return o},isPacketValid:function(){return tx},protocol:function(){return tm}});let l=Object.create(null);l.open="0",l.close="1",l.ping="2",l.pong="3",l.message="4",l.upgrade="5",l.noop="6";let h=Object.create(null);Object.keys(l).forEach(t=>{h[l[t]]=t});let u={type:"error",data:"parser error"},c="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),d="function"==typeof ArrayBuffer,p=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,f=({type:t,data:e},i,s)=>c&&e instanceof Blob?i?s(e):m(e,s):d&&(e instanceof ArrayBuffer||p(e))?i?s(e):m(new Blob([e]),s):s(l[t]+(e||"")),m=(t,e)=>{let i=new FileReader;return i.onload=function(){e("b"+(i.result.split(",")[1]||""))},i.readAsDataURL(t)};function y(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<g.length;t++)v[g.charCodeAt(t)]=t;let b=t=>{let e=.75*t.length,i=t.length,s,n=0,r,o,a,l;"="===t[t.length-1]&&(e--,"="===t[t.length-2]&&e--);let h=new ArrayBuffer(e),u=new Uint8Array(h);for(s=0;s<i;s+=4)r=v[t.charCodeAt(s)],o=v[t.charCodeAt(s+1)],a=v[t.charCodeAt(s+2)],l=v[t.charCodeAt(s+3)],u[n++]=r<<2|o>>4,u[n++]=(15&o)<<4|a>>2,u[n++]=(3&a)<<6|63&l;return h},w="function"==typeof ArrayBuffer,x=(t,e)=>{if("string"!=typeof t)return{type:"message",data:k(t,e)};let i=t.charAt(0);return"b"===i?{type:"message",data:T(t.substring(1),e)}:h[i]?t.length>1?{type:h[i],data:t.substring(1)}:{type:h[i]}:u},T=(t,e)=>w?k(b(t),e):{base64:!0,data:t},k=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,S=(t,e)=>{let i=t.length,s=Array(i),n=0;t.forEach((t,r)=>{f(t,!1,t=>{s[r]=t,++n===i&&e(s.join("\x1e"))})})},E=(t,e)=>{let i=t.split("\x1e"),s=[];for(let t=0;t<i.length;t++){let n=x(i[t],e);if(s.push(n),"error"===n.type)break}return s};function A(t){return t.reduce((t,e)=>t+e.length,0)}function P(t,e){if(t[0].length===e)return t.shift();let i=new Uint8Array(e),s=0;for(let n=0;n<e;n++)i[n]=t[0][s++],s===t[0].length&&(t.shift(),s=0);return t.length&&s<t[0].length&&(t[0]=t[0].slice(s)),i}function C(t){if(t)return function(t){for(var e in C.prototype)t[e]=C.prototype[e];return t}(t)}C.prototype.on=C.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},C.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,s=this._callbacks["$"+t];if(!s)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<s.length;n++)if((i=s[n])===e||i.fn===e){s.splice(n,1);break}return 0===s.length&&delete this._callbacks["$"+t],this},C.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=Array(arguments.length-1),i=this._callbacks["$"+t],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(i){i=i.slice(0);for(var s=0,n=i.length;s<n;++s)i[s].apply(this,e)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},C.prototype.hasListeners=function(t){return!!this.listeners(t).length};let M="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),_="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function R(t,...e){return e.reduce((e,i)=>(t.hasOwnProperty(i)&&(e[i]=t[i]),e),{})}let V=_.setTimeout,L=_.clearTimeout;function D(t,e){e.useNativeTimers?(t.setTimeoutFn=V.bind(_),t.clearTimeoutFn=L.bind(_)):(t.setTimeoutFn=_.setTimeout.bind(_),t.clearTimeoutFn=_.clearTimeout.bind(_))}function B(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class O extends Error{constructor(t,e,i){super(t),this.description=e,this.context=i,this.type="TransportError"}}class j extends C{constructor(t){super(),this.writable=!1,D(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,i){return super.emitReserved("error",new O(t,e,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let e=x(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){let t=this.opts.hostname;return -1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){let e=function(t){let e="";for(let i in t)t.hasOwnProperty(i)&&(e.length&&(e+="&"),e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return e}(t);return e.length?"?"+e:""}}class F extends j{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){E(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,S(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=B()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let N=!1;try{N="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}let I=N;function U(){}class q extends F{constructor(t){if(super(t),"undefined"!=typeof location){let e="https:"===location.protocol,i=location.port;i||(i=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,e){let i=this.request({method:"POST",data:t});i.on("success",e),i.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class W extends C{constructor(t,e,i){super(),this.createRequest=t,D(this,i),this._opts=i,this._method=i.method||"GET",this._uri=e,this._data=void 0!==i.data?i.data:null,this._create()}_create(){var t;let e=R(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;let i=this._xhr=this.createRequest(e);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let t in i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&i.setRequestHeader(t,this._opts.extraHeaders[t])}catch(t){}if("POST"===this._method)try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{i.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var t;3===i.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(i.getResponseHeader("set-cookie"))),4===i.readyState&&(200===i.status||1223===i.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof i.status?i.status:0)},0))},i.send(this._data)}catch(t){this.setTimeoutFn(()=>{this._onError(t)},0);return}"undefined"!=typeof document&&(this._index=W.requestsCount++,W.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=U,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete W.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function $(){for(let t in W.requests)W.requests.hasOwnProperty(t)&&W.requests[t].abort()}W.requestsCount=0,W.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",$):"function"==typeof addEventListener&&addEventListener("onpagehide"in _?"pagehide":"unload",$,!1));let z=function(){let t=Z({xdomain:!1});return t&&null!==t.responseType}();class H extends q{constructor(t){super(t);let e=t&&t.forceBase64;this.supportsBinary=z&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new W(Z,this.uri(),t)}}function Z(t){let e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||I))return new XMLHttpRequest}catch(t){}if(!e)try{return new _[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(t){}}let Y="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class X extends j{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,i=Y?{}:R(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let i=t[e],s=e===t.length-1;f(i,this.supportsBinary,t=>{try{this.doWrite(i,t)}catch(t){}s&&M(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=B()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}let K=_.WebSocket||_.MozWebSocket;class G extends X{createSocket(t,e,i){return Y?new K(t,e,i):e?new K(t,e):new K(t)}doWrite(t,e){this.ws.send(e)}}class J extends j{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let e=function(t,e){n||(n=new TextDecoder);let i=[],s=0,r=-1,o=!1;return new TransformStream({transform(a,l){for(i.push(a);;){if(0===s){if(1>A(i))break;let t=P(i,1);o=(128&t[0])==128,s=(r=127&t[0])<126?3:126===r?1:2}else if(1===s){if(2>A(i))break;let t=P(i,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),s=3}else if(2===s){if(8>A(i))break;let t=P(i,8),e=new DataView(t.buffer,t.byteOffset,t.length),n=e.getUint32(0);if(n>2097151){l.enqueue(u);break}r=4294967296*n+e.getUint32(4),s=3}else{if(A(i)<r)break;let t=P(i,r);l.enqueue(x(o?t:n.decode(t),e)),s=0}if(0===r||r>t){l.enqueue(u);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(e).getReader(),r=new TransformStream({transform(t,e){var i;i=i=>{let s;let n=i.length;if(n<126)new DataView((s=new Uint8Array(1)).buffer).setUint8(0,n);else if(n<65536){let t=new DataView((s=new Uint8Array(3)).buffer);t.setUint8(0,126),t.setUint16(1,n)}else{let t=new DataView((s=new Uint8Array(9)).buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(n))}t.data&&"string"!=typeof t.data&&(s[0]|=128),e.enqueue(s),e.enqueue(i)},c&&t.data instanceof Blob?t.data.arrayBuffer().then(y).then(i):d&&(t.data instanceof ArrayBuffer||p(t.data))?i(y(t.data)):f(t,!1,t=>{s||(s=new TextEncoder),i(s.encode(t))})}});r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();let o=()=>{i.read().then(({done:t,value:e})=>{t||(this.onPacket(e),o())}).catch(t=>{})};o();let a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let i=t[e],s=e===t.length-1;this._writer.write(i).then(()=>{s&&M(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this._transport)||void 0===t||t.close()}}let Q={websocket:G,webtransport:J,polling:H},tt=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,te=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ti(t){if(t.length>8e3)throw"URI too long";let e=t,i=t.indexOf("["),s=t.indexOf("]");-1!=i&&-1!=s&&(t=t.substring(0,i)+t.substring(i,s).replace(/:/g,";")+t.substring(s,t.length));let n=tt.exec(t||""),r={},o=14;for(;o--;)r[te[o]]=n[o]||"";return -1!=i&&-1!=s&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=function(t,e){let i=e.replace(/\/{2,9}/g,"/").split("/");return("/"==e.slice(0,1)||0===e.length)&&i.splice(0,1),"/"==e.slice(-1)&&i.splice(i.length-1,1),i}(0,r.path),r.queryKey=function(t,e){let i={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,s){e&&(i[e]=s)}),i}(0,r.query),r}let ts="function"==typeof addEventListener&&"function"==typeof removeEventListener,tn=[];ts&&addEventListener("offline",()=>{tn.forEach(t=>t())},!1);class tr extends C{constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){let i=ti(t);e.hostname=i.host,e.secure="https"===i.protocol||"wss"===i.protocol,e.port=i.port,i.query&&(e.query=i.query)}else e.host&&(e.hostname=ti(e.host).host);D(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(t=>{let e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},i=t.split("&");for(let t=0,s=i.length;t<s;t++){let s=i[t].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}(this.opts.query)),ts&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},tn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);let i=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(0===this.transports.length){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&tr.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",tr.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let e=Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){let i=this.writeBuffer[e].data;if(i&&(t+="string"==typeof i?function(t){let e=0,i=0;for(let s=0,n=t.length;s<n;s++)(e=t.charCodeAt(s))<128?i+=1:e<2048?i+=2:e<55296||e>=57344?i+=3:(s++,i+=4);return i}(i):Math.ceil(1.33*(i.byteLength||i.size))),e>0&&t>this._maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,M(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,i){return this._sendPacket("message",t,e,i),this}send(t,e,i){return this._sendPacket("message",t,e,i),this}_sendPacket(t,e,i,s){if("function"==typeof e&&(s=e,e=void 0),"function"==typeof i&&(s=i,i=null),"closing"===this.readyState||"closed"===this.readyState)return;(i=i||{}).compress=!1!==i.compress;let n={type:t,data:e,options:i};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),s&&this.once("flush",s),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},i=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(tr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ts&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let t=tn.indexOf(this._offlineEventListener);-1!==t&&tn.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}tr.protocol=4;class to extends tr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),i=!1;tr.priorWebsocketSuccess=!1;let s=()=>{i||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!i){if("pong"===t.type&&"probe"===t.data)this.upgrading=!0,this.emitReserved("upgrading",e),e&&(tr.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{i||"closed"===this.readyState||(h(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}));else{let t=Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}}))};function n(){i||(i=!0,h(),e.close(),e=null)}let r=t=>{let i=Error("probe error: "+t);i.transport=e.name,n(),this.emitReserved("upgradeError",i)};function o(){r("transport closed")}function a(){r("socket closed")}function l(t){e&&t.name!==e.name&&n()}let h=()=>{e.removeListener("open",s),e.removeListener("error",r),e.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};e.once("open",s),e.once("error",r),e.once("close",o),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{i||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let e=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&e.push(t[i]);return e}}class ta extends to{constructor(t,e={}){let i="object"==typeof t?t:e;(!i.transports||i.transports&&"string"==typeof i.transports[0])&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(t=>Q[t]).filter(t=>!!t)),super(t,i)}}ta.protocol;let tl="function"==typeof ArrayBuffer,th=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,tu=Object.prototype.toString,tc="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===tu.call(Blob),td="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===tu.call(File);function tp(t){return tl&&(t instanceof ArrayBuffer||th(t))||tc&&t instanceof Blob||td&&t instanceof File}let tf=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],tm=5;(r=o||(o={}))[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK";class ty{constructor(t){this.replacer=t}encode(t){return(t.type===o.EVENT||t.type===o.ACK)&&function t(e,i){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let i=0,s=e.length;i<s;i++)if(t(e[i]))return!0;return!1}if(tp(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1==arguments.length)return t(e.toJSON(),!0);for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t(e[i]))return!0;return!1}(t)?this.encodeAsBinary({type:t.type===o.EVENT?o.BINARY_EVENT:o.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===o.BINARY_EVENT||t.type===o.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){let e=function(t){let e=[],i=t.data;return t.data=function t(e,i){if(!e)return e;if(tp(e)){let t={_placeholder:!0,num:i.length};return i.push(e),t}if(Array.isArray(e)){let s=Array(e.length);for(let n=0;n<e.length;n++)s[n]=t(e[n],i);return s}if("object"==typeof e&&!(e instanceof Date)){let s={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=t(e[n],i));return s}return e}(i,e),t.attachments=e.length,{packet:t,buffers:e}}(t),i=this.encodeAsString(e.packet),s=e.buffers;return s.unshift(i),s}}class tg extends C{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}:t)}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let i=(e=this.decodeString(t)).type===o.BINARY_EVENT;i||e.type===o.BINARY_ACK?(e.type=i?o.EVENT:o.ACK,this.reconstructor=new tv(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(tp(t)||t.base64){if(this.reconstructor)(e=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw Error("got binary data when not reconstructing a packet")}else throw Error("Unknown type: "+t)}decodeString(t){let e=0,i={type:Number(t.charAt(0))};if(void 0===o[i.type])throw Error("unknown packet type "+i.type);if(i.type===o.BINARY_EVENT||i.type===o.BINARY_ACK){let s=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);let n=t.substring(s,e);if(n!=Number(n)||"-"!==t.charAt(e))throw Error("Illegal attachments");let r=Number(n);if(!tb(r)||r<0)throw Error("Illegal attachments");if(r>this.opts.maxAttachments)throw Error("too many attachments");i.attachments=r}if("/"===t.charAt(e+1)){let s=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);i.nsp=t.substring(s,e)}else i.nsp="/";let s=t.charAt(e+1);if(""!==s&&Number(s)==s){let s=e+1;for(;++e;){let i=t.charAt(e);if(null==i||Number(i)!=i){--e;break}if(e===t.length)break}i.id=Number(t.substring(s,e+1))}if(t.charAt(++e)){let s=this.tryParse(t.substr(e));if(tg.isPayloadValid(i.type,s))i.data=s;else throw Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case o.CONNECT:return tw(e);case o.DISCONNECT:return void 0===e;case o.CONNECT_ERROR:return"string"==typeof e||tw(e);case o.EVENT:case o.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tf.indexOf(e[0]));case o.ACK:case o.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class tv{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e,i;let t=(e=this.reconPack,i=this.buffers,e.data=function t(e,i){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<i.length)return i[e.num];throw Error("illegal attachments")}if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=t(e[s],i);else if("object"==typeof e)for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=t(e[s],i));return e}(e.data,i),delete e.attachments,e);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}let tb=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function tw(t){return"[object Object]"===Object.prototype.toString.call(t)}function tx(t){var e;return"string"==typeof t.nsp&&(void 0===(e=t.id)||tb(e))&&function(t,e){switch(t){case o.CONNECT:return void 0===e||tw(e);case o.DISCONNECT:return void 0===e;case o.EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tf.indexOf(e[0]));case o.ACK:return Array.isArray(e);case o.CONNECT_ERROR:return"string"==typeof e||tw(e);default:return!1}}(t.type,t.data)}function tT(t,e,i){return t.on(e,i),function(){t.off(e,i)}}let tk=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class tS extends C{constructor(t,e,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[tT(t,"open",this.onopen.bind(this)),tT(t,"packet",this.onpacket.bind(this)),tT(t,"error",this.onerror.bind(this)),tT(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var i,s,n;if(tk.hasOwnProperty(t))throw Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;let r={type:o.EVENT,data:e};if(r.options={},r.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){let t=this.ids++,i=e.pop();this._registerAckCallback(t,i),r.id=t}let a=null===(s=null===(i=this.io.engine)||void 0===i?void 0:i.transport)||void 0===s?void 0:s.writable,l=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,e){var i;let s=null!==(i=this.flags.timeout)&&void 0!==i?i:this._opts.ackTimeout;if(void 0===s){this.acks[t]=e;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,Error("operation has timed out"))},s),r=(...t)=>{this.io.clearTimeoutFn(n),e.apply(this,t)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...e){return new Promise((i,s)=>{let n=(t,e)=>t?s(t):i(e);n.withError=!0,e.push(n),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());let i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...s)=>(this._queue[0],null!==t?i.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...s)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;let e=this._queue[0];(!e.pending||t)&&(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:o.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){let e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,Error("socket has been disconnected"))}})}onpacket(t){if(!(t.nsp!==this.nsp))switch(t.type){case o.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case o.EVENT:case o.BINARY_EVENT:this.onevent(t);break;case o.ACK:case o.BINARY_ACK:this.onack(t);break;case o.DISCONNECT:this.ondisconnect();break;case o.CONNECT_ERROR:this.destroy();let e=Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){let e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length)for(let e of this._anyListeners.slice())e.apply(this,t);super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){let e=this,i=!1;return function(...s){i||(i=!0,e.packet({type:o.ACK,id:t,data:s}))}}onack(t){let e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:o.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let e=this._anyListeners;for(let i=0;i<e.length;i++)if(t===e[i]){e.splice(i,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let e=this._anyOutgoingListeners;for(let i=0;i<e.length;i++)if(t===e[i]){e.splice(i,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let e of this._anyOutgoingListeners.slice())e.apply(this,t.data)}}function tE(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}tE.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),i=Math.floor(e*this.jitter*t);t=(1&Math.floor(10*e))==0?t-i:t+i}return 0|Math.min(t,this.max)},tE.prototype.reset=function(){this.attempts=0},tE.prototype.setMin=function(t){this.ms=t},tE.prototype.setMax=function(t){this.max=t},tE.prototype.setJitter=function(t){this.jitter=t};class tA extends C{constructor(t,e){var i;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,D(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(i=e.randomizationFactor)&&void 0!==i?i:.5),this.backoff=new tE({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;let s=e.parser||a;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new ta(this.uri,this.opts);let e=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;let s=tT(e,"open",function(){i.onopen(),t&&t()}),n=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},r=tT(e,"error",n);if(!1!==this._timeout){let t=this._timeout,i=this.setTimeoutFn(()=>{s(),n(Error("timeout")),e.close()},t);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}return this.subs.push(s),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(tT(t,"ping",this.onping.bind(this)),tT(t,"data",this.ondata.bind(this)),tT(t,"error",this.onerror.bind(this)),tT(t,"close",this.onclose.bind(this)),tT(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){M(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new tS(this,t,e),this.nsps[t]=i),i}_destroy(t){for(let t of Object.keys(this.nsps))if(this.nsps[t].active)return;this._close()}_packet(t){let e=this.encoder.encode(t);for(let i=0;i<e.length;i++)this.engine.write(e[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var i;this.cleanup(),null===(i=this.engine)||void 0===i||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let e=this.backoff.duration();this._reconnecting=!0;let i=this.setTimeoutFn(()=>{!t.skipReconnect&&(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}let tP={};function tC(t,e){let i;"object"==typeof t&&(e=t,t=void 0);let s=function(t,e="",i){let s=t;i=i||"undefined"!=typeof location&&location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==i?i.protocol+"//"+t:"https://"+t),s=ti(t)),!s.port&&(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";let n=-1!==s.host.indexOf(":")?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+e,s.href=s.protocol+"://"+n+(i&&i.port===s.port?"":":"+s.port),s}(t,(e=e||{}).path||"/socket.io"),n=s.source,r=s.id,o=s.path,a=tP[r]&&o in tP[r].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||a?i=new tA(n,e):(tP[r]||(tP[r]=new tA(n,e)),i=tP[r]),s.query&&!e.query&&(e.query=s.queryKey),i.socket(s.path,e)}Object.assign(tC,{Manager:tA,Socket:tS,io:tC,connect:tC})},3011:function(t,e,i){"use strict";i.d(e,{U:function(){return l}});var s=i(2265);let n=t=>{let e;let i=new Set,s=(t,s)=>{let n="function"==typeof t?t(e):t;if(!Object.is(n,e)){let t=e;e=(null!=s?s:"object"!=typeof n||null===n)?n:Object.assign({},e,n),i.forEach(i=>i(e,t))}},n=()=>e,r={setState:s,getState:n,getInitialState:()=>o,subscribe:t=>(i.add(t),()=>i.delete(t))},o=e=t(s,n,r);return r},r=t=>t?n(t):n,o=t=>t,a=t=>{let e=r(t),i=t=>(function(t,e=o){let i=s.useSyncExternalStore(t.subscribe,s.useCallback(()=>e(t.getState()),[t,e]),s.useCallback(()=>e(t.getInitialState()),[t,e]));return s.useDebugValue(i),i})(e,t);return Object.assign(i,e),i},l=t=>t?a(t):a}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[23],{1171:function(t,e,a){a.d(e,{N:function(){return n}});var o=a(2265);function n(t,e){let a=(0,o.useRef)(null);return{overlayProps:{onMouseDown:(0,o.useCallback)(t=>{a.current=t.target},[]),onClick:(0,o.useCallback)(o=>{null!=e&&e.disabled||(a.current===o.currentTarget&&o.target===o.currentTarget&&t(),a.current=null)},[t,null==e?void 0:e.disabled])}}}},9116:function(t,e,a){a.d(e,{h:function(){return r}});let o=a(257).env.NEXT_PUBLIC_API_URL||"http://localhost:5555";async function n(t,e){let a=await fetch("".concat(o).concat(t),{headers:{"Content-Type":"application/json"},...e}),n=await a.json();if(!a.ok||!n.ok)throw Error(n.error||"API error: ".concat(a.status));return n.data}let r={getHealth:async()=>(await fetch("".concat(o,"/api/health"))).json(),listProjects:()=>n("/api/projects"),getProject:t=>n("/api/projects/".concat(t)),createProject:t=>n("/api/projects",{method:"POST",body:JSON.stringify(t)}),updateProject:(t,e)=>n("/api/projects/".concat(t),{method:"PATCH",body:JSON.stringify(e)}),deleteProject:t=>n("/api/projects/".concat(t),{method:"DELETE"}),permanentDeleteProject:t=>n("/api/projects/".concat(t,"/permanent"),{method:"DELETE"}),listWorkItems:t=>n("/api/projects/".concat(t,"/work-items")),getWorkItem:(t,e)=>n("/api/projects/".concat(t,"/work-items/").concat(e)),createWorkItem:(t,e)=>n("/api/projects/".concat(t,"/work-items"),{method:"POST",body:JSON.stringify(e)}),updateWorkItem:(t,e,a)=>n("/api/projects/".concat(t,"/work-items/").concat(e),{method:"PATCH",body:JSON.stringify(a)}),deleteWorkItem:(t,e)=>n("/api/projects/".concat(t,"/work-items/").concat(e),{method:"DELETE"}),createTask:(t,e,a)=>n("/api/projects/".concat(t,"/work-items/").concat(e,"/tasks"),{method:"POST",body:JSON.stringify(a)}),updateTask:(t,e,a,o)=>n("/api/projects/".concat(t,"/work-items/").concat(e,"/tasks/").concat(a),{method:"PATCH",body:JSON.stringify(o)}),moveTask:(t,e,a,o)=>n("/api/projects/".concat(t,"/work-items/").concat(e,"/tasks/").concat(a,"/move"),{method:"POST",body:JSON.stringify(o)}),deleteTask:(t,e,a)=>n("/api/projects/".concat(t,"/work-items/").concat(e,"/tasks/").concat(a),{method:"DELETE"}),getAgents:()=>n("/api/agents"),suggestAgent:t=>n("/api/agents/suggest?tags=".concat(t.map(encodeURIComponent).join(",")))}},6766:function(t,e,a){a.d(e,{h:function(){return s},l:function(){return l}});var o=a(8680);let n=a(257).env.NEXT_PUBLIC_API_URL||"http://localhost:5555",r=null;function s(){return r||(r=(0,o.io)(n,{transports:["websocket","polling"],autoConnect:!0,reconnection:!0,reconnectionDelay:1e3,reconnectionAttempts:10})),r}function l(){r&&(r.disconnect(),r=null)}},2569:function(t,e,a){a.d(e,{q:function(){return i}});var o=a(3011),n=a(257);let r={status:"idle",runId:null,projectSlug:null,workItemSlug:null,currentTaskId:null,currentTaskTitle:null,inputNeeded:null,stats:{total:0,completed:0,failed:0,skipped:0,startedAt:null},output:[]},s={active:!1,projectSlug:null,workers:[],metrics:null,logs:[],workerLogs:{},inputNeeded:null,coordinatorThinking:[],coordinatorToolCalls:[],coordinatorStatus:"idle",completionMessage:null},l={active:!1,projectSlug:null,messages:[],discoveredItems:[],escalation:null,escalationMessageId:null},c=n.env.NEXT_PUBLIC_API_URL||"http://localhost:5555",i=(0,o.U)((t,e)=>({ralph:{...r},setRalphState:e=>t(t=>({ralph:{...t.ralph,...e}})),appendRalphOutput:e=>t(t=>({ralph:{...t.ralph,output:[...t.ralph.output.slice(-500),e]}})),resetRalph:()=>t({ralph:{...r}}),onRalphStarted:e=>t({ralph:{status:"running",runId:null,projectSlug:e.projectSlug,workItemSlug:null,currentTaskId:null,currentTaskTitle:null,inputNeeded:null,stats:{total:e.total,completed:0,failed:0,skipped:0,startedAt:new Date().toISOString()},output:[]}}),onRalphProgress:e=>t(t=>{var a,o;return{ralph:{...t.ralph,status:"running",currentTaskId:(null===(a=e.currentTask)||void 0===a?void 0:a.id)||null,currentTaskTitle:(null===(o=e.currentTask)||void 0===o?void 0:o.title)||null,stats:{...t.ralph.stats,total:e.total}}}}),onRalphOutput:t=>{e().appendRalphOutput(t.message)},onRalphCompleted:()=>t(t=>({ralph:{...t.ralph,status:"idle",currentTaskId:null,currentTaskTitle:null}})),onRalphError:t=>{t.message&&e().appendRalphOutput("ERROR: ".concat(t.message))},onRalphInputNeeded:e=>t(t=>({ralph:{...t.ralph,inputNeeded:e}})),clearRalphInput:()=>t(t=>({ralph:{...t.ralph,inputNeeded:null}})),teams:{...s},onTeamsStarted:e=>t({teams:{...s,active:!0,projectSlug:e.projectSlug,logs:["Teams started: ".concat(e.workItemSlugs.length," work items, ").concat(e.maxWorkers," workers")]}}),onTeamsWorkerAssigned:e=>t(t=>{let a={id:e.workerId,taskId:e.taskId,taskTitle:e.taskTitle,agentName:e.agentName,workItemSlug:e.workItemSlug,status:"running"};return{teams:{...t.teams,workers:[...t.teams.workers,a],logs:[...t.teams.logs,"".concat(e.agentName||"Worker"," → ").concat(e.taskTitle)]}}}),onTeamsWorkerCompleted:e=>t(t=>{let a=t.teams.workers.map(t=>t.id===e.workerId?{...t,status:e.status}:t);return{teams:{...t.teams,workers:a,logs:[...t.teams.logs,"".concat("completed"===e.status?"✓":"✗"," Task ").concat(e.taskId)]}}}),onTeamsMetrics:e=>t(t=>({teams:{...t.teams,metrics:e}})),onTeamsOutput:e=>t(t=>{let a=e.workerId?"[".concat(e.workerId.slice(-4),"] "):"",o={...t.teams.workerLogs};if(e.workerId&&"coordinator"!==e.workerId){let t=o[e.workerId]||[];o[e.workerId]=[...t.slice(-1e3),e.message]}return{teams:{...t.teams,logs:[...t.teams.logs.slice(-500),"".concat(a).concat(e.message)],workerLogs:o}}}),onTeamsStopped:e=>t(t=>({teams:{...t.teams,active:!1,inputNeeded:null,logs:[...t.teams.logs,"\n--- ".concat(e.message," ---")]}})),onTeamsInputNeeded:e=>t(t=>({teams:{...t.teams,inputNeeded:e}})),clearTeamsInput:()=>t(t=>({teams:{...t.teams,inputNeeded:null}})),resetTeams:()=>t({teams:{...s}}),onCoordinatorThinking:e=>t(t=>({teams:{...t.teams,coordinatorThinking:[...t.teams.coordinatorThinking.slice(-200),e.text],coordinatorStatus:"thinking"}})),onCoordinatorToolCall:e=>t(t=>{var a;return{teams:{...t.teams,coordinatorToolCalls:[...t.teams.coordinatorToolCalls.slice(-30),{tool:e.tool,input:e.input,timestamp:new Date().toISOString()}],coordinatorStatus:"calling-tool",logs:[...t.teams.logs,"\uD83D\uDD27 ".concat(e.tool).concat((null===(a=e.input)||void 0===a?void 0:a.taskId)?" → ".concat(e.input.taskId):"")]}}}),onCoordinatorCompleted:e=>t(t=>({teams:{...t.teams,active:!1,coordinatorStatus:"completed",completionMessage:e.message,logs:[...t.teams.logs,"\n--- ".concat(e.message," ---")]}})),terminal:{status:"idle",output:[],projectSlug:null},appendTerminalOutput:e=>t(t=>({terminal:{...t.terminal,output:[...t.terminal.output.slice(-500),e]}})),setTerminalStatus:e=>t(t=>({terminal:{...t.terminal,status:e}})),resetTerminal:()=>t({terminal:{status:"idle",output:[],projectSlug:null}}),escalation:null,onEscalationCreated:e=>t({escalation:e}),onEscalationResponded:()=>t({escalation:null}),onEscalationTimeout:()=>t({escalation:null}),planner:{...l},onPlannerStarted:e=>t({planner:{...l,active:!0,projectSlug:e.projectSlug}}),onPlannerMessage:e=>t(t=>({planner:{...t.planner,messages:[...t.planner.messages.slice(-200),{id:e.id,role:e.role,content:e.content,timestamp:new Date().toISOString()}]}})),onPlannerItemDiscovered:e=>t(t=>({planner:{...t.planner,discoveredItems:[...t.planner.discoveredItems,{id:e.id,title:e.title,category:e.category,status:"identified",plan:null,tasks:[],approvedAs:null}]}})),onPlannerItemUpdated:e=>t(t=>({planner:{...t.planner,discoveredItems:t.planner.discoveredItems.map(t=>{var a,o;return t.id===e.id?{...t,status:e.status,plan:null!==(a=e.plan)&&void 0!==a?a:t.plan,tasks:null!==(o=e.tasks)&&void 0!==o?o:t.tasks}:t})}})),onPlannerEscalation:e=>t(t=>({planner:{...t.planner,escalation:{id:e.id,source:"planner",taskId:e.taskId,taskTitle:e.taskTitle,question:e.question,options:e.options,timeoutMs:e.timeoutMs},escalationMessageId:e.messageId||null}})),onPlannerEscalationResponded:e=>t(t=>({planner:{...t.planner,escalation:null,escalationMessageId:null,messages:t.planner.messages.map(a=>a.id===t.planner.escalationMessageId?{...a,respondedWith:e}:a)}})),onPlannerItemApproved:e=>t(t=>({planner:{...t.planner,discoveredItems:t.planner.discoveredItems.map(t=>t.id===e.id?{...t,approvedAs:e.workItemSlug}:t)}})),onPlannerStopped:()=>t(t=>({planner:{...t.planner,active:!1,escalation:null,escalationMessageId:null}})),isSystemBusy:()=>{let t=e();return"running"===t.ralph.status||"paused"===t.ralph.status||t.teams.active||"running"===t.terminal.status||t.planner.active},rehydrate:async()=>{try{var e;let[a,o,n]=await Promise.all([fetch("".concat(c,"/api/ralph/state")).then(t=>t.json()).catch(()=>null),fetch("".concat(c,"/api/teams/state")).then(t=>t.json()).catch(()=>null),fetch("".concat(c,"/api/planner/state")).then(t=>t.json()).catch(()=>null)]);if((null==a?void 0:a.ok)&&a.data){let e=a.data;t(t=>({ralph:{...t.ralph,status:"stopping"===e.status?"idle":e.status,runId:e.runId,projectSlug:e.projectSlug,workItemSlug:e.workItemSlug,currentTaskId:e.currentTaskId,currentTaskTitle:e.currentTaskTitle,stats:e.stats}}))}(null==o?void 0:o.ok)&&o.data&&t(t=>({teams:{...t.teams,active:o.data.active}})),(null==n?void 0:n.ok)&&(null===(e=n.data)||void 0===e?void 0:e.active)&&t(t=>({planner:{...t.planner,active:!0,projectSlug:n.data.projectSlug,messages:n.data.messages||[],discoveredItems:n.data.discoveredItems||[]}}))}catch(t){}}}))},9747:function(t,e,a){a.d(e,{i:function(){return r}});var o=a(3011),n=a(9116);let r=(0,o.U)((t,e)=>({projects:[],activeSlug:null,loading:!1,error:null,setActiveSlug:e=>t({activeSlug:e}),fetchProjects:async()=>{t({loading:!0,error:null});try{let e=await n.h.listProjects();t({projects:e,loading:!1})}catch(e){t({error:e.message,loading:!1})}},createProject:async e=>{let a=await n.h.createProject(e);return t(t=>t.projects.some(t=>t.id===a.id)?{}:{projects:[a,...t.projects]}),a},updateProject:async(e,a)=>{let o=await n.h.updateProject(e,a);t(t=>({projects:t.projects.map(t=>t.slug===e?o:t)}))},deleteProject:async e=>{let a=await n.h.deleteProject(e);t(t=>({projects:t.projects.map(t=>t.slug===e?a:t),activeSlug:t.activeSlug===e?null:t.activeSlug}))},permanentDeleteProject:async e=>{await n.h.permanentDeleteProject(e),t(t=>({projects:t.projects.filter(t=>t.slug!==e),activeSlug:t.activeSlug===e?null:t.activeSlug}))},onProjectUpdated:e=>{t(t=>t.projects.some(t=>t.id===e.id)?{projects:t.projects.map(t=>t.id===e.id?e:t)}:{projects:[e,...t.projects]})},onProjectDeleted:e=>{t(t=>({projects:t.projects.filter(t=>t.slug!==e),activeSlug:t.activeSlug===e?null:t.activeSlug}))}}))},9449:function(t,e,a){a.d(e,{U:function(){return l}});var o=a(3011),n=a(2569);let r=new Map;function s(t,e){let a=n.q.getState();t&&r.set(t,{terminal:{...a.terminal},ralph:{...a.ralph},teams:{...a.teams}});let o=r.get(e);o?n.q.setState({terminal:o.terminal,ralph:o.ralph,teams:o.teams}):(a.resetTerminal(),a.resetRalph(),a.resetTeams())}let l=(0,o.U)((t,e)=>({projectSlug:null,workItemSlug:null,view:"work-items",goToProject:a=>{let o=e().projectSlug;o!==a&&s(o,a),t({projectSlug:a,workItemSlug:null,view:"work-items"})},goToWorkItem:(a,o)=>{let n=e().projectSlug;n!==a&&s(n,a),t({projectSlug:a,workItemSlug:o,view:"board"})},goBack:()=>{e().workItemSlug?t({workItemSlug:null,view:"work-items"}):t({projectSlug:null,view:"work-items"})},goHome:()=>t({projectSlug:null,workItemSlug:null,view:"work-items"}),setView:e=>t({view:e})}))},9405:function(t,e,a){a.d(e,{E:function(){return r}});var o=a(3011);let n=0,r=(0,o.U)(t=>({toasts:[],addToast:function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",o="toast-".concat(++n);t(t=>({toasts:[...t.toasts,{id:o,message:e,type:a}]})),setTimeout(()=>{t(t=>({toasts:t.toasts.filter(t=>t.id!==o)}))},3e3)},removeToast:e=>{t(t=>({toasts:t.toasts.filter(t=>t.id!==e)}))}}))},15:function(t,e,a){a.d(e,{o:function(){return r}});var o=a(3011),n=a(9116);let r=(0,o.U)((t,e)=>({workItems:[],projectSlug:null,loading:!1,error:null,fetchWorkItems:async e=>{t({loading:!0,error:null,projectSlug:e});try{let a=await n.h.listWorkItems(e);t({workItems:a,loading:!1})}catch(e){t({error:e.message,loading:!1})}},createWorkItem:async(e,a)=>{let o=await n.h.createWorkItem(e,a);return t(t=>({workItems:[o,...t.workItems]})),o},updateWorkItem:async(e,a,o)=>{let r=await n.h.updateWorkItem(e,a,o);t(t=>({workItems:t.workItems.map(t=>t.id===r.id||t.slug===a?r:t)}))},deleteWorkItem:async(e,a)=>{await n.h.deleteWorkItem(e,a),t(t=>({workItems:t.workItems.filter(t=>t.slug!==a&&t.id!==a)}))},onWorkItemUpdated:(a,o)=>{e().projectSlug===a&&t(t=>t.workItems.some(t=>t.id===o.id)?{workItems:t.workItems.map(t=>t.id===o.id?o:t)}:{workItems:[o,...t.workItems]})},onWorkItemDeleted:(a,o)=>{e().projectSlug===a&&t(t=>({workItems:t.workItems.filter(t=>t.id!==o&&t.slug!==o)}))},clear:()=>t({workItems:[],projectSlug:null,loading:!1,error:null})}))}}]);
|