svg-scroll-draw 2.22.0 → 2.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/dist/angular/index.mjs +1 -1
- package/dist/aos/index.cjs +2 -2
- package/dist/aos/index.mjs +1 -1
- package/dist/aos/react/index.cjs +2 -2
- package/dist/aos/react/index.mjs +1 -1
- package/dist/astro/index.mjs +1 -1
- package/dist/cdn/aos.global.js +2 -2
- package/dist/cdn/scrollreveal.global.js +2 -2
- package/dist/cdn/vivus.global.js +1 -1
- package/dist/chunk-DWK6XXY6.mjs +2 -0
- package/dist/chunk-EAWFBJUR.mjs +2 -0
- package/dist/chunk-JCXMBI4G.mjs +2 -0
- package/dist/{chunk-VDTAYUAR.mjs → chunk-KV3WCPQ5.mjs} +1 -1
- package/dist/{chunk-PKY27MO4.mjs → chunk-VMUJMXKO.mjs} +1 -1
- package/dist/{chunk-N6PDF6O6.mjs → chunk-YNNA33A5.mjs} +1 -1
- package/dist/cinematic/index.mjs +1 -1
- package/dist/group/index.mjs +1 -1
- package/dist/horizontal/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/nuxt/index.mjs +1 -1
- package/dist/react/index.mjs +1 -1
- package/dist/reveal/index.mjs +1 -1
- package/dist/scrollreveal/index.cjs +2 -2
- package/dist/scrollreveal/index.mjs +1 -1
- package/dist/scrollreveal/react/index.cjs +2 -2
- package/dist/scrollreveal/react/index.mjs +1 -1
- package/dist/snap/index.mjs +1 -1
- package/dist/solid/index.mjs +1 -1
- package/dist/svelte/index.mjs +1 -1
- package/dist/text/index.mjs +1 -1
- package/dist/timeline/index.mjs +1 -1
- package/dist/video/index.mjs +1 -1
- package/dist/vivus/index.cjs +2 -2
- package/dist/vivus/index.d.mts +3 -0
- package/dist/vivus/index.d.ts +3 -0
- package/dist/vivus/index.mjs +1 -1
- package/dist/vivus/react/index.cjs +2 -2
- package/dist/vivus/react/index.mjs +1 -1
- package/dist/vue/index.mjs +1 -1
- package/dist/web-component/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-4T5R3ZTL.mjs +0 -2
- package/dist/chunk-OMI46IXL.mjs +0 -2
- package/dist/chunk-WQZKXAXK.mjs +0 -2
package/README.md
CHANGED
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
**[Live Demo](https://svg-scroll-draw.vercel.app)** · [npm](https://www.npmjs.com/package/svg-scroll-draw) · [Docs](https://svg-scroll-draw.vercel.app/docs) · [Examples](https://svg-scroll-draw.vercel.app/examples) · [Report a bug](https://github.com/DhruvilChauahan0210/ink-scroll/issues)
|
|
13
13
|
|
|
14
|
+
**Guides by framework:** [React](https://svg-scroll-draw.vercel.app/react-scroll-animation) · [Next.js](https://svg-scroll-draw.vercel.app/nextjs-scroll-animation) · [Vue](https://svg-scroll-draw.vercel.app/vue-scroll-animation) · [Nuxt](https://svg-scroll-draw.vercel.app/nuxt-scroll-animation) · [Svelte](https://svg-scroll-draw.vercel.app/svelte-scroll-animation) · [Solid](https://svg-scroll-draw.vercel.app/solid-scroll-animation) · [Angular](https://svg-scroll-draw.vercel.app/angular-scroll-animation) · [Astro](https://svg-scroll-draw.vercel.app/astro-scroll-animation)
|
|
15
|
+
|
|
16
|
+
**Compared with:** [GSAP](https://svg-scroll-draw.vercel.app/vs-gsap) · [Framer Motion](https://svg-scroll-draw.vercel.app/vs-framer-motion) · [Motion](https://svg-scroll-draw.vercel.app/vs-motion) · [AOS](https://svg-scroll-draw.vercel.app/vs-aos) · [Locomotive Scroll](https://svg-scroll-draw.vercel.app/vs-locomotive-scroll) · [ScrollMagic](https://svg-scroll-draw.vercel.app/vs-scrollmagic) · [Vivus](https://svg-scroll-draw.vercel.app/vs-vivus)
|
|
17
|
+
|
|
14
18
|
**Try it in your browser, no install:** [Vanilla JS on StackBlitz](https://stackblitz.com/github/DhruvilChauahan0210/ink-scroll/tree/main/examples/vanilla) · [React on StackBlitz](https://stackblitz.com/github/DhruvilChauahan0210/ink-scroll/tree/main/examples/react)
|
|
15
19
|
|
|
16
20
|
**Using an AI coding agent?** Give it the [svg-scroll-draw skill](https://github.com/DhruvilChauahan0210/ink-scroll/blob/main/skills/svg-scroll-draw/SKILL.md) or point it at [llms.txt](https://svg-scroll-draw.vercel.app/llms.txt).
|
|
@@ -421,7 +425,7 @@ WebKit and fails if any element differs at any scroll stop. AOS 3's `mirror`, `a
|
|
|
421
425
|
|
|
422
426
|
Differences, on purpose:
|
|
423
427
|
|
|
424
|
-
- `prefers-reduced-motion: reduce` shows every element in its final state, with no transition.
|
|
428
|
+
- `prefers-reduced-motion: reduce` shows every element in its final state, with no transition, also when the reader turns it on while the page is open.
|
|
425
429
|
- `disable: 'phone' | 'tablet' | 'mobile'` checks the viewport width, not the user agent.
|
|
426
430
|
- Trigger positions are re-measured on `load`, so images that finish late do not shift them.
|
|
427
431
|
- `AOS.destroy()` stops everything, for single-page apps that unmount the page.
|
|
@@ -476,7 +480,7 @@ Differences, on purpose:
|
|
|
476
480
|
|
|
477
481
|
- Nothing happens on import. ScrollReveal adds the `sr` class and `body { height: 100% }` as soon as its
|
|
478
482
|
script loads; this does both on the first `ScrollReveal()` call, keeping the import SSR-safe.
|
|
479
|
-
- `prefers-reduced-motion: reduce` shows every element in its final state, with no transition.
|
|
483
|
+
- `prefers-reduced-motion: reduce` shows every element in its final state, with no transition, also when the reader turns it on while the page is open.
|
|
480
484
|
|
|
481
485
|
---
|
|
482
486
|
|
|
@@ -521,7 +525,7 @@ in 0.4.6. Shapes become `<path>`s with the same `d` strings, and dashes get the
|
|
|
521
525
|
suite runs vivus 0.4.6 beside it across nine configurations and requires the SVG markup to match exactly
|
|
522
526
|
at every point of the animation. Like vivus, the clock is the animation frame.
|
|
523
527
|
|
|
524
|
-
One difference, on purpose: under `prefers-reduced-motion: reduce
|
|
528
|
+
One difference, on purpose: under `prefers-reduced-motion: reduce` (including when it is turned on mid-play), `play()` jumps to the end and still
|
|
525
529
|
fires its callbacks. When you want the stroke to follow the scroll instead of a clock, use
|
|
526
530
|
[`scrollDraw`](#scrolldraw--svg-path-drawing-v1-api-unchanged) from the same package.
|
|
527
531
|
|
|
@@ -637,9 +641,9 @@ devtools.highlight('#my-element'); // outline for 2 seconds
|
|
|
637
641
|
| `svg-scroll-draw/reveal` | 5.8 KB |
|
|
638
642
|
| `svg-scroll-draw/text` | 3.4 KB |
|
|
639
643
|
| `svg-scroll-draw/video` | 2.8 KB |
|
|
640
|
-
| `svg-scroll-draw/scrollreveal` | 4.
|
|
641
|
-
| `svg-scroll-draw/vivus` | 4.
|
|
642
|
-
| `svg-scroll-draw/aos` (styles included) | 3.
|
|
644
|
+
| `svg-scroll-draw/scrollreveal` | 4.7 KB |
|
|
645
|
+
| `svg-scroll-draw/vivus` | 4.2 KB |
|
|
646
|
+
| `svg-scroll-draw/aos` (styles included) | 3.2 KB |
|
|
643
647
|
| `svg-scroll-draw/snap` | 1.9 KB |
|
|
644
648
|
| `svg-scroll-draw/devtools` | 1.8 KB (dev only) |
|
|
645
649
|
| `svg-scroll-draw/pin` | 1.6 KB |
|
package/dist/angular/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-
|
|
1
|
+
import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-KV3WCPQ5.mjs';import {a as a$4}from'../chunk-DY5JCXVR.mjs';import {a as a$2}from'../chunk-WXUOF4NM.mjs';import {a as a$1}from'../chunk-LTCJVVSC.mjs';import {b as b$1}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';var r=class{constructor(t){this.create=t;this.instance=null;this.el=null;this.key="";}init(t,e){return this.destroy(),this.el=t,this.latest=e,this.key=a(e),this.instance=this.create(t,b(e,()=>this.latest)),this}update(t){return this.el?a(t)!==this.key?this.init(this.el,t):(this.latest=t,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(t){return this.instance?.seek(t),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},u=class extends r{constructor(){super(b$1);}init(t,e={}){return super.init(t,e)}},h=class extends r{constructor(){super(a$1);}},m=class extends r{constructor(){super(a$2);}},O=class extends r{constructor(){super(a$3);}init(t,e={}){return super.init(t,e)}},d=class extends r{constructor(){super(a$4);}init(t,e={}){return super.init(t,e)}};export{r as EngineRef,h as ScrollAnimateRef,m as ScrollCounterRef,u as ScrollDrawRef,d as ScrollTextRef,O as ScrollVideoRef};
|
package/dist/aos/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});function
|
|
2
|
-
`)}var a={...
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});function $(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function A(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=d=>e(!!d.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let o=t;return o.addListener?.(n),()=>o.removeListener?.(n)}var B=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function z(e,...t){B&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var _={offset:120,delay:0,duration:400,easing:"ease",once:false,mirror:false,anchorPlacement:"top-bottom",disable:false,startEvent:"DOMContentLoaded",disableMutationObserver:false,initClassName:"aos-init",animatedClassName:"aos-animate",useClassNames:false,throttleDelay:99,debounceDelay:50},G={"ease-in-back":"cubic-bezier(.6,-.28,.735,.045)","ease-out-back":"cubic-bezier(.175,.885,.32,1.275)","ease-in-out-back":"cubic-bezier(.68,-.55,.265,1.55)","ease-in-sine":"cubic-bezier(.47,0,.745,.715)","ease-out-sine":"cubic-bezier(.39,.575,.565,1)","ease-in-out-sine":"cubic-bezier(.445,.05,.55,.95)","ease-in-quad":"cubic-bezier(.55,.085,.68,.53)","ease-out-quad":"cubic-bezier(.25,.46,.45,.94)","ease-in-out-quad":"cubic-bezier(.455,.03,.515,.955)","ease-in-cubic":"cubic-bezier(.55,.055,.675,.19)","ease-out-cubic":"cubic-bezier(.215,.61,.355,1)","ease-in-out-cubic":"cubic-bezier(.645,.045,.355,1)","ease-in-quart":"cubic-bezier(.895,.03,.685,.22)","ease-out-quart":"cubic-bezier(.165,.84,.44,1)","ease-in-out-quart":"cubic-bezier(.77,0,.175,1)"},E="svg-scroll-draw-aos",i=(e,t)=>`translate3d(${e},${t},0)`,W=[["fade-up",i("0","100px")],["fade-down",i("0","-100px")],["fade-right",i("-100px","0")],["fade-left",i("100px","0")],["fade-up-right",i("-100px","100px")],["fade-up-left",i("100px","100px")],["fade-down-right",i("-100px","-100px")],["fade-down-left",i("100px","-100px")],["zoom-in","scale(.6)"],["zoom-out","scale(1.2)"],["zoom-in-up",`${i("0","100px")} scale(.6)`],["zoom-in-down",`${i("0","-100px")} scale(.6)`],["zoom-in-right",`${i("-100px","0")} scale(.6)`],["zoom-in-left",`${i("100px","0")} scale(.6)`],["zoom-out-up",`${i("0","100px")} scale(1.2)`],["zoom-out-down",`${i("0","-100px")} scale(1.2)`],["zoom-out-right",`${i("-100px","0")} scale(1.2)`],["zoom-out-left",`${i("100px","0")} scale(1.2)`],["slide-up",i("0","100%")],["slide-down",i("0","-100%")],["slide-right",i("-100%","0")],["slide-left",i("100%","0")],["flip-left","perspective(2500px) rotateY(-100deg)"],["flip-right","perspective(2500px) rotateY(100deg)"],["flip-up","perspective(2500px) rotateX(-100deg)"],["flip-down","perspective(2500px) rotateX(100deg)"]];function X(e){let t=`.${e}`,n=o=>`[data-aos^=${o}][data-aos^=${o}]`;return ["[data-aos][data-aos]{transition-duration:var(--aos-duration,400ms);transition-timing-function:var(--aos-easing,ease);transition-delay:0s}",`[data-aos][data-aos]${t}{transition-delay:var(--aos-delay,0ms)}`,`${n("fade")}{opacity:0;transition-property:opacity,transform}`,`${n("fade")}${t}{opacity:1;transform:translateZ(0)}`,`${n("zoom")}{opacity:0;transition-property:opacity,transform}`,`${n("zoom")}${t}{opacity:1;transform:translateZ(0) scale(1)}`,`${n("slide")}{transition-property:transform}`,`${n("slide")}${t}{transform:translateZ(0)}`,`${n("flip")}{backface-visibility:hidden;transition-property:transform}`,...W.map(([o,d])=>`[data-aos=${o}]{transform:${d}}`),...["left","right"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateY(0)}`),...["up","down"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateX(0)}`),"[data-aos-instant][data-aos-instant]{transition:none!important}"].join(`
|
|
2
|
+
`)}var a={..._},s=[],l=false,b=0,L,v=null,c=null,m=false,p=null,C=()=>typeof window<"u"&&typeof document<"u";function N(e){if(!(e instanceof HTMLElement))return e.getBoundingClientRect().top+window.scrollY;let t=0,n=e;for(;n;)t+=n.offsetTop-(n.tagName!=="BODY"?n.scrollTop:0),n=n.offsetParent;return t}var D=e=>e instanceof HTMLElement?e.offsetHeight:e.getBoundingClientRect().height;function u(e,t){return e.getAttribute(`data-aos-${t}`)}function S(e,t,n){let o=u(e,t);return o==="true"?true:o==="false"?false:n}function R(e,t){let n=u(e,"offset");return n&&!isNaN(Number(n))?parseInt(n,10):n||t?0:a.offset}function Z(e){let t=window.innerHeight,n=u(e,"anchor-placement"),o=R(e,n),d=u(e,"anchor"),M=d?document.querySelector(d):null;d&&!M&&z(`aos: data-aos-anchor="${d}" matches nothing; using the element itself`);let x=M||e,f=D(x),r=N(x)-t;switch(n||a.anchorPlacement){case "center-bottom":r+=f/2;break;case "bottom-bottom":r+=f;break;case "top-center":r+=t/2;break;case "center-center":r+=t/2+f/2;break;case "bottom-center":r+=t/2+f;break;case "top-top":r+=t;break;case "bottom-top":r+=t+f;break;case "center-top":r+=t+f/2;break;}return r+o}function j(e){return N(e)+D(e)-R(e,null)}function U(e){let t=u(e,"duration")??String(a.duration),n=u(e,"delay")??String(a.delay),o=u(e,"easing")??a.easing;e.style.setProperty("--aos-duration",`${parseFloat(t)||0}ms`),e.style.setProperty("--aos-delay",`${parseFloat(n)||0}ms`),e.style.setProperty("--aos-easing",G[o]??o);}function H(){s=Array.from(document.querySelectorAll("[data-aos]")).map(e=>{let t=s.find(n=>n.node===e);return {node:e,in:0,out:0,once:S(e,"once",a.once),mirror:S(e,"mirror",a.mirror),animated:t?t.animated:e.classList.contains(a.animatedClassName),classes:a.useClassNames?(e.getAttribute("data-aos")||"").split(" ").filter(Boolean):[],id:u(e,"id")}});for(let e of s)U(e.node),e.node.classList.add(a.initClassName);}function k(){for(let e of s)e.in=Z(e.node),e.out=j(e.node);}function q(e,t){document.dispatchEvent(new CustomEvent(`aos:${e}`,{detail:t.node})),t.id&&document.dispatchEvent(new CustomEvent(`aos:${e}:${t.id}`,{detail:t.node}));}function O(e){e.animated||(e.animated=true,e.node.classList.add(a.animatedClassName,...e.classes),q("in",e));}function T(e){e.animated&&(e.animated=false,e.node.classList.remove(a.animatedClassName,...e.classes),q("out",e));}function g(){b=0;let e=window.scrollY;for(let t of s){if(m){O(t);continue}t.mirror&&!t.once&&e>t.out?T(t):e>t.in?O(t):t.once||T(t);}}var I=()=>{b||(b=requestAnimationFrame(g));};function y(){clearTimeout(L),L=setTimeout(h,50);}var P=()=>h();function Q(){let e=a.disable;if(typeof e=="function")return e();if(e===true)return true;let t=window.innerWidth;return e==="phone"?t<768:e==="tablet"?t>=768&&t<1024:e==="mobile"?t<1024:false}function F(){document.querySelectorAll("[data-aos]").forEach(e=>{for(let t of ["data-aos","data-aos-easing","data-aos-duration","data-aos-delay"])e.removeAttribute(t);});}function J(){if(document.getElementById(E))return;let e=document.createElement("style");e.id=E,e.textContent=X(a.animatedClassName),document.head.appendChild(e);}function w(){if(!l){if(l=true,c=null,H(),m)for(let e of s)e.node.setAttribute("data-aos-instant","");k(),g(),window.addEventListener("scroll",I,{passive:true}),window.addEventListener("resize",y),window.addEventListener("orientationchange",y),window.addEventListener("load",P),!a.disableMutationObserver&&typeof MutationObserver<"u"&&(v=new MutationObserver(e=>{e.some(n=>[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].some(o=>o instanceof Element&&(o.hasAttribute("data-aos")||o.querySelector("[data-aos]"))))&&V();}),v.observe(document.documentElement,{childList:true,subtree:true}));}}function K(e={}){if(!C())return [];if((l||c)&&Y(),a={..._,...e},Q())return F(),[];m=$(),m||(p=A(n=>{if(n&&(p?.(),p=null,m=true,!!l)){for(let o of s)o.node.setAttribute("data-aos-instant","");g();}})),J();let t=document.readyState!=="loading";if(a.startEvent==="DOMContentLoaded"&&t)w();else if(a.startEvent==="load"&&document.readyState==="complete")w();else {let n=a.startEvent==="load"?window:document,o=()=>w();n.addEventListener(a.startEvent,o,{once:true}),c={target:n,type:a.startEvent,fn:o};}return Array.from(document.querySelectorAll("[data-aos]"))}function h(){l&&(k(),g());}function V(){if(l){if(Q()){F();return}H(),h();}}function Y(){if(C()){c&&c.target.removeEventListener(c.type,c.fn),c=null,cancelAnimationFrame(b),b=0,clearTimeout(L),window.removeEventListener("scroll",I),window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),window.removeEventListener("load",P),v?.disconnect(),v=null,p?.(),p=null;for(let e of s)e.node.removeAttribute("data-aos-instant");s=[],l=false,document.getElementById(E)?.remove();}}var ee={init:K,refresh:h,refreshHard:V,destroy:Y},se=ee;exports.default=se;exports.destroy=Y;exports.init=K;exports.refresh=h;exports.refreshHard=V;
|
package/dist/aos/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as default,d as destroy,a as init,b as refresh,c as refreshHard}from'../chunk-
|
|
1
|
+
export{e as default,d as destroy,a as init,b as refresh,c as refreshHard}from'../chunk-JCXMBI4G.mjs';import'../chunk-AJ22VSHC.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-LFSU6LR3.mjs';
|
package/dist/aos/react/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var react=require('react');function O(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}var
|
|
3
|
-
`)}var a={...
|
|
2
|
+
'use strict';var react=require('react');function O(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function S(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=d=>e(!!d.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let o=t;return o.addListener?.(n),()=>o.removeListener?.(n)}var X=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function $(e,...t){X&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var C={offset:120,delay:0,duration:400,easing:"ease",once:false,mirror:false,anchorPlacement:"top-bottom",disable:false,startEvent:"DOMContentLoaded",disableMutationObserver:false,initClassName:"aos-init",animatedClassName:"aos-animate",useClassNames:false,throttleDelay:99,debounceDelay:50},Z={"ease-in-back":"cubic-bezier(.6,-.28,.735,.045)","ease-out-back":"cubic-bezier(.175,.885,.32,1.275)","ease-in-out-back":"cubic-bezier(.68,-.55,.265,1.55)","ease-in-sine":"cubic-bezier(.47,0,.745,.715)","ease-out-sine":"cubic-bezier(.39,.575,.565,1)","ease-in-out-sine":"cubic-bezier(.445,.05,.55,.95)","ease-in-quad":"cubic-bezier(.55,.085,.68,.53)","ease-out-quad":"cubic-bezier(.25,.46,.45,.94)","ease-in-out-quad":"cubic-bezier(.455,.03,.515,.955)","ease-in-cubic":"cubic-bezier(.55,.055,.675,.19)","ease-out-cubic":"cubic-bezier(.215,.61,.355,1)","ease-in-out-cubic":"cubic-bezier(.645,.045,.355,1)","ease-in-quart":"cubic-bezier(.895,.03,.685,.22)","ease-out-quart":"cubic-bezier(.165,.84,.44,1)","ease-in-out-quart":"cubic-bezier(.77,0,.175,1)"},L="svg-scroll-draw-aos",r=(e,t)=>`translate3d(${e},${t},0)`,j=[["fade-up",r("0","100px")],["fade-down",r("0","-100px")],["fade-right",r("-100px","0")],["fade-left",r("100px","0")],["fade-up-right",r("-100px","100px")],["fade-up-left",r("100px","100px")],["fade-down-right",r("-100px","-100px")],["fade-down-left",r("100px","-100px")],["zoom-in","scale(.6)"],["zoom-out","scale(1.2)"],["zoom-in-up",`${r("0","100px")} scale(.6)`],["zoom-in-down",`${r("0","-100px")} scale(.6)`],["zoom-in-right",`${r("-100px","0")} scale(.6)`],["zoom-in-left",`${r("100px","0")} scale(.6)`],["zoom-out-up",`${r("0","100px")} scale(1.2)`],["zoom-out-down",`${r("0","-100px")} scale(1.2)`],["zoom-out-right",`${r("-100px","0")} scale(1.2)`],["zoom-out-left",`${r("100px","0")} scale(1.2)`],["slide-up",r("0","100%")],["slide-down",r("0","-100%")],["slide-right",r("-100%","0")],["slide-left",r("100%","0")],["flip-left","perspective(2500px) rotateY(-100deg)"],["flip-right","perspective(2500px) rotateY(100deg)"],["flip-up","perspective(2500px) rotateX(-100deg)"],["flip-down","perspective(2500px) rotateX(100deg)"]];function U(e){let t=`.${e}`,n=o=>`[data-aos^=${o}][data-aos^=${o}]`;return ["[data-aos][data-aos]{transition-duration:var(--aos-duration,400ms);transition-timing-function:var(--aos-easing,ease);transition-delay:0s}",`[data-aos][data-aos]${t}{transition-delay:var(--aos-delay,0ms)}`,`${n("fade")}{opacity:0;transition-property:opacity,transform}`,`${n("fade")}${t}{opacity:1;transform:translateZ(0)}`,`${n("zoom")}{opacity:0;transition-property:opacity,transform}`,`${n("zoom")}${t}{opacity:1;transform:translateZ(0) scale(1)}`,`${n("slide")}{transition-property:transform}`,`${n("slide")}${t}{transform:translateZ(0)}`,`${n("flip")}{backface-visibility:hidden;transition-property:transform}`,...j.map(([o,d])=>`[data-aos=${o}]{transform:${d}}`),...["left","right"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateY(0)}`),...["up","down"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateX(0)}`),"[data-aos-instant][data-aos-instant]{transition:none!important}"].join(`
|
|
3
|
+
`)}var a={...C},s=[],l=false,b=0,A,v=null,c=null,m=false,p=null,N=()=>typeof window<"u"&&typeof document<"u";function D(e){if(!(e instanceof HTMLElement))return e.getBoundingClientRect().top+window.scrollY;let t=0,n=e;for(;n;)t+=n.offsetTop-(n.tagName!=="BODY"?n.scrollTop:0),n=n.offsetParent;return t}var R=e=>e instanceof HTMLElement?e.offsetHeight:e.getBoundingClientRect().height;function u(e,t){return e.getAttribute(`data-aos-${t}`)}function z(e,t,n){let o=u(e,t);return o==="true"?true:o==="false"?false:n}function k(e,t){let n=u(e,"offset");return n&&!isNaN(Number(n))?parseInt(n,10):n||t?0:a.offset}function K(e){let t=window.innerHeight,n=u(e,"anchor-placement"),o=k(e,n),d=u(e,"anchor"),x=d?document.querySelector(d):null;d&&!x&&$(`aos: data-aos-anchor="${d}" matches nothing; using the element itself`);let M=x||e,f=R(M),i=D(M)-t;switch(n||a.anchorPlacement){case "center-bottom":i+=f/2;break;case "bottom-bottom":i+=f;break;case "top-center":i+=t/2;break;case "center-center":i+=t/2+f/2;break;case "bottom-center":i+=t/2+f;break;case "top-top":i+=t;break;case "bottom-top":i+=t+f;break;case "center-top":i+=t+f/2;break;}return i+o}function J(e){return D(e)+R(e)-k(e,null)}function ee(e){let t=u(e,"duration")??String(a.duration),n=u(e,"delay")??String(a.delay),o=u(e,"easing")??a.easing;e.style.setProperty("--aos-duration",`${parseFloat(t)||0}ms`),e.style.setProperty("--aos-delay",`${parseFloat(n)||0}ms`),e.style.setProperty("--aos-easing",Z[o]??o);}function H(){s=Array.from(document.querySelectorAll("[data-aos]")).map(e=>{let t=s.find(n=>n.node===e);return {node:e,in:0,out:0,once:z(e,"once",a.once),mirror:z(e,"mirror",a.mirror),animated:t?t.animated:e.classList.contains(a.animatedClassName),classes:a.useClassNames?(e.getAttribute("data-aos")||"").split(" ").filter(Boolean):[],id:u(e,"id")}});for(let e of s)ee(e.node),e.node.classList.add(a.initClassName);}function I(){for(let e of s)e.in=K(e.node),e.out=J(e.node);}function q(e,t){document.dispatchEvent(new CustomEvent(`aos:${e}`,{detail:t.node})),t.id&&document.dispatchEvent(new CustomEvent(`aos:${e}:${t.id}`,{detail:t.node}));}function T(e){e.animated||(e.animated=true,e.node.classList.add(a.animatedClassName,...e.classes),q("in",e));}function _(e){e.animated&&(e.animated=false,e.node.classList.remove(a.animatedClassName,...e.classes),q("out",e));}function g(){b=0;let e=window.scrollY;for(let t of s){if(m){T(t);continue}t.mirror&&!t.once&&e>t.out?_(t):e>t.in?T(t):t.once||_(t);}}var P=()=>{b||(b=requestAnimationFrame(g));};function y(){clearTimeout(A),A=setTimeout(h,50);}var Q=()=>h();function F(){let e=a.disable;if(typeof e=="function")return e();if(e===true)return true;let t=window.innerWidth;return e==="phone"?t<768:e==="tablet"?t>=768&&t<1024:e==="mobile"?t<1024:false}function V(){document.querySelectorAll("[data-aos]").forEach(e=>{for(let t of ["data-aos","data-aos-easing","data-aos-duration","data-aos-delay"])e.removeAttribute(t);});}function te(){if(document.getElementById(L))return;let e=document.createElement("style");e.id=L,e.textContent=U(a.animatedClassName),document.head.appendChild(e);}function E(){if(!l){if(l=true,c=null,H(),m)for(let e of s)e.node.setAttribute("data-aos-instant","");I(),g(),window.addEventListener("scroll",P,{passive:true}),window.addEventListener("resize",y),window.addEventListener("orientationchange",y),window.addEventListener("load",Q),!a.disableMutationObserver&&typeof MutationObserver<"u"&&(v=new MutationObserver(e=>{e.some(n=>[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].some(o=>o instanceof Element&&(o.hasAttribute("data-aos")||o.querySelector("[data-aos]"))))&&Y();}),v.observe(document.documentElement,{childList:true,subtree:true}));}}function ne(e={}){if(!N())return [];if((l||c)&&B(),a={...C,...e},F())return V(),[];m=O(),m||(p=S(n=>{if(n&&(p?.(),p=null,m=true,!!l)){for(let o of s)o.node.setAttribute("data-aos-instant","");g();}})),te();let t=document.readyState!=="loading";if(a.startEvent==="DOMContentLoaded"&&t)E();else if(a.startEvent==="load"&&document.readyState==="complete")E();else {let n=a.startEvent==="load"?window:document,o=()=>E();n.addEventListener(a.startEvent,o,{once:true}),c={target:n,type:a.startEvent,fn:o};}return Array.from(document.querySelectorAll("[data-aos]"))}function h(){l&&(I(),g());}function Y(){if(l){if(F()){V();return}H(),h();}}function B(){if(N()){c&&c.target.removeEventListener(c.type,c.fn),c=null,cancelAnimationFrame(b),b=0,clearTimeout(A),window.removeEventListener("scroll",P),window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),window.removeEventListener("load",Q),v?.disconnect(),v=null,p?.(),p=null;for(let e of s)e.node.removeAttribute("data-aos-instant");s=[],l=false,document.getElementById(L)?.remove();}}var oe={init:ne,refresh:h,refreshHard:Y,destroy:B},w=oe;function ae(e={},t){let n=react.useRef(e);n.current=e,react.useEffect(()=>(w.init(n.current),()=>w.destroy()),[]);let o=react.useRef(true);react.useEffect(()=>{if(o.current){o.current=false;return}w.refreshHard();},[t]);}function pe({refreshKey:e,...t}){return ae(t,e),null}exports.AOSInit=pe;exports.useAOS=ae;
|
package/dist/aos/react/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {e}from'../../chunk-
|
|
2
|
+
import {e}from'../../chunk-JCXMBI4G.mjs';import'../../chunk-AJ22VSHC.mjs';import'../../chunk-5PJEKEEP.mjs';import'../../chunk-LFSU6LR3.mjs';import {useRef,useEffect}from'react';function i(r={},n){let e$1=useRef(r);e$1.current=r,useEffect(()=>(e.init(e$1.current),()=>e.destroy()),[]);let o=useRef(true);useEffect(()=>{if(o.current){o.current=false;return}e.refreshHard();},[n]);}function O({refreshKey:r,...n}){return i(n,r),null}export{O as AOSInit,i as useAOS};
|
package/dist/astro/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as scrollDraw}from'../chunk-OTDD2ROH.mjs';import {a as a$2}from'../chunk-DY5JCXVR.mjs';import {a as a$1}from'../chunk-WXUOF4NM.mjs';import {a}from'../chunk-LTCJVVSC.mjs';import {b}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-
|
|
1
|
+
export{a as scrollDraw}from'../chunk-OTDD2ROH.mjs';import {a as a$2}from'../chunk-DY5JCXVR.mjs';import {a as a$1}from'../chunk-WXUOF4NM.mjs';import {a}from'../chunk-LTCJVVSC.mjs';import {b}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b as b$1}from'../chunk-LFSU6LR3.mjs';function i(){return typeof document>"u"?null:document}var p=new WeakMap,g;function c(r,t,n,o){let l=p.get(r)??new Map;p.set(r,l);let f=()=>{let e=n(),s=l.get(t);s&&s.key===e||(s?.inst.destroy(),l.set(t,{inst:o(e),key:e,build:f,users:s?.users??0}));};f(),l.get(t).users++;let S=true;typeof MutationObserver<"u"&&(g??(g=new MutationObserver(e=>e.forEach(s=>p.get(s.target)?.forEach(O=>O.build())))),g.observe(r,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(e=>`data-scroll-${e}-options`).concat("data-scroll-drawoptions")}));let a=()=>l.get(t)?.inst;return {destroy:()=>{let e=l.get(t);!S||!e||(S=false,!(--e.users>0)&&(e.inst.destroy(),l.delete(t)));},replay:()=>a()?.replay(),pause:()=>a()?.pause(),resume:()=>a()?.resume(),seek:e=>a()?.seek(e),getProgress:()=>a()?.getProgress()??0,refresh:()=>a()?.refresh?.()}}function u(r,t){try{return r?JSON.parse(r):t}catch{return t}}function E(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-draw]")).map(t=>c(t,"draw",()=>t.dataset.scrollDrawOptions??t.dataset.scrollDrawoptions??"",n=>b(t,u(n,{})))):[]}function A(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-animate]")).map(t=>c(t,"animate",()=>t.dataset.scrollAnimateOptions??"",n=>a(t,u(n,{props:{}})))):[]}function I(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-counter]")).map(t=>c(t,"counter",()=>t.dataset.scrollCounterOptions??"",n=>{let o=u(n,{});return !o.to&&o.to!==0&&(b$1('initScrollCounter: element missing "to" in options JSON:',t),o.to=0),typeof o.format!="function"&&o.format!==void 0&&(b$1('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',t),delete o.format),a$1(t,o)})):[]}function M(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-text]")).map(t=>c(t,"text",()=>t.dataset.scrollTextOptions??"",n=>a$2(t,u(n,{})))):[]}function H(r=i()){return {draw:E(r),animate:A(r),counter:I(r),text:M(r)}}export{H as initAll,A as initScrollAnimate,I as initScrollCounter,E as initScrollDraw,M as initScrollText};
|
package/dist/cdn/aos.global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var AOS=(()=>{var
|
|
2
|
-
`)}var a={...
|
|
1
|
+
"use strict";var AOS=(()=>{var w=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Z=Object.prototype.hasOwnProperty;var j=(e,t)=>{for(var n in t)w(e,n,{get:t[n],enumerable:!0})},U=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of X(t))!Z.call(e,r)&&r!==n&&w(e,r,{get:()=>t[r],enumerable:!(o=W(t,r))||o.enumerable});return e};var J=e=>U(w({},"__esModule",{value:!0}),e);var de={};j(de,{default:()=>se,destroy:()=>$,init:()=>G,refresh:()=>v,refreshHard:()=>x});function z(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function O(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=r=>e(!!r.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let o=t;return o.addListener?.(n),()=>o.removeListener?.(n)}function T(e,...t){}var N={offset:120,delay:0,duration:400,easing:"ease",once:!1,mirror:!1,anchorPlacement:"top-bottom",disable:!1,startEvent:"DOMContentLoaded",disableMutationObserver:!1,initClassName:"aos-init",animatedClassName:"aos-animate",useClassNames:!1,throttleDelay:99,debounceDelay:50},K={"ease-in-back":"cubic-bezier(.6,-.28,.735,.045)","ease-out-back":"cubic-bezier(.175,.885,.32,1.275)","ease-in-out-back":"cubic-bezier(.68,-.55,.265,1.55)","ease-in-sine":"cubic-bezier(.47,0,.745,.715)","ease-out-sine":"cubic-bezier(.39,.575,.565,1)","ease-in-out-sine":"cubic-bezier(.445,.05,.55,.95)","ease-in-quad":"cubic-bezier(.55,.085,.68,.53)","ease-out-quad":"cubic-bezier(.25,.46,.45,.94)","ease-in-out-quad":"cubic-bezier(.455,.03,.515,.955)","ease-in-cubic":"cubic-bezier(.55,.055,.675,.19)","ease-out-cubic":"cubic-bezier(.215,.61,.355,1)","ease-in-out-cubic":"cubic-bezier(.645,.045,.355,1)","ease-in-quart":"cubic-bezier(.895,.03,.685,.22)","ease-out-quart":"cubic-bezier(.165,.84,.44,1)","ease-in-out-quart":"cubic-bezier(.77,0,.175,1)"},L="svg-scroll-draw-aos",i=(e,t)=>`translate3d(${e},${t},0)`,ee=[["fade-up",i("0","100px")],["fade-down",i("0","-100px")],["fade-right",i("-100px","0")],["fade-left",i("100px","0")],["fade-up-right",i("-100px","100px")],["fade-up-left",i("100px","100px")],["fade-down-right",i("-100px","-100px")],["fade-down-left",i("100px","-100px")],["zoom-in","scale(.6)"],["zoom-out","scale(1.2)"],["zoom-in-up",`${i("0","100px")} scale(.6)`],["zoom-in-down",`${i("0","-100px")} scale(.6)`],["zoom-in-right",`${i("-100px","0")} scale(.6)`],["zoom-in-left",`${i("100px","0")} scale(.6)`],["zoom-out-up",`${i("0","100px")} scale(1.2)`],["zoom-out-down",`${i("0","-100px")} scale(1.2)`],["zoom-out-right",`${i("-100px","0")} scale(1.2)`],["zoom-out-left",`${i("100px","0")} scale(1.2)`],["slide-up",i("0","100%")],["slide-down",i("0","-100%")],["slide-right",i("-100%","0")],["slide-left",i("100%","0")],["flip-left","perspective(2500px) rotateY(-100deg)"],["flip-right","perspective(2500px) rotateY(100deg)"],["flip-up","perspective(2500px) rotateX(-100deg)"],["flip-down","perspective(2500px) rotateX(100deg)"]];function te(e){let t=`.${e}`,n=o=>`[data-aos^=${o}][data-aos^=${o}]`;return["[data-aos][data-aos]{transition-duration:var(--aos-duration,400ms);transition-timing-function:var(--aos-easing,ease);transition-delay:0s}",`[data-aos][data-aos]${t}{transition-delay:var(--aos-delay,0ms)}`,`${n("fade")}{opacity:0;transition-property:opacity,transform}`,`${n("fade")}${t}{opacity:1;transform:translateZ(0)}`,`${n("zoom")}{opacity:0;transition-property:opacity,transform}`,`${n("zoom")}${t}{opacity:1;transform:translateZ(0) scale(1)}`,`${n("slide")}{transition-property:transform}`,`${n("slide")}${t}{transform:translateZ(0)}`,`${n("flip")}{backface-visibility:hidden;transition-property:transform}`,...ee.map(([o,r])=>`[data-aos=${o}]{transform:${r}}`),...["left","right"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateY(0)}`),...["up","down"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateX(0)}`),"[data-aos-instant][data-aos-instant]{transition:none!important}"].join(`
|
|
2
|
+
`)}var a={...N},d=[],l=!1,b=0,M,y=null,c=null,m=!1,p=null,R=()=>typeof window<"u"&&typeof document<"u";function H(e){if(!(e instanceof HTMLElement))return e.getBoundingClientRect().top+window.scrollY;let t=0,n=e;for(;n;)t+=n.offsetTop-(n.tagName!=="BODY"?n.scrollTop:0),n=n.offsetParent;return t}var k=e=>e instanceof HTMLElement?e.offsetHeight:e.getBoundingClientRect().height;function u(e,t){return e.getAttribute(`data-aos-${t}`)}function _(e,t,n){let o=u(e,t);return o==="true"?!0:o==="false"?!1:n}function q(e,t){let n=u(e,"offset");return n&&!isNaN(Number(n))?parseInt(n,10):n||t?0:a.offset}function ne(e){let t=window.innerHeight,n=u(e,"anchor-placement"),o=q(e,n),r=u(e,"anchor"),A=r?document.querySelector(r):null;r&&!A&&T(`aos: data-aos-anchor="${r}" matches nothing; using the element itself`);let S=A||e,f=k(S),s=H(S)-t;switch(n||a.anchorPlacement){case"center-bottom":s+=f/2;break;case"bottom-bottom":s+=f;break;case"top-center":s+=t/2;break;case"center-center":s+=t/2+f/2;break;case"bottom-center":s+=t/2+f;break;case"top-top":s+=t;break;case"bottom-top":s+=t+f;break;case"center-top":s+=t+f/2;break;default:break}return s+o}function oe(e){return H(e)+k(e)-q(e,null)}function ae(e){let t=u(e,"duration")??String(a.duration),n=u(e,"delay")??String(a.delay),o=u(e,"easing")??a.easing;e.style.setProperty("--aos-duration",`${parseFloat(t)||0}ms`),e.style.setProperty("--aos-delay",`${parseFloat(n)||0}ms`),e.style.setProperty("--aos-easing",K[o]??o)}function I(){d=Array.from(document.querySelectorAll("[data-aos]")).map(e=>{let t=d.find(n=>n.node===e);return{node:e,in:0,out:0,once:_(e,"once",a.once),mirror:_(e,"mirror",a.mirror),animated:t?t.animated:e.classList.contains(a.animatedClassName),classes:a.useClassNames?(e.getAttribute("data-aos")||"").split(" ").filter(Boolean):[],id:u(e,"id")}});for(let e of d)ae(e.node),e.node.classList.add(a.initClassName)}function P(){for(let e of d)e.in=ne(e.node),e.out=oe(e.node)}function Q(e,t){document.dispatchEvent(new CustomEvent(`aos:${e}`,{detail:t.node})),t.id&&document.dispatchEvent(new CustomEvent(`aos:${e}:${t.id}`,{detail:t.node}))}function C(e){e.animated||(e.animated=!0,e.node.classList.add(a.animatedClassName,...e.classes),Q("in",e))}function D(e){e.animated&&(e.animated=!1,e.node.classList.remove(a.animatedClassName,...e.classes),Q("out",e))}function h(){b=0;let e=window.scrollY;for(let t of d){if(m){C(t);continue}t.mirror&&!t.once&&e>t.out?D(t):e>t.in?C(t):t.once||D(t)}}var V=()=>{b||(b=requestAnimationFrame(h))};function g(){clearTimeout(M),M=setTimeout(v,50)}var F=()=>v();function Y(){let e=a.disable;if(typeof e=="function")return e();if(e===!0)return!0;let t=window.innerWidth;return e==="phone"?t<768:e==="tablet"?t>=768&&t<1024:e==="mobile"?t<1024:!1}function B(){document.querySelectorAll("[data-aos]").forEach(e=>{for(let t of["data-aos","data-aos-easing","data-aos-duration","data-aos-delay"])e.removeAttribute(t)})}function ie(){if(document.getElementById(L))return;let e=document.createElement("style");e.id=L,e.textContent=te(a.animatedClassName),document.head.appendChild(e)}function E(){if(!l){if(l=!0,c=null,I(),m)for(let e of d)e.node.setAttribute("data-aos-instant","");P(),h(),window.addEventListener("scroll",V,{passive:!0}),window.addEventListener("resize",g),window.addEventListener("orientationchange",g),window.addEventListener("load",F),!a.disableMutationObserver&&typeof MutationObserver<"u"&&(y=new MutationObserver(e=>{e.some(n=>[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].some(o=>o instanceof Element&&(o.hasAttribute("data-aos")||o.querySelector("[data-aos]"))))&&x()}),y.observe(document.documentElement,{childList:!0,subtree:!0}))}}function G(e={}){if(!R())return[];if((l||c)&&$(),a={...N,...e},Y())return B(),[];m=z(),m||(p=O(n=>{if(n&&(p?.(),p=null,m=!0,!!l)){for(let o of d)o.node.setAttribute("data-aos-instant","");h()}})),ie();let t=document.readyState!=="loading";if(a.startEvent==="DOMContentLoaded"&&t)E();else if(a.startEvent==="load"&&document.readyState==="complete")E();else{let n=a.startEvent==="load"?window:document,o=()=>E();n.addEventListener(a.startEvent,o,{once:!0}),c={target:n,type:a.startEvent,fn:o}}return Array.from(document.querySelectorAll("[data-aos]"))}function v(){l&&(P(),h())}function x(){if(l){if(Y()){B();return}I(),v()}}function $(){if(R()){c&&c.target.removeEventListener(c.type,c.fn),c=null,cancelAnimationFrame(b),b=0,clearTimeout(M),window.removeEventListener("scroll",V),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),window.removeEventListener("load",F),y?.disconnect(),y=null,p?.(),p=null;for(let e of d)e.node.removeAttribute("data-aos-instant");d=[],l=!1,document.getElementById(L)?.remove()}}var re={init:G,refresh:v,refreshHard:x,destroy:$},se=re;return J(de);})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(()=>{function
|
|
2
|
-
\u2014 ${t}`).join("")}`,"color: #ea654b;")}var T=()=>[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function ie(e,n){let t=[];for(let o=0;o<4;o++)for(let i=0;i<4;i++){let r=0;for(let s=0;s<4;s++)r+=e[i+4*s]*n[4*o+s];t[i+4*o]=r}return t}function re(e){let n=/matrix(3d)?\(([^)]+)\)/.exec(e||"");if(!n)return T();let t=n[2].split(", ").map(parseFloat);if(t.length===16)return t;let o=T();return[o[0],o[1],o[4],o[5],o[12],o[13]]=t,o}function z(e,n){let t=Math.PI/180*n,o=Math.cos(t),i=Math.sin(t),r=T(),[s,l,c,h]=e==="x"?[5,10,6,9]:e==="y"?[0,10,8,2]:[0,5,1,4];return r[s]=r[l]=o,r[c]=i,r[h]=-i,r}function se(e,n){let t=T();return t[e==="X"?12:13]=n,t}function le(e){let n=T();return n[0]=n[5]=e,n}function v(e,n){for(let t of n.split(";")){let o=t.indexOf(":");if(o<1)continue;let i=t.slice(0,o).trim(),r=t.slice(o+1).trim();i&&r&&e.style.setProperty(i,r)}}function ae(e){let{node:n,config:t}=e,o=window.getComputedStyle(n),i=(n.getAttribute("style")||"").match(/[\w-]+\s*:\s*[^;]+\s*/gi)||[],r=i.map(d=>d.trim()),s=`${r.join("; ")};`,l=i.some(d=>/visibility\s?:\s?visible/i.test(d))?s:`${[...r,"visibility: visible"].join("; ")};`,c=parseFloat(o.opacity),h=t.opacity!==null&&!isNaN(parseFloat(String(t.opacity)))?parseFloat(String(t.opacity)):c,b=c!==h?{computed:`opacity: ${c};`,generated:`opacity: ${h};`}:{computed:"",generated:""},u=[];if(parseFloat(t.distance)){let d=t.origin==="top"||t.origin==="bottom"?"Y":"X",f=t.distance;(t.origin==="top"||t.origin==="left")&&(f=f.startsWith("-")?f.slice(1):`-${f}`);let k=f.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g)||[],m=Number(k[0]),A=k[1],I;if(A==="em")I=parseInt(o.fontSize,10)*m;else if(A==="px")I=m;else if(A==="%"){let Y=n.getBoundingClientRect();I=(d==="Y"?Y.height:Y.width)*m/100}else throw new RangeError("Unrecognized or missing distance unit.");u.push(se(d,I))}t.rotate.x&&u.push(z("x",t.rotate.x)),t.rotate.y&&u.push(z("y",t.rotate.y)),t.rotate.z&&u.push(z("z",t.rotate.z)),t.scale!==1&&u.push(le(t.scale===0?2e-4:t.scale));let g={initial:"",final:""};if(u.length){let d=re(o.transform);g={initial:`transform: matrix3d(${u.reduce(ie,d).join(", ")});`,final:`transform: matrix3d(${d.join(", ")});`}}let w={delayed:"",instant:""};if(b.generated||g.initial){let d=m=>`${m/1e3}s`,f=[],k=m=>({delayed:`${m} ${d(t.duration)} ${t.easing} ${d(t.delay)}`,instant:`${m} ${d(t.duration)} ${t.easing} 0s`});o.transition&&!/all 0s|none 0s/.test(o.transition)&&f.push({delayed:o.transition,instant:o.transition}),b.generated&&f.push(k("opacity")),g.initial&&f.push(k("transform")),w={delayed:`transition: ${f.map(m=>m.delayed).join(", ")};`,instant:`transition: ${f.map(m=>m.instant).join(", ")};`}}return{inline:{computed:s,generated:l},opacity:b,position:o.position,transform:g,transition:w}}var x=(...e)=>e.filter(n=>n!=="").join(" "),ce=()=>({delay:0,distance:"0",duration:600,easing:"cubic-bezier(0.5, 0, 0, 1)",interval:0,opacity:0,origin:"bottom",rotate:{x:0,y:0,z:0},scale:1,cleanup:!1,container:document.documentElement,desktop:!0,mobile:!0,reset:!1,useDelay:"always",viewFactor:0,viewOffset:{top:0,right:0,bottom:0,left:0},afterReset:()=>{},afterReveal:()=>{},beforeReset:()=>{},beforeReveal:()=>{}}),p=null,M=null,a={containers:{},elements:{},history:[],sequences:{}},W=!0,j=null,R=0,D=!1,de=0,H=()=>de++;function U(e,n=!1){let t=e,o=n?t.clientHeight:t.offsetHeight,i=n?t.clientWidth:t.offsetWidth,r=0,s=0,l=t;for(;l;)isNaN(l.offsetTop)||(r+=l.offsetTop),isNaN(l.offsetLeft)||(s+=l.offsetLeft),l=l.offsetParent;return{bounds:{top:r,right:s+i,bottom:r+o,left:s},height:o,width:i}}var ue=e=>e.node===document.documentElement?{top:window.pageYOffset,left:window.pageXOffset}:{top:e.node.scrollTop,left:e.node.scrollLeft};function fe(e){let n=a.containers[e.containerId];if(!n||!n.geometry||!n.scroll||!e.geometry)return!1;let t=Math.max(0,Math.min(1,e.config.viewFactor)),o=e.config.viewOffset,i=e.geometry,r={top:i.bounds.top+i.height*t,right:i.bounds.right-i.width*t,bottom:i.bounds.bottom-i.height*t,left:i.bounds.left+i.width*t},s={top:n.geometry.bounds.top+n.scroll.top+o.top,right:n.geometry.bounds.right+n.scroll.left-o.right,bottom:n.geometry.bounds.bottom+n.scroll.top-o.bottom,left:n.geometry.bounds.left+n.scroll.left+o.left};return r.top<s.bottom&&r.right>s.left&&r.bottom>s.top&&r.left<s.right||e.styles.position==="fixed"}function Q(e,n=!1){let t=n?e.config.duration+e.config.delay:e.config.duration,o=0;e.timer&&(o=Date.now()-e.timer.start,clearTimeout(e.timer.clock)),(e.revealed?e.config.beforeReveal:e.config.beforeReset)(e.node),e.timer={start:Date.now(),clock:setTimeout(()=>{(e.revealed?e.config.afterReveal:e.config.afterReset)(e.node),e.timer=null,e.revealed&&!e.config.reset&&e.config.cleanup&&B(e.node)},t-o)}}function me(e,n){let t=e.styles;e.revealed=e.seen=!0,v(e.node,x(t.inline.generated,t.opacity.computed,t.transform.final,n?t.transition.delayed:t.transition.instant)),Q(e,n)}function be(e){let n=e.styles;e.revealed=!1,v(e.node,x(n.inline.generated,n.opacity.generated,n.transform.initial,n.transition.instant)),Q(e)}function E(e,n={}){let t=n.pristine||W,o=e.config.useDelay,i=o==="always"||o==="onload"&&t||o==="once"&&!e.seen;if(n.reveal||e.visible&&!e.revealed)return me(e,i);if(n.reset||!e.visible&&e.revealed&&e.config.reset)return be(e)}function J(e,n){let t=[],o=[],i=[];return e.members.forEach((r,s)=>{a.elements[r]?.[n]&&o.push(s)}),o.length&&e.members.forEach((r,s)=>{let l=a.elements[r];l&&!l[n]&&(s<o[0]?t:i).push(s)}),{head:t,body:o,foot:i}}function O(e,n,t,o){let i=t<0?"head":"foot",r=a.elements[e.members[n+t]];e.blocked[i]=!0,setTimeout(()=>{e.blocked[i]=!1,r&&Z(r,o)},e.interval)}function Z(e,n=W){if(!e.visible&&e.revealed&&e.config.reset)return E(e,{reset:!0});let t=e.sequence&&a.sequences[e.sequence.id];if(!t||!e.sequence)return;let o=e.sequence.index,i=J(t,"visible"),r=J(t,"revealed");if(!r.body.length){let l=i.body[0],c=a.elements[t.members[l]];if(c)return O(t,l,-1,n),O(t,l,1,n),E(c,{reveal:!0,pristine:n})}let s=l=>l[l.length-1];if(!t.blocked.head&&o===s(r.head)&&o>=(i.body[0]??1/0))return O(t,o,-1,n),E(e,{reveal:!0,pristine:n});if(!t.blocked.foot&&o===r.foot[0]&&o<=(s(i.body)??-1/0))return O(t,o,1,n),E(e,{reveal:!0,pristine:n})}function ge(){R=0;let e=D;D=!1;for(let t of Object.values(a.containers))(e||!t.geometry)&&(t.geometry=U(t.node,!0)),t.scroll=ue(t);let n=Object.values(a.elements);for(let t of n)(e||!t.geometry)&&(t.geometry=U(t.node)),t.visible=fe(t);for(let t of n)t.sequence?Z(t):E(t);W=!1}function y(e){let n=e?e.type:"init";(n==="init"||n==="resize")&&(D=!0),R||(R=requestAnimationFrame(ge))}var S=e=>e.node===document.documentElement?window:e.node;function _(){let e=new Set(Array.from(document.querySelectorAll("[data-sr-id]")).map(o=>parseInt(o.getAttribute("data-sr-id")||"",10)));for(let o of Object.values(a.elements))e.has(o.id)||delete a.elements[o.id];let n=new Set,t=new Set;for(let o of Object.values(a.elements))n.add(o.containerId),o.sequence&&t.add(o.sequence.id);for(let o of Object.values(a.containers))n.has(o.id)||(S(o).removeEventListener("scroll",y),S(o).removeEventListener("resize",y),delete a.containers[o.id]);for(let o of Object.values(a.sequences))t.has(o.id)||delete a.sequences[o.id]}function ee(){j=null,_();let e=V();for(let n of Object.values(a.elements)){let t=n.styles;e?(n.visible=n.revealed=n.seen=!0,v(n.node,x(t.inline.generated,t.opacity.computed,t.transform.final,"transition: none;"))):n.visible?(n.revealed=!0,v(n.node,x(t.inline.generated,t.opacity.computed,t.transform.final))):(n.revealed=!1,v(n.node,x(t.inline.generated,t.opacity.generated,t.transform.initial)))}if(!e){for(let n of Object.values(a.containers))S(n).addEventListener("scroll",y),S(n).addEventListener("resize",y);y()}}function te(e,n={},t=!1){if(!p)return;let o=[],i=n.interval||0,r,s;try{if(i){let c=Math.abs(i);if(isNaN(c))throw new RangeError("Invalid sequence interval.");r={id:H(),interval:Math.max(c,16),members:[],blocked:{head:!1,foot:!1}}}let l=L(e);if(!l.length)throw new Error("Invalid reveal target.");s=[];for(let c of l){let h=c.getAttribute("data-sr-id"),b=h!==null?a.elements[Number(h)]:void 0,u=b?q({},b):{id:H(),node:c,seen:!1,revealed:!1,visible:!1};b&&v(c,b.styles.inline.computed);let g=q({},b?b.config:p,n);if(!g.mobile&&$()||!g.desktop&&!$()){b&&B(c);continue}let w=L(g.container)[0];if(!w)throw new Error("Invalid container.");if(!w.contains(c))continue;let d=[...o,...Object.values(a.containers)].find(f=>f.node===w)?.id;d===void 0&&(d=H(),o.push({id:d,node:w})),u.config=g,u.containerId=d,u.styles=ae(u),r&&(u.sequence={id:r.id,index:r.members.length},r.members.push(u.id)),s.push(u)}for(let c of s)a.elements[c.id]=c,c.node.setAttribute("data-sr-id",String(c.id))}catch(l){return P("Reveal failed.",l.message)}for(let l of o)a.containers[l.id]=l;r&&(a.sequences[r.id]=r),t||(a.history.push({target:e,options:n}),j&&clearTimeout(j),j=setTimeout(ee,0))}function B(e){let n=!1;for(let t of L(e)){let o=t.getAttribute("data-sr-id");if(o===null)continue;n=!0;let i=a.elements[Number(o)];i&&(i.timer&&clearTimeout(i.timer.clock),v(i.node,i.styles.inline.generated),delete a.elements[i.id]),t.removeAttribute("data-sr-id")}n&&_()}function pe(){for(let e of Object.values(a.elements))v(e.node,e.styles.inline.generated),e.node.removeAttribute("data-sr-id");for(let e of Object.values(a.containers))S(e).removeEventListener("scroll",y),S(e).removeEventListener("resize",y);R&&cancelAnimationFrame(R),R=0,a={containers:{},elements:{},history:[],sequences:{}}}function ve(){for(let e of a.history)te(e.target,e.options,!0);ee()}var N=()=>(G()&&document.documentElement.classList.remove("sr"),{reveal(){},clean(){},destroy(){},sync(){},defaults:{},version:K,noop:!0});function ne(){if(!G())return!1;let e=document.documentElement.style;return("transform"in e||"WebkitTransform"in e)&&("transition"in e||"WebkitTransition"in e)}function ye(){document.documentElement.classList.add("sr"),document.body?document.body.style.height="100%":document.addEventListener("DOMContentLoaded",()=>{document.body.style.height="100%"},{once:!0})}function he(e={}){if(!G()||!ne())return N();let n;try{if(n=q({},p??ce(),e),!L(n.container)[0])throw new Error("Invalid container.")}catch(t){return P("Invalid configuration.",t.message),N()}return p=n,!p.mobile&&$()||!p.desktop&&!$()?(P("This device is disabled.",`desktop: ${p.desktop}`,`mobile: ${p.mobile}`),N()):(ye(),M||(M={reveal:(t,o)=>te(t,o),clean:B,destroy:pe,sync:ve,get defaults(){return p},version:K,noop:!1},Object.defineProperty(M,"delegate",{value:y})),M)}var X=he;X.isSupported=ne;Object.defineProperty(X,"debug",{get:()=>F,set:e=>{typeof e=="boolean"&&(F=e)}});var oe=X;globalThis.ScrollReveal=oe;})();
|
|
1
|
+
"use strict";(()=>{function F(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function K(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=i=>e(!!i.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let o=n;return o.addListener?.(t),()=>o.removeListener?.(t)}var ee="4.0.9",B=()=>typeof window<"u"&&typeof document<"u",H=e=>e!==null&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]";function q(e,...n){for(let t of n)if(H(t))for(let o of Object.keys(t)){let i=t[o];H(i)?(H(e[o])||(e[o]={}),q(e[o],i)):e[o]=i}return e}function $(e){if(typeof e=="string")try{return Array.from(document.querySelectorAll(e))}catch{return[]}return e instanceof Element?[e]:e&&typeof e.length=="number"?Array.from(e).filter(n=>n instanceof Element):[]}var A=(e=navigator.userAgent)=>/Android|iPhone|iPad|iPod/i.test(e),D=!1;function G(e,...n){D&&typeof console<"u"&&console.log(`%cScrollReveal: ${e}${n.map(t=>`
|
|
2
|
+
\u2014 ${t}`).join("")}`,"color: #ea654b;")}var L=()=>[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function ae(e,n){let t=[];for(let o=0;o<4;o++)for(let i=0;i<4;i++){let r=0;for(let s=0;s<4;s++)r+=e[i+4*s]*n[4*o+s];t[i+4*o]=r}return t}function le(e){let n=/matrix(3d)?\(([^)]+)\)/.exec(e||"");if(!n)return L();let t=n[2].split(", ").map(parseFloat);if(t.length===16)return t;let o=L();return[o[0],o[1],o[4],o[5],o[12],o[13]]=t,o}function N(e,n){let t=Math.PI/180*n,o=Math.cos(t),i=Math.sin(t),r=L(),[s,l,c,R]=e==="x"?[5,10,6,9]:e==="y"?[0,10,8,2]:[0,5,1,4];return r[s]=r[l]=o,r[c]=i,r[R]=-i,r}function ce(e,n){let t=L();return t[e==="X"?12:13]=n,t}function de(e){let n=L();return n[0]=n[5]=e,n}function w(e,n){for(let t of n.split(";")){let o=t.indexOf(":");if(o<1)continue;let i=t.slice(0,o).trim(),r=t.slice(o+1).trim();i&&r&&e.style.setProperty(i,r)}}function ue(e){let{node:n,config:t}=e,o=window.getComputedStyle(n),i=(n.getAttribute("style")||"").match(/[\w-]+\s*:\s*[^;]+\s*/gi)||[],r=i.map(d=>d.trim()),s=`${r.join("; ")};`,l=i.some(d=>/visibility\s?:\s?visible/i.test(d))?s:`${[...r,"visibility: visible"].join("; ")};`,c=parseFloat(o.opacity),R=t.opacity!==null&&!isNaN(parseFloat(String(t.opacity)))?parseFloat(String(t.opacity)):c,b=c!==R?{computed:`opacity: ${c};`,generated:`opacity: ${R};`}:{computed:"",generated:""},u=[];if(parseFloat(t.distance)){let d=t.origin==="top"||t.origin==="bottom"?"Y":"X",f=t.distance;(t.origin==="top"||t.origin==="left")&&(f=f.startsWith("-")?f.slice(1):`-${f}`);let M=f.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g)||[],m=Number(M[0]),z=M[1],T;if(z==="em")T=parseInt(o.fontSize,10)*m;else if(z==="px")T=m;else if(z==="%"){let J=n.getBoundingClientRect();T=(d==="Y"?J.height:J.width)*m/100}else throw new RangeError("Unrecognized or missing distance unit.");u.push(ce(d,T))}t.rotate.x&&u.push(N("x",t.rotate.x)),t.rotate.y&&u.push(N("y",t.rotate.y)),t.rotate.z&&u.push(N("z",t.rotate.z)),t.scale!==1&&u.push(de(t.scale===0?2e-4:t.scale));let g={initial:"",final:""};if(u.length){let d=le(o.transform);g={initial:`transform: matrix3d(${u.reduce(ae,d).join(", ")});`,final:`transform: matrix3d(${d.join(", ")});`}}let S={delayed:"",instant:""};if(b.generated||g.initial){let d=m=>`${m/1e3}s`,f=[],M=m=>({delayed:`${m} ${d(t.duration)} ${t.easing} ${d(t.delay)}`,instant:`${m} ${d(t.duration)} ${t.easing} 0s`});o.transition&&!/all 0s|none 0s/.test(o.transition)&&f.push({delayed:o.transition,instant:o.transition}),b.generated&&f.push(M("opacity")),g.initial&&f.push(M("transform")),S={delayed:`transition: ${f.map(m=>m.delayed).join(", ")};`,instant:`transition: ${f.map(m=>m.instant).join(", ")};`}}return{inline:{computed:s,generated:l},opacity:b,position:o.position,transform:g,transition:S}}var x=(...e)=>e.filter(n=>n!=="").join(" "),fe=()=>({delay:0,distance:"0",duration:600,easing:"cubic-bezier(0.5, 0, 0, 1)",interval:0,opacity:0,origin:"bottom",rotate:{x:0,y:0,z:0},scale:1,cleanup:!1,container:document.documentElement,desktop:!0,mobile:!0,reset:!1,useDelay:"always",viewFactor:0,viewOffset:{top:0,right:0,bottom:0,left:0},afterReset:()=>{},afterReveal:()=>{},beforeReset:()=>{},beforeReveal:()=>{}}),p=null,I=null,a={containers:{},elements:{},history:[],sequences:{}},X=!0,j=null,y=0,C=!1,E=null,W=!1,me=0,P=()=>me++;function Z(e,n=!1){let t=e,o=n?t.clientHeight:t.offsetHeight,i=n?t.clientWidth:t.offsetWidth,r=0,s=0,l=t;for(;l;)isNaN(l.offsetTop)||(r+=l.offsetTop),isNaN(l.offsetLeft)||(s+=l.offsetLeft),l=l.offsetParent;return{bounds:{top:r,right:s+i,bottom:r+o,left:s},height:o,width:i}}var be=e=>e.node===document.documentElement?{top:window.pageYOffset,left:window.pageXOffset}:{top:e.node.scrollTop,left:e.node.scrollLeft};function ve(e){let n=a.containers[e.containerId];if(!n||!n.geometry||!n.scroll||!e.geometry)return!1;let t=Math.max(0,Math.min(1,e.config.viewFactor)),o=e.config.viewOffset,i=e.geometry,r={top:i.bounds.top+i.height*t,right:i.bounds.right-i.width*t,bottom:i.bounds.bottom-i.height*t,left:i.bounds.left+i.width*t},s={top:n.geometry.bounds.top+n.scroll.top+o.top,right:n.geometry.bounds.right+n.scroll.left-o.right,bottom:n.geometry.bounds.bottom+n.scroll.top-o.bottom,left:n.geometry.bounds.left+n.scroll.left+o.left};return r.top<s.bottom&&r.right>s.left&&r.bottom>s.top&&r.left<s.right||e.styles.position==="fixed"}function te(e,n=!1){let t=n?e.config.duration+e.config.delay:e.config.duration,o=0;e.timer&&(o=Date.now()-e.timer.start,clearTimeout(e.timer.clock)),(e.revealed?e.config.beforeReveal:e.config.beforeReset)(e.node),e.timer={start:Date.now(),clock:setTimeout(()=>{(e.revealed?e.config.afterReveal:e.config.afterReset)(e.node),e.timer=null,e.revealed&&!e.config.reset&&e.config.cleanup&&V(e.node)},t-o)}}function ge(e,n){let t=e.styles;e.revealed=e.seen=!0,w(e.node,x(t.inline.generated,t.opacity.computed,t.transform.final,n?t.transition.delayed:t.transition.instant)),te(e,n)}function pe(e){let n=e.styles;e.revealed=!1,w(e.node,x(n.inline.generated,n.opacity.generated,n.transform.initial,n.transition.instant)),te(e)}function k(e,n={}){let t=n.pristine||X,o=e.config.useDelay,i=o==="always"||o==="onload"&&t||o==="once"&&!e.seen;if(n.reveal||e.visible&&!e.revealed)return ge(e,i);if(n.reset||!e.visible&&e.revealed&&e.config.reset)return pe(e)}function _(e,n){let t=[],o=[],i=[];return e.members.forEach((r,s)=>{a.elements[r]?.[n]&&o.push(s)}),o.length&&e.members.forEach((r,s)=>{let l=a.elements[r];l&&!l[n]&&(s<o[0]?t:i).push(s)}),{head:t,body:o,foot:i}}function O(e,n,t,o){let i=t<0?"head":"foot",r=a.elements[e.members[n+t]];e.blocked[i]=!0,setTimeout(()=>{e.blocked[i]=!1,r&&ne(r,o)},e.interval)}function ne(e,n=X){if(!e.visible&&e.revealed&&e.config.reset)return k(e,{reset:!0});let t=e.sequence&&a.sequences[e.sequence.id];if(!t||!e.sequence)return;let o=e.sequence.index,i=_(t,"visible"),r=_(t,"revealed");if(!r.body.length){let l=i.body[0],c=a.elements[t.members[l]];if(c)return O(t,l,-1,n),O(t,l,1,n),k(c,{reveal:!0,pristine:n})}let s=l=>l[l.length-1];if(!t.blocked.head&&o===s(r.head)&&o>=(i.body[0]??1/0))return O(t,o,-1,n),k(e,{reveal:!0,pristine:n});if(!t.blocked.foot&&o===r.foot[0]&&o<=(s(i.body)??-1/0))return O(t,o,1,n),k(e,{reveal:!0,pristine:n})}function ye(){y=0;let e=W;W=!1;for(let t of Object.values(a.containers))(e||!t.geometry)&&(t.geometry=Z(t.node,!0)),t.scroll=be(t);let n=Object.values(a.elements);for(let t of n)(e||!t.geometry)&&(t.geometry=Z(t.node)),t.visible=ve(t);for(let t of n)t.sequence?ne(t):k(t);X=!1}function v(e){let n=e?e.type:"init";(n==="init"||n==="resize")&&(W=!0),y||(y=requestAnimationFrame(ye))}var h=e=>e.node===document.documentElement?window:e.node;function oe(){let e=new Set(Array.from(document.querySelectorAll("[data-sr-id]")).map(o=>parseInt(o.getAttribute("data-sr-id")||"",10)));for(let o of Object.values(a.elements))e.has(o.id)||delete a.elements[o.id];let n=new Set,t=new Set;for(let o of Object.values(a.elements))n.add(o.containerId),o.sequence&&t.add(o.sequence.id);for(let o of Object.values(a.containers))n.has(o.id)||(h(o).removeEventListener("scroll",v),h(o).removeEventListener("resize",v),delete a.containers[o.id]);for(let o of Object.values(a.sequences))t.has(o.id)||delete a.sequences[o.id]}function Y(){j=null,oe();let e=C||F();for(let n of Object.values(a.elements)){let t=n.styles;e?(n.visible=n.revealed=n.seen=!0,w(n.node,x(t.inline.generated,t.opacity.computed,t.transform.final,"transition: none;"))):n.visible?(n.revealed=!0,w(n.node,x(t.inline.generated,t.opacity.computed,t.transform.final))):(n.revealed=!1,w(n.node,x(t.inline.generated,t.opacity.generated,t.transform.initial)))}if(e){for(let n of Object.values(a.containers))h(n).removeEventListener("scroll",v),h(n).removeEventListener("resize",v);y&&cancelAnimationFrame(y),y=0;return}for(let n of Object.values(a.containers))h(n).addEventListener("scroll",v),h(n).addEventListener("resize",v);v()}function ie(e,n={},t=!1){if(!p)return;let o=[],i=n.interval||0,r,s;try{if(i){let c=Math.abs(i);if(isNaN(c))throw new RangeError("Invalid sequence interval.");r={id:P(),interval:Math.max(c,16),members:[],blocked:{head:!1,foot:!1}}}let l=$(e);if(!l.length)throw new Error("Invalid reveal target.");s=[];for(let c of l){let R=c.getAttribute("data-sr-id"),b=R!==null?a.elements[Number(R)]:void 0,u=b?q({},b):{id:P(),node:c,seen:!1,revealed:!1,visible:!1};b&&w(c,b.styles.inline.computed);let g=q({},b?b.config:p,n);if(!g.mobile&&A()||!g.desktop&&!A()){b&&V(c);continue}let S=$(g.container)[0];if(!S)throw new Error("Invalid container.");if(!S.contains(c))continue;let d=[...o,...Object.values(a.containers)].find(f=>f.node===S)?.id;d===void 0&&(d=P(),o.push({id:d,node:S})),u.config=g,u.containerId=d,u.styles=ue(u),r&&(u.sequence={id:r.id,index:r.members.length},r.members.push(u.id)),s.push(u)}for(let c of s)a.elements[c.id]=c,c.node.setAttribute("data-sr-id",String(c.id))}catch(l){return G("Reveal failed.",l.message)}for(let l of o)a.containers[l.id]=l;r&&(a.sequences[r.id]=r),t||(a.history.push({target:e,options:n}),j&&clearTimeout(j),j=setTimeout(Y,0))}function V(e){let n=!1;for(let t of $(e)){let o=t.getAttribute("data-sr-id");if(o===null)continue;n=!0;let i=a.elements[Number(o)];i&&(i.timer&&clearTimeout(i.timer.clock),w(i.node,i.styles.inline.generated),delete a.elements[i.id]),t.removeAttribute("data-sr-id")}n&&oe()}function he(){for(let e of Object.values(a.elements))w(e.node,e.styles.inline.generated),e.node.removeAttribute("data-sr-id");for(let e of Object.values(a.containers))h(e).removeEventListener("scroll",v),h(e).removeEventListener("resize",v);y&&cancelAnimationFrame(y),y=0,a={containers:{},elements:{},history:[],sequences:{}},E?.(),E=null,C=!1}function we(){for(let e of a.history)ie(e.target,e.options,!0);Y()}var Q=()=>(B()&&document.documentElement.classList.remove("sr"),{reveal(){},clean(){},destroy(){},sync(){},defaults:{},version:ee,noop:!0});function re(){if(!B())return!1;let e=document.documentElement.style;return("transform"in e||"WebkitTransform"in e)&&("transition"in e||"WebkitTransition"in e)}function Re(){document.documentElement.classList.add("sr"),document.body?document.body.style.height="100%":document.addEventListener("DOMContentLoaded",()=>{document.body.style.height="100%"},{once:!0})}function Se(e={}){if(!B()||!re())return Q();let n;try{if(n=q({},p??fe(),e),!$(n.container)[0])throw new Error("Invalid container.")}catch(t){return G("Invalid configuration.",t.message),Q()}return p=n,!p.mobile&&A()||!p.desktop&&!A()?(G("This device is disabled.",`desktop: ${p.desktop}`,`mobile: ${p.mobile}`),Q()):(Re(),!E&&!C&&!F()&&(E=K(t=>{t&&(E?.(),E=null,C=!0,Y())})),I||(I={reveal:(t,o)=>ie(t,o),clean:V,destroy:he,sync:we,get defaults(){return p},version:ee,noop:!1},Object.defineProperty(I,"delegate",{value:v})),I)}var U=Se;U.isSupported=re;Object.defineProperty(U,"debug",{get:()=>D,set:e=>{typeof e=="boolean"&&(D=e)}});var se=U;globalThis.ScrollReveal=se;})();
|
package/dist/cdn/vivus.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{function g(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function m(r,...t){}var E=["delayed","sync","async","nsync","oneByOne","scenario","scenario-sync"],V=["inViewport","manual","autostart"];function u(r,t){let e=parseInt(r,10);return e>=0?e:t}function $(r){if(typeof window>"u")return!1;let t=window,e=n=>typeof t[n]=="function"&&r instanceof t[n];return e("SVGSVGElement")||e("SVGGElement")||r?.constructor===t.SVGElement}var y=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],S=["line","ellipse","circle","polygon","polyline","rect"],A="http://www.w3.org/2000/svg";function v(r){let t=r.points.trim().split(" ");if(r.points.indexOf(",")===-1){let n=[];for(let s=0;s<t.length;s+=2)n.push(`${t[s]},${t[s+1]}`);t=n}let e=`M${t[0]}`;for(let n=1;n<t.length;n++)t[n].indexOf(",")!==-1&&(e+=`L${t[n]}`);return e}function b(r,t,e,n){let s=parseFloat(e)||0,a=parseFloat(n)||0,i=parseFloat(r)||0,o=parseFloat(t)||0,l=i-s,h=i+s;return`M${l},${o}A${s},${a} 0,1,1 ${h},${o}A${s},${a} 0,1,1 ${l},${o}`}var x={line:r=>`M${r.x1||0},${r.y1||0}L${r.x2||0},${r.y2||0}`,rect(r){let t=parseFloat(r.x)||0,e=parseFloat(r.y)||0,n=parseFloat(r.width)||0,s=parseFloat(r.height)||0;if(r.rx||r.ry){let a=parseInt(r.rx,10)||-1,i=parseInt(r.ry,10)||-1;a=Math.min(Math.max(a<0?i:a,0),n/2),i=Math.min(Math.max(i<0?a:i,0),s/2);let o=`A ${a},${i},0,0,1,`;return`M ${t+a},${e} L ${t+n-a},${e} ${o}${t+n},${e+i} L ${t+n},${e+s-i} ${o}${t+n-a},${e+s} L ${t+a},${e+s} ${o}${t},${e+s-i} L ${t},${e+i} ${o}${t+a},${e}`}return`M${t} ${e} L${t+n} ${e} L${t+n} ${e+s} L${t} ${e+s} Z`},polyline:v,polygon:r=>`${v(r)}Z`,ellipse:r=>b(r.cx,r.cy,r.rx,r.ry),circle:r=>b(r.cx,r.cy,r.r,r.r)};function L(r){for(let t of Array.from(r.querySelectorAll(S.join(",")))){let e={};for(let{name:a,value:i}of Array.from(t.attributes)){if(y.indexOf(a)!==-1&&i.indexOf("%")!==-1)throw new Error("Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into 'path' tags. Please use 'viewBox'.");e[a]=i}let n=x[t.tagName.toLowerCase()](e),s=document.createElementNS(A,"path");for(let{name:a,value:i}of Array.from(t.attributes))y.indexOf(a)===-1&&s.setAttribute(a,i);s.setAttribute("d",n),t.parentNode?.replaceChild(s,t)}}var c=class c{constructor(t,e,n){this.isReady=!1;this.type="delayed";this.start="inViewport";this.duration=120;this.delay=null;this.dashGap=1;this.forceRender=!1;this.reverseStack=!1;this.selfDestroy=!1;this.ignoreInvisible=!1;this.animTimingFunction=c.LINEAR;this.pathTimingFunction=c.LINEAR;this.callback=()=>{};this.map=[];this.frameLength=0;this.currentFrame=0;this.delayUnit=0;this.speed=1;this.handle=null;this.instanceCallback=null;this.mustRecalcScale=null;this.viewportListener=null;this.setElement(t,e),this.setOptions(e),this.setCallback(n),this.isReady&&this.init()}setElement(t,e){if(t===void 0)throw new Error('Vivus [constructor]: "element" parameter is required');let n=t;if(typeof n=="string"){let s=document.getElementById(n);if(!s)throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID');n=s}if(this.parentEl=n,e&&e.file){let s=new XMLHttpRequest;s.addEventListener("load",()=>{let a=document.createElement("div");a.innerHTML=s.responseText;let i=a.querySelector("svg");if(!i)throw new Error(`Vivus [load]: Cannot find the SVG in the loaded file : ${e.file}`);this.el=i,i.setAttribute("width","100%"),i.setAttribute("height","100%"),this.parentEl.appendChild(i),this.isReady=!0,this.init()}),s.open("GET",e.file),s.send();return}if($(n)){this.el=n,this.isReady=!0;return}if(n instanceof HTMLObjectElement){let s=n,a=i=>{if(this.isReady)return;let o=s.contentDocument&&s.contentDocument.querySelector("svg");if(!o&&i)throw new Error("Vivus [constructor]: object loaded does not contain any SVG");o&&(s.getAttribute("built-by-vivus")&&(this.parentEl.insertBefore(o,s),this.parentEl.removeChild(s),o.setAttribute("width","100%"),o.setAttribute("height","100%")),this.el=o,this.isReady=!0,this.init())};a(),this.isReady||s.addEventListener("load",a);return}throw new Error('Vivus [constructor]: "element" parameter is not valid (or miss the "file" attribute)')}setOptions(t){if(t!==void 0&&(t===null||t.constructor!==Object))throw new Error('Vivus [constructor]: "options" parameter must be an object');let e=t||{};if(e.type&&E.indexOf(e.type)===-1)throw new Error(`Vivus [constructor]: ${e.type} is not an existing animation \`type\``);if(e.start&&V.indexOf(e.start)===-1)throw new Error(`Vivus [constructor]: ${e.start} is not an existing \`start\` option`);this.type=e.type||"delayed",this.start=e.start||"inViewport";let n=navigator.userAgent,s=n.indexOf("MSIE")!==-1||n.indexOf("Trident/")!==-1||n.indexOf("Edge/")!==-1;if(this.duration=u(e.duration,120),this.delay=u(e.delay,null),this.dashGap=u(e.dashGap,1),this.forceRender=Object.prototype.hasOwnProperty.call(e,"forceRender")?!!e.forceRender:s,this.reverseStack=!!e.reverseStack,this.selfDestroy=!!e.selfDestroy,this.onReady=e.onReady,this.map=[],this.ignoreInvisible=Object.prototype.hasOwnProperty.call(e,"ignoreInvisible")?!!e.ignoreInvisible:!1,this.animTimingFunction=e.animTimingFunction||c.LINEAR,this.pathTimingFunction=e.pathTimingFunction||c.LINEAR,this.delay!==null&&this.delay>=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")}setCallback(t){if(t&&typeof t!="function")throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=t||(()=>{})}mapping(){let t=0,e=0,n=0,s=!1,a=Array.from(this.el.querySelectorAll("path"));a.forEach((i,o)=>{if(this.isInvisible(i))return;let l={el:i,length:0,startAt:0,duration:0,isResizeSensitive:!1},h=1;if(i.getAttribute("vector-effect")==="non-scaling-stroke"){let d=i.getBoundingClientRect(),f=i.getBBox();h=Math.max(d.width/f.width,d.height/f.height),l.isResizeSensitive=!0,s=!0}if(l.length=Math.ceil(i.getTotalLength()*h),isNaN(l.length)){m("vivus: cannot retrieve a path element length",i);return}this.map.push(l),i.style.strokeDasharray=`${l.length} ${l.length+this.dashGap*2}`,i.style.strokeDashoffset=String(l.length+this.dashGap),l.length+=this.dashGap,e+=l.length,this.renderPath(o)}),s&&m("vivus: this SVG contains non-scaling-strokes. Call instance.recalc() when the SVG is resized."),e=e===0?1:e,this.delay=this.delay===null?this.duration/3:this.delay,this.delayUnit=this.delay/(a.length>1?a.length-1:1),this.reverseStack&&this.map.reverse(),this.map.forEach((i,o)=>{let l=()=>{let h={};for(let{name:d,value:f}of Array.from(i.el.attributes))h[d]=f;return h};switch(this.type){case"delayed":i.startAt=this.delayUnit*o,i.duration=this.duration-this.delay;break;case"oneByOne":i.startAt=n/e*this.duration,i.duration=i.length/e*this.duration;break;case"sync":case"async":case"nsync":i.startAt=0,i.duration=this.duration;break;case"scenario-sync":{let h=l();i.startAt=t+(u(h["data-delay"],this.delayUnit)||0),i.duration=u(h["data-duration"],this.duration),t=h["data-async"]!==void 0?i.startAt:i.startAt+i.duration,this.frameLength=Math.max(this.frameLength,i.startAt+i.duration);break}case"scenario":{let h=l();i.startAt=u(h["data-start"],this.delayUnit)||0,i.duration=u(h["data-duration"],this.duration),this.frameLength=Math.max(this.frameLength,i.startAt+i.duration);break}}n+=i.length,this.frameLength=this.frameLength||this.duration})}recalc(){this.mustRecalcScale||(this.mustRecalcScale=requestAnimationFrame(()=>this.performLineRecalc()))}performLineRecalc(){for(let t of this.map){if(!t.isResizeSensitive)continue;let e=t.el.getBoundingClientRect(),n=t.el.getBBox(),s=Math.max(e.width/n.width,e.height/n.height);t.length=Math.ceil(t.el.getTotalLength()*s),t.el.style.strokeDasharray=`${t.length} ${t.length+this.dashGap*2}`}this.trace(),this.mustRecalcScale=null}draw(){if(this.currentFrame+=this.speed,this.currentFrame<=0)this.stop(),this.reset();else if(this.currentFrame>=this.frameLength)this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy();else{this.trace(),this.handle=requestAnimationFrame(()=>this.draw());return}this.finished()}finished(){if(this.callback(this),this.instanceCallback){let t=this.instanceCallback;this.instanceCallback=null,t(this)}}trace(){let t=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength;this.map.forEach((e,n)=>{let s=this.pathTimingFunction(Math.max(0,Math.min(1,(t-e.startAt)/e.duration)));e.progress!==s&&(e.progress=s,e.el.style.strokeDashoffset=String(Math.floor(e.length*(1-s))),this.renderPath(n))})}renderPath(t){let e=this.forceRender&&this.map&&this.map[t];if(!e)return;let n=e.el.cloneNode(!0);e.el.parentNode?.replaceChild(n,e.el),e.el=n}init(){this.frameLength=0,this.currentFrame=0,this.map=[],L(this.el),this.mapping(),this.starter(),this.onReady&&this.onReady(this)}starter(){if(this.start==="manual")return;if(this.start==="autostart"){this.play();return}let t=()=>{this.isInViewport(this.parentEl,1)&&(this.play(),window.removeEventListener("scroll",t),this.viewportListener=null)};this.viewportListener=t,window.addEventListener("scroll",t),t()}getStatus(){return this.currentFrame===0?"start":this.currentFrame===this.frameLength?"end":"progress"}reset(){return this.setFrameProgress(0)}finish(){return this.setFrameProgress(1)}setFrameProgress(t){let e=Math.min(1,Math.max(0,t));return this.currentFrame=Math.round(this.frameLength*e),this.trace(),this}play(t,e){this.instanceCallback=null;let n=t;if(n&&typeof n=="function")this.instanceCallback=n,n=void 0;else if(n&&typeof n!="number")throw new Error("Vivus [play]: invalid speed");return e&&typeof e=="function"&&!this.instanceCallback&&(this.instanceCallback=e),this.speed=n||1,g()?(this.stop(),this.currentFrame=this.speed<0?0:this.frameLength,this.trace(),this.speed>0&&this.selfDestroy&&this.destroy(),this.finished(),this):(this.handle||this.draw(),this)}stop(){return this.handle&&(cancelAnimationFrame(this.handle),this.handle=null),this}destroy(){this.stop(),this.viewportListener&&(window.removeEventListener("scroll",this.viewportListener),this.viewportListener=null),this.map.forEach((t,e)=>{t.el.style.strokeDashoffset="",t.el.style.strokeDasharray="",this.renderPath(e)})}isInvisible(t){let e=t.getAttribute("data-ignore");if(e!==null)return e!=="false";if(this.ignoreInvisible){let n=t.getBoundingClientRect();return!n.width&&!n.height}return!1}isInViewport(t,e=0){let n=window.pageYOffset||document.documentElement.scrollTop,s=n+Math.max(document.documentElement.clientHeight,window.innerHeight),a=t.getBoundingClientRect(),i=n+a.top;return i+a.height*(e||0)<=s&&i+a.height>=n}};c.LINEAR=t=>t,c.EASE=t=>-Math.cos(t*Math.PI)/2+.5,c.EASE_OUT=t=>1-Math.pow(1-t,3),c.EASE_IN=t=>Math.pow(t,3),c.EASE_OUT_BOUNCE=t=>{let e=-Math.cos(t*(.5*Math.PI))+1,n=Math.pow(e,1.5),s=Math.pow(1-t,2),a=-Math.abs(Math.cos(n*(2.5*Math.PI)))+1;return 1-s+a*s};var p=c,w=p;globalThis.Vivus=w;})();
|
|
1
|
+
"use strict";(()=>{function g(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function y(r){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),e=s=>r(!!s.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",e),()=>t.removeEventListener("change",e);let i=t;return i.addListener?.(e),()=>i.removeListener?.(e)}function m(r,...t){}var L=["delayed","sync","async","nsync","oneByOne","scenario","scenario-sync"],V=["inViewport","manual","autostart"];function u(r,t){let e=parseInt(r,10);return e>=0?e:t}function M(r){if(typeof window>"u")return!1;let t=window,e=i=>typeof t[i]=="function"&&r instanceof t[i];return e("SVGSVGElement")||e("SVGGElement")||r?.constructor===t.SVGElement}var v=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],$=["line","ellipse","circle","polygon","polyline","rect"],R="http://www.w3.org/2000/svg";function w(r){let t=r.points.trim().split(" ");if(r.points.indexOf(",")===-1){let i=[];for(let s=0;s<t.length;s+=2)i.push(`${t[s]},${t[s+1]}`);t=i}let e=`M${t[0]}`;for(let i=1;i<t.length;i++)t[i].indexOf(",")!==-1&&(e+=`L${t[i]}`);return e}function b(r,t,e,i){let s=parseFloat(e)||0,a=parseFloat(i)||0,n=parseFloat(r)||0,o=parseFloat(t)||0,h=n-s,l=n+s;return`M${h},${o}A${s},${a} 0,1,1 ${l},${o}A${s},${a} 0,1,1 ${h},${o}`}var S={line:r=>`M${r.x1||0},${r.y1||0}L${r.x2||0},${r.y2||0}`,rect(r){let t=parseFloat(r.x)||0,e=parseFloat(r.y)||0,i=parseFloat(r.width)||0,s=parseFloat(r.height)||0;if(r.rx||r.ry){let a=parseInt(r.rx,10)||-1,n=parseInt(r.ry,10)||-1;a=Math.min(Math.max(a<0?n:a,0),i/2),n=Math.min(Math.max(n<0?a:n,0),s/2);let o=`A ${a},${n},0,0,1,`;return`M ${t+a},${e} L ${t+i-a},${e} ${o}${t+i},${e+n} L ${t+i},${e+s-n} ${o}${t+i-a},${e+s} L ${t+a},${e+s} ${o}${t},${e+s-n} L ${t},${e+n} ${o}${t+a},${e}`}return`M${t} ${e} L${t+i} ${e} L${t+i} ${e+s} L${t} ${e+s} Z`},polyline:w,polygon:r=>`${w(r)}Z`,ellipse:r=>b(r.cx,r.cy,r.rx,r.ry),circle:r=>b(r.cx,r.cy,r.r,r.r)};function x(r){for(let t of Array.from(r.querySelectorAll($.join(",")))){let e={};for(let{name:a,value:n}of Array.from(t.attributes)){if(v.indexOf(a)!==-1&&n.indexOf("%")!==-1)throw new Error("Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into 'path' tags. Please use 'viewBox'.");e[a]=n}let i=S[t.tagName.toLowerCase()](e),s=document.createElementNS(R,"path");for(let{name:a,value:n}of Array.from(t.attributes))v.indexOf(a)===-1&&s.setAttribute(a,n);s.setAttribute("d",i),t.parentNode?.replaceChild(s,t)}}var c=class c{constructor(t,e,i){this.isReady=!1;this.type="delayed";this.start="inViewport";this.duration=120;this.delay=null;this.dashGap=1;this.forceRender=!1;this.reverseStack=!1;this.selfDestroy=!1;this.ignoreInvisible=!1;this.animTimingFunction=c.LINEAR;this.pathTimingFunction=c.LINEAR;this.callback=()=>{};this.map=[];this.frameLength=0;this.currentFrame=0;this.delayUnit=0;this.speed=1;this.handle=null;this.instanceCallback=null;this.mustRecalcScale=null;this.viewportListener=null;this.unwatchMotion=()=>{};this.setElement(t,e),this.setOptions(e),this.setCallback(i),this.isReady&&this.init(),this.unwatchMotion=y(s=>{s&&this.handle&&this.endNow()})}endNow(){this.stop(),this.currentFrame=this.speed<0?0:this.frameLength,this.trace(),this.speed>0&&this.selfDestroy&&this.destroy(),this.finished()}setElement(t,e){if(t===void 0)throw new Error('Vivus [constructor]: "element" parameter is required');let i=t;if(typeof i=="string"){let s=document.getElementById(i);if(!s)throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID');i=s}if(this.parentEl=i,e&&e.file){let s=new XMLHttpRequest;s.addEventListener("load",()=>{let a=document.createElement("div");a.innerHTML=s.responseText;let n=a.querySelector("svg");if(!n)throw new Error(`Vivus [load]: Cannot find the SVG in the loaded file : ${e.file}`);this.el=n,n.setAttribute("width","100%"),n.setAttribute("height","100%"),this.parentEl.appendChild(n),this.isReady=!0,this.init()}),s.open("GET",e.file),s.send();return}if(M(i)){this.el=i,this.isReady=!0;return}if(i instanceof HTMLObjectElement){let s=i,a=n=>{if(this.isReady)return;let o=s.contentDocument&&s.contentDocument.querySelector("svg");if(!o&&n)throw new Error("Vivus [constructor]: object loaded does not contain any SVG");o&&(s.getAttribute("built-by-vivus")&&(this.parentEl.insertBefore(o,s),this.parentEl.removeChild(s),o.setAttribute("width","100%"),o.setAttribute("height","100%")),this.el=o,this.isReady=!0,this.init())};a(),this.isReady||s.addEventListener("load",a);return}throw new Error('Vivus [constructor]: "element" parameter is not valid (or miss the "file" attribute)')}setOptions(t){if(t!==void 0&&(t===null||t.constructor!==Object))throw new Error('Vivus [constructor]: "options" parameter must be an object');let e=t||{};if(e.type&&L.indexOf(e.type)===-1)throw new Error(`Vivus [constructor]: ${e.type} is not an existing animation \`type\``);if(e.start&&V.indexOf(e.start)===-1)throw new Error(`Vivus [constructor]: ${e.start} is not an existing \`start\` option`);this.type=e.type||"delayed",this.start=e.start||"inViewport";let i=navigator.userAgent,s=i.indexOf("MSIE")!==-1||i.indexOf("Trident/")!==-1||i.indexOf("Edge/")!==-1;if(this.duration=u(e.duration,120),this.delay=u(e.delay,null),this.dashGap=u(e.dashGap,1),this.forceRender=Object.prototype.hasOwnProperty.call(e,"forceRender")?!!e.forceRender:s,this.reverseStack=!!e.reverseStack,this.selfDestroy=!!e.selfDestroy,this.onReady=e.onReady,this.map=[],this.ignoreInvisible=Object.prototype.hasOwnProperty.call(e,"ignoreInvisible")?!!e.ignoreInvisible:!1,this.animTimingFunction=e.animTimingFunction||c.LINEAR,this.pathTimingFunction=e.pathTimingFunction||c.LINEAR,this.delay!==null&&this.delay>=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")}setCallback(t){if(t&&typeof t!="function")throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=t||(()=>{})}mapping(){let t=0,e=0,i=0,s=!1,a=Array.from(this.el.querySelectorAll("path"));a.forEach((n,o)=>{if(this.isInvisible(n))return;let h={el:n,length:0,startAt:0,duration:0,isResizeSensitive:!1},l=1;if(n.getAttribute("vector-effect")==="non-scaling-stroke"){let d=n.getBoundingClientRect(),f=n.getBBox();l=Math.max(d.width/f.width,d.height/f.height),h.isResizeSensitive=!0,s=!0}if(h.length=Math.ceil(n.getTotalLength()*l),isNaN(h.length)){m("vivus: cannot retrieve a path element length",n);return}this.map.push(h),n.style.strokeDasharray=`${h.length} ${h.length+this.dashGap*2}`,n.style.strokeDashoffset=String(h.length+this.dashGap),h.length+=this.dashGap,e+=h.length,this.renderPath(o)}),s&&m("vivus: this SVG contains non-scaling-strokes. Call instance.recalc() when the SVG is resized."),e=e===0?1:e,this.delay=this.delay===null?this.duration/3:this.delay,this.delayUnit=this.delay/(a.length>1?a.length-1:1),this.reverseStack&&this.map.reverse(),this.map.forEach((n,o)=>{let h=()=>{let l={};for(let{name:d,value:f}of Array.from(n.el.attributes))l[d]=f;return l};switch(this.type){case"delayed":n.startAt=this.delayUnit*o,n.duration=this.duration-this.delay;break;case"oneByOne":n.startAt=i/e*this.duration,n.duration=n.length/e*this.duration;break;case"sync":case"async":case"nsync":n.startAt=0,n.duration=this.duration;break;case"scenario-sync":{let l=h();n.startAt=t+(u(l["data-delay"],this.delayUnit)||0),n.duration=u(l["data-duration"],this.duration),t=l["data-async"]!==void 0?n.startAt:n.startAt+n.duration,this.frameLength=Math.max(this.frameLength,n.startAt+n.duration);break}case"scenario":{let l=h();n.startAt=u(l["data-start"],this.delayUnit)||0,n.duration=u(l["data-duration"],this.duration),this.frameLength=Math.max(this.frameLength,n.startAt+n.duration);break}}i+=n.length,this.frameLength=this.frameLength||this.duration})}recalc(){this.mustRecalcScale||(this.mustRecalcScale=requestAnimationFrame(()=>this.performLineRecalc()))}performLineRecalc(){for(let t of this.map){if(!t.isResizeSensitive)continue;let e=t.el.getBoundingClientRect(),i=t.el.getBBox(),s=Math.max(e.width/i.width,e.height/i.height);t.length=Math.ceil(t.el.getTotalLength()*s),t.el.style.strokeDasharray=`${t.length} ${t.length+this.dashGap*2}`}this.trace(),this.mustRecalcScale=null}draw(){if(this.currentFrame+=this.speed,this.currentFrame<=0)this.stop(),this.reset();else if(this.currentFrame>=this.frameLength)this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy();else{this.trace(),this.handle=requestAnimationFrame(()=>this.draw());return}this.finished()}finished(){if(this.callback(this),this.instanceCallback){let t=this.instanceCallback;this.instanceCallback=null,t(this)}}trace(){let t=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength;this.map.forEach((e,i)=>{let s=this.pathTimingFunction(Math.max(0,Math.min(1,(t-e.startAt)/e.duration)));e.progress!==s&&(e.progress=s,e.el.style.strokeDashoffset=String(Math.floor(e.length*(1-s))),this.renderPath(i))})}renderPath(t){let e=this.forceRender&&this.map&&this.map[t];if(!e)return;let i=e.el.cloneNode(!0);e.el.parentNode?.replaceChild(i,e.el),e.el=i}init(){this.frameLength=0,this.currentFrame=0,this.map=[],x(this.el),this.mapping(),this.starter(),this.onReady&&this.onReady(this)}starter(){if(this.start==="manual")return;if(this.start==="autostart"){this.play();return}let t=()=>{this.isInViewport(this.parentEl,1)&&(this.play(),window.removeEventListener("scroll",t),this.viewportListener=null)};this.viewportListener=t,window.addEventListener("scroll",t),t()}getStatus(){return this.currentFrame===0?"start":this.currentFrame===this.frameLength?"end":"progress"}reset(){return this.setFrameProgress(0)}finish(){return this.setFrameProgress(1)}setFrameProgress(t){let e=Math.min(1,Math.max(0,t));return this.currentFrame=Math.round(this.frameLength*e),this.trace(),this}play(t,e){this.instanceCallback=null;let i=t;if(i&&typeof i=="function")this.instanceCallback=i,i=void 0;else if(i&&typeof i!="number")throw new Error("Vivus [play]: invalid speed");return e&&typeof e=="function"&&!this.instanceCallback&&(this.instanceCallback=e),this.speed=i||1,g()?(this.endNow(),this):(this.handle||this.draw(),this)}stop(){return this.handle&&(cancelAnimationFrame(this.handle),this.handle=null),this}destroy(){this.stop(),this.unwatchMotion(),this.viewportListener&&(window.removeEventListener("scroll",this.viewportListener),this.viewportListener=null),this.map.forEach((t,e)=>{t.el.style.strokeDashoffset="",t.el.style.strokeDasharray="",this.renderPath(e)})}isInvisible(t){let e=t.getAttribute("data-ignore");if(e!==null)return e!=="false";if(this.ignoreInvisible){let i=t.getBoundingClientRect();return!i.width&&!i.height}return!1}isInViewport(t,e=0){let i=window.pageYOffset||document.documentElement.scrollTop,s=i+Math.max(document.documentElement.clientHeight,window.innerHeight),a=t.getBoundingClientRect(),n=i+a.top;return n+a.height*(e||0)<=s&&n+a.height>=i}};c.LINEAR=t=>t,c.EASE=t=>-Math.cos(t*Math.PI)/2+.5,c.EASE_OUT=t=>1-Math.pow(1-t,3),c.EASE_IN=t=>Math.pow(t,3),c.EASE_OUT_BOUNCE=t=>{let e=-Math.cos(t*(.5*Math.PI))+1,i=Math.pow(e,1.5),s=Math.pow(1-t,2),a=-Math.abs(Math.cos(i*(2.5*Math.PI)))+1;return 1-s+a*s};var p=c,E=p;globalThis.Vivus=E;})();
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-AJ22VSHC.mjs';import {a as a$1}from'./chunk-5PJEKEEP.mjs';var ee="4.0.9",X=()=>typeof window<"u"&&typeof document<"u",H=e=>e!==null&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]";function q(e,...n){for(let t of n)if(H(t))for(let o of Object.keys(t)){let i=t[o];H(i)?(H(e[o])||(e[o]={}),q(e[o],i)):e[o]=i;}return e}function $(e){if(typeof e=="string")try{return Array.from(document.querySelectorAll(e))}catch{return []}return e instanceof Element?[e]:e&&typeof e.length=="number"?Array.from(e).filter(n=>n instanceof Element):[]}var A=(e=navigator.userAgent)=>/Android|iPhone|iPad|iPod/i.test(e),G=false;function W(e,...n){G&&typeof console<"u"&&console.log(`%cScrollReveal: ${e}${n.map(t=>`
|
|
2
|
+
\u2014 ${t}`).join("")}`,"color: #ea654b;");}var I=()=>[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function se(e,n){let t=[];for(let o=0;o<4;o++)for(let i=0;i<4;i++){let r=0;for(let s=0;s<4;s++)r+=e[i+4*s]*n[4*o+s];t[i+4*o]=r;}return t}function le(e){let n=/matrix(3d)?\(([^)]+)\)/.exec(e||"");if(!n)return I();let t=n[2].split(", ").map(parseFloat);if(t.length===16)return t;let o=I();return [o[0],o[1],o[4],o[5],o[12],o[13]]=t,o}function N(e,n){let t=Math.PI/180*n,o=Math.cos(t),i=Math.sin(t),r=I(),[s,a,c,R]=e==="x"?[5,10,6,9]:e==="y"?[0,10,8,2]:[0,5,1,4];return r[s]=r[a]=o,r[c]=i,r[R]=-i,r}function ae(e,n){let t=I();return t[e==="X"?12:13]=n,t}function ce(e){let n=I();return n[0]=n[5]=e,n}function w(e,n){for(let t of n.split(";")){let o=t.indexOf(":");if(o<1)continue;let i=t.slice(0,o).trim(),r=t.slice(o+1).trim();i&&r&&e.style.setProperty(i,r);}}function de(e){let{node:n,config:t}=e,o=window.getComputedStyle(n),i=(n.getAttribute("style")||"").match(/[\w-]+\s*:\s*[^;]+\s*/gi)||[],r=i.map(d=>d.trim()),s=`${r.join("; ")};`,a=i.some(d=>/visibility\s?:\s?visible/i.test(d))?s:`${[...r,"visibility: visible"].join("; ")};`,c=parseFloat(o.opacity),R=t.opacity!==null&&!isNaN(parseFloat(String(t.opacity)))?parseFloat(String(t.opacity)):c,b=c!==R?{computed:`opacity: ${c};`,generated:`opacity: ${R};`}:{computed:"",generated:""},u=[];if(parseFloat(t.distance)){let d=t.origin==="top"||t.origin==="bottom"?"Y":"X",f=t.distance;(t.origin==="top"||t.origin==="left")&&(f=f.startsWith("-")?f.slice(1):`-${f}`);let k=f.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g)||[],m=Number(k[0]),z=k[1],M;if(z==="em")M=parseInt(o.fontSize,10)*m;else if(z==="px")M=m;else if(z==="%"){let K=n.getBoundingClientRect();M=(d==="Y"?K.height:K.width)*m/100;}else throw new RangeError("Unrecognized or missing distance unit.");u.push(ae(d,M));}t.rotate.x&&u.push(N("x",t.rotate.x)),t.rotate.y&&u.push(N("y",t.rotate.y)),t.rotate.z&&u.push(N("z",t.rotate.z)),t.scale!==1&&u.push(ce(t.scale===0?2e-4:t.scale));let p={initial:"",final:""};if(u.length){let d=le(o.transform);p={initial:`transform: matrix3d(${u.reduce(se,d).join(", ")});`,final:`transform: matrix3d(${d.join(", ")});`};}let S={delayed:"",instant:""};if(b.generated||p.initial){let d=m=>`${m/1e3}s`,f=[],k=m=>({delayed:`${m} ${d(t.duration)} ${t.easing} ${d(t.delay)}`,instant:`${m} ${d(t.duration)} ${t.easing} 0s`});o.transition&&!/all 0s|none 0s/.test(o.transition)&&f.push({delayed:o.transition,instant:o.transition}),b.generated&&f.push(k("opacity")),p.initial&&f.push(k("transform")),S={delayed:`transition: ${f.map(m=>m.delayed).join(", ")};`,instant:`transition: ${f.map(m=>m.instant).join(", ")};`};}return {inline:{computed:s,generated:a},opacity:b,position:o.position,transform:p,transition:S}}var T=(...e)=>e.filter(n=>n!=="").join(" "),ue=()=>({delay:0,distance:"0",duration:600,easing:"cubic-bezier(0.5, 0, 0, 1)",interval:0,opacity:0,origin:"bottom",rotate:{x:0,y:0,z:0},scale:1,cleanup:false,container:document.documentElement,desktop:true,mobile:true,reset:false,useDelay:"always",viewFactor:0,viewOffset:{top:0,right:0,bottom:0,left:0},afterReset:()=>{},afterReveal:()=>{},beforeReset:()=>{},beforeReveal:()=>{}}),v=null,O=null,l={containers:{},elements:{},history:[],sequences:{}},Y=true,j=null,y=0,C=false,E=null,B=false,fe=0,P=()=>fe++;function Z(e,n=false){let t=e,o=n?t.clientHeight:t.offsetHeight,i=n?t.clientWidth:t.offsetWidth,r=0,s=0,a=t;for(;a;)isNaN(a.offsetTop)||(r+=a.offsetTop),isNaN(a.offsetLeft)||(s+=a.offsetLeft),a=a.offsetParent;return {bounds:{top:r,right:s+i,bottom:r+o,left:s},height:o,width:i}}var me=e=>e.node===document.documentElement?{top:window.pageYOffset,left:window.pageXOffset}:{top:e.node.scrollTop,left:e.node.scrollLeft};function be(e){let n=l.containers[e.containerId];if(!n||!n.geometry||!n.scroll||!e.geometry)return false;let t=Math.max(0,Math.min(1,e.config.viewFactor)),o=e.config.viewOffset,i=e.geometry,r={top:i.bounds.top+i.height*t,right:i.bounds.right-i.width*t,bottom:i.bounds.bottom-i.height*t,left:i.bounds.left+i.width*t},s={top:n.geometry.bounds.top+n.scroll.top+o.top,right:n.geometry.bounds.right+n.scroll.left-o.right,bottom:n.geometry.bounds.bottom+n.scroll.top-o.bottom,left:n.geometry.bounds.left+n.scroll.left+o.left};return r.top<s.bottom&&r.right>s.left&&r.bottom>s.top&&r.left<s.right||e.styles.position==="fixed"}function te(e,n=false){let t=n?e.config.duration+e.config.delay:e.config.duration,o=0;e.timer&&(o=Date.now()-e.timer.start,clearTimeout(e.timer.clock)),(e.revealed?e.config.beforeReveal:e.config.beforeReset)(e.node),e.timer={start:Date.now(),clock:setTimeout(()=>{(e.revealed?e.config.afterReveal:e.config.afterReset)(e.node),e.timer=null,e.revealed&&!e.config.reset&&e.config.cleanup&&U(e.node);},t-o)};}function ge(e,n){let t=e.styles;e.revealed=e.seen=true,w(e.node,T(t.inline.generated,t.opacity.computed,t.transform.final,n?t.transition.delayed:t.transition.instant)),te(e,n);}function pe(e){let n=e.styles;e.revealed=false,w(e.node,T(n.inline.generated,n.opacity.generated,n.transform.initial,n.transition.instant)),te(e);}function x(e,n={}){let t=n.pristine||Y,o=e.config.useDelay,i=o==="always"||o==="onload"&&t||o==="once"&&!e.seen;if(n.reveal||e.visible&&!e.revealed)return ge(e,i);if(n.reset||!e.visible&&e.revealed&&e.config.reset)return pe(e)}function _(e,n){let t=[],o=[],i=[];return e.members.forEach((r,s)=>{l.elements[r]?.[n]&&o.push(s);}),o.length&&e.members.forEach((r,s)=>{let a=l.elements[r];a&&!a[n]&&(s<o[0]?t:i).push(s);}),{head:t,body:o,foot:i}}function L(e,n,t,o){let i=t<0?"head":"foot",r=l.elements[e.members[n+t]];e.blocked[i]=true,setTimeout(()=>{e.blocked[i]=false,r&&ne(r,o);},e.interval);}function ne(e,n=Y){if(!e.visible&&e.revealed&&e.config.reset)return x(e,{reset:true});let t=e.sequence&&l.sequences[e.sequence.id];if(!t||!e.sequence)return;let o=e.sequence.index,i=_(t,"visible"),r=_(t,"revealed");if(!r.body.length){let a=i.body[0],c=l.elements[t.members[a]];if(c)return L(t,a,-1,n),L(t,a,1,n),x(c,{reveal:true,pristine:n})}let s=a=>a[a.length-1];if(!t.blocked.head&&o===s(r.head)&&o>=(i.body[0]??1/0))return L(t,o,-1,n),x(e,{reveal:true,pristine:n});if(!t.blocked.foot&&o===r.foot[0]&&o<=(s(i.body)??-1/0))return L(t,o,1,n),x(e,{reveal:true,pristine:n})}function ve(){y=0;let e=B;B=false;for(let t of Object.values(l.containers))(e||!t.geometry)&&(t.geometry=Z(t.node,true)),t.scroll=me(t);let n=Object.values(l.elements);for(let t of n)(e||!t.geometry)&&(t.geometry=Z(t.node)),t.visible=be(t);for(let t of n)t.sequence?ne(t):x(t);Y=false;}function g(e){let n=e?e.type:"init";(n==="init"||n==="resize")&&(B=true),y||(y=requestAnimationFrame(ve));}var h=e=>e.node===document.documentElement?window:e.node;function oe(){let e=new Set(Array.from(document.querySelectorAll("[data-sr-id]")).map(o=>parseInt(o.getAttribute("data-sr-id")||"",10)));for(let o of Object.values(l.elements))e.has(o.id)||delete l.elements[o.id];let n=new Set,t=new Set;for(let o of Object.values(l.elements))n.add(o.containerId),o.sequence&&t.add(o.sequence.id);for(let o of Object.values(l.containers))n.has(o.id)||(h(o).removeEventListener("scroll",g),h(o).removeEventListener("resize",g),delete l.containers[o.id]);for(let o of Object.values(l.sequences))t.has(o.id)||delete l.sequences[o.id];}function V(){j=null,oe();let e=C||a();for(let n of Object.values(l.elements)){let t=n.styles;e?(n.visible=n.revealed=n.seen=true,w(n.node,T(t.inline.generated,t.opacity.computed,t.transform.final,"transition: none;"))):n.visible?(n.revealed=true,w(n.node,T(t.inline.generated,t.opacity.computed,t.transform.final))):(n.revealed=false,w(n.node,T(t.inline.generated,t.opacity.generated,t.transform.initial)));}if(e){for(let n of Object.values(l.containers))h(n).removeEventListener("scroll",g),h(n).removeEventListener("resize",g);y&&cancelAnimationFrame(y),y=0;return}for(let n of Object.values(l.containers))h(n).addEventListener("scroll",g),h(n).addEventListener("resize",g);g();}function ie(e,n={},t=false){if(!v)return;let o=[],i=n.interval||0,r,s;try{if(i){let c=Math.abs(i);if(isNaN(c))throw new RangeError("Invalid sequence interval.");r={id:P(),interval:Math.max(c,16),members:[],blocked:{head:!1,foot:!1}};}let a=$(e);if(!a.length)throw new Error("Invalid reveal target.");s=[];for(let c of a){let R=c.getAttribute("data-sr-id"),b=R!==null?l.elements[Number(R)]:void 0,u=b?q({},b):{id:P(),node:c,seen:!1,revealed:!1,visible:!1};b&&w(c,b.styles.inline.computed);let p=q({},b?b.config:v,n);if(!p.mobile&&A()||!p.desktop&&!A()){b&&U(c);continue}let S=$(p.container)[0];if(!S)throw new Error("Invalid container.");if(!S.contains(c))continue;let d=[...o,...Object.values(l.containers)].find(f=>f.node===S)?.id;d===void 0&&(d=P(),o.push({id:d,node:S})),u.config=p,u.containerId=d,u.styles=de(u),r&&(u.sequence={id:r.id,index:r.members.length},r.members.push(u.id)),s.push(u);}for(let c of s)l.elements[c.id]=c,c.node.setAttribute("data-sr-id",String(c.id));}catch(a){return W("Reveal failed.",a.message)}for(let a of o)l.containers[a.id]=a;r&&(l.sequences[r.id]=r),t||(l.history.push({target:e,options:n}),j&&clearTimeout(j),j=setTimeout(V,0));}function U(e){let n=false;for(let t of $(e)){let o=t.getAttribute("data-sr-id");if(o===null)continue;n=true;let i=l.elements[Number(o)];i&&(i.timer&&clearTimeout(i.timer.clock),w(i.node,i.styles.inline.generated),delete l.elements[i.id]),t.removeAttribute("data-sr-id");}n&&oe();}function ye(){for(let e of Object.values(l.elements))w(e.node,e.styles.inline.generated),e.node.removeAttribute("data-sr-id");for(let e of Object.values(l.containers))h(e).removeEventListener("scroll",g),h(e).removeEventListener("resize",g);y&&cancelAnimationFrame(y),y=0,l={containers:{},elements:{},history:[],sequences:{}},E?.(),E=null,C=false;}function he(){for(let e of l.history)ie(e.target,e.options,true);V();}var D=()=>(X()&&document.documentElement.classList.remove("sr"),{reveal(){},clean(){},destroy(){},sync(){},defaults:{},version:ee,noop:true});function re(){if(!X())return false;let e=document.documentElement.style;return ("transform"in e||"WebkitTransform"in e)&&("transition"in e||"WebkitTransition"in e)}function we(){document.documentElement.classList.add("sr"),document.body?document.body.style.height="100%":document.addEventListener("DOMContentLoaded",()=>{document.body.style.height="100%";},{once:true});}function Re(e={}){if(!X()||!re())return D();let n;try{if(n=q({},v??ue(),e),!$(n.container)[0])throw new Error("Invalid container.")}catch(t){return W("Invalid configuration.",t.message),D()}return v=n,!v.mobile&&A()||!v.desktop&&!A()?(W("This device is disabled.",`desktop: ${v.desktop}`,`mobile: ${v.mobile}`),D()):(we(),!E&&!C&&!a()&&(E=a$1(t=>{t&&(E?.(),E=null,C=true,V());})),O||(O={reveal:(t,o)=>ie(t,o),clean:U,destroy:ye,sync:he,get defaults(){return v},version:ee,noop:false},Object.defineProperty(O,"delegate",{value:g})),O)}var J=Re;J.isSupported=re;Object.defineProperty(J,"debug",{get:()=>G,set:e=>{typeof e=="boolean"&&(G=e);}});var ke=J;export{J as a,ke as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-AJ22VSHC.mjs';import {a}from'./chunk-5PJEKEEP.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';var E=["delayed","sync","async","nsync","oneByOne","scenario","scenario-sync"],$=["inViewport","manual","autostart"];function u(r,t){let e=parseInt(r,10);return e>=0?e:t}function V(r){if(typeof window>"u")return false;let t=window,e=i=>typeof t[i]=="function"&&r instanceof t[i];return e("SVGSVGElement")||e("SVGGElement")||r?.constructor===t.SVGElement}var v=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],A=["line","ellipse","circle","polygon","polyline","rect"],x="http://www.w3.org/2000/svg";function b(r){let t=r.points.trim().split(" ");if(r.points.indexOf(",")===-1){let i=[];for(let s=0;s<t.length;s+=2)i.push(`${t[s]},${t[s+1]}`);t=i;}let e=`M${t[0]}`;for(let i=1;i<t.length;i++)t[i].indexOf(",")!==-1&&(e+=`L${t[i]}`);return e}function w(r,t,e,i){let s=parseFloat(e)||0,a=parseFloat(i)||0,n=parseFloat(r)||0,o=parseFloat(t)||0,h=n-s,l=n+s;return `M${h},${o}A${s},${a} 0,1,1 ${l},${o}A${s},${a} 0,1,1 ${h},${o}`}var L={line:r=>`M${r.x1||0},${r.y1||0}L${r.x2||0},${r.y2||0}`,rect(r){let t=parseFloat(r.x)||0,e=parseFloat(r.y)||0,i=parseFloat(r.width)||0,s=parseFloat(r.height)||0;if(r.rx||r.ry){let a=parseInt(r.rx,10)||-1,n=parseInt(r.ry,10)||-1;a=Math.min(Math.max(a<0?n:a,0),i/2),n=Math.min(Math.max(n<0?a:n,0),s/2);let o=`A ${a},${n},0,0,1,`;return `M ${t+a},${e} L ${t+i-a},${e} ${o}${t+i},${e+n} L ${t+i},${e+s-n} ${o}${t+i-a},${e+s} L ${t+a},${e+s} ${o}${t},${e+s-n} L ${t},${e+n} ${o}${t+a},${e}`}return `M${t} ${e} L${t+i} ${e} L${t+i} ${e+s} L${t} ${e+s} Z`},polyline:b,polygon:r=>`${b(r)}Z`,ellipse:r=>w(r.cx,r.cy,r.rx,r.ry),circle:r=>w(r.cx,r.cy,r.r,r.r)};function R(r){for(let t of Array.from(r.querySelectorAll(A.join(",")))){let e={};for(let{name:a,value:n}of Array.from(t.attributes)){if(v.indexOf(a)!==-1&&n.indexOf("%")!==-1)throw new Error("Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into 'path' tags. Please use 'viewBox'.");e[a]=n;}let i=L[t.tagName.toLowerCase()](e),s=document.createElementNS(x,"path");for(let{name:a,value:n}of Array.from(t.attributes))v.indexOf(a)===-1&&s.setAttribute(a,n);s.setAttribute("d",i),t.parentNode?.replaceChild(s,t);}}var c=class c{constructor(t,e,i){this.isReady=false;this.type="delayed";this.start="inViewport";this.duration=120;this.delay=null;this.dashGap=1;this.forceRender=false;this.reverseStack=false;this.selfDestroy=false;this.ignoreInvisible=false;this.animTimingFunction=c.LINEAR;this.pathTimingFunction=c.LINEAR;this.callback=()=>{};this.map=[];this.frameLength=0;this.currentFrame=0;this.delayUnit=0;this.speed=1;this.handle=null;this.instanceCallback=null;this.mustRecalcScale=null;this.viewportListener=null;this.unwatchMotion=()=>{};this.setElement(t,e),this.setOptions(e),this.setCallback(i),this.isReady&&this.init(),this.unwatchMotion=a(s=>{s&&this.handle&&this.endNow();});}endNow(){this.stop(),this.currentFrame=this.speed<0?0:this.frameLength,this.trace(),this.speed>0&&this.selfDestroy&&this.destroy(),this.finished();}setElement(t,e){if(t===void 0)throw new Error('Vivus [constructor]: "element" parameter is required');let i=t;if(typeof i=="string"){let s=document.getElementById(i);if(!s)throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID');i=s;}if(this.parentEl=i,e&&e.file){let s=new XMLHttpRequest;s.addEventListener("load",()=>{let a=document.createElement("div");a.innerHTML=s.responseText;let n=a.querySelector("svg");if(!n)throw new Error(`Vivus [load]: Cannot find the SVG in the loaded file : ${e.file}`);this.el=n,n.setAttribute("width","100%"),n.setAttribute("height","100%"),this.parentEl.appendChild(n),this.isReady=true,this.init();}),s.open("GET",e.file),s.send();return}if(V(i)){this.el=i,this.isReady=true;return}if(i instanceof HTMLObjectElement){let s=i,a=n=>{if(this.isReady)return;let o=s.contentDocument&&s.contentDocument.querySelector("svg");if(!o&&n)throw new Error("Vivus [constructor]: object loaded does not contain any SVG");o&&(s.getAttribute("built-by-vivus")&&(this.parentEl.insertBefore(o,s),this.parentEl.removeChild(s),o.setAttribute("width","100%"),o.setAttribute("height","100%")),this.el=o,this.isReady=true,this.init());};a(),this.isReady||s.addEventListener("load",a);return}throw new Error('Vivus [constructor]: "element" parameter is not valid (or miss the "file" attribute)')}setOptions(t){if(t!==void 0&&(t===null||t.constructor!==Object))throw new Error('Vivus [constructor]: "options" parameter must be an object');let e=t||{};if(e.type&&E.indexOf(e.type)===-1)throw new Error(`Vivus [constructor]: ${e.type} is not an existing animation \`type\``);if(e.start&&$.indexOf(e.start)===-1)throw new Error(`Vivus [constructor]: ${e.start} is not an existing \`start\` option`);this.type=e.type||"delayed",this.start=e.start||"inViewport";let i=navigator.userAgent,s=i.indexOf("MSIE")!==-1||i.indexOf("Trident/")!==-1||i.indexOf("Edge/")!==-1;if(this.duration=u(e.duration,120),this.delay=u(e.delay,null),this.dashGap=u(e.dashGap,1),this.forceRender=Object.prototype.hasOwnProperty.call(e,"forceRender")?!!e.forceRender:s,this.reverseStack=!!e.reverseStack,this.selfDestroy=!!e.selfDestroy,this.onReady=e.onReady,this.map=[],this.ignoreInvisible=Object.prototype.hasOwnProperty.call(e,"ignoreInvisible")?!!e.ignoreInvisible:false,this.animTimingFunction=e.animTimingFunction||c.LINEAR,this.pathTimingFunction=e.pathTimingFunction||c.LINEAR,this.delay!==null&&this.delay>=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")}setCallback(t){if(t&&typeof t!="function")throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=t||(()=>{});}mapping(){let t=0,e=0,i=0,s=false,a=Array.from(this.el.querySelectorAll("path"));a.forEach((n,o)=>{if(this.isInvisible(n))return;let h={el:n,length:0,startAt:0,duration:0,isResizeSensitive:false},l=1;if(n.getAttribute("vector-effect")==="non-scaling-stroke"){let d=n.getBoundingClientRect(),m=n.getBBox();l=Math.max(d.width/m.width,d.height/m.height),h.isResizeSensitive=true,s=true;}if(h.length=Math.ceil(n.getTotalLength()*l),isNaN(h.length)){b$1("vivus: cannot retrieve a path element length",n);return}this.map.push(h),n.style.strokeDasharray=`${h.length} ${h.length+this.dashGap*2}`,n.style.strokeDashoffset=String(h.length+this.dashGap),h.length+=this.dashGap,e+=h.length,this.renderPath(o);}),s&&b$1("vivus: this SVG contains non-scaling-strokes. Call instance.recalc() when the SVG is resized."),e=e===0?1:e,this.delay=this.delay===null?this.duration/3:this.delay,this.delayUnit=this.delay/(a.length>1?a.length-1:1),this.reverseStack&&this.map.reverse(),this.map.forEach((n,o)=>{let h=()=>{let l={};for(let{name:d,value:m}of Array.from(n.el.attributes))l[d]=m;return l};switch(this.type){case "delayed":n.startAt=this.delayUnit*o,n.duration=this.duration-this.delay;break;case "oneByOne":n.startAt=i/e*this.duration,n.duration=n.length/e*this.duration;break;case "sync":case "async":case "nsync":n.startAt=0,n.duration=this.duration;break;case "scenario-sync":{let l=h();n.startAt=t+(u(l["data-delay"],this.delayUnit)||0),n.duration=u(l["data-duration"],this.duration),t=l["data-async"]!==void 0?n.startAt:n.startAt+n.duration,this.frameLength=Math.max(this.frameLength,n.startAt+n.duration);break}case "scenario":{let l=h();n.startAt=u(l["data-start"],this.delayUnit)||0,n.duration=u(l["data-duration"],this.duration),this.frameLength=Math.max(this.frameLength,n.startAt+n.duration);break}}i+=n.length,this.frameLength=this.frameLength||this.duration;});}recalc(){this.mustRecalcScale||(this.mustRecalcScale=requestAnimationFrame(()=>this.performLineRecalc()));}performLineRecalc(){for(let t of this.map){if(!t.isResizeSensitive)continue;let e=t.el.getBoundingClientRect(),i=t.el.getBBox(),s=Math.max(e.width/i.width,e.height/i.height);t.length=Math.ceil(t.el.getTotalLength()*s),t.el.style.strokeDasharray=`${t.length} ${t.length+this.dashGap*2}`;}this.trace(),this.mustRecalcScale=null;}draw(){if(this.currentFrame+=this.speed,this.currentFrame<=0)this.stop(),this.reset();else if(this.currentFrame>=this.frameLength)this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy();else {this.trace(),this.handle=requestAnimationFrame(()=>this.draw());return}this.finished();}finished(){if(this.callback(this),this.instanceCallback){let t=this.instanceCallback;this.instanceCallback=null,t(this);}}trace(){let t=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength;this.map.forEach((e,i)=>{let s=this.pathTimingFunction(Math.max(0,Math.min(1,(t-e.startAt)/e.duration)));e.progress!==s&&(e.progress=s,e.el.style.strokeDashoffset=String(Math.floor(e.length*(1-s))),this.renderPath(i));});}renderPath(t){let e=this.forceRender&&this.map&&this.map[t];if(!e)return;let i=e.el.cloneNode(true);e.el.parentNode?.replaceChild(i,e.el),e.el=i;}init(){this.frameLength=0,this.currentFrame=0,this.map=[],R(this.el),this.mapping(),this.starter(),this.onReady&&this.onReady(this);}starter(){if(this.start==="manual")return;if(this.start==="autostart"){this.play();return}let t=()=>{this.isInViewport(this.parentEl,1)&&(this.play(),window.removeEventListener("scroll",t),this.viewportListener=null);};this.viewportListener=t,window.addEventListener("scroll",t),t();}getStatus(){return this.currentFrame===0?"start":this.currentFrame===this.frameLength?"end":"progress"}reset(){return this.setFrameProgress(0)}finish(){return this.setFrameProgress(1)}setFrameProgress(t){let e=Math.min(1,Math.max(0,t));return this.currentFrame=Math.round(this.frameLength*e),this.trace(),this}play(t,e){this.instanceCallback=null;let i=t;if(i&&typeof i=="function")this.instanceCallback=i,i=void 0;else if(i&&typeof i!="number")throw new Error("Vivus [play]: invalid speed");return e&&typeof e=="function"&&!this.instanceCallback&&(this.instanceCallback=e),this.speed=i||1,a$1()?(this.endNow(),this):(this.handle||this.draw(),this)}stop(){return this.handle&&(cancelAnimationFrame(this.handle),this.handle=null),this}destroy(){this.stop(),this.unwatchMotion(),this.viewportListener&&(window.removeEventListener("scroll",this.viewportListener),this.viewportListener=null),this.map.forEach((t,e)=>{t.el.style.strokeDashoffset="",t.el.style.strokeDasharray="",this.renderPath(e);});}isInvisible(t){let e=t.getAttribute("data-ignore");if(e!==null)return e!=="false";if(this.ignoreInvisible){let i=t.getBoundingClientRect();return !i.width&&!i.height}return false}isInViewport(t,e=0){let i=window.pageYOffset||document.documentElement.scrollTop,s=i+Math.max(document.documentElement.clientHeight,window.innerHeight),a=t.getBoundingClientRect(),n=i+a.top;return n+a.height*(e||0)<=s&&n+a.height>=i}};c.LINEAR=t=>t,c.EASE=t=>-Math.cos(t*Math.PI)/2+.5,c.EASE_OUT=t=>1-Math.pow(1-t,3),c.EASE_IN=t=>Math.pow(t,3),c.EASE_OUT_BOUNCE=t=>{let e=-Math.cos(t*(.5*Math.PI))+1,i=Math.pow(e,1.5),s=Math.pow(1-t,2),a=-Math.abs(Math.cos(i*(2.5*Math.PI)))+1;return 1-s+a*s};var p=c,k=p;
|
|
2
|
+
export{p as a,k as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-AJ22VSHC.mjs';import {a as a$2}from'./chunk-5PJEKEEP.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';var C={offset:120,delay:0,duration:400,easing:"ease",once:false,mirror:false,anchorPlacement:"top-bottom",disable:false,startEvent:"DOMContentLoaded",disableMutationObserver:false,initClassName:"aos-init",animatedClassName:"aos-animate",useClassNames:false,throttleDelay:99,debounceDelay:50},j={"ease-in-back":"cubic-bezier(.6,-.28,.735,.045)","ease-out-back":"cubic-bezier(.175,.885,.32,1.275)","ease-in-out-back":"cubic-bezier(.68,-.55,.265,1.55)","ease-in-sine":"cubic-bezier(.47,0,.745,.715)","ease-out-sine":"cubic-bezier(.39,.575,.565,1)","ease-in-out-sine":"cubic-bezier(.445,.05,.55,.95)","ease-in-quad":"cubic-bezier(.55,.085,.68,.53)","ease-out-quad":"cubic-bezier(.25,.46,.45,.94)","ease-in-out-quad":"cubic-bezier(.455,.03,.515,.955)","ease-in-cubic":"cubic-bezier(.55,.055,.675,.19)","ease-out-cubic":"cubic-bezier(.215,.61,.355,1)","ease-in-out-cubic":"cubic-bezier(.645,.045,.355,1)","ease-in-quart":"cubic-bezier(.895,.03,.685,.22)","ease-out-quart":"cubic-bezier(.165,.84,.44,1)","ease-in-out-quart":"cubic-bezier(.77,0,.175,1)"},w="svg-scroll-draw-aos",r=(e,t)=>`translate3d(${e},${t},0)`,U=[["fade-up",r("0","100px")],["fade-down",r("0","-100px")],["fade-right",r("-100px","0")],["fade-left",r("100px","0")],["fade-up-right",r("-100px","100px")],["fade-up-left",r("100px","100px")],["fade-down-right",r("-100px","-100px")],["fade-down-left",r("100px","-100px")],["zoom-in","scale(.6)"],["zoom-out","scale(1.2)"],["zoom-in-up",`${r("0","100px")} scale(.6)`],["zoom-in-down",`${r("0","-100px")} scale(.6)`],["zoom-in-right",`${r("-100px","0")} scale(.6)`],["zoom-in-left",`${r("100px","0")} scale(.6)`],["zoom-out-up",`${r("0","100px")} scale(1.2)`],["zoom-out-down",`${r("0","-100px")} scale(1.2)`],["zoom-out-right",`${r("-100px","0")} scale(1.2)`],["zoom-out-left",`${r("100px","0")} scale(1.2)`],["slide-up",r("0","100%")],["slide-down",r("0","-100%")],["slide-right",r("-100%","0")],["slide-left",r("100%","0")],["flip-left","perspective(2500px) rotateY(-100deg)"],["flip-right","perspective(2500px) rotateY(100deg)"],["flip-up","perspective(2500px) rotateX(-100deg)"],["flip-down","perspective(2500px) rotateX(100deg)"]];function G(e){let t=`.${e}`,n=o=>`[data-aos^=${o}][data-aos^=${o}]`;return ["[data-aos][data-aos]{transition-duration:var(--aos-duration,400ms);transition-timing-function:var(--aos-easing,ease);transition-delay:0s}",`[data-aos][data-aos]${t}{transition-delay:var(--aos-delay,0ms)}`,`${n("fade")}{opacity:0;transition-property:opacity,transform}`,`${n("fade")}${t}{opacity:1;transform:translateZ(0)}`,`${n("zoom")}{opacity:0;transition-property:opacity,transform}`,`${n("zoom")}${t}{opacity:1;transform:translateZ(0) scale(1)}`,`${n("slide")}{transition-property:transform}`,`${n("slide")}${t}{transform:translateZ(0)}`,`${n("flip")}{backface-visibility:hidden;transition-property:transform}`,...U.map(([o,u])=>`[data-aos=${o}]{transform:${u}}`),...["left","right"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateY(0)}`),...["up","down"].map(o=>`[data-aos=flip-${o}]${t}{transform:perspective(2500px) rotateX(0)}`),"[data-aos-instant][data-aos-instant]{transition:none!important}"].join(`
|
|
2
|
+
`)}var a={...C},s=[],l=false,b=0,$,v=null,c=null,f=false,p=null,N=()=>typeof window<"u"&&typeof document<"u";function H(e){if(!(e instanceof HTMLElement))return e.getBoundingClientRect().top+window.scrollY;let t=0,n=e;for(;n;)t+=n.offsetTop-(n.tagName!=="BODY"?n.scrollTop:0),n=n.offsetParent;return t}var k=e=>e instanceof HTMLElement?e.offsetHeight:e.getBoundingClientRect().height;function d(e,t){return e.getAttribute(`data-aos-${t}`)}function M(e,t,n){let o=d(e,t);return o==="true"?true:o==="false"?false:n}function q(e,t){let n=d(e,"offset");return n&&!isNaN(Number(n))?parseInt(n,10):n||t?0:a.offset}function W(e){let t=window.innerHeight,n=d(e,"anchor-placement"),o=q(e,n),u=d(e,"anchor"),x=u?document.querySelector(u):null;u&&!x&&b$1(`aos: data-aos-anchor="${u}" matches nothing; using the element itself`);let L=x||e,m=k(L),i=H(L)-t;switch(n||a.anchorPlacement){case "center-bottom":i+=m/2;break;case "bottom-bottom":i+=m;break;case "top-center":i+=t/2;break;case "center-center":i+=t/2+m/2;break;case "bottom-center":i+=t/2+m;break;case "top-top":i+=t;break;case "bottom-top":i+=t+m;break;case "center-top":i+=t+m/2;break;}return i+o}function _(e){return H(e)+k(e)-q(e,null)}function J(e){let t=d(e,"duration")??String(a.duration),n=d(e,"delay")??String(a.delay),o=d(e,"easing")??a.easing;e.style.setProperty("--aos-duration",`${parseFloat(t)||0}ms`),e.style.setProperty("--aos-delay",`${parseFloat(n)||0}ms`),e.style.setProperty("--aos-easing",j[o]??o);}function D(){s=Array.from(document.querySelectorAll("[data-aos]")).map(e=>{let t=s.find(n=>n.node===e);return {node:e,in:0,out:0,once:M(e,"once",a.once),mirror:M(e,"mirror",a.mirror),animated:t?t.animated:e.classList.contains(a.animatedClassName),classes:a.useClassNames?(e.getAttribute("data-aos")||"").split(" ").filter(Boolean):[],id:d(e,"id")}});for(let e of s)J(e.node),e.node.classList.add(a.initClassName);}function I(){for(let e of s)e.in=W(e.node),e.out=_(e.node);}function P(e,t){document.dispatchEvent(new CustomEvent(`aos:${e}`,{detail:t.node})),t.id&&document.dispatchEvent(new CustomEvent(`aos:${e}:${t.id}`,{detail:t.node}));}function O(e){e.animated||(e.animated=true,e.node.classList.add(a.animatedClassName,...e.classes),P("in",e));}function S(e){e.animated&&(e.animated=false,e.node.classList.remove(a.animatedClassName,...e.classes),P("out",e));}function y(){b=0;let e=window.scrollY;for(let t of s){if(f){O(t);continue}t.mirror&&!t.once&&e>t.out?S(t):e>t.in?O(t):t.once||S(t);}}var R=()=>{b||(b=requestAnimationFrame(y));};function g(){clearTimeout($),$=setTimeout(h,50);}var F=()=>h();function Y(){let e=a.disable;if(typeof e=="function")return e();if(e===true)return true;let t=window.innerWidth;return e==="phone"?t<768:e==="tablet"?t>=768&&t<1024:e==="mobile"?t<1024:false}function B(){document.querySelectorAll("[data-aos]").forEach(e=>{for(let t of ["data-aos","data-aos-easing","data-aos-duration","data-aos-delay"])e.removeAttribute(t);});}function K(){if(document.getElementById(w))return;let e=document.createElement("style");e.id=w,e.textContent=G(a.animatedClassName),document.head.appendChild(e);}function E(){if(!l){if(l=true,c=null,D(),f)for(let e of s)e.node.setAttribute("data-aos-instant","");I(),y(),window.addEventListener("scroll",R,{passive:true}),window.addEventListener("resize",g),window.addEventListener("orientationchange",g),window.addEventListener("load",F),!a.disableMutationObserver&&typeof MutationObserver<"u"&&(v=new MutationObserver(e=>{e.some(n=>[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].some(o=>o instanceof Element&&(o.hasAttribute("data-aos")||o.querySelector("[data-aos]"))))&&X();}),v.observe(document.documentElement,{childList:true,subtree:true}));}}function Q(e={}){if(!N())return [];if((l||c)&&Z(),a={...C,...e},Y())return B(),[];f=a$1(),f||(p=a$2(n=>{if(n&&(p?.(),p=null,f=true,!!l)){for(let o of s)o.node.setAttribute("data-aos-instant","");y();}})),K();let t=document.readyState!=="loading";if(a.startEvent==="DOMContentLoaded"&&t)E();else if(a.startEvent==="load"&&document.readyState==="complete")E();else {let n=a.startEvent==="load"?window:document,o=()=>E();n.addEventListener(a.startEvent,o,{once:true}),c={target:n,type:a.startEvent,fn:o};}return Array.from(document.querySelectorAll("[data-aos]"))}function h(){l&&(I(),y());}function X(){if(l){if(Y()){B();return}D(),h();}}function Z(){if(N()){c&&c.target.removeEventListener(c.type,c.fn),c=null,cancelAnimationFrame(b),b=0,clearTimeout($),window.removeEventListener("scroll",R),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),window.removeEventListener("load",F),v?.disconnect(),v=null,p?.(),p=null;for(let e of s)e.node.removeAttribute("data-aos-instant");s=[],l=false,document.getElementById(w)?.remove();}}var V={init:Q,refresh:h,refreshHard:X,destroy:Z},oe=V;export{Q as a,h as b,X as c,Z as d,oe as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,d as d$1,c,b as b$2}from'./chunk-A4JCC3QQ.mjs';import {
|
|
1
|
+
import {a,d as d$1,c,b as b$2}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1}from'./chunk-5PJEKEEP.mjs';import {a as a$2,b as b$1}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var X={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function se(u,E={}){if(typeof window>"u")return X;let b$3=typeof u=="string"?document.querySelector(u):u;if(!b$3||b$3.tagName.toLowerCase()!=="video")return b("scrollVideo: <video> element not found:",u),X;let t=b$3,{trigger:P={},easing:T="linear",once:z=false,axis:f="y",preload:Y="auto",triggerElement:j,onReady:C,onComplete:J,onProgress:K}=E,I=j??t,g=window.matchMedia("(prefers-reduced-motion: reduce)").matches,Q=typeof T=="function"?T:d[T]??d.linear,U=a(P.start??"top top"),Z=a(P.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=Y);let V=E.from??0,A=E.to,p=0,w=0,r=0,a$3=false,n=false,s=-1,l=0,v=false,i=false,R=()=>f==="x"?window.scrollX:window.scrollY,$=()=>f==="x"?window.innerWidth:window.innerHeight;function S(){let e=I.getBoundingClientRect(),o=f==="x"?e.left:e.top,m=f==="x"?e.width:e.height,k=c({top:o,height:m},R(),$(),U,Z);p=k.tStart,w=k.tEnd,i&&w===p&&b("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let h=NaN;function c$1(e){if(!i)return;let o=A??t.duration??0,m=V+(o-V)*e;m!==h&&(h=m,t.currentTime=m),t.style.setProperty("--scroll-draw-progress",String(e)),K?.(e);}function y(){if(!a$3||n||!i||g)return;let e=Q(b$2(R(),p,w,1));z&&(s=Math.max(s,e),e=s),l=e,c$1(e),e>=1&&!v?(v=true,J?.()):e<1&&!z&&(v=false),r=requestAnimationFrame(y);}function x(){if(i=true,A===void 0&&(A=t.duration),g){c$1(1),C?.();return}S(),C?.(),a$3&&!n&&(r=requestAnimationFrame(y));}t.readyState>=1?x():t.addEventListener("loadedmetadata",x,{once:true}),i||S();let q=g?()=>{}:a$1(e=>{e&&(q(),g=true,cancelAnimationFrame(r),c$1(1));}),O=new IntersectionObserver(e=>{e.forEach(o=>{a$3=o.isIntersecting,a$3&&!n&&i?r=requestAnimationFrame(y):cancelAnimationFrame(r);});}),L;function d$2(){clearTimeout(L),L=setTimeout(S,150);}window.addEventListener("resize",d$2),window.addEventListener("orientationchange",d$2);let ee=d$1([I],d$2);return O.observe(t),a$2(t,{type:"video",getProgress:()=>l,getTrigger:()=>({tStart:p,tEnd:w})}),{destroy(){cancelAnimationFrame(r),O.disconnect(),t.removeEventListener("loadedmetadata",x),window.removeEventListener("resize",d$2),window.removeEventListener("orientationchange",d$2),ee(),q(),clearTimeout(L),b$1(t);},replay(){s=-1,v=false,l=0,n=false,h=NaN,c$1(0);},pause(){n=true,cancelAnimationFrame(r);},resume(){n&&(n=false,a$3&&i&&(r=requestAnimationFrame(y)));},seek(e){let o=Math.min(1,Math.max(0,e));l=o,s=o,n=true,cancelAnimationFrame(r),h=NaN,c$1(o);},getProgress(){return l}}}export{se as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,b as b$1}from'./chunk-XSVTHCLO.mjs';import {a as a$3}from'./chunk-
|
|
1
|
+
import {a,b as b$1}from'./chunk-XSVTHCLO.mjs';import {a as a$3}from'./chunk-KV3WCPQ5.mjs';import {a as a$4}from'./chunk-DY5JCXVR.mjs';import {a as a$2}from'./chunk-WXUOF4NM.mjs';import {a as a$1}from'./chunk-LTCJVVSC.mjs';import {b as b$2}from'./chunk-HX4SP5WN.mjs';import {defineComponent,ref,h as h$1,onMounted,watch,onUnmounted,unref}from'vue';var u=e=>typeof e=="function"?e():unref(e);function r(e,t,o){let l=null,i=t(),s=()=>{l?.destroy(),l=e.value?o(e.value,b$1(i,()=>i)):null;};onMounted(s),watch(()=>a(i=t()),s),onUnmounted(()=>{l?.destroy(),l=null;});}function B(e={}){let t=ref(null);return r(t,()=>u(e),b$2),t}var g={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},b=[null,Boolean,[Boolean,String],[Boolean,Number]],T=e=>({type:e,default:void 0}),H=defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(g).map(([e,t])=>[e,t?T(b[t]):null])),setup(e,{slots:t}){let o=ref(null);return r(o,()=>{let l={};for(let i in g){let s=e[i];s!=null&&(l[i]=s);}return l},b$2),()=>h$1("div",{ref:o},t.default?.())}});function V(e){let t=ref(null);return r(t,()=>u(e),a$1),t}var j=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options,a$1),()=>h$1("div",{ref:o},t.default?.())}});function G(e){let t=ref(null);return r(t,()=>u(e),a$2),t}var h=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:T(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=ref(null);return r(t,()=>{let o={to:e.to};return e.from!=null&&(o.from=e.from),e.format!=null&&(o.format=e.format),e.easing!=null&&(o.easing=e.easing),e.trigger!=null&&(o.trigger=e.trigger),e.once!=null&&(o.once=e.once),e.decimals!=null&&(o.decimals=e.decimals),e.onComplete!=null&&(o.onComplete=e.onComplete),o},a$2),()=>h$1("span",{ref:t})}});function N(e={}){let t=ref(null);return r(t,()=>u(e),a$3),t}var F=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=ref(null);return r(t,()=>e.options??{},a$3),()=>h$1("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function q(e={}){let t=ref(null);return r(t,()=>u(e),a$4),t}var I=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options??{},a$4),()=>h$1(e.tag,{ref:o},t.default?.())}});export{B as a,H as b,V as c,j as d,G as e,h as f,N as g,F as h,q as i,I as j};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1}from'./chunk-5PJEKEEP.mjs';import {a,b as b$1}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var M="http://www.w3.org/2000/svg",P="cinematic-photo",S=a=>a<0?0:a>1?1:a;function p(a){let s=parseFloat(a);return Number.isFinite(s)?S(s/100):0}function L(a){return d[a]??d.linear}var R={destroy:()=>{},getProgress:()=>0},T=class{constructor(s){if(typeof document>"u"){this.mount=null;return}this.mount=typeof s.wrapper=="string"?document.querySelector(s.wrapper):s.wrapper,this.mount||b("Cinematic: wrapper not found:",s.wrapper);}loadStory(s){let i=this.mount;if(typeof window>"u"||!i)return R;i.style.position="relative",i.style.height=s.totalHeight,i.style.display="block";let c=document.createElement("div");c.setAttribute("data-cinematic-stage",""),c.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",i.appendChild(c);let f=[];for(let e of s.scenes){if(e.background){let t=document.createElement("img");t.id=P,t.src=e.background,t.alt="",t.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",c.appendChild(t);}let n=e.animations.filter(t=>t.type==="draw");if(n.length){let t=document.createElementNS(M,"svg");t.setAttribute("viewBox",`0 0 ${s.canvas.width} ${s.canvas.height}`),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",c.appendChild(t);for(let o of n){let r=document.createElementNS(M,"path");r.id=o.target.replace(/^#/,""),r.setAttribute("d",o.d),r.setAttribute("fill","none"),r.setAttribute("stroke",o.stroke),r.setAttribute("stroke-width",String(o.strokeWidth)),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-linejoin","round");let b=o.length||r.getTotalLength?.()||0;r.style.strokeDasharray=String(b),r.style.strokeDashoffset=String(b),t.appendChild(r),f.push({kind:"draw",el:r,start:p(o.start),end:p(o.end),ease:L(o.easing),length:b});}}for(let t of e.animations){if(t.type!=="fade")continue;let o=c.querySelector(t.target)??document.querySelector(t.target);o&&(o.style.opacity=String(t.from),f.push({kind:"fade",el:o,start:p(t.start),end:p(t.end),ease:d["ease-in-out"]??d.linear,from:t.from,to:t.to}));}}let d$1=0,v=()=>{let e=i.offsetHeight-window.innerHeight;return e<=0?i.getBoundingClientRect().top<=0?1:0:S(-i.getBoundingClientRect().top/e)},l=e=>{for(let n of f){let t=n.end-n.start,o=t<=0?e>=n.end?1:0:S((e-n.start)/t),r=n.ease(o);n.kind==="draw"?n.el.style.strokeDashoffset=String(n.length*(1-r)):n.el.style.opacity=String(n.from+(n.to-n.from)*r);}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return l(1),{destroy:()=>{},getProgress:()=>1};let g=0,u=false,A=false,k=()=>{d$1=v(),l(d$1),u&&(g=requestAnimationFrame(k));},I=()=>{u||(u=true,g=requestAnimationFrame(k));},h=()=>{u=false,cancelAnimationFrame(g);},y=new IntersectionObserver(e=>{for(let n of e)A=n.isIntersecting,A?I():h();},{threshold:0});y.observe(c),d$1=v(),l(d$1),a(i,{type:"draw",getProgress:()=>d$1,getTrigger:()=>{let e=i.getBoundingClientRect().top+window.scrollY;return {tStart:e,tEnd:e+Math.max(0,i.offsetHeight-window.innerHeight)}}});let E=a$1(e=>{e&&(E(),h(),y.disconnect(),b$1(i),d$1=1,l(1));});return {destroy(){E(),h(),y.disconnect(),b$1(i);},getProgress:()=>d$1}}};
|
|
2
2
|
export{T as a};
|
package/dist/cinematic/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Cinematic}from'../chunk-
|
|
1
|
+
export{a as Cinematic}from'../chunk-YNNA33A5.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
|