@pixodesk/svg-animator-web 1.0.34 → 1.0.35

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.
@@ -1 +1 @@
1
- "use strict";var PixodeskAnimator=(()=>{var n=Object.defineProperty,t=Object.defineProperties,o=Object.getOwnPropertyDescriptor,e=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,c=(t,o,e)=>o in t?n(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,s=(n,t)=>{for(var o in t||(t={}))l.call(t,o)&&c(n,o,t[o]);if(i)for(var o of i(t))u.call(t,o)&&c(n,o,t[o]);return n},f=(n,o)=>t(n,e(o)),a=(n,t)=>{var o={};for(var e in n)l.call(n,e)&&t.indexOf(e)<0&&(o[e]=n[e]);if(null!=n&&i)for(var e of i(n))t.indexOf(e)<0&&u.call(n,e)&&(o[e]=n[e]);return o},v={};function d(n,t,o){return n+(t-n)*o}function p(n,t,o){const e=[],r=Math.max(n.length,t.length);for(let i=0;i<r;i++)e[i]=d(n[i]||0,t[i]||0,o);return e}function m(n,t,o){const e=Math.max(n.length,t.length),r=[];for(let i=0;i<e;i++)r.push(y(n[i],t[i],o));return r}function y(n,t,o){var e,r,i,l,u,c,s,f,a;if(!n||!t)return n||t||{v:[]};const v=Math.min(Math.max(o,0),1),d=Math.min(n.v.length,t.v.length),m=[],y=[],b=[];for(let o=0;o<d;o++){const a=n.v[o],d=t.v[o];m.push(p(a,d,v));const h=null!=(r=null==(e=n.i)?void 0:e[o])?r:a,g=null!=(l=null==(i=t.i)?void 0:i[o])?l:d;y.push(p(h,g,v));const A=null!=(c=null==(u=n.o)?void 0:u[o])?c:a,M=null!=(f=null==(s=t.o)?void 0:s[o])?f:d;b.push(p(A,M,v))}return{v:m,i:y.length?y:void 0,o:b.length?b:void 0,c:null!=(a=n.c)?a:t.c}}function b(n,t,o){if(o<=0)return 0;if(o>=1)return 1;const e=3*n,r=3*(t-n)-e,i=1-e-r;function l(n){return((i*n+r)*n+e)*n}function u(n){return(3*i*n+2*r)*n+e}let c=o,s=0,f=1;for(let n=0;n<8;n++){const n=l(c)-o;if(Math.abs(n)<1e-6)return c;const t=u(c);if(Math.abs(t)<1e-6)break;c-=n/t}for(c=o;s<f;){const n=l(c);if(Math.abs(n-o)<1e-6)return c;o>n?s=c:f=c,c=(f+s)/2}return c}function h(n){const[t,o,e,r]=n,i=3*o,l=3*(r-o)-i,u=1-i-l;return function(n){return o=b(t,e,n),((u*o+l)*o+i)*o;var o}}function g(n,t,o){return[n[0]+(t[0]-n[0])*o,n[1]+(t[1]-n[1])*o]}function A(n,t){if(!n)return{left:void 0,right:void 0};if(t<=0)return{left:void 0,right:n};if(t>=1)return{left:n,right:void 0};const[o,e,r,i]=n,l=b(o,r,t),u=[o,e],c=[r,i],{left:s,right:f}=function(n,t,o,e,r){const i=g(n,t,r),l=g(t,o,r),u=g(o,e,r),c=g(i,l,r),s=g(l,u,r),f=g(c,s,r);return{left:[n,i,c,f],right:[f,s,u,e]}}([0,0],u,c,[1,1],l),a=s[3][0],v=s[3][1];let d,p;a>1e-9&&Math.abs(v)>1e-9&&(d=[s[1][0]/a,s[1][1]/v,s[2][0]/a,s[2][1]/v]);const m=1-a,y=1-v;return m>1e-9&&Math.abs(y)>1e-9&&(p=[(f[1][0]-a)/m,(f[1][1]-v)/y,(f[2][0]-a)/m,(f[2][1]-v)/y]),{left:d,right:p}}function M(n){if(n)return[1-n[2],1-n[3],1-n[0],1-n[1]]}function w(n){if(n){if(Array.isArray(n))return n;if("string"==typeof n)return n.startsWith("#")?function(n){const t=n.slice(1),o=t.length<=4,e=o?t[0]+t[0]:t.slice(0,2),r=o?t[1]+t[1]:t.slice(2,4),i=o?t[2]+t[2]:t.slice(4,6),l=4===t.length?t[3]+t[3]:8===t.length?t.slice(6,8):null,u=[parseInt(e,16)/255,parseInt(r,16)/255,parseInt(i,16)/255];return null!==l&&u.push(parseInt(l,16)/255),u}(n):n.startsWith("rgb")?function(n){var t;const o=null==(t=n.match(/rgba?\((.*)\)/))?void 0:t[1];if(!o)throw new Error("Invalid rgb/rgba format");const e=o.split(",").map(n=>+n.trim());return[e[0]/255,e[1]/255,e[2]/255,...void 0!==e[3]?[e[3]]:[]]}(n):void console.warn("Unsupported color format: "+n)}}((t,o)=>{for(var e in o)n(t,e,{get:o[e],enumerable:!0})})(v,{PX_ANIMATOR_DATA_KEY:()=>kn,createAnimator:()=>wn,setupAnimationTriggers:()=>bn});var j=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),k=new Set(["translate","rotate","scale","skew"]),O=new Set(["offset-distance","offsetDistance"]);function U(n){return!n.includes("-")&&/[a-z][A-Z]/.test(n)}var C=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","tableValues","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function T(n){return C.has(n)?n:n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function I(n,t,o){return Math.max(t,Math.min(n,o))}function z(n,t,o,e,r){if(r<=0)return[n[0],n[1]];if(r>=1)return[e[0],e[1]];const i=1-r,l=i*i,u=r*r,c=l*i,s=3*r*l,f=3*u*i,a=u*r;return[c*n[0]+s*t[0]+f*o[0]+a*e[0],c*n[1]+s*t[1]+f*o[1]+a*e[1]]}var S=1e-4;function N(n,t,o,e,r){const i=P(n,t,o,e,r);return 0===i[0]&&0===i[1]?P(n,t,o,e,r<.5?r+S:r-S):i}function P(n,t,o,e,r){const i=1-r,l=3*i*i,u=6*r*i,c=3*r*r;return[l*(t[0]-n[0])+u*(o[0]-t[0])+c*(e[0]-o[0]),l*(t[1]-n[1])+u*(o[1]-t[1])+c*(e[1]-o[1])]}function L(n,t){const{ts:o,ds:e}=n,r=o.length-1;if(t<=o[0])return e[0];if(t>=o[r])return e[r];let i=1,l=r;for(;i<l;){const n=i+l>>>1;o[n]<t?i=n+1:l=n}const u=o[l-1],c=o[l]-u,s=c>0?(t-u)/c:0;return e[l-1]+s*(e[l]-e[l-1])}var x={waapi:"waapi",frames:"frames"},F={before:"before",after:"after"};function Z(n){var t;const o=(null==n?void 0:n.animator)||(null==(t=null==n?void 0:n.meta)?void 0:t.animator);return o?function(n){const t=n.timeline;if(null==t||"object"!=typeof t)return n;const o=_.get(n);if(o)return o;const e=n,{timeline:r}=e,i=a(e,["timeline"]);if("scroll"===t.type||"view"===t.type){i.l="scroll",void 0!==t.duration&&(i.duration=t.duration),void 0!==t.iterations&&(i.iterations=t.iterations);const n=s({},i.scroll||{});n.kind=t.type,void 0!==t.m&&(n.driver=t.m),void 0!==t.axis&&(n.axis=t.axis),void 0!==t.source&&(n.source=t.source),void 0!==t.subject&&(n.subject=t.subject),void 0!==t.smoothing&&(n.smoothing=t.smoothing),void 0!==t.range&&(n.range=t.range);const o=t.pin;"boolean"==typeof o?n.pin=o:o&&"object"==typeof o&&(n.pin=!0,void 0!==o.align&&(n.pinAlign=o.align),void 0!==o.top&&(n.pinTop=o.top),void 0!==o.distance&&(n.pinDistance=o.distance)),i.scroll=n}else{if(void 0!==t.duration&&(i.duration=t.duration),void 0!==t.trigger){const n=t.trigger,{onFinish:o}=n,e=a(n,["onFinish"]);Object.keys(e).length&&(i.trigger=e),void 0!==o&&(i.h="reset"===o)}void 0!==t.delay&&(i.delay=t.delay),void 0!==t.iterations&&(i.iterations=t.iterations),void 0!==t.direction&&(i.direction=t.direction),void 0!==t.fill&&(i.fill=t.fill)}return _.set(n,i),i}(o):void 0}var _=new WeakMap;function E(n){var t;const o=null!=(t=n.value)?t:n.v;if(!o)return;if(Array.isArray(o)&&o.length>=2&&"number"==typeof o[0]&&"number"==typeof o[1])return[o[0],o[1]];const e=o.translate;return Array.isArray(e)&&e.length>=2?[e[0],e[1]]:void 0}function W(n){var t,o;return null!=(o=null!=(t=n.time)?t:n.t)?o:0}function X(n){var t;return null!=(t=n.easing)?t:n.e}var R=new WeakMap;function D(n,t,o,e){var r,i;let l=R.get(n);const u=null==l?void 0:l.get(t);if(u)return u;const c=null!=(r=n.tangentOut)?r:n.to,s=null!=(i=t.tangentIn)?i:t.ti,f=[o[0]+(c?c[0]:0),o[1]+(c?c[1]:0)],a=[e[0]+(s?s[0]:0),e[1]+(s?s[1]:0)],v=function(n,t,o,e,r=100){const i=r+1,l=new Float64Array(i),u=new Float64Array(i);let c=z(n,t,o,e,0);l[0]=0,u[0]=0;let s=0;for(let f=1;f<i;f++){const i=f/r,a=z(n,t,o,e,i),v=a[0]-c[0],d=a[1]-c[1];s+=Math.sqrt(v*v+d*d),l[f]=i,u[f]=s,c=a}return{ts:l,ds:u}}(o,f,a,e),d={P0:o,P1:f,P2:a,P3:e,A:v,M:v.ds[v.ds.length-1]};return l||(l=new WeakMap,R.set(n,l)),l.set(t,d),d}var V=.5,q=5,Y=32;function B(n,t){var o,e,r;if(!function(n){var t,o;const e=n.keyframes;if(!Array.isArray(e))return!1;if(n.autoOrient)return!0;for(const n of e)if((null!=(t=n.tangentIn)?t:n.ti)||(null!=(o=n.tangentOut)?o:n.to))return!0;return!1}(n))return n;const i=n.keyframes;if(!Array.isArray(i)||i.length<2)return n;const l=!!n.autoOrient,u=null!=(o=null==t?void 0:t.j)?o:V,c=null!=(e=null==t?void 0:t.k)?e:q,s=null!=(r=null==t?void 0:t.O)?r:Y,f=[],a=E(i[0]);if(!a)return n;const v=l?function(n,t){const o=E(n),e=E(t);if(!o||!e)return 0;const r=D(n,t,o,e),i=N(r.P0,r.P1,r.P2,r.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(i[0],i[1]):void 0;f.push(H(W(i[0]),Q(K(i[0]),K(i[0]),0,a,v,l)));for(let n=0;n<i.length-1;n++){const t=i[n],o=i[n+1],e=E(t),r=E(o);e&&r?(l&&n>0&&J(f,t,o,e,r,c),tn(f,t,o,e,r,l,u,c,s)):f.push(H(W(o),Q(K(o),K(o),1,null!=r?r:[0,0],void 0,l)))}const d=X(i[i.length-1]);d&&(f[f.length-1].e=d),l&&function(n){var t;let o;for(const e of n){const n=null!=(t=e.v)?t:e.value;if(!n||"number"!=typeof n.rotate)continue;if(void 0===o){o=n.rotate;continue}let r=n.rotate;for(;r-o>180;)r-=360;for(;r-o<-180;)r+=360;n.rotate=r,o=r}}(f);const p={keyframes:f};return void 0!==n.loop&&(p.loop=n.loop),p}function H(n,t){return{t:n,v:t}}function K(n){var t;const o=null!=(t=n.value)?t:n.v;if(o&&"object"==typeof o&&!Array.isArray(o))return o}function $(n,t,o){if(void 0===n)return t;if(void 0===t)return n;if("number"==typeof n&&"number"==typeof t)return n+(t-n)*o;if(Array.isArray(n)&&Array.isArray(t)&&n.length===t.length){const e=new Array(n.length);for(let r=0;r<n.length;r++){const i="number"==typeof n[r]?n[r]:0,l="number"==typeof t[r]?t[r]:0;e[r]=i+(l-i)*o}return e}return o<.5?n:t}function Q(n,t,o,e,r,i){const l={translate:e},u=new Set;if(n)for(const t of Object.keys(n))u.add(t);if(t)for(const n of Object.keys(t))u.add(n);for(const e of u){if("translate"===e)continue;if("rotate"===e&&i)continue;const r=null==n?void 0:n[e],u=null==t?void 0:t[e];void 0===r&&void 0===u||(l[e]=$(r,u,o))}return void 0!==r&&(l.rotate=r+G(n,t,o)),l}function G(n,t,o){const e="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0,r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0;if(void 0===e&&void 0===r)return 0;const i=$(e,r,o);return"number"==typeof i?i:0}function J(n,t,o,e,r,i){var l;const u=n[n.length-1],c=null!=(l=u.v)?l:u.value,s=null==c?void 0:c.rotate;if("number"!=typeof s)return;const f=K(t),a=s-G(f,f,0),v=D(t,o,e,r),d=N(v.P0,v.P1,v.P2,v.P3,0),p=180*Math.atan2(d[1],d[0])/Math.PI,m=function(n,t){let o=n-t;for(;o>180;)o-=360;for(;o<-180;)o+=360;return o}(p,a);if(Math.abs(m)<=i)return;const y=W(t),b=Math.min(y+nn,(y+W(o))/2),h=Q(K(t),K(t),0,e,p,!0);n.push(H(b,h))}var nn=.05;function tn(n,t,o,e,r,i,l,u,c){const s=D(t,o,e,r),f=W(t),a=W(o),v=X(t),d=(p=v)?h([p[1],p[0],p[3],p[2]]):n=>n;var p;const m=K(t),y=K(o),b=function(n,t,o,e,r){const i=[];on(n.P0[0],n.P1[0],n.P2[0],n.P3[0],i),on(n.P0[1],n.P1[1],n.P2[1],n.P3[1],i),i.sort((n,t)=>n-t);const l=[0];for(const n of i)n>l[l.length-1]+1e-6&&n<.999999&&l.push(n);l.push(1);const u=[],c={U:r-l.length};for(let r=0;r<l.length-1;r++)en(l[r],l[r+1],u,n,t,o,e,c);return u}(s,i,l,u,c),g=[];for(const n of b){const t=L(s.A,n),o=I(s.M>0?t/s.M:n,0,1),e={u:I(d(o),0,1),p:o,C:z(s.P0,s.P1,s.P2,s.P3,n)};if(i){const t=N(s.P0,s.P1,s.P2,s.P3,n);e.T=180*Math.atan2(t[1],t[0])/Math.PI}g.push(e)}let M=v,w=0;const j=n.length-1;for(let t=0;t<g.length;t++){const o=g[t],e=w<1?I((o.u-w)/(1-w),0,1):1,{left:r,right:l}=A(M,e),u=0===t?j:n.length-1;r?n[u].e=r:delete n[u].e;const c=f+o.u*(a-f),s=Q(m,y,o.p,o.C,o.T,i);n.push(H(c,s)),M=l,w=o.u}}function on(n,t,o,e,r){const i=t-n,l=o-t,u=i-2*l+(e-o),c=2*(l-i),s=i;if(Math.abs(u)<1e-10){if(Math.abs(c)>1e-10){const n=-s/c;n>1e-6&&n<.999999&&r.push(n)}return}const f=c*c-4*u*s;if(f<0)return;const a=Math.sqrt(f),v=(-c-a)/(2*u),d=(-c+a)/(2*u);v>1e-6&&v<.999999&&r.push(v),d>1e-6&&d<.999999&&r.push(d)}function en(n,t,o,e,r,i,l,u){const c=(n+t)/2,s=z(e.P0,e.P1,e.P2,e.P3,n),f=z(e.P0,e.P1,e.P2,e.P3,t),a=t-n,v=z(e.P0,e.P1,e.P2,e.P3,n+.25*a),d=z(e.P0,e.P1,e.P2,e.P3,c),p=z(e.P0,e.P1,e.P2,e.P3,n+.75*a),m=Math.max(rn(v,s,f),rn(d,s,f),rn(p,s,f));let y=!0;if(r){const o=N(e.P0,e.P1,e.P2,e.P3,n),r=N(e.P0,e.P1,e.P2,e.P3,t),i=180*Math.atan2(o[1],o[0])/Math.PI,u=180*Math.atan2(r[1],r[0])/Math.PI;let c=Math.abs(i-u);c>180&&(c=360-c),c>l&&(y=!1)}m<=i&&y||u.U<=0||a<1e-6?o.push(t):(u.U-=1,en(n,c,o,e,r,i,l,u),en(c,t,o,e,r,i,l,u))}function rn(n,t,o){const e=o[0]-t[0],r=o[1]-t[1],i=e*e+r*r;if(i<1e-20){const o=n[0]-t[0],e=n[1]-t[1];return Math.sqrt(o*o+e*e)}const l=(n[0]-t[0])*r-(n[1]-t[1])*e;return Math.abs(l)/Math.sqrt(i)}var ln=1;function un(n,t){if(n===t)return!0;if(typeof n!=typeof t||null===n||null===t||"object"!=typeof n)return!1;if(Array.isArray(n)!==Array.isArray(t))return!1;const o=Object.keys(n),e=Object.keys(t);return o.length===e.length&&o.every(o=>un(n[o],t[o]))}function cn(n){const t=[];let o;const e=function(n){const t=n.split(/([MLCZmlcz]|[\s,]+)/).map(n=>n.trim()).filter(n=>n&&","!==n),o=[];let e=null;for(const n of t)if(/[MLCZmlcz]/.test(n))e={type:n,values:[]},o.push(e);else if(e){const t=+n;e.values.push(Number.isNaN(t)?0:t)}return o}(n);for(const n of e){const e=n.type,r=n.values;if("M"===e||"m"===e){const n=r[0]||0,e=r[1]||0;o={v:[[n,e]],i:[[n,e]],o:[[n,e]],c:!1},t.push(o);continue}if(o||(o={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},t.push(o)),"L"===e){const n=r[0]||0,t=r[1]||0;o.v.push([n,t]),o.i.push([n,t]),o.o.push([n,t])}else if("C"===e){const n=r[0]||0,t=r[1]||0,e=r[2]||0,i=r[3]||0,l=r[4]||0,u=r[5]||0;o.o[o.o.length-1]=[n,t],o.v.push([l,u]),o.i.push([e,i]),o.o.push([l,u])}else"Z"===e||"z"===e?o.c=!0:console.warn('Unsupported path command "'+e+'"')}return t}function sn(n){return n.startsWith("path(")&&n.endsWith(")")?n.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(n)?n:void 0}function fn(n){return"string"==typeof n&&void 0!==sn(n)}function an(n){if(n&&"object"==typeof n&&"string"==typeof n.path){const t=sn(n.path);return t?{paths:cn(t)}:n}if(n&&"object"==typeof n&&"paths"in n){const t=n.paths;if(Array.isArray(t)&&t.length>0&&fn(t[0])){const n=[];for(const o of t){const t=sn(o);t&&n.push(...cn(t))}return{paths:n}}return n}if(Array.isArray(n)){if(n.length>0&&fn(n[0])){const t=[];for(const o of n){const n=sn(o);n&&t.push(...cn(n))}return{paths:t}}return{paths:n}}return fn(n)?{paths:cn(sn(n))}:n}function vn(n,t){var o;if(n)return Array.isArray(n)?n:(null==(o=null==t?void 0:t.easings)?void 0:o[n])?t.easings[n]:void console.warn("Unknown easing name: "+n)}function dn(n,t){var o;if("string"==typeof n){const e=null==(o=null==t?void 0:t.animations)?void 0:o[n];return e||console.warn("Unknown animation name: "+n),e}return n}function pn(n,t,o,e){var r,i;return"d"===n?{paths:m(null!=(r=null==t?void 0:t.paths)?r:Array.isArray(t)?t:[],null!=(i=null==o?void 0:o.paths)?i:Array.isArray(o)?o:[],e)}:j.has(n)?function(n,t,o){return[d(n[0]||0,t[0]||0,o),d(n[1]||0,t[1]||0,o),d(n[2]||0,t[2]||0,o),d(void 0===n[3]?1:n[3],void 0===t[3]?1:t[3],o)]}(t||[0,0,0,1],o||[0,0,0,1],e):"transform"!==n||"object"!=typeof t||null===t||Array.isArray(t)||"object"!=typeof o||null===o||Array.isArray(o)?"rotate"===n&&"number"==typeof t&&"number"==typeof o?d(t,o,e):k.has(n)||"stroke-dasharray"===n||"strokeDasharray"===n?p(t||[],o||[],e):d(+(t||0),+(o||0),e):function(n,t,o){const e=new Set([...Object.keys(null!=n?n:{}),...Object.keys(null!=t?t:{})]),r={};for(const i of e){const e=null==n?void 0:n[i],l=null==t?void 0:t[i];if("rotate"===i||"skew"===i)r[i]=d(+(null!=e?e:0),+(null!=l?l:0),o);else if("translate"===i||"scale"===i||"origin"===i){const n="scale"===i?[1,1]:[0,0];r[i]=p(e||n,l||n,o)}else r[i]=null!=l?l:e}return r}(t,o,e)}function mn(n,t,o,e){var r,i,l,u,c,a,v;const d=t.keyframes||[],p=[];for(const t of d){const o=null!=(i=null!=(r=t.time)?r:t.t)?i:0;let s=null!=(l=t.value)?l:t.v;const f=null!=(u=t.easing)?u:t.e;"d"===n&&(s=an(s));const d=U(n)?T(n):n;j.has(d)&&(s=null!=(c=w(s))?c:s);const m={t:o,v:s,e:vn(f,e)},y=null!=(a=t.tangentIn)?a:t.ti,b=null!=(v=t.tangentOut)?v:t.to;y&&(m.tangentIn=y),b&&(m.tangentOut=b),p.push(m)}p.sort((n,t)=>{var o,e;return(null!=(o=n.t)?o:0)-(null!=(e=t.t)?e:0)});const m=t.loop,y=!0===m?{}:m||void 0;return y&&p.length>=2?function(n,t,o,e){var r,i,l,u,c;const a=t.length-1,v=I(null!=(r=o.segmentCount)?r:a,1,a);let d;d=o.extend===F.before?t.slice(0,v+1):t.slice(a-v);const p=null!=(i=t[0].t)?i:0,m=null!=(l=t[t.length-1].t)?l:0;let y,b;o.extend===F.before?(y=0,b=p):(y=m,b=e);const g=b-y;if(g<=0)return t;const w=null!=(u=d[0].t)?u:0,j=(null!=(c=d[d.length-1].t)?c:0)-w;if(j<=0)return t;const k=d.map(n=>{var t,o;return{I:(n.t-w)/j,v:n.v,e:n.e,tangentIn:null!=(t=n.tangentIn)?t:n.ti,tangentOut:null!=(o=n.tangentOut)?o:n.to}}),O=Math.floor(g/j),U=g-O*j,C=U/j,T=[],z=o.extend!==F.before,S=t[t.length-1];let N,P=!1;function L(t,o,e){var r;let i;if(o){i=[];for(let n=k.length-1;n>=0;n--)i.push({I:1-k[n].I,v:k[n].v,e:n>0?M(k[n-1].e):void 0,tangentIn:k[n].tangentOut,tangentOut:k[n].tangentIn})}else i=k;const l=void 0!==e?e:1;for(let o=0;o<i.length;o++){const e=i[o];if(e.I>l+1e-9){const r=i[o-1],u=e.I-r.I,c=(l-r.I)/u,s=r.e?h(r.e)(c):c,f=pn(n,r.v,e.v,s),{left:a}=A(r.e,c);return T.length>0&&r.I<=l&&(T[T.length-1].e=a),void T.push({t:t+l*j,v:f,e:void 0})}const u=T.length>0?T[T.length-1]:S,c=z&&0===o&&void 0!==u&&Math.abs((null!=(r=u.t)?r:0)-(t+e.I*j))<1e-9;if(c){if(un(u.v,e.v)){T.length>0?(u.e=e.e,u.tangentOut=e.tangentOut):(N=e.e,P=!0);continue}T.length>0&&(delete u.tangentIn,delete u.tangentOut)}const s={t:t+e.I*j+(c?ln:0),v:e.v,e:o<i.length-1?e.e:void 0};e.tangentIn&&(s.tangentIn=e.tangentIn),e.tangentOut&&(s.tangentOut=e.tangentOut),T.push(s)}}if(o.extend===F.before){C>1e-9&&function(t,o,e){let r;if(o){r=[];for(let n=k.length-1;n>=0;n--)r.push({I:1-k[n].I,v:k[n].v,e:n>0?M(k[n-1].e):void 0,tangentIn:k[n].tangentOut,tangentOut:k[n].tangentIn})}else r=k;const i=1-e;for(let o=0;o<r.length;o++){const e=r[o];if(e.I<i-1e-9)continue;const l=r[o-1];if(l&&l.I<i-1e-9&&e.I>i+1e-9){const o=e.I-l.I,r=(i-l.I)/o,u=l.e?h(l.e)(r):r,c=pn(n,l.v,e.v,u),{right:s}=A(l.e,r);T.push({t:t,v:c,e:s})}const u={t:t+(e.I-i)*j,v:e.v,e:o<r.length-1?e.e:void 0};e.tangentIn&&(u.tangentIn=e.tangentIn),e.tangentOut&&(u.tangentOut=e.tangentOut),T.push(u)}}(y,!!o.alternate&&O%2==0,C);for(let n=0;n<O;n++){const t=O-1-n,e=!!o.alternate&&t%2==0;L(y+U+n*j,e)}}else{for(let n=0;n<O;n++){const t=!!o.alternate&&n%2==0;L(y+n*j,t)}if(C>1e-9){const n=!!o.alternate&&O%2==0;L(y+O*j,n,C)}}return o.extend===F.before?[...T,...t]:P&&t.length>0?[...t.slice(0,-1),f(s({},t[t.length-1]),{e:N}),...T]:[...t,...T]}(n,p,y,o):p}var yn=0;function bn(n,t){const{startOn:o,outAction:e="continue",scrollIntoViewThreshold:r=0}=t,i=n.getRootElement();if(!i)return console.warn("setupAnimationTriggers: No root element found for animation."),n;let l=!1;const u=()=>{l&&(l=!1,n.setPlaybackRate(1)),n.play()},c=()=>{switch(e){case"pause":n.pause();break;case"reset":n.cancel();break;case"reverse":l=!0,n.setPlaybackRate(-1),n.play()}};switch(o){case"load":{const n=()=>u();"complete"===document.readyState?n():window.addEventListener("load",n,{once:!0});break}case"mouseOver":{let n=!1;const t=()=>{n=!0,u()},o=()=>{n&&c()};i.addEventListener("mouseenter",t),i.addEventListener("mouseleave",o);break}case"click":{const t=()=>{n.isPlaying()?c():u()};i.addEventListener("click",t);break}case"scrollIntoView":{const n=n=>{var t,o;const e=n.boundingClientRect,r=n.intersectionRect;if(!(null==e?void 0:e.height)||!r)return n.intersectionRatio;const i="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,l=null!=(o=null==(t=n.rootBounds)?void 0:t.height)?o:1/0,u=Math.min(i,l),c=Math.min(e.height,Number.isFinite(u)?u:e.height);return c>0?r.height/c:n.intersectionRatio},t=Array.from({length:21},(n,t)=>t/20);let o=!1;new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&n(t)>=r?(o=!0,u()):o&&(o=!1,c())})},{threshold:t}).observe(i);break}}return n}function hn(n){return"#"+n}function gn(n,t,o,e){var r,i;let l=null!=(r=n.v)?r:n.value;const u=null!=(i=n.e)?i:n.easing,c={offset:t,easing:u&&Array.isArray(u)?"cubic-bezier("+u.join(",")+")":void 0};let s,f=o;var a;return j.has(o)&&Array.isArray(l)?s=function(n){const t=Math.round(255*n[0]),o=Math.round(255*n[1]),e=Math.round(255*n[2]);return 4===n.length?"rgba("+t+","+o+","+e+","+n[3]+")":"rgb("+t+","+o+","+e+")"}(l):"transform"!==o||null===l||"object"!=typeof l||Array.isArray(l)?k.has(o)?(Array.isArray(l)&&("translate"===o&&(l=l.map(n=>n+"px")),l=l.join(",")),"rotate"===o&&(l+="deg"),s=o+"("+l+")",f="transform"):s="d"===o?'path("'+(l&&"object"==typeof l&&Array.isArray(l.paths)?l.paths:[]).map(n=>function(n,t=!1){var o,e,r,i;const l=n.v,u=n.i,c=n.o,s=n.c;if(!l.length)return"";const f=[],a=l.length;f.push("M"+l[0][0]+","+l[0][1]);for(let n=1;n<a;n++){const r=l[n-1],i=null!=(o=null==c?void 0:c[n-1])?o:r,s=null!=(e=null==u?void 0:u[n])?e:l[n],a=l[n];t||i[0]!==r[0]||i[1]!==r[1]||s[0]!==a[0]||s[1]!==a[1]?f.push("C"+i[0]+","+i[1]+","+s[0]+","+s[1]+","+a[0]+","+a[1]):f.push("L"+a[0]+","+a[1])}if(s&&a>0){const n=l[a-1],o=null!=(r=null==c?void 0:c[a-1])?r:n,e=null!=(i=null==u?void 0:u[0])?i:l[0],s=l[0];!t&&o[0]===n[0]&&o[1]===n[1]&&e[0]===s[0]&&e[1]===s[1]||f.push("C"+o[0]+","+o[1]+","+e[0]+","+e[1]+","+s[0]+","+s[1]),f.push("z")}return f.join("")}(n,!0)).join("")+'")':O.has(o)&&"number"==typeof l?100*l+"%":""+l:(s=function(n,t){var o;if(!n)return"";const e=null==(o=null==t?void 0:t.S)||o,r=[],i=n.translate,l=n.origin,u=n.rotate,c=n.skew,s=n.scale,f=e?"px":"",a=e?"deg":"";return i&&r.push("translate("+i[0]+f+","+i[1]+f+")"),l&&r.push("translate("+l[0]+f+","+l[1]+f+")"),null!=u&&r.push("rotate("+u+a+")"),null!=c&&r.push("skewX("+c+a+")"),s&&r.push("scale("+s[0]+","+s[1]+")"),l&&r.push("translate("+-l[0]+f+","+-l[1]+f+")"),r.join("")}(l,{S:!0}),f="transform"),CSS.supports(T(f),s)||e.add(f),f=(a=f).includes("-")?a.replace(/-([a-z])/g,(n,t)=>t.toUpperCase()):a,c[f]=s,c}function An(n,t,o){var e,r,i,l,u;const c=[];for(let a=0;a<t.length;a++){const v=t[a],d=null!=(e=v.t)?e:0;if(d<0){const o=t[a+1];if(o&&(null!=(r=o.t)?r:0)>=0){const t=(0-d)/((null!=(i=o.t)?i:0)-d),e=v.e?h(v.e)(t):t,{right:r}=A(v.e,t);c.push({t:0,v:pn(n,v.v,o.v,e),e:r})}continue}if(d>o){const e=t[a-1];if(e&&(null!=(l=e.t)?l:0)<=o){const t=null!=(u=e.t)?u:0,r=(o-t)/(d-t),i=e.e?h(e.e)(r):r,{left:l}=A(e.e,r);c.length>0&&(c[c.length-1]=f(s({},c[c.length-1]),{e:l})),c.push({t:o,v:pn(n,e.v,v.v,i),e:void 0})}break}c.push(v)}return c}function Mn(n,t,o){var e;const r=new Map;for(const[i,l]of Object.entries(n)){const n=o.duration||1,u=An(i,l.keyframes||[],n),c=[];for(let o=0;o<u.length;o++){const r=u[o],l=gn(r,I((null!=(e=r.t)?e:0)/n,0,1),i,t);0===o&&(l.offset||0)>0&&c.push(f(s({},l),{offset:0})),c.push(l)}c.length>0&&(c[c.length-1].offset||0)<1&&c.push(f(s({},c[c.length-1]),{offset:1})),c.length>0&&r.set(i,c)}return r}function wn(n){const t=function(n){if(!(null==n?void 0:n.data))throw new Error("createAnimator: `data` is required");return n.data}(n);return function(n,o){let e,r=o;n.h&&(r=f(s({},o),{onFinish:()=>{var n;null==(n=null==o?void 0:o.onFinish)||n.call(o),null==e||e.cancel()}}));const i=function(n,t,o,e,r){var i;const l=Z(n)||{};if(!o)if(n.id){const t=hn(n.id);(o=document.querySelector(t))||console.warn("createFrameLoopAnimator: No root element found for selector: ",t)}else console.warn("createFrameLoopAnimator: No root element provided");const u=function(n,t=x.waapi){const o=Z(n)||{},e=function(n){var t;if(n)return null==(t=Z(n))?void 0:t.definitions}(n),r=o.duration||1e3,i=[],l=(n,o,i)=>{if(!o)return null;const l=function(n,t){if(!n)return[];const o=[];if("string"==typeof n){const e=dn(n,t);e&&o.push(e)}else if(Array.isArray(n))for(const e of n){const n=dn(e,t);n&&o.push(n)}else o.push(n);return o}(o,e);if(0===l.length)return null;const u=function(n,t,o,e=x.waapi){const r={};for(const[i,l]of Object.entries(n)){if("transform"===i&&"offsetPath"===l.N&&void 0!==n.offsetDistance)continue;const u=mn(i,l,t,o);if(u.length>0){const n={keyframes:u};void 0!==l.autoOrient&&(n.autoOrient=l.autoOrient),void 0!==l.loop&&(n.loop=l.loop),r[i]=e===x.waapi&&"transform"===i?B(n):n}}return r}(function(n,t){if(!n)return n;const o=t&&"object"==typeof t&&!Array.isArray(t)?t:function(n){var t,o;if(!n||"string"!=typeof n)return;const e={},r=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let l,u=-1;for(;null!==(l=r.exec(n));){const n=l[1],r=i.indexOf(n);if(r<0||r<=u)return;u=r;const c=l[2].split(/[\s,]+/).filter(Boolean).map(Number);if(c.some(n=>Number.isNaN(n)))return;if("translate"===n){if(c.length<1||c.length>2)return;e.translate=[c[0],null!=(t=c[1])?t:0]}else if("rotate"===n){if(1!==c.length)return;e.rotate=c[0]}else if("skewX"===n){if(1!==c.length)return;e.skew=c[0]}else{if(c.length<1||c.length>2)return;e.scale=[c[0],null!=(o=c[1])?o:c[0]]}}return n.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(e).length?e:void 0}(t);if(!o||!Object.keys(o).length)return n;const e=n=>n&&"object"==typeof n&&!Array.isArray(n)?s(s({},o),n):n,r=n.transform;if(r&&"object"==typeof r){const t=r;if(Array.isArray(t.keyframes)){const o=f(s({},t),{keyframes:t.keyframes.map(n=>f(s({},n),{value:e(n.value)}))});return void 0!==o.value&&(o.value=e(o.value)),f(s({},n),{transform:o})}return n}const i=Object.keys(n).filter(n=>k.has(n));if(1!==i.length)return n;const l=i[0],u=n[l];if(!u||"object"!=typeof u||!Array.isArray(u.keyframes))return n;const c=f(s({},u),{keyframes:u.keyframes.map(n=>f(s({},n),{value:f(s({},o),{[l]:n.value})}))});void 0!==c.value&&(c.value=f(s({},o),{[l]:c.value}));const a=s({},n);return delete a[l],f(s({},a),{transform:c})}(function(n){const t={};for(const o of n)for(const[n,e]of Object.entries(o))t[n]=e;return t}(l),i),r,e,t);return 0===Object.keys(u).length?null:{id:n,animate:u}},u=function(n){var t;if(!n)return;const o=null==(t=Z(n))?void 0:t.animateById;return o?Object.entries(o).map(([n,t])=>({id:n.startsWith("#")?n.slice(1):n,animate:t})):void 0}(n);if(u)for(const n of u){const t=l(n.id,n.animate);t&&i.push(t)}const c=n=>{const t=n.animate;if(t&&Object.keys(t).length>0){const o=n.id||"_px_el_"+ ++yn;n.id=o;const e=l(o,t,n.transform);e&&i.push(e)}if(n.children)for(let t=0;t<n.children.length;t++)c(n.children[t])};if(n.children)for(let t=0;t<n.children.length;t++)c(n.children[t]);return i}(n,x.waapi),c=[],a=l.iterations;let v;"number"==typeof a&&(v=a),"infinite"===a&&(v=1/0);const d=new Set;let p=!1,m=!1;(null==u?void 0:u.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const n of u||[]){const e=n.animate;if(!e||"object"!=typeof e||Array.isArray(e)){console.warn("createWebApiAnimator: Empty or unresolved binding",n);continue}const u=hn(n.id),s=(null==o?void 0:o.querySelectorAll(u))||document.querySelectorAll(u);0===s.length&&console.warn('createWebApiAnimator: No elements found for selector "'+u+'"');const f=Mn(e,d,l),a=l.delay&&l.delay>0?l.delay:void 0;let y;if(l.delay&&l.delay<0&&l.duration){const n=-l.delay;y=v===1/0?n%l.duration:Math.min(n,l.duration*(null!=v?v:1))}const b={duration:l.duration,delay:a,fill:null!=(i=l.fill)?i:"forwards",direction:l.direction,iterations:v};for(let n=0;n<s.length;n++){const o=s[n];for(const[,n]of f)if(n.length>0)try{const e=new KeyframeEffect(o,n,b),i=new Animation(e,document.timeline);r,(null==t?void 0:t.onFinish)&&(i.onfinish=()=>{var n;p||(p=!0,null==(n=t.onFinish)||n.call(t))}),(null==t?void 0:t.P)&&(i.onremove=()=>{var n;m||(m=!0,null==(n=t.P)||n.call(t))}),void 0!==y&&(i.currentTime=y),c.push(i)}catch(n){console.warn(n)}}}const y={isReady:()=>!0,getRootElement:()=>o||null,isPlaying:()=>{var n;return"running"===(null==(n=c[0])?void 0:n.playState)},play:()=>{var n;p=!1,c.forEach(n=>n.play()),null==(n=null==t?void 0:t.L)||n.call(t)},pause:()=>{var n;c.forEach(n=>n.pause()),null==(n=null==t?void 0:t.F)||n.call(t)},cancel:()=>{var n;p=!1,c.forEach(n=>n.cancel()),null==(n=null==t?void 0:t.Z)||n.call(t)},finish:()=>{var n;for(const t of c)try{(null==(n=t.effect)?void 0:n.getTiming().iterations)===1/0?(t.effect.updateTiming({iterations:1}),t.finish(),t.effect.updateTiming({iterations:1/0})):t.finish()}catch(n){t.cancel()}},setPlaybackRate:n=>(c.forEach(t=>t.playbackRate=n),y),getCurrentTime:()=>{var n,t;const o=null!=(t=null==(n=c[0])?void 0:n.currentTime)?t:null;return null!==o?+o:null},setCurrentTime:n=>{p=!1,c.forEach(t=>{t.currentTime=n})},destroy:()=>{var n;y.cancel(),c.splice(0,c.length),m||(m=!0,null==(n=null==t?void 0:t.P)||n.call(t))}};return l.trigger&&("scroll"===l.l?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):bn(y,l.trigger)),y}(t,r,null);return e=i,n.debugInstName&&(window[n.debugInstName]=i),i}(Z(t)||{},n._)}var jn,kn="data";return jn=v,((t,e,i,u)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of r(e))l.call(t,i)||void 0===i||n(t,i,{get:()=>e[i],enumerable:!(u=o(e,i))||u.enumerable});return t})(n({},"__esModule",{value:!0}),jn)})();
1
+ "use strict";var PixodeskAnimator=(()=>{var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,u=(t,n)=>{for(var e in n||(n={}))s.call(n,e)&&c(t,e,n[e]);if(i)for(var e of i(n))l.call(n,e)&&c(t,e,n[e]);return t},a=(t,e)=>n(t,r(e)),f=(t,n)=>{var e={};for(var r in t)s.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&i)for(var r of i(t))n.indexOf(r)<0&&l.call(t,r)&&(e[r]=t[r]);return e},d={};function v(t,n,e){return t+(n-t)*e}function h(t,n,e){const r=[],o=Math.max(t.length,n.length);for(let i=0;i<o;i++)r[i]=v(t[i]||0,n[i]||0,e);return r}function p(t,n,e){const r=Math.max(t.length,n.length),o=[];for(let i=0;i<r;i++)o.push(y(t[i],n[i],e));return o}function y(t,n,e){var r,o,i,s,l,c,u,a,f;if(!t||!n)return t||n||{v:[]};const d=Math.min(Math.max(e,0),1),v=Math.min(t.v.length,n.v.length),p=[],y=[],m=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];p.push(h(f,v,d));const b=null!=(o=null==(r=t.i)?void 0:r[e])?o:f,g=null!=(s=null==(i=n.i)?void 0:i[e])?s:v;y.push(h(b,g,d));const A=null!=(c=null==(l=t.o)?void 0:l[e])?c:f,w=null!=(a=null==(u=n.o)?void 0:u[e])?a:v;m.push(h(A,w,d))}return{v:p,i:y.length?y:void 0,o:m.length?m:void 0,c:null!=(f=t.c)?f:n.c}}function m(t,n,e){if(e<=0)return 0;if(e>=1)return 1;const r=3*t,o=3*(n-t)-r,i=1-r-o;function s(t){return((i*t+o)*t+r)*t}function l(t){return(3*i*t+2*o)*t+r}let c=e,u=0,a=1;for(let t=0;t<8;t++){const t=s(c)-e;if(Math.abs(t)<1e-6)return c;const n=l(c);if(Math.abs(n)<1e-6)break;c-=t/n}for(c=e;u<a;){const t=s(c);if(Math.abs(t-e)<1e-6)return c;e>t?u=c:a=c,c=(a+u)/2}return c}function b(t){const[n,e,r,o]=t,i=3*e,s=3*(o-e)-i,l=1-i-s;return function(t){return e=m(n,r,t),((l*e+s)*e+i)*e;var e}}function g(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function A(t,n){if(!t)return{left:void 0,right:void 0};if(n<=0)return{left:void 0,right:t};if(n>=1)return{left:t,right:void 0};const[e,r,o,i]=t,s=m(e,o,n),l=[e,r],c=[o,i],{left:u,right:a}=function(t,n,e,r,o){const i=g(t,n,o),s=g(n,e,o),l=g(e,r,o),c=g(i,s,o),u=g(s,l,o),a=g(c,u,o);return{left:[t,i,c,a],right:[a,u,l,r]}}([0,0],l,c,[1,1],s),f=u[3][0],d=u[3][1];let v,h;f>1e-9&&Math.abs(d)>1e-9&&(v=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const p=1-f,y=1-d;return p>1e-9&&Math.abs(y)>1e-9&&(h=[(a[1][0]-f)/p,(a[1][1]-d)/y,(a[2][0]-f)/p,(a[2][1]-d)/y]),{left:v,right:h}}function w(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function j(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const n=t.slice(1),e=n.length<=4,r=e?n[0]+n[0]:n.slice(0,2),o=e?n[1]+n[1]:n.slice(2,4),i=e?n[2]+n[2]:n.slice(4,6),s=4===n.length?n[3]+n[3]:8===n.length?n.slice(6,8):null,l=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==s&&l.push(parseInt(s,16)/255),l}(t):t.startsWith("rgb")?function(t){var n;const e=null==(n=t.match(/rgba?\((.*)\)/))?void 0:n[1];if(!e)throw new Error("Invalid rgb/rgba format");const r=e.split(",").map(t=>+t.trim());return[r[0]/255,r[1]/255,r[2]/255,...void 0!==r[3]?[r[3]]:[]]}(t):void console.warn("Unsupported color format: "+t)}}((n,e)=>{for(var r in e)t(n,r,{get:e[r],enumerable:!0})})(d,{PX_ANIMATOR_DATA_KEY:()=>Hn,createAnimator:()=>qn,setupAnimationTriggers:()=>Rn});var M=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),O=new Set(["translate","rotate","scale","skew"]),k=new Set(["offset-distance","offsetDistance"]);function x(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var z=new Set(["viewBox","preserveAspectRatio","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternContentUnits","patternTransform","clipPathUnits","maskUnits","maskContentUnits","markerUnits","markerWidth","markerHeight","refX","refY","textLength","lengthAdjust","startOffset","filterUnits","primitiveUnits","tableValues","stdDeviation","baseFrequency","numOctaves","surfaceScale","diffuseConstant","specularConstant","specularExponent","kernelMatrix","kernelUnitLength","edgeMode","preserveAlpha","targetX","targetY"]);function S(t){return z.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function V(t,n,e){return Math.max(n,Math.min(t,e))}function U(t,n,e,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,s=i*i,l=o*o,c=s*i,u=3*o*s,a=3*l*i,f=l*o;return[c*t[0]+u*n[0]+a*e[0]+f*r[0],c*t[1]+u*n[1]+a*e[1]+f*r[1]]}var _=1e-4;function T(t,n,e,r,o){const i=N(t,n,e,r,o);return 0===i[0]&&0===i[1]?N(t,n,e,r,o<.5?o+_:o-_):i}function N(t,n,e,r,o){const i=1-o,s=3*i*i,l=6*o*i,c=3*o*o;return[s*(n[0]-t[0])+l*(e[0]-n[0])+c*(r[0]-e[0]),s*(n[1]-t[1])+l*(e[1]-n[1])+c*(r[1]-e[1])]}function C(t,n){const{ts:e,ds:r}=t,o=e.length-1;if(n<=e[0])return r[0];if(n>=e[o])return r[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;e[t]<n?i=t+1:s=t}const l=e[s-1],c=e[s]-l,u=c>0?(n-l)/c:0;return r[s-1]+u*(r[s]-r[s-1])}function I(t){if(!t.length)return".";let n="";for(const e of t)e.startsWith("[")?n+=e:n+=(n?".":"")+e;return n}var P=class{_canSanitize(t){return this.isValid(t)}optional(){return new B(this)}},B=class extends P{constructor(t){super(),this.inner=t,this._default=void 0}sanitize(t){if(null!=t)return this.inner._canSanitize(t)?this.inner.sanitize(t):void 0}isValid(t,n,e){return null==t||this.inner.isValid(t,n,e)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},L=class extends P{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,n,e){return"string"==typeof t||(null==n||n.errors.push(I(null!=e?e:[])+": expected string, got "+typeof t),!1)}},F=class extends P{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,n,e){return!("number"!=typeof t||!isFinite(t))||(null==n||n.errors.push(I(null!=e?e:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},E=class extends P{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(I(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},Z=class extends P{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,n,e){return t===this.value||(null==n||n.errors.push(I(null!=e?e:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},J=class extends P{constructor(t,n){super(),this.values=t,this._default=null!=n?n:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,n,e){return!!this.values.includes(t)||(null==n||n.errors.push(I(null!=e?e:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},R=class extends P{constructor(t,n){super(),this.l=t,this.h="union",this._default=null!=n?n:t[0]._default}sanitize(t){for(const n of this.l)if(n.isValid(t))return n.sanitize(t);return this._default}isValid(t,n,e){var r;const o=n&&{errors:[],warnings:[],strict:n.strict};return!!this.l.some(n=>n.isValid(t,o,e?[...e]:void 0))||(null==n||n.errors.push(I(null!=e?e:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}_canSanitize(t){return this.l.some(n=>n._canSanitize(t))}},W=class extends P{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e={};for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(I(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),n.errors.push(I(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},D=class extends P{constructor(t,n){super(),this._shape=t,this.m=n;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e=u({},n);for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}if(this.m)for(const t of Object.keys(n))t in this._shape||(e[t]=this.m.sanitize(n[t]));return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(I(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(this.m)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.m.isValid(r[t],n,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},X=class extends P{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item._canSanitize(e)&&n.push(this.item.sanitize(e));return n}isValid(t,n,e){if(!Array.isArray(t))return null==n||n.errors.push(I(null!=e?e:[])+": expected array, got "+typeof t),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<t.length;e++)r.push("["+e+"]"),this.item.isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},G=class extends P{constructor(t){super(),this.value=t,this.h="record",this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value._canSanitize(r)&&(n[e]=this.value.sanitize(r));return n}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(I(null!=e?e:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(const[e,i]of Object.entries(t))r.push(e),this.value.isValid(i,n,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},q=class extends P{constructor(t,n){super(),this.fn=t,this._default=n,this.resolved=null}get schema(){var t;return null!=(t=this.resolved)?t:this.resolved=this.fn()}sanitize(t){return this.schema.sanitize(t)}isValid(t,n,e){return this.schema.isValid(t,n,e)}_canSanitize(t){return this.schema._canSanitize(t)}},Y=class extends P{constructor(t){super(),this.l=t,this.h="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.l.length?this.l.map((n,e)=>n.sanitize(t[e])):this._default}isValid(t,n,e){if(!Array.isArray(t)||t.length!==this.l.length)return null==n||n.errors.push(I(null!=e?e:[])+": expected tuple of length "+this.l.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<this.l.length;e++)r.push("["+e+"]"),this.l[e].isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.l.length}},H=(t="")=>new L(t),K=(t=0)=>new F(t),$=(t=!1)=>new E(t),Q=t=>new Z(t),tt=(t,n)=>new J(t,n),nt=(t,n)=>new R(t,n),et=t=>new W(t),rt=(t,n)=>new D(t,n),ot=t=>new X(t),it=t=>new G(t),st=t=>new Y(t),lt=(t,n)=>new q(t,n),ct={native:"native",js:"js"},ut=a(u({},ct),{auto:"auto"}),at={start:"start",end:"end"},ft={normal:"normal",alternate:"alternate"},dt="userSpaceOnUse",vt="objectBoundingBox",ht="transform";function pt(t){var n;const e=(null==t?void 0:t.animator)||(null==(n=null==t?void 0:t.meta)?void 0:n.animator);return e?function(t){const n=t.timeline;if(null==n||"object"!=typeof n)return t;const e=mt.get(t);if(e)return e;const r=t,{timeline:o}=r,i=f(r,["timeline"]);if(void 0!==n.engine&&(i.engine=n.engine),void 0!==n.frameRate&&(i.frameRate=n.frameRate),"scroll"===n.type||"view"===n.type){i.timelineSource="scroll",void 0!==n.duration&&(i.duration=n.duration),void 0!==n.iterations&&(i.iterations=n.iterations);const t=u({},i.scroll||{});t.kind=n.type,void 0!==n.axis&&(t.axis=n.axis),void 0!==n.source&&(t.source=n.source),void 0!==n.subject&&(t.subject=n.subject),void 0!==n.smoothing&&(t.smoothing=n.smoothing),void 0!==n.range&&(t.range=n.range);const e=n.pin;"boolean"==typeof e?t.pin=e:e&&"object"==typeof e&&(t.pin=!0,void 0!==e.align&&(t.pinAlign=e.align),void 0!==e.top&&(t.pinTop=e.top),void 0!==e.distance&&(t.pinDistance=e.distance)),i.scroll=t}else{if(void 0!==n.duration&&(i.duration=n.duration),void 0!==n.trigger){const t=n.trigger,{finishAction:e}=t,r=f(t,["finishAction"]);Object.keys(r).length&&(i.trigger=r),void 0!==e&&(i.resetOnFinish="reset"===e)}void 0!==n.delay&&(i.delay=n.delay),void 0!==n.iterations&&(i.iterations=n.iterations),void 0!==n.direction&&(i.direction=n.direction),void 0!==n.fillMode&&(i.fill=n.fillMode)}return mt.set(t,i),i}(e):void 0}var yt,mt=new WeakMap,bt=nt([H(),st([K(),K(),K(),K()])]),gt=nt([H(),K(),ot(K()),et({path:H()}),lt(()=>et({paths:ot(fn)}),{paths:[]}),lt(()=>ot(tn),[]),lt(()=>St,{})]),At=et({time:K().optional(),value:gt.optional(),easing:bt.optional(),tangentOut:st([K(),K()]).optional(),tangentIn:st([K(),K()]).optional()}),wt=t=>{var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0},jt=t=>{var n;return null!=(n=t.value)?n:t.v},Mt=t=>{var n;return null!=(n=t.easing)?n:t.e},Ot=t=>t.tangentIn,kt=t=>t.tangentOut,xt=et({segmentCount:K().optional(),repeatAt:tt([at.start,at.end]).optional(),direction:tt([ft.normal,ft.alternate]).optional()}),zt=et({value:gt.optional(),keyframes:ot(At).optional(),loop:nt([xt,$()]).optional(),autoOrient:$().optional(),alongPathMode:tt(["sampled","offsetPath"]).optional()}),St=et({translate:st([K(),K()]).optional(),rotate:K().optional(),skew:K().optional(),scale:st([K(),K()]).optional(),origin:st([K(),K()]).optional()}),Vt=(nt([H(),St,et({value:St}),zt]),it(zt)),Ut=nt([H(),ot(nt([H(),Vt])),Vt]),_t=et({startOn:tt(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:tt(["continue","pause","reset","reverse"]).optional(),finishAction:tt(["hold","reset"]).optional(),scrollIntoViewThreshold:K().optional()}),Tt=et({width:K(),d:H()}),Nt=et({fontFamily:H(),fontStyle:H(),ascent:K(),unitsPerEm:K(),glyphs:it(Tt)}),Ct=et({easings:it(st([K(),K(),K(),K()])).optional(),animations:it(Vt).optional(),styles:it(it(nt([H(),K()]))).optional(),fonts:it(Nt).optional()}),It=et({phase:tt(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:K().optional()}),Pt=et({start:It.optional(),end:It.optional()}),Bt=(et({kind:tt(["view","scroll"]).optional(),axis:tt(["block","inline","x","y"]).optional(),source:tt(["nearest","root"]).optional(),subject:H().optional(),smoothing:K().optional(),pin:$().optional(),pinAlign:tt(["top","center","bottom"]).optional(),pinTop:K().optional(),pinDistance:K().optional(),range:Pt.optional()}),et({align:tt(["top","center","bottom"]).optional(),top:K().optional(),distance:K().optional()})),Lt=tt([ut.auto,ut.native,ut.js]).optional(),Ft=et({type:Q("time").optional(),engine:Lt,frameRate:K().optional(),duration:K().optional(),trigger:_t.optional(),delay:K().optional(),iterations:nt([K(),Q("infinite")]).optional(),fillMode:tt(["forwards","backwards","both","none"]).optional(),direction:tt(["normal","reverse","alternate","alternate-reverse"]).optional()}),Et={duration:K().optional(),iterations:K().optional(),engine:Lt,frameRate:K().optional(),axis:tt(["block","inline","x","y"]).optional(),source:tt(["nearest","root"]).optional(),subject:H().optional(),smoothing:K().optional(),pin:nt([$(),Bt]).optional(),range:Pt.optional()},Zt=(yt=[Ft,et(u({type:Q("scroll")},Et)),et(u({type:Q("view")},Et))],new class extends P{constructor(t,n,e){var r;super(),this.A=t,this.j=n,this.h="discriminatedUnion",this._default=null!=e?e:n[0]._default,this.M=new Map;for(const e of n){const n=e._shape[t];if(!n)continue;const o=null!=(r=n.inner)?r:n;this.M.set(o._default,e),n.inner&&(this.O=e)}}k(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const n=t[this.A];return null==n?this.O:this.M.get(n)}sanitize(t){var n;return(null!=(n=this.k(t))?n:this.j[0]).sanitize(t)}isValid(t,n,e){const r=this.k(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this.A];return null==n||n.errors.push(I(null!=e?e:[])+": no discriminated union member matched "+this.A+"="+JSON.stringify(r)),!1}return r.isValid(t,n,e)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const n=this.k(t);return n?n._canSanitize(t):this.j[0]._canSanitize(t)}}("type",yt)),Jt=et({timeline:Zt.optional(),definitions:Ct.optional(),animateById:it(Ut).optional(),debugGlobalName:H().optional(),version:H().optional()}),Rt=(et({id:H(),animate:Ut}),nt([H(),K(),ot(K()),et({value:new class extends P{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return void 0!==t||(null==n||n.errors.push(I(null!=e?e:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}}}),St])),Wt=nt([K(),zt,et({value:K()})]),Dt=nt([st([K(),K()]),zt,et({value:st([K(),K()])})]),Xt=nt([H(),zt,et({value:H()})]),Gt=et({translate:Dt.optional(),rotate:Wt.optional(),scale:Dt.optional(),skew:Wt.optional(),origin:Dt.optional()}),qt=et({copies:K().optional(),translate:Dt.optional(),rotate:Wt.optional(),skew:Wt.optional(),scale:Dt.optional(),origin:Dt.optional()}),Yt=et({source:H().optional(),maskType:tt(["luminance","alpha"]).optional(),maskUnits:tt([dt,vt]).optional(),maskContentUnits:tt([dt,vt]).optional(),x:K().optional(),y:K().optional(),width:K().optional(),height:K().optional()}),Ht=et({d:Xt.optional()}),Kt=et({offset:Wt.optional(),range:Dt.optional(),subPaths:tt(["separate","combined"]).optional()}),$t=et({start:K().optional(),stretch:K().optional(),timeCrop:st([K(),K()]).optional()}),Qt=et({without:tt(["translate"]).optional(),source:H().optional(),retime:$t.optional()}),tn=et({offset:K(),color:H()}),nn=nt([ot(tn),et({value:ot(tn)}),zt]),en=et({type:tt(["linear","radial"]),start:Dt.optional(),end:Dt.optional(),center:Dt.optional(),radius:Wt.optional(),focal:Dt.optional(),stops:nn.optional(),gradientUnits:tt(["userSpaceOnUse","objectBoundingBox"]).optional(),spreadMethod:tt(["pad","reflect","repeat"]).optional(),gradientTransform:H().optional()}),rn=en,on=et({pathData:H(),pathOverflow:tt(["clip","extend"]).optional(),lengthAdjust:tt(["spacing","spacingAndGlyphs"]).optional(),method:tt(["align","stretch"]).optional(),spacing:tt(["auto","exact"]).optional(),startOffset:Wt.optional(),textLength:Wt.optional()}),sn=et({useGlyphs:$().optional()}),ln=et({transformBy:Gt.optional(),repeater:qt.optional(),maskedBy:Yt.optional(),clipPath:Ht.optional(),strokeTrim:Kt.optional(),clone:Qt.optional(),fillGradient:en.optional(),strokeGradient:rn.optional(),textPath:on.optional(),text:sn.optional()}),cn=rt({type:H(),domType:H().optional(),id:H().optional(),meta:(new class extends P{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return!0}_canSanitize(t){return!0}}).optional(),effects:ln.optional(),animate:Ut.optional(),style:nt([H(),it(nt([H(),K()]))]).optional()},Rt),un=rt(a(u({},cn._shape),{children:lt(()=>ot(un),[]).optional()}),Rt),an=et({width:nt([K(),H()]).optional(),height:nt([K(),H()]).optional(),viewBox:H().optional(),animator:Jt.optional()}),fn=(rt(a(u(u({},cn._shape),an._shape),{type:Q("svg"),children:ot(un).optional()}),Rt),et({v:ot(ot(K())),i:ot(ot(K())).optional(),o:ot(ot(K())).optional(),c:$().optional()}));function dn(t){const n=jt(t);if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const e=n.translate;return Array.isArray(e)&&e.length>=2?[e[0],e[1]]:void 0}function vn(t){return wt(t)}function hn(t){return Mt(t)}var pn=new WeakMap;function yn(t,n,e,r){let o=pn.get(t);const i=null==o?void 0:o.get(n);if(i)return i;const s=kt(t),l=Ot(n),c=[e[0]+(s?s[0]:0),e[1]+(s?s[1]:0)],u=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],a=function(t,n,e,r,o=100){const i=o+1,s=new Float64Array(i),l=new Float64Array(i);let c=U(t,n,e,r,0);s[0]=0,l[0]=0;let u=0;for(let a=1;a<i;a++){const i=a/o,f=U(t,n,e,r,i),d=f[0]-c[0],v=f[1]-c[1];u+=Math.sqrt(d*d+v*v),s[a]=i,l[a]=u,c=f}return{ts:s,ds:l}}(e,c,u,r),f={P0:e,P1:c,P2:u,P3:r,S:a,V:a.ds[a.ds.length-1]};return o||(o=new WeakMap,pn.set(t,o)),o.set(n,f),f}var mn=.5,bn=5,gn=32;function An(t,n){var e,r,o;if(!function(t){const n=t.keyframes;if(!Array.isArray(n))return!1;if(t.autoOrient)return!0;for(const t of n)if(Ot(t)||kt(t))return!0;return!1}(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const s=!!t.autoOrient,l=null!=(e=null==n?void 0:n.flatnessTolerance)?e:mn,c=null!=(r=null==n?void 0:n.rotationTolerance)?r:bn,u=null!=(o=null==n?void 0:n.maxSamplesPerSegment)?o:gn,a=[],f=dn(i[0]);if(!f)return t;const d=s?function(t,n){const e=dn(t),r=dn(n);if(!e||!r)return 0;const o=yn(t,n,e,r),i=T(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(i[0],i[1]):void 0;a.push(wn(vn(i[0]),On(jn(i[0]),jn(i[0]),0,f,d,s)));for(let t=0;t<i.length-1;t++){const n=i[t],e=i[t+1],r=dn(n),o=dn(e);r&&o?(s&&t>0&&xn(a,n,e,r,o,c),Sn(a,n,e,r,o,s,l,c,u)):a.push(wn(vn(e),On(jn(e),jn(e),1,null!=o?o:[0,0],void 0,s)))}const v=hn(i[i.length-1]);v&&(a[a.length-1].e=v),s&&function(t){let n;for(const e of t){const t=jt(e);if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let r=t.rotate;for(;r-n>180;)r-=360;for(;r-n<-180;)r+=360;t.rotate=r,n=r}}(a);const h={keyframes:a};return void 0!==t.loop&&(h.loop=t.loop),h}function wn(t,n){return{t:t,v:n}}function jn(t){const n=jt(t);if(n&&"object"==typeof n&&!Array.isArray(n))return n}function Mn(t,n,e){if(void 0===t)return n;if(void 0===n)return t;if("number"==typeof t&&"number"==typeof n)return t+(n-t)*e;if(Array.isArray(t)&&Array.isArray(n)&&t.length===n.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,s="number"==typeof n[o]?n[o]:0;r[o]=i+(s-i)*e}return r}return e<.5?t:n}function On(t,n,e,r,o,i){const s={translate:r},l=new Set;if(t)for(const n of Object.keys(t))l.add(n);if(n)for(const t of Object.keys(n))l.add(t);for(const r of l){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],l=null==n?void 0:n[r];void 0===o&&void 0===l||(s[r]=Mn(o,l,e))}return void 0!==o&&(s.rotate=o+kn(t,n,e)),s}function kn(t,n,e){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=Mn(r,o,e);return"number"==typeof i?i:0}function xn(t,n,e,r,o,i){const s=t[t.length-1],l=jt(s),c=null==l?void 0:l.rotate;if("number"!=typeof c)return;const u=jn(n),a=c-kn(u,u,0),f=yn(n,e,r,o),d=T(f.P0,f.P1,f.P2,f.P3,0),v=180*Math.atan2(d[1],d[0])/Math.PI,h=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(v,a);if(Math.abs(h)<=i)return;const p=vn(n),y=Math.min(p+zn,(p+vn(e))/2),m=On(jn(n),jn(n),0,r,v,!0);t.push(wn(y,m))}var zn=.05;function Sn(t,n,e,r,o,i,s,l,c){const u=yn(n,e,r,o),a=vn(n),f=vn(e),d=hn(n),v=(h=d)?b([h[1],h[0],h[3],h[2]]):t=>t;var h;const p=jn(n),y=jn(e),m=function(t,n,e,r,o){const i=[];Vn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),Vn(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,n)=>t-n);const s=[0];for(const t of i)t>s[s.length-1]+1e-6&&t<.999999&&s.push(t);s.push(1);const l=[],c={U:o-s.length};for(let o=0;o<s.length-1;o++)Un(s[o],s[o+1],l,t,n,e,r,c);return l}(u,i,s,l,c),g=[];for(const t of m){const n=C(u.S,t),e=V(u.V>0?n/u.V:t,0,1),r={u:V(v(e),0,1),p:e,_:U(u.P0,u.P1,u.P2,u.P3,t)};if(i){const n=T(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(n[1],n[0])/Math.PI}g.push(r)}let w=d,j=0;const M=t.length-1;for(let n=0;n<g.length;n++){const e=g[n],r=j<1?V((e.u-j)/(1-j),0,1):1,{left:o,right:s}=A(w,r),l=0===n?M:t.length-1;o?t[l].e=o:delete t[l].e;const c=a+e.u*(f-a),u=On(p,y,e.p,e._,e.rotateDeg,i);t.push(wn(c,u)),w=s,j=e.u}}function Vn(t,n,e,r,o){const i=n-t,s=e-n,l=i-2*s+(r-e),c=2*(s-i),u=i;if(Math.abs(l)<1e-10){if(Math.abs(c)>1e-10){const t=-u/c;t>1e-6&&t<.999999&&o.push(t)}return}const a=c*c-4*l*u;if(a<0)return;const f=Math.sqrt(a),d=(-c-f)/(2*l),v=(-c+f)/(2*l);d>1e-6&&d<.999999&&o.push(d),v>1e-6&&v<.999999&&o.push(v)}function Un(t,n,e,r,o,i,s,l){const c=(t+n)/2,u=U(r.P0,r.P1,r.P2,r.P3,t),a=U(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=U(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=U(r.P0,r.P1,r.P2,r.P3,c),h=U(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(_n(d,u,a),_n(v,u,a),_n(h,u,a));let y=!0;if(o){const e=T(r.P0,r.P1,r.P2,r.P3,t),o=T(r.P0,r.P1,r.P2,r.P3,n),i=180*Math.atan2(e[1],e[0])/Math.PI,l=180*Math.atan2(o[1],o[0])/Math.PI;let c=Math.abs(i-l);c>180&&(c=360-c),c>s&&(y=!1)}p<=i&&y||l.U<=0||f<1e-6?e.push(n):(l.U-=1,Un(t,c,e,r,o,i,s,l),Un(c,n,e,r,o,i,s,l))}function _n(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=r*r+o*o;if(i<1e-20){const e=t[0]-n[0],r=t[1]-n[1];return Math.sqrt(e*e+r*r)}const s=(t[0]-n[0])*o-(t[1]-n[1])*r;return Math.abs(s)/Math.sqrt(i)}var Tn=1;function Nn(t,n){if(t===n)return!0;if(typeof t!=typeof n||null===t||null===n||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(n))return!1;const e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(e=>Nn(t[e],n[e]))}function Cn(t){const n=[];let e;const r=function(t){const n=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),e=[];let r=null;for(const t of n)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},e.push(r);else if(r){const n=+t;r.values.push(Number.isNaN(n)?0:n)}return e}(t);for(const t of r){const r=t.type,o=t.values;if("M"===r||"m"===r){const t=o[0]||0,r=o[1]||0;e={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},n.push(e);continue}if(e||(e={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},n.push(e)),"L"===r){const t=o[0]||0,n=o[1]||0;e.v.push([t,n]),e.i.push([t,n]),e.o.push([t,n])}else if("C"===r){const t=o[0]||0,n=o[1]||0,r=o[2]||0,i=o[3]||0,s=o[4]||0,l=o[5]||0;e.o[e.o.length-1]=[t,n],e.v.push([s,l]),e.i.push([r,i]),e.o.push([s,l])}else"Z"===r||"z"===r?e.c=!0:console.warn('Unsupported path command "'+r+'"')}return n}function In(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Pn(t){return"string"==typeof t&&void 0!==In(t)}function Bn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const n=In(t.path);return n?{paths:Cn(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&Pn(n[0])){const t=[];for(const e of n){const n=In(e);n&&t.push(...Cn(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Pn(t[0])){const n=[];for(const e of t){const t=In(e);t&&n.push(...Cn(t))}return{paths:n}}return{paths:t}}return Pn(t)?{paths:Cn(In(t))}:t}function Ln(t,n){var e;if(t)return Array.isArray(t)?t:(null==(e=null==n?void 0:n.easings)?void 0:e[t])?n.easings[t]:void console.warn("Unknown easing name: "+t)}function Fn(t,n){var e;if("string"==typeof t){const r=null==(e=null==n?void 0:n.animations)?void 0:e[t];return r||console.warn("Unknown animation name: "+t),r}return t}function En(t,n,e,r){var o,i;return"d"===t?{paths:p(null!=(o=null==n?void 0:n.paths)?o:Array.isArray(n)?n:[],null!=(i=null==e?void 0:e.paths)?i:Array.isArray(e)?e:[],r)}:M.has(t)?function(t,n,e){return[v(t[0]||0,n[0]||0,e),v(t[1]||0,n[1]||0,e),v(t[2]||0,n[2]||0,e),v(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}(n||[0,0,0,1],e||[0,0,0,1],r):"transform"!==t||"object"!=typeof n||null===n||Array.isArray(n)||"object"!=typeof e||null===e||Array.isArray(e)?"rotate"===t&&"number"==typeof n&&"number"==typeof e?v(n,e,r):O.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?h(n||[],e||[],r):v(+(n||0),+(e||0),r):function(t,n,e){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=n?n:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],s=null==n?void 0:n[i];if("rotate"===i||"skew"===i)o[i]=v(+(null!=r?r:0),+(null!=s?s:0),e);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=h(r||t,s||t,e)}else o[i]=null!=s?s:r}return o}(n,e,r)}function Zn(t,n,e,r){var o;const i=n.keyframes||[],s=[];for(const n of i){const e=wt(n);let i=jt(n);const l=Mt(n);"d"===t&&(i=Bn(i));const c=x(t)?S(t):t;M.has(c)&&(i=null!=(o=j(i))?o:i);const u={t:e,v:i,e:Ln(l,r)},a=Ot(n),f=kt(n);a&&(u.tangentIn=a),f&&(u.tangentOut=f),s.push(u)}s.sort((t,n)=>{var e,r;return(null!=(e=t.t)?e:0)-(null!=(r=n.t)?r:0)});const l=n.loop,c=!0===l?{}:l||void 0;return c&&s.length>=2?function(t,n,e,r){var o,i,s,l,c;const f=n.length-1,d=V(null!=(o=e.segmentCount)?o:f,1,f);let v;v=e.repeatAt===at.start?n.slice(0,d+1):n.slice(f-d);const h=null!=(i=n[0].t)?i:0,p=null!=(s=n[n.length-1].t)?s:0;let y,m;e.repeatAt===at.start?(y=0,m=h):(y=p,m=r);const g=m-y;if(g<=0)return n;const j=null!=(l=v[0].t)?l:0,M=(null!=(c=v[v.length-1].t)?c:0)-j;if(M<=0)return n;const O=v.map(t=>({T:(t.t-j)/M,v:t.v,e:t.e,tangentIn:Ot(t),tangentOut:kt(t)})),k=Math.floor(g/M),x=g-k*M,z=x/M,S=[],U=e.repeatAt!==at.start,_=n[n.length-1];let T,N=!1;function C(n,e,r){var o;let i;if(e){i=[];for(let t=O.length-1;t>=0;t--)i.push({T:1-O[t].T,v:O[t].v,e:t>0?w(O[t-1].e):void 0,tangentIn:O[t].tangentOut,tangentOut:O[t].tangentIn})}else i=O;const s=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.T>s+1e-9){const o=i[e-1],l=r.T-o.T,c=(s-o.T)/l,u=o.e?b(o.e)(c):c,a=En(t,o.v,r.v,u),{left:f}=A(o.e,c);return S.length>0&&o.T<=s&&(S[S.length-1].e=f),void S.push({t:n+s*M,v:a,e:void 0})}const l=S.length>0?S[S.length-1]:_,c=U&&0===e&&void 0!==l&&Math.abs((null!=(o=l.t)?o:0)-(n+r.T*M))<1e-9;if(c){if(Nn(l.v,r.v)){S.length>0?(l.e=r.e,l.tangentOut=r.tangentOut):(T=r.e,N=!0);continue}S.length>0&&(delete l.tangentIn,delete l.tangentOut)}const u={t:n+r.T*M+(c?Tn:0),v:r.v,e:e<i.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),S.push(u)}}if(e.repeatAt===at.start){z>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=O.length-1;t>=0;t--)o.push({T:1-O[t].T,v:O[t].v,e:t>0?w(O[t-1].e):void 0,tangentIn:O[t].tangentOut,tangentOut:O[t].tangentIn})}else o=O;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.T<i-1e-9)continue;const s=o[e-1];if(s&&s.T<i-1e-9&&r.T>i+1e-9){const e=r.T-s.T,o=(i-s.T)/e,l=s.e?b(s.e)(o):o,c=En(t,s.v,r.v,l),{right:u}=A(s.e,o);S.push({t:n,v:c,e:u})}const l={t:n+(r.T-i)*M,v:r.v,e:e<o.length-1?r.e:void 0};r.tangentIn&&(l.tangentIn=r.tangentIn),r.tangentOut&&(l.tangentOut=r.tangentOut),S.push(l)}}(y,e.direction===ft.alternate&&k%2==0,z);for(let t=0;t<k;t++){const n=k-1-t,r=e.direction===ft.alternate&&n%2==0;C(y+x+t*M,r)}}else{for(let t=0;t<k;t++){const n=e.direction===ft.alternate&&t%2==0;C(y+t*M,n)}if(z>1e-9){const t=e.direction===ft.alternate&&k%2==0;C(y+k*M,t,z)}}return e.repeatAt===at.start?[...S,...n]:N&&n.length>0?[...n.slice(0,-1),a(u({},n[n.length-1]),{e:T}),...S]:[...n,...S]}(t,s,c,e):s}var Jn=0;function Rn(t,n){const{startOn:e,outAction:r="continue",scrollIntoViewThreshold:o=0}=n,i=t.getRootElement();if(!i)return console.warn("setupAnimationTriggers: No root element found for animation."),t;let s=!1;const l=()=>{s&&(s=!1,t.setPlaybackRate(1)),t.play()},c=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":s=!0,t.setPlaybackRate(-1),t.play()}};switch(e){case"load":{const t=()=>l();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{let t=!1;const n=()=>{t=!0,l()},e=()=>{t&&c()};i.addEventListener("mouseenter",n),i.addEventListener("mouseleave",e);break}case"click":{const n=()=>{t.isPlaying()?c():l()};i.addEventListener("click",n);break}case"scrollIntoView":{const t=t=>{var n,e;const r=t.boundingClientRect,o=t.intersectionRect;if(!(null==r?void 0:r.height)||!o)return t.intersectionRatio;const i="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,s=null!=(e=null==(n=t.rootBounds)?void 0:n.height)?e:1/0,l=Math.min(i,s),c=Math.min(r.height,Number.isFinite(l)?l:r.height);return c>0?o.height/c:t.intersectionRatio},n=Array.from({length:21},(t,n)=>n/20);let e=!1;new IntersectionObserver(n=>{n.forEach(n=>{n.isIntersecting&&t(n)>=o?(e=!0,l()):e&&(e=!1,c())})},{threshold:n}).observe(i);break}}return t}function Wn(t){return"#"+t}function Dn(t,n,e,r){let o=jt(t);const i=Mt(t),s={offset:n,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let l,c=e;var u;return M.has(e)&&Array.isArray(o)?l=function(t){const n=Math.round(255*t[0]),e=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+n+","+e+","+r+","+t[3]+")":"rgb("+n+","+e+","+r+")"}(o):"transform"!==e||null===o||"object"!=typeof o||Array.isArray(o)?O.has(e)?(Array.isArray(o)&&("translate"===e&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===e&&(o+="deg"),l=e+"("+o+")",c="transform"):l="d"===e?'path("'+(o&&"object"==typeof o&&Array.isArray(o.paths)?o.paths:[]).map(t=>function(t,n=!1){var e,r,o,i;const s=t.v,l=t.i,c=t.o,u=t.c;if(!s.length)return"";const a=[],f=s.length;a.push("M"+s[0][0]+","+s[0][1]);for(let t=1;t<f;t++){const o=s[t-1],i=null!=(e=null==c?void 0:c[t-1])?e:o,u=null!=(r=null==l?void 0:l[t])?r:s[t],f=s[t];n||i[0]!==o[0]||i[1]!==o[1]||u[0]!==f[0]||u[1]!==f[1]?a.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1]):a.push("L"+f[0]+","+f[1])}if(u&&f>0){const t=s[f-1],e=null!=(o=null==c?void 0:c[f-1])?o:t,r=null!=(i=null==l?void 0:l[0])?i:s[0],u=s[0];!n&&e[0]===t[0]&&e[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||a.push("C"+e[0]+","+e[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),a.push("z")}return a.join("")}(t,!0)).join("")+'")':k.has(e)&&"number"==typeof o?100*o+"%":""+o:(l=function(t,n){var e;if(!t)return"";const r=null==(e=null==n?void 0:n.N)||e,o=[],i=t.translate,s=t.origin,l=t.rotate,c=t.skew,u=t.scale,a=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+a+","+i[1]+a+")"),s&&o.push("translate("+s[0]+a+","+s[1]+a+")"),null!=l&&o.push("rotate("+l+f+")"),null!=c&&o.push("skewX("+c+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),s&&o.push("translate("+-s[0]+a+","+-s[1]+a+")"),o.join("")}(o,{N:!0}),c="transform"),CSS.supports(S(c),l)||r.add(c),c=(u=c).includes("-")?u.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):u,s[c]=l,s}function Xn(t,n,e){var r,o,i,s,l;const c=[];for(let f=0;f<n.length;f++){const d=n[f],v=null!=(r=d.t)?r:0;if(v<0){const e=n[f+1];if(e&&(null!=(o=e.t)?o:0)>=0){const n=(0-v)/((null!=(i=e.t)?i:0)-v),r=d.e?b(d.e)(n):n,{right:o}=A(d.e,n);c.push({t:0,v:En(t,d.v,e.v,r),e:o})}continue}if(v>e){const r=n[f-1];if(r&&(null!=(s=r.t)?s:0)<=e){const n=null!=(l=r.t)?l:0,o=(e-n)/(v-n),i=r.e?b(r.e)(o):o,{left:s}=A(r.e,o);c.length>0&&(c[c.length-1]=a(u({},c[c.length-1]),{e:s})),c.push({t:e,v:En(t,r.v,d.v,i),e:void 0})}break}c.push(d)}return c}function Gn(t,n,e){var r;const o=new Map;for(const[i,s]of Object.entries(t)){const t=e.duration||1,l=Xn(i,s.keyframes||[],t),c=[];for(let e=0;e<l.length;e++){const o=l[e],s=Dn(o,V((null!=(r=o.t)?r:0)/t,0,1),i,n);0===e&&(s.offset||0)>0&&c.push(a(u({},s),{offset:0})),c.push(s)}c.length>0&&(c[c.length-1].offset||0)<1&&c.push(a(u({},c[c.length-1]),{offset:1})),c.length>0&&o.set(i,c)}return o}function qn(t){const n=function(t){if(!(null==t?void 0:t.data))throw new Error("createAnimator: `data` is required");return t.data}(t);return function(t,e){let r,o=e;t.resetOnFinish&&(o=a(u({},e),{onFinish:()=>{var t;null==(t=null==e?void 0:e.onFinish)||t.call(e),null==r||r.cancel()}}));const i=function(t,n,e,r,o){var i;const s=pt(t)||{};if(!e)if(t.id){const n=Wn(t.id);(e=document.querySelector(n))||console.warn("createFrameLoopAnimator: No root element found for selector: ",n)}else console.warn("createFrameLoopAnimator: No root element provided");const l=function(t,n=ct.native){const e=pt(t)||{},r=function(t){var n;if(t)return null==(n=pt(t))?void 0:n.definitions}(t),o=e.duration||1e3,i=[],s=(t,e,i)=>{if(!e)return null;const s=function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=Fn(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=Fn(r,n);t&&e.push(t)}else e.push(t);return e}(e,r);if(0===s.length)return null;const l=function(t,n,e,r=ct.native){const o={};for(const[i,s]of Object.entries(t)){if("transform"===i&&"offsetPath"===s.alongPathMode&&void 0!==t.offsetDistance)continue;const l=Zn(i,s,n,e);if(l.length>0){const t={keyframes:l};void 0!==s.autoOrient&&(t.autoOrient=s.autoOrient),void 0!==s.loop&&(t.loop=s.loop),o[i]=r===ct.native&&"transform"===i?An(t):t}}return o}(function(t,n){if(!t)return t;const e=n&&"object"==typeof n&&!Array.isArray(n)?n:function(t){var n,e;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let s,l=-1;for(;null!==(s=o.exec(t));){const t=s[1],o=i.indexOf(t);if(o<0||o<=l)return;l=o;const c=s[2].split(/[\s,]+/).filter(Boolean).map(Number);if(c.some(t=>Number.isNaN(t)))return;if("translate"===t){if(c.length<1||c.length>2)return;r.translate=[c[0],null!=(n=c[1])?n:0]}else if("rotate"===t){if(1!==c.length)return;r.rotate=c[0]}else if("skewX"===t){if(1!==c.length)return;r.skew=c[0]}else{if(c.length<1||c.length>2)return;r.scale=[c[0],null!=(e=c[1])?e:c[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}(n);if(!e||!Object.keys(e).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?u(u({},e),t):t,o=t[ht];if(o&&"object"==typeof o){const n=o;if(Array.isArray(n.keyframes)){const e=a(u({},n),{keyframes:n.keyframes.map(t=>a(u({},t),{value:r(t.value)}))});return void 0!==e.value&&(e.value=r(e.value)),a(u({},t),{transform:e})}return t}const i=Object.keys(t).filter(t=>O.has(t));if(1!==i.length)return t;const s=i[0],l=t[s];if(!l||"object"!=typeof l||!Array.isArray(l.keyframes))return t;const c=a(u({},l),{keyframes:l.keyframes.map(t=>a(u({},t),{value:a(u({},e),{[s]:t.value})}))});void 0!==c.value&&(c.value=a(u({},e),{[s]:c.value}));const f=u({},t);return delete f[s],a(u({},f),{transform:c})}(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(s),i),o,r,n);return 0===Object.keys(l).length?null:{id:t,animate:l}},l=function(t){var n;if(!t)return;const e=null==(n=pt(t))?void 0:n.animateById;return e?Object.entries(e).map(([t,n])=>({id:t.startsWith("#")?t.slice(1):t,animate:n})):void 0}(t);if(l)for(const t of l){const n=s(t.id,t.animate);n&&i.push(n)}const c=t=>{const n=t.animate;if(n&&Object.keys(n).length>0){const e=t.id||"_px_el_"+ ++Jn;t.id=e;const r=s(e,n,t.transform);r&&i.push(r)}if(t.children)for(let n=0;n<t.children.length;n++)c(t.children[n])};if(t.children)for(let n=0;n<t.children.length;n++)c(t.children[n]);return i}(t,ct.native),c=[],f=s.iterations;let d;"number"==typeof f&&(d=f),"infinite"===f&&(d=1/0);const v=new Set;let h=!1,p=!1;(null==l?void 0:l.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const t of l||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",t);continue}const l=Wn(t.id),u=(null==e?void 0:e.querySelectorAll(l))||document.querySelectorAll(l);0===u.length&&console.warn('createWebApiAnimator: No elements found for selector "'+l+'"');const a=Gn(r,v,s),f=s.delay&&s.delay>0?s.delay:void 0;let y;if(s.delay&&s.delay<0&&s.duration){const t=-s.delay;y=d===1/0?t%s.duration:Math.min(t,s.duration*(null!=d?d:1))}const m={duration:s.duration,delay:f,fill:null!=(i=s.fill)?i:"forwards",direction:s.direction,iterations:d};for(let t=0;t<u.length;t++){const e=u[t];for(const[,t]of a)if(t.length>0)try{const r=new KeyframeEffect(e,t,m),i=new Animation(r,document.timeline);o,(null==n?void 0:n.onFinish)&&(i.onfinish=()=>{var t;h||(h=!0,null==(t=n.onFinish)||t.call(n))}),(null==n?void 0:n.onRemove)&&(i.onremove=()=>{var t;p||(p=!0,null==(t=n.onRemove)||t.call(n))}),void 0!==y&&(i.currentTime=y),c.push(i)}catch(t){console.warn(t)}}}const y={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var t;return"running"===(null==(t=c[0])?void 0:t.playState)},play:()=>{var t;h=!1,c.forEach(t=>t.play()),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;c.forEach(t=>t.pause()),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;h=!1,c.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{var t;for(const n of c)try{(null==(t=n.effect)?void 0:t.getTiming().iterations)===1/0?(n.effect.updateTiming({iterations:1}),n.finish(),n.effect.updateTiming({iterations:1/0})):n.finish()}catch(t){n.cancel()}},setPlaybackRate:t=>(c.forEach(n=>n.playbackRate=t),y),getCurrentTime:()=>{var t,n;const e=null!=(n=null==(t=c[0])?void 0:t.currentTime)?n:null;return null!==e?+e:null},setCurrentTime:t=>{h=!1,c.forEach(n=>{n.currentTime=t})},destroy:()=>{var t;y.cancel(),c.splice(0,c.length),p||(p=!0,null==(t=null==n?void 0:n.onRemove)||t.call(n))}};return s.trigger&&("scroll"===s.timelineSource?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Rn(y,s.trigger)),y}(n,o,null);return r=i,t.debugGlobalName&&(window[t.debugGlobalName]=i),i}(pt(n)||{},t.callbacks)}var Yn,Hn="data";return Yn=d,((n,r,i,l)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let i of o(r))s.call(n,i)||void 0===i||t(n,i,{get:()=>r[i],enumerable:!(l=e(r,i))||l.enumerable});return n})(t({},"__esModule",{value:!0}),Yn)})();