@ssgoi/core 6.6.3 → 6.7.0-beta.0

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The framework-agnostic animation engine behind [SSGOI](https://ssgoi.dev) — native app-like page transitions for the web.
4
4
 
5
- > Most apps should install a framework binding (`@ssgoi/react`, `@ssgoi/svelte`, `@ssgoi/vue`, `@ssgoi/solid`, `@ssgoi/angular`), which depend on this package. Install `@ssgoi/core` directly only when building a custom integration.
5
+ > Most apps should install a framework binding (`@ssgoi/react`, `@ssgoi/svelte`, `@ssgoi/vue`, `@ssgoi/solid`, `@ssgoi/angular`, `@ssgoi/qwik`), which depend on this package. Install `@ssgoi/core` directly only when building a custom integration.
6
6
 
7
7
  try this: [ssgoi.dev](https://ssgoi.dev)
8
8
 
@@ -25,8 +25,8 @@ SSGOI brings native app-like page transitions to the web. Transform your static
25
25
  ### ✨ Key Features
26
26
 
27
27
  - **🌍 Works Everywhere** - Unlike the browser's View Transition API, SSGOI works in all modern browsers (Chrome, Firefox, Safari)
28
- - **🚀 SSR Ready** - Perfect compatibility with Next.js, Nuxt, SvelteKit, SolidStart. No hydration issues, SEO-friendly
29
- - **🎯 Use Your Router** - Keep your existing routing. React Router, Next.js App Router, SvelteKit - all work seamlessly
28
+ - **🚀 SSR Ready** - Perfect compatibility with Next.js, Nuxt, SvelteKit, SolidStart, Qwik City. No hydration issues, SEO-friendly
29
+ - **🎯 Use Your Router** - Keep your existing routing. React Router, Next.js App Router, SvelteKit, Qwik City - all work seamlessly
30
30
  - **💾 State Persistence** - Remembers animation state during navigation, even with browser back/forward
31
31
  - **🎨 Framework Agnostic** - One consistent API for React, Svelte, Vue, Solid, Angular, and more
32
32
 
@@ -37,7 +37,7 @@ SSGOI brings native app-like page transitions to the web. Transform your static
37
37
  ```bash
38
38
  # Pick the binding for your framework
39
39
  npm install @ssgoi/react
40
- # or @ssgoi/svelte, @ssgoi/vue, @ssgoi/solid, @ssgoi/angular
40
+ # or @ssgoi/svelte, @ssgoi/vue, @ssgoi/solid, @ssgoi/angular, @ssgoi/qwik
41
41
  ```
42
42
 
43
43
  ### Add Transitions in 30 Seconds
@@ -122,7 +122,7 @@ export function SsgoiTransitionBoundary({
122
122
  React Router and TanStack Router use the same component body with their own
123
123
  pathname hook.
124
124
 
125
- For SvelteKit, Nuxt/Vue, Solid, and Angular, mark each routed page boundary
125
+ For SvelteKit, Nuxt/Vue, Solid, Angular, and Qwik, mark each routed page boundary
126
126
  directly with `data-ssgoi-transition` instead of using a layout-level utility.
127
127
  The value can be a hard-coded logical id; it only has to match your config.
128
128
 
@@ -19,9 +19,11 @@ export interface WebAnimationOptions {
19
19
  * Lifecycle:
20
20
  * 1. `play()` / `reverse()` calls `simulate()` from the current (position,
21
21
  * velocity) toward the target bound, producing a frame list.
22
- * 2. Frames are converted to WAAPI keyframes; `element.animate(...)` runs them.
22
+ * 2. Frames are converted to WAAPI keyframes; `element.animate(...)` is armed
23
+ * at 0 ms, waits for the browser's pending setup, then starts.
23
24
  * 3. While playing, `getPose()` interpolates the live position from frames
24
- * using `performance.now() - startTime`.
25
+ * using WAAPI's `currentTime`, so browser setup latency is not counted as
26
+ * animation progress.
25
27
  *
26
28
  * Identity for motion matching is the DOM element itself — when a previous
27
29
  * animation's pose is handed in via `matchInto`, we look up by element.
@@ -36,7 +38,10 @@ export declare class WebAnimation extends Animation {
36
38
  private currentVelocity;
37
39
  private frames;
38
40
  private waapi;
39
- private startTime;
41
+ private runId;
42
+ private waitingForStart;
43
+ private startReady;
44
+ private pendingFirstFrame;
40
45
  private running;
41
46
  private paused;
42
47
  private settled;
@@ -68,6 +73,8 @@ export declare class WebAnimation extends Animation {
68
73
  private runToward;
69
74
  private clearWaapi;
70
75
  private captureLiveState;
76
+ private startWhenReady;
77
+ private playPreparedWaapi;
71
78
  private applyStyleAt;
72
79
  }
73
80
  //# sourceMappingURL=web-animation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/web-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAiB,MAAM,QAAQ,CAAC;AACzE,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC;IAC7C,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAQD;;;;;;;;;;;;;GAaG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACzC,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,KAAK,CAAqC;IAClD,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAS;gBAEd,IAAI,EAAE,mBAAmB;IAYrC,IAAI,IAAI,IAAI;IAaZ,OAAO,IAAI,IAAI;IAQf,KAAK,IAAI,IAAI;IAUb,QAAQ,IAAI,IAAI;IAWhB;;;;;;OAMG;IACH,WAAW,IAAI,IAAI;IAInB,IAAI,WAAW,IAAI,OAAO,CAEzB;IACD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD,IAAI,UAAU,IAAI,OAAO,CAExB;IACD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,QAAQ,IAAI,MAAM,CAMrB;IAED,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAcrD,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,EAG5B;IAED,OAAO,IAAI,IAAI,EAAE;IAcjB,WAAW,IAAI,QAAQ,EAAE;IAczB,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAS9B,OAAO,CAAC,SAAS;IA6DjB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,YAAY;CAQrB"}
1
+ {"version":3,"file":"web-animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/web-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAiB,MAAM,QAAQ,CAAC;AACzE,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC;IAC7C,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAQD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACzC,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,KAAK,CAAqC;IAClD,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,iBAAiB,CAAuB;IAChD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAS;gBAEd,IAAI,EAAE,mBAAmB;IAYrC,IAAI,IAAI,IAAI;IAiBZ,OAAO,IAAI,IAAI;IAQf,KAAK,IAAI,IAAI;IAUb,QAAQ,IAAI,IAAI;IAWhB;;;;;;OAMG;IACH,WAAW,IAAI,IAAI;IAInB,IAAI,WAAW,IAAI,OAAO,CAEzB;IACD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD,IAAI,UAAU,IAAI,OAAO,CAExB;IACD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,QAAQ,IAAI,MAAM,CAMrB;IAED,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAcrD,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,EAG5B;IAED,OAAO,IAAI,IAAI,EAAE;IAcjB,WAAW,IAAI,QAAQ,EAAE;IAczB,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAS9B,OAAO,CAAC,SAAS;IA8DjB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,gBAAgB;YASV,cAAc;IAsB5B,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,YAAY;CAQrB"}
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Mt=Object.defineProperty;var Ht=(e,t,n)=>t in e?Mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var C=(e,t,n)=>Ht(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./multi-animation-uzEnQnrG.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 _t(e,t){return[{from:e.exit,to:e.enter,transition:t("enter")},{from:e.enter,to:e.exit,transition:t("exit")}]}function G(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 k{constructor(t){C(this,"omega");C(this,"zeta");C(this,"restDelta");C(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,p=o*i*i*(n-a),d=r+c+p;return{position:a+o*d,velocity:d}}isSettled(t,n){const s=Math.abs(n-t.position),o=Math.abs(t.velocity);return s<this.restDelta&&o<this.restSpeed}}class zt{constructor(t){C(this,"leader");C(this,"follower");C(this,"restDelta");C(this,"restSpeed");this.restDelta=t.restDelta??u.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??u.VELOCITY_THRESHOLD,this.leader=new k({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 k({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 Wt=.01,Rt=500,Ut=10;class Nt{constructor(t){C(this,"acceleration");C(this,"resistance");C(this,"resistanceType");C(this,"min");C(this,"max");C(this,"bounceStiffness");C(this,"bounceDamping");C(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??Rt,this.bounceDamping=t.bounceDamping??Ut,this.restDelta=t.restDelta??Wt}step(t,n,s){const o=Math.min(s,.033),{acceleration:i,resistance:l,resistanceType:a,min:r,max:c}=this,{position:p,velocity:d}=t,f=r!==void 0&&p<r,m=c!==void 0&&p>c;let y;if(f||m){const S=p-(f?r:c),x=-this.bounceStiffness*S,A=-this.bounceDamping*d;y=x+A}else{const g=n>p?1:-1;let S;a==="linear"?S=l*d:S=l*d*Math.abs(d),y=g*i-S}const h=d+y*o;let w=p+h*o;if(!f&&!m){const g=n>p?1:-1;(g>0&&w>n||g<0&&w<n)&&(w=n)}return{position:w,velocity:w===n?0:h}}isSettled(t,n){return Math.abs(n-t.position)<this.restDelta}}class b{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 Nt({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 zt({stiffness:n.stiffness,damping:n.damping,follower:o,restDelta:n.restDelta,restSpeed:n.restSpeed})}return new k({stiffness:n.stiffness,damping:n.damping,restDelta:n.restDelta,restSpeed:n.restSpeed})}static fromSpring(t){return b.from({spring:t})}}class Vt{constructor(t){C(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 J(e,t){function n(i){let l=0,a=0;const r=i.offsetWidth,c=i.offsetHeight;let p=i;for(;p;)l+=p.offsetTop,a+=p.offsetLeft,p=p.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 tt(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)?J(n,s).top:0;return{top:e[t].scroll.y,left:0,width:n.clientWidth,height:n.clientHeight-o}}const et=8,nt={spring:{stiffness:1e3,damping:40,doubleSpring:1.2,restDelta:.1,restSpeed:.1}};function Xt({direction:e}){const t=e==="forward"?et:-et;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 Bt(){return{outPhysics:nt,inPhysics:nt,composition:{mode:"parallel",startAt:[0,0]},build:Xt}}const st=30,Zt={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},qt={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function jt({direction:e}){const t=e==="forward"?1:-1,n=-st*t,s=st*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 Kt(){return{outPhysics:Zt,inPhysics:qt,composition:{mode:"sequence"},build:jt}}const Gt={snappy:Bt(),fluid:Kt()},ot=8,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=-ot*t,s=ot*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 ee(){return{outPhysics:Jt,inPhysics:Qt,composition:{mode:"sequence"},build:te}}const ne=8,se={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},oe={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function ie(e){const t=ne;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 re(){return{outPhysics:se,inPhysics:oe,composition:{mode:"sequence"},build:ie}}const it=ee(),ae={snappy:it,directional:it,"non-directional":re()},rt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},z=.1,W=1/3,at=e=>Math.max(0,Math.min(1,e));function le({direction:e}){const t=e==="forward"?1:-1,n=1-t*z;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`scale(${1+t*s*z})`,opacity:`${at(1-s/W)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${n})`,opacity:"0"},animate:s=>({transform:`scale(${n+t*s*z})`,opacity:`${at((s-W)/(1-W))}`})}}}function ce(){return{outPhysics:rt,inPhysics:rt,composition:{mode:"parallel"},build:le}}const lt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},R=.1,U=1/3,ct=e=>Math.max(0,Math.min(1,e));function pe(){return{out:{willChange:"opacity",startStyle:{},animate:e=>({opacity:`${ct(1-e/U)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${1-R})`,opacity:"0"},animate:e=>({transform:`scale(${1-R+e*R})`,opacity:`${ct((e-U)/(1-U))}`})}}}function de(){return{outPhysics:lt,inPhysics:lt,composition:{mode:"parallel"},build:pe}}const pt=ce(),fe={snappy:pt,directional:pt,"non-directional":de()},ye={x:Gt,y:ae,z:fe};function he(e,t){const n=ye[e];return n[t]??n.snappy}const ue="x",me="snappy";function dt(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 It(e){e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transform="",e.style.opacity="",e.style.clipPath=""}function ge(e){It(e),e.style.pointerEvents=""}const be=(e={})=>{const t=e.direction??"forward",n=e.type??ue,s=e.feel??me,o=he(n,s),i=o.build({direction:t});return{prepare:({from:l,to:a})=>(l.then(r=>{dt(r,i.out),r.style.pointerEvents="none"}),a.then(r=>{dt(r,i.in)}),{}),animation:({from:l,to:a,context:r})=>{if(n==="z"){const d=O(r,"from"),f=O(r,"to");l.style.clipPath=`inset(${d.top}px 0 calc(100% - ${d.top+d.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:b.from(o.outPhysics),style:d=>i.out.animate(d),onComplete:()=>ge(l)}),p=new u.WebAnimation({element:a,integrator:b.from(o.inPhysics),style:d=>i.in.animate(d),onComplete:()=>It(a)});return new u.MultiAnimation([c,p],o.composition)}}};function we(e,t,n){return e==="y"?t==="non-directional"?"non-directional":"directional":e!=="x"||t==="snappy"||n==="snappy"?"snappy":"fluid"}function Se(e){const{paths:t}=e,n=e.type??"x",s=e.variant,o=e.feel,i=we(n,s,o);return G(t,{forward:"forward",backward:"backward"},l=>be({type:n,direction:l,feel:i}))}const $e={spring:{stiffness:200,damping:22}},Ce=10,Ee="horizontal",xe="#000000";function ft(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 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-qtH1IKNG.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:1e3,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=`
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 p=document.createElement("div");if(n==="horizontal"){const d=100/t;p.style.cssText=`
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=`
11
11
  position: absolute;
12
- top: ${d*c}%;
12
+ top: ${p*c}%;
13
13
  left: 0;
14
14
  width: 100%;
15
- height: calc(${d}% + 1px);
15
+ height: calc(${p}% + 1px);
16
16
  background: ${s};
17
17
  transform: scaleX(${o==="hidden"?0:1});
18
18
  transform-origin: ${i} center;
19
19
  will-change: transform;
20
- `}else{const d=100/t;p.style.cssText=`
20
+ `}else{const p=100/t;d.style.cssText=`
21
21
  position: absolute;
22
22
  top: 0;
23
- left: ${d*c}%;
24
- width: calc(${d}% + 1px);
23
+ left: ${p*c}%;
24
+ width: calc(${p}% + 1px);
25
25
  height: 100%;
26
26
  background: ${s};
27
27
  transform: scaleY(${o==="hidden"?0:1});
28
28
  transform-origin: ${i==="left"?"top":"bottom"} center;
29
29
  will-change: transform;
30
- `}r.push(p),a.appendChild(p)}return e.appendChild(a),{container:a,blinds:r}}const Ae=(e={})=>{const t=e.blindCount??Ce,n=e.direction??Ee,s=e.blindColor??xe,o=e.physics??$e;return{prepare:async({from:i,to:l})=>{const a=await i,r=await l;a.style.zIndex="1000";const c=ft(a,t,n,s,"hidden","left");r.style.position="relative",r.style.zIndex="0";const p=ft(r,t,n,s,"closed","right");return{fromEl:a,fromBlinds:c.blinds,fromContainer:c.container,toBlinds:p.blinds,toContainer:p.container}},animation:({fromEl:i,fromBlinds:l,fromContainer:a,toBlinds:r,toContainer:c})=>{const p=l.map(y=>new u.WebAnimation({element:y,integrator:b.from(o),style:h=>({transform:n==="horizontal"?`scaleX(${h})`:`scaleY(${h})`})})),d=r.map((y,h)=>new u.WebAnimation({element:y,integrator:b.from(o),style:(w,g)=>({transform:n==="horizontal"?`scaleX(${g})`:`scaleY(${g})`}),onComplete:h===r.length-1?()=>{c.remove(),a.remove(),i.style.zIndex="",i.style.position=""}:void 0})),f=new u.MultiAnimation(p,{mode:"parallel"}),m=new u.MultiAnimation(d,{mode:"parallel"});return new u.MultiAnimation([f,m],{mode:"sequence"})}}};function Pe(e){const{paths:t,type:n="horizontal"}=e;return _(t,()=>Ae({direction:n}))}const _e={spring:{stiffness:200,damping:20,doubleSpring:.7}},T=.5;function Ie(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:`${T+(1-T)*(1-s)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${n}%, 0, 0)`,opacity:`${T}`},animate:s=>({transform:`translate3d(${n*(1-s)}%, 0, 0)`,opacity:`${T+(1-T)*s}`})}}}function De(){return{physics:_e,build:Ie}}const Oe={spring:{stiffness:170,damping:22}};function ve(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 Te(){return{physics:Oe,build:ve}}const Fe={parallax:Te(),crossfade:De()},I="0",Ye="1",D="2",ke="parallax";function yt(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 Le=(e={})=>{const t=e.direction??"enter",n=Fe[e.type??ke],s=n.physics,o=n.build(t),i=t==="enter"?I:D,l=t==="enter"?D:I;return{prepare:({from:a,to:r})=>(a.then(c=>{yt(c,o.out),c.style.pointerEvents="none",c.style.zIndex=i}),r.then(c=>{yt(c,o.in),c.style.position="relative",c.style.zIndex=l}),{}),animation:({from:a,to:r})=>{const c=new u.WebAnimation({element:a,integrator:b.from(s),style:d=>o.out.animate(d),onComplete:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transform="",a.style.opacity="",a.style.pointerEvents="",a.style.zIndex=""}}),p=new u.WebAnimation({element:r,integrator:b.from(s),style:d=>o.in.animate(d),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 d of[c,p]){const f=d.onComplete;d.onComplete=()=>{f==null||f(),d.releaseFill()}}return new u.MultiAnimation([c,p],{mode:"parallel"})}}};function Me(e){return e==="slide"||e==="crossfade"?"crossfade":"parallax"}function He(e){const{enter:t,exit:n}=e,s=e.type,o=Me(s);return _t({enter:t,exit:n},i=>Le({direction:i,type:o}))}const ze={spring:{stiffness:180,damping:20,doubleSpring:!0}},We={spring:{stiffness:170,damping:20,doubleSpring:!0}},Re=(e={})=>{const t=e.physics??We,n=e.physics??ze;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:b.from(n),style:(a,r)=>({opacity:r}),onComplete:()=>{s.style.willChange="auto",s.style.opacity=""}}),l=new u.WebAnimation({element:o,integrator:b.from(t),style:a=>({opacity:a}),onComplete:()=>{o.style.willChange="auto",o.style.opacity=""}});return new u.MultiAnimation([i,l],{mode:"sequence"})}}};function Ue(e){const{paths:t}=e;return _(t,()=>Re())}const N={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},v={scaleDown:0,translate:.2,scaleUp:.8},Ne=.8,Ve="white",ht=1e3/60,Xe=600;function Be(e){const{items:t,from:n,to:s,recordFrame:o}=e,i=ht/1e3,l=Math.abs(s-n),a=t.map(c=>({item:c,integrator:new k({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<=Xe;c++){const p=c*ht;r=p;for(const d of a)!d.started||d.settled||(d.state=d.integrator.step(d.state,s,i),d.integrator.isSettled(d.state,s)?(d.settleTime+=i,d.settleTime>=u.SETTLE_THRESHOLD&&(d.state={position:s,velocity:0},d.settled=!0)):d.settleTime=0,d.item.tick(d.state.position));for(let d=1;d<a.length;d++){const f=a[d];if(f.started)continue;const m=a[d-1];if(!m.started)continue;(l===0?1:Math.abs(m.state.position-n)/l)>=f.item.offset&&(f.started=!0)}if(o(p),a.every(d=>d.settled))return p}return r}function V(e,t){return e!=null&&e.spring?{stiffness:e.spring.stiffness,damping:e.spring.damping}:t}function ut(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=V(o,N.scaleDown),a=V(o,N.translate),r=V(o,N.scaleUp),c=s==="out"?1:0,p=s==="out"?0:1,d=s==="out"?[{spring:l,offset:v.scaleDown,tick:y=>{const h=1-y;i.scale=1-(1-n)*h}},{spring:a,offset:v.translate,tick:y=>{const h=1-y;i.translateY=-t.top-t.height*h}},{spring:r,offset:v.scaleUp,tick:y=>{const h=1-y;i.scale=n+(1-n)*h}}]:[{spring:l,offset:v.scaleDown,tick:y=>{i.scale=1-(1-n)*y}},{spring:a,offset:v.translate,tick:y=>{i.translateY=-t.top+t.height*(1-y)}},{spring:r,offset:v.scaleUp,tick:y=>{i.scale=n+(1-n)*y}}],f=[],m=Be({items:d,from:c,to:p,recordFrame:y=>f.push({time:y,scale:i.scale,translateY:i.translateY})});return{snapshots:f,totalDuration:m}}function Ze(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 qe=[[1,1],[-1,1],[1,-1],[-1,-1]];function je(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 p=document.createElement("div");return Object.assign(p.style,{position:"absolute",width:"1px",height:"15px",backgroundColor:e,[a]:"0",[l]:"0"}),r.appendChild(c),r.appendChild(p),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 mt(e,t){const n=t.left+t.width/2,s=t.top+t.height/2;e.style.transformOrigin=`${n}px ${s}px`}function gt(e,t){e.style.clipPath=`polygon(
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:170,damping:22}};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(
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 X(e,t,n,s,o){const i=n/1e3;return new u.WebAnimation({element:e,integrator:new Vt({durationSec:i}),lowerBound:0,upperBound:1,style:l=>s(Ze(t,l)),onComplete:o})}const Ke=(e={})=>{var o;const t=((o=e.border)==null?void 0:o.color)??Ve,n=Ne,s=e.physics;return{prepare:({from:i,to:l,context:a})=>{const r=O(a,"from"),c=O(a,"to"),p=J(document.body,a.positionedParent),d=je(t,{...r,top:p.top});for(const f of["topLeft","topRight","bottomLeft","bottomRight"])a.positionedParent.appendChild(d[f]);return i.then(f=>{mt(f,r),gt(f,r),f.style.transform=`translateY(${-r.top}px)`}),l.then(f=>{mt(f,c),gt(f,c),f.style.transform=`translateY(${-c.top+c.height}px) scale(${n})`}),{borders:d,fromRect:r,toRect:c}},animation:({from:i,to:l,context:a,borders:r,fromRect:c,toRect:p})=>{const d=ut({rect:c,scale:n,direction:"out",override:s}),f=ut({rect:p,scale:n,direction:"in",override:s}),m=X(i,d.snapshots,d.totalDuration,S=>({transform:`translateY(${S.translateY}px) scale(${S.scale})`}),()=>{i.style.clipPath="",i.style.transformOrigin="",i.style.transform=""}),y=X(l,f.snapshots,f.totalDuration,S=>({transform:`translateY(${S.translateY}px) scale(${S.scale})`}),()=>{l.style.clipPath="",l.style.transformOrigin="",l.style.transform=""}),h=qe.map(([S,x],A)=>{const P=["topLeft","topRight","bottomLeft","bottomRight"][A];return X(r[P],d.snapshots,d.totalDuration,$=>{const E=(c.width-c.width*$.scale)/2*.7*S,H=(c.height-c.height*$.scale)/2*.7*x;return{transform:`translate(${E}px, ${H}px)`}})}),w=new u.MultiAnimation([m,y,...h],{mode:"parallel"}),g=w.onComplete;return w.onComplete=()=>{g==null||g();const S=a.positionedParent;for(const x of["topLeft","topRight","bottomLeft","bottomRight"]){const A=r[x];A.parentElement===S&&S.removeChild(A)}},w}}};function Ge(e){const{paths:t,options:n}=e,s=(n==null?void 0:n.borderColor)!==void 0?{border:{color:n.borderColor}}:void 0;return _(t,()=>Ke(s))}const bt="data-hero-enter-key",wt="data-hero-exit-key",B="data-hero-key";class Je{constructor(){C(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 Qe=()=>new Je;class tn{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:b.from(o),style:(p,d)=>({opacity:d})}),new u.WebAnimation({element:s,integrator:b.from(o),style:p=>({opacity:p})})]}}const en=()=>new tn,nn={static:Qe,fade:en},sn={spring:{stiffness:320,damping:30}},on=()=>sn,rn={spring:{stiffness:300,damping:30,doubleSpring:1}},an=()=>rn,ln={default:on,smooth:an},cn=700,pn="data-hero-aspect-ratio",dn="data-hero-radius";function fn(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 St(e){const t=e.getAttribute(dn);if(!t)return 0;const n=parseFloat(t);return Number.isFinite(n)&&n>0?n:0}function L(e){return e.left+e.width/2}function M(e){return e.top+e.height/2}function yn(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 hn(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 $t(e,t,n){const s=J(e,t),o=fn(t.getAttribute(pn));if(o===null)return{bbox:s,content:s,window:s,clipInset:{top:0,right:0,bottom:0,left:0}};const i=hn(s,o,n),l=n==="cover"?s:i;return{bbox:s,content:i,window:l,clipInset:yn(i,l)}}function un(e,t,n,s){const o=n.width/s,i=n.height/s,l=e.width/2+(L(n)-L(t))/s-o/2,a=e.height/2+(M(n)-M(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 F(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 mn(e,t){const n=[],s=F(t,bt),o=F(e,wt);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=F(e,bt),l=F(t,wt);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 gn(e,t){const n=[],s=Array.from(t.querySelectorAll(`[${B}]`));for(const o of s){const i=o.getAttribute(B);if(!i)continue;const l=e.querySelector(`[${B}="${i}"]`);l&&n.push({key:i,fromEl:l,toEl:o,fromFit:"contain",toFit:"contain"})}return n}function bn(e,t){const n=mn(e,t);return n.length>0?n:gn(e,t)}function wn(e,t,n){const{fromEl:s,toEl:o}=t,i=$t(e,s,t.fromFit),l=$t(e,o,t.toFit),a=i.content,r=i.window,c=l.content,p=l.window,d=l.clipInset,f=St(s),m=St(o);if(a.width===0||a.height===0||r.width===0||r.height===0||c.width===0||c.height===0||p.width===0||p.height===0)return null;const y=Math.max(a.width/c.width,a.height/c.height),h=L(a),w=M(a),g=L(c),S=M(c),x=h-g,A=w-S;if(Math.abs(A)>n)return null;const P=un(c,a,r,y);return{toContent:c,hasRadius:f>0||m>0,styleFor:($,E)=>{const H=E*x,vt=E*A,Q=$+E*y,Tt=(f*E+m*$)/Q,Ft=P.top*E+d.top*$,Yt=P.right*E+d.right*$,kt=P.bottom*E+d.bottom*$,Lt=P.left*E+d.left*$;return{transform:`translate(${H}px, ${vt}px) scale(${Q})`,clipPath:`inset(${Ft}px ${Yt}px ${kt}px ${Lt}px round ${Tt}px)`}}}}function Sn(e,t){e.style.transform=t.transform,e.style.clipPath=t.clipPath}class $n{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:p}=r,d=wn(o,r,i);if(!d)continue;const f=p.cloneNode(!0);f.style.position="absolute",f.style.left=`${d.toContent.left}px`,f.style.top=`${d.toContent.top}px`,f.style.width=`${d.toContent.width}px`,f.style.height=`${d.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",d.hasRadius&&(f.style.borderRadius="0"),Sn(f,d.styleFor(0,1)),o.appendChild(f);const m=c.style.opacity,y=p.style.opacity;c.style.opacity="0",p.style.opacity="0",l(()=>{c.style.opacity=m,p.style.opacity=y,f.parentElement&&f.parentElement.removeChild(f)}),a.push(new u.WebAnimation({element:f,integrator:b.from(s),style:d.styleFor}))}return a}}function Cn(e){return[new $n,nn[e.type]()]}const En=e=>{const t=Cn(e),n=ln[e.variant](),s=cn;return{prepare:o=>{var a;const i=Promise.all([o.from,o.to]).then(([r,c])=>({pairs:bn(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)},p={from:o,to:i,resolved:a,physics:n,positionedParent:l.positionedParent,maxDistance:s,onComplete:c},d=[];for(const y of t)y.contribute&&d.push(...y.contribute(p));if(d.length===0)return new u.MultiAnimation([],{mode:"parallel"});const f=new u.MultiAnimation(d,{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 xn(e){const{paths:t}=e,n=e.type??"static",s=e.variant??"default";return _(t,()=>En({type:n,variant:s}))}const An={spring:{stiffness:50,damping:30}},Pn={spring:{stiffness:80,damping:25}},_n=(e={})=>{const t=e.physics??An,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"),p=Math.min(c.width,c.height)*.4;r.style.setProperty("--max-border-radius",`${p}px`),r.style.setProperty("--border-radius-scale","1"),r.style.willChange="transform",r.style.backfaceVisibility="hidden";const d=c.left+c.width/2,f=c.top+c.height/2;r.style.transformOrigin=`${d}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:b.from(Pn),style:(c,p)=>({opacity:p}),onComplete:()=>{i.style.opacity=""}}),r=new u.WebAnimation({element:l,integrator:b.from(t),style:c=>{let p;if(c<=.05)p=s;else if(c<=o){const y=(c-.05)/(o-.05),h=Math.pow(y,9);p=s+(.8-s)*h}else{const y=(c-o)/(1-o);p=.8+.2*(1-Math.pow(1-y,3))}const d=.7;let f;if(c<=d)f=n;else{const y=(c-d)/(1-d),h=1-Math.pow(1-y,2);f=n*(1-h)}let m;if(c<=d)m=1;else{const y=(c-d)/(1-d);m=1-Math.pow(y,.5)}return{transform:`rotate(${f.toFixed(2)}deg) scale(${p.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 In(e){const{paths:t}=e;return _(t,()=>_n())}const Dn={spring:{stiffness:100,damping:30}},On=(e={})=>{const t=e.physics??Dn;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:b.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:b.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 vn(e){const{paths:t}=e;return _(t,()=>On())}const Tn={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},Ct=(e={})=>{const t=e.direction??"up",n=e.physics??Tn,s=t==="up",o=s?I:D,i=s?D: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,p=window.innerHeight,d=Math.max(Math.min(r,c),p),f=new u.WebAnimation({element:l,integrator:b.from(n),style:y=>({transform:`translate3d(0, ${s?-d*y:d*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:b.from(n),style:(y,h)=>({transform:`translate3d(0, ${s?h*d:h*-d}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 Fn(e){const{paths:t,type:n="directional"}=e;return n==="non-directional"?_(t,()=>Ct({direction:"up"})):G(t,{forward:"up",backward:"down"},s=>Ct({direction:s}))}const Yn={spring:{stiffness:200,damping:24}},kn={inertia:{acceleration:25,resistance:1.2}},Z=.2;function Ln(){return{enterPhysics:Yn,exitPhysics:kn,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-Z*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-Z+Z*e})`,opacity:e})}}}const Mn={spring:{stiffness:300,damping:30}},Hn={inertia:{acceleration:30,resistance:1}};function zn(){return{enterPhysics:Mn,exitPhysics:Hn,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const Wn={static:zn(),"background-scale":Ln()},Rn="static",Un="transform",Nn=(e={})=>{const t=e.direction??"enter",n=Wn[e.type??Rn],s=t==="enter"?n.enterPhysics:n.exitPhysics,o=n.background,i=o.willChange!=="";return{prepare:({from:l,to:a})=>{const r=t==="enter"?a:l,c=t==="enter"?l:a;return r.then(p=>{p.style.willChange=Un,p.style.backfaceVisibility="hidden",p.style.contain="layout paint",p.style.zIndex=D,t==="enter"?p.style.position="relative":p.style.pointerEvents="none"}),c.then(p=>{i&&(p.style.willChange=o.willChange,p.style.backfaceVisibility="hidden",p.style.contain="layout paint"),p.style.zIndex=I,t==="enter"?p.style.pointerEvents="none":p.style.position="relative"}),{}},animation:({from:l,to:a,context:r})=>{const c=t==="enter"?a:l,p=t==="enter"?l:a,d=O(r,t==="enter"?"to":"from"),f=()=>{l.style.pointerEvents="",l.style.zIndex=""},m=()=>{const $=t==="enter"?D:I;a.style.position==="relative"&&(a.style.position=""),a.style.zIndex===$&&(a.style.zIndex="")},y=$=>{const E=$.onComplete;$.onComplete=()=>{E==null||E(),$.releaseFill()}};c.style.clipPath=`inset(${d.top}px 0 calc(100% - ${d.top+d.height}px) 0)`;const h=t==="enter"?($,E)=>({transform:`translate3d(0, ${E*d.height}px, 0)`}):$=>({transform:`translate3d(0, ${$*d.height}px, 0)`}),w=new u.WebAnimation({element:c,integrator:b.from(s),style:h,onComplete:()=>{c.style.willChange="auto",c.style.backfaceVisibility="",c.style.contain="",c.style.clipPath="",c.style.transform="",f(),m()}});if(y(w),!i)return new u.MultiAnimation([w],{mode:"parallel"});const g=O(r,t==="enter"?"from":"to"),S=g.left+g.width/2,x=g.top+g.height/2;p.style.clipPath=`inset(${g.top}px 0 calc(100% - ${g.top+g.height}px) 0)`,p.style.transformOrigin=`${S}px ${x}px`;const A=t==="enter"?($,E)=>o.enterStyle($,E):$=>o.exitStyle($),P=new u.WebAnimation({element:p,integrator:b.from(s),style:A,onComplete:()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.contain="",p.style.clipPath="",p.style.transformOrigin="",p.style.transform="",p.style.opacity=""}});return y(P),new u.MultiAnimation([w,P],{mode:"parallel"})}}};function Vn(e){return e==="scale"||e==="background-scale"?"background-scale":"static"}function Xn(e){const{enter:t,exit:n}=e,s=e.type,o=Vn(s);return _t({enter:t,exit:n},i=>Nn({direction:i,type:o}))}const Bn={spring:{stiffness:170,damping:22,doubleSpring:.8}},Zn=(e={})=>{const t=e.direction??"left",n=e.physics??Bn,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:b.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:b.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 qn(e){const{paths:t}=e;return G(t,{forward:"left",backward:"right"},n=>Zn({direction:n}))}const jn={spring:{stiffness:17,damping:6}},q=20,Y=800,Kn=(e={})=>{const t=e.physics??jn;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(${Y}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(${Y}px) rotateY(${q}deg) translate3d(-100%, 0, 0)`}),{}),animation:({from:n,to:s})=>{const o=new u.WebAnimation({element:n,integrator:b.from(t),style:l=>{const a=-l*q,r=l*100;return{transform:`perspective(${Y}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:b.from(t),style:(l,a)=>{const r=a*q,c=-a*100;return{transform:`perspective(${Y}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 Gn(e){const{paths:t}=e;return _(t,()=>Kn())}function Jn({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,p=e.top/n.height*100,d=(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,w=1+(r-1)*h,g=1+(c-1)*h,x=(i*h+o*(1-h))/((w+g)/2);return{clipPath:`inset(${p*h}% ${d*h}% ${f*h}% ${m*h}% round ${x}px)`,transform:`translate(${l*h}px, ${a*h}px) scale(${w}, ${g})`}}}}function Qn({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,p=e.top/n.height*100,d=(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,w=1+(r-1)*h,g=1+(c-1)*h,x=(o*(1-h)+i*h)/((w+g)/2);return{clipPath:`inset(${p*h}% ${d*h}% ${f*h}% ${m*h}% round ${x}px)`,transform:`translate(${l*h-s.x}px, ${a*h}px) scale(${w}, ${g})`}}}}const ts={spring:{stiffness:430,damping:33,doubleSpring:1}},Dt=.12,es=18;function ns(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Dt*t})`}}}}function ss(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Dt*t})`}}}}const j={willChange:"backdrop-filter",initialStyle:{position:"absolute",inset:"0",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,s=`blur(${es*n}px)`;return{backdropFilter:s,WebkitBackdropFilter:s}}};class os{constructor(){C(this,"physics",ts)}contribute(t){const{from:n,to:s,resolved:o,physics:i}=t,l=o.mode==="enter",a=l?n:s,r=l?ns():ss();return r&&(a.style.transformOrigin=r.transformOrigin),[new u.WebAnimation({element:a,integrator:b.from(i),style:l?(c,p)=>r.animate(p):c=>r.animate(c)})]}}class is{prepare(t){const n=t.createElement("zoom-overlay");return Object.assign(n.style,j.initialStyle),n.style.willChange=j.willChange,t.context.positionedParent.appendChild(n),{overlay:n}}contribute(t){const n=t.extras.overlay;return n?(n.style.zIndex=Ye,[new u.WebAnimation({element:n,integrator:b.from(t.physics),style:s=>j.style(t.resolved.mode,s)})]):[]}}const rs={spring:{stiffness:430,damping:33,doubleSpring:1}};function as({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 ls({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 cs{constructor(){C(this,"physics",rs)}contribute(t){const{from:n,to:s,resolved:o,input:i,physics:l}=t,a=o.mode==="enter",r=a?n:s,c=a?as(i):ls(i);return c&&(r.style.transformOrigin=c.transformOrigin),[new u.WebAnimation({element:r,integrator:b.from(l),style:a?(p,d)=>c.animate(d):p=>c.animate(p)})]}}const ps={spring:{stiffness:530,damping:34,doubleSpring:1}};class ds{constructor(){C(this,"physics",ps)}contribute(t){return[]}}const fs={expand:()=>new cs,static:()=>new ds,blur:()=>new os};function ys(e){return fs[e]()}const K="data-zoom-enter-key",Et="data-zoom-exit-key",hs="data-zoom-radius";function xt(e){const t=e.getAttribute(hs);if(!t)return 0;const n=parseFloat(t);return Number.isFinite(n)&&n>0?n:0}function us(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 At(e){const t=e.querySelectorAll(`[${K}]`);return t.length!==1?null:t[0]}function Pt(e,t){const n=e.querySelectorAll(`[${Et}]`);for(const s of n)if(s.getAttribute(Et)===t)return s;return null}function ms(e,t){const n=At(e),s=At(t);if(!n&&s){const o=s.getAttribute(K);if(!o)return null;const i=Pt(e,o);return i?{mode:"enter",enterEl:s,exitEl:i}:null}if(n&&!s){const o=n.getAttribute(K);if(!o)return null;const i=Pt(t,o);return i?{mode:"exit",enterEl:n,exitEl:i}:null}return null}function gs(e,t,n,s){return{enterRect:tt(e.mode==="enter"?n:t,e.enterEl),exitRect:tt(e.mode==="enter"?t:n,e.exitEl),pageRect:e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),scrollOffset:s,enterRadius:xt(e.enterEl),exitRadius:xt(e.exitEl)}}class bs{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?Jn(i):Qn(i),p=r?s:n,d=r?"t":"u";c&&(p.style.transformOrigin=c.transformOrigin);const f=r?I:D,m=r?D:I,y=n.style.zIndex;n.style.zIndex=f;const h=s.style.zIndex,w=s.style.position;return s.style.zIndex=m,s.style.position="relative",a(()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.transformOrigin="",p.style.contain="",n.style.zIndex=y,s.style.zIndex===m&&(s.style.zIndex=h),s.style.position==="relative"&&(s.style.position=w),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:p,integrator:b.from(l),style:d==="t"?g=>c.animate(g):(g,S)=>c.animate(S)})]}}class ws{contribute(t){const{resolved:n,physics:s,from:o,to:i,onComplete:l}=t,a=n.mode==="enter"?i:o,r=us(a,n.enterEl);if(r.length===0)return[];const c=r.map(p=>p.style.opacity);if(n.mode==="enter")for(const p of r)p.style.opacity="0";return l(()=>{for(let p=0;p<r.length;p++){const d=r[p];d&&(d.style.opacity=c[p]??"")}}),r.map(p=>new u.WebAnimation({element:p,integrator:b.from(s),style:(d,f)=>({opacity:n.mode==="enter"?d:f})}))}}class Ot{contribute(){return[]}}const Ss={default:()=>new Ot,fade:()=>new ws};function $s(e){return Ss[e]()}class Cs extends Ot{}function Es(e){const t=ys(e.type);return{strategies:[new bs,t,$s(e.variant),new Cs,...e.type==="blur"?[new is]:[]],physics:t.physics}}const xs=e=>{const{strategies:t,physics:n}=Es(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=ms(s,o);if(!a)return new u.MultiAnimation([],{mode:"parallel"});const r=gs(a,s,o,i.scrollOffset),c=[],d={from:s,to:o,resolved:a,input:r,physics:n,extras:l,onComplete:y=>{c.push(y)}},f=[];for(const y of t)y.contribute&&f.push(...y.contribute(d));const m=f[0];if(m){const y=m.onComplete;m.onComplete=()=>{y==null||y();for(const h of c)try{h()}catch(w){console.error("[zoom] cleanup error",w)}}}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 As(e){const t=e.type??"static",n=e.variant??(e.fade?"fade":"default");return{type:t,variant:n}}function Ps(e){const t=As(e);return _(e.paths,()=>xs(t))}exports.Animation=u.Animation;exports.MultiAnimation=u.MultiAnimation;exports.WebAnimation=u.WebAnimation;exports.axis=Se;exports.blind=Pe;exports.drill=He;exports.fade=Ue;exports.film=Ge;exports.hero=xn;exports.jaemin=In;exports.rotate=vn;exports.scroll=Fn;exports.sheet=Xn;exports.slide=qn;exports.strip=Gn;exports.zoom=Ps;
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:300,damping:30}},Zn={inertia:{acceleration:30,resistance:1}};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:430,damping:33,doubleSpring:1}},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;