@pixodesk/svg-animator-web 1.0.29 → 1.0.34

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
- var t,e=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,c=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&u(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&u(t,n,e[n]);return t},f=(t,e)=>n(t,o(e)),d={};((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(d,{COLOUR_ATTR_NAMES:()=>L,MISSING_GLYPH_CLASS_NAME:()=>po,PX_ANIMATOR_DATA_KEY:()=>Vi,PX_ANIM_ATTR_NAME:()=>Pt,PX_ANIM_SRC_ATTR_NAME:()=>St,PX_TRANSFORM_PART_KEYS:()=>Ct,PxAnimatedSvgDocumentSchema:()=>Ee,PxAnimationDefinitionSchema:()=>Qt,PxAnimatorConfigSchema:()=>ae,PxAnimatorEngine:()=>Ot,PxAnimatorMode:()=>jt,PxAttrValueSchema:()=>le,PxBezierPathSchema:()=>Ie,PxBindingSchema:()=>se,PxCloneEffectSchema:()=>ye,PxDefsSchema:()=>ne,PxEasingOrRefSchema:()=>Gt,PxEffectsSchema:()=>Pe,PxElementAnimationSchema:()=>Jt,PxFillGradientEffectSchema:()=>Ae,PxGradientSpreadMethod:()=>Lt,PxGradientStopSchema:()=>be,PxGradientType:()=>Dt,PxGradientUnits:()=>Ft,PxKeyframeSchema:()=>Kt,PxKeyframeValueSchema:()=>qt,PxLoopSchema:()=>Zt,PxMaskedByEffectSchema:()=>me,PxNodeBase:()=>Oe,PxNodeSchema:()=>Me,PxPropertyAnimationSchema:()=>Ht,PxRepeaterEffectSchema:()=>he,PxRetimeEffectSchema:()=>ge,PxStrokeGradientEffectSchema:()=>we,PxSvgNodeExtra:()=>_e,PxTextEffectSchema:()=>Se,PxTextPathEffectSchema:()=>xe,PxTransformByEffectSchema:()=>de,PxTransformPartsSchema:()=>Xt,PxTransformValueSchema:()=>Yt,PxTriggerSchema:()=>$t,PxTrimPathEffectSchema:()=>ve,STYLE_ATTR_NAMES:()=>U,TRANSFORM_FN_NAMES:()=>D,applyPlayerEffects:()=>Ko,calcAnimationValues:()=>Ln,camelCaseToKebabWordIfNeeded:()=>K,collectSampleTimes:()=>Ai,createAnimator:()=>Gi,createAnimatorImpl:()=>Wi,createBasicFrameLoopAnimator:()=>oi,createFrameLoopAnimator:()=>Oi,createPathSampler:()=>Ur,createWebApiAnimator:()=>Ii,describeSchema:()=>wt,diffInEffect:()=>xi,evaluateMotionPathSegment:()=>tn,extendedPathForBrowser:()=>Zr,generateNewIds:()=>Fe,getAnimatorConfig:()=>Bt,getBindings:()=>Vt,getChildren:()=>Wt,getDefs:()=>Ut,getNormalizedProps:()=>Ze,isPxElementFileFormat:()=>Rt,isPxElementFileFormatDeep:()=>ze,jsonElementFactory:()=>Xr,layoutGlyphTextChars:()=>yo,loadTagAnimators:()=>qi,materialiseAllInTree:()=>ni,materialiseAnimatedUseInstances:()=>Vn,materialiseGlyphText:()=>Eo,materialiseGlyphTextAlongPath:()=>Ao,materialiseGlyphTextHorizontal:()=>go,materialiseInternalLoopsInPropAnim:()=>In,materialiseInternalLoopsInTree:()=>zn,materialiseMotionPathInPropAnim:()=>on,materialiseMotionPathsInTree:()=>yn,normalizeDocument:()=>Cn,propAnimIsMotionPath:()=>Qe,px:()=>xt,renderNode:()=>Ui,schemaKeys:()=>At,setupAnimationTriggers:()=>Pi,shiftAnimatable:()=>Kr,toRGBA:()=>C,validateNodeEffects:()=>je,visualModelAt:()=>wi}),module.exports=(t=d,((t,n,o,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let o of i(n))s.call(t,o)||void 0===o||e(t,o,{get:()=>n[o],enumerable:!(a=r(n,o))||a.enumerable});return t})(e({},"__esModule",{value:!0}),t));var h=Object.defineProperty,m=Object.defineProperties,p=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=Math.pow,k=(t,e,n)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e)=>{for(var n in e||(e={}))g.call(e,n)&&k(t,n,e[n]);if(v)for(var n of v(e))y.call(e,n)&&k(t,n,e[n]);return t},w=(t,e)=>m(t,p(e)),x=(t,e)=>{var n={};for(var r in t)g.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&v)for(var r of v(t))e.indexOf(r)<0&&y.call(t,r)&&(n[r]=t[r]);return n};function S(t,e=!1){var n,r,o,i;const a=t.v,s=t.i,l=t.o,u=t.c;if(!a.length)return"";const c=[],f=a.length;c.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<f;t++){const o=a[t-1],i=null!=(n=null==l?void 0:l[t-1])?n:o,u=null!=(r=null==s?void 0:s[t])?r:a[t],f=a[t];e||i[0]!==o[0]||i[1]!==o[1]||u[0]!==f[0]||u[1]!==f[1]?c.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1]):c.push("L"+f[0]+","+f[1])}if(u&&f>0){const t=a[f-1],n=null!=(o=null==l?void 0:l[f-1])?o:t,r=null!=(i=null==s?void 0:s[0])?i:a[0],u=a[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||c.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),c.push("z")}return c.join("")}function P(t,e,n){return t+(e-t)*n}function j(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=P(t[i]||0,e[i]||0,n);return r}function O(t,e,n){return[P(t[0]||0,e[0]||0,n),P(t[1]||0,e[1]||0,n),P(t[2]||0,e[2]||0,n),P(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function M(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(_(t[i],e[i],n));return o}function _(t,e,n){var r,o,i,a,s,l,u,c,f;if(!t||!e)return t||e||{v:[]};const d=Math.min(Math.max(n,0),1),h=Math.min(t.v.length,e.v.length),m=[],p=[],v=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];m.push(j(f,h,d));const g=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,y=null!=(a=null==(i=e.i)?void 0:i[n])?a:h;p.push(j(g,y,d));const b=null!=(l=null==(s=t.o)?void 0:s[n])?l:f,k=null!=(c=null==(u=e.o)?void 0:u[n])?c:h;v.push(j(b,k,d))}return{v:m,i:p.length?p:void 0,o:v.length?v:void 0,c:null!=(f=t.c)?f:e.c}}function E(t,e,n){if(n<=0)return 0;if(n>=1)return 1;const r=3*t,o=3*(e-t)-r,i=1-r-o;function a(t){return((i*t+o)*t+r)*t}function s(t){return(3*i*t+2*o)*t+r}let l=n,u=0,c=1;for(let t=0;t<8;t++){const t=a(l)-n;if(Math.abs(t)<1e-6)return l;const e=s(l);if(Math.abs(e)<1e-6)break;l-=t/e}for(l=n;u<c;){const t=a(l);if(Math.abs(t-n)<1e-6)return l;n>t?u=l:c=l,l=(c+u)/2}return l}function I(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,s=1-i-a;return function(t){return n=E(e,r,t),((s*n+a)*n+i)*n;var n}}function z(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function T(t,e){if(!t)return{left:void 0,right:void 0};if(e<=0)return{left:void 0,right:t};if(e>=1)return{left:t,right:void 0};const[n,r,o,i]=t,a=E(n,o,e),s=[n,r],l=[o,i],{left:u,right:c}=function(t,e,n,r,o){const i=z(t,e,o),a=z(e,n,o),s=z(n,r,o),l=z(i,a,o),u=z(a,s,o),c=z(l,u,o);return{left:[t,i,l,c],right:[c,u,s,r]}}([0,0],s,l,[1,1],a),f=u[3][0],d=u[3][1];let h,m;f>1e-9&&Math.abs(d)>1e-9&&(h=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const p=1-f,v=1-d;return p>1e-9&&Math.abs(v)>1e-9&&(m=[(c[1][0]-f)/p,(c[1][1]-d)/v,(c[2][0]-f)/p,(c[2][1]-d)/v]),{left:h,right:m}}function N(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function C(t){const e=Math.round(255*t[0]),n=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+e+","+n+","+r+","+t[3]+")":"rgb("+e+","+n+","+r+")"}function F(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const e=t.slice(1),n=e.length<=4,r=n?e[0]+e[0]:e.slice(0,2),o=n?e[1]+e[1]:e.slice(2,4),i=n?e[2]+e[2]:e.slice(4,6),a=4===e.length?e[3]+e[3]:8===e.length?e.slice(6,8):null,s=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==a&&s.push(parseInt(a,16)/255),s}(t):t.startsWith("rgb")?function(t){var e;const n=null==(e=t.match(/rgba?\((.*)\)/))?void 0:e[1];if(!n)throw new Error("Invalid rgb/rgba format");const r=n.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)}}var L=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),D=new Set(["translate","rotate","scale","skew"]),R=new Set(["offset-distance","offsetDistance"]);function B(t,e){var n;if(!t)return"";const r=null==(n=null==e?void 0:e.withUnits)||n,o=[],i=t.translate,a=t.origin,s=t.rotate,l=t.skew,u=t.scale,c=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+c+","+i[1]+c+")"),a&&o.push("translate("+a[0]+c+","+a[1]+c+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),a&&o.push("translate("+-a[0]+c+","+-a[1]+c+")"),o.join("")}var U=new Set(["offset-distance","offsetDistance"]),V=1e3;function W(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function G(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var q=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 K(t){return q.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Z(t,e,n){return Math.max(e,Math.min(t,n))}function H(t,e,n,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,a=i*i,s=o*o,l=a*i,u=3*o*a,c=3*s*i,f=s*o;return[l*t[0]+u*e[0]+c*n[0]+f*r[0],l*t[1]+u*e[1]+c*n[1]+f*r[1]]}var X=1e-4;function Y(t,e,n,r,o){const i=Q(t,e,n,r,o);return 0===i[0]&&0===i[1]?Q(t,e,n,r,o<.5?o+X:o-X):i}function Q(t,e,n,r,o){const i=1-o,a=3*i*i,s=6*o*i,l=3*o*o;return[a*(e[0]-t[0])+s*(n[0]-e[0])+l*(r[0]-n[0]),a*(e[1]-t[1])+s*(n[1]-e[1])+l*(r[1]-n[1])]}function J(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=H(t,e,n,r,0);a[0]=0,s[0]=0;let u=0;for(let c=1;c<i;c++){const i=c/o,f=H(t,e,n,r,i),d=f[0]-l[0],h=f[1]-l[1];u+=Math.sqrt(d*d+h*h),a[c]=i,s[c]=u,l=f}return{ts:a,ds:s}}function $(t,e){const{ts:n,ds:r}=t,o=n.length-1;if(e<=n[0])return r[0];if(e>=n[o])return r[o];let i=1,a=o;for(;i<a;){const t=i+a>>>1;n[t]<e?i=t+1:a=t}const s=n[a-1],l=n[a]-s,u=l>0?(e-s)/l:0;return r[a-1]+u*(r[a]-r[a-1])}function tt(t){return"scroll"===(null==t?void 0:t.timelineSource)}var et="cover";function nt(t,e,n,r){var o;const[i,a]=function(t,e,n){const r=e,o=n;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:et,n,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:e)*(a-i)}function rt(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var ot=class{_canSanitize(t){return this.isValid(t)}optional(){return new it(this)}},it=class extends ot{constructor(t){super(),this.inner=t,this._default=void 0}sanitize(t){if(null!=t)return this.inner._canSanitize(t)?this.inner.sanitize(t):void 0}isValid(t,e,n){return null==t||this.inner.isValid(t,e,n)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},at=class extends ot{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,e,n){return"string"==typeof t||(null==e||e.errors.push(rt(null!=n?n:[])+": expected string, got "+typeof t),!1)}},st=class extends ot{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,e,n){return!("number"!=typeof t||!isFinite(t))||(null==e||e.errors.push(rt(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},lt=class extends ot{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,e,n){return"boolean"==typeof t||(null==e||e.errors.push(rt(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},ut=class extends ot{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,e,n){return t===this.value||(null==e||e.errors.push(rt(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},ct=class extends ot{constructor(t,e){super(),this.values=t,this._default=null!=e?e:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,e,n){return!!this.values.includes(t)||(null==e||e.errors.push(rt(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},ft=class extends ot{constructor(t,e){super(),this.schemas=t,this._default=null!=e?e:t[0]._default}sanitize(t){for(const e of this.schemas)if(e.isValid(t))return e.sanitize(t);return this._default}isValid(t,e,n){var r;const o=e&&{errors:[],warnings:[],strict:e.strict};return!!this.schemas.some(e=>e.isValid(t,o,n?[...n]:void 0))||(null==e||e.errors.push(rt(null!=n?n:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},dt=class extends ot{constructor(t,e,n){super(),this._key=t,this._schemas=e,this._default=null!=n?n:e[0]._default,this._map=new Map;for(const n of e){const e=n._shape[t];e&&this._map.set(e._default,n)}}_findSchema(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const e=t[this._key];return null!=e?this._map.get(e):void 0}sanitize(t){var e;return(null!=(e=this._findSchema(t))?e:this._schemas[0]).sanitize(t)}isValid(t,e,n){const r=this._findSchema(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this._key];return null==e||e.errors.push(rt(null!=n?n:[])+": no discriminated union member matched "+this._key+"="+JSON.stringify(r)),!1}return r.isValid(t,e,n)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const e=this._findSchema(t);return e?e._canSanitize(t):this._schemas[0]._canSanitize(t)}},ht=class extends ot{constructor(t){super(),this._shape=t;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n={};for(const t of Object.keys(this._shape))n[t]=this._shape[t].sanitize(e[t]);return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(null==e?void 0:e.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),e.errors.push(rt(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},mt=class extends ot{constructor(t,e){super(),this._shape=t,this._openSchema=e;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n=A({},e);for(const t of Object.keys(this._shape))n[t]=this._shape[t].sanitize(e[t]);if(this._openSchema)for(const t of Object.keys(e))t in this._shape||(n[t]=this._openSchema.sanitize(e[t]));return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(this._openSchema)for(const t of Object.keys(r))t in this._shape||(o.push(t),this._openSchema.isValid(r[t],e,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},pt=class extends ot{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const e=[];for(const n of t)this.item._canSanitize(n)&&e.push(this.item.sanitize(n));return e}isValid(t,e,n){if(!Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected array, got "+typeof t),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<t.length;n++)r.push("["+n+"]"),this.item.isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},vt=class extends ot{constructor(t){super(),this.value=t,this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const e={};for(const[n,r]of Object.entries(t))this.value._canSanitize(r)&&(e[n]=this.value.sanitize(r));return e}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(const[n,i]of Object.entries(t))r.push(n),this.value.isValid(i,e,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},gt=class extends ot{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},yt=class extends ot{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return void 0!==t||(null==e||e.errors.push(rt(null!=n?n:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}},bt=class extends ot{constructor(t,e){super(),this.fn=t,this._default=e,this.resolved=null}get schema(){var t;return null!=(t=this.resolved)?t:this.resolved=this.fn()}sanitize(t){return this.schema.sanitize(t)}isValid(t,e,n){return this.schema.isValid(t,e,n)}_canSanitize(t){return this.schema._canSanitize(t)}},kt=class extends ot{constructor(t){super(),this.schemas=t,this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.schemas.length?this.schemas.map((e,n)=>e.sanitize(t[n])):this._default}isValid(t,e,n){if(!Array.isArray(t)||t.length!==this.schemas.length)return null==e||e.errors.push(rt(null!=n?n:[])+": expected tuple of length "+this.schemas.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<this.schemas.length;n++)r.push("["+n+"]"),this.schemas[n].isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.schemas.length}};function At(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function wt(t){var e;const n=t;return"_shape"in n?{kind:"shape",shape:n._shape}:"item"in n?{kind:"array",item:n.item}:"inner"in n?{kind:"optional",inner:n.inner}:"fn"in n?{kind:"lazy",resolved:null!=(e=n.resolved)?e:n.fn()}:{kind:"leaf"}}var xt={string:(t="")=>new at(t),number:(t=0)=>new st(t),boolean:(t=!1)=>new lt(t),literal:t=>new ut(t),enum:(t,e)=>new ct(t,e),union:(t,e)=>new ft(t,e),discriminatedUnion:(t,e)=>new dt(t,e),object:t=>new ht(t),openObject:(t,e)=>new mt(t,e),extendedObject:(t,e)=>new ht(A(A({},t._shape),e)),array:t=>new pt(t),record:t=>new vt(t),any:()=>new gt,defined:()=>new yt,tuple:t=>new kt(t),lazy:(t,e)=>new bt(t,e)},St="data-px-animation-src",Pt="_px_animator",jt={auto:"auto",waapi:"waapi",frames:"frames"},Ot={waapi:jt.waapi,frames:jt.frames},Mt={before:"before",after:"after"},_t="userSpaceOnUse",Et="objectBoundingBox",It={separate:"separate",combined:"combined"},zt="text",Tt="textContent",Nt=new Set(["type","children","animator","meta","animate","effects",zt,Tt]),Ct=["translate","rotate","scale","origin"],Ft={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},Lt={pad:"pad",reflect:"reflect",repeat:"repeat"},Dt={linear:"linear",radial:"radial"};function Rt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function Bt(t){var e;return(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator)}function Ut(t){var e;if(t)return null==(e=Bt(t))?void 0:e.definitions}function Vt(t){var e;if(!t)return;const n=null==(e=Bt(t))?void 0:e.animateById;return n?Object.entries(n).map(([t,e])=>({id:t,animate:e})):void 0}function Wt(t){return null==t?void 0:t.children}var Gt=xt.union([xt.string(),xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])]),qt=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.lazy(()=>Xt,{}),xt.object({path:xt.string()}),xt.lazy(()=>xt.object({paths:xt.array(Ie)}),{paths:[]}),xt.lazy(()=>xt.array(be),[])]),Kt=xt.object({time:xt.number().optional(),t:xt.number().optional(),value:qt.optional(),v:qt.optional(),easing:Gt.optional(),e:Gt.optional(),tangentOut:xt.tuple([xt.number(),xt.number()]).optional(),to:xt.tuple([xt.number(),xt.number()]).optional(),tangentIn:xt.tuple([xt.number(),xt.number()]).optional(),ti:xt.tuple([xt.number(),xt.number()]).optional(),selected:xt.boolean().optional()}),Zt=xt.object({segmentCount:xt.number().optional(),extend:xt.enum([Mt.before,Mt.after]).optional(),alternate:xt.boolean().optional()}),Ht=xt.object({value:qt.optional(),keyframes:xt.array(Kt).optional(),kfs:xt.array(Kt).optional(),loop:xt.union([Zt,xt.boolean()]).optional(),autoOrient:xt.boolean().optional()}),Xt=xt.object({translate:xt.tuple([xt.number(),xt.number()]).optional(),rotate:xt.number().optional(),skew:xt.number().optional(),scale:xt.tuple([xt.number(),xt.number()]).optional(),origin:xt.tuple([xt.number(),xt.number()]).optional()}),Yt=xt.union([xt.string(),Xt,xt.object({value:Xt}),Ht]),Qt=xt.record(Ht),Jt=xt.union([xt.string(),xt.array(xt.union([xt.string(),Qt])),Qt]),$t=xt.object({startOn:xt.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:xt.enum(["continue","pause","reset","reverse"]).optional(),scrollIntoViewThreshold:xt.number().optional()}),te=xt.object({width:xt.number(),d:xt.string()}),ee=xt.object({fFamily:xt.string(),style:xt.string(),ascent:xt.number(),unitsPerEm:xt.number(),glyphs:xt.record(te)}),ne=xt.object({easings:xt.record(xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])).optional(),animations:xt.record(Qt).optional(),styles:xt.record(xt.any()).optional(),glyphs:xt.record(ee).optional()}),re=xt.object({phase:xt.enum(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:xt.number().optional()}),oe=xt.object({start:re.optional(),end:re.optional()}),ie=xt.object({driver:xt.enum(["custom","native"]).optional(),kind:xt.enum(["view","scroll"]).optional(),axis:xt.enum(["block","inline","x","y"]).optional(),source:xt.enum(["nearest","root"]).optional(),subject:xt.string().optional(),smoothing:xt.number().optional(),pin:xt.boolean().optional(),pinAlign:xt.enum(["top","center","bottom"]).optional(),pinTop:xt.number().optional(),pinDistance:xt.number().optional(),range:oe.optional()}),ae=xt.object({mode:xt.enum([jt.auto,jt.waapi,jt.frames]).optional(),duration:xt.number().optional(),delay:xt.number().optional(),iterations:xt.union([xt.number(),xt.literal("infinite")]).optional(),fill:xt.enum(["forwards","backwards","both","none"]).optional(),direction:xt.enum(["normal","reverse","alternate","alternate-reverse"]).optional(),frameRate:xt.number().optional(),trigger:$t.optional(),resetOnFinish:xt.boolean().optional(),definitions:ne.optional(),animateById:xt.record(Jt).optional(),timelineSource:xt.string().optional(),scroll:ie.optional(),debugInstName:xt.string().optional()}),se=xt.object({id:xt.string(),animate:Jt}),le=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({value:xt.defined()}),Xt]),ue=xt.union([xt.number(),xt.object({value:xt.number()}),Ht]),ce=xt.union([xt.tuple([xt.number(),xt.number()]),xt.object({value:xt.tuple([xt.number(),xt.number()])}),Ht]),fe=xt.union([xt.string(),xt.object({value:xt.string()}),Ht]),de=xt.object({translate:ce.optional(),rotate:ue.optional(),scale:ce.optional(),skew:ue.optional(),origin:ce.optional()}),he=xt.object({copies:xt.number().optional(),translate:ce.optional(),rotate:ue.optional(),skew:ue.optional(),scale:ce.optional(),origin:ce.optional()}),me=xt.object({sourceId:xt.string().optional(),maskType:xt.enum(["luminance","alpha"]).optional(),maskUnits:xt.enum([_t,Et]).optional(),maskContentUnits:xt.enum([_t,Et]).optional(),x:xt.number().optional(),y:xt.number().optional(),width:xt.number().optional(),height:xt.number().optional()}),pe=xt.object({d:fe.optional(),animate:Ht.optional()}),ve=xt.object({offset:ue.optional(),range:ce.optional(),subPaths:xt.enum([It.separate,It.combined]).optional()}),ge=xt.object({sourceId:xt.string().optional(),start:xt.number().optional(),stretch:xt.number().optional(),timeCrop:xt.tuple([xt.number(),xt.number()]).optional()}),ye=xt.object({type:xt.enum(["content"]).optional(),sourceId:xt.string().optional(),retime:ge.optional()}),be=xt.object({offset:xt.number(),color:xt.string()}),ke=xt.union([xt.array(be),xt.object({value:xt.array(be)}),Ht]),Ae=xt.object({type:xt.enum([Dt.linear,Dt.radial]),p1:ce.optional(),p2:ce.optional(),c:ce.optional(),r:ue.optional(),fp:ce.optional(),stops:ke.optional(),gradientUnits:xt.enum([Ft.userSpaceOnUse,Ft.objectBoundingBox]).optional(),spreadMethod:xt.enum([Lt.pad,Lt.reflect,Lt.repeat]).optional(),gradientTransform:xt.string().optional()}),we=Ae,xe=xt.object({path:xt.string(),pathOverflow:xt.enum(["clip","extend"]).optional(),lengthAdjust:xt.enum(["spacing","spacingAndGlyphs"]).optional(),method:xt.enum(["align","stretch"]).optional(),spacing:xt.enum(["auto","exact"]).optional(),startOffset:ue.optional(),textLength:ue.optional()}),Se=xt.object({useGlyphs:xt.boolean().optional()}),Pe=xt.object({transformBy:de.optional(),repeater:he.optional(),maskedBy:me.optional(),clipPath:pe.optional(),trimPath:ve.optional(),clone:ye.optional(),fillGradient:Ae.optional(),strokeGradient:we.optional(),textPath:xe.optional(),text:Se.optional()});function je(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Pe.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)n.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,e)=>r(t,o+".children["+e+"]"))};return r(t,"root"),n}var Oe=xt.openObject({type:xt.string(),id:xt.string().optional(),meta:xt.any().optional(),effects:Pe.optional(),animate:Jt.optional(),style:xt.union([xt.string(),xt.record(xt.union([xt.string(),xt.number()]))]).optional()},le),Me=xt.openObject(w(A({},Oe._shape),{children:xt.lazy(()=>xt.array(Me),[]).optional()}),le),_e=xt.object({width:xt.union([xt.number(),xt.string()]).optional(),height:xt.union([xt.number(),xt.string()]).optional(),viewBox:xt.string().optional(),animator:ae.optional()}),Ee=xt.openObject(w(A(A({},Oe._shape),_e._shape),{type:xt.literal("svg"),children:xt.array(Me).optional()}),le),Ie=xt.object({v:xt.array(xt.array(xt.number())),i:xt.array(xt.array(xt.number())).optional(),o:xt.array(xt.array(xt.number())).optional(),c:xt.boolean().optional()});function ze(t){const e=Ee.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}var Te=0;function Ne(){return"_px_"+Date.now().toString(36)+(++Te).toString(36)+Math.random().toString(36).substring(2,6)}function Ce(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>Ce(t));const e=t,n={};for(const t of Object.keys(e))n[t]=Ce(e[t]);return n}function Fe(t){var e,n;const r=Ce(t),o=new Map,i=new Set(["href","xlink:href"]),a=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(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=Ne();o.set(t,n),e.id=n}else e.animate&&(e.id=Ne());if(Array.isArray(e.children))for(const n of e.children)t(n)}}(r),function t(e){if(e&&"object"==typeof e)for(const[n,r]of Object.entries(e))if("children"!==n)if("string"==typeof r)if(i.has(n)&&r.startsWith("#")){const t=r.slice(1),i=o.get(t);i&&(e[n]="#"+i)}else if(a.has(n))e[n]=Le(r,o);else if(s.has(n)){const t=r.startsWith("#"),i=o.get(t?r.slice(1):r);i&&(e[n]=t?"#"+i:i)}else r.includes("url(#")&&(e[n]=Le(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=Le(e,o));else"object"==typeof r&&null!==r&&t(r);else if(Array.isArray(r))for(const e of r)t(e)}(r);const l=null==(e=r.animator)?void 0:e.animateById;if(l&&"object"==typeof l){const t={};for(const[e,r]of Object.entries(l))t[null!=(n=o.get(e))?n:e]=r;r.animator=w(A({},r.animator),{animateById:t})}return r}function Le(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var De=new Set(["script","foreignobject"]),Re=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Be=new Set(["href","xlink:href","src"]),Ue=new Set(["mixBlendMode","isolation"]),Ve=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,We=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Ge=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,qe=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Ke(t,e){const n=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(n)){if("fill"===n||"stroke"===n||"stopcolor"===n){const t=String(e);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+n+'" blocked: url() must be internal url(#id), got:',e):e}if(Re.has(n)){const t=String(e);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||Be.has(n)&&(Ve.test(t)||We.test(t)||function(t){const e=Ge.exec(t);return!!e&&qe.some(t=>e[1].startsWith(t))}(t))?e:void console.warn('Attribute "'+n+'" blocked: must be #id, url(#id), or data:image/… URI, got:',e)}return e}console.warn("Attribute blocked (event handler / dangerous): ",n)}function Ze(t){const e={};for(const n of Object.keys(t)){const r=W(n);if(Nt.has(r))continue;if("style"===r)continue;let o=t[n];if(L.has(r)&&Array.isArray(o))e[r]=C(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes||o.kfs)D.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e.transform=r+"("+o+")"):Array.isArray(o)?e[r]=o.join(","):null!=o&&(e[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;e.transform=B(t,{withUnits:!1})}}return e}function He(t){var e;const n=null!=(e=t.value)?e:t.v;if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const r=n.translate;return Array.isArray(r)&&r.length>=2?[r[0],r[1]]:void 0}function Xe(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function Ye(t){var e;return null!=(e=t.easing)?e:t.e}function Qe(t){var e,n,r;const o=null!=(e=t.keyframes)?e:t.kfs;if(!Array.isArray(o))return!1;if(t.autoOrient)return!0;for(const t of o)if((null!=(n=t.tangentIn)?n:t.ti)||(null!=(r=t.tangentOut)?r:t.to))return!0;return!1}var Je=new WeakMap;function $e(t,e,n,r){var o,i;let a=Je.get(t);const s=null==a?void 0:a.get(e);if(s)return s;const l=null!=(o=t.tangentOut)?o:t.to,u=null!=(i=e.tangentIn)?i:e.ti,c=[n[0]+(l?l[0]:0),n[1]+(l?l[1]:0)],f=[r[0]+(u?u[0]:0),r[1]+(u?u[1]:0)],d=J(n,c,f,r),h={P0:n,P1:c,P2:f,P3:r,lut:d,totalArc:d.ds[d.ds.length-1]};return a||(a=new WeakMap,Je.set(t,a)),a.set(e,h),h}function tn(t,e,n,r,o,i){const a=$e(t,e,n,r),s=0===a.totalArc?o:function(t,e){const n=e*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(n<=0)return r[0];if(n>=o[i])return r[i];let a=1,s=i;for(;a<s;){const t=a+s>>>1;o[t]<n?a=t+1:s=t}const l=o[s-1],u=o[s]-l,c=u>0?(n-l)/u:0;return r[s-1]+c*(r[s]-r[s-1])}(a.lut,o),l=H(a.P0,a.P1,a.P2,a.P3,s);if(!i)return{translate:l};const u=Y(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var en=.5,nn=5,rn=32;function on(t,e){var n,r,o,i;if(!Qe(t))return t;const a=null!=(n=t.keyframes)?n:t.kfs;if(!Array.isArray(a)||a.length<2)return t;const s=!!t.autoOrient,l=null!=(r=null==e?void 0:e.flatnessTolerance)?r:en,u=null!=(o=null==e?void 0:e.rotationTolerance)?o:nn,c=null!=(i=null==e?void 0:e.maxSamplesPerSegment)?i:rn,f=[],d=He(a[0]);if(!d)return t;const h=s?function(t,e){const n=He(t),r=He(e);if(!n||!r)return 0;const o=$e(t,e,n,r),i=Y(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(a[0],a[1]):void 0;f.push(sn(Xe(a[0]),cn(ln(a[0]),ln(a[0]),0,d,h,s)));for(let t=0;t<a.length-1;t++){const e=a[t],n=a[t+1],r=He(e),o=He(n);r&&o?(s&&t>0&&dn(f,e,n,r,o,u),mn(f,e,n,r,o,s,l,u,c)):f.push(sn(Xe(n),cn(ln(n),ln(n),1,null!=o?o:[0,0],void 0,s)))}const m=Ye(a[a.length-1]);m&&(f[f.length-1].e=m),s&&an(f);const p={kfs:f};return void 0!==t.loop&&(p.loop=t.loop),p}function an(t){var e;let n;for(const r of t){const t=null!=(e=r.v)?e:r.value;if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let o=t.rotate;for(;o-n>180;)o-=360;for(;o-n<-180;)o+=360;t.rotate=o,n=o}}function sn(t,e){return{t:t,v:e}}function ln(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function un(t,e,n){if(void 0===t)return e;if(void 0===e)return t;if("number"==typeof t&&"number"==typeof e)return t+(e-t)*n;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,a="number"==typeof e[o]?e[o]:0;r[o]=i+(a-i)*n}return r}return n<.5?t:e}function cn(t,e,n,r,o,i){const a={translate:r},s=new Set;if(t)for(const e of Object.keys(t))s.add(e);if(e)for(const t of Object.keys(e))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==e?void 0:e[r];void 0===o&&void 0===s||(a[r]=un(o,s,n))}return void 0!==o&&(a.rotate=o+fn(t,e,n)),a}function fn(t,e,n){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==e?void 0:e.rotate)?e.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=un(r,o,n);return"number"==typeof i?i:0}function dn(t,e,n,r,o,i){var a;const s=t[t.length-1],l=null!=(a=s.v)?a:s.value,u=null==l?void 0:l.rotate;if("number"!=typeof u)return;const c=ln(e),f=u-fn(c,c,0),d=$e(e,n,r,o),h=Y(d.P0,d.P1,d.P2,d.P3,0),m=180*Math.atan2(h[1],h[0])/Math.PI,p=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(m,f);if(Math.abs(p)<=i)return;const v=Xe(e),g=Math.min(v+hn,(v+Xe(n))/2),y=cn(ln(e),ln(e),0,r,m,!0);t.push(sn(g,y))}var hn=.05;function mn(t,e,n,r,o,i,a,s,l){const u=$e(e,n,r,o),c=Xe(e),f=Xe(n),d=Ye(e),h=(m=d)?I([m[1],m[0],m[3],m[2]]):t=>t;var m;const p=ln(e),v=ln(n),g=function(t,e,n,r,o){const i=[];pn(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),pn(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,e)=>t-e);const a=[0];for(const t of i)t>a[a.length-1]+1e-6&&t<.999999&&a.push(t);a.push(1);const s=[],l={remaining:o-a.length};for(let o=0;o<a.length-1;o++)vn(a[o],a[o+1],s,t,e,n,r,l);return s}(u,i,a,s,l),y=[];for(const t of g){const e=$(u.lut,t),n=Z(u.totalArc>0?e/u.totalArc:t,0,1),r={u:Z(h(n),0,1),p:n,pos:H(u.P0,u.P1,u.P2,u.P3,t)};if(i){const e=Y(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}y.push(r)}let b=d,k=0;const A=t.length-1;for(let e=0;e<y.length;e++){const n=y[e],r=k<1?Z((n.u-k)/(1-k),0,1):1,{left:o,right:a}=T(b,r),s=0===e?A:t.length-1;o?t[s].e=o:delete t[s].e;const l=c+n.u*(f-c),u=cn(p,v,n.p,n.pos,n.rotateDeg,i);t.push(sn(l,u)),b=a,k=n.u}}function pn(t,e,n,r,o){const i=e-t,a=n-e,s=i-2*a+(r-n),l=2*(a-i),u=i;if(Math.abs(s)<1e-10){if(Math.abs(l)>1e-10){const t=-u/l;t>1e-6&&t<.999999&&o.push(t)}return}const c=l*l-4*s*u;if(c<0)return;const f=Math.sqrt(c),d=(-l-f)/(2*s),h=(-l+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),h>1e-6&&h<.999999&&o.push(h)}function vn(t,e,n,r,o,i,a,s){const l=(t+e)/2,u=H(r.P0,r.P1,r.P2,r.P3,t),c=H(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=H(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=H(r.P0,r.P1,r.P2,r.P3,l),m=H(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(gn(d,u,c),gn(h,u,c),gn(m,u,c));let v=!0;if(o){const n=Y(r.P0,r.P1,r.P2,r.P3,t),o=Y(r.P0,r.P1,r.P2,r.P3,e),i=180*Math.atan2(n[1],n[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let l=Math.abs(i-s);l>180&&(l=360-l),l>a&&(v=!1)}p<=i&&v||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,vn(t,l,n,r,o,i,a,s),vn(l,e,n,r,o,i,a,s))}function gn(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],i=r*r+o*o;if(i<1e-20){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}const a=(t[0]-e[0])*o-(t[1]-e[1])*r;return Math.abs(a)/Math.sqrt(i)}function yn(t,e){const n=bn(t,e);return null!=n?n:t}function bn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=bn(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,n=t.transform;if(n&&"object"==typeof n&&Qe(n)){const o=on(n,e);o!==n&&(r=w(A({},t),{transform:o}))}}if(!n&&!r)return null;const i=A({},t);return n&&(i.children=n),r&&(i.animate=r),i}var kn=1;function An(t,e){if(t===e)return!0;if(typeof t!=typeof e||null===t||null===e||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(e))return!1;const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(n=>An(t[n],e[n]))}function wn(t){const e=[];let n;const r=function(t){const e=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),n=[];let r=null;for(const t of e)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},n.push(r);else if(r){const e=+t;r.values.push(Number.isNaN(e)?0:e)}return n}(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;n={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},e.push(n);continue}if(n||(n={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},e.push(n)),"L"===r){const t=o[0]||0,e=o[1]||0;n.v.push([t,e]),n.i.push([t,e]),n.o.push([t,e])}else if("C"===r){const t=o[0]||0,e=o[1]||0,r=o[2]||0,i=o[3]||0,a=o[4]||0,s=o[5]||0;n.o[n.o.length-1]=[t,e],n.v.push([a,s]),n.i.push([r,i]),n.o.push([a,s])}else"Z"===r||"z"===r?n.c=!0:console.warn('Unsupported path command "'+r+'"')}return e}function xn(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Sn(t){return"string"==typeof t&&void 0!==xn(t)}function Pn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=xn(t.path);return e?{paths:wn(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&Sn(e[0])){const t=[];for(const n of e){const e=xn(n);e&&t.push(...wn(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Sn(t[0])){const e=[];for(const n of t){const t=xn(n);t&&e.push(...wn(t))}return{paths:e}}return{paths:t}}return Sn(t)?{paths:wn(xn(t))}:t}function jn(t,e){var n;if(t)return Array.isArray(t)?t:(null==(n=null==e?void 0:e.easings)?void 0:n[t])?e.easings[t]:void console.warn("Unknown easing name: "+t)}function On(t,e){var n;if("string"==typeof t){const r=null==(n=null==e?void 0:e.animations)?void 0:n[t];return r||console.warn("Unknown animation name: "+t),r}return t}function Mn(t,e,n,r){var o,i;return"d"===t?{paths:M(null!=(o=null==e?void 0:e.paths)?o:Array.isArray(e)?e:[],null!=(i=null==n?void 0:n.paths)?i:Array.isArray(n)?n:[],r)}:L.has(t)?O(e||[0,0,0,1],n||[0,0,0,1],r):"transform"!==t||"object"!=typeof e||null===e||Array.isArray(e)||"object"!=typeof n||null===n||Array.isArray(n)?"rotate"===t&&"number"==typeof e&&"number"==typeof n?P(e,n,r):D.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?j(e||[],n||[],r):P(+(e||0),+(n||0),r):function(t,e,n){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=e?e:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],a=null==e?void 0:e[i];if("rotate"===i||"skew"===i)o[i]=P(+(null!=r?r:0),+(null!=a?a:0),n);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=j(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function _n(t,e,n,r){var o,i,a,s,l;const u=e.length-1,c=Z(null!=(o=n.segmentCount)?o:u,1,u);let f;f=n.extend===Mt.before?e.slice(0,c+1):e.slice(u-c);const d=null!=(i=e[0].t)?i:0,h=null!=(a=e[e.length-1].t)?a:0;let m,p;n.extend===Mt.before?(m=0,p=d):(m=h,p=r);const v=p-m;if(v<=0)return e;const g=null!=(s=f[0].t)?s:0,y=(null!=(l=f[f.length-1].t)?l:0)-g;if(y<=0)return e;const b=f.map(t=>{var e,n;return{relT:(t.t-g)/y,v:t.v,e:t.e,tangentIn:null!=(e=t.tangentIn)?e:t.ti,tangentOut:null!=(n=t.tangentOut)?n:t.to}}),k=Math.floor(v/y),x=v-k*y,S=x/y,P=[],j=n.extend!==Mt.before,O=e[e.length-1];let M,_=!1;function E(e,n,r){var o;let i;if(n){i=[];for(let t=b.length-1;t>=0;t--)i.push({relT:1-b[t].relT,v:b[t].v,e:t>0?N(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else i=b;const a=void 0!==r?r:1;for(let n=0;n<i.length;n++){const r=i[n];if(r.relT>a+1e-9){const o=i[n-1],s=r.relT-o.relT,l=(a-o.relT)/s,u=o.e?I(o.e)(l):l,c=Mn(t,o.v,r.v,u),{left:f}=T(o.e,l);return P.length>0&&o.relT<=a&&(P[P.length-1].e=f),void P.push({t:e+a*y,v:c,e:void 0})}const s=P.length>0?P[P.length-1]:O,l=j&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*y))<1e-9;if(l){if(An(s.v,r.v)){P.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(M=r.e,_=!0);continue}P.length>0&&(delete s.tangentIn,delete s.tangentOut)}const u={t:e+r.relT*y+(l?kn:0),v:r.v,e:n<i.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),P.push(u)}}if(n.extend===Mt.before){S>1e-9&&function(e,n,r){let o;if(n){o=[];for(let t=b.length-1;t>=0;t--)o.push({relT:1-b[t].relT,v:b[t].v,e:t>0?N(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else o=b;const i=1-r;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT<i-1e-9)continue;const a=o[n-1];if(a&&a.relT<i-1e-9&&r.relT>i+1e-9){const n=r.relT-a.relT,o=(i-a.relT)/n,s=a.e?I(a.e)(o):o,l=Mn(t,a.v,r.v,s),{right:u}=T(a.e,o);P.push({t:e,v:l,e:u})}const s={t:e+(r.relT-i)*y,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),P.push(s)}}(m,!!n.alternate&&k%2==0,S);for(let t=0;t<k;t++){const e=k-1-t,r=!!n.alternate&&e%2==0;E(m+x+t*y,r)}}else{for(let t=0;t<k;t++){const e=!!n.alternate&&t%2==0;E(m+t*y,e)}if(S>1e-9){const t=!!n.alternate&&k%2==0;E(m+k*y,t,S)}}return n.extend===Mt.before?[...P,...e]:_&&e.length>0?[...e.slice(0,-1),w(A({},e[e.length-1]),{e:M}),...P]:[...e,...P]}function En(t,e,n,r){var o,i,a,s,l,u,c;const f=e.keyframes||e.kfs||[],d=[];for(const e of f){const n=null!=(i=null!=(o=e.time)?o:e.t)?i:0;let f=null!=(a=e.value)?a:e.v;const h=null!=(s=e.easing)?s:e.e;"d"===t&&(f=Pn(f));const m=G(t)?K(t):t;L.has(m)&&(f=null!=(l=F(f))?l:f);const p={t:n,v:f,e:jn(h,r)},v=null!=(u=e.tangentIn)?u:e.ti,g=null!=(c=e.tangentOut)?c:e.to;v&&(p.tangentIn=v),g&&(p.tangentOut=g),d.push(p)}d.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const h=e.loop,m=!0===h?{}:h||void 0;return m&&d.length>=2?_n(t,d,m,n):d}function In(t,e,n){var r;const o=e.loop;if(null==o||!1===o)return e;const i=!0===o?{}:o,a=null!=(r=e.keyframes)?r:e.kfs;if(!Array.isArray(a)||a.length<2)return e;const s=G(t)?K(t):t,l=L.has(s),u=a.map(e=>{var n,r,o,i,a,s,u,c;const f=null!=(n=e.t)?n:e.time;let d=null!=(r=e.v)?r:e.value;"d"===t&&(d=Pn(d)),l&&(d=null!=(o=F(d))?o:d);const h={t:f,v:d,e:null!=(i=e.e)?i:e.easing};return(null!=(a=e.tangentIn)?a:e.ti)&&(h.tangentIn=null!=(s=e.tangentIn)?s:e.ti),(null!=(u=e.tangentOut)?u:e.to)&&(h.tangentOut=null!=(c=e.tangentOut)?c:e.to),h}),c={kfs:_n(t,u,i,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function zn(t,e){const n=Tn(t,e);return null!=n?n:t}function Tn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Tn(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const n of Object.keys(t)){const o=t[n],i=In(n,o,e);i!==o&&(r||(r=A({},t)),r[n]=i)}}if(!n&&!r)return null;const i=A({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Nn=0;function Cn(t,e=Ot.waapi){const n=Bt(t)||{},r=Ut(t),o=n.duration||1e3,i=[],a=(t,n)=>{if(!n)return null;const i=function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=On(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=On(r,e);t&&n.push(t)}else n.push(t);return n}(n,r);if(0===i.length)return null;const a=function(t,e,n,r=Ot.waapi){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=En(i,a,e,n);if(s.length>0){const t={kfs:s};void 0!==a.autoOrient&&(t.autoOrient=a.autoOrient),void 0!==a.loop&&(t.loop=a.loop),o[i]=r===Ot.waapi&&"transform"===i?on(t):t}}return o}(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(i),o,r,e);return 0===Object.keys(a).length?null:{id:t,animate:a}},s=Vt(t);if(s)for(const t of s){const e=a(t.id,t.animate);e&&i.push(e)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++Nn;t.id=n;const r=a(n,e);r&&i.push(r)}if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e])};if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e]);return i}function Fn(t,e,n){var r,o,i,a,s,l,u;const c=e.kfs||e.keyframes||[];if(0===c.length)return null;const{prevKf:f,nextKf:d}=function(t,e){var n,r;const o=t.length-1;let i=t[0],a=t[o>0?1:0];for(let s=0;s<o;s++){const l=null!=(n=t[s].t)?n:0,u=null!=(r=t[s+1].t)?r:0;if(l<=e&&e<=u){i=t[s],a=t[s+1];break}e>u&&s===o-1&&(i=t[o>0?o-1:0],a=t[o])}return{prevKf:i,nextKf:a}}(c,n);let h=f===d?0:(m=n,p=null!=(r=f.t)?r:0,(v=null!=(o=d.t)?o:0)===p?0:0+(m-p)/(v-p)*1);var m,p,v;h=Z(h,0,1);const g=null!=(i=f.e)?i:f.easing;if(g&&Array.isArray(g))try{h=I(g)(h)}catch(t){}let y=G(t)?K(t):t,b=null;const k=null!=(a=null==f?void 0:f.v)?a:null==f?void 0:f.value,A=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===y)b=M(null!=(l=null==k?void 0:k.paths)?l:Array.isArray(k)?k:[],null!=(u=null==A?void 0:A.paths)?u:Array.isArray(A)?A:[],h).map(t=>S(t)).join("");else if(L.has(y))b=C(O(k||[0,0,0,1],A||[0,0,0,1],h)),y=t;else if("stroke-dasharray"===y)b=j(k||[],A||[],h).join(" "),y=t;else if("transform"!==y||null===k||"object"!=typeof k||Array.isArray(k))"translate"===y?(b="translate("+j(k||[0,0],A||[0,0],h).join(",")+")",y="transform"):"rotate"===y?(b="rotate("+P(+(k||0),+(A||0),h)+")",y="transform"):"scale"===y?(b="scale("+j(k||[1,1],A||[1,1],h).join(",")+")",y="transform"):b=P(+(k||0),+(A||0),h);else{const t=new Set([...k?Object.keys(k):[],...A?Object.keys(A):[]]),n={};for(const e of t){const t=null==k?void 0:k[e],r=null==A?void 0:A[e];if("rotate"===e||"skew"===e)n[e]=P(+(null!=t?t:0),+(null!=r?r:0),h);else if("translate"===e||"scale"===e||"origin"===e){const o="scale"===e?[1,1]:[0,0],i=j(t||o,r||o,h);n[e]=i}}if(Qe(e)){const t=k.translate,r=A.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=tn(f,d,[+t[0],+t[1]],[+r[0],+r[1]],h,!!e.autoOrient);n.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(n.rotate=o.rotateDeg)}}b=B(n,{withUnits:!1}),y="transform"}return R.has(y)&&"number"==typeof b&&(b=100*b+"%"),{k:y,v:null===b?"":""+b}}function Ln(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=Fn(r,o,e);t&&(n[t.k]=t.v)}return n}function Dn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Dn);const e={};for(const n of Object.keys(t))e[n]=Dn(t[n]);return e}function Rn(t,e){const n=new Map,r=t=>{var o;if("string"==typeof t.id){const r=e();n.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t}),i=t=>{var e;if("string"==typeof t.href&&t.href.startsWith("#")){const e=n.get(t.href.slice(1));e&&(t.href="#"+e)}for(const e of Object.keys(t)){if("children"===e||"effects"===e||"meta"===e||"animate"===e||"href"===e||"id"===e)continue;const n=t[e];"string"==typeof n&&-1!==n.indexOf("url(#")&&(t[e]=o(n))}null==(e=t.children)||e.forEach(i)};return i(t),n}function Bn(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Un(t){var e;const n=Bn(t.x),r=Bn(t.y);if(delete t.x,delete t.y,!n&&!r)return t;const o="translate("+n+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const n={type:"g",transform:o,children:null!=(e=t.children)?e:[]};t.children=[n]}else t.transform=o;return t}function Vn(t){var e;const n=function(t){const e=new Map,n=t=>{var r;"string"==typeof t.id&&e.set(t.id,t),null==(r=t.children)||r.forEach(n)};return n(t),e}(t),r=function(t,e){const n=new WeakMap,r=new Set,o=(t,r)=>{const i=n.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let a=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const e in t.animate){a=!0;break}if(!a&&t.children)for(const e of t.children)if(o(e,r)){a=!0;break}if(!a&&"use"===t.type&&"string"==typeof t.href){const n=Gn(t.href),i=n?e.get(n):void 0;i&&(a=o(i,r))}return r.delete(t),n.set(t,a),a};for(const[t,n]of e)o(n,new Set)&&r.add(t);return r}(0,n);if(0===r.size)return t;let o=0;const i=function(t){const e=qn(t.viewBox);if(e)return[e[2],e[3]];const n=Wn(t.width),r=Wn(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=Kn(t,n,r,()=>"_lw_use_mat_"+ ++o,a,i);if(0===a.length)return s;const l={type:"defs",children:a},u=[...null!=(e=s.children)?e:[],l];return w(A({},s),{children:u})}function Wn(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Gn(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function qn(t){if("string"!=typeof t)return;const e=t.trim().split(/[\s,]+/).map(Number);return e.length<4||e.some(t=>!Number.isFinite(t))?void 0:[e[0],e[1],e[2],e[3]]}function Kn(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=Gn(t.href);if(a&&n.has(a)){const s=e.get(a);if(s)return function(t,e,n,r,o,i,a){var s,l,u,c;const f=Dn(e);Rn(f,o);const d="symbol"===f.type?qn(f.viewBox):void 0,h=null!=(l=null!=(s=Wn(t.width))?s:null==d?void 0:d[2])?l:a[0],m=null!=(c=null!=(u=Wn(t.height))?u:null==d?void 0:d[3])?c:a[1],p="symbol"===f.type?function(t,e,n,r,o){const i=qn(t.viewBox),a=w(A({},t),{type:"g"});if(delete a.viewBox,delete a.preserveAspectRatio,delete a.width,delete a.height,!i)return a;const[s,l,u,c]=i,f=u>0&&c>0?Math.min(r/u,o/c):1,d=(r-u*f)/2,h=(o-c*f)/2,m=[];0===d&&0===h||m.push("translate("+d+","+h+")"),1!==f&&m.push("scale("+f+")"),0===s&&0===l||m.push("translate("+-s+","+-l+")"),m.length&&(a.transform=m.join(""));const p=e();return n.push({type:"clipPath",id:p,children:[{type:"rect",x:s,y:l,width:u,height:c}]}),a.clipPath="url(#"+p+")",a}(f,o,i,h,m):f,v=Kn(p,n,r,o,i,a),g=w(A({},t),{type:"g",children:[v]});return delete g.href,delete g.width,delete g.height,Un(g)}(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=Kn(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?w(A({},t),{children:s}):t}function Zn(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:"skew"===t?r.skew=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function Hn(t){var e,n,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!=(e=o.keyframes)?e:o.kfs;if(i){const t={kind:"animated",keyframes:i.map(Yn),autoOrient:o.autoOrient,loop:o.loop},e=null!=(n=o.value)?n:o.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const a=null!=(r=o.value)?r:o.v;if(void 0!==a)return{kind:"static",value:a}}return{kind:"static",value:t}}function Xn(t,e,n,r){var o,i,a,s;const l=t=>(null==r?void 0:r.asString)&&null!=t?String(t):t;if("absent"===n.kind)return;if("static"===n.kind)return void(t[e]=l(n.value));const u=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,c=A({},u||{}),f={keyframes:n.keyframes};void 0!==n.loop&&(f.loop=n.loop),void 0!==n.autoOrient&&(f.autoOrient=n.autoOrient),c[e]=f,t.animate=c;const d=null!=(s=null!=(i=n.base)?i:null==(o=n.keyframes[0])?void 0:o.value)?s:null==(a=n.keyframes[0])?void 0:a.v;void 0!==d&&(t[e]=l(d))}function Yn(t){if(!t||"object"!=typeof t)return t;const e=t;if(void 0===e.t&&void 0===e.v&&void 0===e.e&&void 0===e.to&&void 0===e.ti)return t;const n=A({},e);return void 0===n.time&&void 0!==e.t&&(n.time=e.t),void 0===n.value&&void 0!==e.v&&(n.value=e.v),void 0===n.easing&&void 0!==e.e&&(n.easing=e.e),void 0===n.tangentOut&&void 0!==e.to&&(n.tangentOut=e.to),void 0===n.tangentIn&&void 0!==e.ti&&(n.tangentIn=e.ti),n}function Qn(t,e){const n={value:e};return void 0!==t.time&&(n.time=t.time),void 0!==t.easing&&(n.easing=t.easing),void 0!==t.tangentOut&&(n.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(n.tangentIn=t.tangentIn),n}function Jn(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=tr(r,e.origin,!0),r=$n(r,"scale",e.scale),r=$n(r,"skew",e.skew),r=$n(r,"rotate",e.rotate),r=tr(r,e.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}(e.translate)?(r=tr(r,e.origin,!0),r=$n(r,"translate",e.translate),r=tr(r,e.origin,!1)):r=$n(r,"translate",e.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function $n(t,e,n,r){if(void 0===n)return t;const o=Hn(n);if("static"===o.kind)return{type:"g",transform:{value:Zn(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>Qn(t,Zn(e,t.value,void 0)))};return o.autoOrient&&(n.autoOrient=!0),void 0!==o.loop&&(n.loop=o.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function tr(t,e,n){if(void 0===e)return t;const r=Hn(e),o=t=>n?[-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 e={keyframes:r.keyframes.map(t=>Qn(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function er(t,e){return"_lw_"+e+"_"+t.nextId++}function nr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function rr(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>rr(t,e))}var or=Dn;function ir(t,e,n){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=nr(t.effects.clone.sourceId);"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(i=t.children)||i.forEach(t=>ir(t,e,n))}function ar(t){const e=/translate\(([^)]*)\)/.exec(t);if(!e)return[0,0];const n=e[1].split(/[\s,]+/).filter(Boolean).map(Number);return[n[0]||0,n[1]||0]}function sr(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||!!Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}function lr(t,e,n,r){if(!e)return t;const o=er(n,"grad"),i=function(t,e){const n={type:t.type===Dt.radial?"radialGradient":"linearGradient",id:e};return t.type===Dt.linear?(ur(n,"x1","y1",t.p1),ur(n,"x2","y2",t.p2)):(ur(n,"cx","cy",t.c),function(t,e,n){const r=Hn(n);"absent"!==r.kind&&Xn(t,"r",r,{asString:!0})}(n,0,t.r),ur(n,"fx","fy",t.fp)),t.gradientUnits&&(n.gradientUnits=t.gradientUnits),t.spreadMethod&&(n.spreadMethod=t.spreadMethod),t.gradientTransform&&(n.gradientTransform=t.gradientTransform),n.children=function(t){var e,n,r,o;if(!t)return[];const i=Hn(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(cr):[];const a=i.keyframes;if(!a.length)return[];const s=i.loop;let l=0;for(const t of a){const n=null!=(e=t.value)?e:t.v;Array.isArray(n)&&n.length>l&&(l=n.length)}if(!l)return[];const u=null!=(n=a[0].value)?n:a[0].v,c=[];for(let t=0;t<l;t++){const e=null!=(o=null!=(r=null==u?void 0:u[t])?r:fr(a,0,t))?o:{offset:t/Math.max(1,l-1),color:"#000000"};c.push({offset:e.offset,color:e.color})}return c.map((t,e)=>function(t,e,n,r,o){var i,a,s,l,u;const c=[],f=[];let d=!1;for(const r of e){const o=null!=(a=null!=(i=r.time)?i:r.t)?a:0,h=null!=(s=r.value)?s:r.v,m=null!=(l=null==h?void 0:h[n])?l:fr(e,e.indexOf(r),n);if(!m)continue;const p=null!=(u=r.easing)?u:r.e,v={time:o,value:m.color};void 0!==p&&(v.easing=p),c.push(v);const g={time:o,value:m.offset};void 0!==p&&(g.easing=p),f.push(g),m.offset!==t.offset&&(d=!0)}const h={type:"stop",offset:dr(t.offset),stopColor:t.color},m={};return c.length&&(m.stopColor={keyframes:c},void 0!==o&&(m.stopColor.loop=o)),d&&f.length&&(m.offset={keyframes:f},void 0!==o&&(m.offset.loop=o)),Object.keys(m).length&&(h.animate=m),h}(t,a,e,0,s))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function ur(t,e,n,r){var o,i,a;const s=Hn(r);if("absent"===s.kind)return;if("static"===s.kind)return t[e]=String(s.value[0]),void(t[n]=String(s.value[1]));const l=t=>{const e={keyframes:s.keyframes.map(e=>{const n={time:e.time,value:Array.isArray(e.value)?e.value[t]:void 0};return void 0!==e.easing&&(n.easing=e.easing),n})};return void 0!==s.loop&&(e.loop=s.loop),e},u=null!=(o=t.animate)?o:{};u[e]=l(0),u[n]=l(1),t.animate=u;const c=null!=(a=s.base)?a:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(c)&&(t[e]=String(c[0]),t[n]=String(c[1]))}function cr(t){return{type:"stop",offset:dr(t.offset),stopColor:t.color}}function fr(t,e,n){var r,o;for(let o=e;o>=0;o--){const e=null!=(r=t[o].value)?r:t[o].v;if(null==e?void 0:e[n])return e[n]}for(let r=e+1;r<t.length;r++){const e=null!=(o=t[r].value)?o:t[r].v;if(null==e?void 0:e[n])return e[n]}}function dr(t){return Math.round(1e3*t)/10+"%"}function hr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function mr(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=Hn(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(e.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(n=r.keyframes[0])?void 0:n.value)}(e.origin,n);let o=t;return o=pr(o,"translate",e.translate,void 0),o=pr(o,"rotate",e.rotate,r),o=pr(o,"scale",e.scale,r),o}function pr(t,e,n,r,o){if(void 0===n)return t;const i=Hn("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:Zn(e,vr(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=Qn(t,Zn(e,vr(e,t.value),r));return"translate"===e?A(A({},n),gr(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function vr(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function gr(t){var e,n;const r={},o=null!=(e=t.tangentOut)?e:t.to,i=null!=(n=t.tangentIn)?n:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function yr(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function br(t){let e=0,n=0;for(const r of t)r.translate&&(e+=r.translate[0],n+=r.translate[1]);return[e,n]}function kr(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Ar(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function Ar(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],i=(e-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 wr(t,e){var n,r,o;const i=t.transform,a=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!a)return;const s={};if("string"==typeof i){const t=function(t,e){const n=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,a=!1,s=!1;for(;null!==(r=n.exec(t));){const t=r[1],e=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=e[0]||0,i+=e[1]||0,a=!0):s=!0}return s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),a?[o,i]:void 0}(i,e);t&&(s.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes&&!i.kfs){const t=i.value,n=t&&"object"==typeof t?t:i;n&&"object"==typeof n&&Array.isArray(n.translate)&&(s.translate=[n.translate[0]||0,n.translate[1]||0]),!n||void 0===n.rotate&&void 0===n.scale&&void 0===n.skew||e.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(a&&Array.isArray(a.keyframes)){const t=a.keyframes,i=[];for(const a of t){const t=null!=(n=a.value)?n:a.v,s=null!=(o=null!=(r=a.time)?r:a.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||e.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(s.translateKeyframes=i)}return s.translate||s.translateKeyframes?s:void 0}var xr="content";function Sr(t,e,n){if(!e)return;const r=nr(e.sourceId);if(!r)return void(e.type===xr&&n.errors.push("clone: content ref missing sourceId"));const o=e.type===xr&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function Pr(t,e){const n={};return void 0!==t.translate&&(n.translate=jr(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=jr(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=jr(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){return jr(t,t=>[Math.pow(t[0],e),Math.pow(t[1],e)],!0)}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}function jr(t,e,n=!1){const r=Hn(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=e(r.value);return"number"!=typeof t&&!Array.isArray(t)||n?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?w(A({},t),{value:e(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=e(r.base)),o}var Or=!1;function Mr(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var _r=1;function Er(t,e,n){const[r,o]=e;if(!Number.isFinite(r)||!Number.isFinite(o))return void n.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-_r),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+_r,value:0}],a=A({},t);for(const e of Object.keys(t))delete t[e];t.type="g",t.children=[a],t.animate={opacity:{keyframes:i}}}function Ir(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function zr(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function Tr(t){var e;const n=null==(e=t.effects)?void 0:e.clone;n&&(delete n.retime,0===Object.keys(n).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function Nr(t,e,n){const r=nr(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=Cr(r,e,n,new Set);if(o)if(Or){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Un(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function Cr(t,e,n,r){if(r.has(t))return void n.errors.push('retime: loop via "'+t+'"');const o=n.idMap.get(t);if(!o)return void n.warnings.push('retime: target "'+t+'" not found');const i=or(o);if(function(t,e){Rn(t,()=>er(e,"retimed"))}(i,n),"use"===o.type?Lr(i,e.start,e.stretch):Fr(i,e.start,e.stretch),Tr(i),"use"===o.type&&o.href){const a=nr(o.href);if(a){const s=zr(o),l=s?Ir(Mr(s),e):e,u=new Set(r);u.add(t);const c=Cr(a,l,n,u);c&&(i.href="#"+c)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=zr(t);if("use"===t.type&&s&&t.href){const i=nr(t.href);if(i){const a=Ir(Mr(s),e),l=new Set(r);l.add(o);const u=Cr(i,a,n,l);u&&(t.href="#"+u)}Tr(t)}null==(a=t.children)||a.forEach(i)};i(t)}(i,e,n,r,t);return n.defs.push(i),"string"==typeof i.id&&n.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Fr(t,e,n){var r;Lr(t,e,n),null==(r=t.children)||r.forEach(t=>Fr(t,e,n))}function Lr(t,e,n){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=e+r.time*n)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const e of Object.keys(t.animate)){const n=t.animate[e];n&&Array.isArray(n.keyframes)&&r(n.keyframes)}}var Dr=48,Rr=/[MmLlHhVvCcSsQqTtAaZz]/;function Br(t,e,n){return{P1:[t[0]+2/3*(e[0]-t[0]),t[1]+2/3*(e[1]-t[1])],P2:[n[0]+2/3*(e[0]-n[0]),n[1]+2/3*(e[1]-n[1])]}}function Ur(t){const e=function(t){const e=function(t){const e=[],n=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=n.exec(t));)e.push(r[0]);return e}(t),n=[];let r=0,o=0,i=0,a=0,s=0,l=0,u=0,c=0,f=0,d="";const h=()=>parseFloat(e[r++]),m=(t,e,r)=>{const a=[o,i],s=J(a,t,e,r,Dr);n.push({P0:a,P1:t,P2:e,P3:r,lut:s,len:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},p=(t,e)=>{m([o+(t-o)/3,i+(e-i)/3],[o+2*(t-o)/3,i+2*(e-i)/3],[t,e])};for(;r<e.length;){let t=e[r];Rr.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",v=t.toUpperCase();if("Z"!==v){if("M"===v){const e=h()+(n?o:0),r=h()+(n?i:0);o=e,i=r,a=e,s=r,d=t;continue}if("L"===v)p(h()+(n?o:0),h()+(n?i:0));else if("H"===v)p(h()+(n?o:0),i);else if("V"===v)p(o,h()+(n?i:0));else if("C"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],m(t,e,r)}else if("S"===v){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*i-u]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],m(t,e,r)}else if("Q"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Br([o,i],t,e);m(r,a,e)}else if("T"===v){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-c,2*i-f]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Br([o,i],t,e);m(r,a,e)}else{if("A"!==v){r++;continue}r+=5,p(h()+(n?o:0),h()+(n?i:0))}d=t}else p(a,s),o=a,i=s,d=t}return n.length?n:null}(t);if(!e)return null;const n=new Float64Array(e.length+1);for(let t=0;t<e.length;t++)n[t+1]=n[t]+e[t].len;const r=n[e.length],o=e[0].P0,i=e[e.length-1].P3,a=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,s=t=>{let r=0;for(;r<e.length-1&&t>n[r+1];)r++;const o=e[r],i=t-n[r],a=o.len>0?function(t,e){const{ts:n,ds:r}=t,o=r.length-1;if(e<=0)return n[0];if(e>=r[o])return n[o];let i=1,a=o;for(;i<a;){const t=i+a>>>1;r[t]<e?i=t+1:a=t}const s=r[a-1],l=r[a]-s,u=l>0?(e-s)/l:0;return n[a-1]+u*(n[a]-n[a-1])}(o.lut,i):0,[s,l]=H(o.P0,o.P1,o.P2,o.P3,a),[u,c]=Y(o.P0,o.P1,o.P2,o.P3,a);return{x:s,y:l,angle:Math.atan2(c,u)}};return{totalLength:r,closed:a,sampleAtDistance(t){if(a&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!a&&(t<0||t>r)){const e=t<0?0:r,n=s(e),o=t-e;return{x:n.x+Math.cos(n.angle)*o,y:n.y+Math.sin(n.angle)*o,angle:n.angle}}return s((n=r,(e=t)<0?0:e>n?n:e));var e,n}}}var Vr=.15;function Wr(t){const e=Hn(t);if("static"===e.kind&&"number"==typeof e.value)return{min:e.value,max:e.value};if("animated"===e.kind&&e.keyframes.length){const t=e.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function Gr(t){let e=0,n=16;const r=t=>{var o,i;const a=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;a&&(n=Math.max(n,a));const s=null!=(i=t.text)?i:t.textContent;if("string"==typeof s&&(e+=s.length),t.children)for(const e of t.children)r(e)};return r(t),e*n}var qr=t=>Math.round(1e3*t)/1e3;function Kr(t,e){if(!e||null==t)return t;const n=Hn(t);if("absent"===n.kind)return t;if("static"===n.kind)return"number"==typeof t?n.value+e:{value:n.value+e};const r={keyframes:n.keyframes.map(t=>w(A({},t),{value:(Number(t.value)||0)+e}))};return void 0!==n.loop&&(r.loop=n.loop),void 0!==n.autoOrient&&(r.autoOrient=n.autoOrient),void 0!==n.base&&(r.value=n.base+e),r}function Zr(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Ur(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Vr*o,a=Wr(e.startOffset),s=Wr(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-a.min),u=Math.max(0,a.max+s-o),c=l>0?l+i:0,f=u>0?u+i:0;if(f<=0&&c<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let m=t;if(c>0){const e=d.x-Math.cos(d.angle)*c,n=d.y-Math.sin(d.angle)*c,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");m="M"+qr(e)+","+qr(n)+"L"+qr(d.x)+","+qr(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;m+="L"+qr(t)+","+qr(e)}return{d:m,startShift:c}}function Hr(t,e,n){null!=n&&Xn(t,e,Hn(n),{asString:!0})}var Xr=(t,e,n)=>{const r={type:t};for(const t in e)void 0!==e[t]&&(r[t]=e[t]);const o=Array.isArray(n)?n.filter(t=>null!=t):null!=n?[n]:[];return o.length&&(r.children=o),r};function Yr(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Qr(t,e){let n="";for(let r=0;r<t.length;r++){const o=Yr(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function Jr(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var $r=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function to(t,e,n=2){const r=[];let o;for($r.lastIndex=0;null!==(o=$r.exec(t));)r.push(o[0]);let i="",a=0;const s=()=>parseFloat(r[a++]);for(;a<r.length;){const t=r[a++];if("M"===t||"L"===t){const[r,o]=Jr(e,s(),s());i+=t+Qr([r,o],n)}else if("C"===t){const[t,r]=Jr(e,s(),s()),[o,a]=Jr(e,s(),s()),[l,u]=Jr(e,s(),s());i+="C"+Qr([t,r,o,a,l,u],n)}else if("Q"===t){const[t,r]=Jr(e,s(),s()),[o,a]=Jr(e,s(),s());i+="Q"+Qr([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var eo=16,no=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",zt,Tt,"xml:space"],ro=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],oo=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function io(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function ao(t){return"string"==typeof t?t:void 0}function so(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of oo)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function lo(t,e){var n,r,o,i,a,s,l,u,c,f;const d="text"===t.type,h=t.style,m=e=>{var n;return d?void 0:null!=(n=t[e])?n:null==h?void 0:h[e]},p={fontFamily:null!=(n=ao(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=io(t.fontSize))?r:e.fontSize,fill:null!=(o=t.fill)?o:e.fill,stroke:null!=(i=t.stroke)?i:e.stroke,strokeWidth:null!=(a=t.strokeWidth)?a:e.strokeWidth,letterSpacing:null!=(s=io(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=io(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(u=io(m("opacity")))?u:e.opacity,animate:null!=(c=d?void 0:so(t))?c:e.animate};for(const t of ro){const n=null!=(f=m(t))?f:e[t];void 0!==n&&(p[t]=n)}return p}function uo(t){var e,n,r;return{fontFamily:ao(t.fontFamily),fontSize:null!=(e=io(t.fontSize))?e:eo,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=io(t.letterSpacing))?n:0,wordSpacing:null!=(r=io(t.wordSpacing))?r:0}}function co(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(e.opacity=t.opacity);for(const n of ro)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function fo(t,e,n,r){var o;const i=t.fontFamily?e[t.fontFamily]:n;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function ho(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var mo=.6,po="px-missing-glyph";function vo(t,e){if(t<=0||e<=0)return"";const n=.08*t,r=.92*t,o=.92*-e,i=r-n,a=-o,s=Math.max(1,.12*Math.min(i,a)),l="M"+n+" 0L"+r+" 0L"+r+" "+o+"L"+n+" "+o+"Z";if(i<=2*s||a<=2*s)return l;const u=n+s,c=r-s,f=-s,d=o+s;return l+"M"+u+" "+f+"L"+u+" "+d+"L"+c+" "+d+"L"+c+" "+f+"Z"}function go(t,e){var n,r,o,i;const{glyphs:a,create:s=Xr,warnings:l}=e,u=ho(a),c={x:null!=(n=io(t.x))?n:0,y:null!=(r=io(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const m=(t,e)=>{var n;const r=fo(e,a,u,l),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,s=null!=(n=null==r?void 0:r.ascent)?n:.9*o,m=co(e);for(let n=0;n<t.length;n++){const a=t.charAt(n),l=null==r?void 0:r.glyphs[a];if(l&&l.d)f.push({glyphD:l.d,m:[i,0,0,i,c.x,c.y],paint:m,line:h,x:c.x,y:c.y,scale:i}),c.x+=l.width*i;else if(/\S/.test(a)){const t=l&&l.width>0?l.width:mo*o;f.push({glyphD:vo(t,s),m:[i,0,0,i,c.x,c.y],paint:m,isMissing:!0,line:h,x:c.x,y:c.y,scale:i}),c.x+=t*i}else c.x+=(l?l.width:0)*i;c.x+=e.letterSpacing+(" "===a?e.wordSpacing:0),d[h].end=c.x}},p=(t,e)=>{var n,r,o,i;const a=lo(t,e),s=io(t.x),l=io(t.y);void 0!==s&&(c.x=s,h=d.length,d.push({start:c.x,end:c.x})),void 0!==l&&(c.y=l),c.x+=null!=(n=io(t.dx))?n:0,c.y+=null!=(r=io(t.dy))?r:0;const u=null!=(o=ao(t[Tt]))?o:ao(t[zt]);if(u&&!(null==(i=t.children)?void 0:i.length)&&m(u,a),t.children)for(const e of t.children)p(e,a)},v=uo(t);if(t.children)for(const e of t.children)p(e,v);const g=null!=(o=ao(t[Tt]))?o:ao(t[zt]);g&&!(null==(i=t.children)?void 0:i.length)&&m(g,v);const y=ao(t.textAnchor);if("middle"===y||"end"===y)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===y?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return _o(t,Mo(f,s,l),s)}function yo(t,e){var n,r,o,i,a,s;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r,o;const{glyphs:i,warnings:a,alongPath:s}=n,l=Ur(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const u=ho(i),c=[];let f=0;const d=(t,e)=>{var n,r,o;const s=lo(t,e),l=null!=(n=ao(t[Tt]))?n:ao(t[zt]);if(l&&!(null==(r=t.children)?void 0:r.length)){const t=fo(s,i,u,a),e=(null==t?void 0:t.unitsPerEm)||1e3,n=s.fontSize/e,r=(null!=(o=null==t?void 0:t.ascent)?o:.9*e)*n;for(let e=0;e<l.length;e++){const o=l.charAt(e),i=null==t?void 0:t.glyphs[o],a=(i?i.width:0)*n,u=a+s.letterSpacing+(" "===o?s.wordSpacing:0);c.push({advStart:f,advEnd:f+u,glyphW:a,ascent:r,fontSize:s.fontSize}),f+=u}}if(t.children)for(const e of t.children)d(e,s)};d(t,uo(t));const h=f,m=Hn(null==s?void 0:s.textLength),p="animated"===m.kind?Number(null==(r=m.keyframes[0])?void 0:r.value)||0:"static"===m.kind&&Number(m.value)||0,v=p>0&&h>0?p/h:1,g=Hn(null==s?void 0:s.startOffset),{along:y,perp:b}=ko(t),k=y+("animated"===g.kind?Number(null==(o=g.keyframes[0])?void 0:o.value)||0:"static"===g.kind&&Number(g.value)||0),A=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return c.map(t=>{const e=k+t.advStart*v,n=k+t.advEnd*v,r=A(l.sampleAtDistance(e)),o=A(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*v);return{x:r.x,y:r.y,width:t.advEnd-t.advStart,ascent:t.ascent,fontSize:t.fontSize,endX:o.x,endY:o.y,rotation:180*i.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:l,warnings:u}=e,c=ho(l),f={x:null!=(r=io(t.x))?r:0,y:null!=(o=io(t.y))?o:0},d=[],h=[{start:f.x,end:f.x}];let m=0;const p=(t,e)=>{var n;const r=fo(e,l,c,u),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,a=(null!=(n=null==r?void 0:r.ascent)?n:.9*o)*i;for(let n=0;n<t.length;n++){const o=t.charAt(n),s=null==r?void 0:r.glyphs[o],l=(s?s.width:0)*i+e.letterSpacing+(" "===o?e.wordSpacing:0);d.push({x:f.x,y:f.y,width:l,ascent:a,fontSize:e.fontSize,line:m}),f.x+=l,h[m].end=f.x}},v=(t,e)=>{var n,r,o,i;const a=lo(t,e),s=io(t.x),l=io(t.y);void 0!==s&&(f.x=s,m=h.length,h.push({start:f.x,end:f.x})),void 0!==l&&(f.y=l),f.x+=null!=(n=io(t.dx))?n:0,f.y+=null!=(r=io(t.dy))?r:0;const u=null!=(o=ao(t[Tt]))?o:ao(t[zt]);if(u&&!(null==(i=t.children)?void 0:i.length)&&p(u,a),t.children)for(const e of t.children)v(e,a)},g=uo(t);if(t.children)for(const e of t.children){const t=d.length;if(v(e,g),d.length===t){const t=lo(e,g),n=fo(t,l,c),r=(null==n?void 0:n.unitsPerEm)||1e3;d.push({x:f.x,y:f.y,width:0,ascent:(null!=(i=null==n?void 0:n.ascent)?i:.9*r)*(t.fontSize/r),fontSize:t.fontSize,line:m})}}const y=null!=(a=ao(t[Tt]))?a:ao(t[zt]);y&&!(null==(s=t.children)?void 0:s.length)&&p(y,g);const b=ao(t.textAnchor);if("middle"===b||"end"===b)for(const t of d){const e=h[t.line].end-h[t.line].start;t.x+="middle"===b?-e/2:-e}return d.map(t=>{var e=t,{line:n}=e;return x(e,["line"])})}function bo(t,e,n,r,o=0){const{x:i,y:a,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),u=Math.sin(s),c=r/2;return[n*l,n*u,-n*u,n*l,i-n*l*c-o*u,a-n*u*c+o*l]}function ko(t){var e,n,r;return{along:(null!=(e=io(t.x))?e:0)+(null!=(n=io(t.dx))?n:0),perp:null!=(r=io(t.dy))?r:0}}function Ao(t,e,n,r,o,i){const{glyphs:a,create:s=Xr,warnings:l}=r,u=e?Ur(e):null;if(!u)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const c=ho(a),{cells:f,width:d}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,u,c;const f=lo(t,s),d=null!=(l=ao(t[Tt]))?l:ao(t[zt]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=fo(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=co(f);for(let a=0;a<d.length;a++){const s=d.charAt(a),l=t.glyphs[s];if(l&&l.d){const t=l.width*e;o.push({glyphD:l.d,widthEm:l.width,scale:e,paint:r,midBase:i+t/2}),i+=t}else if(/\S/.test(s)){const a=l&&l.width>0?l.width:mo*t.unitsPerEm,s=a*e;o.push({glyphD:vo(a,n),widthEm:a,scale:e,paint:r,isMissing:!0,midBase:i+s/2}),i+=s}else i+=(l?l.width:0)*e;i+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const e of t.children)a(e,f)};return a(t,uo(t)),{cells:o,width:i}}(t,a,c,l);if(!f.length)return _o(t,[],s);const{along:h,perp:m}=ko(t),p=wo(n),v=wo(o),g=t=>t>0&&d>0?t/d:1,y="clip"===i&&!u.closed;if(p.animated||v.animated){const e=function(t,e){const n=[...t,...e].sort((t,e)=>t-e),r=[];for(const t of n)r.length&&t===r[r.length-1]||r.push(t);return r}(p.times,v.times),n=(t,e)=>h+p.at(e)+g(v.at(e))*t.midBase,r=p.animated?p.loop:v.loop;return _o(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/xo,.5),u=t=>t>=0&&t<=e.totalLength,c=[];for(const f of t){const t=[f.scale,0,0,f.scale,-f.scale*(f.widthEm/2),0],d=to(f.glyphD,t),h=(t,n)=>{const{x:r,y:o,angle:i}=e.sampleAtDistance(t),a=Math.cos(i),l=Math.sin(i);return{time:n,value:{translate:[Po(r-s*l,3),Po(o+s*a,3)],rotate:Po(180*i/Math.PI,3)}}},m=[],p=[],v=(t,e)=>{m.push(h(t,e)),a&&p.push({time:e,value:u(t)?1:0})};v(n(f,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],i=n(f,e),a=n(f,o),s=Math.min(So,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);v(n(f,r),r)}}an(m);const g={keyframes:m};void 0!==o&&(g.loop=o);const y={transform:g};if(f.paint.animate&&Object.assign(y,f.paint.animate),a&&p.some(t=>0===t.value)){const t={keyframes:p};void 0!==o&&(t.loop=o),y.opacity=t}c.push(i("path",w(A(A({d:d},jo(f.paint)),Oo(f.isMissing)),{animate:y}),[]))}return c}(f,u,n,e,r,s,y,m),s)}const b=g(v.at(0)),k=h+p.at(0);return _o(t,Mo((y?f.filter(t=>{const e=k+t.midBase*b;return e>=0&&e<=u.totalLength}):f).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:bo(u,k+t.midBase*b,t.scale,t.widthEm,m)})),s,l),s)}function wo(t){var e;const n=Hn(t);if("animated"===n.kind&&n.keyframes.length>=2){const t=[...n.keyframes].sort((t,e)=>(Number(t.time)||0)-(Number(e.time)||0)),e=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,times:e,loop:n.loop,at(t){if(t<=e[0])return r[0];for(let n=1;n<e.length;n++)if(t<=e[n]){const o=e[n]-e[n-1],i=o>0?(t-e[n-1])/o:1;return r[n-1]+i*(r[n]-r[n-1])}return r[r.length-1]}}}const r="animated"===n.kind?Number(null==(e=n.keyframes[0])?void 0:e.value)||0:"static"===n.kind&&Number(n.value)||0;return{animated:!1,times:[],at:()=>r}}var xo=48,So=64;function Po(t,e){const n=b(10,e);return Math.round(t*n)/n}function jo(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(e.opacity=t.opacity);for(const n of ro)void 0!==t[n]&&(e[n]=t[n]);return e}function Oo(t){return t?{class:po}:{}}function Mo(t,e,n){if(!t.length)return null==n||n.push("textGlyphs: nothing to render"),[];const r=new Map;for(const e of t){const t=JSON.stringify([e.paint,!!e.isMissing]),n=to(e.glyphD,e.m),o=r.get(t);o?o.d+=n:r.set(t,{paint:e.paint,d:n,isMissing:e.isMissing})}const o=[];for(const{paint:t,d:n,isMissing:i}of r.values())o.push(e("path",A(A(A({d:n},jo(t)),Oo(i)),void 0!==t.animate?{animate:A({},t.animate)}:{}),[]));return o}function _o(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===no.indexOf(e)&&(r[e]=t[e]);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 n("g",r,e)}function Eo(t,e){return e.alongPath?Ao(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):go(t,e)}function Io(t,e){const n=w(A({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function zo(t,e,n,r,o,i,a,s){const l=No(r,n,o),u=Co(n,o),c=Lo(i,l),f=Lo(a,u),d=Bo(a),h={type:"path",d:S(e)};return Do(h,"strokeDasharray",f),Do(h,"strokeDashoffset",c),Do(h,"strokeOpacity",d),[h]}var To=1;function No(t,e,n){const[r]=Fo(n);return n=>e*(-n-r+t)+To}function Co(t,e){const[n,r]=Fo(e),o=r-n+1;return e=>{const n=Z(e[0],0,1),r=Z(e[1],0,1),i=Math.min(n,r),a=Math.max(n,r),s=[0];let l=To;for(let e=0;e<o;e++)s.push(l+i*t),s.push((a-i)*t),l=(1-a)*t;return s.push(l+To),s}}function Fo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Lo(t,e){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:e(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>{var n,r,o,i;return{time:null!=(r=null!=(n=t.time)?n:t.t)?r:0,value:e(null!=(o=t.value)?o:t.v),easing:null!=(i=t.easing)?i:t.e}}),loop:t.loop}}function Do(t,e,n){n&&Xn(t,e,n)}var Ro=10;function Bo(t){var e,n,r,o,i,a;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 l=t.keyframes;let u=!1,c=!0;for(const t of l)s(null!=(e=t.value)?e:t.v)?u=!0:c=!1;if(!u)return;if(c)return{kind:"static",value:0};const f=[];for(let t=0;t<l.length;t++){const e=l[t],u=t>0?l[t-1]:void 0,c=t<l.length-1?l[t+1]:void 0,d=null!=(r=null!=(n=e.time)?n:e.t)?r:0,h=s(null!=(o=e.value)?o:e.v),m=u?h&&s(null!=(i=u.value)?i:u.v):h,p=c?h&&s(null!=(a=c.value)?a:c.v):h;m&&!p?(f.push({time:d,value:0}),f.push({time:d+Ro,value:1})):!m&&p&&(f.push({time:d-Ro,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Uo(t,e){const n=n=>{const r=(n-t.time)/(e.time-t.time),o=t.value[0]+(e.value[0]-t.value[0])*r;return t.value[1]+(e.value[1]-t.value[1])*r-o};let r=t.time,o=e.time,i=n(r);if(0===i)return r;const a=n(o);if(0===a)return o;if(i*a>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,e=n(t);if(0===e||Math.abs(o-r)<1e-4)return t;i*e<0?o=t:(r=t,i=e)}return(r+o)/2}function Vo(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],i=(e-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 Wo(t){const e=t.v;if(!e||e.length<2)return 0;let n=0;for(let r=0;r<e.length-1;r++)n+=Go(t,r,r+1);return t.c&&e.length>1&&(n+=Go(t,e.length-1,0)),n}function Go(t,e,n){var r,o,i,a;const s=t.v,l=s[e],u=s[n],c=J(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(a=null==(i=t.i)?void 0:i[n])?a:u,u);return c.ds[c.ds.length-1]}var qo=.5522847498307936;function Ko(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=Bt(t))?void 0:e.mode)===jt.frames?Ot.frames:Ot.waapi,glyphs:null==(n=Ut(t))?void 0:n.glyphs},o=or(t);rr(o,r.idMap),ir(o,r,()=>er(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=nr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.sourceId);if("string"==typeof a){n.add(t);const r=e.idMap.get(a);r&&n.add(r)}if(Array.isArray(t.children))for(const e of t.children)r(e)};if(r(t),0===n.size)return;const o=(t,r)=>{if(n.has(t)&&e.maskAncestorChains.set(t,r),Array.isArray(t.children)){const n=wr(t,e),i=n?[...r,n]:r;for(const e of t.children)o(e,i)}};o(t,[])}(o,r);const i=function(t,e){return function(t,e){e.idMap.clear(),rr(t,e.idMap);const n=[],r=t=>{var e;zr(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);const o=new Map;for(const t of n){let n=0;const r=new Set,i=o=>{var a;if(o){if(o!==t&&zr(o)&&n++,"use"===o.type&&o.href){const t=nr(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=nr(t.href);a&&(r.add(a),i(e.idMap.get(a))),o.set(t,n)}n.sort((t,e)=>{var n,r;return(null!=(n=o.get(e))?n:0)-(null!=(r=o.get(t))?r:0)});for(const t of n){const n=zr(t);if(!n)continue;const r=n.timeCrop;Tr(t),Nr(t,Mr(n),e),r&&Er(t,r,e)}}(t,e),t}(Zo(o,r),r);return function(t,e){e.length&&(t.children||(t.children=[])).unshift({type:"defs",children:e})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Zo(t,e){t.children&&(t.children=t.children.map(t=>Zo(t,e)));const n=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?e.contentRefInnerIds.get(r):void 0;if(!n&&!o)return t;const{transformBy:i,repeater:a,maskedBy:s,clipPath:l,trimPath:u,clone:c,fillGradient:f,strokeGradient:d,textPath:h,text:m}=null!=n?n:{};n&&delete t.effects;let p=t,v=!1;if(null==m?void 0:m.useGlyphs)if(h){const t="string"==typeof h.path?h.path:void 0,n=function(t,e,n,r,o,i){return e.glyphs?Ao(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(p,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(p=n,v=!0)}else p=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?go(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(p,m,e),v=!0;return v||(p=function(t,e,n){var r;if(!e||"string"!=typeof e.path||!e.path)return t;const o=er(n,"tpath"),{d:i,startShift:a}=Zr(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:Gr(t)});n.defs.push({type:"path",id:o,d:i});const s={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==e.lengthAdjust&&(s.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(s.method=e.method),void 0!==e.spacing&&(s.spacing=e.spacing),Hr(s,"startOffset",Kr(e.startOffset,a)),Hr(s,"textLength",e.textLength),t.children=[s],t}(p,h,e)),p=function(t,e,n){return lr(t,e,n,"fill")}(p,f,e),p=function(t,e,n){return lr(t,e,n,"stroke")}(p,d,e),p=function(t,e){if(!e)return t;const n=e.subPaths===It.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)o(e);return}const e="string"==typeof t.d?t.d:function(t){var e,n,r,o,i,a,s,l,u,c;if("rect"===t.type){const i=Number(null!=(e=t.x)?e:0),a=Number(null!=(n=t.y)?n:0),s=Number(null!=(r=t.width)?r:0),l=Number(null!=(o=t.height)?o:0);return"M"+(i+s)+","+a+"L"+(i+s)+","+(a+l)+"L"+i+","+(a+l)+"L"+i+","+a+"L"+(i+s)+","+a+"z"}if("ellipse"===t.type||"circle"===t.type){const e=Number(null!=(i=t.cx)?i:0),n=Number(null!=(a=t.cy)?a:0),r="circle"===t.type?Number(null!=(s=t.r)?s:0):Number(null!=(l=t.rx)?l:0),o="circle"===t.type?Number(null!=(u=t.r)?u:0):Number(null!=(c=t.ry)?c:0);if(!(r>0&&o>0))return;const f=r*qo,d=o*qo,h=(t,e,n,r,o,i)=>"C"+t+","+e+" "+n+","+r+" "+o+","+i;return"M"+(e+r)+","+n+h(e+r,n+d,e+f,n+o,e,n+o)+h(e-f,n+o,e-r,n+d,e-r,n)+h(e-r,n-d,e-f,n-o,e,n-o)+h(e+f,n-o,e+r,n-d,e+r,n)+"z"}}(t);if(void 0===e)return;const n=wn(e);if(!n.length)return;const i={leaf:t,subpaths:[]};for(const t of n){const e=Wo(t);i.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const a=n?[...r].reverse():r;for(const t of a)for(const e of t.subpaths)n||(i=0),e.startOffsetPx=i,i+=e.lengthPx;const s=i;if(n&&s<.001)return t;const l=Hn(e.offset),u="absent"===l.kind?{kind:"static",value:0}:l,c=function(t){const e=Hn(t);if("animated"!==e.kind)return e;const n=e.keyframes.map(t=>{var e,n,r,o;return{time:null!=(n=null!=(e=t.time)?e:t.t)?n:0,value:null!=(r=t.value)?r:t.v,easing:null!=(o=t.easing)?o:t.e}});if(!n.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:n.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<n.length;t++){const e=n[t-1],o=n[t];if((e.value[1]-e.value[0])*(o.value[1]-o.value[0])<0){const t=Uo(e,o);null!==t&&t>e.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,e)=>t-e),i=[];let a=0;for(const t of n){for(;a<o.length&&o[a]<t.time;){const t=o[a++],e=Vo(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}const e=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:e,easing:t.easing})}for(;a<o.length;){const t=o[a++],e=Vo(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),f="absent"===c.kind?{kind:"static",value:[0,1]}:c,d=function(t){var e;if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const n=[];for(const r of t.keyframes){const t=null!=(e=r.value)?e:r.v;"number"==typeof t&&n.push(t)}return n}(u),h=[d.length?Math.min(...d):0,d.length?Math.max(...d):0];if(1===r.length&&r[0].leaf===t&&1===r[0].subpaths.length){const e=r[0],o=e.subpaths[0],i=n?s:o.lengthPx;if(i<.001)return t;const a=n?o.startOffsetPx/i:0;return function(t,e,n,r,o,i){const a=No(n,e,r),s=Co(e,r),l=A({},t);return delete l.effects,Do(l,"strokeDasharray",Lo(i,s)),Do(l,"strokeDashoffset",Lo(o,a)),Do(l,"strokeOpacity",Bo(i)),l}(e.leaf,i,a,h,u,f)}const m=new Map;for(const t of r){const e=[];for(const r of t.subpaths){const o=n?s:r.lengthPx;if(o<.001)continue;const i=n?r.startOffsetPx/o:0;e.push(...zo(t.leaf,r.subpath,o,i,h,u,f))}m.set(t.leaf,Io(t.leaf,e))}const p=t=>m.get(t)||(Array.isArray(t.children)&&t.children.length>0?w(A({},t),{children:t.children.map(p)}):t);return p(t)}(p,u),p=function(t,e,n){var r,o;if(!e)return t;const i=null!=(r=e.copies)?r:1;if(i<1)return n.errors.push("repeater.copies invalid: "+e.copies),t;const a=t.transform,s=null==(o=t.animate)?void 0:o.transform,l=or(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate),delete l.id;const u=[l];for(let t=1;t<i;t++){const n=or(l),r=Pr(e,t),o=r?Jn(n,r):n;u.push(o)}const c={type:"g",children:u};return t.id&&(c.id=t.id),void 0!==a&&(c.transform=a),void 0!==s&&(c.animate={transform:s}),c}(p,a,e),p=function(t,e,n,r){if(!e)return t;const o=nr(e.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=er(r,"mask");let a={type:"use",href:"#"+o};if(n)a=mr(a,n,r);else if(yr(t))a=function(t,e){var n;const r=e.animate&&"object"==typeof e.animate&&!Array.isArray(e.animate)?e.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 a=[],s=[],l=[];for(const t of i){const e=(null!=(n=t.value)?n:t.v)||{},r=Qn(t,void 0);if(Array.isArray(e.translate)&&a.push(w(A(A({},r),gr(t)),{value:{translate:[-e.translate[0],-e.translate[1]]}})),"number"==typeof e.rotate){const t={rotate:-e.rotate};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),s.push(w(A({},r),{value:t}))}if(Array.isArray(e.scale)){const t={scale:[1/e.scale[0],1/e.scale[1]]};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),l.push(w(A({},r),{value:t}))}}const u=null==o?void 0:o.loop,c=t=>{const e={keyframes:t};return void 0!==u&&(e.loop=u),e};let f=t;return a.length&&(f={type:"g",animate:{transform:c(a)},children:[f]}),s.length&&(f={type:"g",animate:{transform:c(s)},children:[f]}),l.length&&(f={type:"g",animate:{transform:c(l)},children:[f]}),f}(a,t);else{const e=function(t){if("string"==typeof t.transform){const e=function(t){var e,n,r,o,i,a,s,l,u,c,f,d,h;const m=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let p;const v=[];for(;null!==(p=m.exec(t));){const t=p[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);v.push({name:p[1],args:t})}if(!v.length)return;const g=v[v.length-1];if("translate"===g.name)for(let t=v.length-2;t>=0;t--){const c=v[t];if("translate"!==c.name)continue;const f=null!=(e=c.args[0])?e:0,d=null!=(n=c.args[1])?n:0,h=null!=(r=g.args[0])?r:0,m=null!=(o=g.args[1])?o:0;if(h!==-f||m!==-d)continue;const p={};p.origin=[f,d];for(let e=0;e<t;e++)if("translate"===v[e].name){const t=null!=(i=v[e].args[0])?i:0,n=null!=(a=v[e].args[1])?a:0;p.translate=p.translate?[p.translate[0]+t,p.translate[1]+n]:[t,n]}for(let e=t+1;e<v.length-1;e++){const t=v[e];if("rotate"===t.name)p.rotate=(null!=(s=p.rotate)?s:0)+(null!=(l=t.args[0])?l:0);else if("scale"===t.name){const e=null!=(u=t.args[0])?u:1,n=t.args.length>1?t.args[1]:e;p.scale=p.scale?[p.scale[0]*e,p.scale[1]*n]:[e,n]}}return p}let y,b,k;for(const t of v)if("translate"===t.name){const e=null!=(c=t.args[0])?c:0,n=null!=(f=t.args[1])?f:0;y=y?[y[0]+e,y[1]+n]:[e,n]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.args[0])?d:0);else if("scale"===t.name){const e=null!=(h=t.args[0])?h:1,n=t.args.length>1?t.args[1]:e;k=k?[k[0]*e,k[1]*n]:[e,n]}const A={};return y&&(A.translate=y),void 0!==b&&(A.rotate=b),k&&(A.scale=k),Object.keys(A).length?A:void 0}(t.transform);if(!e)return;const n={};return e.translate&&(n.translate=e.translate),void 0!==e.rotate&&(n.rotate=e.rotate),e.scale&&(n.scale={value:e.scale}),e.origin&&(n.origin=e.origin),Object.keys(n).length?n:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes&&!t.transform.kfs){const e=t.transform.value,n=e&&"object"==typeof e?e:t.transform;if(n&&"object"==typeof n){const t={};return Array.isArray(n.translate)&&(t.translate=n.translate),"number"==typeof n.rotate&&(t.rotate=n.rotate),"number"==typeof n.skew&&(t.skew=n.skew),Array.isArray(n.scale)&&(t.scale={value:n.scale}),Array.isArray(n.origin)&&(t.origin=n.origin),Object.keys(t).length?t:void 0}}}(t);e&&(a=mr(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||yr(t)}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?wr(e,r):void 0,l=s?[...a,s]:a,u=i&&r.maskAncestorChains.get(i)||[];if(!l.length&&!u.length)return t;const c=new Set;for(const t of l)if(t.translateKeyframes)for(const e of t.translateKeyframes)c.add(e.time);for(const t of u)if(t.translateKeyframes)for(const e of t.translateKeyframes)c.add(e.time);if(!(c.size>0)){const e=br(l),n=br(u),r=n[0]-e[0],o=n[1]-e[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(c).sort((t,e)=>t-e).map(t=>{const e=kr(l,t),n=kr(u,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,o,r,s);const l={type:"mask",id:i,children:[a]};return e.maskType&&(l.maskType=e.maskType),e.maskUnits&&(l.maskUnits=e.maskUnits),e.maskContentUnits&&(l.maskContentUnits=e.maskContentUnits),void 0!==e.x&&(l.x=String(e.x)),void 0!==e.y&&(l.y=String(e.y)),void 0!==e.width&&(l.width=String(e.width)),void 0!==e.height&&(l.height=String(e.height)),r.defs.push(l),t.mask="url(#"+i+")",t}(p,s,i,e),p=function(t,e,n){var r,o;if(!e||!e.d&&!e.animate)return t;const i=er(n,"clip"),a={type:"path"},s=Hn(e.d);if("absent"!==s.kind&&("static"===s.kind?a.d=hr(s.value):(Xn(a,"d",s),void 0!==a.d&&(a.d=hr(a.d)))),e.animate&&!(null==(r=a.animate)?void 0:r.d)){const t=null!=(o=a.animate)?o:{};t.d=e.animate,a.animate=t}return n.defs.push({type:"clipPath",id:i,children:[a]}),t.clipPath="url(#"+i+")",t}(p,l,e),o?(Sr(p,c,e),p=function(t,e,n,r){const o=function(t,e){var n,r,o;const i={};let a=!1;const s=null==(n=t.animate)?void 0:n.transform;if(s&&"object"==typeof s&&Array.isArray(s.keyframes)){const e=s.keyframes;if(e.some(t=>t.value&&t.value.translate)){const n=sr(s),r={keyframes:e.map(t=>{const e=t.value||{},r={};void 0!==e.translate&&(r.translate=e.translate),n&&void 0!==e.origin&&(r.origin=e.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 l=e.some(t=>{const e=t.value||{};return void 0!==e.rotate||void 0!==e.scale}),u=e.map(t=>{const e=t.value||{},r={};void 0!==e.rotate&&(r.rotate=e.rotate),void 0!==e.scale&&(r.scale=e.scale),void 0===e.origin||n&&!l||(r.origin=e.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(u.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const e={keyframes:u};void 0!==o&&(e.loop=o),t.animate.transform=e}a=!0}}const l=void 0!==(null==e?void 0:e.translate),u=a||l,c=a&&sr((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&sr((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const e=function(t){const e=[],n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);)e.push({name:r[1],full:r[0]});if(!e.length)return{rest:t||void 0};if(e.every(t=>"translate"===t.name))return{translate:e.map(t=>t.full).join("")};const o=e[0],i=e[e.length-1];if("translate"===i.name&&"translate"===o.name){const n=ar(i.full),r=ar(o.full),a=-n[0],s=-n[1],l=r[0]-a,u=r[1]-s;return 0===l&&0===u?{rest:t}:{translate:"translate("+l+","+u+")",rest:"translate("+a+","+s+")"+e.slice(1).map(t=>t.full).join("")}}if("translate"===i.name)return{rest:t};const a=[];let s=0;for(;s<e.length&&"translate"===e[s].name;)a.push(e[s].full),s++;if(!a.length)return{rest:t};const l=e.slice(s).map(t=>t.full).join("");return{translate:a.join(""),rest:l||void 0}}(t.transform);u?void 0!==e.translate?e.rest?t.transform=e.rest:delete t.transform:(function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,n=[];let r;for(;r=e.exec(t);)n.push({name:r[1],full:r[0]});if(1!==n.length)return!1;if("translate"===n[0].name)return!0;if("matrix"!==n[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(n[0].full);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)||c&&function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let n,r=0,o=!1;for(;n=e.exec(t);)r++,"matrix"===n[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:e.translate&&(i.transform=e.translate,e.rest?t.transform=e.rest:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes&&!t.transform.kfs){const e=t.transform.value,n=!(!e||"object"!=typeof e),r=n?e:t.transform,o=t=>n?{value:t}:t;if(Array.isArray(r.translate)){const e=A({},r);delete e.translate;const n=Object.keys(e).length>0;u||(i.transform=o({translate:r.translate})),n?t.transform=o(e):delete t.transform}}return i}(t,e);"string"==typeof t.id&&delete t.id;const{outer:i,inner:a}=function(t){if(!t)return{};const e=sr(t.translate),n=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),e&&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||e&&!n||(o.origin=t.origin),{outer:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(e);let s=t;s=Jn(s,a);let l={type:"g",id:n,children:[{type:"g",id:r,children:[s]}]};return void 0!==o.transform&&(l.transform=o.transform),void 0!==o.animate&&(l.animate=o.animate),i&&(delete l.id,l=Jn(l,i),l.id=n),l}(p,i,r,o)):p=function(t,e,n,r){return Sr(t,e,r),Jn(t,n)}(p,c,i,e),(null==c?void 0:c.retime)&&(t.effects={clone:{retime:c.retime}}),r&&e.idMap.set(r,p),p}var Ho=t=>{var e,n;return null!=(n=null!=(e=t.t)?e:t.time)?n:0},Xo=t=>{var e;return null!=(e=t.v)?e:t.value},Yo=t=>{var e;return null!=(e=t.e)?e:t.easing},Qo=t=>{var e;return null!=(e=t.tangentIn)?e:t.ti},Jo=t=>{var e;return null!=(e=t.tangentOut)?e:t.to};function $o(t,e,n,r,o){const i=1-o,a=i*i*i,s=3*i*i*o,l=3*i*o*o,u=o*o*o;return[a*t[0]+s*e[0]+l*n[0]+u*r[0],a*t[1]+s*e[1]+l*n[1]+u*r[1]]}function ti(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=$o(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var ei=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function ni(t,e,n){var r,o;let i=Ko(t).root;return i=function(t){const e=t=>{var n;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const e=function(t){var e,n,r,o;if("offsetPath"!==t.alongPathMode)return;const i=null!=(e=t.keyframes)?e:t.kfs;if(!i||i.length<2)return;const a=Xo(i[0]),s=(null==a?void 0:a.origin)&&a.origin.length>=2?[a.origin[0],a.origin[1]]:[0,0],l=[];for(const t of i){const e=Xo(t),r=null==e?void 0:e.translate;if(!r||r.length<2)return;if(Object.keys(e).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(n=null==e?void 0:e.origin)?n:[0,0];if(o[0]!==s[0]||o[1]!==s[1])return;l.push([r[0]+s[0],r[1]+s[1]])}if(!i.some(t=>Qo(t)||Jo(t)))return;let u="M"+ei(l[0][0])+","+ei(l[0][1]);const c=[];for(let t=0;t<l.length-1;t++){const e=l[t],n=l[t+1],a=null!=(r=Jo(i[t]))?r:[0,0],s=null!=(o=Qo(i[t+1]))?o:[0,0],f=[e[0]+a[0],e[1]+a[1]],d=[n[0]+s[0],n[1]+s[1]];u+="C"+ei(f[0])+","+ei(f[1])+","+ei(d[0])+","+ei(d[1])+","+ei(n[0])+","+ei(n[1]),c.push(ti(e,f,d,n))}const f=c.reduce((t,e)=>t+e,0);if(!(f>0))return;const d=[];let h=0;for(let t=0;t<i.length;t++){t>0&&(h+=c[t-1]);const e={t:Ho(i[t]),v:h/f},n=Yo(i[t]);void 0!==n&&(e.e=n),d.push(e)}return{pathStr:u,distanceKfs:d,autoOrient:!!t.autoOrient,anchor:s}}(i);if(e){const n=A({},o);delete n.transform;const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n.offsetDistance=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=A({},s);delete t.translate,delete t.origin,l=Object.keys(t).length?t:void 0}r=w(A({},t),{animate:n,style:w(A({},t.style),{offsetPath:"path('"+e.pathStr+"')",offsetAnchor:ei(e.anchor[0])+"px "+ei(e.anchor[1])+"px",offsetRotate:e.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==l?r.transform=l:delete r.transform}}if(null==(n=r.children)?void 0:n.length){const t=r.children.map(e);t.some((t,e)=>t!==r.children[e])&&(r=w(A({},r),{children:t}))}return r};return e(t)}(i),i=zn(i,null!=(o=null==(r=Bt(i))?void 0:r.duration)?o:V),e===Ot.waapi&&(i=yn(i,null==n?void 0:n.motionPath),i=Vn(i),i=function(t){const e=(t,n)=>{var r;n(t),null==(r=t.children)||r.forEach(t=>e(t,n))};let n=!0;for(;n;){n=!1;const r=new Set;e(t,t=>{var e;"use"===t.type&&"string"==typeof t.href&&r.add((e=t.href).startsWith("#")?e.slice(1):e)}),e(t,t=>{if(!t.children)return;let e=t.children;"defs"===t.type&&(e=e.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),e=e.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),e.length!==t.children.length&&(t.children=e,n=!0)})}return t}(i)),i}function ri(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function oi(t,e,n){var r;const o=Bt(t)||{},i=Cn(t,Ot.frames),a=o.iterations;let s=1;"number"==typeof a&&(s=a||1),"infinite"===a&&(s=1/0),s<1&&(s=1);const l=+(o.duration||V),u=l&&s?l*(s===1/0?1/0:s):l?(null!=s?s:1)*l:0,c=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,h="backwards"===f||"both"===f;let m=null,p=!1,v=-(o.delay||0),g=0,y=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let w=0;const x=()=>{const t=g?(Date.now()-g)*y:0;return v+t},S=()=>{let t=x();return Number.isFinite(u)&&t>u&&(t=u),t<0&&(t=0),t};function P(t){let n=function(){const e=l>0?l:1;let n=0,r=0;l>0?(t=Z(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1),n=Z((t-r*e)/e,0,1)):n=t;const o=c||"normal";let i=n;return"reverse"===o?i=1-n:"alternate"===o?r%2==1&&(i=1-n):"alternate-reverse"===o&&r%2==0&&(i=1-n),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=Ln(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?P(S()):h&&P(0));const j=()=>!!p&&!!e.isConnected()&&(y<0?x()>0:!(Number.isFinite(u)&&S()>=u)),O=t=>{null!==m&&(ri(m),m=null),(t||j())&&(m=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{m=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=S(),i=x();if(i<0&&y>0)h&&P(0);else{if(y<0&&i<=0)return M(),P(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(y>0&&u&&Number.isFinite(u)&&o>=u)return M(),P(d?u:0),void(b||(b=!0,null==(r=null==n?void 0:n.onFinish)||r.call(n)));if(A>0){const t=Date.now();if(w&&t-w<A)return;w=t}P(o)}})(),O()}))},M=()=>{if(!p)return;let t=x();Number.isFinite(u)&&t>u&&(t=u),v=t,g=0,p=!1,null!==m&&(ri(m),m=null),t>=0?P(t):h&&P(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>j(),play:()=>{var t;(()=>{if(!p){if(y>=0)Number.isFinite(u)&&v>=u&&(v=0);else if(v<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");v=u}b=!1,p=!0,g=Date.now(),O(!0)}})(),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;M(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;M(),v=0,g=0,p=!1,b=!1,P(v),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;v=Number.isFinite(u)?u:S(),g=0,p=!1,null!==m&&(ri(m),m=null),P(d?v:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let e=x();Number.isFinite(u)&&e>u&&(e=u),t<0!=y<0&&(b=!1),y=t,v=e,p&&(g=Date.now())},getCurrentTime:()=>S(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(u)&&t>u&&(t=u),v=t,p&&(g=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),P(S())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var ii=[1,0,0,1,0,0];function ai(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}var si=(t,e)=>[1,0,0,1,t,e],li=(t,e)=>[t,0,0,e,0,0];function ui(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var ci=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],fi=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function di(t){let e=ii;t.translate&&(e=ai(e,si(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=ai(e,si(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=ai(e,ui(t.rotate))),t.scale&&(e=ai(e,li(t.scale[0],t.scale[1]))),n&&(e=ai(e,si(-t.origin[0],-t.origin[1]))),e}function hi(t,e,n){return t+(e-t)*n}function mi(t,e){return null==t?ii:"string"==typeof t?function(t){let e=ii;const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);){const t=r[1],n=r[2].split(/[\s,]+/).filter(Boolean).map(Number);"translate"===t?e=ai(e,si(n[0]||0,n[1]||0)):"scale"===t?e=ai(e,li(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=ai(e,ui(n[0])):"skewX"===t?e=ai(e,ci(n[0])):"skewY"===t?e=ai(e,fi(n[0])):"matrix"===t&&(e=ai(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?di(function(t,e){var n,r,o,i,a,s,l;if(!t.length)return{};if(e<=(null!=(n=t[0].time)?n:0))return t[0].value||{};if(e>=(null!=(r=t[t.length-1].time)?r:0))return t[t.length-1].value||{};let u=0;for(;u<t.length-1&&(null!=(o=t[u+1].time)?o:0)<e;)u++;const c=t[u],f=t[u+1],d=(e-(null!=(i=c.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=c.time)?s:0)||1),h=c.value||{},m=f.value||{},p={};return h.translate&&m.translate?p.translate=[hi(h.translate[0],m.translate[0],d),hi(h.translate[1],m.translate[1],d)]:p.translate=h.translate||m.translate,void 0!==h.rotate&&void 0!==m.rotate?p.rotate=hi(h.rotate,m.rotate,d):p.rotate=null!=(l=h.rotate)?l:m.rotate,h.scale&&m.scale?p.scale=[hi(h.scale[0],m.scale[0],d),hi(h.scale[1],m.scale[1],d)]:p.scale=h.scale||m.scale,p.origin=h.origin||m.origin,p}(t.keyframes,e)):t.value?di(t.value):"object"!=typeof t||Array.isArray(t)?ii:di(t)}var pi=new Set(["svg","g","symbol"]),vi=new Set(["defs","mask","clipPath","title"]);function gi(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>gi(t,e))}function yi(t){return null==t?0:Number(t)}function bi(t){return Math.round(100*t)/100+0}function ki(t,e,n,r,o){var i;const a=t.type||"";if(vi.has(a))return;const s=ai(e,function(t,e){return t.animate&&t.animate.transform?mi(t.animate.transform,e):void 0!==t.transform?mi(t.transform,e):ii}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=ai(s,si(yi(t.x),yi(t.y)));return void(i?ki(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}pi.has(a)?null==(i=t.children)||i.forEach(t=>ki(t,s,n,r,o)):o.push(function(t,e,n){var r,o,i,a,s;const l=null!=(r=t.fill)?r:"",u=null!=(o=t.stroke)?o:"",c=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=bi(function(t,e,n,r){var o,i,a,s,l,u;if(t&&t.keyframes&&t.keyframes.length){const e=t.keyframes;if(r<=(null!=(o=e[0].time)?o:0))return e[0].value;if(r>=(null!=(i=e[e.length-1].time)?i:0))return e[e.length-1].value;let n=0;for(;n<e.length-1&&(null!=(a=e[n+1].time)?a:0)<r;)n++;const c=e[n],f=e[n+1],d=(r-(null!=(s=c.time)?s:0))/((null!=(l=f.time)?l:0)-(null!=(u=c.time)?u:0)||1);return hi(c.value,f.value,d)}return void 0!==e?Number(e):1}(null==(s=t.animate)?void 0:s.opacity,t.opacity,0,n)),d=t.mask?1:0,h=e.map(bi).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return yi(t.width)+","+yi(t.height)+","+yi(t.x)+","+yi(t.y);case"ellipse":return yi(t.rx)+","+yi(t.ry)+","+yi(t.cx)+","+yi(t.cy);case"circle":return yi(t.r)+","+yi(t.cx)+","+yi(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(yi(c)||"")+"|o:"+f+"|m:"+d}(t,s,n))}function Ai(t,e){var n;e.add(0),(t=>{var n;if(t&&"object"==typeof t)for(const r of Object.keys(t)){const o=null==(n=t[r])?void 0:n.keyframes;Array.isArray(o)&&o.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)})}})(t.animate),t.transform&&"object"==typeof t.transform&&t.transform.keyframes&&t.transform.keyframes.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)}),null==(n=t.children)||n.forEach(t=>Ai(t,e))}function wi(t,e){const n=new Map;gi(t,n);const r=[];return ki(t,ii,e,n,r),r.sort()}function xi(t,e){const n=new Set;Ai(t,n),Ai(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=wi(t,o),i=wi(e,o),a=Si(n,i),s=Si(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function Si(t,e){const n=new Map;for(const t of e)n.set(t,(n.get(t)||0)+1);const r=[];for(const e of t){const t=n.get(e)||0;t>0?n.set(e,t-1):r.push(e)}return r}function Pi(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=0}=e,i=t.getRootElement();if(!i)return console.warn("setupAnimationTriggers: No root element found for animation."),t;let a=!1;const s=()=>{a&&(a=!1,t.setPlaybackRate(1)),t.play()},l=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":a=!0,t.setPlaybackRate(-1),t.play()}};switch(n){case"load":{const t=()=>s();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{let t=!1;const e=()=>{t=!0,s()},n=()=>{t&&l()};i.addEventListener("mouseenter",e),i.addEventListener("mouseleave",n);break}case"click":{const e=()=>{t.isPlaying()?l():s()};i.addEventListener("click",e);break}case"scrollIntoView":{const t=t=>{var e,n;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,a=null!=(n=null==(e=t.rootBounds)?void 0:e.height)?n:1/0,s=Math.min(i,a),l=Math.min(r.height,Number.isFinite(s)?s:r.height);return l>0?o.height/l:t.intersectionRatio},e=Array.from({length:21},(t,e)=>e/20);let n=!1;new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&t(e)>=o?(n=!0,s()):n&&(n=!1,l())})},{threshold:e}).observe(i);break}}return t}function ji(t){return"#"+t}function Oi(t,e,n,r){const o=Bt(t)||{};if(!r)if(t.id){const e=ji(t.id);(r=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const i=oi(t,e||function(t){const e=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=K(r);const i=ji(n),a=(null==t?void 0:t.querySelectorAll(i))||document.querySelectorAll(i);0!==a.length||e.has(i)||(e.add(i),console.warn('setAttribute: No elements found for selector "'+i+'"'));for(let t=0;t<a.length;t++){const e=a[t],n="transform"===r&&"pattern"===e.tagName?"patternTransform":r;e.setAttribute(n,o),U.has(r)&&(e.style[r]=o)}}}}(r),n),a=f(c({},i),{getRootElement:()=>r||null});return o.trigger&&(tt(o)?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Pi(a,o.trigger)),a}function Mi(t,e,n,r){var o,i;let a=null!=(o=t.v)?o:t.value;const s=null!=(i=t.e)?i:t.easing,l={offset:e,easing:s&&Array.isArray(s)?"cubic-bezier("+s.join(",")+")":void 0};let u,c=n;return L.has(n)&&Array.isArray(a)?u=C(a):"transform"!==n||null===a||"object"!=typeof a||Array.isArray(a)?D.has(n)?(Array.isArray(a)&&("translate"===n&&(a=a.map(t=>t+"px")),a=a.join(",")),"rotate"===n&&(a+="deg"),u=n+"("+a+")",c="transform"):u="d"===n?'path("'+(a&&"object"==typeof a&&Array.isArray(a.paths)?a.paths:[]).map(t=>S(t,!0)).join("")+'")':R.has(n)&&"number"==typeof a?100*a+"%":""+a:(u=B(a,{withUnits:!0}),c="transform"),CSS.supports(K(c),u)||r.add(c),c=W(c),l[c]=u,l}function _i(t,e,n){var r,o,i,a,s;const l=[];for(let u=0;u<e.length;u++){const d=e[u],h=null!=(r=d.t)?r:0;if(h<0){const n=e[u+1];if(n&&(null!=(o=n.t)?o:0)>=0){const e=(0-h)/((null!=(i=n.t)?i:0)-h),r=d.e?I(d.e)(e):e,{right:o}=T(d.e,e);l.push({t:0,v:Mn(t,d.v,n.v,r),e:o})}continue}if(h>n){const r=e[u-1];if(r&&(null!=(a=r.t)?a:0)<=n){const e=null!=(s=r.t)?s:0,o=(n-e)/(h-e),i=r.e?I(r.e)(o):o,{left:a}=T(r.e,o);l.length>0&&(l[l.length-1]=f(c({},l[l.length-1]),{e:a})),l.push({t:n,v:Mn(t,r.v,d.v,i),e:void 0})}break}l.push(d)}return l}function Ei(t,e,n){var r;const o=new Map;for(const[i,a]of Object.entries(t)){const t=n.duration||1,s=_i(i,a.kfs||a.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],a=Mi(o,Z((null!=(r=o.t)?r:0)/t,0,1),i,e);0===n&&(a.offset||0)>0&&l.push(f(c({},a),{offset:0})),l.push(a)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(f(c({},l[l.length-1]),{offset:1})),l.length>0&&o.set(i,l)}return o}function Ii(t,e,n,r,o){var i;const a=Bt(t)||{};if(!n)if(t.id){const e=ji(t.id);(n=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const s=Cn(t,Ot.waapi),l=[],u=a.iterations;let c;"number"==typeof u&&(c=u),"infinite"===u&&(c=1/0);const f=new Set;let d=!1,h=!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=ji(t.id),u=(null==n?void 0:n.querySelectorAll(s))||document.querySelectorAll(s);0===u.length&&console.warn('createWebApiAnimator: No elements found for selector "'+s+'"');const m=Ei(r,f,a),p=a.delay&&a.delay>0?a.delay:void 0;let v;if(a.delay&&a.delay<0&&a.duration){const t=-a.delay;v=c===1/0?t%a.duration:Math.min(t,a.duration*(null!=c?c:1))}const g={duration:a.duration,delay:p,fill:null!=(i=a.fill)?i:"forwards",direction:a.direction,iterations:c};for(let t=0;t<u.length;t++){const n=u[t];for(const[,t]of m)if(t.length>0)try{const r=new KeyframeEffect(n,t,g),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==e?void 0:e.onFinish)&&(i.onfinish=()=>{var t;d||(d=!0,null==(t=e.onFinish)||t.call(e))}),(null==e?void 0:e.onRemove)&&(i.onremove=()=>{var t;h||(h=!0,null==(t=e.onRemove)||t.call(e))}),void 0!==v&&(i.currentTime=v),l.push(i)}catch(t){console.warn(t)}}}if(!r&&f.size)return console.warn("Unsupported CSS attrs: "+[...f].join(", ")),null;const m={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=l[0])?void 0:t.playState)},play:()=>{var t;d=!1,l.forEach(t=>t.play()),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;l.forEach(t=>t.pause()),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;d=!1,l.forEach(t=>t.cancel()),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{var t;for(const e of l)try{(null==(t=e.effect)?void 0:t.getTiming().iterations)===1/0?(e.effect.updateTiming({iterations:1}),e.finish(),e.effect.updateTiming({iterations:1/0})):e.finish()}catch(t){e.cancel()}},setPlaybackRate:t=>(l.forEach(e=>e.playbackRate=t),m),getCurrentTime:()=>{var t,e;const n=null!=(e=null==(t=l[0])?void 0:t.currentTime)?e:null;return null!==n?+n:null},setCurrentTime:t=>{d=!1,l.forEach(e=>{e.currentTime=t})},destroy:()=>{var t;m.cancel(),l.splice(0,l.length),h||(h=!0,null==(t=null==e?void 0:e.onRemove)||t.call(e))}};return a.trigger&&("scroll"===a.timelineSource?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Pi(m,a.trigger)),o&&l.forEach(t=>t.play()),m}function zi(t,e,n){var r,o,i;const a="number"==typeof(null==t?void 0:t.fraction)?t.fraction:e,s=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*a);if(void 0!==s)return n?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:s}:{offset:s}}function Ti(t,e){const n=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===n||o===r)return null;const t=getComputedStyle(o),i="y"===e?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function Ni(){return document.scrollingElement||document.documentElement}var Ci="parent",Fi="scroller";function Li(t,e){var n,r;const o=null==e?void 0:e.trim();if(!o)return t;if(o===Ci){let e=null;for(let n=t.parentElement;n&&n!==document.body;n=n.parentElement){const t=getComputedStyle(n).position;"sticky"!==t&&"fixed"!==t||(e=n)}return null!=(r=null!=(n=null==e?void 0:e.parentElement)?n:t.parentElement)?r:t}if(o===Fi)return Ti(t,"y")||Ti(t,"x")||Ni();let i=null;try{i=document.querySelector(o)}catch(e){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 Di(t,e){const n=t;if(!(null==e?void 0:e.pin)||!n.style)return()=>{};const r=n.style,o=r.position,i=r.top;r.position="sticky";const a="center"===e.pinAlign?.5:"bottom"===e.pinAlign?1:0,s=()=>{var n;const o=null!=(n=e.pinTop)?n:0;if(!a)return void(r.top=o+"px");const i=function(t){const e=Ti(t,"y");return e?e.clientHeight:document.documentElement.clientHeight}(t),s=t.getBoundingClientRect().height;r.top=Math.round((i-s)*a+o)+"px"};s();let l=null;const u=a?s:null;a&&(u&&window.addEventListener("resize",u),"undefined"!=typeof ResizeObserver&&(l=new ResizeObserver(s),l.observe(t)));let c=null;const f=t.parentElement;return e.pinDistance&&e.pinDistance>0&&f&&(c=document.createElement("div"),c.setAttribute("data-px-pin",""),c.style.height=100*e.pinDistance+"vh",f.insertBefore(c,t),c.appendChild(t)),()=>{u&&window.removeEventListener("resize",u),null==l||l.disconnect(),r.position=o,r.top=i,(null==c?void 0:c.parentElement)&&(c.parentElement.insertBefore(t,c),c.remove())}}function Ri(t,e,n){let r,o=e;t.resetOnFinish&&(o=f(c({},e),{onFinish:()=>{var t;null==(t=null==e?void 0:e.onFinish)||t.call(e),null==r||r.cancel()}}));const i=n(o);return r=i,t.debugInstName&&(window[t.debugInstName]=i),i}var Bi="http://www.w3.org/2000/svg";function Ui(t,e){if(!t)return null;const n=t,{type:r,children:o,style:i}=n,u=((t,e)=>{var n={};for(var r in t)s.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&a)for(var r of a(t))e.indexOf(r)<0&&l.call(t,r)&&(n[r]=t[r]);return n})(n,["type","children","style"]),c=u.domType;void 0!==c&&delete u.domType;const f=Ut(t)||e,d=function(t,e){var n;if(t)return"string"==typeof t?null==(n=null==e?void 0:e.styles)?void 0:n[t]:t}(i,f);let h;if(o)for(const t of o){const e=Ui(t,f);e&&(h||(h=[]),h.push(e))}const m=function(t,e,n,r,o){if(De.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(Bi,t);for(const t in e){const n=Ke(t,e[t]);void 0!==n&&(Ue.has(t)?i.style[t]=String(n):i.setAttribute(K(t),n))}if(n)for(const t in n)i.style[t]=String(n[t]);if(r)for(const t of r)i.appendChild(t);return o&&(i.textContent=o),i}(r||"g",Ze(u),d,h,u[Tt]||u[zt]);return m&&void 0!==c&&m.setAttribute("type",c),m}var Vi="data";function Wi(t,e,n,r){const o=je(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);t=ni(t,(Bt(t)||{}).mode===jt.frames?Ot.frames:Ot.waapi);let i=null;if(r){t=Fe(t);const e="string"==typeof r?document.querySelector(r):r;e&&(i=Ui(t),i&&e.replaceChildren(i))}return function(t,e,n,r){return function(t,e,n,r){const o=Bt(t)||{};return tt(o)?Ri(o,n,n=>{var i,a;let s=()=>{};if(o.mode!==jt.frames&&"native"===(null==(i=o.scroll)?void 0:i.driver)&&r){s=Di(r,o.scroll);const e=function(t,e){var n,r,o,i;if(!e||!tt(e))return null;const a=e.scroll||{},s=null!=(n=a.kind)?n:"view";if(a.smoothing)return console.warn('scroll timeline: `smoothing` needs the built-in driver — ignoring `driver: "native"`'),null;const l=globalThis,u="view"===s,c=u?l.ViewTimeline:l.ScrollTimeline;if("function"!=typeof c)return null;const f=null!=(r=a.axis)?r:"block";let d;try{d=new c(u?{subject:Li(t,a.subject),axis:f}:{source:"root"===a.source?Ni():Ti(t,"y")||Ti(t,"x")||Ni(),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:zi(null==(o=a.range)?void 0:o.start,0,u),rangeEnd:zi(null==(i=a.range)?void 0:i.end,1,u)}}(r,o);if(e){const i=Ii(t,n,r,o.mode===jt.waapi,e);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{s(),t()},i}}s(),s=()=>{}}const l=(o.mode!==jt.frames?Ii(t,n,r,o.mode===jt.waapi):null)||Oi(t,e,n,r),u=(null==(a=l.getRootElement)?void 0:a.call(l))||r;if(u){s=Di(u,o.scroll);const t=("number"==typeof(null==(c=o)?void 0:c.duration)&&c.duration>0?c.duration:V)*("number"==typeof(null==c?void 0:c.iterations)&&c.iterations>0?c.iterations:1),e=function(t,e,n){var r,o;if(!e||!tt(e))return null;const i=e.scroll||{},a=null!=(r=i.kind)?r:"view",s=Li(t,i.subject),l=Ti(t,"y")||Ti(t,"x"),u="scroll"===a&&"root"===i.source?Ni():l||Ni(),c=u===Ni(),f=function(t,e){const n=null!=t?t:"block";if("x"===n||"y"===n)return n;const r=!!e&&e.startsWith("vertical");return"inline"===n?r?"y":"x":r?"x":"y"}(i.axis,getComputedStyle(u).writingMode),d=()=>{if("scroll"===a)return function(t,e,n){var r,o;const i=e>0?Z(t/e,0,1):1,a="number"==typeof(null==(r=null==n?void 0:n.start)?void 0:r.fraction)?n.start.fraction:0,s="number"==typeof(null==(o=null==n?void 0:n.end)?void 0:o.fraction)?n.end.fraction:1;return s<=a?i>=s?1:0:Z((i-a)/(s-a),0,1)}("y"===f?u.scrollTop:u.scrollLeft,"y"===f?u.scrollHeight-u.clientHeight:u.scrollWidth-u.clientWidth,i.range);const t=s.getBoundingClientRect();let e,n;if(c)e=0,n="y"===f?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=u.getBoundingClientRect();e="y"===f?t.top:t.left,n="y"===f?u.clientHeight:u.clientWidth}return function(t,e,n,r){const o=n-t,i=nt(null==r?void 0:r.start,0,e,n),a=nt(null==r?void 0:r.end,1,e,n);return a<=i?o>=a?1:0:Z((o-i)/(a-i),0,1)}(("y"===f?t.top:t.left)-e,"y"===f?t.height:t.width,n,i.range)},h=Math.max(0,null!=(o=i.smoothing)?o:0)/1e3;let m=!1,p=null,v=null,g=0,y=null;const b=()=>{y=null,m||(t=>{if(!h)return void n(t);if(null===p)return p=t,void n(t);if(null!==v)return;g=0;const e=t=>{if(v=null,m)return;const r=g?Math.min(.1,(t-g)/1e3):1/60;g=t;const o=d(),i=1-Math.exp(-r/h);p+=(o-p)*i,Math.abs(o-p)<.001&&(p=o),n(p),p!==o&&(v=requestAnimationFrame(e))};v=requestAnimationFrame(e)})(d())},k=()=>{m||null!==y||(y=requestAnimationFrame(b))},A=c?window:u;let w;A.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k,{passive:!0}),"undefined"!=typeof ResizeObserver&&(w=new ResizeObserver(k),w.observe(s),s!==t&&w.observe(t),c||w.observe(u));const x={destroy:()=>{m||(m=!0,A.removeEventListener("scroll",k),window.removeEventListener("resize",k),null==w||w.disconnect(),null!==y&&(cancelAnimationFrame(y),y=null),null!==v&&(cancelAnimationFrame(v),v=null))},refresh:()=>{m||(p=d(),n(p))}};return x.refresh(),x}(u,o,e=>l.setCurrentTime(e*t));if(e){const t=l.destroy.bind(l);l.destroy=()=>{e.destroy(),s(),t()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var c;return l}):Ri(o,n,n=>o.mode===jt.frames?Oi(t,e,n,r):Ii(t,n,r,o.mode===jt.waapi)||Oi(t,e,n,r))}(t,e,n,r)}(t,e,n,i)}function Gi(t){const{src:e,data:n,adapter:r,callbacks:o,container:i}=t;if(void 0!==n&&void 0!==e)throw new Error("createAnimator: provide either `src` or `data`, not both");if(void 0===n&&void 0===e)throw new Error("createAnimator: either `src` or `data` is required");if(void 0!==n)return Wi(n,r,o,i);let a=null,s=[],l=!1;const u=t=>{a?t(a):s&&s.push(t)};return fetch(e).then(t=>t.json()).then(t=>{if(!l)if(Rt(t)){a=Wi(t,r,o,i);const e=s;s=null,null==e||e.forEach(t=>t(a))}else console.error('createAnimator: invalid animation document format at "'+e+'"')}).catch(t=>{s=null,console.error('createAnimator: failed to load "'+e+'"',t)}),{isReady:()=>!!a,getRootElement:()=>a?a.getRootElement():null,isPlaying:()=>(null==a?void 0:a.isPlaying())||!1,play:()=>{u(t=>t.play())},pause:()=>{u(t=>t.pause())},cancel:()=>{u(t=>t.cancel())},finish:()=>{u(t=>t.finish())},setPlaybackRate:t=>{u(e=>e.setPlaybackRate(t))},getCurrentTime:()=>a?a.getCurrentTime():null,setCurrentTime:t=>{u(e=>e.setCurrentTime(t))},destroy:()=>{l=!0,s=null,null==a||a.destroy()}}}function qi(){const t=document.querySelectorAll("["+St+"]");for(let e=0;e<t.length;e++){const n=t[e];if(!n[Pt]){const t=n.getAttribute(St);t&&(n[Pt]=Gi({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=qi,window.createAnimator=Gi,window.setupAnimationTriggers=Pi);
1
+ "use strict";var t,e=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,c=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&u(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&u(t,n,e[n]);return t},f=(t,e)=>n(t,o(e)),d={};((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(d,{COLOUR_ATTR_NAMES:()=>L,MISSING_GLYPH_CLASS_NAME:()=>Ao,PX_ANIMATOR_DATA_KEY:()=>Xi,PX_ANIM_ATTR_NAME:()=>jt,PX_ANIM_SRC_ATTR_NAME:()=>St,PX_TRANSFORM_PART_KEYS:()=>Ct,PxAnimatedSvgDocumentSchema:()=>Fe,PxAnimationDefinitionSchema:()=>Jt,PxAnimatorConfigSchema:()=>de,PxAnimatorEngine:()=>Ot,PxAnimatorMode:()=>Pt,PxAttrValueSchema:()=>me,PxBezierPathSchema:()=>Le,PxBindingSchema:()=>he,PxCloneEffectSchema:()=>Se,PxDefsSchema:()=>re,PxEasingOrRefSchema:()=>qt,PxEffectsSchema:()=>Ie,PxElementAnimationSchema:()=>$t,PxFillGradientEffectSchema:()=>Oe,PxGradientSpreadMethod:()=>Lt,PxGradientStopSchema:()=>je,PxGradientType:()=>Dt,PxGradientUnits:()=>Ft,PxKeyframeSchema:()=>Zt,PxKeyframeValueSchema:()=>Kt,PxLoopSchema:()=>Xt,PxMaskedByEffectSchema:()=>ke,PxNodeBase:()=>Te,PxNodeSchema:()=>Ne,PxPropertyAnimationSchema:()=>Ht,PxRepeaterEffectSchema:()=>be,PxRetimeEffectSchema:()=>xe,PxStrokeGradientEffectSchema:()=>Me,PxStrokeTrimEffectSchema:()=>we,PxSvgNodeExtra:()=>Ce,PxTextEffectSchema:()=>Ee,PxTextPathEffectSchema:()=>_e,PxTransformByEffectSchema:()=>ye,PxTransformPartsSchema:()=>Yt,PxTransformValueSchema:()=>Qt,PxTriggerSchema:()=>te,STYLE_ATTR_NAMES:()=>U,TRANSFORM_FN_NAMES:()=>D,applyPlayerEffects:()=>Jo,calcAnimationValues:()=>Wn,camelCaseToKebabWordIfNeeded:()=>K,collectSampleTimes:()=>Oi,createAnimator:()=>Yi,createAnimatorImpl:()=>Hi,createBasicFrameLoopAnimator:()=>ci,createFrameLoopAnimator:()=>Ti,createPathSampler:()=>Zr,createWebApiAnimator:()=>Li,describeSchema:()=>wt,diffInEffect:()=>_i,evaluateMotionPathSegment:()=>sn,extendedPathForBrowser:()=>$r,generateNewIds:()=>Ve,getAnimatorConfig:()=>Bt,getBindings:()=>Wt,getChildren:()=>Gt,getDefs:()=>Vt,getNormalizedProps:()=>$e,isPxElementFileFormat:()=>Rt,isPxElementFileFormatDeep:()=>De,jsonElementFactory:()=>eo,layoutGlyphTextChars:()=>So,loadTagAnimators:()=>Qi,materialiseAllInTree:()=>li,materialiseAnimatedUseInstances:()=>Xn,materialiseGlyphText:()=>Fo,materialiseGlyphTextAlongPath:()=>Oo,materialiseGlyphTextHorizontal:()=>xo,materialiseInternalLoopsInPropAnim:()=>Ln,materialiseInternalLoopsInTree:()=>Dn,materialiseMotionPathInPropAnim:()=>fn,materialiseMotionPathsInTree:()=>Sn,normalizeDocument:()=>Un,propAnimIsMotionPath:()=>rn,px:()=>xt,renderNode:()=>Zi,schemaKeys:()=>At,setupAnimationTriggers:()=>Ii,shiftAnimatable:()=>Jr,toRGBA:()=>C,validateNodeEffects:()=>ze,visualModelAt:()=>Mi}),module.exports=(t=d,((t,n,o,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let o of i(n))s.call(t,o)||void 0===o||e(t,o,{get:()=>n[o],enumerable:!(a=r(n,o))||a.enumerable});return t})(e({},"__esModule",{value:!0}),t));var h=Object.defineProperty,m=Object.defineProperties,p=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=Math.pow,k=(t,e,n)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e)=>{for(var n in e||(e={}))g.call(e,n)&&k(t,n,e[n]);if(v)for(var n of v(e))y.call(e,n)&&k(t,n,e[n]);return t},w=(t,e)=>m(t,p(e)),x=(t,e)=>{var n={};for(var r in t)g.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&v)for(var r of v(t))e.indexOf(r)<0&&y.call(t,r)&&(n[r]=t[r]);return n};function S(t,e=!1){var n,r,o,i;const a=t.v,s=t.i,l=t.o,u=t.c;if(!a.length)return"";const c=[],f=a.length;c.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<f;t++){const o=a[t-1],i=null!=(n=null==l?void 0:l[t-1])?n:o,u=null!=(r=null==s?void 0:s[t])?r:a[t],f=a[t];e||i[0]!==o[0]||i[1]!==o[1]||u[0]!==f[0]||u[1]!==f[1]?c.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1]):c.push("L"+f[0]+","+f[1])}if(u&&f>0){const t=a[f-1],n=null!=(o=null==l?void 0:l[f-1])?o:t,r=null!=(i=null==s?void 0:s[0])?i:a[0],u=a[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||c.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),c.push("z")}return c.join("")}function j(t,e,n){return t+(e-t)*n}function P(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=j(t[i]||0,e[i]||0,n);return r}function O(t,e,n){return[j(t[0]||0,e[0]||0,n),j(t[1]||0,e[1]||0,n),j(t[2]||0,e[2]||0,n),j(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function M(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(_(t[i],e[i],n));return o}function _(t,e,n){var r,o,i,a,s,l,u,c,f;if(!t||!e)return t||e||{v:[]};const d=Math.min(Math.max(n,0),1),h=Math.min(t.v.length,e.v.length),m=[],p=[],v=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];m.push(P(f,h,d));const g=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,y=null!=(a=null==(i=e.i)?void 0:i[n])?a:h;p.push(P(g,y,d));const b=null!=(l=null==(s=t.o)?void 0:s[n])?l:f,k=null!=(c=null==(u=e.o)?void 0:u[n])?c:h;v.push(P(b,k,d))}return{v:m,i:p.length?p:void 0,o:v.length?v:void 0,c:null!=(f=t.c)?f:e.c}}function E(t,e,n){if(n<=0)return 0;if(n>=1)return 1;const r=3*t,o=3*(e-t)-r,i=1-r-o;function a(t){return((i*t+o)*t+r)*t}function s(t){return(3*i*t+2*o)*t+r}let l=n,u=0,c=1;for(let t=0;t<8;t++){const t=a(l)-n;if(Math.abs(t)<1e-6)return l;const e=s(l);if(Math.abs(e)<1e-6)break;l-=t/e}for(l=n;u<c;){const t=a(l);if(Math.abs(t-n)<1e-6)return l;n>t?u=l:c=l,l=(c+u)/2}return l}function I(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,s=1-i-a;return function(t){return n=E(e,r,t),((s*n+a)*n+i)*n;var n}}function z(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function T(t,e){if(!t)return{left:void 0,right:void 0};if(e<=0)return{left:void 0,right:t};if(e>=1)return{left:t,right:void 0};const[n,r,o,i]=t,a=E(n,o,e),s=[n,r],l=[o,i],{left:u,right:c}=function(t,e,n,r,o){const i=z(t,e,o),a=z(e,n,o),s=z(n,r,o),l=z(i,a,o),u=z(a,s,o),c=z(l,u,o);return{left:[t,i,l,c],right:[c,u,s,r]}}([0,0],s,l,[1,1],a),f=u[3][0],d=u[3][1];let h,m;f>1e-9&&Math.abs(d)>1e-9&&(h=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const p=1-f,v=1-d;return p>1e-9&&Math.abs(v)>1e-9&&(m=[(c[1][0]-f)/p,(c[1][1]-d)/v,(c[2][0]-f)/p,(c[2][1]-d)/v]),{left:h,right:m}}function N(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function C(t){const e=Math.round(255*t[0]),n=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+e+","+n+","+r+","+t[3]+")":"rgb("+e+","+n+","+r+")"}function F(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const e=t.slice(1),n=e.length<=4,r=n?e[0]+e[0]:e.slice(0,2),o=n?e[1]+e[1]:e.slice(2,4),i=n?e[2]+e[2]:e.slice(4,6),a=4===e.length?e[3]+e[3]:8===e.length?e.slice(6,8):null,s=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==a&&s.push(parseInt(a,16)/255),s}(t):t.startsWith("rgb")?function(t){var e;const n=null==(e=t.match(/rgba?\((.*)\)/))?void 0:e[1];if(!n)throw new Error("Invalid rgb/rgba format");const r=n.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)}}var L=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),D=new Set(["translate","rotate","scale","skew"]),R=new Set(["offset-distance","offsetDistance"]);function B(t,e){var n;if(!t)return"";const r=null==(n=null==e?void 0:e.withUnits)||n,o=[],i=t.translate,a=t.origin,s=t.rotate,l=t.skew,u=t.scale,c=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+c+","+i[1]+c+")"),a&&o.push("translate("+a[0]+c+","+a[1]+c+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),a&&o.push("translate("+-a[0]+c+","+-a[1]+c+")"),o.join("")}var U=new Set(["offset-distance","offsetDistance"]),V=1e3;function W(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function G(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var q=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 K(t){return q.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Z(t,e,n){return Math.max(e,Math.min(t,n))}function X(t,e,n,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,a=i*i,s=o*o,l=a*i,u=3*o*a,c=3*s*i,f=s*o;return[l*t[0]+u*e[0]+c*n[0]+f*r[0],l*t[1]+u*e[1]+c*n[1]+f*r[1]]}var H=1e-4;function Y(t,e,n,r,o){const i=Q(t,e,n,r,o);return 0===i[0]&&0===i[1]?Q(t,e,n,r,o<.5?o+H:o-H):i}function Q(t,e,n,r,o){const i=1-o,a=3*i*i,s=6*o*i,l=3*o*o;return[a*(e[0]-t[0])+s*(n[0]-e[0])+l*(r[0]-n[0]),a*(e[1]-t[1])+s*(n[1]-e[1])+l*(r[1]-n[1])]}function J(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=X(t,e,n,r,0);a[0]=0,s[0]=0;let u=0;for(let c=1;c<i;c++){const i=c/o,f=X(t,e,n,r,i),d=f[0]-l[0],h=f[1]-l[1];u+=Math.sqrt(d*d+h*h),a[c]=i,s[c]=u,l=f}return{ts:a,ds:s}}function $(t,e){const{ts:n,ds:r}=t,o=n.length-1;if(e<=n[0])return r[0];if(e>=n[o])return r[o];let i=1,a=o;for(;i<a;){const t=i+a>>>1;n[t]<e?i=t+1:a=t}const s=n[a-1],l=n[a]-s,u=l>0?(e-s)/l:0;return r[a-1]+u*(r[a]-r[a-1])}function tt(t){return"scroll"===(null==t?void 0:t.timelineSource)}var et="cover";function nt(t,e,n,r){var o;const[i,a]=function(t,e,n){const r=e,o=n;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:et,n,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:e)*(a-i)}function rt(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var ot=class{_canSanitize(t){return this.isValid(t)}optional(){return new it(this)}},it=class extends ot{constructor(t){super(),this.inner=t,this._default=void 0}sanitize(t){if(null!=t)return this.inner._canSanitize(t)?this.inner.sanitize(t):void 0}isValid(t,e,n){return null==t||this.inner.isValid(t,e,n)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},at=class extends ot{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,e,n){return"string"==typeof t||(null==e||e.errors.push(rt(null!=n?n:[])+": expected string, got "+typeof t),!1)}},st=class extends ot{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,e,n){return!("number"!=typeof t||!isFinite(t))||(null==e||e.errors.push(rt(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},lt=class extends ot{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,e,n){return"boolean"==typeof t||(null==e||e.errors.push(rt(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},ut=class extends ot{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,e,n){return t===this.value||(null==e||e.errors.push(rt(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},ct=class extends ot{constructor(t,e){super(),this.values=t,this._default=null!=e?e:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,e,n){return!!this.values.includes(t)||(null==e||e.errors.push(rt(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},ft=class extends ot{constructor(t,e){super(),this.schemas=t,this._kind="union",this._default=null!=e?e:t[0]._default}sanitize(t){for(const e of this.schemas)if(e.isValid(t))return e.sanitize(t);return this._default}isValid(t,e,n){var r;const o=e&&{errors:[],warnings:[],strict:e.strict};return!!this.schemas.some(e=>e.isValid(t,o,n?[...n]:void 0))||(null==e||e.errors.push(rt(null!=n?n:[])+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240)),!1)}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},dt=class extends ot{constructor(t,e,n){super(),this._key=t,this._schemas=e,this._kind="discriminatedUnion",this._default=null!=n?n:e[0]._default,this._map=new Map;for(const n of e){const e=n._shape[t];e&&this._map.set(e._default,n)}}_findSchema(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const e=t[this._key];return null!=e?this._map.get(e):void 0}sanitize(t){var e;return(null!=(e=this._findSchema(t))?e:this._schemas[0]).sanitize(t)}isValid(t,e,n){const r=this._findSchema(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this._key];return null==e||e.errors.push(rt(null!=n?n:[])+": no discriminated union member matched "+this._key+"="+JSON.stringify(r)),!1}return r.isValid(t,e,n)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const e=this._findSchema(t);return e?e._canSanitize(t):this._schemas[0]._canSanitize(t)}},ht=class extends ot{constructor(t){super(),this._shape=t;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n={};for(const t of Object.keys(this._shape))n[t]=this._shape[t].sanitize(e[t]);return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(null==e?void 0:e.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),e.errors.push(rt(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},mt=class extends ot{constructor(t,e){super(),this._shape=t,this._openSchema=e;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const e=t&&"object"==typeof t&&!Array.isArray(t)?t:{},n=A({},e);for(const t of Object.keys(this._shape))n[t]=this._shape[t].sanitize(e[t]);if(this._openSchema)for(const t of Object.keys(e))t in this._shape||(n[t]=this._openSchema.sanitize(e[t]));return n}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=n?n:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],e,o)||(i=!1),o.pop();if(this._openSchema)for(const t of Object.keys(r))t in this._shape||(o.push(t),this._openSchema.isValid(r[t],e,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},pt=class extends ot{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const e=[];for(const n of t)this.item._canSanitize(n)&&e.push(this.item.sanitize(n));return e}isValid(t,e,n){if(!Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected array, got "+typeof t),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<t.length;n++)r.push("["+n+"]"),this.item.isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},vt=class extends ot{constructor(t){super(),this.value=t,this._kind="record",this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const e={};for(const[n,r]of Object.entries(t))this.value._canSanitize(r)&&(e[n]=this.value.sanitize(r));return e}isValid(t,e,n){if(!t||"object"!=typeof t||Array.isArray(t))return null==e||e.errors.push(rt(null!=n?n:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(const[n,i]of Object.entries(t))r.push(n),this.value.isValid(i,e,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},gt=class extends ot{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},yt=class extends ot{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return void 0!==t||(null==e||e.errors.push(rt(null!=n?n:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}},bt=class extends ot{constructor(t,e){super(),this.fn=t,this._default=e,this.resolved=null}get schema(){var t;return null!=(t=this.resolved)?t:this.resolved=this.fn()}sanitize(t){return this.schema.sanitize(t)}isValid(t,e,n){return this.schema.isValid(t,e,n)}_canSanitize(t){return this.schema._canSanitize(t)}},kt=class extends ot{constructor(t){super(),this.schemas=t,this._kind="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.schemas.length?this.schemas.map((e,n)=>e.sanitize(t[n])):this._default}isValid(t,e,n){if(!Array.isArray(t)||t.length!==this.schemas.length)return null==e||e.errors.push(rt(null!=n?n:[])+": expected tuple of length "+this.schemas.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=n?n:[];let o=!0;for(let n=0;n<this.schemas.length;n++)r.push("["+n+"]"),this.schemas[n].isValid(t[n],e,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.schemas.length}};function At(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function wt(t){var e;const n=t;switch(n._kind){case"union":return{kind:"union",members:n.schemas};case"discriminatedUnion":return{kind:"discriminatedUnion",key:n._key,members:n._schemas};case"record":return{kind:"record",value:n.value};case"tuple":return{kind:"tuple",items:n.schemas}}return"_shape"in n?{kind:"shape",shape:n._shape,openValue:n._openSchema}:"item"in n?{kind:"array",item:n.item}:"inner"in n?{kind:"optional",inner:n.inner}:"fn"in n?{kind:"lazy",resolved:null!=(e=n.resolved)?e:n.resolved=n.fn()}:{kind:"leaf"}}var xt={string:(t="")=>new at(t),number:(t=0)=>new st(t),boolean:(t=!1)=>new lt(t),literal:t=>new ut(t),enum:(t,e)=>new ct(t,e),union:(t,e)=>new ft(t,e),discriminatedUnion:(t,e)=>new dt(t,e),object:t=>new ht(t),openObject:(t,e)=>new mt(t,e),extendedObject:(t,e)=>new ht(A(A({},t._shape),e)),array:t=>new pt(t),record:t=>new vt(t),any:()=>new gt,defined:()=>new yt,tuple:t=>new kt(t),lazy:(t,e)=>new bt(t,e)},St="data-px-animation-src",jt="_px_animator",Pt={auto:"auto",waapi:"waapi",frames:"frames"},Ot={waapi:Pt.waapi,frames:Pt.frames},Mt={before:"before",after:"after"},_t="userSpaceOnUse",Et="objectBoundingBox",It={separate:"separate",combined:"combined"},zt="text",Tt="textContent",Nt=new Set(["type","children","animator","meta","animate","effects",zt,Tt]),Ct=["translate","rotate","scale","origin"],Ft={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},Lt={pad:"pad",reflect:"reflect",repeat:"repeat"},Dt={linear:"linear",radial:"radial"};function Rt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function Bt(t){var e;const n=(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator);return n?function(t){const e=t.timeline;if(null==e||"object"!=typeof e)return t;const n=Ut.get(t);if(n)return n;const r=t,{timeline:o}=r,i=x(r,["timeline"]);if("scroll"===e.type||"view"===e.type){i.timelineSource="scroll",void 0!==e.duration&&(i.duration=e.duration),void 0!==e.iterations&&(i.iterations=e.iterations);const t=A({},i.scroll||{});t.kind=e.type,void 0!==e.engine&&(t.driver=e.engine),void 0!==e.axis&&(t.axis=e.axis),void 0!==e.source&&(t.source=e.source),void 0!==e.subject&&(t.subject=e.subject),void 0!==e.smoothing&&(t.smoothing=e.smoothing),void 0!==e.range&&(t.range=e.range);const n=e.pin;"boolean"==typeof n?t.pin=n:n&&"object"==typeof n&&(t.pin=!0,void 0!==n.align&&(t.pinAlign=n.align),void 0!==n.top&&(t.pinTop=n.top),void 0!==n.distance&&(t.pinDistance=n.distance)),i.scroll=t}else{if(void 0!==e.duration&&(i.duration=e.duration),void 0!==e.trigger){const t=e.trigger,{onFinish:n}=t,r=x(t,["onFinish"]);Object.keys(r).length&&(i.trigger=r),void 0!==n&&(i.resetOnFinish="reset"===n)}void 0!==e.delay&&(i.delay=e.delay),void 0!==e.iterations&&(i.iterations=e.iterations),void 0!==e.direction&&(i.direction=e.direction),void 0!==e.fill&&(i.fill=e.fill)}return Ut.set(t,i),i}(n):void 0}var Ut=new WeakMap;function Vt(t){var e;if(t)return null==(e=Bt(t))?void 0:e.definitions}function Wt(t){var e;if(!t)return;const n=null==(e=Bt(t))?void 0:e.animateById;return n?Object.entries(n).map(([t,e])=>({id:t.startsWith("#")?t.slice(1):t,animate:e})):void 0}function Gt(t){return null==t?void 0:t.children}var qt=xt.union([xt.string(),xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])]),Kt=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({path:xt.string()}),xt.lazy(()=>xt.object({paths:xt.array(Le)}),{paths:[]}),xt.lazy(()=>xt.array(je),[]),xt.lazy(()=>Yt,{})]),Zt=xt.object({time:xt.number().optional(),value:Kt.optional(),easing:qt.optional(),tangentOut:xt.tuple([xt.number(),xt.number()]).optional(),tangentIn:xt.tuple([xt.number(),xt.number()]).optional()}),Xt=xt.object({segmentCount:xt.number().optional(),extend:xt.enum([Mt.before,Mt.after]).optional(),alternate:xt.boolean().optional()}),Ht=xt.object({value:Kt.optional(),keyframes:xt.array(Zt).optional(),loop:xt.union([Xt,xt.boolean()]).optional(),autoOrient:xt.boolean().optional()}),Yt=xt.object({translate:xt.tuple([xt.number(),xt.number()]).optional(),rotate:xt.number().optional(),skew:xt.number().optional(),scale:xt.tuple([xt.number(),xt.number()]).optional(),origin:xt.tuple([xt.number(),xt.number()]).optional()}),Qt=xt.union([xt.string(),Yt,xt.object({value:Yt}),Ht]),Jt=xt.record(Ht),$t=xt.union([xt.string(),xt.array(xt.union([xt.string(),Jt])),Jt]),te=xt.object({startOn:xt.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:xt.enum(["continue","pause","reset","reverse"]).optional(),onFinish:xt.enum(["hold","reset"]).optional(),scrollIntoViewThreshold:xt.number().optional()}),ee=xt.object({width:xt.number(),d:xt.string()}),ne=xt.object({fontFamily:xt.string(),fontStyle:xt.string(),ascent:xt.number(),unitsPerEm:xt.number(),glyphs:xt.record(ee)}),re=xt.object({easings:xt.record(xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])).optional(),animations:xt.record(Jt).optional(),styles:xt.record(xt.record(xt.union([xt.string(),xt.number()]))).optional(),glyphs:xt.record(ne).optional()}),oe=xt.object({phase:xt.enum(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:xt.number().optional()}),ie=xt.object({start:oe.optional(),end:oe.optional()}),ae=(xt.object({driver:xt.enum(["custom","native"]).optional(),kind:xt.enum(["view","scroll"]).optional(),axis:xt.enum(["block","inline","x","y"]).optional(),source:xt.enum(["nearest","root"]).optional(),subject:xt.string().optional(),smoothing:xt.number().optional(),pin:xt.boolean().optional(),pinAlign:xt.enum(["top","center","bottom"]).optional(),pinTop:xt.number().optional(),pinDistance:xt.number().optional(),range:ie.optional()}),xt.object({align:xt.enum(["top","center","bottom"]).optional(),top:xt.number().optional(),distance:xt.number().optional()})),se=xt.object({type:xt.literal("clock"),duration:xt.number().optional(),trigger:te.optional(),delay:xt.number().optional(),iterations:xt.union([xt.number(),xt.literal("infinite")]).optional(),fill:xt.enum(["forwards","backwards","both","none"]).optional(),direction:xt.enum(["normal","reverse","alternate","alternate-reverse"]).optional()}),le={duration:xt.number().optional(),iterations:xt.number().optional(),engine:xt.enum(["custom","native"]).optional(),axis:xt.enum(["block","inline","x","y"]).optional(),source:xt.enum(["nearest","root"]).optional(),subject:xt.string().optional(),smoothing:xt.number().optional(),pin:xt.union([xt.boolean(),ae]).optional(),range:ie.optional()},ue=xt.object(A({type:xt.literal("scroll")},le)),ce=xt.object(A({type:xt.literal("view")},le)),fe=xt.discriminatedUnion("type",[se,ue,ce]),de=xt.object({mode:xt.enum([Pt.auto,Pt.waapi,Pt.frames]).optional(),frameRate:xt.number().optional(),timeline:fe.optional(),definitions:re.optional(),animateById:xt.record($t).optional(),debugInstName:xt.string().optional()}),he=xt.object({id:xt.string(),animate:$t}),me=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({value:xt.defined()}),Yt]),pe=xt.union([xt.number(),Ht,xt.object({value:xt.number()})]),ve=xt.union([xt.tuple([xt.number(),xt.number()]),Ht,xt.object({value:xt.tuple([xt.number(),xt.number()])})]),ge=xt.union([xt.string(),Ht,xt.object({value:xt.string()})]),ye=xt.object({translate:ve.optional(),rotate:pe.optional(),scale:ve.optional(),skew:pe.optional(),origin:ve.optional()}),be=xt.object({copies:xt.number().optional(),translate:ve.optional(),rotate:pe.optional(),skew:pe.optional(),scale:ve.optional(),origin:ve.optional()}),ke=xt.object({sourceId:xt.string().optional(),maskType:xt.enum(["luminance","alpha"]).optional(),maskUnits:xt.enum([_t,Et]).optional(),maskContentUnits:xt.enum([_t,Et]).optional(),x:xt.number().optional(),y:xt.number().optional(),width:xt.number().optional(),height:xt.number().optional()}),Ae=xt.object({d:ge.optional()}),we=xt.object({offset:pe.optional(),range:ve.optional(),subPaths:xt.enum([It.separate,It.combined]).optional()}),xe=xt.object({start:xt.number().optional(),stretch:xt.number().optional(),timeCrop:xt.tuple([xt.number(),xt.number()]).optional()}),Se=xt.object({type:xt.enum(["content"]).optional(),sourceId:xt.string().optional(),retime:xe.optional()}),je=xt.object({offset:xt.number(),color:xt.string()}),Pe=xt.union([xt.array(je),xt.object({value:xt.array(je)}),Ht]),Oe=xt.object({type:xt.enum([Dt.linear,Dt.radial]),start:ve.optional(),end:ve.optional(),center:ve.optional(),radius:pe.optional(),focal:ve.optional(),stops:Pe.optional(),gradientUnits:xt.enum([Ft.userSpaceOnUse,Ft.objectBoundingBox]).optional(),spreadMethod:xt.enum([Lt.pad,Lt.reflect,Lt.repeat]).optional(),gradientTransform:xt.string().optional()}),Me=Oe,_e=xt.object({path:xt.string(),pathOverflow:xt.enum(["clip","extend"]).optional(),lengthAdjust:xt.enum(["spacing","spacingAndGlyphs"]).optional(),method:xt.enum(["align","stretch"]).optional(),spacing:xt.enum(["auto","exact"]).optional(),startOffset:pe.optional(),textLength:pe.optional()}),Ee=xt.object({useGlyphs:xt.boolean().optional()}),Ie=xt.object({transformBy:ye.optional(),repeater:be.optional(),maskedBy:ke.optional(),clipPath:Ae.optional(),strokeTrim:we.optional(),clone:Se.optional(),fillGradient:Oe.optional(),strokeGradient:Me.optional(),textPath:_e.optional(),text:Ee.optional()});function ze(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Ie.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)n.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,e)=>r(t,o+".children["+e+"]"))};return r(t,"root"),n}var Te=xt.openObject({type:xt.string(),id:xt.string().optional(),meta:xt.any().optional(),effects:Ie.optional(),animate:$t.optional(),style:xt.union([xt.string(),xt.record(xt.union([xt.string(),xt.number()]))]).optional()},me),Ne=xt.openObject(w(A({},Te._shape),{children:xt.lazy(()=>xt.array(Ne),[]).optional()}),me),Ce=xt.object({width:xt.union([xt.number(),xt.string()]).optional(),height:xt.union([xt.number(),xt.string()]).optional(),viewBox:xt.string().optional(),animator:de.optional()}),Fe=xt.openObject(w(A(A({},Te._shape),Ce._shape),{type:xt.literal("svg"),children:xt.array(Ne).optional()}),me),Le=xt.object({v:xt.array(xt.array(xt.number())),i:xt.array(xt.array(xt.number())).optional(),o:xt.array(xt.array(xt.number())).optional(),c:xt.boolean().optional()});function De(t){const e=Fe.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}var Re=0;function Be(){return"_px_"+Date.now().toString(36)+(++Re).toString(36)+Math.random().toString(36).substring(2,6)}function Ue(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>Ue(t));const e=t,n={};for(const t of Object.keys(e))n[t]=Ue(e[t]);return n}function Ve(t){var e,n;const r=Ue(t),o=new Map,i=new Set(["href","xlink:href"]),a=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(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=Be();o.set(t,n),e.id=n}else e.animate&&(e.id=Be());if(Array.isArray(e.children))for(const n of e.children)t(n)}}(r),function t(e){if(e&&"object"==typeof e)for(const[n,r]of Object.entries(e))if("children"!==n)if("string"==typeof r)if(i.has(n)&&r.startsWith("#")){const t=r.slice(1),i=o.get(t);i&&(e[n]="#"+i)}else if(a.has(n))e[n]=We(r,o);else if(s.has(n)){const t=r.startsWith("#"),i=o.get(t?r.slice(1):r);i&&(e[n]=t?"#"+i:i)}else r.includes("url(#")&&(e[n]=We(r,o));else if("style"===n&&"object"==typeof r&&null!==r)for(const[t,e]of Object.entries(r))"string"==typeof e&&(r[t]=We(e,o));else"object"==typeof r&&null!==r&&t(r);else if(Array.isArray(r))for(const e of r)t(e)}(r);const l=null==(e=r.animator)?void 0:e.animateById;if(l&&"object"==typeof l){const t={};for(const[e,r]of Object.entries(l)){const i=e.startsWith("#"),a=i?e.slice(1):e,s=null!=(n=o.get(a))?n:a;t[i?"#"+s:s]=r}r.animator=w(A({},r.animator),{animateById:t})}return r}function We(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var Ge=new Set(["script","foreignobject"]),qe=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Ke=new Set(["href","xlink:href","src"]),Ze=new Set(["mixBlendMode","isolation"]),Xe=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,He=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Ye=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Qe=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Je(t,e){const n=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(n)){if("fill"===n||"stroke"===n||"stopcolor"===n){const t=String(e);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+n+'" blocked: url() must be internal url(#id), got:',e):e}if(qe.has(n)){const t=String(e);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||Ke.has(n)&&(Xe.test(t)||He.test(t)||function(t){const e=Ye.exec(t);return!!e&&Qe.some(t=>e[1].startsWith(t))}(t))?e:void console.warn('Attribute "'+n+'" blocked: must be #id, url(#id), or data:image/… URI, got:',e)}return e}console.warn("Attribute blocked (event handler / dangerous): ",n)}function $e(t){const e={};for(const n of Object.keys(t)){const r=W(n);if(Nt.has(r))continue;if("style"===r)continue;let o=t[n];if(L.has(r)&&Array.isArray(o))e[r]=C(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)D.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e.transform=r+"("+o+")"):Array.isArray(o)?e[r]=o.join(","):null!=o&&(e[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;e.transform=B(t,{withUnits:!1})}}return e}function tn(t){var e;const n=null!=(e=t.value)?e:t.v;if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const r=n.translate;return Array.isArray(r)&&r.length>=2?[r[0],r[1]]:void 0}function en(t){var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0}function nn(t){var e;return null!=(e=t.easing)?e:t.e}function rn(t){var e,n;const r=t.keyframes;if(!Array.isArray(r))return!1;if(t.autoOrient)return!0;for(const t of r)if((null!=(e=t.tangentIn)?e:t.ti)||(null!=(n=t.tangentOut)?n:t.to))return!0;return!1}var on=new WeakMap;function an(t,e,n,r){var o,i;let a=on.get(t);const s=null==a?void 0:a.get(e);if(s)return s;const l=null!=(o=t.tangentOut)?o:t.to,u=null!=(i=e.tangentIn)?i:e.ti,c=[n[0]+(l?l[0]:0),n[1]+(l?l[1]:0)],f=[r[0]+(u?u[0]:0),r[1]+(u?u[1]:0)],d=J(n,c,f,r),h={P0:n,P1:c,P2:f,P3:r,lut:d,totalArc:d.ds[d.ds.length-1]};return a||(a=new WeakMap,on.set(t,a)),a.set(e,h),h}function sn(t,e,n,r,o,i){const a=an(t,e,n,r),s=0===a.totalArc?o:function(t,e){const n=e*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(n<=0)return r[0];if(n>=o[i])return r[i];let a=1,s=i;for(;a<s;){const t=a+s>>>1;o[t]<n?a=t+1:s=t}const l=o[s-1],u=o[s]-l,c=u>0?(n-l)/u:0;return r[s-1]+c*(r[s]-r[s-1])}(a.lut,o),l=X(a.P0,a.P1,a.P2,a.P3,s);if(!i)return{translate:l};const u=Y(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(u[1],u[0])/Math.PI}}var ln=.5,un=5,cn=32;function fn(t,e){var n,r,o;if(!rn(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const a=!!t.autoOrient,s=null!=(n=null==e?void 0:e.flatnessTolerance)?n:ln,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:un,u=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:cn,c=[],f=tn(i[0]);if(!f)return t;const d=a?function(t,e){const n=tn(t),r=tn(e);if(!n||!r)return 0;const o=an(t,e,n,r),i=Y(o.P0,o.P1,o.P2,o.P3,0);return 180*Math.atan2(i[1],i[0])/Math.PI}(i[0],i[1]):void 0;c.push(hn(en(i[0]),vn(mn(i[0]),mn(i[0]),0,f,d,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=tn(e),o=tn(n);r&&o?(a&&t>0&&yn(c,e,n,r,o,l),kn(c,e,n,r,o,a,s,l,u)):c.push(hn(en(n),vn(mn(n),mn(n),1,null!=o?o:[0,0],void 0,a)))}const h=nn(i[i.length-1]);h&&(c[c.length-1].e=h),a&&dn(c);const m={keyframes:c};return void 0!==t.loop&&(m.loop=t.loop),m}function dn(t){var e;let n;for(const r of t){const t=null!=(e=r.v)?e:r.value;if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let o=t.rotate;for(;o-n>180;)o-=360;for(;o-n<-180;)o+=360;t.rotate=o,n=o}}function hn(t,e){return{t:t,v:e}}function mn(t){var e;const n=null!=(e=t.value)?e:t.v;if(n&&"object"==typeof n&&!Array.isArray(n))return n}function pn(t,e,n){if(void 0===t)return e;if(void 0===e)return t;if("number"==typeof t&&"number"==typeof e)return t+(e-t)*n;if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,a="number"==typeof e[o]?e[o]:0;r[o]=i+(a-i)*n}return r}return n<.5?t:e}function vn(t,e,n,r,o,i){const a={translate:r},s=new Set;if(t)for(const e of Object.keys(t))s.add(e);if(e)for(const t of Object.keys(e))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==e?void 0:e[r];void 0===o&&void 0===s||(a[r]=pn(o,s,n))}return void 0!==o&&(a.rotate=o+gn(t,e,n)),a}function gn(t,e,n){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==e?void 0:e.rotate)?e.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=pn(r,o,n);return"number"==typeof i?i:0}function yn(t,e,n,r,o,i){var a;const s=t[t.length-1],l=null!=(a=s.v)?a:s.value,u=null==l?void 0:l.rotate;if("number"!=typeof u)return;const c=mn(e),f=u-gn(c,c,0),d=an(e,n,r,o),h=Y(d.P0,d.P1,d.P2,d.P3,0),m=180*Math.atan2(h[1],h[0])/Math.PI,p=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(m,f);if(Math.abs(p)<=i)return;const v=en(e),g=Math.min(v+bn,(v+en(n))/2),y=vn(mn(e),mn(e),0,r,m,!0);t.push(hn(g,y))}var bn=.05;function kn(t,e,n,r,o,i,a,s,l){const u=an(e,n,r,o),c=en(e),f=en(n),d=nn(e),h=(m=d)?I([m[1],m[0],m[3],m[2]]):t=>t;var m;const p=mn(e),v=mn(n),g=function(t,e,n,r,o){const i=[];An(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),An(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,e)=>t-e);const a=[0];for(const t of i)t>a[a.length-1]+1e-6&&t<.999999&&a.push(t);a.push(1);const s=[],l={remaining:o-a.length};for(let o=0;o<a.length-1;o++)wn(a[o],a[o+1],s,t,e,n,r,l);return s}(u,i,a,s,l),y=[];for(const t of g){const e=$(u.lut,t),n=Z(u.totalArc>0?e/u.totalArc:t,0,1),r={u:Z(h(n),0,1),p:n,pos:X(u.P0,u.P1,u.P2,u.P3,t)};if(i){const e=Y(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}y.push(r)}let b=d,k=0;const A=t.length-1;for(let e=0;e<y.length;e++){const n=y[e],r=k<1?Z((n.u-k)/(1-k),0,1):1,{left:o,right:a}=T(b,r),s=0===e?A:t.length-1;o?t[s].e=o:delete t[s].e;const l=c+n.u*(f-c),u=vn(p,v,n.p,n.pos,n.rotateDeg,i);t.push(hn(l,u)),b=a,k=n.u}}function An(t,e,n,r,o){const i=e-t,a=n-e,s=i-2*a+(r-n),l=2*(a-i),u=i;if(Math.abs(s)<1e-10){if(Math.abs(l)>1e-10){const t=-u/l;t>1e-6&&t<.999999&&o.push(t)}return}const c=l*l-4*s*u;if(c<0)return;const f=Math.sqrt(c),d=(-l-f)/(2*s),h=(-l+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),h>1e-6&&h<.999999&&o.push(h)}function wn(t,e,n,r,o,i,a,s){const l=(t+e)/2,u=X(r.P0,r.P1,r.P2,r.P3,t),c=X(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=X(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=X(r.P0,r.P1,r.P2,r.P3,l),m=X(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(xn(d,u,c),xn(h,u,c),xn(m,u,c));let v=!0;if(o){const n=Y(r.P0,r.P1,r.P2,r.P3,t),o=Y(r.P0,r.P1,r.P2,r.P3,e),i=180*Math.atan2(n[1],n[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let l=Math.abs(i-s);l>180&&(l=360-l),l>a&&(v=!1)}p<=i&&v||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,wn(t,l,n,r,o,i,a,s),wn(l,e,n,r,o,i,a,s))}function xn(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],i=r*r+o*o;if(i<1e-20){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}const a=(t[0]-e[0])*o-(t[1]-e[1])*r;return Math.abs(a)/Math.sqrt(i)}function Sn(t,e){const n=jn(t,e);return null!=n?n:t}function jn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=jn(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,n=t.transform;if(n&&"object"==typeof n&&rn(n)){const o=fn(n,e);o!==n&&(r=w(A({},t),{transform:o}))}}if(!n&&!r)return null;const i=A({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Pn=1;function On(t,e){if(t===e)return!0;if(typeof t!=typeof e||null===t||null===e||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(e))return!1;const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(n=>On(t[n],e[n]))}function Mn(t){const e=[];let n;const r=function(t){const e=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),n=[];let r=null;for(const t of e)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},n.push(r);else if(r){const e=+t;r.values.push(Number.isNaN(e)?0:e)}return n}(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;n={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},e.push(n);continue}if(n||(n={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},e.push(n)),"L"===r){const t=o[0]||0,e=o[1]||0;n.v.push([t,e]),n.i.push([t,e]),n.o.push([t,e])}else if("C"===r){const t=o[0]||0,e=o[1]||0,r=o[2]||0,i=o[3]||0,a=o[4]||0,s=o[5]||0;n.o[n.o.length-1]=[t,e],n.v.push([a,s]),n.i.push([r,i]),n.o.push([a,s])}else"Z"===r||"z"===r?n.c=!0:console.warn('Unsupported path command "'+r+'"')}return e}function _n(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function En(t){return"string"==typeof t&&void 0!==_n(t)}function In(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=_n(t.path);return e?{paths:Mn(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&En(e[0])){const t=[];for(const n of e){const e=_n(n);e&&t.push(...Mn(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&En(t[0])){const e=[];for(const n of t){const t=_n(n);t&&e.push(...Mn(t))}return{paths:e}}return{paths:t}}return En(t)?{paths:Mn(_n(t))}:t}function zn(t,e){var n;if(t)return Array.isArray(t)?t:(null==(n=null==e?void 0:e.easings)?void 0:n[t])?e.easings[t]:void console.warn("Unknown easing name: "+t)}function Tn(t,e){var n;if("string"==typeof t){const r=null==(n=null==e?void 0:e.animations)?void 0:n[t];return r||console.warn("Unknown animation name: "+t),r}return t}function Nn(t,e,n,r){var o,i;return"d"===t?{paths:M(null!=(o=null==e?void 0:e.paths)?o:Array.isArray(e)?e:[],null!=(i=null==n?void 0:n.paths)?i:Array.isArray(n)?n:[],r)}:L.has(t)?O(e||[0,0,0,1],n||[0,0,0,1],r):"transform"!==t||"object"!=typeof e||null===e||Array.isArray(e)||"object"!=typeof n||null===n||Array.isArray(n)?"rotate"===t&&"number"==typeof e&&"number"==typeof n?j(e,n,r):D.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?P(e||[],n||[],r):j(+(e||0),+(n||0),r):function(t,e,n){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=e?e:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],a=null==e?void 0:e[i];if("rotate"===i||"skew"===i)o[i]=j(+(null!=r?r:0),+(null!=a?a:0),n);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=P(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function Cn(t,e,n,r){var o,i,a,s,l;const u=e.length-1,c=Z(null!=(o=n.segmentCount)?o:u,1,u);let f;f=n.extend===Mt.before?e.slice(0,c+1):e.slice(u-c);const d=null!=(i=e[0].t)?i:0,h=null!=(a=e[e.length-1].t)?a:0;let m,p;n.extend===Mt.before?(m=0,p=d):(m=h,p=r);const v=p-m;if(v<=0)return e;const g=null!=(s=f[0].t)?s:0,y=(null!=(l=f[f.length-1].t)?l:0)-g;if(y<=0)return e;const b=f.map(t=>{var e,n;return{relT:(t.t-g)/y,v:t.v,e:t.e,tangentIn:null!=(e=t.tangentIn)?e:t.ti,tangentOut:null!=(n=t.tangentOut)?n:t.to}}),k=Math.floor(v/y),x=v-k*y,S=x/y,j=[],P=n.extend!==Mt.before,O=e[e.length-1];let M,_=!1;function E(e,n,r){var o;let i;if(n){i=[];for(let t=b.length-1;t>=0;t--)i.push({relT:1-b[t].relT,v:b[t].v,e:t>0?N(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else i=b;const a=void 0!==r?r:1;for(let n=0;n<i.length;n++){const r=i[n];if(r.relT>a+1e-9){const o=i[n-1],s=r.relT-o.relT,l=(a-o.relT)/s,u=o.e?I(o.e)(l):l,c=Nn(t,o.v,r.v,u),{left:f}=T(o.e,l);return j.length>0&&o.relT<=a&&(j[j.length-1].e=f),void j.push({t:e+a*y,v:c,e:void 0})}const s=j.length>0?j[j.length-1]:O,l=P&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*y))<1e-9;if(l){if(On(s.v,r.v)){j.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(M=r.e,_=!0);continue}j.length>0&&(delete s.tangentIn,delete s.tangentOut)}const u={t:e+r.relT*y+(l?Pn:0),v:r.v,e:n<i.length-1?r.e:void 0};r.tangentIn&&(u.tangentIn=r.tangentIn),r.tangentOut&&(u.tangentOut=r.tangentOut),j.push(u)}}if(n.extend===Mt.before){S>1e-9&&function(e,n,r){let o;if(n){o=[];for(let t=b.length-1;t>=0;t--)o.push({relT:1-b[t].relT,v:b[t].v,e:t>0?N(b[t-1].e):void 0,tangentIn:b[t].tangentOut,tangentOut:b[t].tangentIn})}else o=b;const i=1-r;for(let n=0;n<o.length;n++){const r=o[n];if(r.relT<i-1e-9)continue;const a=o[n-1];if(a&&a.relT<i-1e-9&&r.relT>i+1e-9){const n=r.relT-a.relT,o=(i-a.relT)/n,s=a.e?I(a.e)(o):o,l=Nn(t,a.v,r.v,s),{right:u}=T(a.e,o);j.push({t:e,v:l,e:u})}const s={t:e+(r.relT-i)*y,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),j.push(s)}}(m,!!n.alternate&&k%2==0,S);for(let t=0;t<k;t++){const e=k-1-t,r=!!n.alternate&&e%2==0;E(m+x+t*y,r)}}else{for(let t=0;t<k;t++){const e=!!n.alternate&&t%2==0;E(m+t*y,e)}if(S>1e-9){const t=!!n.alternate&&k%2==0;E(m+k*y,t,S)}}return n.extend===Mt.before?[...j,...e]:_&&e.length>0?[...e.slice(0,-1),w(A({},e[e.length-1]),{e:M}),...j]:[...e,...j]}function Fn(t,e,n,r){var o,i,a,s,l,u,c;const f=e.keyframes||[],d=[];for(const e of f){const n=null!=(i=null!=(o=e.time)?o:e.t)?i:0;let f=null!=(a=e.value)?a:e.v;const h=null!=(s=e.easing)?s:e.e;"d"===t&&(f=In(f));const m=G(t)?K(t):t;L.has(m)&&(f=null!=(l=F(f))?l:f);const p={t:n,v:f,e:zn(h,r)},v=null!=(u=e.tangentIn)?u:e.ti,g=null!=(c=e.tangentOut)?c:e.to;v&&(p.tangentIn=v),g&&(p.tangentOut=g),d.push(p)}d.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const h=e.loop,m=!0===h?{}:h||void 0;return m&&d.length>=2?Cn(t,d,m,n):d}function Ln(t,e,n){const r=e.loop;if(null==r||!1===r)return e;const o=!0===r?{}:r,i=e.keyframes;if(!Array.isArray(i)||i.length<2)return e;const a=G(t)?K(t):t,s=L.has(a),l=i.map(e=>{var n,r,o,i,a,l,u,c;const f=null!=(n=e.t)?n:e.time;let d=null!=(r=e.v)?r:e.value;"d"===t&&(d=In(d)),s&&(d=null!=(o=F(d))?o:d);const h={t:f,v:d,e:null!=(i=e.e)?i:e.easing};return(null!=(a=e.tangentIn)?a:e.ti)&&(h.tangentIn=null!=(l=e.tangentIn)?l:e.ti),(null!=(u=e.tangentOut)?u:e.to)&&(h.tangentOut=null!=(c=e.tangentOut)?c:e.to),h}),u={keyframes:Cn(t,l,o,n)};return void 0!==e.autoOrient&&(u.autoOrient=e.autoOrient),u}function Dn(t,e){const n=Rn(t,e);return null!=n?n:t}function Rn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Rn(t.children[r],e);null!==o&&(n||(n=t.children.slice()),n[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const n of Object.keys(t)){const o=t[n],i=Ln(n,o,e);i!==o&&(r||(r=A({},t)),r[n]=i)}}if(!n&&!r)return null;const i=A({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Bn=0;function Un(t,e=Ot.waapi){const n=Bt(t)||{},r=Vt(t),o=n.duration||1e3,i=[],a=(t,n,i)=>{if(!n)return null;const a=function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=Tn(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=Tn(r,e);t&&n.push(t)}else n.push(t);return n}(n,r);if(0===a.length)return null;const s=function(t,e,n,r=Ot.waapi){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=Fn(i,a,e,n);if(s.length>0){const t={keyframes:s};void 0!==a.autoOrient&&(t.autoOrient=a.autoOrient),void 0!==a.loop&&(t.loop=a.loop),o[i]=r===Ot.waapi&&"transform"===i?fn(t):t}}return o}(function(t,e){if(!t)return t;const n=e&&"object"==typeof e&&!Array.isArray(e)?e:function(t){var e,n;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let a,s=-1;for(;null!==(a=o.exec(t));){const t=a[1],o=i.indexOf(t);if(o<0||o<=s)return;s=o;const l=a[2].split(/[\s,]+/).filter(Boolean).map(Number);if(l.some(t=>Number.isNaN(t)))return;if("translate"===t){if(l.length<1||l.length>2)return;r.translate=[l[0],null!=(e=l[1])?e:0]}else if("rotate"===t){if(1!==l.length)return;r.rotate=l[0]}else if("skewX"===t){if(1!==l.length)return;r.skew=l[0]}else{if(l.length<1||l.length>2)return;r.scale=[l[0],null!=(n=l[1])?n:l[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}(e);if(!n||!Object.keys(n).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?A(A({},n),t):t,o=t.transform;if(o&&"object"==typeof o){const e=o;if(Array.isArray(e.keyframes)){const n=w(A({},e),{keyframes:e.keyframes.map(t=>w(A({},t),{value:r(t.value)}))});return void 0!==n.value&&(n.value=r(n.value)),w(A({},t),{transform:n})}return t}const i=Object.keys(t).filter(t=>D.has(t));if(1!==i.length)return t;const a=i[0],s=t[a];if(!s||"object"!=typeof s||!Array.isArray(s.keyframes))return t;const l=w(A({},s),{keyframes:s.keyframes.map(t=>w(A({},t),{value:w(A({},n),{[a]:t.value})}))});void 0!==l.value&&(l.value=w(A({},n),{[a]:l.value}));const u=A({},t);return delete u[a],w(A({},u),{transform:l})}(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(a),i),o,r,e);return 0===Object.keys(s).length?null:{id:t,animate:s}},s=Wt(t);if(s)for(const t of s){const e=a(t.id,t.animate);e&&i.push(e)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++Bn;t.id=n;const r=a(n,e,t.transform);r&&i.push(r)}if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e])};if(t.children)for(let e=0;e<t.children.length;e++)l(t.children[e]);return i}function Vn(t,e,n){var r,o,i,a,s,l,u;const c=e.keyframes||[];if(0===c.length)return null;const{prevKf:f,nextKf:d}=function(t,e){var n,r;const o=t.length-1;let i=t[0],a=t[o>0?1:0];for(let s=0;s<o;s++){const l=null!=(n=t[s].t)?n:0,u=null!=(r=t[s+1].t)?r:0;if(l<=e&&e<=u){i=t[s],a=t[s+1];break}e>u&&s===o-1&&(i=t[o>0?o-1:0],a=t[o])}return{prevKf:i,nextKf:a}}(c,n);let h=f===d?0:(m=n,p=null!=(r=f.t)?r:0,(v=null!=(o=d.t)?o:0)===p?0:0+(m-p)/(v-p)*1);var m,p,v;h=Z(h,0,1);const g=null!=(i=f.e)?i:f.easing;if(g&&Array.isArray(g))try{h=I(g)(h)}catch(t){}let y=G(t)?K(t):t,b=null;const k=null!=(a=null==f?void 0:f.v)?a:null==f?void 0:f.value,A=null!=(s=null==d?void 0:d.v)?s:null==d?void 0:d.value;if("d"===y)b=M(null!=(l=null==k?void 0:k.paths)?l:Array.isArray(k)?k:[],null!=(u=null==A?void 0:A.paths)?u:Array.isArray(A)?A:[],h).map(t=>S(t)).join("");else if(L.has(y))b=C(O(k||[0,0,0,1],A||[0,0,0,1],h)),y=t;else if("stroke-dasharray"===y)b=P(k||[],A||[],h).join(" "),y=t;else if("transform"!==y||null===k||"object"!=typeof k||Array.isArray(k))"translate"===y?(b="translate("+P(k||[0,0],A||[0,0],h).join(",")+")",y="transform"):"rotate"===y?(b="rotate("+j(+(k||0),+(A||0),h)+")",y="transform"):"scale"===y?(b="scale("+P(k||[1,1],A||[1,1],h).join(",")+")",y="transform"):b=j(+(k||0),+(A||0),h);else{const t=new Set([...k?Object.keys(k):[],...A?Object.keys(A):[]]),n={};for(const e of t){const t=null==k?void 0:k[e],r=null==A?void 0:A[e];if("rotate"===e||"skew"===e)n[e]=j(+(null!=t?t:0),+(null!=r?r:0),h);else if("translate"===e||"scale"===e||"origin"===e){const o="scale"===e?[1,1]:[0,0],i=P(t||o,r||o,h);n[e]=i}}if(rn(e)){const t=k.translate,r=A.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=sn(f,d,[+t[0],+t[1]],[+r[0],+r[1]],h,!!e.autoOrient);n.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(n.rotate=o.rotateDeg)}}b=B(n,{withUnits:!1}),y="transform"}return R.has(y)&&"number"==typeof b&&(b=100*b+"%"),{k:y,v:null===b?"":""+b}}function Wn(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=Vn(r,o,e);t&&(n[t.k]=t.v)}return n}function Gn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Gn);const e={};for(const n of Object.keys(t))e[n]=Gn(t[n]);return e}function qn(t,e){const n=new Map,r=t=>{var o;if("string"==typeof t.id){const r=e();n.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t}),i=t=>{var e;if("string"==typeof t.href&&t.href.startsWith("#")){const e=n.get(t.href.slice(1));e&&(t.href="#"+e)}for(const e of Object.keys(t)){if("children"===e||"effects"===e||"meta"===e||"animate"===e||"href"===e||"id"===e)continue;const n=t[e];"string"==typeof n&&-1!==n.indexOf("url(#")&&(t[e]=o(n))}null==(e=t.children)||e.forEach(i)};return i(t),n}function Kn(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Zn(t){var e;const n=Kn(t.x),r=Kn(t.y);if(delete t.x,delete t.y,!n&&!r)return t;const o="translate("+n+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const n={type:"g",transform:o,children:null!=(e=t.children)?e:[]};t.children=[n]}else t.transform=o;return t}function Xn(t){var e;const n=function(t){const e=new Map,n=t=>{var r;"string"==typeof t.id&&e.set(t.id,t),null==(r=t.children)||r.forEach(n)};return n(t),e}(t),r=function(t,e){const n=new WeakMap,r=new Set,o=(t,r)=>{const i=n.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let a=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const e in t.animate){a=!0;break}if(!a&&t.children)for(const e of t.children)if(o(e,r)){a=!0;break}if(!a&&"use"===t.type&&"string"==typeof t.href){const n=Yn(t.href),i=n?e.get(n):void 0;i&&(a=o(i,r))}return r.delete(t),n.set(t,a),a};for(const[t,n]of e)o(n,new Set)&&r.add(t);return r}(0,n);if(0===r.size)return t;let o=0;const i=function(t){const e=Qn(t.viewBox);if(e)return[e[2],e[3]];const n=Hn(t.width),r=Hn(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=Jn(t,n,r,()=>"_lw_use_mat_"+ ++o,a,i);if(0===a.length)return s;const l={type:"defs",children:a},u=[...null!=(e=s.children)?e:[],l];return w(A({},s),{children:u})}function Hn(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Yn(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function Qn(t){if("string"!=typeof t)return;const e=t.trim().split(/[\s,]+/).map(Number);return e.length<4||e.some(t=>!Number.isFinite(t))?void 0:[e[0],e[1],e[2],e[3]]}function Jn(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=Yn(t.href);if(a&&n.has(a)){const s=e.get(a);if(s)return function(t,e,n,r,o,i,a){var s,l,u,c;const f=Gn(e);qn(f,o);const d="symbol"===f.type?Qn(f.viewBox):void 0,h=null!=(l=null!=(s=Hn(t.width))?s:null==d?void 0:d[2])?l:a[0],m=null!=(c=null!=(u=Hn(t.height))?u:null==d?void 0:d[3])?c:a[1],p="symbol"===f.type?function(t,e,n,r,o){const i=Qn(t.viewBox),a=w(A({},t),{type:"g"});if(delete a.viewBox,delete a.preserveAspectRatio,delete a.width,delete a.height,!i)return a;const[s,l,u,c]=i,f=u>0&&c>0?Math.min(r/u,o/c):1,d=(r-u*f)/2,h=(o-c*f)/2,m=[];0===d&&0===h||m.push("translate("+d+","+h+")"),1!==f&&m.push("scale("+f+")"),0===s&&0===l||m.push("translate("+-s+","+-l+")"),m.length&&(a.transform=m.join(""));const p=e();return n.push({type:"clipPath",id:p,children:[{type:"rect",x:s,y:l,width:u,height:c}]}),a.clipPath="url(#"+p+")",a}(f,o,i,h,m):f,v=Jn(p,n,r,o,i,a),g=w(A({},t),{type:"g",children:[v]});return delete g.href,delete g.width,delete g.height,Zn(g)}(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=Jn(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?w(A({},t),{children:s}):t}function $n(t,e,n){const r={};return"translate"===t?r.translate=e:"rotate"===t?r.rotate=e:"skew"===t?r.skew=e:r.scale=e,n&&"translate"!==t&&(r.origin=n),r}function tr(t){var e,n,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!=(e=o.keyframes)?e:o.kfs;if(i){const t={kind:"animated",keyframes:i.map(nr),autoOrient:o.autoOrient,loop:o.loop},e=null!=(n=o.value)?n:o.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const a=null!=(r=o.value)?r:o.v;if(void 0!==a)return{kind:"static",value:a}}return{kind:"static",value:t}}function er(t,e,n,r){var o,i,a,s;const l=t=>(null==r?void 0:r.asString)&&null!=t?String(t):t;if("absent"===n.kind)return;if("static"===n.kind)return void(t[e]=l(n.value));const u=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,c=A({},u||{}),f={keyframes:n.keyframes};void 0!==n.loop&&(f.loop=n.loop),void 0!==n.autoOrient&&(f.autoOrient=n.autoOrient),c[e]=f,t.animate=c;const d=null!=(s=null!=(i=n.base)?i:null==(o=n.keyframes[0])?void 0:o.value)?s:null==(a=n.keyframes[0])?void 0:a.v;void 0!==d&&(t[e]=l(d))}function nr(t){if(!t||"object"!=typeof t)return t;const e=t;if(void 0===e.t&&void 0===e.v&&void 0===e.e&&void 0===e.to&&void 0===e.ti)return t;const n=A({},e);return void 0===n.time&&void 0!==e.t&&(n.time=e.t),void 0===n.value&&void 0!==e.v&&(n.value=e.v),void 0===n.easing&&void 0!==e.e&&(n.easing=e.e),void 0===n.tangentOut&&void 0!==e.to&&(n.tangentOut=e.to),void 0===n.tangentIn&&void 0!==e.ti&&(n.tangentIn=e.ti),n}function rr(t,e){const n={value:e};return void 0!==t.time&&(n.time=t.time),void 0!==t.easing&&(n.easing=t.easing),void 0!==t.tangentOut&&(n.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(n.tangentIn=t.tangentIn),n}function or(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=ar(r,e.origin,!0),r=ir(r,"scale",e.scale),r=ir(r,"skew",e.skew),r=ir(r,"rotate",e.rotate),r=ar(r,e.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}(e.translate)?(r=ar(r,e.origin,!0),r=ir(r,"translate",e.translate),r=ar(r,e.origin,!1)):r=ir(r,"translate",e.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function ir(t,e,n,r){if(void 0===n)return t;const o=tr(n);if("static"===o.kind)return{type:"g",transform:{value:$n(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>rr(t,$n(e,t.value,void 0)))};return o.autoOrient&&(n.autoOrient=!0),void 0!==o.loop&&(n.loop=o.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function ar(t,e,n){if(void 0===e)return t;const r=tr(e),o=t=>n?[-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 e={keyframes:r.keyframes.map(t=>rr(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function sr(t,e){return"_lw_"+e+"_"+t.nextId++}function lr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function ur(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>ur(t,e))}var cr=Gn;function fr(t,e,n){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=lr(t.effects.clone.sourceId);"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(i=t.children)||i.forEach(t=>fr(t,e,n))}function dr(t){const e=/translate\(([^)]*)\)/.exec(t);if(!e)return[0,0];const n=e[1].split(/[\s,]+/).filter(Boolean).map(Number);return[n[0]||0,n[1]||0]}function hr(t){if(!t||"object"!=typeof t)return!1;const e=t;return!!e.autoOrient||!!Array.isArray(e.keyframes)&&e.keyframes.some(t=>t.tangentOut||t.tangentIn)}function mr(t,e,n,r){if(!e)return t;const o=sr(n,"grad"),i=function(t,e){const n={type:t.type===Dt.radial?"radialGradient":"linearGradient",id:e};return t.type===Dt.linear?(pr(n,"x1","y1",t.start),pr(n,"x2","y2",t.end)):(pr(n,"cx","cy",t.center),function(t,e,n){const r=tr(n);"absent"!==r.kind&&er(t,"r",r,{asString:!0})}(n,0,t.radius),pr(n,"fx","fy",t.focal)),t.gradientUnits&&(n.gradientUnits=t.gradientUnits),t.spreadMethod&&(n.spreadMethod=t.spreadMethod),t.gradientTransform&&(n.gradientTransform=t.gradientTransform),n.children=function(t){var e,n,r,o;if(!t)return[];const i=tr(t);if("absent"===i.kind)return[];if("static"===i.kind)return Array.isArray(i.value)?i.value.map(vr):[];const a=i.keyframes;if(!a.length)return[];const s=i.loop;let l=0;for(const t of a){const n=null!=(e=t.value)?e:t.v;Array.isArray(n)&&n.length>l&&(l=n.length)}if(!l)return[];const u=null!=(n=a[0].value)?n:a[0].v,c=[];for(let t=0;t<l;t++){const e=null!=(o=null!=(r=null==u?void 0:u[t])?r:gr(a,0,t))?o:{offset:t/Math.max(1,l-1),color:"#000000"};c.push({offset:e.offset,color:e.color})}return c.map((t,e)=>function(t,e,n,r,o){var i,a,s,l,u;const c=[],f=[];let d=!1;for(const r of e){const o=null!=(a=null!=(i=r.time)?i:r.t)?a:0,h=null!=(s=r.value)?s:r.v,m=null!=(l=null==h?void 0:h[n])?l:gr(e,e.indexOf(r),n);if(!m)continue;const p=null!=(u=r.easing)?u:r.e,v={time:o,value:m.color};void 0!==p&&(v.easing=p),c.push(v);const g={time:o,value:m.offset};void 0!==p&&(g.easing=p),f.push(g),m.offset!==t.offset&&(d=!0)}const h={type:"stop",offset:yr(t.offset),stopColor:t.color},m={};return c.length&&(m.stopColor={keyframes:c},void 0!==o&&(m.stopColor.loop=o)),d&&f.length&&(m.offset={keyframes:f},void 0!==o&&(m.offset.loop=o)),Object.keys(m).length&&(h.animate=m),h}(t,a,e,0,s))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function pr(t,e,n,r){var o,i,a;const s=tr(r);if("absent"===s.kind)return;if("static"===s.kind)return t[e]=String(s.value[0]),void(t[n]=String(s.value[1]));const l=t=>{const e={keyframes:s.keyframes.map(e=>{const n={time:e.time,value:Array.isArray(e.value)?e.value[t]:void 0};return void 0!==e.easing&&(n.easing=e.easing),n})};return void 0!==s.loop&&(e.loop=s.loop),e},u=null!=(o=t.animate)?o:{};u[e]=l(0),u[n]=l(1),t.animate=u;const c=null!=(a=s.base)?a:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(c)&&(t[e]=String(c[0]),t[n]=String(c[1]))}function vr(t){return{type:"stop",offset:yr(t.offset),stopColor:t.color}}function gr(t,e,n){var r,o;for(let o=e;o>=0;o--){const e=null!=(r=t[o].value)?r:t[o].v;if(null==e?void 0:e[n])return e[n]}for(let r=e+1;r<t.length;r++){const e=null!=(o=t[r].value)?o:t[r].v;if(null==e?void 0:e[n])return e[n]}}function yr(t){return Math.round(1e3*t)/10+"%"}function br(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function kr(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=tr(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(e.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(n=r.keyframes[0])?void 0:n.value)}(e.origin,n);let o=t;return o=Ar(o,"translate",e.translate,void 0),o=Ar(o,"rotate",e.rotate,r),o=Ar(o,"scale",e.scale,r),o}function Ar(t,e,n,r,o){if(void 0===n)return t;const i=tr("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:$n(e,wr(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=rr(t,$n(e,wr(e,t.value),r));return"translate"===e?A(A({},n),xr(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function wr(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function xr(t){var e,n;const r={},o=null!=(e=t.tangentOut)?e:t.to,i=null!=(n=t.tangentIn)?n:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Sr(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function jr(t){let e=0,n=0;for(const r of t)r.translate&&(e+=r.translate[0],n+=r.translate[1]);return[e,n]}function Pr(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Or(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function Or(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],i=(e-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 Mr(t,e){var n,r,o;const i=t.transform,a=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!a)return;const s={};if("string"==typeof i){const t=function(t,e){const n=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,a=!1,s=!1;for(;null!==(r=n.exec(t));){const t=r[1],e=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=e[0]||0,i+=e[1]||0,a=!0):s=!0}return s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),a?[o,i]:void 0}(i,e);t&&(s.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes&&!i.kfs){const t=i.value,n=t&&"object"==typeof t?t:i;n&&"object"==typeof n&&Array.isArray(n.translate)&&(s.translate=[n.translate[0]||0,n.translate[1]||0]),!n||void 0===n.rotate&&void 0===n.scale&&void 0===n.skew||e.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(a&&Array.isArray(a.keyframes)){const t=a.keyframes,i=[];for(const a of t){const t=null!=(n=a.value)?n:a.v,s=null!=(o=null!=(r=a.time)?r:a.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||e.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(s.translateKeyframes=i)}return s.translate||s.translateKeyframes?s:void 0}var _r="content";function Er(t,e,n){if(!e)return;const r=lr(e.sourceId);if(!r)return void(e.type===_r&&n.errors.push("clone: content ref missing sourceId"));const o=e.type===_r&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function Ir(t,e){const n={};return void 0!==t.translate&&(n.translate=zr(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=zr(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=zr(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){return zr(t,t=>[Math.pow(t[0],e),Math.pow(t[1],e)],!0)}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}function zr(t,e,n=!1){const r=tr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=e(r.value);return"number"!=typeof t&&!Array.isArray(t)||n?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?w(A({},t),{value:e(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=e(r.base)),o}var Tr=!1;function Nr(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var Cr=1;function Fr(t,e,n){const[r,o]=e;if(!Number.isFinite(r)||!Number.isFinite(o))return void n.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-Cr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Cr,value:0}],a=A({},t);for(const e of Object.keys(t))delete t[e];t.type="g",t.children=[a],t.animate={opacity:{keyframes:i}}}function Lr(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function Dr(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function Rr(t){var e;const n=null==(e=t.effects)?void 0:e.clone;n&&(delete n.retime,0===Object.keys(n).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function Br(t,e,n){const r=lr(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=Ur(r,e,n,new Set);if(o)if(Tr){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Zn(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function Ur(t,e,n,r){if(r.has(t))return void n.errors.push('retime: loop via "'+t+'"');const o=n.idMap.get(t);if(!o)return void n.warnings.push('retime: target "'+t+'" not found');const i=cr(o);if(function(t,e){qn(t,()=>sr(e,"retimed"))}(i,n),"use"===o.type?Wr(i,e.start,e.stretch):Vr(i,e.start,e.stretch),Rr(i),"use"===o.type&&o.href){const a=lr(o.href);if(a){const s=Dr(o),l=s?Lr(Nr(s),e):e,u=new Set(r);u.add(t);const c=Ur(a,l,n,u);c&&(i.href="#"+c)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=Dr(t);if("use"===t.type&&s&&t.href){const i=lr(t.href);if(i){const a=Lr(Nr(s),e),l=new Set(r);l.add(o);const u=Ur(i,a,n,l);u&&(t.href="#"+u)}Rr(t)}null==(a=t.children)||a.forEach(i)};i(t)}(i,e,n,r,t);return n.defs.push(i),"string"==typeof i.id&&n.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Vr(t,e,n){var r;Wr(t,e,n),null==(r=t.children)||r.forEach(t=>Vr(t,e,n))}function Wr(t,e,n){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=e+r.time*n)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const e of Object.keys(t.animate)){const n=t.animate[e];n&&Array.isArray(n.keyframes)&&r(n.keyframes)}}var Gr=48,qr=/[MmLlHhVvCcSsQqTtAaZz]/;function Kr(t,e,n){return{P1:[t[0]+2/3*(e[0]-t[0]),t[1]+2/3*(e[1]-t[1])],P2:[n[0]+2/3*(e[0]-n[0]),n[1]+2/3*(e[1]-n[1])]}}function Zr(t){const e=function(t){const e=function(t){const e=[],n=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=n.exec(t));)e.push(r[0]);return e}(t),n=[];let r=0,o=0,i=0,a=0,s=0,l=0,u=0,c=0,f=0,d="";const h=()=>parseFloat(e[r++]),m=(t,e,r)=>{const a=[o,i],s=J(a,t,e,r,Gr);n.push({P0:a,P1:t,P2:e,P3:r,lut:s,len:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},p=(t,e)=>{m([o+(t-o)/3,i+(e-i)/3],[o+2*(t-o)/3,i+2*(e-i)/3],[t,e])};for(;r<e.length;){let t=e[r];qr.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",v=t.toUpperCase();if("Z"!==v){if("M"===v){const e=h()+(n?o:0),r=h()+(n?i:0);o=e,i=r,a=e,s=r,d=t;continue}if("L"===v)p(h()+(n?o:0),h()+(n?i:0));else if("H"===v)p(h()+(n?o:0),i);else if("V"===v)p(o,h()+(n?i:0));else if("C"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],m(t,e,r)}else if("S"===v){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*i-u]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],m(t,e,r)}else if("Q"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Kr([o,i],t,e);m(r,a,e)}else if("T"===v){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-c,2*i-f]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Kr([o,i],t,e);m(r,a,e)}else{if("A"!==v){r++;continue}r+=5,p(h()+(n?o:0),h()+(n?i:0))}d=t}else p(a,s),o=a,i=s,d=t}return n.length?n:null}(t);if(!e)return null;const n=new Float64Array(e.length+1);for(let t=0;t<e.length;t++)n[t+1]=n[t]+e[t].len;const r=n[e.length],o=e[0].P0,i=e[e.length-1].P3,a=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,s=t=>{let r=0;for(;r<e.length-1&&t>n[r+1];)r++;const o=e[r],i=t-n[r],a=o.len>0?function(t,e){const{ts:n,ds:r}=t,o=r.length-1;if(e<=0)return n[0];if(e>=r[o])return n[o];let i=1,a=o;for(;i<a;){const t=i+a>>>1;r[t]<e?i=t+1:a=t}const s=r[a-1],l=r[a]-s,u=l>0?(e-s)/l:0;return n[a-1]+u*(n[a]-n[a-1])}(o.lut,i):0,[s,l]=X(o.P0,o.P1,o.P2,o.P3,a),[u,c]=Y(o.P0,o.P1,o.P2,o.P3,a);return{x:s,y:l,angle:Math.atan2(c,u)}};return{totalLength:r,closed:a,sampleAtDistance(t){if(a&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!a&&(t<0||t>r)){const e=t<0?0:r,n=s(e),o=t-e;return{x:n.x+Math.cos(n.angle)*o,y:n.y+Math.sin(n.angle)*o,angle:n.angle}}return s((n=r,(e=t)<0?0:e>n?n:e));var e,n}}}var Xr=.15;function Hr(t){const e=tr(t);if("static"===e.kind&&"number"==typeof e.value)return{min:e.value,max:e.value};if("animated"===e.kind&&e.keyframes.length){const t=e.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function Yr(t){let e=0,n=16;const r=t=>{var o,i;const a=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;a&&(n=Math.max(n,a));const s=null!=(i=t.text)?i:t.textContent;if("string"==typeof s&&(e+=s.length),t.children)for(const e of t.children)r(e)};return r(t),e*n}var Qr=t=>Math.round(1e3*t)/1e3;function Jr(t,e){if(!e||null==t)return t;const n=tr(t);if("absent"===n.kind)return t;if("static"===n.kind)return"number"==typeof t?n.value+e:{value:n.value+e};const r={keyframes:n.keyframes.map(t=>w(A({},t),{value:(Number(t.value)||0)+e}))};return void 0!==n.loop&&(r.loop=n.loop),void 0!==n.autoOrient&&(r.autoOrient=n.autoOrient),void 0!==n.base&&(r.value=n.base+e),r}function $r(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Zr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Xr*o,a=Hr(e.startOffset),s=Hr(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-a.min),u=Math.max(0,a.max+s-o),c=l>0?l+i:0,f=u>0?u+i:0;if(f<=0&&c<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let m=t;if(c>0){const e=d.x-Math.cos(d.angle)*c,n=d.y-Math.sin(d.angle)*c,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");m="M"+Qr(e)+","+Qr(n)+"L"+Qr(d.x)+","+Qr(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;m+="L"+Qr(t)+","+Qr(e)}return{d:m,startShift:c}}function to(t,e,n){null!=n&&er(t,e,tr(n),{asString:!0})}var eo=(t,e,n)=>{const r={type:t};for(const t in e)void 0!==e[t]&&(r[t]=e[t]);const o=Array.isArray(n)?n.filter(t=>null!=t):null!=n?[n]:[];return o.length&&(r.children=o),r};function no(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function ro(t,e){let n="";for(let r=0;r<t.length;r++){const o=no(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function oo(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var io=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function ao(t,e,n=2){const r=[];let o;for(io.lastIndex=0;null!==(o=io.exec(t));)r.push(o[0]);let i="",a=0;const s=()=>parseFloat(r[a++]);for(;a<r.length;){const t=r[a++];if("M"===t||"L"===t){const[r,o]=oo(e,s(),s());i+=t+ro([r,o],n)}else if("C"===t){const[t,r]=oo(e,s(),s()),[o,a]=oo(e,s(),s()),[l,u]=oo(e,s(),s());i+="C"+ro([t,r,o,a,l,u],n)}else if("Q"===t){const[t,r]=oo(e,s(),s()),[o,a]=oo(e,s(),s());i+="Q"+ro([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var so=16,lo=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",zt,Tt,"xml:space"],uo=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],co=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function fo(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function ho(t){return"string"==typeof t?t:void 0}function mo(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of co)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function po(t,e){var n,r,o,i,a,s,l,u,c,f;const d="text"===t.type,h=t.style,m=e=>{var n;return d?void 0:null!=(n=t[e])?n:null==h?void 0:h[e]},p={fontFamily:null!=(n=ho(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=fo(t.fontSize))?r:e.fontSize,fill:null!=(o=t.fill)?o:e.fill,stroke:null!=(i=t.stroke)?i:e.stroke,strokeWidth:null!=(a=t.strokeWidth)?a:e.strokeWidth,letterSpacing:null!=(s=fo(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=fo(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(u=fo(m("opacity")))?u:e.opacity,animate:null!=(c=d?void 0:mo(t))?c:e.animate};for(const t of uo){const n=null!=(f=m(t))?f:e[t];void 0!==n&&(p[t]=n)}return p}function vo(t){var e,n,r;return{fontFamily:ho(t.fontFamily),fontSize:null!=(e=fo(t.fontSize))?e:so,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=fo(t.letterSpacing))?n:0,wordSpacing:null!=(r=fo(t.wordSpacing))?r:0}}function go(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(e.opacity=t.opacity);for(const n of uo)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function yo(t,e,n,r){var o;const i=t.fontFamily?e[t.fontFamily]:n;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function bo(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var ko=.6,Ao="px-missing-glyph";function wo(t,e){if(t<=0||e<=0)return"";const n=.08*t,r=.92*t,o=.92*-e,i=r-n,a=-o,s=Math.max(1,.12*Math.min(i,a)),l="M"+n+" 0L"+r+" 0L"+r+" "+o+"L"+n+" "+o+"Z";if(i<=2*s||a<=2*s)return l;const u=n+s,c=r-s,f=-s,d=o+s;return l+"M"+u+" "+f+"L"+u+" "+d+"L"+c+" "+d+"L"+c+" "+f+"Z"}function xo(t,e){var n,r,o,i;const{glyphs:a,create:s=eo,warnings:l}=e,u=bo(a),c={x:null!=(n=fo(t.x))?n:0,y:null!=(r=fo(t.y))?r:0},f=[],d=[{start:c.x,end:c.x}];let h=0;const m=(t,e)=>{var n;const r=yo(e,a,u,l),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,s=null!=(n=null==r?void 0:r.ascent)?n:.9*o,m=go(e);for(let n=0;n<t.length;n++){const a=t.charAt(n),l=null==r?void 0:r.glyphs[a];if(l&&l.d)f.push({glyphD:l.d,m:[i,0,0,i,c.x,c.y],paint:m,line:h,x:c.x,y:c.y,scale:i}),c.x+=l.width*i;else if(/\S/.test(a)){const t=l&&l.width>0?l.width:ko*o;f.push({glyphD:wo(t,s),m:[i,0,0,i,c.x,c.y],paint:m,isMissing:!0,line:h,x:c.x,y:c.y,scale:i}),c.x+=t*i}else c.x+=(l?l.width:0)*i;c.x+=e.letterSpacing+(" "===a?e.wordSpacing:0),d[h].end=c.x}},p=(t,e)=>{var n,r,o,i;const a=po(t,e),s=fo(t.x),l=fo(t.y);void 0!==s&&(c.x=s,h=d.length,d.push({start:c.x,end:c.x})),void 0!==l&&(c.y=l),c.x+=null!=(n=fo(t.dx))?n:0,c.y+=null!=(r=fo(t.dy))?r:0;const u=null!=(o=ho(t[Tt]))?o:ho(t[zt]);if(u&&!(null==(i=t.children)?void 0:i.length)&&m(u,a),t.children)for(const e of t.children)p(e,a)},v=vo(t);if(t.children)for(const e of t.children)p(e,v);const g=null!=(o=ho(t[Tt]))?o:ho(t[zt]);g&&!(null==(i=t.children)?void 0:i.length)&&m(g,v);const y=ho(t.textAnchor);if("middle"===y||"end"===y)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===y?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return Co(t,No(f,s,l),s)}function So(t,e){var n,r,o,i,a,s;if(null==(n=e.alongPath)?void 0:n.pathD)return function(t,e,n){var r,o;const{glyphs:i,warnings:a,alongPath:s}=n,l=Zr(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const u=bo(i),c=[];let f=0;const d=(t,e)=>{var n,r,o;const s=po(t,e),l=null!=(n=ho(t[Tt]))?n:ho(t[zt]);if(l&&!(null==(r=t.children)?void 0:r.length)){const t=yo(s,i,u,a),e=(null==t?void 0:t.unitsPerEm)||1e3,n=s.fontSize/e,r=(null!=(o=null==t?void 0:t.ascent)?o:.9*e)*n;for(let e=0;e<l.length;e++){const o=l.charAt(e),i=null==t?void 0:t.glyphs[o],a=(i?i.width:0)*n,u=a+s.letterSpacing+(" "===o?s.wordSpacing:0);c.push({advStart:f,advEnd:f+u,glyphW:a,ascent:r,fontSize:s.fontSize}),f+=u}}if(t.children)for(const e of t.children)d(e,s)};d(t,vo(t));const h=f,m=tr(null==s?void 0:s.textLength),p="animated"===m.kind?Number(null==(r=m.keyframes[0])?void 0:r.value)||0:"static"===m.kind&&Number(m.value)||0,v=p>0&&h>0?p/h:1,g=tr(null==s?void 0:s.startOffset),{along:y,perp:b}=Po(t),k=y+("animated"===g.kind?Number(null==(o=g.keyframes[0])?void 0:o.value)||0:"static"===g.kind&&Number(g.value)||0),A=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return c.map(t=>{const e=k+t.advStart*v,n=k+t.advEnd*v,r=A(l.sampleAtDistance(e)),o=A(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*v);return{x:r.x,y:r.y,width:t.advEnd-t.advStart,ascent:t.ascent,fontSize:t.fontSize,endX:o.x,endY:o.y,rotation:180*i.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:l,warnings:u}=e,c=bo(l),f={x:null!=(r=fo(t.x))?r:0,y:null!=(o=fo(t.y))?o:0},d=[],h=[{start:f.x,end:f.x}];let m=0;const p=(t,e)=>{var n;const r=yo(e,l,c,u),o=(null==r?void 0:r.unitsPerEm)||1e3,i=e.fontSize/o,a=(null!=(n=null==r?void 0:r.ascent)?n:.9*o)*i;for(let n=0;n<t.length;n++){const o=t.charAt(n),s=null==r?void 0:r.glyphs[o],l=(s?s.width:0)*i+e.letterSpacing+(" "===o?e.wordSpacing:0);d.push({x:f.x,y:f.y,width:l,ascent:a,fontSize:e.fontSize,line:m}),f.x+=l,h[m].end=f.x}},v=(t,e)=>{var n,r,o,i;const a=po(t,e),s=fo(t.x),l=fo(t.y);void 0!==s&&(f.x=s,m=h.length,h.push({start:f.x,end:f.x})),void 0!==l&&(f.y=l),f.x+=null!=(n=fo(t.dx))?n:0,f.y+=null!=(r=fo(t.dy))?r:0;const u=null!=(o=ho(t[Tt]))?o:ho(t[zt]);if(u&&!(null==(i=t.children)?void 0:i.length)&&p(u,a),t.children)for(const e of t.children)v(e,a)},g=vo(t);if(t.children)for(const e of t.children){const t=d.length;if(v(e,g),d.length===t){const t=po(e,g),n=yo(t,l,c),r=(null==n?void 0:n.unitsPerEm)||1e3;d.push({x:f.x,y:f.y,width:0,ascent:(null!=(i=null==n?void 0:n.ascent)?i:.9*r)*(t.fontSize/r),fontSize:t.fontSize,line:m})}}const y=null!=(a=ho(t[Tt]))?a:ho(t[zt]);y&&!(null==(s=t.children)?void 0:s.length)&&p(y,g);const b=ho(t.textAnchor);if("middle"===b||"end"===b)for(const t of d){const e=h[t.line].end-h[t.line].start;t.x+="middle"===b?-e/2:-e}return d.map(t=>{var e=t,{line:n}=e;return x(e,["line"])})}function jo(t,e,n,r,o=0){const{x:i,y:a,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),u=Math.sin(s),c=r/2;return[n*l,n*u,-n*u,n*l,i-n*l*c-o*u,a-n*u*c+o*l]}function Po(t){var e,n,r;return{along:(null!=(e=fo(t.x))?e:0)+(null!=(n=fo(t.dx))?n:0),perp:null!=(r=fo(t.dy))?r:0}}function Oo(t,e,n,r,o,i){const{glyphs:a,create:s=eo,warnings:l}=r,u=e?Zr(e):null;if(!u)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const c=bo(a),{cells:f,width:d}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,u,c;const f=po(t,s),d=null!=(l=ho(t[Tt]))?l:ho(t[zt]);if(d&&!(null==(u=t.children)?void 0:u.length)){const t=yo(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=go(f);for(let a=0;a<d.length;a++){const s=d.charAt(a),l=t.glyphs[s];if(l&&l.d){const t=l.width*e;o.push({glyphD:l.d,widthEm:l.width,scale:e,paint:r,midBase:i+t/2}),i+=t}else if(/\S/.test(s)){const a=l&&l.width>0?l.width:ko*t.unitsPerEm,s=a*e;o.push({glyphD:wo(a,n),widthEm:a,scale:e,paint:r,isMissing:!0,midBase:i+s/2}),i+=s}else i+=(l?l.width:0)*e;i+=f.letterSpacing+(" "===s?f.wordSpacing:0)}}}if(t.children)for(const e of t.children)a(e,f)};return a(t,vo(t)),{cells:o,width:i}}(t,a,c,l);if(!f.length)return Co(t,[],s);const{along:h,perp:m}=Po(t),p=Mo(n),v=Mo(o),g=t=>t>0&&d>0?t/d:1,y="clip"===i&&!u.closed;if(p.animated||v.animated){const e=function(t,e){const n=[...t,...e].sort((t,e)=>t-e),r=[];for(const t of n)r.length&&t===r[r.length-1]||r.push(t);return r}(p.times,v.times),n=(t,e)=>h+p.at(e)+g(v.at(e))*t.midBase,r=p.animated?p.loop:v.loop;return Co(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/_o,.5),u=t=>t>=0&&t<=e.totalLength,c=[];for(const f of t){const t=[f.scale,0,0,f.scale,-f.scale*(f.widthEm/2),0],d=ao(f.glyphD,t),h=(t,n)=>{const{x:r,y:o,angle:i}=e.sampleAtDistance(t),a=Math.cos(i),l=Math.sin(i);return{time:n,value:{translate:[Io(r-s*l,3),Io(o+s*a,3)],rotate:Io(180*i/Math.PI,3)}}},m=[],p=[],v=(t,e)=>{m.push(h(t,e)),a&&p.push({time:e,value:u(t)?1:0})};v(n(f,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],i=n(f,e),a=n(f,o),s=Math.min(Eo,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);v(n(f,r),r)}}dn(m);const g={keyframes:m};void 0!==o&&(g.loop=o);const y={transform:g};if(f.paint.animate&&Object.assign(y,f.paint.animate),a&&p.some(t=>0===t.value)){const t={keyframes:p};void 0!==o&&(t.loop=o),y.opacity=t}c.push(i("path",w(A(A({d:d},zo(f.paint)),To(f.isMissing)),{animate:y}),[]))}return c}(f,u,n,e,r,s,y,m),s)}const b=g(v.at(0)),k=h+p.at(0);return Co(t,No((y?f.filter(t=>{const e=k+t.midBase*b;return e>=0&&e<=u.totalLength}):f).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:jo(u,k+t.midBase*b,t.scale,t.widthEm,m)})),s,l),s)}function Mo(t){var e;const n=tr(t);if("animated"===n.kind&&n.keyframes.length>=2){const t=[...n.keyframes].sort((t,e)=>(Number(t.time)||0)-(Number(e.time)||0)),e=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,times:e,loop:n.loop,at(t){if(t<=e[0])return r[0];for(let n=1;n<e.length;n++)if(t<=e[n]){const o=e[n]-e[n-1],i=o>0?(t-e[n-1])/o:1;return r[n-1]+i*(r[n]-r[n-1])}return r[r.length-1]}}}const r="animated"===n.kind?Number(null==(e=n.keyframes[0])?void 0:e.value)||0:"static"===n.kind&&Number(n.value)||0;return{animated:!1,times:[],at:()=>r}}var _o=48,Eo=64;function Io(t,e){const n=b(10,e);return Math.round(t*n)/n}function zo(t){const e={};void 0!==t.fill&&(e.fill=t.fill),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(e.opacity=t.opacity);for(const n of uo)void 0!==t[n]&&(e[n]=t[n]);return e}function To(t){return t?{class:Ao}:{}}function No(t,e,n){if(!t.length)return null==n||n.push("textGlyphs: nothing to render"),[];const r=new Map;for(const e of t){const t=JSON.stringify([e.paint,!!e.isMissing]),n=ao(e.glyphD,e.m),o=r.get(t);o?o.d+=n:r.set(t,{paint:e.paint,d:n,isMissing:e.isMissing})}const o=[];for(const{paint:t,d:n,isMissing:i}of r.values())o.push(e("path",A(A(A({d:n},zo(t)),To(i)),void 0!==t.animate?{animate:A({},t.animate)}:{}),[]));return o}function Co(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===lo.indexOf(e)&&(r[e]=t[e]);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 n("g",r,e)}function Fo(t,e){return e.alongPath?Oo(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):xo(t,e)}function Lo(t,e){const n=w(A({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function Do(t,e,n,r,o,i,a,s){const l=Bo(r,n,o),u=Uo(n,o),c=Wo(i,l),f=Wo(a,u),d=Ko(a),h={type:"path",d:S(e)};return Go(h,"strokeDasharray",f),Go(h,"strokeDashoffset",c),Go(h,"strokeOpacity",d),[h]}var Ro=1;function Bo(t,e,n){const[r]=Vo(n);return n=>e*(-n-r+t)+Ro}function Uo(t,e){const[n,r]=Vo(e),o=r-n+1;return e=>{const n=Z(e[0],0,1),r=Z(e[1],0,1),i=Math.min(n,r),a=Math.max(n,r),s=[0];let l=Ro;for(let e=0;e<o;e++)s.push(l+i*t),s.push((a-i)*t),l=(1-a)*t;return s.push(l+Ro),s}}function Vo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Wo(t,e){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:e(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>{var n,r,o,i;return{time:null!=(r=null!=(n=t.time)?n:t.t)?r:0,value:e(null!=(o=t.value)?o:t.v),easing:null!=(i=t.easing)?i:t.e}}),loop:t.loop}}function Go(t,e,n){n&&er(t,e,n)}var qo=10;function Ko(t){var e,n,r,o,i,a;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 l=t.keyframes;let u=!1,c=!0;for(const t of l)s(null!=(e=t.value)?e:t.v)?u=!0:c=!1;if(!u)return;if(c)return{kind:"static",value:0};const f=[];for(let t=0;t<l.length;t++){const e=l[t],u=t>0?l[t-1]:void 0,c=t<l.length-1?l[t+1]:void 0,d=null!=(r=null!=(n=e.time)?n:e.t)?r:0,h=s(null!=(o=e.value)?o:e.v),m=u?h&&s(null!=(i=u.value)?i:u.v):h,p=c?h&&s(null!=(a=c.value)?a:c.v):h;m&&!p?(f.push({time:d,value:0}),f.push({time:d+qo,value:1})):!m&&p&&(f.push({time:d-qo,value:1}),f.push({time:d,value:0}))}return f.length<=1?void 0:{kind:"animated",keyframes:f}}function Zo(t,e){const n=n=>{const r=(n-t.time)/(e.time-t.time),o=t.value[0]+(e.value[0]-t.value[0])*r;return t.value[1]+(e.value[1]-t.value[1])*r-o};let r=t.time,o=e.time,i=n(r);if(0===i)return r;const a=n(o);if(0===a)return o;if(i*a>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,e=n(t);if(0===e||Math.abs(o-r)<1e-4)return t;i*e<0?o=t:(r=t,i=e)}return(r+o)/2}function Xo(t,e){if(e<=t[0].time)return t[0].value;if(e>=t[t.length-1].time)return t[t.length-1].value;for(let n=1;n<t.length;n++)if(e<=t[n].time){const r=t[n-1],o=t[n],i=(e-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 Ho(t){const e=t.v;if(!e||e.length<2)return 0;let n=0;for(let r=0;r<e.length-1;r++)n+=Yo(t,r,r+1);return t.c&&e.length>1&&(n+=Yo(t,e.length-1,0)),n}function Yo(t,e,n){var r,o,i,a;const s=t.v,l=s[e],u=s[n],c=J(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(a=null==(i=t.i)?void 0:i[n])?a:u,u);return c.ds[c.ds.length-1]}var Qo=.5522847498307936;function Jo(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:(null==(e=Bt(t))?void 0:e.mode)===Pt.frames?Ot.frames:Ot.waapi,glyphs:null==(n=Vt(t))?void 0:n.glyphs},o=cr(t);ur(o,r.idMap),fr(o,r,()=>sr(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=lr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.sourceId);if("string"==typeof a){n.add(t);const r=e.idMap.get(a);r&&n.add(r)}if(Array.isArray(t.children))for(const e of t.children)r(e)};if(r(t),0===n.size)return;const o=(t,r)=>{if(n.has(t)&&e.maskAncestorChains.set(t,r),Array.isArray(t.children)){const n=Mr(t,e),i=n?[...r,n]:r;for(const e of t.children)o(e,i)}};o(t,[])}(o,r);const i=function(t,e){return function(t,e){e.idMap.clear(),ur(t,e.idMap);const n=[],r=t=>{var e;Dr(t)&&n.push(t),null==(e=t.children)||e.forEach(r)};r(t);const o=new Map;for(const t of n){let n=0;const r=new Set,i=o=>{var a;if(o){if(o!==t&&Dr(o)&&n++,"use"===o.type&&o.href){const t=lr(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=lr(t.href);a&&(r.add(a),i(e.idMap.get(a))),o.set(t,n)}n.sort((t,e)=>{var n,r;return(null!=(n=o.get(e))?n:0)-(null!=(r=o.get(t))?r:0)});for(const t of n){const n=Dr(t);if(!n)continue;const r=n.timeCrop;Rr(t),Br(t,Nr(n),e),r&&Fr(t,r,e)}}(t,e),t}($o(o,r),r);return function(t,e){e.length&&(t.children||(t.children=[])).unshift({type:"defs",children:e})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function $o(t,e){t.children&&(t.children=t.children.map(t=>$o(t,e)));const n=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?e.contentRefInnerIds.get(r):void 0;if(!n&&!o)return t;const{transformBy:i,repeater:a,maskedBy:s,clipPath:l,strokeTrim:u,clone:c,fillGradient:f,strokeGradient:d,textPath:h,text:m}=null!=n?n:{};n&&delete t.effects;let p=t,v=!1;if(null==m?void 0:m.useGlyphs)if(h){const t="string"==typeof h.path?h.path:void 0,n=function(t,e,n,r,o,i){return e.glyphs?Oo(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.glyphs"),null)}(p,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(p=n,v=!0)}else p=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?xo(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.glyphs — left as native <text>"),t):t}(p,m,e),v=!0;return v||(p=function(t,e,n){var r;if(!e||"string"!=typeof e.path||!e.path)return t;const o=sr(n,"tpath"),{d:i,startShift:a}=$r(e.path,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:Yr(t)});n.defs.push({type:"path",id:o,d:i});const s={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==e.lengthAdjust&&(s.lengthAdjust=e.lengthAdjust),void 0!==e.method&&(s.method=e.method),void 0!==e.spacing&&(s.spacing=e.spacing),to(s,"startOffset",Jr(e.startOffset,a)),to(s,"textLength",e.textLength),t.children=[s],t}(p,h,e)),p=function(t,e,n){return mr(t,e,n,"fill")}(p,f,e),p=function(t,e,n){return mr(t,e,n,"stroke")}(p,d,e),p=function(t,e){if(!e)return t;const n=e.subPaths===It.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)o(e);return}const e="string"==typeof t.d?t.d:function(t){var e,n,r,o,i,a,s,l,u,c;if("rect"===t.type){const i=Number(null!=(e=t.x)?e:0),a=Number(null!=(n=t.y)?n:0),s=Number(null!=(r=t.width)?r:0),l=Number(null!=(o=t.height)?o:0);return"M"+(i+s)+","+a+"L"+(i+s)+","+(a+l)+"L"+i+","+(a+l)+"L"+i+","+a+"L"+(i+s)+","+a+"z"}if("ellipse"===t.type||"circle"===t.type){const e=Number(null!=(i=t.cx)?i:0),n=Number(null!=(a=t.cy)?a:0),r="circle"===t.type?Number(null!=(s=t.r)?s:0):Number(null!=(l=t.rx)?l:0),o="circle"===t.type?Number(null!=(u=t.r)?u:0):Number(null!=(c=t.ry)?c:0);if(!(r>0&&o>0))return;const f=r*Qo,d=o*Qo,h=(t,e,n,r,o,i)=>"C"+t+","+e+" "+n+","+r+" "+o+","+i;return"M"+(e+r)+","+n+h(e+r,n+d,e+f,n+o,e,n+o)+h(e-f,n+o,e-r,n+d,e-r,n)+h(e-r,n-d,e-f,n-o,e,n-o)+h(e+f,n-o,e+r,n-d,e+r,n)+"z"}}(t);if(void 0===e)return;const n=Mn(e);if(!n.length)return;const i={leaf:t,subpaths:[]};for(const t of n){const e=Ho(t);i.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const a=n?[...r].reverse():r;for(const t of a)for(const e of t.subpaths)n||(i=0),e.startOffsetPx=i,i+=e.lengthPx;const s=i;if(n&&s<.001)return t;const l=tr(e.offset),u="absent"===l.kind?{kind:"static",value:0}:l,c=function(t){const e=tr(t);if("animated"!==e.kind)return e;const n=e.keyframes.map(t=>{var e,n,r,o;return{time:null!=(n=null!=(e=t.time)?e:t.t)?n:0,value:null!=(r=t.value)?r:t.v,easing:null!=(o=t.easing)?o:t.e}});if(!n.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:n.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<n.length;t++){const e=n[t-1],o=n[t];if((e.value[1]-e.value[0])*(o.value[1]-o.value[0])<0){const t=Zo(e,o);null!==t&&t>e.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,e)=>t-e),i=[];let a=0;for(const t of n){for(;a<o.length&&o[a]<t.time;){const t=o[a++],e=Xo(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}const e=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:e,easing:t.easing})}for(;a<o.length;){const t=o[a++],e=Xo(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),f="absent"===c.kind?{kind:"static",value:[0,1]}:c,d=function(t){var e;if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const n=[];for(const r of t.keyframes){const t=null!=(e=r.value)?e:r.v;"number"==typeof t&&n.push(t)}return n}(u),h=[d.length?Math.min(...d):0,d.length?Math.max(...d):0];if(1===r.length&&r[0].leaf===t&&1===r[0].subpaths.length){const e=r[0],o=e.subpaths[0],i=n?s:o.lengthPx;if(i<.001)return t;const a=n?o.startOffsetPx/i:0;return function(t,e,n,r,o,i){const a=Bo(n,e,r),s=Uo(e,r),l=A({},t);return delete l.effects,Go(l,"strokeDasharray",Wo(i,s)),Go(l,"strokeDashoffset",Wo(o,a)),Go(l,"strokeOpacity",Ko(i)),l}(e.leaf,i,a,h,u,f)}const m=new Map;for(const t of r){const e=[];for(const r of t.subpaths){const o=n?s:r.lengthPx;if(o<.001)continue;const i=n?r.startOffsetPx/o:0;e.push(...Do(t.leaf,r.subpath,o,i,h,u,f))}m.set(t.leaf,Lo(t.leaf,e))}const p=t=>m.get(t)||(Array.isArray(t.children)&&t.children.length>0?w(A({},t),{children:t.children.map(p)}):t);return p(t)}(p,u),p=function(t,e,n){var r,o;if(!e)return t;const i=null!=(r=e.copies)?r:1;if(i<1)return n.errors.push("repeater.copies invalid: "+e.copies),t;const a=t.transform,s=null==(o=t.animate)?void 0:o.transform,l=cr(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate),delete l.id;const u=[l];for(let t=1;t<i;t++){const n=cr(l),r=Ir(e,t),o=r?or(n,r):n;u.push(o)}const c={type:"g",children:u};return t.id&&(c.id=t.id),void 0!==a&&(c.transform=a),void 0!==s&&(c.animate={transform:s}),c}(p,a,e),p=function(t,e,n,r){if(!e)return t;const o=lr(e.sourceId);if(!o)return r.errors.push("maskedBy.sourceId missing — cannot build mask"),t;const i=sr(r,"mask");let a={type:"use",href:"#"+o};if(n)a=kr(a,n,r);else if(Sr(t))a=function(t,e){var n;const r=e.animate&&"object"==typeof e.animate&&!Array.isArray(e.animate)?e.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 a=[],s=[],l=[];for(const t of i){const e=(null!=(n=t.value)?n:t.v)||{},r=rr(t,void 0);if(Array.isArray(e.translate)&&a.push(w(A(A({},r),xr(t)),{value:{translate:[-e.translate[0],-e.translate[1]]}})),"number"==typeof e.rotate){const t={rotate:-e.rotate};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),s.push(w(A({},r),{value:t}))}if(Array.isArray(e.scale)){const t={scale:[1/e.scale[0],1/e.scale[1]]};Array.isArray(e.origin)&&(t.origin=[e.origin[0],e.origin[1]]),l.push(w(A({},r),{value:t}))}}const u=null==o?void 0:o.loop,c=t=>{const e={keyframes:t};return void 0!==u&&(e.loop=u),e};let f=t;return a.length&&(f={type:"g",animate:{transform:c(a)},children:[f]}),s.length&&(f={type:"g",animate:{transform:c(s)},children:[f]}),l.length&&(f={type:"g",animate:{transform:c(l)},children:[f]}),f}(a,t);else{const e=function(t){if("string"==typeof t.transform){const e=function(t){var e,n,r,o,i,a,s,l,u,c,f,d,h;const m=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let p;const v=[];for(;null!==(p=m.exec(t));){const t=p[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);v.push({name:p[1],args:t})}if(!v.length)return;const g=v[v.length-1];if("translate"===g.name)for(let t=v.length-2;t>=0;t--){const c=v[t];if("translate"!==c.name)continue;const f=null!=(e=c.args[0])?e:0,d=null!=(n=c.args[1])?n:0,h=null!=(r=g.args[0])?r:0,m=null!=(o=g.args[1])?o:0;if(h!==-f||m!==-d)continue;const p={};p.origin=[f,d];for(let e=0;e<t;e++)if("translate"===v[e].name){const t=null!=(i=v[e].args[0])?i:0,n=null!=(a=v[e].args[1])?a:0;p.translate=p.translate?[p.translate[0]+t,p.translate[1]+n]:[t,n]}for(let e=t+1;e<v.length-1;e++){const t=v[e];if("rotate"===t.name)p.rotate=(null!=(s=p.rotate)?s:0)+(null!=(l=t.args[0])?l:0);else if("scale"===t.name){const e=null!=(u=t.args[0])?u:1,n=t.args.length>1?t.args[1]:e;p.scale=p.scale?[p.scale[0]*e,p.scale[1]*n]:[e,n]}}return p}let y,b,k;for(const t of v)if("translate"===t.name){const e=null!=(c=t.args[0])?c:0,n=null!=(f=t.args[1])?f:0;y=y?[y[0]+e,y[1]+n]:[e,n]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.args[0])?d:0);else if("scale"===t.name){const e=null!=(h=t.args[0])?h:1,n=t.args.length>1?t.args[1]:e;k=k?[k[0]*e,k[1]*n]:[e,n]}const A={};return y&&(A.translate=y),void 0!==b&&(A.rotate=b),k&&(A.scale=k),Object.keys(A).length?A:void 0}(t.transform);if(!e)return;const n={};return e.translate&&(n.translate=e.translate),void 0!==e.rotate&&(n.rotate=e.rotate),e.scale&&(n.scale={value:e.scale}),e.origin&&(n.origin=e.origin),Object.keys(n).length?n:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const e=t.transform.value,n=e&&"object"==typeof e?e:t.transform;if(n&&"object"==typeof n){const t={};return Array.isArray(n.translate)&&(t.translate=n.translate),"number"==typeof n.rotate&&(t.rotate=n.rotate),"number"==typeof n.skew&&(t.skew=n.skew),Array.isArray(n.scale)&&(t.scale={value:n.scale}),Array.isArray(n.origin)&&(t.origin=n.origin),Object.keys(t).length?t:void 0}}}(t);e&&(a=kr(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Sr(t)}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?Mr(e,r):void 0,l=s?[...a,s]:a,u=i&&r.maskAncestorChains.get(i)||[];if(!l.length&&!u.length)return t;const c=new Set;for(const t of l)if(t.translateKeyframes)for(const e of t.translateKeyframes)c.add(e.time);for(const t of u)if(t.translateKeyframes)for(const e of t.translateKeyframes)c.add(e.time);if(!(c.size>0)){const e=jr(l),n=jr(u),r=n[0]-e[0],o=n[1]-e[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(c).sort((t,e)=>t-e).map(t=>{const e=Pr(l,t),n=Pr(u,t);return{time:t,value:{translate:[n[0]-e[0],n[1]-e[1]]}}})}},children:[t]}}(a,t,o,r,s);const l={type:"mask",id:i,children:[a]};return e.maskType&&(l.maskType=e.maskType),e.maskUnits&&(l.maskUnits=e.maskUnits),e.maskContentUnits&&(l.maskContentUnits=e.maskContentUnits),void 0!==e.x&&(l.x=String(e.x)),void 0!==e.y&&(l.y=String(e.y)),void 0!==e.width&&(l.width=String(e.width)),void 0!==e.height&&(l.height=String(e.height)),r.defs.push(l),t.mask="url(#"+i+")",t}(p,s,i,e),p=function(t,e,n){if(!(null==e?void 0:e.d))return t;const r=sr(n,"clip"),o={type:"path"},i=tr(e.d);return"absent"!==i.kind&&("static"===i.kind?o.d=br(i.value):(er(o,"d",i),void 0!==o.d&&(o.d=br(o.d)))),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(p,l,e),o?(Er(p,c,e),p=function(t,e,n,r){const o=function(t,e){var n,r,o;const i={};let a=!1;const s=null==(n=t.animate)?void 0:n.transform;if(s&&"object"==typeof s&&Array.isArray(s.keyframes)){const e=s.keyframes;if(e.some(t=>t.value&&t.value.translate)){const n=hr(s),r={keyframes:e.map(t=>{const e=t.value||{},r={};void 0!==e.translate&&(r.translate=e.translate),n&&void 0!==e.origin&&(r.origin=e.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 l=e.some(t=>{const e=t.value||{};return void 0!==e.rotate||void 0!==e.scale}),u=e.map(t=>{const e=t.value||{},r={};void 0!==e.rotate&&(r.rotate=e.rotate),void 0!==e.scale&&(r.scale=e.scale),void 0===e.origin||n&&!l||(r.origin=e.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(u.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const e={keyframes:u};void 0!==o&&(e.loop=o),t.animate.transform=e}a=!0}}const l=void 0!==(null==e?void 0:e.translate),u=a||l,c=a&&hr((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&hr((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const e=function(t){const e=[],n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);)e.push({name:r[1],full:r[0]});if(!e.length)return{rest:t||void 0};if(e.every(t=>"translate"===t.name))return{translate:e.map(t=>t.full).join("")};const o=e[0],i=e[e.length-1];if("translate"===i.name&&"translate"===o.name){const n=dr(i.full),r=dr(o.full),a=-n[0],s=-n[1],l=r[0]-a,u=r[1]-s;return 0===l&&0===u?{rest:t}:{translate:"translate("+l+","+u+")",rest:"translate("+a+","+s+")"+e.slice(1).map(t=>t.full).join("")}}if("translate"===i.name)return{rest:t};const a=[];let s=0;for(;s<e.length&&"translate"===e[s].name;)a.push(e[s].full),s++;if(!a.length)return{rest:t};const l=e.slice(s).map(t=>t.full).join("");return{translate:a.join(""),rest:l||void 0}}(t.transform);u?void 0!==e.translate?e.rest?t.transform=e.rest:delete t.transform:(function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,n=[];let r;for(;r=e.exec(t);)n.push({name:r[1],full:r[0]});if(1!==n.length)return!1;if("translate"===n[0].name)return!0;if("matrix"!==n[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(n[0].full);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)||c&&function(t){const e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let n,r=0,o=!1;for(;n=e.exec(t);)r++,"matrix"===n[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:e.translate&&(i.transform=e.translate,e.rest?t.transform=e.rest:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const e=t.transform.value,n=!(!e||"object"!=typeof e),r=n?e:t.transform,o=t=>n?{value:t}:t;if(Array.isArray(r.translate)){const e=A({},r);delete e.translate;const n=Object.keys(e).length>0;u||(i.transform=o({translate:r.translate})),n?t.transform=o(e):delete t.transform}}return i}(t,e);"string"==typeof t.id&&delete t.id;const{outer:i,inner:a}=function(t){if(!t)return{};const e=hr(t.translate),n=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),e&&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||e&&!n||(o.origin=t.origin),{outer:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(e);let s=t;s=or(s,a);let l={type:"g",id:n,children:[{type:"g",id:r,children:[s]}]};return void 0!==o.transform&&(l.transform=o.transform),void 0!==o.animate&&(l.animate=o.animate),i&&(delete l.id,l=or(l,i),l.id=n),l}(p,i,r,o)):p=function(t,e,n,r){return Er(t,e,r),or(t,n)}(p,c,i,e),(null==c?void 0:c.retime)&&(t.effects={clone:{retime:c.retime}}),r&&e.idMap.set(r,p),p}var ti=t=>{var e,n;return null!=(n=null!=(e=t.t)?e:t.time)?n:0},ei=t=>{var e;return null!=(e=t.v)?e:t.value},ni=t=>{var e;return null!=(e=t.e)?e:t.easing},ri=t=>{var e;return null!=(e=t.tangentIn)?e:t.ti},oi=t=>{var e;return null!=(e=t.tangentOut)?e:t.to};function ii(t,e,n,r,o){const i=1-o,a=i*i*i,s=3*i*i*o,l=3*i*o*o,u=o*o*o;return[a*t[0]+s*e[0]+l*n[0]+u*r[0],a*t[1]+s*e[1]+l*n[1]+u*r[1]]}function ai(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=ii(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var si=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function li(t,e,n){var r,o;let i=Jo(t).root;return i=function(t){const e=t=>{var n;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const e=function(t){var e,n,r;if("offsetPath"!==t.alongPathMode)return;const o=t.keyframes;if(!o||o.length<2)return;const i=ei(o[0]),a=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],s=[];for(const t of o){const n=ei(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]!==a[0]||o[1]!==a[1])return;s.push([r[0]+a[0],r[1]+a[1]])}if(!o.some(t=>ri(t)||oi(t)))return;let l="M"+si(s[0][0])+","+si(s[0][1]);const u=[];for(let t=0;t<s.length-1;t++){const e=s[t],i=s[t+1],a=null!=(n=oi(o[t]))?n:[0,0],c=null!=(r=ri(o[t+1]))?r:[0,0],f=[e[0]+a[0],e[1]+a[1]],d=[i[0]+c[0],i[1]+c[1]];l+="C"+si(f[0])+","+si(f[1])+","+si(d[0])+","+si(d[1])+","+si(i[0])+","+si(i[1]),u.push(ai(e,f,d,i))}const c=u.reduce((t,e)=>t+e,0);if(!(c>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=u[t-1]);const e={t:ti(o[t]),v:d/c},n=ni(o[t]);void 0!==n&&(e.e=n),f.push(e)}return{pathStr:l,distanceKfs:f,autoOrient:!!t.autoOrient,anchor:a}}(i);if(e){const n=A({},o);delete n.transform;const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n.offsetDistance=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=A({},s);delete t.translate,delete t.origin,l=Object.keys(t).length?t:void 0}r=w(A({},t),{animate:n,style:w(A({},t.style),{offsetPath:"path('"+e.pathStr+"')",offsetAnchor:si(e.anchor[0])+"px "+si(e.anchor[1])+"px",offsetRotate:e.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==l?r.transform=l:delete r.transform}}if(null==(n=r.children)?void 0:n.length){const t=r.children.map(e);t.some((t,e)=>t!==r.children[e])&&(r=w(A({},r),{children:t}))}return r};return e(t)}(i),i=Dn(i,null!=(o=null==(r=Bt(i))?void 0:r.duration)?o:V),e===Ot.waapi&&(i=Sn(i,null==n?void 0:n.motionPath),i=Xn(i),i=function(t){const e=(t,n)=>{var r;n(t),null==(r=t.children)||r.forEach(t=>e(t,n))};let n=!0;for(;n;){n=!1;const r=new Set;e(t,t=>{var e;"use"===t.type&&"string"==typeof t.href&&r.add((e=t.href).startsWith("#")?e.slice(1):e)}),e(t,t=>{if(!t.children)return;let e=t.children;"defs"===t.type&&(e=e.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),e=e.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),e.length!==t.children.length&&(t.children=e,n=!0)})}return t}(i)),i}function ui(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function ci(t,e,n){var r;const o=Bt(t)||{},i=Un(t,Ot.frames),a=o.iterations;let s=1;"number"==typeof a&&(s=a||1),"infinite"===a&&(s=1/0),s<1&&(s=1);const l=+(o.duration||V),u=l&&s?l*(s===1/0?1/0:s):l?(null!=s?s:1)*l:0,c=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,h="backwards"===f||"both"===f;let m=null,p=!1,v=-(o.delay||0),g=0,y=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let w=0;const x=()=>{const t=g?(Date.now()-g)*y:0;return v+t},S=()=>{let t=x();return Number.isFinite(u)&&t>u&&(t=u),t<0&&(t=0),t};function j(t){let n=function(){const e=l>0?l:1;let n=0,r=0;l>0?(t=Z(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1),n=Z((t-r*e)/e,0,1)):n=t;const o=c||"normal";let i=n;return"reverse"===o?i=1-n:"alternate"===o?r%2==1&&(i=1-n):"alternate-reverse"===o&&r%2==0&&(i=1-n),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=Wn(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?j(S()):h&&j(0));const P=()=>!!p&&!!e.isConnected()&&(y<0?x()>0:!(Number.isFinite(u)&&S()>=u)),O=t=>{null!==m&&(ui(m),m=null),(t||P())&&(m=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{m=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=S(),i=x();if(i<0&&y>0)h&&j(0);else{if(y<0&&i<=0)return M(),j(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(y>0&&u&&Number.isFinite(u)&&o>=u)return M(),j(d?u:0),void(b||(b=!0,null==(r=null==n?void 0:n.onFinish)||r.call(n)));if(A>0){const t=Date.now();if(w&&t-w<A)return;w=t}j(o)}})(),O()}))},M=()=>{if(!p)return;let t=x();Number.isFinite(u)&&t>u&&(t=u),v=t,g=0,p=!1,null!==m&&(ui(m),m=null),t>=0?j(t):h&&j(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>P(),play:()=>{var t;(()=>{if(!p){if(y>=0)Number.isFinite(u)&&v>=u&&(v=0);else if(v<=0){if(!Number.isFinite(u))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");v=u}b=!1,p=!0,g=Date.now(),O(!0)}})(),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;M(),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;M(),v=0,g=0,p=!1,b=!1,j(v),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;v=Number.isFinite(u)?u:S(),g=0,p=!1,null!==m&&(ui(m),m=null),j(d?v:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!isFinite(t)||0===t)return void console.warn("setPlaybackRate: rate must be finite and non-zero");let e=x();Number.isFinite(u)&&e>u&&(e=u),t<0!=y<0&&(b=!1),y=t,v=e,p&&(g=Date.now())},getCurrentTime:()=>S(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(u)&&t>u&&(t=u),v=t,p&&(g=Date.now()),(!Number.isFinite(u)||t<u)&&(b=!1),j(S())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var fi=[1,0,0,1,0,0];function di(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}var hi=(t,e)=>[1,0,0,1,t,e],mi=(t,e)=>[t,0,0,e,0,0];function pi(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var vi=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],gi=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function yi(t){let e=fi;t.translate&&(e=di(e,hi(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=di(e,hi(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=di(e,pi(t.rotate))),t.scale&&(e=di(e,mi(t.scale[0],t.scale[1]))),n&&(e=di(e,hi(-t.origin[0],-t.origin[1]))),e}function bi(t,e,n){return t+(e-t)*n}function ki(t,e){return null==t?fi:"string"==typeof t?function(t){let e=fi;const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(t);){const t=r[1],n=r[2].split(/[\s,]+/).filter(Boolean).map(Number);"translate"===t?e=di(e,hi(n[0]||0,n[1]||0)):"scale"===t?e=di(e,mi(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=di(e,pi(n[0])):"skewX"===t?e=di(e,vi(n[0])):"skewY"===t?e=di(e,gi(n[0])):"matrix"===t&&(e=di(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?yi(function(t,e){var n,r,o,i,a,s,l;if(!t.length)return{};if(e<=(null!=(n=t[0].time)?n:0))return t[0].value||{};if(e>=(null!=(r=t[t.length-1].time)?r:0))return t[t.length-1].value||{};let u=0;for(;u<t.length-1&&(null!=(o=t[u+1].time)?o:0)<e;)u++;const c=t[u],f=t[u+1],d=(e-(null!=(i=c.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=c.time)?s:0)||1),h=c.value||{},m=f.value||{},p={};return h.translate&&m.translate?p.translate=[bi(h.translate[0],m.translate[0],d),bi(h.translate[1],m.translate[1],d)]:p.translate=h.translate||m.translate,void 0!==h.rotate&&void 0!==m.rotate?p.rotate=bi(h.rotate,m.rotate,d):p.rotate=null!=(l=h.rotate)?l:m.rotate,h.scale&&m.scale?p.scale=[bi(h.scale[0],m.scale[0],d),bi(h.scale[1],m.scale[1],d)]:p.scale=h.scale||m.scale,p.origin=h.origin||m.origin,p}(t.keyframes,e)):t.value?yi(t.value):"object"!=typeof t||Array.isArray(t)?fi:yi(t)}var Ai=new Set(["svg","g","symbol"]),wi=new Set(["defs","mask","clipPath","title"]);function xi(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>xi(t,e))}function Si(t){return null==t?0:Number(t)}function ji(t){return Math.round(100*t)/100+0}function Pi(t,e,n,r,o){var i;const a=t.type||"";if(wi.has(a))return;const s=di(e,function(t,e){return t.animate&&t.animate.transform?ki(t.animate.transform,e):void 0!==t.transform?ki(t.transform,e):fi}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=di(s,hi(Si(t.x),Si(t.y)));return void(i?Pi(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}Ai.has(a)?null==(i=t.children)||i.forEach(t=>Pi(t,s,n,r,o)):o.push(function(t,e,n){var r,o,i,a,s;const l=null!=(r=t.fill)?r:"",u=null!=(o=t.stroke)?o:"",c=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=ji(function(t,e,n,r){var o,i,a,s,l,u;if(t&&t.keyframes&&t.keyframes.length){const e=t.keyframes;if(r<=(null!=(o=e[0].time)?o:0))return e[0].value;if(r>=(null!=(i=e[e.length-1].time)?i:0))return e[e.length-1].value;let n=0;for(;n<e.length-1&&(null!=(a=e[n+1].time)?a:0)<r;)n++;const c=e[n],f=e[n+1],d=(r-(null!=(s=c.time)?s:0))/((null!=(l=f.time)?l:0)-(null!=(u=c.time)?u:0)||1);return bi(c.value,f.value,d)}return void 0!==e?Number(e):1}(null==(s=t.animate)?void 0:s.opacity,t.opacity,0,n)),d=t.mask?1:0,h=e.map(ji).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Si(t.width)+","+Si(t.height)+","+Si(t.x)+","+Si(t.y);case"ellipse":return Si(t.rx)+","+Si(t.ry)+","+Si(t.cx)+","+Si(t.cy);case"circle":return Si(t.r)+","+Si(t.cx)+","+Si(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(Si(c)||"")+"|o:"+f+"|m:"+d}(t,s,n))}function Oi(t,e){var n;e.add(0),(t=>{var n;if(t&&"object"==typeof t)for(const r of Object.keys(t)){const o=null==(n=t[r])?void 0:n.keyframes;Array.isArray(o)&&o.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)})}})(t.animate),t.transform&&"object"==typeof t.transform&&t.transform.keyframes&&t.transform.keyframes.forEach(t=>{var n;return e.add(null!=(n=t.time)?n:0)}),null==(n=t.children)||n.forEach(t=>Oi(t,e))}function Mi(t,e){const n=new Map;xi(t,n);const r=[];return Pi(t,fi,e,n,r),r.sort()}function _i(t,e){const n=new Set;Oi(t,n),Oi(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Mi(t,o),i=Mi(e,o),a=Ei(n,i),s=Ei(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function Ei(t,e){const n=new Map;for(const t of e)n.set(t,(n.get(t)||0)+1);const r=[];for(const e of t){const t=n.get(e)||0;t>0?n.set(e,t-1):r.push(e)}return r}function Ii(t,e){const{startOn:n,outAction:r="continue",scrollIntoViewThreshold:o=0}=e,i=t.getRootElement();if(!i)return console.warn("setupAnimationTriggers: No root element found for animation."),t;let a=!1;const s=()=>{a&&(a=!1,t.setPlaybackRate(1)),t.play()},l=()=>{switch(r){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":a=!0,t.setPlaybackRate(-1),t.play()}};switch(n){case"load":{const t=()=>s();"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0});break}case"mouseOver":{let t=!1;const e=()=>{t=!0,s()},n=()=>{t&&l()};i.addEventListener("mouseenter",e),i.addEventListener("mouseleave",n);break}case"click":{const e=()=>{t.isPlaying()?l():s()};i.addEventListener("click",e);break}case"scrollIntoView":{const t=t=>{var e,n;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,a=null!=(n=null==(e=t.rootBounds)?void 0:e.height)?n:1/0,s=Math.min(i,a),l=Math.min(r.height,Number.isFinite(s)?s:r.height);return l>0?o.height/l:t.intersectionRatio},e=Array.from({length:21},(t,e)=>e/20);let n=!1;new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&t(e)>=o?(n=!0,s()):n&&(n=!1,l())})},{threshold:e}).observe(i);break}}return t}function zi(t){return"#"+t}function Ti(t,e,n,r){const o=Bt(t)||{};if(!r)if(t.id){const e=zi(t.id);(r=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const i=ci(t,e||function(t){const e=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=K(r);const i=zi(n),a=(null==t?void 0:t.querySelectorAll(i))||document.querySelectorAll(i);0!==a.length||e.has(i)||(e.add(i),console.warn('setAttribute: No elements found for selector "'+i+'"'));for(let t=0;t<a.length;t++){const e=a[t],n="transform"===r&&"pattern"===e.tagName?"patternTransform":r;e.setAttribute(n,o),U.has(r)&&(e.style[r]=o)}}}}(r),n),a=f(c({},i),{getRootElement:()=>r||null});return o.trigger&&(tt(o)?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Ii(a,o.trigger)),a}function Ni(t,e,n,r){var o,i;let a=null!=(o=t.v)?o:t.value;const s=null!=(i=t.e)?i:t.easing,l={offset:e,easing:s&&Array.isArray(s)?"cubic-bezier("+s.join(",")+")":void 0};let u,c=n;return L.has(n)&&Array.isArray(a)?u=C(a):"transform"!==n||null===a||"object"!=typeof a||Array.isArray(a)?D.has(n)?(Array.isArray(a)&&("translate"===n&&(a=a.map(t=>t+"px")),a=a.join(",")),"rotate"===n&&(a+="deg"),u=n+"("+a+")",c="transform"):u="d"===n?'path("'+(a&&"object"==typeof a&&Array.isArray(a.paths)?a.paths:[]).map(t=>S(t,!0)).join("")+'")':R.has(n)&&"number"==typeof a?100*a+"%":""+a:(u=B(a,{withUnits:!0}),c="transform"),CSS.supports(K(c),u)||r.add(c),c=W(c),l[c]=u,l}function Ci(t,e,n){var r,o,i,a,s;const l=[];for(let u=0;u<e.length;u++){const d=e[u],h=null!=(r=d.t)?r:0;if(h<0){const n=e[u+1];if(n&&(null!=(o=n.t)?o:0)>=0){const e=(0-h)/((null!=(i=n.t)?i:0)-h),r=d.e?I(d.e)(e):e,{right:o}=T(d.e,e);l.push({t:0,v:Nn(t,d.v,n.v,r),e:o})}continue}if(h>n){const r=e[u-1];if(r&&(null!=(a=r.t)?a:0)<=n){const e=null!=(s=r.t)?s:0,o=(n-e)/(h-e),i=r.e?I(r.e)(o):o,{left:a}=T(r.e,o);l.length>0&&(l[l.length-1]=f(c({},l[l.length-1]),{e:a})),l.push({t:n,v:Nn(t,r.v,d.v,i),e:void 0})}break}l.push(d)}return l}function Fi(t,e,n){var r;const o=new Map;for(const[i,a]of Object.entries(t)){const t=n.duration||1,s=Ci(i,a.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],a=Ni(o,Z((null!=(r=o.t)?r:0)/t,0,1),i,e);0===n&&(a.offset||0)>0&&l.push(f(c({},a),{offset:0})),l.push(a)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(f(c({},l[l.length-1]),{offset:1})),l.length>0&&o.set(i,l)}return o}function Li(t,e,n,r,o){var i;const a=Bt(t)||{};if(!n)if(t.id){const e=zi(t.id);(n=document.querySelector(e))||console.warn("createFrameLoopAnimator: No root element found for selector: ",e)}else console.warn("createFrameLoopAnimator: No root element provided");const s=Un(t,Ot.waapi),l=[],u=a.iterations;let c;"number"==typeof u&&(c=u),"infinite"===u&&(c=1/0);const f=new Set;let d=!1,h=!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=zi(t.id),u=(null==n?void 0:n.querySelectorAll(s))||document.querySelectorAll(s);0===u.length&&console.warn('createWebApiAnimator: No elements found for selector "'+s+'"');const m=Fi(r,f,a),p=a.delay&&a.delay>0?a.delay:void 0;let v;if(a.delay&&a.delay<0&&a.duration){const t=-a.delay;v=c===1/0?t%a.duration:Math.min(t,a.duration*(null!=c?c:1))}const g={duration:a.duration,delay:p,fill:null!=(i=a.fill)?i:"forwards",direction:a.direction,iterations:c};for(let t=0;t<u.length;t++){const n=u[t];for(const[,t]of m)if(t.length>0)try{const r=new KeyframeEffect(n,t,g),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==e?void 0:e.onFinish)&&(i.onfinish=()=>{var t;d||(d=!0,null==(t=e.onFinish)||t.call(e))}),(null==e?void 0:e.onRemove)&&(i.onremove=()=>{var t;h||(h=!0,null==(t=e.onRemove)||t.call(e))}),void 0!==v&&(i.currentTime=v),l.push(i)}catch(t){console.warn(t)}}}if(!r&&f.size)return console.warn("Unsupported CSS attrs: "+[...f].join(", ")),null;const m={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=l[0])?void 0:t.playState)},play:()=>{var t;d=!1,l.forEach(t=>t.play()),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;l.forEach(t=>t.pause()),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;d=!1,l.forEach(t=>t.cancel()),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{var t;for(const e of l)try{(null==(t=e.effect)?void 0:t.getTiming().iterations)===1/0?(e.effect.updateTiming({iterations:1}),e.finish(),e.effect.updateTiming({iterations:1/0})):e.finish()}catch(t){e.cancel()}},setPlaybackRate:t=>(l.forEach(e=>e.playbackRate=t),m),getCurrentTime:()=>{var t,e;const n=null!=(e=null==(t=l[0])?void 0:t.currentTime)?e:null;return null!==n?+n:null},setCurrentTime:t=>{d=!1,l.forEach(e=>{e.currentTime=t})},destroy:()=>{var t;m.cancel(),l.splice(0,l.length),h||(h=!0,null==(t=null==e?void 0:e.onRemove)||t.call(e))}};return a.trigger&&("scroll"===a.timelineSource?console.warn("scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)"):Ii(m,a.trigger)),o&&l.forEach(t=>t.play()),m}function Di(t,e,n){var r,o,i;const a="number"==typeof(null==t?void 0:t.fraction)?t.fraction:e,s=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*a);if(void 0!==s)return n?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:s}:{offset:s}}function Ri(t,e){const n=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===n||o===r)return null;const t=getComputedStyle(o),i="y"===e?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function Bi(){return document.scrollingElement||document.documentElement}var Ui="parent",Vi="scroller";function Wi(t,e){var n,r;const o=null==e?void 0:e.trim();if(!o)return t;if(o===Ui){let e=null;for(let n=t.parentElement;n&&n!==document.body;n=n.parentElement){const t=getComputedStyle(n).position;"sticky"!==t&&"fixed"!==t||(e=n)}return null!=(r=null!=(n=null==e?void 0:e.parentElement)?n:t.parentElement)?r:t}if(o===Vi)return Ri(t,"y")||Ri(t,"x")||Bi();let i=null;try{i=document.querySelector(o)}catch(e){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 Gi(t,e){const n=t;if(!(null==e?void 0:e.pin)||!n.style)return()=>{};const r=n.style,o=r.position,i=r.top;r.position="sticky";const a="center"===e.pinAlign?.5:"bottom"===e.pinAlign?1:0,s=()=>{var n;const o=null!=(n=e.pinTop)?n:0;if(!a)return void(r.top=o+"px");const i=function(t){const e=Ri(t,"y");return e?e.clientHeight:document.documentElement.clientHeight}(t),s=t.getBoundingClientRect().height;r.top=Math.round((i-s)*a+o)+"px"};s();let l=null;const u=a?s:null;a&&(u&&window.addEventListener("resize",u),"undefined"!=typeof ResizeObserver&&(l=new ResizeObserver(s),l.observe(t)));let c=null;const f=t.parentElement;return e.pinDistance&&e.pinDistance>0&&f&&(c=document.createElement("div"),c.setAttribute("data-px-pin",""),c.style.height=100*e.pinDistance+"vh",f.insertBefore(c,t),c.appendChild(t)),()=>{u&&window.removeEventListener("resize",u),null==l||l.disconnect(),r.position=o,r.top=i,(null==c?void 0:c.parentElement)&&(c.parentElement.insertBefore(t,c),c.remove())}}function qi(t,e,n){let r,o=e;t.resetOnFinish&&(o=f(c({},e),{onFinish:()=>{var t;null==(t=null==e?void 0:e.onFinish)||t.call(e),null==r||r.cancel()}}));const i=n(o);return r=i,t.debugInstName&&(window[t.debugInstName]=i),i}var Ki="http://www.w3.org/2000/svg";function Zi(t,e){if(!t)return null;const n=t,{type:r,children:o,style:i}=n,u=((t,e)=>{var n={};for(var r in t)s.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&a)for(var r of a(t))e.indexOf(r)<0&&l.call(t,r)&&(n[r]=t[r]);return n})(n,["type","children","style"]),c=u.domType;void 0!==c&&delete u.domType;const f=Vt(t)||e,d=function(t,e){var n;if(t)return"string"==typeof t?null==(n=null==e?void 0:e.styles)?void 0:n[t]:t}(i,f);let h;if(o)for(const t of o){const e=Zi(t,f);e&&(h||(h=[]),h.push(e))}const m=function(t,e,n,r,o){if(Ge.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(Ki,t);for(const t in e){const n=Je(t,e[t]);void 0!==n&&(Ze.has(t)?i.style[t]=String(n):i.setAttribute(K(t),n))}if(n)for(const t in n)i.style[t]=String(n[t]);if(r)for(const t of r)i.appendChild(t);return o&&(i.textContent=o),i}(r||"g",$e(u),d,h,u[Tt]||u[zt]);return m&&void 0!==c&&m.setAttribute("type",c),m}var Xi="data";function Hi(t,e,n,r){const o=ze(t);for(const t of o)console.warn("[PxAnimator] effects shape warning:",t);t=li(t,(Bt(t)||{}).mode===Pt.frames?Ot.frames:Ot.waapi);let i=null;if(r){t=Ve(t);const e="string"==typeof r?document.querySelector(r):r;e&&(i=Zi(t),i&&e.replaceChildren(i))}const a=function(t,e,n,r){return function(t,e,n,r){const o=Bt(t)||{};return tt(o)?qi(o,n,n=>{var i,a;let s=()=>{};if(o.mode!==Pt.frames&&"native"===(null==(i=o.scroll)?void 0:i.driver)&&r){s=Gi(r,o.scroll);const e=function(t,e){var n,r,o,i;if(!e||!tt(e))return null;const a=e.scroll||{},s=null!=(n=a.kind)?n:"view";if(a.smoothing)return console.warn('scroll timeline: `smoothing` needs the built-in driver — ignoring `driver: "native"`'),null;const l=globalThis,u="view"===s,c=u?l.ViewTimeline:l.ScrollTimeline;if("function"!=typeof c)return null;const f=null!=(r=a.axis)?r:"block";let d;try{d=new c(u?{subject:Wi(t,a.subject),axis:f}:{source:"root"===a.source?Bi():Ri(t,"y")||Ri(t,"x")||Bi(),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:Di(null==(o=a.range)?void 0:o.start,0,u),rangeEnd:Di(null==(i=a.range)?void 0:i.end,1,u)}}(r,o);if(e){const i=Li(t,n,r,o.mode===Pt.waapi,e);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{s(),t()},i}}s(),s=()=>{}}const l=(o.mode!==Pt.frames?Li(t,n,r,o.mode===Pt.waapi):null)||Ti(t,e,n,r),u=(null==(a=l.getRootElement)?void 0:a.call(l))||r;if(u){s=Gi(u,o.scroll);const t=("number"==typeof(null==(c=o)?void 0:c.duration)&&c.duration>0?c.duration:V)*("number"==typeof(null==c?void 0:c.iterations)&&c.iterations>0?c.iterations:1),e=function(t,e,n){var r,o;if(!e||!tt(e))return null;const i=e.scroll||{},a=null!=(r=i.kind)?r:"view",s=Wi(t,i.subject),l=Ri(t,"y")||Ri(t,"x"),u="scroll"===a&&"root"===i.source?Bi():l||Bi(),c=u===Bi(),f=function(t,e){const n=null!=t?t:"block";if("x"===n||"y"===n)return n;const r=!!e&&e.startsWith("vertical");return"inline"===n?r?"y":"x":r?"x":"y"}(i.axis,getComputedStyle(u).writingMode),d=()=>{if("scroll"===a)return function(t,e,n){var r,o;const i=e>0?Z(t/e,0,1):1,a="number"==typeof(null==(r=null==n?void 0:n.start)?void 0:r.fraction)?n.start.fraction:0,s="number"==typeof(null==(o=null==n?void 0:n.end)?void 0:o.fraction)?n.end.fraction:1;return s<=a?i>=s?1:0:Z((i-a)/(s-a),0,1)}("y"===f?u.scrollTop:u.scrollLeft,"y"===f?u.scrollHeight-u.clientHeight:u.scrollWidth-u.clientWidth,i.range);const t=s.getBoundingClientRect();let e,n;if(c)e=0,n="y"===f?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=u.getBoundingClientRect();e="y"===f?t.top:t.left,n="y"===f?u.clientHeight:u.clientWidth}return function(t,e,n,r){const o=n-t,i=nt(null==r?void 0:r.start,0,e,n),a=nt(null==r?void 0:r.end,1,e,n);return a<=i?o>=a?1:0:Z((o-i)/(a-i),0,1)}(("y"===f?t.top:t.left)-e,"y"===f?t.height:t.width,n,i.range)},h=Math.max(0,null!=(o=i.smoothing)?o:0)/1e3;let m=!1,p=null,v=null,g=0,y=null;const b=()=>{y=null,m||(t=>{if(!h)return void n(t);if(null===p)return p=t,void n(t);if(null!==v)return;g=0;const e=t=>{if(v=null,m)return;const r=g?Math.min(.1,(t-g)/1e3):1/60;g=t;const o=d(),i=1-Math.exp(-r/h);p+=(o-p)*i,Math.abs(o-p)<.001&&(p=o),n(p),p!==o&&(v=requestAnimationFrame(e))};v=requestAnimationFrame(e)})(d())},k=()=>{m||null!==y||(y=requestAnimationFrame(b))},A=c?window:u;let w;A.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k,{passive:!0}),"undefined"!=typeof ResizeObserver&&(w=new ResizeObserver(k),w.observe(s),s!==t&&w.observe(t),c||w.observe(u));const x={destroy:()=>{m||(m=!0,A.removeEventListener("scroll",k),window.removeEventListener("resize",k),null==w||w.disconnect(),null!==y&&(cancelAnimationFrame(y),y=null),null!==v&&(cancelAnimationFrame(v),v=null))},refresh:()=>{m||(p=d(),n(p))}};return x.refresh(),x}(u,o,e=>l.setCurrentTime(e*t));if(e){const t=l.destroy.bind(l);l.destroy=()=>{e.destroy(),s(),t()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var c;return l}):qi(o,n,n=>o.mode===Pt.frames?Ti(t,e,n,r):Li(t,n,r,o.mode===Pt.waapi)||Ti(t,e,n,r))}(t,e,n,r)}(t,e,n,i);if(r&&i){const t=i,e=a.destroy.bind(a);a.destroy=()=>{e(),t.remove()}}return a}function Yi(t){const{src:e,data:n,adapter:r,callbacks:o,container:i}=t;if(void 0!==n&&void 0!==e)throw new Error("createAnimator: provide either `src` or `data`, not both");if(void 0===n&&void 0===e)throw new Error("createAnimator: either `src` or `data` is required");if(void 0!==n)return Hi(n,r,o,i);let a=null,s=[],l=!1;const u=t=>{a?t(a):s&&s.push(t)};return fetch(e).then(t=>t.json()).then(t=>{if(!l)if(Rt(t)){a=Hi(t,r,o,i);const e=s;s=null,null==e||e.forEach(t=>t(a))}else console.error('createAnimator: invalid animation document format at "'+e+'"')}).catch(t=>{s=null,console.error('createAnimator: failed to load "'+e+'"',t)}),{isReady:()=>!!a,getRootElement:()=>a?a.getRootElement():null,isPlaying:()=>(null==a?void 0:a.isPlaying())||!1,play:()=>{u(t=>t.play())},pause:()=>{u(t=>t.pause())},cancel:()=>{u(t=>t.cancel())},finish:()=>{u(t=>t.finish())},setPlaybackRate:t=>{u(e=>e.setPlaybackRate(t))},getCurrentTime:()=>a?a.getCurrentTime():null,setCurrentTime:t=>{u(e=>e.setCurrentTime(t))},destroy:()=>{l=!0,s=null,null==a||a.destroy()}}}function Qi(){const t=document.querySelectorAll("["+St+"]");for(let e=0;e<t.length;e++){const n=t[e];if(!n[jt]){const t=n.getAttribute(St);t&&(n[jt]=Yi({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=Qi,window.createAnimator=Yi,window.setupAnimationTriggers=Ii);