@pixodesk/svg-animator-web 1.0.28 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var PixodeskAnimator=(()=>{var 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={};function v(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 y(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]=y(t[i]||0,n[i]||0,e);return r}function m(t,n,e){return[y(t[0]||0,n[0]||0,e),y(t[1]||0,n[1]||0,e),y(t[2]||0,n[2]||0,e),y(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}function h(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,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=[],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 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;m.push(p(b,g,d));const A=null!=(u=null==(s=t.o)?void 0:s[e])?u:f,w=null!=(a=null==(c=n.o)?void 0:c[e])?a:v;h.push(p(A,w,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 g(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=g(n,r,t),((s*e+l)*e+i)*e;var e}}function w(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function k(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=g(e,o,n),s=[e,r],u=[o,i],{left:c,right:a}=function(t,n,e,r,o){const i=w(t,n,o),l=w(n,e,o),s=w(e,r,o),u=w(i,l,o),c=w(l,s,o),a=w(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 M(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function j(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 x(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})})(d,{PX_ANIMATOR_DATA_KEY:()=>Qo,PX_ANIM_ATTR_NAME:()=>kt,PX_ANIM_SRC_ATTR_NAME:()=>wt,PxAnimatorEngine:()=>jt,PxAnimatorMode:()=>Mt,createAnimator:()=>Ko,createAnimatorImpl:()=>Xo,generateNewIds:()=>Mn,loadTagAnimators:()=>Jo,setupAnimationTriggers:()=>zo});var S=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),O=new Set(["translate","rotate","scale","skew"]),N=new Set(["offset-distance","offsetDistance"]);function z(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 P=new Set(["offset-distance","offsetDistance"]),C=1e3;function _(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):t}function T(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 L(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 D=1e-4;function R(t,n,e,r,o){const i=U(t,n,e,r,o);return 0===i[0]&&0===i[1]?U(t,n,e,r,o<.5?o+D:o-D):i}function U(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 B(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 E(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.timelineSource)}var Z="cover";function W(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:Z,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{h(t){return this.A(t)}optional(){return new X(this)}},X=class extends Q{constructor(t){super(),this.inner=t,this.M=void 0}j(t){if(null!=t)return this.inner.h(t)?this.inner.j(t):void 0}A(t,n,e){return null==t||this.inner.A(t,n,e)}h(t){return null==t||this.inner.h(t)}},K=class extends Q{constructor(t=""){super(),this.M=t}j(t){return"string"==typeof t?t:this.M}A(t,n,e){return"string"==typeof t||(null==n||n.errors.push(q(null!=e?e:[])+": expected string, got "+typeof t),!1)}},J=class extends Q{constructor(t=0){super(),this.M=t}j(t){return"number"==typeof t&&isFinite(t)?t:this.M}A(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)}},Y=class extends Q{constructor(t=!1){super(),this.M=t}j(t){return"boolean"==typeof t?t:this.M}A(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(q(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},H=class extends Q{constructor(t){super(),this.value=t,this.M=t}j(t){return t===this.value?this.value:this.M}A(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)}},$=class extends Q{constructor(t,n){super(),this.values=t,this.M=null!=n?n:t[0]}j(t){return this.values.includes(t)?t:this.M}A(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)}},tt=class extends Q{constructor(t,n){super(),this.S=t,this.M=null!=n?n:t[0].M}j(t){for(const n of this.S)if(n.A(t))return n.j(t);return this.M}A(t,n,e){var r;const o=n&&{errors:[],warnings:[],O:n.O};return!!this.S.some(n=>n.A(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)}h(t){return this.S.some(n=>n.h(t))}},nt=class extends Q{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e].M;this.M=n}j(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].j(n[t]);return e}A(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].A(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.O)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}h(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},et=class extends Q{constructor(t,n){super(),this._shape=t,this.N=n;const e={};for(const n of Object.keys(t))e[n]=t[n].M;this.M=e}j(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].j(n[t]);if(this.N)for(const t of Object.keys(n))t in this._shape||(e[t]=this.N.j(n[t]));return e}A(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].A(r[t],n,o)||(i=!1),o.pop();if(this.N)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.N.A(r[t],n,o)||(i=!1),o.pop());return i}h(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},rt=class extends Q{constructor(t){super(),this.item=t,this.M=[]}j(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item.h(e)&&n.push(this.item.j(e));return n}A(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.A(t[e],n,r)||(o=!1),r.pop();return o}h(t){return Array.isArray(t)}},ot=class extends Q{constructor(t){super(),this.value=t,this.M={}}j(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value.h(r)&&(n[e]=this.value.j(r));return n}A(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.A(i,n,r)||(o=!1),r.pop();return o}h(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},it=class extends Q{constructor(){super(...arguments),this.M=void 0}j(t){return t}A(t,n,e){return!0}h(t){return!0}},lt=class extends Q{constructor(t,n){super(),this.fn=t,this.M=n,this.P=null}get schema(){var t;return null!=(t=this.P)?t:this.P=this.fn()}j(t){return this.schema.j(t)}A(t,n,e){return this.schema.A(t,n,e)}h(t){return this.schema.h(t)}},st=class extends Q{constructor(t){super(),this.S=t,this.M=t.map(t=>t.M)}j(t){return Array.isArray(t)&&t.length===this.S.length?this.S.map((n,e)=>n.j(t[e])):this.M}A(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].A(t[e],n,r)||(o=!1),r.pop();return o}h(t){return Array.isArray(t)&&t.length===this.S.length}},ut=(t="")=>new K(t),ct=(t=0)=>new J(t),at=(t=!1)=>new Y(t),ft=t=>new H(t),dt=(t,n)=>new $(t,n),vt=(t,n)=>new tt(t,n),yt=t=>new nt(t),pt=(t,n)=>new et(t,n),mt=t=>new rt(t),ht=t=>new ot(t),bt=()=>new it,gt=t=>new st(t),At=(t,n)=>new lt(t,n),wt="data-px-animation-src",kt="_px_animator",Mt={auto:"auto",waapi:"waapi",frames:"frames"},jt={waapi:Mt.waapi,frames:Mt.frames},xt={before:"before",after:"after"},St="userSpaceOnUse",Ot="objectBoundingBox",Nt={separate:"separate",combined:"combined"},zt="text",Pt="textContent",Ct=new Set(["type","children","animator","meta","animate","effects",zt,Pt]),_t={linear:"linear",radial:"radial"};function Tt(t){var n;return(null==t?void 0:t.animator)||(null==(n=null==t?void 0:t.meta)?void 0:n.animator)}function It(t){var n;if(t)return null==(n=Tt(t))?void 0:n.definitions}var Lt=vt([ut(),gt([ct(),ct(),ct(),ct()])]),Ft=vt([ut(),ct(),mt(ct()),At(()=>Ut,{}),yt({path:ut()}),At(()=>yt({paths:mt(gn)}),{paths:[]}),At(()=>mt(cn),[])]),Vt=yt({time:ct().optional(),t:ct().optional(),value:Ft.optional(),v:Ft.optional(),easing:Lt.optional(),e:Lt.optional(),tangentOut:gt([ct(),ct()]).optional(),to:gt([ct(),ct()]).optional(),tangentIn:gt([ct(),ct()]).optional(),ti:gt([ct(),ct()]).optional(),selected:at().optional()}),Dt=yt({segmentCount:ct().optional(),extend:dt([xt.before,xt.after]).optional(),alternate:at().optional()}),Rt=yt({value:Ft.optional(),keyframes:mt(Vt).optional(),kfs:mt(Vt).optional(),loop:vt([Dt,at()]).optional(),autoOrient:at().optional()}),Ut=yt({translate:gt([ct(),ct()]).optional(),rotate:ct().optional(),skew:ct().optional(),scale:gt([ct(),ct()]).optional(),origin:gt([ct(),ct()]).optional()}),Bt=(vt([ut(),Ut,yt({value:Ut}),Rt]),ht(Rt)),Et=vt([ut(),mt(vt([ut(),Bt])),Bt]),Gt=yt({startOn:dt(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:dt(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:ct().optional()}),Zt=yt({width:ct(),d:ut()}),Wt=yt({fFamily:ut(),style:ut(),ascent:ct(),unitsPerEm:ct(),glyphs:ht(Zt)}),qt=yt({easings:ht(gt([ct(),ct(),ct(),ct()])).optional(),animations:ht(Bt).optional(),styles:ht(bt()).optional(),glyphs:ht(Wt).optional()}),Qt=yt({phase:dt(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:ct().optional()}),Xt=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(),pinTop:ct().optional(),pinDistance:ct().optional(),range:Xt.optional()}),Jt=yt({mode:dt([Mt.auto,Mt.waapi,Mt.frames]).optional(),duration:ct().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(),frameRate:ct().optional(),trigger:Gt.optional(),resetOnFinish:at().optional(),definitions:qt.optional(),animateById:ht(Et).optional(),timelineSource:ut().optional(),scroll:Kt.optional(),debugInstName:ut().optional()}),Yt=(yt({id:ut(),animate:Et}),vt([ut(),ct(),mt(ct()),yt({value:new class extends Q{constructor(){super(...arguments),this.M=void 0}j(t){return t}A(t,n,e){return void 0!==t||(null==n||n.errors.push(q(null!=e?e:[])+": required value is missing"),!1)}h(t){return void 0!==t}}}),Ut])),Ht=vt([ct(),yt({value:ct()}),Rt]),$t=vt([gt([ct(),ct()]),yt({value:gt([ct(),ct()])}),Rt]),tn=vt([ut(),yt({value:ut()}),Rt]),nn=yt({translate:$t.optional(),rotate:Ht.optional(),scale:$t.optional(),skew:Ht.optional(),origin:$t.optional()}),en=yt({copies:ct().optional(),translate:$t.optional(),rotate:Ht.optional(),skew:Ht.optional(),scale:$t.optional(),origin:$t.optional()}),rn=yt({sourceId:ut().optional(),maskType:dt(["luminance","alpha"]).optional(),maskUnits:dt([St,Ot]).optional(),maskContentUnits:dt([St,Ot]).optional(),x:ct().optional(),y:ct().optional(),width:ct().optional(),height:ct().optional()}),on=yt({d:tn.optional(),animate:Rt.optional()}),ln=yt({offset:Ht.optional(),range:$t.optional(),subPaths:dt([Nt.separate,Nt.combined]).optional()}),sn=yt({sourceId:ut().optional(),start:ct().optional(),stretch:ct().optional(),timeCrop:gt([ct(),ct()]).optional()}),un=yt({type:dt(["content"]).optional(),sourceId:ut().optional(),retime:sn.optional()}),cn=yt({offset:ct(),color:ut()}),an=vt([mt(cn),yt({value:mt(cn)}),Rt]),fn=yt({type:dt([_t.linear,_t.radial]),p1:$t.optional(),p2:$t.optional(),c:$t.optional(),r:Ht.optional(),fp:$t.optional(),stops:an.optional(),gradientUnits:dt(["userSpaceOnUse","objectBoundingBox"]).optional(),spreadMethod:dt(["pad","reflect","repeat"]).optional(),gradientTransform:ut().optional()}),dn=fn,vn=yt({path:ut(),pathOverflow:dt(["clip","extend"]).optional(),lengthAdjust:dt(["spacing","spacingAndGlyphs"]).optional(),method:dt(["align","stretch"]).optional(),spacing:dt(["auto","exact"]).optional(),startOffset:Ht.optional(),textLength:Ht.optional()}),yn=yt({useGlyphs:at().optional()}),pn=yt({transformBy:nn.optional(),repeater:en.optional(),maskedBy:rn.optional(),clipPath:on.optional(),trimPath:ln.optional(),clone:un.optional(),fillGradient:fn.optional(),strokeGradient:dn.optional(),textPath:vn.optional(),text:yn.optional()}),mn=pt({type:ut(),id:ut().optional(),meta:bt().optional(),effects:pn.optional(),animate:Et.optional(),style:vt([ut(),ht(vt([ut(),ct()]))]).optional()},Yt),hn=pt(f(a({},mn._shape),{children:At(()=>mt(hn),[]).optional()}),Yt),bn=yt({width:vt([ct(),ut()]).optional(),height:vt([ct(),ut()]).optional(),viewBox:ut().optional(),animator:Jt.optional()}),gn=(pt(f(a(a({},mn._shape),bn._shape),{type:ft("svg"),children:mt(hn).optional()}),Yt),yt({v:mt(mt(ct())),i:mt(mt(ct())).optional(),o:mt(mt(ct())).optional(),c:at().optional()})),An=0;function wn(){return"_px_"+Date.now().toString(36)+(++An).toString(36)+Math.random().toString(36).substring(2,6)}function kn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>kn(t));const n=t,e={};for(const t of Object.keys(n))e[t]=kn(n[t]);return e}function Mn(t){var n,e;const r=kn(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=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){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]=jn(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]=jn(r,o));else if("style"===e&&"object"==typeof r&&null!==r)for(const[t,n]of Object.entries(r))"string"==typeof n&&(r[t]=jn(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))t[null!=(e=o.get(n))?e:n]=r;r.animator=f(a({},r.animator),{animateById:t})}return r}function jn(t,n){return t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t})}var xn=new Set(["script","foreignobject"]),Sn=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),On=new Set(["href","xlink:href","src"]),Nn=new Set(["mixBlendMode","isolation"]),zn=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Pn=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Cn=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,_n=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Tn(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(Sn.has(e)){const t=String(n);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||On.has(e)&&(zn.test(t)||Pn.test(t)||function(t){const n=Cn.exec(t);return!!n&&_n.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 In(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 Ln(t){var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0}function Fn(t){var n;return null!=(n=t.easing)?n:t.e}function Vn(t){var n,e,r;const o=null!=(n=t.keyframes)?n:t.kfs;if(!Array.isArray(o))return!1;if(t.autoOrient)return!0;for(const t of o)if((null!=(e=t.tangentIn)?e:t.ti)||(null!=(r=t.tangentOut)?r:t.to))return!0;return!1}var Dn=new WeakMap;function Rn(t,n,e,r){var o,i;let l=Dn.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=B(e,a,f,r),v={P0:e,P1:a,P2:f,P3:r,C:d,_:d.ds[d.ds.length-1]};return l||(l=new WeakMap,Dn.set(t,l)),l.set(n,v),v}var Un=.5,Bn=5,En=32;function Gn(t,n){var e,r,o,i;if(!Vn(t))return t;const l=null!=(e=t.keyframes)?e:t.kfs;if(!Array.isArray(l)||l.length<2)return t;const s=!!t.autoOrient,u=null!=(r=null==n?void 0:n.T)?r:Un,c=null!=(o=null==n?void 0:n.I)?o:Bn,a=null!=(i=null==n?void 0:n.L)?i:En,f=[],d=In(l[0]);if(!d)return t;const v=s?function(t,n){const e=In(t),r=In(n);if(!e||!r)return 0;const o=Rn(t,n,e,r),i=R(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(l[0],l[1]):void 0;f.push(Wn(Ln(l[0]),Xn(qn(l[0]),qn(l[0]),0,d,v,s)));for(let t=0;t<l.length-1;t++){const n=l[t],e=l[t+1],r=In(n),o=In(e);r&&o?(s&&t>0&&Jn(f,n,e,r,o,c),Hn(f,n,e,r,o,s,u,c,a)):f.push(Wn(Ln(e),Xn(qn(e),qn(e),1,null!=o?o:[0,0],void 0,s)))}const y=Fn(l[l.length-1]);y&&(f[f.length-1].e=y),s&&Zn(f);const p={kfs:f};return void 0!==t.loop&&(p.loop=t.loop),p}function Zn(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 Wn(t,n){return{t:t,v:n}}function qn(t){var n;const e=null!=(n=t.value)?n:t.v;if(e&&"object"==typeof e&&!Array.isArray(e))return e}function Qn(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 Xn(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]=Qn(o,s,e))}return void 0!==o&&(l.rotate=o+Kn(t,n,e)),l}function Kn(t,n,e){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=Qn(r,o,e);return"number"==typeof i?i:0}function Jn(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=qn(n),f=c-Kn(a,a,0),d=Rn(n,e,r,o),v=R(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=Ln(n),h=Math.min(m+Yn,(m+Ln(e))/2),b=Xn(qn(n),qn(n),0,r,y,!0);t.push(Wn(h,b))}var Yn=.05;function Hn(t,n,e,r,o,i,l,s,u){const c=Rn(n,e,r,o),a=Ln(n),f=Ln(e),d=Fn(n),v=(y=d)?A([y[1],y[0],y[3],y[2]]):t=>t;var y;const p=qn(n),m=qn(e),h=function(t,n,e,r,o){const i=[];$n(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),$n(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={F:o-l.length};for(let o=0;o<l.length-1;o++)te(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=E(c.C,t),e=F(c._>0?n/c._:t,0,1),r={u:F(v(e),0,1),p:e,V:V(c.P0,c.P1,c.P2,c.P3,t)};if(i){const n=R(c.P0,c.P1,c.P2,c.P3,t);r.D=180*Math.atan2(n[1],n[0])/Math.PI}b.push(r)}let g=d,w=0;const M=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}=k(g,r),s=0===n?M:t.length-1;o?t[s].e=o:delete t[s].e;const u=a+e.u*(f-a),c=Xn(p,m,e.p,e.V,e.D,i);t.push(Wn(u,c)),g=l,w=e.u}}function $n(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 te(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(ne(d,c,a),ne(v,c,a),ne(y,c,a));let m=!0;if(o){const e=R(r.P0,r.P1,r.P2,r.P3,t),o=R(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.F<=0||f<1e-6?e.push(n):(s.F-=1,te(t,u,e,r,o,i,l,s),te(u,n,e,r,o,i,l,s))}function ne(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 ee(t,n){const e=re(t,n);return null!=e?e:t}function re(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=re(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&&Vn(e)){const o=Gn(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 oe=1;function ie(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=>ie(t[e],n[e]))}function le(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 se(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function ue(t){return"string"==typeof t&&void 0!==se(t)}function ce(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const n=se(t.path);return n?{paths:le(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&ue(n[0])){const t=[];for(const e of n){const n=se(e);n&&t.push(...le(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&ue(t[0])){const n=[];for(const e of t){const t=se(e);t&&n.push(...le(t))}return{paths:n}}return{paths:t}}return ue(t)?{paths:le(se(t))}:t}function ae(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 fe(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 de(t,n,e,r){var o,i;return"d"===t?{paths:h(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)?m(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?y(n,e,r):O.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?p(n||[],e||[],r):y(+(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]=y(+(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]=p(r||t,l||t,e)}else o[i]=null!=l?l:r}return o}(n,e,r)}function ve(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===xt.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===xt.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 j=v.map(t=>{var n,e;return{R:(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),S=b-x*w,O=S/w,N=[],z=e.extend!==xt.before,P=n[n.length-1];let C,_=!1;function T(n,e,r){var o;let i;if(e){i=[];for(let t=j.length-1;t>=0;t--)i.push({R:1-j[t].R,v:j[t].v,e:t>0?M(j[t-1].e):void 0,tangentIn:j[t].tangentOut,tangentOut:j[t].tangentIn})}else i=j;const l=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.R>l+1e-9){const o=i[e-1],s=r.R-o.R,u=(l-o.R)/s,c=o.e?A(o.e)(u):u,a=de(t,o.v,r.v,c),{left:f}=k(o.e,u);return N.length>0&&o.R<=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.R*w))<1e-9;if(u){if(ie(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.R*w+(u?oe: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===xt.before){O>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=j.length-1;t>=0;t--)o.push({R:1-j[t].R,v:j[t].v,e:t>0?M(j[t-1].e):void 0,tangentIn:j[t].tangentOut,tangentOut:j[t].tangentIn})}else o=j;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.R<i-1e-9)continue;const l=o[e-1];if(l&&l.R<i-1e-9&&r.R>i+1e-9){const e=r.R-l.R,o=(i-l.R)/e,s=l.e?A(l.e)(o):o,u=de(t,l.v,r.v,s),{right:c}=k(l.e,o);N.push({t:n,v:u,e:c})}const s={t:n+(r.R-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,O);for(let t=0;t<x;t++){const n=x-1-t,r=!!e.alternate&&n%2==0;T(m+S+t*w,r)}}else{for(let t=0;t<x;t++){const n=!!e.alternate&&t%2==0;T(m+t*w,n)}if(O>1e-9){const t=!!e.alternate&&x%2==0;T(m+x*w,t,O)}}return e.extend===xt.before?[...N,...n]:_&&n.length>0?[...n.slice(0,-1),f(a({},n[n.length-1]),{e:C}),...N]:[...n,...N]}function ye(t,n,e,r){var o,i,l,s,u,c,a;const f=n.keyframes||n.kfs||[],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=ce(f));const y=T(t)?L(t):t;S.has(y)&&(f=null!=(u=x(f))?u:f);const p={t:e,v:f,e:ae(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?ve(t,d,y,e):d}function pe(t,n,e){var r;const o=n.loop;if(null==o||!1===o)return n;const i=!0===o?{}:o,l=null!=(r=n.keyframes)?r:n.kfs;if(!Array.isArray(l)||l.length<2)return n;const s=T(t)?L(t):t,u=S.has(s),c=l.map(n=>{var e,r,o,i,l,s,c,a;const f=null!=(e=n.t)?e:n.time;let d=null!=(r=n.v)?r:n.value;"d"===t&&(d=ce(d)),u&&(d=null!=(o=x(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!=(s=n.tangentIn)?s:n.ti),(null!=(c=n.tangentOut)?c:n.to)&&(v.tangentOut=null!=(a=n.tangentOut)?a:n.to),v}),a={kfs:ve(t,c,i,e)};return void 0!==n.autoOrient&&(a.autoOrient=n.autoOrient),a}function me(t,n){const e=he(t,n);return null!=e?e:t}function he(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=he(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=pe(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 be=0;function ge(t,n=jt.waapi){const e=Tt(t)||{},r=It(t),o=e.duration||1e3,i=[],l=(t,e)=>{if(!e)return null;const i=function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=fe(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=fe(r,n);t&&e.push(t)}else e.push(t);return e}(e,r);if(0===i.length)return null;const l=function(t,n,e,r=jt.waapi){const o={};for(const[i,l]of Object.entries(t)){if("transform"===i&&"offsetPath"===l.U&&void 0!==t.offsetDistance)continue;const s=ye(i,l,n,e);if(s.length>0){const t={kfs:s};void 0!==l.autoOrient&&(t.autoOrient=l.autoOrient),void 0!==l.loop&&(t.loop=l.loop),o[i]=r===jt.waapi&&"transform"===i?Gn(t):t}}return o}(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(i),o,r,n);return 0===Object.keys(l).length?null:{id:t,animate:l}},s=function(t){var n;if(!t)return;const e=null==(n=Tt(t))?void 0:n.animateById;return e?Object.entries(e).map(([t,n])=>({id: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_"+ ++be;t.id=e;const r=l(e,n);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 Ae(t,n,e){var r,o,i,l,s,u,c;const a=n.kfs||n.keyframes||[];if(0===a.length)return null;const{B:f,G: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{B:i,G:l}}(a,e);let b=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;b=F(b,0,1);const M=null!=(i=f.e)?i:f.easing;if(M&&Array.isArray(M))try{b=A(M)(b)}catch(t){}let x=T(t)?L(t):t,O=null;const P=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"===x)O=h(null!=(u=null==P?void 0:P.paths)?u:Array.isArray(P)?P:[],null!=(c=null==C?void 0:C.paths)?c:Array.isArray(C)?C:[],b).map(t=>v(t)).join("");else if(S.has(x))O=j(m(P||[0,0,0,1],C||[0,0,0,1],b)),x=t;else if("stroke-dasharray"===x)O=p(P||[],C||[],b).join(" "),x=t;else if("transform"!==x||null===P||"object"!=typeof P||Array.isArray(P))"translate"===x?(O="translate("+p(P||[0,0],C||[0,0],b).join(",")+")",x="transform"):"rotate"===x?(O="rotate("+y(+(P||0),+(C||0),b)+")",x="transform"):"scale"===x?(O="scale("+p(P||[1,1],C||[1,1],b).join(",")+")",x="transform"):O=y(+(P||0),+(C||0),b);else{const t=new Set([...P?Object.keys(P):[],...C?Object.keys(C):[]]),e={};for(const n of t){const t=null==P?void 0:P[n],r=null==C?void 0:C[n];if("rotate"===n||"skew"===n)e[n]=y(+(null!=t?t:0),+(null!=r?r:0),b);else if("translate"===n||"scale"===n||"origin"===n){const o="scale"===n?[1,1]:[0,0],i=p(t||o,r||o,b);e[n]=i}}if(Vn(n)){const t=P.translate,r=C.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,n,e,r,o,i){const l=Rn(t,n,e,r),s=0===l._?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.C,o),u=V(l.P0,l.P1,l.P2,l.P3,s);if(!i)return{translate:u};const c=R(l.P0,l.P1,l.P2,l.P3,s);return{translate:u,D:180*Math.atan2(c[1],c[0])/Math.PI}}(f,d,[+t[0],+t[1]],[+r[0],+r[1]],b,!!n.autoOrient);e.translate=[o.translate[0],o.translate[1]],void 0!==o.D&&(e.rotate=o.D)}}O=z(e,{l:!1}),x="transform"}return N.has(x)&&"number"==typeof O&&(O=100*O+"%"),{k:x,v:null===O?"":""+O}}function we(t,n){const e={};for(const[r,o]of Object.entries(t)){const t=Ae(r,o,n);t&&(e[t.k]=t.v)}return e}function ke(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(ke);const n={};for(const e of Object.keys(t))n[e]=ke(t[e]);return n}function Me(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 je(t){const n="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(n)?n:0}function xe(t){var n;const e=je(t.x),r=je(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 Se(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return Number.isFinite(n)?n:void 0}}function Oe(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function Ne(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 ze(t,n,e,r,o,i){if("use"===t.type&&"string"==typeof t.href){const l=Oe(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=ke(n);Me(v,o);const y="symbol"===v.type?Ne(v.viewBox):void 0,p=null!=(u=null!=(s=Se(t.width))?s:null==y?void 0:y[2])?u:l[0],m=null!=(d=null!=(c=Se(t.height))?c:null==y?void 0:y[3])?d:l[1],h="symbol"===v.type?function(t,n,e,r,o){const i=Ne(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=ze(h,e,r,o,i,l),g=f(a({},t),{type:"g",children:[b]});return delete g.href,delete g.width,delete g.height,xe(g)}(t,s,n,e,r,o,i)}}if(!t.children)return t;let l=!1;const s=t.children.map(t=>{const s=ze(t,n,e,r,o,i);return s!==t&&(l=!0),s});return l?f(a({},t),{children:s}):t}function Pe(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 Ce(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.kfs;if(i){const t={kind:"animated",keyframes:i.map(Te),autoOrient:o.autoOrient,loop:o.loop},n=null!=(e=o.value)?e:o.v;return void 0!==n&&"animated"===t.kind&&(t.Z=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 _e(t,n,e,r){var o,i,l,s;const u=t=>(null==r?void 0:r.W)&&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.Z)?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 Te(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 Ie(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 Le(t,n,e){if(!n)return t;delete t.transform;let r=t;return r=Ve(r,n.origin,!0),r=Fe(r,"scale",n.scale),r=Fe(r,"skew",n.skew),r=Fe(r,"rotate",n.rotate),r=Ve(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=Ve(r,n.origin,!0),r=Fe(r,"translate",n.translate),r=Ve(r,n.origin,!1)):r=Fe(r,"translate",n.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function Fe(t,n,e,r){if(void 0===e)return t;const o=Ce(e);if("static"===o.kind)return{type:"g",transform:{value:Pe(n,o.value,void 0)},children:[t]};if("animated"===o.kind){const e={keyframes:o.keyframes.map(t=>Ie(t,Pe(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 Ve(t,n,e){if(void 0===n)return t;const r=Ce(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=>Ie(t,{translate:o(t.value)}))};return void 0!==r.loop&&(n.loop=r.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function De(t,n){return"_lw_"+n+"_"+t.q++}function Re(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Ue(t,n){var e;"string"==typeof t.id&&n.set(t.id,t),null==(e=t.children)||e.forEach(t=>Ue(t,n))}var Be=ke;function Ee(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=Re(t.effects.clone.sourceId);"string"==typeof r&&r&&!n.X.has(r)&&n.X.set(r,e(r))}null==(i=t.children)||i.forEach(t=>Ee(t,n,e))}function Ge(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 Ze(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 We(t,n,e,r){if(!n)return t;const o=De(e,"grad"),i=function(t,n){const e={type:t.type===_t.radial?"radialGradient":"linearGradient",id:n};return t.type===_t.linear?(qe(e,"x1","y1",t.p1),qe(e,"x2","y2",t.p2)):(qe(e,"cx","cy",t.c),function(t,n,e){const r=Ce(e);"absent"!==r.kind&&_e(t,"r",r,{W:!0})}(e,0,t.r),qe(e,"fx","fy",t.fp)),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=Ce(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(Qe):[];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:Xe(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:Xe(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:Ke(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 qe(t,n,e,r){var o,i,l;const s=Ce(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.Z)?l:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(a)&&(t[n]=String(a[0]),t[e]=String(a[1]))}function Qe(t){return{type:"stop",offset:Ke(t.offset),stopColor:t.color}}function Xe(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 Ke(t){return Math.round(1e3*t)/10+"%"}function Je(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function Ye(t,n,e){if(!n)return t;const r=function(t,n){var e;const r=Ce(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=He(o,"translate",n.translate,void 0),o=He(o,"rotate",n.rotate,r),o=He(o,"scale",n.scale,r),o}function He(t,n,e,r,o){if(void 0===e)return t;const i=Ce("scale"===n&&Array.isArray(e)?[e[0]/100,e[1]/100]:e);if("static"===i.kind)return{type:"g",transform:{value:Pe(n,$e(n,i.value),r)},children:[t]};if("animated"===i.kind){const e={keyframes:i.keyframes.map(t=>{const e=Ie(t,Pe(n,$e(n,t.value),r));return"translate"===n?a(a({},e),tr(t)):e})};return void 0!==i.loop&&(e.loop=i.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function $e(t,n){return"translate"===t?[-n[0],-n[1]]:"rotate"===t?-n:[1/n[0],1/n[1]]}function tr(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 nr(t){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!n||!n.transform)}function er(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 rr(t,n){let e=0,r=0;for(const o of t)if(o.K&&o.K.length){const t=or(o.K,n);e+=t[0],r+=t[1]}else o.translate&&(e+=o.translate[0],r+=o.translate[1]);return[e,r]}function or(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 ir(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.kfs){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.K=i)}return s.translate||s.K?s:void 0}var lr="content";function sr(t,n,e){if(!n)return;const r=Re(n.sourceId);if(!r)return void(n.type===lr&&e.errors.push("clone: content ref missing sourceId"));const o=n.type===lr&&e.X.get(r)||r;t.href="#"+o}function ur(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=Ce(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.Z&&(o.value=n(r.Z)),o}var ar=!1;function fr(t){var n,e;return{start:null!=(n=t.start)?n:0,stretch:null!=(e=t.stretch)?e:1}}var dr=1;function vr(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-dr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+dr,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 yr(t,n){return{start:n.start+n.stretch*t.start,stretch:n.stretch*t.stretch}}function pr(t){var n,e;return null==(e=null==(n=t.effects)?void 0:n.clone)?void 0:e.retime}function mr(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 hr(t,n,e){const r=Re(t.href);if(!r)return void e.errors.push("retime: <use> has no href to follow");const o=br(r,n,e,new Set);if(o)if(ar){const n=e.J.get(o);t.type="g",delete t.href,t.children=[n],xe(t),e.defs=e.defs.filter(t=>t!==n)}else t.href="#"+o}function br(t,n,e,r){if(r.has(t))return void e.errors.push('retime: loop via "'+t+'"');const o=e.J.get(t);if(!o)return void e.warnings.push('retime: target "'+t+'" not found');const i=Be(o);if(function(t,n){Me(t,()=>De(n,"retimed"))}(i,e),"use"===o.type?Ar(i,n.start,n.stretch):gr(i,n.start,n.stretch),mr(i),"use"===o.type&&o.href){const l=Re(o.href);if(l){const s=pr(o),u=s?yr(fr(s),n):n,c=new Set(r);c.add(t);const a=br(l,u,e,c);a&&(i.href="#"+a)}}else!function(t,n,e,r,o){const i=t=>{var l;const s=pr(t);if("use"===t.type&&s&&t.href){const i=Re(t.href);if(i){const l=yr(fr(s),n),u=new Set(r);u.add(o);const c=br(i,l,e,u);c&&(t.href="#"+c)}mr(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.J.set(i.id,i),"string"==typeof i.id?i.id:void 0}function gr(t,n,e){var r;Ar(t,n,e),null==(r=t.children)||r.forEach(t=>gr(t,n,e))}function Ar(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 wr=48,kr=/[MmLlHhVvCcSsQqTtAaZz]/;function Mr(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 jr(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=B(l,t,n,r,wr);e.push({P0:l,P1:t,P2:n,P3:r,C:s,Y: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];kr.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}=Mr([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}=Mr([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].Y;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.Y>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.C,i):0,[s,u]=V(o.P0,o.P1,o.P2,o.P3,l),[c,a]=R(o.P0,o.P1,o.P2,o.P3,l);return{x:s,y:u,angle:Math.atan2(a,c)}};return{H:r,closed:l,$(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 xr=.15;function Sr(t){const n=Ce(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 Or(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 Nr=t=>Math.round(1e3*t)/1e3;function zr(t,n,e){null!=e&&_e(t,n,Ce(e),{W:!0})}var Pr=(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 Cr(t,n){return Math.round(t)===t?""+Math.round(t):t.toFixed(n)}function _r(t,n){let e="";for(let r=0;r<t.length;r++){const o=Cr(t[r],n);r>0&&45!==o.charCodeAt(0)&&(e+=" "),e+=o}return e}function Tr(t,n,e){return[t[0]*n+t[2]*e+t[4],t[1]*n+t[3]*e+t[5]]}var Ir=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function Lr(t,n,e=2){const r=[];let o;for(Ir.lastIndex=0;null!==(o=Ir.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]=Tr(n,s(),s());i+=t+_r([r,o],e)}else if("C"===t){const[t,r]=Tr(n,s(),s()),[o,l]=Tr(n,s(),s()),[u,c]=Tr(n,s(),s());i+="C"+_r([t,r,o,l,u,c],e)}else if("Q"===t){const[t,r]=Tr(n,s(),s()),[o,l]=Tr(n,s(),s());i+="Q"+_r([t,r,o,l],e)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var Fr=16,Vr=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",zt,Pt,"xml:space"];function Dr(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return isNaN(n)?void 0:n}}function Rr(t){return"string"==typeof t?t:void 0}function Ur(t,n){var e,r,o,i,l,s,u;return{fontFamily:null!=(e=Rr(t.fontFamily))?e:n.fontFamily,fontSize:null!=(r=Dr(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=Dr(t.letterSpacing))?s:n.letterSpacing,wordSpacing:null!=(u=Dr(t.wordSpacing))?u:n.wordSpacing}}function Br(t){var n,e,r;return{fontFamily:Rr(t.fontFamily),fontSize:null!=(n=Dr(t.fontSize))?n:Fr,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(e=Dr(t.letterSpacing))?e:0,wordSpacing:null!=(r=Dr(t.wordSpacing))?r:0}}function Er(t){const n={};return void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),n}function Gr(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 Zr(t){const n=Object.keys(t);return 1===n.length?t[n[0]]:void 0}var Wr=.6;function qr(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 Qr(t,n,e,r,o=0){const{x:i,y:l,angle:s}=t.$(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 Xr(t){var n;const e=Ce(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,tt: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,tt:[],at:()=>r}}var Kr=48,Jr=64;function Yr(t,n){const e=u(10,n);return Math.round(t*e)/e}function Hr(t){const n={};return void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),n}function $r(t,n,e){var r,o,i;if(!t.length)return null==e||e.push("textGlyphs: nothing to render"),[];const l=new Map;for(const n of t){const t=JSON.stringify([null!=(r=n.nt.fill)?r:null,null!=(o=n.nt.stroke)?o:null,null!=(i=n.nt.strokeWidth)?i:null]),e=Lr(n.et,n.m),s=l.get(t);s?s.d+=e:l.set(t,{nt:n.nt,d:e})}const s=[];for(const{nt:t,d:e}of l.values())s.push(n("path",a({d:e},Hr(t)),[]));return s}function to(t,n,e){const r={};for(const n of Object.keys(t))"type"!==n&&"children"!==n&&-1===Vr.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 no(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 eo(t,n,e,r,o,i,l,s){const u=oo(r,e,o),c=io(e,o),a=so(i,u),f=so(l,c),d=ao(l),y={type:"path",d:v(n)};return uo(y,"strokeDasharray",f),uo(y,"strokeDashoffset",a),uo(y,"strokeOpacity",d),[y]}var ro=1;function oo(t,n,e){const[r]=lo(e);return e=>n*(-e-r+t)+ro}function io(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),l=Math.max(e,r),s=[0];let u=ro;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+ro),s}}function lo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function so(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 uo(t,n,e){e&&_e(t,n,e)}var co=10;function ao(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+co,value:1})):!y&&p&&(f.push({time:d-co,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function fo(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 vo(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 yo(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+=po(t,r,r+1);return t.c&&n.length>1&&(e+=po(t,n.length-1,0)),e}function po(t,n,e){var r,o,i,l;const s=t.v,u=s[n],c=s[e],a=B(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 mo=.5522847498307936;function ho(t){var n,e;const r={defs:[],warnings:[],errors:[],J:new Map,q:0,X:new Map,rt:new Map,ot:(null==(n=Tt(t))?void 0:n.mode)===Mt.frames?jt.frames:jt.waapi,glyphs:null==(e=It(t))?void 0:e.glyphs},o=Be(t);Ue(o,r.J),Ee(o,r,()=>De(r,"inner")),function(t,n){const e=new Set,r=t=>{var o,i;const l=Re(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.sourceId);if("string"==typeof l){e.add(t);const r=n.J.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.rt.set(t,r),Array.isArray(t.children)){const e=ir(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.J.clear(),Ue(t,n.J);const e=[],r=t=>{var n;pr(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&&pr(o)&&e++,"use"===o.type&&o.href){const t=Re(o.href);t&&!r.has(t)&&(r.add(t),i(n.J.get(t)))}null==(l=o.children)||l.forEach(i)}},l=Re(t.href);l&&(r.add(l),i(n.J.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=pr(t);if(!e)continue;const r=e.timeCrop;mr(t),hr(t,fr(e),n),r&&vr(t,r,n)}}(t,n),t}(bo(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 bo(t,n){t.children&&(t.children=t.children.map(t=>bo(t,n)));const e=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?n.X.get(r):void 0;if(!e&&!o)return t;const{transformBy:i,repeater:l,maskedBy:s,clipPath:u,trimPath: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=Pr,warnings:u}=r,c=n?jr(n):null;if(!c)return null==u||u.push("textGlyphs: unparsable along-path geometry"),null;const d=Zr(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=Ur(t,s),d=null!=(u=Rr(t[Pt]))?u:Rr(t[zt]);if(d&&!(null==(c=t.children)?void 0:c.length)){const t=Gr(f,n,e,r);if(t){const n=f.fontSize/t.unitsPerEm,e=null!=(a=t.ascent)?a:.9*t.unitsPerEm,r=Er(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({et:u.d,it:u.width,scale:n,nt:r,lt:i+t/2}),i+=t}else if(/\S/.test(s)){const l=u&&u.width>0?u.width:Wr*t.unitsPerEm,s=l*n;o.push({et:qr(l,e),it:l,scale:n,nt:r,lt: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,Br(t)),{cells:o,width:i}}(t,l,d,u);if(!v.length)return to(t,[],s);const{st:p,ut:m}=function(t){var n,e,r;return{st:(null!=(n=Dr(t.x))?n:0)+(null!=(e=Dr(t.dx))?e:0),ut:null!=(r=Dr(t.dy))?r:0}}(t),h=Xr(e),b=Xr(o),g=t=>t>0&&y>0?t/y:1,A="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.tt,b.tt),e=(t,n)=>p+h.at(n)+g(b.at(n))*t.lt,r=h.animated?h.loop:b.loop;return to(t,function(t,n,e,r,o,i,l,s=0){const u=Math.max(n.H/Kr,.5),c=t=>t>=0&&t<=n.H,d=[];for(const v of t){const t=[v.scale,0,0,v.scale,-v.scale*(v.it/2),0],y=Lr(v.et,t),p=(t,e)=>{const{x:r,y:o,angle:i}=n.$(t),l=Math.cos(i),u=Math.sin(i);return{time:e,value:{translate:[Yr(r-s*u,3),Yr(o+s*l,3)],rotate:Yr(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(Jr,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)}}Zn(m);const g={keyframes:m};void 0!==o&&(g.loop=o);const A={transform:g};if(l&&h.some(t=>0===t.value)){const t={keyframes:h};void 0!==o&&(t.loop=o),A.opacity=t}d.push(i("path",f(a({d:y},Hr(v.nt)),{animate:A}),[]))}return d}(v,c,e,n,r,s,A,m),s)}const w=g(b.at(0)),k=p+h.at(0);return to(t,$r((A?v.filter(t=>{const n=k+t.lt*w;return n>=0&&n<=c.H}):v).map(t=>({et:t.et,nt:t.nt,m:Qr(c,k+t.lt*w,t.scale,t.it,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=Pr,warnings:u}=n,c=Zr(l),a={x:null!=(e=Dr(t.x))?e:0,y:null!=(r=Dr(t.y))?r:0},f=[],d=[{start:a.x,end:a.x}];let v=0;const y=(t,n)=>{var e;const r=Gr(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=Er(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({et:u.d,m:[i,0,0,i,a.x,a.y],nt: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:Wr*o;f.push({et:qr(t,s),m:[i,0,0,i,a.x,a.y],nt:y,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=Ur(t,n),s=Dr(t.x),u=Dr(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=Dr(t.dx))?e:0,a.y+=null!=(r=Dr(t.dy))?r:0;const c=null!=(o=Rr(t[Pt]))?o:Rr(t[zt]);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=Br(t);if(t.children)for(const n of t.children)p(n,m);const h=null!=(o=Rr(t[Pt]))?o:Rr(t[zt]);h&&!(null==(i=t.children)?void 0:i.length)&&y(h,m);const b=Rr(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 to(t,$r(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=De(e,"tpath"),{d:i,ct:l}=function(t,n){var e;if("clip"===n.pathOverflow)return{d:t,ct:0};const r=jr(t);if(!r||r.closed||r.H<=0)return{d:t,ct:0};const o=r.H,i=xr*o,l=Sr(n.startOffset),s=Sr(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,ct:0};const d=r.$(0),v=r.$(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"+Nr(n)+","+Nr(e)+"L"+Nr(d.x)+","+Nr(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"+Nr(t)+","+Nr(n)}return{d:y,ct:a}}(n.path,{pathOverflow:n.pathOverflow,startOffset:n.startOffset,textLength:n.textLength,advance:Or(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),zr(s,"startOffset",function(t,n){if(!n||null==t)return t;const e=Ce(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.Z&&(r.value=e.Z+n),r}(n.startOffset,l)),zr(s,"textLength",n.textLength),t.children=[s],t}(h,p,n)),h=function(t,n,e){return We(t,n,e,"fill")}(h,v,n),h=function(t,n,e){return We(t,n,e,"stroke")}(h,y,n),h=function(t,n){if(!n)return t;const e=n.subPaths===Nt.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*mo,d=o*mo,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=le(n);if(!e.length)return;const i={leaf:t,ft:[]};for(const t of e){const n=yo(t);i.ft.push({dt:t,vt:n,yt: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.ft)e||(i=0),n.yt=i,i+=n.vt;const s=i;if(e&&s<.001)return t;const u=Ce(n.offset),c="absent"===u.kind?{kind:"static",value:0}:u,d=function(t){const n=Ce(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=fo(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=vo(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=vo(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].ft.length){const n=r[0],o=n.ft[0],i=e?s:o.vt;if(i<.001)return t;const l=e?o.yt/i:0;return function(t,n,e,r,o,i){const l=oo(e,n,r),s=io(n,r),u=a({},t);return delete u.effects,uo(u,"strokeDasharray",so(i,s)),uo(u,"strokeDashoffset",so(o,l)),uo(u,"strokeOpacity",ao(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.ft){const o=e?s:r.vt;if(o<.001)continue;const i=e?r.yt/o:0;n.push(...eo(t.leaf,r.dt,o,i,p,c,v))}m.set(t.leaf,no(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=Be(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=Be(u),r=ur(n,t),o=r?Le(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=Re(n.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=De(r,"mask");let l={type:"use",href:"#"+o};if(e)l=Ye(l,e,r);else if(nr(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=Ie(t,void 0);if(Array.isArray(n.translate)&&l.push(f(a(a({},r),tr(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],ht: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.ht[0])?n:0,d=null!=(e=a.ht[1])?e:0,v=null!=(r=h.ht[0])?r:0,y=null!=(o=h.ht[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].ht[0])?i:0,e=null!=(l=m[n].ht[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.ht[0])?u:0);else if("scale"===t.name){const n=null!=(c=t.ht[0])?c:1,e=t.ht.length>1?t.ht[1]:n;p.scale=p.scale?[p.scale[0]*n,p.scale[1]*e]:[n,e]}}return p}let b,g,A;for(const t of m)if("translate"===t.name){const n=null!=(a=t.ht[0])?a:0,e=null!=(f=t.ht[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.ht[0])?d:0);else if("scale"===t.name){const n=null!=(v=t.ht[0])?v:1,e=t.ht.length>1?t.ht[1]:n;A=A?[A[0]*n,A[1]*e]:[n,e]}const w={};return b&&(w.translate=b),void 0!==g&&(w.rotate=g),A&&(w.scale=A),Object.keys(w).length?w: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&&!t.transform.kfs){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=Ye(l,n,r))}const s=void 0===e&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||nr(t)}(t);l=function(t,n,e,r,o){const i=r.J.get(e),l=r.rt.get(n)||[],s=o?ir(n,r):void 0,u=s?[...l,s]:l,c=i&&r.rt.get(i)||[];if(!u.length&&!c.length)return t;const a=new Set;for(const t of u)if(t.K)for(const n of t.K)a.add(n.time);for(const t of c)if(t.K)for(const n of t.K)a.add(n.time);if(!(a.size>0)){const n=er(u),e=er(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=rr(u,t),e=rr(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){var r,o;if(!n||!n.d&&!n.animate)return t;const i=De(e,"clip"),l={type:"path"},s=Ce(n.d);if("absent"!==s.kind&&("static"===s.kind?l.d=Je(s.value):(_e(l,"d",s),void 0!==l.d&&(l.d=Je(l.d)))),n.animate&&!(null==(r=l.animate)?void 0:r.d)){const t=null!=(o=l.animate)?o:{};t.d=n.animate,l.animate=t}return e.defs.push({type:"clipPath",id:i,children:[l]}),t.clipPath="url(#"+i+")",t}(h,u,n),o?(sr(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=Ze(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&&Ze((null==(r=t.animate)?void 0:r.transform)||void 0)||l&&Ze((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],bt:r[0]});if(!n.length)return{gt:t||void 0};if(n.every(t=>"translate"===t.name))return{translate:n.map(t=>t.bt).join("")};const o=n[0],i=n[n.length-1];if("translate"===i.name&&"translate"===o.name){const e=Ge(i.bt),r=Ge(o.bt),l=-e[0],s=-e[1],u=r[0]-l,c=r[1]-s;return 0===u&&0===c?{gt:t}:{translate:"translate("+u+","+c+")",gt:"translate("+l+","+s+")"+n.slice(1).map(t=>t.bt).join("")}}if("translate"===i.name)return{gt:t};const l=[];let s=0;for(;s<n.length&&"translate"===n[s].name;)l.push(n[s].bt),s++;if(!l.length)return{gt:t};const u=n.slice(s).map(t=>t.bt).join("");return{translate:l.join(""),gt:u||void 0}}(t.transform);c?void 0!==n.translate?n.gt?t.transform=n.gt: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],bt: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].bt);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.gt?t.transform=n.gt:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes&&!t.transform.kfs){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{At:i,inner:l}=function(t){if(!t)return{};const n=Ze(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),{At:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(n);let s=t;s=Le(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=Le(u,i),u.id=e),u}(h,i,r,o)):h=function(t,n,e,r){return sr(t,n,r),Le(t,e)}(h,d,i,n),(null==d?void 0:d.retime)&&(t.effects={clone:{retime:d.retime}}),r&&n.J.set(r,h),h}var go=t=>{var n,e;return null!=(e=null!=(n=t.t)?n:t.time)?e:0},Ao=t=>{var n;return null!=(n=t.v)?n:t.value},wo=t=>{var n;return null!=(n=t.e)?n:t.easing},ko=t=>{var n;return null!=(n=t.tangentIn)?n:t.ti},Mo=t=>{var n;return null!=(n=t.tangentOut)?n:t.to};function jo(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 xo(t,n,e,r,o=64){let i=0,l=t;for(let s=1;s<=o;s++){const u=jo(t,n,e,r,s/o);i+=Math.hypot(u[0]-l[0],u[1]-l[1]),l=u}return i}var So=t=>{const n=Math.round(1e4*t)/1e4;return Object.is(n,-0)?"0":String(n)};function Oo(t,n,e){var r,o;let i=ho(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,o;if("offsetPath"!==t.U)return;const i=null!=(n=t.keyframes)?n:t.kfs;if(!i||i.length<2)return;const l=Ao(i[0]),s=(null==l?void 0:l.origin)&&l.origin.length>=2?[l.origin[0],l.origin[1]]:[0,0],u=[];for(const t of i){const n=Ao(t),r=null==n?void 0:n.translate;if(!r||r.length<2)return;if(Object.keys(n).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(e=null==n?void 0:n.origin)?e:[0,0];if(o[0]!==s[0]||o[1]!==s[1])return;u.push([r[0]+s[0],r[1]+s[1]])}if(!i.some(t=>ko(t)||Mo(t)))return;let c="M"+So(u[0][0])+","+So(u[0][1]);const a=[];for(let t=0;t<u.length-1;t++){const n=u[t],e=u[t+1],l=null!=(r=Mo(i[t]))?r:[0,0],s=null!=(o=ko(i[t+1]))?o:[0,0],f=[n[0]+l[0],n[1]+l[1]],d=[e[0]+s[0],e[1]+s[1]];c+="C"+So(f[0])+","+So(f[1])+","+So(d[0])+","+So(d[1])+","+So(e[0])+","+So(e[1]),a.push(xo(n,f,d,e))}const f=a.reduce((t,n)=>t+n,0);if(!(f>0))return;const d=[];let v=0;for(let t=0;t<i.length;t++){t>0&&(v+=a[t-1]);const n={t:go(i[t]),v:v/f},e=wo(i[t]);void 0!==e&&(n.e=e),d.push(n)}return{wt:c,kt:d,autoOrient:!!t.autoOrient,anchor:s}}(i);if(n){const e=a({},o);delete e.transform;const l={keyframes:n.kt};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.wt+"')",offsetAnchor:So(n.anchor[0])+"px "+So(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=me(i,null!=(o=null==(r=Tt(i))?void 0:r.duration)?o:C),n===jt.waapi&&(i=ee(i,null==e?void 0:e.Mt),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=Oe(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=Ne(t.viewBox);if(n)return[n[2],n[3]];const e=Se(t.width),r=Se(t.height);return void 0!==e&&void 0!==r?[e,r]:[1,1]}(t),l=[],s=ze(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 No(t){const n=globalThis;"function"!=typeof n.cancelAnimationFrame?n.clearTimeout(t):n.cancelAnimationFrame(t)}function zo(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 Po(t){return"#"+t}function Co(t,n,e,r){const o=Tt(t)||{};if(!r)if(t.id){const n=Po(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=Tt(t)||{},i=ge(t,jt.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),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 A=o.frameRate,w=A&&A>0?1e3/A: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=we(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 S=()=>!!p&&!!n.isConnected()&&(b<0?M()>0:!(Number.isFinite(c)&&j()>=c)),O=t=>{null!==y&&(No(y),y=null),(t||S())&&(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.jt)||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.jt)||r.call(e)));if(w>0){const t=Date.now();if(k&&t-k<w)return;k=t}x(o)}})(),O()}))},N=()=>{if(!p)return;let t=M();Number.isFinite(c)&&t>c&&(t=c),m=t,h=0,p=!1,null!==y&&(No(y),y=null),t>=0?x(t):v&&x(0)},z={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>S(),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(),O(!0)}})(),null==(t=null==e?void 0:e.xt)||t.call(e)},pause:()=>{var t;N(),null==(t=null==e?void 0:e.St)||t.call(e)},cancel:()=>{var t;N(),m=0,h=0,p=!1,g=!1,x(m),null==(t=null==e?void 0:e.Ot)||t.call(e)},finish:()=>{((t=!0)=>{var n;m=Number.isFinite(c)?c:j(),h=0,p=!1,null!==y&&(No(y),y=null),x(d?m:0),t&&!g&&(g=!0,null==(n=null==e?void 0:e.jt)||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.Nt)||t.call(e)}};return z}(t,n||function(t){const n=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(e,r,o)=>{r=L(r);const i=Po(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),P.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)"):zo(l,o.trigger)),l}function _o(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=j(l):"transform"!==e||null===l||"object"!=typeof l||Array.isArray(l)?O.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=>v(t,!0)).join("")+'")':N.has(e)&&"number"==typeof l?100*l+"%":""+l:(c=z(l,{l:!0}),a="transform"),CSS.supports(L(a),c)||r.add(a),a=_(a),u[a]=c,u}function To(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}=k(d.e,n);u.push({t:0,v:de(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}=k(r.e,o);u.length>0&&(u[u.length-1]=f(a({},u[u.length-1]),{e:l})),u.push({t:e,v:de(t,r.v,d.v,i),e:void 0})}break}u.push(d)}return u}function Io(t,n,e){var r;const o=new Map;for(const[i,l]of Object.entries(t)){const t=e.duration||1,s=To(i,l.kfs||l.keyframes||[],t),u=[];for(let e=0;e<s.length;e++){const o=s[e],l=_o(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 Lo(t,n,e,r,o){var i;const l=Tt(t)||{};if(!e)if(t.id){const n=Po(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=ge(t,jt.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=Po(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=Io(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.jt)&&(i.onfinish=()=>{var t;d||(d=!0,null==(t=n.jt)||t.call(n))}),(null==n?void 0:n.Nt)&&(i.onremove=()=>{var t;v||(v=!0,null==(t=n.Nt)||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.xt)||t.call(n)},pause:()=>{var t;u.forEach(t=>t.pause()),null==(t=null==n?void 0:n.St)||t.call(n)},cancel:()=>{var t;d=!1,u.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.Ot)||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.Nt)||t.call(n))}};return l.trigger&&("scroll"===l.timelineSource?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):zo(y,l.trigger)),o&&u.forEach(t=>t.play()),y}function Fo(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?{zt:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:s}:{offset:s}}function Vo(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 Do(){return document.scrollingElement||document.documentElement}var Ro="parent",Uo="scroller";function Bo(t,n){var e,r;const o=null==n?void 0:n.trim();if(!o)return t;if(o===Ro){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===Uo)return Vo(t,"y")||Vo(t,"x")||Do();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 Eo(t,n){var e;const r=t;if(!(null==n?void 0:n.pin)||!r.style)return()=>{};const o=r.style,i=o.position,l=o.top;o.position="sticky",o.top=(null!=(e=n.pinTop)?e:0)+"px";let s=null;const u=t.parentElement;return n.pinDistance&&n.pinDistance>0&&u&&(s=document.createElement("div"),s.setAttribute("data-px-pin",""),s.style.height=100*n.pinDistance+"vh",u.insertBefore(s,t),s.appendChild(t)),()=>{o.position=i,o.top=l,(null==s?void 0:s.parentElement)&&(s.parentElement.insertBefore(t,s),s.remove())}}function Go(t,n,e){let r,o=n;t.resetOnFinish&&(o=f(a({},n),{jt:()=>{var t;null==(t=null==n?void 0:n.jt)||t.call(n),null==r||r.cancel()}}));const i=e(o);return r=i,t.debugInstName&&(window[t.debugInstName]=i),i}var Zo="http://www.w3.org/2000/svg";function Wo(t,n){if(!t)return null;const e=t,{type:r,children:o,style:u}=e,c=((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})(e,["type","children","style"]),a=c.Pt;void 0!==a&&delete c.Pt;const f=It(t)||n,d=function(t,n){var e;if(t)return"string"==typeof t?null==(e=null==n?void 0:n.styles)?void 0:e[t]:t}(u,f);let v;if(o)for(const t of o){const n=Wo(t,f);n&&(v||(v=[]),v.push(n))}const y=function(t,n,e,r,o){if(xn.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(Zo,t);for(const t in n){const e=Tn(t,n[t]);void 0!==e&&(Nn.has(t)?i.style[t]=String(e):i.setAttribute(L(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(Ct.has(r))continue;if("style"===r)continue;let o=t[e];if(S.has(r)&&Array.isArray(o))n[r]=j(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes||o.kfs)O.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=z(t,{l:!1})}}return n}(c),d,v,c[Pt]||c[zt]);return y&&void 0!==a&&y.setAttribute("type",a),y}var qo,Qo="data";function Xo(t,n,e,r){const o=function(t){const n=[],e=(t,r)=>{if(t&&t.effects){const e={errors:[],warnings:[],O:!1};if(!pn.A(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=Oo(t,(Tt(t)||{}).mode===Mt.frames?jt.frames:jt.waapi);let i=null;if(r){t=Mn(t);const n="string"==typeof r?document.querySelector(r):r;n&&(i=Wo(t),i&&n.replaceChildren(i))}return function(t,n,e,r){return function(t,n,e,r){const o=Tt(t)||{};return G(o)?Go(o,e,e=>{var i,l;let s=()=>{};if(o.mode!==Mt.frames&&"native"===(null==(i=o.scroll)?void 0:i.driver)&&r){s=Eo(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:Bo(t,l.subject),axis:f}:{source:"root"===l.source?Do():Vo(t,"y")||Vo(t,"x")||Do(),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:Fo(null==(o=l.range)?void 0:o.start,0,c),rangeEnd:Fo(null==(i=l.range)?void 0:i.end,1,c)}}(r,o);if(n){const i=Lo(t,e,r,o.mode===Mt.waapi,n);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{s(),t()},i}}s(),s=()=>{}}const u=(o.mode!==Mt.frames?Lo(t,e,r,o.mode===Mt.waapi):null)||Co(t,n,e,r),c=(null==(l=u.getRootElement)?void 0:l.call(u))||r;if(c){s=Eo(c,o.scroll);const t=("number"==typeof(null==(a=o)?void 0:a.duration)&&a.duration>0?a.duration:C)*("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=Bo(t,i.subject),u=Vo(t,"y")||Vo(t,"x"),c="scroll"===l&&"root"===i.source?Do():u||Do(),a=c===Do(),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=W(null==r?void 0:r.start,0,n,e),l=W(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())},A=()=>{y||null!==b||(b=requestAnimationFrame(g))},w=a?window:c;let k;w.addEventListener("scroll",A,{passive:!0}),window.addEventListener("resize",A,{passive:!0}),"undefined"!=typeof ResizeObserver&&(k=new ResizeObserver(A),k.observe(s),s!==t&&k.observe(t),a||k.observe(c));const M={destroy:()=>{y||(y=!0,w.removeEventListener("scroll",A),window.removeEventListener("resize",A),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}):Go(o,e,e=>o.mode===Mt.frames?Co(t,n,e,r):Lo(t,e,r,o.mode===Mt.waapi)||Co(t,n,e,r))}(t,n,e,r)}(t,n,e,i)}function Ko(t){const{src:n,data:e,Ct:r,_t: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 Xo(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=Xo(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 Jo(){const t=document.querySelectorAll("["+wt+"]");for(let n=0;n<t.length;n++){const e=t[n];if(!e[kt]){const t=e.getAttribute(wt);t&&(e[kt]=Ko({src:t,container:e}))}}}return"undefined"!=typeof window&&(window.loadTagAnimators=Jo,window.createAnimator=Ko,window.setupAnimationTriggers=zo),qo=d,((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}),qo)})();
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={};function v(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 y(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 m(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 h(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,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),p=[],m=[],h=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];p.push(y(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;m.push(y(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(y(w,A,d))}return{v:p,i:m.length?m:void 0,o:h.length?h:void 0,c:null!=(f=t.c)?f:n.c}}function g(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 w(t){const[n,e,r,o]=t,i=3*e,l=3*(o-e)-i,s=1-i-l;return function(t){return e=g(n,r,t),((s*e+l)*e+i)*e;var e}}function A(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function k(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=g(e,o,n),s=[e,r],u=[o,i],{left:c,right:a}=function(t,n,e,r,o){const i=A(t,n,o),l=A(n,e,o),s=A(e,r,o),u=A(i,l,o),c=A(l,s,o),a=A(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,p;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 y=1-f,m=1-d;return y>1e-9&&Math.abs(m)>1e-9&&(p=[(a[1][0]-f)/y,(a[1][1]-d)/m,(a[2][0]-f)/y,(a[2][1]-d)/m]),{left:v,right:p}}function M(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function j(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 x(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})})(d,{PX_ANIMATOR_DATA_KEY:()=>Ho,PX_ANIM_ATTR_NAME:()=>kt,PX_ANIM_SRC_ATTR_NAME:()=>At,PxAnimatorEngine:()=>jt,PxAnimatorMode:()=>Mt,createAnimator:()=>ti,createAnimatorImpl:()=>$o,generateNewIds:()=>Mn,loadTagAnimators:()=>ni,setupAnimationTriggers:()=>Lo});var O=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),S=new Set(["translate","rotate","scale","skew"]),N=new Set(["offset-distance","offsetDistance"]);function z(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 P=new Set(["offset-distance","offsetDistance"]),C=1e3;function T(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):t}function _(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 I(t){return L.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function D(t,n,e){return Math.max(n,Math.min(t,e))}function F(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 V(t,n,e,r,o){const i=U(t,n,e,r,o);return 0===i[0]&&0===i[1]?U(t,n,e,r,o<.5?o+R:o-R):i}function U(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 B(t,n,e,r,o=100){const i=o+1,l=new Float64Array(i),s=new Float64Array(i);let u=F(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=F(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 E(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.timelineSource)}var Z="cover";function W(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:Z,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{h(t){return this.A(t)}optional(){return new X(this)}},X=class extends Q{constructor(t){super(),this.inner=t,this.M=void 0}j(t){if(null!=t)return this.inner.h(t)?this.inner.j(t):void 0}A(t,n,e){return null==t||this.inner.A(t,n,e)}h(t){return null==t||this.inner.h(t)}},K=class extends Q{constructor(t=""){super(),this.M=t}j(t){return"string"==typeof t?t:this.M}A(t,n,e){return"string"==typeof t||(null==n||n.errors.push(q(null!=e?e:[])+": expected string, got "+typeof t),!1)}},J=class extends Q{constructor(t=0){super(),this.M=t}j(t){return"number"==typeof t&&isFinite(t)?t:this.M}A(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)}},Y=class extends Q{constructor(t=!1){super(),this.M=t}j(t){return"boolean"==typeof t?t:this.M}A(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(q(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},H=class extends Q{constructor(t){super(),this.value=t,this.M=t}j(t){return t===this.value?this.value:this.M}A(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)}},$=class extends Q{constructor(t,n){super(),this.values=t,this.M=null!=n?n:t[0]}j(t){return this.values.includes(t)?t:this.M}A(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)}},tt=class extends Q{constructor(t,n){super(),this.O=t,this.M=null!=n?n:t[0].M}j(t){for(const n of this.O)if(n.A(t))return n.j(t);return this.M}A(t,n,e){var r;const o=n&&{errors:[],warnings:[],S:n.S};return!!this.O.some(n=>n.A(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)}h(t){return this.O.some(n=>n.h(t))}},nt=class extends Q{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e].M;this.M=n}j(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].j(n[t]);return e}A(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].A(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.S)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}h(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},et=class extends Q{constructor(t,n){super(),this._shape=t,this.N=n;const e={};for(const n of Object.keys(t))e[n]=t[n].M;this.M=e}j(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].j(n[t]);if(this.N)for(const t of Object.keys(n))t in this._shape||(e[t]=this.N.j(n[t]));return e}A(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].A(r[t],n,o)||(i=!1),o.pop();if(this.N)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.N.A(r[t],n,o)||(i=!1),o.pop());return i}h(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},rt=class extends Q{constructor(t){super(),this.item=t,this.M=[]}j(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item.h(e)&&n.push(this.item.j(e));return n}A(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.A(t[e],n,r)||(o=!1),r.pop();return o}h(t){return Array.isArray(t)}},ot=class extends Q{constructor(t){super(),this.value=t,this.M={}}j(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value.h(r)&&(n[e]=this.value.j(r));return n}A(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.A(i,n,r)||(o=!1),r.pop();return o}h(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},it=class extends Q{constructor(){super(...arguments),this.M=void 0}j(t){return t}A(t,n,e){return!0}h(t){return!0}},lt=class extends Q{constructor(t,n){super(),this.fn=t,this.M=n,this.P=null}get schema(){var t;return null!=(t=this.P)?t:this.P=this.fn()}j(t){return this.schema.j(t)}A(t,n,e){return this.schema.A(t,n,e)}h(t){return this.schema.h(t)}},st=class extends Q{constructor(t){super(),this.O=t,this.M=t.map(t=>t.M)}j(t){return Array.isArray(t)&&t.length===this.O.length?this.O.map((n,e)=>n.j(t[e])):this.M}A(t,n,e){if(!Array.isArray(t)||t.length!==this.O.length)return null==n||n.errors.push(q(null!=e?e:[])+": expected tuple of length "+this.O.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.O.length;e++)r.push("["+e+"]"),this.O[e].A(t[e],n,r)||(o=!1),r.pop();return o}h(t){return Array.isArray(t)&&t.length===this.O.length}},ut=(t="")=>new K(t),ct=(t=0)=>new J(t),at=(t=!1)=>new Y(t),ft=t=>new H(t),dt=(t,n)=>new $(t,n),vt=(t,n)=>new tt(t,n),pt=t=>new nt(t),yt=(t,n)=>new et(t,n),mt=t=>new rt(t),ht=t=>new ot(t),bt=()=>new it,gt=t=>new st(t),wt=(t,n)=>new lt(t,n),At="data-px-animation-src",kt="_px_animator",Mt={auto:"auto",waapi:"waapi",frames:"frames"},jt={waapi:Mt.waapi,frames:Mt.frames},xt={before:"before",after:"after"},Ot="userSpaceOnUse",St="objectBoundingBox",Nt={separate:"separate",combined:"combined"},zt="text",Pt="textContent",Ct=new Set(["type","children","animator","meta","animate","effects",zt,Pt]),Tt={linear:"linear",radial:"radial"};function _t(t){var n;return(null==t?void 0:t.animator)||(null==(n=null==t?void 0:t.meta)?void 0:n.animator)}function Lt(t){var n;if(t)return null==(n=_t(t))?void 0:n.definitions}var It=vt([ut(),gt([ct(),ct(),ct(),ct()])]),Dt=vt([ut(),ct(),mt(ct()),wt(()=>Ut,{}),pt({path:ut()}),wt(()=>pt({paths:mt(gn)}),{paths:[]}),wt(()=>mt(cn),[])]),Ft=pt({time:ct().optional(),t:ct().optional(),value:Dt.optional(),v:Dt.optional(),easing:It.optional(),e:It.optional(),tangentOut:gt([ct(),ct()]).optional(),to:gt([ct(),ct()]).optional(),tangentIn:gt([ct(),ct()]).optional(),ti:gt([ct(),ct()]).optional(),selected:at().optional()}),Rt=pt({segmentCount:ct().optional(),extend:dt([xt.before,xt.after]).optional(),alternate:at().optional()}),Vt=pt({value:Dt.optional(),keyframes:mt(Ft).optional(),kfs:mt(Ft).optional(),loop:vt([Rt,at()]).optional(),autoOrient:at().optional()}),Ut=pt({translate:gt([ct(),ct()]).optional(),rotate:ct().optional(),skew:ct().optional(),scale:gt([ct(),ct()]).optional(),origin:gt([ct(),ct()]).optional()}),Bt=(vt([ut(),Ut,pt({value:Ut}),Vt]),ht(Vt)),Et=vt([ut(),mt(vt([ut(),Bt])),Bt]),Gt=pt({startOn:dt(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:dt(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:ct().optional()}),Zt=pt({width:ct(),d:ut()}),Wt=pt({fFamily:ut(),style:ut(),ascent:ct(),unitsPerEm:ct(),glyphs:ht(Zt)}),qt=pt({easings:ht(gt([ct(),ct(),ct(),ct()])).optional(),animations:ht(Bt).optional(),styles:ht(bt()).optional(),glyphs:ht(Wt).optional()}),Qt=pt({phase:dt(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:ct().optional()}),Xt=pt({start:Qt.optional(),end:Qt.optional()}),Kt=pt({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:Xt.optional()}),Jt=pt({mode:dt([Mt.auto,Mt.waapi,Mt.frames]).optional(),duration:ct().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(),frameRate:ct().optional(),trigger:Gt.optional(),resetOnFinish:at().optional(),definitions:qt.optional(),animateById:ht(Et).optional(),timelineSource:ut().optional(),scroll:Kt.optional(),debugInstName:ut().optional()}),Yt=(pt({id:ut(),animate:Et}),vt([ut(),ct(),mt(ct()),pt({value:new class extends Q{constructor(){super(...arguments),this.M=void 0}j(t){return t}A(t,n,e){return void 0!==t||(null==n||n.errors.push(q(null!=e?e:[])+": required value is missing"),!1)}h(t){return void 0!==t}}}),Ut])),Ht=vt([ct(),pt({value:ct()}),Vt]),$t=vt([gt([ct(),ct()]),pt({value:gt([ct(),ct()])}),Vt]),tn=vt([ut(),pt({value:ut()}),Vt]),nn=pt({translate:$t.optional(),rotate:Ht.optional(),scale:$t.optional(),skew:Ht.optional(),origin:$t.optional()}),en=pt({copies:ct().optional(),translate:$t.optional(),rotate:Ht.optional(),skew:Ht.optional(),scale:$t.optional(),origin:$t.optional()}),rn=pt({sourceId:ut().optional(),maskType:dt(["luminance","alpha"]).optional(),maskUnits:dt([Ot,St]).optional(),maskContentUnits:dt([Ot,St]).optional(),x:ct().optional(),y:ct().optional(),width:ct().optional(),height:ct().optional()}),on=pt({d:tn.optional(),animate:Vt.optional()}),ln=pt({offset:Ht.optional(),range:$t.optional(),subPaths:dt([Nt.separate,Nt.combined]).optional()}),sn=pt({sourceId:ut().optional(),start:ct().optional(),stretch:ct().optional(),timeCrop:gt([ct(),ct()]).optional()}),un=pt({type:dt(["content"]).optional(),sourceId:ut().optional(),retime:sn.optional()}),cn=pt({offset:ct(),color:ut()}),an=vt([mt(cn),pt({value:mt(cn)}),Vt]),fn=pt({type:dt([Tt.linear,Tt.radial]),p1:$t.optional(),p2:$t.optional(),c:$t.optional(),r:Ht.optional(),fp:$t.optional(),stops:an.optional(),gradientUnits:dt(["userSpaceOnUse","objectBoundingBox"]).optional(),spreadMethod:dt(["pad","reflect","repeat"]).optional(),gradientTransform:ut().optional()}),dn=fn,vn=pt({path:ut(),pathOverflow:dt(["clip","extend"]).optional(),lengthAdjust:dt(["spacing","spacingAndGlyphs"]).optional(),method:dt(["align","stretch"]).optional(),spacing:dt(["auto","exact"]).optional(),startOffset:Ht.optional(),textLength:Ht.optional()}),pn=pt({useGlyphs:at().optional()}),yn=pt({transformBy:nn.optional(),repeater:en.optional(),maskedBy:rn.optional(),clipPath:on.optional(),strokeTrim:ln.optional(),clone:un.optional(),fillGradient:fn.optional(),strokeGradient:dn.optional(),textPath:vn.optional(),text:pn.optional()}),mn=yt({type:ut(),id:ut().optional(),meta:bt().optional(),effects:yn.optional(),animate:Et.optional(),style:vt([ut(),ht(vt([ut(),ct()]))]).optional()},Yt),hn=yt(f(a({},mn._shape),{children:wt(()=>mt(hn),[]).optional()}),Yt),bn=pt({width:vt([ct(),ut()]).optional(),height:vt([ct(),ut()]).optional(),viewBox:ut().optional(),animator:Jt.optional()}),gn=(yt(f(a(a({},mn._shape),bn._shape),{type:ft("svg"),children:mt(hn).optional()}),Yt),pt({v:mt(mt(ct())),i:mt(mt(ct())).optional(),o:mt(mt(ct())).optional(),c:at().optional()})),wn=0;function An(){return"_px_"+Date.now().toString(36)+(++wn).toString(36)+Math.random().toString(36).substring(2,6)}function kn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>kn(t));const n=t,e={};for(const t of Object.keys(n))e[t]=kn(n[t]);return e}function Mn(t){var n,e;const r=kn(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=An();o.set(t,e),n.id=e}else n.animate&&(n.id=An());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]=jn(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]=jn(r,o));else if("style"===e&&"object"==typeof r&&null!==r)for(const[t,n]of Object.entries(r))"string"==typeof n&&(r[t]=jn(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))t[null!=(e=o.get(n))?e:n]=r;r.animator=f(a({},r.animator),{animateById:t})}return r}function jn(t,n){return t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t})}var xn=new Set(["script","foreignobject"]),On=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Sn=new Set(["href","xlink:href","src"]),Nn=new Set(["mixBlendMode","isolation"]),zn=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Pn=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Cn=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Tn=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function _n(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(On.has(e)){const t=String(n);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||Sn.has(e)&&(zn.test(t)||Pn.test(t)||function(t){const n=Cn.exec(t);return!!n&&Tn.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 Ln(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 In(t){var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0}function Dn(t){var n;return null!=(n=t.easing)?n:t.e}function Fn(t){var n,e,r;const o=null!=(n=t.keyframes)?n:t.kfs;if(!Array.isArray(o))return!1;if(t.autoOrient)return!0;for(const t of o)if((null!=(e=t.tangentIn)?e:t.ti)||(null!=(r=t.tangentOut)?r:t.to))return!0;return!1}var Rn=new WeakMap;function Vn(t,n,e,r){var o,i;let l=Rn.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=B(e,a,f,r),v={P0:e,P1:a,P2:f,P3:r,C:d,T:d.ds[d.ds.length-1]};return l||(l=new WeakMap,Rn.set(t,l)),l.set(n,v),v}var Un=.5,Bn=5,En=32;function Gn(t,n){var e,r,o,i;if(!Fn(t))return t;const l=null!=(e=t.keyframes)?e:t.kfs;if(!Array.isArray(l)||l.length<2)return t;const s=!!t.autoOrient,u=null!=(r=null==n?void 0:n._)?r:Un,c=null!=(o=null==n?void 0:n.L)?o:Bn,a=null!=(i=null==n?void 0:n.I)?i:En,f=[],d=Ln(l[0]);if(!d)return t;const v=s?function(t,n){const e=Ln(t),r=Ln(n);if(!e||!r)return 0;const o=Vn(t,n,e,r),i=V(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(l[0],l[1]):void 0;f.push(Wn(In(l[0]),Xn(qn(l[0]),qn(l[0]),0,d,v,s)));for(let t=0;t<l.length-1;t++){const n=l[t],e=l[t+1],r=Ln(n),o=Ln(e);r&&o?(s&&t>0&&Jn(f,n,e,r,o,c),Hn(f,n,e,r,o,s,u,c,a)):f.push(Wn(In(e),Xn(qn(e),qn(e),1,null!=o?o:[0,0],void 0,s)))}const p=Dn(l[l.length-1]);p&&(f[f.length-1].e=p),s&&Zn(f);const y={kfs:f};return void 0!==t.loop&&(y.loop=t.loop),y}function Zn(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 Wn(t,n){return{t:t,v:n}}function qn(t){var n;const e=null!=(n=t.value)?n:t.v;if(e&&"object"==typeof e&&!Array.isArray(e))return e}function Qn(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 Xn(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]=Qn(o,s,e))}return void 0!==o&&(l.rotate=o+Kn(t,n,e)),l}function Kn(t,n,e){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=Qn(r,o,e);return"number"==typeof i?i:0}function Jn(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=qn(n),f=c-Kn(a,a,0),d=Vn(n,e,r,o),v=V(d.P0,d.P1,d.P2,d.P3,0),p=180*Math.atan2(v[1],v[0])/Math.PI,y=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(p,f);if(Math.abs(y)<=i)return;const m=In(n),h=Math.min(m+Yn,(m+In(e))/2),b=Xn(qn(n),qn(n),0,r,p,!0);t.push(Wn(h,b))}var Yn=.05;function Hn(t,n,e,r,o,i,l,s,u){const c=Vn(n,e,r,o),a=In(n),f=In(e),d=Dn(n),v=(p=d)?w([p[1],p[0],p[3],p[2]]):t=>t;var p;const y=qn(n),m=qn(e),h=function(t,n,e,r,o){const i=[];$n(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),$n(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={D:o-l.length};for(let o=0;o<l.length-1;o++)te(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=E(c.C,t),e=D(c.T>0?n/c.T:t,0,1),r={u:D(v(e),0,1),p:e,F:F(c.P0,c.P1,c.P2,c.P3,t)};if(i){const n=V(c.P0,c.P1,c.P2,c.P3,t);r.R=180*Math.atan2(n[1],n[0])/Math.PI}b.push(r)}let g=d,A=0;const M=t.length-1;for(let n=0;n<b.length;n++){const e=b[n],r=A<1?D((e.u-A)/(1-A),0,1):1,{left:o,right:l}=k(g,r),s=0===n?M:t.length-1;o?t[s].e=o:delete t[s].e;const u=a+e.u*(f-a),c=Xn(y,m,e.p,e.F,e.R,i);t.push(Wn(u,c)),g=l,A=e.u}}function $n(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 te(t,n,e,r,o,i,l,s){const u=(t+n)/2,c=F(r.P0,r.P1,r.P2,r.P3,t),a=F(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=F(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=F(r.P0,r.P1,r.P2,r.P3,u),p=F(r.P0,r.P1,r.P2,r.P3,t+.75*f),y=Math.max(ne(d,c,a),ne(v,c,a),ne(p,c,a));let m=!0;if(o){const e=V(r.P0,r.P1,r.P2,r.P3,t),o=V(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)}y<=i&&m||s.D<=0||f<1e-6?e.push(n):(s.D-=1,te(t,u,e,r,o,i,l,s),te(u,n,e,r,o,i,l,s))}function ne(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 ee(t,n){const e=re(t,n);return null!=e?e:t}function re(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=re(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&&Fn(e)){const o=Gn(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 oe=1;function ie(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=>ie(t[e],n[e]))}function le(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 se(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function ue(t){return"string"==typeof t&&void 0!==se(t)}function ce(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const n=se(t.path);return n?{paths:le(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&ue(n[0])){const t=[];for(const e of n){const n=se(e);n&&t.push(...le(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&ue(t[0])){const n=[];for(const e of t){const t=se(e);t&&n.push(...le(t))}return{paths:n}}return{paths:t}}return ue(t)?{paths:le(se(t))}:t}function ae(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 fe(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 de(t,n,e,r){var o,i;return"d"===t?{paths:h(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)}:O.has(t)?m(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):S.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?y(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]=y(r||t,l||t,e)}else o[i]=null!=l?l:r}return o}(n,e,r)}function ve(t,n,e,r){var o,i,l,s,u;const c=n.length-1,d=D(null!=(o=e.segmentCount)?o:c,1,c);let v;v=e.extend===xt.before?n.slice(0,d+1):n.slice(c-d);const p=null!=(i=n[0].t)?i:0,y=null!=(l=n[n.length-1].t)?l:0;let m,h;e.extend===xt.before?(m=0,h=p):(m=y,h=r);const b=h-m;if(b<=0)return n;const g=null!=(s=v[0].t)?s:0,A=(null!=(u=v[v.length-1].t)?u:0)-g;if(A<=0)return n;const j=v.map(t=>{var n,e;return{V:(t.t-g)/A,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/A),O=b-x*A,S=O/A,N=[],z=e.extend!==xt.before,P=n[n.length-1];let C,T=!1;function _(n,e,r){var o;let i;if(e){i=[];for(let t=j.length-1;t>=0;t--)i.push({V:1-j[t].V,v:j[t].v,e:t>0?M(j[t-1].e):void 0,tangentIn:j[t].tangentOut,tangentOut:j[t].tangentIn})}else i=j;const l=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.V>l+1e-9){const o=i[e-1],s=r.V-o.V,u=(l-o.V)/s,c=o.e?w(o.e)(u):u,a=de(t,o.v,r.v,c),{left:f}=k(o.e,u);return N.length>0&&o.V<=l&&(N[N.length-1].e=f),void N.push({t:n+l*A,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.V*A))<1e-9;if(u){if(ie(s.v,r.v)){N.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(C=r.e,T=!0);continue}N.length>0&&(delete s.tangentIn,delete s.tangentOut)}const c={t:n+r.V*A+(u?oe: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===xt.before){S>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=j.length-1;t>=0;t--)o.push({V:1-j[t].V,v:j[t].v,e:t>0?M(j[t-1].e):void 0,tangentIn:j[t].tangentOut,tangentOut:j[t].tangentIn})}else o=j;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.V<i-1e-9)continue;const l=o[e-1];if(l&&l.V<i-1e-9&&r.V>i+1e-9){const e=r.V-l.V,o=(i-l.V)/e,s=l.e?w(l.e)(o):o,u=de(t,l.v,r.v,s),{right:c}=k(l.e,o);N.push({t:n,v:u,e:c})}const s={t:n+(r.V-i)*A,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;_(m+O+t*A,r)}}else{for(let t=0;t<x;t++){const n=!!e.alternate&&t%2==0;_(m+t*A,n)}if(S>1e-9){const t=!!e.alternate&&x%2==0;_(m+x*A,t,S)}}return e.extend===xt.before?[...N,...n]:T&&n.length>0?[...n.slice(0,-1),f(a({},n[n.length-1]),{e:C}),...N]:[...n,...N]}function pe(t,n,e,r){var o,i,l,s,u,c,a;const f=n.keyframes||n.kfs||[],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=ce(f));const p=_(t)?I(t):t;O.has(p)&&(f=null!=(u=x(f))?u:f);const y={t:e,v:f,e:ae(v,r)},m=null!=(c=n.tangentIn)?c:n.ti,h=null!=(a=n.tangentOut)?a:n.to;m&&(y.tangentIn=m),h&&(y.tangentOut=h),d.push(y)}d.sort((t,n)=>{var e,r;return(null!=(e=t.t)?e:0)-(null!=(r=n.t)?r:0)});const v=n.loop,p=!0===v?{}:v||void 0;return p&&d.length>=2?ve(t,d,p,e):d}function ye(t,n,e){var r;const o=n.loop;if(null==o||!1===o)return n;const i=!0===o?{}:o,l=null!=(r=n.keyframes)?r:n.kfs;if(!Array.isArray(l)||l.length<2)return n;const s=_(t)?I(t):t,u=O.has(s),c=l.map(n=>{var e,r,o,i,l,s,c,a;const f=null!=(e=n.t)?e:n.time;let d=null!=(r=n.v)?r:n.value;"d"===t&&(d=ce(d)),u&&(d=null!=(o=x(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!=(s=n.tangentIn)?s:n.ti),(null!=(c=n.tangentOut)?c:n.to)&&(v.tangentOut=null!=(a=n.tangentOut)?a:n.to),v}),a={kfs:ve(t,c,i,e)};return void 0!==n.autoOrient&&(a.autoOrient=n.autoOrient),a}function me(t,n){const e=he(t,n);return null!=e?e:t}function he(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=he(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=ye(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 be=0;function ge(t,n=jt.waapi){const e=_t(t)||{},r=Lt(t),o=e.duration||1e3,i=[],l=(t,e)=>{if(!e)return null;const i=function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=fe(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=fe(r,n);t&&e.push(t)}else e.push(t);return e}(e,r);if(0===i.length)return null;const l=function(t,n,e,r=jt.waapi){const o={};for(const[i,l]of Object.entries(t)){if("transform"===i&&"offsetPath"===l.U&&void 0!==t.offsetDistance)continue;const s=pe(i,l,n,e);if(s.length>0){const t={kfs:s};void 0!==l.autoOrient&&(t.autoOrient=l.autoOrient),void 0!==l.loop&&(t.loop=l.loop),o[i]=r===jt.waapi&&"transform"===i?Gn(t):t}}return o}(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(i),o,r,n);return 0===Object.keys(l).length?null:{id:t,animate:l}},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,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_"+ ++be;t.id=e;const r=l(e,n);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 we(t,n,e){var r,o,i,l,s,u,c;const a=n.kfs||n.keyframes||[];if(0===a.length)return null;const{B:f,G: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{B:i,G:l}}(a,e);let b=f===d?0:(g=e,A=null!=(r=f.t)?r:0,(k=null!=(o=d.t)?o:0)===A?0:0+(g-A)/(k-A)*1);var g,A,k;b=D(b,0,1);const M=null!=(i=f.e)?i:f.easing;if(M&&Array.isArray(M))try{b=w(M)(b)}catch(t){}let x=_(t)?I(t):t,S=null;const P=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"===x)S=h(null!=(u=null==P?void 0:P.paths)?u:Array.isArray(P)?P:[],null!=(c=null==C?void 0:C.paths)?c:Array.isArray(C)?C:[],b).map(t=>v(t)).join("");else if(O.has(x))S=j(m(P||[0,0,0,1],C||[0,0,0,1],b)),x=t;else if("stroke-dasharray"===x)S=y(P||[],C||[],b).join(" "),x=t;else if("transform"!==x||null===P||"object"!=typeof P||Array.isArray(P))"translate"===x?(S="translate("+y(P||[0,0],C||[0,0],b).join(",")+")",x="transform"):"rotate"===x?(S="rotate("+p(+(P||0),+(C||0),b)+")",x="transform"):"scale"===x?(S="scale("+y(P||[1,1],C||[1,1],b).join(",")+")",x="transform"):S=p(+(P||0),+(C||0),b);else{const t=new Set([...P?Object.keys(P):[],...C?Object.keys(C):[]]),e={};for(const n of t){const t=null==P?void 0:P[n],r=null==C?void 0:C[n];if("rotate"===n||"skew"===n)e[n]=p(+(null!=t?t:0),+(null!=r?r:0),b);else if("translate"===n||"scale"===n||"origin"===n){const o="scale"===n?[1,1]:[0,0],i=y(t||o,r||o,b);e[n]=i}}if(Fn(n)){const t=P.translate,r=C.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,n,e,r,o,i){const l=Vn(t,n,e,r),s=0===l.T?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.C,o),u=F(l.P0,l.P1,l.P2,l.P3,s);if(!i)return{translate:u};const c=V(l.P0,l.P1,l.P2,l.P3,s);return{translate:u,R:180*Math.atan2(c[1],c[0])/Math.PI}}(f,d,[+t[0],+t[1]],[+r[0],+r[1]],b,!!n.autoOrient);e.translate=[o.translate[0],o.translate[1]],void 0!==o.R&&(e.rotate=o.R)}}S=z(e,{l:!1}),x="transform"}return N.has(x)&&"number"==typeof S&&(S=100*S+"%"),{k:x,v:null===S?"":""+S}}function Ae(t,n){const e={};for(const[r,o]of Object.entries(t)){const t=we(r,o,n);t&&(e[t.k]=t.v)}return e}function ke(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(ke);const n={};for(const e of Object.keys(t))n[e]=ke(t[e]);return n}function Me(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 je(t){const n="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(n)?n:0}function xe(t){var n;const e=je(t.x),r=je(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 Oe(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return Number.isFinite(n)?n:void 0}}function Se(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function Ne(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 ze(t,n,e,r,o,i){if("use"===t.type&&"string"==typeof t.href){const l=Se(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=ke(n);Me(v,o);const p="symbol"===v.type?Ne(v.viewBox):void 0,y=null!=(u=null!=(s=Oe(t.width))?s:null==p?void 0:p[2])?u:l[0],m=null!=(d=null!=(c=Oe(t.height))?c:null==p?void 0:p[3])?d:l[1],h="symbol"===v.type?function(t,n,e,r,o){const i=Ne(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,p=(r-c*v)/2,y=(o-d*v)/2,m=[];0===p&&0===y||m.push("translate("+p+","+y+")"),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,y,m):v,b=ze(h,e,r,o,i,l),g=f(a({},t),{type:"g",children:[b]});return delete g.href,delete g.width,delete g.height,xe(g)}(t,s,n,e,r,o,i)}}if(!t.children)return t;let l=!1;const s=t.children.map(t=>{const s=ze(t,n,e,r,o,i);return s!==t&&(l=!0),s});return l?f(a({},t),{children:s}):t}function Pe(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 Ce(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.kfs;if(i){const t={kind:"animated",keyframes:i.map(_e),autoOrient:o.autoOrient,loop:o.loop},n=null!=(e=o.value)?e:o.v;return void 0!==n&&"animated"===t.kind&&(t.Z=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 Te(t,n,e,r){var o,i,l,s;const u=t=>(null==r?void 0:r.W)&&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.Z)?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 _e(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 Le(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 Ie(t,n,e){if(!n)return t;delete t.transform;let r=t;return r=Fe(r,n.origin,!0),r=De(r,"scale",n.scale),r=De(r,"skew",n.skew),r=De(r,"rotate",n.rotate),r=Fe(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=Fe(r,n.origin,!0),r=De(r,"translate",n.translate),r=Fe(r,n.origin,!1)):r=De(r,"translate",n.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function De(t,n,e,r){if(void 0===e)return t;const o=Ce(e);if("static"===o.kind)return{type:"g",transform:{value:Pe(n,o.value,void 0)},children:[t]};if("animated"===o.kind){const e={keyframes:o.keyframes.map(t=>Le(t,Pe(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 Fe(t,n,e){if(void 0===n)return t;const r=Ce(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=>Le(t,{translate:o(t.value)}))};return void 0!==r.loop&&(n.loop=r.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function Re(t,n){return"_lw_"+n+"_"+t.q++}function Ve(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Ue(t,n){var e;"string"==typeof t.id&&n.set(t.id,t),null==(e=t.children)||e.forEach(t=>Ue(t,n))}var Be=ke;function Ee(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=Ve(t.effects.clone.sourceId);"string"==typeof r&&r&&!n.X.has(r)&&n.X.set(r,e(r))}null==(i=t.children)||i.forEach(t=>Ee(t,n,e))}function Ge(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 Ze(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 We(t,n,e,r){if(!n)return t;const o=Re(e,"grad"),i=function(t,n){const e={type:t.type===Tt.radial?"radialGradient":"linearGradient",id:n};return t.type===Tt.linear?(qe(e,"x1","y1",t.p1),qe(e,"x2","y2",t.p2)):(qe(e,"cx","cy",t.c),function(t,n,e){const r=Ce(e);"absent"!==r.kind&&Te(t,"r",r,{W:!0})}(e,0,t.r),qe(e,"fx","fy",t.fp)),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=Ce(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(Qe):[];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:Xe(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,p=null!=(u=null==v?void 0:v[e])?u:Xe(n,n.indexOf(r),e);if(!p)continue;const y=null!=(c=r.easing)?c:r.e,m={time:o,value:p.color};void 0!==y&&(m.easing=y),a.push(m);const h={time:o,value:p.offset};void 0!==y&&(h.easing=y),f.push(h),p.offset!==t.offset&&(d=!0)}const v={type:"stop",offset:Ke(t.offset),stopColor:t.color},p={};return a.length&&(p.stopColor={keyframes:a},void 0!==o&&(p.stopColor.loop=o)),d&&f.length&&(p.offset={keyframes:f},void 0!==o&&(p.offset.loop=o)),Object.keys(p).length&&(v.animate=p),v}(t,l,n,0,s))}(t.stops),e}(n,o);return e.defs.push(i),t[r]="url(#"+o+")",t}function qe(t,n,e,r){var o,i,l;const s=Ce(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.Z)?l:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(a)&&(t[n]=String(a[0]),t[e]=String(a[1]))}function Qe(t){return{type:"stop",offset:Ke(t.offset),stopColor:t.color}}function Xe(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 Ke(t){return Math.round(1e3*t)/10+"%"}function Je(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function Ye(t,n,e){if(!n)return t;const r=function(t,n){var e;const r=Ce(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=He(o,"translate",n.translate,void 0),o=He(o,"rotate",n.rotate,r),o=He(o,"scale",n.scale,r),o}function He(t,n,e,r,o){if(void 0===e)return t;const i=Ce("scale"===n&&Array.isArray(e)?[e[0]/100,e[1]/100]:e);if("static"===i.kind)return{type:"g",transform:{value:Pe(n,$e(n,i.value),r)},children:[t]};if("animated"===i.kind){const e={keyframes:i.keyframes.map(t=>{const e=Le(t,Pe(n,$e(n,t.value),r));return"translate"===n?a(a({},e),tr(t)):e})};return void 0!==i.loop&&(e.loop=i.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function $e(t,n){return"translate"===t?[-n[0],-n[1]]:"rotate"===t?-n:[1/n[0],1/n[1]]}function tr(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 nr(t){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!n||!n.transform)}function er(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 rr(t,n){let e=0,r=0;for(const o of t)if(o.K&&o.K.length){const t=or(o.K,n);e+=t[0],r+=t[1]}else o.translate&&(e+=o.translate[0],r+=o.translate[1]);return[e,r]}function or(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 ir(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.kfs){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.K=i)}return s.translate||s.K?s:void 0}var lr="content";function sr(t,n,e){if(!n)return;const r=Ve(n.sourceId);if(!r)return void(n.type===lr&&e.errors.push("clone: content ref missing sourceId"));const o=n.type===lr&&e.X.get(r)||r;t.href="#"+o}function ur(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=Ce(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.Z&&(o.value=n(r.Z)),o}var ar=!1;function fr(t){var n,e;return{start:null!=(n=t.start)?n:0,stretch:null!=(e=t.stretch)?e:1}}var dr=1;function vr(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-dr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+dr,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 pr(t,n){return{start:n.start+n.stretch*t.start,stretch:n.stretch*t.stretch}}function yr(t){var n,e;return null==(e=null==(n=t.effects)?void 0:n.clone)?void 0:e.retime}function mr(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 hr(t,n,e){const r=Ve(t.href);if(!r)return void e.errors.push("retime: <use> has no href to follow");const o=br(r,n,e,new Set);if(o)if(ar){const n=e.J.get(o);t.type="g",delete t.href,t.children=[n],xe(t),e.defs=e.defs.filter(t=>t!==n)}else t.href="#"+o}function br(t,n,e,r){if(r.has(t))return void e.errors.push('retime: loop via "'+t+'"');const o=e.J.get(t);if(!o)return void e.warnings.push('retime: target "'+t+'" not found');const i=Be(o);if(function(t,n){Me(t,()=>Re(n,"retimed"))}(i,e),"use"===o.type?wr(i,n.start,n.stretch):gr(i,n.start,n.stretch),mr(i),"use"===o.type&&o.href){const l=Ve(o.href);if(l){const s=yr(o),u=s?pr(fr(s),n):n,c=new Set(r);c.add(t);const a=br(l,u,e,c);a&&(i.href="#"+a)}}else!function(t,n,e,r,o){const i=t=>{var l;const s=yr(t);if("use"===t.type&&s&&t.href){const i=Ve(t.href);if(i){const l=pr(fr(s),n),u=new Set(r);u.add(o);const c=br(i,l,e,u);c&&(t.href="#"+c)}mr(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.J.set(i.id,i),"string"==typeof i.id?i.id:void 0}function gr(t,n,e){var r;wr(t,n,e),null==(r=t.children)||r.forEach(t=>gr(t,n,e))}function wr(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 Ar=48,kr=/[MmLlHhVvCcSsQqTtAaZz]/;function Mr(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 jr(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++]),p=(t,n,r)=>{const l=[o,i],s=B(l,t,n,r,Ar);e.push({P0:l,P1:t,P2:n,P3:r,C:s,Y:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},y=(t,n)=>{p([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];kr.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)y(v()+(e?o:0),v()+(e?i:0));else if("H"===m)y(v()+(e?o:0),i);else if("V"===m)y(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],p(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],p(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}=Mr([o,i],t,n);p(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}=Mr([o,i],t,n);p(r,l,n)}else{if("A"!==m){r++;continue}r+=5,y(v()+(e?o:0),v()+(e?i:0))}d=t}else y(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].Y;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.Y>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.C,i):0,[s,u]=F(o.P0,o.P1,o.P2,o.P3,l),[c,a]=V(o.P0,o.P1,o.P2,o.P3,l);return{x:s,y:u,angle:Math.atan2(a,c)}};return{H:r,closed:l,$(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 xr=.15;function Or(t){const n=Ce(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 Sr(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 Nr=t=>Math.round(1e3*t)/1e3;function zr(t,n,e){null!=e&&Te(t,n,Ce(e),{W:!0})}var Pr=(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 Cr(t,n){return Math.round(t)===t?""+Math.round(t):t.toFixed(n)}function Tr(t,n){let e="";for(let r=0;r<t.length;r++){const o=Cr(t[r],n);r>0&&45!==o.charCodeAt(0)&&(e+=" "),e+=o}return e}function _r(t,n,e){return[t[0]*n+t[2]*e+t[4],t[1]*n+t[3]*e+t[5]]}var Lr=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function Ir(t,n,e=2){const r=[];let o;for(Lr.lastIndex=0;null!==(o=Lr.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]=_r(n,s(),s());i+=t+Tr([r,o],e)}else if("C"===t){const[t,r]=_r(n,s(),s()),[o,l]=_r(n,s(),s()),[u,c]=_r(n,s(),s());i+="C"+Tr([t,r,o,l,u,c],e)}else if("Q"===t){const[t,r]=_r(n,s(),s()),[o,l]=_r(n,s(),s());i+="Q"+Tr([t,r,o,l],e)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var Dr=16,Fr=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",zt,Pt,"xml:space"],Rr=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],Vr=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function Ur(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return isNaN(n)?void 0:n}}function Br(t){return"string"==typeof t?t:void 0}function Er(t){const n=t.animate;if(!n||"object"!=typeof n)return;let e;for(const t of Vr)void 0!==n[t]&&((null!=e?e:e={})[t]=n[t]);return e}function Gr(t,n){var e,r,o,i,l,s,u,c,a,f;const d="text"===t.type,v=t.style,p=n=>{var e;return d?void 0:null!=(e=t[n])?e:null==v?void 0:v[n]},y={fontFamily:null!=(e=Br(t.fontFamily))?e:n.fontFamily,fontSize:null!=(r=Ur(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=Ur(t.letterSpacing))?s:n.letterSpacing,wordSpacing:null!=(u=Ur(t.wordSpacing))?u:n.wordSpacing,opacity:null!=(c=Ur(p("opacity")))?c:n.opacity,animate:null!=(a=d?void 0:Er(t))?a:n.animate};for(const t of Rr){const e=null!=(f=p(t))?f:n[t];void 0!==e&&(y[t]=e)}return y}function Zr(t){var n,e,r;return{fontFamily:Br(t.fontFamily),fontSize:null!=(n=Ur(t.fontSize))?n:Dr,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(e=Ur(t.letterSpacing))?e:0,wordSpacing:null!=(r=Ur(t.wordSpacing))?r:0}}function Wr(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 Rr)void 0!==t[e]&&(n[e]=t[e]);return void 0!==t.animate&&(n.animate=t.animate),n}function qr(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 Qr(t){const n=Object.keys(t);return 1===n.length?t[n[0]]:void 0}var Xr=.6,Kr="px-missing-glyph";function Jr(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 Yr(t,n,e,r,o=0){const{x:i,y:l,angle:s}=t.$(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 Hr(t){var n;const e=Ce(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,tt: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,tt:[],at:()=>r}}var $r=48,to=64;function no(t,n){const e=u(10,n);return Math.round(t*e)/e}function eo(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 Rr)void 0!==t[e]&&(n[e]=t[e]);return n}function ro(t){return t?{nt:Kr}:{}}function oo(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.et,!!n.rt]),e=Ir(n.ot,n.m),o=r.get(t);o?o.d+=e:r.set(t,{et:n.et,d:e,rt:n.rt})}const o=[];for(const{et:t,d:e,rt:i}of r.values())o.push(n("path",a(a(a({d:e},eo(t)),ro(i)),void 0!==t.animate?{animate:a({},t.animate)}:{}),[]));return o}function io(t,n,e){const r={};for(const n of Object.keys(t))"type"!==n&&"children"!==n&&-1===Fr.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 lo(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 so(t,n,e,r,o,i,l,s){const u=co(r,e,o),c=ao(e,o),a=vo(i,u),f=vo(l,c),d=mo(l),p={type:"path",d:v(n)};return po(p,"strokeDasharray",f),po(p,"strokeDashoffset",a),po(p,"strokeOpacity",d),[p]}var uo=1;function co(t,n,e){const[r]=fo(e);return e=>n*(-e-r+t)+uo}function ao(t,n){const[e,r]=fo(n),o=r-e+1;return n=>{const e=D(n[0],0,1),r=D(n[1],0,1),i=Math.min(e,r),l=Math.max(e,r),s=[0];let u=uo;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+uo),s}}function fo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function vo(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 po(t,n,e){e&&Te(t,n,e)}var yo=10;function mo(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),p=c?v&&s(null!=(i=c.value)?i:c.v):v,y=a?v&&s(null!=(l=a.value)?l:a.v):v;p&&!y?(f.push({time:d,value:0}),f.push({time:d+yo,value:1})):!p&&y&&(f.push({time:d-yo,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function ho(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 bo(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 go(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+=wo(t,r,r+1);return t.c&&n.length>1&&(e+=wo(t,n.length-1,0)),e}function wo(t,n,e){var r,o,i,l;const s=t.v,u=s[n],c=s[e],a=B(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 Ao=.5522847498307936;function ko(t){var n,e;const r={defs:[],warnings:[],errors:[],J:new Map,q:0,X:new Map,it:new Map,lt:(null==(n=_t(t))?void 0:n.mode)===Mt.frames?jt.frames:jt.waapi,glyphs:null==(e=Lt(t))?void 0:e.glyphs},o=Be(t);Ue(o,r.J),Ee(o,r,()=>Re(r,"inner")),function(t,n){const e=new Set,r=t=>{var o,i;const l=Ve(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.sourceId);if("string"==typeof l){e.add(t);const r=n.J.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.it.set(t,r),Array.isArray(t.children)){const e=ir(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.J.clear(),Ue(t,n.J);const e=[],r=t=>{var n;yr(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&&yr(o)&&e++,"use"===o.type&&o.href){const t=Ve(o.href);t&&!r.has(t)&&(r.add(t),i(n.J.get(t)))}null==(l=o.children)||l.forEach(i)}},l=Ve(t.href);l&&(r.add(l),i(n.J.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=yr(t);if(!e)continue;const r=e.timeCrop;mr(t),hr(t,fr(e),n),r&&vr(t,r,n)}}(t,n),t}(Mo(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 Mo(t,n){t.children&&(t.children=t.children.map(t=>Mo(t,n)));const e=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?n.X.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:p,textPath:y,text:m}=null!=e?e:{};e&&delete t.effects;let h=t,b=!1;if(null==m?void 0:m.useGlyphs)if(y){const t="string"==typeof y.path?y.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=Pr,warnings:u}=r,c=n?jr(n):null;if(!c)return null==u||u.push("textGlyphs: unparsable along-path geometry"),null;const d=Qr(l),{cells:v,width:p}=function(t,n,e,r){const o=[];let i=0;const l=(t,s)=>{var u,c,a;const f=Gr(t,s),d=null!=(u=Br(t[Pt]))?u:Br(t[zt]);if(d&&!(null==(c=t.children)?void 0:c.length)){const t=qr(f,n,e,r);if(t){const n=f.fontSize/t.unitsPerEm,e=null!=(a=t.ascent)?a:.9*t.unitsPerEm,r=Wr(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({ot:u.d,st:u.width,scale:n,et:r,ut:i+t/2}),i+=t}else if(/\S/.test(s)){const l=u&&u.width>0?u.width:Xr*t.unitsPerEm,s=l*n;o.push({ot:Jr(l,e),st:l,scale:n,et:r,rt:!0,ut: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,Zr(t)),{cells:o,width:i}}(t,l,d,u);if(!v.length)return io(t,[],s);const{ct:y,ft:m}=function(t){var n,e,r;return{ct:(null!=(n=Ur(t.x))?n:0)+(null!=(e=Ur(t.dx))?e:0),ft:null!=(r=Ur(t.dy))?r:0}}(t),h=Hr(e),b=Hr(o),g=t=>t>0&&p>0?t/p: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.tt,b.tt),e=(t,n)=>y+h.at(n)+g(b.at(n))*t.ut,r=h.animated?h.loop:b.loop;return io(t,function(t,n,e,r,o,i,l,s=0){const u=Math.max(n.H/$r,.5),c=t=>t>=0&&t<=n.H,d=[];for(const v of t){const t=[v.scale,0,0,v.scale,-v.scale*(v.st/2),0],p=Ir(v.ot,t),y=(t,e)=>{const{x:r,y:o,angle:i}=n.$(t),l=Math.cos(i),u=Math.sin(i);return{time:e,value:{translate:[no(r-s*u,3),no(o+s*l,3)],rotate:no(180*i/Math.PI,3)}}},m=[],h=[],b=(t,n)=>{m.push(y(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(to,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)}}Zn(m);const g={keyframes:m};void 0!==o&&(g.loop=o);const w={transform:g};if(v.et.animate&&Object.assign(w,v.et.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:p},eo(v.et)),ro(v.rt)),{animate:w}),[]))}return d}(v,c,e,n,r,s,w,m),s)}const A=g(b.at(0)),k=y+h.at(0);return io(t,oo((w?v.filter(t=>{const n=k+t.ut*A;return n>=0&&n<=c.H}):v).map(t=>({ot:t.ot,et:t.et,rt:t.rt,m:Yr(c,k+t.ut*A,t.scale,t.st,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,y.startOffset,y.textLength,y.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=Pr,warnings:u}=n,c=Qr(l),a={x:null!=(e=Ur(t.x))?e:0,y:null!=(r=Ur(t.y))?r:0},f=[],d=[{start:a.x,end:a.x}];let v=0;const p=(t,n)=>{var e;const r=qr(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,p=Wr(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({ot:u.d,m:[i,0,0,i,a.x,a.y],et:p,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:Xr*o;f.push({ot:Jr(t,s),m:[i,0,0,i,a.x,a.y],et:p,rt:!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}},y=(t,n)=>{var e,r,o,i;const l=Gr(t,n),s=Ur(t.x),u=Ur(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=Ur(t.dx))?e:0,a.y+=null!=(r=Ur(t.dy))?r:0;const c=null!=(o=Br(t[Pt]))?o:Br(t[zt]);if(c&&!(null==(i=t.children)?void 0:i.length)&&p(c,l),t.children)for(const n of t.children)y(n,l)},m=Zr(t);if(t.children)for(const n of t.children)y(n,m);const h=null!=(o=Br(t[Pt]))?o:Br(t[zt]);h&&!(null==(i=t.children)?void 0:i.length)&&p(h,m);const b=Br(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 io(t,oo(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=Re(e,"tpath"),{d:i,dt:l}=function(t,n){var e;if("clip"===n.pathOverflow)return{d:t,dt:0};const r=jr(t);if(!r||r.closed||r.H<=0)return{d:t,dt:0};const o=r.H,i=xr*o,l=Or(n.startOffset),s=Or(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,dt:0};const d=r.$(0),v=r.$(o);let p=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.]+/,"");p="M"+Nr(n)+","+Nr(e)+"L"+Nr(d.x)+","+Nr(d.y)+r}if(f>0){const t=v.x+Math.cos(v.angle)*f,n=v.y+Math.sin(v.angle)*f;p+="L"+Nr(t)+","+Nr(n)}return{d:p,dt:a}}(n.path,{pathOverflow:n.pathOverflow,startOffset:n.startOffset,textLength:n.textLength,advance:Sr(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),zr(s,"startOffset",function(t,n){if(!n||null==t)return t;const e=Ce(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.Z&&(r.value=e.Z+n),r}(n.startOffset,l)),zr(s,"textLength",n.textLength),t.children=[s],t}(h,y,n)),h=function(t,n,e){return We(t,n,e,"fill")}(h,v,n),h=function(t,n,e){return We(t,n,e,"stroke")}(h,p,n),h=function(t,n){if(!n)return t;const e=n.subPaths===Nt.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*Ao,d=o*Ao,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=le(n);if(!e.length)return;const i={leaf:t,vt:[]};for(const t of e){const n=go(t);i.vt.push({yt:t,ht:n,bt: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.vt)e||(i=0),n.bt=i,i+=n.ht;const s=i;if(e&&s<.001)return t;const u=Ce(n.offset),c="absent"===u.kind?{kind:"static",value:0}:u,d=function(t){const n=Ce(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=ho(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=bo(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=bo(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,p=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),y=[p.length?Math.min(...p):0,p.length?Math.max(...p):0];if(1===r.length&&r[0].leaf===t&&1===r[0].vt.length){const n=r[0],o=n.vt[0],i=e?s:o.ht;if(i<.001)return t;const l=e?o.bt/i:0;return function(t,n,e,r,o,i){const l=co(e,n,r),s=ao(n,r),u=a({},t);return delete u.effects,po(u,"strokeDasharray",vo(i,s)),po(u,"strokeDashoffset",vo(o,l)),po(u,"strokeOpacity",mo(i)),u}(n.leaf,i,l,y,c,v)}const m=new Map;for(const t of r){const n=[];for(const r of t.vt){const o=e?s:r.ht;if(o<.001)continue;const i=e?r.bt/o:0;n.push(...so(t.leaf,r.yt,o,i,y,c,v))}m.set(t.leaf,lo(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=Be(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=Be(u),r=ur(n,t),o=r?Ie(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=Ve(n.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=Re(r,"mask");let l={type:"use",href:"#"+o};if(e)l=Ye(l,e,r);else if(nr(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=Le(t,void 0);if(Array.isArray(n.translate)&&l.push(f(a(a({},r),tr(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 p=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let y;const m=[];for(;null!==(y=p.exec(t));){const t=y[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);m.push({name:y[1],gt: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.gt[0])?n:0,d=null!=(e=a.gt[1])?e:0,v=null!=(r=h.gt[0])?r:0,p=null!=(o=h.gt[1])?o:0;if(v!==-f||p!==-d)continue;const y={};y.origin=[f,d];for(let n=0;n<t;n++)if("translate"===m[n].name){const t=null!=(i=m[n].gt[0])?i:0,e=null!=(l=m[n].gt[1])?l:0;y.translate=y.translate?[y.translate[0]+t,y.translate[1]+e]:[t,e]}for(let n=t+1;n<m.length-1;n++){const t=m[n];if("rotate"===t.name)y.rotate=(null!=(s=y.rotate)?s:0)+(null!=(u=t.gt[0])?u:0);else if("scale"===t.name){const n=null!=(c=t.gt[0])?c:1,e=t.gt.length>1?t.gt[1]:n;y.scale=y.scale?[y.scale[0]*n,y.scale[1]*e]:[n,e]}}return y}let b,g,w;for(const t of m)if("translate"===t.name){const n=null!=(a=t.gt[0])?a:0,e=null!=(f=t.gt[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.gt[0])?d:0);else if("scale"===t.name){const n=null!=(v=t.gt[0])?v:1,e=t.gt.length>1?t.gt[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&&!t.transform.kfs){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=Ye(l,n,r))}const s=void 0===e&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||nr(t)}(t);l=function(t,n,e,r,o){const i=r.J.get(e),l=r.it.get(n)||[],s=o?ir(n,r):void 0,u=s?[...l,s]:l,c=i&&r.it.get(i)||[];if(!u.length&&!c.length)return t;const a=new Set;for(const t of u)if(t.K)for(const n of t.K)a.add(n.time);for(const t of c)if(t.K)for(const n of t.K)a.add(n.time);if(!(a.size>0)){const n=er(u),e=er(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=rr(u,t),e=rr(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){var r,o;if(!n||!n.d&&!n.animate)return t;const i=Re(e,"clip"),l={type:"path"},s=Ce(n.d);if("absent"!==s.kind&&("static"===s.kind?l.d=Je(s.value):(Te(l,"d",s),void 0!==l.d&&(l.d=Je(l.d)))),n.animate&&!(null==(r=l.animate)?void 0:r.d)){const t=null!=(o=l.animate)?o:{};t.d=n.animate,l.animate=t}return e.defs.push({type:"clipPath",id:i,children:[l]}),t.clipPath="url(#"+i+")",t}(h,u,n),o?(sr(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=Ze(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&&Ze((null==(r=t.animate)?void 0:r.transform)||void 0)||l&&Ze((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],wt:r[0]});if(!n.length)return{At:t||void 0};if(n.every(t=>"translate"===t.name))return{translate:n.map(t=>t.wt).join("")};const o=n[0],i=n[n.length-1];if("translate"===i.name&&"translate"===o.name){const e=Ge(i.wt),r=Ge(o.wt),l=-e[0],s=-e[1],u=r[0]-l,c=r[1]-s;return 0===u&&0===c?{At:t}:{translate:"translate("+u+","+c+")",At:"translate("+l+","+s+")"+n.slice(1).map(t=>t.wt).join("")}}if("translate"===i.name)return{At:t};const l=[];let s=0;for(;s<n.length&&"translate"===n[s].name;)l.push(n[s].wt),s++;if(!l.length)return{At:t};const u=n.slice(s).map(t=>t.wt).join("");return{translate:l.join(""),At:u||void 0}}(t.transform);c?void 0!==n.translate?n.At?t.transform=n.At: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],wt: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].wt);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.At?t.transform=n.At:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes&&!t.transform.kfs){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{kt:i,inner:l}=function(t){if(!t)return{};const n=Ze(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),{kt:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(n);let s=t;s=Ie(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=Ie(u,i),u.id=e),u}(h,i,r,o)):h=function(t,n,e,r){return sr(t,n,r),Ie(t,e)}(h,d,i,n),(null==d?void 0:d.retime)&&(t.effects={clone:{retime:d.retime}}),r&&n.J.set(r,h),h}var jo=t=>{var n,e;return null!=(e=null!=(n=t.t)?n:t.time)?e:0},xo=t=>{var n;return null!=(n=t.v)?n:t.value},Oo=t=>{var n;return null!=(n=t.e)?n:t.easing},So=t=>{var n;return null!=(n=t.tangentIn)?n:t.ti},No=t=>{var n;return null!=(n=t.tangentOut)?n:t.to};function zo(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 Po(t,n,e,r,o=64){let i=0,l=t;for(let s=1;s<=o;s++){const u=zo(t,n,e,r,s/o);i+=Math.hypot(u[0]-l[0],u[1]-l[1]),l=u}return i}var Co=t=>{const n=Math.round(1e4*t)/1e4;return Object.is(n,-0)?"0":String(n)};function To(t,n,e){var r,o;let i=ko(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,o;if("offsetPath"!==t.U)return;const i=null!=(n=t.keyframes)?n:t.kfs;if(!i||i.length<2)return;const l=xo(i[0]),s=(null==l?void 0:l.origin)&&l.origin.length>=2?[l.origin[0],l.origin[1]]:[0,0],u=[];for(const t of i){const n=xo(t),r=null==n?void 0:n.translate;if(!r||r.length<2)return;if(Object.keys(n).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(e=null==n?void 0:n.origin)?e:[0,0];if(o[0]!==s[0]||o[1]!==s[1])return;u.push([r[0]+s[0],r[1]+s[1]])}if(!i.some(t=>So(t)||No(t)))return;let c="M"+Co(u[0][0])+","+Co(u[0][1]);const a=[];for(let t=0;t<u.length-1;t++){const n=u[t],e=u[t+1],l=null!=(r=No(i[t]))?r:[0,0],s=null!=(o=So(i[t+1]))?o:[0,0],f=[n[0]+l[0],n[1]+l[1]],d=[e[0]+s[0],e[1]+s[1]];c+="C"+Co(f[0])+","+Co(f[1])+","+Co(d[0])+","+Co(d[1])+","+Co(e[0])+","+Co(e[1]),a.push(Po(n,f,d,e))}const f=a.reduce((t,n)=>t+n,0);if(!(f>0))return;const d=[];let v=0;for(let t=0;t<i.length;t++){t>0&&(v+=a[t-1]);const n={t:jo(i[t]),v:v/f},e=Oo(i[t]);void 0!==e&&(n.e=e),d.push(n)}return{Mt:c,jt:d,autoOrient:!!t.autoOrient,anchor:s}}(i);if(n){const e=a({},o);delete e.transform;const l={keyframes:n.jt};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.Mt+"')",offsetAnchor:Co(n.anchor[0])+"px "+Co(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=me(i,null!=(o=null==(r=_t(i))?void 0:r.duration)?o:C),n===jt.waapi&&(i=ee(i,null==e?void 0:e.xt),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=Se(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=Ne(t.viewBox);if(n)return[n[2],n[3]];const e=Oe(t.width),r=Oe(t.height);return void 0!==e&&void 0!==r?[e,r]:[1,1]}(t),l=[],s=ze(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 _o(t){const n=globalThis;"function"!=typeof n.cancelAnimationFrame?n.clearTimeout(t):n.cancelAnimationFrame(t)}function Lo(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 Io(t){return"#"+t}function Do(t,n,e,r){const o=_t(t)||{};if(!r)if(t.id){const n=Io(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=ge(t,jt.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),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 p=null,y=!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=D(t,0,s*n),r=Math.max(0,Math.ceil(t/n)-1),r=Math.min(r,s-1),e=D((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=Ae(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=()=>!!y&&!!n.isConnected()&&(b<0?M()>0:!(Number.isFinite(c)&&j()>=c)),S=t=>{null!==p&&(_o(p),p=null),(t||O())&&(p=function(t){const n=globalThis;return"function"==typeof n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,16)}(()=>{p=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.Ot)||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.Ot)||r.call(e)));if(A>0){const t=Date.now();if(k&&t-k<A)return;k=t}x(o)}})(),S()}))},N=()=>{if(!y)return;let t=M();Number.isFinite(c)&&t>c&&(t=c),m=t,h=0,y=!1,null!==p&&(_o(p),p=null),t>=0?x(t):v&&x(0)},z={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!y){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,y=!0,h=Date.now(),S(!0)}})(),null==(t=null==e?void 0:e.St)||t.call(e)},pause:()=>{var t;N(),null==(t=null==e?void 0:e.Nt)||t.call(e)},cancel:()=>{var t;N(),m=0,h=0,y=!1,g=!1,x(m),null==(t=null==e?void 0:e.zt)||t.call(e)},finish:()=>{((t=!0)=>{var n;m=Number.isFinite(c)?c:j(),h=0,y=!1,null!==p&&(_o(p),p=null),x(d?m:0),t&&!g&&(g=!0,null==(n=null==e?void 0:e.Ot)||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,y&&(h=Date.now())},getCurrentTime:()=>j(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(c)&&t>c&&(t=c),m=t,y&&(h=Date.now()),(!Number.isFinite(c)||t<c)&&(g=!1),x(j())},destroy:()=>{var t;z.cancel(),null==(t=null==e?void 0:e.Pt)||t.call(e)}};return z}(t,n||function(t){const n=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(e,r,o)=>{r=I(r);const i=Io(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),P.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)"):Lo(l,o.trigger)),l}function Fo(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 O.has(e)&&Array.isArray(l)?c=j(l):"transform"!==e||null===l||"object"!=typeof l||Array.isArray(l)?S.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=>v(t,!0)).join("")+'")':N.has(e)&&"number"==typeof l?100*l+"%":""+l:(c=z(l,{l:!0}),a="transform"),CSS.supports(I(a),c)||r.add(a),a=T(a),u[a]=c,u}function Ro(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?w(d.e)(n):n,{right:o}=k(d.e,n);u.push({t:0,v:de(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?w(r.e)(o):o,{left:l}=k(r.e,o);u.length>0&&(u[u.length-1]=f(a({},u[u.length-1]),{e:l})),u.push({t:e,v:de(t,r.v,d.v,i),e:void 0})}break}u.push(d)}return u}function Vo(t,n,e){var r;const o=new Map;for(const[i,l]of Object.entries(t)){const t=e.duration||1,s=Ro(i,l.kfs||l.keyframes||[],t),u=[];for(let e=0;e<s.length;e++){const o=s[e],l=Fo(o,D((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 Uo(t,n,e,r,o){var i;const l=_t(t)||{};if(!e)if(t.id){const n=Io(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=ge(t,jt.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=Io(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 p=Vo(r,f,l),y=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:y,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 p)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.Ot)&&(i.onfinish=()=>{var t;d||(d=!0,null==(t=n.Ot)||t.call(n))}),(null==n?void 0:n.Pt)&&(i.onremove=()=>{var t;v||(v=!0,null==(t=n.Pt)||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 p={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.St)||t.call(n)},pause:()=>{var t;u.forEach(t=>t.pause()),null==(t=null==n?void 0:n.Nt)||t.call(n)},cancel:()=>{var t;d=!1,u.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.zt)||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),p),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;p.cancel(),u.splice(0,u.length),v||(v=!0,null==(t=null==n?void 0:n.Pt)||t.call(n))}};return l.trigger&&("scroll"===l.timelineSource?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Lo(p,l.trigger)),o&&u.forEach(t=>t.play()),p}function Bo(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?{Ct:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:s}:{offset:s}}function Eo(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 Go(){return document.scrollingElement||document.documentElement}var Zo="parent",Wo="scroller";function qo(t,n){var e,r;const o=null==n?void 0:n.trim();if(!o)return t;if(o===Zo){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===Wo)return Eo(t,"y")||Eo(t,"x")||Go();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 Qo(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=Eo(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 Xo(t,n,e){let r,o=n;t.resetOnFinish&&(o=f(a({},n),{Ot:()=>{var t;null==(t=null==n?void 0:n.Ot)||t.call(n),null==r||r.cancel()}}));const i=e(o);return r=i,t.debugInstName&&(window[t.debugInstName]=i),i}var Ko="http://www.w3.org/2000/svg";function Jo(t,n){if(!t)return null;const e=t,{type:r,children:o,style:u}=e,c=((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})(e,["type","children","style"]),a=c.Tt;void 0!==a&&delete c.Tt;const f=Lt(t)||n,d=function(t,n){var e;if(t)return"string"==typeof t?null==(e=null==n?void 0:n.styles)?void 0:e[t]:t}(u,f);let v;if(o)for(const t of o){const n=Jo(t,f);n&&(v||(v=[]),v.push(n))}const p=function(t,n,e,r,o){if(xn.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(Ko,t);for(const t in n){const e=_n(t,n[t]);void 0!==e&&(Nn.has(t)?i.style[t]=String(e):i.setAttribute(I(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(Ct.has(r))continue;if("style"===r)continue;let o=t[e];if(O.has(r)&&Array.isArray(o))n[r]=j(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes||o.kfs)S.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=z(t,{l:!1})}}return n}(c),d,v,c[Pt]||c[zt]);return p&&void 0!==a&&p.setAttribute("type",a),p}var Yo,Ho="data";function $o(t,n,e,r){const o=function(t){const n=[],e=(t,r)=>{if(t&&t.effects){const e={errors:[],warnings:[],S:!1};if(!yn.A(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=To(t,(_t(t)||{}).mode===Mt.frames?jt.frames:jt.waapi);let i=null;if(r){t=Mn(t);const n="string"==typeof r?document.querySelector(r):r;n&&(i=Jo(t),i&&n.replaceChildren(i))}return function(t,n,e,r){return function(t,n,e,r){const o=_t(t)||{};return G(o)?Xo(o,e,e=>{var i,l;let s=()=>{};if(o.mode!==Mt.frames&&"native"===(null==(i=o.scroll)?void 0:i.driver)&&r){s=Qo(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:qo(t,l.subject),axis:f}:{source:"root"===l.source?Go():Eo(t,"y")||Eo(t,"x")||Go(),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:Bo(null==(o=l.range)?void 0:o.start,0,c),rangeEnd:Bo(null==(i=l.range)?void 0:i.end,1,c)}}(r,o);if(n){const i=Uo(t,e,r,o.mode===Mt.waapi,n);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{s(),t()},i}}s(),s=()=>{}}const u=(o.mode!==Mt.frames?Uo(t,e,r,o.mode===Mt.waapi):null)||Do(t,n,e,r),c=(null==(l=u.getRootElement)?void 0:l.call(u))||r;if(c){s=Qo(c,o.scroll);const t=("number"==typeof(null==(a=o)?void 0:a.duration)&&a.duration>0?a.duration:C)*("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=qo(t,i.subject),u=Eo(t,"y")||Eo(t,"x"),c="scroll"===l&&"root"===i.source?Go():u||Go(),a=c===Go(),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?D(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:D((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=W(null==r?void 0:r.start,0,n,e),l=W(null==r?void 0:r.end,1,n,e);return l<=i?o>=l?1:0:D((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 p=!1,y=null,m=null,h=0,b=null;const g=()=>{b=null,p||(t=>{if(!v)return void e(t);if(null===y)return y=t,void e(t);if(null!==m)return;h=0;const n=t=>{if(m=null,p)return;const r=h?Math.min(.1,(t-h)/1e3):1/60;h=t;const o=d(),i=1-Math.exp(-r/v);y+=(o-y)*i,Math.abs(o-y)<.001&&(y=o),e(y),y!==o&&(m=requestAnimationFrame(n))};m=requestAnimationFrame(n)})(d())},w=()=>{p||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:()=>{p||(p=!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:()=>{p||(y=d(),e(y))}};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}):Xo(o,e,e=>o.mode===Mt.frames?Do(t,n,e,r):Uo(t,e,r,o.mode===Mt.waapi)||Do(t,n,e,r))}(t,n,e,r)}(t,n,e,i)}function ti(t){const{src:n,data:e,_t:r,Lt: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 $o(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=$o(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 ni(){const t=document.querySelectorAll("["+At+"]");for(let n=0;n<t.length;n++){const e=t[n];if(!e[kt]){const t=e.getAttribute(At);t&&(e[kt]=ti({src:t,container:e}))}}}return"undefined"!=typeof window&&(window.loadTagAnimators=ni,window.createAnimator=ti,window.setupAnimationTriggers=Lo),Yo=d,((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}),Yo)})();