@ssgoi/core 2.5.5 → 3.0.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.
Files changed (68) hide show
  1. package/dist/animator/animate/css-runner.d.ts +17 -0
  2. package/dist/animator/animate/css-runner.d.ts.map +1 -0
  3. package/dist/animator/animate/index.d.ts +42 -0
  4. package/dist/animator/animate/index.d.ts.map +1 -0
  5. package/dist/animator/animate/tick-runner.d.ts +16 -0
  6. package/dist/animator/animate/tick-runner.d.ts.map +1 -0
  7. package/dist/animator/animate/types.d.ts +31 -0
  8. package/dist/animator/animate/types.d.ts.map +1 -0
  9. package/dist/animator/animation.d.ts +57 -0
  10. package/dist/animator/animation.d.ts.map +1 -0
  11. package/dist/animator/index.d.ts +34 -33
  12. package/dist/animator/index.d.ts.map +1 -1
  13. package/dist/animator/multi-animator.d.ts +98 -0
  14. package/dist/animator/multi-animator.d.ts.map +1 -0
  15. package/dist/animator/spring-core.d.ts +63 -0
  16. package/dist/animator/spring-core.d.ts.map +1 -0
  17. package/dist/index.cjs +2 -2
  18. package/dist/index.js +700 -818
  19. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
  20. package/dist/ssgoi-transition/create-swipe-detector.d.ts +1 -0
  21. package/dist/ssgoi-transition/create-swipe-detector.d.ts.map +1 -1
  22. package/dist/transition/create-transition-callback.d.ts +2 -2
  23. package/dist/transition/create-transition-callback.d.ts.map +1 -1
  24. package/dist/transition/transition-strategy.d.ts +28 -17
  25. package/dist/transition/transition-strategy.d.ts.map +1 -1
  26. package/dist/transition/transition.d.ts +2 -18
  27. package/dist/transition/transition.d.ts.map +1 -1
  28. package/dist/transitions/blur.d.ts +5 -5
  29. package/dist/transitions/blur.d.ts.map +1 -1
  30. package/dist/transitions/bounce.d.ts +5 -5
  31. package/dist/transitions/bounce.d.ts.map +1 -1
  32. package/dist/transitions/fade.d.ts +5 -5
  33. package/dist/transitions/fade.d.ts.map +1 -1
  34. package/dist/transitions/fly.d.ts +5 -5
  35. package/dist/transitions/fly.d.ts.map +1 -1
  36. package/dist/transitions/index.cjs +1 -1
  37. package/dist/transitions/index.js +206 -207
  38. package/dist/transitions/mask.d.ts +5 -5
  39. package/dist/transitions/mask.d.ts.map +1 -1
  40. package/dist/transitions/none.d.ts +3 -3
  41. package/dist/transitions/none.d.ts.map +1 -1
  42. package/dist/transitions/rotate.d.ts +5 -5
  43. package/dist/transitions/rotate.d.ts.map +1 -1
  44. package/dist/transitions/scale.d.ts +5 -5
  45. package/dist/transitions/scale.d.ts.map +1 -1
  46. package/dist/transitions/slide.d.ts +5 -5
  47. package/dist/transitions/slide.d.ts.map +1 -1
  48. package/dist/types.cjs +1 -1
  49. package/dist/types.d.ts +142 -102
  50. package/dist/types.d.ts.map +1 -1
  51. package/dist/types.js +69 -6
  52. package/dist/view-transitions/blind.d.ts +0 -1
  53. package/dist/view-transitions/blind.d.ts.map +1 -1
  54. package/dist/view-transitions/drill.d.ts.map +1 -1
  55. package/dist/view-transitions/fade.d.ts.map +1 -1
  56. package/dist/view-transitions/hero.d.ts.map +1 -1
  57. package/dist/view-transitions/index.cjs +13 -13
  58. package/dist/view-transitions/index.js +499 -492
  59. package/dist/view-transitions/scroll.d.ts.map +1 -1
  60. package/dist/view-transitions/slide.d.ts.map +1 -1
  61. package/dist/view-transitions/strip.d.ts.map +1 -1
  62. package/package.json +1 -1
  63. package/dist/animator/animate.d.ts +0 -35
  64. package/dist/animator/animate.d.ts.map +0 -1
  65. package/dist/animator/animation-scheduler.d.ts +0 -47
  66. package/dist/animator/animation-scheduler.d.ts.map +0 -1
  67. package/dist/test-utils.d.ts +0 -46
  68. package/dist/test-utils.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../jaemin-BG8HRXG1.cjs"),Y=t=>new Promise(n=>setTimeout(n,t));function V(t,n=0){const i=Math.pow(10,n);return Math.round(t*i)/i}const q={stiffness:80,damping:25},G={stiffness:75,damping:25},j=300,K=10,Z="horizontal",J="#000000",Q=(t={})=>{const{inSpring:n=G,outSpring:i=q,transitionDelay:d=j,blindCount:r=K,direction:s=Z,staggerDelay:c=100,blindColor:e=J}=t;let a,l=null;const o=(p,g,u="left")=>{window.getComputedStyle(p).position==="static"&&(p.style.position="relative");const h=document.createElement("div");h.className="blind-container",h.style.cssText=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../jaemin-BG8HRXG1.cjs"),F=t=>new Promise(n=>setTimeout(n,t)),N={stiffness:80,damping:25},q={stiffness:75,damping:25},G=300,j=10,K="horizontal",Z="#000000",J=(t={})=>{const{inSpring:n=q,outSpring:r=N,transitionDelay:d=G,blindCount:s=j,direction:a=K,blindColor:c=Z}=t;let i,o=null;const l=(e,g,p="left")=>{window.getComputedStyle(e).position==="static"&&(e.style.position="relative");const y=document.createElement("div");y.className="blind-container",y.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 f=[];for(let $=0;$<r;$++){const w=document.createElement("div");if(s==="horizontal"){const x=100/r,S=`calc(${x}% + 1px)`;w.style.cssText=`
10
+ `;const h=[];for(let f=0;f<s;f++){const $=document.createElement("div");if(a==="horizontal"){const w=100/s,x=`calc(${w}% + 1px)`;$.style.cssText=`
11
11
  position: absolute;
12
- top: ${x*$}%;
12
+ top: ${w*f}%;
13
13
  left: 0;
14
14
  width: 100%;
15
- height: ${S};
16
- background: ${e};
15
+ height: ${x};
16
+ background: ${c};
17
17
  transform: scaleX(${g==="hidden"?0:1});
