(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31579,t=>{var e=t.i(43476),i=t.i(95187);let n=(0,i.createServerReference)("00f71bace9cbbcd7b92dc54c4d3f2ae2d92494a29f",i.callServer,void 0,i.findSourceMapURL,"transferCart");var r=t.i(71645),s=Object.defineProperty,a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(t,e,i)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;let h=r.forwardRef((t,e)=>{var{color:i="currentColor"}=t,n=((t,e)=>{var i={};for(var n in t)o.call(t,n)&&0>e.indexOf(n)&&(i[n]=t[n]);if(null!=t&&a)for(var n of a(t))0>e.indexOf(n)&&l.call(t,n)&&(i[n]=t[n]);return i})(t,["color"]);return r.createElement("svg",((t,e)=>{for(var i in e||(e={}))o.call(e,i)&&u(t,i,e[i]);if(a)for(var i of a(e))l.call(e,i)&&u(t,i,e[i]);return t})({xmlns:"http://www.w3.org/2000/svg",width:15,height:15,viewBox:"0 0 15 15",fill:"none",ref:e},n),r.createElement("g",{clipPath:"url(#a)"},r.createElement("path",{fill:i,d:"M7.5.389C3.58.389.389 3.579.389 7.5s3.19 7.111 7.111 7.111 7.111-3.19 7.111-7.111S11.421.389 7.5.389m-.667 3.939a.667.667 0 0 1 1.334 0v3.679a.667.667 0 0 1-1.334 0zm.667 7.098a.89.89 0 0 1 0-1.778.89.89 0 0 1 0 1.778"})),r.createElement("defs",null,r.createElement("clipPath",{id:"a"},r.createElement("path",{fill:"#fff",d:"M0 0h15v15H0z"}))))});h.displayName="ExclamationCircleSolid";var c=t.i(7693);t.s(["default",0,function(t){let{customer:i,cart:s}=t,[a,o]=(0,r.useState)(!1),[l,u]=(0,r.useState)("Run transfer again");if(!i||s.customer_id)return;let d=async()=>{try{o(!0),u("Transferring.."),await n()}catch{u("Run transfer again"),o(!1)}};return(0,e.jsx)("div",{className:"flex items-center justify-center small:p-4 p-2 text-center bg-orange-300 small:gap-2 gap-1 text-sm mt-2 text-orange-800",children:(0,e.jsxs)("div",{className:"flex flex-col small:flex-row small:gap-2 gap-1 items-center",children:[(0,e.jsxs)("span",{className:"flex items-center gap-1",children:[(0,e.jsx)(h,{className:"inline"}),"Something went wrong when we tried to transfer your cart"]}),(0,e.jsx)("span",{children:"·"}),(0,e.jsx)(c.K,{variant:"transparent",className:"hover:bg-transparent active:bg-transparent focus:bg-transparent disabled:text-orange-500 text-orange-950 p-0 bg-transparent",size:"medium",disabled:a,onClick:d,children:l})]})})}],31579)},85812,t=>{var e=t.i(43476),i=t.i(21373),n=t.i(71645);t.s(["default",0,()=>{let[t,r]=(0,n.useState)(!1),[s,a]=(0,n.useState)(1),[o,l]=(0,n.useState)(!1),[u,h]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{document.documentElement.classList.add("evs-js")},[]),(0,n.useEffect)(()=>{document.documentElement.style.fontSize=`${16*s}px`},[s]),(0,n.useEffect)(()=>{o?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast")},[o]),(0,n.useEffect)(()=>{u?document.documentElement.classList.add("highlight-links"):document.documentElement.classList.remove("highlight-links")},[u]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"jsx-dd4b1b773c5a5c4e fixed bottom-6 left-6 z-50 flex flex-col gap-3",children:[(0,e.jsx)("button",{onClick:()=>r(!t),"aria-label":"תפריט נגישות","aria-expanded":t,className:"jsx-dd4b1b773c5a5c4e float-btn float-access w-14 h-14 rounded-full bg-white border border-[var(--br)] shadow-lg flex items-center justify-center text-2xl hover:shadow-xl hover:-translate-y-1 transition-all duration-300",children:"♿"}),(0,e.jsx)("a",{href:"tel:0587115141","aria-label":"חיוג מהיר: 058-711-5141",className:"jsx-dd4b1b773c5a5c4e float-btn float-phone w-14 h-14 rounded-full bg-[var(--p)] shadow-lg flex items-center justify-center text-white text-xl hover:shadow-xl hover:-translate-y-1 hover:bg-[var(--pd)] transition-all duration-300",children:"📞"}),(0,e.jsx)("a",{href:"https://wa.me/972587115141",target:"_blank",rel:"noopener noreferrer","aria-label":"WhatsApp: 058-711-5141",className:"jsx-dd4b1b773c5a5c4e float-btn float-wa w-14 h-14 rounded-full bg-[#25D366] shadow-lg flex items-center justify-center text-white text-xl hover:shadow-xl hover:-translate-y-1 hover:bg-[#1ea856] transition-all duration-300",children:"💬"})]}),t&&(0,e.jsxs)("div",{role:"dialog","aria-label":"תפריט נגישות",className:"jsx-dd4b1b773c5a5c4e fixed bottom-6 left-6 z-40 w-72 bg-white rounded-[16px] border border-[var(--br)] shadow-xl p-4 animate-fade-in",children:[(0,e.jsxs)("div",{className:"jsx-dd4b1b773c5a5c4e flex items-center justify-between mb-4",children:[(0,e.jsx)("h4",{className:"jsx-dd4b1b773c5a5c4e font-bold text-[var(--dk)]",children:"תפריט נגישות"}),(0,e.jsx)("button",{onClick:()=>r(!1),"aria-label":"סגור תפריט נגישות",className:"jsx-dd4b1b773c5a5c4e text-[var(--gr)] hover:text-[var(--dk)] text-xl leading-none",children:"×"})]}),(0,e.jsxs)("div",{className:"jsx-dd4b1b773c5a5c4e space-y-3",children:[(0,e.jsxs)("button",{onClick:()=>a(Math.min(s+.1,1.5)),className:"jsx-dd4b1b773c5a5c4e access-btn w-full text-right p-3 rounded-[10px] bg-[var(--bga)] hover:bg-[var(--pl)] transition-colors",children:["הגדלת טקסט (×",s.toFixed(1),")"]}),(0,e.jsx)("button",{onClick:()=>a(Math.max(s-.1,.8)),className:"jsx-dd4b1b773c5a5c4e access-btn w-full text-right p-3 rounded-[10px] bg-[var(--bga)] hover:bg-[var(--pl)] transition-colors",children:"הקטנת טקסט"}),(0,e.jsx)("button",{onClick:()=>l(!o),className:`jsx-dd4b1b773c5a5c4e access-btn w-full text-right p-3 rounded-[10px] transition-colors ${o?"bg-[var(--p)] text-white":"bg-[var(--bga)] hover:bg-[var(--pl)]"}`,children:"ניגודיות גבוהה"}),(0,e.jsx)("button",{onClick:()=>h(!u),className:`jsx-dd4b1b773c5a5c4e access-btn w-full text-right p-3 rounded-[10px] transition-colors ${u?"bg-[var(--p)] text-white":"bg-[var(--bga)] hover:bg-[var(--pl)]"}`,children:"הדגשת קישורים"}),(0,e.jsx)("button",{onClick:()=>{a(1),l(!1),h(!1)},className:"jsx-dd4b1b773c5a5c4e access-btn w-full text-right p-3 rounded-[10px] bg-[var(--gr)]/10 hover:bg-[var(--gr)]/20 text-[var(--gr)] transition-colors",children:"איפוס הגדרות"})]})]}),(0,e.jsx)(i.default,{id:"dd4b1b773c5a5c4e",children:".float-btn.jsx-dd4b1b773c5a5c4e{justify-content:center;align-items:center;display:flex}.animate-fade-in.jsx-dd4b1b773c5a5c4e{animation:.2s ease-out fadeIn}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.high-contrast.jsx-dd4b1b773c5a5c4e{filter:contrast(150%)brightness(110%)}.high-contrast.jsx-dd4b1b773c5a5c4e .jsx-dd4b1b773c5a5c4e{border-color:#fff!important}.highlight-links.jsx-dd4b1b773c5a5c4e a.jsx-dd4b1b773c5a5c4e{border-radius:4px;outline:3px solid gold!important}@media (width<=640px){.float-btn.jsx-dd4b1b773c5a5c4e{width:12px;height:12px;font-size:18px}.fixed.bottom-6.left-6.jsx-dd4b1b773c5a5c4e{bottom:16px;left:16px}}"})]})}])},33066,t=>{let e,i,n,r,s;var a=t.i(43476),o=t.i(21373),l=t.i(71645),u=t.i(18566);let h=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],c=new Set([...h,"pathRotation"]),d=(t,e,i)=>i>e?e:i"number"==typeof t,parse:parseFloat,transform:t=>t},f={...p,transform:t=>d(0,1,t)},m={...p,default:1},g=t=>Math.round(1e5*t)/1e5,v=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,y=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,x=(t,e)=>i=>!!("string"==typeof i&&y.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),b=(t,e,i)=>n=>{if("string"!=typeof n)return n;let[r,s,a,o]=n.match(v);return{[t]:parseFloat(r),[e]:parseFloat(s),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},w={...p,transform:t=>Math.round(d(0,255,t))},S={test:x("rgb","red"),parse:b("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+w.transform(t)+", "+w.transform(e)+", "+w.transform(i)+", "+g(f.transform(n))+")"},P=(t,e,i)=>{let n=t.substring(1+e*i,1+(e+1)*i);return i>1?n:n+n},T={test:x("#"),parse:function(t){let e=t.length>5?2:1,i=P(t,3,e);return{red:parseInt(P(t,0,e),16),green:parseInt(P(t,1,e),16),blue:parseInt(P(t,2,e),16),alpha:i?parseInt(i,16)/255:1}},transform:S.transform},j=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),k=j("deg"),E=j("%"),A=j("px"),M=j("vh"),C=j("vw"),V={...E,parse:t=>E.parse(t)/100,transform:t=>E.transform(100*t)},R={test:x("hsl","hue"),parse:b("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+E.transform(g(e))+", "+E.transform(g(i))+", "+g(f.transform(n))+")"},D={test:t=>S.test(t)||T.test(t)||R.test(t),parse:t=>S.test(t)?S.parse(t):R.test(t)?R.parse(t):T.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?S.transform(t):R.transform(t),getAnimatableNone:t=>{let e=D.parse(t);return e.alpha=0,D.transform(e)}},L=new RegExp(v.source),F=RegExp(/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu.source,"i"),N="number",B="color",I=/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+)(?![a-z]*\()/giu;function O(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},r=[],s=0,a=e.replace(I,t=>(D.test(t)?(n.color.push(s),r.push(B),i.push(D.parse(t))):t.startsWith("var(")?(n.var.push(s),r.push("var"),i.push(t)):(n.number.push(s),r.push(N),i.push(parseFloat(t))),++s,"${}")).split("${}");return{values:i,split:a,indexes:n,types:r}}function _({split:t,types:e}){let i=t.length;return n=>{let r="";for(let s=0;s((t,e)=>"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof t?0:D.test(t)?D.getAnimatableNone(t):t)(t,e.split[i])))}},$=new Set(["brightness","contrast","saturate","opacity"]);function z(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(v)||[];if(!n)return t;let r=i.replace(n,""),s=+!!$.has(e);return n!==i&&(s*=100),e+"("+s+r+")"}let W=/\b([a-z-]*)\(.*?\)/gu,H={...U,getAnimatableNone:t=>{let e=t.match(W);return e?e.map(z).join(" "):t}},Y={...U,getAnimatableNone:t=>{let e=U.parse(t);return U.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},K={...p,transform:Math.round},X={rotate:k,pathRotation:k,rotateX:k,rotateY:k,rotateZ:k,scale:m,scaleX:m,scaleY:m,scaleZ:m,skew:k,skewX:k,skewY:k,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:f,originX:V,originY:V,originZ:A},G={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,inset:A,insetBlock:A,insetBlockStart:A,insetBlockEnd:A,insetInline:A,insetInlineStart:A,insetInlineEnd:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,paddingBlock:A,paddingBlockStart:A,paddingBlockEnd:A,paddingInline:A,paddingInlineStart:A,paddingInlineEnd:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,marginBlock:A,marginBlockStart:A,marginBlockEnd:A,marginInline:A,marginInlineStart:A,marginInlineEnd:A,fontSize:A,backgroundPositionX:A,backgroundPositionY:A,...X,zIndex:K,fillOpacity:f,strokeOpacity:f,numOctaves:K},q={...G,color:D,backgroundColor:D,outlineColor:D,fill:D,stroke:D,borderColor:D,borderTopColor:D,borderRightColor:D,borderBottomColor:D,borderLeftColor:D,filter:H,WebkitFilter:H,mask:Y,WebkitMask:Y},Z=t=>q[t],J=()=>({translate:0,scale:1,origin:0,originPoint:0}),Q=()=>({x:J(),y:J()}),tt=()=>({min:0,max:0}),te=()=>({x:tt(),y:tt()}),ti=t=>!!(t&&t.getVelocity),tn=new Set(["width","height","top","left","right","bottom",...h]),tr=[p,A,E,k,C,M,{test:t=>"auto"===t,parse:t=>t}],ts=t=>tr.find(e=>e.test(t));var ta=t.i(47167);let to=t=>e=>"string"==typeof e&&e.startsWith(t),tl=to("--"),tu=to("var(--"),th=t=>!!tu(t)&&tc.test(t.split("/*")[0].trim()),tc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function td(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}let tp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tf(t,e,i=1){let[n,r]=function(t){let e=tp.exec(t);if(!e)return[,];let[,i,n,r]=e;return[`--${i??n}`,r]}(t);if(!n)return;let s=window.getComputedStyle(e).getPropertyValue(n);if(s){let t=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t)?parseFloat(t):t}return th(r)?tf(r,e,i+1):r}let tm=new Set([H,Y]);function tg(t,e){let i=Z(t);return tm.has(i)||(i=U),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let tv=t=>180*t/Math.PI,ty=t=>tb(tv(Math.atan2(t[1],t[0]))),tx={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ty,rotateZ:ty,skewX:t=>tv(Math.atan(t[1])),skewY:t=>tv(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tb=t=>((t%=360)<0&&(t+=360),t),tw=t=>Math.hypot(t[0],t[1]),tS=t=>Math.hypot(t[4],t[5]),tP={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tw,scaleY:tS,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(tw(t)+tS(t))/2,rotateX:t=>tb(tv(Math.atan2(t[6],t[5]))),rotateY:t=>tb(tv(Math.atan2(-t[2],t[0]))),rotateZ:ty,rotate:ty,skewX:t=>tv(Math.atan(t[4])),skewY:t=>tv(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tT(t){return+!!t.includes("scale")}function tj(t,e){if(!t||"none"===t)return tT(e);let i=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!i)return tT(e);let n=(i[1]?tP:tx)[e],r=i[2].split(",").map(t=>parseFloat(t));return"function"==typeof n?n(r):r[n]}let tk=t=>t===p||t===A,tE=new Set(["x","y","z"]),tA=h.filter(t=>!tE.has(t)),tM=new Set(["bottom","right"]);function tC(t,e,i,n,r,s){let a=parseFloat(t);if(!isNaN(a))return a;let{min:o,max:l}=e()[i],u=l-o;return"border-box"===s?u:u-parseFloat(n)-parseFloat(r)}let tV=({transform:t})=>tj(t,"x"),tR=({transform:t})=>tj(t,"y"),tD={width:({width:t,paddingLeft:e="0",paddingRight:i="0",boxSizing:n},r)=>tC(t,r,"x",e,i,n),height:({height:t,paddingTop:e="0",paddingBottom:i="0",boxSizing:n},r)=>tC(t,r,"y",e,i,n),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{let{y:i}=e();return parseFloat(t)+(i.max-i.min)},right:({left:t},e)=>{let{x:i}=e();return parseFloat(t)+(i.max-i.min)},x:tV,y:tR,translateX:tV,translateY:tR},tL=t=>t,tF={},tN=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tB(t,e,i={delta:0,timestamp:0,isProcessing:!1}){let n=!1,r=!0,s=()=>n=!0,a=tN.reduce((t,e)=>(t[e]=function(t){let e,i=new Set,n=new Set,r=!1,s=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function l(i){a.has(i)&&(n.add(i),t()),(e=i)(o)}let u={schedule:(t,s=!1,o=!1)=>{let l=o&&r,u=l?i:n;return s&&a.add(t),l&&t!==e&&u.delete(t),u.add(t),t},cancel:t=>{n.delete(t),a.delete(t)},process:t=>{if(o=t,r){s=!0;return}r=!0;let a=i;i=n,n=a,i.forEach(l),i.clear(),e=void 0,r=!1,s&&(s=!1,u.process(t))}};return u}(s),t),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:h,update:c,preRender:d,render:p,postRender:f}=a,m=()=>{let s=tF.useManualTiming,a=s?i.timestamp:performance.now();n=!1,s||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,o.process(i),l.process(i),u.process(i),h.process(i),c.process(i),d.process(i),p.process(i),f.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(m))};return{schedule:tN.reduce((e,s)=>{let o=a[s];return e[s]=(e,s=!1,a=!1)=>(!n&&(n=!0,r=!0,i.isProcessing||t(m)),o.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;etypeof requestAnimationFrame?requestAnimationFrame:tL,!0,tI),t$=new Set,tz=!1,tW=!1,tH=!1;function tY(){if(tW){let t=[],e=new Set,i=new Set;t$.forEach(n=>{n.needsMeasurement&&(t.push(n),e.add(n.element),tM.has(n.name)&&i.add(n.element))});let n=new Map;i.forEach(t=>{let e,i=(e=[],tA.forEach(i=>{let n=t.getValue(i);if(void 0!==n){let t=n.get(),r=+!!i.startsWith("scale");if(t===r)return;e.push([i,t]),n.set(r)}}),e);i.length&&(n.set(t,i),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=n.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)})}tW=!1,tz=!1,t$.forEach(t=>t.complete(tH)),t$.clear()}function tK(){t$.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tW=!0)})}class tX{constructor(t,e,i,n,r,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=r,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(t$.add(this),tz||(tz=!0,tO.read(tK),tO.resolveKeyframes(tY))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){let r=n?.get(),s=t[t.length-1];if(void 0!==r)t[0]=r;else if(i&&e){let n=function(t,e,i){if("string"==typeof t){if(/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t)||/^0[^.\s]+$/u.test(t))return parseFloat(t);if(!U.test(t)&&U.test(i))return tg(e,i)}return t??void 0}(i.readValue(e,s),e,s);void 0!==n&&(t[0]=n)}void 0===t[0]&&(t[0]=s),n&&void 0===r&&n.set(t[0])}for(let e=1;et.measureViewportBox())}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t?.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),e[0]=this.measuredOrigin;let n=e[e.length-1];void 0!==n&&this.motionValue?.jump(n,!1)}measureEndState(){let{element:t,unresolvedKeyframes:e}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let i=e.length-1,n=e[i];e[i]=this.measure(),null!==n&&void 0===this.finalKeyframe&&(this.finalKeyframe=n),this.resolveNoneKeyframes()}}let tZ=t=>1e3*t;function tJ(t,e){-1===t.indexOf(e)&&t.push(e)}function tQ(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class t0{constructor(){this.subscriptions=[]}add(t){return tJ(this.subscriptions,t),()=>this.remove(t)}remove(t){tQ(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,i);else for(let r=0;r(void 0===i&&(i=t()),i);return()=>t2[e]??n()}let t5=t4(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),t3=t=>null!==t;function t7(t,{repeat:e,repeatType:i="loop"},n,r=1){let s=t.filter(t3),a=r<0||e&&"loop"!==i&&e%2==1?0:s.length-1;return a&&void 0!==n?n:s[a]}class t9{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,e){return this.finished.then(t,e)}}function t8(){e=void 0}let t6={now:()=>(void 0===e&&t6.set(tI.isProcessing||tF.useManualTiming?tI.timestamp:performance.now()),e),set:t=>{e=t,queueMicrotask(t8)}};function et(t,e){return{kind:t,animation:e,timestamp:t6.now(),frameTimestamp:tI.timestamp,frameIsProcessing:tI.isProcessing}}function ee(t,e,i){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...et("animation-start",t),options:i?{...e,...i}:e})}catch{}}let ei=t=>Array.isArray(t)&&"number"==typeof t[0],en=t4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),er=(t,e,i=10)=>{let n="",r=Math.max(Math.round(e/i),2);for(let e=0;e`cubic-bezier(${t}, ${e}, ${i}, ${n})`,ea={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 eo(t){return"function"==typeof t&&"applyToOptions"in t}class el extends t9{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:e,name:i,keyframes:n,pseudoElement:r,allowFlatten:s=!1,finalKeyframe:a,onComplete:o}=t;this.isPseudoElement=!!r,this.allowFlatten=s,this.options=t,ta.default;let l=function({type:t,...e}){return eo(t)&&en()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:n=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:o="easeOut",times:l}={},u){let h={[e]:i};l&&(h.offset=l);let c=function t(e,i){if(e)return"function"==typeof e?en()?er(e,i):"ease-out":ei(e)?es(e):Array.isArray(e)?e.map(e=>t(e,i)||ea.easeOut):ea[e]}(o,r);Array.isArray(c)&&(h.easing=c);let d={delay:n,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:"reverse"===a?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(h,d)}(e,i,n,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let t=t7(n,this.options,a,this.speed);this.updateMotionValue?.(t),t1(e,i,t),this.animation.cancel()}o?.(),this.notifyFinished()},ee(this,t,l)}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(){this.isStopped||(this.isStopped=!0,"idle"!==this.state&&null===this.finishedTime&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+t/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(t){let e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tZ(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,onAttach:e,observe:i}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&t5())?(this.animation.timeline=t,e?.(this.animation),tL):i(this)}}let eu=new Set(["opacity","clipPath","filter","transform"]),eh=new WeakMap,{schedule:ec}=tB(queueMicrotask,!1),ed=(t,e)=>e?1e3/e*t:0,ep;class ef{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{let e=t6.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.dirty(),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=t6.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){var i;return"change"===t?this.onChangeSubscribe(e):((i=this.events)[t]||(i[t]=new t0)).add(e)}onChangeSubscribe(t){let{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new t0,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){tO.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){for(let t in this.changeSubscriber=void 0,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?.()}dirty(){let{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){ep?.push(this);let t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let t=t6.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ed(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{let i;this.hasAnimated=!0;let n=!1;i=t(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===i&&(this.animation=void 0),e()}),n||(this.animation=i),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function em(t,e){return new ef(t,e)}let eg=new WeakMap;function ev(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ey(t){return"string"==typeof t||Array.isArray(t)}let ex=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eb=["initial"].concat(ex);function ew(t){if(ev(t.animate))return!0;for(let e=0;etypeof window,ek=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eE={};class eA{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,skipAnimations:r,blockInitialAnimation:s,visualState:a},o={}){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=tX,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=t6.now();this.renderScheduledAte.delete(this)}}this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(eT.current||function(){if(eT.current=!0,ej)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>eP.current=t.matches;t.addEventListener("change",e),e()}else eP.current=!1}(),this.shouldReduceMotion=eP.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?.unmount(),t_(this.notifyUpdate),t_(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),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)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,e){let i;if(this.valueSubscriptions.get(t)?.(),e.accelerate&&eu.has(t)&&this.current instanceof HTMLElement){let{factory:i,keyframes:n,times:r,ease:s,duration:a}=e.accelerate,o=new el({element:this.current,name:t,keyframes:n,times:r,ease:s,duration:tZ(a)}),l=i(o);this.valueSubscriptions.set(t,()=>{l(),o.cancel()});return}let n=c.has(t);n&&this.onBindTransform&&this.onBindTransform();let r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tO.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),eh.get(this.current)?.check()),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{r(),i?.()})}sortNodePosition(t){return this.current&&t.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in eE){let e=eE[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(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):te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){let{transformTemplate:i,onUpdate:n}=this.props;(t.transformTemplate||i)&&this.scheduleRender(),(t.transformTemplate&&!i||t.onUpdate&&!n)&&eh.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e{this.current&&(this.current.textContent=`${t}`)}))}}function eC(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}let eV=(t,e)=>e&&"number"==typeof t?e.transform(t):t,eR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eD=h.length,eL={},eF=(t,e,i=eV(e,X[t]))=>(eL[t]||(eL[t]=(eR[t]||t)+"("))+i+")",eN=(t,e)=>("number"==typeof e?e:parseFloat(e))===+!!t.startsWith("scale");function eB(t,e,i){let{style:n,vars:r,transformOrigin:s}=t,a=!1,o=!1;for(let t in e){let i=e[t];if(c.has(t)){a=!0;continue}if(tl(t)){r[t]=i;continue}{let e=eV(i,G[t]);t.startsWith("origin")?(o=!0,s[t]=e):n[t]=e}}if(!e.transform&&(a||i?n.transform=function(t,e,i){let n="";for(let r=0;r"string"==typeof t&&"svg"===t.toLowerCase();function eW(t,{style:e,vars:i},n,r){let s,a=t.style;for(s in e)a[s]=e[s];for(s in r?.applyProjectionStyles(a,n),i)a.setProperty(s,i[s])}let eH={};function eY(t,{layout:e,layoutId:i}){return c.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!eH[t]||"opacity"===t)}function eK(t,e,i){let n=t.style,r=e?.style,s={};if(!n)return s;for(let e in n)(ti(n[e])||r&&ti(r[e])||eY(e,t)||i?.getValue(e)?.liveStyle!==void 0)&&(s[e]=n[e]);return s}function eX(t,e,i){let n=eK(t,e,i);for(let i in t)"children"!==i&&(ti(t[i])||ti(e[i]))&&(n[-1!==h.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}class eG extends eM{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=te}getBaseTargetFromProps(t,e){return c.has(e)?super.getBaseTargetFromProps(t,e)??tT(e):t[e]}getDefaultValue(t){return c.has(t)?this.latestValues[t]??tT(t):void 0}readValueFromInstance(t,e){if(c.has(e)){let t=Z(e);return t&&t.default||0}if(e_.includes(e)){let i=getComputedStyle(t)[e];if("string"==typeof i&&i)return i.trim()}return e=e$.has(e)?e:eC(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return eX(t,e,i)}build(t,e,i){eU(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){for(let i in eW(t,e,void 0,n),e.attrs)t.setAttribute(e$.has(i)?i:eC(i),e.attrs[i])}mount(t){this.isSVGTag=ez(t.tagName),super.mount(t)}}function eq({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}let eZ=(t,e,i)=>t+(e-t)*i;function eJ(t){return void 0===t||1===t}function eQ({scale:t,scaleX:e,scaleY:i}){return!eJ(t)||!eJ(e)||!eJ(i)}let e0=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function e1(t){return eQ(t)||e4(t)||e2(t)}function e2(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||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,n,r){return void 0!==r&&(t=n+r*(t-n)),n+i*(t-n)+e}function e3(t,e=0,i=1,n,r){t.min=e5(t.min,e,i,n,r),t.max=e5(t.max,e,i,n,r)}function e7(t,{x:e,y:i}){e3(t.x,e.translate,e.scale,e.originPoint),e3(t.y,i.translate,i.scale,i.originPoint)}function e9(t,e){t.min+=e,t.max+=e}function e8(t,e,i,n,r=.5){let s=eZ(t.min,t.max,r);e3(t,e,i,s,n)}function e6(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function it(t,e,i){let n=i??t;e8(t.x,e6(e.x,n.x),e.scaleX,e.scale,e.originX),e8(t.y,e6(e.y,n.y),e.scaleY,e.scale,e.originY)}function ie(t,e){return eq(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}class ii extends eM{constructor(){super(...arguments),this.type="html",this.renderInstance=eW}mount(t){super.mount(t)}readValueFromInstance(t,e){if(c.has(e))return this.projection?.isProjecting?tT(e):((t,e)=>{let{transform:i="none"}=getComputedStyle(t);return tj(i,e)})(t,e);{let i=window.getComputedStyle(t),n=(tl(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return ie(t,e)}build(t,e,i){eB(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return eK(t,e,i)}}let ir=["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 is(t){if("string"!=typeof t||t.includes("-"));else if(ir.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}let ia={current:void 0},io=(0,l.createContext)({}),il=(0,l.createContext)({strict:!1}),iu=(0,l.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ih=(0,l.createContext)({});function ic(t){return Array.isArray(t)?t.join(" "):t}let id=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ip(t,e,i){for(let n in e)ti(e[n])||eY(n,i)||(t[n]=e[n])}let im=()=>({...id(),attrs:{}}),ig=new Set(["animate","exit","variants","initial","style","values","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 iv(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ig.has(t)}function iy(t){return ti(t)?t.get():t}function ix(t,e,i,n){let r=e=>{let r;return"function"==typeof e?e(void 0!==i?i:t.custom,...(r=[{},{}],n?.values.forEach((t,e)=>{r[0][e]=t.get(),r[1][e]=t.getVelocity()}),r)):e};return"string"==typeof(e=r(e))&&(e=t.variants&&t.variants[e]),r(e)}let ib=(0,l.createContext)(null);function iw(t){let e=(0,l.useRef)(null);return null===e.current&&(e.current=t()),e.current}let iS=t=>(e,i)=>{let n=(0,l.useContext)(ih),r=(0,l.useContext)(ib),s=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e},i,n,r){return{latestValues:function(t,e,i,n){let r={},s=n(t,{});for(let t in s)r[t]=iy(s[t]);let{initial:a,animate:o}=t,l=ew(t),u=eS(t);e&&u&&!l&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===o&&(o=e.animate));let h=!!i&&!1===i.initial,c=(h=h||!1===a)?o:a;if(c&&"boolean"!=typeof c&&!ev(c)){let e=Array.isArray(c)?c:[c];for(let i=0;iij[e].some(e=>!!t[e])};eE=t,ik=!0}(),eE}let iA=Symbol.for("motionComponentSymbol"),iM="data-framer-appear-id",iC=(0,l.createContext)({}),iV="u">typeof window?l.useLayoutEffect:l.useEffect;function iR(t,{forwardMotionProps:e=!1,type:i}={},n,r){n&&function(t){let e=iE();for(let i in t)e[i]={...e[i],...t[i]};eE=e}(n);let s=i?"svg"===i:is(t),o=s?iT:iP;function u(i,n){var u;let h,c,d,p=function({layoutId:t}){let e=(0,l.useContext)(io).id;return e&&void 0!==t?e+"-"+t:t}(i);iw(()=>!!ia.current?.sharedNodes.get(p)?.lead&&i.initial)&&(i={...i,initial:!1});let f={...(0,l.useContext)(iu),...i,layoutId:p},{isStatic:m,isValidProp:g}=f,v=function(t){let{initial:e,animate:i}=function(t,e){if(ew(t)){let{initial:e,animate:i}=t;return{initial:!1===e||ey(e)?e:void 0,animate:ey(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,l.useContext)(ih));return(0,l.useMemo)(()=>({initial:e,animate:i}),[ic(e),ic(i)])}(i),y=o(i,m);if(!m&&"u">typeof window){(0,l.useContext)(il).strict;let e=function(t){let{drag:e,layout:i}=iE();if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:n.MeasureLayout,isEnabled:e?.isEnabled(t)||i?.isEnabled(t),ProjectionNode:n.ProjectionNode}}(f);v.visualElement=function(t,e,i,n,r,s){let{visualElement:a}=(0,l.useContext)(ih),o=(0,l.useContext)(il),u=(0,l.useContext)(ib),h=(0,l.useContext)(iu),c=h.reducedMotion,d=h.skipAnimations,p=(0,l.useRef)(null),f=(0,l.useRef)(!1);n=n||o.renderer,!p.current&&n&&(p.current=n(t,{visualState:e,parent:a,props:i,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:s}),f.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let m=p.current,g=(0,l.useContext)(iC);m&&!m.projection&&r&&("html"===m.type||"svg"===m.type)&&function(t,e,i,n){var r;let{layoutId:s,layout:a,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:h,layoutAnchor:c,layoutCrossfade:d}=e,p=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));p.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!o||l&&(r=l)&&"object"==typeof r&&Object.prototype.hasOwnProperty.call(r,"current"),visualElement:t,animationType:"string"==typeof a?a:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:u,layoutRoot:h,layoutAnchor:c});let f=p.getStack()?.lead;f&&!p.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}(p.current,i,r,g),(0,l.useInsertionEffect)(()=>{m&&m.props!==i&&m.update(i,u)});let v=i[iM],y=(0,l.useRef)(!!v&&"u">typeof window&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return iV(()=>{f.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),iV(()=>{f.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),y.current&&m.animationState&&m.animationState.animateChanges())}),(0,l.useEffect)(()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),y.current=!1),m.enteringChildren=void 0)}),m}(t,y,f,r,e.ProjectionNode,s),(e.isEnabled||v.visualElement?.projection?.options.layoutId)&&(h=e.MeasureLayout)}return(0,a.jsxs)(ih.Provider,{value:v,children:[h&&v.visualElement?(0,a.jsx)(h,{visualElement:v.visualElement,...f}):null,function(t,e,i,{latestValues:n},r,s=!1,a,o){let u=(a??is(t)?function(t,e,i,n){let r=(0,l.useMemo)(()=>{let i=im();return eU(i,e,ez(n),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};return ip(e,t.style,t),{...r,style:{...e,...r.style}}}return r}:function(t,e){let i,n,r={},s=(i=t.style||{},ip(n={},i,t),Object.assign(n,function({transformTemplate:t},e){return(0,l.useMemo)(()=>{let i=id();return eB(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),n);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=s,r})(e,n,r,t),h=function(t,e,i,n){let r={};for(let s in t)("values"!==s||"object"!=typeof t.values)&&!ti(t[s])&&((s.startsWith("on")?!iv(s):n?.(s)??!iv(s))||!0===i&&iv(s)||!e&&!iv(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}(e,"string"==typeof t,s,o),c=t!==l.Fragment?{...h,...u,ref:i}:{},{children:d}=e,p=(0,l.useMemo)(()=>ti(d)?d.get():d,[d]);return(0,l.createElement)(t,{...c,children:p})}(t,i,(u=v.visualElement,c=(0,l.useRef)(n),(0,l.useInsertionEffect)(()=>{c.current=n}),d=(0,l.useRef)(null),(0,l.useCallback)(t=>{t&&y.onMount?.(t),u&&(t?u.mount(t):u.unmount());let e=c.current;if("function"==typeof e)if(t){let i=e(t);"function"==typeof i&&(d.current=i)}else d.current?(d.current(),d.current=null):e(t);else e&&(e.current=t)},[u])),y,m,e,s,g)]})}u.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;let h=(0,l.forwardRef)(u);return h[iA]=t,h}class iD{constructor(t){this.isMounted=!1,this.node=t}update(){}}function iL(t,e,i){return ix(t.getProps(),e,i,t)}let iF=(t,e)=>"exit"===e?t.presenceContext?.custom:void 0;function iN(t,e){if(t?.inherit&&e){let{inherit:i,...n}=t;return{...e,...n}}return t}function iB(t,e){let i=t?.[e]??t?.default??t;return i!==t?iN(i,t):i}function iI(t,e){let i=t.getValue("willChange");if(ti(i)&&i.add)return i.add(e);if(!i&&tF.WillChange){let i=new tF.WillChange("auto");t.addValue("willChange",i),i.add(e)}}let iO=(...t)=>t.reduce((t,e)=>i=>e(t(i)));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 iU(t,e){return i=>i>0?e:t}let i$=(t,e,i)=>{let n=t*t,r=i*(e*e-n)+n;return r<0?0:Math.sqrt(r)},iz=[T,S,R];function iW(t){let e=iz.find(e=>e.test(t));if(!e)return!1;let i=e.parse(t);return e===R&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let r=0,s=0,a=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;r=i_(o,n,t+1/3),s=i_(o,n,t),a=i_(o,n,t-1/3)}else r=s=a=i;return{red:Math.round(255*r),green:Math.round(255*s),blue:Math.round(255*a),alpha:n}}(i)),i}let iH=(t,e)=>{let i=iW(t),n=iW(e);if(!i||!n)return iU(t,e);let r={...i};return t=>(r.red=i$(i.red,n.red,t),r.green=i$(i.green,n.green,t),r.blue=i$(i.blue,n.blue,t),r.alpha=eZ(i.alpha,n.alpha,t),S.transform(r))},iY=new Set(["none","hidden"]);function iK(t,e){return i=>eZ(t,e,i)}function iX(t){return"number"==typeof t?iK:"string"==typeof t?th(t)?iU:D.test(t)?iH:iZ:Array.isArray(t)?iG:"object"==typeof t?D.test(t)?iH:iq:iU}function iG(t,e){let i=[...t],n=i.length,r=t.map((t,i)=>iX(t)(t,e[i]));return t=>{for(let e=0;e{for(let e in n)i[e]=n[e](t);return i}}let iZ=(t,e)=>{let i=O(t),n=O(e);if(!(i.indexes.var.length===n.indexes.var.length&&i.indexes.color.length===n.indexes.color.length&&i.indexes.number.length>=n.indexes.number.length))return iU(t,e);if(iY.has(t)&&!n.values.length||iY.has(e)&&!i.values.length)return iY.has(t)?i=>i<=0?t:e:i=>i>=1?e:t;return iO(iG(function(t,e){let i=[],n={color:0,var:0,number:0};for(let r=0;rg(eZ(s,a,t))+r}(t,e);if(i)return i}return iX(t)(t,e)}let i0=t=>{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>tO.update(e,t),stop:()=>t_(e),now:()=>tI.isProcessing?tI.timestamp:t6.now()}};function i1(t,e=50,i=2e4,n){let r=0,s=t.next(r);for(n?.push(s.value);!s.done&&r=i?1/0:r}let i2=t=>t<0?1/Math.max(1+t,.05):Math.max(1-t,.05);function i4(t,e){if(!(t>1))return 1;let i=Math.sqrt(t*t-1),n=t-i,r=t+i,s=2*i*Math.exp(-e)*(1+e);return i3(t=>r*Math.exp(-n*t)-n*Math.exp(-r*t)-s,t=>Math.exp(-r*t)-Math.exp(-n*t),e)/e}function i5(t,e){return t*Math.sqrt(1-e*e)}function i3(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}let i7=(t,e)=>(e?t>=0:t>0)&&t<1/0;function i9(t,e){if(i7(t,e))return t}function i8(t=.3,e=.3){let i,n,r,s="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,a=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:h,mass:c,duration:p,isResolvedFromDuration:f,isTimeDefined:m}=function(t){let e=i9(t.stiffness),i=i9(t.damping,!0),n=i9(t.mass),r={...t,stiffness:e??100,damping:i??10,mass:n??1,isResolvedFromDuration:!1,isTimeDefined:(e??i??n)===void 0&&(void 0!==t.duration||void 0!==t.bounce)};if(r.isTimeDefined){if(t.visualDuration){let e=i2(t.bounce||0),i=2*Math.PI/(1.2*t.visualDuration)*i4(e,2*Math.PI/1.2);r.stiffness=i*i,r.damping=2*e*Math.sqrt(r.stiffness)}else Object.assign(r,function({duration:t=800,bounce:e=.3}){let i,n,r=i2(e);t=d(.01,10,t/1e3),r<1?(i=e=>{let i=e*r,n=i*t;return .001-i/i5(e,r)*Math.exp(-n)},n=e=>{let n=e*r*t,s=r*r*e*e*t,a=Math.exp(-n),o=i5(e*e,r);return-((-i(e)+.001>0?-1:1)*s)*a/o}):(i=e=>-.001+Math.exp(-e*t)*(e*t+1),n=e=>-(t*t*e*Math.exp(-e*t)));let s=i3(i,n,5/t),a=s*i4(r,s*t),o=a*a;return{stiffness:o,damping:2*r*Math.sqrt(o),duration:tZ(t)}}(r)),r.isResolvedFromDuration=!0;i7(r.stiffness)&&i7(r.damping,!0)||(r.stiffness=100,r.damping=10)}return r}({...s}),g=t=>m?0:-(t/1e3),v=h/(2*Math.sqrt(u*c)),y=Math.sqrt(u/c)/1e3,x=v*y,b={target:o,delta:o-a,velocity:g(s.velocity||0)||0,restSpeed:0,restDelta:0},w=()=>{let t=5>Math.abs(b.delta);b.restSpeed=s.restSpeed||(t?.01:2),b.restDelta=s.restDelta||(t?.005:.5)};if(w(),v<1){let t=i5(y,v),e={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};r=()=>{e.A=(b.velocity+x*b.delta)/t,e.sinC=x*e.A+b.delta*t,e.cosC=x*b.delta-e.A*t};let s=i=>{i!==e.t&&(e.t=i,e.env=Math.exp(-x*i),e.sin=Math.sin(t*i),e.cos=Math.cos(t*i))};i=t=>(s(t),b.target-e.env*(e.A*e.sin+b.delta*e.cos)),n=t=>(s(t),e.env*(e.sinC*e.sin+e.cosC*e.cos))}else if(1===v){i=t=>b.target-Math.exp(-y*t)*(b.delta+(b.velocity+y*b.delta)*t);let t={C:0};r=()=>{t.C=b.velocity+y*b.delta},n=e=>Math.exp(-y*e)*(y*t.C*e-b.velocity)}else{let t=y*Math.sqrt(v*v-1),e=x-t,s=x+t,a=t<1||m?1/0:300/t,o=(t,e)=>Math.exp(e>a?(x-t)*a-x*e:-t*e),l={S:0,F:0};r=()=>{let e=(b.velocity+x*b.delta)/t;l.S=(b.delta+e)/2,l.F=(b.delta-e)/2},i=t=>b.target-l.S*o(e,t)-l.F*o(s,t),n=t=>e*l.S*o(e,t)+s*l.F*o(s,t)}r();let S=f&&p||null,P={calculatedDuration:S,retarget:(t,e)=>{b.target=t[t.length-1],b.delta=b.target-t[0],b.velocity=g(e),s.restSpeed&&s.restDelta||w(),P.calculatedDuration=S,l.done=!1,r()},velocity:t=>tZ(n(t)),next:t=>{let e=i(t);return f?l.done=t>=p:l.done=Math.abs(tZ(n(t)))<=b.restSpeed&&Math.abs(b.target-e)<=b.restDelta,l.value=l.done?b.target:e,l},toString:()=>{let t=Math.min(i1(P),2e4),e=er(e=>P.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return P}let i6=Object.assign(i8,{applyToOptions:t=>{let e=function(t,e=100,i){let{keyframes:n,velocity:r}=t,s=n&&n[n.length-1]-n[0],a=i({...t,velocity:r&&s?r*e/s:r,keyframes:[0,e]}),o=Math.min(i1(a),2e4);return{type:"keyframes",ease:t=>a.next(o*t).value/e,duration:o/1e3}}(t,100,i8);return t.ease=e.ease,t.duration=tZ(e.duration),t.type="keyframes",t}});function nt({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:h}){let c,d,p=t[0],f={done:!1,value:p},m=i*e,g=p+m,v=a?a(g):g;v!==g&&(m=v-p);let y=t=>-m*Math.exp(-t/n),x=t=>{let e=y(t);f.done=Math.abs(e)<=u,f.value=f.done?v:t?v+e:p},b=t=>{let e;if((e=f.value)l){var i;c=t,d=i6({keyframes:[f.value,(i=f.value,void 0===o?l:void 0===l||Math.abs(o-i){let e=!1;return(d||void 0!==c||(e=!0,x(t),b(t)),void 0!==c&&t>=c)?d.next(t-c):(e||x(t),f)}}}let ne=(t,e,i)=>t*(3*(1-t)*((1-t)*e+t*i)+t*t);function ni(t,e,i,n){return t===e&&i===n?tL:r=>{let s=0,a=1,o=r;for(let e=0;;e++){o>=s&&o<=a||(o=(s+a)/2);let n=ne(o,t,i)-r;if(n*n<1e-28||40===e)break;n>0?a=o:s=o,o-=1e-7*n/(ne(o+1e-7,t,i)-r-n)}return ne(o,e,n)}}let nn=ni(.42,0,1,1),nr=ni(0,0,.58,1),ns=ni(.42,0,.58,1),na=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,no=t=>e=>1-t(1-e),nl=ni(.33,1.53,.69,.99),nu=no(nl),nh=na(nu),nc=t=>t>=1?1:(t*=2)<1?.5*nu(t):.5*(2-Math.pow(2,-10*(t-1))),nd=t=>1-Math.sin(Math.acos(t)),np=no(nd),nf=na(nd),nm={linear:tL,easeIn:nn,easeInOut:ns,easeOut:nr,circIn:nd,circInOut:nf,circOut:np,backIn:nu,backInOut:nh,backOut:nl,anticipate:nc},ng=t=>{if(ei(t)){ta.default;let[e,i,n,r]=t;return ni(e,i,n,r)}return"string"==typeof t?(ta.default,nm[t]):t},nv=(t,e,i)=>{let n=e-t;return n?(i-t)/n:1};function ny(t){let e=[0];return!function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let r=nv(0,e,n);t.push(eZ(i,1,r))}}(e,t.length-1),e}function nx({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){var r;let s=Array.isArray(n)&&"number"!=typeof n[0]?n.map(ng):ng(n)||ns,a={done:!1,value:e[0]};if(2===e.length&&!Array.isArray(s)&&(!i||2!==i.length||0===i[0]&&1===i[1])){let[i,n]=e,r=i===n?void 0:(tF.mix||iQ)(i,n);return{calculatedDuration:t,next:e=>(a.value=r?r(s(t>0?d(0,1,e/t):1)):n,a.done=e>=t,a)}}let o=function(t,e,{clamp:i=!0,ease:n,mixer:r}={}){let s=t.length;if(1===s)return()=>e[0];if(2===s&&e[0]===e[1])return()=>e[1];let a=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let o=function(t,e,i){let n=[],r=i||tF.mix||iQ,s=t.length-1;for(let i=0;i{if(a&&i1)for(;nu(d(t[0],t[s-1],e)):u}((r=i&&i.length===e.length?i:ny(e),r.map(e=>e*t)),e,{ease:Array.isArray(s)?s:e.map(()=>s||ns).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(a.value=o(e),a.done=e>=t,a)}}let nb={decay:nt,inertia:nt,tween:nx,keyframes:nx,spring:i6};function nw(t){"string"==typeof t.type&&(t.type=nb[t.type])}let nS=(t,e)=>e-t>40&&!tF.useManualTiming?e:t,nP=t=>t/100,nT=t=>Math.round(1e4*t)/1e4;class nj extends t9{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!==t6.now()&&this.tick(t6.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause(),ee(this,this.options)}initAnimation(){let{options:t}=this;nw(t);let{type:e=nx,repeat:i=0,repeatDelay:n=0,repeatType:r,velocity:s=0}=t,{keyframes:a}=t,o=e||nx;o!==nx&&"number"!=typeof a[0]&&(this.mixKeyframes=iO(nP,iQ(a[0],a[1])),a=[0,100]);let l=o(a===t.keyframes?t:{...t,keyframes:a});"mirror"===r&&(this.mirroredGenerator=o({...t,keyframes:[...a].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=i1(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,e=!1){let{generator:i,totalDuration:n,calculatedDuration:r}=this;if(null===this.startTime)return i.next(0);let{delay:s=0,keyframes:a,type:o,onUpdate:l,finalKeyframe:u}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=nS(this.startTime,t)),this.pendingStartTime=void 0,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 h=this.currentTime-s*(this.playbackSpeed>=0?1:-1),c=this.playbackSpeed>=0?h<0:h>n;this.currentTime=Math.max(h,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let d=this.generate(this.currentTime,c),{done:p}=d;c||(p=this.playbackSpeed>=0?r<1/0?this.currentTime>=n:p:this.currentTime<=0);let f=null===this.holdTime&&("finished"===this.state||"running"===this.state&&p);return f&&o!==nt&&(d.value=t7(a,this.options,u,this.speed)),l&&l(d.value),f&&this.finish(),d}at(t){return this.holdTime??nT((t-this.startTime)*this.playbackSpeed)}sampleAt(t,e){let{options:i,totalDuration:n}=this,r=this.at(t)-(i.delay||0);return r>=n&&i.type!==nt?t7(i.keyframes,i,e?void 0:i.finalKeyframe):this.generate(Math.max(r,0),r<0).value}generate(t,e){let i,{generator:n,totalDuration:r,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:l,repeat:u,repeatType:h,repeatDelay:c}=this.options,p=t,f=n;if(u){let e=Math.min(t,r)/o,i=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&i--,(i=Math.min(i,u+1))%2&&("reverse"===h?(n=1-n,c&&(n-=c/o)):"mirror"===h&&(f=a)),p=d(0,1,n)*o}return e?(this.delayState.value=l[0],i=this.delayState):i=f.next(p),s&&!e&&(i.value=s(i.value)),i}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){return this.duration+(this.options.delay??0)/1e3}get time(){return this.currentTime/1e3}set time(t){t=tZ(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(){return function(t,e,i=0){var n,r;let s;return e<=0?i:t.velocity?t.velocity(e):(n=e=>t.next(e).value,r=t.next(e).value,ed(r-n(s=Math.max(e-5,0)),e-s))}(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){let e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(t6.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:t=i0,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.playbackSpeed||1):this.startTime||(this.startTime=e??(this.pendingStartTime=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(t6.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.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}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 nk={anticipate:nc,backInOut:nh,circInOut:nf};class nE extends el{constructor(t){"string"==typeof t.ease&&t.ease in nk&&(t.ease=nk[t.ease]),nw(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}elapsed(){return"running"===this.state?(t6.now()-this.startTime)*this.speed:1e3*this.time}sample(t){if(!this.sampler){let{motionValue:t,onUpdate:e,onComplete:i,onPlay:n,onStop:r,element:s,...a}=this.options;this.sampler=new nj({...a,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){let{state:t}=this;if("running"===t||"paused"===t)return this.sample(this.elapsed())}updateMotionValue(t){let{motionValue:e,element:i,name:n}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);let{speed:r}=this,s=this.elapsed(),a="running"===this.state&&r?d(0,10,s):0,o=this.sample(s);i&&n&&t1(i,n,o),e.setWithVelocity(this.sample(s-a*Math.sign(r)),o,a/Math.abs(r||1))}}let nA=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(U.test(t)||"0"===t)&&!t.startsWith("url("));function nM(t){t.duration=0,t.type="keyframes"}let nC=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,nV=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),nR=()=>!tF.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate"),nD=(t,e)=>t-e,nL=(t,e,i)=>{let n=[];for(let r=0;r<=i;r++)n.push(eZ(t,e,r/i));return n},nF=(t,e)=>t.latestValues?t.latestValues[e]:t.getValue(e)?.get();class nN extends nj{constructor(t){let e,i=t.motionValue.owner.current,{driver:n=i0}=t,r=function(t){let e=t.motionValue.owner,{onUpdate:i,transformTemplate:n}=e.getProps();return!t.isHandoff&&!i&&!t.hasOnUpdate&&!n&&"inertia"!==t.type&&"none"===(nF(e,"transform")||"none")&&!nF(e,"pathRotation")&&!e.projection?.isProjecting()}(t);t.driver=t=>{let r=n(t);return{js:r,now:r.now,start:(t=!0)=>{let e=eh.get(i);!e||e.isJS?r.start(t):e.schedule(!1,!t)},stop:()=>{r.stop();let t=eh.get(i);t&&!t.isFinishing&&t.release(e)}}},super(t),e=this,this.canAccelerate=r;let{stop:s}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),s()}}get group(){let t;return t=this.options.motionValue.owner.current,eh.get(t)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){let{startTime:t,speed:e,totalDuration:i}=this,{delay:n=0,repeatType:r}=this.options;return null!==this.holdTime?[1/0,0]:1/0===i?[t+n/e,this.resolvedDuration*("loop"===r?1:2)/e||1]:[t+(n+i)/e,0]}isAccelerated(){let{group:t,state:e}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&("running"===e||"paused"===e)}liveValue(){return this.isAccelerated()?this.sampleAt(t6.now()):void 0}tween(){let{keyframes:t,type:e,ease:i,times:n,repeat:r,delay:s=0}=this.options,a=ei(i)?es(i):/^(linear|ease(In|Out|InOut))$/.test(i)&&ea[i];if(a&&!r&&!n&&2===t.length&&e===nx&&null===this.holdTime){let t=this.startTime+s/this.speed;return[t,t+this.resolvedDuration/this.speed,a]}}boundaries(t,e){let{startTime:i,speed:n,resolvedDuration:r,options:s}=this,{delay:a=0,repeat:o=0,repeatDelay:l=0,repeatType:u,times:h,keyframes:c,type:d}=s,p=(d||nx)===nx?h||ny(c):[0,1],f=i+a/n,m=[];if(null!==this.holdTime||!(r>0))return m;for(let i=Math.max(0,Math.floor((t-f)*n/r));i<=o;i++){let s=f+i*r/n;if(s>e)break;for(let a of p){let o=s+(i%2&&u&&"loop"!==u?1-a:a)*(r-l)/n;o>t&&o{for(let e of i)if(e.name===t)return!0},m=(e,i)=>{let a={};for(let o of void 0===e?h:s){let s=n.get(o),l=void 0===e?nF(t,o):s?s.sampleAt(i>e&&!s.timing()[1]?i:e):r[o];void 0!==l&&(a[o]=l)}return a},g=(t,e)=>{let i="";for(let n in t){let r=t[n];e&&eN(n,r)||(i+=eF(n,r)+" ")}return(e?i.trim():i)||"none"},v=(t=m())=>{e.style.transform=g(t,!0)},y=(t=!0)=>{t&&v(),o.forEach(({animation:t})=>t.cancel()),o=[]},x=(t,i)=>new Animation(new KeyframeEffect(e,t,i)),b=(t,e,i=1/0)=>{let n={animation:t,offset:e,end:i};t.startTime=t6.now()+e,i<1/0&&(t.onfinish=()=>{n.isDone=!0,o.some(t=>1/0===t.end)&&(t.cancel(),o=o.filter(t=>t!==n)),j.schedule(!1)}),t.oncancel=()=>o.includes(n)&&j.demote(),o.push(n)},w=(t,e,i)=>{let n=(e,i)=>Math.abs(t(i)-t(e)),r=n(e,i);for(;i-e>.01;){let t=(e+i)/2;n(e,t)>n(t,i)?i=t:e=t}return n(e,i)>r/2?[e,i]:[]},S=(t,e,i,n={fill:"both"},r,s)=>{let a=t.flatMap(t=>t.boundaries(e,i)),o=s||((t,e,i,n)=>{let r,s,a=Math.min(200,Math.max(2,Math.ceil((i-e)/10)));if(4*n.length>a)return;let o=nL(e,i,a).concat(n).sort(nD);for(let e of t){let t=o.map(t=>e.numberAt(t)),[i]=t,n=t.map(t=>t-i),a=n[n.length-1],l=n.some(t=>.001*Math.abs(t)>Math.abs(a))?0:a,u=n.map(t=>l?t/l:t);if(l)if(r){if(u.some((t,e)=>!(.001>=Math.abs(t-r[e]))))return}else r=u,s=t=>(e.numberAt(t)-i)/l;else if(u.some(t=>!(.001>=Math.abs(t))))return}if(!r||r.every((t,n)=>.001>=Math.abs(t-nv(e,i,o[n]))))return"linear";let l=[],u=(t,n=s(t))=>l.push(nT(n)+" "+nT(100*nv(e,i,t))+"%");return r.forEach((t,e)=>{e&&Math.abs(t-r[e-1])>.2&&w(s,o[e-1],o[e]).forEach(t=>u(t)),u(o[e],t)}),"linear("+l+")"})(t,e,i,a),l=o?[e,i]:((t,e,i,n)=>{let r=[e],s=(e,i,n)=>{if(i-e<1||t.every(t=>!(Math.abs(t.numberAt((e+i)/2)-(t.numberAt(e)+t.numberAt(i))/2)>(t.name.startsWith("scale")?.001:.1))))r.push(i);else if(n<4)s(e,(e+i)/2,n+1),s((e+i)/2,i,n+1);else{for(let n of t)r.push(...w(t=>n.numberAt(t),e,i));r.push(i)}},a=nL(e,i,Math.ceil((i-e)/100));for(let t of n)a.push(t,Math.min(t+.01,i));let o=e;for(let t of a.sort(nD))t>o&&s(o,t,0),o=t;return r.sort(nD)})(t,e,i,a),u=l.map(t=>g(m(t,r))),h={transform:u};return o||(h.offset=l.map(t=>nv(e,i,t))),u.every(t=>t===u[0])&&(v(m(e,r)),h=null),x(h,{...n,duration:i-e,easing:o||"linear"})},P=()=>!i.size&&(c=!0,eh.get(e)===j&&eh.delete(e),j.isJS||y(),!0),T=()=>{let e=t6.now();if(j.isJS||(j.isFinishing=!0,i.forEach(i=>{let[n,s]=i.timing();"running"===i.state&&i.speed>0&&!s&&n<=e+1&&(i.complete(),r[i.name]=nF(t,i.name),a.has(i)||(l=!0))}),j.isFinishing=!1),u=!1,c||(i.forEach(({state:t},e)=>{("idle"===t||"finished"===t)&&i.delete(e)}),P()))return;for(let t of i)if(!t.canAccelerate)return j.demote(!0);j.isJS&&(j.isJS=!1,l=!0,i.forEach(t=>t.js?.stop()));let f=l,m=d;if(l=d=!1,f||!(t=>{let e,n=0;for(let r of i){let i=a.get(r);if(!i)return!1;let[s,o,l]=i,u=r.at(t),h=1/0===r.timing()[0];if(l){if(h&&u===s)continue;return!1}let c=(u-s)/o,d=h?0:r.speed/o;if(void 0===e)e=c,n=d;else if(Math.abs(c-e)>1||d!==n)return!1}if(void 0===e)return!0;if(!o.length)return!1;for(let{offset:t,end:i,isDone:n}of o){let r=e-t;if(i<1/0&&(n?r=i))return!1}for(let{animation:i,offset:r,isDone:s}of o){if(s)continue;let a=e-r;n&&i.updatePlaybackRate&&"running"===i.playState&&20>Math.abs(Number(i.currentTime)-a)?i.playbackRate!==n&&i.updatePlaybackRate(n):n?(i.playbackRate=n,i.startTime=t-a/n):(i.startTime=null,i.currentTime=a)}return!0})(e)){if(m){if(e-p<100)return j.demote();p=e}if(!(e=>{let l=e,u=0,c=0,d=[],p=[],f=new Set;for(let t of(n.clear(),a=new Map,i)){n.set(t.name,t);let[i,r]=t.timing(),s=1/0===i;if(a.set(t,[t.at(e),t.speed,s]),s){t.sync();continue}if(t.speed<0)return;if(r){if(u){let t=(i-c)/r;if(Math.abs(r-u)>1||Math.abs(t-Math.round(t))*u>1)return}else u=r,c=i;p.push(t)}else f.add(i);d.push(t),l=Math.max(l,i)}r={},s=h.filter(e=>{if(n.has(e))return!0;let i=r[e]=nF(t,e);return void 0!==i&&parseFloat(i)!==+!!e.startsWith("scale")}),y(!1);let m=!u&&(t=>{let e;for(let i of t){let t=i.tween();if(!t||e?.some((e,i)=>i<2?Math.abs(t[i]-e)>1:t[i]!==e))return;e=t}return e})(d);try{if(m&&m[1]>e){let[t,i,n]=m;b(S(d,t,i,void 0,void 0,n),t-e,i-t)}else l>e&&(b(S(d,e,l),0,l-e),f.forEach(t=>t{e.isAccelerated()&&e.sync(),t||(e.canAccelerate=!1)}),j.isJS=!0,a=new Map,y(),i.forEach(t=>"running"===t.state&&t.js?.start()),!0}},eh.set(e,j),j)).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();let{group:t}=this;t&&!t.isJS&&this.canAccelerate&&this.tick(t6.now())}get time(){return this.isAccelerated()?d(0,this.totalDuration,this.at(t6.now())-(this.options.delay||0))/1e3:super.time}set time(t){super.time=t,this.isAccelerated()&&this.sync()}attachTimeline(t){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(t)}}class nB extends t9{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=t6.now();let{keyframes:e,name:i,motionValue:n,element:r}=t;t.autoplay??(t.autoplay=!0),t.delay??(t.delay=0),t.type??(t.type="keyframes"),t.repeat??(t.repeat=0),t.repeatDelay??(t.repeatDelay=0),t.repeatType??(t.repeatType="loop");let s=r?.KeyframeResolver||tX;this.keyframeResolver=new s(e,(e,i,n)=>this.onKeyframesResolved(e,i,t,!n),i,n,r),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){let r;this.keyframeResolver=void 0;let{name:s,type:a,velocity:o,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=t6.now();let d=function(t,e,i,n){let r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;let s=t[t.length-1],a=nA(r,e),o=nA(s,e);return!!a&&!!o&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i{p?.(),this.notifyFinished()};let f=d&&!u&&function(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:r,damping:s,type:a,keyframes:o}=t;if(!i||!(eu.has(i)||nV.has(i)))return!1;let l=e?.owner?.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;let{onUpdate:u,transformTemplate:h}=e.owner.getProps();return nR()&&(eu.has(i)||nV.has(i)&&function(t){for(let e=0;et&&h.includes(t)&&e?.owner?.current instanceof HTMLElement&&nR()&&en())(i);if(n&&(f||m||this.resolvedAt!==this.createdAt)&&(i.startTime??(i.startTime=nS(this.createdAt,this.resolvedAt))),f){i.element=i.motionValue?.owner?.current;try{r=new nE(i)}catch{r=new nj(i)}}else r=m?new nN(i):new nj(i);this.pendingTimeline&&(this.stopTimeline=r.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=r}get finished(){return this._animation?this._animation.finished:super.finished}then(t,e){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),tH=!0,tK(),tY(),tH=!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?.cancel(),this.keyframeResolver?.cancel()}}let nI={type:"spring",stiffness:500,damping:25,restSpeed:10},nO={type:"keyframes",duration:.8},n_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nU=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out"]),n$=(t,e,i,n={},r,s)=>a=>{let o=iB(n,t)||{},l=o.delay||n.delay||0,{elapsed:u=0}=n;u-=tZ(l);let h={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...o,delay:-u,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:t,motionValue:e,element:s?void 0:r,hasOnUpdate:!!o.onUpdate};!function(t){for(let e in t)if(!nU.has(e))return!0;return!1}(o)&&Object.assign(h,((t,{keyframes:e})=>e.length>2?nO:c.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:nI:n_)(t,h)),h.duration&&(h.duration=tZ(h.duration)),h.repeatDelay&&(h.repeatDelay=tZ(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if(!1!==h.type&&(0!==h.duration||h.repeatDelay)||(nM(h),0===h.delay&&(d=!0)),(tF.instantAnimations||tF.skipAnimations||r?.shouldSkipAnimations||o.skipAnimations)&&(d=!0,nM(h),h.delay=0),h.allowFlatten=!o.type&&!o.ease,d&&!s&&void 0!==e.get()){let t=t7(h.keyframes,o);if(void 0!==t)return void tO.update(()=>{h.onUpdate(t),h.onComplete()})}return o.isSync?new nj(h):new nB(h)},nz="u">typeof window;function nW(t,e,{delay:i=0,transitionOverride:n,type:r}={}){let{transition:s,transitionEnd:a,...o}=e,l=t.getDefaultTransition();s=s?iN(s,l):l;let u=s?.reduceMotion,h=s?.skipAnimations;n&&(s=n);let c=[],d=r&&t.animationState?.getState()[r],p=s?.path;for(let e in p&&(p.animateValues?p.animateValues(e=>t.getValue(e,t.latestValues[e]??0),o,s,i,c):p.animateVisualElement?.(t,o,s,i,c)),o){let n=t.getValue(e,t.latestValues[e]??null),r=o[e];if(void 0===r||d&&function({protectedKeys:t,needsAnimating:e},i){let n=i in t&&!e[i];return e[i]=!1,n}(d,e))continue;let a={delay:i,...iB(d?.out[e]||s||{},e)};h&&(a.skipAnimations=!0);let l=n.get();if(void 0!==l&&!n.isAnimating()&&!Array.isArray(r)&&r===l&&!a.velocity){tO.update(()=>n.set(r));continue}let p=!1;if(nz&&window.MotionHandoffAnimation){let i=t.props[iM];if(i){let t=window.MotionHandoffAnimation(i,e,tO);null!==t&&(a.startTime=t,p=!0)}}iI(t,e);let f=u??t.shouldReduceMotion;n.start(n$(e,n,r,f&&tn.has(e)?{type:!1}:a,t,p));let m=n.animation;m&&c.push(m)}if(a){let e=()=>tO.update(()=>{a&&function(t,e){let{transitionEnd:i={},transition:n={},...r}=iL(t,e)||{};for(let e in r={...r,...i}){var s;let i=Array.isArray(s=r[e])?s[s.length-1]||0:s;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,em(i))}}(t,a)});c.length?Promise.all(c).then(e):e()}return c}function nH(t,e,i,n=0,r=1){let s=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),a=t.size,o=(a-1)*n;return"function"==typeof i?i(s,a):1===r?s*n:o-s*n}function nY(t,e,i={}){let n=iL(t,e,iF(t,i.type)),r=i.transitionOverride||(n?.transition??(t.getDefaultTransition()||{})),s=()=>Promise.all(n?nW(t,n,i):[]),a=(n=0)=>{let{variantChildren:s}=t,{delayChildren:a=0,staggerChildren:o,staggerDirection:l}=r,u=[];return s?.forEach(t=>{t.notify("AnimationStart",e),u.push(nY(t,e,{...i,delay:n+("function"==typeof a?0:a)+nH(s,t,a,o,l)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(u)},{when:o}=r;return o?"beforeChildren"===o?s().then(()=>a()):a().then(s):Promise.all([s(),a(i.delay)])}function nK(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;nt?.out===!0?t:t?.out;function nq(){let t={};for(let e of ex)t[e]={isActive:"animate"===e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return t}let nZ=0;function nJ(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}let nQ=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function n0(t){return{point:{x:t.pageX,y:t.pageY}}}function n1(t,e,i,n){return nJ(t,e,t=>nQ(t)&&i(t,n0(t)),n)}function n2(t){return t.max-t.min}function n4(t,e,i,n=.5){t.origin=n,t.originPoint=eZ(e.min,e.max,t.origin),t.scale=n2(i)/n2(e),t.translate=eZ(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 n5(t,e,i,n){n4(t.x,e.x,i.x,n?.originX),n4(t.y,e.y,i.y,n?.originY)}function n3(t,e,i,n=0){t.min=(n?eZ(i.min,i.max,n):i.min)+e.min,t.max=t.min+n2(e)}function n7(t,e,i,n=0){let r=n?eZ(i.min,i.max,n):i.min;t.min=e.min-r,t.max=t.min+n2(e)}function n9(t,e,i,n){n7(t.x,e.x,i.x,n?.x),n7(t.y,e.y,i.y,n?.y)}function n8(t){return[t("x"),t("y")]}let n6={};function rt(t){return n6.current?.add(t),t}let re=t=>n6.current?n6.current.bind(t):t,ri=t=>"object"==typeof t&&null!==t;function rn(t){return ri(t)&&"ownerSVGElement"in t}function rr(t,e,i){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let n=e?e.current:n6.current?.root||document,r=i?.[t]??n.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t).filter(t=>null!=t)}let rs=new WeakMap,ra=(t,e,i)=>(n,r)=>r&&r[0]?r[0][t+"Size"]:rn(n)&&"getBBox"in n?n.getBBox()[e]:n[i],ro=ra("inline","width","offsetWidth"),rl=ra("block","height","offsetHeight");function ru({target:t,borderBoxSize:e}){rs.get(t)?.forEach(i=>{i(t,{get width(){return ro(t,e)},get height(){return rl(t,e)}})})}function rh(t){t.forEach(ru)}let rc=new Set;function rd(t,e){let r;return rt("function"==typeof t?(rc.add(t),n||(n=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};rc.forEach(e=>e(t))},window.addEventListener("resize",n)),()=>{rc.delete(t),rc.size||"function"!=typeof n||(window.removeEventListener("resize",n),n=void 0)}):(!i&&"u">typeof ResizeObserver&&(i=new ResizeObserver(rh)),(r=rr(t)).forEach(t=>{let n=rs.get(t);n||(n=new Set,rs.set(t,n)),n.add(e),i?.observe(t)}),()=>{r.forEach(t=>{let n=rs.get(t);n?.delete(e),n?.size||i?.unobserve(t)})}))}let rp=(t,e)=>Math.abs(t-e),rf=new Set(["auto","scroll"]);class rm{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:r=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=rv(this.lastRawMoveEventInfo,this.transformPagePoint));let i=rx(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,r=(t=i.offset,e={x:0,y:0},Math.sqrt(rp(t.x,e.x)**2+rp(t.y,e.y)**2)>=this.distanceThreshold);if(!n&&!r)return;let{point:s}=i;this.history.push({...s,timestamp:t6.now()});let{onStart:a,onMove:o}=this.handlers;n||(a?.(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),o?.(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.handleScroll(window),this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=rv(e,this.transformPagePoint),this.hasPendingMove=!0,tO.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:r}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&r?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let s=rx("pointercancel"===t.type?this.lastMoveEventInfo:rv(e,this.transformPagePoint),this.history);this.startEvent&&i?.(t,s),n?.(t,s)},!nQ(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=s,this.contextWindow=n||window;let o=rv(n0(t),this.transformPagePoint),{point:l}=o;this.history=[{...l,timestamp:t6.now()}];let{onSessionStart:u}=e;u&&u(t,rx(o,this.history));let h={passive:!0,capture:!0};this.removeListeners=iO(n1(this.contextWindow,"pointermove",this.handlePointerMove,h),n1(this.contextWindow,"pointerup",this.handlePointerUp,h),n1(this.contextWindow,"pointercancel",this.handlePointerUp,h)),a&&this.startScrollTracking(a)}startScrollTracking(t){let e=t.parentElement;for(;e;){let t=getComputedStyle(e);(rf.has(t.overflowX)||rf.has(t.overflowY))&&this.scrollPositions.set(e,rg(e)),e=e.parentElement}this.scrollPositions.set(window,rg(window)),this.removeScrollListeners=iO(nJ(window,"scroll",this.onElementScroll,{capture:!0}),nJ(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){let e=this.scrollPositions.get(t);if(!e)return;let i=t===window,n=rg(t),r={x:n.x-e.x,y:n.y-e.y};(0!==r.x||0!==r.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,n),tO.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),t_(this.updatePoint)}}let rg=t=>t===window?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop};function rv(t,e){return e?{point:e(t.point)}:t}function ry(t,e){return{x:t.x-e.x,y:t.y-e.y}}function rx({point:t},e){return{point:t,delta:ry(t,rb(e)),offset:ry(t,e[0]),velocity:function(t){if(t.length<2)return{x:0,y:0};let e=t.length-1,i=null,n=rb(t);for(;e>=0&&(i=t[e],!(n.timestamp-i.timestamp>tZ(.1)));)e--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&n.timestamp-i.timestamp>2*tZ(.1)&&(i=t[1]);let r=(n.timestamp-i.timestamp)/1e3;if(0===r)return{x:0,y:0};let s={x:(n.x-i.x)/r,y:(n.y-i.y)/r};return 1/0===s.x&&(s.x=0),1/0===s.y&&(s.y=0),s}(e)}}function rb(t){return t[t.length-1]}let rw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),rS=new Set(["INPUT","SELECT","TEXTAREA"]),rP={x:!1,y:!1};function rT(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 rj(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.mint.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=te(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=e}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let n=t=>{e&&this.snapToCursor(t),this.stopAnimation()},r=(t,e)=>{let{drag:i,dragPropagation:n,onDragStart:r}=this.getProps();if(i&&!n&&(this.openDragLock?.(),this.openDragLock=function(t){if("x"===t||"y"===t)if(rP[t])return null;else return rP[t]=!0,()=>{rP[t]=!1};return rP.x||rP.y?null:(rP.x=rP.y=!0,()=>{rP.x=rP.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:s}=this.visualElement;s&&(s.isAnimationBlocked=!0,s.target=void 0),n8(t=>{let e=this.getAxisMotionValue(t).get()||0;if(th(e)&&(e=tf(e,this.visualElement.current)||0),A.test(e))e=parseFloat(e);else if(E.test(e)){let i=s?.layout?.layoutBox[t];i&&(e=n2(i)*(parseFloat(e)/100))}this.originPoint[t]=e}),r&&tO.update(()=>r(t,e),!1,!0),iI(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},s=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:r,onDrag:s}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:a}=e;if(n&&null===this.currentDirection){if(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}(a),null===this.currentDirection)return;r&&r(this.currentDirection)}this.updateAxis("x",a),this.updateAxis("y",a),this.visualElement.render(),s&&tO.update(()=>s(t,e),!1,!0)},a=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},o=()=>{let{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new rm(t,{onSessionStart:n,onStart:r,onMove:s,onSessionEnd:a,resumeAnimation:o},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:i,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,e,i){let n=t||this.latestPointerEvent,r=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!n)return;let{velocity:a}=r;this.startAnimation(a,i);let{onDragEnd:o}=this.getProps();o&&tO.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,e){let{drag:i}=this.readProps();if(!e||!rL(t,i,this.currentDirection))return;let n=this.getAxisMotionValue(t),r=this.originPoint[t]+e[t],s=this.constraints&&this.constraints[t];s&&(r=function(t,{min:e,max:i},n){return void 0!==e&&ti&&(t=n?eZ(i,t,n.max):Math.min(t,i)),t}(r,s,this.elastic[t])),n.set(r)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),{projection:i}=this.visualElement,n=i&&(i.layout||i.measure(!1)),r=this.constraints;rV(t)?this.constraints&&this.scroll===rA(i)||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=function(t,{top:e,left:i,bottom:n,right:r}){return{x:rT(t.x,i,r),y:rT(t.y,e,n)}}(n.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:rk(t,"left","right"),y:rk(t,"top","bottom")}}(e),r!==this.constraints&&!rV(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&n8(t=>{var e,i;let r;!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=(e=n.layoutBox[t],i=this.constraints[t],r={},void 0!==i.min&&(r.min=i.min-e.min),void 0!==i.max&&(r.max=i.max-e.min),r))})}resolveRefConstraints(){var t,e;let{dragConstraints:i,onMeasureDragConstraints:n}=this.getProps();if(!rV(i))return!1;let r=rR(i),{projection:s}=this.visualElement;if(!s||!s.layout)return!1;this.scroll=rA(s);let a=function(t,e,i){let n=ie(t,i),{scroll:r}=e;return r&&(e9(n.x,r.offset.x),e9(n.y,r.offset.y)),n}(r,s.root,this.visualElement.getTransformPagePoint()),o=(t=s.layout.layoutBox,e=s.removeElementScroll(a),{x:rj(t.x,e.x),y:rj(t.y,e.y)});if(n){let t=n(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=eq(t))}return o}startAnimation(t,e){let{drag:i,dragMomentum:n,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{};return Promise.all(n8(o=>{if(!rL(o,e||i,this.currentDirection))return;let u=l[o]||{};(!0===a||a===o)&&(u={min:0,max:0});let h={type:"inertia",velocity:n?t[o]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(o,h)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return iI(this.visualElement,t),i.start(n$(t,i,0,e,this.visualElement,!1))}stopAnimation(){n8(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`;return this.readProps()[e]||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:e}){let{drag:i}=this.getProps(),n={x:t,y:e},r=this.visualElement.getTransformPagePoint()?.(n)||n,s=this.visualElement.measureViewportBox();n8(t=>{if(!rL(t,i,this.currentDirection))return;let e=this.getAxisMotionValue(t),{min:n,max:a}=s[t];e.set((e.get()||0)+r[t]-eZ(n,a,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!rV(e)||!i||!this.constraints)return;this.stopAnimation();let n=this.constraints,r={x:0,y:0};n8(t=>{var e,i;let s,a,o,l=this.getAxisMotionValue(t).get();r[t]=(e={min:l,max:l},i=n[t],s=.5,a=n2(e),(o=n2(i))>a?s=nv(i.min,i.max-a,e.min):a>o&&(s=nv(e.min,e.max-o,i.min)),d(0,1,s))});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root?.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),n8(e=>{let i=this.getAxisMotionValue(e);if(!rL(e,t,null)||!i.get())return;let{min:n,max:s}=this.constraints[e];i.set(eZ(n,s,r[e]))}),this.visualElement.render()}addListeners(){let t;if(!this.visualElement.current)return;rM.set(this.visualElement,this);let e=this.visualElement.current,i=n1(e,"pointerdown",t=>{let{drag:i,dragListener:n=!0}=this.getProps(),r=t.target,s=r!==e&&(rS.has(r.tagName)||!0===r.isContentEditable);i&&n&&!s&&this.start(t)}),n=()=>{var i,n,r;let s,a,{dragConstraints:o}=this.getProps(),l=rV(o)&&rR(o);l&&(this.constraints=this.resolveRefConstraints(),t||(i=e,n=l,s=rd(i,rD(r=()=>this.scalePositionWithinConstraints())),a=rd(n,rD(r)),t=()=>{s(),a()}))},{projection:r}=this.visualElement,s=r.addEventListener("measure",n);r.layout||(r.root?.updateScroll(),r.updateLayout()),tO.read(n);let a=nJ(window,"resize",()=>this.scalePositionWithinConstraints()),o=r.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(n8(e=>{if(!rL(e,this.getProps().drag,this.currentDirection))return;let i=this.getAxisMotionValue(e);this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate)}),this.visualElement.render())});return()=>{a(),i(),s(),o(),t?.()}}getProps(){let t=this.readProps(),{dragElastic:e=.35,dragMomentum:i=!0}=t;return{...t,dragElastic:e,dragMomentum:i}}}function rV(t){return!!t&&"object"==typeof t&&("current"in t||"nodeType"in t)}let rR=t=>"current"in t?t.current:t;function rD(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function rL(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}let rF=t=>(e,i)=>{t&&tO.update(()=>t(e,i),!1,!0)},rN={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var rB=l;function rI(t=!0){let e=(0,l.useContext)(ib);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:n,register:r}=e,s=(0,l.useId)();(0,l.useEffect)(()=>{if(t)return r(s)},[t]);let a=(0,l.useCallback)(()=>t&&n&&n(s),[s,n,t]);return!i&&n?[!1,a]:[!0]}let rO=!1,r_=({layout:t,layoutDependency:e,layoutAnchor:i})=>({layout:t,layoutDependency:e,layoutAnchor:i,animationType:"string"==typeof t?t:"both"}),rU=(t,e)=>{let{snapshot:i}=t,n=t.getStack();n?.remove(t);let r=n?.lead;if(n?.prevLead===t&&r.resumeFrom===t&&(r.resumeFrom=r.currentAnimation=t.resumingFrom=void 0),t.options.layoutId=e,!e){t.needsShow=!0;return}return t.root.registerSharedNode(e,t),()=>{let{resumeFrom:e}=t;e?.isPresent!==!1&&t.getStack().members.includes(e)&&(e.hide(),t.resumeFrom=void 0,t.snapshot=i)}};class r$ extends rB.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:r}=t;r&&(e.group?.add(r),n&&i?.register?.(r),rO&&r.root.didUpdate(),r.options.layoutId!==n&&rU(r,n)?.(),r.addEventListener("animationComplete",()=>this.safeToRemove()),r.setOptions({...r.options,...r_(this.props),onExitComplete:()=>this.safeToRemove()})),rN.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,layoutId:i,visualElement:n,drag:r,isPresent:s}=this.props,{projection:a}=n;return a&&(a.isPresent=s,this.takeOver=t.layoutId!==i?(a.willUpdate(),rU(a,i)):void 0,a.setOptions({...a.options,...r_(this.props)}),rO=!0,r||t.layoutDependency!==e||void 0===e||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||tO.postRender(()=>{a.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(this.takeOver?.(),t.root.didUpdate(),ec.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;rO=!0,n&&(n.scheduleCheckAfterUnmount(),e.group?.remove(n),i?.deregister?.(n))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}}function rz(t){let[e,i]=rI(),n=(0,rB.useContext)(io);return(0,a.jsx)(r$,{...t,layoutGroup:n,switchLayoutGroup:(0,rB.useContext)(iC),isPresent:e,safeToRemove:i})}let rW=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],rH=t=>"number"==typeof t?t:parseFloat(t),rY=rW.length,rK=t=>"number"==typeof t||A.test(t);function rX(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let rG=rZ(0,.5,np),rq=rZ(.5,.95,tL);function rZ(t,e,i){return n=>ne?1:i(nv(t,e,n))}function rJ(t,e){t.min=e.min,t.max=e.max}function rQ(t,e){rJ(t.x,e.x),rJ(t.y,e.y)}function r0(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function r1(t,e,i,n,r){return t-=e,t=n+1/i*(t-n),void 0!==r&&(t=n+1/r*(t-n)),t}function r2(t,e,[i,n,r],s,a){!function(t,e=0,i=1,n=.5,r,s=t,a=t){if(E.test(e)&&(e=parseFloat(e),e=eZ(a.min,a.max,e/100)-a.min),"number"!=typeof e)return;let o=eZ(s.min,s.max,n);t===s&&(o-=e),t.min=r1(t.min,e,i,o,r),t.max=r1(t.max,e,i,o,r)}(t,e[i],e[n],e[r],e.scale,s,a)}let r4=["x","scaleX","originX"],r5=["y","scaleY","originY"];function r3(t,e,i,n){r2(t.x,e,r4,i?.x,n?.x),r2(t.y,e,r5,i?.y,n?.y)}function r7(t){return 0===t.translate&&1===t.scale}function r9(t){return r7(t.x)&&r7(t.y)}function r8(t,e){return t.min===e.min&&t.max===e.max}function r6(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function st(t,e){return r6(t.x,e.x)&&r6(t.y,e.y)}function se(t){return n2(t.x)/n2(t.y)}function si(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class sn{constructor(){this.members=[]}add(t){tJ(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 n=i.instance;n&&!1!==n.isConnected||i.snapshot||(tQ(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(tQ(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:n}=i.options,{layoutDependency:r}=t.options;(void 0===n||n!==r)&&(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)}}function sr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let ss={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t)if(!A.test(t))return t;else t=parseFloat(t);let i=sr(t,e.target.x),n=sr(t,e.target.y);return`${i}% ${n}%`}},sa={borderRadius:Object.assign({},ss,{applyTo:rW.slice()}),borderTopLeftRadius:ss,borderTopRightRadius:ss,borderBottomLeftRadius:ss,borderBottomRightRadius:ss,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=U.parse(t);if(n.length>5)return t;let r=U.createTransformer(t),s=+("number"!=typeof n[0]),a=i.x.scale*e.x,o=i.y.scale*e.y;n[0+s]/=a,n[1+s]/=o;let l=eZ(a,o,.5);return"number"==typeof n[2+s]&&(n[2+s]/=l),"number"==typeof n[3+s]&&(n[3+s]/=l),r(n)}}},so=(t,e)=>t.depth-e.depth;class sl{constructor(){this.children=[],this.isDirty=!1}add(t){tJ(this.children,t),this.isDirty=!0}remove(t){tQ(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(so),this.isDirty=!1,this.children.forEach(t)}}let su=["z","skew","skewZ"],sh=0;function sc(t,e,i,n){let{latestValues:r}=e;r[t]&&(i[t]=r[t],e.setStaticValue(t,0),n&&(n[t]=0))}let sd=t=>t.instance&&eh.get(t.instance)?.demote()&&t.resetSkewAndRotation();function sp({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:r}){return Object.assign(eH,{...sa,...eH}),class{constructor(t={},i=e?.()){this.id=sh++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(sg),this.nodes.forEach(sk),this.nodes.forEach(sE),this.nodes.forEach(sv)},this.resolvedRelativeTargetAt=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;tthis.root.updateBlockedByResize=!1;tO.read(()=>{n=window.innerWidth}),t(e,()=>{let t=window.innerWidth;if(t!==n){var e;let s,a;n=t,this.root.updateBlockedByResize=!0,i?.(),e=r,s=t6.now(),e=re(e),a=({timestamp:t})=>{let i=t-s;i>=250&&(t_(a),e(i-250))},tO.setup(a,!0),i=rt(()=>t_(a)),rN.hasAnimatedSinceResize&&(rN.hasAnimatedSinceResize=!1,this.nodes.forEach(sj))}})}i&&this.root.registerSharedNode(i,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:t,layout:e,visualElement:i,animate:n}=this.options;this.instance&&!this.hasLayoutListener&&!1!==n&&i&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let s=this.options.transition||i.getDefaultTransition()||sR,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=i.getProps(),l=!this.targetLayout||!st(this.targetLayout,r),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...iB(s,"layout"),onPlay:a,onComplete:o};(i.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u,e.path)}else e||sj(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,t_(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes?.forEach(sA),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void this.options.onExitComplete?.();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 n=i.props[iM];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tO,!(t||i))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;sd(this),this.isLayoutDirty=!0;for(let t=0;tt.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tO.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tO.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||n2(this.snapshot.measuredBox.x)||n2(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.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e&&(!t.relativeTarget||!!t.relativeParent.resumingFrom||t.relativeParent)),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=te());let{target:o}=t;if(!o){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(r0(this.prevProjectionDelta.x,this.projectionDelta.x),r0(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),n5(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&si(this.projectionDelta.x,this.prevProjectionDelta.x)&&si(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Q(),this.projectionDelta=Q(),this.projectionDeltaWithTransform=Q()}setAnimationOrigin(t,e=!1,i){let n,r=this.snapshot,s=r?r.latestValues:{},a={...this.latestValues},o=Q();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let l=te(),u=r?.source!==this.layout?.source,h=this.getStack(),c=!h||h.members.length<=1,d=!!(u&&!c&&!0===this.options.crossfade&&!this.path.some(sV));this.animationProgress=0;let p=i?.interpolateProjection(t);this.mixTargetDelta=e=>{let i=e/1e3,r=p?.(i);if(sM(o.x,t.x,i),sM(o.y,t.y,i),r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,f,m,g,v,y;n9(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),m=this.relativeTarget,g=this.relativeTargetOrigin,v=l,y=i,sC(m.x,g.x,v.x,y),sC(m.y,g.y,v.y,y),n&&(h=this.relativeTarget,f=n,r8(h.x,f.x)&&r8(h.y,f.y))&&(this.isProjectionDirty=!1),n||(n=te()),rQ(n,this.relativeTarget)}u&&(this.animationValues=a,function(t,e,i,n,r,s){r?(t.opacity=eZ(0,i.opacity??1,rG(n)),t.opacityExit=eZ(e.opacity??1,0,rq(n))):s&&(t.opacity=eZ(e.opacity??1,i.opacity??1,n));for(let r=0;r{var e,i,n;let r;rN.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=em(0)),this.motionValue.jump(0,!1),this.currentAnimation=(e=this.motionValue,i=[0,1e3],n={...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}},(r=ti(e)?e:em(e)).start(n$("",r,i,n)),r.animation),function(t,e){let i=globalThis.__MOTION_INSPECT__;if(i)try{i({...et("layout-animation-start",t),node:e})}catch{}}(this.currentAnimation,this),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?.(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,layout:i,latestValues:n}=t,{target:r}=t;if(e&&r&&i){if(this!==t&&this.layout&&i&&sB(this.options.animationType,this.layout.layoutBox,i.layoutBox)){let{layoutBox:t}=this.layout,e=r;sN((r=this.target||te()).x,e.x,t.x),sN(r.y,e.y,t.y)}rQ(e,r),it(e,n),n5(this.projectionDeltaWithTransform,this.layoutCorrected,e,n)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new sn),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?.transition,preserveFollowOpacity: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}={}){this.getStack()?.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let{latestValues:e}=t;if(!e2(e))return;let i={};for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(sx),this.root.sharedNodes.clear()}}}function sf(t){t.updateLayout(),function(t){let{snapshot:e,dragAncestor:i}=t,n=i?.isAnimationBlocked&&i.layout;if(!e||!n||t.resumeFrom||t.isAnimationBlocked)return;let r=i.dragSnapshot;n8(t=>e9(e.layoutBox[t],n.layoutBox[t].min-r.layoutBox[t].min))}(t)}function sm(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:n}=t.layout,{animationType:r}=t.options,s=e.source!==t.layout.source,a=(n,s)=>{if("size"===r)n8(t=>{let e=n2(n[t]);n[t].min=s[t].min,n[t].max=n[t].min+e});else if("x"===r||"y"===r){let t="x"===r?"y":"x";rJ(n[t],s[t])}else sB(r,e.layoutBox,i)&&n8(e=>{let i=n2(s[e]);n[e].max=n[e].min+i,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+i)})},o=s?e.measuredBox:e.layoutBox;a(o,i);let l=Q();n5(l,i,e.layoutBox);let u=Q();n5(u,s?t.applyTransform(n,!0):i,o);let h=!r9(l),c=!1,d=t.getClosestProjectingParent();if((!t.resumeFrom||d?.options.layoutRoot&&t.resumeFrom.path.includes(d))&&d&&!d.resumeFrom){let{snapshot:n,layout:r}=d;if(n&&r){let o=t.options.layoutAnchor||void 0,l=te();n9(l,s?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,n.layoutBox,o);let u=te();n9(u,i,r.layoutBox,o),s&&a(l,u),st(l,u)||(c=!0),d.options.layoutRoot&&(t.relativeTarget=u,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeLayoutChanged:c})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function sg(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function sv(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function sy(t){t.clearSnapshot()}function sx(t){t.clearMeasurements()}function sb(t){t.isLayoutDirty=!0,t.updateLayout()}function sw(t){t.isLayoutDirty=!1}function sS(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function sP(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function sT(t){let{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function sj(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function sk(t){t.resolveTargetDelta()}function sE(t){t.calcProjection()}function sA(t){t.resetSkewAndRotation()}function sM(t,e,i){t.translate=eZ(e.translate,0,i),t.scale=eZ(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function sC(t,e,i,n){t.min=eZ(e.min,i.min,n),t.max=eZ(e.max,i.max,n)}function sV(t){return t.animationValues?.opacityExit!==void 0}let sR={duration:.45,ease:[.4,0,.1,1]},sD=t=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),sL=sD("applewebkit/")&&!sD("chrome/")?Math.round:tL;function sF(t){t.min=sL(t.min),t.max=sL(t.max)}function sN(t,e,i){t.max=n2(i)+(t.min=e.min)}function sB(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(se(e)-se(i)))}function sI(t){return t!==t.root&&t.scroll?.wasRoot}let sO=sp({attachResizeListener:(t,e)=>nJ(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),s_=sp({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ia.current){let t=new sO({});t.mount(window),t.setOptions({layoutScroll:!0}),ia.current=t}return ia.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function sU(t,e){let i=rr(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},rt(()=>n.abort())]}function s$(t,e,i,n){let{props:r}=t,s="while"+i;t.animationState&&r[s]&&t.animationState.setActive(s,"Start"===n);let a=r["on"+i+n];a&&tO.postRender(()=>a(e,n0(e)))}function sz(t){return ri(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}let sW=(t,e)=>!!e&&(t===e||sW(t,e.parentElement)),sH=new WeakSet;function sY(t){return e=>{"Enter"===e.key&&t(e)}}function sK(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function sX(t){return nQ(t)&&!(rP.x||rP.y)}let sG=new WeakSet;function sq(t,e,i){t.current instanceof HTMLButtonElement&&t.current.disabled||s$(t,e,"Tap",i)}let sZ=new WeakMap,sJ=new WeakMap,sQ=t=>{let e=sZ.get(t.target);e&&e(t)},s0=t=>{t.forEach(sQ)},s1={some:0,all:1},s2=function(t,e){if("u"iR(i,n,t,e);return new Proxy((t,e)=>n(t,e),{get:(r,s)=>"create"===s?n:(i.has(s)||i.set(s,iR(s,void 0,t,e)),i.get(s))})}(Object.assign({},{animation:{Feature:class extends iD{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={}){return t.notify("AnimationStart",e),(Array.isArray(e)?Promise.all(e.map(e=>nY(t,e,i))):"string"==typeof e?nY(t,e,i):Promise.all(nW(t,iL(t,e,i.custom),i))).then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=nq(),n=!0,r=!1;function s(s){let{props:a,parent:o,manuallyAnimateOnMount:l}=t,{initial:u}=a,h=n||r,c=[],d=(e=u)=>"boolean"!=typeof e&&iL(t,Array.isArray(e)?e[0]:e,t.presenceContext?.custom)||void 0,p=new Map,f={},m=1/0,g=t;do g=!1!==g.props.inherit&&g.parent;while(g&&!g.isControllingVariants)let v=h&&nG(d(u??(g&&g.props.initial))?.transition);if(nX.forEach((e,n)=>{var r,u;let d,y=i[e],x=a[e],b=g&&g.props[e],w=void 0!==x?x:ey(b)||!1===b?b:void 0,S=ey(w),P=e===s?y.isActive:null,T=S&&void 0===x&&!(h&&l);if(y.protectedKeys={...f},!y.isActive&&null===P||!w&&!y.prevProp||ev(w)||"boolean"==typeof w)return;if(!1===P&&(m=n),"exit"===e&&y.isActive&&!0!==P){f={...f,...y.prevResolvedValues};return}let j=(r=y.prevProp,"string"==typeof(u=w)?u!==r:!!Array.isArray(u)&&!nK(u,r)),k=j||S&&(P&&!T||n>m),E=!1,A=Array.isArray(w)?w:[w],M={};if(!1!==P)for(let i of A){let{transition:n,transitionEnd:r,...s}=iL(t,i,iF(t,e))||{};M={...M,...s,...r},d=nG(n)||d}let{prevResolvedValues:C}=y;for(let e in{...C,...M}){let i;if(e in f)continue;let n=M[e],r=C[e],s=Array.isArray(n)&&Array.isArray(r)?!nK(n,r)||j:n!==r;if(s&&null==n)p.has(e)||p.set(e,y.prevOut);else if(s||void 0!==n&&p.has(e)){k=!0,i=p.get(e)||v,p.delete(e)&&(E=!0),y.needsAnimating[e]=!0;let n=t.getValue(e);n&&(n.liveStyle=!1)}else y.protectedKeys[e]=!0;y.out[e]=i}if(y.prevProp=w,y.prevResolvedValues=M,y.prevOut=d,y.isActive&&(f={...f,...M}),k&&(!(T&&j)||E))for(let i of A){let n={type:e};if("string"==typeof i&&h&&l&&o?.enteringChildren){let e=iL(o,i)?.transition?.delayChildren;n.delay=nH(o.enteringChildren,t,e)}c.push({animation:i,options:n})}}),p.size){let e={},i=d(),n=i?.transition;p.forEach((r,s)=>{r&&(n={...n||t.getDefaultTransition(),[s]:r});let o=t.getValue(s);o&&(o.liveStyle=!0);let l=i&&!Array.isArray(u)?i[s]:void 0,h=t.getBaseTargetFromProps(a,s);e[s]=(void 0!==l?l:void 0===h||ti(h)?void 0===t.initialValues[s]?t.baseTarget[s]:void 0:h)??null}),n&&(e.transition=n),c.push({animation:e})}let y=h&&t.blockInitialAnimation||n&&!l&&(!1===a.initial||a.initial===a.animate);return n=r=!1,!y&&c.length?e(c):Promise.resolve()}return{animateChanges:s,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;let r=s(e);for(let t in i)i[t].protectedKeys={};return r},setAnimateFunction:i=>{e=i(t)},getState:()=>i,reset:()=>{i=nq(),r=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();ev(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends iD{constructor(){super(...arguments),this.id=nZ++}update(){let{presenceContext:t,prevPresenceContext:e,animationState:i}=this.node;if(!t||!i)return;let{isPresent:n,onExitComplete:r}=t,s=e?.isPresent;if(n===s)return;if(n&&!1===s){if(!0===this.exit){let{initial:t}=this.node.getProps();if(t&&!Array.isArray(t)){let{transition:e,transitionEnd:i,...n}=iL(this.node,t)||{};for(let t in n)this.node.getValue(t)?.jump(n[t])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}let a=this.exit=i.setActive("exit",!n);r&&!n&&a.then(()=>{this.exit===a&&(this.exit=!0,r(this.id))})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id,this.node))}unmount(){}}}},{inView:{Feature:class extends iD{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var t;let e;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:a}=i,o={root:n?n.current:void 0,rootMargin:r,threshold:"number"==typeof s?s:s1[s]},l=t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,a&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),r=e?i:n;r&&r(t)};this.stopObserver=(t=this.node.current,e=function({root:t,...e}){let i=t||document;sJ.has(i)||sJ.set(i,{});let n=sJ.get(i),r=JSON.stringify(e);return n[r]||(n[r]=new IntersectionObserver(s0,{root:t,...e})),n[r]}(o),sZ.set(t,l),e.observe(t),()=>{sZ.delete(t),e.unobserve(t)})}mount(){this.startObserver()}update(){if("u"t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends iD{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:e,propagate:i}=this.node.props;this.unmount=function(t,e,i={}){e=re(e);let[n,r,s]=sU(t,i),a=t=>{let n=t.currentTarget;if(!sX(t)||sG.has(t))return;sH.add(n),i.stopPropagation&&sG.add(t);let s=e(n,t),a={...r,capture:!0},o=(t,e)=>{window.removeEventListener("pointerup",l,a),window.removeEventListener("pointercancel",u,a),sH.has(n)&&sH.delete(n),sX(t)&&"function"==typeof s&&s(t,{success:e})},l=t=>{o(t,n===window||n===document||i.useGlobalTarget||sW(n,t.target))},u=t=>{o(t,!1)};window.addEventListener("pointerup",l,a),window.addEventListener("pointercancel",u,a)};return n.forEach(t=>{((i.useGlobalTarget?window:t).addEventListener("pointerdown",a,r),sz(t))&&(t.addEventListener("focus",()=>{let e,i,n;return e=!1,i=sY(()=>{sH.has(t)||(e=!0,sK(t,"down"))}),n=sY(()=>{e&&(e=!1,sK(t,"up"))}),void(t.addEventListener("keydown",i,r),t.addEventListener("keyup",n,r),t.addEventListener("blur",()=>{t.removeEventListener("keydown",i),t.removeEventListener("keyup",n),e&&sK(t,"cancel")},{...r,once:!0}))},r),rw.has(t.tagName)||!0===t.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),s}(t,(t,e)=>(sq(this.node,e,"Start"),(t,{success:e})=>sq(this.node,t,e?"":"Cancel")),{useGlobalTarget:e,stopPropagation:i?.tap===!1})}unmount(){}}},focus:{Feature:class extends iD{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=iO(nJ(this.node.current,"focus",()=>this.onFocus()),nJ(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends iD{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){e=re(e);let[n,r,s]=sU(t,i);return n.forEach(t=>{let i,n=!1,s=!1,a=e=>{i&&(i(e),i=void 0),t.removeEventListener("pointerleave",l)},o=t=>{n=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),s&&(s=!1,a(t))},l=t=>{if("touch"!==t.pointerType){if(n){s=!0;return}a(t)}};t.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||rP.x||rP.y)return;s=!1;let a=e(t,n);"function"==typeof a&&(i=a,t.addEventListener("pointerleave",l,r))},r),t.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",o,r)},r)}),s}(t,(t,e)=>(s$(this.node,e,"Hover","Start"),t=>s$(this.node,t,"Hover","End"))))}unmount(){}}}},{pan:{Feature:class extends iD{constructor(){super(...arguments),this.removePointerDownListener=tL}onPointerDown(t){this.session=new rm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:rF(t),onStart:rF(e),onMove:rF(i),onEnd:(t,e)=>{delete this.session,n&&tO.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=n1(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}}},drag:{Feature:class extends iD{constructor(t){super(t),this.removeGroupControls=tL,this.removeListeners=tL,this.controls=new rC(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tL}update(){let{dragControls:t,drag:e}=this.node.getProps(),{dragControls:i,drag:n}=this.node.prevProps||{};t!==i&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls))),n&&!e&&this.controls.stop(void 0,void 0,n)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:s_,MeasureLayout:rz}},{layout:{ProjectionNode:s_,MeasureLayout:rz}}),(t,e)=>e.isSVG??is(t)?new eG(e):new ii(e,{allowProjection:t!==l.Fragment}));var s4=l;function s5(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}let s3=t=>{let{width:e,height:i}=t?.getBoundingClientRect()||{};return[e/t?.offsetWidth||1,i/t?.offsetHeight||1]},s7=t=>{let{left:e,top:i}=t.getBoundingClientRect(),n=t;for(;n=n.parentElement||n.parentNode?.host;){let{scrollLeft:t,scrollTop:r}=n;if(t||r){let[s,a]=s3(n);e+=t*s,i+=r*a}if("fixed"===getComputedStyle(n).position)break}let[r,s]=s3(t.offsetParent);return[e/r,i/s]};class s9 extends s4.Component{getSnapshotBeforeUpdate(t){let e=this.props.getElement();if(sz(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let t=e.offsetParent,i=sz(t)&&t.offsetWidth||0,n=sz(t)&&t.offsetHeight||0,r=getComputedStyle(e),s=this.props.sizeRef.current;s.height=parseFloat(r.height),s.width=parseFloat(r.width),s.top=e.offsetTop,s.left=e.offsetLeft,s.right=i-s.width-s.left,s.bottom=n-s.height-s.top,s.direction=r.direction,s.point=s7(e)}return null}componentDidUpdate(){}render(){return this.props.children}}function s8({children:t,isPresent:e,anchorX:i,anchorY:n,root:r,pop:s,popNode:o}){let u=(0,s4.useId)(),h=(0,s4.useRef)(null),c=(0,s4.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:d}=(0,s4.useContext)(iu),p=function(...t){return l.useCallback(function(...t){return e=>{let i=!1,n=t.map(t=>{let n=s5(t,e);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let e=0;eh.current||o?.current?.current,m=t=>{let{width:e,height:r,top:s,left:a,right:o,bottom:l,direction:h}=c.current,d="rtl"===h,p="left"===i?d?`right:${o}`:`left:${a}`:d?`left:${a}`:`right:${o}`,f="bottom"===n?`bottom:${l}`:`top:${s}`;t?.insertRule(`[data-motion-pop-id="${u}"]{position:absolute!important;width:${e}px!important;height:${r}px!important;${p}px!important;${f}px!important}`)};return(0,s4.useInsertionEffect)(()=>{let{width:t,height:i}=c.current,n=f();if(e||!1===s||!n||!t||!i)return;n.dataset.motionPopId=u;let a=n.ownerDocument,o=a.createElement("style");d&&(o.nonce=d);let l=r??a.head;l.appendChild(o),m(o.sheet);let h=0,p=0;return ec.setup(()=>{let[t,e]=s7(n);h=c.current.point[0]-t,p=c.current.point[1]-e}),ec.read(()=>{let{sheet:t}=o;if(!t||!h&&!p)return;let e=c.current;e.left+=h,e.right-=h,e.top+=p,e.bottom-=p,t.deleteRule(0),m(t)}),()=>{n.removeAttribute("data-motion-pop-id"),l.contains(o)&&l.removeChild(o)}},[e]),(0,a.jsx)(s9,{isPresent:e,getElement:f,sizeRef:c,pop:s,children:!1===s?t:s4.cloneElement(t,{ref:p})})}let s6=({children:t,initial:e,isPresent:i,onExitComplete:n,custom:r,presenceAffectsLayout:s,mode:o,anchorX:u,anchorY:h,root:c})=>{let d=iw(at),p=(0,l.useId)(),f=(0,l.useRef)(),m=(0,l.useRef)(i),g=(0,l.useRef)(n);iV(()=>{m.current=i,g.current=n});let v=!0,y=(0,l.useMemo)(()=>(v=!1,{id:p,initial:e,isPresent:i,custom:r,onExitComplete:t=>{for(let e of(d.set(t,!0),d.values()))if(!e)return;n&&n()},register:(t,e)=>(d.set(t,!1),e&&e.parent?.presenceContext?.id!==p&&(f.current=e),()=>{d.delete(t),m.current||d.size||g.current?.()})}),[i,d,n]);return s&&v&&(y={...y}),(0,l.useMemo)(()=>{d.forEach((t,e)=>d.set(e,!1))},[i]),l.useEffect(()=>{i||d.size||!n||n()},[i]),t=(0,a.jsx)(s8,{pop:"popLayout"===o,isPresent:i,anchorX:u,anchorY:h,root:c,popNode:f,children:t}),(0,a.jsx)(ib.Provider,{value:y,children:t})};function at(){return new Map}let ae=t=>t.key||"";function ai(t){let e=[];return l.Children.forEach(t,t=>{(0,l.isValidElement)(t)&&e.push(t)}),e}let an=({children:t,custom:e,initial:i=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:s="sync",propagate:o=!1,anchorX:u="left",anchorY:h="top",root:c})=>{let[d,p]=rI(o),f=(0,l.useMemo)(()=>ai(t),[t]),m=o&&!d?[]:f.map(ae),g=(0,l.useRef)(!0),v=iw(()=>new Map),y=(0,l.useRef)(new Set),[x,b]=(0,l.useState)(f),[w,S]=(0,l.useState)(f);iV(()=>{!o||d||w.length||p?.()},[d,o,w.length,p]);let P=(0,l.useRef)();(0,l.useEffect)(()=>()=>{let t=P.current;P.current=void 0,t?.()},[w]),iV(()=>{g.current=!1;for(let t=0;tv.get(ae(t)))?t=f:"wait"===s&&(t=T),S(ai(t)),b(f),null}let{forceRender:j}=(0,l.useContext)(io);return(0,a.jsx)(a.Fragment,{children:w.map(t=>{let l=ae(t),x=(!o||!!d)&&(f===w||m.includes(l));return(0,a.jsx)(s6,{isPresent:x,initial:(!g.current||!!i)&&void 0,custom:e,presenceAffectsLayout:r,mode:s,root:c,onExitComplete:x?void 0:()=>{if(y.current.has(l)||!v.has(l))return;y.current.add(l),v.set(l,!0);let t=!0;v.forEach(e=>{e||(t=!1)}),t&&(j?.(),b([]),o&&p?.(),P.current=n)},anchorX:u,anchorY:h,children:t},l)})})};var ar=t.i(35555),as=t.i(83222),aa=t.i(33336),ao=t.i(94487),al=t.i(92704),au=t.i(14189),ah=t.i(93456),ac=t.i(35696),ad=t.i(41444),ap=t.i(77891),af=t.i(52744),am=t.i(5083),ag=t.i(44279),av=t.i(85935),ay=t.i(1852),ax=t.i(55743),ab=t.i(94316),aw=t.i(61130),aS=t.i(83733),aP=t.i(74175),aT=t.i(19751),aj=t.i(2788),ak=t.i(33137),aE=t.i(40407),aA=t.i(33538),aM=t.i(13581),aC=t.i(52265),aV=t.i(97701),aR=t.i(2155),aD=t.i(20),aL=t.i(98348),aF=t.i(35307),aN=t.i(25720),aB=t.i(41650),aI=Object.defineProperty,aO=(t,e,i)=>{let n;return(n="symbol"!=typeof e?e+"":e)in t?aI(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,i},a_=((r=a_||{})[r.Open=0]="Open",r[r.Closed=1]="Closed",r),aU=((s=aU||{})[s.OpenPopover=0]="OpenPopover",s[s.ClosePopover=1]="ClosePopover",s[s.SetButton=2]="SetButton",s[s.SetButtonId=3]="SetButtonId",s[s.SetPanel=4]="SetPanel",s[s.SetPanelId=5]="SetPanelId",s);let a$={0:t=>0===t.popoverState?t:{...t,popoverState:0,__demoMode:!1},1:t=>1===t.popoverState?t:{...t,popoverState:1,__demoMode:!1},2:(t,e)=>t.button===e.button?t:{...t,button:e.button},3:(t,e)=>t.buttonId===e.buttonId?t:{...t,buttonId:e.buttonId},4:(t,e)=>t.panel===e.panel?t:{...t,panel:e.panel},5:(t,e)=>t.panelId===e.panelId?t:{...t,panelId:e.panelId}};class az extends aN.${constructor(t){super(t),aO(this,"actions",{close:()=>this.send({type:1}),refocusableClose:t=>{this.actions.close();let e=t?aM.F(t)?t:"current"in t&&aM.F(t.current)?t.current:this.state.button:this.state.button;null==e||e.focus()},open:()=>this.send({type:0}),setButtonId:t=>this.send({type:3,buttonId:t}),setButton:t=>this.send({type:2,button:t}),setPanelId:t=>this.send({type:5,panelId:t}),setPanel:t=>this.send({type:4,panel:t})}),aO(this,"selectors",{isPortalled:t=>{var e;if(!t.button||!t.panel)return!1;let i=null!=(e=(0,aR.o)(t.button))?e:document;for(let e of i.querySelectorAll("body > *"))if(Number(null==e?void 0:e.contains(t.button))^Number(null==e?void 0:e.contains(t.panel)))return!0;let n=(0,aC.o)(i),r=n.indexOf(t.button),s=(r+n.length-1)%n.length,a=(r+1)%n.length,o=n[s],l=n[a];return!t.panel.contains(o)&&!t.panel.contains(l)}});{let t=this.state.id,e=aB.l.get(null);this.on(0,()=>e.actions.push(t)),this.on(1,()=>e.actions.pop(t))}}static new({id:t,__demoMode:e=!1}){return new az({id:t,__demoMode:e,popoverState:+!e,buttons:{current:[]},button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:{current:null},afterPanelSentinel:{current:null},afterButtonSentinel:{current:null}})}reduce(t,e){return(0,aV.f)(e.type,a$,t,e)}}var aW=t.i(26599);let aH=(0,l.createContext)(null);function aY(t){let e=(0,l.useContext)(aH);if(null===e){let e=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,aY),e}return e}let aK=(0,l.createContext)(null);function aX(){return(0,l.useContext)(aK)}aK.displayName="PopoverGroupContext";let aG=(0,l.createContext)(null);aG.displayName="PopoverPanelContext";let aq=aD.J.RenderStrategy|aD.J.Static;function aZ(t,e){let i=(0,l.useId)(),{id:n=`headlessui-popover-backdrop-${i}`,transition:r=!1,...s}=t,a=aY("Popover.Backdrop"),o=(0,aE.f)(a,(0,l.useCallback)(t=>t.popoverState,[])),[u,h]=(0,l.useState)(null),c=(0,ab.V)(e,h),d=(0,ak.N)(),[p,f]=(0,aS.S)(r,u,null!==d?(d&ak.A.Open)===ak.A.Open:o===a_.Open),m=(0,au.f)(t=>{if((0,aA.f)(t.currentTarget))return t.preventDefault();a.actions.close()}),g=(0,ax.f)({open:o===a_.Open}),v={ref:c,id:n,"aria-hidden":!0,onClick:m,...(0,aS.p)(f)};return(0,aD.n)()({ourProps:v,theirProps:s,slot:g,defaultTag:"div",features:aq,visible:p,name:"Popover.Backdrop"})}let aJ=aD.J.RenderStrategy|aD.J.Static,aQ=(0,aD.t)(function(t,e){var i;let n=(0,l.useId)(),{__demoMode:r=!1,...s}=t,a=function({id:t,__demoMode:e=!1}){let i=(0,l.useMemo)(()=>az.new({id:t,__demoMode:e}),[]);return(0,aW.f)(()=>i.dispose()),i}({id:n,__demoMode:r}),o=(0,l.useRef)(null),u=(0,ab.V)(e,(0,ab.f)(t=>{o.current=t})),[h,c,d,p,f]=(0,aE.f)(a,(0,l.useCallback)(t=>[t.popoverState,t.button,t.panel,t.buttonId,t.panelId],[])),m=(0,am.o)(null!=(i=o.current)?i:c),g=(0,ad.f)(p),v=(0,ad.f)(f),y=(0,l.useMemo)(()=>({buttonId:g,panelId:v,close:a.actions.close}),[g,v,a]),x=aX(),b=null==x?void 0:x.registerPopover,w=(0,au.f)(()=>{var t,e;let i=(0,aR.z)(null!=(t=o.current)?t:c);return null!=(e=null==x?void 0:x.isFocusWithinPopoverGroup())?e:i&&((null==c?void 0:c.contains(i))||(null==d?void 0:d.contains(i)))});(0,l.useEffect)(()=>null==b?void 0:b(y),[b,y]);let[S,P]=(0,aF.U)(),T=(0,av.G)(c),j=(0,av.$)({mainTreeNode:T,portals:S,defaultContainers:[{get current(){return a.state.button}},{get current(){return a.state.panel}}]});(0,ah.f)(m,"focus",t=>{var e,i,n,r,s,o;t.target!==window&&aM.N(t.target)&&a.state.popoverState===a_.Open&&(w()||a.state.button&&a.state.panel&&(j.contains(t.target)||null!=(i=null==(e=a.state.beforePanelSentinel.current)?void 0:e.contains)&&i.call(e,t.target)||null!=(r=null==(n=a.state.afterPanelSentinel.current)?void 0:n.contains)&&r.call(n,t.target)||null!=(o=null==(s=a.state.afterButtonSentinel.current)?void 0:s.contains)&&o.call(s,t.target)||a.actions.close()))},!0);let k=h===a_.Open;(0,af.f)(k,j.resolveContainers,(t,e)=>{a.actions.close(),(0,aC.d)(e,aC.m.Loose)||(t.preventDefault(),null==c||c.focus())});let E=(0,ax.f)({open:h===a_.Open,close:a.actions.refocusableClose}),A=(0,aE.f)(a,(0,l.useCallback)(t=>(0,aV.f)(t.popoverState,{[a_.Open]:ak.A.Open,[a_.Closed]:ak.A.Closed}),[])),M=(0,aD.n)();return l.default.createElement(av.u,{node:T},l.default.createElement(aT.j,null,l.default.createElement(aG.Provider,{value:null},l.default.createElement(aH.Provider,{value:a},l.default.createElement(aP.f,{value:a.actions.refocusableClose},l.default.createElement(ak.z,{value:A},l.default.createElement(P,null,M({ourProps:{ref:u},theirProps:s,slot:E,defaultTag:"div",name:"Popover"}))))))))}),a0=(0,aD.t)(function(t,e){let i=(0,l.useId)(),{id:n=`headlessui-popover-button-${i}`,disabled:r=!1,autoFocus:s=!1,...a}=t,o=aY("Popover.Button"),[u,h,c,d,p,f,m]=(0,aE.f)(o,(0,l.useCallback)(t=>[t.popoverState,o.selectors.isPortalled(t),t.button,t.buttonId,t.panel,t.panelId,t.afterButtonSentinel],[])),g=(0,l.useRef)(null),v=`headlessui-focus-sentinel-${(0,l.useId)()}`,y=aX(),x=null==y?void 0:y.closeOthers,b=null!==(0,l.useContext)(aG);(0,l.useEffect)(()=>{if(!b)return o.actions.setButtonId(n),()=>o.actions.setButtonId(null)},[b,n,o]);let[w]=(0,l.useState)(()=>Symbol()),S=(0,ab.V)(g,e,(0,aT.$)(),(0,au.f)(t=>{if(!b){if(t)o.state.buttons.current.push(w);else{let t=o.state.buttons.current.indexOf(w);-1!==t&&o.state.buttons.current.splice(t,1)}o.state.buttons.current.length>1&&console.warn("You are already using a but only 1 is supported."),t&&o.actions.setButton(t)}})),P=(0,ab.V)(g,e),T=(0,au.f)(t=>{var e,i,n;if(b){if(o.state.popoverState===a_.Closed)return;switch(t.key){case aL.f.Space:case aL.f.Enter:t.preventDefault(),null==(i=(e=t.target).click)||i.call(e),o.actions.close(),null==(n=o.state.button)||n.focus()}}else switch(t.key){case aL.f.Space:case aL.f.Enter:t.preventDefault(),t.stopPropagation(),o.state.popoverState===a_.Closed?(null==x||x(o.state.buttonId),o.actions.open()):o.actions.close();break;case aL.f.Escape:if(o.state.popoverState!==a_.Open)return null==x?void 0:x(o.state.buttonId);if(!g.current)return;let r=(0,aR.z)(g.current);if(r&&!g.current.contains(r))return;t.preventDefault(),t.stopPropagation(),o.actions.close()}}),j=(0,au.f)(t=>{b||t.key===aL.f.Space&&t.preventDefault()}),k=(0,au.f)(t=>{var e,i;(0,aA.f)(t.currentTarget)||r||(b?(o.actions.close(),null==(e=o.state.button)||e.focus()):(t.preventDefault(),t.stopPropagation(),o.state.popoverState===a_.Closed?(null==x||x(o.state.buttonId),o.actions.open()):o.actions.close(),null==(i=o.state.button)||i.focus()))}),E=(0,au.f)(t=>{t.preventDefault(),t.stopPropagation()}),{isFocusVisible:A,focusProps:M}=(0,as.f)({autoFocus:s}),{isHovered:C,hoverProps:V}=(0,aa.f)({isDisabled:r}),{pressed:R,pressProps:D}=(0,ao.f)({disabled:r}),L=u===a_.Open,F=(0,ax.f)({open:L,active:R||L,disabled:r,hover:C,focus:A,autofocus:s}),N=(0,ag.f)(t,c),B=b?(0,aD.w)({ref:P,type:N,onKeyDown:T,onClick:k,disabled:r||void 0,autoFocus:s},M,V,D):(0,aD.w)({ref:S,id:d,type:N,"aria-expanded":u===a_.Open,"aria-controls":p?f:void 0,disabled:r||void 0,autoFocus:s,onKeyDown:T,onKeyUp:j,onClick:k,onMouseDown:E},M,V,D),I=(0,aw.u)(),O=(0,au.f)(()=>{if(!aM.F(o.state.panel))return;let t=o.state.panel;(0,aV.f)(I.current,{[aw.v.Forwards]:()=>(0,aC.R)(t,aC.b.First),[aw.v.Backwards]:()=>(0,aC.R)(t,aC.b.Last)})===aC.f.Error&&(0,aC.R)((0,aC.o)((0,aR.g)(o.state.button)).filter(t=>"true"!==t.dataset.headlessuiFocusGuard),(0,aV.f)(I.current,{[aw.v.Forwards]:aC.b.Next,[aw.v.Backwards]:aC.b.Previous}),{relativeTo:o.state.button})}),_=(0,aD.n)();return l.default.createElement(l.default.Fragment,null,_({ourProps:B,theirProps:a,slot:F,defaultTag:"button",name:"Popover.Button"}),L&&!b&&h&&l.default.createElement(aj.g,{id:v,ref:m,features:aj.X.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:O}))}),a1=(0,aD.t)(aZ),a2=(0,aD.t)(aZ),a4=(0,aD.t)(function(t,e){let i=(0,l.useId)(),{id:n=`headlessui-popover-panel-${i}`,focus:r=!1,anchor:s,portal:a=!1,modal:o=!1,transition:u=!1,...h}=t,c=aY("Popover.Panel"),d=(0,aE.f)(c,c.selectors.isPortalled),[p,f,m,g,v]=(0,aE.f)(c,(0,l.useCallback)(t=>[t.popoverState,t.button,t.__demoMode,t.beforePanelSentinel,t.afterPanelSentinel],[])),y=`headlessui-focus-sentinel-before-${i}`,x=`headlessui-focus-sentinel-after-${i}`,b=(0,l.useRef)(null),w=(0,aT.L)(s),[S,P]=(0,aT.X)(w),T=(0,aT.S)();w&&(a=!0);let[j,k]=(0,l.useState)(null),E=(0,ab.V)(b,e,w?S:null,c.actions.setPanel,k),A=(0,am.n)(f),M=(0,am.n)(b.current);(0,ac.f)(()=>(c.actions.setPanelId(n),()=>c.actions.setPanelId(null)),[n,c]);let C=(0,ak.N)(),[V,R]=(0,aS.S)(u,j,null!==C?(C&ak.A.Open)===ak.A.Open:p===a_.Open);(0,ap.f)(V,f,c.actions.close),(0,ay.f)(!m&&o&&V,M);let D=(0,au.f)(t=>{var e;if(t.key===aL.f.Escape){if(c.state.popoverState!==a_.Open||!b.current)return;let i=(0,aR.z)(b.current);if(i&&!b.current.contains(i))return;t.preventDefault(),t.stopPropagation(),c.actions.close(),null==(e=c.state.button)||e.focus()}});(0,l.useEffect)(()=>{var e;t.static||p===a_.Closed&&(null==(e=t.unmount)||e)&&c.actions.setPanel(null)},[p,t.unmount,t.static,c]),(0,l.useEffect)(()=>{if(m||!r||p!==a_.Open||!b.current)return;let t=(0,aR.z)(b.current);b.current.contains(t)||(0,aC.R)(b.current,aC.b.First)},[m,r,b.current,p]);let L=(0,ax.f)({open:p===a_.Open,close:c.actions.refocusableClose}),F=(0,aD.w)(w?T():{},{ref:E,id:n,onKeyDown:D,onBlur:r&&p===a_.Open?t=>{var e,i,n,r,s;let a=t.relatedTarget;a&&b.current&&(null!=(e=b.current)&&e.contains(a)||(c.actions.close(),(null!=(n=null==(i=g.current)?void 0:i.contains)&&n.call(i,a)||null!=(s=null==(r=v.current)?void 0:r.contains)&&s.call(r,a))&&a.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...h.style,...P,"--button-width":(0,al.f)(V,f,!0).width},...(0,aS.p)(R)}),N=(0,aw.u)(),B=(0,au.f)(()=>{let t=b.current;t&&(0,aV.f)(N.current,{[aw.v.Forwards]:()=>{var e;(0,aC.R)(t,aC.b.First)===aC.f.Error&&(null==(e=c.state.afterPanelSentinel.current)||e.focus())},[aw.v.Backwards]:()=>{var t;null==(t=c.state.button)||t.focus({preventScroll:!0})}})}),I=(0,au.f)(()=>{let t=b.current;t&&(0,aV.f)(N.current,{[aw.v.Forwards]:()=>{var t;if(!c.state.button)return;let e=null!=(t=(0,aR.g)(c.state.button))?t:document.body,i=(0,aC.o)(e),n=i.indexOf(c.state.button),r=i.slice(0,n+1),s=[...i.slice(n+1),...r];for(let t of s.slice())if("true"===t.dataset.headlessuiFocusGuard||null!=j&&j.contains(t)){let e=s.indexOf(t);-1!==e&&s.splice(e,1)}(0,aC.R)(s,aC.b.First,{sorted:!1})},[aw.v.Backwards]:()=>{var e;(0,aC.R)(t,aC.b.Previous)===aC.f.Error&&(null==(e=c.state.button)||e.focus())}})}),O=(0,aD.n)();return l.default.createElement(ak.P,null,l.default.createElement(aG.Provider,{value:n},l.default.createElement(aP.f,{value:c.actions.refocusableClose},l.default.createElement(aF.z,{enabled:!!a&&(t.static||V),ownerDocument:A},V&&d&&l.default.createElement(aj.g,{id:y,ref:g,features:aj.X.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:B}),O({ourProps:F,theirProps:h,slot:L,defaultTag:"div",features:aJ,visible:V,name:"Popover.Panel"}),V&&d&&l.default.createElement(aj.g,{id:x,ref:v,features:aj.X.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:I})))))}),a5=Object.assign(aQ,{Button:a0,Backdrop:a2,Overlay:a1,Panel:a4,Group:(0,aD.t)(function(t,e){let i=(0,l.useRef)(null),n=(0,ab.V)(i,e),[r,s]=(0,l.useState)([]),a=(0,au.f)(t=>{s(e=>{let i=e.indexOf(t);if(-1!==i){let t=e.slice();return t.splice(i,1),t}return e})}),o=(0,au.f)(t=>(s(e=>[...e,t]),()=>a(t))),u=(0,au.f)(()=>{var t;let e=(0,aR.g)(i.current);if(!e)return!1;let n=(0,aR.z)(i.current);return!!(null!=(t=i.current)&&t.contains(n))||r.some(t=>{var i,r;return(null==(i=e.getElementById(t.buttonId.current))?void 0:i.contains(n))||(null==(r=e.getElementById(t.panelId.current))?void 0:r.contains(n))})}),h=(0,au.f)(t=>{for(let e of r)e.buttonId.current!==t&&e.close()}),c=(0,l.useMemo)(()=>({registerPopover:o,unregisterPopover:a,isFocusWithinPopoverGroup:u,closeOthers:h}),[o,a,u,h]),d=(0,ax.f)({}),p=(0,aD.n)();return l.default.createElement(av.u,null,l.default.createElement(aK.Provider,{value:c},p({ourProps:{ref:n},theirProps:t,slot:d,defaultTag:"div",name:"Popover.Group"})))})});var a3=t.i(54056),a7=t.i(95187);let a9=(0,a7.createServerReference)("60768248af67ff711025ebca68a628ba9da3b686e8",a7.callServer,void 0,a7.findSourceMapURL,"retrieveCart");var a8=t.i(57643),a6=t.i(96498),ot=t.i(7693),oe=t.i(87069),oi=t.i(61264),on=t.i(46294),or=t.i(15265);let os=t=>t?.items?.reduce((t,e)=>t+e.quantity,0)||0,oa=({cart:t})=>{let[e,i]=(0,l.useState)(null),n=t??e,[r,s]=(0,l.useState)(void 0),[o,h]=(0,l.useState)(!1),c=()=>h(!1),d=os(n),p=n?.subtotal??0,f=(0,l.useRef)(d||0);(0,l.useEffect)(()=>{if(t)return;let e=!0,n=()=>a9().then(t=>{e&&(f.current=os(t),e=!1),i(t)}).catch(()=>{});return n(),window.addEventListener(a8.c,n),()=>window.removeEventListener(a8.c,n)},[t]),(0,l.useEffect)(()=>()=>{r&&clearTimeout(r)},[r]);let m=(0,u.usePathname)();return(0,l.useEffect)(()=>{f.current===d||m.includes("/cart")||(h(!0),s(setTimeout(c,5e3)))},[d,f.current]),(0,a.jsx)("div",{className:"h-full z-50",onMouseEnter:()=>{r&&clearTimeout(r),h(!0)},onMouseLeave:c,children:(0,a.jsxs)(a5,{className:"relative h-full",children:[(0,a.jsx)(a0,{className:"h-full",children:(0,a.jsx)(ar.default,{className:"hover:text-ui-fg-base",href:"/cart","data-testid":"nav-cart-link",children:`עגלה (${d})`})}),(0,a.jsx)(a3.I,{show:o,as:l.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:(0,a.jsxs)(a4,{static:!0,className:"hidden small:block absolute top-[calc(100%+1px)] right-0 bg-white border-x border-b border-gray-200 w-[420px] text-ui-fg-base","data-testid":"nav-cart-dropdown",children:[(0,a.jsx)("div",{className:"p-4 flex items-center justify-center",children:(0,a.jsx)("h3",{className:"text-large-semi",children:"עגלה"})}),n&&n.items?.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"overflow-y-scroll max-h-[402px] px-4 grid grid-cols-1 gap-y-8 no-scrollbar p-px",children:n.items.sort((t,e)=>(t.created_at??"")>(e.created_at??"")?-1:1).map(t=>(0,a.jsxs)("div",{className:"grid grid-cols-[122px_1fr] gap-x-4","data-testid":"cart-item",children:[(0,a.jsx)(ar.default,{href:`/products/${t.product_handle}`,className:"w-24",children:(0,a.jsx)(or.f,{thumbnail:t.thumbnail,images:t.variant?.product?.images,size:"square"})}),(0,a.jsxs)("div",{className:"flex flex-col justify-between flex-1",children:[(0,a.jsx)("div",{className:"flex flex-col flex-1",children:(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col overflow-ellipsis whitespace-nowrap mr-4 w-[180px]",children:[(0,a.jsx)("h3",{className:"text-base-regular overflow-hidden text-ellipsis",children:(0,a.jsx)(ar.default,{href:`/products/${t.product_handle}`,"data-testid":"product-link",children:t.title})}),(0,a.jsx)(oi.f,{variant:t.variant,"data-testid":"cart-item-variant","data-value":t.variant}),(0,a.jsxs)("span",{"data-testid":"cart-item-quantity","data-value":t.quantity,children:["כמות: ",t.quantity]})]}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)(on.f,{item:t,style:"tight",currencyCode:n.currency_code})})]})}),(0,a.jsx)(oe.f,{id:t.id,className:"mt-1","data-testid":"cart-item-remove-button",children:"הסר"})]})]},t.id))}),(0,a.jsxs)("div",{className:"p-4 flex flex-col gap-y-4 text-small-regular",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-ui-fg-base font-semibold",children:["Subtotal"," ",(0,a.jsx)("span",{className:"font-normal",children:"(excl. taxes)"})]}),(0,a.jsx)("span",{className:"text-large-semi","data-testid":"cart-subtotal","data-value":p,children:(0,a6.f)({amount:p,currency_code:n.currency_code})})]}),(0,a.jsx)(ar.default,{href:"/cart",passHref:!0,children:(0,a.jsx)(ot.K,{className:"w-full",size:"large","data-testid":"go-to-cart-button",children:"לעגלה"})})]})]}):(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"flex py-16 flex-col gap-y-4 items-center justify-center",children:[(0,a.jsx)("div",{className:"bg-gray-900 text-small-regular flex items-center justify-center w-6 h-6 rounded-full text-white",children:(0,a.jsx)("span",{children:"0"})}),(0,a.jsx)("span",{children:"עגלת הקניות שלך ריקה."}),(0,a.jsx)("div",{children:(0,a.jsx)(ar.default,{href:"/store",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"sr-only",children:"Go to all products page"}),(0,a.jsx)(ot.K,{onClick:c,children:"צפה במוצרים"})]})})})]})})]})})]})})};function oo(){let[t,e]=(0,l.useState)(null);return(0,l.useEffect)(()=>{(async()=>{try{let t=await a9();e(t)}catch{e(null)}})()},[]),(0,a.jsx)(oa,{cart:t})}let ol=(t=24)=>(0,a.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})});t.s(["default",0,function({categories:t}){let{countryCode:e}=(0,u.useParams)(),i=(0,u.usePathname)(),[n,r]=(0,l.useState)(!1),[s,h]=(0,l.useState)(!1),[c,d]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let t=()=>r(window.scrollY>20);return window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[]);let p=()=>h(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.default,{id:"b1d9b24c18047b02",children:".header.jsx-b1d9b24c18047b02{z-index:50;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-bottom:1px solid var(--br);transition:all var(--t-base) var(--ease);background:#fffffff2;position:sticky;top:0}.header.scrolled.jsx-b1d9b24c18047b02{box-shadow:var(--shm);border-bottom-color:var(--p)/20}.nav-container.jsx-b1d9b24c18047b02{max-width:var(--mw);padding:0 var(--space-lg);justify-content:space-between;align-items:center;gap:var(--space-lg);height:72px;margin:0 auto;display:flex}.logo.jsx-b1d9b24c18047b02{font-family:var(--font-hebrew);color:var(--dk);white-space:nowrap;flex-shrink:0;font-size:1.5rem;font-weight:800;text-decoration:none}.logo.jsx-b1d9b24c18047b02:hover{color:var(--p)}.nav-desktop.jsx-b1d9b24c18047b02{gap:var(--space-sm);display:none}.nav-link.jsx-b1d9b24c18047b02{color:var(--gr);padding:var(--space-xs) var(--space-sm);border-radius:var(--r-sm);transition:all var(--t-fast) var(--ease);white-space:nowrap;font-size:.9rem;font-weight:500;text-decoration:none}.nav-link.jsx-b1d9b24c18047b02:hover,.nav-link.active.jsx-b1d9b24c18047b02{color:var(--p);background:var(--pl)}.nav-actions.jsx-b1d9b24c18047b02{align-items:center;gap:var(--space-md);flex-shrink:0;display:flex}.search-btn.jsx-b1d9b24c18047b02{cursor:pointer;color:var(--gr);padding:var(--space-xs);border-radius:var(--r-sm);transition:color var(--t-fast);background:0 0;border:none}.search-btn.jsx-b1d9b24c18047b02:hover{color:var(--p)}.mobile-menu-btn.jsx-b1d9b24c18047b02{width:44px;height:44px;color:var(--dk);cursor:pointer;border-radius:var(--r-md);background:0 0;border:none;justify-content:center;align-items:center;display:flex}.mobile-menu-btn.jsx-b1d9b24c18047b02:hover{background:var(--bga)}.drawer-overlay.jsx-b1d9b24c18047b02{z-index:40;opacity:0;pointer-events:none;transition:opacity var(--t-base) var(--ease);background:#00000080;position:fixed;inset:0}.drawer-overlay.open.jsx-b1d9b24c18047b02{opacity:1;pointer-events:auto}.drawer.jsx-b1d9b24c18047b02{z-index:50;background:var(--bg);width:100%;max-width:320px;padding:var(--space-xl);transition:transform var(--t-base) var(--ease);gap:var(--space-xl);flex-direction:column;display:flex;position:fixed;top:0;bottom:0;right:0;overflow-y:auto;transform:translate(100%)}.drawer.open.jsx-b1d9b24c18047b02{transform:translate(0)}.drawer-header.jsx-b1d9b24c18047b02{justify-content:flex-end;display:flex}.drawer-close.jsx-b1d9b24c18047b02{cursor:pointer;color:var(--gr);padding:var(--space-xs);background:0 0;border:none}.drawer-nav.jsx-b1d9b24c18047b02{gap:var(--space-xs);flex-direction:column;display:flex}.drawer-link.jsx-b1d9b24c18047b02{color:var(--dk);padding:var(--space-md) 0;border-bottom:1px solid var(--br);transition:color var(--t-fast);font-size:1.1rem;font-weight:600;text-decoration:none}.drawer-link.jsx-b1d9b24c18047b02:hover{color:var(--p)}.drawer-actions.jsx-b1d9b24c18047b02{gap:var(--space-md);padding-top:var(--space-md);border-top:1px solid var(--br);flex-direction:column;display:flex}.search-modal.jsx-b1d9b24c18047b02{z-index:60;padding:var(--space-xl);opacity:0;transition:all var(--t-base) var(--ease);background:#fffffffa;flex-direction:column;align-items:center;display:flex;position:fixed;inset:0;transform:translateY(-100%)}.search-modal.open.jsx-b1d9b24c18047b02{opacity:1;transform:translateY(0)}.search-input.jsx-b1d9b24c18047b02{width:100%;max-width:600px;padding:var(--space-md) var(--space-lg);font-size:1.25rem;font-family:var(--font-hebrew);border:2px solid var(--br);border-radius:var(--r-lg);background:var(--bg);color:var(--dk);transition:border-color var(--t-fast);outline:none}.search-input.jsx-b1d9b24c18047b02:focus{border-color:var(--p)}.search-close.jsx-b1d9b24c18047b02{top:var(--space-lg);right:var(--space-lg);cursor:pointer;color:var(--gr);background:0 0;border:none;position:absolute}@media (width>=768px){.nav-desktop.jsx-b1d9b24c18047b02{display:flex}.mobile-menu-btn.jsx-b1d9b24c18047b02,.drawer-overlay.jsx-b1d9b24c18047b02,.drawer.jsx-b1d9b24c18047b02{display:none}}@media (width<=767px){.search-modal.jsx-b1d9b24c18047b02{padding:var(--space-lg)}}"}),(0,a.jsx)("header",{className:`jsx-b1d9b24c18047b02 header ${n?"scrolled":""}`,children:(0,a.jsxs)("nav",{role:"navigation","aria-label":"Main navigation",className:"jsx-b1d9b24c18047b02 nav-container",children:[(0,a.jsx)(ar.default,{href:"/",className:"logo","aria-label":"EV Smartech - Home",children:"EV Smartech"}),(0,a.jsx)("div",{role:"menubar",className:"jsx-b1d9b24c18047b02 nav-desktop",children:t.map(t=>(0,a.jsxs)(ar.default,{href:t.href,className:`nav-link ${i===`/${e}${t.href}`?"active":""}`,role:"menuitem",children:[t.icon," ",t.name]},t.href))}),(0,a.jsxs)("div",{className:"jsx-b1d9b24c18047b02 nav-actions",children:[(0,a.jsx)("button",{onClick:()=>d(!0),"aria-label":"חיפוש","aria-expanded":c,className:"jsx-b1d9b24c18047b02 search-btn",children:((t=20)=>(0,a.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,a.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,a.jsx)("path",{d:"m21 21-4.3-4.3"})]}))(20)}),(0,a.jsxs)(ar.default,{href:"/account",className:"nav-link",style:{display:"flex",alignItems:"center",gap:"6px"},children:[((t=18)=>(0,a.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}),(0,a.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}))(18)," חשבון"]}),(0,a.jsx)(oo,{}),(0,a.jsx)("button",{onClick:()=>h(!0),"aria-label":"פתח תפריט","aria-expanded":s,"aria-controls":"mobile-menu",className:"jsx-b1d9b24c18047b02 mobile-menu-btn",children:((t=24)=>(0,a.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M3 12h18M3 6h18M3 18h18"})}))(24)})]})]})}),(0,a.jsx)(an,{children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s2.div,{className:"drawer-overlay",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:p,"aria-hidden":"true"}),(0,a.jsxs)(s2.aside,{id:"mobile-menu",className:"drawer",initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:25,stiffness:200},role:"dialog","aria-label":"תפריט ניווט",children:[(0,a.jsx)("div",{className:"jsx-b1d9b24c18047b02 drawer-header",children:(0,a.jsx)("button",{onClick:p,"aria-label":"סגור תפריט",className:"jsx-b1d9b24c18047b02 drawer-close",children:ol(24)})}),(0,a.jsx)("nav",{role:"navigation",className:"jsx-b1d9b24c18047b02 drawer-nav",children:t.map(t=>(0,a.jsxs)(ar.default,{href:t.href,className:"drawer-link",onClick:p,role:"menuitem",children:[t.icon," ",t.name]},t.href))}),(0,a.jsx)("div",{className:"jsx-b1d9b24c18047b02 drawer-actions",children:(0,a.jsx)(ar.default,{href:"/account",className:"btn btn-p",style:{textAlign:"center"},onClick:p,children:"כניסה לחשבון"})})]})]})}),(0,a.jsx)(an,{children:c&&(0,a.jsxs)(s2.div,{className:"search-modal",initial:{y:"-100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"-100%",opacity:0},transition:{type:"spring",damping:25,stiffness:200},role:"dialog","aria-label":"חיפוש מוצרים",children:[(0,a.jsx)("button",{onClick:()=>d(!1),"aria-label":"סגור חיפוש",className:"jsx-b1d9b24c18047b02 search-close",children:ol(28)}),(0,a.jsxs)("form",{action:`/${e}/search`,method:"GET",style:{width:"100%",maxWidth:"600px"},className:"jsx-b1d9b24c18047b02",children:[(0,a.jsx)("label",{htmlFor:"search-input",className:"jsx-b1d9b24c18047b02 sr-only",children:"חיפוש מוצרים"}),(0,a.jsx)("input",{id:"search-input",type:"search",name:"q",placeholder:"חפש מוצרים, מותגים, דגמים...",autoFocus:!0,autoComplete:"off",className:"jsx-b1d9b24c18047b02 search-input"})]})]})})]})}],33066)},7798,t=>{var e=t.i(43476),i=t.i(96498),n=t.i(88496),r=t.i(4271),s=t.i(35555),a=t.i(7693),o=t.i(71933),l=t.i(71645);function u({cart:t,price:r}){return(0,e.jsx)("div",{className:"bg-neutral-100 p-2 rounded-lg border",children:(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsxs)("div",{className:"flex justify-between text-xs text-neutral-600",children:[(0,e.jsx)("div",{children:r.target_reached?(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[" ",(0,e.jsx)(n.f,{className:"text-green-500 inline-block"})," ","Free Shipping unlocked!"]}):"Unlock Free Shipping"}),(0,e.jsxs)("div",{className:(0,o.f)("visible",{"opacity-0 invisible":r.target_reached}),children:["Only"," ",(0,e.jsx)("span",{className:"text-neutral-950",children:(0,i.f)({amount:r.target_remaining,currency_code:t.currency_code})})," ","away"]})]}),(0,e.jsxs)("div",{className:"flex justify-between gap-1",children:[(0,e.jsx)("div",{className:(0,o.f)("bg-gradient-to-r from-zinc-400 to-zinc-500 h-1 rounded-full max-w-full duration-500 ease-in-out",{"from-green-400 to-green-500":r.target_reached}),style:{width:`${r.remaining_percentage}%`}}),(0,e.jsx)("div",{className:"bg-neutral-300 h-1 rounded-full w-fit flex-grow"})]})]})})}function h({cart:t,price:u}){let[c,d]=(0,l.useState)(!1);return(0,e.jsxs)("div",{className:(0,o.f)("fixed bottom-5 right-5 flex flex-col items-end gap-2 transition-all duration-500 ease-in-out z-10",{"opacity-0 invisible delay-1000":u.target_reached,"opacity-0 invisible":c,"opacity-100 visible":!u.target_reached&&!c}),children:[(0,e.jsx)("div",{children:(0,e.jsx)(a.K,{className:"rounded-full bg-neutral-900 shadow-none outline-none border-none text-[15px] p-2",onClick:()=>d(!0),children:(0,e.jsx)(r.f,{})})}),(0,e.jsxs)("div",{className:"w-[400px] bg-black text-white p-6 rounded-lg ",children:[(0,e.jsx)("div",{className:"pb-4",children:(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex justify-between text-[15px] text-neutral-400",children:[(0,e.jsx)("div",{children:u.target_reached?(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(n.f,{className:"text-green-500 inline-block"})," ","Free Shipping unlocked!"]}):"Unlock Free Shipping"}),(0,e.jsxs)("div",{className:(0,o.f)("visible",{"opacity-0 invisible":u.target_reached}),children:["Only"," ",(0,e.jsx)("span",{className:"text-white",children:(0,i.f)({amount:u.target_remaining,currency_code:t.currency_code})})," ","away"]})]}),(0,e.jsxs)("div",{className:"flex justify-between gap-1",children:[(0,e.jsx)("div",{className:(0,o.f)("bg-gradient-to-r from-zinc-400 to-zinc-500 h-1.5 rounded-full max-w-full duration-500 ease-in-out",{"from-green-400 to-green-500":u.target_reached}),style:{width:`${u.remaining_percentage}%`}}),(0,e.jsx)("div",{className:"bg-zinc-600 h-1.5 rounded-full w-fit flex-grow"})]})]})}),(0,e.jsxs)("div",{className:"flex gap-3",children:[(0,e.jsx)(s.default,{className:"rounded-2xl bg-transparent shadow-none outline-none border-[1px] border-white text-[15px] py-2.5 px-4",href:"/cart",children:"View cart"}),(0,e.jsx)(s.default,{className:"flex-grow rounded-2xl bg-white text-neutral-950 shadow-none outline-none border-[1px] border-white text-[15px] py-2.5 px-4 text-center",href:"/store",children:"View products"})]})]})]})}t.s(["default",0,function({variant:t="inline",cart:i,shippingOptions:n}){if(!i||!n?.length)return;let r=n.map(t=>{if(t.calculated_price)return t.prices.filter(t=>t.currency_code===i.currency_code&&(t.price_rules||[]).some(t=>"item_total"===t.attribute)).map(e=>{var n;let r,s,a;return{...e,shipping_option_id:t.id,...(n=i,r=(e.price_rules||[]).find(t=>"item_total"===t.attribute),s=n.item_total,a=parseFloat(r.value),"gt"===r.operator?{current_amount:s,target_amount:a,target_reached:s>a,target_remaining:s>a?0:a+1-s,remaining_percentage:s/a*100}:"gte"===r.operator?{current_amount:s,target_amount:a,target_reached:s>a,target_remaining:s>a?0:a-s,remaining_percentage:s/a*100}:"lt"===r.operator?{current_amount:s,target_amount:a,target_reached:a>s,target_remaining:a>s?0:s+1-a,remaining_percentage:s/a*100}:"lte"===r.operator?{current_amount:s,target_amount:a,target_reached:a>s,target_remaining:a>s?0:s-a,remaining_percentage:s/a*100}:{current_amount:s,target_amount:a,target_reached:s===a,target_remaining:a>s?0:a-s,remaining_percentage:s/a*100})}})}).flat(1).filter(Boolean).find(t=>t?.amount===0);if(r)if("popup"===t)return(0,e.jsx)(h,{cart:i,price:r});else return(0,e.jsx)(u,{cart:i,price:r})}])}])})();