@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.
- package/README.md +25 -7
- package/dist/index.cjs +724 -462
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -4
- package/dist/index.d.ts +29 -4
- package/dist/index.js +714 -460
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.prerendered-waapi.umd.js +981 -85
- package/dist/index.prerendered-waapi.umd.js.map +1 -1
- package/dist/index.prerendered-waapi.umd.min.js +1 -1
- package/dist/index.prerendered.umd.js +1006 -105
- package/dist/index.prerendered.umd.js.map +1 -1
- package/dist/index.prerendered.umd.min.js +1 -1
- package/dist/pixodesk-svg-animator.umd.js +512 -270
- package/dist/pixodesk-svg-animator.umd.js.map +1 -1
- package/dist/pixodesk-svg-animator.umd.min.js +1 -1
- package/mangle-reserved.json +232 -0
- package/package.json +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var PixodeskAnimator=(()=>{var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,u=Math.pow,c=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,a=(t,n)=>{for(var e in n||(n={}))l.call(n,e)&&c(t,e,n[e]);if(i)for(var e of i(n))s.call(n,e)&&c(t,e,n[e]);return t},f=(t,e)=>n(t,r(e)),d=(t,n)=>{var e={};for(var r in t)l.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&&s.call(t,r)&&(e[r]=t[r]);return e},v={};function y(t,n=!1){var e,r,o,i;const l=t.v,s=t.i,u=t.o,c=t.c;if(!l.length)return"";const a=[],f=l.length;a.push("M"+l[0][0]+","+l[0][1]);for(let t=1;t<f;t++){const o=l[t-1],i=null!=(e=null==u?void 0:u[t-1])?e:o,c=null!=(r=null==s?void 0:s[t])?r:l[t],f=l[t];n||i[0]!==o[0]||i[1]!==o[1]||c[0]!==f[0]||c[1]!==f[1]?a.push("C"+i[0]+","+i[1]+","+c[0]+","+c[1]+","+f[0]+","+f[1]):a.push("L"+f[0]+","+f[1])}if(c&&f>0){const t=l[f-1],e=null!=(o=null==u?void 0:u[f-1])?o:t,r=null!=(i=null==s?void 0:s[0])?i:l[0],c=l[0];!n&&e[0]===t[0]&&e[1]===t[1]&&r[0]===c[0]&&r[1]===c[1]||a.push("C"+e[0]+","+e[1]+","+r[0]+","+r[1]+","+c[0]+","+c[1]),a.push("z")}return a.join("")}function p(t,n,e){return t+(n-t)*e}function m(t,n,e){const r=[],o=Math.max(t.length,n.length);for(let i=0;i<o;i++)r[i]=p(t[i]||0,n[i]||0,e);return r}function h(t,n,e){return[p(t[0]||0,n[0]||0,e),p(t[1]||0,n[1]||0,e),p(t[2]||0,n[2]||0,e),p(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}function b(t,n,e){const r=Math.max(t.length,n.length),o=[];for(let i=0;i<r;i++)o.push(g(t[i],n[i],e));return o}function g(t,n,e){var r,o,i,l,s,u,c,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),y=[],p=[],h=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];y.push(m(f,v,d));const b=null!=(o=null==(r=t.i)?void 0:r[e])?o:f,g=null!=(l=null==(i=n.i)?void 0:i[e])?l:v;p.push(m(b,g,d));const w=null!=(u=null==(s=t.o)?void 0:s[e])?u:f,A=null!=(a=null==(c=n.o)?void 0:c[e])?a:v;h.push(m(w,A,d))}return{v:y,i:p.length?p:void 0,o:h.length?h:void 0,c:null!=(f=t.c)?f:n.c}}function w(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 l(t){return((i*t+o)*t+r)*t}function s(t){return(3*i*t+2*o)*t+r}let u=e,c=0,a=1;for(let t=0;t<8;t++){const t=l(u)-e;if(Math.abs(t)<1e-6)return u;const n=s(u);if(Math.abs(n)<1e-6)break;u-=t/n}for(u=e;c<a;){const t=l(u);if(Math.abs(t-e)<1e-6)return u;e>t?c=u:a=u,u=(a+c)/2}return u}function A(t){const[n,e,r,o]=t,i=3*e,l=3*(o-e)-i,s=1-i-l;return function(t){return e=w(n,r,t),((s*e+l)*e+i)*e;var e}}function k(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function M(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,l=w(e,o,n),s=[e,r],u=[o,i],{left:c,right:a}=function(t,n,e,r,o){const i=k(t,n,o),l=k(n,e,o),s=k(e,r,o),u=k(i,l,o),c=k(l,s,o),a=k(u,c,o);return{left:[t,i,u,a],right:[a,c,s,r]}}([0,0],s,u,[1,1],l),f=c[3][0],d=c[3][1];let v,y;f>1e-9&&Math.abs(d)>1e-9&&(v=[c[1][0]/f,c[1][1]/d,c[2][0]/f,c[2][1]/d]);const p=1-f,m=1-d;return p>1e-9&&Math.abs(m)>1e-9&&(y=[(a[1][0]-f)/p,(a[1][1]-d)/m,(a[2][0]-f)/p,(a[2][1]-d)/m]),{left:v,right:y}}function j(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function x(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+")"}function O(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),l=4===n.length?n[3]+n[3]:8===n.length?n.slice(6,8):null,s=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==l&&s.push(parseInt(l,16)/255),s}(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})})(v,{PX_ANIMATOR_DATA_KEY:()=>ei,PX_ANIM_ATTR_NAME:()=>At,PX_ANIM_SRC_ATTR_NAME:()=>wt,PxAnimatorEngine:()=>Mt,PxAnimatorMode:()=>kt,createAnimator:()=>oi,createAnimatorImpl:()=>ri,generateNewIds:()=>Sn,loadTagAnimators:()=>ii,setupAnimationTriggers:()=>Vo});var S=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),N=new Set(["translate","rotate","scale","skew"]),z=new Set(["offset-distance","offsetDistance"]);function P(t,n){var e;if(!t)return"";const r=null==(e=null==n?void 0:n.l)||e,o=[],i=t.translate,l=t.origin,s=t.rotate,u=t.skew,c=t.scale,a=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+a+","+i[1]+a+")"),l&&o.push("translate("+l[0]+a+","+l[1]+a+")"),null!=s&&o.push("rotate("+s+f+")"),null!=u&&o.push("skewX("+u+f+")"),c&&o.push("scale("+c[0]+","+c[1]+")"),l&&o.push("translate("+-l[0]+a+","+-l[1]+a+")"),o.join("")}var C=new Set(["offset-distance","offsetDistance"]),_=1e3;function T(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):t}function L(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var I=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 D(t){return I.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function F(t,n,e){return Math.max(n,Math.min(t,e))}function V(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,l=i*i,s=o*o,u=l*i,c=3*o*l,a=3*s*i,f=s*o;return[u*t[0]+c*n[0]+a*e[0]+f*r[0],u*t[1]+c*n[1]+a*e[1]+f*r[1]]}var R=1e-4;function U(t,n,e,r,o){const i=B(t,n,e,r,o);return 0===i[0]&&0===i[1]?B(t,n,e,r,o<.5?o+R:o-R):i}function B(t,n,e,r,o){const i=1-o,l=3*i*i,s=6*o*i,u=3*o*o;return[l*(n[0]-t[0])+s*(e[0]-n[0])+u*(r[0]-e[0]),l*(n[1]-t[1])+s*(e[1]-n[1])+u*(r[1]-e[1])]}function E(t,n,e,r,o=100){const i=o+1,l=new Float64Array(i),s=new Float64Array(i);let u=V(t,n,e,r,0);l[0]=0,s[0]=0;let c=0;for(let a=1;a<i;a++){const i=a/o,f=V(t,n,e,r,i),d=f[0]-u[0],v=f[1]-u[1];c+=Math.sqrt(d*d+v*v),l[a]=i,s[a]=c,u=f}return{ts:l,ds:s}}function Z(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,l=o;for(;i<l;){const t=i+l>>>1;e[t]<n?i=t+1:l=t}const s=e[l-1],u=e[l]-s,c=u>0?(n-s)/u:0;return r[l-1]+c*(r[l]-r[l-1])}function G(t){return"scroll"===(null==t?void 0:t.h)}var W="cover";function X(t,n,e,r){var o;const[i,l]=function(t,n,e){const r=n,o=e;switch(t){case"cover":return[0,r+o];case"entry":return[0,Math.min(r,o)];case"contain":return[Math.min(r,o),Math.max(r,o)];case"exit":return[Math.max(r,o),r+o];case"entry-crossing":return[0,r];case"exit-crossing":return[o,r+o]}}(null!=(o=null==t?void 0:t.phase)?o:W,e,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:n)*(l-i)}function q(t){if(!t.length)return".";let n="";for(const e of t)e.startsWith("[")?n+=e:n+=(n?".":"")+e;return n}var Q=class{A(t){return this.M(t)}optional(){return new J(this)}},J=class extends Q{constructor(t){super(),this.inner=t,this.j=void 0}O(t){if(null!=t)return this.inner.A(t)?this.inner.O(t):void 0}M(t,n,e){return null==t||this.inner.M(t,n,e)}A(t){return null==t||this.inner.A(t)}},K=class extends Q{constructor(t=""){super(),this.j=t}O(t){return"string"==typeof t?t:this.j}M(t,n,e){return"string"==typeof t||(null==n||n.errors.push(q(null!=e?e:[])+": expected string, got "+typeof t),!1)}},Y=class extends Q{constructor(t=0){super(),this.j=t}O(t){return"number"==typeof t&&isFinite(t)?t:this.j}M(t,n,e){return!("number"!=typeof t||!isFinite(t))||(null==n||n.errors.push(q(null!=e?e:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},H=class extends Q{constructor(t=!1){super(),this.j=t}O(t){return"boolean"==typeof t?t:this.j}M(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(q(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},$=class extends Q{constructor(t){super(),this.value=t,this.j=t}O(t){return t===this.value?this.value:this.j}M(t,n,e){return t===this.value||(null==n||n.errors.push(q(null!=e?e:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},tt=class extends Q{constructor(t,n){super(),this.values=t,this.j=null!=n?n:t[0]}O(t){return this.values.includes(t)?t:this.j}M(t,n,e){return!!this.values.includes(t)||(null==n||n.errors.push(q(null!=e?e:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},nt=class extends Q{constructor(t,n){super(),this.S=t,this.N="union",this.j=null!=n?n:t[0].j}O(t){for(const n of this.S)if(n.M(t))return n.O(t);return this.j}M(t,n,e){var r;const o=n&&{errors:[],warnings:[],P:n.P};return!!this.S.some(n=>n.M(t,o,e?[...e]:void 0))||(null==n||n.errors.push(q(null!=e?e:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}A(t){return this.S.some(n=>n.A(t))}},et=class extends Q{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e].j;this.j=n}O(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e={};for(const t of Object.keys(this._shape))e[t]=this._shape[t].O(n[t]);return e}M(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(q(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].M(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.P)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),n.errors.push(q(o)+": unexpected extra key"),o.pop(),i=!1);return i}A(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},rt=class extends Q{constructor(t,n){super(),this._shape=t,this.C=n;const e={};for(const n of Object.keys(t))e[n]=t[n].j;this.j=e}O(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e=a({},n);for(const t of Object.keys(this._shape))e[t]=this._shape[t].O(n[t]);if(this.C)for(const t of Object.keys(n))t in this._shape||(e[t]=this.C.O(n[t]));return e}M(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(q(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].M(r[t],n,o)||(i=!1),o.pop();if(this.C)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.C.M(r[t],n,o)||(i=!1),o.pop());return i}A(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},ot=class extends Q{constructor(t){super(),this.item=t,this.j=[]}O(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item.A(e)&&n.push(this.item.O(e));return n}M(t,n,e){if(!Array.isArray(t))return null==n||n.errors.push(q(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.M(t[e],n,r)||(o=!1),r.pop();return o}A(t){return Array.isArray(t)}},it=class extends Q{constructor(t){super(),this.value=t,this.N="record",this.j={}}O(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value.A(r)&&(n[e]=this.value.O(r));return n}M(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(q(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.M(i,n,r)||(o=!1),r.pop();return o}A(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},lt=class extends Q{constructor(t,n){super(),this.fn=t,this.j=n,this._=null}get schema(){var t;return null!=(t=this._)?t:this._=this.fn()}O(t){return this.schema.O(t)}M(t,n,e){return this.schema.M(t,n,e)}A(t){return this.schema.A(t)}},st=class extends Q{constructor(t){super(),this.S=t,this.N="tuple",this.j=t.map(t=>t.j)}O(t){return Array.isArray(t)&&t.length===this.S.length?this.S.map((n,e)=>n.O(t[e])):this.j}M(t,n,e){if(!Array.isArray(t)||t.length!==this.S.length)return null==n||n.errors.push(q(null!=e?e:[])+": expected tuple of length "+this.S.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.S.length;e++)r.push("["+e+"]"),this.S[e].M(t[e],n,r)||(o=!1),r.pop();return o}A(t){return Array.isArray(t)&&t.length===this.S.length}},ut=(t="")=>new K(t),ct=(t=0)=>new Y(t),at=(t=!1)=>new H(t),ft=t=>new $(t),dt=(t,n)=>new tt(t,n),vt=(t,n)=>new nt(t,n),yt=t=>new et(t),pt=(t,n)=>new rt(t,n),mt=t=>new ot(t),ht=t=>new it(t),bt=t=>new st(t),gt=(t,n)=>new lt(t,n),wt="data-px-animation-src",At="_px_animator",kt={auto:"auto",waapi:"waapi",frames:"frames"},Mt={waapi:kt.waapi,frames:kt.frames},jt={before:"before",after:"after"},xt="userSpaceOnUse",Ot="objectBoundingBox",St={separate:"separate",combined:"combined"},Nt="text",zt="textContent",Pt=new Set(["type","children","animator","meta","animate","effects",Nt,zt]),Ct={linear:"linear",radial:"radial"};function _t(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=Tt.get(t);if(e)return e;const r=t,{timeline:o}=r,i=d(r,["timeline"]);if("scroll"===n.type||"view"===n.type){i.h="scroll",void 0!==n.duration&&(i.duration=n.duration),void 0!==n.iterations&&(i.iterations=n.iterations);const t=a({},i.scroll||{});t.kind=n.type,void 0!==n.T&&(t.driver=n.T),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,{onFinish:e}=t,r=d(t,["onFinish"]);Object.keys(r).length&&(i.trigger=r),void 0!==e&&(i.L="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.fill&&(i.fill=n.fill)}return Tt.set(t,i),i}(e):void 0}var Tt=new WeakMap;function Lt(t){var n;if(t)return null==(n=_t(t))?void 0:n.definitions}var It,Dt=vt([ut(),bt([ct(),ct(),ct(),ct()])]),Ft=vt([ut(),ct(),mt(ct()),yt({path:ut()}),gt(()=>yt({paths:mt(Mn)}),{paths:[]}),gt(()=>mt(vn),[]),gt(()=>Bt,{})]),Vt=yt({time:ct().optional(),value:Ft.optional(),easing:Dt.optional(),tangentOut:bt([ct(),ct()]).optional(),tangentIn:bt([ct(),ct()]).optional()}),Rt=yt({segmentCount:ct().optional(),extend:dt([jt.before,jt.after]).optional(),alternate:at().optional()}),Ut=yt({value:Ft.optional(),keyframes:mt(Vt).optional(),loop:vt([Rt,at()]).optional(),autoOrient:at().optional()}),Bt=yt({translate:bt([ct(),ct()]).optional(),rotate:ct().optional(),skew:ct().optional(),scale:bt([ct(),ct()]).optional(),origin:bt([ct(),ct()]).optional()}),Et=(vt([ut(),Bt,yt({value:Bt}),Ut]),ht(Ut)),Zt=vt([ut(),mt(vt([ut(),Et])),Et]),Gt=yt({startOn:dt(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:dt(["continue","pause","reset","reverse"]).optional(),onFinish:dt(["hold","reset"]).optional(),scrollIntoViewThreshold:ct().optional()}),Wt=yt({width:ct(),d:ut()}),Xt=yt({fontFamily:ut(),fontStyle:ut(),ascent:ct(),unitsPerEm:ct(),glyphs:ht(Wt)}),qt=yt({easings:ht(bt([ct(),ct(),ct(),ct()])).optional(),animations:ht(Et).optional(),styles:ht(ht(vt([ut(),ct()]))).optional(),glyphs:ht(Xt).optional()}),Qt=yt({phase:dt(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:ct().optional()}),Jt=yt({start:Qt.optional(),end:Qt.optional()}),Kt=(yt({driver:dt(["custom","native"]).optional(),kind:dt(["view","scroll"]).optional(),axis:dt(["block","inline","x","y"]).optional(),source:dt(["nearest","root"]).optional(),subject:ut().optional(),smoothing:ct().optional(),pin:at().optional(),pinAlign:dt(["top","center","bottom"]).optional(),pinTop:ct().optional(),pinDistance:ct().optional(),range:Jt.optional()}),yt({align:dt(["top","center","bottom"]).optional(),top:ct().optional(),distance:ct().optional()})),Yt=yt({type:ft("clock"),duration:ct().optional(),trigger:Gt.optional(),delay:ct().optional(),iterations:vt([ct(),ft("infinite")]).optional(),fill:dt(["forwards","backwards","both","none"]).optional(),direction:dt(["normal","reverse","alternate","alternate-reverse"]).optional()}),Ht={duration:ct().optional(),iterations:ct().optional(),T:dt(["custom","native"]).optional(),axis:dt(["block","inline","x","y"]).optional(),source:dt(["nearest","root"]).optional(),subject:ut().optional(),smoothing:ct().optional(),pin:vt([at(),Kt]).optional(),range:Jt.optional()},$t=(It=[Yt,yt(a({type:ft("scroll")},Ht)),yt(a({type:ft("view")},Ht))],new class extends Q{constructor(t,n,e){super(),this.I=t,this.D=n,this.N="discriminatedUnion",this.j=null!=e?e:n[0].j,this.F=new Map;for(const e of n){const n=e._shape[t];n&&this.F.set(n.j,e)}}V(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const n=t[this.I];return null!=n?this.F.get(n):void 0}O(t){var n;return(null!=(n=this.V(t))?n:this.D[0]).O(t)}M(t,n,e){const r=this.V(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this.I];return null==n||n.errors.push(q(null!=e?e:[])+": no discriminated union member matched "+this.I+"="+JSON.stringify(r)),!1}return r.M(t,n,e)}A(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const n=this.V(t);return n?n.A(t):this.D[0].A(t)}}("type",It)),tn=yt({mode:dt([kt.auto,kt.waapi,kt.frames]).optional(),frameRate:ct().optional(),timeline:$t.optional(),definitions:qt.optional(),animateById:ht(Zt).optional(),debugInstName:ut().optional()}),nn=(yt({id:ut(),animate:Zt}),vt([ut(),ct(),mt(ct()),yt({value:new class extends Q{constructor(){super(...arguments),this.j=void 0}O(t){return t}M(t,n,e){return void 0!==t||(null==n||n.errors.push(q(null!=e?e:[])+": required value is missing"),!1)}A(t){return void 0!==t}}}),Bt])),en=vt([ct(),Ut,yt({value:ct()})]),rn=vt([bt([ct(),ct()]),Ut,yt({value:bt([ct(),ct()])})]),on=vt([ut(),Ut,yt({value:ut()})]),ln=yt({translate:rn.optional(),rotate:en.optional(),scale:rn.optional(),skew:en.optional(),origin:rn.optional()}),sn=yt({copies:ct().optional(),translate:rn.optional(),rotate:en.optional(),skew:en.optional(),scale:rn.optional(),origin:rn.optional()}),un=yt({sourceId:ut().optional(),maskType:dt(["luminance","alpha"]).optional(),maskUnits:dt([xt,Ot]).optional(),maskContentUnits:dt([xt,Ot]).optional(),x:ct().optional(),y:ct().optional(),width:ct().optional(),height:ct().optional()}),cn=yt({d:on.optional()}),an=yt({offset:en.optional(),range:rn.optional(),subPaths:dt([St.separate,St.combined]).optional()}),fn=yt({start:ct().optional(),stretch:ct().optional(),timeCrop:bt([ct(),ct()]).optional()}),dn=yt({type:dt(["content"]).optional(),sourceId:ut().optional(),retime:fn.optional()}),vn=yt({offset:ct(),color:ut()}),yn=vt([mt(vn),yt({value:mt(vn)}),Ut]),pn=yt({type:dt([Ct.linear,Ct.radial]),start:rn.optional(),end:rn.optional(),center:rn.optional(),radius:en.optional(),focal:rn.optional(),stops:yn.optional(),gradientUnits:dt(["userSpaceOnUse","objectBoundingBox"]).optional(),spreadMethod:dt(["pad","reflect","repeat"]).optional(),gradientTransform:ut().optional()}),mn=pn,hn=yt({path:ut(),pathOverflow:dt(["clip","extend"]).optional(),lengthAdjust:dt(["spacing","spacingAndGlyphs"]).optional(),method:dt(["align","stretch"]).optional(),spacing:dt(["auto","exact"]).optional(),startOffset:en.optional(),textLength:en.optional()}),bn=yt({useGlyphs:at().optional()}),gn=yt({transformBy:ln.optional(),repeater:sn.optional(),maskedBy:un.optional(),clipPath:cn.optional(),strokeTrim:an.optional(),clone:dn.optional(),fillGradient:pn.optional(),strokeGradient:mn.optional(),textPath:hn.optional(),text:bn.optional()}),wn=pt({type:ut(),id:ut().optional(),meta:(new class extends Q{constructor(){super(...arguments),this.j=void 0}O(t){return t}M(t,n,e){return!0}A(t){return!0}}).optional(),effects:gn.optional(),animate:Zt.optional(),style:vt([ut(),ht(vt([ut(),ct()]))]).optional()},nn),An=pt(f(a({},wn._shape),{children:gt(()=>mt(An),[]).optional()}),nn),kn=yt({width:vt([ct(),ut()]).optional(),height:vt([ct(),ut()]).optional(),viewBox:ut().optional(),animator:tn.optional()}),Mn=(pt(f(a(a({},wn._shape),kn._shape),{type:ft("svg"),children:mt(An).optional()}),nn),yt({v:mt(mt(ct())),i:mt(mt(ct())).optional(),o:mt(mt(ct())).optional(),c:at().optional()})),jn=0;function xn(){return"_px_"+Date.now().toString(36)+(++jn).toString(36)+Math.random().toString(36).substring(2,6)}function On(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>On(t));const n=t,e={};for(const t of Object.keys(n))e[t]=On(n[t]);return e}function Sn(t){var n,e;const r=On(t),o=new Map,i=new Set(["href","xlink:href"]),l=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["sourceId","targetId","boundElementId"]);!function t(n){if(n&&"object"==typeof n){if(n.id&&"string"==typeof n.id){const t=n.id,e=xn();o.set(t,e),n.id=e}else n.animate&&(n.id=xn());if(Array.isArray(n.children))for(const e of n.children)t(e)}}(r),function t(n){if(n&&"object"==typeof n)for(const[e,r]of Object.entries(n))if("children"!==e)if("string"==typeof r)if(i.has(e)&&r.startsWith("#")){const t=r.slice(1),i=o.get(t);i&&(n[e]="#"+i)}else if(l.has(e))n[e]=Nn(r,o);else if(s.has(e)){const t=r.startsWith("#"),i=o.get(t?r.slice(1):r);i&&(n[e]=t?"#"+i:i)}else r.includes("url(#")&&(n[e]=Nn(r,o));else if("style"===e&&"object"==typeof r&&null!==r)for(const[t,n]of Object.entries(r))"string"==typeof n&&(r[t]=Nn(n,o));else"object"==typeof r&&null!==r&&t(r);else if(Array.isArray(r))for(const n of r)t(n)}(r);const u=null==(n=r.animator)?void 0:n.animateById;if(u&&"object"==typeof u){const t={};for(const[n,r]of Object.entries(u)){const i=n.startsWith("#"),l=i?n.slice(1):n,s=null!=(e=o.get(l))?e:l;t[i?"#"+s:s]=r}r.animator=f(a({},r.animator),{animateById:t})}return r}function Nn(t,n){return t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t})}var zn=new Set(["script","foreignobject"]),Pn=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Cn=new Set(["href","xlink:href","src"]),_n=new Set(["mixBlendMode","isolation"]),Tn=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Ln=/^data:image\/svg\+xml(?:;[^,]*)?,/i,In=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Dn=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Fn(t,n){const e=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(e)){if("fill"===e||"stroke"===e||"stopcolor"===e){const t=String(n);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+e+'" blocked: url() must be internal url(#id), got:',n):n}if(Pn.has(e)){const t=String(n);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||Cn.has(e)&&(Tn.test(t)||Ln.test(t)||function(t){const n=In.exec(t);return!!n&&Dn.some(t=>n[1].startsWith(t))}(t))?n:void console.warn('Attribute "'+e+'" blocked: must be #id, url(#id), or data:image/… URI, got:',n)}return n}console.warn("Attribute blocked (event handler / dangerous): ",e)}function Vn(t){var n;const e=null!=(n=t.value)?n:t.v;if(!e)return;if(Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1])return[e[0],e[1]];const r=e.translate;return Array.isArray(r)&&r.length>=2?[r[0],r[1]]:void 0}function Rn(t){var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0}function Un(t){var n;return null!=(n=t.easing)?n:t.e}function Bn(t){var n,e;const r=t.keyframes;if(!Array.isArray(r))return!1;if(t.autoOrient)return!0;for(const t of r)if((null!=(n=t.tangentIn)?n:t.ti)||(null!=(e=t.tangentOut)?e:t.to))return!0;return!1}var En=new WeakMap;function Zn(t,n,e,r){var o,i;let l=En.get(t);const s=null==l?void 0:l.get(n);if(s)return s;const u=null!=(o=t.tangentOut)?o:t.to,c=null!=(i=n.tangentIn)?i:n.ti,a=[e[0]+(u?u[0]:0),e[1]+(u?u[1]:0)],f=[r[0]+(c?c[0]:0),r[1]+(c?c[1]:0)],d=E(e,a,f,r),v={P0:e,P1:a,P2:f,P3:r,R:d,U:d.ds[d.ds.length-1]};return l||(l=new WeakMap,En.set(t,l)),l.set(n,v),v}var Gn=.5,Wn=5,Xn=32;function qn(t,n){var e,r,o;if(!Bn(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const l=!!t.autoOrient,s=null!=(e=null==n?void 0:n.B)?e:Gn,u=null!=(r=null==n?void 0:n.Z)?r:Wn,c=null!=(o=null==n?void 0:n.G)?o:Xn,a=[],f=Vn(i[0]);if(!f)return t;const d=l?function(t,n){const e=Vn(t),r=Vn(n);if(!e||!r)return 0;const o=Zn(t,n,e,r),i=U(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(Jn(Rn(i[0]),Hn(Kn(i[0]),Kn(i[0]),0,f,d,l)));for(let t=0;t<i.length-1;t++){const n=i[t],e=i[t+1],r=Vn(n),o=Vn(e);r&&o?(l&&t>0&&te(a,n,e,r,o,u),ee(a,n,e,r,o,l,s,u,c)):a.push(Jn(Rn(e),Hn(Kn(e),Kn(e),1,null!=o?o:[0,0],void 0,l)))}const v=Un(i[i.length-1]);v&&(a[a.length-1].e=v),l&&Qn(a);const y={keyframes:a};return void 0!==t.loop&&(y.loop=t.loop),y}function Qn(t){var n;let e;for(const r of t){const t=null!=(n=r.v)?n:r.value;if(!t||"number"!=typeof t.rotate)continue;if(void 0===e){e=t.rotate;continue}let o=t.rotate;for(;o-e>180;)o-=360;for(;o-e<-180;)o+=360;t.rotate=o,e=o}}function Jn(t,n){return{t:t,v:n}}function Kn(t){var n;const e=null!=(n=t.value)?n:t.v;if(e&&"object"==typeof e&&!Array.isArray(e))return e}function Yn(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,l="number"==typeof n[o]?n[o]:0;r[o]=i+(l-i)*e}return r}return e<.5?t:n}function Hn(t,n,e,r,o,i){const l={translate:r},s=new Set;if(t)for(const n of Object.keys(t))s.add(n);if(n)for(const t of Object.keys(n))s.add(t);for(const r of s){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],s=null==n?void 0:n[r];void 0===o&&void 0===s||(l[r]=Yn(o,s,e))}return void 0!==o&&(l.rotate=o+$n(t,n,e)),l}function $n(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=Yn(r,o,e);return"number"==typeof i?i:0}function te(t,n,e,r,o,i){var l;const s=t[t.length-1],u=null!=(l=s.v)?l:s.value,c=null==u?void 0:u.rotate;if("number"!=typeof c)return;const a=Kn(n),f=c-$n(a,a,0),d=Zn(n,e,r,o),v=U(d.P0,d.P1,d.P2,d.P3,0),y=180*Math.atan2(v[1],v[0])/Math.PI,p=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(y,f);if(Math.abs(p)<=i)return;const m=Rn(n),h=Math.min(m+ne,(m+Rn(e))/2),b=Hn(Kn(n),Kn(n),0,r,y,!0);t.push(Jn(h,b))}var ne=.05;function ee(t,n,e,r,o,i,l,s,u){const c=Zn(n,e,r,o),a=Rn(n),f=Rn(e),d=Un(n),v=(y=d)?A([y[1],y[0],y[3],y[2]]):t=>t;var y;const p=Kn(n),m=Kn(e),h=function(t,n,e,r,o){const i=[];re(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),re(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,n)=>t-n);const l=[0];for(const t of i)t>l[l.length-1]+1e-6&&t<.999999&&l.push(t);l.push(1);const s=[],u={W:o-l.length};for(let o=0;o<l.length-1;o++)oe(l[o],l[o+1],s,t,n,e,r,u);return s}(c,i,l,s,u),b=[];for(const t of h){const n=Z(c.R,t),e=F(c.U>0?n/c.U:t,0,1),r={u:F(v(e),0,1),p:e,X:V(c.P0,c.P1,c.P2,c.P3,t)};if(i){const n=U(c.P0,c.P1,c.P2,c.P3,t);r.q=180*Math.atan2(n[1],n[0])/Math.PI}b.push(r)}let g=d,w=0;const k=t.length-1;for(let n=0;n<b.length;n++){const e=b[n],r=w<1?F((e.u-w)/(1-w),0,1):1,{left:o,right:l}=M(g,r),s=0===n?k:t.length-1;o?t[s].e=o:delete t[s].e;const u=a+e.u*(f-a),c=Hn(p,m,e.p,e.X,e.q,i);t.push(Jn(u,c)),g=l,w=e.u}}function re(t,n,e,r,o){const i=n-t,l=e-n,s=i-2*l+(r-e),u=2*(l-i),c=i;if(Math.abs(s)<1e-10){if(Math.abs(u)>1e-10){const t=-c/u;t>1e-6&&t<.999999&&o.push(t)}return}const a=u*u-4*s*c;if(a<0)return;const f=Math.sqrt(a),d=(-u-f)/(2*s),v=(-u+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),v>1e-6&&v<.999999&&o.push(v)}function oe(t,n,e,r,o,i,l,s){const u=(t+n)/2,c=V(r.P0,r.P1,r.P2,r.P3,t),a=V(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=V(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=V(r.P0,r.P1,r.P2,r.P3,u),y=V(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(ie(d,c,a),ie(v,c,a),ie(y,c,a));let m=!0;if(o){const e=U(r.P0,r.P1,r.P2,r.P3,t),o=U(r.P0,r.P1,r.P2,r.P3,n),i=180*Math.atan2(e[1],e[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let u=Math.abs(i-s);u>180&&(u=360-u),u>l&&(m=!1)}p<=i&&m||s.W<=0||f<1e-6?e.push(n):(s.W-=1,oe(t,u,e,r,o,i,l,s),oe(u,n,e,r,o,i,l,s))}function ie(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 l=(t[0]-n[0])*o-(t[1]-n[1])*r;return Math.abs(l)/Math.sqrt(i)}function le(t,n){const e=se(t,n);return null!=e?e:t}function se(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=se(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,e=t.transform;if(e&&"object"==typeof e&&Bn(e)){const o=qn(e,n);o!==e&&(r=f(a({},t),{transform:o}))}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var ue=1;function ce(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=>ce(t[e],n[e]))}function ae(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,l=o[4]||0,s=o[5]||0;e.o[e.o.length-1]=[t,n],e.v.push([l,s]),e.i.push([r,i]),e.o.push([l,s])}else"Z"===r||"z"===r?e.c=!0:console.warn('Unsupported path command "'+r+'"')}return n}function fe(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function de(t){return"string"==typeof t&&void 0!==fe(t)}function ve(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const n=fe(t.path);return n?{paths:ae(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&de(n[0])){const t=[];for(const e of n){const n=fe(e);n&&t.push(...ae(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&de(t[0])){const n=[];for(const e of t){const t=fe(e);t&&n.push(...ae(t))}return{paths:n}}return{paths:t}}return de(t)?{paths:ae(fe(t))}:t}function ye(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 pe(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 me(t,n,e,r){var o,i;return"d"===t?{paths:b(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)}:S.has(t)?h(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?p(n,e,r):N.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?m(n||[],e||[],r):p(+(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],l=null==n?void 0:n[i];if("rotate"===i||"skew"===i)o[i]=p(+(null!=r?r:0),+(null!=l?l:0),e);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=m(r||t,l||t,e)}else o[i]=null!=l?l:r}return o}(n,e,r)}function he(t,n,e,r){var o,i,l,s,u;const c=n.length-1,d=F(null!=(o=e.segmentCount)?o:c,1,c);let v;v=e.extend===jt.before?n.slice(0,d+1):n.slice(c-d);const y=null!=(i=n[0].t)?i:0,p=null!=(l=n[n.length-1].t)?l:0;let m,h;e.extend===jt.before?(m=0,h=y):(m=p,h=r);const b=h-m;if(b<=0)return n;const g=null!=(s=v[0].t)?s:0,w=(null!=(u=v[v.length-1].t)?u:0)-g;if(w<=0)return n;const k=v.map(t=>{var n,e;return{J:(t.t-g)/w,v:t.v,e:t.e,tangentIn:null!=(n=t.tangentIn)?n:t.ti,tangentOut:null!=(e=t.tangentOut)?e:t.to}}),x=Math.floor(b/w),O=b-x*w,S=O/w,N=[],z=e.extend!==jt.before,P=n[n.length-1];let C,_=!1;function T(n,e,r){var o;let i;if(e){i=[];for(let t=k.length-1;t>=0;t--)i.push({J:1-k[t].J,v:k[t].v,e:t>0?j(k[t-1].e):void 0,tangentIn:k[t].tangentOut,tangentOut:k[t].tangentIn})}else i=k;const l=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.J>l+1e-9){const o=i[e-1],s=r.J-o.J,u=(l-o.J)/s,c=o.e?A(o.e)(u):u,a=me(t,o.v,r.v,c),{left:f}=M(o.e,u);return N.length>0&&o.J<=l&&(N[N.length-1].e=f),void N.push({t:n+l*w,v:a,e:void 0})}const s=N.length>0?N[N.length-1]:P,u=z&&0===e&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(n+r.J*w))<1e-9;if(u){if(ce(s.v,r.v)){N.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(C=r.e,_=!0);continue}N.length>0&&(delete s.tangentIn,delete s.tangentOut)}const c={t:n+r.J*w+(u?ue:0),v:r.v,e:e<i.length-1?r.e:void 0};r.tangentIn&&(c.tangentIn=r.tangentIn),r.tangentOut&&(c.tangentOut=r.tangentOut),N.push(c)}}if(e.extend===jt.before){S>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=k.length-1;t>=0;t--)o.push({J:1-k[t].J,v:k[t].v,e:t>0?j(k[t-1].e):void 0,tangentIn:k[t].tangentOut,tangentOut:k[t].tangentIn})}else o=k;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.J<i-1e-9)continue;const l=o[e-1];if(l&&l.J<i-1e-9&&r.J>i+1e-9){const e=r.J-l.J,o=(i-l.J)/e,s=l.e?A(l.e)(o):o,u=me(t,l.v,r.v,s),{right:c}=M(l.e,o);N.push({t:n,v:u,e:c})}const s={t:n+(r.J-i)*w,v:r.v,e:e<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),N.push(s)}}(m,!!e.alternate&&x%2==0,S);for(let t=0;t<x;t++){const n=x-1-t,r=!!e.alternate&&n%2==0;T(m+O+t*w,r)}}else{for(let t=0;t<x;t++){const n=!!e.alternate&&t%2==0;T(m+t*w,n)}if(S>1e-9){const t=!!e.alternate&&x%2==0;T(m+x*w,t,S)}}return e.extend===jt.before?[...N,...n]:_&&n.length>0?[...n.slice(0,-1),f(a({},n[n.length-1]),{e:C}),...N]:[...n,...N]}function be(t,n,e,r){var o,i,l,s,u,c,a;const f=n.keyframes||[],d=[];for(const n of f){const e=null!=(i=null!=(o=n.time)?o:n.t)?i:0;let f=null!=(l=n.value)?l:n.v;const v=null!=(s=n.easing)?s:n.e;"d"===t&&(f=ve(f));const y=L(t)?D(t):t;S.has(y)&&(f=null!=(u=O(f))?u:f);const p={t:e,v:f,e:ye(v,r)},m=null!=(c=n.tangentIn)?c:n.ti,h=null!=(a=n.tangentOut)?a:n.to;m&&(p.tangentIn=m),h&&(p.tangentOut=h),d.push(p)}d.sort((t,n)=>{var e,r;return(null!=(e=t.t)?e:0)-(null!=(r=n.t)?r:0)});const v=n.loop,y=!0===v?{}:v||void 0;return y&&d.length>=2?he(t,d,y,e):d}function ge(t,n,e){const r=n.loop;if(null==r||!1===r)return n;const o=!0===r?{}:r,i=n.keyframes;if(!Array.isArray(i)||i.length<2)return n;const l=L(t)?D(t):t,s=S.has(l),u=i.map(n=>{var e,r,o,i,l,u,c,a;const f=null!=(e=n.t)?e:n.time;let d=null!=(r=n.v)?r:n.value;"d"===t&&(d=ve(d)),s&&(d=null!=(o=O(d))?o:d);const v={t:f,v:d,e:null!=(i=n.e)?i:n.easing};return(null!=(l=n.tangentIn)?l:n.ti)&&(v.tangentIn=null!=(u=n.tangentIn)?u:n.ti),(null!=(c=n.tangentOut)?c:n.to)&&(v.tangentOut=null!=(a=n.tangentOut)?a:n.to),v}),c={keyframes:he(t,u,o,e)};return void 0!==n.autoOrient&&(c.autoOrient=n.autoOrient),c}function we(t,n){const e=Ae(t,n);return null!=e?e:t}function Ae(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Ae(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const e of Object.keys(t)){const o=t[e],i=ge(e,o,n);i!==o&&(r||(r=a({},t)),r[e]=i)}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var ke=0;function Me(t,n=Mt.waapi){const e=_t(t)||{},r=Lt(t),o=e.duration||1e3,i=[],l=(t,e,i)=>{if(!e)return null;const l=function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=pe(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=pe(r,n);t&&e.push(t)}else e.push(t);return e}(e,r);if(0===l.length)return null;const s=function(t,n,e,r=Mt.waapi){const o={};for(const[i,l]of Object.entries(t)){if("transform"===i&&"offsetPath"===l.K&&void 0!==t.offsetDistance)continue;const s=be(i,l,n,e);if(s.length>0){const t={keyframes:s};void 0!==l.autoOrient&&(t.autoOrient=l.autoOrient),void 0!==l.loop&&(t.loop=l.loop),o[i]=r===Mt.waapi&&"transform"===i?qn(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 l,s=-1;for(;null!==(l=o.exec(t));){const t=l[1],o=i.indexOf(t);if(o<0||o<=s)return;s=o;const u=l[2].split(/[\s,]+/).filter(Boolean).map(Number);if(u.some(t=>Number.isNaN(t)))return;if("translate"===t){if(u.length<1||u.length>2)return;r.translate=[u[0],null!=(n=u[1])?n:0]}else if("rotate"===t){if(1!==u.length)return;r.rotate=u[0]}else if("skewX"===t){if(1!==u.length)return;r.skew=u[0]}else{if(u.length<1||u.length>2)return;r.scale=[u[0],null!=(e=u[1])?e:u[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)?a(a({},e),t):t,o=t.transform;if(o&&"object"==typeof o){const n=o;if(Array.isArray(n.keyframes)){const e=f(a({},n),{keyframes:n.keyframes.map(t=>f(a({},t),{value:r(t.value)}))});return void 0!==e.value&&(e.value=r(e.value)),f(a({},t),{transform:e})}return t}const i=Object.keys(t).filter(t=>N.has(t));if(1!==i.length)return t;const l=i[0],s=t[l];if(!s||"object"!=typeof s||!Array.isArray(s.keyframes))return t;const u=f(a({},s),{keyframes:s.keyframes.map(t=>f(a({},t),{value:f(a({},e),{[l]:t.value})}))});void 0!==u.value&&(u.value=f(a({},e),{[l]:u.value}));const c=a({},t);return delete c[l],f(a({},c),{transform:u})}(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(l),i),o,r,n);return 0===Object.keys(s).length?null:{id:t,animate:s}},s=function(t){var n;if(!t)return;const e=null==(n=_t(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(s)for(const t of s){const n=l(t.id,t.animate);n&&i.push(n)}const u=t=>{const n=t.animate;if(n&&Object.keys(n).length>0){const e=t.id||"_px_el_"+ ++ke;t.id=e;const r=l(e,n,t.transform);r&&i.push(r)}if(t.children)for(let n=0;n<t.children.length;n++)u(t.children[n])};if(t.children)for(let n=0;n<t.children.length;n++)u(t.children[n]);return i}function je(t,n,e){var r,o,i,l,s,u,c;const a=n.keyframes||[];if(0===a.length)return null;const{Y:f,H:d}=function(t,n){var e,r;const o=t.length-1;let i=t[0],l=t[o>0?1:0];for(let s=0;s<o;s++){const u=null!=(e=t[s].t)?e:0,c=null!=(r=t[s+1].t)?r:0;if(u<=n&&n<=c){i=t[s],l=t[s+1];break}n>c&&s===o-1&&(i=t[o>0?o-1:0],l=t[o])}return{Y:i,H:l}}(a,e);let v=f===d?0:(g=e,w=null!=(r=f.t)?r:0,(k=null!=(o=d.t)?o:0)===w?0:0+(g-w)/(k-w)*1);var g,w,k;v=F(v,0,1);const M=null!=(i=f.e)?i:f.easing;if(M&&Array.isArray(M))try{v=A(M)(v)}catch(t){}let j=L(t)?D(t):t,O=null;const N=null!=(l=null==f?void 0:f.v)?l:null==f?void 0:f.value,C=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===j)O=b(null!=(u=null==N?void 0:N.paths)?u:Array.isArray(N)?N:[],null!=(c=null==C?void 0:C.paths)?c:Array.isArray(C)?C:[],v).map(t=>y(t)).join("");else if(S.has(j))O=x(h(N||[0,0,0,1],C||[0,0,0,1],v)),j=t;else if("stroke-dasharray"===j)O=m(N||[],C||[],v).join(" "),j=t;else if("transform"!==j||null===N||"object"!=typeof N||Array.isArray(N))"translate"===j?(O="translate("+m(N||[0,0],C||[0,0],v).join(",")+")",j="transform"):"rotate"===j?(O="rotate("+p(+(N||0),+(C||0),v)+")",j="transform"):"scale"===j?(O="scale("+m(N||[1,1],C||[1,1],v).join(",")+")",j="transform"):O=p(+(N||0),+(C||0),v);else{const t=new Set([...N?Object.keys(N):[],...C?Object.keys(C):[]]),e={};for(const n of t){const t=null==N?void 0:N[n],r=null==C?void 0:C[n];if("rotate"===n||"skew"===n)e[n]=p(+(null!=t?t:0),+(null!=r?r:0),v);else if("translate"===n||"scale"===n||"origin"===n){const o="scale"===n?[1,1]:[0,0],i=m(t||o,r||o,v);e[n]=i}}if(Bn(n)){const t=N.translate,r=C.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,n,e,r,o,i){const l=Zn(t,n,e,r),s=0===l.U?o:function(t,n){const e=n*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(e<=0)return r[0];if(e>=o[i])return r[i];let l=1,s=i;for(;l<s;){const t=l+s>>>1;o[t]<e?l=t+1:s=t}const u=o[s-1],c=o[s]-u,a=c>0?(e-u)/c:0;return r[s-1]+a*(r[s]-r[s-1])}(l.R,o),u=V(l.P0,l.P1,l.P2,l.P3,s);if(!i)return{translate:u};const c=U(l.P0,l.P1,l.P2,l.P3,s);return{translate:u,q:180*Math.atan2(c[1],c[0])/Math.PI}}(f,d,[+t[0],+t[1]],[+r[0],+r[1]],v,!!n.autoOrient);e.translate=[o.translate[0],o.translate[1]],void 0!==o.q&&(e.rotate=o.q)}}O=P(e,{l:!1}),j="transform"}return z.has(j)&&"number"==typeof O&&(O=100*O+"%"),{k:j,v:null===O?"":""+O}}function xe(t,n){const e={};for(const[r,o]of Object.entries(t)){const t=je(r,o,n);t&&(e[t.k]=t.v)}return e}function Oe(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Oe);const n={};for(const e of Object.keys(t))n[e]=Oe(t[e]);return n}function Se(t,n){const e=new Map,r=t=>{var o;if("string"==typeof t.id){const r=n();e.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t}),i=t=>{var n;if("string"==typeof t.href&&t.href.startsWith("#")){const n=e.get(t.href.slice(1));n&&(t.href="#"+n)}for(const n of Object.keys(t)){if("children"===n||"effects"===n||"meta"===n||"animate"===n||"href"===n||"id"===n)continue;const e=t[n];"string"==typeof e&&-1!==e.indexOf("url(#")&&(t[n]=o(e))}null==(n=t.children)||n.forEach(i)};return i(t),e}function Ne(t){const n="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(n)?n:0}function ze(t){var n;const e=Ne(t.x),r=Ne(t.y);if(delete t.x,delete t.y,!e&&!r)return t;const o="translate("+e+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const e={type:"g",transform:o,children:null!=(n=t.children)?n:[]};t.children=[e]}else t.transform=o;return t}function Pe(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return Number.isFinite(n)?n:void 0}}function Ce(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function _e(t){if("string"!=typeof t)return;const n=t.trim().split(/[\s,]+/).map(Number);return n.length<4||n.some(t=>!Number.isFinite(t))?void 0:[n[0],n[1],n[2],n[3]]}function Te(t,n,e,r,o,i){if("use"===t.type&&"string"==typeof t.href){const l=Ce(t.href);if(l&&e.has(l)){const s=n.get(l);if(s)return function(t,n,e,r,o,i,l){var s,u,c,d;const v=Oe(n);Se(v,o);const y="symbol"===v.type?_e(v.viewBox):void 0,p=null!=(u=null!=(s=Pe(t.width))?s:null==y?void 0:y[2])?u:l[0],m=null!=(d=null!=(c=Pe(t.height))?c:null==y?void 0:y[3])?d:l[1],h="symbol"===v.type?function(t,n,e,r,o){const i=_e(t.viewBox),l=f(a({},t),{type:"g"});if(delete l.viewBox,delete l.preserveAspectRatio,delete l.width,delete l.height,!i)return l;const[s,u,c,d]=i,v=c>0&&d>0?Math.min(r/c,o/d):1,y=(r-c*v)/2,p=(o-d*v)/2,m=[];0===y&&0===p||m.push("translate("+y+","+p+")"),1!==v&&m.push("scale("+v+")"),0===s&&0===u||m.push("translate("+-s+","+-u+")"),m.length&&(l.transform=m.join(""));const h=n();return e.push({type:"clipPath",id:h,children:[{type:"rect",x:s,y:u,width:c,height:d}]}),l.clipPath="url(#"+h+")",l}(v,o,i,p,m):v,b=Te(h,e,r,o,i,l),g=f(a({},t),{type:"g",children:[b]});return delete g.href,delete g.width,delete g.height,ze(g)}(t,s,n,e,r,o,i)}}if(!t.children)return t;let l=!1;const s=t.children.map(t=>{const s=Te(t,n,e,r,o,i);return s!==t&&(l=!0),s});return l?f(a({},t),{children:s}):t}function Le(t,n,e){const r={};return"translate"===t?r.translate=n:"rotate"===t?r.rotate=n:"skew"===t?r.skew=n:r.scale=n,e&&"translate"!==t&&(r.origin=e),r}function Ie(t){var n,e,r;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const o=t,i=null!=(n=o.keyframes)?n:o.$;if(i){const t={kind:"animated",keyframes:i.map(Fe),autoOrient:o.autoOrient,loop:o.loop},n=null!=(e=o.value)?e:o.v;return void 0!==n&&"animated"===t.kind&&(t.tt=n),t}const l=null!=(r=o.value)?r:o.v;if(void 0!==l)return{kind:"static",value:l}}return{kind:"static",value:t}}function De(t,n,e,r){var o,i,l,s;const u=t=>(null==r?void 0:r.nt)&&null!=t?String(t):t;if("absent"===e.kind)return;if("static"===e.kind)return void(t[n]=u(e.value));const c=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,f=a({},c||{}),d={keyframes:e.keyframes};void 0!==e.loop&&(d.loop=e.loop),void 0!==e.autoOrient&&(d.autoOrient=e.autoOrient),f[n]=d,t.animate=f;const v=null!=(s=null!=(i=e.tt)?i:null==(o=e.keyframes[0])?void 0:o.value)?s:null==(l=e.keyframes[0])?void 0:l.v;void 0!==v&&(t[n]=u(v))}function Fe(t){if(!t||"object"!=typeof t)return t;const n=t;if(void 0===n.t&&void 0===n.v&&void 0===n.e&&void 0===n.to&&void 0===n.ti)return t;const e=a({},n);return void 0===e.time&&void 0!==n.t&&(e.time=n.t),void 0===e.value&&void 0!==n.v&&(e.value=n.v),void 0===e.easing&&void 0!==n.e&&(e.easing=n.e),void 0===e.tangentOut&&void 0!==n.to&&(e.tangentOut=n.to),void 0===e.tangentIn&&void 0!==n.ti&&(e.tangentIn=n.ti),e}function Ve(t,n){const e={value:n};return void 0!==t.time&&(e.time=t.time),void 0!==t.easing&&(e.easing=t.easing),void 0!==t.tangentOut&&(e.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(e.tangentIn=t.tangentIn),e}function Re(t,n,e){if(!n)return t;delete t.transform;let r=t;return r=Be(r,n.origin,!0),r=Ue(r,"scale",n.scale),r=Ue(r,"skew",n.skew),r=Ue(r,"rotate",n.rotate),r=Be(r,n.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}(n.translate)?(r=Be(r,n.origin,!0),r=Ue(r,"translate",n.translate),r=Be(r,n.origin,!1)):r=Ue(r,"translate",n.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function Ue(t,n,e,r){if(void 0===e)return t;const o=Ie(e);if("static"===o.kind)return{type:"g",transform:{value:Le(n,o.value,void 0)},children:[t]};if("animated"===o.kind){const e={keyframes:o.keyframes.map(t=>Ve(t,Le(n,t.value,void 0)))};return o.autoOrient&&(e.autoOrient=!0),void 0!==o.loop&&(e.loop=o.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function Be(t,n,e){if(void 0===n)return t;const r=Ie(n),o=t=>e?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const n={keyframes:r.keyframes.map(t=>Ve(t,{translate:o(t.value)}))};return void 0!==r.loop&&(n.loop=r.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function Ee(t,n){return"_lw_"+n+"_"+t.et++}function Ze(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Ge(t,n){var e;"string"==typeof t.id&&n.set(t.id,t),null==(e=t.children)||e.forEach(t=>Ge(t,n))}var We=Oe;function Xe(t,n,e){var r,o,i;if("use"===t.type&&"content"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.type)){const r=Ze(t.effects.clone.sourceId);"string"==typeof r&&r&&!n.rt.has(r)&&n.rt.set(r,e(r))}null==(i=t.children)||i.forEach(t=>Xe(t,n,e))}function qe(t){const n=/translate\(([^)]*)\)/.exec(t);if(!n)return[0,0];const e=n[1].split(/[\s,]+/).filter(Boolean).map(Number);return[e[0]||0,e[1]||0]}function Qe(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||!!Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}function Je(t,n,e,r){if(!n)return t;const o=Ee(e,"grad"),i=function(t,n){const e={type:t.type===Ct.radial?"radialGradient":"linearGradient",id:n};return t.type===Ct.linear?(Ke(e,"x1","y1",t.start),Ke(e,"x2","y2",t.end)):(Ke(e,"cx","cy",t.center),function(t,n,e){const r=Ie(e);"absent"!==r.kind&&De(t,"r",r,{nt:!0})}(e,0,t.radius),Ke(e,"fx","fy",t.focal)),t.gradientUnits&&(e.gradientUnits=t.gradientUnits),t.spreadMethod&&(e.spreadMethod=t.spreadMethod),t.gradientTransform&&(e.gradientTransform=t.gradientTransform),e.children=function(t){var n,e,r,o;if(!t)return[];const i=Ie(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(Ye):[];const l=i.keyframes;if(!l.length)return[];const s=i.loop;let u=0;for(const t of l){const e=null!=(n=t.value)?n:t.v;Array.isArray(e)&&e.length>u&&(u=e.length)}if(!u)return[];const c=null!=(e=l[0].value)?e:l[0].v,a=[];for(let t=0;t<u;t++){const n=null!=(o=null!=(r=null==c?void 0:c[t])?r:He(l,0,t))?o:{offset:t/Math.max(1,u-1),color:"#000000"};a.push({offset:n.offset,color:n.color})}return a.map((t,n)=>function(t,n,e,r,o){var i,l,s,u,c;const a=[],f=[];let d=!1;for(const r of n){const o=null!=(l=null!=(i=r.time)?i:r.t)?l:0,v=null!=(s=r.value)?s:r.v,y=null!=(u=null==v?void 0:v[e])?u:He(n,n.indexOf(r),e);if(!y)continue;const p=null!=(c=r.easing)?c:r.e,m={time:o,value:y.color};void 0!==p&&(m.easing=p),a.push(m);const h={time:o,value:y.offset};void 0!==p&&(h.easing=p),f.push(h),y.offset!==t.offset&&(d=!0)}const v={type:"stop",offset:$e(t.offset),stopColor:t.color},y={};return a.length&&(y.stopColor={keyframes:a},void 0!==o&&(y.stopColor.loop=o)),d&&f.length&&(y.offset={keyframes:f},void 0!==o&&(y.offset.loop=o)),Object.keys(y).length&&(v.animate=y),v}(t,l,n,0,s))}(t.stops),e}(n,o);return e.defs.push(i),t[r]="url(#"+o+")",t}function Ke(t,n,e,r){var o,i,l;const s=Ie(r);if("absent"===s.kind)return;if("static"===s.kind)return t[n]=String(s.value[0]),void(t[e]=String(s.value[1]));const u=t=>{const n={keyframes:s.keyframes.map(n=>{const e={time:n.time,value:Array.isArray(n.value)?n.value[t]:void 0};return void 0!==n.easing&&(e.easing=n.easing),e})};return void 0!==s.loop&&(n.loop=s.loop),n},c=null!=(o=t.animate)?o:{};c[n]=u(0),c[e]=u(1),t.animate=c;const a=null!=(l=s.tt)?l:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(a)&&(t[n]=String(a[0]),t[e]=String(a[1]))}function Ye(t){return{type:"stop",offset:$e(t.offset),stopColor:t.color}}function He(t,n,e){var r,o;for(let o=n;o>=0;o--){const n=null!=(r=t[o].value)?r:t[o].v;if(null==n?void 0:n[e])return n[e]}for(let r=n+1;r<t.length;r++){const n=null!=(o=t[r].value)?o:t[r].v;if(null==n?void 0:n[e])return n[e]}}function $e(t){return Math.round(1e3*t)/10+"%"}function tr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function nr(t,n,e){if(!n)return t;const r=function(t,n){var e;const r=Ie(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(n.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(e=r.keyframes[0])?void 0:e.value)}(n.origin,e);let o=t;return o=er(o,"translate",n.translate,void 0),o=er(o,"rotate",n.rotate,r),o=er(o,"scale",n.scale,r),o}function er(t,n,e,r,o){if(void 0===e)return t;const i=Ie("scale"===n&&Array.isArray(e)?[e[0]/100,e[1]/100]:e);if("static"===i.kind)return{type:"g",transform:{value:Le(n,rr(n,i.value),r)},children:[t]};if("animated"===i.kind){const e={keyframes:i.keyframes.map(t=>{const e=Ve(t,Le(n,rr(n,t.value),r));return"translate"===n?a(a({},e),or(t)):e})};return void 0!==i.loop&&(e.loop=i.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function rr(t,n){return"translate"===t?[-n[0],-n[1]]:"rotate"===t?-n:[1/n[0],1/n[1]]}function or(t){var n,e;const r={},o=null!=(n=t.tangentOut)?n:t.to,i=null!=(e=t.tangentIn)?e:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function ir(t){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!n||!n.transform)}function lr(t){let n=0,e=0;for(const r of t)r.translate&&(n+=r.translate[0],e+=r.translate[1]);return[n,e]}function sr(t,n){let e=0,r=0;for(const o of t)if(o.ot&&o.ot.length){const t=ur(o.ot,n);e+=t[0],r+=t[1]}else o.translate&&(e+=o.translate[0],r+=o.translate[1]);return[e,r]}function ur(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function cr(t,n){var e,r,o;const i=t.transform,l=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!l)return;const s={};if("string"==typeof i){const t=function(t,n){const e=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,l=!1,s=!1;for(;null!==(r=e.exec(t));){const t=r[1],n=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=n[0]||0,i+=n[1]||0,l=!0):s=!0}return s&&n.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),l?[o,i]:void 0}(i,n);t&&(s.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes&&!i.$){const t=i.value,e=t&&"object"==typeof t?t:i;e&&"object"==typeof e&&Array.isArray(e.translate)&&(s.translate=[e.translate[0]||0,e.translate[1]||0]),!e||void 0===e.rotate&&void 0===e.scale&&void 0===e.skew||n.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(l&&Array.isArray(l.keyframes)){const t=l.keyframes,i=[];for(const l of t){const t=null!=(e=l.value)?e:l.v,s=null!=(o=null!=(r=l.time)?r:l.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:s,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||n.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(s.ot=i)}return s.translate||s.ot?s:void 0}var ar="content";function fr(t,n,e){if(!n)return;const r=Ze(n.sourceId);if(!r)return void(n.type===ar&&e.errors.push("clone: content ref missing sourceId"));const o=n.type===ar&&e.rt.get(r)||r;t.href="#"+o}function dr(t,n){const e={};return void 0!==t.translate&&(e.translate=vr(t.translate,t=>[t[0]*n,t[1]*n])),void 0!==t.rotate&&(e.rotate=vr(t.rotate,t=>t*n)),void 0!==t.skew&&(e.skew=vr(t.skew,t=>t*n)),void 0!==t.scale&&(e.scale=function(t,n){return vr(t,t=>[Math.pow(t[0],n),Math.pow(t[1],n)],!0)}(t.scale,n)),void 0!==t.origin&&(e.origin=t.origin),Object.keys(e).length?e:void 0}function vr(t,n,e=!1){const r=Ie(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=n(r.value);return"number"!=typeof t&&!Array.isArray(t)||e?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?f(a({},t),{value:n(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.tt&&(o.value=n(r.tt)),o}var yr=!1;function pr(t){var n,e;return{start:null!=(n=t.start)?n:0,stretch:null!=(e=t.stretch)?e:1}}var mr=1;function hr(t,n,e){const[r,o]=n;if(!Number.isFinite(r)||!Number.isFinite(o))return void e.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-mr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+mr,value:0}],l=a({},t);for(const n of Object.keys(t))delete t[n];t.type="g",t.children=[l],t.animate={opacity:{keyframes:i}}}function br(t,n){return{start:n.start+n.stretch*t.start,stretch:n.stretch*t.stretch}}function gr(t){var n,e;return null==(e=null==(n=t.effects)?void 0:n.clone)?void 0:e.retime}function wr(t){var n;const e=null==(n=t.effects)?void 0:n.clone;e&&(delete e.retime,0===Object.keys(e).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function Ar(t,n,e){const r=Ze(t.href);if(!r)return void e.errors.push("retime: <use> has no href to follow");const o=kr(r,n,e,new Set);if(o)if(yr){const n=e.it.get(o);t.type="g",delete t.href,t.children=[n],ze(t),e.defs=e.defs.filter(t=>t!==n)}else t.href="#"+o}function kr(t,n,e,r){if(r.has(t))return void e.errors.push('retime: loop via "'+t+'"');const o=e.it.get(t);if(!o)return void e.warnings.push('retime: target "'+t+'" not found');const i=We(o);if(function(t,n){Se(t,()=>Ee(n,"retimed"))}(i,e),"use"===o.type?jr(i,n.start,n.stretch):Mr(i,n.start,n.stretch),wr(i),"use"===o.type&&o.href){const l=Ze(o.href);if(l){const s=gr(o),u=s?br(pr(s),n):n,c=new Set(r);c.add(t);const a=kr(l,u,e,c);a&&(i.href="#"+a)}}else!function(t,n,e,r,o){const i=t=>{var l;const s=gr(t);if("use"===t.type&&s&&t.href){const i=Ze(t.href);if(i){const l=br(pr(s),n),u=new Set(r);u.add(o);const c=kr(i,l,e,u);c&&(t.href="#"+c)}wr(t)}null==(l=t.children)||l.forEach(i)};i(t)}(i,n,e,r,t);return e.defs.push(i),"string"==typeof i.id&&e.it.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Mr(t,n,e){var r;jr(t,n,e),null==(r=t.children)||r.forEach(t=>Mr(t,n,e))}function jr(t,n,e){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=n+r.time*e)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const n of Object.keys(t.animate)){const e=t.animate[n];e&&Array.isArray(e.keyframes)&&r(e.keyframes)}}var xr=48,Or=/[MmLlHhVvCcSsQqTtAaZz]/;function Sr(t,n,e){return{P1:[t[0]+2/3*(n[0]-t[0]),t[1]+2/3*(n[1]-t[1])],P2:[e[0]+2/3*(n[0]-e[0]),e[1]+2/3*(n[1]-e[1])]}}function Nr(t){const n=function(t){const n=function(t){const n=[],e=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=e.exec(t));)n.push(r[0]);return n}(t),e=[];let r=0,o=0,i=0,l=0,s=0,u=0,c=0,a=0,f=0,d="";const v=()=>parseFloat(n[r++]),y=(t,n,r)=>{const l=[o,i],s=E(l,t,n,r,xr);e.push({P0:l,P1:t,P2:n,P3:r,R:s,lt:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},p=(t,n)=>{y([o+(t-o)/3,i+(n-i)/3],[o+2*(t-o)/3,i+2*(n-i)/3],[t,n])};for(;r<n.length;){let t=n[r];Or.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const e=t>="a",m=t.toUpperCase();if("Z"!==m){if("M"===m){const n=v()+(e?o:0),r=v()+(e?i:0);o=n,i=r,l=n,s=r,d=t;continue}if("L"===m)p(v()+(e?o:0),v()+(e?i:0));else if("H"===m)p(v()+(e?o:0),i);else if("V"===m)p(o,v()+(e?i:0));else if("C"===m){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];u=n[0],c=n[1],y(t,n,r)}else if("S"===m){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-u,2*i-c]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];u=n[0],c=n[1],y(t,n,r)}else if("Q"===m){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:l}=Sr([o,i],t,n);y(r,l,n)}else if("T"===m){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-a,2*i-f]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:l}=Sr([o,i],t,n);y(r,l,n)}else{if("A"!==m){r++;continue}r+=5,p(v()+(e?o:0),v()+(e?i:0))}d=t}else p(l,s),o=l,i=s,d=t}return e.length?e:null}(t);if(!n)return null;const e=new Float64Array(n.length+1);for(let t=0;t<n.length;t++)e[t+1]=e[t]+n[t].lt;const r=e[n.length],o=n[0].P0,i=n[n.length-1].P3,l=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,s=t=>{let r=0;for(;r<n.length-1&&t>e[r+1];)r++;const o=n[r],i=t-e[r],l=o.lt>0?function(t,n){const{ts:e,ds:r}=t,o=r.length-1;if(n<=0)return e[0];if(n>=r[o])return e[o];let i=1,l=o;for(;i<l;){const t=i+l>>>1;r[t]<n?i=t+1:l=t}const s=r[l-1],u=r[l]-s,c=u>0?(n-s)/u:0;return e[l-1]+c*(e[l]-e[l-1])}(o.R,i):0,[s,u]=V(o.P0,o.P1,o.P2,o.P3,l),[c,a]=U(o.P0,o.P1,o.P2,o.P3,l);return{x:s,y:u,angle:Math.atan2(a,c)}};return{st:r,closed:l,ut(t){if(l&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!l&&(t<0||t>r)){const n=t<0?0:r,e=s(n),o=t-n;return{x:e.x+Math.cos(e.angle)*o,y:e.y+Math.sin(e.angle)*o,angle:e.angle}}return s((e=r,(n=t)<0?0:n>e?e:n));var n,e}}}var zr=.15;function Pr(t){const n=Ie(t);if("static"===n.kind&&"number"==typeof n.value)return{min:n.value,max:n.value};if("animated"===n.kind&&n.keyframes.length){const t=n.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function Cr(t){let n=0,e=16;const r=t=>{var o,i;const l=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;l&&(e=Math.max(e,l));const s=null!=(i=t.text)?i:t.textContent;if("string"==typeof s&&(n+=s.length),t.children)for(const n of t.children)r(n)};return r(t),n*e}var _r=t=>Math.round(1e3*t)/1e3;function Tr(t,n,e){null!=e&&De(t,n,Ie(e),{nt:!0})}var Lr=(t,n,e)=>{const r={type:t};for(const t in n)void 0!==n[t]&&(r[t]=n[t]);const o=Array.isArray(e)?e.filter(t=>null!=t):null!=e?[e]:[];return o.length&&(r.children=o),r};function Ir(t,n){return Math.round(t)===t?""+Math.round(t):t.toFixed(n)}function Dr(t,n){let e="";for(let r=0;r<t.length;r++){const o=Ir(t[r],n);r>0&&45!==o.charCodeAt(0)&&(e+=" "),e+=o}return e}function Fr(t,n,e){return[t[0]*n+t[2]*e+t[4],t[1]*n+t[3]*e+t[5]]}var Vr=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function Rr(t,n,e=2){const r=[];let o;for(Vr.lastIndex=0;null!==(o=Vr.exec(t));)r.push(o[0]);let i="",l=0;const s=()=>parseFloat(r[l++]);for(;l<r.length;){const t=r[l++];if("M"===t||"L"===t){const[r,o]=Fr(n,s(),s());i+=t+Dr([r,o],e)}else if("C"===t){const[t,r]=Fr(n,s(),s()),[o,l]=Fr(n,s(),s()),[u,c]=Fr(n,s(),s());i+="C"+Dr([t,r,o,l,u,c],e)}else if("Q"===t){const[t,r]=Fr(n,s(),s()),[o,l]=Fr(n,s(),s());i+="Q"+Dr([t,r,o,l],e)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var Ur=16,Br=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Nt,zt,"xml:space"],Er=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],Zr=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function Gr(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return isNaN(n)?void 0:n}}function Wr(t){return"string"==typeof t?t:void 0}function Xr(t){const n=t.animate;if(!n||"object"!=typeof n)return;let e;for(const t of Zr)void 0!==n[t]&&((null!=e?e:e={})[t]=n[t]);return e}function qr(t,n){var e,r,o,i,l,s,u,c,a,f;const d="text"===t.type,v=t.style,y=n=>{var e;return d?void 0:null!=(e=t[n])?e:null==v?void 0:v[n]},p={fontFamily:null!=(e=Wr(t.fontFamily))?e:n.fontFamily,fontSize:null!=(r=Gr(t.fontSize))?r:n.fontSize,fill:null!=(o=t.fill)?o:n.fill,stroke:null!=(i=t.stroke)?i:n.stroke,strokeWidth:null!=(l=t.strokeWidth)?l:n.strokeWidth,letterSpacing:null!=(s=Gr(t.letterSpacing))?s:n.letterSpacing,wordSpacing:null!=(u=Gr(t.wordSpacing))?u:n.wordSpacing,opacity:null!=(c=Gr(y("opacity")))?c:n.opacity,animate:null!=(a=d?void 0:Xr(t))?a:n.animate};for(const t of Er){const e=null!=(f=y(t))?f:n[t];void 0!==e&&(p[t]=e)}return p}function Qr(t){var n,e,r;return{fontFamily:Wr(t.fontFamily),fontSize:null!=(n=Gr(t.fontSize))?n:Ur,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(e=Gr(t.letterSpacing))?e:0,wordSpacing:null!=(r=Gr(t.wordSpacing))?r:0}}function Jr(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(n.opacity=t.opacity);for(const e of Er)void 0!==t[e]&&(n[e]=t[e]);return void 0!==t.animate&&(n.animate=t.animate),n}function Kr(t,n,e,r){var o;const i=t.fontFamily?n[t.fontFamily]:e;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function Yr(t){const n=Object.keys(t);return 1===n.length?t[n[0]]:void 0}var Hr=.6,$r="px-missing-glyph";function to(t,n){if(t<=0||n<=0)return"";const e=.08*t,r=.92*t,o=.92*-n,i=r-e,l=-o,s=Math.max(1,.12*Math.min(i,l)),u="M"+e+" 0L"+r+" 0L"+r+" "+o+"L"+e+" "+o+"Z";if(i<=2*s||l<=2*s)return u;const c=e+s,a=r-s,f=-s,d=o+s;return u+"M"+c+" "+f+"L"+c+" "+d+"L"+a+" "+d+"L"+a+" "+f+"Z"}function no(t,n,e,r,o=0){const{x:i,y:l,angle:s}=t.ut(n),u=Math.cos(s),c=Math.sin(s),a=r/2;return[e*u,e*c,-e*c,e*u,i-e*u*a-o*c,l-e*c*a+o*u]}function eo(t){var n;const e=Ie(t);if("animated"===e.kind&&e.keyframes.length>=2){const t=[...e.keyframes].sort((t,n)=>(Number(t.time)||0)-(Number(n.time)||0)),n=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,ct:n,loop:e.loop,at(t){if(t<=n[0])return r[0];for(let e=1;e<n.length;e++)if(t<=n[e]){const o=n[e]-n[e-1],i=o>0?(t-n[e-1])/o:1;return r[e-1]+i*(r[e]-r[e-1])}return r[r.length-1]}}}const r="animated"===e.kind?Number(null==(n=e.keyframes[0])?void 0:n.value)||0:"static"===e.kind&&Number(e.value)||0;return{animated:!1,ct:[],at:()=>r}}var ro=48,oo=64;function io(t,n){const e=u(10,n);return Math.round(t*e)/e}function lo(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(n.opacity=t.opacity);for(const e of Er)void 0!==t[e]&&(n[e]=t[e]);return n}function so(t){return t?{ft:$r}:{}}function uo(t,n,e){if(!t.length)return null==e||e.push("textGlyphs: nothing to render"),[];const r=new Map;for(const n of t){const t=JSON.stringify([n.dt,!!n.vt]),e=Rr(n.yt,n.m),o=r.get(t);o?o.d+=e:r.set(t,{dt:n.dt,d:e,vt:n.vt})}const o=[];for(const{dt:t,d:e,vt:i}of r.values())o.push(n("path",a(a(a({d:e},lo(t)),so(i)),void 0!==t.animate?{animate:a({},t.animate)}:{}),[]));return o}function co(t,n,e){const r={};for(const n of Object.keys(t))"type"!==n&&"children"!==n&&-1===Br.indexOf(n)&&(r[n]=t[n]);if(r.style&&"object"==typeof r.style){const t=a({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return e("g",r,n)}function ao(t,n){const e=f(a({},t),{type:"g",children:n});return delete e.d,delete e.strokeDasharray,delete e.strokeDashoffset,delete e.effects,e}function fo(t,n,e,r,o,i,l,s){const u=yo(r,e,o),c=po(e,o),a=ho(i,u),f=ho(l,c),d=wo(l),v={type:"path",d:y(n)};return bo(v,"strokeDasharray",f),bo(v,"strokeDashoffset",a),bo(v,"strokeOpacity",d),[v]}var vo=1;function yo(t,n,e){const[r]=mo(e);return e=>n*(-e-r+t)+vo}function po(t,n){const[e,r]=mo(n),o=r-e+1;return n=>{const e=F(n[0],0,1),r=F(n[1],0,1),i=Math.min(e,r),l=Math.max(e,r),s=[0];let u=vo;for(let n=0;n<o;n++)s.push(u+i*t),s.push((l-i)*t),u=(1-l)*t;return s.push(u+vo),s}}function mo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function ho(t,n){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:n(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>{var e,r,o,i;return{time:null!=(r=null!=(e=t.time)?e:t.t)?r:0,value:n(null!=(o=t.value)?o:t.v),easing:null!=(i=t.easing)?i:t.e}}),loop:t.loop}}function bo(t,n,e){e&&De(t,n,e)}var go=10;function wo(t){var n,e,r,o,i,l;const s=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return s(t.value)?{kind:"static",value:0}:void 0;const u=t.keyframes;let c=!1,a=!0;for(const t of u)s(null!=(n=t.value)?n:t.v)?c=!0:a=!1;if(!c)return;if(a)return{kind:"static",value:0};const f=[];for(let t=0;t<u.length;t++){const n=u[t],c=t>0?u[t-1]:void 0,a=t<u.length-1?u[t+1]:void 0,d=null!=(r=null!=(e=n.time)?e:n.t)?r:0,v=s(null!=(o=n.value)?o:n.v),y=c?v&&s(null!=(i=c.value)?i:c.v):v,p=a?v&&s(null!=(l=a.value)?l:a.v):v;y&&!p?(f.push({time:d,value:0}),f.push({time:d+go,value:1})):!y&&p&&(f.push({time:d-go,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Ao(t,n){const e=e=>{const r=(e-t.time)/(n.time-t.time),o=t.value[0]+(n.value[0]-t.value[0])*r;return t.value[1]+(n.value[1]-t.value[1])*r-o};let r=t.time,o=n.time,i=e(r);if(0===i)return r;const l=e(o);if(0===l)return o;if(i*l>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,n=e(t);if(0===n||Math.abs(o-r)<1e-4)return t;i*n<0?o=t:(r=t,i=n)}return(r+o)/2}function ko(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Mo(t){const n=t.v;if(!n||n.length<2)return 0;let e=0;for(let r=0;r<n.length-1;r++)e+=jo(t,r,r+1);return t.c&&n.length>1&&(e+=jo(t,n.length-1,0)),e}function jo(t,n,e){var r,o,i,l;const s=t.v,u=s[n],c=s[e],a=E(u,null!=(o=null==(r=t.o)?void 0:r[n])?o:u,null!=(l=null==(i=t.i)?void 0:i[e])?l:c,c);return a.ds[a.ds.length-1]}var xo=.5522847498307936;function Oo(t){var n,e;const r={defs:[],warnings:[],errors:[],it:new Map,et:0,rt:new Map,ht:new Map,T:(null==(n=_t(t))?void 0:n.mode)===kt.frames?Mt.frames:Mt.waapi,glyphs:null==(e=Lt(t))?void 0:e.glyphs},o=We(t);Ge(o,r.it),Xe(o,r,()=>Ee(r,"inner")),function(t,n){const e=new Set,r=t=>{var o,i;const l=Ze(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.sourceId);if("string"==typeof l){e.add(t);const r=n.it.get(l);r&&e.add(r)}if(Array.isArray(t.children))for(const n of t.children)r(n)};if(r(t),0===e.size)return;const o=(t,r)=>{if(e.has(t)&&n.ht.set(t,r),Array.isArray(t.children)){const e=cr(t,n),i=e?[...r,e]:r;for(const n of t.children)o(n,i)}};o(t,[])}(o,r);const i=function(t,n){return function(t,n){n.it.clear(),Ge(t,n.it);const e=[],r=t=>{var n;gr(t)&&e.push(t),null==(n=t.children)||n.forEach(r)};r(t);const o=new Map;for(const t of e){let e=0;const r=new Set,i=o=>{var l;if(o){if(o!==t&&gr(o)&&e++,"use"===o.type&&o.href){const t=Ze(o.href);t&&!r.has(t)&&(r.add(t),i(n.it.get(t)))}null==(l=o.children)||l.forEach(i)}},l=Ze(t.href);l&&(r.add(l),i(n.it.get(l))),o.set(t,e)}e.sort((t,n)=>{var e,r;return(null!=(e=o.get(n))?e:0)-(null!=(r=o.get(t))?r:0)});for(const t of e){const e=gr(t);if(!e)continue;const r=e.timeCrop;wr(t),Ar(t,pr(e),n),r&&hr(t,r,n)}}(t,n),t}(So(o,r),r);return function(t,n){n.length&&(t.children||(t.children=[])).unshift({type:"defs",children:n})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function So(t,n){t.children&&(t.children=t.children.map(t=>So(t,n)));const e=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?n.rt.get(r):void 0;if(!e&&!o)return t;const{transformBy:i,repeater:l,maskedBy:s,clipPath:u,strokeTrim:c,clone:d,fillGradient:v,strokeGradient:y,textPath:p,text:m}=null!=e?e:{};e&&delete t.effects;let h=t,b=!1;if(null==m?void 0:m.useGlyphs)if(p){const t="string"==typeof p.path?p.path:void 0,e=function(t,n,e,r,o,i){return n.glyphs?function(t,n,e,r,o,i){const{glyphs:l,create:s=Lr,warnings:u}=r,c=n?Nr(n):null;if(!c)return null==u||u.push("textGlyphs: unparsable along-path geometry"),null;const d=Yr(l),{cells:v,width:y}=function(t,n,e,r){const o=[];let i=0;const l=(t,s)=>{var u,c,a;const f=qr(t,s),d=null!=(u=Wr(t[zt]))?u:Wr(t[Nt]);if(d&&!(null==(c=t.children)?void 0:c.length)){const t=Kr(f,n,e,r);if(t){const n=f.fontSize/t.unitsPerEm,e=null!=(a=t.ascent)?a:.9*t.unitsPerEm,r=Jr(f);for(let l=0;l<d.length;l++){const s=d.charAt(l),u=t.glyphs[s];if(u&&u.d){const t=u.width*n;o.push({yt:u.d,bt:u.width,scale:n,dt:r,gt:i+t/2}),i+=t}else if(/\S/.test(s)){const l=u&&u.width>0?u.width:Hr*t.unitsPerEm,s=l*n;o.push({yt:to(l,e),bt:l,scale:n,dt:r,vt:!0,gt:i+s/2}),i+=s}else i+=(u?u.width:0)*n;i+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const n of t.children)l(n,f)};return l(t,Qr(t)),{cells:o,width:i}}(t,l,d,u);if(!v.length)return co(t,[],s);const{wt:p,At:m}=function(t){var n,e,r;return{wt:(null!=(n=Gr(t.x))?n:0)+(null!=(e=Gr(t.dx))?e:0),At:null!=(r=Gr(t.dy))?r:0}}(t),h=eo(e),b=eo(o),g=t=>t>0&&y>0?t/y:1,w="clip"===i&&!c.closed;if(h.animated||b.animated){const n=function(t,n){const e=[...t,...n].sort((t,n)=>t-n),r=[];for(const t of e)r.length&&t===r[r.length-1]||r.push(t);return r}(h.ct,b.ct),e=(t,n)=>p+h.at(n)+g(b.at(n))*t.gt,r=h.animated?h.loop:b.loop;return co(t,function(t,n,e,r,o,i,l,s=0){const u=Math.max(n.st/ro,.5),c=t=>t>=0&&t<=n.st,d=[];for(const v of t){const t=[v.scale,0,0,v.scale,-v.scale*(v.bt/2),0],y=Rr(v.yt,t),p=(t,e)=>{const{x:r,y:o,angle:i}=n.ut(t),l=Math.cos(i),u=Math.sin(i);return{time:e,value:{translate:[io(r-s*u,3),io(o+s*l,3)],rotate:io(180*i/Math.PI,3)}}},m=[],h=[],b=(t,n)=>{m.push(p(t,n)),l&&h.push({time:n,value:c(t)?1:0})};b(e(v,r[0]),r[0]);for(let t=1;t<r.length;t++){const n=r[t-1],o=r[t],i=e(v,n),l=e(v,o),s=Math.min(oo,Math.max(1,Math.ceil(Math.abs(l-i)/u)));for(let t=1;t<=s;t++){const r=n+t/s*(o-n);b(e(v,r),r)}}Qn(m);const g={keyframes:m};void 0!==o&&(g.loop=o);const w={transform:g};if(v.dt.animate&&Object.assign(w,v.dt.animate),l&&h.some(t=>0===t.value)){const t={keyframes:h};void 0!==o&&(t.loop=o),w.opacity=t}d.push(i("path",f(a(a({d:y},lo(v.dt)),so(v.vt)),{animate:w}),[]))}return d}(v,c,e,n,r,s,w,m),s)}const A=g(b.at(0)),k=p+h.at(0);return co(t,uo((w?v.filter(t=>{const n=k+t.gt*A;return n>=0&&n<=c.st}):v).map(t=>({yt:t.yt,dt:t.dt,vt:t.vt,m:no(c,k+t.gt*A,t.scale,t.bt,m)})),s,u),s)}(t,e,r,{glyphs:n.glyphs,warnings:n.warnings},o,i):(n.warnings.push("textGlyphs: no definitions.glyphs"),null)}(h,n,t,p.startOffset,p.textLength,p.pathOverflow);e&&(h=e,b=!0)}else h=function(t,n,e){return(null==n?void 0:n.useGlyphs)?e.glyphs?function(t,n){var e,r,o,i;const{glyphs:l,create:s=Lr,warnings:u}=n,c=Yr(l),a={x:null!=(e=Gr(t.x))?e:0,y:null!=(r=Gr(t.y))?r:0},f=[],d=[{start:a.x,end:a.x}];let v=0;const y=(t,n)=>{var e;const r=Kr(n,l,c,u),o=(null==r?void 0:r.unitsPerEm)||1e3,i=n.fontSize/o,s=null!=(e=null==r?void 0:r.ascent)?e:.9*o,y=Jr(n);for(let e=0;e<t.length;e++){const l=t.charAt(e),u=null==r?void 0:r.glyphs[l];if(u&&u.d)f.push({yt:u.d,m:[i,0,0,i,a.x,a.y],dt:y,line:v,x:a.x,y:a.y,scale:i}),a.x+=u.width*i;else if(/\S/.test(l)){const t=u&&u.width>0?u.width:Hr*o;f.push({yt:to(t,s),m:[i,0,0,i,a.x,a.y],dt:y,vt:!0,line:v,x:a.x,y:a.y,scale:i}),a.x+=t*i}else a.x+=(u?u.width:0)*i;a.x+=n.letterSpacing+(" "===l?n.wordSpacing:0),d[v].end=a.x}},p=(t,n)=>{var e,r,o,i;const l=qr(t,n),s=Gr(t.x),u=Gr(t.y);void 0!==s&&(a.x=s,v=d.length,d.push({start:a.x,end:a.x})),void 0!==u&&(a.y=u),a.x+=null!=(e=Gr(t.dx))?e:0,a.y+=null!=(r=Gr(t.dy))?r:0;const c=null!=(o=Wr(t[zt]))?o:Wr(t[Nt]);if(c&&!(null==(i=t.children)?void 0:i.length)&&y(c,l),t.children)for(const n of t.children)p(n,l)},m=Qr(t);if(t.children)for(const n of t.children)p(n,m);const h=null!=(o=Wr(t[zt]))?o:Wr(t[Nt]);h&&!(null==(i=t.children)?void 0:i.length)&&y(h,m);const b=Wr(t.textAnchor);if("middle"===b||"end"===b)for(const t of f){const n=d[t.line].end-d[t.line].start,e="middle"===b?-n/2:-n;t.m=[t.scale,0,0,t.scale,t.x+e,t.y]}return co(t,uo(f,s,u),s)}(t,{glyphs:e.glyphs,warnings:e.warnings}):(e.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(h,m,n),b=!0;return b||(h=function(t,n,e){var r;if(!n||"string"!=typeof n.path||!n.path)return t;const o=Ee(e,"tpath"),{d:i,kt:l}=function(t,n){var e;if("clip"===n.pathOverflow)return{d:t,kt:0};const r=Nr(t);if(!r||r.closed||r.st<=0)return{d:t,kt:0};const o=r.st,i=zr*o,l=Pr(n.startOffset),s=Pr(n.textLength).max||(null!=(e=n.advance)?e:0),u=Math.max(0,-l.min),c=Math.max(0,l.max+s-o),a=u>0?u+i:0,f=c>0?c+i:0;if(f<=0&&a<=0)return{d:t,kt:0};const d=r.ut(0),v=r.ut(o);let y=t;if(a>0){const n=d.x-Math.cos(d.angle)*a,e=d.y-Math.sin(d.angle)*a,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");y="M"+_r(n)+","+_r(e)+"L"+_r(d.x)+","+_r(d.y)+r}if(f>0){const t=v.x+Math.cos(v.angle)*f,n=v.y+Math.sin(v.angle)*f;y+="L"+_r(t)+","+_r(n)}return{d:y,kt:a}}(n.path,{pathOverflow:n.pathOverflow,startOffset:n.startOffset,textLength:n.textLength,advance:Cr(t)});e.defs.push({type:"path",id:o,d:i});const s={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==n.lengthAdjust&&(s.lengthAdjust=n.lengthAdjust),void 0!==n.method&&(s.method=n.method),void 0!==n.spacing&&(s.spacing=n.spacing),Tr(s,"startOffset",function(t,n){if(!n||null==t)return t;const e=Ie(t);if("absent"===e.kind)return t;if("static"===e.kind)return"number"==typeof t?e.value+n:{value:e.value+n};const r={keyframes:e.keyframes.map(t=>f(a({},t),{value:(Number(t.value)||0)+n}))};return void 0!==e.loop&&(r.loop=e.loop),void 0!==e.autoOrient&&(r.autoOrient=e.autoOrient),void 0!==e.tt&&(r.value=e.tt+n),r}(n.startOffset,l)),Tr(s,"textLength",n.textLength),t.children=[s],t}(h,p,n)),h=function(t,n,e){return Je(t,n,e,"fill")}(h,v,n),h=function(t,n,e){return Je(t,n,e,"stroke")}(h,y,n),h=function(t,n){if(!n)return t;const e=n.subPaths===St.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const n of t.children)o(n);return}const n="string"==typeof t.d?t.d:function(t){var n,e,r,o,i,l,s,u,c,a;if("rect"===t.type){const i=Number(null!=(n=t.x)?n:0),l=Number(null!=(e=t.y)?e:0),s=Number(null!=(r=t.width)?r:0),u=Number(null!=(o=t.height)?o:0);return"M"+(i+s)+","+l+"L"+(i+s)+","+(l+u)+"L"+i+","+(l+u)+"L"+i+","+l+"L"+(i+s)+","+l+"z"}if("ellipse"===t.type||"circle"===t.type){const n=Number(null!=(i=t.cx)?i:0),e=Number(null!=(l=t.cy)?l:0),r="circle"===t.type?Number(null!=(s=t.r)?s:0):Number(null!=(u=t.rx)?u:0),o="circle"===t.type?Number(null!=(c=t.r)?c:0):Number(null!=(a=t.ry)?a:0);if(!(r>0&&o>0))return;const f=r*xo,d=o*xo,v=(t,n,e,r,o,i)=>"C"+t+","+n+" "+e+","+r+" "+o+","+i;return"M"+(n+r)+","+e+v(n+r,e+d,n+f,e+o,n,e+o)+v(n-f,e+o,n-r,e+d,n-r,e)+v(n-r,e-d,n-f,e-o,n,e-o)+v(n+f,e-o,n+r,e-d,n+r,e)+"z"}}(t);if(void 0===n)return;const e=ae(n);if(!e.length)return;const i={leaf:t,Mt:[]};for(const t of e){const n=Mo(t);i.Mt.push({jt:t,xt:n,Ot:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const l=e?[...r].reverse():r;for(const t of l)for(const n of t.Mt)e||(i=0),n.Ot=i,i+=n.xt;const s=i;if(e&&s<.001)return t;const u=Ie(n.offset),c="absent"===u.kind?{kind:"static",value:0}:u,d=function(t){const n=Ie(t);if("animated"!==n.kind)return n;const e=n.keyframes.map(t=>{var n,e,r,o;return{time:null!=(e=null!=(n=t.time)?n:t.t)?e:0,value:null!=(r=t.value)?r:t.v,easing:null!=(o=t.easing)?o:t.e}});if(!e.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:e.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<e.length;t++){const n=e[t-1],o=e[t];if((n.value[1]-n.value[0])*(o.value[1]-o.value[0])<0){const t=Ao(n,o);null!==t&&t>n.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,n)=>t-n),i=[];let l=0;for(const t of e){for(;l<o.length&&o[l]<t.time;){const t=o[l++],n=ko(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}const n=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:n,easing:t.easing})}for(;l<o.length;){const t=o[l++],n=ko(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(n.range),v="absent"===d.kind?{kind:"static",value:[0,1]}:d,y=function(t){var n;if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const e=[];for(const r of t.keyframes){const t=null!=(n=r.value)?n:r.v;"number"==typeof t&&e.push(t)}return e}(c),p=[y.length?Math.min(...y):0,y.length?Math.max(...y):0];if(1===r.length&&r[0].leaf===t&&1===r[0].Mt.length){const n=r[0],o=n.Mt[0],i=e?s:o.xt;if(i<.001)return t;const l=e?o.Ot/i:0;return function(t,n,e,r,o,i){const l=yo(e,n,r),s=po(n,r),u=a({},t);return delete u.effects,bo(u,"strokeDasharray",ho(i,s)),bo(u,"strokeDashoffset",ho(o,l)),bo(u,"strokeOpacity",wo(i)),u}(n.leaf,i,l,p,c,v)}const m=new Map;for(const t of r){const n=[];for(const r of t.Mt){const o=e?s:r.xt;if(o<.001)continue;const i=e?r.Ot/o:0;n.push(...fo(t.leaf,r.jt,o,i,p,c,v))}m.set(t.leaf,ao(t.leaf,n))}const h=t=>m.get(t)||(Array.isArray(t.children)&&t.children.length>0?f(a({},t),{children:t.children.map(h)}):t);return h(t)}(h,c),h=function(t,n,e){var r,o;if(!n)return t;const i=null!=(r=n.copies)?r:1;if(i<1)return e.errors.push("repeater.copies invalid: "+n.copies),t;const l=t.transform,s=null==(o=t.animate)?void 0:o.transform,u=We(t);delete u.transform,u.animate&&(delete u.animate.transform,0===Object.keys(u.animate).length&&delete u.animate),delete u.id;const c=[u];for(let t=1;t<i;t++){const e=We(u),r=dr(n,t),o=r?Re(e,r):e;c.push(o)}const a={type:"g",children:c};return t.id&&(a.id=t.id),void 0!==l&&(a.transform=l),void 0!==s&&(a.animate={transform:s}),a}(h,l,n),h=function(t,n,e,r){if(!n)return t;const o=Ze(n.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=Ee(r,"mask");let l={type:"use",href:"#"+o};if(e)l=nr(l,e,r);else if(ir(t))l=function(t,n){var e;const r=n.animate&&"object"==typeof n.animate&&!Array.isArray(n.animate)?n.animate:void 0,o=null==r?void 0:r.transform,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const l=[],s=[],u=[];for(const t of i){const n=(null!=(e=t.value)?e:t.v)||{},r=Ve(t,void 0);if(Array.isArray(n.translate)&&l.push(f(a(a({},r),or(t)),{value:{translate:[-n.translate[0],-n.translate[1]]}})),"number"==typeof n.rotate){const t={rotate:-n.rotate};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),s.push(f(a({},r),{value:t}))}if(Array.isArray(n.scale)){const t={scale:[1/n.scale[0],1/n.scale[1]]};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),u.push(f(a({},r),{value:t}))}}const c=null==o?void 0:o.loop,d=t=>{const n={keyframes:t};return void 0!==c&&(n.loop=c),n};let v=t;return l.length&&(v={type:"g",animate:{transform:d(l)},children:[v]}),s.length&&(v={type:"g",animate:{transform:d(s)},children:[v]}),u.length&&(v={type:"g",animate:{transform:d(u)},children:[v]}),v}(l,t);else{const n=function(t){if("string"==typeof t.transform){const n=function(t){var n,e,r,o,i,l,s,u,c,a,f,d,v;const y=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let p;const m=[];for(;null!==(p=y.exec(t));){const t=p[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);m.push({name:p[1],St:t})}if(!m.length)return;const h=m[m.length-1];if("translate"===h.name)for(let t=m.length-2;t>=0;t--){const a=m[t];if("translate"!==a.name)continue;const f=null!=(n=a.St[0])?n:0,d=null!=(e=a.St[1])?e:0,v=null!=(r=h.St[0])?r:0,y=null!=(o=h.St[1])?o:0;if(v!==-f||y!==-d)continue;const p={};p.origin=[f,d];for(let n=0;n<t;n++)if("translate"===m[n].name){const t=null!=(i=m[n].St[0])?i:0,e=null!=(l=m[n].St[1])?l:0;p.translate=p.translate?[p.translate[0]+t,p.translate[1]+e]:[t,e]}for(let n=t+1;n<m.length-1;n++){const t=m[n];if("rotate"===t.name)p.rotate=(null!=(s=p.rotate)?s:0)+(null!=(u=t.St[0])?u:0);else if("scale"===t.name){const n=null!=(c=t.St[0])?c:1,e=t.St.length>1?t.St[1]:n;p.scale=p.scale?[p.scale[0]*n,p.scale[1]*e]:[n,e]}}return p}let b,g,w;for(const t of m)if("translate"===t.name){const n=null!=(a=t.St[0])?a:0,e=null!=(f=t.St[1])?f:0;b=b?[b[0]+n,b[1]+e]:[n,e]}else if("rotate"===t.name)g=(null!=g?g:0)+(null!=(d=t.St[0])?d:0);else if("scale"===t.name){const n=null!=(v=t.St[0])?v:1,e=t.St.length>1?t.St[1]:n;w=w?[w[0]*n,w[1]*e]:[n,e]}const A={};return b&&(A.translate=b),void 0!==g&&(A.rotate=g),w&&(A.scale=w),Object.keys(A).length?A:void 0}(t.transform);if(!n)return;const e={};return n.translate&&(e.translate=n.translate),void 0!==n.rotate&&(e.rotate=n.rotate),n.scale&&(e.scale={value:n.scale}),n.origin&&(e.origin=n.origin),Object.keys(e).length?e:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const n=t.transform.value,e=n&&"object"==typeof n?n:t.transform;if(e&&"object"==typeof e){const t={};return Array.isArray(e.translate)&&(t.translate=e.translate),"number"==typeof e.rotate&&(t.rotate=e.rotate),"number"==typeof e.skew&&(t.skew=e.skew),Array.isArray(e.scale)&&(t.scale={value:e.scale}),Array.isArray(e.origin)&&(t.origin=e.origin),Object.keys(t).length?t:void 0}}}(t);n&&(l=nr(l,n,r))}const s=void 0===e&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||ir(t)}(t);l=function(t,n,e,r,o){const i=r.it.get(e),l=r.ht.get(n)||[],s=o?cr(n,r):void 0,u=s?[...l,s]:l,c=i&&r.ht.get(i)||[];if(!u.length&&!c.length)return t;const a=new Set;for(const t of u)if(t.ot)for(const n of t.ot)a.add(n.time);for(const t of c)if(t.ot)for(const n of t.ot)a.add(n.time);if(!(a.size>0)){const n=lr(u),e=lr(c),r=e[0]-n[0],o=e[1]-n[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(a).sort((t,n)=>t-n).map(t=>{const n=sr(u,t),e=sr(c,t);return{time:t,value:{translate:[e[0]-n[0],e[1]-n[1]]}}})}},children:[t]}}(l,t,o,r,s);const u={type:"mask",id:i,children:[l]};return n.maskType&&(u.maskType=n.maskType),n.maskUnits&&(u.maskUnits=n.maskUnits),n.maskContentUnits&&(u.maskContentUnits=n.maskContentUnits),void 0!==n.x&&(u.x=String(n.x)),void 0!==n.y&&(u.y=String(n.y)),void 0!==n.width&&(u.width=String(n.width)),void 0!==n.height&&(u.height=String(n.height)),r.defs.push(u),t.mask="url(#"+i+")",t}(h,s,i,n),h=function(t,n,e){if(!(null==n?void 0:n.d))return t;const r=Ee(e,"clip"),o={type:"path"},i=Ie(n.d);return"absent"!==i.kind&&("static"===i.kind?o.d=tr(i.value):(De(o,"d",i),void 0!==o.d&&(o.d=tr(o.d)))),e.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(h,u,n),o?(fr(h,d,n),h=function(t,n,e,r){const o=function(t,n){var e,r,o;const i={};let l=!1;const s=null==(e=t.animate)?void 0:e.transform;if(s&&"object"==typeof s&&Array.isArray(s.keyframes)){const n=s.keyframes;if(n.some(t=>t.value&&t.value.translate)){const e=Qe(s),r={keyframes:n.map(t=>{const n=t.value||{},r={};void 0!==n.translate&&(r.translate=n.translate),e&&void 0!==n.origin&&(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};s.autoOrient&&(r.autoOrient=!0);const o=s.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const u=n.some(t=>{const n=t.value||{};return void 0!==n.rotate||void 0!==n.scale}),c=n.map(t=>{const n=t.value||{},r={};void 0!==n.rotate&&(r.rotate=n.rotate),void 0!==n.scale&&(r.scale=n.scale),void 0===n.origin||e&&!u||(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(c.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const n={keyframes:c};void 0!==o&&(n.loop=o),t.animate.transform=n}l=!0}}const u=void 0!==(null==n?void 0:n.translate),c=l||u,f=l&&Qe((null==(r=t.animate)?void 0:r.transform)||void 0)||l&&Qe((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const n=function(t){const n=[],e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=e.exec(t);)n.push({name:r[1],Nt:r[0]});if(!n.length)return{zt:t||void 0};if(n.every(t=>"translate"===t.name))return{translate:n.map(t=>t.Nt).join("")};const o=n[0],i=n[n.length-1];if("translate"===i.name&&"translate"===o.name){const e=qe(i.Nt),r=qe(o.Nt),l=-e[0],s=-e[1],u=r[0]-l,c=r[1]-s;return 0===u&&0===c?{zt:t}:{translate:"translate("+u+","+c+")",zt:"translate("+l+","+s+")"+n.slice(1).map(t=>t.Nt).join("")}}if("translate"===i.name)return{zt:t};const l=[];let s=0;for(;s<n.length&&"translate"===n[s].name;)l.push(n[s].Nt),s++;if(!l.length)return{zt:t};const u=n.slice(s).map(t=>t.Nt).join("");return{translate:l.join(""),zt:u||void 0}}(t.transform);c?void 0!==n.translate?n.zt?t.transform=n.zt:delete t.transform:(function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,e=[];let r;for(;r=n.exec(t);)e.push({name:r[1],Nt:r[0]});if(1!==e.length)return!1;if("translate"===e[0].name)return!0;if("matrix"!==e[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(e[0].Nt);if(!o)return!1;const i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)||f&&function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let e,r=0,o=!1;for(;e=n.exec(t);)r++,"matrix"===e[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:n.translate&&(i.transform=n.translate,n.zt?t.transform=n.zt:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const n=t.transform.value,e=!(!n||"object"!=typeof n),r=e?n:t.transform,o=t=>e?{value:t}:t;if(Array.isArray(r.translate)){const n=a({},r);delete n.translate;const e=Object.keys(n).length>0;c||(i.transform=o({translate:r.translate})),e?t.transform=o(n):delete t.transform}}return i}(t,n);"string"==typeof t.id&&delete t.id;const{Pt:i,inner:l}=function(t){if(!t)return{};const n=Qe(t.translate),e=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),n&&void 0!==t.origin&&(r.origin=t.origin),void 0!==t.rotate&&(o.rotate=t.rotate),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.skew&&(o.skew=t.skew),void 0===t.origin||n&&!e||(o.origin=t.origin),{Pt:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(n);let s=t;s=Re(s,l);let u={type:"g",id:e,children:[{type:"g",id:r,children:[s]}]};return void 0!==o.transform&&(u.transform=o.transform),void 0!==o.animate&&(u.animate=o.animate),i&&(delete u.id,u=Re(u,i),u.id=e),u}(h,i,r,o)):h=function(t,n,e,r){return fr(t,n,r),Re(t,e)}(h,d,i,n),(null==d?void 0:d.retime)&&(t.effects={clone:{retime:d.retime}}),r&&n.it.set(r,h),h}var No=t=>{var n,e;return null!=(e=null!=(n=t.t)?n:t.time)?e:0},zo=t=>{var n;return null!=(n=t.v)?n:t.value},Po=t=>{var n;return null!=(n=t.e)?n:t.easing},Co=t=>{var n;return null!=(n=t.tangentIn)?n:t.ti},_o=t=>{var n;return null!=(n=t.tangentOut)?n:t.to};function To(t,n,e,r,o){const i=1-o,l=i*i*i,s=3*i*i*o,u=3*i*o*o,c=o*o*o;return[l*t[0]+s*n[0]+u*e[0]+c*r[0],l*t[1]+s*n[1]+u*e[1]+c*r[1]]}function Lo(t,n,e,r,o=64){let i=0,l=t;for(let s=1;s<=o;s++){const u=To(t,n,e,r,s/o);i+=Math.hypot(u[0]-l[0],u[1]-l[1]),l=u}return i}var Io=t=>{const n=Math.round(1e4*t)/1e4;return Object.is(n,-0)?"0":String(n)};function Do(t,n,e){var r,o;let i=Oo(t).root;return i=function(t){const n=t=>{var e;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const n=function(t){var n,e,r;if("offsetPath"!==t.K)return;const o=t.keyframes;if(!o||o.length<2)return;const i=zo(o[0]),l=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],s=[];for(const t of o){const e=zo(t),r=null==e?void 0:e.translate;if(!r||r.length<2)return;if(Object.keys(e).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(n=null==e?void 0:e.origin)?n:[0,0];if(o[0]!==l[0]||o[1]!==l[1])return;s.push([r[0]+l[0],r[1]+l[1]])}if(!o.some(t=>Co(t)||_o(t)))return;let u="M"+Io(s[0][0])+","+Io(s[0][1]);const c=[];for(let t=0;t<s.length-1;t++){const n=s[t],i=s[t+1],l=null!=(e=_o(o[t]))?e:[0,0],a=null!=(r=Co(o[t+1]))?r:[0,0],f=[n[0]+l[0],n[1]+l[1]],d=[i[0]+a[0],i[1]+a[1]];u+="C"+Io(f[0])+","+Io(f[1])+","+Io(d[0])+","+Io(d[1])+","+Io(i[0])+","+Io(i[1]),c.push(Lo(n,f,d,i))}const a=c.reduce((t,n)=>t+n,0);if(!(a>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=c[t-1]);const n={t:No(o[t]),v:d/a},e=Po(o[t]);void 0!==e&&(n.e=e),f.push(n)}return{Ct:u,_t:f,autoOrient:!!t.autoOrient,anchor:l}}(i);if(n){const e=a({},o);delete e.transform;const l={keyframes:n._t};void 0!==i.loop&&(l.loop=i.loop),e.offsetDistance=l;const s=t.transform;let u=s;if(s&&"object"==typeof s){const t=a({},s);delete t.translate,delete t.origin,u=Object.keys(t).length?t:void 0}r=f(a({},t),{animate:e,style:f(a({},t.style),{offsetPath:"path('"+n.Ct+"')",offsetAnchor:Io(n.anchor[0])+"px "+Io(n.anchor[1])+"px",offsetRotate:n.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==u?r.transform=u:delete r.transform}}if(null==(e=r.children)?void 0:e.length){const t=r.children.map(n);t.some((t,n)=>t!==r.children[n])&&(r=f(a({},r),{children:t}))}return r};return n(t)}(i),i=we(i,null!=(o=null==(r=_t(i))?void 0:r.duration)?o:_),n===Mt.waapi&&(i=le(i,null==e?void 0:e.Tt),i=function(t){var n;const e=function(t){const n=new Map,e=t=>{var r;"string"==typeof t.id&&n.set(t.id,t),null==(r=t.children)||r.forEach(e)};return e(t),n}(t),r=function(t,n){const e=new WeakMap,r=new Set,o=(t,r)=>{const i=e.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let l=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const n in t.animate){l=!0;break}if(!l&&t.children)for(const n of t.children)if(o(n,r)){l=!0;break}if(!l&&"use"===t.type&&"string"==typeof t.href){const e=Ce(t.href),i=e?n.get(e):void 0;i&&(l=o(i,r))}return r.delete(t),e.set(t,l),l};for(const[t,e]of n)o(e,new Set)&&r.add(t);return r}(0,e);if(0===r.size)return t;let o=0;const i=function(t){const n=_e(t.viewBox);if(n)return[n[2],n[3]];const e=Pe(t.width),r=Pe(t.height);return void 0!==e&&void 0!==r?[e,r]:[1,1]}(t),l=[],s=Te(t,e,r,()=>"_lw_use_mat_"+ ++o,l,i);if(0===l.length)return s;const u={type:"defs",children:l},c=[...null!=(n=s.children)?n:[],u];return f(a({},s),{children:c})}(i),i=function(t){const n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let e=!0;for(;e;){e=!1;const r=new Set;n(t,t=>{var n;"use"===t.type&&"string"==typeof t.href&&r.add((n=t.href).startsWith("#")?n.slice(1):n)}),n(t,t=>{if(!t.children)return;let n=t.children;"defs"===t.type&&(n=n.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),n=n.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),n.length!==t.children.length&&(t.children=n,e=!0)})}return t}(i)),i}function Fo(t){const n=globalThis;"function"!=typeof n.cancelAnimationFrame?n.clearTimeout(t):n.cancelAnimationFrame(t)}function Vo(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 l=!1;const s=()=>{l&&(l=!1,t.setPlaybackRate(1)),t.play()},u=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":l=!0,t.setPlaybackRate(-1),t.play()}};switch(e){case"load":{const t=()=>s();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{let t=!1;const n=()=>{t=!0,s()},e=()=>{t&&u()};i.addEventListener("mouseenter",n),i.addEventListener("mouseleave",e);break}case"click":{const n=()=>{t.isPlaying()?u():s()};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,l=null!=(e=null==(n=t.rootBounds)?void 0:n.height)?e:1/0,s=Math.min(i,l),u=Math.min(r.height,Number.isFinite(s)?s:r.height);return u>0?o.height/u: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,s()):e&&(e=!1,u())})},{threshold:n}).observe(i);break}}return t}function Ro(t){return"#"+t}function Uo(t,n,e,r){const o=_t(t)||{};if(!r)if(t.id){const n=Ro(t.id);(r=document.querySelector(n))||console.warn("createFrameLoopAnimator: No root element found for selector: ",n)}else console.warn("createFrameLoopAnimator: No root element provided");const i=function(t,n,e){var r;const o=_t(t)||{},i=Me(t,Mt.frames),l=o.iterations;let s=1;"number"==typeof l&&(s=l||1),"infinite"===l&&(s=1/0),s<1&&(s=1);const u=+(o.duration||_),c=u&&s?u*(s===1/0?1/0:s):u?(null!=s?s:1)*u:0,a=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,v="backwards"===f||"both"===f;let y=null,p=!1,m=-(o.delay||0),h=0,b=1,g=!1;const w=o.frameRate,A=w&&w>0?1e3/w:0;let k=0;const M=()=>{const t=h?(Date.now()-h)*b:0;return m+t},j=()=>{let t=M();return Number.isFinite(c)&&t>c&&(t=c),t<0&&(t=0),t};function x(t){let e=function(){const n=u>0?u:1;let e=0,r=0;u>0?(t=F(t,0,s*n),r=Math.max(0,Math.ceil(t/n)-1),r=Math.min(r,s-1),e=F((t-r*n)/n,0,1)):e=t;const o=a||"normal";let i=e;return"reverse"===o?i=1-e:"alternate"===o?r%2==1&&(i=1-e):"alternate-reverse"===o&&r%2==0&&(i=1-e),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=xe(r,e*u);for(const[e,r]of Object.entries(o))n.setAttribute(t.id,e,r)}}o.delay&&(o.delay<0?x(j()):v&&x(0));const O=()=>!!p&&!!n.isConnected()&&(b<0?M()>0:!(Number.isFinite(c)&&j()>=c)),S=t=>{null!==y&&(Fo(y),y=null),(t||O())&&(y=function(t){const n=globalThis;return"function"==typeof n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,16)}(()=>{y=null,(()=>{var t,r;if(!n.isConnected())return void N();const o=j(),i=M();if(i<0&&b>0)v&&x(0);else{if(b<0&&i<=0)return N(),x(0),void(g||(g=!0,null==(t=null==e?void 0:e.onFinish)||t.call(e)));if(b>0&&c&&Number.isFinite(c)&&o>=c)return N(),x(d?c:0),void(g||(g=!0,null==(r=null==e?void 0:e.onFinish)||r.call(e)));if(A>0){const t=Date.now();if(k&&t-k<A)return;k=t}x(o)}})(),S()}))},N=()=>{if(!p)return;let t=M();Number.isFinite(c)&&t>c&&(t=c),m=t,h=0,p=!1,null!==y&&(Fo(y),y=null),t>=0?x(t):v&&x(0)},z={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!p){if(b>=0)Number.isFinite(c)&&m>=c&&(m=0);else if(m<=0){if(!Number.isFinite(c))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");m=c}g=!1,p=!0,h=Date.now(),S(!0)}})(),null==(t=null==e?void 0:e.Lt)||t.call(e)},pause:()=>{var t;N(),null==(t=null==e?void 0:e.It)||t.call(e)},cancel:()=>{var t;N(),m=0,h=0,p=!1,g=!1,x(m),null==(t=null==e?void 0:e.Dt)||t.call(e)},finish:()=>{((t=!0)=>{var n;m=Number.isFinite(c)?c:j(),h=0,p=!1,null!==y&&(Fo(y),y=null),x(d?m:0),t&&!g&&(g=!0,null==(n=null==e?void 0:e.onFinish)||n.call(e))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let n=M();Number.isFinite(c)&&n>c&&(n=c),t<0!=b<0&&(g=!1),b=t,m=n,p&&(h=Date.now())},getCurrentTime:()=>j(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(c)&&t>c&&(t=c),m=t,p&&(h=Date.now()),(!Number.isFinite(c)||t<c)&&(g=!1),x(j())},destroy:()=>{var t;z.cancel(),null==(t=null==e?void 0:e.Ft)||t.call(e)}};return z}(t,n||function(t){const n=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(e,r,o)=>{r=D(r);const i=Ro(e),l=(null==t?void 0:t.querySelectorAll(i))||document.querySelectorAll(i);0!==l.length||n.has(i)||(n.add(i),console.warn('setAttribute: No elements found for selector "'+i+'"'));for(let t=0;t<l.length;t++){const n=l[t],e="transform"===r&&"pattern"===n.tagName?"patternTransform":r;n.setAttribute(e,o),C.has(r)&&(n.style[r]=o)}}}}(r),e),l=f(a({},i),{getRootElement:()=>r||null});return o.trigger&&(G(o)?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Vo(l,o.trigger)),l}function Bo(t,n,e,r){var o,i;let l=null!=(o=t.v)?o:t.value;const s=null!=(i=t.e)?i:t.easing,u={offset:n,easing:s&&Array.isArray(s)?"cubic-bezier("+s.join(",")+")":void 0};let c,a=e;return S.has(e)&&Array.isArray(l)?c=x(l):"transform"!==e||null===l||"object"!=typeof l||Array.isArray(l)?N.has(e)?(Array.isArray(l)&&("translate"===e&&(l=l.map(t=>t+"px")),l=l.join(",")),"rotate"===e&&(l+="deg"),c=e+"("+l+")",a="transform"):c="d"===e?'path("'+(l&&"object"==typeof l&&Array.isArray(l.paths)?l.paths:[]).map(t=>y(t,!0)).join("")+'")':z.has(e)&&"number"==typeof l?100*l+"%":""+l:(c=P(l,{l:!0}),a="transform"),CSS.supports(D(a),c)||r.add(a),a=T(a),u[a]=c,u}function Eo(t,n,e){var r,o,i,l,s;const u=[];for(let c=0;c<n.length;c++){const d=n[c],v=null!=(r=d.t)?r:0;if(v<0){const e=n[c+1];if(e&&(null!=(o=e.t)?o:0)>=0){const n=(0-v)/((null!=(i=e.t)?i:0)-v),r=d.e?A(d.e)(n):n,{right:o}=M(d.e,n);u.push({t:0,v:me(t,d.v,e.v,r),e:o})}continue}if(v>e){const r=n[c-1];if(r&&(null!=(l=r.t)?l:0)<=e){const n=null!=(s=r.t)?s:0,o=(e-n)/(v-n),i=r.e?A(r.e)(o):o,{left:l}=M(r.e,o);u.length>0&&(u[u.length-1]=f(a({},u[u.length-1]),{e:l})),u.push({t:e,v:me(t,r.v,d.v,i),e:void 0})}break}u.push(d)}return u}function Zo(t,n,e){var r;const o=new Map;for(const[i,l]of Object.entries(t)){const t=e.duration||1,s=Eo(i,l.keyframes||[],t),u=[];for(let e=0;e<s.length;e++){const o=s[e],l=Bo(o,F((null!=(r=o.t)?r:0)/t,0,1),i,n);0===e&&(l.offset||0)>0&&u.push(f(a({},l),{offset:0})),u.push(l)}u.length>0&&(u[u.length-1].offset||0)<1&&u.push(f(a({},u[u.length-1]),{offset:1})),u.length>0&&o.set(i,u)}return o}function Go(t,n,e,r,o){var i;const l=_t(t)||{};if(!e)if(t.id){const n=Ro(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 s=Me(t,Mt.waapi),u=[],c=l.iterations;let a;"number"==typeof c&&(a=c),"infinite"===c&&(a=1/0);const f=new Set;let d=!1,v=!1;(null==s?void 0:s.length)||console.warn("createWebApiAnimator: No animation bindings defined");for(const t of s||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("createWebApiAnimator: Empty or unresolved binding",t);continue}const s=Ro(t.id),c=(null==e?void 0:e.querySelectorAll(s))||document.querySelectorAll(s);0===c.length&&console.warn('createWebApiAnimator: No elements found for selector "'+s+'"');const y=Zo(r,f,l),p=l.delay&&l.delay>0?l.delay:void 0;let m;if(l.delay&&l.delay<0&&l.duration){const t=-l.delay;m=a===1/0?t%l.duration:Math.min(t,l.duration*(null!=a?a:1))}const h={duration:l.duration,delay:p,fill:null!=(i=l.fill)?i:"forwards",direction:l.direction,iterations:a};for(let t=0;t<c.length;t++){const e=c[t];for(const[,t]of y)if(t.length>0)try{const r=new KeyframeEffect(e,t,h),i=new Animation(r,o?o.timeline:document.timeline);if(o){const t=i;o.rangeStart&&(t.rangeStart=o.rangeStart),o.rangeEnd&&(t.rangeEnd=o.rangeEnd)}(null==n?void 0:n.onFinish)&&(i.onfinish=()=>{var t;d||(d=!0,null==(t=n.onFinish)||t.call(n))}),(null==n?void 0:n.Ft)&&(i.onremove=()=>{var t;v||(v=!0,null==(t=n.Ft)||t.call(n))}),void 0!==m&&(i.currentTime=m),u.push(i)}catch(t){console.warn(t)}}}if(!r&&f.size)return console.warn("Unsupported CSS attrs: "+[...f].join(", ")),null;const y={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var t;return"running"===(null==(t=u[0])?void 0:t.playState)},play:()=>{var t;d=!1,u.forEach(t=>t.play()),null==(t=null==n?void 0:n.Lt)||t.call(n)},pause:()=>{var t;u.forEach(t=>t.pause()),null==(t=null==n?void 0:n.It)||t.call(n)},cancel:()=>{var t;d=!1,u.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.Dt)||t.call(n)},finish:()=>{var t;for(const n of u)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=>(u.forEach(n=>n.playbackRate=t),y),getCurrentTime:()=>{var t,n;const e=null!=(n=null==(t=u[0])?void 0:t.currentTime)?n:null;return null!==e?+e:null},setCurrentTime:t=>{d=!1,u.forEach(n=>{n.currentTime=t})},destroy:()=>{var t;y.cancel(),u.splice(0,u.length),v||(v=!0,null==(t=null==n?void 0:n.Ft)||t.call(n))}};return l.trigger&&("scroll"===l.h?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Vo(y,l.trigger)),o&&u.forEach(t=>t.play()),y}function Wo(t,n,e){var r,o,i;const l="number"==typeof(null==t?void 0:t.fraction)?t.fraction:n,s=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*l);if(void 0!==s)return e?{Vt:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:s}:{offset:s}}function Xo(t,n){const e=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===e||o===r)return null;const t=getComputedStyle(o),i="y"===n?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function qo(){return document.scrollingElement||document.documentElement}var Qo="parent",Jo="scroller";function Ko(t,n){var e,r;const o=null==n?void 0:n.trim();if(!o)return t;if(o===Qo){let n=null;for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement){const t=getComputedStyle(e).position;"sticky"!==t&&"fixed"!==t||(n=e)}return null!=(r=null!=(e=null==n?void 0:n.parentElement)?e:t.parentElement)?r:t}if(o===Jo)return Xo(t,"y")||Xo(t,"x")||qo();let i=null;try{i=document.querySelector(o)}catch(n){return console.warn('scroll timeline: subject "'+o+'" is not a valid selector — measuring the SVG itself'),t}return i||(console.warn('scroll timeline: subject "'+o+'" matched no element — measuring the SVG itself'),t)}function Yo(t,n){const e=t;if(!(null==n?void 0:n.pin)||!e.style)return()=>{};const r=e.style,o=r.position,i=r.top;r.position="sticky";const l="center"===n.pinAlign?.5:"bottom"===n.pinAlign?1:0,s=()=>{var e;const o=null!=(e=n.pinTop)?e:0;if(!l)return void(r.top=o+"px");const i=function(t){const n=Xo(t,"y");return n?n.clientHeight:document.documentElement.clientHeight}(t),s=t.getBoundingClientRect().height;r.top=Math.round((i-s)*l+o)+"px"};s();let u=null;const c=l?s:null;l&&(c&&window.addEventListener("resize",c),"undefined"!=typeof ResizeObserver&&(u=new ResizeObserver(s),u.observe(t)));let a=null;const f=t.parentElement;return n.pinDistance&&n.pinDistance>0&&f&&(a=document.createElement("div"),a.setAttribute("data-px-pin",""),a.style.height=100*n.pinDistance+"vh",f.insertBefore(a,t),a.appendChild(t)),()=>{c&&window.removeEventListener("resize",c),null==u||u.disconnect(),r.position=o,r.top=i,(null==a?void 0:a.parentElement)&&(a.parentElement.insertBefore(t,a),a.remove())}}function Ho(t,n,e){let r,o=n;t.L&&(o=f(a({},n),{onFinish:()=>{var t;null==(t=null==n?void 0:n.onFinish)||t.call(n),null==r||r.cancel()}}));const i=e(o);return r=i,t.debugInstName&&(window[t.debugInstName]=i),i}var $o="http://www.w3.org/2000/svg";function ti(t,n){if(!t)return null;const e=t,{type:r,children:o,style:i}=e,l=d(e,["type","children","style"]),s=l.Rt;void 0!==s&&delete l.Rt;const u=Lt(t)||n,c=function(t,n){var e;if(t)return"string"==typeof t?null==(e=null==n?void 0:n.styles)?void 0:e[t]:t}(i,u);let a;if(o)for(const t of o){const n=ti(t,u);n&&(a||(a=[]),a.push(n))}const f=function(t,n,e,r,o){if(zn.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS($o,t);for(const t in n){const e=Fn(t,n[t]);void 0!==e&&(_n.has(t)?i.style[t]=String(e):i.setAttribute(D(t),e))}if(e)for(const t in e)i.style[t]=String(e[t]);if(r)for(const t of r)i.appendChild(t);return o&&(i.textContent=o),i}(r||"g",function(t){const n={};for(const e of Object.keys(t)){const r=T(e);if(Pt.has(r))continue;if("style"===r)continue;let o=t[e];if(S.has(r)&&Array.isArray(o))n[r]=x(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)N.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),n.transform=r+"("+o+")"):Array.isArray(o)?n[r]=o.join(","):null!=o&&(n[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;n.transform=P(t,{l:!1})}}return n}(l),c,a,l[zt]||l[Nt]);return f&&void 0!==s&&f.setAttribute("type",s),f}var ni,ei="data";function ri(t,n,e,r){const o=function(t){const n=[],e=(t,r)=>{if(t&&t.effects){const e={errors:[],warnings:[],P:!1};if(!gn.M(t.effects,e,[r+".effects"]))for(const t of e.errors)n.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,n)=>e(t,r+".children["+n+"]"))};return e(t,"root"),n}(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);t=Do(t,(_t(t)||{}).mode===kt.frames?Mt.frames:Mt.waapi);let i=null;if(r){t=Sn(t);const n="string"==typeof r?document.querySelector(r):r;n&&(i=ti(t),i&&n.replaceChildren(i))}const l=function(t,n,e,r){return function(t,n,e,r){const o=_t(t)||{};return G(o)?Ho(o,e,e=>{var i,l;let s=()=>{};if(o.mode!==kt.frames&&"native"===(null==(i=o.scroll)?void 0:i.driver)&&r){s=Yo(r,o.scroll);const n=function(t,n){var e,r,o,i;if(!n||!G(n))return null;const l=n.scroll||{},s=null!=(e=l.kind)?e:"view";if(l.smoothing)return console.warn('scroll timeline: `smoothing` needs the built-in driver — ignoring `driver: "native"`'),null;const u=globalThis,c="view"===s,a=c?u.ViewTimeline:u.ScrollTimeline;if("function"!=typeof a)return null;const f=null!=(r=l.axis)?r:"block";let d;try{d=new a(c?{subject:Ko(t,l.subject),axis:f}:{source:"root"===l.source?qo():Xo(t,"y")||Xo(t,"x")||qo(),axis:f})}catch(t){return console.warn("scroll timeline: native timeline construction failed — falling back to the custom driver",t),null}return{timeline:d,rangeStart:Wo(null==(o=l.range)?void 0:o.start,0,c),rangeEnd:Wo(null==(i=l.range)?void 0:i.end,1,c)}}(r,o);if(n){const i=Go(t,e,r,o.mode===kt.waapi,n);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{s(),t()},i}}s(),s=()=>{}}const u=(o.mode!==kt.frames?Go(t,e,r,o.mode===kt.waapi):null)||Uo(t,n,e,r),c=(null==(l=u.getRootElement)?void 0:l.call(u))||r;if(c){s=Yo(c,o.scroll);const t=("number"==typeof(null==(a=o)?void 0:a.duration)&&a.duration>0?a.duration:_)*("number"==typeof(null==a?void 0:a.iterations)&&a.iterations>0?a.iterations:1),n=function(t,n,e){var r,o;if(!n||!G(n))return null;const i=n.scroll||{},l=null!=(r=i.kind)?r:"view",s=Ko(t,i.subject),u=Xo(t,"y")||Xo(t,"x"),c="scroll"===l&&"root"===i.source?qo():u||qo(),a=c===qo(),f=function(t,n){const e=null!=t?t:"block";if("x"===e||"y"===e)return e;const r=!!n&&n.startsWith("vertical");return"inline"===e?r?"y":"x":r?"x":"y"}(i.axis,getComputedStyle(c).writingMode),d=()=>{if("scroll"===l)return function(t,n,e){var r,o;const i=n>0?F(t/n,0,1):1,l="number"==typeof(null==(r=null==e?void 0:e.start)?void 0:r.fraction)?e.start.fraction:0,s="number"==typeof(null==(o=null==e?void 0:e.end)?void 0:o.fraction)?e.end.fraction:1;return s<=l?i>=s?1:0:F((i-l)/(s-l),0,1)}("y"===f?c.scrollTop:c.scrollLeft,"y"===f?c.scrollHeight-c.clientHeight:c.scrollWidth-c.clientWidth,i.range);const t=s.getBoundingClientRect();let n,e;if(a)n=0,e="y"===f?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=c.getBoundingClientRect();n="y"===f?t.top:t.left,e="y"===f?c.clientHeight:c.clientWidth}return function(t,n,e,r){const o=e-t,i=X(null==r?void 0:r.start,0,n,e),l=X(null==r?void 0:r.end,1,n,e);return l<=i?o>=l?1:0:F((o-i)/(l-i),0,1)}(("y"===f?t.top:t.left)-n,"y"===f?t.height:t.width,e,i.range)},v=Math.max(0,null!=(o=i.smoothing)?o:0)/1e3;let y=!1,p=null,m=null,h=0,b=null;const g=()=>{b=null,y||(t=>{if(!v)return void e(t);if(null===p)return p=t,void e(t);if(null!==m)return;h=0;const n=t=>{if(m=null,y)return;const r=h?Math.min(.1,(t-h)/1e3):1/60;h=t;const o=d(),i=1-Math.exp(-r/v);p+=(o-p)*i,Math.abs(o-p)<.001&&(p=o),e(p),p!==o&&(m=requestAnimationFrame(n))};m=requestAnimationFrame(n)})(d())},w=()=>{y||null!==b||(b=requestAnimationFrame(g))},A=a?window:c;let k;A.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w,{passive:!0}),"undefined"!=typeof ResizeObserver&&(k=new ResizeObserver(w),k.observe(s),s!==t&&k.observe(t),a||k.observe(c));const M={destroy:()=>{y||(y=!0,A.removeEventListener("scroll",w),window.removeEventListener("resize",w),null==k||k.disconnect(),null!==b&&(cancelAnimationFrame(b),b=null),null!==m&&(cancelAnimationFrame(m),m=null))},refresh:()=>{y||(p=d(),e(p))}};return M.refresh(),M}(c,o,n=>u.setCurrentTime(n*t));if(n){const t=u.destroy.bind(u);u.destroy=()=>{n.destroy(),s(),t()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var a;return u}):Ho(o,e,e=>o.mode===kt.frames?Uo(t,n,e,r):Go(t,e,r,o.mode===kt.waapi)||Uo(t,n,e,r))}(t,n,e,r)}(t,n,e,i);if(r&&i){const t=i,n=l.destroy.bind(l);l.destroy=()=>{n(),t.remove()}}return l}function oi(t){const{src:n,data:e,Ut:r,Bt:o,container:i}=t;if(void 0!==e&&void 0!==n)throw new Error("createAnimator: provide either `src` or `data`, not both");if(void 0===e&&void 0===n)throw new Error("createAnimator: either `src` or `data` is required");if(void 0!==e)return ri(e,r,o,i);let l=null,s=[],u=!1;const c=t=>{l?t(l):s&&s.push(t)};return fetch(n).then(t=>t.json()).then(t=>{var e;if(!u)if((e=t)&&"object"==typeof e&&!Array.isArray(e)&&"svg"===e.type){l=ri(t,r,o,i);const n=s;s=null,null==n||n.forEach(t=>t(l))}else console.error('createAnimator: invalid animation document format at "'+n+'"')}).catch(t=>{s=null,console.error('createAnimator: failed to load "'+n+'"',t)}),{isReady:()=>!!l,getRootElement:()=>l?l.getRootElement():null,isPlaying:()=>(null==l?void 0:l.isPlaying())||!1,play:()=>{c(t=>t.play())},pause:()=>{c(t=>t.pause())},cancel:()=>{c(t=>t.cancel())},finish:()=>{c(t=>t.finish())},setPlaybackRate:t=>{c(n=>n.setPlaybackRate(t))},getCurrentTime:()=>l?l.getCurrentTime():null,setCurrentTime:t=>{c(n=>n.setCurrentTime(t))},destroy:()=>{u=!0,s=null,null==l||l.destroy()}}}function ii(){const t=document.querySelectorAll("["+wt+"]");for(let n=0;n<t.length;n++){const e=t[n];if(!e[At]){const t=e.getAttribute(wt);t&&(e[At]=oi({src:t,container:e}))}}}return"undefined"!=typeof window&&(window.loadTagAnimators=ii,window.createAnimator=oi,window.setupAnimationTriggers=Vo),ni=v,((n,r,i,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let i of o(r))l.call(n,i)||void 0===i||t(n,i,{get:()=>r[i],enumerable:!(s=e(r,i))||s.enumerable});return n})(t({},"__esModule",{value:!0}),ni)})();
|
|
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=Math.pow,u=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,a=(t,n)=>{for(var e in n||(n={}))s.call(n,e)&&u(t,e,n[e]);if(i)for(var e of i(n))l.call(n,e)&&u(t,e,n[e]);return t},f=(t,e)=>n(t,r(e)),d=(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},v={};function y(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("")}function m(t,n,e){return t+(n-t)*e}function p(t,n,e){const r=[],o=Math.max(t.length,n.length);for(let i=0;i<o;i++)r[i]=m(t[i]||0,n[i]||0,e);return r}function h(t,n,e){return[m(t[0]||0,n[0]||0,e),m(t[1]||0,n[1]||0,e),m(t[2]||0,n[2]||0,e),m(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}function g(t,n,e){const r=Math.max(t.length,n.length),o=[];for(let i=0;i<r;i++)o.push(b(t[i],n[i],e));return o}function b(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),y=[],m=[],h=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];y.push(p(f,v,d));const g=null!=(o=null==(r=t.i)?void 0:r[e])?o:f,b=null!=(s=null==(i=n.i)?void 0:i[e])?s:v;m.push(p(g,b,d));const w=null!=(c=null==(l=t.o)?void 0:l[e])?c:f,A=null!=(a=null==(u=n.o)?void 0:u[e])?a:v;h.push(p(w,A,d))}return{v:y,i:m.length?m:void 0,o:h.length?h:void 0,c:null!=(f=t.c)?f:n.c}}function w(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 A(t){const[n,e,r,o]=t,i=3*e,s=3*(o-e)-i,l=1-i-s;return function(t){return e=w(n,r,t),((l*e+s)*e+i)*e;var e}}function k(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function j(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=w(e,o,n),l=[e,r],c=[o,i],{left:u,right:a}=function(t,n,e,r,o){const i=k(t,n,o),s=k(n,e,o),l=k(e,r,o),c=k(i,s,o),u=k(s,l,o),a=k(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,y;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 m=1-f,p=1-d;return m>1e-9&&Math.abs(p)>1e-9&&(y=[(a[1][0]-f)/m,(a[1][1]-d)/p,(a[2][0]-f)/m,(a[2][1]-d)/p]),{left:v,right:y}}function M(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function x(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+")"}function O(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})})(v,{PX_ANIMATOR_DATA_KEY:()=>Oi,PX_ANIM_ATTR_NAME:()=>At,PX_ANIM_SRC_ATTR_NAME:()=>wt,PxTimelineEngine:()=>Mt,PxTimelineEngineExtra:()=>xt,createAnimator:()=>Ni,createAnimatorImpl:()=>Si,generateNewIds:()=>Xn,loadTagAnimators:()=>zi,setupAnimationTriggers:()=>ci,validateDocument:()=>In});var S=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),N=new Set(["translate","rotate","scale","skew"]),z=new Set(["offset-distance","offsetDistance"]);function P(t,n){var e;if(!t)return"";const r=null==(e=null==n?void 0:n.l)||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("")}var T=new Set(["offset-distance","offsetDistance"]),C=1e3;function _(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):t}function D(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var L=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 R(t){return L.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function F(t,n,e){return Math.max(n,Math.min(t,e))}function I(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 V=1e-4;function B(t,n,e,r,o){const i=E(t,n,e,r,o);return 0===i[0]&&0===i[1]?E(t,n,e,r,o<.5?o+V:o-V):i}function E(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 U(t,n,e,r,o=100){const i=o+1,s=new Float64Array(i),l=new Float64Array(i);let c=I(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=I(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}}function G(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 Z(t){return"scroll"===(null==t?void 0:t.timelineSource)}var W="cover";function J(t,n,e,r){var o;const[i,s]=function(t,n,e){const r=n,o=e;switch(t){case"cover":return[0,r+o];case"entry":return[0,Math.min(r,o)];case"contain":return[Math.min(r,o),Math.max(r,o)];case"exit":return[Math.max(r,o),r+o];case"entry-crossing":return[0,r];case"exit-crossing":return[o,r+o]}}(null!=(o=null==t?void 0:t.phase)?o:W,e,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:n)*(s-i)}function X(t){if(!t.length)return".";let n="";for(const e of t)e.startsWith("[")?n+=e:n+=(n?".":"")+e;return n}var q=class{_canSanitize(t){return this.isValid(t)}optional(){return new Q(this)}},Q=class extends q{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)}},K=class extends q{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(X(null!=e?e:[])+": expected string, got "+typeof t),!1)}},Y=class extends q{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(X(null!=e?e:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},H=class extends q{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(X(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},$=class extends q{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(X(null!=e?e:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},tt=class extends q{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(X(null!=e?e:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},nt=class extends q{constructor(t,n){super(),this.h=t,this.A="union",this._default=null!=n?n:t[0]._default}sanitize(t){for(const n of this.h)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.h.some(n=>n.isValid(t,o,e?[...e]:void 0))||(null==n||n.errors.push(X(null!=e?e:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}_canSanitize(t){return this.h.some(n=>n._canSanitize(t))}},et=class extends q{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(X(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(X(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},rt=class extends q{constructor(t,n){super(),this._shape=t,this.j=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=a({},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.j)for(const t of Object.keys(n))t in this._shape||(e[t]=this.j.sanitize(n[t]));return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(X(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.j)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.j.isValid(r[t],n,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},ot=class extends q{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(X(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)}},it=class extends q{constructor(t){super(),this.value=t,this.A="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(X(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)}},st=class extends q{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)}},lt=class extends q{constructor(t){super(),this.h=t,this.A="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.h.length?this.h.map((n,e)=>n.sanitize(t[e])):this._default}isValid(t,n,e){if(!Array.isArray(t)||t.length!==this.h.length)return null==n||n.errors.push(X(null!=e?e:[])+": expected tuple of length "+this.h.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.h.length;e++)r.push("["+e+"]"),this.h[e].isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.h.length}},ct=(t="")=>new K(t),ut=(t=0)=>new Y(t),at=(t=!1)=>new H(t),ft=t=>new $(t),dt=(t,n)=>new tt(t,n),vt=(t,n)=>new nt(t,n),yt=t=>new et(t),mt=(t,n)=>new rt(t,n),pt=t=>new ot(t),ht=t=>new it(t),gt=t=>new lt(t),bt=(t,n)=>new st(t,n),wt="data-px-animation-src",At="_px_animator",kt=["duration","iterations","engine","frameRate"],jt=["trigger","delay","fillMode","direction"],Mt={native:"native",js:"js"},xt=f(a({},Mt),{auto:"auto"});function Ot(t){return t===xt.js?Mt.js:Mt.native}function St(t){return t===xt.native}var Nt={start:"start",end:"end"},zt={normal:"normal",alternate:"alternate"},Pt="userSpaceOnUse",Tt="objectBoundingBox",Ct={translate:"translate"},_t={separate:"separate",combined:"combined"},Dt="text",Lt="textContent",Rt="class",Ft="transform",It="offsetDistance",Vt=new Set(["type","children","animator","meta","animate","effects",Dt,Lt]),Bt={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},Et=(Bt.translate,Bt.rotate,Bt.scale,Bt.origin,"userSpaceOnUse"),Ut={linear:"linear",radial:"radial"};function Gt(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=Zt.get(t);if(e)return e;const r=t,{timeline:o}=r,i=d(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=a({},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=d(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 Zt.set(t,i),i}(e):void 0}var Zt=new WeakMap;function Wt(t){var n;if(t)return null==(n=Gt(t))?void 0:n.definitions}var Jt,Xt=vt([ct(),gt([ut(),ut(),ut(),ut()])]),qt=vt([ct(),ut(),pt(ut()),yt({path:ct()}),bt(()=>yt({paths:pt(Gn)}),{paths:[]}),bt(()=>pt(Pn),[]),bt(()=>rn,{})]),Qt=yt({time:ut().optional(),value:qt.optional(),easing:Xt.optional(),tangentOut:gt([ut(),ut()]).optional(),tangentIn:gt([ut(),ut()]).optional()}),Kt=t=>{var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0},Yt=t=>{var n;return null!=(n=t.value)?n:t.v},Ht=t=>{var n;return null!=(n=t.easing)?n:t.e},$t=t=>t.tangentIn,tn=t=>t.tangentOut,nn=yt({segmentCount:ut().optional(),repeatAt:dt([Nt.start,Nt.end]).optional(),direction:dt([zt.normal,zt.alternate]).optional()}),en=yt({value:qt.optional(),keyframes:pt(Qt).optional(),loop:vt([nn,at()]).optional(),autoOrient:at().optional(),alongPathMode:dt(["sampled","offsetPath"]).optional()}),rn=yt({translate:gt([ut(),ut()]).optional(),rotate:ut().optional(),skew:ut().optional(),scale:gt([ut(),ut()]).optional(),origin:gt([ut(),ut()]).optional()}),on=(vt([ct(),rn,yt({value:rn}),en]),ht(en)),sn=vt([ct(),pt(vt([ct(),on])),on]),ln=yt({startOn:dt(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:dt(["continue","pause","reset","reverse"]).optional(),finishAction:dt(["hold","reset"]).optional(),scrollIntoViewThreshold:ut().optional()}),cn=yt({width:ut(),d:ct()}),un=yt({fontFamily:ct(),fontStyle:ct(),ascent:ut(),unitsPerEm:ut(),glyphs:ht(cn)}),an=yt({easings:ht(gt([ut(),ut(),ut(),ut()])).optional(),animations:ht(on).optional(),styles:ht(ht(vt([ct(),ut()]))).optional(),fonts:ht(un).optional()}),fn=yt({phase:dt(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:ut().optional()}),dn=yt({start:fn.optional(),end:fn.optional()}),vn=(yt({kind:dt(["view","scroll"]).optional(),axis:dt(["block","inline","x","y"]).optional(),source:dt(["nearest","root"]).optional(),subject:ct().optional(),smoothing:ut().optional(),pin:at().optional(),pinAlign:dt(["top","center","bottom"]).optional(),pinTop:ut().optional(),pinDistance:ut().optional(),range:dn.optional()}),yt({align:dt(["top","center","bottom"]).optional(),top:ut().optional(),distance:ut().optional()})),yn=dt([xt.auto,xt.native,xt.js]).optional(),mn=yt({type:ft("time").optional(),engine:yn,frameRate:ut().optional(),duration:ut().optional(),trigger:ln.optional(),delay:ut().optional(),iterations:vt([ut(),ft("infinite")]).optional(),fillMode:dt(["forwards","backwards","both","none"]).optional(),direction:dt(["normal","reverse","alternate","alternate-reverse"]).optional()}),pn={duration:ut().optional(),iterations:ut().optional(),engine:yn,frameRate:ut().optional(),axis:dt(["block","inline","x","y"]).optional(),source:dt(["nearest","root"]).optional(),subject:ct().optional(),smoothing:ut().optional(),pin:vt([at(),vn]).optional(),range:dn.optional()},hn=(Jt=[mn,yt(a({type:ft("scroll")},pn)),yt(a({type:ft("view")},pn))],new class extends q{constructor(t,n,e){var r;super(),this.M=t,this.O=n,this.A="discriminatedUnion",this._default=null!=e?e:n[0]._default,this.S=new Map;for(const e of n){const n=e._shape[t];if(!n)continue;const o=null!=(r=n.inner)?r:n;this.S.set(o._default,e),n.inner&&(this.N=e)}}P(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const n=t[this.M];return null==n?this.N:this.S.get(n)}sanitize(t){var n;return(null!=(n=this.P(t))?n:this.O[0]).sanitize(t)}isValid(t,n,e){const r=this.P(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this.M];return null==n||n.errors.push(X(null!=e?e:[])+": no discriminated union member matched "+this.M+"="+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.P(t);return n?n._canSanitize(t):this.O[0]._canSanitize(t)}}("type",Jt)),gn=yt({timeline:hn.optional(),definitions:an.optional(),animateById:ht(sn).optional(),debugGlobalName:ct().optional(),version:ct().optional()}),bn=(yt({id:ct(),animate:sn}),vt([ct(),ut(),pt(ut()),yt({value:new class extends q{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return void 0!==t||(null==n||n.errors.push(X(null!=e?e:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}}}),rn])),wn=vt([ut(),en,yt({value:ut()})]),An=vt([gt([ut(),ut()]),en,yt({value:gt([ut(),ut()])})]),kn=vt([ct(),en,yt({value:ct()})]),jn=yt({translate:An.optional(),rotate:wn.optional(),scale:An.optional(),skew:wn.optional(),origin:An.optional()}),Mn=yt({copies:ut().optional(),translate:An.optional(),rotate:wn.optional(),skew:wn.optional(),scale:An.optional(),origin:An.optional()}),xn=yt({source:ct().optional(),maskType:dt(["luminance","alpha"]).optional(),maskUnits:dt([Pt,Tt]).optional(),maskContentUnits:dt([Pt,Tt]).optional(),x:ut().optional(),y:ut().optional(),width:ut().optional(),height:ut().optional()}),On=yt({d:kn.optional()}),Sn=yt({offset:wn.optional(),range:An.optional(),subPaths:dt([_t.separate,_t.combined]).optional()}),Nn=yt({start:ut().optional(),stretch:ut().optional(),timeCrop:gt([ut(),ut()]).optional()}),zn=yt({without:dt([Ct.translate]).optional(),source:ct().optional(),retime:Nn.optional()}),Pn=yt({offset:ut(),color:ct()}),Tn=vt([pt(Pn),yt({value:pt(Pn)}),en]),Cn=yt({type:dt([Ut.linear,Ut.radial]),start:An.optional(),end:An.optional(),center:An.optional(),radius:wn.optional(),focal:An.optional(),stops:Tn.optional(),gradientUnits:dt([Et,"objectBoundingBox"]).optional(),spreadMethod:dt(["pad","reflect","repeat"]).optional(),gradientTransform:ct().optional()}),_n=Cn,Dn=yt({pathData:ct(),pathOverflow:dt(["clip","extend"]).optional(),lengthAdjust:dt(["spacing","spacingAndGlyphs"]).optional(),method:dt(["align","stretch"]).optional(),spacing:dt(["auto","exact"]).optional(),startOffset:wn.optional(),textLength:wn.optional()}),Ln=yt({useGlyphs:at().optional()}),Rn=yt({transformBy:jn.optional(),repeater:Mn.optional(),maskedBy:xn.optional(),clipPath:On.optional(),strokeTrim:Sn.optional(),clone:zn.optional(),fillGradient:Cn.optional(),strokeGradient:_n.optional(),textPath:Dn.optional(),text:Ln.optional()});function Fn(t,n){const e=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==n?void 0:n.strict)};if(!Rn.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)e.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,n)=>r(t,o+".children["+n+"]"))};return r(t,"root"),e}function In(t){const n={errors:[],warnings:[],strict:!0},e=Un.isValid(t,n,["root"])?[]:[...n.errors];if(t&&"object"==typeof t)for(const n of Fn(t,{strict:!0}))e.includes(n)||e.push(n);return e}var Vn=mt({type:ct(),domType:ct().optional(),id:ct().optional(),meta:(new class extends q{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return!0}_canSanitize(t){return!0}}).optional(),effects:Rn.optional(),animate:sn.optional(),style:vt([ct(),ht(vt([ct(),ut()]))]).optional()},bn),Bn=mt(f(a({},Vn._shape),{children:bt(()=>pt(Bn),[]).optional()}),bn),En=yt({width:vt([ut(),ct()]).optional(),height:vt([ut(),ct()]).optional(),viewBox:ct().optional(),animator:gn.optional()}),Un=mt(f(a(a({},Vn._shape),En._shape),{type:ft("svg"),children:pt(Bn).optional()}),bn),Gn=yt({v:pt(pt(ut())),i:pt(pt(ut())).optional(),o:pt(pt(ut())).optional(),c:at().optional()}),Zn=0;function Wn(){return"_px_"+Date.now().toString(36)+(++Zn).toString(36)+Math.random().toString(36).substring(2,6)}function Jn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>Jn(t));const n=t,e={};for(const t of Object.keys(n))e[t]=Jn(n[t]);return e}function Xn(t){var n,e;const r=Jn(t),o=new Map,i=new Set(["href","xlink:href"]),s=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),l=new Set(["targetId","boundElementId"]),c=(t,n)=>"source"===t&&("maskedBy"===n||"clone"===n);!function t(n){if(n&&"object"==typeof n){if(n.id&&"string"==typeof n.id){const t=n.id,e=Wn();o.set(t,e),n.id=e}else n.animate&&(n.id=Wn());if(Array.isArray(n.children))for(const e of n.children)t(e)}}(r),function t(n,e){if(n&&"object"==typeof n)for(const[r,u]of Object.entries(n))if("children"!==r)if("string"==typeof u)if(i.has(r)&&u.startsWith("#")){const t=u.slice(1),e=o.get(t);e&&(n[r]="#"+e)}else if(s.has(r))n[r]=qn(u,o);else if(l.has(r)||c(r,e)){const t=u.startsWith("#"),e=o.get(t?u.slice(1):u);e&&(n[r]=t?"#"+e:e)}else u.includes("url(#")&&(n[r]=qn(u,o));else if("style"===r&&"object"==typeof u&&null!==u)for(const[t,n]of Object.entries(u))"string"==typeof n&&(u[t]=qn(n,o));else"object"==typeof u&&null!==u&&t(u,r);else if(Array.isArray(u))for(const n of u)t(n)}(r);const u=null==(n=r.animator)?void 0:n.animateById;if(u&&"object"==typeof u){const t={};for(const[n,r]of Object.entries(u)){const i=n.startsWith("#"),s=i?n.slice(1):n,l=null!=(e=o.get(s))?e:s;t[i?"#"+l:l]=r}r.animator=f(a({},r.animator),{animateById:t})}return r}function qn(t,n){return t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t})}var Qn=new Set(["script","foreignobject"]),Kn=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Yn=new Set(["href","xlink:href","src"]),Hn=new Set(["mixBlendMode","isolation"]),$n=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,te=/^data:image\/svg\+xml(?:;[^,]*)?,/i,ne=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,ee=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function re(t,n){const e=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(e)){if("fill"===e||"stroke"===e||"stopcolor"===e){const t=String(n);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+e+'" blocked: url() must be internal url(#id), got:',n):n}if(Kn.has(e)){const t=String(n);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||Yn.has(e)&&($n.test(t)||te.test(t)||function(t){const n=ne.exec(t);return!!n&&ee.some(t=>n[1].startsWith(t))}(t))?n:void console.warn('Attribute "'+e+'" blocked: must be #id, url(#id), or data:image/… URI, got:',n)}return n}console.warn("Attribute blocked (event handler / dangerous): ",e)}function oe(t){const n=Yt(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 ie(t){return Kt(t)}function se(t){return Ht(t)}function le(t){const n=t.keyframes;if(!Array.isArray(n))return!1;if(t.autoOrient)return!0;for(const t of n)if($t(t)||tn(t))return!0;return!1}var ce=new WeakMap;function ue(t,n,e,r){let o=ce.get(t);const i=null==o?void 0:o.get(n);if(i)return i;const s=tn(t),l=$t(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=U(e,c,u,r),f={P0:e,P1:c,P2:u,P3:r,T:a,C:a.ds[a.ds.length-1]};return o||(o=new WeakMap,ce.set(t,o)),o.set(n,f),f}var ae=.5,fe=5,de=32;function ve(t,n){var e,r,o;if(!le(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:ae,c=null!=(r=null==n?void 0:n.rotationTolerance)?r:fe,u=null!=(o=null==n?void 0:n.maxSamplesPerSegment)?o:de,a=[],f=oe(i[0]);if(!f)return t;const d=s?function(t,n){const e=oe(t),r=oe(n);if(!e||!r)return 0;const o=ue(t,n,e,r),i=B(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(me(ie(i[0]),ge(pe(i[0]),pe(i[0]),0,f,d,s)));for(let t=0;t<i.length-1;t++){const n=i[t],e=i[t+1],r=oe(n),o=oe(e);r&&o?(s&&t>0&&we(a,n,e,r,o,c),ke(a,n,e,r,o,s,l,c,u)):a.push(me(ie(e),ge(pe(e),pe(e),1,null!=o?o:[0,0],void 0,s)))}const v=se(i[i.length-1]);v&&(a[a.length-1].e=v),s&&ye(a);const y={keyframes:a};return void 0!==t.loop&&(y.loop=t.loop),y}function ye(t){let n;for(const e of t){const t=Yt(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}}function me(t,n){return{t:t,v:n}}function pe(t){const n=Yt(t);if(n&&"object"==typeof n&&!Array.isArray(n))return n}function he(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 ge(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]=he(o,l,e))}return void 0!==o&&(s.rotate=o+be(t,n,e)),s}function be(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=he(r,o,e);return"number"==typeof i?i:0}function we(t,n,e,r,o,i){const s=t[t.length-1],l=Yt(s),c=null==l?void 0:l.rotate;if("number"!=typeof c)return;const u=pe(n),a=c-be(u,u,0),f=ue(n,e,r,o),d=B(f.P0,f.P1,f.P2,f.P3,0),v=180*Math.atan2(d[1],d[0])/Math.PI,y=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(v,a);if(Math.abs(y)<=i)return;const m=ie(n),p=Math.min(m+Ae,(m+ie(e))/2),h=ge(pe(n),pe(n),0,r,v,!0);t.push(me(p,h))}var Ae=.05;function ke(t,n,e,r,o,i,s,l,c){const u=ue(n,e,r,o),a=ie(n),f=ie(e),d=se(n),v=(y=d)?A([y[1],y[0],y[3],y[2]]):t=>t;var y;const m=pe(n),p=pe(e),h=function(t,n,e,r,o){const i=[];je(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),je(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={_:o-s.length};for(let o=0;o<s.length-1;o++)Me(s[o],s[o+1],l,t,n,e,r,c);return l}(u,i,s,l,c),g=[];for(const t of h){const n=G(u.T,t),e=F(u.C>0?n/u.C:t,0,1),r={u:F(v(e),0,1),p:e,D:I(u.P0,u.P1,u.P2,u.P3,t)};if(i){const n=B(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(n[1],n[0])/Math.PI}g.push(r)}let b=d,w=0;const k=t.length-1;for(let n=0;n<g.length;n++){const e=g[n],r=w<1?F((e.u-w)/(1-w),0,1):1,{left:o,right:s}=j(b,r),l=0===n?k:t.length-1;o?t[l].e=o:delete t[l].e;const c=a+e.u*(f-a),u=ge(m,p,e.p,e.D,e.rotateDeg,i);t.push(me(c,u)),b=s,w=e.u}}function je(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 Me(t,n,e,r,o,i,s,l){const c=(t+n)/2,u=I(r.P0,r.P1,r.P2,r.P3,t),a=I(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=I(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=I(r.P0,r.P1,r.P2,r.P3,c),y=I(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(xe(d,u,a),xe(v,u,a),xe(y,u,a));let p=!0;if(o){const e=B(r.P0,r.P1,r.P2,r.P3,t),o=B(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&&(p=!1)}m<=i&&p||l._<=0||f<1e-6?e.push(n):(l._-=1,Me(t,c,e,r,o,i,s,l),Me(c,n,e,r,o,i,s,l))}function xe(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)}function Oe(t,n){const e=Se(t,n);return null!=e?e:t}function Se(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Se(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,e=t.transform;if(e&&"object"==typeof e&&le(e)){const o=ve(e,n);o!==e&&(r=f(a({},t),{transform:o}))}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var Ne=1;function ze(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=>ze(t[e],n[e]))}function Pe(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 Te(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Ce(t){return"string"==typeof t&&void 0!==Te(t)}function _e(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const n=Te(t.path);return n?{paths:Pe(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&Ce(n[0])){const t=[];for(const e of n){const n=Te(e);n&&t.push(...Pe(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Ce(t[0])){const n=[];for(const e of t){const t=Te(e);t&&n.push(...Pe(t))}return{paths:n}}return{paths:t}}return Ce(t)?{paths:Pe(Te(t))}:t}function De(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 Le(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 Re(t,n,e,r){var o,i;return"d"===t?{paths:g(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)}:S.has(t)?h(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?m(n,e,r):N.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?p(n||[],e||[],r):m(+(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]=m(+(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]=p(r||t,s||t,e)}else o[i]=null!=s?s:r}return o}(n,e,r)}function Fe(t,n,e,r){var o,i,s,l,c;const u=n.length-1,d=F(null!=(o=e.segmentCount)?o:u,1,u);let v;v=e.repeatAt===Nt.start?n.slice(0,d+1):n.slice(u-d);const y=null!=(i=n[0].t)?i:0,m=null!=(s=n[n.length-1].t)?s:0;let p,h;e.repeatAt===Nt.start?(p=0,h=y):(p=m,h=r);const g=h-p;if(g<=0)return n;const b=null!=(l=v[0].t)?l:0,w=(null!=(c=v[v.length-1].t)?c:0)-b;if(w<=0)return n;const k=v.map(t=>({L:(t.t-b)/w,v:t.v,e:t.e,tangentIn:$t(t),tangentOut:tn(t)})),x=Math.floor(g/w),O=g-x*w,S=O/w,N=[],z=e.repeatAt!==Nt.start,P=n[n.length-1];let T,C=!1;function _(n,e,r){var o;let i;if(e){i=[];for(let t=k.length-1;t>=0;t--)i.push({L:1-k[t].L,v:k[t].v,e:t>0?M(k[t-1].e):void 0,tangentIn:k[t].tangentOut,tangentOut:k[t].tangentIn})}else i=k;const s=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.L>s+1e-9){const o=i[e-1],l=r.L-o.L,c=(s-o.L)/l,u=o.e?A(o.e)(c):c,a=Re(t,o.v,r.v,u),{left:f}=j(o.e,c);return N.length>0&&o.L<=s&&(N[N.length-1].e=f),void N.push({t:n+s*w,v:a,e:void 0})}const l=N.length>0?N[N.length-1]:P,c=z&&0===e&&void 0!==l&&Math.abs((null!=(o=l.t)?o:0)-(n+r.L*w))<1e-9;if(c){if(ze(l.v,r.v)){N.length>0?(l.e=r.e,l.tangentOut=r.tangentOut):(T=r.e,C=!0);continue}N.length>0&&(delete l.tangentIn,delete l.tangentOut)}const u={t:n+r.L*w+(c?Ne: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),N.push(u)}}if(e.repeatAt===Nt.start){S>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=k.length-1;t>=0;t--)o.push({L:1-k[t].L,v:k[t].v,e:t>0?M(k[t-1].e):void 0,tangentIn:k[t].tangentOut,tangentOut:k[t].tangentIn})}else o=k;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.L<i-1e-9)continue;const s=o[e-1];if(s&&s.L<i-1e-9&&r.L>i+1e-9){const e=r.L-s.L,o=(i-s.L)/e,l=s.e?A(s.e)(o):o,c=Re(t,s.v,r.v,l),{right:u}=j(s.e,o);N.push({t:n,v:c,e:u})}const l={t:n+(r.L-i)*w,v:r.v,e:e<o.length-1?r.e:void 0};r.tangentIn&&(l.tangentIn=r.tangentIn),r.tangentOut&&(l.tangentOut=r.tangentOut),N.push(l)}}(p,e.direction===zt.alternate&&x%2==0,S);for(let t=0;t<x;t++){const n=x-1-t,r=e.direction===zt.alternate&&n%2==0;_(p+O+t*w,r)}}else{for(let t=0;t<x;t++){const n=e.direction===zt.alternate&&t%2==0;_(p+t*w,n)}if(S>1e-9){const t=e.direction===zt.alternate&&x%2==0;_(p+x*w,t,S)}}return e.repeatAt===Nt.start?[...N,...n]:C&&n.length>0?[...n.slice(0,-1),f(a({},n[n.length-1]),{e:T}),...N]:[...n,...N]}function Ie(t,n,e,r){var o;const i=n.keyframes||[],s=[];for(const n of i){const e=Kt(n);let i=Yt(n);const l=Ht(n);"d"===t&&(i=_e(i));const c=D(t)?R(t):t;S.has(c)&&(i=null!=(o=O(i))?o:i);const u={t:e,v:i,e:De(l,r)},a=$t(n),f=tn(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?Fe(t,s,c,e):s}function Ve(t,n,e){const r=n.loop;if(null==r||!1===r)return n;const o=!0===r?{}:r,i=n.keyframes;if(!Array.isArray(i)||i.length<2)return n;const s=D(t)?R(t):t,l=S.has(s),c=i.map(n=>{var e;const r=Kt(n);let o=Yt(n);"d"===t&&(o=_e(o)),l&&(o=null!=(e=O(o))?e:o);const i={t:r,v:o,e:Ht(n)},s=$t(n),c=tn(n);return s&&(i.tangentIn=s),c&&(i.tangentOut=c),i}),u={keyframes:Fe(t,c,o,e)};return void 0!==n.autoOrient&&(u.autoOrient=n.autoOrient),u}function Be(t,n){const e=Ee(t,n);return null!=e?e:t}function Ee(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Ee(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const e of Object.keys(t)){const o=t[e],i=Ve(e,o,n);i!==o&&(r||(r=a({},t)),r[e]=i)}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var Ue=0;function Ge(t,n=Mt.native){const e=Gt(t)||{},r=Wt(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=Le(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=Le(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=Mt.native){const o={};for(const[i,s]of Object.entries(t)){if("transform"===i&&"offsetPath"===s.alongPathMode&&void 0!==t.offsetDistance)continue;const l=Ie(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===Mt.native&&"transform"===i?ve(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)?a(a({},e),t):t,o=t[Ft];if(o&&"object"==typeof o){const n=o;if(Array.isArray(n.keyframes)){const e=f(a({},n),{keyframes:n.keyframes.map(t=>f(a({},t),{value:r(t.value)}))});return void 0!==e.value&&(e.value=r(e.value)),f(a({},t),{transform:e})}return t}const i=Object.keys(t).filter(t=>N.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=f(a({},l),{keyframes:l.keyframes.map(t=>f(a({},t),{value:f(a({},e),{[s]:t.value})}))});void 0!==c.value&&(c.value=f(a({},e),{[s]:c.value}));const u=a({},t);return delete u[s],f(a({},u),{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=Gt(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_"+ ++Ue;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}function Ze(t,n,e){var r,o,i,s;const l=n.keyframes||[];if(0===l.length)return null;const{R:c,F:u}=function(t,n){var e,r;const o=t.length-1;let i=t[0],s=t[o>0?1:0];for(let l=0;l<o;l++){const c=null!=(e=t[l].t)?e:0,u=null!=(r=t[l+1].t)?r:0;if(c<=n&&n<=u){i=t[l],s=t[l+1];break}n>u&&l===o-1&&(i=t[o>0?o-1:0],s=t[o])}return{R:i,F:s}}(l,e);let a=c===u?0:(f=e,d=null!=(r=c.t)?r:0,(v=null!=(o=u.t)?o:0)===d?0:0+(f-d)/(v-d)*1);var f,d,v;a=F(a,0,1);const b=Ht(c);if(b&&Array.isArray(b))try{a=A(b)(a)}catch(t){}let w=D(t)?R(t):t,k=null;const j=null==c?void 0:c.v,M=null==u?void 0:u.v;if("d"===w)k=g(null!=(i=null==j?void 0:j.paths)?i:Array.isArray(j)?j:[],null!=(s=null==M?void 0:M.paths)?s:Array.isArray(M)?M:[],a).map(t=>y(t)).join("");else if(S.has(w))k=x(h(j||[0,0,0,1],M||[0,0,0,1],a)),w=t;else if("stroke-dasharray"===w)k=p(j||[],M||[],a).join(" "),w=t;else if("transform"!==w||null===j||"object"!=typeof j||Array.isArray(j))"translate"===w?(k="translate("+p(j||[0,0],M||[0,0],a).join(",")+")",w="transform"):"rotate"===w?(k="rotate("+m(+(j||0),+(M||0),a)+")",w="transform"):"scale"===w?(k="scale("+p(j||[1,1],M||[1,1],a).join(",")+")",w="transform"):k=m(+(j||0),+(M||0),a);else{const t=new Set([...j?Object.keys(j):[],...M?Object.keys(M):[]]),e={};for(const n of t){const t=null==j?void 0:j[n],r=null==M?void 0:M[n];if("rotate"===n||"skew"===n)e[n]=m(+(null!=t?t:0),+(null!=r?r:0),a);else if("translate"===n||"scale"===n||"origin"===n){const o="scale"===n?[1,1]:[0,0],i=p(t||o,r||o,a);e[n]=i}}if(le(n)){const t=j.translate,r=M.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,n,e,r,o,i){const s=ue(t,n,e,r),l=0===s.C?o:function(t,n){const e=n*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(e<=0)return r[0];if(e>=o[i])return r[i];let s=1,l=i;for(;s<l;){const t=s+l>>>1;o[t]<e?s=t+1:l=t}const c=o[l-1],u=o[l]-c,a=u>0?(e-c)/u:0;return r[l-1]+a*(r[l]-r[l-1])}(s.T,o),c=I(s.P0,s.P1,s.P2,s.P3,l);if(!i)return{translate:c};const u=B(s.P0,s.P1,s.P2,s.P3,l);return{translate:c,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}(c,u,[+t[0],+t[1]],[+r[0],+r[1]],a,!!n.autoOrient);e.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(e.rotate=o.rotateDeg)}}k=P(e,{l:!1}),w="transform"}return z.has(w)&&"number"==typeof k&&(k=100*k+"%"),{k:w,v:null===k?"":""+k}}function We(t,n){const e={};for(const[r,o]of Object.entries(t)){const t=Ze(r,o,n);t&&(e[t.k]=t.v)}return e}function Je(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Je);const n={};for(const e of Object.keys(t))n[e]=Je(t[e]);return n}function Xe(t,n){const e=new Map,r=t=>{var o;if("string"==typeof t.id){const r=n();e.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t}),i=t=>{var n;if("string"==typeof t.href&&t.href.startsWith("#")){const n=e.get(t.href.slice(1));n&&(t.href="#"+n)}for(const n of Object.keys(t)){if("children"===n||"effects"===n||"meta"===n||"animate"===n||"href"===n||"id"===n)continue;const e=t[n];"string"==typeof e&&-1!==e.indexOf("url(#")&&(t[n]=o(e))}null==(n=t.children)||n.forEach(i)};return i(t),e}function qe(t){const n="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(n)?n:0}function Qe(t){var n;const e=qe(t.x),r=qe(t.y);if(delete t.x,delete t.y,!e&&!r)return t;const o="translate("+e+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const e={type:"g",transform:o,children:null!=(n=t.children)?n:[]};t.children=[e]}else t.transform=o;return t}function Ke(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return Number.isFinite(n)?n:void 0}}function Ye(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function He(t){if("string"!=typeof t)return;const n=t.trim().split(/[\s,]+/).map(Number);return n.length<4||n.some(t=>!Number.isFinite(t))?void 0:[n[0],n[1],n[2],n[3]]}function $e(t,n,e,r,o,i){if("use"===t.type&&"string"==typeof t.href){const s=Ye(t.href);if(s&&e.has(s)){const l=n.get(s);if(l)return function(t,n,e,r,o,i,s){var l,c,u,d;const v=Je(n);Xe(v,o);const y="symbol"===v.type?He(v.viewBox):void 0,m=null!=(c=null!=(l=Ke(t.width))?l:null==y?void 0:y[2])?c:s[0],p=null!=(d=null!=(u=Ke(t.height))?u:null==y?void 0:y[3])?d:s[1],h="symbol"===v.type?function(t,n,e,r,o){const i=He(t.viewBox),s=f(a({},t),{type:"g"});if(delete s.viewBox,delete s.preserveAspectRatio,delete s.width,delete s.height,!i)return s;const[l,c,u,d]=i,v=u>0&&d>0?Math.min(r/u,o/d):1,y=(r-u*v)/2,m=(o-d*v)/2,p=[];0===y&&0===m||p.push("translate("+y+","+m+")"),1!==v&&p.push("scale("+v+")"),0===l&&0===c||p.push("translate("+-l+","+-c+")"),p.length&&(s.transform=p.join(""));const h=n();return e.push({type:"clipPath",id:h,children:[{type:"rect",x:l,y:c,width:u,height:d}]}),s.clipPath="url(#"+h+")",s}(v,o,i,m,p):v,g=$e(h,e,r,o,i,s),b=f(a({},t),{type:"g",children:[g]});return delete b.href,delete b.width,delete b.height,Qe(b)}(t,l,n,e,r,o,i)}}if(!t.children)return t;let s=!1;const l=t.children.map(t=>{const l=$e(t,n,e,r,o,i);return l!==t&&(s=!0),l});return s?f(a({},t),{children:l}):t}function tr(t,n,e){const r={};return"translate"===t?r.translate=n:"rotate"===t?r.rotate=n:"skew"===t?r.skew=n:r.scale=n,e&&"translate"!==t&&(r.origin=e),r}function nr(t){var n,e;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const r=t,o=r.keyframes;if(o){const t={kind:"animated",keyframes:o.map(rr),autoOrient:r.autoOrient,loop:r.loop},e=null!=(n=r.value)?n:r.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const i=null!=(e=r.value)?e:r.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function er(t,n,e,r){var o,i,s,l;const c=t=>(null==r?void 0:r.I)&&null!=t?String(t):t;if("absent"===e.kind)return;if("static"===e.kind)return void(t[n]=c(e.value));const u=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,f=a({},u||{}),d={keyframes:e.keyframes};void 0!==e.loop&&(d.loop=e.loop),void 0!==e.autoOrient&&(d.autoOrient=e.autoOrient),f[n]=d,t.animate=f;const v=null!=(l=null!=(i=e.base)?i:null==(o=e.keyframes[0])?void 0:o.value)?l:null==(s=e.keyframes[0])?void 0:s.v;void 0!==v&&(t[n]=c(v))}function rr(t){if(!t||"object"!=typeof t)return t;const n=t;if(void 0===n.t&&void 0===n.v&&void 0===n.e&&void 0===n.to&&void 0===n.ti)return t;const e=a({},n);return void 0===e.time&&void 0!==n.t&&(e.time=n.t),void 0===e.value&&void 0!==n.v&&(e.value=n.v),void 0===e.easing&&void 0!==n.e&&(e.easing=n.e),void 0===e.tangentOut&&void 0!==n.to&&(e.tangentOut=n.to),void 0===e.tangentIn&&void 0!==n.ti&&(e.tangentIn=n.ti),e}function or(t,n){const e={value:n};return void 0!==t.time&&(e.time=t.time),void 0!==t.easing&&(e.easing=t.easing),void 0!==t.tangentOut&&(e.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(e.tangentIn=t.tangentIn),e}function ir(t,n,e){if(!n)return t;delete t.transform;let r=t;return r=lr(r,n.origin,!0),r=sr(r,"scale",n.scale),r=sr(r,"skew",n.skew),r=sr(r,"rotate",n.rotate),r=lr(r,n.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}(n.translate)?(r=lr(r,n.origin,!0),r=sr(r,"translate",n.translate),r=lr(r,n.origin,!1)):r=sr(r,"translate",n.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function sr(t,n,e,r){if(void 0===e)return t;const o=nr(e);if("static"===o.kind)return{type:"g",transform:{value:tr(n,o.value,void 0)},children:[t]};if("animated"===o.kind){const e={keyframes:o.keyframes.map(t=>or(t,tr(n,t.value,void 0)))};return o.autoOrient&&(e.autoOrient=!0),void 0!==o.loop&&(e.loop=o.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function lr(t,n,e){if(void 0===n)return t;const r=nr(n),o=t=>e?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const n={keyframes:r.keyframes.map(t=>or(t,{translate:o(t.value)}))};return void 0!==r.loop&&(n.loop=r.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function cr(t,n){return"_lw_"+n+"_"+t.nextId++}function ur(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function ar(t,n){var e;"string"==typeof t.id&&n.set(t.id,t),null==(e=t.children)||e.forEach(t=>ar(t,n))}var fr=Je;function dr(t,n,e){var r,o,i;if("use"===t.type&&"translate"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.without)){const r=ur(t.effects.clone.source);"string"==typeof r&&r&&!n.contentRefInnerIds.has(r)&&n.contentRefInnerIds.set(r,e(r))}null==(i=t.children)||i.forEach(t=>dr(t,n,e))}function vr(t){const n=/translate\(([^)]*)\)/.exec(t);if(!n)return[0,0];const e=n[1].split(/[\s,]+/).filter(Boolean).map(Number);return[e[0]||0,e[1]||0]}function yr(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||!!Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}function mr(t,n,e,r){if(!n)return t;const o=cr(e,"grad"),i=function(t,n){const e={type:t.type===Ut.radial?"radialGradient":"linearGradient",id:n};return t.type===Ut.linear?(pr(e,"x1","y1",t.start),pr(e,"x2","y2",t.end)):(pr(e,"cx","cy",t.center),function(t,n,e){const r=nr(e);"absent"!==r.kind&&er(t,"r",r,{I:!0})}(e,0,t.radius),pr(e,"fx","fy",t.focal)),t.gradientUnits&&(e.gradientUnits=t.gradientUnits),t.spreadMethod&&(e.spreadMethod=t.spreadMethod),t.gradientTransform&&(e.gradientTransform=t.gradientTransform),e.children=function(t){var n,e;if(!t)return[];const r=nr(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(hr):[];const o=r.keyframes;if(!o.length)return[];const i=r.loop;let s=0;for(const t of o){const n=Yt(t);Array.isArray(n)&&n.length>s&&(s=n.length)}if(!s)return[];const l=Yt(o[0]),c=[];for(let t=0;t<s;t++){const r=null!=(e=null!=(n=null==l?void 0:l[t])?n:gr(o,0,t))?e:{offset:t/Math.max(1,s-1),color:"#000000"};c.push({offset:r.offset,color:r.color})}return c.map((t,n)=>function(t,n,e,r,o){var i;const s=[],l=[];let c=!1;for(const r of n){const o=Kt(r),u=Yt(r),a=null!=(i=null==u?void 0:u[e])?i:gr(n,n.indexOf(r),e);if(!a)continue;const f=Ht(r),d={time:o,value:a.color};void 0!==f&&(d.easing=f),s.push(d);const v={time:o,value:a.offset};void 0!==f&&(v.easing=f),l.push(v),a.offset!==t.offset&&(c=!0)}const u={type:"stop",offset:br(t.offset),stopColor:t.color},a={};return s.length&&(a.stopColor={keyframes:s},void 0!==o&&(a.stopColor.loop=o)),c&&l.length&&(a.offset={keyframes:l},void 0!==o&&(a.offset.loop=o)),Object.keys(a).length&&(u.animate=a),u}(t,o,n,0,i))}(t.stops),e}(n,o);return e.defs.push(i),t[r]="url(#"+o+")",t}function pr(t,n,e,r){var o,i,s;const l=nr(r);if("absent"===l.kind)return;if("static"===l.kind)return t[n]=String(l.value[0]),void(t[e]=String(l.value[1]));const c=t=>{const n={keyframes:l.keyframes.map(n=>{const e={time:n.time,value:Array.isArray(n.value)?n.value[t]:void 0};return void 0!==n.easing&&(e.easing=n.easing),e})};return void 0!==l.loop&&(n.loop=l.loop),n},u=null!=(o=t.animate)?o:{};u[n]=c(0),u[e]=c(1),t.animate=u;const a=null!=(s=l.base)?s:null==(i=l.keyframes[0])?void 0:i.value;Array.isArray(a)&&(t[n]=String(a[0]),t[e]=String(a[1]))}function hr(t){return{type:"stop",offset:br(t.offset),stopColor:t.color}}function gr(t,n,e){for(let r=n;r>=0;r--){const n=Yt(t[r]);if(null==n?void 0:n[e])return n[e]}for(let r=n+1;r<t.length;r++){const n=Yt(t[r]);if(null==n?void 0:n[e])return n[e]}}function br(t){return Math.round(1e3*t)/10+"%"}function wr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function Ar(t,n,e){if(!n)return t;const r=function(t,n){var e;const r=nr(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(n.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(e=r.keyframes[0])?void 0:e.value)}(n.origin,e);let o=t;return o=kr(o,"translate",n.translate,void 0),o=kr(o,"rotate",n.rotate,r),o=kr(o,"scale",n.scale,r),o}function kr(t,n,e,r,o){if(void 0===e)return t;const i=nr("scale"===n&&Array.isArray(e)?[e[0]/100,e[1]/100]:e);if("static"===i.kind)return{type:"g",transform:{value:tr(n,jr(n,i.value),r)},children:[t]};if("animated"===i.kind){const e={keyframes:i.keyframes.map(t=>{const e=or(t,tr(n,jr(n,t.value),r));return"translate"===n?a(a({},e),Mr(t)):e})};return void 0!==i.loop&&(e.loop=i.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function jr(t,n){return"translate"===t?[-n[0],-n[1]]:"rotate"===t?-n:[1/n[0],1/n[1]]}function Mr(t){var n,e;const r={},o=null!=(n=t.tangentOut)?n:t.to,i=null!=(e=t.tangentIn)?e:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function xr(t){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!n||!n.transform)}function Or(t){let n=0,e=0;for(const r of t)r.translate&&(n+=r.translate[0],e+=r.translate[1]);return[n,e]}function Sr(t,n){let e=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Nr(o.translateKeyframes,n);e+=t[0],r+=t[1]}else o.translate&&(e+=o.translate[0],r+=o.translate[1]);return[e,r]}function Nr(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function zr(t,n){var e,r,o;const i=t.transform,s=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!s)return;const l={};if("string"==typeof i){const t=function(t,n){const e=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,s=!1,l=!1;for(;null!==(r=e.exec(t));){const t=r[1],n=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=n[0]||0,i+=n[1]||0,s=!0):l=!0}return l&&n.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),s?[o,i]:void 0}(i,n);t&&(l.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes){const t=i.value,e=t&&"object"==typeof t?t:i;e&&"object"==typeof e&&Array.isArray(e.translate)&&(l.translate=[e.translate[0]||0,e.translate[1]||0]),!e||void 0===e.rotate&&void 0===e.scale&&void 0===e.skew||n.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(s&&Array.isArray(s.keyframes)){const t=s.keyframes,i=[];for(const s of t){const t=null!=(e=s.value)?e:s.v,l=null!=(o=null!=(r=s.time)?r:s.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:l,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||n.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(l.translateKeyframes=i)}return l.translate||l.translateKeyframes?l:void 0}function Pr(t,n,e){if(!n)return;const r=ur(n.source);if(!r)return void(n.without===Ct.translate&&e.errors.push("clone: content ref missing `source`"));const o=n.without===Ct.translate&&e.contentRefInnerIds.get(r)||r;t.href="#"+o}function Tr(t,n){const e={};return void 0!==t.translate&&(e.translate=Cr(t.translate,t=>[t[0]*n,t[1]*n])),void 0!==t.rotate&&(e.rotate=Cr(t.rotate,t=>t*n)),void 0!==t.skew&&(e.skew=Cr(t.skew,t=>t*n)),void 0!==t.scale&&(e.scale=function(t,n){return Cr(t,t=>[Math.pow(t[0],n),Math.pow(t[1],n)],!0)}(t.scale,n)),void 0!==t.origin&&(e.origin=t.origin),Object.keys(e).length?e:void 0}function Cr(t,n,e=!1){const r=nr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=n(r.value);return"number"!=typeof t&&!Array.isArray(t)||e?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?f(a({},t),{value:n(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=n(r.base)),o}var _r=!1;function Dr(t){var n,e;return{start:null!=(n=t.start)?n:0,stretch:null!=(e=t.stretch)?e:1}}var Lr=1;function Rr(t,n,e){const[r,o]=n;if(!Number.isFinite(r)||!Number.isFinite(o))return void e.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-Lr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Lr,value:0}],s=a({},t);for(const n of Object.keys(t))delete t[n];t.type="g",t.children=[s],t.animate={opacity:{keyframes:i}}}function Fr(t,n){return{start:n.start+n.stretch*t.start,stretch:n.stretch*t.stretch}}function Ir(t){var n,e;return null==(e=null==(n=t.effects)?void 0:n.clone)?void 0:e.retime}function Vr(t){var n;const e=null==(n=t.effects)?void 0:n.clone;e&&(delete e.retime,0===Object.keys(e).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function Br(t,n,e){const r=ur(t.href);if(!r)return void e.errors.push("retime: <use> has no href to follow");const o=Er(r,n,e,new Set);if(o)if(_r){const n=e.idMap.get(o);t.type="g",delete t.href,t.children=[n],Qe(t),e.defs=e.defs.filter(t=>t!==n)}else t.href="#"+o}function Er(t,n,e,r){if(r.has(t))return void e.errors.push('retime: loop via "'+t+'"');const o=e.idMap.get(t);if(!o)return void e.warnings.push('retime: target "'+t+'" not found');const i=fr(o);if(function(t,n){Xe(t,()=>cr(n,"retimed"))}(i,e),"use"===o.type?Gr(i,n.start,n.stretch):Ur(i,n.start,n.stretch),Vr(i),"use"===o.type&&o.href){const s=ur(o.href);if(s){const l=Ir(o),c=l?Fr(Dr(l),n):n,u=new Set(r);u.add(t);const a=Er(s,c,e,u);a&&(i.href="#"+a)}}else!function(t,n,e,r,o){const i=t=>{var s;const l=Ir(t);if("use"===t.type&&l&&t.href){const i=ur(t.href);if(i){const s=Fr(Dr(l),n),c=new Set(r);c.add(o);const u=Er(i,s,e,c);u&&(t.href="#"+u)}Vr(t)}null==(s=t.children)||s.forEach(i)};i(t)}(i,n,e,r,t);return e.defs.push(i),"string"==typeof i.id&&e.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Ur(t,n,e){var r;Gr(t,n,e),null==(r=t.children)||r.forEach(t=>Ur(t,n,e))}function Gr(t,n,e){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=n+r.time*e)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const n of Object.keys(t.animate)){const e=t.animate[n];e&&Array.isArray(e.keyframes)&&r(e.keyframes)}}var Zr=48,Wr=/[MmLlHhVvCcSsQqTtAaZz]/;function Jr(t,n,e){return{P1:[t[0]+2/3*(n[0]-t[0]),t[1]+2/3*(n[1]-t[1])],P2:[e[0]+2/3*(n[0]-e[0]),e[1]+2/3*(n[1]-e[1])]}}function Xr(t){const n=function(t){const n=function(t){const n=[],e=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=e.exec(t));)n.push(r[0]);return n}(t),e=[];let r=0,o=0,i=0,s=0,l=0,c=0,u=0,a=0,f=0,d="";const v=()=>parseFloat(n[r++]),y=(t,n,r)=>{const s=[o,i],l=U(s,t,n,r,Zr);e.push({P0:s,P1:t,P2:n,P3:r,T:l,V:l.ds[l.ds.length-1]}),o=r[0],i=r[1]},m=(t,n)=>{y([o+(t-o)/3,i+(n-i)/3],[o+2*(t-o)/3,i+2*(n-i)/3],[t,n])};for(;r<n.length;){let t=n[r];Wr.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const e=t>="a",p=t.toUpperCase();if("Z"!==p){if("M"===p){const n=v()+(e?o:0),r=v()+(e?i:0);o=n,i=r,s=n,l=r,d=t;continue}if("L"===p)m(v()+(e?o:0),v()+(e?i:0));else if("H"===p)m(v()+(e?o:0),i);else if("V"===p)m(o,v()+(e?i:0));else if("C"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];c=n[0],u=n[1],y(t,n,r)}else if("S"===p){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-c,2*i-u]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];c=n[0],u=n[1],y(t,n,r)}else if("Q"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=Jr([o,i],t,n);y(r,s,n)}else if("T"===p){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-a,2*i-f]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=Jr([o,i],t,n);y(r,s,n)}else{if("A"!==p){r++;continue}r+=5,m(v()+(e?o:0),v()+(e?i:0))}d=t}else m(s,l),o=s,i=l,d=t}return e.length?e:null}(t);if(!n)return null;const e=new Float64Array(n.length+1);for(let t=0;t<n.length;t++)e[t+1]=e[t]+n[t].V;const r=e[n.length],o=n[0].P0,i=n[n.length-1].P3,s=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,l=t=>{let r=0;for(;r<n.length-1&&t>e[r+1];)r++;const o=n[r],i=t-e[r],s=o.V>0?function(t,n){const{ts:e,ds:r}=t,o=r.length-1;if(n<=0)return e[0];if(n>=r[o])return e[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;r[t]<n?i=t+1:s=t}const l=r[s-1],c=r[s]-l,u=c>0?(n-l)/c:0;return e[s-1]+u*(e[s]-e[s-1])}(o.T,i):0,[l,c]=I(o.P0,o.P1,o.P2,o.P3,s),[u,a]=B(o.P0,o.P1,o.P2,o.P3,s);return{x:l,y:c,angle:Math.atan2(a,u)}};return{totalLength:r,closed:s,sampleAtDistance(t){if(s&&r>0&&(t<0||t>r))return l((t%r+r)%r);if(!s&&(t<0||t>r)){const n=t<0?0:r,e=l(n),o=t-n;return{x:e.x+Math.cos(e.angle)*o,y:e.y+Math.sin(e.angle)*o,angle:e.angle}}return l((e=r,(n=t)<0?0:n>e?e:n));var n,e}}}var qr=.15;function Qr(t){const n=nr(t);if("static"===n.kind&&"number"==typeof n.value)return{min:n.value,max:n.value};if("animated"===n.kind&&n.keyframes.length){const t=n.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function Kr(t){let n=0,e=16;const r=t=>{var o,i;const s=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;s&&(e=Math.max(e,s));const l=null!=(i=t.text)?i:t.textContent;if("string"==typeof l&&(n+=l.length),t.children)for(const n of t.children)r(n)};return r(t),n*e}var Yr=t=>Math.round(1e3*t)/1e3;function Hr(t,n,e){null!=e&&er(t,n,nr(e),{I:!0})}var $r=(t,n,e)=>{const r={type:t};for(const t in n)void 0!==n[t]&&(r[t]=n[t]);const o=Array.isArray(e)?e.filter(t=>null!=t):null!=e?[e]:[];return o.length&&(r.children=o),r};function to(t,n){return Math.round(t)===t?""+Math.round(t):t.toFixed(n)}function no(t,n){let e="";for(let r=0;r<t.length;r++){const o=to(t[r],n);r>0&&45!==o.charCodeAt(0)&&(e+=" "),e+=o}return e}function eo(t,n,e){return[t[0]*n+t[2]*e+t[4],t[1]*n+t[3]*e+t[5]]}var ro=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function oo(t,n,e=2){const r=[];let o;for(ro.lastIndex=0;null!==(o=ro.exec(t));)r.push(o[0]);let i="",s=0;const l=()=>parseFloat(r[s++]);for(;s<r.length;){const t=r[s++];if("M"===t||"L"===t){const[r,o]=eo(n,l(),l());i+=t+no([r,o],e)}else if("C"===t){const[t,r]=eo(n,l(),l()),[o,s]=eo(n,l(),l()),[c,u]=eo(n,l(),l());i+="C"+no([t,r,o,s,c,u],e)}else if("Q"===t){const[t,r]=eo(n,l(),l()),[o,s]=eo(n,l(),l());i+="Q"+no([t,r,o,s],e)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var io=16,so=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Dt,Lt,"xml:space"],lo=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],co=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function uo(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return isNaN(n)?void 0:n}}function ao(t){return"string"==typeof t?t:void 0}function fo(t){const n=t.animate;if(!n||"object"!=typeof n)return;let e;for(const t of co)void 0!==n[t]&&((null!=e?e:e={})[t]=n[t]);return e}function vo(t,n){var e,r,o,i,s,l,c,u,a,f;const d="text"===t.type,v=t.style,y=n=>{var e;return d?void 0:null!=(e=t[n])?e:null==v?void 0:v[n]},m={fontFamily:null!=(e=ao(t.fontFamily))?e:n.fontFamily,fontSize:null!=(r=uo(t.fontSize))?r:n.fontSize,fill:null!=(o=t.fill)?o:n.fill,stroke:null!=(i=t.stroke)?i:n.stroke,strokeWidth:null!=(s=t.strokeWidth)?s:n.strokeWidth,letterSpacing:null!=(l=uo(t.letterSpacing))?l:n.letterSpacing,wordSpacing:null!=(c=uo(t.wordSpacing))?c:n.wordSpacing,opacity:null!=(u=uo(y("opacity")))?u:n.opacity,animate:null!=(a=d?void 0:fo(t))?a:n.animate};for(const t of lo){const e=null!=(f=y(t))?f:n[t];void 0!==e&&(m[t]=e)}return m}function yo(t){var n,e,r;return{fontFamily:ao(t.fontFamily),fontSize:null!=(n=uo(t.fontSize))?n:io,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(e=uo(t.letterSpacing))?e:0,wordSpacing:null!=(r=uo(t.wordSpacing))?r:0}}function mo(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(n.opacity=t.opacity);for(const e of lo)void 0!==t[e]&&(n[e]=t[e]);return void 0!==t.animate&&(n.animate=t.animate),n}function po(t,n,e,r){var o;const i=t.fontFamily?n[t.fontFamily]:e;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function ho(t){const n=Object.keys(t);return 1===n.length?t[n[0]]:void 0}var go=.6,bo="px-missing-glyph";function wo(t,n){if(t<=0||n<=0)return"";const e=.08*t,r=.92*t,o=.92*-n,i=r-e,s=-o,l=Math.max(1,.12*Math.min(i,s)),c="M"+e+" 0L"+r+" 0L"+r+" "+o+"L"+e+" "+o+"Z";if(i<=2*l||s<=2*l)return c;const u=e+l,a=r-l,f=-l,d=o+l;return c+"M"+u+" "+f+"L"+u+" "+d+"L"+a+" "+d+"L"+a+" "+f+"Z"}function Ao(t,n,e,r,o=0){const{x:i,y:s,angle:l}=t.sampleAtDistance(n),c=Math.cos(l),u=Math.sin(l),a=r/2;return[e*c,e*u,-e*u,e*c,i-e*c*a-o*u,s-e*u*a+o*c]}function ko(t){var n;const e=nr(t);if("animated"===e.kind&&e.keyframes.length>=2){const t=[...e.keyframes].sort((t,n)=>(Number(t.time)||0)-(Number(n.time)||0)),n=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,B:n,loop:e.loop,at(t){if(t<=n[0])return r[0];for(let e=1;e<n.length;e++)if(t<=n[e]){const o=n[e]-n[e-1],i=o>0?(t-n[e-1])/o:1;return r[e-1]+i*(r[e]-r[e-1])}return r[r.length-1]}}}const r="animated"===e.kind?Number(null==(n=e.keyframes[0])?void 0:n.value)||0:"static"===e.kind&&Number(e.value)||0;return{animated:!1,B:[],at:()=>r}}var jo=48,Mo=64;function xo(t,n){const e=c(10,n);return Math.round(t*e)/e}function Oo(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(n.opacity=t.opacity);for(const e of lo)void 0!==t[e]&&(n[e]=t[e]);return n}function So(t){return t?{[Rt]:bo}:{}}function No(t,n,e){if(!t.length)return null==e||e.push("textGlyphs: nothing to render"),[];const r=new Map;for(const n of t){const t=JSON.stringify([n.U,!!n.G]),e=oo(n.Z,n.m),o=r.get(t);o?o.d+=e:r.set(t,{U:n.U,d:e,G:n.G})}const o=[];for(const{U:t,d:e,G:i}of r.values())o.push(n("path",a(a(a({d:e},Oo(t)),So(i)),void 0!==t.animate?{animate:a({},t.animate)}:{}),[]));return o}function zo(t,n,e){const r={};for(const n of Object.keys(t))"type"!==n&&"children"!==n&&-1===so.indexOf(n)&&(r[n]=t[n]);if(r.style&&"object"==typeof r.style){const t=a({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return e("g",r,n)}function Po(t,n){const e=f(a({},t),{type:"g",children:n});return delete e.d,delete e.strokeDasharray,delete e.strokeDashoffset,delete e.effects,e}function To(t,n,e,r,o,i,s,l){const c=_o(r,e,o),u=Do(e,o),a=Ro(i,c),f=Ro(s,u),d=Vo(s),v={type:"path",d:y(n)};return Fo(v,"strokeDasharray",f),Fo(v,"strokeDashoffset",a),Fo(v,"strokeOpacity",d),[v]}var Co=1;function _o(t,n,e){const[r]=Lo(e);return e=>n*(-e-r+t)+Co}function Do(t,n){const[e,r]=Lo(n),o=r-e+1;return n=>{const e=F(n[0],0,1),r=F(n[1],0,1),i=Math.min(e,r),s=Math.max(e,r),l=[0];let c=Co;for(let n=0;n<o;n++)l.push(c+i*t),l.push((s-i)*t),c=(1-s)*t;return l.push(c+Co),l}}function Lo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Ro(t,n){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:n(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:Kt(t),value:n(Yt(t)),easing:Ht(t)})),loop:t.loop}}function Fo(t,n,e){e&&er(t,n,e)}var Io=10;function Vo(t){const n=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return n(t.value)?{kind:"static",value:0}:void 0;const e=t.keyframes;let r=!1,o=!0;for(const t of e)n(Yt(t))?r=!0:o=!1;if(!r)return;if(o)return{kind:"static",value:0};const i=[];for(let t=0;t<e.length;t++){const r=e[t],o=t>0?e[t-1]:void 0,s=t<e.length-1?e[t+1]:void 0,l=Kt(r),c=n(Yt(r)),u=o?c&&n(Yt(o)):c,a=s?c&&n(Yt(s)):c;u&&!a?(i.push({time:l,value:0}),i.push({time:l+Io,value:1})):!u&&a&&(i.push({time:l-Io,value:1}),i.push({time:l,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function Bo(t,n){const e=e=>{const r=(e-t.time)/(n.time-t.time),o=t.value[0]+(n.value[0]-t.value[0])*r;return t.value[1]+(n.value[1]-t.value[1])*r-o};let r=t.time,o=n.time,i=e(r);if(0===i)return r;const s=e(o);if(0===s)return o;if(i*s>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,n=e(t);if(0===n||Math.abs(o-r)<1e-4)return t;i*n<0?o=t:(r=t,i=n)}return(r+o)/2}function Eo(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Uo(t){const n=t.v;if(!n||n.length<2)return 0;let e=0;for(let r=0;r<n.length-1;r++)e+=Go(t,r,r+1);return t.c&&n.length>1&&(e+=Go(t,n.length-1,0)),e}function Go(t,n,e){var r,o,i,s;const l=t.v,c=l[n],u=l[e],a=U(c,null!=(o=null==(r=t.o)?void 0:r[n])?o:c,null!=(s=null==(i=t.i)?void 0:i[e])?s:u,u);return a.ds[a.ds.length-1]}var Zo=.5522847498307936;function Wo(t){var n,e;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:Ot(null==(n=Gt(t))?void 0:n.engine),glyphs:null==(e=Wt(t))?void 0:e.fonts},o=fr(t);ar(o,r.idMap),dr(o,r,()=>cr(r,"inner")),function(t,n){const e=new Set,r=t=>{var o,i;const s=ur(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.source);if("string"==typeof s){e.add(t);const r=n.idMap.get(s);r&&e.add(r)}if(Array.isArray(t.children))for(const n of t.children)r(n)};if(r(t),0===e.size)return;const o=(t,r)=>{if(e.has(t)&&n.maskAncestorChains.set(t,r),Array.isArray(t.children)){const e=zr(t,n),i=e?[...r,e]:r;for(const n of t.children)o(n,i)}};o(t,[])}(o,r);const i=function(t,n){return function(t,n){n.idMap.clear(),ar(t,n.idMap);const e=[],r=t=>{var n;Ir(t)&&e.push(t),null==(n=t.children)||n.forEach(r)};r(t);const o=new Map;for(const t of e){let e=0;const r=new Set,i=o=>{var s;if(o){if(o!==t&&Ir(o)&&e++,"use"===o.type&&o.href){const t=ur(o.href);t&&!r.has(t)&&(r.add(t),i(n.idMap.get(t)))}null==(s=o.children)||s.forEach(i)}},s=ur(t.href);s&&(r.add(s),i(n.idMap.get(s))),o.set(t,e)}e.sort((t,n)=>{var e,r;return(null!=(e=o.get(n))?e:0)-(null!=(r=o.get(t))?r:0)});for(const t of e){const e=Ir(t);if(!e)continue;const r=e.timeCrop;Vr(t),Br(t,Dr(e),n),r&&Rr(t,r,n)}}(t,n),t}(Jo(o,r),r);return function(t,n){n.length&&(t.children||(t.children=[])).unshift({type:"defs",children:n})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Jo(t,n){t.children&&(t.children=t.children.map(t=>Jo(t,n)));const e=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?n.contentRefInnerIds.get(r):void 0;if(!e&&!o)return t;const{transformBy:i,repeater:s,maskedBy:l,clipPath:c,strokeTrim:u,clone:d,fillGradient:v,strokeGradient:y,textPath:m,text:p}=null!=e?e:{};e&&delete t.effects;let h=t,g=!1;if(null==p?void 0:p.useGlyphs)if(m){const t="string"==typeof m.pathData?m.pathData:void 0,e=function(t,n,e,r,o,i){return n.glyphs?function(t,n,e,r,o,i){const{glyphs:s,create:l=$r,warnings:c}=r,u=n?Xr(n):null;if(!u)return null==c||c.push("textGlyphs: unparsable along-path geometry"),null;const d=ho(s),{cells:v,width:y}=function(t,n,e,r){const o=[];let i=0;const s=(t,l)=>{var c,u,a;const f=vo(t,l),d=null!=(c=ao(t[Lt]))?c:ao(t[Dt]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=po(f,n,e,r);if(t){const n=f.fontSize/t.unitsPerEm,e=null!=(a=t.ascent)?a:.9*t.unitsPerEm,r=mo(f);for(let s=0;s<d.length;s++){const l=d.charAt(s),c=t.glyphs[l];if(c&&c.d){const t=c.width*n;o.push({Z:c.d,W:c.width,scale:n,U:r,J:i+t/2}),i+=t}else if(/\S/.test(l)){const s=c&&c.width>0?c.width:go*t.unitsPerEm,l=s*n;o.push({Z:wo(s,e),W:s,scale:n,U:r,G:!0,J:i+l/2}),i+=l}else i+=(c?c.width:0)*n;i+=f.letterSpacing+(" "===l?f.wordSpacing:0)}}}if(t.children)for(const n of t.children)s(n,f)};return s(t,yo(t)),{cells:o,width:i}}(t,s,d,c);if(!v.length)return zo(t,[],l);const{X:m,q:p}=function(t){var n,e,r;return{X:(null!=(n=uo(t.x))?n:0)+(null!=(e=uo(t.dx))?e:0),q:null!=(r=uo(t.dy))?r:0}}(t),h=ko(e),g=ko(o),b=t=>t>0&&y>0?t/y:1,w="clip"===i&&!u.closed;if(h.animated||g.animated){const n=function(t,n){const e=[...t,...n].sort((t,n)=>t-n),r=[];for(const t of e)r.length&&t===r[r.length-1]||r.push(t);return r}(h.B,g.B),e=(t,n)=>m+h.at(n)+b(g.at(n))*t.J,r=h.animated?h.loop:g.loop;return zo(t,function(t,n,e,r,o,i,s,l=0){const c=Math.max(n.totalLength/jo,.5),u=t=>t>=0&&t<=n.totalLength,d=[];for(const v of t){const t=[v.scale,0,0,v.scale,-v.scale*(v.W/2),0],y=oo(v.Z,t),m=(t,e)=>{const{x:r,y:o,angle:i}=n.sampleAtDistance(t),s=Math.cos(i),c=Math.sin(i);return{time:e,value:{translate:[xo(r-l*c,3),xo(o+l*s,3)],rotate:xo(180*i/Math.PI,3)}}},p=[],h=[],g=(t,n)=>{p.push(m(t,n)),s&&h.push({time:n,value:u(t)?1:0})};g(e(v,r[0]),r[0]);for(let t=1;t<r.length;t++){const n=r[t-1],o=r[t],i=e(v,n),s=e(v,o),l=Math.min(Mo,Math.max(1,Math.ceil(Math.abs(s-i)/c)));for(let t=1;t<=l;t++){const r=n+t/l*(o-n);g(e(v,r),r)}}ye(p);const b={keyframes:p};void 0!==o&&(b.loop=o);const w={transform:b};if(v.U.animate&&Object.assign(w,v.U.animate),s&&h.some(t=>0===t.value)){const t={keyframes:h};void 0!==o&&(t.loop=o),w.opacity=t}d.push(i("path",f(a(a({d:y},Oo(v.U)),So(v.G)),{animate:w}),[]))}return d}(v,u,e,n,r,l,w,p),l)}const A=b(g.at(0)),k=m+h.at(0);return zo(t,No((w?v.filter(t=>{const n=k+t.J*A;return n>=0&&n<=u.totalLength}):v).map(t=>({Z:t.Z,U:t.U,G:t.G,m:Ao(u,k+t.J*A,t.scale,t.W,p)})),l,c),l)}(t,e,r,{glyphs:n.glyphs,warnings:n.warnings},o,i):(n.warnings.push("textGlyphs: no definitions.fonts"),null)}(h,n,t,m.startOffset,m.textLength,m.pathOverflow);e&&(h=e,g=!0)}else h=function(t,n,e){return(null==n?void 0:n.useGlyphs)?e.glyphs?function(t,n){var e,r,o,i;const{glyphs:s,create:l=$r,warnings:c}=n,u=ho(s),a={x:null!=(e=uo(t.x))?e:0,y:null!=(r=uo(t.y))?r:0},f=[],d=[{start:a.x,end:a.x}];let v=0;const y=(t,n)=>{var e;const r=po(n,s,u,c),o=(null==r?void 0:r.unitsPerEm)||1e3,i=n.fontSize/o,l=null!=(e=null==r?void 0:r.ascent)?e:.9*o,y=mo(n);for(let e=0;e<t.length;e++){const s=t.charAt(e),c=null==r?void 0:r.glyphs[s];if(c&&c.d)f.push({Z:c.d,m:[i,0,0,i,a.x,a.y],U:y,line:v,x:a.x,y:a.y,scale:i}),a.x+=c.width*i;else if(/\S/.test(s)){const t=c&&c.width>0?c.width:go*o;f.push({Z:wo(t,l),m:[i,0,0,i,a.x,a.y],U:y,G:!0,line:v,x:a.x,y:a.y,scale:i}),a.x+=t*i}else a.x+=(c?c.width:0)*i;a.x+=n.letterSpacing+(" "===s?n.wordSpacing:0),d[v].end=a.x}},m=(t,n)=>{var e,r,o,i;const s=vo(t,n),l=uo(t.x),c=uo(t.y);void 0!==l&&(a.x=l,v=d.length,d.push({start:a.x,end:a.x})),void 0!==c&&(a.y=c),a.x+=null!=(e=uo(t.dx))?e:0,a.y+=null!=(r=uo(t.dy))?r:0;const u=null!=(o=ao(t[Lt]))?o:ao(t[Dt]);if(u&&!(null==(i=t.children)?void 0:i.length)&&y(u,s),t.children)for(const n of t.children)m(n,s)},p=yo(t);if(t.children)for(const n of t.children)m(n,p);const h=null!=(o=ao(t[Lt]))?o:ao(t[Dt]);h&&!(null==(i=t.children)?void 0:i.length)&&y(h,p);const g=ao(t.textAnchor);if("middle"===g||"end"===g)for(const t of f){const n=d[t.line].end-d[t.line].start,e="middle"===g?-n/2:-n;t.m=[t.scale,0,0,t.scale,t.x+e,t.y]}return zo(t,No(f,l,c),l)}(t,{glyphs:e.glyphs,warnings:e.warnings}):(e.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}(h,p,n),g=!0;return g||(h=function(t,n,e){var r;if(!n||"string"!=typeof n.pathData||!n.pathData)return t;const o=cr(e,"tpath"),{d:i,startShift:s}=function(t,n){var e;if("clip"===n.pathOverflow)return{d:t,startShift:0};const r=Xr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=qr*o,s=Qr(n.startOffset),l=Qr(n.textLength).max||(null!=(e=n.advance)?e:0),c=Math.max(0,-s.min),u=Math.max(0,s.max+l-o),a=c>0?c+i:0,f=u>0?u+i:0;if(f<=0&&a<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),v=r.sampleAtDistance(o);let y=t;if(a>0){const n=d.x-Math.cos(d.angle)*a,e=d.y-Math.sin(d.angle)*a,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");y="M"+Yr(n)+","+Yr(e)+"L"+Yr(d.x)+","+Yr(d.y)+r}if(f>0){const t=v.x+Math.cos(v.angle)*f,n=v.y+Math.sin(v.angle)*f;y+="L"+Yr(t)+","+Yr(n)}return{d:y,startShift:a}}(n.pathData,{pathOverflow:n.pathOverflow,startOffset:n.startOffset,textLength:n.textLength,advance:Kr(t)});e.defs.push({type:"path",id:o,d:i});const l={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==n.lengthAdjust&&(l.lengthAdjust=n.lengthAdjust),void 0!==n.method&&(l.method=n.method),void 0!==n.spacing&&(l.spacing=n.spacing),Hr(l,"startOffset",function(t,n){if(!n||null==t)return t;const e=nr(t);if("absent"===e.kind)return t;if("static"===e.kind)return"number"==typeof t?e.value+n:{value:e.value+n};const r={keyframes:e.keyframes.map(t=>f(a({},t),{value:(Number(t.value)||0)+n}))};return void 0!==e.loop&&(r.loop=e.loop),void 0!==e.autoOrient&&(r.autoOrient=e.autoOrient),void 0!==e.base&&(r.value=e.base+n),r}(n.startOffset,s)),Hr(l,"textLength",n.textLength),t.children=[l],t}(h,m,n)),h=function(t,n,e){return mr(t,n,e,"fill")}(h,v,n),h=function(t,n,e){return mr(t,n,e,"stroke")}(h,y,n),h=function(t,n){if(!n)return t;const e=n.subPaths===_t.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const n of t.children)o(n);return}const n="string"==typeof t.d?t.d:function(t){var n,e,r,o,i,s,l,c,u,a;if("rect"===t.type){const i=Number(null!=(n=t.x)?n:0),s=Number(null!=(e=t.y)?e:0),l=Number(null!=(r=t.width)?r:0),c=Number(null!=(o=t.height)?o:0);return"M"+(i+l)+","+s+"L"+(i+l)+","+(s+c)+"L"+i+","+(s+c)+"L"+i+","+s+"L"+(i+l)+","+s+"z"}if("ellipse"===t.type||"circle"===t.type){const n=Number(null!=(i=t.cx)?i:0),e=Number(null!=(s=t.cy)?s:0),r="circle"===t.type?Number(null!=(l=t.r)?l:0):Number(null!=(c=t.rx)?c:0),o="circle"===t.type?Number(null!=(u=t.r)?u:0):Number(null!=(a=t.ry)?a:0);if(!(r>0&&o>0))return;const f=r*Zo,d=o*Zo,v=(t,n,e,r,o,i)=>"C"+t+","+n+" "+e+","+r+" "+o+","+i;return"M"+(n+r)+","+e+v(n+r,e+d,n+f,e+o,n,e+o)+v(n-f,e+o,n-r,e+d,n-r,e)+v(n-r,e-d,n-f,e-o,n,e-o)+v(n+f,e-o,n+r,e-d,n+r,e)+"z"}}(t);if(void 0===n)return;const e=Pe(n);if(!e.length)return;const i={leaf:t,K:[]};for(const t of e){const n=Uo(t);i.K.push({Y:t,H:n,$:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const s=e?[...r].reverse():r;for(const t of s)for(const n of t.K)e||(i=0),n.$=i,i+=n.H;const l=i;if(e&&l<.001)return t;const c=nr(n.offset),u="absent"===c.kind?{kind:"static",value:0}:c,d=function(t){const n=nr(t);if("animated"!==n.kind)return n;const e=n.keyframes.map(t=>({time:Kt(t),value:Yt(t),easing:Ht(t)}));if(!e.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:e.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<e.length;t++){const n=e[t-1],o=e[t];if((n.value[1]-n.value[0])*(o.value[1]-o.value[0])<0){const t=Bo(n,o);null!==t&&t>n.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,n)=>t-n),i=[];let s=0;for(const t of e){for(;s<o.length&&o[s]<t.time;){const t=o[s++],n=Eo(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}const n=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:n,easing:t.easing})}for(;s<o.length;){const t=o[s++],n=Eo(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(n.range),v="absent"===d.kind?{kind:"static",value:[0,1]}:d,y=function(t){if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const n=[];for(const e of t.keyframes){const t=Yt(e);"number"==typeof t&&n.push(t)}return n}(u),m=[y.length?Math.min(...y):0,y.length?Math.max(...y):0];if(1===r.length&&r[0].leaf===t&&1===r[0].K.length){const n=r[0],o=n.K[0],i=e?l:o.H;if(i<.001)return t;const s=e?o.$/i:0;return function(t,n,e,r,o,i){const s=_o(e,n,r),l=Do(n,r),c=a({},t);return delete c.effects,Fo(c,"strokeDasharray",Ro(i,l)),Fo(c,"strokeDashoffset",Ro(o,s)),Fo(c,"strokeOpacity",Vo(i)),c}(n.leaf,i,s,m,u,v)}const p=new Map;for(const t of r){const n=[];for(const r of t.K){const o=e?l:r.H;if(o<.001)continue;const i=e?r.$/o:0;n.push(...To(t.leaf,r.Y,o,i,m,u,v))}p.set(t.leaf,Po(t.leaf,n))}const h=t=>p.get(t)||(Array.isArray(t.children)&&t.children.length>0?f(a({},t),{children:t.children.map(h)}):t);return h(t)}(h,u),h=function(t,n,e){var r,o;if(!n)return t;const i=null!=(r=n.copies)?r:1;if(i<1)return e.errors.push("repeater.copies invalid: "+n.copies),t;const s=t.transform,l=null==(o=t.animate)?void 0:o.transform,c=fr(t);delete c.transform,c.animate&&(delete c.animate.transform,0===Object.keys(c.animate).length&&delete c.animate),delete c.id;const u=[c];for(let t=1;t<i;t++){const e=fr(c),r=Tr(n,t),o=r?ir(e,r):e;u.push(o)}const a={type:"g",children:u};return t.id&&(a.id=t.id),void 0!==s&&(a.transform=s),void 0!==l&&(a.animate={transform:l}),a}(h,s,n),h=function(t,n,e,r){if(!n)return t;const o=ur(n.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=cr(r,"mask");let s={type:"use",href:"#"+o};if(e)s=Ar(s,e,r);else if(xr(t))s=function(t,n){var e;const r=n.animate&&"object"==typeof n.animate&&!Array.isArray(n.animate)?n.animate:void 0,o=null==r?void 0:r.transform,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const s=[],l=[],c=[];for(const t of i){const n=(null!=(e=t.value)?e:t.v)||{},r=or(t,void 0);if(Array.isArray(n.translate)&&s.push(f(a(a({},r),Mr(t)),{value:{translate:[-n.translate[0],-n.translate[1]]}})),"number"==typeof n.rotate){const t={rotate:-n.rotate};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),l.push(f(a({},r),{value:t}))}if(Array.isArray(n.scale)){const t={scale:[1/n.scale[0],1/n.scale[1]]};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),c.push(f(a({},r),{value:t}))}}const u=null==o?void 0:o.loop,d=t=>{const n={keyframes:t};return void 0!==u&&(n.loop=u),n};let v=t;return s.length&&(v={type:"g",animate:{transform:d(s)},children:[v]}),l.length&&(v={type:"g",animate:{transform:d(l)},children:[v]}),c.length&&(v={type:"g",animate:{transform:d(c)},children:[v]}),v}(s,t);else{const n=function(t){if("string"==typeof t.transform){const n=function(t){var n,e,r,o,i,s,l,c,u,a,f,d,v;const y=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let m;const p=[];for(;null!==(m=y.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);p.push({name:m[1],tt:t})}if(!p.length)return;const h=p[p.length-1];if("translate"===h.name)for(let t=p.length-2;t>=0;t--){const a=p[t];if("translate"!==a.name)continue;const f=null!=(n=a.tt[0])?n:0,d=null!=(e=a.tt[1])?e:0,v=null!=(r=h.tt[0])?r:0,y=null!=(o=h.tt[1])?o:0;if(v!==-f||y!==-d)continue;const m={};m.origin=[f,d];for(let n=0;n<t;n++)if("translate"===p[n].name){const t=null!=(i=p[n].tt[0])?i:0,e=null!=(s=p[n].tt[1])?s:0;m.translate=m.translate?[m.translate[0]+t,m.translate[1]+e]:[t,e]}for(let n=t+1;n<p.length-1;n++){const t=p[n];if("rotate"===t.name)m.rotate=(null!=(l=m.rotate)?l:0)+(null!=(c=t.tt[0])?c:0);else if("scale"===t.name){const n=null!=(u=t.tt[0])?u:1,e=t.tt.length>1?t.tt[1]:n;m.scale=m.scale?[m.scale[0]*n,m.scale[1]*e]:[n,e]}}return m}let g,b,w;for(const t of p)if("translate"===t.name){const n=null!=(a=t.tt[0])?a:0,e=null!=(f=t.tt[1])?f:0;g=g?[g[0]+n,g[1]+e]:[n,e]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.tt[0])?d:0);else if("scale"===t.name){const n=null!=(v=t.tt[0])?v:1,e=t.tt.length>1?t.tt[1]:n;w=w?[w[0]*n,w[1]*e]:[n,e]}const A={};return g&&(A.translate=g),void 0!==b&&(A.rotate=b),w&&(A.scale=w),Object.keys(A).length?A:void 0}(t.transform);if(!n)return;const e={};return n.translate&&(e.translate=n.translate),void 0!==n.rotate&&(e.rotate=n.rotate),n.scale&&(e.scale={value:n.scale}),n.origin&&(e.origin=n.origin),Object.keys(e).length?e:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const n=t.transform.value,e=n&&"object"==typeof n?n:t.transform;if(e&&"object"==typeof e){const t={};return Array.isArray(e.translate)&&(t.translate=e.translate),"number"==typeof e.rotate&&(t.rotate=e.rotate),"number"==typeof e.skew&&(t.skew=e.skew),Array.isArray(e.scale)&&(t.scale={value:e.scale}),Array.isArray(e.origin)&&(t.origin=e.origin),Object.keys(t).length?t:void 0}}}(t);n&&(s=Ar(s,n,r))}const l=void 0===e&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||xr(t)}(t);s=function(t,n,e,r,o){const i=r.idMap.get(e),s=r.maskAncestorChains.get(n)||[],l=o?zr(n,r):void 0,c=l?[...s,l]:s,u=i&&r.maskAncestorChains.get(i)||[];if(!c.length&&!u.length)return t;const a=new Set;for(const t of c)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);for(const t of u)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);if(!(a.size>0)){const n=Or(c),e=Or(u),r=e[0]-n[0],o=e[1]-n[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(a).sort((t,n)=>t-n).map(t=>{const n=Sr(c,t),e=Sr(u,t);return{time:t,value:{translate:[e[0]-n[0],e[1]-n[1]]}}})}},children:[t]}}(s,t,o,r,l);const c={type:"mask",id:i,children:[s]};return n.maskType&&(c.maskType=n.maskType),n.maskUnits&&(c.maskUnits=n.maskUnits),n.maskContentUnits&&(c.maskContentUnits=n.maskContentUnits),void 0!==n.x&&(c.x=String(n.x)),void 0!==n.y&&(c.y=String(n.y)),void 0!==n.width&&(c.width=String(n.width)),void 0!==n.height&&(c.height=String(n.height)),r.defs.push(c),t.mask="url(#"+i+")",t}(h,l,i,n),h=function(t,n,e){if(!(null==n?void 0:n.d))return t;const r=cr(e,"clip"),o={type:"path"},i=nr(n.d);return"absent"!==i.kind&&("static"===i.kind?o.d=wr(i.value):(er(o,"d",i),void 0!==o.d&&(o.d=wr(o.d)))),e.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(h,c,n),o?(Pr(h,d,n),h=function(t,n,e,r){const o=function(t,n){var e,r,o;const i={};let s=!1;const l=null==(e=t.animate)?void 0:e.transform;if(l&&"object"==typeof l&&Array.isArray(l.keyframes)){const n=l.keyframes;if(n.some(t=>t.value&&t.value.translate)){const e=yr(l),r={keyframes:n.map(t=>{const n=t.value||{},r={};void 0!==n.translate&&(r.translate=n.translate),e&&void 0!==n.origin&&(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};l.autoOrient&&(r.autoOrient=!0);const o=l.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const c=n.some(t=>{const n=t.value||{};return void 0!==n.rotate||void 0!==n.scale}),u=n.map(t=>{const n=t.value||{},r={};void 0!==n.rotate&&(r.rotate=n.rotate),void 0!==n.scale&&(r.scale=n.scale),void 0===n.origin||e&&!c||(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(u.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const n={keyframes:u};void 0!==o&&(n.loop=o),t.animate.transform=n}s=!0}}const c=void 0!==(null==n?void 0:n.translate),u=s||c,f=s&&yr((null==(r=t.animate)?void 0:r.transform)||void 0)||s&&yr((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const n=function(t){const n=[],e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=e.exec(t);)n.push({name:r[1],nt:r[0]});if(!n.length)return{et:t||void 0};if(n.every(t=>"translate"===t.name))return{translate:n.map(t=>t.nt).join("")};const o=n[0],i=n[n.length-1];if("translate"===i.name&&"translate"===o.name){const e=vr(i.nt),r=vr(o.nt),s=-e[0],l=-e[1],c=r[0]-s,u=r[1]-l;return 0===c&&0===u?{et:t}:{translate:"translate("+c+","+u+")",et:"translate("+s+","+l+")"+n.slice(1).map(t=>t.nt).join("")}}if("translate"===i.name)return{et:t};const s=[];let l=0;for(;l<n.length&&"translate"===n[l].name;)s.push(n[l].nt),l++;if(!s.length)return{et:t};const c=n.slice(l).map(t=>t.nt).join("");return{translate:s.join(""),et:c||void 0}}(t.transform);u?void 0!==n.translate?n.et?t.transform=n.et:delete t.transform:(function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,e=[];let r;for(;r=n.exec(t);)e.push({name:r[1],nt:r[0]});if(1!==e.length)return!1;if("translate"===e[0].name)return!0;if("matrix"!==e[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(e[0].nt);if(!o)return!1;const i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)||f&&function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let e,r=0,o=!1;for(;e=n.exec(t);)r++,"matrix"===e[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:n.translate&&(i.transform=n.translate,n.et?t.transform=n.et:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const n=t.transform.value,e=!(!n||"object"!=typeof n),r=e?n:t.transform,o=t=>e?{value:t}:t;if(Array.isArray(r.translate)){const n=a({},r);delete n.translate;const e=Object.keys(n).length>0;u||(i.transform=o({translate:r.translate})),e?t.transform=o(n):delete t.transform}}return i}(t,n);"string"==typeof t.id&&delete t.id;const{rt:i,inner:s}=function(t){if(!t)return{};const n=yr(t.translate),e=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),n&&void 0!==t.origin&&(r.origin=t.origin),void 0!==t.rotate&&(o.rotate=t.rotate),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.skew&&(o.skew=t.skew),void 0===t.origin||n&&!e||(o.origin=t.origin),{rt:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(n);let l=t;l=ir(l,s);let c={type:"g",id:e,children:[{type:"g",id:r,children:[l]}]};return void 0!==o.transform&&(c.transform=o.transform),void 0!==o.animate&&(c.animate=o.animate),i&&(delete c.id,c=ir(c,i),c.id=e),c}(h,i,r,o)):h=function(t,n,e,r){return Pr(t,n,r),ir(t,e)}(h,d,i,n),(null==d?void 0:d.retime)&&(t.effects={clone:{retime:d.retime}}),r&&n.idMap.set(r,h),h}function Xo(t,n,e,r,o){const i=1-o,s=i*i*i,l=3*i*i*o,c=3*i*o*o,u=o*o*o;return[s*t[0]+l*n[0]+c*e[0]+u*r[0],s*t[1]+l*n[1]+c*e[1]+u*r[1]]}function qo(t,n,e,r,o=64){let i=0,s=t;for(let l=1;l<=o;l++){const c=Xo(t,n,e,r,l/o);i+=Math.hypot(c[0]-s[0],c[1]-s[1]),s=c}return i}var Qo=t=>{const n=Math.round(1e4*t)/1e4;return Object.is(n,-0)?"0":String(n)};function Ko(t,n,e){var r,o;let i=Wo(t).root;return i=function(t){const n=t=>{var e;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const n=function(t){var n,e,r;if("offsetPath"!==t.alongPathMode)return;const o=t.keyframes;if(!o||o.length<2)return;const i=Yt(o[0]),s=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],l=[];for(const t of o){const e=Yt(t),r=null==e?void 0:e.translate;if(!r||r.length<2)return;if(Object.keys(e).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(n=null==e?void 0:e.origin)?n:[0,0];if(o[0]!==s[0]||o[1]!==s[1])return;l.push([r[0]+s[0],r[1]+s[1]])}if(!o.some(t=>$t(t)||tn(t)))return;let c="M"+Qo(l[0][0])+","+Qo(l[0][1]);const u=[];for(let t=0;t<l.length-1;t++){const n=l[t],i=l[t+1],s=null!=(e=tn(o[t]))?e:[0,0],a=null!=(r=$t(o[t+1]))?r:[0,0],f=[n[0]+s[0],n[1]+s[1]],d=[i[0]+a[0],i[1]+a[1]];c+="C"+Qo(f[0])+","+Qo(f[1])+","+Qo(d[0])+","+Qo(d[1])+","+Qo(i[0])+","+Qo(i[1]),u.push(qo(n,f,d,i))}const a=u.reduce((t,n)=>t+n,0);if(!(a>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=u[t-1]);const n={t:Kt(o[t]),v:d/a},e=Ht(o[t]);void 0!==e&&(n.e=e),f.push(n)}return{ot:c,it:f,autoOrient:!!t.autoOrient,anchor:s}}(i);if(n){const e=a({},o);delete e[Ft];const s={keyframes:n.it};void 0!==i.loop&&(s.loop=i.loop),e[It]=s;const l=t.transform;let c=l;if(l&&"object"==typeof l){const t=a({},l);delete t[Bt.translate],delete t[Bt.origin],c=Object.keys(t).length?t:void 0}r=f(a({},t),{animate:e,style:f(a({},t.style),{offsetPath:"path('"+n.ot+"')",offsetAnchor:Qo(n.anchor[0])+"px "+Qo(n.anchor[1])+"px",offsetRotate:n.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==c?r.transform=c:delete r.transform}}if(null==(e=r.children)?void 0:e.length){const t=r.children.map(n);t.some((t,n)=>t!==r.children[n])&&(r=f(a({},r),{children:t}))}return r};return n(t)}(i),i=Be(i,null!=(o=null==(r=Gt(i))?void 0:r.duration)?o:C),n===Mt.native&&(i=Oe(i,null==e?void 0:e.motionPath),i=function(t){var n;const e=function(t){const n=new Map,e=t=>{var r;"string"==typeof t.id&&n.set(t.id,t),null==(r=t.children)||r.forEach(e)};return e(t),n}(t),r=function(t,n){const e=new WeakMap,r=new Set,o=(t,r)=>{const i=e.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let s=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const n in t.animate){s=!0;break}if(!s&&t.children)for(const n of t.children)if(o(n,r)){s=!0;break}if(!s&&"use"===t.type&&"string"==typeof t.href){const e=Ye(t.href),i=e?n.get(e):void 0;i&&(s=o(i,r))}return r.delete(t),e.set(t,s),s};for(const[t,e]of n)o(e,new Set)&&r.add(t);return r}(0,e);if(0===r.size)return t;let o=0;const i=function(t){const n=He(t.viewBox);if(n)return[n[2],n[3]];const e=Ke(t.width),r=Ke(t.height);return void 0!==e&&void 0!==r?[e,r]:[1,1]}(t),s=[],l=$e(t,e,r,()=>"_lw_use_mat_"+ ++o,s,i);if(0===s.length)return l;const c={type:"defs",children:s},u=[...null!=(n=l.children)?n:[],c];return f(a({},l),{children:u})}(i),i=function(t){const n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let e=!0;for(;e;){e=!1;const r=new Set;n(t,t=>{var n;"use"===t.type&&"string"==typeof t.href&&r.add((n=t.href).startsWith("#")?n.slice(1):n)}),n(t,t=>{if(!t.children)return;let n=t.children;"defs"===t.type&&(n=n.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),n=n.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),n.length!==t.children.length&&(t.children=n,e=!0)})}return t}(i)),i}function Yo(t){const n=globalThis;"function"!=typeof n.cancelAnimationFrame?n.clearTimeout(t):n.cancelAnimationFrame(t)}var Ho=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],$o=["definitions","animateById"],ti=t=>!!t&&"object"==typeof t&&!Array.isArray(t),ni=t=>ti(t)&&"string"==typeof t.type?t.type:"time",ei=t=>"scroll"===t||"view"===t;function ri(t,n){const e=ti(t)?a({},t):{};for(const t of Object.keys(n)){const r=n[t];null!==r?ti(r)?e[t]=ri(e[t],r):e[t]=r:delete e[t]}return e}function oi(t,n,e){const r=ni(t),o=ti(n)&&"string"==typeof n.type?String(n.type):r;let i;if(o!==r){const e={};if(ti(t))for(const n of kt)void 0!==t[n]&&(e[n]=t[n]);i=ri(e,n)}else i=ri(t,n);if(ei(o)){for(const t of jt)void 0!==i[t]&&(e("animator.timeline."+t+": no slot on a '"+o+"' timeline — dropped"),delete i[t]);"infinite"===i.iterations&&(e("animator.timeline.iterations: 'infinite' cannot map onto a scroll range — dropped"),delete i.iterations)}return i}var ii=6,si=[...kt,...jt,"fill","resetOnFinish","timelineSource","scroll"],li=t=>si.some(n=>t.indexOf("animator."+n+":")>=0);function ci(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 ui(t){return"#"+t}function ai(t,n,e,r){const o=Gt(t)||{};if(!r)if(t.id){const n=ui(t.id);(r=document.querySelector(n))||console.warn("createFrameLoopAnimator: No root element found for selector: ",n)}else console.warn("createFrameLoopAnimator: No root element provided");const i=function(t,n,e){var r;const o=Gt(t)||{},i=Ge(t,Mt.js),s=o.iterations;let l=1;"number"==typeof s&&(l=s||1),"infinite"===s&&(l=1/0),l<1&&(l=1);const c=+(o.duration||C),u=c&&l?c*(l===1/0?1/0:l):c?(null!=l?l:1)*c:0,a=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,v="backwards"===f||"both"===f;let y=null,m=!1,p=-(o.delay||0),h=0,g=1,b=!1;const w=o.frameRate,A=w&&w>0?1e3/w:0;let k=0;const j=()=>{const t=h?(Date.now()-h)*g:0;return p+t},M=()=>{let t=j();return Number.isFinite(u)&&t>u&&(t=u),t<0&&(t=0),t};function x(t){let e=function(){const n=c>0?c:1;let e=0,r=0;c>0?(t=F(t,0,l*n),r=Math.max(0,Math.ceil(t/n)-1),r=Math.min(r,l-1),e=F((t-r*n)/n,0,1)):e=t;const o=a||"normal";let i=e;return"reverse"===o?i=1-e:"alternate"===o?r%2==1&&(i=1-e):"alternate-reverse"===o&&r%2==0&&(i=1-e),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=We(r,e*c);for(const[e,r]of Object.entries(o))n.setAttribute(t.id,e,r)}}o.delay&&(o.delay<0?x(M()):v&&x(0));const O=()=>!!m&&!!n.isConnected()&&(g<0?j()>0:!(Number.isFinite(u)&&M()>=u)),S=t=>{null!==y&&(Yo(y),y=null),(t||O())&&(y=function(t){const n=globalThis;return"function"==typeof n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,16)}(()=>{y=null,(()=>{var t,r;if(!n.isConnected())return void N();const o=M(),i=j();if(i<0&&g>0)v&&x(0);else{if(g<0&&i<=0)return N(),x(0),void(b||(b=!0,null==(t=null==e?void 0:e.onFinish)||t.call(e)));if(g>0&&u&&Number.isFinite(u)&&o>=u)return N(),x(d?u:0),void(b||(b=!0,null==(r=null==e?void 0:e.onFinish)||r.call(e)));if(A>0){const t=Date.now();if(k&&t-k<A)return;k=t}x(o)}})(),S()}))},N=()=>{if(!m)return;let t=j();Number.isFinite(u)&&t>u&&(t=u),p=t,h=0,m=!1,null!==y&&(Yo(y),y=null),t>=0?x(t):v&&x(0)},z={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!m){if(g>=0)Number.isFinite(u)&&p>=u&&(p=0);else if(p<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");p=u}b=!1,m=!0,h=Date.now(),S(!0)}})(),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;N(),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;N(),p=0,h=0,m=!1,b=!1,x(p),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{((t=!0)=>{var n;p=Number.isFinite(u)?u:M(),h=0,m=!1,null!==y&&(Yo(y),y=null),x(d?p:0),t&&!b&&(b=!0,null==(n=null==e?void 0:e.onFinish)||n.call(e))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let n=j();Number.isFinite(u)&&n>u&&(n=u),t<0!=g<0&&(b=!1),g=t,p=n,m&&(h=Date.now())},getCurrentTime:()=>M(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(u)&&t>u&&(t=u),p=t,m&&(h=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),x(M())},destroy:()=>{var t;z.cancel(),null==(t=null==e?void 0:e.onRemove)||t.call(e)}};return z}(t,n||function(t){const n=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(e,r,o)=>{r=R(r);const i=ui(e),s=(null==t?void 0:t.querySelectorAll(i))||document.querySelectorAll(i);0!==s.length||n.has(i)||(n.add(i),console.warn('setAttribute: No elements found for selector "'+i+'"'));for(let t=0;t<s.length;t++){const n=s[t],e="transform"===r&&"pattern"===n.tagName?"patternTransform":r;n.setAttribute(e,o),T.has(r)&&(n.style[r]=o)}}}}(r),e),s=f(a({},i),{getRootElement:()=>r||null});return o.trigger&&(Z(o)?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):ci(s,o.trigger)),s}function fi(t,n,e,r){let o=Yt(t);const i=Ht(t),s={offset:n,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let l,c=e;return S.has(e)&&Array.isArray(o)?l=x(o):"transform"!==e||null===o||"object"!=typeof o||Array.isArray(o)?N.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=>y(t,!0)).join("")+'")':z.has(e)&&"number"==typeof o?100*o+"%":""+o:(l=P(o,{l:!0}),c="transform"),CSS.supports(R(c),l)||r.add(c),c=_(c),s[c]=l,s}function di(t,n,e){var r,o,i,s,l;const c=[];for(let u=0;u<n.length;u++){const d=n[u],v=null!=(r=d.t)?r:0;if(v<0){const e=n[u+1];if(e&&(null!=(o=e.t)?o:0)>=0){const n=(0-v)/((null!=(i=e.t)?i:0)-v),r=d.e?A(d.e)(n):n,{right:o}=j(d.e,n);c.push({t:0,v:Re(t,d.v,e.v,r),e:o})}continue}if(v>e){const r=n[u-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?A(r.e)(o):o,{left:s}=j(r.e,o);c.length>0&&(c[c.length-1]=f(a({},c[c.length-1]),{e:s})),c.push({t:e,v:Re(t,r.v,d.v,i),e:void 0})}break}c.push(d)}return c}function vi(t,n,e){var r;const o=new Map;for(const[i,s]of Object.entries(t)){const t=e.duration||1,l=di(i,s.keyframes||[],t),c=[];for(let e=0;e<l.length;e++){const o=l[e],s=fi(o,F((null!=(r=o.t)?r:0)/t,0,1),i,n);0===e&&(s.offset||0)>0&&c.push(f(a({},s),{offset:0})),c.push(s)}c.length>0&&(c[c.length-1].offset||0)<1&&c.push(f(a({},c[c.length-1]),{offset:1})),c.length>0&&o.set(i,c)}return o}function yi(t,n,e,r,o){var i;const s=Gt(t)||{};if(!e)if(t.id){const n=ui(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=Ge(t,Mt.native),c=[],u=s.iterations;let a;"number"==typeof u&&(a=u),"infinite"===u&&(a=1/0);const f=new Set;let d=!1,v=!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=ui(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 y=vi(r,f,s),m=s.delay&&s.delay>0?s.delay:void 0;let p;if(s.delay&&s.delay<0&&s.duration){const t=-s.delay;p=a===1/0?t%s.duration:Math.min(t,s.duration*(null!=a?a:1))}const h={duration:s.duration,delay:m,fill:null!=(i=s.fill)?i:"forwards",direction:s.direction,iterations:a};for(let t=0;t<u.length;t++){const e=u[t];for(const[,t]of y)if(t.length>0)try{const r=new KeyframeEffect(e,t,h),i=new Animation(r,o?o.timeline:document.timeline);if(o){const t=i;o.rangeStart&&(t.rangeStart=o.rangeStart),o.rangeEnd&&(t.rangeEnd=o.rangeEnd)}(null==n?void 0:n.onFinish)&&(i.onfinish=()=>{var t;d||(d=!0,null==(t=n.onFinish)||t.call(n))}),(null==n?void 0:n.onRemove)&&(i.onremove=()=>{var t;v||(v=!0,null==(t=n.onRemove)||t.call(n))}),void 0!==p&&(i.currentTime=p),c.push(i)}catch(t){console.warn(t)}}}if(!r&&f.size)return console.warn("Unsupported CSS attrs: "+[...f].join(", ")),null;const y={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var t;return"running"===(null==(t=c[0])?void 0:t.playState)},play:()=>{var t;d=!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;d=!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=>{d=!1,c.forEach(n=>{n.currentTime=t})},destroy:()=>{var t;y.cancel(),c.splice(0,c.length),v||(v=!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)"):ci(y,s.trigger)),o&&c.forEach(t=>t.play()),y}function mi(t,n,e){var r,o,i;const s="number"==typeof(null==t?void 0:t.fraction)?t.fraction:n,l=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*s);if(void 0!==l)return e?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:l}:{offset:l}}function pi(t,n){const e=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===e||o===r)return null;const t=getComputedStyle(o),i="y"===n?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function hi(){return document.scrollingElement||document.documentElement}var gi="parent",bi="scroller";function wi(t,n){var e,r;const o=null==n?void 0:n.trim();if(!o)return t;if(o===gi){let n=null;for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement){const t=getComputedStyle(e).position;"sticky"!==t&&"fixed"!==t||(n=e)}return null!=(r=null!=(e=null==n?void 0:n.parentElement)?e:t.parentElement)?r:t}if(o===bi)return pi(t,"y")||pi(t,"x")||hi();let i=null;try{i=document.querySelector(o)}catch(n){return console.warn('scroll timeline: subject "'+o+'" is not a valid selector — measuring the SVG itself'),t}return i||(console.warn('scroll timeline: subject "'+o+'" matched no element — measuring the SVG itself'),t)}function Ai(t,n){const e=t;if(!(null==n?void 0:n.pin)||!e.style)return()=>{};const r=e.style,o=r.position,i=r.top;r.position="sticky";const s="center"===n.pinAlign?.5:"bottom"===n.pinAlign?1:0,l=()=>{var e;const o=null!=(e=n.pinTop)?e:0;if(!s)return void(r.top=o+"px");const i=function(t){const n=pi(t,"y");return n?n.clientHeight:document.documentElement.clientHeight}(t),l=t.getBoundingClientRect().height;r.top=Math.round((i-l)*s+o)+"px"};l();let c=null;const u=s?l:null;s&&(u&&window.addEventListener("resize",u),"undefined"!=typeof ResizeObserver&&(c=new ResizeObserver(l),c.observe(t)));let a=null;const f=t.parentElement;return n.pinDistance&&n.pinDistance>0&&f&&(a=document.createElement("div"),a.setAttribute("data-px-pin",""),a.style.height=100*n.pinDistance+"vh",f.insertBefore(a,t),a.appendChild(t)),()=>{u&&window.removeEventListener("resize",u),null==c||c.disconnect(),r.position=o,r.top=i,(null==a?void 0:a.parentElement)&&(a.parentElement.insertBefore(t,a),a.remove())}}function ki(t,n,e){let r,o=n;t.resetOnFinish&&(o=f(a({},n),{onFinish:()=>{var t;null==(t=null==n?void 0:n.onFinish)||t.call(n),null==r||r.cancel()}}));const i=e(o);return r=i,t.debugGlobalName&&(window[t.debugGlobalName]=i),i}var ji="http://www.w3.org/2000/svg";function Mi(t,n){if(!t)return null;const e=t,{type:r,children:o,style:i}=e,s=d(e,["type","children","style"]),l=s.domType;void 0!==l&&delete s.domType;const c=Wt(t)||n,u=function(t,n){var e;if(t)return"string"==typeof t?null==(e=null==n?void 0:n.styles)?void 0:e[t]:t}(i,c);let a;if(o)for(const t of o){const n=Mi(t,c);n&&(a||(a=[]),a.push(n))}const f=function(t,n,e,r,o){if(Qn.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(ji,t);for(const t in n){const e=re(t,n[t]);void 0!==e&&(Hn.has(t)?i.style[t]=String(e):i.setAttribute(R(t),e))}if(e)for(const t in e)i.style[t]=String(e[t]);if(r)for(const t of r)i.appendChild(t);return o&&(i.textContent=o),i}(r||"g",function(t){const n={};for(const e of Object.keys(t)){const r=_(e);if(Vt.has(r))continue;if("style"===r)continue;let o=t[e];if(S.has(r)&&Array.isArray(o))n[r]=x(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)N.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),n[Ft]=r+"("+o+")"):Array.isArray(o)?n[r]=o.join(","):null!=o&&(n[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;n[Ft]=P(t,{l:!1})}}return n}(s),u,a,s[Lt]||s[Dt]);return f&&void 0!==l&&f.setAttribute("type",l),f}var xi,Oi="data";function Si(t,n,e,r,o,i){const s=Fn(t);for(const t of s)console.warn("[PxAnimator] effects shape warning:",t);if(function(t){const{problems:n}=function(t){let n;try{n=In(t)}catch(t){return{problems:[],legacy:[]}}const e=[],r=[];for(const t of n)(li(t)?r:e).push(t);return{problems:e,legacy:r}}(t);if(!n.length)return;const e=n.slice(0,ii),r=n.length-e.length;console.warn("[PxAnimator] createAnimator: this document does not match the animation schema in "+n.length+" place"+(1===n.length?"":"s")+".\n"+e.map(t=>" - "+t).join("\n")+(r>0?"\n … and "+r+" more":"")+"\n\nIf you did not author these keys, the usual cause is a build that MANGLES PROPERTY NAMES. An animation document is data loaded at runtime, so renaming the property reads inside the player stops them matching the keys in the JSON, and the animation silently does nothing. Feed the published reserved-name list to your minifier — @pixodesk/svg-animator-web/mangle-reserved.json — see docs/library/minification.md.")}(t),void 0!==o||i){const n=function(t,n,e){var r,o;const i=!!(null==e?void 0:e.st);if(!t||void 0===n||!(i||null!==n&&ti(n)&&Object.keys(n).length))return{doc:t,warnings:[]};const s=t,l=ti(s.animator),c=!l&&ti(null==(r=s.meta)?void 0:r.animator),u=l?s.animator:c?s.meta.animator:void 0,d=[];l&&ti(null==(o=s.meta)?void 0:o.animator)&&d.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let v=u;if(i){const t={};for(const n of $o)ti(u)&&void 0!==u[n]&&(t[n]=u[n]);v=t}const y=function(t,n){const e=[],r=t=>e.push(t);if(null===n)return{config:void 0,warnings:e};if(!ti(n)||0===Object.keys(n).length)return{config:t,warnings:e};const o=ti(t)?Ho.filter(n=>void 0!==t[n]):[];o.length&&r("animator: the base carries the flat runtime spelling ("+o.join(", ")+"); the patch merges the wire spelling only");const i=ti(t)?a({},t):{};for(const t of Object.keys(n)){const e=n[t];null!==e?"timeline"!==t?ti(e)?i[t]=ri(i[t],e):i[t]=e:i.timeline=ti(e)?oi(i.timeline,e,r):e:delete i[t]}return{config:i,warnings:e}}(v,null!=n?n:{});return d.push(...y.warnings),y.config===u?{doc:t,warnings:d}:c?{doc:f(a({},s),{meta:f(a({},s.meta),{animator:y.config})}),warnings:d}:{doc:f(a({},s),{animator:y.config}),warnings:d}}(t,null!=o?o:{},{st:!!i});for(const t of n.warnings)console.warn("[PxAnimator] config override:",t);t=n.doc}t=Ko(t,Ot((Gt(t)||{}).engine));let l=null;if(r){t=Xn(t);const n="string"==typeof r?document.querySelector(r):r;n&&(l=Mi(t),l&&n.replaceChildren(l))}const c=function(t,n,e,r){return function(t,n,e,r){const o=Gt(t)||{};return Z(o)?ki(o,e,e=>{var i;let s=()=>{};if(o.engine!==xt.js&&r){s=Ai(r,o.scroll);const n=function(t,n){var e,r,o,i;if(!n||!Z(n))return null;const s=n.scroll||{},l=null!=(e=s.kind)?e:"view";if(s.smoothing)return console.warn("scroll timeline: `smoothing` needs the built-in driver — using the built-in driver instead of the browser timeline"),null;const c=globalThis,u="view"===l,a=u?c.ViewTimeline:c.ScrollTimeline;if("function"!=typeof a)return null;const f=null!=(r=s.axis)?r:"block";let d;try{d=new a(u?{subject:wi(t,s.subject),axis:f}:{source:"root"===s.source?hi():pi(t,"y")||pi(t,"x")||hi(),axis:f})}catch(t){return console.warn("scroll timeline: native timeline construction failed — falling back to the player measuring progress itself",t),null}return{timeline:d,rangeStart:mi(null==(o=s.range)?void 0:o.start,0,u),rangeEnd:mi(null==(i=s.range)?void 0:i.end,1,u)}}(r,o);if(n){const i=yi(t,e,r,St(o.engine),n);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{s(),t()},i}}s(),s=()=>{}}const l=(o.engine!==xt.js?yi(t,e,r,St(o.engine)):null)||ai(t,n,e,r),c=(null==(i=l.getRootElement)?void 0:i.call(l))||r;if(c){s=Ai(c,o.scroll);const t=("number"==typeof(null==(u=o)?void 0:u.duration)&&u.duration>0?u.duration:C)*("number"==typeof(null==u?void 0:u.iterations)&&u.iterations>0?u.iterations:1),n=function(t,n,e){var r,o;if(!n||!Z(n))return null;const i=n.scroll||{},s=null!=(r=i.kind)?r:"view",l=wi(t,i.subject),c=pi(t,"y")||pi(t,"x"),u="scroll"===s&&"root"===i.source?hi():c||hi(),a=u===hi(),f=function(t,n){const e=null!=t?t:"block";if("x"===e||"y"===e)return e;const r=!!n&&n.startsWith("vertical");return"inline"===e?r?"y":"x":r?"x":"y"}(i.axis,getComputedStyle(u).writingMode),d=()=>{if("scroll"===s)return function(t,n,e){var r,o;const i=n>0?F(t/n,0,1):1,s="number"==typeof(null==(r=null==e?void 0:e.start)?void 0:r.fraction)?e.start.fraction:0,l="number"==typeof(null==(o=null==e?void 0:e.end)?void 0:o.fraction)?e.end.fraction:1;return l<=s?i>=l?1:0:F((i-s)/(l-s),0,1)}("y"===f?u.scrollTop:u.scrollLeft,"y"===f?u.scrollHeight-u.clientHeight:u.scrollWidth-u.clientWidth,i.range);const t=l.getBoundingClientRect();let n,e;if(a)n=0,e="y"===f?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=u.getBoundingClientRect();n="y"===f?t.top:t.left,e="y"===f?u.clientHeight:u.clientWidth}return function(t,n,e,r){const o=e-t,i=J(null==r?void 0:r.start,0,n,e),s=J(null==r?void 0:r.end,1,n,e);return s<=i?o>=s?1:0:F((o-i)/(s-i),0,1)}(("y"===f?t.top:t.left)-n,"y"===f?t.height:t.width,e,i.range)},v=Math.max(0,null!=(o=i.smoothing)?o:0)/1e3;let y=!1,m=null,p=null,h=0,g=null;const b=()=>{g=null,y||(t=>{if(!v)return void e(t);if(null===m)return m=t,void e(t);if(null!==p)return;h=0;const n=t=>{if(p=null,y)return;const r=h?Math.min(.1,(t-h)/1e3):1/60;h=t;const o=d(),i=1-Math.exp(-r/v);m+=(o-m)*i,Math.abs(o-m)<.001&&(m=o),e(m),m!==o&&(p=requestAnimationFrame(n))};p=requestAnimationFrame(n)})(d())},w=()=>{y||null!==g||(g=requestAnimationFrame(b))},A=a?window:u;let k;A.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w,{passive:!0}),"undefined"!=typeof ResizeObserver&&(k=new ResizeObserver(w),k.observe(l),l!==t&&k.observe(t),a||k.observe(u));const j={destroy:()=>{y||(y=!0,A.removeEventListener("scroll",w),window.removeEventListener("resize",w),null==k||k.disconnect(),null!==g&&(cancelAnimationFrame(g),g=null),null!==p&&(cancelAnimationFrame(p),p=null))},refresh:()=>{y||(m=d(),e(m))}};return j.refresh(),j}(c,o,n=>l.setCurrentTime(n*t));if(n){const t=l.destroy.bind(l);l.destroy=()=>{n.destroy(),s(),t()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var u;return l}):ki(o,e,e=>o.engine===xt.js?ai(t,n,e,r):yi(t,e,r,St(o.engine))||ai(t,n,e,r))}(t,n,e,r)}(t,n,e,l);if(r&&l){const t=l,n=c.destroy.bind(c);c.destroy=()=>{n(),t.remove()}}return c}function Ni(t){const{src:n,data:e,adapter:r,callbacks:o,container:i,resetDocDefaults:s}=t,l=function(t){const{config:n,duration:e,delay:r,iterations:o,startOn:i}=t;return function(t,n){let e;if("string"==typeof t)try{e=JSON.parse(t)}catch(t){console.warn("animator config: not valid JSON — ignored",t),e=void 0}else e=null!=t?t:void 0;const{duration:r,delay:o,iterations:i,startOn:s}=n;if(void 0===r&&void 0===o&&void 0===i&&void 0===s)return e;const l=ti(e)?a({},e):{},c=a({},l.timeline);return void 0!==r&&(c.duration=r),void 0!==o&&(c.delay=o),void 0!==i&&(c.iterations=i),void 0!==s&&(c.trigger=f(a({},c.trigger),{startOn:s})),l.timeline=c,l}(n,{duration:e,delay:r,iterations:o,startOn:i})}(t);if(void 0!==e&&void 0!==n)throw new Error("createAnimator: provide either `src` or `data`, not both");if(void 0===e&&void 0===n)throw new Error("createAnimator: either `src` or `data` is required");if(void 0!==e)return Si(e,r,o,i,l,s);let c=null,u=[],d=!1;const v=t=>{c?t(c):u&&u.push(t)};return fetch(n).then(t=>t.json()).then(t=>{var e;if(!d)if((e=t)&&"object"==typeof e&&!Array.isArray(e)&&"svg"===e.type){c=Si(t,r,o,i,l,s);const n=u;u=null,null==n||n.forEach(t=>t(c))}else console.error('createAnimator: invalid animation document format at "'+n+'"')}).catch(t=>{u=null,console.error('createAnimator: failed to load "'+n+'"',t)}),{isReady:()=>!!c,getRootElement:()=>c?c.getRootElement():null,isPlaying:()=>(null==c?void 0:c.isPlaying())||!1,play:()=>{v(t=>t.play())},pause:()=>{v(t=>t.pause())},cancel:()=>{v(t=>t.cancel())},finish:()=>{v(t=>t.finish())},setPlaybackRate:t=>{v(n=>n.setPlaybackRate(t))},getCurrentTime:()=>c?c.getCurrentTime():null,setCurrentTime:t=>{v(n=>n.setCurrentTime(t))},destroy:()=>{d=!0,u=null,null==c||c.destroy()}}}function zi(){const t=document.querySelectorAll("["+wt+"]");for(let n=0;n<t.length;n++){const e=t[n];if(!e[At]){const t=e.getAttribute(wt);t&&(e[At]=Ni({src:t,container:e}))}}}return"undefined"!=typeof window&&(window.loadTagAnimators=zi,window.createAnimator=Ni,window.setupAnimationTriggers=ci),xi=v,((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}),xi)})();
|