@ssgoi/core 6.6.8 → 6.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Ut=Object.defineProperty;var Nt=(e,t,n)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E=(e,t,n)=>Nt(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./multi-animation-CE9yYIGJ.cjs");function _(e,t){const n=[];for(let s=0;s<e.length;s++)for(let o=s+1;o<e.length;o++){const i=e[s],l=e[o];!i||!l||n.push({from:i,to:l,transition:t(),symmetric:!0})}return n}function Tt(e,t){return[{from:e.exit,to:e.enter,transition:t("enter")},{from:e.enter,to:e.exit,transition:t("exit")}]}function nt(e,t,n){const s=[];for(let o=0;o<e.length;o++)for(let i=o+1;i<e.length;i++){const l=e[o],a=e[i];!l||!a||s.push({from:l,to:a,transition:n(t.forward)},{from:a,to:l,transition:n(t.backward)})}return s}class H{constructor(t){E(this,"omega");E(this,"zeta");E(this,"restDelta");E(this,"restSpeed");const{stiffness:n,damping:s}=t,o=1;this.omega=Math.sqrt(n/o),this.zeta=s/(2*Math.sqrt(n*o)),this.restDelta=t.restDelta??u.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??u.VELOCITY_THRESHOLD}step(t,n,s){const o=Math.min(s,.033),{omega:i,zeta:l}=this,{position:a,velocity:r}=t,c=-2*o*l*i*r,d=o*i*i*(n-a),p=r+c+d;return{position:a+o*p,velocity:p}}isSettled(t,n){const s=Math.abs(n-t.position),o=Math.abs(t.velocity);return s<this.restDelta&&o<this.restSpeed}}class Vt{constructor(t){E(this,"leader");E(this,"follower");E(this,"restDelta");E(this,"restSpeed");this.restDelta=t.restDelta??u.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??u.VELOCITY_THRESHOLD,this.leader=new H({stiffness:t.stiffness,damping:t.damping,restDelta:this.restDelta,restSpeed:this.restSpeed});let n,s,o,i;typeof t.follower=="number"?(n=t.stiffness*t.follower,s=t.damping):t.follower?(n=t.follower.stiffness,s=t.follower.damping,o=t.follower.restDelta,i=t.follower.restSpeed):(n=t.stiffness,s=t.damping),this.follower=new H({stiffness:n,damping:s,restDelta:o??this.restDelta,restSpeed:i??this.restSpeed})}step(t,n,s){const i=t._leader??{position:t.position,velocity:t.velocity},l=this.leader.step(i,n,s),a=this.follower.step(t,l.position,s);return{position:a.position,velocity:a.velocity,_leader:l}}isSettled(t,n){const s=t,o=Math.abs(n-t.position)<this.restDelta&&Math.abs(t.velocity)<this.restSpeed;return s._leader?Math.abs(n-s._leader.position)<this.restDelta&&Math.abs(s._leader.velocity)<this.restSpeed&&o:o}}const Xt=.01,Bt=500,Zt=10;class qt{constructor(t){E(this,"acceleration");E(this,"resistance");E(this,"resistanceType");E(this,"min");E(this,"max");E(this,"bounceStiffness");E(this,"bounceDamping");E(this,"restDelta");this.acceleration=t.acceleration,this.resistance=t.resistance,this.resistanceType=t.resistanceType??"quadratic",this.min=t.min,this.max=t.max,this.bounceStiffness=t.bounceStiffness??Bt,this.bounceDamping=t.bounceDamping??Zt,this.restDelta=t.restDelta??Xt}step(t,n,s){const o=Math.min(s,.033),{acceleration:i,resistance:l,resistanceType:a,min:r,max:c}=this,{position:d,velocity:p}=t,f=r!==void 0&&d<r,m=c!==void 0&&d>c;let y;if(f||m){const S=d-(f?r:c),x=-this.bounceStiffness*S,$=-this.bounceDamping*p;y=x+$}else{const w=n>d?1:-1;let S;a==="linear"?S=l*p:S=l*p*Math.abs(p),y=w*i-S}const h=p+y*o;let b=d+h*o;if(!f&&!m){const w=n>d?1:-1;(w>0&&b>n||w<0&&b<n)&&(b=n)}return{position:b,velocity:b===n?0:h}}isSettled(t,n){return Math.abs(n-t.position)<this.restDelta}}class g{static from(t){if(t.spring&&t.inertia)throw new Error("Cannot use both 'spring' and 'inertia' together. Choose one physics type.");if(t.inertia)return new qt({acceleration:t.inertia.acceleration,resistance:t.inertia.resistance,resistanceType:t.inertia.resistanceType,min:t.inertia.min,max:t.inertia.max,bounceStiffness:t.inertia.bounceStiffness,bounceDamping:t.inertia.bounceDamping,restDelta:t.inertia.restDelta});const n=t.spring??{stiffness:300,damping:30};if(n.doubleSpring){const s=n.doubleSpring;let o;return typeof s=="number"?o=s:typeof s=="object"&&(o={stiffness:s.stiffness,damping:s.damping}),new Vt({stiffness:n.stiffness,damping:n.damping,follower:o,restDelta:n.restDelta,restSpeed:n.restSpeed})}return new H({stiffness:n.stiffness,damping:n.damping,restDelta:n.restDelta,restSpeed:n.restSpeed})}static fromSpring(t){return g.from({spring:t})}}class jt{constructor(t){E(this,"durationSec");this.durationSec=Math.max(1/60,t.durationSec)}step(t,n,s){const o=n-t.position;if(o===0)return t;const i=Math.sign(o),l=Math.abs(o)/this.durationSec,a=i*l*s,r=t.position+a;return(i>0?r>=n:r<=n)?{position:n,velocity:0}:{position:r,velocity:i*l}}isSettled(t,n){return Math.abs(t.position-n)<u.POSITION_THRESHOLD}}function R(e,t){function n(i){let l=0,a=0;const r=i.offsetWidth,c=i.offsetHeight;let d=i;for(;d;)l+=d.offsetTop,a+=d.offsetLeft,d=d.offsetParent;return l-=window.scrollY,a-=window.scrollX,{top:l,left:a,width:r,height:c}}const s=n(e),o=n(t);return new DOMRect(o.left-s.left,o.top-s.top,o.width,o.height)}function ot(e,t){const n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),o=e.offsetWidth>0?n.width/e.offsetWidth:1,i=e.offsetHeight>0?n.height/e.offsetHeight:1;return new DOMRect((s.left-n.left)/o,(s.top-n.top)/i,s.width/o,s.height/i)}function O(e,t){const{scrollingElement:n,positionedParent:s}=e,o=n!==s&&n.contains(s)?R(n,s).top:0;return{top:e[t].scroll.y,left:0,width:n.clientWidth,height:n.clientHeight-o}}function Dt(e,t){const{scrollingElement:n,positionedParent:s}=e,o=n!==s&&n.contains(s)?R(n,s).top:0;return{top:e[t].scroll.y-o,height:n.clientHeight}}const it=8,rt={spring:{stiffness:800,damping:40,doubleSpring:1.2,restDelta:.1,restSpeed:.1}};function Kt({direction:e}){const t=e==="forward"?it:-it;return{out:{willChange:"transform, opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${t}px, 0, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(${t*(1-n)}px, 0, 0)`,opacity:`${n}`})}}}function Gt(){return{outPhysics:rt,inPhysics:rt,composition:{mode:"parallel",startAt:[0,0]},build:Kt}}const at=30,Jt={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},Qt={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function te({direction:e}){const t=e==="forward"?1:-1,n=-at*t,s=at*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:o=>({transform:`translate3d(${n*o}px, 0, 0)`,opacity:`${1-o}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${s}px, 0, 0)`,opacity:"0"},animate:o=>({transform:`translate3d(${s*(1-o)}px, 0, 0)`,opacity:`${o}`})}}}function ee(){return{outPhysics:Jt,inPhysics:Qt,composition:{mode:"sequence"},build:te}}const ne={snappy:Gt(),fluid:ee()},lt=8,se={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},oe={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function ie({direction:e}){const t=e==="forward"?1:-1,n=-lt*t,s=lt*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:o=>({transform:`translate3d(0, ${n*o}px, 0)`,opacity:`${1-o}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${s}px, 0)`,opacity:"0"},animate:o=>({transform:`translate3d(0, ${s*(1-o)}px, 0)`,opacity:`${o}`})}}}function re(){return{outPhysics:se,inPhysics:oe,composition:{mode:"sequence"},build:ie}}const ae=8,le={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},ce={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function pe(e){const t=ae;return{out:{willChange:"opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${t}px, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(0, ${t*(1-n)}px, 0)`,opacity:`${n}`})}}}function de(){return{outPhysics:le,inPhysics:ce,composition:{mode:"sequence"},build:pe}}const ct=re(),fe={snappy:ct,directional:ct,"non-directional":de()},pt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},U=.1,N=1/3,dt=e=>Math.max(0,Math.min(1,e));function ye({direction:e}){const t=e==="forward"?1:-1,n=1-t*U;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`scale(${1+t*s*U})`,opacity:`${dt(1-s/N)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${n})`,opacity:"0"},animate:s=>({transform:`scale(${n+t*s*U})`,opacity:`${dt((s-N)/(1-N))}`})}}}function he(){return{outPhysics:pt,inPhysics:pt,composition:{mode:"parallel"},build:ye}}const ft={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},V=.1,X=1/3,yt=e=>Math.max(0,Math.min(1,e));function ue(){return{out:{willChange:"opacity",startStyle:{},animate:e=>({opacity:`${yt(1-e/X)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${1-V})`,opacity:"0"},animate:e=>({transform:`scale(${1-V+e*V})`,opacity:`${yt((e-X)/(1-X))}`})}}}function me(){return{outPhysics:ft,inPhysics:ft,composition:{mode:"parallel"},build:ue}}const ht=he(),ge={snappy:ht,directional:ht,"non-directional":me()},be={x:ne,y:fe,z:ge};function we(e,t){const n=be[e];return n[t]??n.snappy}const Se="x",$e="snappy";function ut(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,s]of Object.entries(t.startStyle))e.style[n]=s}function Ft(e){e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transform="",e.style.opacity="",e.style.clipPath=""}function Ce(e){Ft(e),e.style.pointerEvents=""}const Ee=(e={})=>{const t=e.direction??"forward",n=e.type??Se,s=e.feel??$e,o=we(n,s),i=o.build({direction:t});return{prepare:({from:l,to:a})=>(l.then(r=>{ut(r,i.out),r.style.pointerEvents="none"}),a.then(r=>{ut(r,i.in)}),{}),animation:({from:l,to:a,context:r})=>{if(n==="z"){const p=O(r,"from"),f=O(r,"to");l.style.clipPath=`inset(${p.top}px 0 calc(100% - ${p.top+p.height}px) 0)`,a.style.clipPath=`inset(${f.top}px 0 calc(100% - ${f.top+f.height}px) 0)`}const c=new u.WebAnimation({element:l,integrator:g.from(o.outPhysics),style:p=>i.out.animate(p),onComplete:()=>Ce(l)}),d=new u.WebAnimation({element:a,integrator:g.from(o.inPhysics),style:p=>i.in.animate(p),onComplete:()=>Ft(a)});return new u.MultiAnimation([c,d],o.composition)}}};function xe(e,t,n){return e==="y"?t==="non-directional"?"non-directional":"directional":e!=="x"||t==="snappy"||n==="snappy"?"snappy":"fluid"}function Ae(e){const{paths:t}=e,n=e.type??"x",s=e.variant,o=e.feel,i=xe(n,s,o);return nt(t,{forward:"forward",backward:"backward"},l=>Ee({type:n,direction:l,feel:i}))}const Pe={spring:{stiffness:200,damping:22}},_e=10,Ie="horizontal",ve="#000000";function mt(e,t,n,s,o,i){window.getComputedStyle(e).position==="static"&&(e.style.position="relative");const a=document.createElement("div");a.style.cssText=`
1
+ "use strict";var se=Object.defineProperty;var oe=(e,t,n)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E=(e,t,n)=>oe(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./multi-animation-CE9yYIGJ.cjs");function _(e,t){const n=[];for(let i=0;i<e.length;i++)for(let s=i+1;s<e.length;s++){const o=e[i],r=e[s];!o||!r||n.push({from:o,to:r,transition:t(),symmetric:!0})}return n}function Ht(e,t){return[{from:e.exit,to:e.enter,transition:t("enter")},{from:e.enter,to:e.exit,transition:t("exit")}]}function ct(e,t,n){const i=[];for(let s=0;s<e.length;s++)for(let o=s+1;o<e.length;o++){const r=e[s],l=e[o];!r||!l||i.push({from:r,to:l,transition:n(t.forward)},{from:l,to:r,transition:n(t.backward)})}return i}class V{constructor(t){E(this,"omega");E(this,"zeta");E(this,"restDelta");E(this,"restSpeed");const{stiffness:n,damping:i}=t,s=1;this.omega=Math.sqrt(n/s),this.zeta=i/(2*Math.sqrt(n*s)),this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD}step(t,n,i){const s=Math.min(i,.033),{omega:o,zeta:r}=this,{position:l,velocity:a}=t,c=-2*s*r*o*a,u=s*o*o*(n-l),p=a+c+u;return{position:l+s*p,velocity:p}}isSettled(t,n){const i=Math.abs(n-t.position),s=Math.abs(t.velocity);return i<this.restDelta&&s<this.restSpeed}}class re{constructor(t){E(this,"leader");E(this,"follower");E(this,"restDelta");E(this,"restSpeed");this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD,this.leader=new V({stiffness:t.stiffness,damping:t.damping,restDelta:this.restDelta,restSpeed:this.restSpeed});let n,i,s,o;typeof t.follower=="number"?(n=t.stiffness*t.follower,i=t.damping):t.follower?(n=t.follower.stiffness,i=t.follower.damping,s=t.follower.restDelta,o=t.follower.restSpeed):(n=t.stiffness,i=t.damping),this.follower=new V({stiffness:n,damping:i,restDelta:s??this.restDelta,restSpeed:o??this.restSpeed})}step(t,n,i){const o=t._leader??{position:t.position,velocity:t.velocity},r=this.leader.step(o,n,i),l=this.follower.step(t,r.position,i);return{position:l.position,velocity:l.velocity,_leader:r}}isSettled(t,n){const i=t,s=Math.abs(n-t.position)<this.restDelta&&Math.abs(t.velocity)<this.restSpeed;return i._leader?Math.abs(n-i._leader.position)<this.restDelta&&Math.abs(i._leader.velocity)<this.restSpeed&&s:s}}const ae=.01,le=500,ce=10;class pe{constructor(t){E(this,"acceleration");E(this,"resistance");E(this,"resistanceType");E(this,"min");E(this,"max");E(this,"bounceStiffness");E(this,"bounceDamping");E(this,"restDelta");this.acceleration=t.acceleration,this.resistance=t.resistance,this.resistanceType=t.resistanceType??"quadratic",this.min=t.min,this.max=t.max,this.bounceStiffness=t.bounceStiffness??le,this.bounceDamping=t.bounceDamping??ce,this.restDelta=t.restDelta??ae}step(t,n,i){const s=Math.min(i,.033),{acceleration:o,resistance:r,resistanceType:l,min:a,max:c}=this,{position:u,velocity:p}=t,d=a!==void 0&&u<a,y=c!==void 0&&u>c;let f;if(d||y){const b=u-(d?a:c),$=-this.bounceStiffness*b,x=-this.bounceDamping*p;f=$+x}else{const S=n>u?1:-1;let b;l==="linear"?b=r*p:b=r*p*Math.abs(p),f=S*o-b}const h=p+f*s;let g=u+h*s;if(!d&&!y){const S=n>u?1:-1;(S>0&&g>n||S<0&&g<n)&&(g=n)}return{position:g,velocity:g===n?0:h}}isSettled(t,n){return Math.abs(n-t.position)<this.restDelta}}class w{static from(t){if(t.spring&&t.inertia)throw new Error("Cannot use both 'spring' and 'inertia' together. Choose one physics type.");if(t.inertia)return new pe({acceleration:t.inertia.acceleration,resistance:t.inertia.resistance,resistanceType:t.inertia.resistanceType,min:t.inertia.min,max:t.inertia.max,bounceStiffness:t.inertia.bounceStiffness,bounceDamping:t.inertia.bounceDamping,restDelta:t.inertia.restDelta});const n=t.spring??{stiffness:300,damping:30};if(n.doubleSpring){const i=n.doubleSpring;let s;return typeof i=="number"?s=i:typeof i=="object"&&(s={stiffness:i.stiffness,damping:i.damping}),new re({stiffness:n.stiffness,damping:n.damping,follower:s,restDelta:n.restDelta,restSpeed:n.restSpeed})}return new V({stiffness:n.stiffness,damping:n.damping,restDelta:n.restDelta,restSpeed:n.restSpeed})}static fromSpring(t){return w.from({spring:t})}}class ue{constructor(t){E(this,"durationSec");this.durationSec=Math.max(1/60,t.durationSec)}step(t,n,i){const s=n-t.position;if(s===0)return t;const o=Math.sign(s),r=Math.abs(s)/this.durationSec,l=o*r*i,a=t.position+l;return(o>0?a>=n:a<=n)?{position:n,velocity:0}:{position:a,velocity:o*r}}isSettled(t,n){return Math.abs(t.position-n)<m.POSITION_THRESHOLD}}function k(e,t){function n(o){let r=0,l=0;const a=o.offsetWidth,c=o.offsetHeight;let u=o;for(;u;)r+=u.offsetTop,l+=u.offsetLeft,u=u.offsetParent;return r-=window.scrollY,l-=window.scrollX,{top:r,left:l,width:a,height:c}}const i=n(e),s=n(t);return new DOMRect(s.left-i.left,s.top-i.top,s.width,s.height)}function W(e,t){const n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=e.offsetWidth>0?n.width/e.offsetWidth:1,o=e.offsetHeight>0?n.height/e.offsetHeight:1;return new DOMRect((i.left-n.left)/s,(i.top-n.top)/o,i.width/s,i.height/o)}function D(e,t){const{scrollingElement:n,positionedParent:i}=e,s=n!==i&&n.contains(i)?k(n,i).top:0;return{top:e[t].scroll.y,left:0,width:n.clientWidth,height:n.clientHeight-s}}function Nt(e,t){const{scrollingElement:n,positionedParent:i}=e,s=n!==i&&n.contains(i)?k(n,i).top:0;return{top:e[t].scroll.y-s,height:n.clientHeight}}const ut=8,dt={spring:{stiffness:800,damping:40,doubleSpring:1.2,restDelta:.1,restSpeed:.1}};function de({direction:e}){const t=e==="forward"?ut:-ut;return{out:{willChange:"transform, opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${t}px, 0, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(${t*(1-n)}px, 0, 0)`,opacity:`${n}`})}}}function fe(){return{outPhysics:dt,inPhysics:dt,composition:{mode:"parallel",startAt:[0,0]},build:de}}const ft=30,he={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},ye={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function me({direction:e}){const t=e==="forward"?1:-1,n=-ft*t,i=ft*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(${n*s}px, 0, 0)`,opacity:`${1-s}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${i}px, 0, 0)`,opacity:"0"},animate:s=>({transform:`translate3d(${i*(1-s)}px, 0, 0)`,opacity:`${s}`})}}}function ge(){return{outPhysics:he,inPhysics:ye,composition:{mode:"sequence"},build:me}}const be={snappy:fe(),fluid:ge()},ht=8,we={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},Se={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function xe({direction:e}){const t=e==="forward"?1:-1,n=-ht*t,i=ht*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(0, ${n*s}px, 0)`,opacity:`${1-s}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${i}px, 0)`,opacity:"0"},animate:s=>({transform:`translate3d(0, ${i*(1-s)}px, 0)`,opacity:`${s}`})}}}function Ce(){return{outPhysics:we,inPhysics:Se,composition:{mode:"sequence"},build:xe}}const $e=8,Ee={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},Ae={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function Pe(e){const t=$e;return{out:{willChange:"opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${t}px, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(0, ${t*(1-n)}px, 0)`,opacity:`${n}`})}}}function Ie(){return{outPhysics:Ee,inPhysics:Ae,composition:{mode:"sequence"},build:Pe}}const yt=Ce(),_e={snappy:yt,directional:yt,"non-directional":Ie()},mt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},B=.1,Z=1/3,gt=e=>Math.max(0,Math.min(1,e));function Re({direction:e}){const t=e==="forward"?1:-1,n=1-t*B;return{out:{willChange:"transform, opacity",startStyle:{},animate:i=>({transform:`scale(${1+t*i*B})`,opacity:`${gt(1-i/Z)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${n})`,opacity:"0"},animate:i=>({transform:`scale(${n+t*i*B})`,opacity:`${gt((i-Z)/(1-Z))}`})}}}function Oe(){return{outPhysics:mt,inPhysics:mt,composition:{mode:"parallel"},build:Re}}const bt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},G=.1,j=1/3,wt=e=>Math.max(0,Math.min(1,e));function ve(){return{out:{willChange:"opacity",startStyle:{},animate:e=>({opacity:`${wt(1-e/j)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${1-G})`,opacity:"0"},animate:e=>({transform:`scale(${1-G+e*G})`,opacity:`${wt((e-j)/(1-j))}`})}}}function Te(){return{outPhysics:bt,inPhysics:bt,composition:{mode:"parallel"},build:ve}}const St=Oe(),De={snappy:St,directional:St,"non-directional":Te()},Fe={x:be,y:_e,z:De};function Me(e,t){const n=Fe[e];return n[t]??n.snappy}const Ye="x",Le="snappy";function xt(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,i]of Object.entries(t.startStyle))e.style[n]=i}function Wt(e){e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transform="",e.style.opacity="",e.style.clipPath=""}function ke(e){Wt(e),e.style.pointerEvents=""}const He=(e={})=>{const t=e.direction??"forward",n=e.type??Ye,i=e.feel??Le,s=Me(n,i),o=s.build({direction:t});return{prepare:({from:r,to:l})=>(r.then(a=>{xt(a,o.out),a.style.pointerEvents="none"}),l.then(a=>{xt(a,o.in)}),{}),animation:({from:r,to:l,context:a})=>{if(n==="z"){const p=D(a,"from"),d=D(a,"to");r.style.clipPath=`inset(${p.top}px 0 calc(100% - ${p.top+p.height}px) 0)`,l.style.clipPath=`inset(${d.top}px 0 calc(100% - ${d.top+d.height}px) 0)`}const c=new m.WebAnimation({element:r,integrator:w.from(s.outPhysics),style:p=>o.out.animate(p),onComplete:()=>ke(r)}),u=new m.WebAnimation({element:l,integrator:w.from(s.inPhysics),style:p=>o.in.animate(p),onComplete:()=>Wt(l)});return new m.MultiAnimation([c,u],s.composition)}}};function Ne(e,t,n){return e==="y"?t==="non-directional"?"non-directional":"directional":e!=="x"||t==="snappy"||n==="snappy"?"snappy":"fluid"}function We(e){const{paths:t}=e,n=e.type??"x",i=e.variant,s=e.feel,o=Ne(n,i,s);return ct(t,{forward:"forward",backward:"backward"},r=>He({type:n,direction:r,feel:o}))}const ze={spring:{stiffness:200,damping:22}},Ue=10,Ve="horizontal",Xe="#000000";function Ct(e,t,n,i,s,o){window.getComputedStyle(e).position==="static"&&(e.style.position="relative");const l=document.createElement("div");l.style.cssText=`
2
2
  position: absolute;
3
3
  top: 0;
4
4
  left: 0;
@@ -7,29 +7,29 @@
7
7
  pointer-events: none;
8
8
  z-index: 9999;
9
9
  overflow: hidden;
10
- `;const r=[];for(let c=0;c<t;c++){const d=document.createElement("div");if(n==="horizontal"){const p=100/t;d.style.cssText=`
10
+ `;const a=[];for(let c=0;c<t;c++){const u=document.createElement("div");if(n==="horizontal"){const p=100/t;u.style.cssText=`
11
11
  position: absolute;
12
12
  top: ${p*c}%;
13
13
  left: 0;
14
14
  width: 100%;
15
15
  height: calc(${p}% + 1px);
16
- background: ${s};
17
- transform: scaleX(${o==="hidden"?0:1});
18
- transform-origin: ${i} center;
16
+ background: ${i};
17
+ transform: scaleX(${s==="hidden"?0:1});
18
+ transform-origin: ${o} center;
19
19
  will-change: transform;
20
- `}else{const p=100/t;d.style.cssText=`
20
+ `}else{const p=100/t;u.style.cssText=`
21
21
  position: absolute;
22
22
  top: 0;
23
23
  left: ${p*c}%;
24
24
  width: calc(${p}% + 1px);
25
25
  height: 100%;
26
- background: ${s};
27
- transform: scaleY(${o==="hidden"?0:1});
28
- transform-origin: ${i==="left"?"top":"bottom"} center;
26
+ background: ${i};
27
+ transform: scaleY(${s==="hidden"?0:1});
28
+ transform-origin: ${o==="left"?"top":"bottom"} center;
29
29
  will-change: transform;
30
- `}r.push(d),a.appendChild(d)}return e.appendChild(a),{container:a,blinds:r}}const Oe=(e={})=>{const t=e.blindCount??_e,n=e.direction??Ie,s=e.blindColor??ve,o=e.physics??Pe;return{prepare:async({from:i,to:l})=>{const a=await i,r=await l;a.style.zIndex="1000";const c=mt(a,t,n,s,"hidden","left");r.style.position="relative",r.style.zIndex="0";const d=mt(r,t,n,s,"closed","right");return{fromEl:a,fromBlinds:c.blinds,fromContainer:c.container,toBlinds:d.blinds,toContainer:d.container}},animation:({fromEl:i,fromBlinds:l,fromContainer:a,toBlinds:r,toContainer:c})=>{const d=l.map(y=>new u.WebAnimation({element:y,integrator:g.from(o),style:h=>({transform:n==="horizontal"?`scaleX(${h})`:`scaleY(${h})`})})),p=r.map((y,h)=>new u.WebAnimation({element:y,integrator:g.from(o),style:(b,w)=>({transform:n==="horizontal"?`scaleX(${w})`:`scaleY(${w})`}),onComplete:h===r.length-1?()=>{c.remove(),a.remove(),i.style.zIndex="",i.style.position=""}:void 0})),f=new u.MultiAnimation(d,{mode:"parallel"}),m=new u.MultiAnimation(p,{mode:"parallel"});return new u.MultiAnimation([f,m],{mode:"sequence"})}}};function Te(e){const{paths:t,type:n="horizontal"}=e;return _(t,()=>Oe({direction:n}))}const De={spring:{stiffness:200,damping:20,doubleSpring:.7}},k=.5;function Fe(e){const t=e==="enter"?-100:100,n=e==="enter"?100:-100;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(${t*s}%, 0, 0)`,opacity:`${k+(1-k)*(1-s)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${n}%, 0, 0)`,opacity:`${k}`},animate:s=>({transform:`translate3d(${n*(1-s)}%, 0, 0)`,opacity:`${k+(1-k)*s}`})}}}function ke(){return{physics:De,build:Fe}}const Ye={spring:{stiffness:230,damping:25,doubleSpring:{stiffness:230,damping:24}}};function Le(e){const t=e==="enter"?-20:100,n=e==="enter"?100:-20;return{out:{willChange:"transform",startStyle:{},animate:s=>({transform:`translate3d(${t*s}%, 0, 0)`})},in:{willChange:"transform",startStyle:{transform:`translate3d(${n}%, 0, 0)`},animate:s=>({transform:`translate3d(${n*(1-s)}%, 0, 0)`})}}}function Me(){return{physics:Ye,build:Le}}const He={parallax:Me(),crossfade:ke()},I="0",kt="1",v="2",We="parallax";function gt(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,s]of Object.entries(t.startStyle))e.style[n]=s}const ze=(e={})=>{const t=e.direction??"enter",n=He[e.type??We],s=n.physics,o=n.build(t),i=t==="enter"?I:v,l=t==="enter"?v:I;return{prepare:({from:a,to:r})=>(a.then(c=>{gt(c,o.out),c.style.pointerEvents="none",c.style.zIndex=i}),r.then(c=>{gt(c,o.in),c.style.position="relative",c.style.zIndex=l}),{}),animation:({from:a,to:r})=>{const c=new u.WebAnimation({element:a,integrator:g.from(s),style:p=>o.out.animate(p),onComplete:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transform="",a.style.opacity="",a.style.pointerEvents="",a.style.zIndex=""}}),d=new u.WebAnimation({element:r,integrator:g.from(s),style:p=>o.in.animate(p),onComplete:()=>{r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain="",r.style.transform="",r.style.opacity="",r.style.position==="relative"&&(r.style.position=""),r.style.zIndex===l&&(r.style.zIndex="")}});for(const p of[c,d]){const f=p.onComplete;p.onComplete=()=>{f==null||f(),p.releaseFill()}}return new u.MultiAnimation([c,d],{mode:"parallel"})}}};function Re(e){return e==="slide"||e==="crossfade"?"crossfade":"parallax"}function Ue(e){const{enter:t,exit:n}=e,s=e.type,o=Re(s);return Tt({enter:t,exit:n},i=>ze({direction:i,type:o}))}const Ne={spring:{stiffness:180,damping:20,doubleSpring:!0}},Ve={spring:{stiffness:170,damping:20,doubleSpring:!0}},Xe=(e={})=>{const t=e.physics??Ve,n=e.physics??Ne;return{prepare:({to:s})=>(s.then(o=>{o.style.opacity="0",o.style.willChange="opacity"}),{}),animation:({from:s,to:o})=>{const i=new u.WebAnimation({element:s,integrator:g.from(n),style:(a,r)=>({opacity:r}),onComplete:()=>{s.style.willChange="auto",s.style.opacity=""}}),l=new u.WebAnimation({element:o,integrator:g.from(t),style:a=>({opacity:a}),onComplete:()=>{o.style.willChange="auto",o.style.opacity=""}});return new u.MultiAnimation([i,l],{mode:"sequence"})}}};function Be(e){const{paths:t}=e;return _(t,()=>Xe())}const B={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},D={scaleDown:0,translate:.2,scaleUp:.8},Ze=.8,qe="white",bt=1e3/60,je=600;function Ke(e){const{items:t,from:n,to:s,recordFrame:o}=e,i=bt/1e3,l=Math.abs(s-n),a=t.map(c=>({item:c,integrator:new H({stiffness:c.spring.stiffness,damping:c.spring.damping}),state:{position:n,velocity:0},started:!1,settled:!1,settleTime:0}));for(let c=0;c<a.length;c++)(c===0||a[c].item.offset===0)&&(a[c].started=!0);o(0);let r=0;for(let c=1;c<=je;c++){const d=c*bt;r=d;for(const p of a)!p.started||p.settled||(p.state=p.integrator.step(p.state,s,i),p.integrator.isSettled(p.state,s)?(p.settleTime+=i,p.settleTime>=u.SETTLE_THRESHOLD&&(p.state={position:s,velocity:0},p.settled=!0)):p.settleTime=0,p.item.tick(p.state.position));for(let p=1;p<a.length;p++){const f=a[p];if(f.started)continue;const m=a[p-1];if(!m.started)continue;(l===0?1:Math.abs(m.state.position-n)/l)>=f.item.offset&&(f.started=!0)}if(o(d),a.every(p=>p.settled))return d}return r}function Z(e,t){return e!=null&&e.spring?{stiffness:e.spring.stiffness,damping:e.spring.damping}:t}function wt(e){const{rect:t,scale:n,direction:s,override:o}=e,i=s==="out"?{scale:1,translateY:-t.top}:{scale:n,translateY:-t.top+t.height},l=Z(o,B.scaleDown),a=Z(o,B.translate),r=Z(o,B.scaleUp),c=s==="out"?1:0,d=s==="out"?0:1,p=s==="out"?[{spring:l,offset:D.scaleDown,tick:y=>{const h=1-y;i.scale=1-(1-n)*h}},{spring:a,offset:D.translate,tick:y=>{const h=1-y;i.translateY=-t.top-t.height*h}},{spring:r,offset:D.scaleUp,tick:y=>{const h=1-y;i.scale=n+(1-n)*h}}]:[{spring:l,offset:D.scaleDown,tick:y=>{i.scale=1-(1-n)*y}},{spring:a,offset:D.translate,tick:y=>{i.translateY=-t.top+t.height*(1-y)}},{spring:r,offset:D.scaleUp,tick:y=>{i.scale=n+(1-n)*y}}],f=[],m=Ke({items:p,from:c,to:d,recordFrame:y=>f.push({time:y,scale:i.scale,translateY:i.translateY})});return{snapshots:f,totalDuration:m}}function Ge(e,t){if(e.length===0)return{time:0,scale:1,translateY:0};if(e.length===1||t<=0)return e[0];if(t>=1)return e[e.length-1];const n=t*(e.length-1),s=Math.floor(n),o=Math.ceil(n);if(s===o)return e[s];const i=e[s],l=e[o],a=n-s;return{time:i.time+(l.time-i.time)*a,scale:i.scale+(l.scale-i.scale)*a,translateY:i.translateY+(l.translateY-i.translateY)*a}}const Je=[[1,1],[-1,1],[1,-1],[-1,-1]];function Qe(e,t){const o=(i,l,a)=>{const r=document.createElement("div");Object.assign(r.style,{position:"fixed",pointerEvents:"none",zIndex:"9999",width:"15px",height:"15px",...i});const c=document.createElement("div");Object.assign(c.style,{position:"absolute",width:"15px",height:"1px",backgroundColor:e,[a]:"0",[l]:"0"});const d=document.createElement("div");return Object.assign(d.style,{position:"absolute",width:"1px",height:"15px",backgroundColor:e,[a]:"0",[l]:"0"}),r.appendChild(c),r.appendChild(d),r};return{topLeft:o({top:`${t.top-1}px`,left:`${t.left-1}px`},"left","top"),topRight:o({top:`${t.top-1}px`,left:`${t.left+t.width-15+1}px`},"right","top"),bottomLeft:o({top:`${t.top+t.height-15+1}px`,left:`${t.left-1}px`},"left","bottom"),bottomRight:o({top:`${t.top+t.height-15+1}px`,left:`${t.left+t.width-15+1}px`},"right","bottom")}}function St(e,t){const n=t.left+t.width/2,s=t.top+t.height/2;e.style.transformOrigin=`${n}px ${s}px`}function $t(e,t){e.style.clipPath=`polygon(
30
+ `}a.push(u),l.appendChild(u)}return e.appendChild(l),{container:l,blinds:a}}const Be=(e={})=>{const t=e.blindCount??Ue,n=e.direction??Ve,i=e.blindColor??Xe,s=e.physics??ze;return{prepare:async({from:o,to:r})=>{const l=await o,a=await r;l.style.zIndex="1000";const c=Ct(l,t,n,i,"hidden","left");a.style.position="relative",a.style.zIndex="0";const u=Ct(a,t,n,i,"closed","right");return{fromEl:l,fromBlinds:c.blinds,fromContainer:c.container,toBlinds:u.blinds,toContainer:u.container}},animation:({fromEl:o,fromBlinds:r,fromContainer:l,toBlinds:a,toContainer:c})=>{const u=r.map(f=>new m.WebAnimation({element:f,integrator:w.from(s),style:h=>({transform:n==="horizontal"?`scaleX(${h})`:`scaleY(${h})`})})),p=a.map((f,h)=>new m.WebAnimation({element:f,integrator:w.from(s),style:(g,S)=>({transform:n==="horizontal"?`scaleX(${S})`:`scaleY(${S})`}),onComplete:h===a.length-1?()=>{c.remove(),l.remove(),o.style.zIndex="",o.style.position=""}:void 0})),d=new m.MultiAnimation(u,{mode:"parallel"}),y=new m.MultiAnimation(p,{mode:"parallel"});return new m.MultiAnimation([d,y],{mode:"sequence"})}}};function Ze(e){const{paths:t,type:n="horizontal"}=e;return _(t,()=>Be({direction:n}))}const Ge={spring:{stiffness:200,damping:20,doubleSpring:.7}},L=.5;function je(e){const t=e==="enter"?-100:100,n=e==="enter"?100:-100;return{out:{willChange:"transform, opacity",startStyle:{},animate:i=>({transform:`translate3d(${t*i}%, 0, 0)`,opacity:`${L+(1-L)*(1-i)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${n}%, 0, 0)`,opacity:`${L}`},animate:i=>({transform:`translate3d(${n*(1-i)}%, 0, 0)`,opacity:`${L+(1-L)*i}`})}}}function qe(){return{physics:Ge,build:je}}const Ke={spring:{stiffness:230,damping:25,doubleSpring:{stiffness:230,damping:24}}};function Je(e){const t=e==="enter"?-20:100,n=e==="enter"?100:-20;return{out:{willChange:"transform",startStyle:{},animate:i=>({transform:`translate3d(${t*i}%, 0, 0)`})},in:{willChange:"transform",startStyle:{transform:`translate3d(${n}%, 0, 0)`},animate:i=>({transform:`translate3d(${n*(1-i)}%, 0, 0)`})}}}function Qe(){return{physics:Ke,build:Je}}const tn={parallax:Qe(),crossfade:qe()},R="0",zt="1",O="2",en="parallax";function $t(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,i]of Object.entries(t.startStyle))e.style[n]=i}const nn=(e={})=>{const t=e.direction??"enter",n=tn[e.type??en],i=n.physics,s=n.build(t),o=t==="enter"?R:O,r=t==="enter"?O:R;return{prepare:({from:l,to:a})=>(l.then(c=>{$t(c,s.out),c.style.pointerEvents="none",c.style.zIndex=o}),a.then(c=>{$t(c,s.in),c.style.position="relative",c.style.zIndex=r}),{}),animation:({from:l,to:a})=>{const c=new m.WebAnimation({element:l,integrator:w.from(i),style:p=>s.out.animate(p),onComplete:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain="",l.style.transform="",l.style.opacity="",l.style.pointerEvents="",l.style.zIndex=""}}),u=new m.WebAnimation({element:a,integrator:w.from(i),style:p=>s.in.animate(p),onComplete:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transform="",a.style.opacity="",a.style.position==="relative"&&(a.style.position=""),a.style.zIndex===r&&(a.style.zIndex="")}});for(const p of[c,u]){const d=p.onComplete;p.onComplete=()=>{d==null||d(),p.releaseFill()}}return new m.MultiAnimation([c,u],{mode:"parallel"})}}};function sn(e){return e==="slide"||e==="crossfade"?"crossfade":"parallax"}function on(e){const{enter:t,exit:n}=e,i=e.type,s=sn(i);return Ht({enter:t,exit:n},o=>nn({direction:o,type:s}))}const rn={spring:{stiffness:180,damping:20,doubleSpring:!0}},an={spring:{stiffness:170,damping:20,doubleSpring:!0}},ln=(e={})=>{const t=e.physics??an,n=e.physics??rn;return{prepare:({to:i})=>(i.then(s=>{s.style.opacity="0",s.style.willChange="opacity"}),{}),animation:({from:i,to:s})=>{const o=new m.WebAnimation({element:i,integrator:w.from(n),style:(l,a)=>({opacity:a}),onComplete:()=>{i.style.willChange="auto",i.style.opacity=""}}),r=new m.WebAnimation({element:s,integrator:w.from(t),style:l=>({opacity:l}),onComplete:()=>{s.style.willChange="auto",s.style.opacity=""}});return new m.MultiAnimation([o,r],{mode:"sequence"})}}};function cn(e){const{paths:t}=e;return _(t,()=>ln())}const q={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},F={scaleDown:0,translate:.2,scaleUp:.8},pn=.8,un="white",Et=1e3/60,dn=600;function fn(e){const{items:t,from:n,to:i,recordFrame:s}=e,o=Et/1e3,r=Math.abs(i-n),l=t.map(c=>({item:c,integrator:new V({stiffness:c.spring.stiffness,damping:c.spring.damping}),state:{position:n,velocity:0},started:!1,settled:!1,settleTime:0}));for(let c=0;c<l.length;c++)(c===0||l[c].item.offset===0)&&(l[c].started=!0);s(0);let a=0;for(let c=1;c<=dn;c++){const u=c*Et;a=u;for(const p of l)!p.started||p.settled||(p.state=p.integrator.step(p.state,i,o),p.integrator.isSettled(p.state,i)?(p.settleTime+=o,p.settleTime>=m.SETTLE_THRESHOLD&&(p.state={position:i,velocity:0},p.settled=!0)):p.settleTime=0,p.item.tick(p.state.position));for(let p=1;p<l.length;p++){const d=l[p];if(d.started)continue;const y=l[p-1];if(!y.started)continue;(r===0?1:Math.abs(y.state.position-n)/r)>=d.item.offset&&(d.started=!0)}if(s(u),l.every(p=>p.settled))return u}return a}function K(e,t){return e!=null&&e.spring?{stiffness:e.spring.stiffness,damping:e.spring.damping}:t}function At(e){const{rect:t,scale:n,direction:i,override:s}=e,o=i==="out"?{scale:1,translateY:-t.top}:{scale:n,translateY:-t.top+t.height},r=K(s,q.scaleDown),l=K(s,q.translate),a=K(s,q.scaleUp),c=i==="out"?1:0,u=i==="out"?0:1,p=i==="out"?[{spring:r,offset:F.scaleDown,tick:f=>{const h=1-f;o.scale=1-(1-n)*h}},{spring:l,offset:F.translate,tick:f=>{const h=1-f;o.translateY=-t.top-t.height*h}},{spring:a,offset:F.scaleUp,tick:f=>{const h=1-f;o.scale=n+(1-n)*h}}]:[{spring:r,offset:F.scaleDown,tick:f=>{o.scale=1-(1-n)*f}},{spring:l,offset:F.translate,tick:f=>{o.translateY=-t.top+t.height*(1-f)}},{spring:a,offset:F.scaleUp,tick:f=>{o.scale=n+(1-n)*f}}],d=[],y=fn({items:p,from:c,to:u,recordFrame:f=>d.push({time:f,scale:o.scale,translateY:o.translateY})});return{snapshots:d,totalDuration:y}}function hn(e,t){if(e.length===0)return{time:0,scale:1,translateY:0};if(e.length===1||t<=0)return e[0];if(t>=1)return e[e.length-1];const n=t*(e.length-1),i=Math.floor(n),s=Math.ceil(n);if(i===s)return e[i];const o=e[i],r=e[s],l=n-i;return{time:o.time+(r.time-o.time)*l,scale:o.scale+(r.scale-o.scale)*l,translateY:o.translateY+(r.translateY-o.translateY)*l}}const yn=[[1,1],[-1,1],[1,-1],[-1,-1]];function mn(e,t){const s=(o,r,l)=>{const a=document.createElement("div");Object.assign(a.style,{position:"fixed",pointerEvents:"none",zIndex:"9999",width:"15px",height:"15px",...o});const c=document.createElement("div");Object.assign(c.style,{position:"absolute",width:"15px",height:"1px",backgroundColor:e,[l]:"0",[r]:"0"});const u=document.createElement("div");return Object.assign(u.style,{position:"absolute",width:"1px",height:"15px",backgroundColor:e,[l]:"0",[r]:"0"}),a.appendChild(c),a.appendChild(u),a};return{topLeft:s({top:`${t.top-1}px`,left:`${t.left-1}px`},"left","top"),topRight:s({top:`${t.top-1}px`,left:`${t.left+t.width-15+1}px`},"right","top"),bottomLeft:s({top:`${t.top+t.height-15+1}px`,left:`${t.left-1}px`},"left","bottom"),bottomRight:s({top:`${t.top+t.height-15+1}px`,left:`${t.left+t.width-15+1}px`},"right","bottom")}}function Pt(e,t){const n=t.left+t.width/2,i=t.top+t.height/2;e.style.transformOrigin=`${n}px ${i}px`}function It(e,t){e.style.clipPath=`polygon(
31
31
  ${t.left}px ${t.top}px,
32
32
  ${t.left+t.width}px ${t.top}px,
33
33
  ${t.left+t.width}px ${t.top+t.height}px,
34
34
  ${t.left}px ${t.top+t.height}px
35
- )`}function q(e,t,n,s,o){const i=n/1e3;return new u.WebAnimation({element:e,integrator:new jt({durationSec:i}),lowerBound:0,upperBound:1,style:l=>s(Ge(t,l)),onComplete:o})}const tn=(e={})=>{var o;const t=((o=e.border)==null?void 0:o.color)??qe,n=Ze,s=e.physics;return{prepare:({from:i,to:l,context:a})=>{const r=O(a,"from"),c=O(a,"to"),d=R(document.body,a.positionedParent),p=Qe(t,{...r,top:d.top});for(const f of["topLeft","topRight","bottomLeft","bottomRight"])a.positionedParent.appendChild(p[f]);return i.then(f=>{St(f,r),$t(f,r),f.style.transform=`translateY(${-r.top}px)`}),l.then(f=>{St(f,c),$t(f,c),f.style.transform=`translateY(${-c.top+c.height}px) scale(${n})`}),{borders:p,fromRect:r,toRect:c}},animation:({from:i,to:l,context:a,borders:r,fromRect:c,toRect:d})=>{const p=wt({rect:c,scale:n,direction:"out",override:s}),f=wt({rect:d,scale:n,direction:"in",override:s}),m=q(i,p.snapshots,p.totalDuration,S=>({transform:`translateY(${S.translateY}px) scale(${S.scale})`}),()=>{i.style.clipPath="",i.style.transformOrigin="",i.style.transform=""}),y=q(l,f.snapshots,f.totalDuration,S=>({transform:`translateY(${S.translateY}px) scale(${S.scale})`}),()=>{l.style.clipPath="",l.style.transformOrigin="",l.style.transform=""}),h=Je.map(([S,x],$)=>{const C=["topLeft","topRight","bottomLeft","bottomRight"][$];return q(r[C],p.snapshots,p.totalDuration,P=>{const A=(c.width-c.width*P.scale)/2*.7*S,F=(c.height-c.height*P.scale)/2*.7*x;return{transform:`translate(${A}px, ${F}px)`}})}),b=new u.MultiAnimation([m,y,...h],{mode:"parallel"}),w=b.onComplete;return b.onComplete=()=>{w==null||w();const S=a.positionedParent;for(const x of["topLeft","topRight","bottomLeft","bottomRight"]){const $=r[x];$.parentElement===S&&S.removeChild($)}},b}}};function en(e){const{paths:t,options:n}=e,s=(n==null?void 0:n.borderColor)!==void 0?{border:{color:n.borderColor}}:void 0;return _(t,()=>tn(s))}const Ct="data-hero-enter-key",Et="data-hero-exit-key",j="data-hero-key";class nn{constructor(){E(this,"previousFromOpacity","")}prepare(t){t.from.then(n=>{this.previousFromOpacity=n.style.opacity,n.style.opacity="0"})}contribute(t){return t.onComplete(()=>{t.from.style.opacity=this.previousFromOpacity}),[]}}const sn=()=>new nn;class on{contribute(t){const{from:n,to:s,physics:o,onComplete:i}=t,l=n.style.opacity,a=s.style.opacity,r=n.style.willChange,c=s.style.willChange;return s.style.opacity="0",n.style.willChange="opacity",s.style.willChange="opacity",i(()=>{n.style.opacity=l,s.style.opacity=a,n.style.willChange=r,s.style.willChange=c}),[new u.WebAnimation({element:n,integrator:g.from(o),style:(d,p)=>({opacity:p})}),new u.WebAnimation({element:s,integrator:g.from(o),style:d=>({opacity:d})})]}}const rn=()=>new on,an={static:sn,fade:rn},ln={spring:{stiffness:320,damping:30}},cn=()=>ln,pn={spring:{stiffness:300,damping:30,doubleSpring:1}},dn=()=>pn,fn={default:cn,smooth:dn},yn=700,hn="data-hero-aspect-ratio",un="data-hero-radius";function mn(e){if(!e)return null;if(e.includes("/")){const[n,s]=e.split("/"),o=parseFloat(n??""),i=parseFloat(s??"");return!Number.isFinite(o)||!Number.isFinite(i)||o<=0||i<=0?null:o/i}const t=parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function xt(e){const t=e.getAttribute(un);if(!t)return 0;const n=parseFloat(t);return Number.isFinite(n)&&n>0?n:0}function W(e){return e.left+e.width/2}function z(e){return e.top+e.height/2}function gn(e,t){return{top:Math.max(0,t.top-e.top),right:Math.max(0,e.left+e.width-(t.left+t.width)),bottom:Math.max(0,e.top+e.height-(t.top+t.height)),left:Math.max(0,t.left-e.left)}}function bn(e,t,n){const s=e.width/e.height;let o,i;return n==="contain"?s>t?(i=e.height,o=i*t):(o=e.width,i=o/t):s>t?(o=e.width,i=o/t):(i=e.height,o=i*t),{left:e.left+(e.width-o)/2,top:e.top+(e.height-i)/2,width:o,height:i}}function At(e,t,n){const s=R(e,t),o=mn(t.getAttribute(hn));if(o===null)return{bbox:s,content:s,window:s,clipInset:{top:0,right:0,bottom:0,left:0}};const i=bn(s,o,n),l=n==="cover"?s:i;return{bbox:s,content:i,window:l,clipInset:gn(i,l)}}function wn(e,t,n,s){const o=n.width/s,i=n.height/s,l=e.width/2+(W(n)-W(t))/s-o/2,a=e.height/2+(z(n)-z(t))/s-i/2;return{top:Math.max(0,a),right:Math.max(0,e.width-l-o),bottom:Math.max(0,e.height-a-i),left:Math.max(0,l)}}function L(e,t){const n=new Map,s=e.querySelectorAll(`[${t}]`);for(const o of Array.from(s)){const i=o.getAttribute(t);i&&(n.has(i)||n.set(i,o))}return n}function Sn(e,t){const n=[],s=L(t,Ct),o=L(e,Et);for(const[a,r]of s){const c=o.get(a);c&&n.push({key:a,fromEl:c,toEl:r,fromFit:"cover",toFit:"contain"})}const i=L(e,Ct),l=L(t,Et);for(const[a,r]of i){const c=l.get(a);c&&n.push({key:a,fromEl:r,toEl:c,fromFit:"contain",toFit:"cover"})}return n}function $n(e,t){const n=[],s=Array.from(t.querySelectorAll(`[${j}]`));for(const o of s){const i=o.getAttribute(j);if(!i)continue;const l=e.querySelector(`[${j}="${i}"]`);l&&n.push({key:i,fromEl:l,toEl:o,fromFit:"contain",toFit:"contain"})}return n}function Cn(e,t){const n=Sn(e,t);return n.length>0?n:$n(e,t)}function En(e,t,n){const{fromEl:s,toEl:o}=t,i=At(e,s,t.fromFit),l=At(e,o,t.toFit),a=i.content,r=i.window,c=l.content,d=l.window,p=l.clipInset,f=xt(s),m=xt(o);if(a.width===0||a.height===0||r.width===0||r.height===0||c.width===0||c.height===0||d.width===0||d.height===0)return null;const y=Math.max(a.width/c.width,a.height/c.height),h=W(a),b=z(a),w=W(c),S=z(c),x=h-w,$=b-S;if(Math.abs($)>n)return null;const C=wn(c,a,r,y);return{toContent:c,hasRadius:f>0||m>0,styleFor:(P,A)=>{const F=A*x,Y=A*$,T=P+A*y,Mt=(f*A+m*P)/T,Ht=C.top*A+p.top*P,Wt=C.right*A+p.right*P,zt=C.bottom*A+p.bottom*P,Rt=C.left*A+p.left*P;return{transform:`translate(${F}px, ${Y}px) scale(${T})`,clipPath:`inset(${Ht}px ${Wt}px ${zt}px ${Rt}px round ${Mt}px)`}}}}function xn(e,t){e.style.transform=t.transform,e.style.clipPath=t.clipPath}class An{contribute(t){const{resolved:n,physics:s,positionedParent:o,maxDistance:i,onComplete:l}=t,a=[];for(const r of n.pairs){const{fromEl:c,toEl:d}=r,p=En(o,r,i);if(!p)continue;const f=d.cloneNode(!0);f.style.position="absolute",f.style.left=`${p.toContent.left}px`,f.style.top=`${p.toContent.top}px`,f.style.width=`${p.toContent.width}px`,f.style.height=`${p.toContent.height}px`,f.style.margin="0",f.style.transformOrigin="center center",f.style.zIndex="1000",f.style.willChange="transform, clip-path",f.style.pointerEvents="none",f.style.maxWidth="none",f.style.maxHeight="none",p.hasRadius&&(f.style.borderRadius="0"),xn(f,p.styleFor(0,1)),o.appendChild(f);const m=c.style.opacity,y=d.style.opacity;c.style.opacity="0",d.style.opacity="0",l(()=>{c.style.opacity=m,d.style.opacity=y,f.parentElement&&f.parentElement.removeChild(f)}),a.push(new u.WebAnimation({element:f,integrator:g.from(s),style:p.styleFor}))}return a}}function Pn(e){return[new An,an[e.type]()]}const _n=e=>{const t=Pn(e),n=fn[e.variant](),s=yn;return{prepare:o=>{var a;const i=Promise.all([o.from,o.to]).then(([r,c])=>({pairs:Cn(r,c)})),l={from:o.from,to:o.to,resolved:i};for(const r of t)(a=r.prepare)==null||a.call(r,l);return i.then(r=>({resolved:r}))},animation:({from:o,to:i,context:l,resolved:a})=>{if(a.pairs.length===0)return new u.MultiAnimation([],{mode:"parallel"});const r=[],c=y=>{r.push(y)},d={from:o,to:i,resolved:a,physics:n,positionedParent:l.positionedParent,maxDistance:s,onComplete:c},p=[];for(const y of t)y.contribute&&p.push(...y.contribute(d));if(p.length===0)return new u.MultiAnimation([],{mode:"parallel"});const f=new u.MultiAnimation(p,{mode:"parallel"}),m=f.onComplete;return f.onComplete=()=>{m==null||m();for(const y of r)try{y()}catch(h){console.error("[hero] cleanup error",h)}},f}}};function In(e){const{paths:t}=e,n=e.type??"static",s=e.variant??"default";return _(t,()=>_n({type:n,variant:s}))}const vn={spring:{stiffness:50,damping:30}},On={spring:{stiffness:80,damping:25}},Tn=(e={})=>{const t=e.physics??vn,n=e.initialRotation??45,s=e.initialScale??.01,o=e.rotationTriggerPoint??.8;return{prepare:({from:i,to:l,context:a})=>(i.then(r=>{r.style.opacity="1"}),l.then(r=>{const c=O(a,"to"),d=Math.min(c.width,c.height)*.4;r.style.setProperty("--max-border-radius",`${d}px`),r.style.setProperty("--border-radius-scale","1"),r.style.willChange="transform",r.style.backfaceVisibility="hidden";const p=c.left+c.width/2,f=c.top+c.height/2;r.style.transformOrigin=`${p}px ${f}px`,r.style.position="fixed",r.style.top=`${c.top}px`,r.style.left=`${c.left}px`,r.style.width=`${c.width}px`,r.style.height=`${c.height}px`,r.style.zIndex="1000",r.style.overflow="hidden",r.style.transform=`rotate(${n}deg) scale(${s}) translateZ(0)`,r.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",r.style.opacity="1"}),{}),animation:({from:i,to:l})=>{const a=new u.WebAnimation({element:i,integrator:g.from(On),style:(c,d)=>({opacity:d}),onComplete:()=>{i.style.opacity=""}}),r=new u.WebAnimation({element:l,integrator:g.from(t),style:c=>{let d;if(c<=.05)d=s;else if(c<=o){const y=(c-.05)/(o-.05),h=Math.pow(y,9);d=s+(.8-s)*h}else{const y=(c-o)/(1-o);d=.8+.2*(1-Math.pow(1-y,3))}const p=.7;let f;if(c<=p)f=n;else{const y=(c-p)/(1-p),h=1-Math.pow(1-y,2);f=n*(1-h)}let m;if(c<=p)m=1;else{const y=(c-p)/(1-p);m=1-Math.pow(y,.5)}return{transform:`rotate(${f.toFixed(2)}deg) scale(${d.toFixed(4)}) translateZ(0)`,"--border-radius-scale":m.toFixed(4)}},onComplete:()=>{l.style.willChange="",l.style.backfaceVisibility="",l.style.removeProperty("--max-border-radius"),l.style.removeProperty("--border-radius-scale"),l.style.transform="",l.style.transformOrigin="",l.style.position="",l.style.zIndex="",l.style.top="",l.style.left="",l.style.width="",l.style.height="",l.style.overflow="",l.style.borderRadius=""}});return new u.MultiAnimation([a,r],{mode:"parallel"})}}};function Dn(e){const{paths:t}=e;return _(t,()=>Tn())}const Fn={spring:{stiffness:100,damping:30}},kn=(e={})=>{const t=e.physics??Fn;return{prepare:({from:n,to:s})=>(n.then(o=>{o.style.transformOrigin="center center",o.style.willChange="transform, opacity"}),s.then(o=>{o.style.opacity="0",o.style.transform="rotate(-180deg)",o.style.transformOrigin="center center",o.style.willChange="transform, opacity"}),{}),animation:({from:n,to:s})=>{const o=new u.WebAnimation({element:n,integrator:g.from(t),style:l=>({transform:`rotate(${l*180}deg)`,opacity:l<.5?1:0}),onComplete:()=>{n.style.willChange="auto",n.style.transform="",n.style.transformOrigin="",n.style.opacity=""}}),i=new u.WebAnimation({element:s,integrator:g.from(t),style:(l,a)=>({transform:`rotate(${-a*180}deg)`,opacity:l>.5?1:0}),onComplete:()=>{s.style.willChange="auto",s.style.transform="",s.style.transformOrigin="",s.style.opacity=""}});return new u.MultiAnimation([o,i],{mode:"parallel"})}}};function Yn(e){const{paths:t}=e;return _(t,()=>kn())}const Ln={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},Pt=(e={})=>{const t=e.direction??"up",n=e.physics??Ln,s=t==="up",o=s?I:v,i=s?v:I;return{prepare:({from:l,to:a})=>(l.then(r=>{r.style.zIndex=o,r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}),a.then(r=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.position="relative",r.style.zIndex=i}),{}),animation:({from:l,to:a})=>{const r=l.offsetHeight,c=a.offsetHeight,d=window.innerHeight,p=Math.max(Math.min(r,c),d),f=new u.WebAnimation({element:l,integrator:g.from(n),style:y=>({transform:`translate3d(0, ${s?-p*y:p*y}px, 0)`}),onComplete:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain="",l.style.transform="",l.style.pointerEvents="",l.style.zIndex=""}}),m=new u.WebAnimation({element:a,integrator:g.from(n),style:(y,h)=>({transform:`translate3d(0, ${s?h*p:h*-p}px, 0)`}),onComplete:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transform="",a.style.position==="relative"&&(a.style.position=""),a.style.zIndex===i&&(a.style.zIndex="")}});for(const y of[f,m]){const h=y.onComplete;y.onComplete=()=>{h==null||h(),y.releaseFill()}}return new u.MultiAnimation([f,m],{mode:"parallel"})}}};function Mn(e){const{paths:t,type:n="directional"}=e;return n==="non-directional"?_(t,()=>Pt({direction:"up"})):nt(t,{forward:"up",backward:"down"},s=>Pt({direction:s}))}const Hn={spring:{stiffness:200,damping:24}},Wn={inertia:{acceleration:25,resistance:1.2}},K=.2;function zn(){return{enterPhysics:Hn,exitPhysics:Wn,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-K*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-K+K*e})`,opacity:e})}}}const Rn={spring:{stiffness:200,damping:24}},Un={inertia:{acceleration:25,resistance:1.2}},G=.08,Nn=16,J=.6,Vn=e=>`blur(${Math.max(0,e).toFixed(2)}px)`;function Xn(){return{enterPhysics:Rn,exitPhysics:Un,background:{willChange:"transform, opacity",enterStyle:e=>({transform:`scale(${1-G*e})`,opacity:1-(1-J)*e}),exitStyle:e=>({transform:`scale(${1-G+G*e})`,opacity:J+(1-J)*e})},overlay:{willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,s=Vn(Nn*n);return{backdropFilter:s,WebkitBackdropFilter:s}}}}}const Bn={spring:{stiffness:200,damping:24}},Zn={inertia:{acceleration:25,resistance:1.2}};function qn(){return{enterPhysics:Bn,exitPhysics:Zn,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const jn={static:qn(),"background-scale":zn(),blur:Xn()},Kn="static",Gn="transform",Jn=(e={})=>{const t=e.direction??"enter",n=jn[e.type??Kn],s=t==="enter"?n.enterPhysics:n.exitPhysics,o=n.background,i=n.overlay,l=o.willChange!=="";return{prepare:({from:a,to:r,context:c,createElement:d})=>{const p=t==="enter"?r:a,f=t==="enter"?a:r;p.then(y=>{y.style.willChange=Gn,y.style.backfaceVisibility="hidden",y.style.contain="layout paint",y.style.zIndex=v,t==="enter"?y.style.position="relative":y.style.pointerEvents="none"}),f.then(y=>{l&&(y.style.willChange=o.willChange,y.style.backfaceVisibility="hidden",y.style.contain="layout paint"),y.style.zIndex=I,t==="enter"?y.style.pointerEvents="none":y.style.position="relative"});let m;return i&&(m=d("sheet-overlay"),Object.assign(m.style,i.initialStyle),m.style.willChange=i.willChange,c.positionedParent.appendChild(m)),{overlay:m}},animation:({from:a,to:r,context:c,overlay:d})=>{const p=t==="enter"?r:a,f=t==="enter"?a:r,m=O(c,t==="enter"?"to":"from"),y=()=>{a.style.pointerEvents="",a.style.zIndex=""},h=()=>{const $=t==="enter"?v:I;r.style.position==="relative"&&(r.style.position=""),r.style.zIndex===$&&(r.style.zIndex="")},b=$=>{const C=$.onComplete;$.onComplete=()=>{C==null||C(),$.releaseFill()}};p.style.clipPath=`inset(${m.top}px 0 calc(100% - ${m.top+m.height}px) 0)`;const w=t==="enter"?($,C)=>({transform:`translate3d(0, ${C*m.height}px, 0)`}):$=>({transform:`translate3d(0, ${$*m.height}px, 0)`}),S=new u.WebAnimation({element:p,integrator:g.from(s),style:w,onComplete:()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.contain="",p.style.clipPath="",p.style.transform="",y(),h()}});b(S);const x=[S];if(l){const $=f.scrollHeight;$>0&&(f.style.height=`${$}px`);const C=O(c,t==="enter"?"from":"to"),P=C.left+C.width/2,A=C.top+C.height/2;f.style.clipPath=`inset(${C.top}px 0 calc(100% - ${C.top+C.height}px) 0)`,f.style.transformOrigin=`${P}px ${A}px`;const F=t==="enter"?(T,st)=>o.enterStyle(T,st):T=>o.exitStyle(T),Y=new u.WebAnimation({element:f,integrator:g.from(s),style:F,onComplete:()=>{f.style.willChange="auto",f.style.backfaceVisibility="",f.style.contain="",f.style.clipPath="",f.style.transformOrigin="",f.style.transform="",f.style.opacity="",f.style.height=""}});b(Y),x.push(Y)}if(d&&i){d.style.zIndex=kt;const $=Dt(c,"to");d.style.top=`${$.top}px`,d.style.height=`${$.height}px`,x.push(new u.WebAnimation({element:d,integrator:g.from(s),style:C=>i.style(t,C)}))}return new u.MultiAnimation(x,{mode:"parallel"})}}};function Qn(e){return e==="scale"||e==="background-scale"?"background-scale":e==="blur"?"blur":"static"}function ts(e){const{enter:t,exit:n}=e,s=e.type,o=Qn(s);return Tt({enter:t,exit:n},i=>Jn({direction:i,type:o}))}const es={spring:{stiffness:170,damping:22,doubleSpring:.8}},ns=(e={})=>{const t=e.direction??"left",n=e.physics??es,s=t==="left";return{prepare:({from:o,to:i})=>(o.then(l=>{l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.pointerEvents="none"}),i.then(l=>{const a=s?100:-100;l.style.transform=`translate3d(${a}%, 0, 0)`,l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint"}),{}),animation:({from:o,to:i})=>{const l=new u.WebAnimation({element:o,integrator:g.from(n),style:r=>({transform:`translate3d(${s?-100*r:100*r}%, 0, 0)`}),onComplete:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain="",o.style.transform="",o.style.pointerEvents=""}}),a=new u.WebAnimation({element:i,integrator:g.from(n),style:(r,c)=>({transform:`translate3d(${s?c*100:c*-100}%, 0, 0)`}),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform=""}});return new u.MultiAnimation([l,a],{mode:"parallel"})}}};function ss(e){const{paths:t}=e;return nt(t,{forward:"left",backward:"right"},n=>ns({direction:n}))}const os={spring:{stiffness:17,damping:6}},Q=20,M=800,is=(e={})=>{const t=e.physics??os;return{prepare:({from:n,to:s})=>(n.then(o=>{o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint",o.style.pointerEvents="none",o.style.transform=`perspective(${M}px) rotateY(0deg) translate3d(0%, 0, 0)`}),s.then(o=>{o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint",o.style.transform=`perspective(${M}px) rotateY(${Q}deg) translate3d(-100%, 0, 0)`}),{}),animation:({from:n,to:s})=>{const o=new u.WebAnimation({element:n,integrator:g.from(t),style:l=>{const a=-l*Q,r=l*100;return{transform:`perspective(${M}px) rotateY(${a}deg) translate3d(${r}%, 0, 0)`}},onComplete:()=>{n.style.transform="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.pointerEvents=""}}),i=new u.WebAnimation({element:s,integrator:g.from(t),style:(l,a)=>{const r=a*Q,c=-a*100;return{transform:`perspective(${M}px) rotateY(${r}deg) translate3d(${c}%, 0, 0)`}},onComplete:()=>{s.style.transform="",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}});return new u.MultiAnimation([o,i],{mode:"sequence"})}}};function rs(e){const{paths:t}=e;return _(t,()=>is())}function as({enterRect:e,exitRect:t,pageRect:n,scrollOffset:s,enterRadius:o,exitRadius:i}){const l=t.left-e.left+(t.width-e.width)/2-s.x,a=t.top-e.top+(t.height-e.height)/2-s.y,r=t.width/e.width,c=t.height/e.height,d=e.top/n.height*100,p=(n.width-(e.left+e.width))/n.width*100,f=(n.height-(e.top+e.height))/n.height*100,m=e.left/n.width*100;return{transformOrigin:`${e.left+e.width/2}px ${e.top+e.height/2}px`,animate:y=>{const h=1-y,b=1+(r-1)*h,w=1+(c-1)*h,x=(i*h+o*(1-h))/((b+w)/2);return{clipPath:`inset(${d*h}% ${p*h}% ${f*h}% ${m*h}% round ${x}px)`,transform:`translate(${l*h}px, ${a*h}px) scale(${b}, ${w})`}}}}function ls({enterRect:e,exitRect:t,pageRect:n,scrollOffset:s,enterRadius:o,exitRadius:i}){const l=t.left-e.left+(t.width-e.width)/2+s.x,a=t.top-e.top+(t.height-e.height)/2+s.y,r=t.width/e.width,c=t.height/e.height,d=e.top/n.height*100,p=(n.width-(e.left+e.width))/n.width*100,f=(n.height-(e.top+e.height))/n.height*100,m=e.left/n.width*100;return{transformOrigin:`${e.left+e.width/2}px ${e.top+e.height/2}px`,animate:y=>{const h=1-y,b=1+(r-1)*h,w=1+(c-1)*h,x=(o*(1-h)+i*h)/((b+w)/2);return{clipPath:`inset(${d*h}% ${p*h}% ${f*h}% ${m*h}% round ${x}px)`,transform:`translate(${l*h-s.x}px, ${a*h}px) scale(${b}, ${w})`}}}}const cs={spring:{stiffness:380,damping:30,doubleSpring:{stiffness:260,damping:30}}},Yt=.12,ps=18;function ds(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Yt*t})`}}}}function fs(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Yt*t})`}}}}const tt={willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,s=`blur(${ps*n}px)`;return{backdropFilter:s,WebkitBackdropFilter:s}}};class ys{constructor(){E(this,"physics",cs)}contribute(t){const{from:n,to:s,resolved:o,physics:i}=t,l=o.mode==="enter",a=l?n:s,r=l?ds():fs();return r&&(a.style.transformOrigin=r.transformOrigin),[new u.WebAnimation({element:a,integrator:g.from(i),style:l?(c,d)=>r.animate(d):c=>r.animate(c)})]}}class hs{prepare(t){const n=t.createElement("zoom-overlay");return Object.assign(n.style,tt.initialStyle),n.style.willChange=tt.willChange,t.context.positionedParent.appendChild(n),{overlay:n}}contribute(t){const n=t.extras.overlay;if(!n)return[];n.style.zIndex=kt;const s=Dt(t.context,"to");return n.style.top=`${s.top}px`,n.style.height=`${s.height}px`,[new u.WebAnimation({element:n,integrator:g.from(t.physics),style:o=>tt.style(t.resolved.mode,o)})]}}const us={spring:{stiffness:430,damping:33,doubleSpring:1}};function ms({enterRect:e,exitRect:t,scrollOffset:n}){const s=e.left-t.left+(e.width-t.width)/2+n.x,o=e.top-t.top+(e.height-t.height)/2+n.y,i=e.width/t.width,l=e.height/t.height,a=Math.max(i,l);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:r=>{const c=1-r;return{transform:`translate(${s*c-n.x}px, ${o*c}px) scale(${1+(a-1)*c})`}}}}function gs({enterRect:e,exitRect:t,scrollOffset:n}){const s=e.left-t.left+(e.width-t.width)/2-n.x,o=e.top-t.top+(e.height-t.height)/2-n.y,i=e.width/t.width,l=e.height/t.height,a=Math.max(i,l);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:r=>{const c=1-r;return{transform:`translate(${s*c}px, ${o*c}px) scale(${1+(a-1)*c})`}}}}class bs{constructor(){E(this,"physics",us)}contribute(t){const{from:n,to:s,resolved:o,input:i,physics:l}=t,a=o.mode==="enter",r=a?n:s,c=a?ms(i):gs(i);return c&&(r.style.transformOrigin=c.transformOrigin),[new u.WebAnimation({element:r,integrator:g.from(l),style:a?(d,p)=>c.animate(p):d=>c.animate(d)})]}}const ws={spring:{stiffness:530,damping:34,doubleSpring:1}};class Ss{constructor(){E(this,"physics",ws)}contribute(t){return[]}}const $s={expand:()=>new bs,static:()=>new Ss,blur:()=>new ys};function Cs(e){return $s[e]()}const et="data-zoom-enter-key",_t="data-zoom-exit-key",Es="data-zoom-radius";function It(e){const t=e.getAttribute(Es);if(!t)return 0;const n=parseFloat(t);return Number.isFinite(n)&&n>0?n:0}function xs(e,t){const n=[];let s=t;for(;s&&s!==e;){const o=s.parentElement;if(!o)break;for(const i of Array.from(o.children))i!==s&&i instanceof HTMLElement&&n.push(i);s=o}return n}function vt(e){const t=e.querySelectorAll(`[${et}]`);return t.length!==1?null:t[0]}function Ot(e,t){const n=e.querySelectorAll(`[${_t}]`);for(const s of n)if(s.getAttribute(_t)===t)return s;return null}function As(e,t){const n=vt(e),s=vt(t);if(!n&&s){const o=s.getAttribute(et);if(!o)return null;const i=Ot(e,o);return i?{mode:"enter",enterEl:s,exitEl:i}:null}if(n&&!s){const o=n.getAttribute(et);if(!o)return null;const i=Ot(t,o);return i?{mode:"exit",enterEl:n,exitEl:i}:null}return null}function Ps(e,t,n,s){return{enterRect:ot(e.mode==="enter"?n:t,e.enterEl),exitRect:ot(e.mode==="enter"?t:n,e.exitEl),pageRect:e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),scrollOffset:s,enterRadius:It(e.enterEl),exitRadius:It(e.exitEl)}}class _s{prepare(t){t.from.then(n=>{n.style.willChange="transform, clip-path, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"})}contribute(t){const{from:n,to:s,resolved:o,input:i,physics:l,onComplete:a}=t,r=o.mode==="enter",c=r?as(i):ls(i),d=r?s:n,p=r?"t":"u";c&&(d.style.transformOrigin=c.transformOrigin);const f=r?I:v,m=r?v:I,y=n.style.zIndex;n.style.zIndex=f;const h=s.style.zIndex,b=s.style.position;return s.style.zIndex=m,s.style.position="relative",a(()=>{d.style.willChange="auto",d.style.backfaceVisibility="",d.style.transformOrigin="",d.style.contain="",n.style.zIndex=y,s.style.zIndex===m&&(s.style.zIndex=h),s.style.position==="relative"&&(s.style.position=b),s.style.transformOrigin="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.transformOrigin="",n.style.contain="",n.style.transform="",n.style.clipPath=""}),[new u.WebAnimation({element:d,integrator:g.from(l),style:p==="t"?w=>c.animate(w):(w,S)=>c.animate(S)})]}}class Is{contribute(t){const{resolved:n,physics:s,from:o,to:i,onComplete:l}=t,a=n.mode==="enter"?i:o,r=xs(a,n.enterEl);if(r.length===0)return[];const c=r.map(d=>d.style.opacity);if(n.mode==="enter")for(const d of r)d.style.opacity="0";return l(()=>{for(let d=0;d<r.length;d++){const p=r[d];p&&(p.style.opacity=c[d]??"")}}),r.map(d=>new u.WebAnimation({element:d,integrator:g.from(s),style:(p,f)=>({opacity:n.mode==="enter"?p:f})}))}}class Lt{contribute(){return[]}}const vs={default:()=>new Lt,fade:()=>new Is};function Os(e){return vs[e]()}class Ts extends Lt{}function Ds(e){const t=Cs(e.type);return{strategies:[new _s,t,Os(e.variant),new Ts,...e.type==="blur"?[new hs]:[]],physics:t.physics}}const Fs=e=>{const{strategies:t,physics:n}=Ds(e);return{prepare:s=>{const o={from:s.from,to:s.to,context:{positionedParent:s.context.positionedParent},createElement:s.createElement},i={};for(const l of t){if(!l.prepare)continue;const a=l.prepare(o);a&&Object.assign(i,a)}return i},animation:({from:s,to:o,context:i,...l})=>{const a=As(s,o);if(!a)return new u.MultiAnimation([],{mode:"parallel"});const r=Ps(a,s,o,i.scrollOffset),c=[],p={from:s,to:o,resolved:a,input:r,physics:n,context:i,extras:l,onComplete:y=>{c.push(y)}},f=[];for(const y of t)y.contribute&&f.push(...y.contribute(p));const m=f[0];if(m){const y=m.onComplete;m.onComplete=()=>{y==null||y();for(const h of c)try{h()}catch(b){console.error("[zoom] cleanup error",b)}}}for(const y of f){if(!(y instanceof u.WebAnimation))continue;const h=y.onComplete;y.onComplete=()=>{h==null||h(),y.releaseFill()}}return new u.MultiAnimation(f,{mode:"parallel"})}}};function ks(e){const t=e.type??"static",n=e.variant??(e.fade?"fade":"default");return{type:t,variant:n}}function Ys(e){const t=ks(e);return _(e.paths,()=>Fs(t))}exports.Animation=u.Animation;exports.MultiAnimation=u.MultiAnimation;exports.WebAnimation=u.WebAnimation;exports.axis=Ae;exports.blind=Te;exports.drill=Ue;exports.fade=Be;exports.film=en;exports.hero=In;exports.jaemin=Dn;exports.rotate=Yn;exports.scroll=Mn;exports.sheet=ts;exports.slide=ss;exports.strip=rs;exports.zoom=Ys;
35
+ )`}function J(e,t,n,i,s){const o=n/1e3;return new m.WebAnimation({element:e,integrator:new ue({durationSec:o}),lowerBound:0,upperBound:1,style:r=>i(hn(t,r)),onComplete:s})}const gn=(e={})=>{var s;const t=((s=e.border)==null?void 0:s.color)??un,n=pn,i=e.physics;return{prepare:({from:o,to:r,context:l})=>{const a=D(l,"from"),c=D(l,"to"),u=k(document.body,l.positionedParent),p=mn(t,{...a,top:u.top});for(const d of["topLeft","topRight","bottomLeft","bottomRight"])l.positionedParent.appendChild(p[d]);return o.then(d=>{Pt(d,a),It(d,a),d.style.transform=`translateY(${-a.top}px)`}),r.then(d=>{Pt(d,c),It(d,c),d.style.transform=`translateY(${-c.top+c.height}px) scale(${n})`}),{borders:p,fromRect:a,toRect:c}},animation:({from:o,to:r,context:l,borders:a,fromRect:c,toRect:u})=>{const p=At({rect:c,scale:n,direction:"out",override:i}),d=At({rect:u,scale:n,direction:"in",override:i}),y=J(o,p.snapshots,p.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{o.style.clipPath="",o.style.transformOrigin="",o.style.transform=""}),f=J(r,d.snapshots,d.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{r.style.clipPath="",r.style.transformOrigin="",r.style.transform=""}),h=yn.map(([b,$],x)=>{const C=["topLeft","topRight","bottomLeft","bottomRight"][x];return J(a[C],p.snapshots,p.totalDuration,I=>{const P=(c.width-c.width*I.scale)/2*.7*b,A=(c.height-c.height*I.scale)/2*.7*$;return{transform:`translate(${P}px, ${A}px)`}})}),g=new m.MultiAnimation([y,f,...h],{mode:"parallel"}),S=g.onComplete;return g.onComplete=()=>{S==null||S();const b=l.positionedParent;for(const $ of["topLeft","topRight","bottomLeft","bottomRight"]){const x=a[$];x.parentElement===b&&b.removeChild(x)}},g}}};function bn(e){const{paths:t,options:n}=e,i=(n==null?void 0:n.borderColor)!==void 0?{border:{color:n.borderColor}}:void 0;return _(t,()=>gn(i))}function wn(e){if(!e)return null;if(e.includes("/")){const n=e.split("/");if(n.length!==2)return null;const i=Number.parseFloat(n[0]??""),s=Number.parseFloat(n[1]??"");return Number.isFinite(i)&&Number.isFinite(s)&&i>0&&s>0?i/s:null}const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function Sn(e){return e==="contain"||e==="cover"?e:null}function ot(e){return e.tagName==="IMG"}function xn(e){if(ot(e))return e;if(e.tagName==="PICTURE"||e.tagName==="VIDEO")return null;const t=[];for(const n of Array.from(e.children)){const i=n;ot(i)&&t.push(i)}return t.length===1?t[0]??null:null}function Cn(e){var a,c;if(!ot(e))return null;const t=e,n=t.naturalWidth,i=t.naturalHeight;if(typeof n=="number"&&typeof i=="number"&&Number.isFinite(n)&&Number.isFinite(i)&&n>0&&i>0)return n/i;const s=((a=e.getAttribute("width"))==null?void 0:a.trim())??"",o=((c=e.getAttribute("height"))==null?void 0:c.trim())??"",r=s===""?Number.NaN:Number(s),l=o===""?Number.NaN:Number(o);return Number.isFinite(r)&&Number.isFinite(l)&&r>0&&l>0?r/l:null}function $n(e){const t=e.trim().toLowerCase().replace(/\s+/g," ");return t===""||t==="center"||t==="center center"||t==="50% 50%"}function X(e){if(typeof getComputedStyle=="function")try{return getComputedStyle(e)}catch{}return e.style}function En(e){const t=X(e),n=$n(t.objectPosition??"");return{fit:n?Sn(t.objectFit??null):null,centered:n}}function Ut(e){if(!e)return 0;const t=/^(-?(?:\d+\.?\d*|\.\d+))px$/.exec(e.trim());if(!t)return null;const n=Number.parseFloat(t[1]??"");return Number.isFinite(n)&&n>=0?n:null}function _t(e){const t=X(e),n=[t.borderTopLeftRadius,t.borderTopRightRadius,t.borderBottomRightRadius,t.borderBottomLeftRadius].map(Ut),i=n[0];if(i==null)return{radius:0,supported:!1};const s=n.every(o=>o!==null&&Math.abs(o-i)<.001);return{radius:s?i:0,supported:s}}function An(e,t){var s;if(!t)return null;const n=(s=e.getAttribute(t))==null?void 0:s.trim();if(n==null||n==="")return null;const i=Number.parseFloat(n);return Number.isFinite(i)&&i>=0?i:null}function Pn(e){const t=X(e);return[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft,t.borderTopWidth,t.borderRightWidth,t.borderBottomWidth,t.borderLeftWidth].every(i=>i?Ut(i)===0:!0)}function In(e){const t=X(e),n=i=>i==="hidden"||i==="clip";return n(t.overflowX)&&n(t.overflowY)}function v(e){return e.left+e.width/2}function T(e){return e.top+e.height/2}function pt(e,t){return{top:Math.max(0,t.top-e.top),right:Math.max(0,e.left+e.width-(t.left+t.width)),bottom:Math.max(0,e.top+e.height-(t.top+t.height)),left:Math.max(0,t.left-e.left)}}function _n(e,t){const n=Math.max(e.left,t.left),i=Math.max(e.top,t.top),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height);return s>n&&o>i?{left:n,top:i,width:s-n,height:o-i}:null}function Rt(e,t){return Math.abs(e.left-t.left)<.01&&Math.abs(e.top-t.top)<.01&&Math.abs(e.width-t.width)<.01&&Math.abs(e.height-t.height)<.01}function Rn(e,t,n){const i=e.width/e.height;let s,o;return n==="contain"?i>t?(o=e.height,s=o*t):(s=e.width,o=s/t):i>t?(s=e.width,o=s/t):(o=e.height,s=o*t),{left:e.left+(e.width-s)/2,top:e.top+(e.height-o)/2,width:s,height:o}}function Vt(e,t,n){const i=t!==null&&n!==null&&e.width>0&&e.height>0?Rn(e,t,n):e,s=n==="contain"?i:e;return{bbox:e,content:i,window:s,clipInset:pt(i,s),aspectRatio:t,fit:n,radius:0,radiusSource:"none",bboxRadius:0,bboxRadiusSource:"none",contentAware:t!==null&&n!==null,mediaElement:null}}function rt(e,t,n){return{...Vt(e,null,null),radius:t,radiusSource:n,bboxRadius:t,bboxRadiusSource:n}}function Xt(e,t){const n=e.aspectRatio,i=t.aspectRatio;return e.contentAware&&t.contentAware&&n!==null&&i!==null&&Math.abs(n-i)/Math.max(n,i)<.01}function Ot(e){return rt(e.bbox,e.bboxRadius,e.bboxRadiusSource)}function Bt(e,t){return Xt(e,t)?[e,t]:[Ot(e),Ot(t)]}function at(e,t,n,i){const s=xn(e),o=s?n(s):t,r=i.legacyAspectRatioAttribute?wn(e.getAttribute(i.legacyAspectRatioAttribute)??(s==null?void 0:s.getAttribute(i.legacyAspectRatioAttribute))??null):null,l=r??(s?Cn(s):null),a=s?En(s):{fit:null,centered:!0},c=a.centered&&(s===null||Pn(s))?a.fit??(r!==null?i.fallbackFit??null:null):null,u=Vt(o,l,c),p=In(e),y=s!==null&&s!==e&&p?_n(u.window,t):u.window,f=An(e,i.legacyRadiusAttribute),h=s===e||p,g=h?_t(e):{radius:0,supported:!0},S=f??g.radius,b=f!==null?"legacy":g.supported?g.radius>0?"computed":"none":"unsupported",$=[];y&&h&&Rt(y,t)&&$.push(g),y&&s&&Rt(y,o)&&$.push(_t(s));const x=$.every(A=>A.supported),C=Math.max(0,...$.map(A=>A.radius)),I=f??C,P=f!==null?"legacy":x?C>0?"computed":"none":"unsupported";return!y||P==="unsupported"?rt(t,S,b):{...u,bbox:t,window:y,clipInset:pt(u.content,y),radius:I,radiusSource:P,bboxRadius:S,bboxRadiusSource:b,mediaElement:u.contentAware?s:null}}function Zt(e,t,n,i,s){const o=n.width/i,r=n.height/s;return{left:v(e)+(v(n)-v(t))/i-o/2,top:T(e)+(T(n)-T(t))/s-r/2,width:o,height:r}}const On={enter:"contain",exit:"cover",legacy:"contain"};function M(e){return On[e]}const vt="data-hero-enter-key",Tt="data-hero-exit-key",Q="data-hero-key";class vn{constructor(){E(this,"previousFromOpacity","")}prepare(t){t.from.then(n=>{this.previousFromOpacity=n.style.opacity,n.style.opacity="0"})}contribute(t){return t.onComplete(()=>{t.from.style.opacity=this.previousFromOpacity}),[]}}const Tn=()=>new vn;class Dn{contribute(t){const{from:n,to:i,physics:s,onComplete:o}=t,r=n.style.opacity,l=i.style.opacity,a=n.style.willChange,c=i.style.willChange;return i.style.opacity="0",n.style.willChange="opacity",i.style.willChange="opacity",o(()=>{n.style.opacity=r,i.style.opacity=l,n.style.willChange=a,i.style.willChange=c}),[new m.WebAnimation({element:n,integrator:w.from(s),style:(u,p)=>({opacity:p})}),new m.WebAnimation({element:i,integrator:w.from(s),style:u=>({opacity:u})})]}}const Fn=()=>new Dn,Mn={static:Tn,fade:Fn},Yn={spring:{stiffness:320,damping:30}},Ln=()=>Yn,kn={spring:{stiffness:300,damping:30,doubleSpring:1}},Hn=()=>kn,Nn={default:Ln,smooth:Hn},Wn=700,zn="data-hero-aspect-ratio",Un="data-hero-radius";function Dt(e,t,n){const i=k(e,t);return at(t,i,s=>k(e,s),{fallbackFit:n,legacyAspectRatioAttribute:zn,legacyRadiusAttribute:Un})}function z(e,t){const n=new Map,i=e.querySelectorAll(`[${t}]`);for(const s of Array.from(i)){const o=s.getAttribute(t);o&&(n.has(o)||n.set(o,s))}return n}function Vn(e,t){const n=[],i=z(t,vt),s=z(e,Tt);for(const[l,a]of i){const c=s.get(l);c&&n.push({key:l,fromEl:c,toEl:a,fromFit:M("exit"),toFit:M("enter")})}const o=z(e,vt),r=z(t,Tt);for(const[l,a]of o){const c=r.get(l);c&&n.push({key:l,fromEl:a,toEl:c,fromFit:M("enter"),toFit:M("exit")})}return n}function Xn(e,t){const n=[],i=Array.from(t.querySelectorAll(`[${Q}]`));for(const s of i){const o=s.getAttribute(Q);if(!o)continue;const r=e.querySelector(`[${Q}="${o}"]`);r&&n.push({key:o,fromEl:r,toEl:s,fromFit:M("legacy"),toFit:M("legacy")})}return n}function Bn(e,t){const n=Vn(e,t);return n.length>0?n:Xn(e,t)}function Zn(e,t){return Bt(e,t)}function Gn(e,t){return e.radiusSource==="unsupported"||t.radiusSource==="unsupported"?!1:e.mediaElement!==null||t.mediaElement!==null||e.radiusSource==="computed"||e.radiusSource==="legacy"||t.radiusSource==="computed"||t.radiusSource==="legacy"}function jn(e,t,n){const{fromEl:i,toEl:s}=t,[o,r]=Zn(Dt(e,i,t.fromFit),Dt(e,s,t.toFit)),l=o.content,a=o.window,c=r.content,u=r.window,p=r.clipInset,d=o.radiusSource==="unsupported"||r.radiusSource==="unsupported",y=d?0:o.radius,f=d?0:r.radius;if(l.width===0||l.height===0||a.width===0||a.height===0||c.width===0||c.height===0||u.width===0||u.height===0)return null;const h=Math.max(l.width/c.width,l.height/c.height),g=v(l),S=T(l),b=v(c),$=T(c),x=g-b,C=S-$;if(Math.abs(C)>n)return null;const I=pt(c,Zt(c,l,a,h,h));return{toContent:c,fromVisualEl:o.mediaElement??i,toVisualEl:r.mediaElement??s,resetCloneRadius:Gn(o,r),styleFor:(P,A)=>{const H=A*x,Y=A*C,N=P+A*h,Qt=Math.max(0,y*A+f*P)/Math.max(Math.abs(N),1e-6),te=I.top*A+p.top*P,ee=I.right*A+p.right*P,ne=I.bottom*A+p.bottom*P,ie=I.left*A+p.left*P;return{transform:`translate(${H}px, ${Y}px) scale(${N})`,clipPath:`inset(${te}px ${ee}px ${ne}px ${ie}px round ${Qt}px)`}}}}function qn(e,t){e.style.transform=t.transform,e.style.clipPath=t.clipPath}class Kn{contribute(t){const{resolved:n,physics:i,positionedParent:s,maxDistance:o,onComplete:r}=t,l=[];for(const a of n.pairs){const c=jn(s,a,o);if(!c)continue;const{fromVisualEl:u,toVisualEl:p}=c,d=p.cloneNode(!0);d.style.position="absolute",d.style.left=`${c.toContent.left}px`,d.style.top=`${c.toContent.top}px`,d.style.width=`${c.toContent.width}px`,d.style.height=`${c.toContent.height}px`,d.style.margin="0",d.style.transformOrigin="center center",d.style.zIndex="1000",d.style.willChange="transform, clip-path",d.style.pointerEvents="none",d.style.maxWidth="none",d.style.maxHeight="none",c.resetCloneRadius&&(d.style.borderRadius="0"),qn(d,c.styleFor(0,1)),s.appendChild(d);const y=u.style.opacity,f=p.style.opacity;u.style.opacity="0",p.style.opacity="0",r(()=>{u.style.opacity=y,p.style.opacity=f,d.parentElement&&d.parentElement.removeChild(d)}),l.push(new m.WebAnimation({element:d,integrator:w.from(i),style:c.styleFor}))}return l}}function Jn(e){return[new Kn,Mn[e.type]()]}const Qn=e=>{const t=Jn(e),n=Nn[e.variant](),i=Wn;return{prepare:s=>{var l;const o=Promise.all([s.from,s.to]).then(([a,c])=>({pairs:Bn(a,c)})),r={from:s.from,to:s.to,resolved:o};for(const a of t)(l=a.prepare)==null||l.call(a,r);return o.then(a=>({resolved:a}))},animation:({from:s,to:o,context:r,resolved:l})=>{if(l.pairs.length===0)return new m.MultiAnimation([],{mode:"parallel"});const a=[],c=f=>{a.push(f)},u={from:s,to:o,resolved:l,physics:n,positionedParent:r.positionedParent,maxDistance:i,onComplete:c},p=[];for(const f of t)f.contribute&&p.push(...f.contribute(u));if(p.length===0)return new m.MultiAnimation([],{mode:"parallel"});const d=new m.MultiAnimation(p,{mode:"parallel"}),y=d.onComplete;return d.onComplete=()=>{y==null||y();for(const f of a)try{f()}catch(h){console.error("[hero] cleanup error",h)}},d}}};function ti(e){const{paths:t}=e,n=e.type??"static",i=e.variant??"default";return _(t,()=>Qn({type:n,variant:i}))}const ei={spring:{stiffness:50,damping:30}},ni={spring:{stiffness:80,damping:25}},ii=(e={})=>{const t=e.physics??ei,n=e.initialRotation??45,i=e.initialScale??.01,s=e.rotationTriggerPoint??.8;return{prepare:({from:o,to:r,context:l})=>(o.then(a=>{a.style.opacity="1"}),r.then(a=>{const c=D(l,"to"),u=Math.min(c.width,c.height)*.4;a.style.setProperty("--max-border-radius",`${u}px`),a.style.setProperty("--border-radius-scale","1"),a.style.willChange="transform",a.style.backfaceVisibility="hidden";const p=c.left+c.width/2,d=c.top+c.height/2;a.style.transformOrigin=`${p}px ${d}px`,a.style.position="fixed",a.style.top=`${c.top}px`,a.style.left=`${c.left}px`,a.style.width=`${c.width}px`,a.style.height=`${c.height}px`,a.style.zIndex="1000",a.style.overflow="hidden",a.style.transform=`rotate(${n}deg) scale(${i}) translateZ(0)`,a.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",a.style.opacity="1"}),{}),animation:({from:o,to:r})=>{const l=new m.WebAnimation({element:o,integrator:w.from(ni),style:(c,u)=>({opacity:u}),onComplete:()=>{o.style.opacity=""}}),a=new m.WebAnimation({element:r,integrator:w.from(t),style:c=>{let u;if(c<=.05)u=i;else if(c<=s){const f=(c-.05)/(s-.05),h=Math.pow(f,9);u=i+(.8-i)*h}else{const f=(c-s)/(1-s);u=.8+.2*(1-Math.pow(1-f,3))}const p=.7;let d;if(c<=p)d=n;else{const f=(c-p)/(1-p),h=1-Math.pow(1-f,2);d=n*(1-h)}let y;if(c<=p)y=1;else{const f=(c-p)/(1-p);y=1-Math.pow(f,.5)}return{transform:`rotate(${d.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,"--border-radius-scale":y.toFixed(4)}},onComplete:()=>{r.style.willChange="",r.style.backfaceVisibility="",r.style.removeProperty("--max-border-radius"),r.style.removeProperty("--border-radius-scale"),r.style.transform="",r.style.transformOrigin="",r.style.position="",r.style.zIndex="",r.style.top="",r.style.left="",r.style.width="",r.style.height="",r.style.overflow="",r.style.borderRadius=""}});return new m.MultiAnimation([l,a],{mode:"parallel"})}}};function si(e){const{paths:t}=e;return _(t,()=>ii())}const oi={spring:{stiffness:100,damping:30}},ri=(e={})=>{const t=e.physics??oi;return{prepare:({from:n,to:i})=>(n.then(s=>{s.style.transformOrigin="center center",s.style.willChange="transform, opacity"}),i.then(s=>{s.style.opacity="0",s.style.transform="rotate(-180deg)",s.style.transformOrigin="center center",s.style.willChange="transform, opacity"}),{}),animation:({from:n,to:i})=>{const s=new m.WebAnimation({element:n,integrator:w.from(t),style:r=>({transform:`rotate(${r*180}deg)`,opacity:r<.5?1:0}),onComplete:()=>{n.style.willChange="auto",n.style.transform="",n.style.transformOrigin="",n.style.opacity=""}}),o=new m.WebAnimation({element:i,integrator:w.from(t),style:(r,l)=>({transform:`rotate(${-l*180}deg)`,opacity:r>.5?1:0}),onComplete:()=>{i.style.willChange="auto",i.style.transform="",i.style.transformOrigin="",i.style.opacity=""}});return new m.MultiAnimation([s,o],{mode:"parallel"})}}};function ai(e){const{paths:t}=e;return _(t,()=>ri())}const li={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},Ft=(e={})=>{const t=e.direction??"up",n=e.physics??li,i=t==="up",s=i?R:O,o=i?O:R;return{prepare:({from:r,to:l})=>(r.then(a=>{a.style.zIndex=s,a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"}),l.then(a=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.position="relative",a.style.zIndex=o}),{}),animation:({from:r,to:l})=>{const a=r.offsetHeight,c=l.offsetHeight,u=window.innerHeight,p=Math.max(Math.min(a,c),u),d=new m.WebAnimation({element:r,integrator:w.from(n),style:f=>({transform:`translate3d(0, ${i?-p*f:p*f}px, 0)`}),onComplete:()=>{r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain="",r.style.transform="",r.style.pointerEvents="",r.style.zIndex=""}}),y=new m.WebAnimation({element:l,integrator:w.from(n),style:(f,h)=>({transform:`translate3d(0, ${i?h*p:h*-p}px, 0)`}),onComplete:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain="",l.style.transform="",l.style.position==="relative"&&(l.style.position=""),l.style.zIndex===o&&(l.style.zIndex="")}});for(const f of[d,y]){const h=f.onComplete;f.onComplete=()=>{h==null||h(),f.releaseFill()}}return new m.MultiAnimation([d,y],{mode:"parallel"})}}};function ci(e){const{paths:t,type:n="directional"}=e;return n==="non-directional"?_(t,()=>Ft({direction:"up"})):ct(t,{forward:"up",backward:"down"},i=>Ft({direction:i}))}const pi={spring:{stiffness:200,damping:24}},ui={inertia:{acceleration:25,resistance:1.2}},tt=.2;function di(){return{enterPhysics:pi,exitPhysics:ui,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-tt*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-tt+tt*e})`,opacity:e})}}}const fi={spring:{stiffness:200,damping:24}},hi={inertia:{acceleration:25,resistance:1.2}},et=.08,yi=16,nt=.6,mi=e=>`blur(${Math.max(0,e).toFixed(2)}px)`;function gi(){return{enterPhysics:fi,exitPhysics:hi,background:{willChange:"transform, opacity",enterStyle:e=>({transform:`scale(${1-et*e})`,opacity:1-(1-nt)*e}),exitStyle:e=>({transform:`scale(${1-et+et*e})`,opacity:nt+(1-nt)*e})},overlay:{willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,i=mi(yi*n);return{backdropFilter:i,WebkitBackdropFilter:i}}}}}const bi={spring:{stiffness:200,damping:24}},wi={inertia:{acceleration:25,resistance:1.2}};function Si(){return{enterPhysics:bi,exitPhysics:wi,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const xi={static:Si(),"background-scale":di(),blur:gi()},Ci="static",$i="transform",Ei=(e={})=>{const t=e.direction??"enter",n=xi[e.type??Ci],i=t==="enter"?n.enterPhysics:n.exitPhysics,s=n.background,o=n.overlay,r=s.willChange!=="";return{prepare:({from:l,to:a,context:c,createElement:u})=>{const p=t==="enter"?a:l,d=t==="enter"?l:a;p.then(f=>{f.style.willChange=$i,f.style.backfaceVisibility="hidden",f.style.contain="layout paint",f.style.zIndex=O,t==="enter"?f.style.position="relative":f.style.pointerEvents="none"}),d.then(f=>{r&&(f.style.willChange=s.willChange,f.style.backfaceVisibility="hidden",f.style.contain="layout paint"),f.style.zIndex=R,t==="enter"?f.style.pointerEvents="none":f.style.position="relative"});let y;return o&&(y=u("sheet-overlay"),Object.assign(y.style,o.initialStyle),y.style.willChange=o.willChange,c.positionedParent.appendChild(y)),{overlay:y}},animation:({from:l,to:a,context:c,overlay:u})=>{const p=t==="enter"?a:l,d=t==="enter"?l:a,y=D(c,t==="enter"?"to":"from"),f=()=>{l.style.pointerEvents="",l.style.zIndex=""},h=()=>{const x=t==="enter"?O:R;a.style.position==="relative"&&(a.style.position=""),a.style.zIndex===x&&(a.style.zIndex="")},g=x=>{const C=x.onComplete;x.onComplete=()=>{C==null||C(),x.releaseFill()}};p.style.clipPath=`inset(${y.top}px 0 calc(100% - ${y.top+y.height}px) 0)`;const S=t==="enter"?(x,C)=>({transform:`translate3d(0, ${C*y.height}px, 0)`}):x=>({transform:`translate3d(0, ${x*y.height}px, 0)`}),b=new m.WebAnimation({element:p,integrator:w.from(i),style:S,onComplete:()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.contain="",p.style.clipPath="",p.style.transform="",f(),h()}});g(b);const $=[b];if(r){const x=d.scrollHeight;x>0&&(d.style.height=`${x}px`);const C=D(c,t==="enter"?"from":"to"),I=C.left+C.width/2,P=C.top+C.height/2;d.style.clipPath=`inset(${C.top}px 0 calc(100% - ${C.top+C.height}px) 0)`,d.style.transformOrigin=`${I}px ${P}px`;const A=t==="enter"?(Y,N)=>s.enterStyle(Y,N):Y=>s.exitStyle(Y),H=new m.WebAnimation({element:d,integrator:w.from(i),style:A,onComplete:()=>{d.style.willChange="auto",d.style.backfaceVisibility="",d.style.contain="",d.style.clipPath="",d.style.transformOrigin="",d.style.transform="",d.style.opacity="",d.style.height=""}});g(H),$.push(H)}if(u&&o){u.style.zIndex=zt;const x=Nt(c,"to");u.style.top=`${x.top}px`,u.style.height=`${x.height}px`,$.push(new m.WebAnimation({element:u,integrator:w.from(i),style:C=>o.style(t,C)}))}return new m.MultiAnimation($,{mode:"parallel"})}}};function Ai(e){return e==="scale"||e==="background-scale"?"background-scale":e==="blur"?"blur":"static"}function Pi(e){const{enter:t,exit:n}=e,i=e.type,s=Ai(i);return Ht({enter:t,exit:n},o=>Ei({direction:o,type:s}))}const Ii={spring:{stiffness:170,damping:22,doubleSpring:.8}},_i=(e={})=>{const t=e.direction??"left",n=e.physics??Ii,i=t==="left";return{prepare:({from:s,to:o})=>(s.then(r=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}),o.then(r=>{const l=i?100:-100;r.style.transform=`translate3d(${l}%, 0, 0)`,r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint"}),{}),animation:({from:s,to:o})=>{const r=new m.WebAnimation({element:s,integrator:w.from(n),style:a=>({transform:`translate3d(${i?-100*a:100*a}%, 0, 0)`}),onComplete:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transform="",s.style.pointerEvents=""}}),l=new m.WebAnimation({element:o,integrator:w.from(n),style:(a,c)=>({transform:`translate3d(${i?c*100:c*-100}%, 0, 0)`}),onComplete:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain="",o.style.transform=""}});return new m.MultiAnimation([r,l],{mode:"parallel"})}}};function Ri(e){const{paths:t}=e;return ct(t,{forward:"left",backward:"right"},n=>_i({direction:n}))}const Oi={spring:{stiffness:17,damping:6}},it=20,U=800,vi=(e={})=>{const t=e.physics??Oi;return{prepare:({from:n,to:i})=>(n.then(s=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${U}px) rotateY(0deg) translate3d(0%, 0, 0)`}),i.then(s=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${U}px) rotateY(${it}deg) translate3d(-100%, 0, 0)`}),{}),animation:({from:n,to:i})=>{const s=new m.WebAnimation({element:n,integrator:w.from(t),style:r=>{const l=-r*it,a=r*100;return{transform:`perspective(${U}px) rotateY(${l}deg) translate3d(${a}%, 0, 0)`}},onComplete:()=>{n.style.transform="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.pointerEvents=""}}),o=new m.WebAnimation({element:i,integrator:w.from(t),style:(r,l)=>{const a=l*it,c=-l*100;return{transform:`perspective(${U}px) rotateY(${a}deg) translate3d(${c}%, 0, 0)`}},onComplete:()=>{i.style.transform="",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}});return new m.MultiAnimation([s,o],{mode:"sequence"})}}};function Ti(e){const{paths:t}=e;return _(t,()=>vi())}function Di(e,t){return t.left>=e.left-.01&&t.top>=e.top-.01&&t.left+t.width<=e.left+e.width+.01&&t.top+t.height<=e.top+e.height+.01}function Gt(e){const t=()=>({enterContent:e.enterRect,exitContent:e.exitRect,startWindow:e.enterRect,scaleX:e.exitRect.width/e.enterRect.width,scaleY:e.exitRect.height/e.enterRect.height}),{enterMedia:n,exitMedia:i}=e;if(!n||!i||!Xt(n,i))return t();const s=n.content,o=i.content;if(s.width<=0||s.height<=0||o.width<=0||o.height<=0)return t();const r=o.width/s.width,l=o.height/s.height,a=Zt(s,o,i.window,r,l);return Di(n.window,a)?{enterContent:s,exitContent:o,startWindow:a,scaleX:r,scaleY:l}:t()}function jt(e,t){return{top:e.top/t.height*100,right:(t.width-(e.left+e.width))/t.width*100,bottom:(t.height-(e.top+e.height))/t.height*100,left:e.left/t.width*100}}function qt(e,t,n){return{x:e/Math.max(Math.abs(t),1e-6),y:e/Math.max(Math.abs(n),1e-6)}}function Fi(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Gt(e),{enterContent:r,exitContent:l,startWindow:a,scaleX:c,scaleY:u}=o,p=l.left-r.left+(l.width-r.width)/2-n.x,d=l.top-r.top+(l.height-r.height)/2-n.y,y=jt(a,t);return{transformOrigin:`${v(r)}px ${T(r)}px`,animate:f=>{const h=1-f,g=1+(c-1)*h,S=1+(u-1)*h,b=Math.max(0,s*h+i*(1-h)),$=qt(b,g,S);return{clipPath:`inset(${y.top*h}% ${y.right*h}% ${y.bottom*h}% ${y.left*h}% round ${$.x}px / ${$.y}px)`,transform:`translate(${p*h}px, ${d*h}px) scale(${g}, ${S})`}}}}function Mi(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Gt(e),{enterContent:r,exitContent:l,startWindow:a,scaleX:c,scaleY:u}=o,p=l.left-r.left+(l.width-r.width)/2+n.x,d=l.top-r.top+(l.height-r.height)/2+n.y,y=jt(a,t);return{transformOrigin:`${v(r)}px ${T(r)}px`,animate:f=>{const h=1-f,g=1+(c-1)*h,S=1+(u-1)*h,b=Math.max(0,i*(1-h)+s*h),$=qt(b,g,S);return{clipPath:`inset(${y.top*h}% ${y.right*h}% ${y.bottom*h}% ${y.left*h}% round ${$.x}px / ${$.y}px)`,transform:`translate(${p*h-n.x}px, ${d*h}px) scale(${g}, ${S})`}}}}const Yi={spring:{stiffness:380,damping:30,doubleSpring:{stiffness:260,damping:30}}},Kt=.12,Li=18;function ki(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Kt*t})`}}}}function Hi(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Kt*t})`}}}}const st={willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,i=`blur(${Li*n}px)`;return{backdropFilter:i,WebkitBackdropFilter:i}}};class Ni{constructor(){E(this,"physics",Yi)}contribute(t){const{from:n,to:i,resolved:s,physics:o}=t,r=s.mode==="enter",l=r?n:i,a=r?ki():Hi();return a&&(l.style.transformOrigin=a.transformOrigin),[new m.WebAnimation({element:l,integrator:w.from(o),style:r?(c,u)=>a.animate(u):c=>a.animate(c)})]}}class Wi{prepare(t){const n=t.createElement("zoom-overlay");return Object.assign(n.style,st.initialStyle),n.style.willChange=st.willChange,t.context.positionedParent.appendChild(n),{overlay:n}}contribute(t){const n=t.extras.overlay;if(!n)return[];n.style.zIndex=zt;const i=Nt(t.context,"to");return n.style.top=`${i.top}px`,n.style.height=`${i.height}px`,[new m.WebAnimation({element:n,integrator:w.from(t.physics),style:s=>st.style(t.resolved.mode,s)})]}}const zi={spring:{stiffness:430,damping:33,doubleSpring:1}};function Ui({enterRect:e,exitRect:t,scrollOffset:n}){const i=e.left-t.left+(e.width-t.width)/2+n.x,s=e.top-t.top+(e.height-t.height)/2+n.y,o=e.width/t.width,r=e.height/t.height,l=Math.max(o,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:a=>{const c=1-a;return{transform:`translate(${i*c-n.x}px, ${s*c}px) scale(${1+(l-1)*c})`}}}}function Vi({enterRect:e,exitRect:t,scrollOffset:n}){const i=e.left-t.left+(e.width-t.width)/2-n.x,s=e.top-t.top+(e.height-t.height)/2-n.y,o=e.width/t.width,r=e.height/t.height,l=Math.max(o,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:a=>{const c=1-a;return{transform:`translate(${i*c}px, ${s*c}px) scale(${1+(l-1)*c})`}}}}class Xi{constructor(){E(this,"physics",zi)}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r}=t,l=s.mode==="enter",a=l?n:i,c=l?Ui(o):Vi(o);return c&&(a.style.transformOrigin=c.transformOrigin),[new m.WebAnimation({element:a,integrator:w.from(r),style:l?(u,p)=>c.animate(p):u=>c.animate(u)})]}}const Bi={spring:{stiffness:530,damping:34,doubleSpring:1}};class Zi{constructor(){E(this,"physics",Bi)}contribute(t){return[]}}const Gi={expand:()=>new Xi,static:()=>new Zi,blur:()=>new Ni};function ji(e){return Gi[e]()}const lt="data-zoom-enter-key",Mt="data-zoom-exit-key",Yt="data-zoom-radius";function qi(e,t){return Math.abs(e.left-t.left)<.01&&Math.abs(e.top-t.top)<.01&&Math.abs(e.width-t.width)<.01&&Math.abs(e.height-t.height)<.01}function Ki(e,t){const n=[];let i=t;for(;i&&i!==e;){const s=i.parentElement;if(!s)break;for(const o of Array.from(s.children))o!==i&&o instanceof HTMLElement&&n.push(o);i=s}return n}function Lt(e){const t=e.querySelectorAll(`[${lt}]`);return t.length!==1?null:t[0]}function kt(e,t){const n=e.querySelectorAll(`[${Mt}]`);for(const i of n)if(i.getAttribute(Mt)===t)return i;return null}function Ji(e,t){const n=Lt(e),i=Lt(t);if(!n&&i){const s=i.getAttribute(lt);if(!s)return null;const o=kt(e,s);return o?{mode:"enter",enterEl:i,exitEl:o}:null}if(n&&!i){const s=n.getAttribute(lt);if(!s)return null;const o=kt(t,s);return o?{mode:"exit",enterEl:n,exitEl:o}:null}return null}function Qi(e,t,n,i){const s=e.mode==="enter"?n:t,o=e.mode==="enter"?t:n,r=W(s,e.enterEl),l=W(o,e.exitEl),a=at(e.enterEl,r,g=>W(s,g),{legacyRadiusAttribute:Yt}),c=at(e.exitEl,l,g=>W(o,g),{legacyRadiusAttribute:Yt}),[u,p]=Bt(a,c),d=u.contentAware&&p.contentAware,y=e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),f={left:0,top:0,width:y.width,height:y.height},h=u.radiusSource==="legacy"||qi(u.window,f)?u.radius:0;return{enterRect:r,exitRect:l,...d?{enterMedia:u,exitMedia:p}:{},pageRect:y,scrollOffset:i,enterRadius:h,exitRadius:p.radius}}class ts{prepare(t){t.from.then(n=>{n.style.willChange="transform, clip-path, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"})}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r,onComplete:l}=t,a=s.mode==="enter",c=a?Fi(o):Mi(o),u=a?i:n,p=a?"t":"u";c&&(u.style.transformOrigin=c.transformOrigin);const d=a?R:O,y=a?O:R,f=n.style.zIndex;n.style.zIndex=d;const h=i.style.zIndex,g=i.style.position;return i.style.zIndex=y,i.style.position="relative",l(()=>{u.style.willChange="auto",u.style.backfaceVisibility="",u.style.transformOrigin="",u.style.contain="",n.style.zIndex=f,i.style.zIndex===y&&(i.style.zIndex=h),i.style.position==="relative"&&(i.style.position=g),i.style.transformOrigin="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.transformOrigin="",n.style.contain="",n.style.transform="",n.style.clipPath=""}),[new m.WebAnimation({element:u,integrator:w.from(r),style:p==="t"?S=>c.animate(S):(S,b)=>c.animate(b)})]}}class es{contribute(t){const{resolved:n,physics:i,from:s,to:o,onComplete:r}=t,l=n.mode==="enter"?o:s,a=Ki(l,n.enterEl);if(a.length===0)return[];const c=a.map(u=>u.style.opacity);if(n.mode==="enter")for(const u of a)u.style.opacity="0";return r(()=>{for(let u=0;u<a.length;u++){const p=a[u];p&&(p.style.opacity=c[u]??"")}}),a.map(u=>new m.WebAnimation({element:u,integrator:w.from(i),style:(p,d)=>({opacity:n.mode==="enter"?p:d})}))}}class Jt{contribute(){return[]}}const ns={default:()=>new Jt,fade:()=>new es};function is(e){return ns[e]()}class ss extends Jt{}function os(e){const t=ji(e.type);return{strategies:[new ts,t,is(e.variant),new ss,...e.type==="blur"?[new Wi]:[]],physics:t.physics}}const rs=e=>{const{strategies:t,physics:n}=os(e);return{prepare:i=>{const s={from:i.from,to:i.to,context:{positionedParent:i.context.positionedParent},createElement:i.createElement},o={};for(const r of t){if(!r.prepare)continue;const l=r.prepare(s);l&&Object.assign(o,l)}return o},animation:({from:i,to:s,context:o,...r})=>{const l=Ji(i,s);if(!l)return new m.MultiAnimation([],{mode:"parallel"});const a=Qi(l,i,s,o.scrollOffset),c=[],p={from:i,to:s,resolved:l,input:a,physics:n,context:o,extras:r,onComplete:f=>{c.push(f)}},d=[];for(const f of t)f.contribute&&d.push(...f.contribute(p));const y=d[0];if(y){const f=y.onComplete;y.onComplete=()=>{f==null||f();for(const h of c)try{h()}catch(g){console.error("[zoom] cleanup error",g)}}}for(const f of d){if(!(f instanceof m.WebAnimation))continue;const h=f.onComplete;f.onComplete=()=>{h==null||h(),f.releaseFill()}}return new m.MultiAnimation(d,{mode:"parallel"})}}};function as(e){const t=e.type??"static",n=e.variant??(e.fade?"fade":"default");return{type:t,variant:n}}function ls(e){const t=as(e);return _(e.paths,()=>rs(t))}exports.Animation=m.Animation;exports.MultiAnimation=m.MultiAnimation;exports.WebAnimation=m.WebAnimation;exports.axis=We;exports.blind=Ze;exports.drill=on;exports.fade=cn;exports.film=bn;exports.hero=ti;exports.jaemin=si;exports.rotate=ai;exports.scroll=ci;exports.sheet=Pi;exports.slide=Ri;exports.strip=Ti;exports.zoom=ls;