@ssgoi/core 5.1.0 → 5.2.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/dist/types.js CHANGED
@@ -1,43 +1,46 @@
1
- function p(t) {
2
- return ("tick" in t || "css" in t) && !("items" in t);
1
+ function h(e) {
2
+ return ("tick" in e || "css" in e) && !("items" in e);
3
3
  }
4
- function u(t) {
5
- return "items" in t;
4
+ function d(e) {
5
+ return "items" in e;
6
6
  }
7
- function f(t) {
8
- return "css" in t && typeof t.css == "function";
7
+ function k(e) {
8
+ return "css" in e && typeof e.css == "function";
9
9
  }
10
- function y(t) {
11
- return "tick" in t && typeof t.tick == "function";
10
+ function w(e) {
11
+ return "tick" in e && typeof e.tick == "function";
12
12
  }
13
- async function h(t) {
14
- const e = await t;
15
- return u(e) ? {
16
- prepare: e.prepare,
17
- wait: e.wait,
18
- onReady: e.onReady,
19
- onStart: e.onStart,
20
- onEnd: e.onEnd,
21
- items: e.items,
22
- schedule: e.schedule
13
+ function f(e) {
14
+ return "keyframes" in e && e.keyframes !== void 0 && e.keyframes !== null;
15
+ }
16
+ async function A(e) {
17
+ const t = await e;
18
+ return d(t) ? {
19
+ prepare: t.prepare,
20
+ wait: t.wait,
21
+ onReady: t.onReady,
22
+ onStart: t.onStart,
23
+ onEnd: t.onEnd,
24
+ items: t.items,
25
+ schedule: t.schedule
23
26
  } : {
24
- prepare: e.prepare,
25
- wait: e.wait,
26
- onReady: e.onReady,
27
- onStart: e.onStart,
28
- onEnd: e.onEnd,
27
+ prepare: t.prepare,
28
+ wait: t.wait,
29
+ onReady: t.onReady,
30
+ onStart: t.onStart,
31
+ onEnd: t.onEnd,
29
32
  items: [
30
33
  {
31
- physics: e.physics,
32
- tick: e.tick,
33
- css: e.css
34
+ physics: t.physics,
35
+ tick: t.tick,
36
+ css: t.css
34
37
  }
35
38
  ],
36
39
  schedule: "parallel"
37
40
  };
38
41
  }
39
- function k(t, e) {
40
- const a = t.schedule ?? "parallel", r = t.items.map(
42
+ function S(e, t) {
43
+ const a = e.schedule ?? "parallel", r = e.items.map(
41
44
  (i) => {
42
45
  let n;
43
46
  switch (a) {
@@ -53,20 +56,25 @@ function k(t, e) {
53
56
  default:
54
57
  n = 0;
55
58
  }
56
- const { css: s, offset: m, ...c } = i, l = s ? typeof s == "function" ? e ? { element: e, style: s } : void 0 : { element: s.element, style: s.style } : void 0;
59
+ if (f(i)) {
60
+ const { offset: y, ...u } = i;
61
+ return { ...u, normalizedOffset: n };
62
+ }
63
+ const { css: s, offset: p, ...c } = i, l = s ? typeof s == "function" ? t ? { element: t, style: s } : void 0 : { element: s.element, style: s.style } : void 0;
57
64
  return { ...c, css: l, normalizedOffset: n };
58
65
  }
59
- ), { schedule: d, ...o } = t;
66
+ ), { schedule: m, ...o } = e;
60
67
  return {
61
68
  ...o,
62
69
  items: r
63
70
  };
64
71
  }
65
72
  export {
66
- f as isCssAnimation,
67
- u as isMultiAnimation,
68
- p as isSingleAnimation,
69
- y as isTickAnimation,
70
- k as normalizeSchedule,
71
- h as normalizeToMultiAnimation
73
+ k as isCssAnimation,
74
+ f as isKeyframesAnimation,
75
+ d as isMultiAnimation,
76
+ h as isSingleAnimation,
77
+ w as isTickAnimation,
78
+ S as normalizeSchedule,
79
+ A as normalizeToMultiAnimation
72
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"film.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/film.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AAsBlB,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,IAAI,GAAI,UAAU,WAAW,KAAG,eA+J5C,CAAC"}
1
+ {"version":3,"file":"film.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/film.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AA4BlB,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AA8QD,eAAO,MAAM,IAAI,GAAI,UAAU,WAAW,KAAG,eAmH5C,CAAC"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=(t,n)=>{var r;t.style.position="absolute",t.style.width="100%",t.style.top=`${-1*(((r=n==null?void 0:n.scrollOffset)==null?void 0:r.y)??0)}px`,t.style.left="0"},_=t=>new Promise(n=>setTimeout(n,t));function x(t,n){function r(i){let e=0,a=0;const l=i.offsetWidth,y=i.offsetHeight;let o=i;for(;o;)e+=o.offsetTop,a+=o.offsetLeft,o=o.offsetParent;return e-=window.scrollY,a-=window.scrollX,{top:e,left:a,width:l,height:y}}const c=r(t),s=r(n);return new DOMRect(s.left-c.left,s.top-c.top,s.width,s.height)}function E(){let t,n;return{promise:new Promise((c,s)=>{t=c,n=s}),resolve:t,reject:n}}const H={spring:{stiffness:200,damping:22}},X={spring:{stiffness:200,damping:22}},z=300,M=10,W="horizontal",B="#000000",q=(t={})=>{const{transitionDelay:n=z,blindCount:r=M,direction:c=W,blindColor:s=B}=t,i=t.physics??X,e=t.physics??H;let a,l=null;const y=(o,h,d="left")=>{window.getComputedStyle(o).position==="static"&&(o.style.position="relative");const f=document.createElement("div");f.className="blind-container",f.style.cssText=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../spring-integrator-95Mh7mdw.cjs"),$=(t,e)=>{var o;t.style.position="absolute",t.style.width="100%",t.style.top=`${-1*(((o=e==null?void 0:e.scrollOffset)==null?void 0:o.y)??0)}px`,t.style.left="0"},U=t=>new Promise(e=>setTimeout(e,t));function x(t,e){function o(n){let a=0,i=0;const c=n.offsetWidth,p=n.offsetHeight;let r=n;for(;r;)a+=r.offsetTop,i+=r.offsetLeft,r=r.offsetParent;return a-=window.scrollY,i-=window.scrollX,{top:a,left:i,width:c,height:p}}const l=o(t),s=o(e);return new DOMRect(s.left-l.left,s.top-l.top,s.width,s.height)}function E(){let t,e;return{promise:new Promise((l,s)=>{t=l,e=s}),resolve:t,reject:e}}const B={spring:{stiffness:200,damping:22}},q={spring:{stiffness:200,damping:22}},j=300,N=10,G="horizontal",Z="#000000",K=(t={})=>{const{transitionDelay:e=j,blindCount:o=N,direction:l=G,blindColor:s=Z}=t,n=t.physics??q,a=t.physics??B;let i,c=null;const p=(r,y,f="left")=>{window.getComputedStyle(r).position==="static"&&(r.style.position="relative");const d=document.createElement("div");d.className="blind-container",d.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 p=[];for(let $=0;$<r;$++){const w=document.createElement("div");if(c==="horizontal"){const b=100/r,C=`calc(${b}% + 1px)`;w.style.cssText=`
10
+ `;const h=[];for(let g=0;g<o;g++){const w=document.createElement("div");if(l==="horizontal"){const b=100/o,C=`calc(${b}% + 1px)`;w.style.cssText=`
11
11
  position: absolute;
12
- top: ${b*$}%;
12
+ top: ${b*g}%;
13
13
  left: 0;
14
14
  width: 100%;
15
15
  height: ${C};
16
16
  background: ${s};
17
- transform: scaleX(${h==="hidden"?0:1});
18
- transform-origin: ${d} center;
17
+ transform: scaleX(${y==="hidden"?0:1});
18
+ transform-origin: ${f} center;
19
19
  will-change: transform;
20
- `}else{const b=100/r,C=`calc(${b}% + 1px)`;w.style.cssText=`
20
+ `}else{const b=100/o,C=`calc(${b}% + 1px)`;w.style.cssText=`
21
21
  position: absolute;
22
22
  top: 0;
23
- left: ${b*$}%;
23
+ left: ${b*g}%;
24
24
  width: ${C};
25
25
  height: 100%;
26
26
  background: ${s};
27
- transform: scaleY(${h==="hidden"?0:1});
28
- transform-origin: ${d==="left"?"top":"bottom"} center;
27
+ transform: scaleY(${y==="hidden"?0:1});
28
+ transform-origin: ${f==="left"?"top":"bottom"} center;
29
29
  will-change: transform;
30
- `}p.push(w),f.appendChild(w)}return o.appendChild(f),{container:f,blinds:p}};return{out:o=>{let h=null;a=new Promise(f=>{l=f});const d=f=>{const p=1-f;return{transform:c==="horizontal"?`scaleX(${p})`:`scaleY(${p})`}};return{items:Array.from({length:r},(f,p)=>({physics:e,offset:.2,css:{get element(){return h==null?void 0:h.blinds[p]},style:d}})),schedule:"stagger",prepare:()=>{g(o),o.style.zIndex="1000",h=y(o,"hidden","left")},onStart:()=>{},onEnd:()=>{l&&l()}}},in:o=>{let h=null;const d=f=>{const p=1-f;return{transform:c==="horizontal"?`scaleX(${p})`:`scaleY(${p})`}};return{items:Array.from({length:r},(f,p)=>({physics:i,offset:.2,css:{get element(){return h==null?void 0:h.blinds[p]},style:d}})),schedule:"stagger",prepare:()=>{o.style.position="relative",o.style.zIndex="0",h=y(o,"closed","right")},onStart:()=>{},wait:async()=>{a&&await a,await _(n)},onEnd:()=>{h&&h.container&&h.container.remove()}}}}},j={spring:{stiffness:1,damping:1}},N={spring:{stiffness:20,damping:25}},G="#000000",Z="circle",k="CURTAIN_REVEAL_OVERLAY_ID",J={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},K={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},Q={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},R={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},tt=.4,S=.5,st=.2;function it(t,n){switch(t){case"circle":return`circle(${n*100}% at 50% 50%)`;case"square":return`inset(${(1-n)*50}% round ${10*n}%)`;case"triangle":{const r=n*100;return`polygon(50% ${50-r}%, ${50-r}% ${50+r}%, ${50+r}% ${50+r}%)`}}}const nt=t=>t.reduce((n,r)=>n+r,0),et=(t={})=>{const{background:n=G,texts:r=[],shape:c=Z,textStyle:s={}}=t,i=t.physics??N,e=t.physics??j;return{out:(a,l)=>{const y=a.style.opacity;return{physics:e,from:1,to:0,prepare:()=>{g(a,l),a.style.opacity="1"},tick:o=>{const h=Math.max(0,o-tt);a.style.opacity=String(h)},onEnd:()=>{a.style.opacity=y}}},in:a=>{let l=null,y=null,o=null;const h=document.body.style.overflow,d=document.getElementById(k);let u=[];const f=()=>{l=document.createElement("div"),l.id=k,Object.assign(l.style,J,{background:n}),document.body.appendChild(l),y=document.createElement("div"),Object.assign(y.style,K),l.appendChild(y),o=document.createElement("div"),Object.assign(o.style,Q),y.appendChild(o),r.forEach(p=>{const $=document.createElement("div");$.textContent=p,Object.assign($.style,R,s),o.appendChild($)}),u=Array.from(o.children).map(p=>p.getBoundingClientRect().width)};return{physics:i,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",a.style.opacity="1",d==null||d.remove(),f(),l&&y&&(l.style.clipPath="none",y.style.transform="scale(1)")},tick:p=>{if(!(!l||!y||!o)){if(p<=S&&r.length>0){const $=p/S,w=Math.min(Math.floor($*r.length),r.length-1),b=u[w]??0,C=nt(u.slice(0,w));y.style.width=`${b}px`,o.style.transform=`translateX(-${C}px)`}if(p>S){const w=1-Math.max(0,Math.min(1,(p-S)/st));l.style.clipPath=it(c,w),y.style.transform=`scale(${w})`}}},onEnd:()=>{l==null||l.remove(),l=y=o=null,document.body.style.overflow=h}}}}},at={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:1e14}},rt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:1e14}},ot=.05;function A(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=window.innerHeight-n.top;return{top:r,left:0,width:n.width,height:c}}const lt=(t={})=>{const{direction:n="enter"}=t,r=t.physics??(n==="enter"?at:rt),c=t.scaleOffset??ot;let{promise:s,resolve:i}=E();return n==="enter"?{in:(e,a)=>{const l=A(a),y=l.left+l.width/2,o=l.top+l.height/2;return{physics:r,prepare:()=>{e.style.opacity="0",e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.transformOrigin=`${y}px ${o}px`},wait:async()=>{if(s){await s;const h=E();s=h.promise,i=h.resolve}},css:h=>({transform:`scale(${1-c+h*c})`,opacity:h}),onEnd:()=>{e.style.opacity="1",e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transformOrigin=""}}},out:(e,a)=>{const l=A(a),y=l.left+l.width/2,o=l.top+l.height/2+a.scrollOffset.y;return{physics:r,prepare:()=>{g(e,a),e.style.zIndex="-1",e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.pointerEvents="none",e.style.transformOrigin=`${y}px ${o}px`},css:h=>({transform:`scale(${1+(1-h)*c})`,opacity:h}),onEnd:()=>{i&&i()}}}}:{in:(e,a)=>{const l=A(a),y=l.left+l.width/2,o=l.top+l.height/2;return{physics:r,prepare:()=>{e.style.opacity="0",e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.transformOrigin=`${y}px ${o}px`},wait:async()=>{if(s){await s;const h=E();s=h.promise,i=h.resolve}},css:h=>({transform:`scale(${1+c-h*c})`,opacity:h}),onEnd:()=>{e.style.opacity="1",e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transformOrigin=""}}},out:(e,a)=>{const l=A(a),y=l.left+l.width/2,o=l.top+l.height/2+a.scrollOffset.y;return{physics:r,prepare:()=>{g(e,a),e.style.zIndex="100",e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.pointerEvents="none",e.style.transformOrigin=`${y}px ${o}px`},css:h=>({transform:`scale(${1-(1-h)*c})`,opacity:h}),onEnd:()=>{i&&i()}}}}},ct={spring:{stiffness:170,damping:22}},yt={spring:{stiffness:170,damping:22}},ht=(t={})=>{const{opacity:n=!1,direction:r="enter"}=t,c=t.physics??(r==="enter"?ct:yt);return r==="enter"?{in:s=>({physics:c,prepare:()=>{s.style.willChange=n?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:i=>{const e={transform:`translate3d(${(1-i)*100}%, 0, 0)`};return n&&(e.opacity=i),e},onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>({physics:c,prepare:()=>{g(s,i),s.style.zIndex="-1",s.style.willChange=n?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"},css:e=>{const a={transform:`translate3d(${-(1-e)*20}%, 0, 0)`};return n&&(a.opacity=e),a}})}:{in:s=>({physics:c,prepare:()=>{s.style.willChange=n?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:i=>{const e={transform:`translate3d(${-(1-i)*20}%, 0, 0)`};return n&&(e.opacity=i),e},onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>({physics:c,prepare:()=>{g(s,i),s.style.zIndex="100",s.style.willChange=n?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"},css:e=>{const a={transform:`translate3d(${(1-e)*100}%, 0, 0)`};return n&&(a.opacity=e),a}})}},pt={spring:{stiffness:180,damping:20,doubleSpring:!0}},dt={spring:{stiffness:170,damping:20,doubleSpring:!0}},ut=0,ft=(t={})=>{const{transitionDelay:n=ut}=t,r=t.physics??dt,c=t.physics??pt;let{promise:s,resolve:i}=E();return{in:e=>({physics:r,prepare:()=>{e.style.opacity="0",e.style.willChange="opacity"},wait:async()=>{if(s){await s;const a=E();s=a.promise,i=a.resolve,await _(n)}},css:a=>({opacity:a}),onEnd:()=>{e.style.willChange="auto",e.style.opacity="1"}}),out:(e,a)=>({physics:c,css:l=>({opacity:l}),prepare:()=>{g(e,a),e.style.willChange="opacity"},onEnd:()=>{i&&i(),e.style.willChange="auto"}})}},gt={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},O={scaleDown:0,translate:.2,scaleUp:.8},wt=.8,$t="white",bt=t=>{var s;const n=gt,r=wt,c=((s=t==null?void 0:t.border)==null?void 0:s.color)??$t;return{out:async(i,e)=>{const a=v(e),l=x(document.body,e.positionedParent),y=Et(c,{...a,top:l.top}),o={scale:1,translateY:-a.top},h=()=>{i.style.transform=`translateY(${o.translateY}px) scale(${o.scale})`;const d=(a.width-a.width*o.scale)/2,u=(a.height-a.height*o.scale)/2;xt(y,d,u)};return{items:[{physics:(t==null?void 0:t.physics)??{spring:n.scaleDown},offset:O.scaleDown,tick:d=>{const u=1-d;o.scale=1-(1-r)*u,h()}},{physics:(t==null?void 0:t.physics)??{spring:n.translate},offset:O.translate,tick:d=>{const u=1-d;o.translateY=-a.top-a.height*u,h()}},{physics:(t==null?void 0:t.physics)??{spring:n.scaleUp},offset:O.scaleUp,tick:d=>{const u=1-d;o.scale=r+(1-r)*u,h()}}],schedule:"stagger",prepare:()=>{g(i),m(i,a),I(i,a),Ct(i,a);for(const d of y)e.positionedParent.appendChild(d)},onEnd:()=>{i.style.clipPath="",i.style.transformOrigin="",setTimeout(()=>{for(const d of y)e.positionedParent.removeChild(d)},1e3)}}},in:async(i,e)=>{const a=v(e),l={scale:r,translateY:-a.top+a.height},y=()=>{i.style.transform=`translateY(${l.translateY}px) scale(${l.scale})`};return{items:[{physics:(t==null?void 0:t.physics)??{spring:n.scaleDown},offset:O.scaleDown,tick:o=>{l.scale=1-(1-r)*o,y()}},{physics:(t==null?void 0:t.physics)??{spring:n.translate},offset:O.translate,tick:o=>{l.translateY=-a.top+a.height*(1-o),y()}},{physics:(t==null?void 0:t.physics)??{spring:n.scaleUp},offset:O.scaleUp,tick:o=>{l.scale=r+(1-r)*o,y()}}],schedule:"stagger",prepare:()=>{m(i,a),I(i,a),i.style.transform=`translateY(${-a.top+a.height}px) scale(${r})`},onEnd:()=>{i.style.clipPath="",i.style.transformOrigin="",i.style.transform=""}}}}};function xt(t,n,r){const c=n*.7,s=r*.7;t.topLeft.style.transform=`translate(${c}px, ${s}px)`,t.topRight.style.transform=`translate(${-c}px, ${s}px)`,t.bottomLeft.style.transform=`translate(${c}px, ${-s}px)`,t.bottomRight.style.transform=`translate(${-c}px, ${-s}px)`}function Et(t="white",n){const s=document.createElement("div");s.style.position="fixed",s.style.pointerEvents="none",s.style.zIndex="9999",s.style.top=`${n.top-1}px`,s.style.left=`${n.left-1}px`,s.style.width="15px",s.style.height="15px";const i=document.createElement("div");i.style.position="absolute",i.style.width="15px",i.style.height="1px",i.style.backgroundColor=t,i.style.top="0",i.style.left="0";const e=document.createElement("div");e.style.position="absolute",e.style.width="1px",e.style.height="15px",e.style.backgroundColor=t,e.style.top="0",e.style.left="0",s.appendChild(i),s.appendChild(e);const a=document.createElement("div");a.style.position="fixed",a.style.pointerEvents="none",a.style.zIndex="9999",a.style.top=`${n.top-1}px`,a.style.left=`${n.left+n.width-15+1}px`,a.style.width="15px",a.style.height="15px";const l=document.createElement("div");l.style.position="absolute",l.style.width="15px",l.style.height="1px",l.style.backgroundColor=t,l.style.top="0",l.style.right="0";const y=document.createElement("div");y.style.position="absolute",y.style.width="1px",y.style.height="15px",y.style.backgroundColor=t,y.style.top="0",y.style.right="0",a.appendChild(l),a.appendChild(y);const o=document.createElement("div");o.style.position="fixed",o.style.pointerEvents="none",o.style.zIndex="9999",o.style.top=`${n.top+n.height-15+1}px`,o.style.left=`${n.left-1}px`,o.style.width="15px",o.style.height="15px";const h=document.createElement("div");h.style.position="absolute",h.style.width="15px",h.style.height="1px",h.style.backgroundColor=t,h.style.bottom="0",h.style.left="0";const d=document.createElement("div");d.style.position="absolute",d.style.width="1px",d.style.height="15px",d.style.backgroundColor=t,d.style.bottom="0",d.style.left="0",o.appendChild(h),o.appendChild(d);const u=document.createElement("div");u.style.position="fixed",u.style.pointerEvents="none",u.style.zIndex="9999",u.style.top=`${n.top+n.height-15+1}px`,u.style.left=`${n.left+n.width-15+1}px`,u.style.width="15px",u.style.height="15px";const f=document.createElement("div");f.style.position="absolute",f.style.width="15px",f.style.height="1px",f.style.backgroundColor=t,f.style.bottom="0",f.style.right="0";const p=document.createElement("div");return p.style.position="absolute",p.style.width="1px",p.style.height="15px",p.style.backgroundColor=t,p.style.bottom="0",p.style.right="0",u.appendChild(f),u.appendChild(p),{topLeft:s,topRight:a,bottomLeft:o,bottomRight:u,*[Symbol.iterator](){yield s,yield a,yield o,yield u}}}function v(t){const n=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function m(t,n){const r=n.left+n.width/2,c=n.top+n.height/2;t.style.transformOrigin=`${r}px ${c}px`}function I(t,n){t.style.clipPath=`polygon(
31
- ${n.left}px ${n.top}px,
32
- ${n.left+n.width}px ${n.top}px,
33
- ${n.left+n.width}px ${n.top+n.height}px,
34
- ${n.left}px ${n.top+n.height}px
35
- )`}function Ct(t,n){t.style.transform=`translateY(${-n.top}px)`}const Ot={spring:{stiffness:300,damping:30}};function St(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const At=(t={})=>{const n=t.physics??Ot,r=t.maxDistance??700;let c=null,s=E();return{in:async(i,e)=>{const a=i,l=Array.from(a.querySelectorAll("[data-hero-key]"));await s.promise;const y=l.map(o=>{const h=o.getAttribute("data-hero-key");if(!h)return null;const d=St(c,h);if(!d)return null;const u=o,f=x(c,d),p=x(a,u),$=f.left-p.left-e.scrollOffset.x,w=f.top-p.top-e.scrollOffset.y,b=f.width/p.width,C=f.height/p.height,Y=u.style.transform,D=u.style.position,F=u.style.transformOrigin,U=u.style.zIndex,V=u.style.willChange;return{toEl:u,dx:$,dy:w,dw:b,dh:C,originalTransform:Y,originalPosition:D,originalTransformOrigin:F,originalZIndex:U,originalWillChange:V}}).filter(o=>o!==null&&Math.abs(o.dy)<=r);return c=null,s=E(),y.length===0?{physics:n,tick:()=>{}}:{items:y.map(({toEl:o,dx:h,dy:d,dw:u,dh:f})=>({physics:n,tick:p=>{o.style.transform=`translate(${(1-p)*h}px, ${(1-p)*d}px) scale(${p+(1-p)*u}, ${p+(1-p)*f})`}})),schedule:"parallel",prepare:()=>{y.forEach(({toEl:o})=>{o.style.position="relative",o.style.transformOrigin="top left",o.style.zIndex="1000",o.style.willChange="transform"})},onEnd:()=>{y.forEach(({toEl:o,originalTransform:h,originalPosition:d,originalTransformOrigin:u,originalZIndex:f,originalWillChange:p})=>{o.style.transform=h,o.style.position=d,o.style.transformOrigin=u,o.style.zIndex=f,o.style.willChange=p})}}},out:async i=>({physics:n,tick:()=>{},prepare:()=>{c=i,s.resolve(),g(i),i.style.opacity="0"}})}},Tt={spring:{stiffness:220,damping:24,doubleSpring:1}};function Pt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2-c.x,i=n.top-t.top+(n.height-t.height)/2-c.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p}px, ${i*p}px) scale(${1+(l-1)*p})`}}}}function Lt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2+c.x,i=n.top-t.top+(n.height-t.height)/2+c.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p-c.x}px, ${i*p-c.y}px) scale(${1+(l-1)*p})`}}}}function kt(t,n,r){const c=t.querySelector("[data-instagram-detail-key]"),s=n.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||n.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let i=null,e=null,a=!1;if(!c&&s){e=s;const o=e.getAttribute("data-instagram-detail-key");if(!o)return null;i=t.querySelector(`[data-instagram-gallery-key="${o}"]`),i&&(a=!0)}else if(c&&!s){e=c;const o=e.getAttribute("data-instagram-detail-key");if(!o)return null;i=n.querySelector(`[data-instagram-gallery-key="${o}"]`),i&&(a=!1)}if(!i||!e)return null;const l=x(a?t:n,i),y=x(a?n:t,e);if(a){const o=Pt({detailRect:y,galleryRect:l,pageRect:n.getBoundingClientRect(),scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,{isEnterMode:!0,inAnimation:o.animate}}else{const o=Lt({detailRect:y,galleryRect:l,pageRect:t.getBoundingClientRect(),scrollOffset:r});return t.style.transformOrigin=o.transformOrigin,{isEnterMode:!1,outAnimation:o.animate}}}const vt=(t={})=>{const n=t.physics??Tt,r=t.timeout??300;let c=null,s=null,i=null,e=null;return{in:async(a,{scrollOffset:l})=>{const y=a;return!await new Promise(h=>{c?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},r))})||!c?(e==null||e(),e=null,c=null,{physics:n,css:()=>({})}):(i=kt(c,y,l),e==null||e(),e=null,i?(c=null,{physics:n,css:h=>i!=null&&i.inAnimation?i.inAnimation(h):{}}):(c=null,{physics:n,css:()=>({})}))},out:async(a,l)=>{const y=new Promise(o=>{e=o});return{physics:n,prepare:()=>{i!=null&&i.isEnterMode?g(a):(g(a,l),a.style.zIndex="-1")},wait:async()=>{c=a,s&&(s(!0),s=null),await y},css:o=>i!=null&&i.outAnimation?i.outAnimation(o):{}}}}},mt={spring:{stiffness:50,damping:30}};function It(t){const n=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}const _t=(t={})=>{const n=t.physics??mt,r=t.initialRotation??45,c=t.initialScale??.01,s=t.rotationTriggerPoint??.8;return{out:async(i,e)=>{const a=i.style.opacity;return{physics:{spring:{stiffness:80,damping:25}},from:1,to:0,prepare:()=>{g(i,e),i.style.opacity="1"},tick:l=>{i.style.opacity=String(l)},onEnd:()=>{i.style.opacity=a}}},in:async(i,e)=>{const a=It(e),l=i.style.transform,y=i.style.transformOrigin,o=i.style.position,h=i.style.zIndex;return{physics:n,from:0,to:1,prepare:()=>{const d=Math.min(a.width,a.height)*.4;i.style.setProperty("--max-border-radius",`${d}px`),i.style.setProperty("--border-radius-scale","1"),i.style.willChange="transform",i.style.backfaceVisibility="hidden";const u=a.left+a.width/2,f=a.top+a.height/2;i.style.transformOrigin=`${u}px ${f}px`,i.style.position="fixed",i.style.top=`${a.top}px`,i.style.left=`${a.left}px`,i.style.width=`${a.width}px`,i.style.height=`${a.height}px`,i.style.zIndex="1000",i.style.overflow="hidden",i.style.transform=`rotate(${r}deg) scale(${c}) translateZ(0)`,i.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",i.style.opacity="1"},tick:d=>{let u;if(d<=.05)u=c;else if(d<=s){const w=(d-.05)/(s-.05),b=Math.pow(w,9);u=c+(.8-c)*b}else{const w=(d-s)/(1-s);u=.8+.2*(1-Math.pow(1-w,3))}let f;const p=.7;if(d<=p)f=r;else{const w=(d-p)/(1-p),b=1-Math.pow(1-w,2);f=r*(1-b)}let $;if(d<=p)$=1;else{const w=(d-p)/(1-p);$=1-Math.pow(w,.5)}i.style.transform=`rotate(${f.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,i.style.setProperty("--border-radius-scale",$.toFixed(4))},onEnd:()=>{i.style.willChange="",i.style.backfaceVisibility="",i.style.removeProperty("--max-border-radius"),i.style.removeProperty("--border-radius-scale"),i.style.transform=l,i.style.transformOrigin=y,i.style.position=o,i.style.zIndex=h,i.style.top="",i.style.left="",i.style.width="",i.style.height="",i.style.overflow="",i.style.borderRadius=""}}}}},Yt={spring:{stiffness:220,damping:24,doubleSpring:1}};function Dt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2-c.x,i=n.top-t.top+(n.height-t.height)/2-c.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p}px, ${i*p}px) scale(${1+(l-1)*p})`}}}}function Ft({galleryRect:t,detailRect:n,scrollOffset:r}){const c=n.left-t.left+(n.width-t.width)/2+r.x,s=n.top-t.top+(n.height-t.height)/2+r.y,i=n.width/t.width,e=n.height/t.height,a=Math.max(i,e);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y;return{transform:`translate(${c*o-r.x}px, ${s*o-r.y}px) scale(${1+(a-1)*o})`,opacity:`${1-o}`}}}}function Ut({galleryRect:t,detailRect:n,scrollOffset:r}){const c=n.left-t.left+(n.width-t.width)/2-r.x,s=n.top-t.top+(n.height-t.height)/2-r.y,i=n.width/t.width,e=n.height/t.height,a=Math.max(i,e);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y,h=y;return{transform:`translate(${c*o}px, ${s*o}px) scale(${1+(a-1)*o})`,opacity:`${h}`}}}}function Vt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2+c.x,i=n.top-t.top+(n.height-t.height)/2+c.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p-c.x}px, ${i*p-c.y}px) scale(${1+(l-1)*p})`}}}}function Ht(t,n,r){const c=t.querySelector("[data-pinterest-detail-key]"),s=n.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||n.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let i=null,e=null,a=!1;if(!c&&s){e=s;const o=e.getAttribute("data-pinterest-detail-key");if(!o)return null;i=t.querySelector(`[data-pinterest-gallery-key="${o}"]`),i&&(a=!0)}else if(c&&!s){e=c;const o=e.getAttribute("data-pinterest-detail-key");if(!o)return null;i=n.querySelector(`[data-pinterest-gallery-key="${o}"]`),i&&(a=!1)}if(!i||!e)return null;const l=x(a?t:n,i),y=x(a?n:t,e);if(a){const o=Dt({detailRect:y,galleryRect:l,pageRect:n.getBoundingClientRect(),scrollOffset:r}),h=Ft({galleryRect:l,detailRect:y,scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=h.transformOrigin,{inAnimation:o.animate,outAnimation:h.animate}}else{const o=Ut({galleryRect:l,detailRect:y,scrollOffset:r}),h=Vt({detailRect:y,galleryRect:l,pageRect:t.getBoundingClientRect(),scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=h.transformOrigin,{inAnimation:o.animate,outAnimation:h.animate}}}const Xt=(t={})=>{const n=t.physics??Yt,r=t.timeout??300;let c=null,s=null,i=null,e=null;return{in:async(a,{scrollOffset:l})=>{const y=a;return!await new Promise(h=>{c?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},r))})||!c?(e==null||e(),e=null,c=null,{physics:n,css:()=>({})}):(i=Ht(c,y,l),e==null||e(),e=null,i?(c=null,{physics:n,css:h=>i?i.inAnimation(h):{}}):(c=null,{physics:n,css:()=>({})}))},out:async a=>{const l=new Promise(y=>{e=y});return{physics:n,prepare:()=>{g(a),a.style.zIndex="-1",c=a,s&&(s(!0),s=null)},wait:async()=>{await l},css:y=>i?i.outAnimation(y):{}}}}},zt={spring:{stiffness:100,damping:30}},Mt=(t={})=>{const n=t.physics??zt;return{in:r=>({physics:n,prepare:()=>{r.style.opacity="0",r.style.transform="rotate(-180deg)",r.style.transformOrigin="center center",r.style.willChange="transform, opacity"},css:c=>({transform:`rotate(${(c-1)*180}deg)`,opacity:c>.5?1:0}),onEnd:()=>{r.style.willChange="auto",r.style.transform="",r.style.transformOrigin="",r.style.opacity=""}}),out:(r,c)=>({physics:n,prepare:()=>{g(r,c),r.style.transformOrigin="center center",r.style.willChange="transform, opacity"},css:s=>({transform:`rotate(${(1-s)*180}deg)`,opacity:s>.5?1:0}),onEnd:()=>{r.style.willChange="auto"}})}},Wt={spring:{stiffness:5,damping:4}},Bt=(t={})=>{const n=t.direction??"up",r=t.physics??Wt,c=n==="up";let s=null,i=null,e=null;const a=()=>{if(s===null||i===null)return null;const l=Math.min(s,i),y=window.innerHeight;return Math.max(l,y)};return{in:l=>(i=l.offsetHeight,s!==null&&(e=a()),{physics:r,prepare:()=>{l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint"},tick:y=>{e===null&&(e=a());const o=e??window.innerHeight,h=c?(1-y)*o:(1-y)*-o;l.style.transform=`translate3d(0, ${h}px, 0)`},onEnd:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain=""}}),out:(l,y)=>({physics:r,tick:o=>{e===null&&(e=a());const h=e??window.innerHeight,d=c?(1-o)*-h:(1-o)*h;l.style.transform=`translate3d(0, ${d}px, 0)`},prepare:()=>{s=l.offsetHeight,i!==null&&(e=a()),g(l,y),l.style.zIndex=c?"-1":"1",l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.pointerEvents="none"}})}},qt={spring:{stiffness:200,damping:24}},jt={inertia:{acceleration:25,resistance:1.2}},Nt=.2;function T(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=t.scrollingElement.offsetHeight-n.top,s={top:r,left:0,width:n.width,height:c};return{...s,centerX:s.left+s.width/2,centerY:s.top+s.height/2}}const Gt=(t={})=>{const{direction:n="enter"}=t,r=t.physics??(n==="enter"?qt:jt),c=t.scaleOffset??Nt;return n==="enter"?{in:(s,i)=>{const e=T(i);return{physics:r,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:a=>({transform:`translate3d(0, ${(1-a)*e.height}px, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.clipPath=""}}},out:(s,i)=>{const e=T(i),a=e.left+e.width/2,l=e.top+e.height/2;return{physics:r,prepare:()=>{g(s,i),s.style.zIndex="-1",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transformOrigin=`${a}px ${l}px`,s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:y=>({transform:`scale(${1-c+y*c})`,opacity:y})}}}:{in:(s,i)=>{const e=T(i),a=e.left+e.width/2,l=e.top+e.height/2;return{physics:r,prepare:()=>{s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${a}px ${l}px`,s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:y=>({transform:`scale(${1-c+y*c})`,opacity:y}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin="",s.style.clipPath=""}}},out:(s,i)=>{const a=T(i).height,l=i.scroll.y;return{physics:r,prepare:()=>{g(s,i),s.style.zIndex="100",s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.clipPath=`inset(${l}px 0 calc(100% - ${l+a}px) 0)`},css:y=>({transform:`translate3d(0, ${(1-y)*a}px, 0)`})}}}},Zt={spring:{stiffness:170,damping:22,doubleSpring:.8}},Jt=(t={})=>{const n=t.direction??"left",r=t.physics??Zt,c=n==="left";return{in:s=>({physics:r,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:i=>({transform:`translate3d(${c?(1-i)*100:(1-i)*-100}%, 0, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>({physics:r,css:e=>({transform:`translate3d(${c?(1-e)*-100:(1-e)*100}%, 0, 0)`}),prepare:()=>{g(s,i),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"}})}},Kt=8,Qt={spring:{stiffness:400,damping:30,restDelta:.1,restSpeed:1e14}},Rt=(t={})=>{const n=t.direction??"left",r=t.physics??Qt,c=t.translateOffset??Kt,s=n==="left";let{promise:i,resolve:e}=E();return{in:a=>({physics:r,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},wait:async()=>{if(i){await i;const l=E();i=l.promise,e=l.resolve}},css:l=>{const y=s?(1-l)*c:(1-l)*-c,o=`${l}`;return{transform:`translate3d(${y}px, 0, 0)`,opacity:o}},onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,l)=>({physics:r,prepare:()=>{g(a,l),a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"},css:y=>{const o=s?(1-y)*-c:(1-y)*c,h=`${y}`;return{transform:`translate3d(${o}px, 0, 0)`,opacity:h}},onEnd:()=>{e&&e(),a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}})}},ts={spring:{stiffness:17,damping:6}},L=20,P=800,ss=(t={})=>{const n=t.physics??ts;let r,c=null;return{in:s=>({physics:n,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${P}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`},wait:async()=>{r&&await r},css:i=>{const e=(1-i)*L,a=-(1-i)*100;return{transform:`perspective(${P}px) rotateY(${e}deg) translate3d(${a}%, 0, 0)`}},onEnd:()=>{s.style.transform="",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>(r=new Promise(e=>{c=e}),{physics:n,prepare:()=>{g(s,i),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${P}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:e=>{const a=1-e,l=a*L,y=a*100;return{transform:`perspective(${P}px) rotateY(${-l}deg) translate3d(${y}%, 0, 0)`}},onEnd:()=>{c&&c(),s.style.transform=""}})}},is={spring:{stiffness:350,damping:32,restDelta:.1,restSpeed:1e14}},ns=.05;function es(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=window.innerHeight-n.top;return{top:r,left:0,width:n.width,height:c}}const as=(t={})=>{const n=t.physics??is,r=t.scaleOffset??ns;let{promise:c,resolve:s}=E();return{in:(i,e)=>{const a=es(e),l=a.left+a.width/2,y=a.top+a.height/2;return{physics:n,prepare:()=>{i.style.opacity="0",i.style.willChange="transform, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.transformOrigin=`${l}px ${y}px`},wait:async()=>{if(c){await c;const o=E();c=o.promise,s=o.resolve}},css:o=>({transform:`scale(${1-r+o*r})`,opacity:o}),onEnd:()=>{i.style.opacity="1",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transformOrigin=""}}},out:(i,e)=>({physics:n,prepare:()=>{g(i,e),i.style.willChange="opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none"},css:a=>({opacity:a}),onEnd:()=>{s&&s()}})}};exports.blind=q;exports.curtainReveal=et;exports.depth=lt;exports.drill=ht;exports.fade=ft;exports.film=bt;exports.hero=At;exports.instagram=vt;exports.jaemin=_t;exports.pinterest=Xt;exports.rotate=Mt;exports.scroll=Bt;exports.sheet=Gt;exports.slide=Jt;exports.snap=Rt;exports.strip=ss;exports.swap=as;
30
+ `}h.push(w),d.appendChild(w)}return r.appendChild(d),{container:d,blinds:h}};return{out:r=>{let y=null;i=new Promise(d=>{c=d});const f=d=>{const h=1-d;return{transform:l==="horizontal"?`scaleX(${h})`:`scaleY(${h})`}};return{items:Array.from({length:o},(d,h)=>({physics:a,offset:.2,css:{get element(){return y==null?void 0:y.blinds[h]},style:f}})),schedule:"stagger",prepare:()=>{$(r),r.style.zIndex="1000",y=p(r,"hidden","left")},onStart:()=>{},onEnd:()=>{c&&c()}}},in:r=>{let y=null;const f=d=>{const h=1-d;return{transform:l==="horizontal"?`scaleX(${h})`:`scaleY(${h})`}};return{items:Array.from({length:o},(d,h)=>({physics:n,offset:.2,css:{get element(){return y==null?void 0:y.blinds[h]},style:f}})),schedule:"stagger",prepare:()=>{r.style.position="relative",r.style.zIndex="0",y=p(r,"closed","right")},onStart:()=>{},wait:async()=>{i&&await i,await U(e)},onEnd:()=>{y&&y.container&&y.container.remove()}}}}},J={spring:{stiffness:1,damping:1}},Q={spring:{stiffness:20,damping:25}},R="#000000",tt="circle",F="CURTAIN_REVEAL_OVERLAY_ID",st={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},it={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},nt={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},et={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},at=.4,O=.5,ot=.2;function rt(t,e){switch(t){case"circle":return`circle(${e*100}% at 50% 50%)`;case"square":return`inset(${(1-e)*50}% round ${10*e}%)`;case"triangle":{const o=e*100;return`polygon(50% ${50-o}%, ${50-o}% ${50+o}%, ${50+o}% ${50+o}%)`}}}const lt=t=>t.reduce((e,o)=>e+o,0),ct=(t={})=>{const{background:e=R,texts:o=[],shape:l=tt,textStyle:s={}}=t,n=t.physics??Q,a=t.physics??J;return{out:(i,c)=>{const p=i.style.opacity;return{physics:a,from:1,to:0,prepare:()=>{$(i,c),i.style.opacity="1"},tick:r=>{const y=Math.max(0,r-at);i.style.opacity=String(y)},onEnd:()=>{i.style.opacity=p}}},in:i=>{let c=null,p=null,r=null;const y=document.body.style.overflow,f=document.getElementById(F);let u=[];const d=()=>{c=document.createElement("div"),c.id=F,Object.assign(c.style,st,{background:e}),document.body.appendChild(c),p=document.createElement("div"),Object.assign(p.style,it),c.appendChild(p),r=document.createElement("div"),Object.assign(r.style,nt),p.appendChild(r),o.forEach(h=>{const g=document.createElement("div");g.textContent=h,Object.assign(g.style,et,s),r.appendChild(g)}),u=Array.from(r.children).map(h=>h.getBoundingClientRect().width)};return{physics:n,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",i.style.opacity="1",f==null||f.remove(),d(),c&&p&&(c.style.clipPath="none",p.style.transform="scale(1)")},tick:h=>{if(!(!c||!p||!r)){if(h<=O&&o.length>0){const g=h/O,w=Math.min(Math.floor(g*o.length),o.length-1),b=u[w]??0,C=lt(u.slice(0,w));p.style.width=`${b}px`,r.style.transform=`translateX(-${C}px)`}if(h>O){const w=1-Math.max(0,Math.min(1,(h-O)/ot));c.style.clipPath=rt(l,w),p.style.transform=`scale(${w})`}}},onEnd:()=>{c==null||c.remove(),c=p=r=null,document.body.style.overflow=y}}}}},yt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:1e14}},pt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:1e14}},ht=.05;function A(t){const e=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-e.top;return{top:o,left:0,width:e.width,height:l}}const dt=(t={})=>{const{direction:e="enter"}=t,o=t.physics??(e==="enter"?yt:pt),l=t.scaleOffset??ht;let{promise:s,resolve:n}=E();return e==="enter"?{in:(a,i)=>{const c=A(i),p=c.left+c.width/2,r=c.top+c.height/2;return{physics:o,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.transformOrigin=`${p}px ${r}px`},wait:async()=>{if(s){await s;const y=E();s=y.promise,n=y.resolve}},css:y=>({transform:`scale(${1-l+y*l})`,opacity:y}),onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transformOrigin=""}}},out:(a,i)=>{const c=A(i),p=c.left+c.width/2,r=c.top+c.height/2+i.scrollOffset.y;return{physics:o,prepare:()=>{$(a,i),a.style.zIndex="-1",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none",a.style.transformOrigin=`${p}px ${r}px`},css:y=>({transform:`scale(${1+(1-y)*l})`,opacity:y}),onEnd:()=>{n&&n()}}}}:{in:(a,i)=>{const c=A(i),p=c.left+c.width/2,r=c.top+c.height/2;return{physics:o,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.transformOrigin=`${p}px ${r}px`},wait:async()=>{if(s){await s;const y=E();s=y.promise,n=y.resolve}},css:y=>({transform:`scale(${1+l-y*l})`,opacity:y}),onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transformOrigin=""}}},out:(a,i)=>{const c=A(i),p=c.left+c.width/2,r=c.top+c.height/2+i.scrollOffset.y;return{physics:o,prepare:()=>{$(a,i),a.style.zIndex="100",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none",a.style.transformOrigin=`${p}px ${r}px`},css:y=>({transform:`scale(${1-(1-y)*l})`,opacity:y}),onEnd:()=>{n&&n()}}}}},ft={spring:{stiffness:170,damping:22}},ut={spring:{stiffness:170,damping:22}},gt=(t={})=>{const{opacity:e=!1,direction:o="enter"}=t,l=t.physics??(o==="enter"?ft:ut);return o==="enter"?{in:s=>({physics:l,prepare:()=>{s.style.willChange=e?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:n=>{const a={transform:`translate3d(${(1-n)*100}%, 0, 0)`};return e&&(a.opacity=n),a},onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,n)=>({physics:l,prepare:()=>{$(s,n),s.style.zIndex="-1",s.style.willChange=e?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"},css:a=>{const i={transform:`translate3d(${-(1-a)*20}%, 0, 0)`};return e&&(i.opacity=a),i}})}:{in:s=>({physics:l,prepare:()=>{s.style.willChange=e?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:n=>{const a={transform:`translate3d(${-(1-n)*20}%, 0, 0)`};return e&&(a.opacity=n),a},onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,n)=>({physics:l,prepare:()=>{$(s,n),s.style.zIndex="100",s.style.willChange=e?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"},css:a=>{const i={transform:`translate3d(${(1-a)*100}%, 0, 0)`};return e&&(i.opacity=a),i}})}},wt={spring:{stiffness:180,damping:20,doubleSpring:!0}},$t={spring:{stiffness:170,damping:20,doubleSpring:!0}},bt=0,xt=(t={})=>{const{transitionDelay:e=bt}=t,o=t.physics??$t,l=t.physics??wt;let{promise:s,resolve:n}=E();return{in:a=>({physics:o,prepare:()=>{a.style.opacity="0",a.style.willChange="opacity"},wait:async()=>{if(s){await s;const i=E();s=i.promise,n=i.resolve,await U(e)}},css:i=>({opacity:i}),onEnd:()=>{a.style.willChange="auto",a.style.opacity="1"}}),out:(a,i)=>({physics:l,css:c=>({opacity:c}),prepare:()=>{$(a,i),a.style.willChange="opacity"},onEnd:()=>{n&&n(),a.style.willChange="auto"}})}},Et={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},S={scaleDown:0,translate:.2,scaleUp:.8},Ct=.8,St="white",I=1e3/60,Ot=600;function At(t){const{items:e,from:o,to:l,recordFrame:s}=t,n=I/1e3,a=Math.abs(l-o),i=e.map(p=>({item:p,integrator:new v.SpringIntegrator({stiffness:p.spring.stiffness,damping:p.spring.damping}),state:{position:o,velocity:0},started:!1,settled:!1,settleTime:0}));for(let p=0;p<i.length;p++)(p===0||i[p].item.offset===0)&&(i[p].started=!0);s(0);let c=0;for(let p=1;p<=Ot;p++){const r=p*I;c=r;for(const y of i)!y.started||y.settled||(y.state=y.integrator.step(y.state,l,n),y.integrator.isSettled(y.state,l)?(y.settleTime+=n,y.settleTime>=v.SETTLE_THRESHOLD&&(y.state={position:l,velocity:0},y.settled=!0)):y.settleTime=0,y.item.tick(y.state.position));for(let y=1;y<i.length;y++){const f=i[y];if(f.started)continue;const u=i[y-1];if(!u.started)continue;(a===0?1:Math.abs(u.state.position-o)/a)>=f.item.offset&&(f.started=!0)}if(s(r),i.every(y=>y.settled))return r}return c}function P(t,e){return t!=null&&t.spring?{stiffness:t.spring.stiffness,damping:t.spring.damping}:e}function _(t){const{rect:e,springs:o,scale:l,direction:s,override:n}=t,a=s==="out"?{scale:1,translateY:-e.top}:{scale:l,translateY:-e.top+e.height},i=P(n,o.scaleDown),c=P(n,o.translate),p=P(n,o.scaleUp),r=s==="out"?1:0,y=s==="out"?0:1,f=s==="out"?[{spring:i,offset:S.scaleDown,tick:h=>{const g=1-h;a.scale=1-(1-l)*g}},{spring:c,offset:S.translate,tick:h=>{const g=1-h;a.translateY=-e.top-e.height*g}},{spring:p,offset:S.scaleUp,tick:h=>{const g=1-h;a.scale=l+(1-l)*g}}]:[{spring:i,offset:S.scaleDown,tick:h=>{a.scale=1-(1-l)*h}},{spring:c,offset:S.translate,tick:h=>{a.translateY=-e.top+e.height*(1-h)}},{spring:p,offset:S.scaleUp,tick:h=>{a.scale=l+(1-l)*h}}],u=[],d=At({items:f,from:r,to:y,recordFrame:h=>{u.push({time:h,scale:a.scale,translateY:a.translateY})}});return{snapshots:u,totalDuration:d}}function m(t,e,o){return t.length===0||e===0?[]:t.map(l=>({...o(l),offset:Math.min(1,Math.max(0,l.time/e))}))}const Tt=t=>{var s;const e=Et,o=Ct,l=((s=t==null?void 0:t.border)==null?void 0:s.color)??St;return{out:async(n,a)=>{const i=D(a),c=x(document.body,a.positionedParent),p=mt(l,{...i,top:c.top}),{snapshots:r,totalDuration:y}=_({rect:i,springs:e,scale:o,direction:"out",override:t==null?void 0:t.physics}),f=m(r,y,d=>({transform:`translateY(${d.translateY}px) scale(${d.scale})`})),u=kt.map(([d,h])=>m(r,y,g=>{const w=(i.width-i.width*g.scale)/2*.7*d,b=(i.height-i.height*g.scale)/2*.7*h;return{transform:`translate(${w}px, ${b}px)`}}));return{items:[{keyframes:{element:n,frames:f,duration:y}},...u.map((d,h)=>({keyframes:{element:Pt[h](p),frames:d,duration:y}}))],schedule:"parallel",prepare:()=>{$(n),Y(n,i),V(n,i),Lt(n,i);for(const d of p)a.positionedParent.appendChild(d)},onEnd:()=>{n.style.clipPath="",n.style.transformOrigin="",setTimeout(()=>{for(const d of p)a.positionedParent.removeChild(d)},1e3)}}},in:async(n,a)=>{const i=D(a),{snapshots:c,totalDuration:p}=_({rect:i,springs:e,scale:o,direction:"in",override:t==null?void 0:t.physics}),r=m(c,p,y=>({transform:`translateY(${y.translateY}px) scale(${y.scale})`}));return{items:[{keyframes:{element:n,frames:r,duration:p}}],schedule:"parallel",prepare:()=>{Y(n,i),V(n,i),n.style.transform=`translateY(${-i.top+i.height}px) scale(${o})`},onEnd:()=>{n.style.clipPath="",n.style.transformOrigin="",n.style.transform=""}}}}},kt=[[1,1],[-1,1],[1,-1],[-1,-1]],Pt=[t=>t.topLeft,t=>t.topRight,t=>t.bottomLeft,t=>t.bottomRight];function mt(t="white",e){const s=document.createElement("div");s.style.position="fixed",s.style.pointerEvents="none",s.style.zIndex="9999",s.style.top=`${e.top-1}px`,s.style.left=`${e.left-1}px`,s.style.width="15px",s.style.height="15px";const n=document.createElement("div");n.style.position="absolute",n.style.width="15px",n.style.height="1px",n.style.backgroundColor=t,n.style.top="0",n.style.left="0";const a=document.createElement("div");a.style.position="absolute",a.style.width="1px",a.style.height="15px",a.style.backgroundColor=t,a.style.top="0",a.style.left="0",s.appendChild(n),s.appendChild(a);const i=document.createElement("div");i.style.position="fixed",i.style.pointerEvents="none",i.style.zIndex="9999",i.style.top=`${e.top-1}px`,i.style.left=`${e.left+e.width-15+1}px`,i.style.width="15px",i.style.height="15px";const c=document.createElement("div");c.style.position="absolute",c.style.width="15px",c.style.height="1px",c.style.backgroundColor=t,c.style.top="0",c.style.right="0";const p=document.createElement("div");p.style.position="absolute",p.style.width="1px",p.style.height="15px",p.style.backgroundColor=t,p.style.top="0",p.style.right="0",i.appendChild(c),i.appendChild(p);const r=document.createElement("div");r.style.position="fixed",r.style.pointerEvents="none",r.style.zIndex="9999",r.style.top=`${e.top+e.height-15+1}px`,r.style.left=`${e.left-1}px`,r.style.width="15px",r.style.height="15px";const y=document.createElement("div");y.style.position="absolute",y.style.width="15px",y.style.height="1px",y.style.backgroundColor=t,y.style.bottom="0",y.style.left="0";const f=document.createElement("div");f.style.position="absolute",f.style.width="1px",f.style.height="15px",f.style.backgroundColor=t,f.style.bottom="0",f.style.left="0",r.appendChild(y),r.appendChild(f);const u=document.createElement("div");u.style.position="fixed",u.style.pointerEvents="none",u.style.zIndex="9999",u.style.top=`${e.top+e.height-15+1}px`,u.style.left=`${e.left+e.width-15+1}px`,u.style.width="15px",u.style.height="15px";const d=document.createElement("div");d.style.position="absolute",d.style.width="15px",d.style.height="1px",d.style.backgroundColor=t,d.style.bottom="0",d.style.right="0";const h=document.createElement("div");return h.style.position="absolute",h.style.width="1px",h.style.height="15px",h.style.backgroundColor=t,h.style.top="0",h.style.right="0",u.appendChild(d),u.appendChild(h),{topLeft:s,topRight:i,bottomLeft:r,bottomRight:u,*[Symbol.iterator](){yield s,yield i,yield r,yield u}}}function D(t){const e=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:e.width,height:window.innerHeight-e.top}}function Y(t,e){const o=e.left+e.width/2,l=e.top+e.height/2;t.style.transformOrigin=`${o}px ${l}px`}function V(t,e){t.style.clipPath=`polygon(
31
+ ${e.left}px ${e.top}px,
32
+ ${e.left+e.width}px ${e.top}px,
33
+ ${e.left+e.width}px ${e.top+e.height}px,
34
+ ${e.left}px ${e.top+e.height}px
35
+ )`}function Lt(t,e){t.style.transform=`translateY(${-e.top}px)`}const vt={spring:{stiffness:300,damping:30}};function Ft(t,e){return t.querySelector(`[data-hero-key="${e}"]`)}const It=(t={})=>{const e=t.physics??vt,o=t.maxDistance??700;let l=null,s=E();return{in:async(n,a)=>{const i=n,c=Array.from(i.querySelectorAll("[data-hero-key]"));await s.promise;const p=c.map(r=>{const y=r.getAttribute("data-hero-key");if(!y)return null;const f=Ft(l,y);if(!f)return null;const u=r,d=x(l,f),h=x(i,u),g=d.left-h.left-a.scrollOffset.x,w=d.top-h.top-a.scrollOffset.y,b=d.width/h.width,C=d.height/h.height,H=u.style.transform,M=u.style.position,X=u.style.transformOrigin,z=u.style.zIndex,W=u.style.willChange;return{toEl:u,dx:g,dy:w,dw:b,dh:C,originalTransform:H,originalPosition:M,originalTransformOrigin:X,originalZIndex:z,originalWillChange:W}}).filter(r=>r!==null&&Math.abs(r.dy)<=o);return l=null,s=E(),p.length===0?{physics:e,tick:()=>{}}:{items:p.map(({toEl:r,dx:y,dy:f,dw:u,dh:d})=>({physics:e,tick:h=>{r.style.transform=`translate(${(1-h)*y}px, ${(1-h)*f}px) scale(${h+(1-h)*u}, ${h+(1-h)*d})`}})),schedule:"parallel",prepare:()=>{p.forEach(({toEl:r})=>{r.style.position="relative",r.style.transformOrigin="top left",r.style.zIndex="1000",r.style.willChange="transform"})},onEnd:()=>{p.forEach(({toEl:r,originalTransform:y,originalPosition:f,originalTransformOrigin:u,originalZIndex:d,originalWillChange:h})=>{r.style.transform=y,r.style.position=f,r.style.transformOrigin=u,r.style.zIndex=d,r.style.willChange=h})}}},out:async n=>({physics:e,tick:()=>{},prepare:()=>{l=n,s.resolve(),$(n),n.style.opacity="0"}})}},_t={spring:{stiffness:420,damping:34}};function Dt({detailRect:t,galleryRect:e,pageRect:o,scrollOffset:l}){const s=e.left-t.left+(e.width-t.width)/2-l.x,n=e.top-t.top+(e.height-t.height)/2-l.y,a=e.width/t.width,i=e.height/t.height,c=Math.max(a,i),p=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,y=(o.height-(t.top+t.height))/o.height*100,f=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:d=>{const h=1-d;return{clipPath:`inset(${p*h}% ${r*h}% ${y*h}% ${f*h}%)`,transform:`translate(${s*h}px, ${n*h}px) scale(${1+(c-1)*h})`}}}}function Yt({detailRect:t,galleryRect:e,pageRect:o,scrollOffset:l}){const s=e.left-t.left+(e.width-t.width)/2+l.x,n=e.top-t.top+(e.height-t.height)/2+l.y,a=e.width/t.width,i=e.height/t.height,c=Math.min(a,i),p=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,y=(o.height-(t.top+t.height))/o.height*100,f=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:d=>{const h=1-d;return{clipPath:`inset(${p*h}% ${r*h}% ${y*h}% ${f*h}%)`,transform:`translate(${s*h-l.x}px, ${n*h-l.y}px) scale(${1+(c-1)*h})`}}}}function Vt(t,e,o){const l=t.querySelector("[data-instagram-detail-key]"),s=e.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||e.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let n=null,a=null,i=!1;if(!l&&s){a=s;const r=a.getAttribute("data-instagram-detail-key");if(!r)return null;n=t.querySelector(`[data-instagram-gallery-key="${r}"]`),n&&(i=!0)}else if(l&&!s){a=l;const r=a.getAttribute("data-instagram-detail-key");if(!r)return null;n=e.querySelector(`[data-instagram-gallery-key="${r}"]`),n&&(i=!1)}if(!n||!a)return null;const c=x(i?t:e,n),p=x(i?e:t,a);if(i){const r=Dt({detailRect:p,galleryRect:c,pageRect:e.getBoundingClientRect(),scrollOffset:o});return e.style.transformOrigin=r.transformOrigin,{isEnterMode:!0,inAnimation:r.animate}}else{const r=Yt({detailRect:p,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:o});return t.style.transformOrigin=r.transformOrigin,{isEnterMode:!1,outAnimation:r.animate}}}const Ut=(t={})=>{const e=t.physics??_t,o=t.timeout??300;let l=null,s=null,n=null,a=null;return{in:async(i,{scrollOffset:c})=>{const p=i;return!await new Promise(y=>{l?y(!0):(s=y,setTimeout(()=>{s=null,y(!1)},o))})||!l?(a==null||a(),a=null,l=null,{physics:e,css:()=>({})}):(n=Vt(l,p,c),a==null||a(),a=null,n?(l=null,{physics:e,prepare:()=>{i.style.willChange="transform, clip-path",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},css:y=>n!=null&&n.inAnimation?n.inAnimation(y):{},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}):(l=null,{physics:e,css:()=>({})}))},out:async(i,c)=>{const p=new Promise(r=>{a=r});return{physics:e,prepare:()=>{n!=null&&n.isEnterMode?$(i):($(i,c),i.style.zIndex="-1"),i.style.willChange="transform, clip-path",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},wait:async()=>{l=i,s&&(s(!0),s=null),await p},css:r=>n!=null&&n.outAnimation?n.outAnimation(r):{},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}}}},Ht={spring:{stiffness:50,damping:30}};function Mt(t){const e=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:e.width,height:window.innerHeight-e.top}}const Xt=(t={})=>{const e=t.physics??Ht,o=t.initialRotation??45,l=t.initialScale??.01,s=t.rotationTriggerPoint??.8;return{out:async(n,a)=>{const i=n.style.opacity;return{physics:{spring:{stiffness:80,damping:25}},from:1,to:0,prepare:()=>{$(n,a),n.style.opacity="1"},tick:c=>{n.style.opacity=String(c)},onEnd:()=>{n.style.opacity=i}}},in:async(n,a)=>{const i=Mt(a),c=n.style.transform,p=n.style.transformOrigin,r=n.style.position,y=n.style.zIndex;return{physics:e,from:0,to:1,prepare:()=>{const f=Math.min(i.width,i.height)*.4;n.style.setProperty("--max-border-radius",`${f}px`),n.style.setProperty("--border-radius-scale","1"),n.style.willChange="transform",n.style.backfaceVisibility="hidden";const u=i.left+i.width/2,d=i.top+i.height/2;n.style.transformOrigin=`${u}px ${d}px`,n.style.position="fixed",n.style.top=`${i.top}px`,n.style.left=`${i.left}px`,n.style.width=`${i.width}px`,n.style.height=`${i.height}px`,n.style.zIndex="1000",n.style.overflow="hidden",n.style.transform=`rotate(${o}deg) scale(${l}) translateZ(0)`,n.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",n.style.opacity="1"},tick:f=>{let u;if(f<=.05)u=l;else if(f<=s){const w=(f-.05)/(s-.05),b=Math.pow(w,9);u=l+(.8-l)*b}else{const w=(f-s)/(1-s);u=.8+.2*(1-Math.pow(1-w,3))}let d;const h=.7;if(f<=h)d=o;else{const w=(f-h)/(1-h),b=1-Math.pow(1-w,2);d=o*(1-b)}let g;if(f<=h)g=1;else{const w=(f-h)/(1-h);g=1-Math.pow(w,.5)}n.style.transform=`rotate(${d.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,n.style.setProperty("--border-radius-scale",g.toFixed(4))},onEnd:()=>{n.style.willChange="",n.style.backfaceVisibility="",n.style.removeProperty("--max-border-radius"),n.style.removeProperty("--border-radius-scale"),n.style.transform=c,n.style.transformOrigin=p,n.style.position=r,n.style.zIndex=y,n.style.top="",n.style.left="",n.style.width="",n.style.height="",n.style.overflow="",n.style.borderRadius=""}}}}},zt={spring:{stiffness:340,damping:30,doubleSpring:1}};function Wt({detailRect:t,galleryRect:e,pageRect:o,scrollOffset:l}){const s=e.left-t.left+(e.width-t.width)/2-l.x,n=e.top-t.top+(e.height-t.height)/2-l.y,a=e.width/t.width,i=e.height/t.height,c=Math.max(a,i),p=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,y=(o.height-(t.top+t.height))/o.height*100,f=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:d=>{const h=1-d;return{clipPath:`inset(${p*h}% ${r*h}% ${y*h}% ${f*h}%)`,transform:`translate(${s*h}px, ${n*h}px) scale(${1+(c-1)*h})`}}}}function Bt({galleryRect:t,detailRect:e,scrollOffset:o}){const l=e.left-t.left+(e.width-t.width)/2+o.x,s=e.top-t.top+(e.height-t.height)/2+o.y,n=e.width/t.width,a=e.height/t.height,i=Math.max(n,a);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:p=>{const r=1-p;return{transform:`translate(${l*r-o.x}px, ${s*r-o.y}px) scale(${1+(i-1)*r})`,opacity:`${1-r}`}}}}function qt({galleryRect:t,detailRect:e,scrollOffset:o}){const l=e.left-t.left+(e.width-t.width)/2-o.x,s=e.top-t.top+(e.height-t.height)/2-o.y,n=e.width/t.width,a=e.height/t.height,i=Math.max(n,a);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:p=>{const r=1-p,y=p;return{transform:`translate(${l*r}px, ${s*r}px) scale(${1+(i-1)*r})`,opacity:`${y}`}}}}function jt({detailRect:t,galleryRect:e,pageRect:o,scrollOffset:l}){const s=e.left-t.left+(e.width-t.width)/2+l.x,n=e.top-t.top+(e.height-t.height)/2+l.y,a=e.width/t.width,i=e.height/t.height,c=Math.min(a,i),p=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,y=(o.height-(t.top+t.height))/o.height*100,f=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:d=>{const h=1-d;return{clipPath:`inset(${p*h}% ${r*h}% ${y*h}% ${f*h}%)`,transform:`translate(${s*h-l.x}px, ${n*h-l.y}px) scale(${1+(c-1)*h})`}}}}function Nt(t,e,o){const l=t.querySelector("[data-pinterest-detail-key]"),s=e.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||e.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let n=null,a=null,i=!1;if(!l&&s){a=s;const r=a.getAttribute("data-pinterest-detail-key");if(!r)return null;n=t.querySelector(`[data-pinterest-gallery-key="${r}"]`),n&&(i=!0)}else if(l&&!s){a=l;const r=a.getAttribute("data-pinterest-detail-key");if(!r)return null;n=e.querySelector(`[data-pinterest-gallery-key="${r}"]`),n&&(i=!1)}if(!n||!a)return null;const c=x(i?t:e,n),p=x(i?e:t,a);if(i){const r=Wt({detailRect:p,galleryRect:c,pageRect:e.getBoundingClientRect(),scrollOffset:o}),y=Bt({galleryRect:c,detailRect:p,scrollOffset:o});return e.style.transformOrigin=r.transformOrigin,t.style.transformOrigin=y.transformOrigin,{inAnimation:r.animate,outAnimation:y.animate}}else{const r=qt({galleryRect:c,detailRect:p,scrollOffset:o}),y=jt({detailRect:p,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:o});return e.style.transformOrigin=r.transformOrigin,t.style.transformOrigin=y.transformOrigin,{inAnimation:r.animate,outAnimation:y.animate}}}const Gt=(t={})=>{const e=t.physics??zt,o=t.timeout??300;let l=null,s=null,n=null,a=null;return{in:async(i,{scrollOffset:c})=>{const p=i;return!await new Promise(y=>{l?y(!0):(s=y,setTimeout(()=>{s=null,y(!1)},o))})||!l?(a==null||a(),a=null,l=null,{physics:e,css:()=>({})}):(n=Nt(l,p,c),a==null||a(),a=null,n?(l=null,{physics:e,prepare:()=>{i.style.willChange="transform, clip-path",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},css:y=>n?n.inAnimation(y):{},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}):(l=null,{physics:e,css:()=>({})}))},out:async i=>{const c=new Promise(p=>{a=p});return{physics:e,prepare:()=>{$(i),i.style.zIndex="-1",i.style.willChange="transform, clip-path, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",l=i,s&&(s(!0),s=null)},wait:async()=>{await c},css:p=>n?n.outAnimation(p):{},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}}}},Zt={spring:{stiffness:100,damping:30}},Kt=(t={})=>{const e=t.physics??Zt;return{in:o=>({physics:e,prepare:()=>{o.style.opacity="0",o.style.transform="rotate(-180deg)",o.style.transformOrigin="center center",o.style.willChange="transform, opacity"},css:l=>({transform:`rotate(${(l-1)*180}deg)`,opacity:l>.5?1:0}),onEnd:()=>{o.style.willChange="auto",o.style.transform="",o.style.transformOrigin="",o.style.opacity=""}}),out:(o,l)=>({physics:e,prepare:()=>{$(o,l),o.style.transformOrigin="center center",o.style.willChange="transform, opacity"},css:s=>({transform:`rotate(${(1-s)*180}deg)`,opacity:s>.5?1:0}),onEnd:()=>{o.style.willChange="auto"}})}},Jt={spring:{stiffness:5,damping:4}},Qt=(t={})=>{const e=t.direction??"up",o=t.physics??Jt,l=e==="up";let s=null,n=null,a=null;const i=()=>{if(s===null||n===null)return null;const c=Math.min(s,n),p=window.innerHeight;return Math.max(c,p)};return{in:c=>(n=c.offsetHeight,s!==null&&(a=i()),{physics:o,prepare:()=>{c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint"},tick:p=>{a===null&&(a=i());const r=a??window.innerHeight,y=l?(1-p)*r:(1-p)*-r;c.style.transform=`translate3d(0, ${y}px, 0)`},onEnd:()=>{c.style.willChange="auto",c.style.backfaceVisibility="",c.style.contain=""}}),out:(c,p)=>({physics:o,tick:r=>{a===null&&(a=i());const y=a??window.innerHeight,f=l?(1-r)*-y:(1-r)*y;c.style.transform=`translate3d(0, ${f}px, 0)`},prepare:()=>{s=c.offsetHeight,n!==null&&(a=i()),$(c,p),c.style.zIndex=l?"-1":"1",c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint",c.style.pointerEvents="none"}})}},Rt={spring:{stiffness:200,damping:24}},ts={inertia:{acceleration:25,resistance:1.2}},ss=.2;function T(t){const e=x(document.body,t.positionedParent),o=t.scroll.y,l=t.scrollingElement.offsetHeight-e.top,s={top:o,left:0,width:e.width,height:l};return{...s,centerX:s.left+s.width/2,centerY:s.top+s.height/2}}const is=(t={})=>{const{direction:e="enter"}=t,o=t.physics??(e==="enter"?Rt:ts),l=t.scaleOffset??ss;return e==="enter"?{in:(s,n)=>{const a=T(n);return{physics:o,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.clipPath=`inset(${a.top}px 0 calc(100% - ${a.top+a.height}px) 0)`},css:i=>({transform:`translate3d(0, ${(1-i)*a.height}px, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.clipPath=""}}},out:(s,n)=>{const a=T(n),i=a.left+a.width/2,c=a.top+a.height/2;return{physics:o,prepare:()=>{$(s,n),s.style.zIndex="-1",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transformOrigin=`${i}px ${c}px`,s.style.clipPath=`inset(${a.top}px 0 calc(100% - ${a.top+a.height}px) 0)`},css:p=>({transform:`scale(${1-l+p*l})`,opacity:p})}}}:{in:(s,n)=>{const a=T(n),i=a.left+a.width/2,c=a.top+a.height/2;return{physics:o,prepare:()=>{s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${i}px ${c}px`,s.style.clipPath=`inset(${a.top}px 0 calc(100% - ${a.top+a.height}px) 0)`},css:p=>({transform:`scale(${1-l+p*l})`,opacity:p}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin="",s.style.clipPath=""}}},out:(s,n)=>{const i=T(n).height,c=n.scroll.y;return{physics:o,prepare:()=>{$(s,n),s.style.zIndex="100",s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.clipPath=`inset(${c}px 0 calc(100% - ${c+i}px) 0)`},css:p=>({transform:`translate3d(0, ${(1-p)*i}px, 0)`})}}}},ns={spring:{stiffness:170,damping:22,doubleSpring:.8}},es=(t={})=>{const e=t.direction??"left",o=t.physics??ns,l=e==="left";return{in:s=>({physics:o,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:n=>({transform:`translate3d(${l?(1-n)*100:(1-n)*-100}%, 0, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,n)=>({physics:o,css:a=>({transform:`translate3d(${l?(1-a)*-100:(1-a)*100}%, 0, 0)`}),prepare:()=>{$(s,n),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"}})}},as=8,os={spring:{stiffness:400,damping:30,restDelta:.1,restSpeed:1e14}},rs=(t={})=>{const e=t.direction??"left",o=t.physics??os,l=t.translateOffset??as,s=e==="left";let{promise:n,resolve:a}=E();return{in:i=>({physics:o,prepare:()=>{i.style.opacity="0",i.style.willChange="transform, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},wait:async()=>{if(n){await n;const c=E();n=c.promise,a=c.resolve}},css:c=>{const p=s?(1-c)*l:(1-c)*-l,r=`${c}`;return{transform:`translate3d(${p}px, 0, 0)`,opacity:r}},onEnd:()=>{i.style.opacity="1",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}),out:(i,c)=>({physics:o,prepare:()=>{$(i,c),i.style.willChange="transform, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none"},css:p=>{const r=s?(1-p)*-l:(1-p)*l,y=`${p}`;return{transform:`translate3d(${r}px, 0, 0)`,opacity:y}},onEnd:()=>{a&&a(),i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}})}},ls={spring:{stiffness:17,damping:6}},L=20,k=800,cs=(t={})=>{const e=t.physics??ls;let o,l=null;return{in:s=>({physics:e,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${k}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`},wait:async()=>{o&&await o},css:n=>{const a=(1-n)*L,i=-(1-n)*100;return{transform:`perspective(${k}px) rotateY(${a}deg) translate3d(${i}%, 0, 0)`}},onEnd:()=>{s.style.transform="",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,n)=>(o=new Promise(a=>{l=a}),{physics:e,prepare:()=>{$(s,n),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${k}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:a=>{const i=1-a,c=i*L,p=i*100;return{transform:`perspective(${k}px) rotateY(${-c}deg) translate3d(${p}%, 0, 0)`}},onEnd:()=>{l&&l(),s.style.transform=""}})}},ys={spring:{stiffness:350,damping:32,restDelta:.1,restSpeed:1e14}},ps=.05;function hs(t){const e=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-e.top;return{top:o,left:0,width:e.width,height:l}}const ds=(t={})=>{const e=t.physics??ys,o=t.scaleOffset??ps;let{promise:l,resolve:s}=E();return{in:(n,a)=>{const i=hs(a),c=i.left+i.width/2,p=i.top+i.height/2;return{physics:e,prepare:()=>{n.style.opacity="0",n.style.willChange="transform, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.transformOrigin=`${c}px ${p}px`},wait:async()=>{if(l){await l;const r=E();l=r.promise,s=r.resolve}},css:r=>({transform:`scale(${1-o+r*o})`,opacity:r}),onEnd:()=>{n.style.opacity="1",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.transformOrigin=""}}},out:(n,a)=>({physics:e,prepare:()=>{$(n,a),n.style.willChange="opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:i=>({opacity:i}),onEnd:()=>{s&&s()}})}};exports.blind=K;exports.curtainReveal=ct;exports.depth=dt;exports.drill=gt;exports.fade=xt;exports.film=Tt;exports.hero=It;exports.instagram=Ut;exports.jaemin=Xt;exports.pinterest=Gt;exports.rotate=Kt;exports.scroll=Qt;exports.sheet=is;exports.slide=es;exports.snap=rs;exports.strip=cs;exports.swap=ds;