18
- transform-origin: ${u} center;
18
+ transform-origin: ${p} center;
19
19
  will-change: transform;
20
- `}else{const x=100/r,S=`calc(${x}% + 1px)`;w.style.cssText=`
20
+ `}else{const w=100/s,x=`calc(${w}% + 1px)`;$.style.cssText=`
21
21
  position: absolute;
22
22
  top: 0;
23
- left: ${x*$}%;
24
- width: ${S};
23
+ left: ${w*f}%;
24
+ width: ${x};
25
25
  height: 100%;
26
- background: ${e};
26
+ background: ${c};
27
27
  transform: scaleY(${g==="hidden"?0:1});
28
- transform-origin: ${u==="left"?"top":"bottom"} center;
28
+ transform-origin: ${p==="left"?"top":"bottom"} center;
29
29
  will-change: transform;
30
- `}f.push(w),h.appendChild(w)}return p.appendChild(h),{container:h,blinds:f}};return{out:()=>{let p=null;return a=new Promise(u=>{l=u}),{springs:Array.from({length:r},(u,y)=>({from:0,to:1,spring:i,offset:y*c,tick:h=>{if(!p)return;const f=p.blinds[y];f&&(s==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:u=>{b.prepareOutgoing(u),u.style.zIndex="1000",p=o(u,"hidden","left")},onStart:()=>{},onEnd:()=>{l&&l()}}},in:()=>{let p=null;return{springs:Array.from({length:r},(u,y)=>({from:1,to:0,spring:n,offset:y*c,tick:h=>{if(!p)return;const f=p.blinds[y];f&&(s==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:u=>{u.style.position="relative",u.style.zIndex="0",p=o(u,"closed","right")},onStart:()=>{},wait:async()=>{a&&await a,await Y(d)},onEnd:()=>{p&&p.container&&p.container.remove()}}}}},R={stiffness:150,damping:20},tt={stiffness:100,damping:20},nt=(t={})=>{var s,c;const{opacity:n=!1,direction:i="enter"}=t,d=i==="enter"?R:tt,r={stiffness:((s=t.spring)==null?void 0:s.stiffness)??d.stiffness,damping:((c=t.spring)==null?void 0:c.damping)??d.damping};return i==="enter"?{in:e=>({spring:r,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform",e.style.backfaceVisibility="hidden",e.style.perspective="1000px",e.style.transformStyle="preserve-3d",e.style.contain="layout paint"},tick:a=>{e.style.transform=`translate3d(${(1-a)*100}%, 0, 0)`,n&&(e.style.opacity=a.toString())},onEnd:()=>{e.style.willChange="auto",e.style.backfaceVisibility="",e.style.perspective="",e.style.transformStyle="",e.style.contain=""}}),out:(e,a)=>({spring:r,prepare:l=>{b.prepareOutgoing(l,a),l.style.zIndex="-1",l.style.willChange=n?"transform, opacity":"transform",l.style.backfaceVisibility="hidden",l.style.perspective="1000px",l.style.transformStyle="preserve-3d",l.style.contain="layout paint",l.style.pointerEvents="none"},tick:l=>{e.style.transform=`translate3d(${-(1-l)*20}%, 0, 0)`,n&&(e.style.opacity=l.toString())}})}:{in:e=>({spring:r,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform",e.style.backfaceVisibility="hidden",e.style.perspective="1000px",e.style.transformStyle="preserve-3d",e.style.contain="layout paint"},tick:a=>{e.style.transform=`translate3d(${-(1-a)*20}%, 0, 0)`,n&&(e.style.opacity=a.toString())},onEnd:()=>{e.style.willChange="auto",e.style.backfaceVisibility="",e.style.perspective="",e.style.transformStyle="",e.style.contain=""}}),out:(e,a)=>({spring:r,prepare:l=>{b.prepareOutgoing(l,a),l.style.zIndex="100",l.style.willChange=n?"transform, opacity":"transform",l.style.backfaceVisibility="hidden",l.style.perspective="1000px",l.style.transformStyle="preserve-3d",l.style.contain="layout paint",l.style.pointerEvents="none"},tick:l=>{e.style.transform=`translate3d(${(1-l)*100}%, 0, 0)`,n&&(e.style.opacity=l.toString())}})}},et={stiffness:65,damping:16},it={stiffness:65,damping:14},st=0,rt=(t={})=>{const{inSpring:n=it,outSpring:i=et,transitionDelay:d=st}=t;let r,s=null;return{in:c=>({spring:n,prepare:e=>{e.style.opacity="0",e.style.willChange="opacity"},wait:async()=>{r&&(await r,await Y(d))},tick:e=>{const a=V(e,2);c.style.opacity=a.toString()},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>(r=new Promise(a=>{s=a}),{spring:i,tick:a=>{c.style.opacity=a.toString()},prepare:()=>{b.prepareOutgoing(c,e),c.style.willChange="opacity"},onEnd:()=>{s&&s(),c.style.willChange="auto"}})}},lt={stiffness:5,damping:3.5},at=.8,ot="white",m={start:0,end:.45},E={start:.85,end:1},A={start:.2,end:.9},ct=t=>{var r;const n=(t==null?void 0:t.spring)??lt,i=(t==null?void 0:t.scale)??at,d=((r=t==null?void 0:t.border)==null?void 0:r.color)??ot;return{out:async(s,c)=>{const e=v(c),a=b.getRect(document.body,c.positionedParent),l=ht(d,{...e,top:a.top});let o=1,p=-e.top;return{spring:n,prepare:()=>{b.prepareOutgoing(s),P(s,e),_(s,e),pt(s,e);for(const g of l)c.positionedParent.appendChild(g)},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",setTimeout(()=>{for(const g of l)c.positionedParent.removeChild(g)},1e3)},tick:g=>{const u=1-g;if(m.start<=u&&u<=m.end){const f=L(u,m.start,m.end);o=1-(1-i)*f}if(E.start<=u&&u<=E.end){const f=L(u,E.start,E.end);o=i+(1-i)*f}if(A.start<=u&&u<=A.end){const f=L(u,A.start,A.end);p=-e.top-e.height*f}s.style.transform=`translateY(${p}px) scale(${o})`;const y=(e.width-e.width*o)/2,h=(e.height-e.height*o)/2;dt(l,y,h)}}},in:async(s,c)=>{const e=v(c);let a=i,l=-e.top+e.height;return{spring:n,prepare:()=>{P(s,e),_(s,e),s.style.transform=`translateY(${-e.top+e.height}px) scale(${i})`},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",s.style.transform=""},tick:o=>{if(m.start<=o&&o<=m.end){const p=L(o,m.start,m.end);a=1-(1-i)*p}if(E.start<=o&&o<=E.end){const p=L(o,E.start,E.end);a=i+(1-i)*p}if(A.start<=o&&o<=A.end){const p=L(o,A.start,A.end);l=-e.top+e.height*(1-p)}s.style.transform=`translateY(${l}px) scale(${a})`}}}}};function dt(t,n,i){const d=n*.7,r=i*.7;t.topLeft.style.transform=`translate(${d}px, ${r}px)`,t.topRight.style.transform=`translate(${-d}px, ${r}px)`,t.bottomLeft.style.transform=`translate(${d}px, ${-r}px)`,t.bottomRight.style.transform=`translate(${-d}px, ${-r}px)`}function ht(t="white",n){const r=document.createElement("div");r.style.position="fixed",r.style.pointerEvents="none",r.style.zIndex="9999",r.style.top=`${n.top-1}px`,r.style.left=`${n.left-1}px`,r.style.width="15px",r.style.height="15px";const s=document.createElement("div");s.style.position="absolute",s.style.width="15px",s.style.height="1px",s.style.backgroundColor=t,s.style.top="0",s.style.left="0";const c=document.createElement("div");c.style.position="absolute",c.style.width="1px",c.style.height="15px",c.style.backgroundColor=t,c.style.top="0",c.style.left="0",r.appendChild(s),r.appendChild(c);const e=document.createElement("div");e.style.position="fixed",e.style.pointerEvents="none",e.style.zIndex="9999",e.style.top=`${n.top-1}px`,e.style.left=`${n.left+n.width-15+1}px`,e.style.width="15px",e.style.height="15px";const a=document.createElement("div");a.style.position="absolute",a.style.width="15px",a.style.height="1px",a.style.backgroundColor=t,a.style.top="0",a.style.right="0";const l=document.createElement("div");l.style.position="absolute",l.style.width="1px",l.style.height="15px",l.style.backgroundColor=t,l.style.top="0",l.style.right="0",e.appendChild(a),e.appendChild(l);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 p=document.createElement("div");p.style.position="absolute",p.style.width="15px",p.style.height="1px",p.style.backgroundColor=t,p.style.bottom="0",p.style.left="0";const g=document.createElement("div");g.style.position="absolute",g.style.width="1px",g.style.height="15px",g.style.backgroundColor=t,g.style.bottom="0",g.style.left="0",o.appendChild(p),o.appendChild(g);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 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.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.bottom="0",h.style.right="0",u.appendChild(y),u.appendChild(h),{topLeft:r,topRight:e,bottomLeft:o,bottomRight:u,*[Symbol.iterator](){yield r,yield e,yield o,yield u}}}function v(t){const n=b.getRect(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function P(t,n){const i=n.left+n.width/2,d=n.top+n.height/2;t.style.transformOrigin=`${i}px ${d}px`}function _(t,n){t.style.clipPath=`polygon(
30
+ `}h.push($),y.appendChild($)}return e.appendChild(y),{container:y,blinds:h}};return{out:()=>{let e=null;return i=new Promise(p=>{o=p}),{springs:Array.from({length:s},(p,u)=>({spring:r,offset:.2,tick:y=>{if(!e)return;const h=e.blinds[u];if(!h)return;const f=1-y;a==="horizontal"?h.style.transform=`scaleX(${f})`:h.style.transform=`scaleY(${f})`}})),schedule:"stagger",prepare:p=>{b.prepareOutgoing(p),p.style.zIndex="1000",e=l(p,"hidden","left")},onStart:()=>{},onEnd:()=>{o&&o()}}},in:()=>{let e=null;return{springs:Array.from({length:s},(p,u)=>({spring:n,offset:.2,tick:y=>{if(!e)return;const h=e.blinds[u];if(!h)return;const f=1-y;a==="horizontal"?h.style.transform=`scaleX(${f})`:h.style.transform=`scaleY(${f})`}})),schedule:"stagger",prepare:p=>{p.style.position="relative",p.style.zIndex="0",e=l(p,"closed","right")},onStart:()=>{},wait:async()=>{i&&await i,await F(d)},onEnd:()=>{e&&e.container&&e.container.remove()}}}}},Q={stiffness:150,damping:20},R={stiffness:100,damping:20},tt=(t={})=>{var a,c;const{opacity:n=!1,direction:r="enter"}=t,d=r==="enter"?Q:R,s={stiffness:((a=t.spring)==null?void 0:a.stiffness)??d.stiffness,damping:((c=t.spring)==null?void 0:c.damping)??d.damping};return r==="enter"?{in:i=>({spring:s,prepare:()=>{i.style.willChange=n?"transform, opacity":"transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},css:o=>{const l={transform:`translate3d(${(1-o)*100}%, 0, 0)`};return n&&(l.opacity=o),l},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}),out:(i,o)=>({spring:s,prepare:l=>{b.prepareOutgoing(l,o),l.style.zIndex="-1",l.style.willChange=n?"transform, opacity":"transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.pointerEvents="none"},css:l=>{const e={transform:`translate3d(${-(1-l)*20}%, 0, 0)`};return n&&(e.opacity=l),e}})}:{in:i=>({spring:s,prepare:()=>{i.style.willChange=n?"transform, opacity":"transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},css:o=>{const l={transform:`translate3d(${-(1-o)*20}%, 0, 0)`};return n&&(l.opacity=o),l},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}),out:(i,o)=>({spring:s,prepare:l=>{b.prepareOutgoing(l,o),l.style.zIndex="100",l.style.willChange=n?"transform, opacity":"transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.pointerEvents="none"},css:l=>{const e={transform:`translate3d(${(1-l)*100}%, 0, 0)`};return n&&(e.opacity=l),e}})}},nt={stiffness:65,damping:16},et={stiffness:65,damping:14},it=0,st=(t={})=>{const{inSpring:n=et,outSpring:r=nt,transitionDelay:d=it}=t;let s,a=null;return{in:c=>({spring:n,prepare:()=>{c.style.willChange="opacity"},wait:async()=>{s&&(await s,await F(d))},css:i=>({opacity:i}),onEnd:()=>{c.style.willChange="auto"}}),out:(c,i)=>(s=new Promise(o=>{a=o}),{spring:r,css:o=>({opacity:o}),prepare:()=>{b.prepareOutgoing(c,i),c.style.willChange="opacity"},onEnd:()=>{a&&a(),c.style.willChange="auto"}})}},rt={stiffness:5,damping:3.5},at=.8,lt="white",m={start:0,end:.45},E={start:.85,end:1},A={start:.2,end:.9},ot=t=>{var s;const n=(t==null?void 0:t.spring)??rt,r=(t==null?void 0:t.scale)??at,d=((s=t==null?void 0:t.border)==null?void 0:s.color)??lt;return{out:async(a,c)=>{const i=S(c),o=b.getRect(document.body,c.positionedParent),l=dt(d,{...i,top:o.top});let e=1,g=-i.top;return{spring:n,prepare:()=>{b.prepareOutgoing(a),_(a,i),P(a,i),ht(a,i);for(const p of l)c.positionedParent.appendChild(p)},onEnd:()=>{a.style.clipPath="",a.style.transformOrigin="",setTimeout(()=>{for(const p of l)c.positionedParent.removeChild(p)},1e3)},tick:p=>{const u=1-p;if(m.start<=u&&u<=m.end){const f=L(u,m.start,m.end);e=1-(1-r)*f}if(E.start<=u&&u<=E.end){const f=L(u,E.start,E.end);e=r+(1-r)*f}if(A.start<=u&&u<=A.end){const f=L(u,A.start,A.end);g=-i.top-i.height*f}a.style.transform=`translateY(${g}px) scale(${e})`;const y=(i.width-i.width*e)/2,h=(i.height-i.height*e)/2;ct(l,y,h)}}},in:async(a,c)=>{const i=S(c);let o=r,l=-i.top+i.height;return{spring:n,prepare:()=>{_(a,i),P(a,i),a.style.transform=`translateY(${-i.top+i.height}px) scale(${r})`},onEnd:()=>{a.style.clipPath="",a.style.transformOrigin="",a.style.transform=""},tick:e=>{if(m.start<=e&&e<=m.end){const g=L(e,m.start,m.end);o=1-(1-r)*g}if(E.start<=e&&e<=E.end){const g=L(e,E.start,E.end);o=r+(1-r)*g}if(A.start<=e&&e<=A.end){const g=L(e,A.start,A.end);l=-i.top+i.height*(1-g)}a.style.transform=`translateY(${l}px) scale(${o})`}}}}};function ct(t,n,r){const d=n*.7,s=r*.7;t.topLeft.style.transform=`translate(${d}px, ${s}px)`,t.topRight.style.transform=`translate(${-d}px, ${s}px)`,t.bottomLeft.style.transform=`translate(${d}px, ${-s}px)`,t.bottomRight.style.transform=`translate(${-d}px, ${-s}px)`}function dt(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 a=document.createElement("div");a.style.position="absolute",a.style.width="15px",a.style.height="1px",a.style.backgroundColor=t,a.style.top="0",a.style.left="0";const c=document.createElement("div");c.style.position="absolute",c.style.width="1px",c.style.height="15px",c.style.backgroundColor=t,c.style.top="0",c.style.left="0",s.appendChild(a),s.appendChild(c);const i=document.createElement("div");i.style.position="fixed",i.style.pointerEvents="none",i.style.zIndex="9999",i.style.top=`${n.top-1}px`,i.style.left=`${n.left+n.width-15+1}px`,i.style.width="15px",i.style.height="15px";const o=document.createElement("div");o.style.position="absolute",o.style.width="15px",o.style.height="1px",o.style.backgroundColor=t,o.style.top="0",o.style.right="0";const l=document.createElement("div");l.style.position="absolute",l.style.width="1px",l.style.height="15px",l.style.backgroundColor=t,l.style.top="0",l.style.right="0",i.appendChild(o),i.appendChild(l);const e=document.createElement("div");e.style.position="fixed",e.style.pointerEvents="none",e.style.zIndex="9999",e.style.top=`${n.top+n.height-15+1}px`,e.style.left=`${n.left-1}px`,e.style.width="15px",e.style.height="15px";const g=document.createElement("div");g.style.position="absolute",g.style.width="15px",g.style.height="1px",g.style.backgroundColor=t,g.style.bottom="0",g.style.left="0";const p=document.createElement("div");p.style.position="absolute",p.style.width="1px",p.style.height="15px",p.style.backgroundColor=t,p.style.bottom="0",p.style.left="0",e.appendChild(g),e.appendChild(p);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 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.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.bottom="0",h.style.right="0",u.appendChild(y),u.appendChild(h),{topLeft:s,topRight:i,bottomLeft:e,bottomRight:u,*[Symbol.iterator](){yield s,yield i,yield e,yield u}}}function S(t){const n=b.getRect(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function _(t,n){const r=n.left+n.width/2,d=n.top+n.height/2;t.style.transformOrigin=`${r}px ${d}px`}function P(t,n){t.style.clipPath=`polygon(
31
31
  ${n.left}px ${n.top}px,
32
32
  ${n.left+n.width}px ${n.top}px,
33
33
  ${n.left+n.width}px ${n.top+n.height}px,
34
34
  ${n.left}px ${n.top+n.height}px
35
- )`}function pt(t,n){t.style.transform=`translateY(${-n.top}px)`}function L(t,n,i){return t<=n?0:t>=i?1:(t-n)/(i-n)}function yt(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const ut=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??300,damping:((e=t.spring)==null?void 0:e.damping)??30},i=t.timeout??300,d=t.maxDistance??700;let r=null,s=null;return{in:async(a,l)=>{const o=a,p=Array.from(o.querySelectorAll("[data-hero-key]"));if(p.length===0)return{spring:n,tick:()=>{}};if(!await new Promise(y=>{r?y(!0):(s=y,setTimeout(()=>{s=null,y(!1)},i))})||!r)return r=null,{spring:n,tick:()=>{}};const u=p.map(y=>{const h=y.getAttribute("data-hero-key");if(!h)return null;const f=yt(r,h);if(!f)return null;const $=y,w=b.getRect(r,f),x=b.getRect(o,$),S=w.left-x.left-l.scrollOffset.x,U=w.top-x.top-l.scrollOffset.y,W=w.width/x.width,X=w.height/x.height,z=$.style.transform,B=$.style.position,M=$.style.transformOrigin,H=$.style.zIndex,N=$.style.willChange;return{toEl:$,dx:S,dy:U,dw:W,dh:X,originalTransform:z,originalPosition:B,originalTransformOrigin:M,originalZIndex:H,originalWillChange:N}}).filter(y=>y!==null&&Math.abs(y.dy)<=d);return r=null,u.length===0?{spring:n,tick:()=>{}}:{spring:n,prepare:()=>{u.forEach(({toEl:y})=>{y.style.position="relative",y.style.transformOrigin="top left",y.style.zIndex="1000",y.style.willChange="transform"})},tick:y=>{u.forEach(({toEl:h,dx:f,dy:$,dw:w,dh:x})=>{h.style.transform=`translate(${(1-y)*f}px,${(1-y)*$}px) scale(${y+(1-y)*w}, ${y+(1-y)*x})`})},onEnd:()=>{u.forEach(({toEl:y,originalTransform:h,originalPosition:f,originalTransformOrigin:$,originalZIndex:w,originalWillChange:x})=>{y.style.transform=h,y.style.position=f,y.style.transformOrigin=$,y.style.zIndex=w,y.style.willChange=x})}}},out:async a=>({onStart:()=>{r=a,s&&(s(!0),s=null)},prepare:l=>{b.prepareOutgoing(l),l.style.opacity="0"}})}};function gt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),o=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=o*h,$=p*h,w=g*h,x=u*h;r.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,r.style.transform=`translate(${s*h}px, ${c*h}px) scale(${1+(l-1)*h})`}}function ft({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),o=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=o*h,$=p*h,w=g*h,x=u*h;r.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,r.style.transform=`translate(${s*h-d.x}px, ${c*h-d.y}px) scale(${1+(l-1)*h})`}}function $t(t,n,i){const d=t.querySelector("[data-instagram-detail-key]"),r=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 s=null,c=null,e=!1;if(!d&&r){c=r;const o=c.getAttribute("data-instagram-detail-key");if(!o)return null;s=t.querySelector(`[data-instagram-gallery-key="${o}"]`),s&&(e=!0)}else if(d&&!r){c=d;const o=c.getAttribute("data-instagram-detail-key");if(!o)return null;s=n.querySelector(`[data-instagram-gallery-key="${o}"]`),s&&(e=!1)}if(!s||!c)return null;const a=b.getRect(e?t:n,s),l=b.getRect(e?n:t,c);return e?{isEnterMode:!0,inAnimation:gt({detailRect:l,galleryRect:a,pageRect:n.getBoundingClientRect(),scrollOffset:i},n)}:{isEnterMode:!1,outAnimation:ft({detailRect:l,galleryRect:a,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const xt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??150,damping:((e=t.spring)==null?void 0:e.damping)??20},i=t.timeout??300;let d=null,r=null,s=null;return{in:async(a,{scrollOffset:l})=>{const o=a;return!await new Promise(g=>{d?g(!0):(r=g,setTimeout(()=>{r=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(s=$t(d,o,l),s?(d=null,{spring:n,tick:g=>{s!=null&&s.inAnimation&&s.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async a=>({spring:n,onStart:()=>{d=a,r&&(r(!0),r=null)},prepare:l=>{b.prepareOutgoing(l),s!=null&&s.isEnterMode||(l.style.zIndex="-1")},tick:l=>{s!=null&&s.outAnimation&&s.outAnimation(l)}})}};function wt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),o=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=o*h,$=p*h,w=g*h,x=u*h;r.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,r.style.transform=`translate(${s*h}px, ${c*h}px) scale(${1+(l-1)*h})`}}function bt({galleryRect:t,detailRect:n,scrollOffset:i},d){const r=n.left-t.left+(n.width-t.width)/2+i.x,s=n.top-t.top+(n.height-t.height)/2+i.y,c=n.width/t.width,e=n.height/t.height,a=Math.max(c,e);return l=>{d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`;const o=1-l;d.style.transform=`translate(${r*o-i.x}px, ${s*o-i.y}px) scale(${1+(a-1)*o})`,d.style.opacity=`${1-o}`}}function mt({galleryRect:t,detailRect:n,scrollOffset:i},d){const r=n.left-t.left+(n.width-t.width)/2-i.x,s=n.top-t.top+(n.height-t.height)/2-i.y,c=n.width/t.width,e=n.height/t.height,a=Math.max(c,e);return l=>{const o=1-l,p=l;d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,d.style.transform=`translate(${r*o}px, ${s*o}px) scale(${1+(a-1)*o})`,d.style.opacity=`${p}`}}function Et({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),o=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=o*h,$=p*h,w=g*h,x=u*h;r.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,r.style.transform=`translate(${s*h-d.x}px, ${c*h-d.y}px) scale(${1+(l-1)*h})`}}function At(t,n,i){const d=t.querySelector("[data-pinterest-detail-key]"),r=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 s=null,c=null,e=!1;if(!d&&r){c=r;const o=c.getAttribute("data-pinterest-detail-key");if(!o)return null;s=t.querySelector(`[data-pinterest-gallery-key="${o}"]`),s&&(e=!0)}else if(d&&!r){c=d;const o=c.getAttribute("data-pinterest-detail-key");if(!o)return null;s=n.querySelector(`[data-pinterest-gallery-key="${o}"]`),s&&(e=!1)}if(!s||!c)return null;const a=b.getRect(e?t:n,s),l=b.getRect(e?n:t,c);return e?{inAnimation:wt({detailRect:l,galleryRect:a,pageRect:n.getBoundingClientRect(),scrollOffset:i},n),outAnimation:bt({galleryRect:a,detailRect:l,scrollOffset:i},t)}:{inAnimation:mt({galleryRect:a,detailRect:l,scrollOffset:i},n),outAnimation:Et({detailRect:l,galleryRect:a,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const Lt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??30,damping:((e=t.spring)==null?void 0:e.damping)??10},i=t.timeout??300;let d=null,r=null,s=null;return{in:async(a,{scrollOffset:l})=>{const o=a;return!await new Promise(g=>{d?g(!0):(r=g,setTimeout(()=>{r=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(s=At(d,o,l),s?(d=null,{spring:n,tick:g=>{s&&s.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async a=>({spring:n,onStart:()=>{d=a,r&&(r(!0),r=null)},prepare:l=>{b.prepareOutgoing(l),l.style.zIndex="-1"},tick:l=>{s&&s.outAnimation(l)}})}},I={stiffness:5,damping:4},St=(t={})=>{var a,l;const n=t.direction??"up",i={stiffness:((a=t.spring)==null?void 0:a.stiffness)??I.stiffness,damping:((l=t.spring)==null?void 0:l.damping)??I.damping},d=n==="up";let r=null,s=null,c=null;const e=()=>{if(r===null||s===null)return null;const o=Math.min(r,s),p=window.innerHeight;return Math.max(o,p)};return{in:o=>(s=o.offsetHeight,r!==null&&(c=e()),{spring:i,prepare:()=>{o.style.willChange="transform"},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*c:(1-p)*-c;o.style.transform=`translateY(${g}px)`},onEnd:()=>{o.style.willChange="auto"}}),out:o=>({spring:i,onStart:()=>{r=o.offsetHeight,s!==null&&(c=e())},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*-c:(1-p)*c;o.style.transform=`translateY(${g}px)`},prepare:p=>{b.prepareOutgoing(p),p.style.zIndex=d?"-1":"1",p.style.willChange="transform"}})}},D={stiffness:15,damping:7},Ct=(t={})=>{var r,s;const n=t.direction??"left",i={stiffness:((r=t.spring)==null?void 0:r.stiffness)??D.stiffness,damping:((s=t.spring)==null?void 0:s.damping)??D.damping},d=n==="left";return{in:c=>({spring:i,prepare:()=>{c.style.willChange="transform"},tick:e=>{const a=d?(1-e)*100:(1-e)*-100;c.style.transform=`translateX(${a}%)`},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>({spring:i,tick:a=>{const l=d?(1-a)*-100:(1-a)*100;c.style.transform=`translateX(${l}%)`},prepare:a=>{b.prepareOutgoing(a,e),a.style.zIndex=d?"-1":"1",a.style.willChange="transform"}})}},O={stiffness:17,damping:6},T=20,k=800,Tt=()=>{let t,n=null;return{in:i=>({spring:O,prepare:d=>{d.style.willChange="transform",d.style.transform=`perspective(${k}px) rotateY(${T}deg) translateX(-100%)`},wait:async()=>{t&&await t},tick:d=>{const r=(1-d)*T,s=-(1-d)*100;i.style.transform=`perspective(${k}px) rotateY(${r}deg) translateX(${s}%)`},onEnd:()=>{i.style.transform="",i.style.willChange="auto"}}),out:(i,d)=>(t=new Promise(r=>{n=r}),{spring:O,prepare:r=>{b.prepareOutgoing(r,d),r.style.willChange="transform"},tick:r=>{const s=1-r,c=s*T,e=s*100;i.style.transform=`perspective(${k}px) rotateY(${-c}deg) translateX(${e}%)`},onEnd:()=>{n&&n(),i.style.transform=""}})}},kt={stiffness:1,damping:1},vt={stiffness:20,damping:25},Pt="#000000",_t="circle",F="CURTAIN_REVEAL_OVERLAY_ID",It={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},Dt={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},Ot={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},Ft={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},Yt=.4,C=.5,Ut=.2;function Wt(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 i=n*100;return`polygon(50% ${50-i}%, ${50-i}% ${50+i}%, ${50+i}% ${50+i}%)`}}}const Xt=t=>t.reduce((n,i)=>n+i,0),zt=(t={})=>{const{background:n=Pt,texts:i=[],shape:d=_t,inSpring:r=vt,outSpring:s=kt,textStyle:c={}}=t;return{out:(e,a)=>{const l=e.style.opacity;return{spring:s,from:1,to:0,prepare:o=>{b.prepareOutgoing(o,a),o.style.opacity="1"},tick:o=>{const p=Math.max(0,o-Yt);e.style.opacity=String(p)},onEnd:()=>{e.style.opacity=l}}},in:e=>{let a=null,l=null,o=null;const p=document.body.style.overflow,g=document.getElementById(F);let u=[];const y=()=>{a=document.createElement("div"),a.id=F,Object.assign(a.style,It,{background:n}),document.body.appendChild(a),l=document.createElement("div"),Object.assign(l.style,Dt),a.appendChild(l),o=document.createElement("div"),Object.assign(o.style,Ot),l.appendChild(o),i.forEach(h=>{const f=document.createElement("div");f.textContent=h,Object.assign(f.style,Ft,c),o.appendChild(f)}),u=Array.from(o.children).map(h=>h.getBoundingClientRect().width)};return{spring:r,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",e.style.opacity="1",g==null||g.remove(),y(),a&&l&&(a.style.clipPath="none",l.style.transform="scale(1)")},tick:h=>{if(!(!a||!l||!o)){if(h<=C&&i.length>0){const f=h/C,$=Math.min(Math.floor(f*i.length),i.length-1),w=u[$]??0,x=Xt(u.slice(0,$));l.style.width=`${w}px`,o.style.transform=`translateX(-${x}px)`}if(h>C){const $=1-Math.max(0,Math.min(1,(h-C)/Ut));a.style.clipPath=Wt(d,$),l.style.transform=`scale(${$})`}}},onEnd:()=>{a==null||a.remove(),a=l=o=null,document.body.style.overflow=p}}}}};exports.jaemin=b.jaemin;exports.blind=Q;exports.curtainReveal=zt;exports.drill=nt;exports.fade=rt;exports.film=ct;exports.hero=ut;exports.instagram=xt;exports.pinterest=Lt;exports.scroll=St;exports.slide=Ct;exports.strip=Tt;
35
+ )`}function ht(t,n){t.style.transform=`translateY(${-n.top}px)`}function L(t,n,r){return t<=n?0:t>=r?1:(t-n)/(r-n)}function pt(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const yt=(t={})=>{var c,i;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??300,damping:((i=t.spring)==null?void 0:i.damping)??30},r=t.timeout??300,d=t.maxDistance??700;let s=null,a=null;return{in:async(o,l)=>{const e=o,g=Array.from(e.querySelectorAll("[data-hero-key]"));if(g.length===0)return{spring:n,tick:()=>{}};if(!await new Promise(y=>{s?y(!0):(a=y,setTimeout(()=>{a=null,y(!1)},r))})||!s)return s=null,{spring:n,tick:()=>{}};const u=g.map(y=>{const h=y.getAttribute("data-hero-key");if(!h)return null;const f=pt(s,h);if(!f)return null;const $=y,w=b.getRect(s,f),x=b.getRect(e,$),Y=w.left-x.left-l.scrollOffset.x,U=w.top-x.top-l.scrollOffset.y,V=w.width/x.width,W=w.height/x.height,H=$.style.transform,B=$.style.position,z=$.style.transformOrigin,X=$.style.zIndex,M=$.style.willChange;return{toEl:$,dx:Y,dy:U,dw:V,dh:W,originalTransform:H,originalPosition:B,originalTransformOrigin:z,originalZIndex:X,originalWillChange:M}}).filter(y=>y!==null&&Math.abs(y.dy)<=d);return s=null,u.length===0?{spring:n,tick:()=>{}}:{spring:n,prepare:()=>{u.forEach(({toEl:y})=>{y.style.position="relative",y.style.transformOrigin="top left",y.style.zIndex="1000",y.style.willChange="transform"})},tick:y=>{u.forEach(({toEl:h,dx:f,dy:$,dw:w,dh:x})=>{h.style.transform=`translate(${(1-y)*f}px,${(1-y)*$}px) scale(${y+(1-y)*w}, ${y+(1-y)*x})`})},onEnd:()=>{u.forEach(({toEl:y,originalTransform:h,originalPosition:f,originalTransformOrigin:$,originalZIndex:w,originalWillChange:x})=>{y.style.transform=h,y.style.position=f,y.style.transformOrigin=$,y.style.zIndex=w,y.style.willChange=x})}}},out:async o=>({onStart:()=>{s=o,a&&(a(!0),a=null)},tick:()=>{},prepare:l=>{b.prepareOutgoing(l),l.style.opacity="0"}})}};function ut({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:d},s){const a=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,i=n.width/t.width,o=n.height/t.height,l=Math.max(i,o),e=t.top/r.height*100,g=(r.width-(t.left+t.width))/r.width*100,p=(r.height-(t.top+t.height))/r.height*100,u=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=e*h,$=g*h,w=p*h,x=u*h;s.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,s.style.transform=`translate(${a*h}px, ${c*h}px) scale(${1+(l-1)*h})`}}function gt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:d},s){const a=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,i=n.width/t.width,o=n.height/t.height,l=Math.min(i,o),e=t.top/r.height*100,g=(r.width-(t.left+t.width))/r.width*100,p=(r.height-(t.top+t.height))/r.height*100,u=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=e*h,$=g*h,w=p*h,x=u*h;s.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,s.style.transform=`translate(${a*h-d.x}px, ${c*h-d.y}px) scale(${1+(l-1)*h})`}}function ft(t,n,r){const d=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 a=null,c=null,i=!1;if(!d&&s){c=s;const e=c.getAttribute("data-instagram-detail-key");if(!e)return null;a=t.querySelector(`[data-instagram-gallery-key="${e}"]`),a&&(i=!0)}else if(d&&!s){c=d;const e=c.getAttribute("data-instagram-detail-key");if(!e)return null;a=n.querySelector(`[data-instagram-gallery-key="${e}"]`),a&&(i=!1)}if(!a||!c)return null;const o=b.getRect(i?t:n,a),l=b.getRect(i?n:t,c);return i?{isEnterMode:!0,inAnimation:ut({detailRect:l,galleryRect:o,pageRect:n.getBoundingClientRect(),scrollOffset:r},n)}:{isEnterMode:!1,outAnimation:gt({detailRect:l,galleryRect:o,pageRect:t.getBoundingClientRect(),scrollOffset:r},t)}}const $t=(t={})=>{var c,i;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??150,damping:((i=t.spring)==null?void 0:i.damping)??20},r=t.timeout??300;let d=null,s=null,a=null;return{in:async(o,{scrollOffset:l})=>{const e=o;return!await new Promise(p=>{d?p(!0):(s=p,setTimeout(()=>{s=null,p(!1)},r))})||!d?(d=null,{spring:n,tick:()=>{}}):(a=ft(d,e,l),a?(d=null,{spring:n,tick:p=>{a!=null&&a.inAnimation&&a.inAnimation(p)}}):{spring:n,tick:()=>{}})},out:async o=>({spring:n,onStart:()=>{d=o,s&&(s(!0),s=null)},prepare:l=>{b.prepareOutgoing(l),a!=null&&a.isEnterMode||(l.style.zIndex="-1")},tick:l=>{a!=null&&a.outAnimation&&a.outAnimation(l)}})}};function wt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:d},s){const a=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,i=n.width/t.width,o=n.height/t.height,l=Math.max(i,o),e=t.top/r.height*100,g=(r.width-(t.left+t.width))/r.width*100,p=(r.height-(t.top+t.height))/r.height*100,u=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=e*h,$=g*h,w=p*h,x=u*h;s.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,s.style.transform=`translate(${a*h}px, ${c*h}px) scale(${1+(l-1)*h})`}}function xt({galleryRect:t,detailRect:n,scrollOffset:r},d){const s=n.left-t.left+(n.width-t.width)/2+r.x,a=n.top-t.top+(n.height-t.height)/2+r.y,c=n.width/t.width,i=n.height/t.height,o=Math.max(c,i);return l=>{d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`;const e=1-l;d.style.transform=`translate(${s*e-r.x}px, ${a*e-r.y}px) scale(${1+(o-1)*e})`,d.style.opacity=`${1-e}`}}function bt({galleryRect:t,detailRect:n,scrollOffset:r},d){const s=n.left-t.left+(n.width-t.width)/2-r.x,a=n.top-t.top+(n.height-t.height)/2-r.y,c=n.width/t.width,i=n.height/t.height,o=Math.max(c,i);return l=>{const e=1-l,g=l;d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,d.style.transform=`translate(${s*e}px, ${a*e}px) scale(${1+(o-1)*e})`,d.style.opacity=`${g}`}}function mt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:d},s){const a=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,i=n.width/t.width,o=n.height/t.height,l=Math.min(i,o),e=t.top/r.height*100,g=(r.width-(t.left+t.width))/r.width*100,p=(r.height-(t.top+t.height))/r.height*100,u=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=e*h,$=g*h,w=p*h,x=u*h;s.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,s.style.transform=`translate(${a*h-d.x}px, ${c*h-d.y}px) scale(${1+(l-1)*h})`}}function Et(t,n,r){const d=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 a=null,c=null,i=!1;if(!d&&s){c=s;const e=c.getAttribute("data-pinterest-detail-key");if(!e)return null;a=t.querySelector(`[data-pinterest-gallery-key="${e}"]`),a&&(i=!0)}else if(d&&!s){c=d;const e=c.getAttribute("data-pinterest-detail-key");if(!e)return null;a=n.querySelector(`[data-pinterest-gallery-key="${e}"]`),a&&(i=!1)}if(!a||!c)return null;const o=b.getRect(i?t:n,a),l=b.getRect(i?n:t,c);return i?{inAnimation:wt({detailRect:l,galleryRect:o,pageRect:n.getBoundingClientRect(),scrollOffset:r},n),outAnimation:xt({galleryRect:o,detailRect:l,scrollOffset:r},t)}:{inAnimation:bt({galleryRect:o,detailRect:l,scrollOffset:r},n),outAnimation:mt({detailRect:l,galleryRect:o,pageRect:t.getBoundingClientRect(),scrollOffset:r},t)}}const At=(t={})=>{var c,i;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??30,damping:((i=t.spring)==null?void 0:i.damping)??10},r=t.timeout??300;let d=null,s=null,a=null;return{in:async(o,{scrollOffset:l})=>{const e=o;return!await new Promise(p=>{d?p(!0):(s=p,setTimeout(()=>{s=null,p(!1)},r))})||!d?(d=null,{spring:n,tick:()=>{}}):(a=Et(d,e,l),a?(d=null,{spring:n,tick:p=>{a&&a.inAnimation(p)}}):{spring:n,tick:()=>{}})},out:async o=>({spring:n,onStart:()=>{d=o,s&&(s(!0),s=null)},prepare:l=>{b.prepareOutgoing(l),l.style.zIndex="-1"},tick:l=>{a&&a.outAnimation(l)}})}},I={stiffness:5,damping:4},Lt=(t={})=>{var o,l;const n=t.direction??"up",r={stiffness:((o=t.spring)==null?void 0:o.stiffness)??I.stiffness,damping:((l=t.spring)==null?void 0:l.damping)??I.damping},d=n==="up";let s=null,a=null,c=null;const i=()=>{if(s===null||a===null)return null;const e=Math.min(s,a),g=window.innerHeight;return Math.max(e,g)};return{in:e=>(a=e.offsetHeight,s!==null&&(c=i()),{spring:r,prepare:()=>{e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.style.contain="layout paint"},tick:g=>{c===null&&(c=i());const p=c??window.innerHeight,u=d?(1-g)*p:(1-g)*-p;e.style.transform=`translate3d(0, ${u}px, 0)`},onEnd:()=>{e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain=""}}),out:(e,g)=>({spring:r,onStart:()=>{s=e.offsetHeight,a!==null&&(c=i())},tick:p=>{c===null&&(c=i());const u=c??window.innerHeight,y=d?(1-p)*-u:(1-p)*u;e.style.transform=`translate3d(0, ${y}px, 0)`},prepare:p=>{b.prepareOutgoing(p,g),p.style.zIndex=d?"-1":"1",p.style.willChange="transform",p.style.backfaceVisibility="hidden",p.style.contain="layout paint",p.style.pointerEvents="none"}})}},v={stiffness:15,damping:7},Ct=(t={})=>{var s,a;const n=t.direction??"left",r={stiffness:((s=t.spring)==null?void 0:s.stiffness)??v.stiffness,damping:((a=t.spring)==null?void 0:a.damping)??v.damping},d=n==="left";return{in:c=>({spring:r,prepare:()=>{c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint"},css:i=>({transform:`translate3d(${d?(1-i)*100:(1-i)*-100}%, 0, 0)`}),onEnd:()=>{c.style.willChange="auto",c.style.backfaceVisibility="",c.style.contain=""}}),out:(c,i)=>({spring:r,css:o=>({transform:`translate3d(${d?(1-o)*-100:(1-o)*100}%, 0, 0)`}),prepare:o=>{b.prepareOutgoing(o,i),o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint",o.style.pointerEvents="none"}})}},D={stiffness:17,damping:6},k=20,C=800,Tt=()=>{let t,n=null;return{in:r=>({spring:D,prepare:()=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.transform=`perspective(${C}px) rotateY(${k}deg) translate3d(-100%, 0, 0)`},wait:async()=>{t&&await t},css:d=>{const s=(1-d)*k,a=-(1-d)*100;return{transform:`perspective(${C}px) rotateY(${s}deg) translate3d(${a}%, 0, 0)`}},onEnd:()=>{r.style.transform="",r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain=""}}),out:(r,d)=>(t=new Promise(s=>{n=s}),{spring:D,prepare:s=>{b.prepareOutgoing(s,d),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${C}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:s=>{const a=1-s,c=a*k,i=a*100;return{transform:`perspective(${C}px) rotateY(${-c}deg) translate3d(${i}%, 0, 0)`}},onEnd:()=>{n&&n(),r.style.transform=""}})}},kt={stiffness:1,damping:1},St={stiffness:20,damping:25},_t="#000000",Pt="circle",O="CURTAIN_REVEAL_OVERLAY_ID",It={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},vt={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},Dt={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},Ot={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},Ft=.4,T=.5,Yt=.2;function Ut(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 Vt=t=>t.reduce((n,r)=>n+r,0),Wt=(t={})=>{const{background:n=_t,texts:r=[],shape:d=Pt,inSpring:s=St,outSpring:a=kt,textStyle:c={}}=t;return{out:(i,o)=>{const l=i.style.opacity;return{spring:a,from:1,to:0,prepare:e=>{b.prepareOutgoing(e,o),e.style.opacity="1"},tick:e=>{const g=Math.max(0,e-Ft);i.style.opacity=String(g)},onEnd:()=>{i.style.opacity=l}}},in:i=>{let o=null,l=null,e=null;const g=document.body.style.overflow,p=document.getElementById(O);let u=[];const y=()=>{o=document.createElement("div"),o.id=O,Object.assign(o.style,It,{background:n}),document.body.appendChild(o),l=document.createElement("div"),Object.assign(l.style,vt),o.appendChild(l),e=document.createElement("div"),Object.assign(e.style,Dt),l.appendChild(e),r.forEach(h=>{const f=document.createElement("div");f.textContent=h,Object.assign(f.style,Ot,c),e.appendChild(f)}),u=Array.from(e.children).map(h=>h.getBoundingClientRect().width)};return{spring:s,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",i.style.opacity="1",p==null||p.remove(),y(),o&&l&&(o.style.clipPath="none",l.style.transform="scale(1)")},tick:h=>{if(!(!o||!l||!e)){if(h<=T&&r.length>0){const f=h/T,$=Math.min(Math.floor(f*r.length),r.length-1),w=u[$]??0,x=Vt(u.slice(0,$));l.style.width=`${w}px`,e.style.transform=`translateX(-${x}px)`}if(h>T){const $=1-Math.max(0,Math.min(1,(h-T)/Yt));o.style.clipPath=Ut(d,$),l.style.transform=`scale(${$})`}}},onEnd:()=>{o==null||o.remove(),o=l=e=null,document.body.style.overflow=g}}}}};exports.jaemin=b.jaemin;exports.blind=J;exports.curtainReveal=Wt;exports.drill=tt;exports.fade=st;exports.film=ot;exports.hero=yt;exports.instagram=$t;exports.pinterest=At;exports.scroll=Lt;exports.slide=Ct;exports.strip=Tt;