@pixodesk/svg-animator-web 1.0.35 → 1.0.39

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,c=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,u=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&c(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&c(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:()=>F,MISSING_GLYPH_CLASS_NAME:()=>Ro,PX_ANIMATOR_DATA_KEY:()=>ba,PX_ANIM_ATTR_NAME:()=>Pt,PX_ANIM_SRC_ATTR_NAME:()=>St,PX_TRANSFORM_PART_KEYS:()=>Kt,PxAnimatedSvgDocumentSchema:()=>tn,PxAnimationDefinitionSchema:()=>me,PxAnimatorConfigSchema:()=>_e,PxAttrValueSchema:()=>Te,PxBezierPathSchema:()=>en,PxBindingSchema:()=>Ee,PxCloneEffectSchema:()=>Ue,PxCloneWithout:()=>Ft,PxDefsSchema:()=>be,PxEasingOrRefSchema:()=>ne,PxEffectsSchema:()=>Xe,PxElementAnimationSchema:()=>pe,PxFillGradientEffectSchema:()=>Ge,PxGradientSpreadMethod:()=>Xt,PxGradientStopSchema:()=>Ve,PxGradientType:()=>Ht,PxGradientUnits:()=>Zt,PxKeyframeSchema:()=>oe,PxKeyframeValueSchema:()=>re,PxLoopDirection:()=>It,PxLoopRepeatAt:()=>zt,PxLoopSchema:()=>ue,PxMaskedByEffectSchema:()=>Fe,PxNodeBase:()=>Je,PxNodeSchema:()=>Qe,PxPropertyAnimationSchema:()=>fe,PxRepeaterEffectSchema:()=>De,PxRetimeEffectSchema:()=>Be,PxStrokeGradientEffectSchema:()=>qe,PxStrokeTrimEffectSchema:()=>Le,PxStrokeTrimSubPaths:()=>Rt,PxSvgNodeExtra:()=>$e,PxTextEffectSchema:()=>Ze,PxTextPathEffectSchema:()=>Ke,PxTimelineEngine:()=>_t,PxTimelineEngineExtra:()=>Et,PxTransformByEffectSchema:()=>Ce,PxTransformPartsSchema:()=>de,PxTransformValueSchema:()=>he,PxTriggerSchema:()=>ge,STYLE_ATTR_NAMES:()=>U,TRANSFORM_FN_NAMES:()=>R,applyAnimatorConfig:()=>Qi,applyPlayerEffects:()=>pi,calcAnimationValues:()=>sr,camelCaseToKebabWordIfNeeded:()=>K,collectSampleTimes:()=>Li,createAnimator:()=>Aa,createAnimatorImpl:()=>ka,createBasicFrameLoopAnimator:()=>wi,createFrameLoopAnimator:()=>oa,createPathSampler:()=>uo,createWebApiAnimator:()=>la,describeSchema:()=>wt,diffInEffect:()=>Ui,evaluateMotionPathSegment:()=>Sn,extendedPathForBrowser:()=>yo,foldAnimatorConfigShortcuts:()=>Yi,generateNewIds:()=>sn,getAnimatorConfig:()=>Jt,getBindings:()=>te,getChildren:()=>ee,getDefs:()=>$t,getNormalizedProps:()=>vn,isPxElementFileFormat:()=>Yt,isPxElementFileFormatDeep:()=>nn,jsonElementFactory:()=>bo,layoutGlyphTextChars:()=>Uo,loadTagAnimators:()=>wa,materialiseAllInTree:()=>ki,materialiseAnimatedUseInstances:()=>dr,materialiseGlyphText:()=>$o,materialiseGlyphTextAlongPath:()=>Go,materialiseGlyphTextHorizontal:()=>Bo,materialiseInternalLoopsInPropAnim:()=>er,materialiseInternalLoopsInTree:()=>nr,materialiseMotionPathInPropAnim:()=>_n,materialiseMotionPathsInTree:()=>Vn,mergeAnimatorConfig:()=>Ji,normalizeDocument:()=>ir,propAnimIsMotionPath:()=>wn,px:()=>xt,renderNode:()=>va,schemaKeys:()=>At,setupAnimationTriggers:()=>na,shiftAnimatable:()=>go,toRGBA:()=>C,validateDocument:()=>Ye,validateNodeEffects:()=>He,visualModelAt:()=>Bi}),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,g=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,v=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={}))y.call(e,n)&&k(t,n,e[n]);if(g)for(var n of g(e))v.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)y.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&g)for(var r of g(t))e.indexOf(r)<0&&v.call(t,r)&&(n[r]=t[r]);return n};function j(t,e=!1){var n,r,o,i;const a=t.v,s=t.i,l=t.o,c=t.c;if(!a.length)return"";const u=[],f=a.length;u.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,c=null!=(r=null==s?void 0:s[t])?r:a[t],f=a[t];e||i[0]!==o[0]||i[1]!==o[1]||c[0]!==f[0]||c[1]!==f[1]?u.push("C"+i[0]+","+i[1]+","+c[0]+","+c[1]+","+f[0]+","+f[1]):u.push("L"+f[0]+","+f[1])}if(c&&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],c=a[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===c[0]&&r[1]===c[1]||u.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+c[0]+","+c[1]),u.push("z")}return u.join("")}function S(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]=S(t[i]||0,e[i]||0,n);return r}function O(t,e,n){return[S(t[0]||0,e[0]||0,n),S(t[1]||0,e[1]||0,n),S(t[2]||0,e[2]||0,n),S(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,c,u,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=[],g=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];m.push(P(f,h,d));const y=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,v=null!=(a=null==(i=e.i)?void 0:i[n])?a:h;p.push(P(y,v,d));const b=null!=(l=null==(s=t.o)?void 0:s[n])?l:f,k=null!=(u=null==(c=e.o)?void 0:c[n])?u:h;g.push(P(b,k,d))}return{v:m,i:p.length?p:void 0,o:g.length?g: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,c=0,u=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;c<u;){const t=a(l);if(Math.abs(t-n)<1e-6)return l;n>t?c=l:u=l,l=(u+c)/2}return l}function T(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 N(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function z(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:c,right:u}=function(t,e,n,r,o){const i=N(t,e,o),a=N(e,n,o),s=N(n,r,o),l=N(i,a,o),c=N(a,s,o),u=N(l,c,o);return{left:[t,i,l,u],right:[u,c,s,r]}}([0,0],s,l,[1,1],a),f=c[3][0],d=c[3][1];let h,m;f>1e-9&&Math.abs(d)>1e-9&&(h=[c[1][0]/f,c[1][1]/d,c[2][0]/f,c[2][1]/d]);const p=1-f,g=1-d;return p>1e-9&&Math.abs(g)>1e-9&&(m=[(u[1][0]-f)/p,(u[1][1]-d)/g,(u[2][0]-f)/p,(u[2][1]-d)/g]),{left:h,right:m}}function I(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 D(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 F=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),R=new Set(["translate","rotate","scale","skew"]),L=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,c=t.scale,u=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+u+","+i[1]+u+")"),a&&o.push("translate("+a[0]+u+","+a[1]+u+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),c&&o.push("scale("+c[0]+","+c[1]+")"),a&&o.push("translate("+-a[0]+u+","+-a[1]+u+")"),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,c=3*o*a,u=3*s*i,f=s*o;return[l*t[0]+c*e[0]+u*n[0]+f*r[0],l*t[1]+c*e[1]+u*n[1]+f*r[1]]}var H=1e-4;function Y(t,e,n,r,o){const i=J(t,e,n,r,o);return 0===i[0]&&0===i[1]?J(t,e,n,r,o<.5?o+H:o-H):i}function J(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 Q(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 c=0;for(let u=1;u<i;u++){const i=u/o,f=X(t,e,n,r,i),d=f[0]-l[0],h=f[1]-l[1];c+=Math.sqrt(d*d+h*h),a[u]=i,s[u]=c,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,c=l>0?(e-s)/l:0;return r[a-1]+c*(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)}},ct=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)}},ut=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){var r;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];if(!e)continue;const o=null!=(r=e.inner)?r:e;this._map.set(o._default,n),e.inner&&(this._absentMember=n)}}_findSchema(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const e=t[this._key];return null==e?this._absentMember:this._map.get(e)}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)){const r=this._shape[t].sanitize(e[t]);void 0!==r&&(n[t]=r)}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)){const r=this._shape[t].sanitize(e[t]);void 0!==r&&(n[t]=r)}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)}},gt=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)}},yt=class extends ot{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},vt=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 ct(t),enum:(t,e)=>new ut(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 gt(t),any:()=>new yt,defined:()=>new vt,tuple:t=>new kt(t),lazy:(t,e)=>new bt(t,e)},jt=/^(\d+)\.(\d+)(?:\.(\d+))?$/;!function(){const t=jt.exec("1.1".trim());t&&(Number(t[1]),Number(t[2]),void 0===t[3]||Number(t[3]))}();var St="data-px-animation-src",Pt="_px_animator",Ot=["duration","iterations","engine","frameRate"],Mt=["trigger","delay","fillMode","direction"],_t={native:"native",js:"js"},Et=w(A({},_t),{auto:"auto"});function Tt(t){return t===Et.js?_t.js:_t.native}function Nt(t){return t===Et.native}var zt={start:"start",end:"end"},It={normal:"normal",alternate:"alternate"},Ct="userSpaceOnUse",Dt="objectBoundingBox",Ft={translate:"translate"},Rt={separate:"separate",combined:"combined"},Lt="text",Bt="textContent",Ut="class",Vt="transform",Wt="offsetDistance",Gt=new Set(["type","children","animator","meta","animate","effects",Lt,Bt]),qt={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},Kt=[qt.translate,qt.rotate,qt.scale,qt.origin],Zt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},Xt={pad:"pad",reflect:"reflect",repeat:"repeat"},Ht={linear:"linear",radial:"radial"};function Yt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function Jt(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=Qt.get(t);if(n)return n;const r=t,{timeline:o}=r,i=x(r,["timeline"]);if(void 0!==e.engine&&(i.engine=e.engine),void 0!==e.frameRate&&(i.frameRate=e.frameRate),"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.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,{finishAction:n}=t,r=x(t,["finishAction"]);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.fillMode&&(i.fill=e.fillMode)}return Qt.set(t,i),i}(n):void 0}var Qt=new WeakMap;function $t(t){var e;if(t)return null==(e=Jt(t))?void 0:e.definitions}function te(t){var e;if(!t)return;const n=null==(e=Jt(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 ee(t){return null==t?void 0:t.children}var ne=xt.union([xt.string(),xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])]),re=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({path:xt.string()}),xt.lazy(()=>xt.object({paths:xt.array(en)}),{paths:[]}),xt.lazy(()=>xt.array(Ve),[]),xt.lazy(()=>de,{})]),oe=xt.object({time:xt.number().optional(),value:re.optional(),easing:ne.optional(),tangentOut:xt.tuple([xt.number(),xt.number()]).optional(),tangentIn:xt.tuple([xt.number(),xt.number()]).optional()}),ie=t=>{var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0},ae=t=>{var e;return null!=(e=t.value)?e:t.v},se=t=>{var e;return null!=(e=t.easing)?e:t.e},le=t=>t.tangentIn,ce=t=>t.tangentOut,ue=xt.object({segmentCount:xt.number().optional(),repeatAt:xt.enum([zt.start,zt.end]).optional(),direction:xt.enum([It.normal,It.alternate]).optional()}),fe=xt.object({value:re.optional(),keyframes:xt.array(oe).optional(),loop:xt.union([ue,xt.boolean()]).optional(),autoOrient:xt.boolean().optional(),alongPathMode:xt.enum(["sampled","offsetPath"]).optional()}),de=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()}),he=xt.union([xt.string(),de,xt.object({value:de}),fe]),me=xt.record(fe),pe=xt.union([xt.string(),xt.array(xt.union([xt.string(),me])),me]),ge=xt.object({startOn:xt.enum(["load","mouseOver","click","scrollIntoView","programmatic"]).optional(),outAction:xt.enum(["continue","pause","reset","reverse"]).optional(),finishAction:xt.enum(["hold","reset"]).optional(),scrollIntoViewThreshold:xt.number().optional()}),ye=xt.object({width:xt.number(),d:xt.string()}),ve=xt.object({fontFamily:xt.string(),fontStyle:xt.string(),ascent:xt.number(),unitsPerEm:xt.number(),glyphs:xt.record(ye)}),be=xt.object({easings:xt.record(xt.tuple([xt.number(),xt.number(),xt.number(),xt.number()])).optional(),animations:xt.record(me).optional(),styles:xt.record(xt.record(xt.union([xt.string(),xt.number()]))).optional(),fonts:xt.record(ve).optional()}),ke=xt.object({phase:xt.enum(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:xt.number().optional()}),Ae=xt.object({start:ke.optional(),end:ke.optional()}),we=(xt.object({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:Ae.optional()}),xt.object({align:xt.enum(["top","center","bottom"]).optional(),top:xt.number().optional(),distance:xt.number().optional()})),xe=xt.enum([Et.auto,Et.native,Et.js]).optional(),je=xt.object({type:xt.literal("time").optional(),engine:xe,frameRate:xt.number().optional(),duration:xt.number().optional(),trigger:ge.optional(),delay:xt.number().optional(),iterations:xt.union([xt.number(),xt.literal("infinite")]).optional(),fillMode:xt.enum(["forwards","backwards","both","none"]).optional(),direction:xt.enum(["normal","reverse","alternate","alternate-reverse"]).optional()}),Se={duration:xt.number().optional(),iterations:xt.number().optional(),engine:xe,frameRate:xt.number().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(),we]).optional(),range:Ae.optional()},Pe=xt.object(A({type:xt.literal("scroll")},Se)),Oe=xt.object(A({type:xt.literal("view")},Se)),Me=xt.discriminatedUnion("type",[je,Pe,Oe]),_e=xt.object({timeline:Me.optional(),definitions:be.optional(),animateById:xt.record(pe).optional(),debugGlobalName:xt.string().optional(),version:xt.string().optional()}),Ee=xt.object({id:xt.string(),animate:pe}),Te=xt.union([xt.string(),xt.number(),xt.array(xt.number()),xt.object({value:xt.defined()}),de]),Ne=xt.union([xt.number(),fe,xt.object({value:xt.number()})]),ze=xt.union([xt.tuple([xt.number(),xt.number()]),fe,xt.object({value:xt.tuple([xt.number(),xt.number()])})]),Ie=xt.union([xt.string(),fe,xt.object({value:xt.string()})]),Ce=xt.object({translate:ze.optional(),rotate:Ne.optional(),scale:ze.optional(),skew:Ne.optional(),origin:ze.optional()}),De=xt.object({copies:xt.number().optional(),translate:ze.optional(),rotate:Ne.optional(),skew:Ne.optional(),scale:ze.optional(),origin:ze.optional()}),Fe=xt.object({source:xt.string().optional(),maskType:xt.enum(["luminance","alpha"]).optional(),maskUnits:xt.enum([Ct,Dt]).optional(),maskContentUnits:xt.enum([Ct,Dt]).optional(),x:xt.number().optional(),y:xt.number().optional(),width:xt.number().optional(),height:xt.number().optional()}),Re=xt.object({d:Ie.optional()}),Le=xt.object({offset:Ne.optional(),range:ze.optional(),subPaths:xt.enum([Rt.separate,Rt.combined]).optional()}),Be=xt.object({start:xt.number().optional(),stretch:xt.number().optional(),timeCrop:xt.tuple([xt.number(),xt.number()]).optional()}),Ue=xt.object({without:xt.enum([Ft.translate]).optional(),source:xt.string().optional(),retime:Be.optional()}),Ve=xt.object({offset:xt.number(),color:xt.string()}),We=xt.union([xt.array(Ve),xt.object({value:xt.array(Ve)}),fe]),Ge=xt.object({type:xt.enum([Ht.linear,Ht.radial]),start:ze.optional(),end:ze.optional(),center:ze.optional(),radius:Ne.optional(),focal:ze.optional(),stops:We.optional(),gradientUnits:xt.enum([Zt.userSpaceOnUse,Zt.objectBoundingBox]).optional(),spreadMethod:xt.enum([Xt.pad,Xt.reflect,Xt.repeat]).optional(),gradientTransform:xt.string().optional()}),qe=Ge,Ke=xt.object({pathData: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:Ne.optional(),textLength:Ne.optional()}),Ze=xt.object({useGlyphs:xt.boolean().optional()}),Xe=xt.object({transformBy:Ce.optional(),repeater:De.optional(),maskedBy:Fe.optional(),clipPath:Re.optional(),strokeTrim:Le.optional(),clone:Ue.optional(),fillGradient:Ge.optional(),strokeGradient:qe.optional(),textPath:Ke.optional(),text:Ze.optional()});function He(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Xe.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}function Ye(t){const e={errors:[],warnings:[],strict:!0},n=tn.isValid(t,e,["root"])?[]:[...e.errors];if(t&&"object"==typeof t)for(const e of He(t,{strict:!0}))n.includes(e)||n.push(e);return n}var Je=xt.openObject({type:xt.string(),domType:xt.string().optional(),id:xt.string().optional(),meta:xt.any().optional(),effects:Xe.optional(),animate:pe.optional(),style:xt.union([xt.string(),xt.record(xt.union([xt.string(),xt.number()]))]).optional()},Te),Qe=xt.openObject(w(A({},Je._shape),{children:xt.lazy(()=>xt.array(Qe),[]).optional()}),Te),$e=xt.object({width:xt.union([xt.number(),xt.string()]).optional(),height:xt.union([xt.number(),xt.string()]).optional(),viewBox:xt.string().optional(),animator:_e.optional()}),tn=xt.openObject(w(A(A({},Je._shape),$e._shape),{type:xt.literal("svg"),children:xt.array(Qe).optional()}),Te),en=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 nn(t){const e=tn.isValid(t);return{valid:e,errors:e?[]:["Document failed schema validation"]}}var rn=0;function on(){return"_px_"+Date.now().toString(36)+(++rn).toString(36)+Math.random().toString(36).substring(2,6)}function an(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>an(t));const e=t,n={};for(const t of Object.keys(e))n[t]=an(e[t]);return n}function sn(t){var e,n;const r=an(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(["targetId","boundElementId"]),l=(t,e)=>"source"===t&&("maskedBy"===e||"clone"===e);!function t(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=on();o.set(t,n),e.id=n}else e.animate&&(e.id=on());if(Array.isArray(e.children))for(const n of e.children)t(n)}}(r),function t(e,n){if(e&&"object"==typeof e)for(const[r,c]of Object.entries(e))if("children"!==r)if("string"==typeof c)if(i.has(r)&&c.startsWith("#")){const t=c.slice(1),n=o.get(t);n&&(e[r]="#"+n)}else if(a.has(r))e[r]=ln(c,o);else if(s.has(r)||l(r,n)){const t=c.startsWith("#"),n=o.get(t?c.slice(1):c);n&&(e[r]=t?"#"+n:n)}else c.includes("url(#")&&(e[r]=ln(c,o));else if("style"===r&&"object"==typeof c&&null!==c)for(const[t,e]of Object.entries(c))"string"==typeof e&&(c[t]=ln(e,o));else"object"==typeof c&&null!==c&&t(c,r);else if(Array.isArray(c))for(const e of c)t(e)}(r);const c=null==(e=r.animator)?void 0:e.animateById;if(c&&"object"==typeof c){const t={};for(const[e,r]of Object.entries(c)){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 ln(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var cn=new Set(["script","foreignobject"]),un=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),fn=new Set(["href","xlink:href","src"]),dn=new Set(["mixBlendMode","isolation"]),hn=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,mn=/^data:image\/svg\+xml(?:;[^,]*)?,/i,pn=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,gn=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function yn(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(un.has(n)){const t=String(e);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||fn.has(n)&&(hn.test(t)||mn.test(t)||function(t){const e=pn.exec(t);return!!e&&gn.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 vn(t){const e={};for(const n of Object.keys(t)){const r=W(n);if(Gt.has(r))continue;if("style"===r)continue;let o=t[n];if(F.has(r)&&Array.isArray(o))e[r]=C(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)R.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e[Vt]=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[Vt]=B(t,{withUnits:!1})}}return e}function bn(t){const e=ae(t);if(!e)return;if(Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1])return[e[0],e[1]];const n=e.translate;return Array.isArray(n)&&n.length>=2?[n[0],n[1]]:void 0}function kn(t){return ie(t)}function An(t){return se(t)}function wn(t){const e=t.keyframes;if(!Array.isArray(e))return!1;if(t.autoOrient)return!0;for(const t of e)if(le(t)||ce(t))return!0;return!1}var xn=new WeakMap;function jn(t,e,n,r){let o=xn.get(t);const i=null==o?void 0:o.get(e);if(i)return i;const a=ce(t),s=le(e),l=[n[0]+(a?a[0]:0),n[1]+(a?a[1]:0)],c=[r[0]+(s?s[0]:0),r[1]+(s?s[1]:0)],u=Q(n,l,c,r),f={P0:n,P1:l,P2:c,P3:r,lut:u,totalArc:u.ds[u.ds.length-1]};return o||(o=new WeakMap,xn.set(t,o)),o.set(e,f),f}function Sn(t,e,n,r,o,i){const a=jn(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],c=o[s]-l,u=c>0?(n-l)/c:0;return r[s-1]+u*(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 c=Y(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(c[1],c[0])/Math.PI}}var Pn=.5,On=5,Mn=32;function _n(t,e){var n,r,o;if(!wn(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:Pn,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:On,c=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:Mn,u=[],f=bn(i[0]);if(!f)return t;const d=a?function(t,e){const n=bn(t),r=bn(e);if(!n||!r)return 0;const o=jn(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;u.push(Tn(kn(i[0]),In(Nn(i[0]),Nn(i[0]),0,f,d,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=bn(e),o=bn(n);r&&o?(a&&t>0&&Dn(u,e,n,r,o,l),Rn(u,e,n,r,o,a,s,l,c)):u.push(Tn(kn(n),In(Nn(n),Nn(n),1,null!=o?o:[0,0],void 0,a)))}const h=An(i[i.length-1]);h&&(u[u.length-1].e=h),a&&En(u);const m={keyframes:u};return void 0!==t.loop&&(m.loop=t.loop),m}function En(t){let e;for(const n of t){const t=ae(n);if(!t||"number"!=typeof t.rotate)continue;if(void 0===e){e=t.rotate;continue}let r=t.rotate;for(;r-e>180;)r-=360;for(;r-e<-180;)r+=360;t.rotate=r,e=r}}function Tn(t,e){return{t:t,v:e}}function Nn(t){const e=ae(t);if(e&&"object"==typeof e&&!Array.isArray(e))return e}function zn(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 In(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]=zn(o,s,n))}return void 0!==o&&(a.rotate=o+Cn(t,e,n)),a}function Cn(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=zn(r,o,n);return"number"==typeof i?i:0}function Dn(t,e,n,r,o,i){const a=t[t.length-1],s=ae(a),l=null==s?void 0:s.rotate;if("number"!=typeof l)return;const c=Nn(e),u=l-Cn(c,c,0),f=jn(e,n,r,o),d=Y(f.P0,f.P1,f.P2,f.P3,0),h=180*Math.atan2(d[1],d[0])/Math.PI,m=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(h,u);if(Math.abs(m)<=i)return;const p=kn(e),g=Math.min(p+Fn,(p+kn(n))/2),y=In(Nn(e),Nn(e),0,r,h,!0);t.push(Tn(g,y))}var Fn=.05;function Rn(t,e,n,r,o,i,a,s,l){const c=jn(e,n,r,o),u=kn(e),f=kn(n),d=An(e),h=(m=d)?T([m[1],m[0],m[3],m[2]]):t=>t;var m;const p=Nn(e),g=Nn(n),y=function(t,e,n,r,o){const i=[];Ln(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),Ln(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++)Bn(a[o],a[o+1],s,t,e,n,r,l);return s}(c,i,a,s,l),v=[];for(const t of y){const e=$(c.lut,t),n=Z(c.totalArc>0?e/c.totalArc:t,0,1),r={u:Z(h(n),0,1),p:n,pos:X(c.P0,c.P1,c.P2,c.P3,t)};if(i){const e=Y(c.P0,c.P1,c.P2,c.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}v.push(r)}let b=d,k=0;const A=t.length-1;for(let e=0;e<v.length;e++){const n=v[e],r=k<1?Z((n.u-k)/(1-k),0,1):1,{left:o,right:a}=z(b,r),s=0===e?A:t.length-1;o?t[s].e=o:delete t[s].e;const l=u+n.u*(f-u),c=In(p,g,n.p,n.pos,n.rotateDeg,i);t.push(Tn(l,c)),b=a,k=n.u}}function Ln(t,e,n,r,o){const i=e-t,a=n-e,s=i-2*a+(r-n),l=2*(a-i),c=i;if(Math.abs(s)<1e-10){if(Math.abs(l)>1e-10){const t=-c/l;t>1e-6&&t<.999999&&o.push(t)}return}const u=l*l-4*s*c;if(u<0)return;const f=Math.sqrt(u),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 Bn(t,e,n,r,o,i,a,s){const l=(t+e)/2,c=X(r.P0,r.P1,r.P2,r.P3,t),u=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(Un(d,c,u),Un(h,c,u),Un(m,c,u));let g=!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&&(g=!1)}p<=i&&g||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,Bn(t,l,n,r,o,i,a,s),Bn(l,e,n,r,o,i,a,s))}function Un(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 Vn(t,e){const n=Wn(t,e);return null!=n?n:t}function Wn(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Wn(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&&wn(n)){const o=_n(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 Gn=1;function qn(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=>qn(t[n],e[n]))}function Kn(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 Zn(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Xn(t){return"string"==typeof t&&void 0!==Zn(t)}function Hn(t){if(t&&"object"==typeof t&&"string"==typeof t.path){const e=Zn(t.path);return e?{paths:Kn(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&Xn(e[0])){const t=[];for(const n of e){const e=Zn(n);e&&t.push(...Kn(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Xn(t[0])){const e=[];for(const n of t){const t=Zn(n);t&&e.push(...Kn(t))}return{paths:e}}return{paths:t}}return Xn(t)?{paths:Kn(Zn(t))}:t}function Yn(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 Jn(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 Qn(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)}:F.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?S(e,n,r):R.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?P(e||[],n||[],r):S(+(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]=S(+(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 $n(t,e,n,r){var o,i,a,s,l;const c=e.length-1,u=Z(null!=(o=n.segmentCount)?o:c,1,c);let f;f=n.repeatAt===zt.start?e.slice(0,u+1):e.slice(c-u);const d=null!=(i=e[0].t)?i:0,h=null!=(a=e[e.length-1].t)?a:0;let m,p;n.repeatAt===zt.start?(m=0,p=d):(m=h,p=r);const g=p-m;if(g<=0)return e;const y=null!=(s=f[0].t)?s:0,v=(null!=(l=f[f.length-1].t)?l:0)-y;if(v<=0)return e;const b=f.map(t=>({relT:(t.t-y)/v,v:t.v,e:t.e,tangentIn:le(t),tangentOut:ce(t)})),k=Math.floor(g/v),x=g-k*v,j=x/v,S=[],P=n.repeatAt!==zt.start,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?I(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,c=o.e?T(o.e)(l):l,u=Qn(t,o.v,r.v,c),{left:f}=z(o.e,l);return S.length>0&&o.relT<=a&&(S[S.length-1].e=f),void S.push({t:e+a*v,v:u,e:void 0})}const s=S.length>0?S[S.length-1]:O,l=P&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*v))<1e-9;if(l){if(qn(s.v,r.v)){S.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(M=r.e,_=!0);continue}S.length>0&&(delete s.tangentIn,delete s.tangentOut)}const c={t:e+r.relT*v+(l?Gn:0),v:r.v,e:n<i.length-1?r.e:void 0};r.tangentIn&&(c.tangentIn=r.tangentIn),r.tangentOut&&(c.tangentOut=r.tangentOut),S.push(c)}}if(n.repeatAt===zt.start){j>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?I(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?T(a.e)(o):o,l=Qn(t,a.v,r.v,s),{right:c}=z(a.e,o);S.push({t:e,v:l,e:c})}const s={t:e+(r.relT-i)*v,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),S.push(s)}}(m,n.direction===It.alternate&&k%2==0,j);for(let t=0;t<k;t++){const e=k-1-t,r=n.direction===It.alternate&&e%2==0;E(m+x+t*v,r)}}else{for(let t=0;t<k;t++){const e=n.direction===It.alternate&&t%2==0;E(m+t*v,e)}if(j>1e-9){const t=n.direction===It.alternate&&k%2==0;E(m+k*v,t,j)}}return n.repeatAt===zt.start?[...S,...e]:_&&e.length>0?[...e.slice(0,-1),w(A({},e[e.length-1]),{e:M}),...S]:[...e,...S]}function tr(t,e,n,r){var o;const i=e.keyframes||[],a=[];for(const e of i){const n=ie(e);let i=ae(e);const s=se(e);"d"===t&&(i=Hn(i));const l=G(t)?K(t):t;F.has(l)&&(i=null!=(o=D(i))?o:i);const c={t:n,v:i,e:Yn(s,r)},u=le(e),f=ce(e);u&&(c.tangentIn=u),f&&(c.tangentOut=f),a.push(c)}a.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const s=e.loop,l=!0===s?{}:s||void 0;return l&&a.length>=2?$n(t,a,l,n):a}function er(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=F.has(a),l=i.map(e=>{var n;const r=ie(e);let o=ae(e);"d"===t&&(o=Hn(o)),s&&(o=null!=(n=D(o))?n:o);const i={t:r,v:o,e:se(e)},a=le(e),l=ce(e);return a&&(i.tangentIn=a),l&&(i.tangentOut=l),i}),c={keyframes:$n(t,l,o,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function nr(t,e){const n=rr(t,e);return null!=n?n:t}function rr(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=rr(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=er(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 or=0;function ir(t,e=_t.native){const n=Jt(t)||{},r=$t(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=Jn(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=Jn(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=_t.native){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=tr(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===_t.native&&"transform"===i?_n(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[Vt];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=>R.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 c=A({},t);return delete c[a],w(A({},c),{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=te(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_"+ ++or;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 ar(t,e,n){var r,o,i,a;const s=e.keyframes||[];if(0===s.length)return null;const{prevKf:l,nextKf:c}=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,c=null!=(r=t[s+1].t)?r:0;if(l<=e&&e<=c){i=t[s],a=t[s+1];break}e>c&&s===o-1&&(i=t[o>0?o-1:0],a=t[o])}return{prevKf:i,nextKf:a}}(s,n);let u=l===c?0:(f=n,d=null!=(r=l.t)?r:0,(h=null!=(o=c.t)?o:0)===d?0:0+(f-d)/(h-d)*1);var f,d,h;u=Z(u,0,1);const m=se(l);if(m&&Array.isArray(m))try{u=T(m)(u)}catch(t){}let p=G(t)?K(t):t,g=null;const y=null==l?void 0:l.v,v=null==c?void 0:c.v;if("d"===p)g=M(null!=(i=null==y?void 0:y.paths)?i:Array.isArray(y)?y:[],null!=(a=null==v?void 0:v.paths)?a:Array.isArray(v)?v:[],u).map(t=>j(t)).join("");else if(F.has(p))g=C(O(y||[0,0,0,1],v||[0,0,0,1],u)),p=t;else if("stroke-dasharray"===p)g=P(y||[],v||[],u).join(" "),p=t;else if("transform"!==p||null===y||"object"!=typeof y||Array.isArray(y))"translate"===p?(g="translate("+P(y||[0,0],v||[0,0],u).join(",")+")",p="transform"):"rotate"===p?(g="rotate("+S(+(y||0),+(v||0),u)+")",p="transform"):"scale"===p?(g="scale("+P(y||[1,1],v||[1,1],u).join(",")+")",p="transform"):g=S(+(y||0),+(v||0),u);else{const t=new Set([...y?Object.keys(y):[],...v?Object.keys(v):[]]),n={};for(const e of t){const t=null==y?void 0:y[e],r=null==v?void 0:v[e];if("rotate"===e||"skew"===e)n[e]=S(+(null!=t?t:0),+(null!=r?r:0),u);else if("translate"===e||"scale"===e||"origin"===e){const o="scale"===e?[1,1]:[0,0],i=P(t||o,r||o,u);n[e]=i}}if(wn(e)){const t=y.translate,r=v.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=Sn(l,c,[+t[0],+t[1]],[+r[0],+r[1]],u,!!e.autoOrient);n.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(n.rotate=o.rotateDeg)}}g=B(n,{withUnits:!1}),p="transform"}return L.has(p)&&"number"==typeof g&&(g=100*g+"%"),{k:p,v:null===g?"":""+g}}function sr(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=ar(r,o,e);t&&(n[t.k]=t.v)}return n}function lr(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(lr);const e={};for(const n of Object.keys(t))e[n]=lr(t[n]);return e}function cr(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 ur(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function fr(t){var e;const n=ur(t.x),r=ur(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 dr(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=mr(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=pr(t.viewBox);if(e)return[e[2],e[3]];const n=hr(t.width),r=hr(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=gr(t,n,r,()=>"_lw_use_mat_"+ ++o,a,i);if(0===a.length)return s;const l={type:"defs",children:a},c=[...null!=(e=s.children)?e:[],l];return w(A({},s),{children:c})}function hr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function mr(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function pr(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 gr(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=mr(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,c,u;const f=lr(e);cr(f,o);const d="symbol"===f.type?pr(f.viewBox):void 0,h=null!=(l=null!=(s=hr(t.width))?s:null==d?void 0:d[2])?l:a[0],m=null!=(u=null!=(c=hr(t.height))?c:null==d?void 0:d[3])?u:a[1],p="symbol"===f.type?function(t,e,n,r,o){const i=pr(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,c,u]=i,f=c>0&&u>0?Math.min(r/c,o/u):1,d=(r-c*f)/2,h=(o-u*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:c,height:u}]}),a.clipPath="url(#"+p+")",a}(f,o,i,h,m):f,g=gr(p,n,r,o,i,a),y=w(A({},t),{type:"g",children:[g]});return delete y.href,delete y.width,delete y.height,fr(y)}(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=gr(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?w(A({},t),{children:s}):t}function yr(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 vr(t){var e,n;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const r=t,o=r.keyframes;if(o){const t={kind:"animated",keyframes:o.map(kr),autoOrient:r.autoOrient,loop:r.loop},n=null!=(e=r.value)?e:r.v;return void 0!==n&&"animated"===t.kind&&(t.base=n),t}const i=null!=(n=r.value)?n:r.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function br(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 c=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,u=A({},c||{}),f={keyframes:n.keyframes};void 0!==n.loop&&(f.loop=n.loop),void 0!==n.autoOrient&&(f.autoOrient=n.autoOrient),u[e]=f,t.animate=u;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 kr(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 Ar(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 wr(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=jr(r,e.origin,!0),r=xr(r,"scale",e.scale),r=xr(r,"skew",e.skew),r=xr(r,"rotate",e.rotate),r=jr(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=jr(r,e.origin,!0),r=xr(r,"translate",e.translate),r=jr(r,e.origin,!1)):r=xr(r,"translate",e.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function xr(t,e,n,r){if(void 0===n)return t;const o=vr(n);if("static"===o.kind)return{type:"g",transform:{value:yr(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>Ar(t,yr(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 jr(t,e,n){if(void 0===e)return t;const r=vr(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=>Ar(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 Pr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Or(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Or(t,e))}var Mr=lr;function _r(t,e,n){var r,o,i;if("use"===t.type&&"translate"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.without)){const r=Pr(t.effects.clone.source);"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(i=t.children)||i.forEach(t=>_r(t,e,n))}function Er(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 Tr(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 Nr(t,e,n,r){if(!e)return t;const o=Sr(n,"grad"),i=function(t,e){const n={type:t.type===Ht.radial?"radialGradient":"linearGradient",id:e};return t.type===Ht.linear?(zr(n,"x1","y1",t.start),zr(n,"x2","y2",t.end)):(zr(n,"cx","cy",t.center),function(t,e,n){const r=vr(n);"absent"!==r.kind&&br(t,"r",r,{asString:!0})}(n,0,t.radius),zr(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;if(!t)return[];const r=vr(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(Ir):[];const o=r.keyframes;if(!o.length)return[];const i=r.loop;let a=0;for(const t of o){const e=ae(t);Array.isArray(e)&&e.length>a&&(a=e.length)}if(!a)return[];const s=ae(o[0]),l=[];for(let t=0;t<a;t++){const r=null!=(n=null!=(e=null==s?void 0:s[t])?e:Cr(o,0,t))?n:{offset:t/Math.max(1,a-1),color:"#000000"};l.push({offset:r.offset,color:r.color})}return l.map((t,e)=>function(t,e,n,r,o){var i;const a=[],s=[];let l=!1;for(const r of e){const o=ie(r),c=ae(r),u=null!=(i=null==c?void 0:c[n])?i:Cr(e,e.indexOf(r),n);if(!u)continue;const f=se(r),d={time:o,value:u.color};void 0!==f&&(d.easing=f),a.push(d);const h={time:o,value:u.offset};void 0!==f&&(h.easing=f),s.push(h),u.offset!==t.offset&&(l=!0)}const c={type:"stop",offset:Dr(t.offset),stopColor:t.color},u={};return a.length&&(u.stopColor={keyframes:a},void 0!==o&&(u.stopColor.loop=o)),l&&s.length&&(u.offset={keyframes:s},void 0!==o&&(u.offset.loop=o)),Object.keys(u).length&&(c.animate=u),c}(t,o,e,0,i))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function zr(t,e,n,r){var o,i,a;const s=vr(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},c=null!=(o=t.animate)?o:{};c[e]=l(0),c[n]=l(1),t.animate=c;const u=null!=(a=s.base)?a:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(u)&&(t[e]=String(u[0]),t[n]=String(u[1]))}function Ir(t){return{type:"stop",offset:Dr(t.offset),stopColor:t.color}}function Cr(t,e,n){for(let r=e;r>=0;r--){const e=ae(t[r]);if(null==e?void 0:e[n])return e[n]}for(let r=e+1;r<t.length;r++){const e=ae(t[r]);if(null==e?void 0:e[n])return e[n]}}function Dr(t){return Math.round(1e3*t)/10+"%"}function Fr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.path?t.path:void 0}function Rr(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=vr(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=Lr(o,"translate",e.translate,void 0),o=Lr(o,"rotate",e.rotate,r),o=Lr(o,"scale",e.scale,r),o}function Lr(t,e,n,r,o){if(void 0===n)return t;const i=vr("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:yr(e,Br(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=Ar(t,yr(e,Br(e,t.value),r));return"translate"===e?A(A({},n),Ur(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function Br(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function Ur(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 Vr(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function Wr(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 Gr(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=qr(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function qr(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 Kr(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){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}function Zr(t,e,n){if(!e)return;const r=Pr(e.source);if(!r)return void(e.without===Ft.translate&&n.errors.push("clone: content ref missing `source`"));const o=e.without===Ft.translate&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function Xr(t,e){const n={};return void 0!==t.translate&&(n.translate=Hr(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=Hr(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=Hr(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){return Hr(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 Hr(t,e,n=!1){const r=vr(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 Yr=!1;function Jr(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var Qr=1;function $r(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-Qr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Qr,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 to(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function eo(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function no(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 ro(t,e,n){const r=Pr(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=oo(r,e,n,new Set);if(o)if(Yr){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],fr(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function oo(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=Mr(o);if(function(t,e){cr(t,()=>Sr(e,"retimed"))}(i,n),"use"===o.type?ao(i,e.start,e.stretch):io(i,e.start,e.stretch),no(i),"use"===o.type&&o.href){const a=Pr(o.href);if(a){const s=eo(o),l=s?to(Jr(s),e):e,c=new Set(r);c.add(t);const u=oo(a,l,n,c);u&&(i.href="#"+u)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=eo(t);if("use"===t.type&&s&&t.href){const i=Pr(t.href);if(i){const a=to(Jr(s),e),l=new Set(r);l.add(o);const c=oo(i,a,n,l);c&&(t.href="#"+c)}no(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 io(t,e,n){var r;ao(t,e,n),null==(r=t.children)||r.forEach(t=>io(t,e,n))}function ao(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 so=48,lo=/[MmLlHhVvCcSsQqTtAaZz]/;function co(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 uo(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,c=0,u=0,f=0,d="";const h=()=>parseFloat(e[r++]),m=(t,e,r)=>{const a=[o,i],s=Q(a,t,e,r,so);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];lo.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",g=t.toUpperCase();if("Z"!==g){if("M"===g){const e=h()+(n?o:0),r=h()+(n?i:0);o=e,i=r,a=e,s=r,d=t;continue}if("L"===g)p(h()+(n?o:0),h()+(n?i:0));else if("H"===g)p(h()+(n?o:0),i);else if("V"===g)p(o,h()+(n?i:0));else if("C"===g){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],c=e[1],m(t,e,r)}else if("S"===g){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*i-c]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],c=e[1],m(t,e,r)}else if("Q"===g){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)];u=t[0],f=t[1];const{P1:r,P2:a}=co([o,i],t,e);m(r,a,e)}else if("T"===g){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-u,2*i-f]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)];u=t[0],f=t[1];const{P1:r,P2:a}=co([o,i],t,e);m(r,a,e)}else{if("A"!==g){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,c=l>0?(e-s)/l:0;return n[a-1]+c*(n[a]-n[a-1])}(o.lut,i):0,[s,l]=X(o.P0,o.P1,o.P2,o.P3,a),[c,u]=Y(o.P0,o.P1,o.P2,o.P3,a);return{x:s,y:l,angle:Math.atan2(u,c)}};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 fo=.15;function ho(t){const e=vr(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 mo(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 po=t=>Math.round(1e3*t)/1e3;function go(t,e){if(!e||null==t)return t;const n=vr(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 yo(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=uo(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=fo*o,a=ho(e.startOffset),s=ho(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-a.min),c=Math.max(0,a.max+s-o),u=l>0?l+i:0,f=c>0?c+i:0;if(f<=0&&u<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let m=t;if(u>0){const e=d.x-Math.cos(d.angle)*u,n=d.y-Math.sin(d.angle)*u,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");m="M"+po(e)+","+po(n)+"L"+po(d.x)+","+po(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"+po(t)+","+po(e)}return{d:m,startShift:u}}function vo(t,e,n){null!=n&&br(t,e,vr(n),{asString:!0})}var bo=(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 ko(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Ao(t,e){let n="";for(let r=0;r<t.length;r++){const o=ko(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function wo(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var xo=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function jo(t,e,n=2){const r=[];let o;for(xo.lastIndex=0;null!==(o=xo.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]=wo(e,s(),s());i+=t+Ao([r,o],n)}else if("C"===t){const[t,r]=wo(e,s(),s()),[o,a]=wo(e,s(),s()),[l,c]=wo(e,s(),s());i+="C"+Ao([t,r,o,a,l,c],n)}else if("Q"===t){const[t,r]=wo(e,s(),s()),[o,a]=wo(e,s(),s());i+="Q"+Ao([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var So=16,Po=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Lt,Bt,"xml:space"],Oo=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],Mo=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function _o(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function Eo(t){return"string"==typeof t?t:void 0}function To(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of Mo)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function No(t,e){var n,r,o,i,a,s,l,c,u,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=Eo(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=_o(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=_o(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=_o(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(c=_o(m("opacity")))?c:e.opacity,animate:null!=(u=d?void 0:To(t))?u:e.animate};for(const t of Oo){const n=null!=(f=m(t))?f:e[t];void 0!==n&&(p[t]=n)}return p}function zo(t){var e,n,r;return{fontFamily:Eo(t.fontFamily),fontSize:null!=(e=_o(t.fontSize))?e:So,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=_o(t.letterSpacing))?n:0,wordSpacing:null!=(r=_o(t.wordSpacing))?r:0}}function Io(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 Oo)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function Co(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 Do(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var Fo=.6,Ro="px-missing-glyph";function Lo(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 c=n+s,u=r-s,f=-s,d=o+s;return l+"M"+c+" "+f+"L"+c+" "+d+"L"+u+" "+d+"L"+u+" "+f+"Z"}function Bo(t,e){var n,r,o,i;const{glyphs:a,create:s=bo,warnings:l}=e,c=Do(a),u={x:null!=(n=_o(t.x))?n:0,y:null!=(r=_o(t.y))?r:0},f=[],d=[{start:u.x,end:u.x}];let h=0;const m=(t,e)=>{var n;const r=Co(e,a,c,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=Io(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,u.x,u.y],paint:m,line:h,x:u.x,y:u.y,scale:i}),u.x+=l.width*i;else if(/\S/.test(a)){const t=l&&l.width>0?l.width:Fo*o;f.push({glyphD:Lo(t,s),m:[i,0,0,i,u.x,u.y],paint:m,isMissing:!0,line:h,x:u.x,y:u.y,scale:i}),u.x+=t*i}else u.x+=(l?l.width:0)*i;u.x+=e.letterSpacing+(" "===a?e.wordSpacing:0),d[h].end=u.x}},p=(t,e)=>{var n,r,o,i;const a=No(t,e),s=_o(t.x),l=_o(t.y);void 0!==s&&(u.x=s,h=d.length,d.push({start:u.x,end:u.x})),void 0!==l&&(u.y=l),u.x+=null!=(n=_o(t.dx))?n:0,u.y+=null!=(r=_o(t.dy))?r:0;const c=null!=(o=Eo(t[Bt]))?o:Eo(t[Lt]);if(c&&!(null==(i=t.children)?void 0:i.length)&&m(c,a),t.children)for(const e of t.children)p(e,a)},g=zo(t);if(t.children)for(const e of t.children)p(e,g);const y=null!=(o=Eo(t[Bt]))?o:Eo(t[Lt]);y&&!(null==(i=t.children)?void 0:i.length)&&m(y,g);const v=Eo(t.textAnchor);if("middle"===v||"end"===v)for(const t of f){const e=d[t.line].end-d[t.line].start,n="middle"===v?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return Qo(t,Jo(f,s,l),s)}function Uo(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=uo(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const c=Do(i),u=[];let f=0;const d=(t,e)=>{var n,r,o;const s=No(t,e),l=null!=(n=Eo(t[Bt]))?n:Eo(t[Lt]);if(l&&!(null==(r=t.children)?void 0:r.length)){const t=Co(s,i,c,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,c=a+s.letterSpacing+(" "===o?s.wordSpacing:0);u.push({advStart:f,advEnd:f+c,glyphW:a,ascent:r,fontSize:s.fontSize}),f+=c}}if(t.children)for(const e of t.children)d(e,s)};d(t,zo(t));const h=f,m=vr(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,g=p>0&&h>0?p/h:1,y=vr(null==s?void 0:s.startOffset),{along:v,perp:b}=Wo(t),k=v+("animated"===y.kind?Number(null==(o=y.keyframes[0])?void 0:o.value)||0:"static"===y.kind&&Number(y.value)||0),A=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return u.map(t=>{const e=k+t.advStart*g,n=k+t.advEnd*g,r=A(l.sampleAtDistance(e)),o=A(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*g);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:c}=e,u=Do(l),f={x:null!=(r=_o(t.x))?r:0,y:null!=(o=_o(t.y))?o:0},d=[],h=[{start:f.x,end:f.x}];let m=0;const p=(t,e)=>{var n;const r=Co(e,l,u,c),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}},g=(t,e)=>{var n,r,o,i;const a=No(t,e),s=_o(t.x),l=_o(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=_o(t.dx))?n:0,f.y+=null!=(r=_o(t.dy))?r:0;const c=null!=(o=Eo(t[Bt]))?o:Eo(t[Lt]);if(c&&!(null==(i=t.children)?void 0:i.length)&&p(c,a),t.children)for(const e of t.children)g(e,a)},y=zo(t);if(t.children)for(const e of t.children){const t=d.length;if(g(e,y),d.length===t){const t=No(e,y),n=Co(t,l,u),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 v=null!=(a=Eo(t[Bt]))?a:Eo(t[Lt]);v&&!(null==(s=t.children)?void 0:s.length)&&p(v,y);const b=Eo(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 Vo(t,e,n,r,o=0){const{x:i,y:a,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),c=Math.sin(s),u=r/2;return[n*l,n*c,-n*c,n*l,i-n*l*u-o*c,a-n*c*u+o*l]}function Wo(t){var e,n,r;return{along:(null!=(e=_o(t.x))?e:0)+(null!=(n=_o(t.dx))?n:0),perp:null!=(r=_o(t.dy))?r:0}}function Go(t,e,n,r,o,i){const{glyphs:a,create:s=bo,warnings:l}=r,c=e?uo(e):null;if(!c)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const u=Do(a),{cells:f,width:d}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,c,u;const f=No(t,s),d=null!=(l=Eo(t[Bt]))?l:Eo(t[Lt]);if(d&&!(null==(c=t.children)?void 0:c.length)){const t=Co(f,e,n,r);if(t){const e=f.fontSize/t.unitsPerEm,n=null!=(u=t.ascent)?u:.9*t.unitsPerEm,r=Io(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:Fo*t.unitsPerEm,s=a*e;o.push({glyphD:Lo(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,zo(t)),{cells:o,width:i}}(t,a,u,l);if(!f.length)return Qo(t,[],s);const{along:h,perp:m}=Wo(t),p=qo(n),g=qo(o),y=t=>t>0&&d>0?t/d:1,v="clip"===i&&!c.closed;if(p.animated||g.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,g.times),n=(t,e)=>h+p.at(e)+y(g.at(e))*t.midBase,r=p.animated?p.loop:g.loop;return Qo(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/Ko,.5),c=t=>t>=0&&t<=e.totalLength,u=[];for(const f of t){const t=[f.scale,0,0,f.scale,-f.scale*(f.widthEm/2),0],d=jo(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:[Xo(r-s*l,3),Xo(o+s*a,3)],rotate:Xo(180*i/Math.PI,3)}}},m=[],p=[],g=(t,e)=>{m.push(h(t,e)),a&&p.push({time:e,value:c(t)?1:0})};g(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(Zo,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);g(n(f,r),r)}}En(m);const y={keyframes:m};void 0!==o&&(y.loop=o);const v={transform:y};if(f.paint.animate&&Object.assign(v,f.paint.animate),a&&p.some(t=>0===t.value)){const t={keyframes:p};void 0!==o&&(t.loop=o),v.opacity=t}u.push(i("path",w(A(A({d:d},Ho(f.paint)),Yo(f.isMissing)),{animate:v}),[]))}return u}(f,c,n,e,r,s,v,m),s)}const b=y(g.at(0)),k=h+p.at(0);return Qo(t,Jo((v?f.filter(t=>{const e=k+t.midBase*b;return e>=0&&e<=c.totalLength}):f).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:Vo(c,k+t.midBase*b,t.scale,t.widthEm,m)})),s,l),s)}function qo(t){var e;const n=vr(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 Ko=48,Zo=64;function Xo(t,e){const n=b(10,e);return Math.round(t*n)/n}function Ho(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 Oo)void 0!==t[n]&&(e[n]=t[n]);return e}function Yo(t){return t?{[Ut]:Ro}:{}}function Jo(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=jo(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},Ho(t)),Yo(i)),void 0!==t.animate?{animate:A({},t.animate)}:{}),[]));return o}function Qo(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===Po.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 $o(t,e){return e.alongPath?Go(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):Bo(t,e)}function ti(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 ei(t,e,n,r,o,i,a,s){const l=ri(r,n,o),c=oi(n,o),u=ai(i,l),f=ai(a,c),d=ci(a),h={type:"path",d:j(e)};return si(h,"strokeDasharray",f),si(h,"strokeDashoffset",u),si(h,"strokeOpacity",d),[h]}var ni=1;function ri(t,e,n){const[r]=ii(n);return n=>e*(-n-r+t)+ni}function oi(t,e){const[n,r]=ii(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=ni;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+ni),s}}function ii(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function ai(t,e){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:e(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:ie(t),value:e(ae(t)),easing:se(t)})),loop:t.loop}}function si(t,e,n){n&&br(t,e,n)}var li=10;function ci(t){const e=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return e(t.value)?{kind:"static",value:0}:void 0;const n=t.keyframes;let r=!1,o=!0;for(const t of n)e(ae(t))?r=!0:o=!1;if(!r)return;if(o)return{kind:"static",value:0};const i=[];for(let t=0;t<n.length;t++){const r=n[t],o=t>0?n[t-1]:void 0,a=t<n.length-1?n[t+1]:void 0,s=ie(r),l=e(ae(r)),c=o?l&&e(ae(o)):l,u=a?l&&e(ae(a)):l;c&&!u?(i.push({time:s,value:0}),i.push({time:s+li,value:1})):!c&&u&&(i.push({time:s-li,value:1}),i.push({time:s,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function ui(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 fi(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 di(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+=hi(t,r,r+1);return t.c&&e.length>1&&(n+=hi(t,e.length-1,0)),n}function hi(t,e,n){var r,o,i,a;const s=t.v,l=s[e],c=s[n],u=Q(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(a=null==(i=t.i)?void 0:i[n])?a:c,c);return u.ds[u.ds.length-1]}var mi=.5522847498307936;function pi(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:Tt(null==(e=Jt(t))?void 0:e.engine),glyphs:null==(n=$t(t))?void 0:n.fonts},o=Mr(t);Or(o,r.idMap),_r(o,r,()=>Sr(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=Pr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.source);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=Kr(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(),Or(t,e.idMap);const n=[],r=t=>{var e;eo(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&&eo(o)&&n++,"use"===o.type&&o.href){const t=Pr(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=Pr(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=eo(t);if(!n)continue;const r=n.timeCrop;no(t),ro(t,Jr(n),e),r&&$r(t,r,e)}}(t,e),t}(gi(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 gi(t,e){t.children&&(t.children=t.children.map(t=>gi(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:c,clone:u,fillGradient:f,strokeGradient:d,textPath:h,text:m}=null!=n?n:{};n&&delete t.effects;let p=t,g=!1;if(null==m?void 0:m.useGlyphs)if(h){const t="string"==typeof h.pathData?h.pathData:void 0,n=function(t,e,n,r,o,i){return e.glyphs?Go(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.fonts"),null)}(p,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(p=n,g=!0)}else p=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?Bo(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}(p,m,e),g=!0;return g||(p=function(t,e,n){var r;if(!e||"string"!=typeof e.pathData||!e.pathData)return t;const o=Sr(n,"tpath"),{d:i,startShift:a}=yo(e.pathData,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:mo(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),vo(s,"startOffset",go(e.startOffset,a)),vo(s,"textLength",e.textLength),t.children=[s],t}(p,h,e)),p=function(t,e,n){return Nr(t,e,n,"fill")}(p,f,e),p=function(t,e,n){return Nr(t,e,n,"stroke")}(p,d,e),p=function(t,e){if(!e)return t;const n=e.subPaths===Rt.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,c,u;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!=(c=t.r)?c:0):Number(null!=(u=t.ry)?u:0);if(!(r>0&&o>0))return;const f=r*mi,d=o*mi,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=Kn(e);if(!n.length)return;const i={leaf:t,subpaths:[]};for(const t of n){const e=di(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=vr(e.offset),c="absent"===l.kind?{kind:"static",value:0}:l,u=function(t){const e=vr(t);if("animated"!==e.kind)return e;const n=e.keyframes.map(t=>({time:ie(t),value:ae(t),easing:se(t)}));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=ui(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=fi(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=fi(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),f="absent"===u.kind?{kind:"static",value:[0,1]}:u,d=function(t){if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const e=[];for(const n of t.keyframes){const t=ae(n);"number"==typeof t&&e.push(t)}return e}(c),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=ri(n,e,r),s=oi(e,r),l=A({},t);return delete l.effects,si(l,"strokeDasharray",ai(i,s)),si(l,"strokeDashoffset",ai(o,a)),si(l,"strokeOpacity",ci(i)),l}(e.leaf,i,a,h,c,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(...ei(t.leaf,r.subpath,o,i,h,c,f))}m.set(t.leaf,ti(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,c),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=Mr(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate),delete l.id;const c=[l];for(let t=1;t<i;t++){const n=Mr(l),r=Xr(e,t),o=r?wr(n,r):n;c.push(o)}const u={type:"g",children:c};return t.id&&(u.id=t.id),void 0!==a&&(u.transform=a),void 0!==s&&(u.animate={transform:s}),u}(p,a,e),p=function(t,e,n,r){if(!e)return t;const o=Pr(e.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=Sr(r,"mask");let a={type:"use",href:"#"+o};if(n)a=Rr(a,n,r);else if(Vr(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=Ar(t,void 0);if(Array.isArray(e.translate)&&a.push(w(A(A({},r),Ur(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 c=null==o?void 0:o.loop,u=t=>{const e={keyframes:t};return void 0!==c&&(e.loop=c),e};let f=t;return a.length&&(f={type:"g",animate:{transform:u(a)},children:[f]}),s.length&&(f={type:"g",animate:{transform:u(s)},children:[f]}),l.length&&(f={type:"g",animate:{transform:u(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,c,u,f,d,h;const m=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let p;const g=[];for(;null!==(p=m.exec(t));){const t=p[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);g.push({name:p[1],args:t})}if(!g.length)return;const y=g[g.length-1];if("translate"===y.name)for(let t=g.length-2;t>=0;t--){const u=g[t];if("translate"!==u.name)continue;const f=null!=(e=u.args[0])?e:0,d=null!=(n=u.args[1])?n:0,h=null!=(r=y.args[0])?r:0,m=null!=(o=y.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"===g[e].name){const t=null!=(i=g[e].args[0])?i:0,n=null!=(a=g[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<g.length-1;e++){const t=g[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!=(c=t.args[0])?c: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 v,b,k;for(const t of g)if("translate"===t.name){const e=null!=(u=t.args[0])?u:0,n=null!=(f=t.args[1])?f:0;v=v?[v[0]+e,v[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 v&&(A.translate=v),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=Rr(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Vr(t)}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?Kr(e,r):void 0,l=s?[...a,s]:a,c=i&&r.maskAncestorChains.get(i)||[];if(!l.length&&!c.length)return t;const u=new Set;for(const t of l)if(t.translateKeyframes)for(const e of t.translateKeyframes)u.add(e.time);for(const t of c)if(t.translateKeyframes)for(const e of t.translateKeyframes)u.add(e.time);if(!(u.size>0)){const e=Wr(l),n=Wr(c),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(u).sort((t,e)=>t-e).map(t=>{const e=Gr(l,t),n=Gr(c,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=vr(e.d);return"absent"!==i.kind&&("static"===i.kind?o.d=Fr(i.value):(br(o,"d",i),void 0!==o.d&&(o.d=Fr(o.d)))),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(p,l,e),o?(Zr(p,u,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=Tr(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}),c=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(c.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const e={keyframes:c};void 0!==o&&(e.loop=o),t.animate.transform=e}a=!0}}const l=void 0!==(null==e?void 0:e.translate),c=a||l,u=a&&Tr((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&Tr((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=Er(i.full),r=Er(o.full),a=-n[0],s=-n[1],l=r[0]-a,c=r[1]-s;return 0===l&&0===c?{rest:t}:{translate:"translate("+l+","+c+")",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);c?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)||u&&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;c||(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=Tr(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=wr(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=wr(l,i),l.id=n),l}(p,i,r,o)):p=function(t,e,n,r){return Zr(t,e,r),wr(t,n)}(p,u,i,e),(null==u?void 0:u.retime)&&(t.effects={clone:{retime:u.retime}}),r&&e.idMap.set(r,p),p}function yi(t,e,n,r,o){const i=1-o,a=i*i*i,s=3*i*i*o,l=3*i*o*o,c=o*o*o;return[a*t[0]+s*e[0]+l*n[0]+c*r[0],a*t[1]+s*e[1]+l*n[1]+c*r[1]]}function vi(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=yi(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var bi=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function ki(t,e,n){var r,o;let i=pi(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=ae(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=ae(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=>le(t)||ce(t)))return;let l="M"+bi(s[0][0])+","+bi(s[0][1]);const c=[];for(let t=0;t<s.length-1;t++){const e=s[t],i=s[t+1],a=null!=(n=ce(o[t]))?n:[0,0],u=null!=(r=le(o[t+1]))?r:[0,0],f=[e[0]+a[0],e[1]+a[1]],d=[i[0]+u[0],i[1]+u[1]];l+="C"+bi(f[0])+","+bi(f[1])+","+bi(d[0])+","+bi(d[1])+","+bi(i[0])+","+bi(i[1]),c.push(vi(e,f,d,i))}const u=c.reduce((t,e)=>t+e,0);if(!(u>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=c[t-1]);const e={t:ie(o[t]),v:d/u},n=se(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[Vt];const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n[Wt]=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=A({},s);delete t[qt.translate],delete t[qt.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:bi(e.anchor[0])+"px "+bi(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=nr(i,null!=(o=null==(r=Jt(i))?void 0:r.duration)?o:V),e===_t.native&&(i=Vn(i,null==n?void 0:n.motionPath),i=dr(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 Ai(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function wi(t,e,n){var r;const o=Jt(t)||{},i=ir(t,_t.js),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),c=l&&s?l*(s===1/0?1/0:s):l?(null!=s?s:1)*l:0,u=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,g=-(o.delay||0),y=0,v=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let w=0;const x=()=>{const t=y?(Date.now()-y)*v:0;return g+t},j=()=>{let t=x();return Number.isFinite(c)&&t>c&&(t=c),t<0&&(t=0),t};function S(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=u||"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=sr(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?S(j()):h&&S(0));const P=()=>!!p&&!!e.isConnected()&&(v<0?x()>0:!(Number.isFinite(c)&&j()>=c)),O=t=>{null!==m&&(Ai(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=j(),i=x();if(i<0&&v>0)h&&S(0);else{if(v<0&&i<=0)return M(),S(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(v>0&&c&&Number.isFinite(c)&&o>=c)return M(),S(d?c: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}S(o)}})(),O()}))},M=()=>{if(!p)return;let t=x();Number.isFinite(c)&&t>c&&(t=c),g=t,y=0,p=!1,null!==m&&(Ai(m),m=null),t>=0?S(t):h&&S(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>P(),play:()=>{var t;(()=>{if(!p){if(v>=0)Number.isFinite(c)&&g>=c&&(g=0);else if(g<=0){if(!Number.isFinite(c))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");g=c}b=!1,p=!0,y=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(),g=0,y=0,p=!1,b=!1,S(g),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;g=Number.isFinite(c)?c:j(),y=0,p=!1,null!==m&&(Ai(m),m=null),S(d?g: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(c)&&e>c&&(e=c),t<0!=v<0&&(b=!1),v=t,g=e,p&&(y=Date.now())},getCurrentTime:()=>j(),setCurrentTime:t=>{t<0&&(t=0),Number.isFinite(c)&&t>c&&(t=c),g=t,p&&(y=Date.now()),(!Number.isFinite(c)||t<c)&&(b=!1),S(j())},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var xi=[1,0,0,1,0,0];function ji(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],Pi=(t,e)=>[t,0,0,e,0,0];function Oi(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var Mi=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],_i=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function Ei(t){let e=xi;t.translate&&(e=ji(e,Si(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=ji(e,Si(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=ji(e,Oi(t.rotate))),t.scale&&(e=ji(e,Pi(t.scale[0],t.scale[1]))),n&&(e=ji(e,Si(-t.origin[0],-t.origin[1]))),e}function Ti(t,e,n){return t+(e-t)*n}function Ni(t,e){return null==t?xi:"string"==typeof t?function(t){let e=xi;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=ji(e,Si(n[0]||0,n[1]||0)):"scale"===t?e=ji(e,Pi(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=ji(e,Oi(n[0])):"skewX"===t?e=ji(e,Mi(n[0])):"skewY"===t?e=ji(e,_i(n[0])):"matrix"===t&&(e=ji(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?Ei(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 c=0;for(;c<t.length-1&&(null!=(o=t[c+1].time)?o:0)<e;)c++;const u=t[c],f=t[c+1],d=(e-(null!=(i=u.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=u.time)?s:0)||1),h=u.value||{},m=f.value||{},p={};return h.translate&&m.translate?p.translate=[Ti(h.translate[0],m.translate[0],d),Ti(h.translate[1],m.translate[1],d)]:p.translate=h.translate||m.translate,void 0!==h.rotate&&void 0!==m.rotate?p.rotate=Ti(h.rotate,m.rotate,d):p.rotate=null!=(l=h.rotate)?l:m.rotate,h.scale&&m.scale?p.scale=[Ti(h.scale[0],m.scale[0],d),Ti(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?Ei(t.value):"object"!=typeof t||Array.isArray(t)?xi:Ei(t)}var zi=new Set(["svg","g","symbol"]),Ii=new Set(["defs","mask","clipPath","title"]);function Ci(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Ci(t,e))}function Di(t){return null==t?0:Number(t)}function Fi(t){return Math.round(100*t)/100+0}function Ri(t,e,n,r,o){var i;const a=t.type||"";if(Ii.has(a))return;const s=ji(e,function(t,e){return t.animate&&t.animate.transform?Ni(t.animate.transform,e):void 0!==t.transform?Ni(t.transform,e):xi}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=ji(s,Si(Di(t.x),Di(t.y)));return void(i?Ri(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}zi.has(a)?null==(i=t.children)||i.forEach(t=>Ri(t,s,n,r,o)):o.push(function(t,e,n){var r,o,i,a,s;const l=null!=(r=t.fill)?r:"",c=null!=(o=t.stroke)?o:"",u=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=Fi(function(t,e,n,r){var o,i,a,s,l,c;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 u=e[n],f=e[n+1],d=(r-(null!=(s=u.time)?s:0))/((null!=(l=f.time)?l:0)-(null!=(c=u.time)?c:0)||1);return Ti(u.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(Fi).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Di(t.width)+","+Di(t.height)+","+Di(t.x)+","+Di(t.y);case"ellipse":return Di(t.rx)+","+Di(t.ry)+","+Di(t.cx)+","+Di(t.cy);case"circle":return Di(t.r)+","+Di(t.cx)+","+Di(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+c+"|sw:"+(Di(u)||"")+"|o:"+f+"|m:"+d}(t,s,n))}function Li(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=>Li(t,e))}function Bi(t,e){const n=new Map;Ci(t,n);const r=[];return Ri(t,xi,e,n,r),r.sort()}function Ui(t,e){const n=new Set;Li(t,n),Li(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Bi(t,o),i=Bi(e,o),a=Vi(n,i),s=Vi(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function Vi(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}var Wi=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],Gi=["definitions","animateById"],qi=t=>!!t&&"object"==typeof t&&!Array.isArray(t),Ki=t=>qi(t)&&"string"==typeof t.type?t.type:"time",Zi=t=>"scroll"===t||"view"===t;function Xi(t,e){const n=qi(t)?A({},t):{};for(const t of Object.keys(e)){const r=e[t];null!==r?qi(r)?n[t]=Xi(n[t],r):n[t]=r:delete n[t]}return n}function Hi(t,e,n){const r=Ki(t),o=qi(e)&&"string"==typeof e.type?String(e.type):r;let i;if(o!==r){const n={};if(qi(t))for(const e of Ot)void 0!==t[e]&&(n[e]=t[e]);i=Xi(n,e)}else i=Xi(t,e);if(Zi(o)){for(const t of Mt)void 0!==i[t]&&(n("animator.timeline."+t+": no slot on a '"+o+"' timeline — dropped"),delete i[t]);"infinite"===i.iterations&&(n("animator.timeline.iterations: 'infinite' cannot map onto a scroll range — dropped"),delete i.iterations)}return i}function Yi(t,e){let n;if("string"==typeof t)try{n=JSON.parse(t)}catch(t){console.warn("animator config: not valid JSON — ignored",t),n=void 0}else n=null!=t?t:void 0;const{duration:r,delay:o,iterations:i,startOn:a}=e;if(void 0===r&&void 0===o&&void 0===i&&void 0===a)return n;const s=qi(n)?A({},n):{},l=A({},s.timeline);return void 0!==r&&(l.duration=r),void 0!==o&&(l.delay=o),void 0!==i&&(l.iterations=i),void 0!==a&&(l.trigger=w(A({},l.trigger),{startOn:a})),s.timeline=l,s}function Ji(t,e){const n=[],r=t=>n.push(t);if(null===e)return{config:void 0,warnings:n};if(!qi(e)||0===Object.keys(e).length)return{config:t,warnings:n};const o=qi(t)?Wi.filter(e=>void 0!==t[e]):[];o.length&&r("animator: the base carries the flat runtime spelling ("+o.join(", ")+"); the patch merges the wire spelling only");const i=qi(t)?A({},t):{};for(const t of Object.keys(e)){const n=e[t];null!==n?"timeline"!==t?qi(n)?i[t]=Xi(i[t],n):i[t]=n:i.timeline=qi(n)?Hi(i.timeline,n,r):n:delete i[t]}return{config:i,warnings:n}}function Qi(t,e,n){var r,o;const i=!!(null==n?void 0:n.resetDefaults);if(!t||void 0===e||!(i||null!==e&&qi(e)&&Object.keys(e).length))return{doc:t,warnings:[]};const a=t,s=qi(a.animator),l=!s&&qi(null==(r=a.meta)?void 0:r.animator),c=s?a.animator:l?a.meta.animator:void 0,u=[];s&&qi(null==(o=a.meta)?void 0:o.animator)&&u.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let f=c;if(i){const t={};for(const e of Gi)qi(c)&&void 0!==c[e]&&(t[e]=c[e]);f=t}const d=Ji(f,null!=e?e:{});return u.push(...d.warnings),d.config===c?{doc:t,warnings:u}:l?{doc:w(A({},a),{meta:w(A({},a.meta),{animator:d.config})}),warnings:u}:{doc:w(A({},a),{animator:d.config}),warnings:u}}var $i=6,ta=[...Ot,...Mt,"fill","resetOnFinish","timelineSource","scroll"],ea=t=>ta.some(e=>t.indexOf("animator."+e+":")>=0);function na(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 ra(t){return"#"+t}function oa(t,e,n,r){const o=Jt(t)||{};if(!r)if(t.id){const e=ra(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=wi(t,e||function(t){const e=new Set;return{isConnected:()=>!t||t.isConnected,setAttribute:(n,r,o)=>{r=K(r);const i=ra(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(u({},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)"):na(a,o.trigger)),a}function ia(t,e,n,r){let o=ae(t);const i=se(t),a={offset:e,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let s,l=n;return F.has(n)&&Array.isArray(o)?s=C(o):"transform"!==n||null===o||"object"!=typeof o||Array.isArray(o)?R.has(n)?(Array.isArray(o)&&("translate"===n&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===n&&(o+="deg"),s=n+"("+o+")",l="transform"):s="d"===n?'path("'+(o&&"object"==typeof o&&Array.isArray(o.paths)?o.paths:[]).map(t=>j(t,!0)).join("")+'")':L.has(n)&&"number"==typeof o?100*o+"%":""+o:(s=B(o,{withUnits:!0}),l="transform"),CSS.supports(K(l),s)||r.add(l),l=W(l),a[l]=s,a}function aa(t,e,n){var r,o,i,a,s;const l=[];for(let c=0;c<e.length;c++){const d=e[c],h=null!=(r=d.t)?r:0;if(h<0){const n=e[c+1];if(n&&(null!=(o=n.t)?o:0)>=0){const e=(0-h)/((null!=(i=n.t)?i:0)-h),r=d.e?T(d.e)(e):e,{right:o}=z(d.e,e);l.push({t:0,v:Qn(t,d.v,n.v,r),e:o})}continue}if(h>n){const r=e[c-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?T(r.e)(o):o,{left:a}=z(r.e,o);l.length>0&&(l[l.length-1]=f(u({},l[l.length-1]),{e:a})),l.push({t:n,v:Qn(t,r.v,d.v,i),e:void 0})}break}l.push(d)}return l}function sa(t,e,n){var r;const o=new Map;for(const[i,a]of Object.entries(t)){const t=n.duration||1,s=aa(i,a.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],a=ia(o,Z((null!=(r=o.t)?r:0)/t,0,1),i,e);0===n&&(a.offset||0)>0&&l.push(f(u({},a),{offset:0})),l.push(a)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(f(u({},l[l.length-1]),{offset:1})),l.length>0&&o.set(i,l)}return o}function la(t,e,n,r,o){var i;const a=Jt(t)||{};if(!n)if(t.id){const e=ra(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=ir(t,_t.native),l=[],c=a.iterations;let u;"number"==typeof c&&(u=c),"infinite"===c&&(u=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=ra(t.id),c=(null==n?void 0:n.querySelectorAll(s))||document.querySelectorAll(s);0===c.length&&console.warn('createWebApiAnimator: No elements found for selector "'+s+'"');const m=sa(r,f,a),p=a.delay&&a.delay>0?a.delay:void 0;let g;if(a.delay&&a.delay<0&&a.duration){const t=-a.delay;g=u===1/0?t%a.duration:Math.min(t,a.duration*(null!=u?u:1))}const y={duration:a.duration,delay:p,fill:null!=(i=a.fill)?i:"forwards",direction:a.direction,iterations:u};for(let t=0;t<c.length;t++){const n=c[t];for(const[,t]of m)if(t.length>0)try{const r=new KeyframeEffect(n,t,y),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!==g&&(i.currentTime=g),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)"):na(m,a.trigger)),o&&l.forEach(t=>t.play()),m}function ca(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 ua(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 fa(){return document.scrollingElement||document.documentElement}var da="parent",ha="scroller";function ma(t,e){var n,r;const o=null==e?void 0:e.trim();if(!o)return t;if(o===da){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===ha)return ua(t,"y")||ua(t,"x")||fa();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 pa(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=ua(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 c=a?s:null;a&&(c&&window.addEventListener("resize",c),"undefined"!=typeof ResizeObserver&&(l=new ResizeObserver(s),l.observe(t)));let u=null;const f=t.parentElement;return e.pinDistance&&e.pinDistance>0&&f&&(u=document.createElement("div"),u.setAttribute("data-px-pin",""),u.style.height=100*e.pinDistance+"vh",f.insertBefore(u,t),u.appendChild(t)),()=>{c&&window.removeEventListener("resize",c),null==l||l.disconnect(),r.position=o,r.top=i,(null==u?void 0:u.parentElement)&&(u.parentElement.insertBefore(t,u),u.remove())}}function ga(t,e,n){let r,o=e;t.resetOnFinish&&(o=f(u({},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.debugGlobalName&&(window[t.debugGlobalName]=i),i}var ya="http://www.w3.org/2000/svg";function va(t,e){if(!t)return null;const n=t,{type:r,children:o,style:i}=n,c=((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"]),u=c.domType;void 0!==u&&delete c.domType;const f=$t(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=va(t,f);e&&(h||(h=[]),h.push(e))}const m=function(t,e,n,r,o){if(cn.has(t.toLowerCase()))return console.warn("SVG tag blocked (dangerous): ",t),null;const i=document.createElementNS(ya,t);for(const t in e){const n=yn(t,e[t]);void 0!==n&&(dn.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",vn(c),d,h,c[Bt]||c[Lt]);return m&&void 0!==u&&m.setAttribute("type",u),m}var ba="data";function ka(t,e,n,r,o,i){const a=He(t);for(const t of a)console.warn("[PxAnimator] effects shape warning:",t);if(function(t){const{problems:e}=function(t){let e;try{e=Ye(t)}catch(t){return{problems:[],legacy:[]}}const n=[],r=[];for(const t of e)(ea(t)?r:n).push(t);return{problems:n,legacy:r}}(t);if(!e.length)return;const n=e.slice(0,$i),r=e.length-n.length;console.warn("[PxAnimator] createAnimator: this document does not match the animation schema in "+e.length+" place"+(1===e.length?"":"s")+".\n"+n.map(t=>" - "+t).join("\n")+(r>0?"\n … and "+r+" more":"")+"\n\nIf you did not author these keys, the usual cause is a build that MANGLES PROPERTY NAMES. An animation document is data loaded at runtime, so renaming the property reads inside the player stops them matching the keys in the JSON, and the animation silently does nothing. Feed the published reserved-name list to your minifier — @pixodesk/svg-animator-web/mangle-reserved.json — see docs/library/minification.md.")}(t),void 0!==o||i){const e=Qi(t,null!=o?o:{},{resetDefaults:!!i});for(const t of e.warnings)console.warn("[PxAnimator] config override:",t);t=e.doc}t=ki(t,Tt((Jt(t)||{}).engine));let s=null;if(r){t=sn(t);const e="string"==typeof r?document.querySelector(r):r;e&&(s=va(t),s&&e.replaceChildren(s))}const l=function(t,e,n,r){return function(t,e,n,r){const o=Jt(t)||{};return tt(o)?ga(o,n,n=>{var i;let a=()=>{};if(o.engine!==Et.js&&r){a=pa(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 — using the built-in driver instead of the browser timeline"),null;const l=globalThis,c="view"===s,u=c?l.ViewTimeline:l.ScrollTimeline;if("function"!=typeof u)return null;const f=null!=(r=a.axis)?r:"block";let d;try{d=new u(c?{subject:ma(t,a.subject),axis:f}:{source:"root"===a.source?fa():ua(t,"y")||ua(t,"x")||fa(),axis:f})}catch(t){return console.warn("scroll timeline: native timeline construction failed — falling back to the player measuring progress itself",t),null}return{timeline:d,rangeStart:ca(null==(o=a.range)?void 0:o.start,0,c),rangeEnd:ca(null==(i=a.range)?void 0:i.end,1,c)}}(r,o);if(e){const i=la(t,n,r,Nt(o.engine),e);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{a(),t()},i}}a(),a=()=>{}}const s=(o.engine!==Et.js?la(t,n,r,Nt(o.engine)):null)||oa(t,e,n,r),l=(null==(i=s.getRootElement)?void 0:i.call(s))||r;if(l){a=pa(l,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=ma(t,i.subject),l=ua(t,"y")||ua(t,"x"),c="scroll"===a&&"root"===i.source?fa():l||fa(),u=c===fa(),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(c).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?c.scrollTop:c.scrollLeft,"y"===f?c.scrollHeight-c.clientHeight:c.scrollWidth-c.clientWidth,i.range);const t=s.getBoundingClientRect();let e,n;if(u)e=0,n="y"===f?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=c.getBoundingClientRect();e="y"===f?t.top:t.left,n="y"===f?c.clientHeight:c.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,g=null,y=0,v=null;const b=()=>{v=null,m||(t=>{if(!h)return void n(t);if(null===p)return p=t,void n(t);if(null!==g)return;y=0;const e=t=>{if(g=null,m)return;const r=y?Math.min(.1,(t-y)/1e3):1/60;y=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&&(g=requestAnimationFrame(e))};g=requestAnimationFrame(e)})(d())},k=()=>{m||null!==v||(v=requestAnimationFrame(b))},A=u?window:c;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),u||w.observe(c));const x={destroy:()=>{m||(m=!0,A.removeEventListener("scroll",k),window.removeEventListener("resize",k),null==w||w.disconnect(),null!==v&&(cancelAnimationFrame(v),v=null),null!==g&&(cancelAnimationFrame(g),g=null))},refresh:()=>{m||(p=d(),n(p))}};return x.refresh(),x}(l,o,e=>s.setCurrentTime(e*t));if(e){const t=s.destroy.bind(s);s.destroy=()=>{e.destroy(),a(),t()}}}else console.warn("scroll timeline: no root element to observe — animation will stay at frame 0");var c;return s}):ga(o,n,n=>o.engine===Et.js?oa(t,e,n,r):la(t,n,r,Nt(o.engine))||oa(t,e,n,r))}(t,e,n,r)}(t,e,n,s);if(r&&s){const t=s,e=l.destroy.bind(l);l.destroy=()=>{e(),t.remove()}}return l}function Aa(t){const{src:e,data:n,adapter:r,callbacks:o,container:i,resetDocDefaults:a}=t,s=function(t){const{config:e,duration:n,delay:r,iterations:o,startOn:i}=t;return Yi(e,{duration:n,delay:r,iterations:o,startOn: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 ka(n,r,o,i,s,a);let l=null,c=[],u=!1;const f=t=>{l?t(l):c&&c.push(t)};return fetch(e).then(t=>t.json()).then(t=>{if(!u)if(Yt(t)){l=ka(t,r,o,i,s,a);const e=c;c=null,null==e||e.forEach(t=>t(l))}else console.error('createAnimator: invalid animation document format at "'+e+'"')}).catch(t=>{c=null,console.error('createAnimator: failed to load "'+e+'"',t)}),{isReady:()=>!!l,getRootElement:()=>l?l.getRootElement():null,isPlaying:()=>(null==l?void 0:l.isPlaying())||!1,play:()=>{f(t=>t.play())},pause:()=>{f(t=>t.pause())},cancel:()=>{f(t=>t.cancel())},finish:()=>{f(t=>t.finish())},setPlaybackRate:t=>{f(e=>e.setPlaybackRate(t))},getCurrentTime:()=>l?l.getCurrentTime():null,setCurrentTime:t=>{f(e=>e.setCurrentTime(t))},destroy:()=>{u=!0,c=null,null==l||l.destroy()}}}function wa(){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]=Aa({src:t,container:n}))}}}"undefined"!=typeof window&&(window.loadTagAnimators=wa,window.createAnimator=Aa,window.setupAnimationTriggers=na);
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,c=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,u=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&c(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&c(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,{BASELINE_PLAYER_VERSION:()=>Wt,COLOR_ATTR_NAMES:()=>D,DEFAULT_DURATION_MS:()=>B,MISSING_GLYPH_CLASS_NAME:()=>wi,PLAYER_WIRE_STEPS:()=>Vt,PLAYER_WIRE_VERSION:()=>zt,PX_ANIMATOR_DOC_KEY:()=>fs,PX_ANIM_ATTR_NAME:()=>Yt,PX_ANIM_SRC_ATTR_NAME:()=>qt,PX_PLAYER_SCHEMA_VERSION:()=>St,PX_TRANSFORM_PART_KEYS:()=>Ee,PX_TRIGGER_DEFAULTS:()=>le,PxAlongPathMode:()=>te,PxAnimatedSvgDocumentSchema:()=>Ln,PxAnimationDefinitionSchema:()=>Je,PxAnimatorConfigSchema:()=>mn,PxAttrValueSchema:()=>gn,PxBezierPathSchema:()=>Wn,PxBindingSchema:()=>pn,PxClipPathEffectSchema:()=>xn,PxCloneEffectSchema:()=>jn,PxCloneWithout:()=>ve,PxControlMode:()=>ce,PxDefsSchema:()=>nn,PxDiagnosticKind:()=>ha,PxEasingOrRefSchema:()=>Le,PxEffectsSchema:()=>zn,PxElementAnimationSchema:()=>Qe,PxFillGradientEffectSchema:()=>En,PxFinishAction:()=>Zt,PxGradientSpreadMethod:()=>_e,PxGradientStopSchema:()=>On,PxGradientType:()=>Te,PxKeyframeSchema:()=>Ve,PxKeyframeValueSchema:()=>We,PxLengthAdjust:()=>be,PxLoopDirection:()=>me,PxLoopRepeatAt:()=>he,PxLoopSchema:()=>Ye,PxMaskType:()=>pe,PxMaskedByEffectSchema:()=>wn,PxNodeBase:()=>Rn,PxNodeSchema:()=>Dn,PxPathOverflow:()=>ye,PxPinAlign:()=>Qt,PxPropertyAnimationSchema:()=>Ze,PxRepeaterEffectSchema:()=>An,PxRetimeEffectSchema:()=>Sn,PxScrollAxis:()=>Ht,PxScrollKind:()=>Xt,PxScrollPhase:()=>$t,PxScrollRangePointSchema:()=>rn,PxScrollRangeSchema:()=>on,PxScrollSchema:()=>an,PxScrollSource:()=>Jt,PxStrokeGradientEffectSchema:()=>_n,PxStrokeTrimEffectSchema:()=>Pn,PxStrokeTrimSubPaths:()=>we,PxSvgNodeExtra:()=>Fn,PxTextEffectSchema:()=>Nn,PxTextPathEffectSchema:()=>Tn,PxTextPathMethod:()=>ke,PxTextPathSpacing:()=>Ae,PxTimelineEngine:()=>oe,PxTimelineEngineExtra:()=>ie,PxTimelinePinSchema:()=>sn,PxTimelineSchema:()=>hn,PxTransformByEffectSchema:()=>kn,PxTransformPartsSchema:()=>Xe,PxTransformValueSchema:()=>He,PxTriggerSchema:()=>$e,PxUnits:()=>ge,STYLE_ATTR_NAMES:()=>V,TRANSFORM_FN_NAMES:()=>F,WIRE_VERSION_KEY:()=>jt,WireStepKind:()=>Lt,WireVersionRelation:()=>Et,applyAnimatorConfig:()=>Ka,applyPlayerEffects:()=>$i,calcAnimationValues:()=>Kr,camelCaseToKebabWordIfNeeded:()=>q,collectSampleTimes:()=>Na,compareWireVersion:()=>Dt,controlModeTakesOverTrigger:()=>fe,convertPlayerDocument:()=>Bt,createAnimator:()=>hs,createBasicFrameLoopAnimator:()=>da,createDiagnostics:()=>pa,createFrameLoopAnimator:()=>Ha,createPathSampler:()=>Xo,createWebApiAnimator:()=>ts,describeSchema:()=>wt,diagnoseDocument:()=>Ya,diffInEffect:()=>Ca,downgradePlayerDocument:()=>Kt,evaluateMotionPathSegment:()=>cr,extendedPathForBrowser:()=>ei,foldTimelineOverride:()=>Ua,formatWireVersion:()=>Nt,generateNewIds:()=>Kn,getAnimatorConfig:()=>ze,getBindings:()=>De,getChildren:()=>Fe,getDefs:()=>Re,getNormalizedProps:()=>nr,isPxElementFileFormat:()=>Ne,isPxElementFileFormatDeep:()=>Vn,jsonElementFactory:()=>ri,layoutGlyphTextChars:()=>Si,loadTagAnimators:()=>ms,materializeAllInTree:()=>oa,materializeAnimatedUseInstances:()=>Hr,materializeGlyphText:()=>Di,materializeGlyphTextAlongPath:()=>Mi,materializeGlyphTextHorizontal:()=>Pi,materializeInternalLoopsInPropAnim:()=>Lr,materializeInternalLoopsInTree:()=>Wr,materializeMotionPathInPropAnim:()=>hr,materializeMotionPathsInTree:()=>jr,mergeAnimatorConfig:()=>Ga,normalizeDocument:()=>Ur,parseWireVersion:()=>Tt,progressToTimeMs:()=>ua,propAnimIsMotionPath:()=>ar,px:()=>Pt,readWireVersion:()=>Rt,renderNode:()=>us,resolveControlMode:()=>ue,resolveTrigger:()=>de,schemaKeys:()=>At,setupAnimationTriggers:()=>Za,shiftAnimatable:()=>ti,timeToProgress:()=>ca,toRGBA:()=>I,validateDocument:()=>In,validateNodeEffects:()=>Cn,versionAdvice:()=>Ft,visualModelAt:()=>za}),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,g=Object.getOwnPropertySymbols,v=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={}))v.call(e,n)&&k(t,n,e[n]);if(g)for(var n of g(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)v.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&g)for(var r of g(t))e.indexOf(r)<0&&y.call(t,r)&&(n[r]=t[r]);return n};function P(t,e=!1){var n,r,o,i;const a=t.v,s=t.i,l=t.o,c=t.c;if(!a.length)return"";const u=[],f=a.length;u.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,c=null!=(r=null==s?void 0:s[t])?r:a[t],f=a[t];e||i[0]!==o[0]||i[1]!==o[1]||c[0]!==f[0]||c[1]!==f[1]?u.push("C"+i[0]+","+i[1]+","+c[0]+","+c[1]+","+f[0]+","+f[1]):u.push("L"+f[0]+","+f[1])}if(c&&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],c=a[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===c[0]&&r[1]===c[1]||u.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+c[0]+","+c[1]),u.push("z")}return u.join("")}function S(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]=S(t[i]||0,e[i]||0,n);return r}function O(t,e,n){return[S(t[0]||0,e[0]||0,n),S(t[1]||0,e[1]||0,n),S(t[2]||0,e[2]||0,n),S(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(E(t[i],e[i],n));return o}function E(t,e,n){var r,o,i,a,s,l,c,u,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=[],g=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];m.push(j(f,h,d));const v=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(v,y,d));const b=null!=(l=null==(s=t.o)?void 0:s[n])?l:f,k=null!=(u=null==(c=e.o)?void 0:c[n])?u:h;g.push(j(b,k,d))}return{v:m,i:p.length?p:void 0,o:g.length?g:void 0,c:null!=(f=t.c)?f:e.c}}function _(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,c=0,u=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;c<u;){const t=a(l);if(Math.abs(t-n)<1e-6)return l;n>t?c=l:u=l,l=(u+c)/2}return l}function T(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,r,t),((s*n+a)*n+i)*n;var n}}function N(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function z(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=_(n,o,e),s=[n,r],l=[o,i],{left:c,right:u}=function(t,e,n,r,o){const i=N(t,e,o),a=N(e,n,o),s=N(n,r,o),l=N(i,a,o),c=N(a,s,o),u=N(l,c,o);return{left:[t,i,l,u],right:[u,c,s,r]}}([0,0],s,l,[1,1],a),f=c[3][0],d=c[3][1];let h,m;f>1e-9&&Math.abs(d)>1e-9&&(h=[c[1][0]/f,c[1][1]/d,c[2][0]/f,c[2][1]/d]);const p=1-f,g=1-d;return p>1e-9&&Math.abs(g)>1e-9&&(m=[(u[1][0]-f)/p,(u[1][1]-d)/g,(u[2][0]-f)/p,(u[2][1]-d)/g]),{left:h,right:m}}function C(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function I(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 R(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 D=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),F=new Set(["translate","rotate","scale","skew"]),L=new Set(["offset-distance","offsetDistance"]);function W(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,c=t.scale,u=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+u+","+i[1]+u+")"),a&&o.push("translate("+a[0]+u+","+a[1]+u+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),c&&o.push("scale("+c[0]+","+c[1]+")"),a&&o.push("translate("+-a[0]+u+","+-a[1]+u+")"),o.join("")}var V=new Set(["offset-distance","offsetDistance"]),B=1e3;function U(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 K=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 q(t){return K.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Y(t,e,n){return Math.max(e,Math.min(t,n))}function Z(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,c=3*o*a,u=3*s*i,f=s*o;return[l*t[0]+c*e[0]+u*n[0]+f*r[0],l*t[1]+c*e[1]+u*n[1]+f*r[1]]}var X=1e-4;function H(t,e,n,r,o){const i=J(t,e,n,r,o);return 0===i[0]&&0===i[1]?J(t,e,n,r,o<.5?o+X:o-X):i}function J(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 Q(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=Z(t,e,n,r,0);a[0]=0,s[0]=0;let c=0;for(let u=1;u<i;u++){const i=u/o,f=Z(t,e,n,r,i),d=f[0]-l[0],h=f[1]-l[1];c+=Math.sqrt(d*d+h*h),a[u]=i,s[u]=c,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,c=l>0?(e-s)/l:0;return r[a-1]+c*(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)}},ct=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)}},ut=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};if(this.schemas.some(e=>e.isValid(t,o,n?[...n]:void 0)))return!0;if(!e)return!1;const i=rt(null!=n?n:[]);let a;e.errors.push(i+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240));let s=-1;const l=[];for(const r of this.schemas){const o={errors:[],warnings:[],strict:e.strict};if(r.isValid(t,o,n?[...n]:void 0),!o.errors.length)continue;const c=Math.max(...o.errors.map(t=>t.slice(0,t.indexOf(":")).length));if((c>s||c===s&&a&&o.errors.length<a.length)&&(s=c,a=o.errors),c<=i.length)for(const t of o.errors){const e=/: expected (.+?), got /.exec(t);e&&!l.includes(e[1])&&l.push(e[1])}}if(a&&s>i.length)for(const t of a.slice(0,4))e.errors.includes(t)||e.errors.push(t);else l.length&&e.errors.push(i+": expected "+l.join(" | "));return!1}_canSanitize(t){return this.schemas.some(e=>e._canSanitize(t))}},dt=class extends ot{constructor(t,e,n){var r;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];if(!e)continue;const o=null!=(r=e.inner)?r:e;this._map.set(o._default,n),e.inner&&(this._absentMember=n)}}_findSchema(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const e=t[this._key];return null==e?this._absentMember:this._map.get(e)}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)){const r=this._shape[t].sanitize(e[t]);void 0!==r&&(n[t]=r)}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)){const r=this._shape[t].sanitize(e[t]);void 0!==r&&(n[t]=r)}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)}},gt=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)}},vt=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,Pt={string:(t="")=>new at(t),number:(t=0)=>new st(t),boolean:(t=!1)=>new lt(t),literal:t=>new ct(t),enum:(t,e)=>new ut(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 gt(t),any:()=>new vt,defined:()=>new yt,tuple:t=>new kt(t),lazy:(t,e)=>new bt(t,e)},St="1.1",jt="version",Ot="animator",Mt="meta",Et=(t=>(t.unstamped="unstamped",t.same="same",t.older="older",t.newer="newer",t.otherGeneration="otherGeneration",t))(Et||{}),_t=/^(\d+)\.(\d+)(?:\.(\d+))?$/;function Tt(t){if("string"!=typeof t)return;const e=_t.exec(t.trim());return e?{a:Number(e[1]),b:Number(e[2]),c:void 0===e[3]?0:Number(e[3])}:void 0}function Nt(t){return t.a+"."+t.b+"."+t.c}var zt=null!=(xt=Tt(St))?xt:{a:1,b:1,c:0};function Ct(t){if(!t||"object"!=typeof t)return;const e=It(t,Ot);if(e)return e;const n=It(t,Mt);return n?It(n,Ot):void 0}function It(t,e){const n=t[e];return n&&"object"==typeof n&&!Array.isArray(n)?n:void 0}function Rt(t){const e=Ct(t);return e?Tt(e[jt]):void 0}function Dt(t,e,n){return t?t.a!==e.a?"otherGeneration":t.b!==e.b?t.b>e.b?"newer":"older":n&&t.c!==e.c?t.c>e.c?"newer":"older":"same":"unstamped"}function Ft(t,e,n,r){if(!e)return;const o=r?"player":"editor",i="written for schema "+Nt(e)+", this "+o+" reads "+Nt(n);switch(t){case"newer":return"This file is "+i+". Update the "+o+" to open it fully.";case"older":return"This file is "+i+". Saving it from this "+o+" rewrites it in the current format.";case"otherGeneration":return"This file is "+i+" — a different format generation, which no conversion bridges. Open it in a "+o+" of that generation, or accept this document without the parts named above.";default:return}}var Lt=(t=>(t.additive="additive",t.converted="converted",t))(Lt||{}),Wt="1.1",Vt=[];function Bt(t){return function(t,e){const n=Rt(t),r=Dt(n,e.target,e.readerReadsEditorPart);if(!n||"older"!==r)return{doc:t,from:n,relation:r,applied:[],advice:Ft(r,n,e.target,!e.readerReadsEditorPart)};const o=[];for(const t of e.steps){const r=Tt(t.to);r&&"older"===Dt(n,r,e.readerReadsEditorPart)&&t.up&&o.push(t)}if(!o.length||!t||"object"!=typeof t)return{doc:t,from:n,relation:r,applied:[]};const i=Ut(t),a=[];for(const t of o)try{t.up(i),a.push(t)}catch(t){break}return a.length?(Gt(i,e.target,e.readerReadsEditorPart),{doc:i,from:n,relation:r,applied:a}):{doc:t,from:n,relation:r,applied:[]}}(t,{steps:Vt,target:zt,readerReadsEditorPart:!1})}function Ut(t){const e=globalThis.structuredClone;return e?e(t):JSON.parse(JSON.stringify(t))}function Gt(t,e,n){const r=Ct(t);if(!r)return;const o=Tt(r[jt]);r[jt]=Nt({a:e.a,b:e.b,c:n?e.c:o?o.c:0})}function Kt(t,e){return function(t,e){const n=Rt(t);if(!n)return{ok:!1,blocking:[],reason:"The document carries no version, so there is nothing to convert down from."};const r=Dt(n,e.target,e.readerReadsEditorPart);if("otherGeneration"===r)return{ok:!1,blocking:[],reason:"Schema "+Nt(n)+" and "+Nt(e.target)+" are different generations; no conversion bridges them."};if("newer"!==r)return{ok:!0,doc:t,applied:[]};const o=[];for(const t of e.steps){const r=Tt(t.to);r&&"newer"===Dt(r,e.target,e.readerReadsEditorPart)&&"newer"!==Dt(r,n,e.readerReadsEditorPart)&&o.push(t)}o.reverse();const i=o.filter(t=>"converted"===t.kind&&!t.down);if(i.length)return{ok:!1,blocking:i,reason:"Cannot convert down to "+Nt(e.target)+": "+i.map(t=>t.from+" → "+t.to+" ("+t.reason+")").join("; ")+" cannot be undone."};const a=Ut(t),s=[];for(const t of o)if(t.down)try{t.down(a),s.push(t)}catch(e){return{ok:!1,blocking:[t],reason:"Undoing "+t.from+" → "+t.to+" failed: "+String(e)}}return Gt(a,e.target,e.readerReadsEditorPart),{ok:!0,doc:a,applied:s}}(t,{steps:Vt,target:e,readerReadsEditorPart:!1})}var qt="data-px-animation-src",Yt="_px_animator",Zt={hold:"hold",reset:"reset"},Xt={view:"view",scroll:"scroll"},Ht={block:"block",inline:"inline",x:"x",y:"y"},Jt={nearest:"nearest",root:"root"},Qt={top:"top",center:"center",bottom:"bottom"},$t={cover:"cover",contain:"contain",entry:"entry",exit:"exit",entryCrossing:"entry-crossing",exitCrossing:"exit-crossing"},te={sampled:"sampled",offsetPath:"offsetPath"},ee=["duration","iterations","engine","frameRate"],ne=["trigger","delay","fillMode","direction"],re=[...ee,...ne,"fill","resetOnFinish","timelineSource","scroll"],oe={native:"native",js:"js"},ie=w(A({},oe),{auto:"auto"});function ae(t){return t===ie.js?oe.js:oe.native}function se(t){return t===ie.native}var le={startOn:"load",outAction:"continue",scrollIntoViewThreshold:0},ce={static:"static",fixedTime:"fixedTime",play:"play",autoplay:"autoplay"};function ue(t){const e=void 0!==t.progress||void 0!==t.time,n=void 0!==t.play||void 0!==t.pause,r=!!t.autoplay,o=[],i=(t,e,n)=>t+" and "+e+" were both set — "+n+" wins, "+(n===t?e:t)+" is ignored.";return e?(n&&o.push(i("progress/time","play/pause","progress/time")),r&&o.push(i("progress/time","autoplay","progress/time")),{mode:ce.fixedTime,warnings:o}):n?(r&&o.push(i("play/pause","autoplay","play/pause")),{mode:ce.play,warnings:o}):r?{mode:ce.autoplay,warnings:o}:{mode:ce.static,warnings:o}}function fe(t){return t!==ce.autoplay}function de(t){var e,n,r;return{startOn:null!=(e=null==t?void 0:t.startOn)?e:le.startOn,outAction:null!=(n=null==t?void 0:t.outAction)?n:le.outAction,scrollIntoViewThreshold:null!=(r=null==t?void 0:t.scrollIntoViewThreshold)?r:le.scrollIntoViewThreshold}}var he={start:"start",end:"end"},me={normal:"normal",alternate:"alternate"},pe={luminance:"luminance",alpha:"alpha"},ge={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},ve={translate:"translate"},ye={clip:"clip",extend:"extend"},be={spacing:"spacing",spacingAndGlyphs:"spacingAndGlyphs"},ke={align:"align",stretch:"stretch"},Ae={auto:"auto",exact:"exact"},we={separate:"separate",combined:"combined"},xe="textContent",Pe="class",Se="transform",je="offsetDistance",Oe=new Set(["type","children","animator","meta","animate","effects",xe]),Me={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},Ee=[Me.translate,Me.rotate,Me.scale,Me.origin],_e={pad:"pad",reflect:"reflect",repeat:"repeat"},Te={linear:"linear",radial:"radial"};function Ne(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function ze(t){var e;const n=(null==t?void 0:t.animator)||(null==(e=null==t?void 0:t.meta)?void 0:e.animator);if(!n)return;const r=Ce.get(n);if(r)return r;const o=n,i=re.filter(t=>void 0!==o[t]),a=i.length?A({},o):n;for(const t of i)delete a[t];const s=function(t){const e=t.timeline;if(null==e||"object"!=typeof e)return t;const n=Ie.get(t);if(n)return n;const r=t,{timeline:o}=r,i=x(r,["timeline"]);if(void 0!==e.engine&&(i.engine=e.engine),void 0!==e.frameRate&&(i.frameRate=e.frameRate),"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.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.offset&&(t.pinOffset=n.offset),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,{finishAction:n}=t,r=x(t,["finishAction"]);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.fillMode&&(i.fill=e.fillMode)}return Ie.set(t,i),i}(a);return Ce.set(n,s),s}var Ce=new WeakMap,Ie=new WeakMap;function Re(t){var e;if(t)return null==(e=ze(t))?void 0:e.definitions}function De(t){var e;if(!t)return;const n=null==(e=ze(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 Fe(t){return null==t?void 0:t.children}var Le=Pt.union([Pt.string(),Pt.tuple([Pt.number(),Pt.number(),Pt.number(),Pt.number()])]),We=Pt.union([Pt.string(),Pt.number(),Pt.array(Pt.number()),Pt.object({pathData:Pt.string()}),Pt.lazy(()=>Pt.array(On),[]),Pt.lazy(()=>Xe,{})]),Ve=Pt.object({time:Pt.number().optional(),value:We.optional(),easing:Le.optional(),tangentOut:Pt.tuple([Pt.number(),Pt.number()]).optional(),tangentIn:Pt.tuple([Pt.number(),Pt.number()]).optional()}),Be=t=>{var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0},Ue=t=>{var e;return null!=(e=t.value)?e:t.v},Ge=t=>{var e;return null!=(e=t.easing)?e:t.e},Ke=t=>t.tangentIn,qe=t=>t.tangentOut,Ye=Pt.object({segmentCount:Pt.number().optional(),repeatAt:Pt.enum([he.start,he.end]).optional(),direction:Pt.enum([me.normal,me.alternate]).optional()}),Ze=Pt.object({value:We.optional(),keyframes:Pt.array(Ve).optional(),loop:Pt.union([Ye,Pt.boolean()]).optional(),autoOrient:Pt.boolean().optional(),alongPathMode:Pt.enum([te.sampled,te.offsetPath]).optional()}),Xe=Pt.object({translate:Pt.tuple([Pt.number(),Pt.number()]).optional(),rotate:Pt.number().optional(),skew:Pt.number().optional(),scale:Pt.tuple([Pt.number(),Pt.number()]).optional(),origin:Pt.tuple([Pt.number(),Pt.number()]).optional()}),He=Pt.union([Pt.string(),Xe,Pt.object({value:Xe}),Ze]),Je=Pt.record(Ze),Qe=Pt.union([Pt.string(),Pt.array(Pt.union([Pt.string(),Je])),Je]),$e=Pt.object({startOn:Pt.enum(["load","mouseOver","click","scrollIntoView","programmatic"],le.startOn).optional(),outAction:Pt.enum(["continue","pause","reset","reverse"],le.outAction).optional(),finishAction:Pt.enum([Zt.hold,Zt.reset]).optional(),scrollIntoViewThreshold:Pt.number().optional()}),tn=Pt.object({width:Pt.number(),pathData:Pt.string()}),en=Pt.object({fontFamily:Pt.string(),fontStyle:Pt.string(),ascent:Pt.number(),unitsPerEm:Pt.number(),glyphs:Pt.record(tn)}),nn=Pt.object({easings:Pt.record(Pt.tuple([Pt.number(),Pt.number(),Pt.number(),Pt.number()])).optional(),animations:Pt.record(Je).optional(),styles:Pt.record(Pt.record(Pt.union([Pt.string(),Pt.number()]))).optional(),fonts:Pt.record(en).optional()}),rn=Pt.object({phase:Pt.enum([$t.cover,$t.contain,$t.entry,$t.exit,$t.entryCrossing,$t.exitCrossing]).optional(),fraction:Pt.number().optional()}),on=Pt.object({start:rn.optional(),end:rn.optional()}),an=Pt.object({kind:Pt.enum([Xt.view,Xt.scroll]).optional(),axis:Pt.enum([Ht.block,Ht.inline,Ht.x,Ht.y]).optional(),source:Pt.enum([Jt.nearest,Jt.root]).optional(),subject:Pt.string().optional(),smoothing:Pt.number().optional(),pin:Pt.boolean().optional(),pinAlign:Pt.enum([Qt.top,Qt.center,Qt.bottom]).optional(),pinOffset:Pt.number().optional(),pinDistance:Pt.number().optional(),range:on.optional()}),sn=Pt.object({align:Pt.enum([Qt.top,Qt.center,Qt.bottom]).optional(),offset:Pt.number().optional(),distance:Pt.number().optional()}),ln=Pt.enum([ie.auto,ie.native,ie.js]).optional(),cn=Pt.object({type:Pt.literal("time").optional(),engine:ln,frameRate:Pt.number().optional(),duration:Pt.number().optional(),trigger:$e.optional(),delay:Pt.number().optional(),iterations:Pt.union([Pt.number(),Pt.literal("infinite")]).optional(),fillMode:Pt.enum(["forwards","backwards","both","none"]).optional(),direction:Pt.enum(["normal","reverse","alternate","alternate-reverse"]).optional()}),un={duration:Pt.number().optional(),iterations:Pt.number().optional(),engine:ln,frameRate:Pt.number().optional(),axis:Pt.enum([Ht.block,Ht.inline,Ht.x,Ht.y]).optional(),source:Pt.enum([Jt.nearest,Jt.root]).optional(),subject:Pt.string().optional(),smoothing:Pt.number().optional(),pin:Pt.union([Pt.boolean(),sn]).optional(),range:on.optional()},fn=Pt.object(A({type:Pt.literal("scroll")},un)),dn=Pt.object(A({type:Pt.literal("view")},un)),hn=Pt.discriminatedUnion("type",[cn,fn,dn]),mn=Pt.object({timeline:hn.optional(),definitions:nn.optional(),animateById:Pt.record(Qe).optional(),debugGlobalName:Pt.string().optional(),version:Pt.string().optional()}),pn=Pt.object({id:Pt.string(),animate:Qe}),gn=Pt.union([Pt.string(),Pt.number(),Pt.array(Pt.number()),Pt.object({value:Pt.defined()}),Xe]),vn=Pt.union([Pt.number(),Ze,Pt.object({value:Pt.number()})]),yn=Pt.union([Pt.tuple([Pt.number(),Pt.number()]),Ze,Pt.object({value:Pt.tuple([Pt.number(),Pt.number()])})]),bn=Pt.union([Pt.string(),Ze,Pt.object({value:Pt.string()})]),kn=Pt.object({translate:yn.optional(),rotate:vn.optional(),scale:yn.optional(),skew:vn.optional(),origin:yn.optional()}),An=Pt.object({copies:Pt.number().optional(),translate:yn.optional(),rotate:vn.optional(),skew:vn.optional(),scale:yn.optional(),origin:yn.optional()}),wn=Pt.object({source:Pt.string().optional(),maskType:Pt.enum([pe.luminance,pe.alpha]).optional(),maskUnits:Pt.enum([ge.userSpaceOnUse,ge.objectBoundingBox]).optional(),maskContentUnits:Pt.enum([ge.userSpaceOnUse,ge.objectBoundingBox]).optional(),x:Pt.number().optional(),y:Pt.number().optional(),width:Pt.number().optional(),height:Pt.number().optional()}),xn=Pt.object({pathData:bn.optional()}),Pn=Pt.object({offset:vn.optional(),range:yn.optional(),subPaths:Pt.enum([we.separate,we.combined]).optional()}),Sn=Pt.object({start:Pt.number().optional(),stretch:Pt.number().optional(),timeCrop:Pt.tuple([Pt.number(),Pt.number()]).optional()}),jn=Pt.object({without:Pt.enum([ve.translate]).optional(),source:Pt.string().optional(),retime:Sn.optional()}),On=Pt.object({offset:Pt.number(),color:Pt.string()}),Mn=Pt.union([Pt.array(On),Pt.object({value:Pt.array(On)}),Ze]),En=Pt.object({type:Pt.enum([Te.linear,Te.radial]),start:yn.optional(),end:yn.optional(),center:yn.optional(),radius:vn.optional(),focal:yn.optional(),stops:Mn.optional(),gradientUnits:Pt.enum([ge.userSpaceOnUse,ge.objectBoundingBox]).optional(),spreadMethod:Pt.enum([_e.pad,_e.reflect,_e.repeat]).optional(),gradientTransform:Pt.string().optional()}),_n=En,Tn=Pt.object({pathData:Pt.string(),pathOverflow:Pt.enum([ye.clip,ye.extend]).optional(),lengthAdjust:Pt.enum([be.spacing,be.spacingAndGlyphs]).optional(),method:Pt.enum([ke.align,ke.stretch]).optional(),spacing:Pt.enum([Ae.auto,Ae.exact]).optional(),startOffset:vn.optional(),textLength:vn.optional()}),Nn=Pt.object({useGlyphs:Pt.boolean().optional()}),zn=Pt.object({transformBy:kn.optional(),repeater:An.optional(),maskedBy:wn.optional(),clipPath:xn.optional(),strokeTrim:Pn.optional(),clone:jn.optional(),fillGradient:En.optional(),strokeGradient:_n.optional(),textPath:Tn.optional(),text:Nn.optional()});function Cn(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!zn.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}function In(t,e){var n;const r=!1!==(null==e?void 0:e.strict),o={errors:[],warnings:[],strict:r},i=Ln.isValid(t,o,["root"])?[]:[...o.errors];if(t&&"object"==typeof t){for(const e of Cn(t,{strict:r}))i.includes(e)||i.push(e);const e=null==(n=ze(t))?void 0:n.definitions;for(const n of function(t,e){if(!e||!Object.keys(e).length)return[];const n=[],r=(t,o,i,a)=>{var s,l;if(!t)return;const c="string"==typeof t.fontFamily?t.fontFamily:void 0,u=null!=c?c:i,f=a||"text"===t.type&&!!(null==(l=null==(s=t.effects)?void 0:s.text)?void 0:l.useGlyphs);if(f&&c&&!Object.prototype.hasOwnProperty.call(e,c)){const t=o+': glyph-mode text uses font-family "'+c+'", which has no entry in animator.definitions.fonts';n.includes(t)||n.push(t)}Array.isArray(t.children)&&t.children.forEach((t,e)=>r(t,o+".children["+e+"]",u,f))};return r(t,"root",void 0,!1),n}(t,null==e?void 0:e.fonts))i.includes(n)||i.push(n);for(const n of function(t,e){const n=[],r=(t,o)=>{if(Array.isArray(t))return void t.forEach((t,e)=>r(t,o+"["+e+"]"));if(!t||"object"!=typeof t)return;const i=t.easing;if(!("string"!=typeof i||e&&Object.prototype.hasOwnProperty.call(e,i))){const t=o+'.easing: "'+i+'" names no entry in animator.definitions.easings — it will play linear';n.includes(t)||n.push(t)}for(const[e,n]of Object.entries(t))"easing"!==e&&n&&"object"==typeof n&&r(n,o+"."+e)};return r(t,"root"),n}(t,null==e?void 0:e.easings))i.includes(n)||i.push(n);for(const e of function(t){var e;const n=null==(e=ze(t))?void 0:e.version;return void 0===n||void 0!==Tt(n)?[]:["root.animator.version: "+JSON.stringify(n)+' is not a version stamp ("a.b" or "a.b.c") — it reads as unstamped']}(t))i.includes(e)||i.push(e)}return i}var Rn=Pt.openObject({type:Pt.string(),domType:Pt.string().optional(),textContent:Pt.string().optional(),id:Pt.string().optional(),meta:Pt.any().optional(),effects:zn.optional(),animate:Qe.optional(),style:Pt.union([Pt.string(),Pt.record(Pt.union([Pt.string(),Pt.number()]))]).optional()},gn),Dn=Pt.openObject(w(A({},Rn._shape),{children:Pt.lazy(()=>Pt.array(Dn),[]).optional()}),gn),Fn=Pt.object({width:Pt.union([Pt.number(),Pt.string()]).optional(),height:Pt.union([Pt.number(),Pt.string()]).optional(),viewBox:Pt.string().optional(),animator:mn.optional()}),Ln=Pt.openObject(w(A(A({},Rn._shape),Fn._shape),{type:Pt.literal("svg"),children:Pt.array(Dn).optional()}),gn),Wn=Pt.object({v:Pt.array(Pt.array(Pt.number())),i:Pt.array(Pt.array(Pt.number())).optional(),o:Pt.array(Pt.array(Pt.number())).optional(),c:Pt.boolean().optional()});function Vn(t){const e=In(t,{strict:!1});return{valid:0===e.length,errors:e}}var Bn=0;function Un(){return"_px_"+Date.now().toString(36)+(++Bn).toString(36)+Math.random().toString(36).substring(2,6)}function Gn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>Gn(t));const e=t,n={};for(const t of Object.keys(e))n[t]=Gn(e[t]);return n}function Kn(t){var e,n;const r=Gn(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(["targetId","boundElementId"]),l=(t,e)=>"source"===t&&("maskedBy"===e||"clone"===e);!function t(e){if(e&&"object"==typeof e){if(e.id&&"string"==typeof e.id){const t=e.id,n=Un();o.set(t,n),e.id=n}else e.animate&&(e.id=Un());if(Array.isArray(e.children))for(const n of e.children)t(n)}}(r),function t(e,n){if(e&&"object"==typeof e)for(const[r,c]of Object.entries(e))if("children"!==r)if("string"==typeof c)if(i.has(r)&&c.startsWith("#")){const t=c.slice(1),n=o.get(t);n&&(e[r]="#"+n)}else if(a.has(r))e[r]=qn(c,o);else if(s.has(r)||l(r,n)){const t=c.startsWith("#"),n=o.get(t?c.slice(1):c);n&&(e[r]=t?"#"+n:n)}else c.includes("url(#")&&(e[r]=qn(c,o));else if("style"===r&&"object"==typeof c&&null!==c)for(const[t,e]of Object.entries(c))"string"==typeof e&&(c[t]=qn(e,o));else"object"==typeof c&&null!==c&&t(c,r);else if(Array.isArray(c))for(const e of c)t(e)}(r);const c=null==(e=r.animator)?void 0:e.animateById;if(c&&"object"==typeof c){const t={};for(const[e,r]of Object.entries(c)){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 qn(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}var Yn=new Set(["script","foreignobject"]),Zn=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Xn=new Set(["href","xlink:href","src"]),Hn=new Set(["mixBlendMode","isolation"]),Jn=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Qn=/^data:image\/svg\+xml(?:;[^,]*)?,/i,$n=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,tr=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function er(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(Zn.has(n)){const t=String(e);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||Xn.has(n)&&(Jn.test(t)||Qn.test(t)||function(t){const e=$n.exec(t);return!!e&&tr.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 nr(t){const e={};for(const n of Object.keys(t)){const r=U(n);if(Oe.has(r))continue;if("style"===r)continue;let o=t[n];if(D.has(r)&&Array.isArray(o))e[r]=I(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)F.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e[Se]=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[Se]=W(t,{withUnits:!1})}}return e}function rr(t){const e=Ue(t);if(!e)return;if(Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1])return[e[0],e[1]];const n=e.translate;return Array.isArray(n)&&n.length>=2?[n[0],n[1]]:void 0}function or(t){return Be(t)}function ir(t){return Ge(t)}function ar(t){const e=t.keyframes;if(!Array.isArray(e))return!1;if(t.autoOrient)return!0;for(const t of e)if(Ke(t)||qe(t))return!0;return!1}var sr=new WeakMap;function lr(t,e,n,r){let o=sr.get(t);const i=null==o?void 0:o.get(e);if(i)return i;const a=qe(t),s=Ke(e),l=[n[0]+(a?a[0]:0),n[1]+(a?a[1]:0)],c=[r[0]+(s?s[0]:0),r[1]+(s?s[1]:0)],u=Q(n,l,c,r),f={P0:n,P1:l,P2:c,P3:r,lut:u,totalArc:u.ds[u.ds.length-1]};return o||(o=new WeakMap,sr.set(t,o)),o.set(e,f),f}function cr(t,e,n,r,o,i){const a=lr(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],c=o[s]-l,u=c>0?(n-l)/c:0;return r[s-1]+u*(r[s]-r[s-1])}(a.lut,o),l=Z(a.P0,a.P1,a.P2,a.P3,s);if(!i)return{translate:l};const c=H(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(c[1],c[0])/Math.PI}}var ur=.5,fr=5,dr=32;function hr(t,e){var n,r,o;if(!ar(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:ur,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:fr,c=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:dr,u=[],f=rr(i[0]);if(!f)return t;const d=a?function(t,e){const n=rr(t),r=rr(e);if(!n||!r)return 0;const o=lr(t,e,n,r),i=H(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;u.push(pr(or(i[0]),yr(gr(i[0]),gr(i[0]),0,f,d,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=rr(e),o=rr(n);r&&o?(a&&t>0&&kr(u,e,n,r,o,l),wr(u,e,n,r,o,a,s,l,c)):u.push(pr(or(n),yr(gr(n),gr(n),1,null!=o?o:[0,0],void 0,a)))}const h=ir(i[i.length-1]);h&&(u[u.length-1].e=h),a&&mr(u);const m={keyframes:u};return void 0!==t.loop&&(m.loop=t.loop),m}function mr(t){let e;for(const n of t){const t=Ue(n);if(!t||"number"!=typeof t.rotate)continue;if(void 0===e){e=t.rotate;continue}let r=t.rotate;for(;r-e>180;)r-=360;for(;r-e<-180;)r+=360;t.rotate=r,e=r}}function pr(t,e){return{t:t,v:e}}function gr(t){const e=Ue(t);if(e&&"object"==typeof e&&!Array.isArray(e))return e}function vr(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 yr(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]=vr(o,s,n))}return void 0!==o&&(a.rotate=o+br(t,e,n)),a}function br(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=vr(r,o,n);return"number"==typeof i?i:0}function kr(t,e,n,r,o,i){const a=t[t.length-1],s=Ue(a),l=null==s?void 0:s.rotate;if("number"!=typeof l)return;const c=gr(e),u=l-br(c,c,0),f=lr(e,n,r,o),d=H(f.P0,f.P1,f.P2,f.P3,0),h=180*Math.atan2(d[1],d[0])/Math.PI,m=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(h,u);if(Math.abs(m)<=i)return;const p=or(e),g=Math.min(p+Ar,(p+or(n))/2),v=yr(gr(e),gr(e),0,r,h,!0);t.push(pr(g,v))}var Ar=.05;function wr(t,e,n,r,o,i,a,s,l){const c=lr(e,n,r,o),u=or(e),f=or(n),d=ir(e),h=(m=d)?T([m[1],m[0],m[3],m[2]]):t=>t;var m;const p=gr(e),g=gr(n),v=function(t,e,n,r,o){const i=[];xr(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),xr(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++)Pr(a[o],a[o+1],s,t,e,n,r,l);return s}(c,i,a,s,l),y=[];for(const t of v){const e=$(c.lut,t),n=Y(c.totalArc>0?e/c.totalArc:t,0,1),r={u:Y(h(n),0,1),p:n,pos:Z(c.P0,c.P1,c.P2,c.P3,t)};if(i){const e=H(c.P0,c.P1,c.P2,c.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?Y((n.u-k)/(1-k),0,1):1,{left:o,right:a}=z(b,r),s=0===e?A:t.length-1;o?t[s].e=o:delete t[s].e;const l=u+n.u*(f-u),c=yr(p,g,n.p,n.pos,n.rotateDeg,i);t.push(pr(l,c)),b=a,k=n.u}}function xr(t,e,n,r,o){const i=e-t,a=n-e,s=i-2*a+(r-n),l=2*(a-i),c=i;if(Math.abs(s)<1e-10){if(Math.abs(l)>1e-10){const t=-c/l;t>1e-6&&t<.999999&&o.push(t)}return}const u=l*l-4*s*c;if(u<0)return;const f=Math.sqrt(u),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 Pr(t,e,n,r,o,i,a,s){const l=(t+e)/2,c=Z(r.P0,r.P1,r.P2,r.P3,t),u=Z(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=Z(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=Z(r.P0,r.P1,r.P2,r.P3,l),m=Z(r.P0,r.P1,r.P2,r.P3,t+.75*f),p=Math.max(Sr(d,c,u),Sr(h,c,u),Sr(m,c,u));let g=!0;if(o){const n=H(r.P0,r.P1,r.P2,r.P3,t),o=H(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&&(g=!1)}p<=i&&g||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,Pr(t,l,n,r,o,i,a,s),Pr(l,e,n,r,o,i,a,s))}function Sr(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 jr(t,e){const n=Or(t,e);return null!=n?n:t}function Or(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Or(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&&ar(n)){const o=hr(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 Mr=1;function Er(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=>Er(t[n],e[n]))}function _r(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 Tr(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Nr(t){return"string"==typeof t&&void 0!==Tr(t)}function zr(t){if(t&&"object"==typeof t&&"string"==typeof t.pathData){const e=Tr(t.pathData);return e?{paths:_r(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&Nr(e[0])){const t=[];for(const n of e){const e=Tr(n);e&&t.push(..._r(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Nr(t[0])){const e=[];for(const n of t){const t=Tr(n);t&&e.push(..._r(t))}return{paths:e}}return{paths:t}}return Nr(t)?{paths:_r(Tr(t))}:t}function Cr(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 Ir(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 Rr(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)}:D.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?S(e,n,r):F.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?j(e||[],n||[],r):S(+(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]=S(+(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 Dr(t,e,n,r){var o,i,a,s,l;const c=e.length-1,u=Y(null!=(o=n.segmentCount)?o:c,1,c);let f;f=n.repeatAt===he.start?e.slice(0,u+1):e.slice(c-u);const d=null!=(i=e[0].t)?i:0,h=null!=(a=e[e.length-1].t)?a:0;let m,p;n.repeatAt===he.start?(m=0,p=d):(m=h,p=r);const g=p-m;if(g<=0)return e;const v=null!=(s=f[0].t)?s:0,y=(null!=(l=f[f.length-1].t)?l:0)-v;if(y<=0)return e;const b=f.map(t=>({relT:(t.t-v)/y,v:t.v,e:t.e,tangentIn:Ke(t),tangentOut:qe(t)})),k=Math.floor(g/y),x=g-k*y,P=x/y,S=[],j=n.repeatAt!==he.start,O=e[e.length-1];let M,E=!1;function _(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?C(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,c=o.e?T(o.e)(l):l,u=Rr(t,o.v,r.v,c),{left:f}=z(o.e,l);return S.length>0&&o.relT<=a&&(S[S.length-1].e=f),void S.push({t:e+a*y,v:u,e:void 0})}const s=S.length>0?S[S.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(Er(s.v,r.v)){S.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(M=r.e,E=!0);continue}S.length>0&&(delete s.tangentIn,delete s.tangentOut)}const c={t:e+r.relT*y+(l?Mr:0),v:r.v,e:n<i.length-1?r.e:void 0};r.tangentIn&&(c.tangentIn=r.tangentIn),r.tangentOut&&(c.tangentOut=r.tangentOut),S.push(c)}}if(n.repeatAt===he.start){P>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?C(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?T(a.e)(o):o,l=Rr(t,a.v,r.v,s),{right:c}=z(a.e,o);S.push({t:e,v:l,e:c})}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),S.push(s)}}(m,n.direction===me.alternate&&k%2==0,P);for(let t=0;t<k;t++){const e=k-1-t,r=n.direction===me.alternate&&e%2==0;_(m+x+t*y,r)}}else{for(let t=0;t<k;t++){const e=n.direction===me.alternate&&t%2==0;_(m+t*y,e)}if(P>1e-9){const t=n.direction===me.alternate&&k%2==0;_(m+k*y,t,P)}}return n.repeatAt===he.start?[...S,...e]:E&&e.length>0?[...e.slice(0,-1),w(A({},e[e.length-1]),{e:M}),...S]:[...e,...S]}function Fr(t,e,n,r){var o;const i=e.keyframes||[],a=[];for(const e of i){const n=Be(e);let i=Ue(e);const s=Ge(e);"d"===t&&(i=zr(i));const l=G(t)?q(t):t;D.has(l)&&(i=null!=(o=R(i))?o:i);const c={t:n,v:i,e:Cr(s,r)},u=Ke(e),f=qe(e);u&&(c.tangentIn=u),f&&(c.tangentOut=f),a.push(c)}a.sort((t,e)=>{var n,r;return(null!=(n=t.t)?n:0)-(null!=(r=e.t)?r:0)});const s=e.loop,l=!0===s?{}:s||void 0;return l&&a.length>=2?Dr(t,a,l,n):a}function Lr(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)?q(t):t,s=D.has(a),l=i.map(e=>{var n;const r=Be(e);let o=Ue(e);"d"===t&&(o=zr(o)),s&&(o=null!=(n=R(o))?n:o);const i={t:r,v:o,e:Ge(e)},a=Ke(e),l=qe(e);return a&&(i.tangentIn=a),l&&(i.tangentOut=l),i}),c={keyframes:Dr(t,l,o,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function Wr(t,e){const n=Vr(t,e);return null!=n?n:t}function Vr(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Vr(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=Lr(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 Br=0;function Ur(t,e=oe.native){const n=ze(t)||{},r=Re(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=Ir(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=Ir(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=oe.native){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=Fr(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===oe.native&&"transform"===i?hr(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[Se];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=>F.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 c=A({},t);return delete c[a],w(A({},c),{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=De(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_"+ ++Br;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 Gr(t,e,n){var r,o,i,a;const s=e.keyframes||[];if(0===s.length)return null;const{prevKf:l,nextKf:c}=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,c=null!=(r=t[s+1].t)?r:0;if(l<=e&&e<=c){i=t[s],a=t[s+1];break}e>c&&s===o-1&&(i=t[o>0?o-1:0],a=t[o])}return{prevKf:i,nextKf:a}}(s,n);let u=l===c?0:(f=n,d=null!=(r=l.t)?r:0,(h=null!=(o=c.t)?o:0)===d?0:0+(f-d)/(h-d)*1);var f,d,h;u=Y(u,0,1);const m=Ge(l);if(m&&Array.isArray(m))try{u=T(m)(u)}catch(t){}let p=G(t)?q(t):t,g=null;const v=null==l?void 0:l.v,y=null==c?void 0:c.v;if("d"===p)g=M(null!=(i=null==v?void 0:v.paths)?i:Array.isArray(v)?v:[],null!=(a=null==y?void 0:y.paths)?a:Array.isArray(y)?y:[],u).map(t=>P(t)).join("");else if(D.has(p))g=I(O(v||[0,0,0,1],y||[0,0,0,1],u)),p=t;else if("stroke-dasharray"===p)g=j(v||[],y||[],u).join(" "),p=t;else if("transform"!==p||null===v||"object"!=typeof v||Array.isArray(v))"translate"===p?(g="translate("+j(v||[0,0],y||[0,0],u).join(",")+")",p="transform"):"rotate"===p?(g="rotate("+S(+(v||0),+(y||0),u)+")",p="transform"):"scale"===p?(g="scale("+j(v||[1,1],y||[1,1],u).join(",")+")",p="transform"):g=S(+(v||0),+(y||0),u);else{const t=new Set([...v?Object.keys(v):[],...y?Object.keys(y):[]]),n={};for(const e of t){const t=null==v?void 0:v[e],r=null==y?void 0:y[e];if("rotate"===e||"skew"===e)n[e]=S(+(null!=t?t:0),+(null!=r?r:0),u);else if("translate"===e||"scale"===e||"origin"===e){const o="scale"===e?[1,1]:[0,0],i=j(t||o,r||o,u);n[e]=i}}if(ar(e)){const t=v.translate,r=y.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=cr(l,c,[+t[0],+t[1]],[+r[0],+r[1]],u,!!e.autoOrient);n.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(n.rotate=o.rotateDeg)}}g=W(n,{withUnits:!1}),p="transform"}return L.has(p)&&"number"==typeof g&&(g=100*g+"%"),{k:p,v:null===g?"":""+g}}function Kr(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=Gr(r,o,e);t&&(n[t.k]=t.v)}return n}function qr(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(qr);const e={};for(const n of Object.keys(t))e[n]=qr(t[n]);return e}function Yr(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 Zr(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function Xr(t){var e;const n=Zr(t.x),r=Zr(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 Hr(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=Qr(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=$r(t.viewBox);if(e)return[e[2],e[3]];const n=Jr(t.width),r=Jr(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=to(t,n,r,()=>"_lw_use_mat_"+ ++o,a,i);if(0===a.length)return s;const l={type:"defs",children:a},c=[...null!=(e=s.children)?e:[],l];return w(A({},s),{children:c})}function Jr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Qr(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function $r(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 to(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=Qr(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,c,u;const f=qr(e);Yr(f,o);const d="symbol"===f.type?$r(f.viewBox):void 0,h=null!=(l=null!=(s=Jr(t.width))?s:null==d?void 0:d[2])?l:a[0],m=null!=(u=null!=(c=Jr(t.height))?c:null==d?void 0:d[3])?u:a[1],p="symbol"===f.type?function(t,e,n,r,o){const i=$r(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,c,u]=i,f=c>0&&u>0?Math.min(r/c,o/u):1,d=(r-c*f)/2,h=(o-u*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:c,height:u}]}),a.clipPath="url(#"+p+")",a}(f,o,i,h,m):f,g=to(p,n,r,o,i,a),v=w(A({},t),{type:"g",children:[g]});return delete v.href,delete v.width,delete v.height,Xr(v)}(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=to(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?w(A({},t),{children:s}):t}function eo(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 no(t){var e,n;if(void 0===t)return{kind:"absent"};if(Array.isArray(t))return{kind:"static",value:t};if("object"==typeof t){const r=t,o=r.keyframes;if(o){const t={kind:"animated",keyframes:o.map(oo),autoOrient:r.autoOrient,loop:r.loop},n=null!=(e=r.value)?e:r.v;return void 0!==n&&"animated"===t.kind&&(t.base=n),t}const i=null!=(n=r.value)?n:r.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function ro(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 c=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,u=A({},c||{}),f={keyframes:n.keyframes};void 0!==n.loop&&(f.loop=n.loop),void 0!==n.autoOrient&&(f.autoOrient=n.autoOrient),u[e]=f,t.animate=u;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 oo(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 io(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 ao(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=lo(r,e.origin,!0),r=so(r,"scale",e.scale),r=so(r,"skew",e.skew),r=so(r,"rotate",e.rotate),r=lo(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=lo(r,e.origin,!0),r=so(r,"translate",e.translate),r=lo(r,e.origin,!1)):r=so(r,"translate",e.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function so(t,e,n,r){if(void 0===n)return t;const o=no(n);if("static"===o.kind)return{type:"g",transform:{value:eo(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>io(t,eo(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 lo(t,e,n){if(void 0===e)return t;const r=no(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=>io(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function co(t,e){return"_lw_"+e+"_"+t.nextId++}function uo(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function fo(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>fo(t,e))}var ho=qr;function mo(t,e,n){var r,o,i;if("use"===t.type&&"translate"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.without)){const r=uo(t.effects.clone.source);"string"==typeof r&&r&&!e.contentRefInnerIds.has(r)&&e.contentRefInnerIds.set(r,n(r))}null==(i=t.children)||i.forEach(t=>mo(t,e,n))}function po(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 go(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 vo(t,e,n,r){if(!e)return t;const o=co(n,"grad"),i=function(t,e){const n={type:t.type===Te.radial?"radialGradient":"linearGradient",id:e};return t.type===Te.linear?(yo(n,"x1","y1",t.start),yo(n,"x2","y2",t.end)):(yo(n,"cx","cy",t.center),function(t,e,n){const r=no(n);"absent"!==r.kind&&ro(t,"r",r,{asString:!0})}(n,0,t.radius),yo(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;if(!t)return[];const r=no(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(bo):[];const o=r.keyframes;if(!o.length)return[];const i=r.loop;let a=0;for(const t of o){const e=Ue(t);Array.isArray(e)&&e.length>a&&(a=e.length)}if(!a)return[];const s=Ue(o[0]),l=[];for(let t=0;t<a;t++){const r=null!=(n=null!=(e=null==s?void 0:s[t])?e:ko(o,0,t))?n:{offset:t/Math.max(1,a-1),color:"#000000"};l.push({offset:r.offset,color:r.color})}return l.map((t,e)=>function(t,e,n,r,o){var i;const a=[],s=[];let l=!1;for(const r of e){const o=Be(r),c=Ue(r),u=null!=(i=null==c?void 0:c[n])?i:ko(e,e.indexOf(r),n);if(!u)continue;const f=Ge(r),d={time:o,value:u.color};void 0!==f&&(d.easing=f),a.push(d);const h={time:o,value:u.offset};void 0!==f&&(h.easing=f),s.push(h),u.offset!==t.offset&&(l=!0)}const c={type:"stop",offset:Ao(t.offset),stopColor:t.color},u={};return a.length&&(u.stopColor={keyframes:a},void 0!==o&&(u.stopColor.loop=o)),l&&s.length&&(u.offset={keyframes:s},void 0!==o&&(u.offset.loop=o)),Object.keys(u).length&&(c.animate=u),c}(t,o,e,0,i))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function yo(t,e,n,r){var o,i,a;const s=no(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},c=null!=(o=t.animate)?o:{};c[e]=l(0),c[n]=l(1),t.animate=c;const u=null!=(a=s.base)?a:null==(i=s.keyframes[0])?void 0:i.value;Array.isArray(u)&&(t[e]=String(u[0]),t[n]=String(u[1]))}function bo(t){return{type:"stop",offset:Ao(t.offset),stopColor:t.color}}function ko(t,e,n){for(let r=e;r>=0;r--){const e=Ue(t[r]);if(null==e?void 0:e[n])return e[n]}for(let r=e+1;r<t.length;r++){const e=Ue(t[r]);if(null==e?void 0:e[n])return e[n]}}function Ao(t){return Math.round(1e3*t)/10+"%"}function wo(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.pathData?t.pathData:void 0}function xo(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=no(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=Po(o,"translate",e.translate,void 0),o=Po(o,"rotate",e.rotate,r),o=Po(o,"scale",e.scale,r),o}function Po(t,e,n,r,o){if(void 0===n)return t;const i=no("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:eo(e,So(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=io(t,eo(e,So(e,t.value),r));return"translate"===e?A(A({},n),jo(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function So(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function jo(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 Oo(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function Mo(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 Eo(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=_o(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function _o(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 To(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){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}function No(t,e,n){if(!e)return;const r=uo(e.source);if(!r)return void(e.without===ve.translate&&n.errors.push("clone: content ref missing `source`"));const o=e.without===ve.translate&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function zo(t,e){const n={};return void 0!==t.translate&&(n.translate=Co(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=Co(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=Co(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){return Co(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 Co(t,e,n=!1){const r=no(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 Io=!1;function Ro(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var Do=1;function Fo(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-Do),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Do,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 Lo(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function Wo(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function Vo(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 Bo(t,e,n){const r=uo(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=Uo(r,e,n,new Set);if(o)if(Io){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Xr(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function Uo(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=ho(o);if(function(t,e){Yr(t,()=>co(e,"retimed"))}(i,n),"use"===o.type?Ko(i,e.start,e.stretch):Go(i,e.start,e.stretch),Vo(i),"use"===o.type&&o.href){const a=uo(o.href);if(a){const s=Wo(o),l=s?Lo(Ro(s),e):e,c=new Set(r);c.add(t);const u=Uo(a,l,n,c);u&&(i.href="#"+u)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=Wo(t);if("use"===t.type&&s&&t.href){const i=uo(t.href);if(i){const a=Lo(Ro(s),e),l=new Set(r);l.add(o);const c=Uo(i,a,n,l);c&&(t.href="#"+c)}Vo(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 Go(t,e,n){var r;Ko(t,e,n),null==(r=t.children)||r.forEach(t=>Go(t,e,n))}function Ko(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 qo=48,Yo=/[MmLlHhVvCcSsQqTtAaZz]/;function Zo(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 Xo(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,c=0,u=0,f=0,d="";const h=()=>parseFloat(e[r++]),m=(t,e,r)=>{const a=[o,i],s=Q(a,t,e,r,qo);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];Yo.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",g=t.toUpperCase();if("Z"!==g){if("M"===g){const e=h()+(n?o:0),r=h()+(n?i:0);o=e,i=r,a=e,s=r,d=t;continue}if("L"===g)p(h()+(n?o:0),h()+(n?i:0));else if("H"===g)p(h()+(n?o:0),i);else if("V"===g)p(o,h()+(n?i:0));else if("C"===g){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],c=e[1],m(t,e,r)}else if("S"===g){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*i-c]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],c=e[1],m(t,e,r)}else if("Q"===g){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)];u=t[0],f=t[1];const{P1:r,P2:a}=Zo([o,i],t,e);m(r,a,e)}else if("T"===g){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-u,2*i-f]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)];u=t[0],f=t[1];const{P1:r,P2:a}=Zo([o,i],t,e);m(r,a,e)}else{if("A"!==g){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,c=l>0?(e-s)/l:0;return n[a-1]+c*(n[a]-n[a-1])}(o.lut,i):0,[s,l]=Z(o.P0,o.P1,o.P2,o.P3,a),[c,u]=H(o.P0,o.P1,o.P2,o.P3,a);return{x:s,y:l,angle:Math.atan2(u,c)}};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 Ho=.15;function Jo(t){const e=no(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 Qo(t){let e=0,n=16;const r=t=>{var o;const i=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;i&&(n=Math.max(n,i));const a=t.textContent;if("string"==typeof a&&(e+=a.length),t.children)for(const e of t.children)r(e)};return r(t),e*n}var $o=t=>Math.round(1e3*t)/1e3;function ti(t,e){if(!e||null==t)return t;const n=no(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 ei(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Xo(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Ho*o,a=Jo(e.startOffset),s=Jo(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-a.min),c=Math.max(0,a.max+s-o),u=l>0?l+i:0,f=c>0?c+i:0;if(f<=0&&u<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let m=t;if(u>0){const e=d.x-Math.cos(d.angle)*u,n=d.y-Math.sin(d.angle)*u,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");m="M"+$o(e)+","+$o(n)+"L"+$o(d.x)+","+$o(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"+$o(t)+","+$o(e)}return{d:m,startShift:u}}function ni(t,e,n){null!=n&&ro(t,e,no(n),{asString:!0})}var ri=(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 oi(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function ii(t,e){let n="";for(let r=0;r<t.length;r++){const o=oi(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function ai(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var si=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function li(t,e,n=2){const r=[];let o;for(si.lastIndex=0;null!==(o=si.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]=ai(e,s(),s());i+=t+ii([r,o],n)}else if("C"===t){const[t,r]=ai(e,s(),s()),[o,a]=ai(e,s(),s()),[l,c]=ai(e,s(),s());i+="C"+ii([t,r,o,a,l,c],n)}else if("Q"===t){const[t,r]=ai(e,s(),s()),[o,a]=ai(e,s(),s());i+="Q"+ii([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var ci=16,ui=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",xe,"xml:space"],fi=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],di=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function hi(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function mi(t){return"string"==typeof t?t:void 0}function pi(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of di)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function gi(t,e){var n,r,o,i,a,s,l,c,u,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=mi(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=hi(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=hi(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=hi(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(c=hi(m("opacity")))?c:e.opacity,animate:null!=(u=d?void 0:pi(t))?u:e.animate};for(const t of fi){const n=null!=(f=m(t))?f:e[t];void 0!==n&&(p[t]=n)}return p}function vi(t){var e,n,r;return{fontFamily:mi(t.fontFamily),fontSize:null!=(e=hi(t.fontSize))?e:ci,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=hi(t.letterSpacing))?n:0,wordSpacing:null!=(r=hi(t.wordSpacing))?r:0}}function yi(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 fi)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function bi(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 ki(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var Ai=.6,wi="px-missing-glyph";function xi(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 c=n+s,u=r-s,f=-s,d=o+s;return l+"M"+c+" "+f+"L"+c+" "+d+"L"+u+" "+d+"L"+u+" "+f+"Z"}function Pi(t,e){var n,r,o;const{glyphs:i,create:a=ri,warnings:s}=e,l=ki(i),c={x:null!=(n=hi(t.x))?n:0,y:null!=(r=hi(t.y))?r:0},u=[],f=[{start:c.x,end:c.x}];let d=0;const h=(t,e)=>{var n;const r=bi(e,i,l,s),o=(null==r?void 0:r.unitsPerEm)||1e3,a=e.fontSize/o,h=null!=(n=null==r?void 0:r.ascent)?n:.9*o,m=yi(e);for(let n=0;n<t.length;n++){const i=t.charAt(n),s=null==r?void 0:r.glyphs[i];if(s&&s.pathData)u.push({glyphD:s.pathData,m:[a,0,0,a,c.x,c.y],paint:m,line:d,x:c.x,y:c.y,scale:a}),c.x+=s.width*a;else if(/\S/.test(i)){const t=s&&s.width>0?s.width:Ai*o;u.push({glyphD:xi(t,h),m:[a,0,0,a,c.x,c.y],paint:m,isMissing:!0,line:d,x:c.x,y:c.y,scale:a}),c.x+=t*a}else c.x+=(s?s.width:0)*a;c.x+=e.letterSpacing+(" "===i?e.wordSpacing:0),f[d].end=c.x}},m=(t,e)=>{var n,r,o;const i=gi(t,e),a=hi(t.x),s=hi(t.y);void 0!==a&&(c.x=a,d=f.length,f.push({start:c.x,end:c.x})),void 0!==s&&(c.y=s),c.x+=null!=(n=hi(t.dx))?n:0,c.y+=null!=(r=hi(t.dy))?r:0;const l=mi(t[xe]);if(l&&!(null==(o=t.children)?void 0:o.length)&&h(l,i),t.children)for(const e of t.children)m(e,i)},p=vi(t);if(t.children)for(const e of t.children)m(e,p);const g=mi(t[xe]);g&&!(null==(o=t.children)?void 0:o.length)&&h(g,p);const v=mi(t.textAnchor);if("middle"===v||"end"===v)for(const t of u){const e=f[t.line].end-f[t.line].start,n="middle"===v?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return Ri(t,Ii(u,a,s),a)}function Si(t,e){var n,r,o,i,a;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=Xo(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const c=ki(i),u=[];let f=0;const d=(t,e)=>{var n,r;const o=gi(t,e),s=mi(t[xe]);if(s&&!(null==(n=t.children)?void 0:n.length)){const t=bi(o,i,c,a),e=(null==t?void 0:t.unitsPerEm)||1e3,n=o.fontSize/e,l=(null!=(r=null==t?void 0:t.ascent)?r:.9*e)*n;for(let e=0;e<s.length;e++){const r=s.charAt(e),i=null==t?void 0:t.glyphs[r],a=(i?i.width:0)*n,c=a+o.letterSpacing+(" "===r?o.wordSpacing:0);u.push({advStart:f,advEnd:f+c,glyphW:a,ascent:l,fontSize:o.fontSize}),f+=c}}if(t.children)for(const e of t.children)d(e,o)};d(t,vi(t));const h=f,m=no(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,g=p>0&&h>0?p/h:1,v=no(null==s?void 0:s.startOffset),{along:y,perp:b}=Oi(t),k=y+("animated"===v.kind?Number(null==(o=v.keyframes[0])?void 0:o.value)||0:"static"===v.kind&&Number(v.value)||0),A=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return u.map(t=>{const e=k+t.advStart*g,n=k+t.advEnd*g,r=A(l.sampleAtDistance(e)),o=A(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*g);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:s,warnings:l}=e,c=ki(s),u={x:null!=(r=hi(t.x))?r:0,y:null!=(o=hi(t.y))?o:0},f=[],d=[{start:u.x,end:u.x}];let h=0;const m=(t,e)=>{var n;const r=bi(e,s,c,l),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);f.push({x:u.x,y:u.y,width:l,ascent:a,fontSize:e.fontSize,line:h}),u.x+=l,d[h].end=u.x}},p=(t,e)=>{var n,r,o;const i=gi(t,e),a=hi(t.x),s=hi(t.y);void 0!==a&&(u.x=a,h=d.length,d.push({start:u.x,end:u.x})),void 0!==s&&(u.y=s),u.x+=null!=(n=hi(t.dx))?n:0,u.y+=null!=(r=hi(t.dy))?r:0;const l=mi(t[xe]);if(l&&!(null==(o=t.children)?void 0:o.length)&&m(l,i),t.children)for(const e of t.children)p(e,i)},g=vi(t);if(t.children)for(const e of t.children){const t=f.length;if(p(e,g),f.length===t){const t=gi(e,g),n=bi(t,s,c),r=(null==n?void 0:n.unitsPerEm)||1e3;f.push({x:u.x,y:u.y,width:0,ascent:(null!=(i=null==n?void 0:n.ascent)?i:.9*r)*(t.fontSize/r),fontSize:t.fontSize,line:h})}}const v=mi(t[xe]);v&&!(null==(a=t.children)?void 0:a.length)&&m(v,g);const y=mi(t.textAnchor);if("middle"===y||"end"===y)for(const t of f){const e=d[t.line].end-d[t.line].start;t.x+="middle"===y?-e/2:-e}return f.map(t=>{var e=t,{line:n}=e;return x(e,["line"])})}function ji(t,e,n,r,o=0){const{x:i,y:a,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),c=Math.sin(s),u=r/2;return[n*l,n*c,-n*c,n*l,i-n*l*u-o*c,a-n*c*u+o*l]}function Oi(t){var e,n,r;return{along:(null!=(e=hi(t.x))?e:0)+(null!=(n=hi(t.dx))?n:0),perp:null!=(r=hi(t.dy))?r:0}}function Mi(t,e,n,r,o,i){const{glyphs:a,create:s=ri,warnings:l}=r,c=e?Xo(e):null;if(!c)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const u=ki(a),{cells:f,width:d}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,c;const u=gi(t,s),f=mi(t[xe]);if(f&&!(null==(l=t.children)?void 0:l.length)){const t=bi(u,e,n,r);if(t){const e=u.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=yi(u);for(let a=0;a<f.length;a++){const s=f.charAt(a),l=t.glyphs[s];if(l&&l.pathData){const t=l.width*e;o.push({glyphD:l.pathData,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:Ai*t.unitsPerEm,s=a*e;o.push({glyphD:xi(a,n),widthEm:a,scale:e,paint:r,isMissing:!0,midBase:i+s/2}),i+=s}else i+=(l?l.width:0)*e;i+=u.letterSpacing+(" "===s?u.wordSpacing:0)}}}if(t.children)for(const e of t.children)a(e,u)};return a(t,vi(t)),{cells:o,width:i}}(t,a,u,l);if(!f.length)return Ri(t,[],s);const{along:h,perp:m}=Oi(t),p=Ei(n),g=Ei(o),v=t=>t>0&&d>0?t/d:1,y="clip"===i&&!c.closed;if(p.animated||g.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,g.times),n=(t,e)=>h+p.at(e)+v(g.at(e))*t.midBase,r=p.animated?p.loop:g.loop;return Ri(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/_i,.5),c=t=>t>=0&&t<=e.totalLength,u=[];for(const f of t){const t=[f.scale,0,0,f.scale,-f.scale*(f.widthEm/2),0],d=li(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:[Ni(r-s*l,3),Ni(o+s*a,3)],rotate:Ni(180*i/Math.PI,3)}}},m=[],p=[],g=(t,e)=>{m.push(h(t,e)),a&&p.push({time:e,value:c(t)?1:0})};g(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(Ti,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);g(n(f,r),r)}}mr(m);const v={keyframes:m};void 0!==o&&(v.loop=o);const y={transform:v};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}u.push(i("path",w(A(A({d:d},zi(f.paint)),Ci(f.isMissing)),{animate:y}),[]))}return u}(f,c,n,e,r,s,y,m),s)}const b=v(g.at(0)),k=h+p.at(0);return Ri(t,Ii((y?f.filter(t=>{const e=k+t.midBase*b;return e>=0&&e<=c.totalLength}):f).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:ji(c,k+t.midBase*b,t.scale,t.widthEm,m)})),s,l),s)}function Ei(t){var e;const n=no(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 _i=48,Ti=64;function Ni(t,e){const n=b(10,e);return Math.round(t*n)/n}function zi(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 fi)void 0!==t[n]&&(e[n]=t[n]);return e}function Ci(t){return t?{[Pe]:wi}:{}}function Ii(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=li(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},zi(t)),Ci(i)),void 0!==t.animate?{animate:A({},t.animate)}:{}),[]));return o}function Ri(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===ui.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 Di(t,e){return e.alongPath?Mi(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):Pi(t,e)}function Fi(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 Li(t,e,n,r,o,i,a,s){const l=Vi(r,n,o),c=Bi(n,o),u=Gi(i,l),f=Gi(a,c),d=Yi(a),h={type:"path",d:P(e)};return Ki(h,"strokeDasharray",f),Ki(h,"strokeDashoffset",u),Ki(h,"strokeOpacity",d),[h]}var Wi=1;function Vi(t,e,n){const[r]=Ui(n);return n=>e*(-n-r+t)+Wi}function Bi(t,e){const[n,r]=Ui(e),o=r-n+1;return e=>{const n=Y(e[0],0,1),r=Y(e[1],0,1),i=Math.min(n,r),a=Math.max(n,r),s=[0];let l=Wi;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+Wi),s}}function Ui(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Gi(t,e){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:e(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:Be(t),value:e(Ue(t)),easing:Ge(t)})),loop:t.loop}}function Ki(t,e,n){n&&ro(t,e,n)}var qi=10;function Yi(t){const e=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return e(t.value)?{kind:"static",value:0}:void 0;const n=t.keyframes;let r=!1,o=!0;for(const t of n)e(Ue(t))?r=!0:o=!1;if(!r)return;if(o)return{kind:"static",value:0};const i=[];for(let t=0;t<n.length;t++){const r=n[t],o=t>0?n[t-1]:void 0,a=t<n.length-1?n[t+1]:void 0,s=Be(r),l=e(Ue(r)),c=o?l&&e(Ue(o)):l,u=a?l&&e(Ue(a)):l;c&&!u?(i.push({time:s,value:0}),i.push({time:s+qi,value:1})):!c&&u&&(i.push({time:s-qi,value:1}),i.push({time:s,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function Zi(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 Xi(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 Hi(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+=Ji(t,r,r+1);return t.c&&e.length>1&&(n+=Ji(t,e.length-1,0)),n}function Ji(t,e,n){var r,o,i,a;const s=t.v,l=s[e],c=s[n],u=Q(l,null!=(o=null==(r=t.o)?void 0:r[e])?o:l,null!=(a=null==(i=t.i)?void 0:i[n])?a:c,c);return u.ds[u.ds.length-1]}var Qi=.5522847498307936;function $i(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:ae(null==(e=ze(t))?void 0:e.engine),glyphs:null==(n=Re(t))?void 0:n.fonts},o=ho(t);fo(o,r.idMap),mo(o,r,()=>co(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=uo(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.source);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=To(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(),fo(t,e.idMap);const n=[],r=t=>{var e;Wo(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&&Wo(o)&&n++,"use"===o.type&&o.href){const t=uo(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=uo(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=Wo(t);if(!n)continue;const r=n.timeCrop;Vo(t),Bo(t,Ro(n),e),r&&Fo(t,r,e)}}(t,e),t}(ta(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 ta(t,e){t.children&&(t.children=t.children.map(t=>ta(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:c,clone:u,fillGradient:f,strokeGradient:d,textPath:h,text:m}=null!=n?n:{};n&&delete t.effects;let p=t,g=!1;if(null==m?void 0:m.useGlyphs)if(h){const t="string"==typeof h.pathData?h.pathData:void 0,n=function(t,e,n,r,o,i){return e.glyphs?Mi(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.fonts"),null)}(p,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(p=n,g=!0)}else p=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?Pi(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}(p,m,e),g=!0;return g||(p=function(t,e,n){var r;if(!e||"string"!=typeof e.pathData||!e.pathData)return t;const o=co(n,"tpath"),{d:i,startShift:a}=ei(e.pathData,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:Qo(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),ni(s,"startOffset",ti(e.startOffset,a)),ni(s,"textLength",e.textLength),t.children=[s],t}(p,h,e)),p=function(t,e,n){return vo(t,e,n,"fill")}(p,f,e),p=function(t,e,n){return vo(t,e,n,"stroke")}(p,d,e),p=function(t,e){if(!e)return t;const n=e.subPaths===we.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,c,u;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!=(c=t.r)?c:0):Number(null!=(u=t.ry)?u:0);if(!(r>0&&o>0))return;const f=r*Qi,d=o*Qi,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=_r(e);if(!n.length)return;const i={leaf:t,subpaths:[]};for(const t of n){const e=Hi(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=no(e.offset),c="absent"===l.kind?{kind:"static",value:0}:l,u=function(t){const e=no(t);if("animated"!==e.kind)return e;const n=e.keyframes.map(t=>({time:Be(t),value:Ue(t),easing:Ge(t)}));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=Zi(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=Xi(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=Xi(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),f="absent"===u.kind?{kind:"static",value:[0,1]}:u,d=function(t){if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const e=[];for(const n of t.keyframes){const t=Ue(n);"number"==typeof t&&e.push(t)}return e}(c),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=Vi(n,e,r),s=Bi(e,r),l=A({},t);return delete l.effects,Ki(l,"strokeDasharray",Gi(i,s)),Ki(l,"strokeDashoffset",Gi(o,a)),Ki(l,"strokeOpacity",Yi(i)),l}(e.leaf,i,a,h,c,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(...Li(t.leaf,r.subpath,o,i,h,c,f))}m.set(t.leaf,Fi(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,c),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=ho(t);delete l.transform,l.animate&&(delete l.animate.transform,0===Object.keys(l.animate).length&&delete l.animate),delete l.id;const c=[l];for(let t=1;t<i;t++){const n=ho(l),r=zo(e,t),o=r?ao(n,r):n;c.push(o)}const u={type:"g",children:c};return t.id&&(u.id=t.id),void 0!==a&&(u.transform=a),void 0!==s&&(u.animate={transform:s}),u}(p,a,e),p=function(t,e,n,r){if(!e)return t;const o=uo(e.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=co(r,"mask");let a={type:"use",href:"#"+o};if(n)a=xo(a,n,r);else if(Oo(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=io(t,void 0);if(Array.isArray(e.translate)&&a.push(w(A(A({},r),jo(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 c=null==o?void 0:o.loop,u=t=>{const e={keyframes:t};return void 0!==c&&(e.loop=c),e};let f=t;return a.length&&(f={type:"g",animate:{transform:u(a)},children:[f]}),s.length&&(f={type:"g",animate:{transform:u(s)},children:[f]}),l.length&&(f={type:"g",animate:{transform:u(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,c,u,f,d,h;const m=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let p;const g=[];for(;null!==(p=m.exec(t));){const t=p[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);g.push({name:p[1],args:t})}if(!g.length)return;const v=g[g.length-1];if("translate"===v.name)for(let t=g.length-2;t>=0;t--){const u=g[t];if("translate"!==u.name)continue;const f=null!=(e=u.args[0])?e:0,d=null!=(n=u.args[1])?n:0,h=null!=(r=v.args[0])?r:0,m=null!=(o=v.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"===g[e].name){const t=null!=(i=g[e].args[0])?i:0,n=null!=(a=g[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<g.length-1;e++){const t=g[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!=(c=t.args[0])?c: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 g)if("translate"===t.name){const e=null!=(u=t.args[0])?u: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=xo(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Oo(t)}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?To(e,r):void 0,l=s?[...a,s]:a,c=i&&r.maskAncestorChains.get(i)||[];if(!l.length&&!c.length)return t;const u=new Set;for(const t of l)if(t.translateKeyframes)for(const e of t.translateKeyframes)u.add(e.time);for(const t of c)if(t.translateKeyframes)for(const e of t.translateKeyframes)u.add(e.time);if(!(u.size>0)){const e=Mo(l),n=Mo(c),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(u).sort((t,e)=>t-e).map(t=>{const e=Eo(l,t),n=Eo(c,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.pathData))return t;const r=co(n,"clip"),o={type:"path"},i=no(e.pathData);return"absent"!==i.kind&&("static"===i.kind?o.d=wo(i.value):(ro(o,"d",i),void 0!==o.d&&(o.d=wo(o.d)))),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(p,l,e),o?(No(p,u,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=go(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}),c=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(c.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const e={keyframes:c};void 0!==o&&(e.loop=o),t.animate.transform=e}a=!0}}const l=void 0!==(null==e?void 0:e.translate),c=a||l,u=a&&go((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&go((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=po(i.full),r=po(o.full),a=-n[0],s=-n[1],l=r[0]-a,c=r[1]-s;return 0===l&&0===c?{rest:t}:{translate:"translate("+l+","+c+")",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);c?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)||u&&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;c||(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=go(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=ao(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=ao(l,i),l.id=n),l}(p,i,r,o)):p=function(t,e,n,r){return No(t,e,r),ao(t,n)}(p,u,i,e),(null==u?void 0:u.retime)&&(t.effects={clone:{retime:u.retime}}),r&&e.idMap.set(r,p),p}function ea(t,e,n,r,o){const i=1-o,a=i*i*i,s=3*i*i*o,l=3*i*o*o,c=o*o*o;return[a*t[0]+s*e[0]+l*n[0]+c*r[0],a*t[1]+s*e[1]+l*n[1]+c*r[1]]}function na(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=ea(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var ra=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function oa(t,e,n){var r,o;let i=$i(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=Ue(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=Ue(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=>Ke(t)||qe(t)))return;let l="M"+ra(s[0][0])+","+ra(s[0][1]);const c=[];for(let t=0;t<s.length-1;t++){const e=s[t],i=s[t+1],a=null!=(n=qe(o[t]))?n:[0,0],u=null!=(r=Ke(o[t+1]))?r:[0,0],f=[e[0]+a[0],e[1]+a[1]],d=[i[0]+u[0],i[1]+u[1]];l+="C"+ra(f[0])+","+ra(f[1])+","+ra(d[0])+","+ra(d[1])+","+ra(i[0])+","+ra(i[1]),c.push(na(e,f,d,i))}const u=c.reduce((t,e)=>t+e,0);if(!(u>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=c[t-1]);const e={t:Be(o[t]),v:d/u},n=Ge(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[Se];const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n[je]=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=A({},s);delete t[Me.translate],delete t[Me.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:ra(e.anchor[0])+"px "+ra(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=Wr(i,null!=(o=null==(r=ze(i))?void 0:r.duration)?o:B),e===oe.native&&(i=jr(i,null==n?void 0:n.motionPath),i=Hr(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}var ia="setPlaybackRate: rate must be finite and non-zero";function aa(t){return Number.isFinite(t)&&0!==t}function sa(t,e){return t>0?e===1/0?t:t*(e>0?e:1):0}function la(t,e){return Number.isNaN(t)||t<0?0:Number.isFinite(e)?t>e?e:t:Number.isFinite(t)?t:0}function ca(t,e,n){const r=sa(e,n);return r>0&&Number.isFinite(t)?t<=0?0:n===1/0?t%r/r:t>=r?1:t/r:0}function ua(t,e,n){const r=sa(e,n);return r>0&&Number.isFinite(t)?t<=0?0:t>=1?r:t*r:0}function fa(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function da(t,e,n){var r;const o=ze(t)||{},i=Ur(t,oe.js),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||B),c=l&&s?l*(s===1/0?1/0:s):l?(null!=s?s:1)*l:0,u=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,g=-(o.delay||0),v=0,y=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let w=0;const x=()=>{const t=v?(Date.now()-v)*y:0;return g+t},P=()=>{let t=x();return Number.isFinite(c)&&t>c&&(t=c),t<0&&(t=0),t};function S(t){let n=function(){const e=l>0?l:1;let n=0,r=0;l>0?(t=Y(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1),n=Y((t-r*e)/e,0,1)):n=t;const o=u||"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=Kr(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?S(P()):h&&S(0));const j=()=>!!p&&!!e.isConnected()&&(y<0?x()>0:!(Number.isFinite(c)&&P()>=c)),O=t=>{null!==m&&(fa(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=P(),i=x();if(i<0&&y>0)h&&S(0);else{if(y<0&&i<=0)return M(),S(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(y>0&&c&&Number.isFinite(c)&&o>=c)return M(),S(d?c: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}S(o)}})(),O()}))},M=()=>{if(!p)return;let t=x();Number.isFinite(c)&&t>c&&(t=c),g=t,v=0,p=!1,null!==m&&(fa(m),m=null),t>=0?S(t):h&&S(0)},E={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>j(),play:()=>{var t;(()=>{if(!p){if(y>=0)Number.isFinite(c)&&g>=c&&(g=0);else if(g<=0){if(!Number.isFinite(c))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");g=c}b=!1,p=!0,v=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(),g=0,v=0,p=!1,b=!1,S(g),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{((t=!0)=>{var e;g=Number.isFinite(c)?c:P(),v=0,p=!1,null!==m&&(fa(m),m=null),S(d?g:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!aa(t))return void console.warn(ia);let e=x();Number.isFinite(c)&&e>c&&(e=c),t<0!=y<0&&(b=!1),y=t,g=e,p&&(v=Date.now())},getCurrentTime:()=>P(),setCurrentTime:t=>{t=la(t,c),g=t,p&&(v=Date.now()),(!Number.isFinite(c)||t<c)&&(b=!1),S(P())},getCurrentProgress:()=>ca(P(),l,s),setCurrentProgress:t=>{E.setCurrentTime(ua(t,l,s))},destroy:()=>{var t;E.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return E}var ha={document:"document",host:"host",platform:"platform",usage:"usage",internal:"internal"};function ma(t,e){return!!t&&(!0===t||t.includes(e))}function pa(t,e){const n=e?e+" ":"";return{warn:(e,r,o)=>{if(null==t?void 0:t.onWarn)return void t.onWarn({kind:e,message:r,detail:o});if(ma(null==t?void 0:t.silent,e))return;const i=n+e+": "+r;void 0===o?console.warn(i):console.warn(i,o)},error:(e,r)=>{const o=function(t){return"string"==typeof t?new Error(t):t}(r);(null==t?void 0:t.onError)?t.onError({kind:e,message:o.message,error:o}):ma(null==t?void 0:t.silent,e)||console.error(n+e+": "+o.message)}}}var ga=[1,0,0,1,0,0];function va(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 ya=(t,e)=>[1,0,0,1,t,e],ba=(t,e)=>[t,0,0,e,0,0];function ka(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var Aa=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],wa=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function xa(t){let e=ga;t.translate&&(e=va(e,ya(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=va(e,ya(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=va(e,ka(t.rotate))),t.scale&&(e=va(e,ba(t.scale[0],t.scale[1]))),n&&(e=va(e,ya(-t.origin[0],-t.origin[1]))),e}function Pa(t,e,n){return t+(e-t)*n}function Sa(t,e){return null==t?ga:"string"==typeof t?function(t){let e=ga;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=va(e,ya(n[0]||0,n[1]||0)):"scale"===t?e=va(e,ba(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=va(e,ka(n[0])):"skewX"===t?e=va(e,Aa(n[0])):"skewY"===t?e=va(e,wa(n[0])):"matrix"===t&&(e=va(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?xa(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 c=0;for(;c<t.length-1&&(null!=(o=t[c+1].time)?o:0)<e;)c++;const u=t[c],f=t[c+1],d=(e-(null!=(i=u.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=u.time)?s:0)||1),h=u.value||{},m=f.value||{},p={};return h.translate&&m.translate?p.translate=[Pa(h.translate[0],m.translate[0],d),Pa(h.translate[1],m.translate[1],d)]:p.translate=h.translate||m.translate,void 0!==h.rotate&&void 0!==m.rotate?p.rotate=Pa(h.rotate,m.rotate,d):p.rotate=null!=(l=h.rotate)?l:m.rotate,h.scale&&m.scale?p.scale=[Pa(h.scale[0],m.scale[0],d),Pa(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?xa(t.value):"object"!=typeof t||Array.isArray(t)?ga:xa(t)}var ja=new Set(["svg","g","symbol"]),Oa=new Set(["defs","mask","clipPath","title"]);function Ma(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Ma(t,e))}function Ea(t){return null==t?0:Number(t)}function _a(t){return Math.round(100*t)/100+0}function Ta(t,e,n,r,o){var i;const a=t.type||"";if(Oa.has(a))return;const s=va(e,function(t,e){return t.animate&&t.animate.transform?Sa(t.animate.transform,e):void 0!==t.transform?Sa(t.transform,e):ga}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=va(s,ya(Ea(t.x),Ea(t.y)));return void(i?Ta(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}ja.has(a)?null==(i=t.children)||i.forEach(t=>Ta(t,s,n,r,o)):o.push(function(t,e,n){var r,o,i,a,s;const l=null!=(r=t.fill)?r:"",c=null!=(o=t.stroke)?o:"",u=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=_a(function(t,e,n,r){var o,i,a,s,l,c;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 u=e[n],f=e[n+1],d=(r-(null!=(s=u.time)?s:0))/((null!=(l=f.time)?l:0)-(null!=(c=u.time)?c:0)||1);return Pa(u.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(_a).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Ea(t.width)+","+Ea(t.height)+","+Ea(t.x)+","+Ea(t.y);case"ellipse":return Ea(t.rx)+","+Ea(t.ry)+","+Ea(t.cx)+","+Ea(t.cy);case"circle":return Ea(t.r)+","+Ea(t.cx)+","+Ea(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+c+"|sw:"+(Ea(u)||"")+"|o:"+f+"|m:"+d}(t,s,n))}function Na(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=>Na(t,e))}function za(t,e){const n=new Map;Ma(t,n);const r=[];return Ta(t,ga,e,n,r),r.sort()}function Ca(t,e){const n=new Set;Na(t,n),Na(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=za(t,o),i=za(e,o),a=Ia(n,i),s=Ia(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function Ia(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}var Ra=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],Da=["definitions","animateById"],Fa=t=>!!t&&"object"==typeof t&&!Array.isArray(t),La=t=>Fa(t)&&"string"==typeof t.type?t.type:"time",Wa=t=>"scroll"===t||"view"===t;function Va(t,e){const n=Fa(t)?A({},t):{};for(const t of Object.keys(e)){const r=e[t];null!==r?Fa(r)?n[t]=Va(n[t],r):n[t]=r:delete n[t]}return n}function Ba(t,e,n){const r=La(t),o=Fa(e)&&"string"==typeof e.type?String(e.type):r;let i;if(o!==r){const n={};if(Fa(t))for(const e of ee)void 0!==t[e]&&(n[e]=t[e]);i=Va(n,e)}else i=Va(t,e);if(Wa(o)){for(const t of ne)void 0!==i[t]&&(n("animator.timeline."+t+": no slot on a '"+o+"' timeline — dropped"),delete i[t]);"infinite"===i.iterations&&(n("animator.timeline.iterations: 'infinite' cannot map onto a scroll range — dropped"),delete i.iterations)}return i}function Ua(t,e){let n;if("string"==typeof t)try{n=JSON.parse(t)}catch(t){console.warn("timeline override: not valid JSON — ignored",t),n=void 0}else n=null!=t?t:void 0;const{duration:r,delay:o,iterations:i,startOn:a}=e;if(void 0===r&&void 0===o&&void 0===i&&void 0===a)return void 0===n?void 0:{timeline:n};const s=Fa(n)?A({},n):{};return void 0!==r&&(s.duration=r),void 0!==o&&(s.delay=o),void 0!==i&&(s.iterations=i),void 0!==a&&(s.trigger=w(A({},s.trigger),{startOn:a})),{timeline:s}}function Ga(t,e){const n=[],r=t=>n.push(t);if(null===e)return{config:void 0,warnings:n};if(!Fa(e)||0===Object.keys(e).length)return{config:t,warnings:n};const o=Fa(t)?Ra.filter(e=>void 0!==t[e]):[];o.length&&r("animator: the base carries the flat runtime spelling ("+o.join(", ")+"); the patch merges the wire spelling only");const i=Fa(t)?A({},t):{};for(const t of Object.keys(e)){const n=e[t];null!==n?"timeline"!==t?Fa(n)?i[t]=Va(i[t],n):i[t]=n:i.timeline=Fa(n)?Ba(i.timeline,n,r):n:delete i[t]}return{config:i,warnings:n}}function Ka(t,e,n){var r,o;const i=!!(null==n?void 0:n.resetDefaults);if(!t||void 0===e||!(i||null!==e&&Fa(e)&&Object.keys(e).length))return{doc:t,warnings:[]};const a=t,s=Fa(a.animator),l=!s&&Fa(null==(r=a.meta)?void 0:r.animator),c=s?a.animator:l?a.meta.animator:void 0,u=[];s&&Fa(null==(o=a.meta)?void 0:o.animator)&&u.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let f=c;if(i){const t={};for(const e of Da)Fa(c)&&void 0!==c[e]&&(t[e]=c[e]);f=t}const d=Ga(f,null!=e?e:{});return u.push(...d.warnings),d.config===c?{doc:t,warnings:u}:l?{doc:w(A({},a),{meta:w(A({},a.meta),{animator:d.config})}),warnings:u}:{doc:w(A({},a),{animator:d.config}),warnings:u}}var qa=6;function Ya(t){try{return{problems:In(t)}}catch(t){return{problems:[]}}}function Za(t,e,n){const r=null!=n?n:pa(void 0,"[PxAnimator]"),o=[],i=()=>{for(const t of o.splice(0))t()},{startOn:a,outAction:s,scrollIntoViewThreshold:l}=de(e),c=t.getRootElement();if(!c)return r.warn(ha.host,"setupAnimationTriggers: No root element found for animation."),i;let u=!1;const f=()=>{u&&(u=!1,t.setPlaybackRate(1)),t.play()},d=()=>{switch(s){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":u=!0,t.setPlaybackRate(-1),t.play()}};switch(a){case"load":{const t=()=>f();"complete"===document.readyState?t():(window.addEventListener("load",t,{once:!0}),o.push(()=>window.removeEventListener("load",t)));break}case"mouseOver":{let t=!1;const e=()=>{t=!0,f()},n=()=>{t&&d()};c.addEventListener("mouseenter",e),c.addEventListener("mouseleave",n),o.push(()=>{c.removeEventListener("mouseenter",e),c.removeEventListener("mouseleave",n)});break}case"click":{const e=()=>{t.isPlaying()?d():f()};c.addEventListener("click",e),o.push(()=>c.removeEventListener("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;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&t(e)>=l?(n=!0,f()):n&&(n=!1,d())})},{threshold:e});r.observe(c),o.push(()=>r.disconnect());break}}return i}function Xa(t){return"#"+t}function Ha(t,e,n,r){var o;const i=ze(t)||{},a=pa(n,"[PxAnimator]");if(!r)if(t.id){const e=Xa(t.id);(r=document.querySelector(e))||a.warn(ha.host,"createFrameLoopAnimator: No root element found for selector: "+e)}else a.warn(ha.host,"createFrameLoopAnimator: No root element provided");const s=da(t,e||function(t,e){const n=new Set,r=null!=e?e:pa(void 0,"[PxAnimator]");return{isConnected:()=>!t||t.isConnected,setAttribute:(e,o,i)=>{o=q(o);const a=Xa(e),s=(null==t?void 0:t.querySelectorAll(a))||document.querySelectorAll(a);0!==s.length||n.has(a)||(n.add(a),r.warn(ha.host,'setAttribute: No elements found for selector "'+a+'"'));for(let t=0;t<s.length;t++){const e=s[t],n="transform"===o&&"pattern"===e.tagName?"patternTransform":o;e.setAttribute(n,i),V.has(o)&&(e.style[o]=i)}}}}(r,a),n),l=f(u({},s),{getRootElement:()=>r||null});if(tt(i))i.trigger&&a.warn(ha.usage,"scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)");else{const t=Za(l,null!=(o=i.trigger)?o:{},a),e=l.destroy.bind(l);l.destroy=()=>{t(),e()}}return l}function Ja(t,e,n,r){let o=Ue(t);const i=Ge(t),a={offset:e,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let s,l=n;return D.has(n)&&Array.isArray(o)?s=I(o):"transform"!==n||null===o||"object"!=typeof o||Array.isArray(o)?F.has(n)?(Array.isArray(o)&&("translate"===n&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===n&&(o+="deg"),s=n+"("+o+")",l="transform"):s="d"===n?'path("'+(o&&"object"==typeof o&&Array.isArray(o.paths)?o.paths:[]).map(t=>P(t,!0)).join("")+'")':L.has(n)&&"number"==typeof o?100*o+"%":""+o:(s=W(o,{withUnits:!0}),l="transform"),CSS.supports(q(l),s)||r.add(l),l=U(l),a[l]=s,a}function Qa(t,e,n){var r,o,i,a,s;const l=[];for(let c=0;c<e.length;c++){const d=e[c],h=null!=(r=d.t)?r:0;if(h<0){const n=e[c+1];if(n&&(null!=(o=n.t)?o:0)>=0){const e=(0-h)/((null!=(i=n.t)?i:0)-h),r=d.e?T(d.e)(e):e,{right:o}=z(d.e,e);l.push({t:0,v:Rr(t,d.v,n.v,r),e:o})}continue}if(h>n){const r=e[c-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?T(r.e)(o):o,{left:a}=z(r.e,o);l.length>0&&(l[l.length-1]=f(u({},l[l.length-1]),{e:a})),l.push({t:n,v:Rr(t,r.v,d.v,i),e:void 0})}break}l.push(d)}return l}function $a(t,e,n){var r;const o=new Map;for(const[i,a]of Object.entries(t)){const t=n.duration||1,s=Qa(i,a.keyframes||[],t),l=[];for(let n=0;n<s.length;n++){const o=s[n],a=Ja(o,Y((null!=(r=o.t)?r:0)/t,0,1),i,e);0===n&&(a.offset||0)>0&&l.push(f(u({},a),{offset:0})),l.push(a)}l.length>0&&(l[l.length-1].offset||0)<1&&l.push(f(u({},l[l.length-1]),{offset:1})),l.length>0&&o.set(i,l)}return o}function ts(t,e,n,r,o){var i,a;const s=ze(t)||{},l=pa(e,"[PxAnimator]");if(!n)if(t.id){const e=Xa(t.id);(n=document.querySelector(e))||l.warn(ha.host,"createWebApiAnimator: No root element found for selector: "+e)}else l.warn(ha.host,"createWebApiAnimator: No root element provided");const c=Ur(t,oe.native),u=[],f=s.iterations;let d;"number"==typeof f&&(d=f),"infinite"===f&&(d=1/0);const h=new Set;let m=!1,p=!1;(null==c?void 0:c.length)||l.warn(ha.document,"createWebApiAnimator: No animation bindings defined");for(const t of c||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){l.warn(ha.document,"createWebApiAnimator: Empty or unresolved binding",t);continue}const a=Xa(t.id),c=(null==n?void 0:n.querySelectorAll(a))||document.querySelectorAll(a);0===c.length&&l.warn(ha.host,'createWebApiAnimator: No elements found for selector "'+a+'"');const f=$a(r,h,s),g=s.delay&&s.delay>0?s.delay:void 0;let v;if(s.delay&&s.delay<0&&s.duration){const t=-s.delay;v=d===1/0?t%s.duration:Math.min(t,s.duration*(null!=d?d:1))}const y={duration:s.duration,delay:g,fill:null!=(i=s.fill)?i:"forwards",direction:s.direction,iterations:d};for(let t=0;t<c.length;t++){const n=c[t];for(const[,t]of f)if(t.length>0)try{const r=new KeyframeEffect(n,t,y),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;m||(m=!0,null==(t=e.onFinish)||t.call(e))}),(null==e?void 0:e.onRemove)&&(i.onremove=()=>{var t;p||(p=!0,null==(t=e.onRemove)||t.call(e))}),void 0!==v&&(i.currentTime=v),u.push(i)}catch(t){l.warn(ha.internal,"createWebApiAnimator: could not build the animation",t)}}}if(!r&&h.size)return l.warn(ha.platform,"Unsupported CSS attrs: "+[...h].join(", ")),null;const g={isReady:()=>!0,getRootElement:()=>n||null,isPlaying:()=>{var t;return"running"===(null==(t=u[0])?void 0:t.playState)},play:()=>{var t;m=!1,u.forEach(t=>t.play()),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;u.forEach(t=>t.pause()),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;m=!1,u.forEach(t=>t.cancel()),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{var t;for(const e of u)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=>aa(t)?(u.forEach(e=>e.playbackRate=t),g):(l.warn(ha.usage,ia),g),getCurrentTime:()=>{var t,e;const n=null!=(e=null==(t=u[0])?void 0:t.currentTime)?e:null;return null!==n?+n:null},setCurrentTime:t=>{var e;const n=function(t,e){return t>0?e===1/0?1/0:t*(e>0?e:1):0}(null!=(e=s.duration)?e:0,null!=d?d:1),r=n>0?la(t,n):Math.max(0,t);m=!1,u.forEach(t=>{t.currentTime=r})},getCurrentProgress:()=>{var t;const e=g.getCurrentTime();return null===e?null:ca(e,null!=(t=s.duration)?t:0,null!=d?d:1)},setCurrentProgress:t=>{var e;g.setCurrentTime(ua(t,null!=(e=s.duration)?e:0,null!=d?d:1))},destroy:()=>{var t;g.cancel(),u.splice(0,u.length),p||(p=!0,null==(t=null==e?void 0:e.onRemove)||t.call(e))}};if("scroll"===s.timelineSource)s.trigger&&l.warn(ha.usage,"scroll timeline: `animator.trigger` is ignored (triggers do not apply to scroll-driven playback)");else{const t=Za(g,null!=(a=s.trigger)?a:{},l),e=g.destroy.bind(g);g.destroy=()=>{t(),e()}}return o&&u.forEach(t=>t.play()),g}function es(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 ns(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 rs(){return document.scrollingElement||document.documentElement}var os="parent",is="scroller";function as(t,e,n){var r,o;const i=null!=n?n:pa(void 0,"[PxAnimator]"),a=null==e?void 0:e.trim();if(!a)return t;if(a===os){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!=(o=null!=(r=null==e?void 0:e.parentElement)?r:t.parentElement)?o:t}if(a===is)return ns(t,"y")||ns(t,"x")||rs();let s=null;try{s=document.querySelector(a)}catch(e){return i.warn(ha.document,'scroll timeline: subject "'+a+'" is not a valid selector — measuring the SVG itself'),t}return s||(i.warn(ha.host,'scroll timeline: subject "'+a+'" matched no element — measuring the SVG itself'),t)}function ss(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.pinOffset)?n:0;if(!a)return void(r.top=o+"px");const i=function(t){const e=ns(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 c=a?s:null;a&&(c&&window.addEventListener("resize",c),"undefined"!=typeof ResizeObserver&&(l=new ResizeObserver(s),l.observe(t)));let u=null;const f=t.parentElement;return e.pinDistance&&e.pinDistance>0&&f&&(u=document.createElement("div"),u.setAttribute("data-px-pin",""),u.style.height=100*e.pinDistance+"vh",f.insertBefore(u,t),u.appendChild(t)),()=>{c&&window.removeEventListener("resize",c),null==l||l.disconnect(),r.position=o,r.top=i,(null==u?void 0:u.parentElement)&&(u.parentElement.insertBefore(t,u),u.remove())}}function ls(t,e,n){let r,o=e;t.resetOnFinish&&(o=f(u({},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.debugGlobalName&&(window[t.debugGlobalName]=i),i}var cs="http://www.w3.org/2000/svg";function us(t,e,n){if(!t)return null;const r=t,{type:o,children:i,style:c}=r,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})(r,["type","children","style"]),f=u.domType;void 0!==f&&delete u.domType;const d=Re(t)||e,h=function(t,e){var n;if(t)return"string"==typeof t?null==(n=null==e?void 0:e.styles)?void 0:n[t]:t}(c,d);let m;if(i)for(const t of i){const e=us(t,d,n);e&&(m||(m=[]),m.push(e))}const p=function(t,e,n,r,o,i){if(Yn.has(t.toLowerCase()))return(null!=i?i:pa(void 0,"[PxAnimator]")).warn(ha.document,"SVG tag blocked (dangerous): "+t),null;const a=document.createElementNS(cs,t);for(const t in e){const n=er(t,e[t]);void 0!==n&&(Hn.has(t)?a.style[t]=String(n):a.setAttribute(q(t),n))}if(n)for(const t in n)a.style[t]=String(n[t]);if(null==r?void 0:r.length)for(const t of r)a.appendChild(t);else o&&(a.textContent=o);return a}(o||"g",nr(u),h,m,u[xe],n);return p&&void 0!==f&&p.setAttribute("type",f),p}var fs="doc";function ds(t,e,n,r,o,i){const a=pa(n,"[PxAnimator]"),s=Cn(t);for(const t of s)a.warn(ha.document,"effects shape: "+t);if(function(t){const{problems:e}=Ya(t);if(!e.length)return;const n=e.slice(0,qa),r=e.length-n.length;console.warn("[PxAnimator] createAnimator: this document does not match the animation schema in "+e.length+" place"+(1===e.length?"":"s")+".\n"+n.map(t=>" - "+t).join("\n")+(r>0?"\n … and "+r+" more":"")+"\n\nIf you did not author these keys, the usual cause is a build that MANGLES PROPERTY NAMES. An animation document is data loaded at runtime, so renaming the property reads inside the player stops them matching the keys in the JSON, and the animation silently does nothing. Feed the published reserved-name list to your minifier — @pixodesk/svg-animator-web/mangle-reserved.json — see docs/library/minification.md.")}(t),void 0!==o||i){const e=Ka(t,null!=o?o:{},{resetDefaults:!!i});for(const t of e.warnings)a.warn(ha.usage,"timeline override: "+t);t=e.doc}t=oa(t,ae((ze(t)||{}).engine));let l=null;if(r){t=Kn(t);const e="string"==typeof r?document.querySelector(r):r;e&&(l=us(t,void 0,a),l&&e.replaceChildren(l))}const c=function(t,e,n,r){return function(t,e,n,r){const o=ze(t)||{},i=pa(n,"[PxAnimator]");return tt(o)?ls(o,n,n=>{var a;let s=()=>{};if(o.engine!==ie.js&&r){s=ss(r,o.scroll);const e=function(t,e,n){var r,o,i,a;const s=null!=n?n:pa(void 0,"[PxAnimator]");if(!e||!tt(e))return null;const l=e.scroll||{},c=null!=(r=l.kind)?r:"view";if(l.smoothing)return s.warn(ha.platform,"scroll timeline: `smoothing` needs the built-in driver — using the built-in driver instead of the browser timeline"),null;const u=globalThis,f="view"===c,d=f?u.ViewTimeline:u.ScrollTimeline;if("function"!=typeof d)return null;const h=null!=(o=l.axis)?o:"block";let m;try{m=new d(f?{subject:as(t,l.subject,s),axis:h}:{source:"root"===l.source?rs():ns(t,"y")||ns(t,"x")||rs(),axis:h})}catch(t){return s.warn(ha.platform,"scroll timeline: native timeline construction failed — falling back to the player measuring progress itself",t),null}return{timeline:m,rangeStart:es(null==(i=l.range)?void 0:i.start,0,f),rangeEnd:es(null==(a=l.range)?void 0:a.end,1,f)}}(r,o,i);if(e){const i=ts(t,n,r,se(o.engine),e);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{s(),t()},i}}s(),s=()=>{}}const l=(o.engine!==ie.js?ts(t,n,r,se(o.engine)):null)||Ha(t,e,n,r),c=(null==(a=l.getRootElement)?void 0:a.call(l))||r;if(c){s=ss(c,o.scroll);const t=("number"==typeof(null==(u=o)?void 0:u.duration)&&u.duration>0?u.duration:B)*("number"==typeof(null==u?void 0:u.iterations)&&u.iterations>0?u.iterations:1),e=function(t,e,n,r){var o,i;if(!e||!tt(e))return null;const a=null!=r?r:pa(void 0,"[PxAnimator]"),s=e.scroll||{},l=null!=(o=s.kind)?o:"view",c=as(t,s.subject,a),u=ns(t,"y")||ns(t,"x"),f="scroll"===l&&"root"===s.source?rs():u||rs(),d=f===rs(),h=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"}(s.axis,getComputedStyle(f).writingMode),m=()=>{if("scroll"===l)return function(t,e,n){var r,o;const i=e>0?Y(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:Y((i-a)/(s-a),0,1)}("y"===h?f.scrollTop:f.scrollLeft,"y"===h?f.scrollHeight-f.clientHeight:f.scrollWidth-f.clientWidth,s.range);const t=c.getBoundingClientRect();let e,n;if(d)e=0,n="y"===h?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=f.getBoundingClientRect();e="y"===h?t.top:t.left,n="y"===h?f.clientHeight:f.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:Y((o-i)/(a-i),0,1)}(("y"===h?t.top:t.left)-e,"y"===h?t.height:t.width,n,s.range)},p=Math.max(0,null!=(i=s.smoothing)?i:0)/1e3;let g=!1,v=null,y=null,b=0,k=null;const A=()=>{k=null,g||(t=>{if(!p)return void n(t);if(null===v)return v=t,void n(t);if(null!==y)return;b=0;const e=t=>{if(y=null,g)return;const r=b?Math.min(.1,(t-b)/1e3):1/60;b=t;const o=m(),i=1-Math.exp(-r/p);v+=(o-v)*i,Math.abs(o-v)<.001&&(v=o),n(v),v!==o&&(y=requestAnimationFrame(e))};y=requestAnimationFrame(e)})(m())},w=()=>{g||null!==k||(k=requestAnimationFrame(A))},x=d?window:f;let P;x.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w,{passive:!0}),"undefined"!=typeof ResizeObserver&&(P=new ResizeObserver(w),P.observe(c),c!==t&&P.observe(t),d||P.observe(f));const S={destroy:()=>{g||(g=!0,x.removeEventListener("scroll",w),window.removeEventListener("resize",w),null==P||P.disconnect(),null!==k&&(cancelAnimationFrame(k),k=null),null!==y&&(cancelAnimationFrame(y),y=null))},refresh:()=>{g||(v=m(),n(v))}};return S.refresh(),S}(c,o,e=>l.setCurrentTime(e*t),i);if(e){const t=l.destroy.bind(l);l.destroy=()=>{e.destroy(),s(),t()}}}else i.warn(ha.host,"scroll timeline: no root element to observe — animation will stay at frame 0");var u;return l}):ls(o,n,n=>o.engine===ie.js?Ha(t,e,n,r):ts(t,n,r,se(o.engine))||Ha(t,e,n,r))}(t,e,n,r)}(t,e,n,l);if(r&&l){const t=l,e=c.destroy.bind(c);c.destroy=()=>{e(),t.remove()}}return c}function hs(t){const{src:e,doc:n,adapter:r,container:o,resetTimeline:i}=t,a=function(t){const{timeline:e,duration:n,delay:r,iterations:o,startOn:i}=t;return Ua(e,{duration:n,delay:r,iterations:o,startOn:i})}(t),s=function(t){const{onPlay:e,onPause:n,onCancel:r,onFinish:o,onRemove:i,onStop:a,onWarn:s,onError:l,silent:c}=null!=t?t:{},u=t=>t||a?()=>{null==t||t(),null==a||a()}:void 0;return{onPlay:e,onPause:u(n),onCancel:u(r),onFinish:u(o),onRemove:u(i),onWarn:s,onError:l,silent:c}}(t);if(void 0!==n&&void 0!==e)throw new Error("createAnimator: provide either `src` or `doc`, not both");if(void 0===n&&void 0===e)throw new Error("createAnimator: either `src` or `doc` is required");if(void 0!==n)return ds(n,r,s,o,a,i);let l=null,c=[],u=!1;const f=t=>{l?t(l):c&&c.push(t)},d=pa(s,"[PxAnimator]");return fetch(e).then(t=>t.json()).then(t=>{if(!u)if(Ne(t)){l=ds(t,r,s,o,a,i);const e=c;c=null,null==e||e.forEach(t=>t(l))}else d.error(ha.document,'createAnimator: invalid animation document format at "'+e+'"')}).catch(t=>{var n;c=null,d.error(ha.host,'createAnimator: failed to load "'+e+'" — '+(null!=(n=null==t?void 0:t.message)?n:String(t)))}),{isReady:()=>!!l,getRootElement:()=>l?l.getRootElement():null,isPlaying:()=>(null==l?void 0:l.isPlaying())||!1,play:()=>{f(t=>t.play())},pause:()=>{f(t=>t.pause())},cancel:()=>{f(t=>t.cancel())},finish:()=>{f(t=>t.finish())},setPlaybackRate:t=>{f(e=>e.setPlaybackRate(t))},getCurrentTime:()=>l?l.getCurrentTime():null,setCurrentTime:t=>{f(e=>e.setCurrentTime(t))},getCurrentProgress:()=>l?l.getCurrentProgress():null,setCurrentProgress:t=>{f(e=>e.setCurrentProgress(t))},destroy:()=>{u=!0,c=null,null==l||l.destroy()}}}function ms(t){const e=document.querySelectorAll("["+qt+"]");for(let n=0;n<e.length;n++){const r=e[n];if(!r[Yt]){const e=r.getAttribute(qt);e&&(r[Yt]=hs(f(u({},t),{src:e,container:r})))}}}