@pixodesk/svg-animator-core 1.0.40 → 1.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var 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=Math.pow,u=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,f=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&u(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&u(t,n,e[n]);return t},d=(t,e)=>n(t,o(e)),h=(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},p={};((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(p,{BASELINE_PLAYER_VERSION:()=>$,COLOR_ATTR_NAMES:()=>Mn,CSS_ONLY_STYLE_PROPS:()=>Xn,DEFAULT_DURATION_MS:()=>Rn,DISALLOWED_SVG_TAGS_LOWER:()=>Kn,LOOP_JUMP_SHIFT_MS:()=>Sr,PCT_BASED_ATTR_NAMES:()=>En,PLAYER_WIRE_STEPS:()=>tt,PLAYER_WIRE_VERSION:()=>Y,PX_ANIM_ATTR_NAME:()=>ct,PX_ANIM_SRC_ATTR_NAME:()=>lt,PX_PLAYER_SCHEMA_VERSION:()=>V,PX_RATE_REJECTED:()=>la,PX_TRANSFORM_PART_KEYS:()=>Xt,PX_TRIGGER_DEFAULTS:()=>jt,PX_UNKNOWN_KEY_ERROR:()=>m,PxAlongPathMode:()=>yt,PxAnimatedSvgDocumentSchema:()=>an,PxAnimatorConfigSchema:()=>De,PxAttrValueSchema:()=>Ie,PxBezierPathSchema:()=>sn,PxClipPathEffectSchema:()=>Be,PxCloneEffectSchema:()=>Ye,PxCloneWithout:()=>It,PxControlMode:()=>Mt,PxDefsSchema:()=>we,PxDiagnosticKind:()=>ya,PxEffectsSchema:()=>$e,PxElementAnimationSchema:()=>be,PxFillGradientEffectSchema:()=>Ze,PxFillMode:()=>at,PxFinishAction:()=>dt,PxGradientSpreadMethod:()=>Zt,PxGradientStopSchema:()=>qe,PxGradientType:()=>Jt,PxKeyframeSchema:()=>le,PxKeyframeValueSchema:()=>se,PxLengthAdjust:()=>Vt,PxLoopDirection:()=>Rt,PxLoopRepeatAt:()=>Nt,PxLoopSchema:()=>pe,PxMaskType:()=>zt,PxMaskedByEffectSchema:()=>We,PxNodeBase:()=>nn,PxNodeSchema:()=>rn,PxOutAction:()=>ft,PxPathOverflow:()=>Ct,PxPinAlign:()=>gt,PxPlaybackDirection:()=>st,PxPropertyAnimationSchema:()=>me,PxRepeaterEffectSchema:()=>Ue,PxRetimeEffectSchema:()=>Ke,PxScrollAxis:()=>pt,PxScrollKind:()=>ht,PxScrollPhase:()=>vt,PxScrollRangePointSchema:()=>Pe,PxScrollRangeSchema:()=>Se,PxScrollSchema:()=>Oe,PxScrollSource:()=>mt,PxStartOn:()=>ut,PxStrokeTrimEffectSchema:()=>Ge,PxStrokeTrimSubPaths:()=>Ut,PxSvgNodeExtra:()=>on,PxTextEffectSchema:()=>Qe,PxTextPathEffectSchema:()=>He,PxTextPathMethod:()=>Ft,PxTextPathSpacing:()=>Lt,PxTimelineEngine:()=>xt,PxTimelineEngineExtra:()=>wt,PxTimelineSchema:()=>Re,PxTransformByEffectSchema:()=>Le,PxTransformPartsSchema:()=>ge,PxTransformValueSchema:()=>ve,PxTriggerSchema:()=>ke,PxUnits:()=>Dt,STYLE_ATTR_NAMES:()=>Nn,TEXT_CONTENT_ATTR:()=>Wt,TRANSFORM_FN_NAMES:()=>_n,WIRE_VERSION_KEY:()=>F,WireStepKind:()=>Q,WireVersionRelation:()=>W,applyAnimatorConfig:()=>_a,applyPlayerEffects:()=>Zi,applyWireSteps:()=>et,bezierToSvgPath:()=>pn,calcAnimationValues:()=>Br,camelCaseToKebabWordIfNeeded:()=>Cn,clamp:()=>Vn,clampSeekMs:()=>da,compareWireVersion:()=>J,composeTransformParts:()=>Tn,controlModeTakesOverTrigger:()=>Et,convertPlayerDocument:()=>nt,createBasicFrameLoopAnimator:()=>va,createDiagnostics:()=>ba,createPathSampler:()=>Go,createRunClock:()=>ma,cubicBezier:()=>An,deepClone:()=>fn,describeSchema:()=>D,diagnoseDocument:()=>Ta,diffFieldUniverse:()=>us,diffInEffect:()=>Qa,downgradePlayerDocument:()=>it,extendedPathForBrowser:()=>Zo,flattenAnimatorTimeline:()=>ee,foldTimelineOverride:()=>ja,formatWireVersion:()=>K,generateNewIds:()=>dn,generateUniqueId:()=>un,getAnimatorConfig:()=>Qt,getBindings:()=>oe,getChildren:()=>ie,getDefs:()=>re,getNormalizedBindings:()=>Ur,getNormalizedProps:()=>tr,interpolateValue:()=>Rr,isNativeForced:()=>St,isPxElementFileFormat:()=>Ht,isPxElementFileFormatDeep:()=>ln,isScrollTimeline:()=>ts,isValidPlaybackRate:()=>ca,kebabToCamelCaseWord:()=>zn,kfEasing:()=>fe,kfValue:()=>ue,layoutGlyphTextChars:()=>ki,materializeAllInTree:()=>sa,materializeGlyphText:()=>Ni,materializeGlyphTextAlongPath:()=>wi,materializeMotionPathInPropAnim:()=>ur,mayUseNativeScrollTimeline:()=>Ot,mergeAnimatorConfig:()=>Ma,mergeStaticTransformIntoAnimDef:()=>Lr,nestAnimatorTimeline:()=>ne,parseWireVersion:()=>G,planSchemaRelease:()=>fs,progressSpanMs:()=>fa,progressToTimeMs:()=>pa,px:()=>C,readWireVersion:()=>Z,releaseLogProblems:()=>ds,reportDocumentDiagnostics:()=>Na,resolveControlMode:()=>_t,resolveTimelineEngine:()=>Pt,resolveTrigger:()=>Tt,reverseEasing:()=>Sn,sanitizeAttributeValue:()=>$n,schemaFieldUniverse:()=>ls,schemaKeys:()=>z,scrollOffsetProgress:()=>as,scrollPhaseInterval:()=>ns,scrollResolveAxis:()=>ss,scrollTotalDurationMs:()=>es,scrollViewProgress:()=>is,seekCeilingMs:()=>ua,splitEasing:()=>Pn,subdivideCubicBezier:()=>wn,timeToProgress:()=>ha,toRGBA:()=>On,validateDocument:()=>en,validateNodeEffects:()=>tn,versionAdvice:()=>H}),module.exports=(t=p,((t,n,o,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let l of i(n))s.call(t,l)||l===o||e(t,l,{get:()=>n[l],enumerable:!(a=r(n,l))||a.enumerable});return t})(e({},"__esModule",{value:!0}),t));var m="unexpected extra key";function g(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var v=class{_canSanitize(t){return this.isValid(t)}optional(){return new y(this)}},y=class extends v{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)}},b=class extends v{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(g(null!=n?n:[])+": expected string, got "+typeof t),!1)}},k=class extends v{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(g(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},A=class extends v{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(g(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},x=class extends v{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(g(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},w=class extends v{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(g(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},P=class extends v{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=g(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))}},S=class extends v{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(g(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)}},O=class extends v{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(g(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(g(o)+": "+m),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},j=class extends v{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=f({},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(g(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)}},M=class extends v{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(g(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)}},_=class extends v{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(g(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)}},E=class extends v{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},T=class extends v{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return void 0!==t||(null==e||e.errors.push(g(null!=n?n:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}},N=class extends v{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)}},R=class extends v{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(g(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 z(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function D(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 I,C={string:(t="")=>new b(t),number:(t=0)=>new k(t),boolean:(t=!1)=>new A(t),literal:t=>new x(t),enum:(t,e)=>new w(t,e),union:(t,e)=>new P(t,e),discriminatedUnion:(t,e)=>new S(t,e),object:t=>new O(t),openObject:(t,e)=>new j(t,e),extendedObject:(t,e)=>new O(f(f({},t._shape),e)),array:t=>new M(t),record:t=>new _(t),any:()=>new E,defined:()=>new T,tuple:t=>new R(t),lazy:(t,e)=>new N(t,e)},V="1.1",F="version",L="animator",U="meta",W=(t=>(t.unstamped="unstamped",t.same="same",t.older="older",t.newer="newer",t.otherGeneration="otherGeneration",t))(W||{}),B=/^(\d+)\.(\d+)(?:\.(\d+))?$/;function G(t){if("string"!=typeof t)return;const e=B.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 K(t){return t.a+"."+t.b+"."+t.c}var Y=null!=(I=G(V))?I:{a:1,b:1,c:0};function q(t){if(!t||"object"!=typeof t)return;const e=X(t,L);if(e)return e;const n=X(t,U);return n?X(n,L):void 0}function X(t,e){const n=t[e];return n&&"object"==typeof n&&!Array.isArray(n)?n:void 0}function Z(t){const e=q(t);return e?G(e[F]):void 0}function J(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 H(t,e,n,r){if(!e)return;const o=r?"player":"editor",i="written for schema "+K(e)+", this "+o+" reads "+K(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 Q=(t=>(t.additive="additive",t.converted="converted",t))(Q||{}),$="1.1",tt=[];function et(t,e){const n=Z(t),r=J(n,e.target,e.readerReadsEditorPart);if(!n||"older"!==r)return{doc:t,from:n,relation:r,applied:[],advice:H(r,n,e.target,!e.readerReadsEditorPart)};const o=[];for(const t of e.steps){const r=G(t.to);r&&("older"===J(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=rt(t),a=[];for(const t of o)try{t.up(i),a.push(t)}catch(t){break}return a.length?(ot(i,e.target,e.readerReadsEditorPart),{doc:i,from:n,relation:r,applied:a}):{doc:t,from:n,relation:r,applied:[]}}function nt(t){return et(t,{steps:tt,target:Y,readerReadsEditorPart:!1})}function rt(t){const e=globalThis.structuredClone;return e?e(t):JSON.parse(JSON.stringify(t))}function ot(t,e,n){const r=q(t);if(!r)return;const o=G(r[F]);r[F]=K({a:e.a,b:e.b,c:n?e.c:o?o.c:0})}function it(t,e){return function(t,e){const n=Z(t);if(!n)return{ok:!1,blocking:[],reason:"The document carries no version, so there is nothing to convert down from."};const r=J(n,e.target,e.readerReadsEditorPart);if("otherGeneration"===r)return{ok:!1,blocking:[],reason:"Schema "+K(n)+" and "+K(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=G(t.to);r&&"newer"===J(r,e.target,e.readerReadsEditorPart)&&"newer"!==J(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 "+K(e.target)+": "+i.map(t=>t.from+" → "+t.to+" ("+t.reason+")").join("; ")+" cannot be undone."};const a=rt(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 ot(a,e.target,e.readerReadsEditorPart),{ok:!0,doc:a,applied:s}}(t,{steps:tt,target:e,readerReadsEditorPart:!1})}var at={forwards:"forwards",backwards:"backwards",both:"both",none:"none"},st={normal:"normal",reverse:"reverse",alternate:"alternate",alternateReverse:"alternate-reverse"},lt="data-px-animation-src",ct="_px_animator",ut={load:"load",mouseOver:"mouseOver",click:"click",scrollIntoView:"scrollIntoView",programmatic:"programmatic"},ft={continue:"continue",pause:"pause",reset:"reset",reverse:"reverse"},dt={hold:"hold",reset:"reset"},ht={view:"view",scroll:"scroll"},pt={block:"block",inline:"inline",x:"x",y:"y"},mt={nearest:"nearest",root:"root"},gt={top:"top",center:"center",bottom:"bottom"},vt={cover:"cover",contain:"contain",entry:"entry",exit:"exit",entryCrossing:"entry-crossing",exitCrossing:"exit-crossing"},yt={sampled:"sampled",offsetPath:"offsetPath"},bt=["duration","iterations","engine","frameRate"],kt=["trigger","delay","fillMode","direction"],At=[...bt,...kt,"fill","resetOnFinish","timelineSource","scroll"],xt={native:"native",js:"js"},wt=d(f({},xt),{auto:"auto"});function Pt(t){return t===wt.js?xt.js:xt.native}function St(t){return t===wt.native}function Ot(t){return t!==wt.js}var jt={startOn:"load",outAction:"continue",scrollIntoViewThreshold:0},Mt={static:"static",fixedTime:"fixedTime",play:"play",autoplay:"autoplay"};function _t(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:Mt.fixedTime,warnings:o}):n?(r&&o.push(i("play/pause","autoplay","play/pause")),{mode:Mt.play,warnings:o}):r?{mode:Mt.autoplay,warnings:o}:{mode:Mt.static,warnings:o}}function Et(t){return t!==Mt.autoplay}function Tt(t){var e,n,r;return{startOn:null!=(e=null==t?void 0:t.startOn)?e:jt.startOn,outAction:null!=(n=null==t?void 0:t.outAction)?n:jt.outAction,scrollIntoViewThreshold:null!=(r=null==t?void 0:t.scrollIntoViewThreshold)?r:jt.scrollIntoViewThreshold}}var Nt={start:"start",end:"end"},Rt={normal:"normal",alternate:"alternate"},zt={luminance:"luminance",alpha:"alpha"},Dt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},It={translate:"translate"},Ct={clip:"clip",extend:"extend"},Vt={spacing:"spacing",spacingAndGlyphs:"spacingAndGlyphs"},Ft={align:"align",stretch:"stretch"},Lt={auto:"auto",exact:"exact"},Ut={separate:"separate",combined:"combined"},Wt="textContent",Bt="class",Gt="transform",Kt="offsetDistance",Yt=new Set(["type","children","animator","meta","animate","effects",Wt]),qt={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},Xt=[qt.translate,qt.rotate,qt.scale,qt.origin],Zt={pad:"pad",reflect:"reflect",repeat:"repeat"},Jt={linear:"linear",radial:"radial"};function Ht(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function Qt(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=$t.get(n);if(r)return r;const o=n,i=At.filter(t=>void 0!==o[t]),a=i.length?f({},o):n;for(const t of i)delete a[t];const s=ee(a);return $t.set(n,s),s}var $t=new WeakMap,te=new WeakMap;function ee(t){const e=t.timeline;if(null==e||"object"!=typeof e)return t;const n=te.get(t);if(n)return n;const r=t,{timeline:o}=r,i=h(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=f({},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=h(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 te.set(t,i),i}function ne(t){if(!t||void 0!==t.timeline)return t;const e=t,{timelineSource:n,scroll:r,trigger:o,delay:i,iterations:a,direction:s,fill:l,resetOnFinish:c,duration:u,engine:p,frameRate:m}=e,g=h(e,["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","engine","frameRate"]);if("scroll"===n){const t={type:(v=null==r?void 0:r.kind,"scroll"===v?"scroll":"view")};if(void 0!==p&&(t.engine=p),void 0!==m&&(t.frameRate=m),void 0!==u&&(t.duration=u),"number"==typeof a&&(t.iterations=a),r){void 0!==r.axis&&(t.axis=r.axis),void 0!==r.source&&(t.source=r.source),void 0!==r.subject&&(t.subject=r.subject),void 0!==r.smoothing&&(t.smoothing=r.smoothing),void 0!==r.range&&(t.range=r.range);void 0!==r.pinAlign||void 0!==r.pinOffset||void 0!==r.pinDistance?t.pin=f(f(f({},void 0!==r.pinAlign?{align:r.pinAlign}:{}),void 0!==r.pinOffset?{offset:r.pinOffset}:{}),void 0!==r.pinDistance?{distance:r.pinDistance}:{}):void 0!==r.pin&&(t.pin=r.pin)}return d(f({},g),{timeline:t})}var v;const y={};if(void 0!==p&&(y.engine=p),void 0!==m&&(y.frameRate=m),void 0!==u&&(y.duration=u),void 0!==o||c){const t=f({},o||{});c&&(t.finishAction="reset"),y.trigger=t}return void 0!==i&&(y.delay=i),void 0!==a&&(y.iterations=a),void 0!==s&&(y.direction=s),void 0!==l&&(y.fillMode=l),Object.keys(y).length>0?d(f({},g),{timeline:y}):g}function re(t){var e;if(t)return null==(e=Qt(t))?void 0:e.definitions}function oe(t){var e;if(t)return null==(e=Qt(t))?void 0:e.bindings}function ie(t){return null==t?void 0:t.children}var ae=C.union([C.string(),C.tuple([C.number(),C.number(),C.number(),C.number()])]),se=C.union([C.string(),C.number(),C.array(C.number()),C.object({pathData:C.string()}),C.lazy(()=>C.array(qe),[]),C.lazy(()=>ge,{})]),le=C.object({time:C.number().optional(),value:se.optional(),easing:ae.optional(),tangentOut:C.tuple([C.number(),C.number()]).optional(),tangentIn:C.tuple([C.number(),C.number()]).optional()}),ce=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},fe=t=>{var e;return null!=(e=t.easing)?e:t.e},de=t=>t.tangentIn,he=t=>t.tangentOut,pe=C.object({segmentCount:C.number().optional(),repeatAt:C.enum([Nt.start,Nt.end]).optional(),direction:C.enum([Rt.normal,Rt.alternate]).optional()}),me=C.object({value:se.optional(),keyframes:C.array(le).optional(),loop:C.union([pe,C.boolean()]).optional(),autoOrient:C.boolean().optional(),alongPathMode:C.enum([yt.sampled,yt.offsetPath]).optional()}),ge=C.object({translate:C.tuple([C.number(),C.number()]).optional(),rotate:C.number().optional(),skew:C.number().optional(),scale:C.tuple([C.number(),C.number()]).optional(),origin:C.tuple([C.number(),C.number()]).optional()}),ve=C.union([C.string(),ge,C.object({value:ge}),me]),ye=C.record(me),be=C.union([C.string(),C.array(C.union([C.string(),ye])),ye]),ke=C.object({startOn:C.enum([ut.load,ut.mouseOver,ut.click,ut.scrollIntoView,ut.programmatic],jt.startOn).optional(),outAction:C.enum([ft.continue,ft.pause,ft.reset,ft.reverse],jt.outAction).optional(),finishAction:C.enum([dt.hold,dt.reset]).optional(),scrollIntoViewThreshold:C.number().optional()}),Ae=C.object({width:C.number(),pathData:C.string()}),xe=C.object({fontFamily:C.string(),fontStyle:C.string(),ascent:C.number(),unitsPerEm:C.number(),glyphs:C.record(Ae)}),we=C.object({easings:C.record(C.tuple([C.number(),C.number(),C.number(),C.number()])).optional(),animations:C.record(ye).optional(),fonts:C.record(xe).optional()}),Pe=C.object({phase:C.enum([vt.cover,vt.contain,vt.entry,vt.exit,vt.entryCrossing,vt.exitCrossing]).optional(),fraction:C.number().optional()}),Se=C.object({start:Pe.optional(),end:Pe.optional()}),Oe=C.object({kind:C.enum([ht.view,ht.scroll]).optional(),axis:C.enum([pt.block,pt.inline,pt.x,pt.y]).optional(),source:C.enum([mt.nearest,mt.root]).optional(),subject:C.string().optional(),smoothing:C.number().optional(),pin:C.boolean().optional(),pinAlign:C.enum([gt.top,gt.center,gt.bottom]).optional(),pinOffset:C.number().optional(),pinDistance:C.number().optional(),range:Se.optional()}),je=C.object({align:C.enum([gt.top,gt.center,gt.bottom]).optional(),offset:C.number().optional(),distance:C.number().optional()}),Me=C.enum([wt.auto,wt.native,wt.js]).optional(),_e=C.object({type:C.literal("time").optional(),engine:Me,frameRate:C.number().optional(),duration:C.number().optional(),trigger:ke.optional(),delay:C.number().optional(),iterations:C.union([C.number(),C.literal("infinite")]).optional(),fillMode:C.enum([at.forwards,at.backwards,at.both,at.none]).optional(),direction:C.enum([st.normal,st.reverse,st.alternate,st.alternateReverse]).optional()}),Ee={duration:C.number().optional(),iterations:C.number().optional(),engine:Me,frameRate:C.number().optional(),axis:C.enum([pt.block,pt.inline,pt.x,pt.y]).optional(),source:C.enum([mt.nearest,mt.root]).optional(),subject:C.string().optional(),smoothing:C.number().optional(),pin:C.union([C.boolean(),je]).optional(),range:Se.optional()},Te=C.object(f({type:C.literal("scroll")},Ee)),Ne=C.object(f({type:C.literal("view")},Ee)),Re=C.discriminatedUnion("type",[_e,Te,Ne]),ze=C.object({target:C.string(),animateWith:C.array(C.string())}),De=C.object({timeline:Re.optional(),definitions:we.optional(),bindings:C.array(ze).optional(),debugGlobalName:C.string().optional(),version:C.string().optional()}),Ie=C.union([C.string(),C.number(),C.array(C.number()),C.object({value:C.defined()}),ge]),Ce=C.union([C.number(),me,C.object({value:C.number()})]),Ve=C.union([C.tuple([C.number(),C.number()]),me,C.object({value:C.tuple([C.number(),C.number()])})]),Fe=C.union([C.string(),me,C.object({value:C.string()})]),Le=C.object({translate:Ve.optional(),rotate:Ce.optional(),scale:Ve.optional(),skew:Ce.optional(),origin:Ve.optional()}),Ue=C.object({copies:C.number().optional(),translate:Ve.optional(),rotate:Ce.optional(),skew:Ce.optional(),scale:Ve.optional(),origin:Ve.optional()}),We=C.object({source:C.string().optional(),maskType:C.enum([zt.luminance,zt.alpha]).optional(),maskUnits:C.enum([Dt.userSpaceOnUse,Dt.objectBoundingBox]).optional(),maskContentUnits:C.enum([Dt.userSpaceOnUse,Dt.objectBoundingBox]).optional(),x:C.number().optional(),y:C.number().optional(),width:C.number().optional(),height:C.number().optional()}),Be=C.object({pathData:Fe.optional()}),Ge=C.object({offset:Ce.optional(),range:Ve.optional(),subPaths:C.enum([Ut.separate,Ut.combined]).optional()}),Ke=C.object({start:C.number().optional(),stretch:C.number().optional(),timeCrop:C.tuple([C.number(),C.number()]).optional()}),Ye=C.object({without:C.enum([It.translate]).optional(),source:C.string().optional(),retime:Ke.optional()}),qe=C.object({offset:C.number(),color:C.string()}),Xe=C.union([C.array(qe),C.object({value:C.array(qe)}),me]),Ze=C.object({type:C.enum([Jt.linear,Jt.radial]),start:Ve.optional(),end:Ve.optional(),center:Ve.optional(),radius:Ce.optional(),focal:Ve.optional(),stops:Xe.optional(),gradientUnits:C.enum([Dt.userSpaceOnUse,Dt.objectBoundingBox]).optional(),spreadMethod:C.enum([Zt.pad,Zt.reflect,Zt.repeat]).optional(),gradientTransform:C.string().optional()}),Je=Ze,He=C.object({pathData:C.string(),pathOverflow:C.enum([Ct.clip,Ct.extend]).optional(),lengthAdjust:C.enum([Vt.spacing,Vt.spacingAndGlyphs]).optional(),method:C.enum([Ft.align,Ft.stretch]).optional(),spacing:C.enum([Lt.auto,Lt.exact]).optional(),startOffset:Ce.optional(),textLength:Ce.optional()}),Qe=C.object({useGlyphs:C.boolean().optional()}),$e=C.object({transformBy:Le.optional(),repeater:Ue.optional(),maskedBy:We.optional(),clipPath:Be.optional(),strokeTrim:Ge.optional(),clone:Ye.optional(),fillGradient:Ze.optional(),strokeGradient:Je.optional(),textPath:He.optional(),text:Qe.optional()});function tn(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!$e.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 en(t,e){var n;const r=!1!==(null==e?void 0:e.strict),o={errors:[],warnings:[],strict:r},i=an.isValid(t,o,["root"])?[]:[...o.errors];if(t&&"object"==typeof t){for(const e of tn(t,{strict:r}))i.includes(e)||i.push(e);const e=null==(n=Qt(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=Qt(t))?void 0:e.version;return void 0===n||void 0!==G(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 nn=C.openObject({type:C.string(),domType:C.string().optional(),textContent:C.string().optional(),id:C.string().optional(),meta:C.any().optional(),effects:$e.optional(),animate:be.optional(),style:C.record(C.union([C.string(),C.number()])).optional()},Ie),rn=C.openObject(d(f({},nn._shape),{children:C.lazy(()=>C.array(rn),[]).optional()}),Ie),on=C.object({width:C.union([C.number(),C.string()]).optional(),height:C.union([C.number(),C.string()]).optional(),viewBox:C.string().optional(),animator:De.optional()}),an=C.openObject(d(f(f({},nn._shape),on._shape),{type:C.literal("svg"),children:C.array(rn).optional()}),Ie),sn=C.object({v:C.array(C.array(C.number())),i:C.array(C.array(C.number())).optional(),o:C.array(C.array(C.number())).optional(),c:C.boolean().optional()});function ln(t){const e=en(t,{strict:!1});return{valid:0===e.length,errors:e}}var cn=0;function un(){return"_px_"+Date.now().toString(36)+(++cn).toString(36)+Math.random().toString(36).substring(2,6)}function fn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>fn(t));const e=t,n={};for(const t of Object.keys(e))n[t]=fn(e[t]);return n}function dn(t){var e;const n=fn(t),r=new Map,o=new Set(["href","xlink:href"]),i=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),a=new Set(["targetId","boundElementId"]),s=(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();r.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)}}(n),function t(e,n){if(e&&"object"==typeof e)for(const[l,c]of Object.entries(e))if("children"!==l)if("string"==typeof c)if(o.has(l)&&c.startsWith("#")){const t=c.slice(1),n=r.get(t);n&&(e[l]="#"+n)}else if(i.has(l))e[l]=hn(c,r);else if(a.has(l)||s(l,n)){const t=c.startsWith("#"),n=r.get(t?c.slice(1):c);n&&(e[l]=t?"#"+n:n)}else c.includes("url(#")&&(e[l]=hn(c,r));else if("style"===l&&"object"==typeof c&&null!==c)for(const[t,e]of Object.entries(c))"string"==typeof e&&(c[t]=hn(e,r));else"object"==typeof c&&null!==c&&t(c,l);else if(Array.isArray(c))for(const e of c)t(e)}(n);const l=null==(e=n.animator)?void 0:e.bindings;if(Array.isArray(l)){const t=l.map(t=>{var e;const n=t.target.startsWith("#"),o=n?t.target.slice(1):t.target,i=null!=(e=r.get(o))?e:o;return d(f({},t),{target:n?"#"+i:i})});n.animator=d(f({},n.animator),{bindings:t})}return n}function hn(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}function pn(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("L"+f[0]+","+f[1]):u.push("C"+i[0]+","+i[1]+","+c[0]+","+c[1]+","+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 mn(t,e,n){return t+(e-t)*n}function gn(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=mn(t[i]||0,e[i]||0,n);return r}function vn(t,e,n){return[mn(t[0]||0,e[0]||0,n),mn(t[1]||0,e[1]||0,n),mn(t[2]||0,e[2]||0,n),mn(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function yn(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(bn(t[i],e[i],n));return o}function bn(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),p=[],m=[],g=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];p.push(gn(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;m.push(gn(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(gn(b,k,d))}return{v:p,i:m.length?m:void 0,o:g.length?g:void 0,c:null!=(f=t.c)?f:e.c}}function kn(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 An(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,s=1-i-a;return function(t){return n=kn(e,r,t),((s*n+a)*n+i)*n;var n}}function xn(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function wn(t,e,n,r,o){const i=xn(t,e,o),a=xn(e,n,o),s=xn(n,r,o),l=xn(i,a,o),c=xn(a,s,o),u=xn(l,c,o);return{left:[t,i,l,u],right:[u,c,s,r]}}function Pn(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=kn(n,o,e),s=[n,r],l=[o,i],{left:c,right:u}=wn([0,0],s,l,[1,1],a),f=c[3][0],d=c[3][1];let h,p;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 m=1-f,g=1-d;return m>1e-9&&Math.abs(g)>1e-9&&(p=[(u[1][0]-f)/m,(u[1][1]-d)/g,(u[2][0]-f)/m,(u[2][1]-d)/g]),{left:h,right:p}}function Sn(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function On(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 jn(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 Mn=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),_n=new Set(["translate","rotate","scale","skew"]),En=new Set(["offset-distance","offsetDistance"]);function Tn(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 Nn=new Set(["offset-distance","offsetDistance"]),Rn=1e3;function zn(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function Dn(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var In=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 Cn(t){return In.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Vn(t,e,n){return Math.max(e,Math.min(t,n))}function Fn(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 Ln=1e-4;function Un(t,e,n,r,o){const i=Wn(t,e,n,r,o);if(0===i[0]&&0===i[1]){return Wn(t,e,n,r,o<.5?o+Ln:o-Ln)}return i}function Wn(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 Bn(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=Fn(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=Fn(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 Gn(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])}var Kn=new Set(["script","foreignobject"]),Yn=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),qn=new Set(["href","xlink:href","src"]),Xn=new Set(["mixBlendMode","isolation"]),Zn=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Jn=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Hn=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Qn=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function $n(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(Yn.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||qn.has(n)&&(Zn.test(t)||Jn.test(t)||function(t){const e=Hn.exec(t);return!!e&&Qn.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 tr(t){const e={};for(const n of Object.keys(t)){const r=zn(n);if(Yt.has(r))continue;if("style"===r)continue;let o=t[n];if(Mn.has(r)&&Array.isArray(o))e[r]=On(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)_n.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e[Gt]=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[Gt]=Tn(t,{withUnits:!1})}}return e}function er(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 nr(t){return ce(t)}function rr(t){return fe(t)}function or(t){const e=t.keyframes;if(!Array.isArray(e))return!1;if(t.autoOrient)return!0;for(const t of e)if(de(t)||he(t))return!0;return!1}var ir=new WeakMap;function ar(t,e,n,r){let o=ir.get(t);const i=null==o?void 0:o.get(e);if(i)return i;const a=he(t),s=de(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=Bn(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,ir.set(t,o)),o.set(e,f),f}var sr=.5,lr=5,cr=32;function ur(t,e){var n,r,o;if(!or(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:sr,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:lr,c=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:cr,u=[],f=er(i[0]);if(!f)return t;const d=a?function(t,e){const n=er(t),r=er(e);if(!n||!r)return 0;const o=ar(t,e,n,r),i=Un(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(dr(nr(i[0]),mr(hr(i[0]),hr(i[0]),0,f,d,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=er(e),o=er(n);r&&o?(a&&t>0&&vr(u,e,n,r,o,l),br(u,e,n,r,o,a,s,l,c)):u.push(dr(nr(n),mr(hr(n),hr(n),1,null!=o?o:[0,0],void 0,a)))}const h=rr(i[i.length-1]);h&&(u[u.length-1].e=h),a&&fr(u);const p={keyframes:u};return void 0!==t.loop&&(p.loop=t.loop),p}function fr(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 dr(t,e){return{t:t,v:e}}function hr(t){const e=ue(t);if(e&&"object"==typeof e&&!Array.isArray(e))return e}function pr(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 mr(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]=pr(o,s,n))}return void 0!==o&&(a.rotate=o+gr(t,e,n)),a}function gr(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=pr(r,o,n);return"number"==typeof i?i:0}function vr(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=hr(e),u=l-gr(c,c,0),f=ar(e,n,r,o),d=Un(f.P0,f.P1,f.P2,f.P3,0),h=180*Math.atan2(d[1],d[0])/Math.PI,p=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(h,u);if(Math.abs(p)<=i)return;const m=nr(e),g=Math.min(m+yr,(m+nr(n))/2),v=mr(hr(e),hr(e),0,r,h,!0);t.push(dr(g,v))}var yr=.05;function br(t,e,n,r,o,i,a,s,l){const c=ar(e,n,r,o),u=nr(e),f=nr(n),d=rr(e),h=(p=d)?An([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=hr(e),g=hr(n),v=function(t,e,n,r,o){const i=[];kr(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),kr(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++)Ar(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=Gn(c.lut,t),n=Vn(c.totalArc>0?e/c.totalArc:t,0,1),r={u:Vn(h(n),0,1),p:n,pos:Fn(c.P0,c.P1,c.P2,c.P3,t)};if(i){const e=Un(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?Vn((n.u-k)/(1-k),0,1):1,{left:o,right:a}=Pn(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=mr(m,g,n.p,n.pos,n.rotateDeg,i);t.push(dr(l,c)),b=a,k=n.u}}function kr(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 Ar(t,e,n,r,o,i,a,s){const l=(t+e)/2,c=Fn(r.P0,r.P1,r.P2,r.P3,t),u=Fn(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=Fn(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=Fn(r.P0,r.P1,r.P2,r.P3,l),p=Fn(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(xr(d,c,u),xr(h,c,u),xr(p,c,u));let g=!0;if(o){const n=Un(r.P0,r.P1,r.P2,r.P3,t),o=Un(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)}m<=i&&g||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,Ar(t,l,n,r,o,i,a,s),Ar(l,e,n,r,o,i,a,s))}function xr(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 wr(t,e){const n=Pr(t,e);return null!=n?n:t}function Pr(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Pr(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&&or(n)){const o=ur(n,e);o!==n&&(r=d(f({},t),{transform:o}))}}if(!n&&!r)return null;const i=f({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Sr=1;function Or(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=>Or(t[n],e[n]))}function jr(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 Mr(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function _r(t){return"string"==typeof t&&void 0!==Mr(t)}function Er(t){if(t&&"object"==typeof t&&"string"==typeof t.pathData){const e=Mr(t.pathData);return e?{paths:jr(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&_r(e[0])){const t=[];for(const n of e){const e=Mr(n);e&&t.push(...jr(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&_r(t[0])){const e=[];for(const n of t){const t=Mr(n);t&&e.push(...jr(t))}return{paths:e}}return{paths:t}}if(_r(t)){return{paths:jr(Mr(t))}}return t}function Tr(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 Nr(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;if("d"===t){return{paths:yn(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)}}return Mn.has(t)?vn(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?mn(e,n,r):_n.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?gn(e||[],n||[],r):mn(+(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]=mn(+(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]=gn(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function zr(t,e,n,r){var o,i,a,s,l;const c=e.length-1,u=Vn(null!=(o=n.segmentCount)?o:c,1,c);let h;h=n.repeatAt===Nt.start?e.slice(0,u+1):e.slice(c-u);const p=null!=(i=e[0].t)?i:0,m=null!=(a=e[e.length-1].t)?a:0;let g,v;n.repeatAt===Nt.start?(g=0,v=p):(g=m,v=r);const y=v-g;if(y<=0)return e;const b=null!=(s=h[0].t)?s:0,k=(null!=(l=h[h.length-1].t)?l:0)-b;if(k<=0)return e;const A=h.map(t=>({relT:(t.t-b)/k,v:t.v,e:t.e,tangentIn:de(t),tangentOut:he(t)})),x=Math.floor(y/k),w=y-x*k,P=w/k,S=[],O=n.repeatAt!==Nt.start,j=e[e.length-1];let M,_=!1;function E(e,n,r){var o;let i;if(n){i=[];for(let t=A.length-1;t>=0;t--)i.push({relT:1-A[t].relT,v:A[t].v,e:t>0?Sn(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else i=A;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?An(o.e)(l):l,u=Rr(t,o.v,r.v,c),{left:f}=Pn(o.e,l);return S.length>0&&o.relT<=a&&(S[S.length-1].e=f),void S.push({t:e+a*k,v:u,e:void 0})}const s=S.length>0?S[S.length-1]:j,l=O&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*k))<1e-9;if(l){if(Or(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*k+(l?Sr: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===Nt.start){if(P>1e-9){!function(e,n,r){let o;if(n){o=[];for(let t=A.length-1;t>=0;t--)o.push({relT:1-A[t].relT,v:A[t].v,e:t>0?Sn(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else o=A;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?An(a.e)(o):o,l=Rr(t,a.v,r.v,s),{right:c}=Pn(a.e,o);S.push({t:e,v:l,e:c})}const s={t:e+(r.relT-i)*k,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)}}(g,n.direction===Rt.alternate&&x%2==0,P)}for(let t=0;t<x;t++){const e=x-1-t,r=n.direction===Rt.alternate&&e%2==0;E(g+w+t*k,r)}}else{for(let t=0;t<x;t++){const e=n.direction===Rt.alternate&&t%2==0;E(g+t*k,e)}if(P>1e-9){const t=n.direction===Rt.alternate&&x%2==0;E(g+x*k,t,P)}}if(n.repeatAt===Nt.start)return[...S,...e];if(_&&e.length>0){return[...e.slice(0,-1),d(f({},e[e.length-1]),{e:M}),...S]}return[...e,...S]}function Dr(t,e,n,r){var o;const i=e.keyframes||[],a=[];for(const e of i){const n=ce(e);let i=ue(e);const s=fe(e);"d"===t&&(i=Er(i));const l=Dn(t)?Cn(t):t;Mn.has(l)&&(i=null!=(o=jn(i))?o:i);const c={t:n,v:i,e:Tr(s,r)},u=de(e),f=he(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?zr(t,a,l,n):a}function Ir(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=Dn(t)?Cn(t):t,s=Mn.has(a),l=i.map(e=>{var n;const r=ce(e);let o=ue(e);"d"===t&&(o=Er(o)),s&&(o=null!=(n=jn(o))?n:o);const i={t:r,v:o,e:fe(e)},a=de(e),l=he(e);return a&&(i.tangentIn=a),l&&(i.tangentOut=l),i}),c={keyframes:zr(t,l,o,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function Cr(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=Ir(n,o,e);i!==o&&(r||(r=f({},t)),r[n]=i)}}if(!n&&!r)return null;const i=f({},t);return n&&(i.children=n),r&&(i.animate=r),i}var Fr=0;function Lr(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)?f(f({},n),t):t,o=t[Gt];if(o&&"object"==typeof o){const e=o;if(Array.isArray(e.keyframes)){const n=d(f({},e),{keyframes:e.keyframes.map(t=>d(f({},t),{value:r(t.value)}))});return void 0!==n.value&&(n.value=r(n.value)),d(f({},t),{transform:n})}return t}const i=Object.keys(t).filter(t=>_n.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=d(f({},s),{keyframes:s.keyframes.map(t=>d(f({},t),{value:d(f({},n),{[a]:t.value})}))});void 0!==l.value&&(l.value=d(f({},n),{[a]:l.value}));const c=f({},t);return delete c[a],d(f({},c),{transform:l})}function Ur(t,e=xt.native){const n=Qt(t)||{},r=re(t),o=n.duration||1e3,i=[],a=(t,n,i)=>{if(0===n.length)return null;const a=function(t,e,n,r=xt.native){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=Dr(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===xt.native&&"transform"===i?ur(t):t}}return o}(Lr(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(n),i),o,r,e);return 0===Object.keys(a).length?null:{id:t,animate:a}},s=oe(t);if(s)for(const t of s){const e=t.target.startsWith("#")?t.target.slice(1):t.target,n=t.animateWith.map(t=>Nr(t,r)).filter(t=>!!t),o=a(e,n);o&&i.push(o)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++Fr;t.id=n;const o=a(n,function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=Nr(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=Nr(r,e);t&&n.push(t)}else n.push(t);return n}(e,r),t.transform);o&&i.push(o)}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 Wr(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,p=0,m=1,h===d?p:p+(f-d)/(h-d)*(m-p));var f,d,h,p,m;u=Vn(u,0,1);const g=fe(l);if(g&&Array.isArray(g))try{u=An(g)(u)}catch(t){}let v=Dn(t)?Cn(t):t,y=null;const b=null==l?void 0:l.v,k=null==c?void 0:c.v;if("d"===v){y=yn(null!=(i=null==b?void 0:b.paths)?i:Array.isArray(b)?b:[],null!=(a=null==k?void 0:k.paths)?a:Array.isArray(k)?k:[],u).map(t=>pn(t)).join("")}else if(Mn.has(v))y=On(vn(b||[0,0,0,1],k||[0,0,0,1],u)),v=t;else if("stroke-dasharray"===v)y=gn(b||[],k||[],u).join(" "),v=t;else if("transform"!==v||null===b||"object"!=typeof b||Array.isArray(b))if("translate"===v){y="translate("+gn(b||[0,0],k||[0,0],u).join(",")+")",v="transform"}else if("rotate"===v){y="rotate("+mn(+(b||0),+(k||0),u)+")",v="transform"}else if("scale"===v){y="scale("+gn(b||[1,1],k||[1,1],u).join(",")+")",v="transform"}else{y=mn(+(b||0),+(k||0),u)}else{const t=new Set([...b?Object.keys(b):[],...k?Object.keys(k):[]]),n={};for(const e of t){const t=null==b?void 0:b[e],r=null==k?void 0:k[e];if("rotate"===e||"skew"===e)n[e]=mn(+(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=gn(t||o,r||o,u);n[e]=i}}if(or(e)){const t=b.translate,r=k.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,e,n,r,o,i){const a=ar(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=Fn(a.P0,a.P1,a.P2,a.P3,s);if(!i)return{translate:l};const c=Un(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(c[1],c[0])/Math.PI}}(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)}}y=Tn(n,{withUnits:!1}),v="transform"}return En.has(v)&&"number"==typeof y&&(y=100*y+"%"),{k:v,v:null===y?"":""+y}}function Br(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=Wr(r,o,e);t&&(n[t.k]=t.v)}return n}function Gr(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 Kr(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(qr),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 Yr(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=f({},c||{}),d={keyframes:n.keyframes};void 0!==n.loop&&(d.loop=n.loop),void 0!==n.autoOrient&&(d.autoOrient=n.autoOrient),u[e]=d,t.animate=u;const h=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!==h&&(t[e]=l(h))}function qr(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=f({},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 Xr(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 Zr(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=Hr(r,e.origin,!0),r=Jr(r,"scale",e.scale,n),r=Jr(r,"skew",e.skew,n),r=Jr(r,"rotate",e.rotate,n),r=Hr(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,"translate",e.translate,n):(r=Hr(r,e.origin,!0),r=Jr(r,"translate",e.translate,n),r=Hr(r,e.origin,!1)),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function Jr(t,e,n,r){if(void 0===n)return t;const o=Kr(n);if("static"===o.kind)return{type:"g",transform:{value:Gr(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>Xr(t,Gr(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 Hr(t,e,n){if(void 0===e)return t;const r=Kr(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=>Xr(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}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 $r(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 to(t){const e="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(e)?e:0}function eo(t){var e;const n=to(t.x),r=to(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 no(t,e){return"_lw_"+e+"_"+t.nextId++}function ro(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function oo(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>oo(t,e))}var io=Qr;function ao(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=ro(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=>ao(t,e,n))}function so(t,e,n,r,o){const i=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=co(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&&co((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&co((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=lo(i.full),r=lo(o.full),a=-n[0],s=-n[1],l=r[0]-a,c=r[1]-s;if(0===l&&0===c)return{rest:t};return{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: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=f({},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:a,inner:s}=function(t){if(!t)return{};const e=co(t.translate),n=void 0!==t.rotate||void 0!==t.scale,r={},o={};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);return{outer:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(e);let l=t;l=Zr(l,s,o);let c={type:"g",id:n,children:[{type:"g",id:r,children:[l]}]};return void 0!==i.transform&&(c.transform=i.transform),void 0!==i.animate&&(c.animate=i.animate),a&&(delete c.id,c=Zr(c,a,o),c.id=n),c}function lo(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 co(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 uo(t,e,n,r){if(!e)return t;const o=no(n,"grad"),i=function(t,e){const n={type:t.type===Jt.radial?"radialGradient":"linearGradient",id:e};t.type===Jt.linear?(fo(n,"x1","y1",t.start),fo(n,"x2","y2",t.end)):(fo(n,"cx","cy",t.center),function(t,e,n){const r=Kr(n);if("absent"===r.kind)return;Yr(t,e,r,{asString:!0})}(n,"r",t.radius),fo(n,"fx","fy",t.focal));t.gradientUnits&&(n.gradientUnits=t.gradientUnits);t.spreadMethod&&(n.spreadMethod=t.spreadMethod);t.gradientTransform&&(n.gradientTransform=t.gradientTransform);return n.children=function(t){var e,n;if(!t)return[];const r=Kr(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(ho):[];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:po(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=ce(r),c=ue(r),u=null!=(i=null==c?void 0:c[n])?i:po(e,e.indexOf(r),n);if(!u)continue;const f=fe(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:mo(t.offset),stopColor:t.color},u={};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);return c}(t,o,e,0,i))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function fo(t,e,n,r){var o,i,a;const s=Kr(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 ho(t){return{type:"stop",offset:mo(t.offset),stopColor:t.color}}function po(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 mo(t){return Math.round(1e3*t)/10+"%"}function go(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.pathData?t.pathData:void 0}function vo(t,e,n,r){if(!e)return t;const o=ro(e.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=no(r,"mask");let a={type:"use",href:"#"+o};if(n)a=yo(a,n,r);else if(xo(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=Xr(t,void 0);if(Array.isArray(e.translate)&&a.push(d(f(f({},r),Ao(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(d(f({},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(d(f({},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 h=t;a.length&&(h={type:"g",animate:{transform:u(a)},children:[h]});s.length&&(h={type:"g",animate:{transform:u(s)},children:[h]});l.length&&(h={type:"g",animate:{transform:u(l)},children:[h]});return h}(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 p=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let m;const g=[];for(;null!==(m=p.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);g.push({name:m[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,p=null!=(o=v.args[1])?o:0;if(h!==-f||p!==-d)continue;const m={};m.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;m.translate=m.translate?[m.translate[0]+t,m.translate[1]+n]:[t,n]}for(let e=t+1;e<g.length-1;e++){const t=g[e];if("rotate"===t.name)m.rotate=(null!=(s=m.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;m.scale=m.scale?[m.scale[0]*e,m.scale[1]*n]:[e,n]}}return m}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={};y&&(A.translate=y);void 0!==b&&(A.rotate=b);k&&(A.scale=k);return 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}}return}(t);e&&(a=yo(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||(!(!t.transform||"object"!=typeof t.transform)||xo(t))}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?Oo(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=wo(l),n=wo(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]}}const f=Array.from(u).sort((t,e)=>t-e);return{type:"g",animate:{transform:{keyframes:f.map(t=>{const e=Po(l,t),n=Po(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}function yo(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=Kr(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=bo(o,"translate",e.translate,void 0,n),o=bo(o,"rotate",e.rotate,r,n),o=bo(o,"scale",e.scale,r,n),o}function bo(t,e,n,r,o){if(void 0===n)return t;const i=Kr("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:Gr(e,ko(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=Xr(t,Gr(e,ko(e,t.value),r));return"translate"===e?f(f({},n),Ao(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function ko(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function Ao(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 xo(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function wo(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 Po(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=So(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function So(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 Oo(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}s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t);return 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 jo(t,e,n){if(!e)return;const r=ro(e.source);if(!r)return void(e.without===It.translate&&n.errors.push("clone: content ref missing `source`"));const o=e.without===It.translate&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function Mo(t,e){const n={};return void 0!==t.translate&&(n.translate=_o(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=_o(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=_o(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){const n=t=>[Math.pow(t[0],e),Math.pow(t[1],e)];return _o(t,n,!0)}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}function _o(t,e,n=!1){const r=Kr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=e(r.value);return("number"==typeof t||Array.isArray(t))&&!n?o:{value:o}}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?d(f({},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 Eo=!1;function To(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var No=1;function Ro(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-No),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+No,value:0}],a=f({},t);for(const e of Object.keys(t))delete t[e];t.type="g",t.children=[a],t.animate={opacity:{keyframes:i}}}function zo(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function Do(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function Io(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 Co(t,e,n){const r=ro(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=Vo(r,e,n,new Set);if(o)if(Eo){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],eo(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function Vo(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=io(o);if(function(t,e){$r(t,()=>no(e,"retimed"))}(i,n),"use"===o.type?Lo(i,e.start,e.stretch):Fo(i,e.start,e.stretch),Io(i),"use"===o.type&&o.href){const a=ro(o.href);if(a){const s=Do(o),l=s?zo(To(s),e):e,c=new Set(r);c.add(t);const u=Vo(a,l,n,c);u&&(i.href="#"+u)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=Do(t);if("use"===t.type&&s&&t.href){const i=ro(t.href);if(i){const a=zo(To(s),e),l=new Set(r);l.add(o);const c=Vo(i,a,n,l);c&&(t.href="#"+c)}Io(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 Fo(t,e,n){var r;Lo(t,e,n),null==(r=t.children)||r.forEach(t=>Fo(t,e,n))}function Lo(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 Uo=48,Wo=/[MmLlHhVvCcSsQqTtAaZz]/;function Bo(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 Go(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++]),p=(t,e,r)=>{const a=[o,i],s=Bn(a,t,e,r,Uo);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]},m=(t,e)=>{p([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];Wo.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)m(h()+(n?o:0),h()+(n?i:0));else if("H"===g)m(h()+(n?o:0),i);else if("V"===g)m(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],p(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],p(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}=Bo([o,i],t,e);p(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}=Bo([o,i],t,e);p(r,a,e)}else{if("A"!==g){r++;continue}r+=5,m(h()+(n?o:0),h()+(n?i:0))}d=t}else m(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]=Fn(o.P0,o.P1,o.P2,o.P3,a),[c,u]=Un(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((o=r,(e=t)<(n=0)?n:e>o?o:e));var e,n,o}}}var Ko=.15;function Yo(t){const e=Kr(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 Xo=t=>Math.round(1e3*t)/1e3;function Zo(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Go(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Ko*o,a=Yo(e.startOffset),s=Yo(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 p=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.]+/,"");p="M"+Xo(e)+","+Xo(n)+"L"+Xo(d.x)+","+Xo(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;p+="L"+Xo(t)+","+Xo(e)}return{d:p,startShift:u}}function Jo(t,e,n){var r;if(!e||"string"!=typeof e.pathData||!e.pathData)return t;const o=no(n,"tpath"),{d:i,startShift:a}=Zo(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),Ho(s,"startOffset",function(t,e){if(!e||null==t)return t;const n=Kr(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=>d(f({},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}(e.startOffset,a)),Ho(s,"textLength",e.textLength),t.children=[s],t}function Ho(t,e,n){null!=n&&Yr(t,e,Kr(n),{asString:!0})}var Qo=(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 $o(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function ti(t,e){let n="";for(let r=0;r<t.length;r++){const o=$o(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function ei(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var ni=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function ri(t,e,n=2){const r=[];let o;for(ni.lastIndex=0;null!==(o=ni.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]=ei(e,s(),s());i+=t+ti([r,o],n)}else if("C"===t){const[t,r]=ei(e,s(),s()),[o,a]=ei(e,s(),s()),[l,c]=ei(e,s(),s());i+="C"+ti([t,r,o,a,l,c],n)}else if("Q"===t){const[t,r]=ei(e,s(),s()),[o,a]=ei(e,s(),s());i+="Q"+ti([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var oi=16,ii=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Wt,"xml:space"],ai=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],si=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function li(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function ci(t){return"string"==typeof t?t:void 0}function ui(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of si)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function fi(t,e){var n,r,o,i,a,s,l,c,u,f;const d="text"===t.type,h=t.style,p=e=>{var n;return d?void 0:null!=(n=t[e])?n:null==h?void 0:h[e]},m={fontFamily:null!=(n=ci(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=li(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=li(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=li(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(c=li(p("opacity")))?c:e.opacity,animate:null!=(u=d?void 0:ui(t))?u:e.animate};for(const t of ai){const n=null!=(f=p(t))?f:e[t];void 0!==n&&(m[t]=n)}return m}function di(t){var e,n,r;return{fontFamily:ci(t.fontFamily),fontSize:null!=(e=li(t.fontSize))?e:oi,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=li(t.letterSpacing))?n:0,wordSpacing:null!=(r=li(t.wordSpacing))?r:0}}function hi(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 ai)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function pi(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 mi(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var gi=.6,vi="px-missing-glyph";function yi(t,e){if(t<=0||e<=0)return"";const n=.08,r=t*n,o=.92*t,i=.92*-e,a=o-r,s=-i,l=Math.max(1,.12*Math.min(a,s)),c="M"+r+" 0L"+o+" 0L"+o+" "+i+"L"+r+" "+i+"Z";if(a<=2*l||s<=2*l)return c;const u=r+l,f=o-l,d=-l,h=i+l;return c+"M"+u+" "+d+"L"+u+" "+h+"L"+f+" "+h+"L"+f+" "+d+"Z"}function bi(t,e){var n,r,o;const{glyphs:i,create:a=Qo,warnings:s}=e,l=mi(i),c={x:null!=(n=li(t.x))?n:0,y:null!=(r=li(t.y))?r:0},u=[],f=[{start:c.x,end:c.x}];let d=0;const h=(t,e)=>{var n;const r=pi(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,p=hi(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:p,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:gi*o;u.push({glyphD:yi(t,h),m:[a,0,0,a,c.x,c.y],paint:p,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}},p=(t,e)=>{var n,r,o;const i=fi(t,e),a=li(t.x),s=li(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=li(t.dx))?n:0,c.y+=null!=(r=li(t.dy))?r:0;const l=ci(t[Wt]);if(l&&!(null==(o=t.children)?void 0:o.length)&&h(l,i),t.children)for(const e of t.children)p(e,i)},m=di(t);if(t.children)for(const e of t.children)p(e,m);const g=ci(t[Wt]);g&&!(null==(o=t.children)?void 0:o.length)&&h(g,m);const v=ci(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 Ti(t,Ei(u,a,s),a)}function ki(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=Go(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const c=mi(i),u=[];let f=0;const d=(t,e)=>{var n,r;const o=fi(t,e),s=ci(t[Wt]);if(s&&!(null==(n=t.children)?void 0:n.length)){const t=pi(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,di(t));const h=f,p=Kr(null==s?void 0:s.textLength),m="animated"===p.kind?Number(null==(r=p.keyframes[0])?void 0:r.value)||0:"static"===p.kind&&Number(p.value)||0,g=m>0&&h>0?m/h:1,v=Kr(null==s?void 0:s.startOffset),{along:y,perp:b}=xi(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=mi(s),u={x:null!=(r=li(t.x))?r:0,y:null!=(o=li(t.y))?o:0},f=[],d=[{start:u.x,end:u.x}];let p=0;const m=(t,e)=>{var n;const r=pi(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:p}),u.x+=l,d[p].end=u.x}},g=(t,e)=>{var n,r,o;const i=fi(t,e),a=li(t.x),s=li(t.y);void 0!==a&&(u.x=a,p=d.length,d.push({start:u.x,end:u.x})),void 0!==s&&(u.y=s),u.x+=null!=(n=li(t.dx))?n:0,u.y+=null!=(r=li(t.dy))?r:0;const l=ci(t[Wt]);if(l&&!(null==(o=t.children)?void 0:o.length)&&m(l,i),t.children)for(const e of t.children)g(e,i)},v=di(t);if(t.children)for(const e of t.children){const t=f.length;if(g(e,v),f.length===t){const t=fi(e,v),n=pi(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:p})}}const y=ci(t[Wt]);y&&!(null==(a=t.children)?void 0:a.length)&&m(y,v);const b=ci(t.textAnchor);if("middle"===b||"end"===b)for(const t of f){const e=d[t.line].end-d[t.line].start;t.x+="middle"===b?-e/2:-e}return f.map(t=>{var e=t,{line:n}=e;return h(e,["line"])})}function Ai(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 xi(t){var e,n,r;return{along:(null!=(e=li(t.x))?e:0)+(null!=(n=li(t.dx))?n:0),perp:null!=(r=li(t.dy))?r:0}}function wi(t,e,n,r,o,i){const{glyphs:a,create:s=Qo,warnings:l}=r,c=e?Go(e):null;if(!c)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const u=mi(a),{cells:h,width:p}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,c;const u=fi(t,s),f=ci(t[Wt]);if(f&&!(null==(l=t.children)?void 0:l.length)){const t=pi(u,e,n,r);if(t){const e=u.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=hi(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:gi*t.unitsPerEm,s=a*e;o.push({glyphD:yi(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,di(t)),{cells:o,width:i}}(t,a,u,l);if(!h.length)return Ti(t,[],s);const{along:m,perp:g}=xi(t),v=Pi(n),y=Pi(o),b=t=>t>0&&p>0?t/p:1,k="clip"===i&&!c.closed;if(v.animated||y.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}(v.times,y.times),n=(t,e)=>m+v.at(e)+b(y.at(e))*t.midBase,r=v.animated?v.loop:y.loop;return Ti(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/Si,.5),c=t=>t>=0&&t<=e.totalLength,u=[];for(const h of t){const t=[h.scale,0,0,h.scale,-h.scale*(h.widthEm/2),0],p=ri(h.glyphD,t),m=(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:[ji(r-s*l,3),ji(o+s*a,3)],rotate:ji(180*i/Math.PI,3)}}},g=[],v=[],y=(t,e)=>{g.push(m(t,e)),a&&v.push({time:e,value:c(t)?1:0})};y(n(h,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],i=n(h,e),a=n(h,o),s=Math.min(Oi,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);y(n(h,r),r)}}fr(g);const b={keyframes:g};void 0!==o&&(b.loop=o);const k={transform:b};if(h.paint.animate&&Object.assign(k,h.paint.animate),a&&v.some(t=>0===t.value)){const t={keyframes:v};void 0!==o&&(t.loop=o),k.opacity=t}u.push(i("path",d(f(f({d:p},Mi(h.paint)),_i(h.isMissing)),{animate:k}),[]))}return u}(h,c,n,e,r,s,k,g),s)}const A=b(y.at(0)),x=m+v.at(0);return Ti(t,Ei((k?h.filter(t=>{const e=x+t.midBase*A;return e>=0&&e<=c.totalLength}):h).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:Ai(c,x+t.midBase*A,t.scale,t.widthEm,g)})),s,l),s)}function Pi(t){var e;const n=Kr(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 Si=48,Oi=64;function ji(t,e){const n=c(10,e);return Math.round(t*n)/n}function Mi(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 ai)void 0!==t[n]&&(e[n]=t[n]);return e}function _i(t){return t?{[Bt]:vi}:{}}function Ei(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=ri(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",f(f(f({d:n},Mi(t)),_i(i)),void 0!==t.animate?{animate:f({},t.animate)}:{}),[]));return o}function Ti(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===ii.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=f({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function Ni(t,e){return e.alongPath?wi(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):bi(t,e)}function Ri(t,e,n){if(!e)return t;const r=e.subPaths===Ut.combined,o=[],i=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)i(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*Xi,d=o*Xi,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"}return}(t);if(void 0===e)return;const n=jr(e);if(!n.length)return;const r={leaf:t,subpaths:[]};for(const t of n){const e=Yi(t);r.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}o.push(r)};if(i(t),!o.length)return t;let a=0;const s=r?[...o].reverse():o;for(const t of s)for(const e of t.subpaths)r||(a=0),e.startOffsetPx=a,a+=e.lengthPx;const l=a;if(r&&l<.001)return t;const c=Kr(e.offset),u="absent"===c.kind?{kind:"static",value:0}:c,h=function(t){const e=Kr(t);if("animated"!==e.kind)return e;const n=e.keyframes.map(t=>({time:ce(t),value:ue(t),easing:fe(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=Gi(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=Ki(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=Ki(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),p="absent"===h.kind?{kind:"static",value:[0,1]}:h,m=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}(u),g=[m.length?Math.min(...m):0,m.length?Math.max(...m):0];if(1===o.length&&o[0].leaf===t&&1===o[0].subpaths.length){const e=o[0],n=e.subpaths[0],i=r?l:n.lengthPx;if(i<.001)return t;const a=r?n.startOffsetPx/i:0;return function(t,e,n,r,o,i){const a=Ci(n,e,r),s=Vi(e,r),l=f({},t);return delete l.effects,Ui(l,"strokeDasharray",Li(i,s)),Ui(l,"strokeDashoffset",Li(o,a)),Ui(l,"strokeOpacity",Bi(i)),l}(e.leaf,i,a,g,u,p)}const v=new Map;for(const t of o){const e=[];for(const o of t.subpaths){const i=r?l:o.lengthPx;if(i<.001)continue;const a=r?o.startOffsetPx/i:0;e.push(...Di(t.leaf,o.subpath,i,a,g,u,p,n))}v.set(t.leaf,zi(t.leaf,e))}const y=t=>{const e=v.get(t);return e||(Array.isArray(t.children)&&t.children.length>0?d(f({},t),{children:t.children.map(y)}):t)};return y(t)}function zi(t,e){const n=d(f({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function Di(t,e,n,r,o,i,a,s){const l=Ci(r,n,o),c=Vi(n,o),u=Li(i,l),f=Li(a,c),d=Bi(a),h=function(t){return{type:"path",d:t}}(pn(e));return Ui(h,"strokeDasharray",f),Ui(h,"strokeDashoffset",u),Ui(h,"strokeOpacity",d),[h]}var Ii=1;function Ci(t,e,n){const[r]=Fi(n);return n=>e*(-n-r+t)+Ii}function Vi(t,e){const[n,r]=Fi(e),o=r-n+1;return e=>{const n=Vn(e[0],0,1),r=Vn(e[1],0,1),i=Math.min(n,r),a=Math.max(n,r),s=[0];let l=Ii;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+Ii),s}}function Fi(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Li(t,e){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:e(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:ce(t),value:e(ue(t)),easing:fe(t)})),loop:t.loop}}function Ui(t,e,n){n&&Yr(t,e,n)}var Wi=10;function Bi(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=ce(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+Wi,value:1})):!c&&u&&(i.push({time:s-Wi,value:1}),i.push({time:s,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function Gi(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 Ki(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 Yi(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+=qi(t,r,r+1);return t.c&&e.length>1&&(n+=qi(t,e.length-1,0)),n}function qi(t,e,n){var r,o,i,a;const s=t.v,l=s[e],c=s[n],u=Bn(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 Xi=.5522847498307936;function Zi(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:Pt(null==(e=Qt(t))?void 0:e.engine),glyphs:null==(n=re(t))?void 0:n.fonts},o=io(t);oo(o,r.idMap),ao(o,r,()=>no(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=ro(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=Oo(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(),oo(t,e.idMap);const n=[],r=t=>{var e;Do(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&&Do(o)&&n++,"use"===o.type&&o.href){const t=ro(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=ro(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=Do(t);if(!n)continue;const r=n.timeCrop;Io(t),Co(t,To(n),e),r&&Ro(t,r,e)}}(t,e),t}(Ji(o,r),r);return function(t,e){if(!e.length)return;(t.children||(t.children=[])).unshift({type:"defs",children:e})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Ji(t,e){t.children&&(t.children=t.children.map(t=>Ji(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:p}=null!=n?n:{};n&&delete t.effects;let m=t,g=!1;if(null==p?void 0:p.useGlyphs)if(h){const t="string"==typeof h.pathData?h.pathData:void 0,n=function(t,e,n,r,o,i){return e.glyphs?wi(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.fonts"),null)}(m,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(m=n,g=!0)}else m=function(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?bi(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}(m,p,e),g=!0;return g||(m=Jo(m,h,e)),m=function(t,e,n){return uo(t,e,n,"fill")}(m,f,e),m=function(t,e,n){return uo(t,e,n,"stroke")}(m,d,e),m=Ri(m,c,e),m=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=io(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 r=io(l),o=Mo(e,t),i=o?Zr(r,o,n):r;c.push(i)}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}(m,a,e),m=vo(m,s,i,e),m=function(t,e,n){if(!(null==e?void 0:e.pathData))return t;const r=no(n,"clip"),o={type:"path"},i=Kr(e.pathData);return"absent"!==i.kind&&("static"===i.kind?o.d=go(i.value):(Yr(o,"d",i),void 0!==o.d&&(o.d=go(o.d)))),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(m,l,e),o?(jo(m,u,e),m=so(m,i,r,o,e)):m=function(t,e,n,r){return jo(t,e,r),Zr(t,n,r)}(m,u,i,e),(null==u?void 0:u.retime)&&(t.effects={clone:{retime:u.retime}}),r&&e.idMap.set(r,m),m}function Hi(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 Qi(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=Hi(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var $i=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function ta(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=>de(t)||he(t)))return;let l="M"+$i(s[0][0])+","+$i(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=he(o[t]))?n:[0,0],u=null!=(r=de(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"+$i(f[0])+","+$i(f[1])+","+$i(d[0])+","+$i(d[1])+","+$i(i[0])+","+$i(i[1]),c.push(Qi(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:ce(o[t]),v:d/u},n=fe(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=f({},o);delete n[Gt];const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n[Kt]=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=f({},s);delete t[qt.translate],delete t[qt.origin],l=Object.keys(t).length?t:void 0}r=d(f({},t),{animate:n,style:d(f({},t.style),{offsetPath:"path('"+e.pathStr+"')",offsetAnchor:$i(e.anchor[0])+"px "+$i(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=d(f({},r),{children:t}))}return r};return e(t)}function ea(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=ra(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=ia(t.viewBox);if(e)return[e[2],e[3]];const n=na(t.width),r=na(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=aa(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 d(f({},s),{children:c})}function na(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function ra(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function oa(t,e,n,r,o,i,a){var s,l,c,u;const h=Qr(e);$r(h,o);const p="symbol"===h.type?ia(h.viewBox):void 0,m=null!=(l=null!=(s=na(t.width))?s:null==p?void 0:p[2])?l:a[0],g=null!=(u=null!=(c=na(t.height))?c:null==p?void 0:p[3])?u:a[1],v="symbol"===h.type?function(t,e,n,r,o){const i=ia(t.viewBox),a=d(f({},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,h=c>0&&u>0?Math.min(r/c,o/u):1,p=(r-c*h)/2,m=(o-u*h)/2,g=[];0===p&&0===m||g.push("translate("+p+","+m+")");1!==h&&g.push("scale("+h+")");0===s&&0===l||g.push("translate("+-s+","+-l+")");g.length&&(a.transform=g.join(""));const v=e();return n.push({type:"clipPath",id:v,children:[{type:"rect",x:s,y:l,width:c,height:u}]}),a.clipPath="url(#"+v+")",a}(h,o,i,m,g):h,y=aa(v,n,r,o,i,a),b=d(f({},t),{type:"g",children:[y]});return delete b.href,delete b.width,delete b.height,eo(b)}function ia(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 aa(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=ra(t.href);if(a&&n.has(a)){const s=e.get(a);if(s)return oa(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=aa(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?d(f({},t),{children:s}):t}function sa(t,e,n){var r,o;let i=Zi(t).root;i=ta(i);return i=Cr(i,null!=(o=null==(r=Qt(i))?void 0:r.duration)?o:Rn),e===xt.native&&(i=wr(i,null==n?void 0:n.motionPath),i=ea(i),i=function(t){const e=t=>t.startsWith("#")?t.slice(1):t,n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let r=!0;for(;r;){r=!1;const o=new Set;n(t,t=>{"use"===t.type&&"string"==typeof t.href&&o.add(e(t.href))}),n(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&&!o.has(t.id)))),e=e.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),e.length!==t.children.length&&(t.children=e,r=!0)})}return t}(i)),i}var la="setPlaybackRate: rate must be finite and non-zero";function ca(t){return Number.isFinite(t)&&0!==t}function ua(t,e){return t>0?e===1/0?1/0:t*(e>0?e:1):0}function fa(t,e){return t>0?e===1/0?t:t*(e>0?e:1):0}function da(t,e){return Number.isNaN(t)||t<0?0:Number.isFinite(e)?t>e?e:t:Number.isFinite(t)?t:0}function ha(t,e,n){const r=fa(e,n);return r>0&&Number.isFinite(t)?t<=0?0:n===1/0?t%r/r:t>=r?1:t/r:0}function pa(t,e,n){const r=fa(e,n);return r>0&&Number.isFinite(t)?t<=0?0:t>=1?r:t*r:0}function ma(t,e=Date.now){let n=0,r=0,o=!1,i=1;const a=()=>da(o?n+(e()-r)*i:n,t);return{now:a,isRunning:()=>o,start:(s,l)=>{n=da(null!=l?l:a(),t),i=ca(s)?s:1,r=e(),o=!0},stop:()=>{n=a(),r=0,o=!1},seek:i=>{n=da(i,t),o&&(r=e())}}}function ga(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function va(t,e,n){var r;const o=Qt(t)||{},i=Ur(t,xt.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||Rn),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 p=null,m=!1,g=-(o.delay||0),v=0,y=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let x=0;const w=()=>{const t=v?(Date.now()-v)*y:0;return g+t},P=()=>{let t=w();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;if(l>0){t=Vn(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1);n=Vn((t-r*e)/e,0,1)}else 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=Br(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 O=()=>!!m&&(!!e.isConnected()&&(y<0?w()>0:!(Number.isFinite(c)&&P()>=c))),j=t=>{null!==p&&(ga(p),p=null),(t||O())&&(p=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{p=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=P(),i=w();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(x&&t-x<A)return;x=t}S(o)}})(),j()}))},M=()=>{if(!m)return;let t=w();Number.isFinite(c)&&t>c&&(t=c),g=t,v=0,m=!1,null!==p&&(ga(p),p=null),t>=0?S(t):h&&S(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!m){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,m=!0,v=Date.now(),j(!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,m=!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,m=!1,null!==p&&(ga(p),p=null),S(d?g:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!ca(t))return void console.warn(la);let e=w();Number.isFinite(c)&&e>c&&(e=c),t<0!=y<0&&(b=!1),y=t,g=e,m&&(v=Date.now())},getCurrentTime:()=>P(),setCurrentTime:t=>{t=da(t,c),g=t,m&&(v=Date.now()),(!Number.isFinite(c)||t<c)&&(b=!1),S(P())},getCurrentProgress:()=>ha(P(),l,s),setCurrentProgress:t=>{_.setCurrentTime(pa(t,l,s))},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var ya={document:"document",host:"host",platform:"platform",usage:"usage",internal:"internal"};function ba(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(null==t?void 0:t.muteWarn)return;const i=n+e+": "+r;void 0===o?console.warn(i):console.warn(i,o)},error:(e,r,o)=>{const i=function(t){return"string"==typeof t?new Error(t):t}(r);if(null==t?void 0:t.onError)return void t.onError({kind:e,message:i.message,error:i,detail:o});if(null==t?void 0:t.muteError)return;const a=n+e+": "+i.message;void 0===o?console.error(a):console.error(a,o)}}}var ka=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],Aa=["definitions","bindings"],xa=t=>!!t&&"object"==typeof t&&!Array.isArray(t),wa=t=>xa(t)&&"string"==typeof t.type?t.type:"time",Pa=t=>"scroll"===t||"view"===t;function Sa(t,e){const n=xa(t)?f({},t):{};for(const t of Object.keys(e)){const r=e[t];null!==r?xa(r)?n[t]=Sa(n[t],r):n[t]=r:delete n[t]}return n}function Oa(t,e,n){const r=wa(t),o=xa(e)&&"string"==typeof e.type?String(e.type):r;let i;if(o!==r){const n={};if(xa(t))for(const e of bt)void 0!==t[e]&&(n[e]=t[e]);i=Sa(n,e)}else i=Sa(t,e);if(Pa(o)){for(const t of kt)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 ja(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=xa(n)?f({},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=d(f({},s.trigger),{startOn:a})),{timeline:s}}function Ma(t,e){const n=[],r=t=>n.push(t);if(null===e)return{config:void 0,warnings:n};if(!xa(e)||0===Object.keys(e).length)return{config:t,warnings:n};const o=xa(t)?ka.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=xa(t)?f({},t):{};for(const t of Object.keys(e)){const n=e[t];null!==n?"timeline"!==t?xa(n)?i[t]=Sa(i[t],n):i[t]=n:i.timeline=xa(n)?Oa(i.timeline,n,r):n:delete i[t]}return{config:i,warnings:n}}function _a(t,e,n){var r,o;const i=!!(null==n?void 0:n.resetDefaults);if(!(t&&void 0!==e&&(i||null!==e&&xa(e)&&Object.keys(e).length)))return{doc:t,warnings:[]};const a=t,s=xa(a.animator),l=!s&&xa(null==(r=a.meta)?void 0:r.animator),c=s?a.animator:l?a.meta.animator:void 0,u=[];s&&xa(null==(o=a.meta)?void 0:o.animator)&&u.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let h=c;if(i){const t={};for(const e of Aa)xa(c)&&void 0!==c[e]&&(t[e]=c[e]);h=t}const p=Ma(h,null!=e?e:{});return u.push(...p.warnings),p.config===c?{doc:t,warnings:u}:l?{doc:d(f({},a),{meta:d(f({},a.meta),{animator:p.config})}),warnings:u}:{doc:d(f({},a),{animator:p.config}),warnings:u}}var Ea=6;function Ta(t){try{return{problems:en(t)}}catch(t){return{problems:[]}}}function Na(t,e){const{problems:n}=Ta(t);if(!n.length)return;const r=n.slice(0,Ea),o=n.length-r.length;console.warn(e+": this document does not match the animation schema in "+n.length+" place"+(1===n.length?"":"s")+".\n"+r.map(t=>" - "+t).join("\n")+(o>0?"\n … and "+o+" 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.")}var Ra=[1,0,0,1,0,0];function za(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 Da=(t,e)=>[1,0,0,1,t,e],Ia=(t,e)=>[t,0,0,e,0,0];function Ca(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var Va=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],Fa=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function La(t){let e=Ra;t.translate&&(e=za(e,Da(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=za(e,Da(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=za(e,Ca(t.rotate))),t.scale&&(e=za(e,Ia(t.scale[0],t.scale[1]))),n&&(e=za(e,Da(-t.origin[0],-t.origin[1]))),e}function Ua(t,e,n){return t+(e-t)*n}function Wa(t,e){return null==t?Ra:"string"==typeof t?function(t){let e=Ra;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=za(e,Da(n[0]||0,n[1]||0)):"scale"===t?e=za(e,Ia(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=za(e,Ca(n[0])):"skewX"===t?e=za(e,Va(n[0])):"skewY"===t?e=za(e,Fa(n[0])):"matrix"===t&&(e=za(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?La(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||{},p=f.value||{},m={};return h.translate&&p.translate?m.translate=[Ua(h.translate[0],p.translate[0],d),Ua(h.translate[1],p.translate[1],d)]:m.translate=h.translate||p.translate,void 0!==h.rotate&&void 0!==p.rotate?m.rotate=Ua(h.rotate,p.rotate,d):m.rotate=null!=(l=h.rotate)?l:p.rotate,h.scale&&p.scale?m.scale=[Ua(h.scale[0],p.scale[0],d),Ua(h.scale[1],p.scale[1],d)]:m.scale=h.scale||p.scale,m.origin=h.origin||p.origin,m}(t.keyframes,e)):t.value?La(t.value):"object"!=typeof t||Array.isArray(t)?Ra:La(t)}var Ba=new Set(["svg","g","symbol"]),Ga=new Set(["defs","mask","clipPath","title"]);function Ka(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Ka(t,e))}function Ya(t){return null==t?0:Number(t)}function qa(t){return Math.round(100*t)/100+0}function Xa(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=qa(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 Ua(u.value,f.value,d)}return void 0!==e?Number(e):n}(null==(s=t.animate)?void 0:s.opacity,t.opacity,1,n)),d=t.mask?1:0,h=e.map(qa).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Ya(t.width)+","+Ya(t.height)+","+Ya(t.x)+","+Ya(t.y);case"ellipse":return Ya(t.rx)+","+Ya(t.ry)+","+Ya(t.cx)+","+Ya(t.cy);case"circle":return Ya(t.r)+","+Ya(t.cx)+","+Ya(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+c+"|sw:"+(Ya(u)||"")+"|o:"+f+"|m:"+d}function Za(t,e,n,r,o){var i;const a=t.type||"";if(Ga.has(a))return;const s=za(e,function(t,e){return t.animate&&t.animate.transform?Wa(t.animate.transform,e):void 0!==t.transform?Wa(t.transform,e):Ra}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=za(s,Da(Ya(t.x),Ya(t.y)));return void(i?Za(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}Ba.has(a)?null==(i=t.children)||i.forEach(t=>Za(t,s,n,r,o)):o.push(Xa(t,s,n))}function Ja(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=>Ja(t,e))}function Ha(t,e){const n=new Map;Ka(t,n);const r=[];return Za(t,Ra,e,n,r),r.sort()}function Qa(t,e){const n=new Set;Ja(t,n),Ja(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Ha(t,o),i=Ha(e,o),a=$a(n,i),s=$a(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function $a(t,e){const n=new Map;for(const t of e)n.set(t,(n.get(t)||0)+1);const r=[];for(const e of t){const t=n.get(e)||0;t>0?n.set(e,t-1):r.push(e)}return r}function ts(t){return"scroll"===(null==t?void 0:t.timelineSource)}function es(t){return("number"==typeof(null==t?void 0:t.duration)&&t.duration>0?t.duration:Rn)*("number"==typeof(null==t?void 0:t.iterations)&&t.iterations>0?t.iterations:1)}function ns(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]}}var rs="cover";function os(t,e,n,r){var o;const[i,a]=ns(null!=(o=null==t?void 0:t.phase)?o:rs,n,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:e)*(a-i)}function is(t,e,n,r){const o=n-t,i=os(null==r?void 0:r.start,0,e,n),a=os(null==r?void 0:r.end,1,e,n);return a<=i?o>=a?1:0:Vn((o-i)/(a-i),0,1)}function as(t,e,n){var r,o;const i=e>0?Vn(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:Vn((i-a)/(s-a),0,1)}function ss(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"}function ls(t){const e=new Set,n=new Set,r=[{schema:t,path:""}];for(;r.length;){const{schema:t,path:o}=r.shift(),i=D(t);switch(i.kind){case"shape":if(n.has(t))break;n.add(t);for(const t of Object.keys(i.shape)){const n=o?o+"."+t:t;e.add(n),r.push({schema:i.shape[t],path:n})}i.openValue&&r.push({schema:i.openValue,path:o+"{*}"});break;case"optional":r.push({schema:i.inner,path:o});break;case"array":r.push({schema:i.item,path:o+"[]"});break;case"lazy":r.push({schema:i.resolved,path:o});break;case"record":r.push({schema:i.value,path:o+"{*}"});break;case"union":i.members.forEach((t,e)=>r.push({schema:t,path:o+"|"+e}));break;case"discriminatedUnion":for(const t of i.members)r.push({schema:t,path:o+"|"+cs(t,i.key)})}}return[...e].sort()}function cs(t,e){const n=D(t);if("shape"!==n.kind)return"?";const r=n.shape[e];if(void 0===r)return"?";const o=D(r);return String(("optional"===o.kind?o.inner:r)._default)}function us(t,e){const n=new Set(t),r=new Set(e);return{added:e.filter(t=>!n.has(t)).sort(),removed:t.filter(t=>!r.has(t)).sort()}}function fs(t){const e=t.added.length>0||t.removed.length>0,n=G(t.lastReleased),r=G(t.declared);if(!n||!r)return{changed:e,refuse:"Unparseable version: "+t.lastReleased+" / "+t.declared+"."};const o=n.a+"."+(n.b+1);if(!e){if(r.b===n.b&&r.a===n.a)return{changed:e};return t.steps.find(e=>e.to===t.declared)?{changed:e,requiredVersion:t.declared}:{changed:e,refuse:"The version moved to "+t.declared+" with no key change and no step explaining it."}}const i=t.removed.length?"converted":"additive",a=t.added.length+" key(s) added, "+t.removed.length+" removed";if(r.a!==n.a||r.b!==n.b+1)return{changed:e,requiredKind:i,requiredVersion:o,refuse:"The player schema changed ("+a+") but PX_PLAYER_SCHEMA_VERSION is "+t.declared+". Set it to "+o+" and add the PLAYER_WIRE_STEPS entry."};const s=t.steps.find(e=>e.to===t.declared);return s?"converted"===i&&"converted"!==s.kind?{changed:e,requiredKind:i,requiredVersion:o,refuse:"Keys were REMOVED ("+t.removed.join(", ")+"), which is never additive — the "+t.declared+" step must be `converted`, with an up()."}:{changed:e,requiredKind:i,requiredVersion:o}:{changed:e,requiredKind:i,requiredVersion:o,refuse:"No PLAYER_WIRE_STEPS entry reaches "+t.declared+"."}}function ds(t,e,n,r){const o=[];if(!t.length)return["The release log is empty."];t[0].baseline&&t[0].version===r||o.push("The first release must be the baseline "+r+".");for(let n=1;n<t.length;n++){const r=G(t[n-1].version),i=G(t[n].version);r&&i&&i.a===r.a&&i.b===r.b+1||o.push("Release "+t[n].version+" does not follow "+t[n-1].version+" by one `b` step."),t[n].date<t[n-1].date&&o.push("Release "+t[n].version+" is dated before its predecessor.");const a=e.find(e=>e.to===t[n].version);a?t[n].removed.length&&"converted"!==a.kind&&o.push("Release "+t[n].version+" removed keys, but its step is not `converted`."):o.push("Release "+t[n].version+" has no PLAYER_WIRE_STEPS entry.")}const i=t[t.length-1].version;return i!==n&&o.push("PX_PLAYER_SCHEMA_VERSION is "+n+" but the last release record is "+i+" — a bump needs its changelog entry (run scripts/schema-release.mjs --apply)."),o}
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=Math.pow,u=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,f=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&u(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&u(t,n,e[n]);return t},d=(t,e)=>n(t,o(e)),h=(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},p={};((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})(p,{PX_RATE_REJECTED:()=>Gi,PX_TRANSFORM_PART_KEYS:()=>Kt,PX_TRIGGER_DEFAULTS:()=>Pt,PX_WIRE_BASELINE_VERSION:()=>H,PX_WIRE_SCHEMA_VERSION:()=>R,PX_WIRE_STEPS:()=>$,PX_WIRE_VERSION:()=>K,PX_WIRE_VERSION_KEY:()=>F,PxAlongPathMode:()=>mt,PxAnimatedSvgDocumentSchema:()=>nn,PxAnimatorConfigSchema:()=>ze,PxAttrValueSchema:()=>De,PxBezierPathSchema:()=>rn,PxClipPathEffectSchema:()=>Ue,PxCloneEffectSchema:()=>Be,PxCloneWithout:()=>Dt,PxControlMode:()=>jt,PxDefinitionsSchema:()=>ke,PxDiagnosticKind:()=>ta,PxEffectsSchema:()=>Qe,PxElementAnimationSchema:()=>ge,PxFillGradientEffectSchema:()=>Ze,PxFillMode:()=>it,PxFinishAction:()=>ct,PxGradientSpreadMethod:()=>Zt,PxGradientStopSchema:()=>Ge,PxGradientType:()=>Xt,PxKeyframeSchema:()=>ie,PxKeyframeValueSchema:()=>oe,PxLengthAdjust:()=>It,PxLoopDirection:()=>Tt,PxLoopRepeatAt:()=>_t,PxLoopSchema:()=>fe,PxMaskType:()=>Nt,PxMaskedByEffectSchema:()=>Ve,PxNodeBaseSchema:()=>$e,PxNodeSchema:()=>tn,PxOutAction:()=>lt,PxPathOverflow:()=>Et,PxPinAlign:()=>ht,PxPlaybackDirection:()=>at,PxPropertyAnimationSchema:()=>de,PxRepeaterEffectSchema:()=>Fe,PxRetimeEffectSchema:()=>Le,PxScrollAxis:()=>ft,PxScrollKind:()=>ut,PxScrollPhase:()=>pt,PxScrollRangePointSchema:()=>Ae,PxScrollRangeSchema:()=>xe,PxScrollSchema:()=>we,PxScrollSource:()=>dt,PxStartOn:()=>st,PxStrokeTrimEffectSchema:()=>We,PxStrokeTrimSubPaths:()=>Ft,PxSvgNodeRootSchema:()=>en,PxTextEffectSchema:()=>qe,PxTextPathEffectSchema:()=>Je,PxTextPathMethod:()=>Ct,PxTextPathSpacing:()=>Rt,PxTimelineEngine:()=>bt,PxTimelineEngineSetting:()=>kt,PxTimelineSchema:()=>Te,PxTransformByEffectSchema:()=>Re,PxTransformPartsSchema:()=>he,PxTransformValueSchema:()=>pe,PxTriggerSchema:()=>ve,PxUnits:()=>zt,PxWireStepKind:()=>Y,PxWireVersionRelation:()=>W,applyAnimatorConfig:()=>ua,applyWireSteps:()=>tt,calcAnimationValues:()=>_r,clampSeekMs:()=>Ji,compareWireVersion:()=>q,controlModeTakesOverTrigger:()=>St,convertWireDocument:()=>et,createAdapterAnimator:()=>$i,createRunClock:()=>Yi,describeSchema:()=>E,diagnoseDocument:()=>fa,downgradeWireDocument:()=>ot,flattenAnimatorTimeline:()=>Ht,foldTimelineOverride:()=>la,formatWireVersion:()=>G,generateNewIds:()=>cn,getAnimatorConfig:()=>qt,getBindings:()=>ee,getChildren:()=>ne,getDefinitions:()=>te,isNativeForced:()=>xt,isPxDocument:()=>Jt,isValidPlaybackRate:()=>Ki,isValidPxDocument:()=>on,materializeAllInTree:()=>Bi,materializeNodeEffects:()=>Ni,mayUseNativeScrollTimeline:()=>wt,mergeAnimatorConfig:()=>ca,nestAnimatorTimeline:()=>$t,normalizeBindings:()=>Sr,parseWireVersion:()=>B,progressSpanMs:()=>Xi,progressToTimeMs:()=>Qi,px:()=>C,readWireVersion:()=>J,resolveControlMode:()=>Ot,resolveTimelineEngine:()=>At,resolveTrigger:()=>Mt,schemaKeys:()=>D,seekCeilingMs:()=>Zi,timeToProgress:()=>qi,toDomProps:()=>Un,validateDocument:()=>He,validateNodeEffects:()=>Ye,wireVersionAdvice:()=>Q}),module.exports=(t=p,((t,n,o,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let l of i(n))s.call(t,l)||l===o||e(t,l,{get:()=>n[l],enumerable:!(a=r(n,l))||a.enumerable});return t})(e({},"__esModule",{value:!0}),t));function m(t){if(!t.length)return".";let e="";for(const n of t)n.startsWith("[")?e+=n:e+=(e?".":"")+n;return e}var g=class{_canSanitize(t){return this.isValid(t)}optional(){return new v(this)}},v=class extends g{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)}},y=class extends g{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(m(null!=n?n:[])+": expected string, got "+typeof t),!1)}},b=class extends g{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(m(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},k=class extends g{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(m(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},A=class extends g{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(m(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},x=class extends g{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(m(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},w=class extends g{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=m(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))}},P=class extends g{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(m(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)}},j=class extends g{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(m(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(m(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},O=class extends g{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=f({},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(m(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)}},S=class extends g{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(m(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)}},M=class extends g{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(m(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)}},_=class extends g{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},T=class extends g{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return void 0!==t||(null==e||e.errors.push(m(null!=n?n:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}},N=class extends g{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)}},z=class extends g{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(m(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 D(t){return Object.fromEntries(Object.keys(t._shape).map(t=>[t,t]))}function E(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 I,C={string:(t="")=>new y(t),number:(t=0)=>new b(t),boolean:(t=!1)=>new k(t),literal:t=>new A(t),enum:(t,e)=>new x(t,e),union:(t,e)=>new w(t,e),discriminatedUnion:(t,e)=>new P(t,e),object:t=>new j(t),openObject:(t,e)=>new O(t,e),extendedObject:(t,e)=>new j(f(f({},t._shape),e)),array:t=>new S(t),record:t=>new M(t),any:()=>new _,defined:()=>new T,tuple:t=>new z(t),lazy:(t,e)=>new N(t,e)},R="1.1",F="version",V="animator",U="meta",W=(t=>(t.unstamped="unstamped",t.same="same",t.older="older",t.newer="newer",t.otherGeneration="otherGeneration",t))(W||{}),L=/^(\d+)\.(\d+)(?:\.(\d+))?$/;function B(t){if("string"!=typeof t)return;const e=L.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 G(t){return t.a+"."+t.b+"."+t.c}var K=null!=(I=B(R))?I:{a:1,b:1,c:0};function Z(t){if(!t||"object"!=typeof t)return;const e=X(t,V);if(e)return e;const n=X(t,U);return n?X(n,V):void 0}function X(t,e){const n=t[e];return n&&"object"==typeof n&&!Array.isArray(n)?n:void 0}function J(t){const e=Z(t);return e?B(e[F]):void 0}function q(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 Q(t,e,n,r){if(!e)return;const o=r?"player":"editor",i="written for schema "+G(e)+", this "+o+" reads "+G(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 Y=(t=>(t.additive="additive",t.converted="converted",t))(Y||{}),H="1.1",$=[];function tt(t,e){const n=J(t),r=q(n,e.target,e.readerReadsEditorPart);if(!n||"older"!==r)return{doc:t,from:n,relation:r,applied:[],advice:Q(r,n,e.target,!e.readerReadsEditorPart)};const o=[];for(const t of e.steps){const r=B(t.to);r&&("older"===q(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=nt(t),a=[];for(const t of o)try{t.up(i),a.push(t)}catch(t){break}return a.length?(rt(i,e.target,e.readerReadsEditorPart),{doc:i,from:n,relation:r,applied:a}):{doc:t,from:n,relation:r,applied:[]}}function et(t){return tt(t,{steps:$,target:K,readerReadsEditorPart:!1})}function nt(t){const e=globalThis.structuredClone;return e?e(t):JSON.parse(JSON.stringify(t))}function rt(t,e,n){const r=Z(t);if(!r)return;const o=B(r[F]);r[F]=G({a:e.a,b:e.b,c:n?e.c:o?o.c:0})}function ot(t,e){return function(t,e){const n=J(t);if(!n)return{ok:!1,blocking:[],reason:"The document carries no version, so there is nothing to convert down from."};const r=q(n,e.target,e.readerReadsEditorPart);if("otherGeneration"===r)return{ok:!1,blocking:[],reason:"Schema "+G(n)+" and "+G(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=B(t.to);r&&"newer"===q(r,e.target,e.readerReadsEditorPart)&&"newer"!==q(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 "+G(e.target)+": "+i.map(t=>t.from+" → "+t.to+" ("+t.reason+")").join("; ")+" cannot be undone."};const a=nt(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 rt(a,e.target,e.readerReadsEditorPart),{ok:!0,doc:a,applied:s}}(t,{steps:$,target:e,readerReadsEditorPart:!1})}var it={forwards:"forwards",backwards:"backwards",both:"both",none:"none"},at={normal:"normal",reverse:"reverse",alternate:"alternate",alternateReverse:"alternate-reverse"},st={load:"load",mouseOver:"mouseOver",click:"click",scrollIntoView:"scrollIntoView",programmatic:"programmatic"},lt={continue:"continue",pause:"pause",reset:"reset",reverse:"reverse"},ct={hold:"hold",reset:"reset"},ut={view:"view",scroll:"scroll"},ft={block:"block",inline:"inline",x:"x",y:"y"},dt={nearest:"nearest",root:"root"},ht={top:"top",center:"center",bottom:"bottom"},pt={cover:"cover",contain:"contain",entry:"entry",exit:"exit",entryCrossing:"entry-crossing",exitCrossing:"exit-crossing"},mt={sampled:"sampled",offsetPath:"offsetPath"},gt=["duration","iterations","engine","frameRate"],vt=["trigger","delay","fillMode","direction"],yt=[...gt,...vt,"fill","resetOnFinish","timelineSource","scroll"],bt={native:"native",js:"js"},kt=d(f({},bt),{auto:"auto"});function At(t){return t===kt.js?bt.js:bt.native}function xt(t){return t===kt.native}function wt(t){return t!==kt.js}var Pt={startOn:"load",outAction:"continue",scrollIntoViewThreshold:0},jt={static:"static",fixedTime:"fixedTime",play:"play",autoplay:"autoplay"};function Ot(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:jt.fixedTime,warnings:o}):n?(r&&o.push(i("play/pause","autoplay","play/pause")),{mode:jt.play,warnings:o}):r?{mode:jt.autoplay,warnings:o}:{mode:jt.static,warnings:o}}function St(t){return t!==jt.autoplay}function Mt(t){var e,n,r;return{startOn:null!=(e=null==t?void 0:t.startOn)?e:Pt.startOn,outAction:null!=(n=null==t?void 0:t.outAction)?n:Pt.outAction,scrollIntoViewThreshold:null!=(r=null==t?void 0:t.scrollIntoViewThreshold)?r:Pt.scrollIntoViewThreshold}}var _t={start:"start",end:"end"},Tt={normal:"normal",alternate:"alternate"},Nt={luminance:"luminance",alpha:"alpha"},zt={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},Dt={translate:"translate"},Et={clip:"clip",extend:"extend"},It={spacing:"spacing",spacingAndGlyphs:"spacingAndGlyphs"},Ct={align:"align",stretch:"stretch"},Rt={auto:"auto",exact:"exact"},Ft={separate:"separate",combined:"combined"},Vt="textContent",Ut="class",Wt="transform",Lt="offsetDistance",Bt=new Set(["type","children","animator","meta","animate","effects",Vt]),Gt={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},Kt=[Gt.translate,Gt.rotate,Gt.scale,Gt.origin],Zt={pad:"pad",reflect:"reflect",repeat:"repeat"},Xt={linear:"linear",radial:"radial"};function Jt(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}function qt(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=Qt.get(n);if(r)return r;const o=n,i=yt.filter(t=>void 0!==o[t]),a=i.length?f({},o):n;for(const t of i)delete a[t];const s=Ht(a);return Qt.set(n,s),s}var Qt=new WeakMap,Yt=new WeakMap;function Ht(t){const e=t.timeline;if(null==e||"object"!=typeof e)return t;const n=Yt.get(t);if(n)return n;const r=t,{timeline:o}=r,i=h(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=f({},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=h(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 Yt.set(t,i),i}function $t(t){if(!t||void 0!==t.timeline)return t;const e=t,{timelineSource:n,scroll:r,trigger:o,delay:i,iterations:a,direction:s,fill:l,resetOnFinish:c,duration:u,engine:p,frameRate:m}=e,g=h(e,["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","engine","frameRate"]);if("scroll"===n){const t={type:(v=null==r?void 0:r.kind,"scroll"===v?"scroll":"view")};if(void 0!==p&&(t.engine=p),void 0!==m&&(t.frameRate=m),void 0!==u&&(t.duration=u),"number"==typeof a&&(t.iterations=a),r){void 0!==r.axis&&(t.axis=r.axis),void 0!==r.source&&(t.source=r.source),void 0!==r.subject&&(t.subject=r.subject),void 0!==r.smoothing&&(t.smoothing=r.smoothing),void 0!==r.range&&(t.range=r.range);void 0!==r.pinAlign||void 0!==r.pinOffset||void 0!==r.pinDistance?t.pin=f(f(f({},void 0!==r.pinAlign?{align:r.pinAlign}:{}),void 0!==r.pinOffset?{offset:r.pinOffset}:{}),void 0!==r.pinDistance?{distance:r.pinDistance}:{}):void 0!==r.pin&&(t.pin=r.pin)}return d(f({},g),{timeline:t})}var v;const y={};if(void 0!==p&&(y.engine=p),void 0!==m&&(y.frameRate=m),void 0!==u&&(y.duration=u),void 0!==o||c){const t=f({},o||{});c&&(t.finishAction="reset"),y.trigger=t}return void 0!==i&&(y.delay=i),void 0!==a&&(y.iterations=a),void 0!==s&&(y.direction=s),void 0!==l&&(y.fillMode=l),Object.keys(y).length>0?d(f({},g),{timeline:y}):g}function te(t){var e;if(t)return null==(e=qt(t))?void 0:e.definitions}function ee(t){var e;if(t)return null==(e=qt(t))?void 0:e.bindings}function ne(t){return null==t?void 0:t.children}var re=C.union([C.string(),C.tuple([C.number(),C.number(),C.number(),C.number()])]),oe=C.union([C.string(),C.number(),C.array(C.number()),C.object({pathData:C.string()}),C.lazy(()=>C.array(Ge),[]),C.lazy(()=>he,{})]),ie=C.object({time:C.number().optional(),value:oe.optional(),easing:re.optional(),tangentOut:C.tuple([C.number(),C.number()]).optional(),tangentIn:C.tuple([C.number(),C.number()]).optional()}),ae=t=>{var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0},se=t=>{var e;return null!=(e=t.value)?e:t.v},le=t=>{var e;return null!=(e=t.easing)?e:t.e},ce=t=>t.tangentIn,ue=t=>t.tangentOut,fe=C.object({segmentCount:C.number().optional(),repeatAt:C.enum([_t.start,_t.end]).optional(),direction:C.enum([Tt.normal,Tt.alternate]).optional()}),de=C.object({value:oe.optional(),keyframes:C.array(ie).optional(),loop:C.union([fe,C.boolean()]).optional(),autoOrient:C.boolean().optional(),alongPathMode:C.enum([mt.sampled,mt.offsetPath]).optional()}),he=C.object({translate:C.tuple([C.number(),C.number()]).optional(),rotate:C.number().optional(),skew:C.number().optional(),scale:C.tuple([C.number(),C.number()]).optional(),origin:C.tuple([C.number(),C.number()]).optional()}),pe=C.union([C.string(),he,C.object({value:he}),de]),me=C.record(de),ge=C.union([C.string(),C.array(C.union([C.string(),me])),me]),ve=C.object({startOn:C.enum([st.load,st.mouseOver,st.click,st.scrollIntoView,st.programmatic],Pt.startOn).optional(),outAction:C.enum([lt.continue,lt.pause,lt.reset,lt.reverse],Pt.outAction).optional(),finishAction:C.enum([ct.hold,ct.reset]).optional(),scrollIntoViewThreshold:C.number().optional()}),ye=C.object({width:C.number(),pathData:C.string()}),be=C.object({fontFamily:C.string(),fontStyle:C.string(),ascent:C.number(),unitsPerEm:C.number(),glyphs:C.record(ye)}),ke=C.object({easings:C.record(C.tuple([C.number(),C.number(),C.number(),C.number()])).optional(),animations:C.record(me).optional(),fonts:C.record(be).optional()}),Ae=C.object({phase:C.enum([pt.cover,pt.contain,pt.entry,pt.exit,pt.entryCrossing,pt.exitCrossing]).optional(),fraction:C.number().optional()}),xe=C.object({start:Ae.optional(),end:Ae.optional()}),we=C.object({kind:C.enum([ut.view,ut.scroll]).optional(),axis:C.enum([ft.block,ft.inline,ft.x,ft.y]).optional(),source:C.enum([dt.nearest,dt.root]).optional(),subject:C.string().optional(),smoothing:C.number().optional(),pin:C.boolean().optional(),pinAlign:C.enum([ht.top,ht.center,ht.bottom]).optional(),pinOffset:C.number().optional(),pinDistance:C.number().optional(),range:xe.optional()}),Pe=C.object({align:C.enum([ht.top,ht.center,ht.bottom]).optional(),offset:C.number().optional(),distance:C.number().optional()}),je=C.enum([kt.auto,kt.native,kt.js]).optional(),Oe=C.object({type:C.literal("time").optional(),engine:je,frameRate:C.number().optional(),duration:C.number().optional(),trigger:ve.optional(),delay:C.number().optional(),iterations:C.union([C.number(),C.literal("infinite")]).optional(),fillMode:C.enum([it.forwards,it.backwards,it.both,it.none]).optional(),direction:C.enum([at.normal,at.reverse,at.alternate,at.alternateReverse]).optional()}),Se={duration:C.number().optional(),iterations:C.number().optional(),engine:je,frameRate:C.number().optional(),axis:C.enum([ft.block,ft.inline,ft.x,ft.y]).optional(),source:C.enum([dt.nearest,dt.root]).optional(),subject:C.string().optional(),smoothing:C.number().optional(),pin:C.union([C.boolean(),Pe]).optional(),range:xe.optional()},Me=C.object(f({type:C.literal("scroll")},Se)),_e=C.object(f({type:C.literal("view")},Se)),Te=C.discriminatedUnion("type",[Oe,Me,_e]),Ne=C.object({target:C.string(),animateWith:C.array(C.string())}),ze=C.object({timeline:Te.optional(),definitions:ke.optional(),bindings:C.array(Ne).optional(),debugGlobalName:C.string().optional(),version:C.string().optional()}),De=C.union([C.string(),C.number(),C.array(C.number()),C.object({value:C.defined()}),he]),Ee=C.union([C.number(),de,C.object({value:C.number()})]),Ie=C.union([C.tuple([C.number(),C.number()]),de,C.object({value:C.tuple([C.number(),C.number()])})]),Ce=C.union([C.string(),de,C.object({value:C.string()})]),Re=C.object({translate:Ie.optional(),rotate:Ee.optional(),scale:Ie.optional(),skew:Ee.optional(),origin:Ie.optional()}),Fe=C.object({copies:C.number().optional(),translate:Ie.optional(),rotate:Ee.optional(),skew:Ee.optional(),scale:Ie.optional(),origin:Ie.optional()}),Ve=C.object({source:C.string().optional(),maskType:C.enum([Nt.luminance,Nt.alpha]).optional(),maskUnits:C.enum([zt.userSpaceOnUse,zt.objectBoundingBox]).optional(),maskContentUnits:C.enum([zt.userSpaceOnUse,zt.objectBoundingBox]).optional(),x:C.number().optional(),y:C.number().optional(),width:C.number().optional(),height:C.number().optional()}),Ue=C.object({pathData:Ce.optional()}),We=C.object({offset:Ee.optional(),range:Ie.optional(),subPaths:C.enum([Ft.separate,Ft.combined]).optional()}),Le=C.object({start:C.number().optional(),stretch:C.number().optional(),timeCrop:C.tuple([C.number(),C.number()]).optional()}),Be=C.object({without:C.enum([Dt.translate]).optional(),source:C.string().optional(),retime:Le.optional()}),Ge=C.object({offset:C.number(),color:C.string()}),Ke=C.union([C.array(Ge),C.object({value:C.array(Ge)}),de]),Ze=C.object({type:C.enum([Xt.linear,Xt.radial]),start:Ie.optional(),end:Ie.optional(),center:Ie.optional(),radius:Ee.optional(),focal:Ie.optional(),stops:Ke.optional(),gradientUnits:C.enum([zt.userSpaceOnUse,zt.objectBoundingBox]).optional(),spreadMethod:C.enum([Zt.pad,Zt.reflect,Zt.repeat]).optional(),gradientTransform:C.string().optional()}),Xe=Ze,Je=C.object({pathData:C.string(),pathOverflow:C.enum([Et.clip,Et.extend]).optional(),lengthAdjust:C.enum([It.spacing,It.spacingAndGlyphs]).optional(),method:C.enum([Ct.align,Ct.stretch]).optional(),spacing:C.enum([Rt.auto,Rt.exact]).optional(),startOffset:Ee.optional(),textLength:Ee.optional()}),qe=C.object({useGlyphs:C.boolean().optional()}),Qe=C.object({transformBy:Re.optional(),repeater:Fe.optional(),maskedBy:Ve.optional(),clipPath:Ue.optional(),strokeTrim:We.optional(),clone:Be.optional(),fillGradient:Ze.optional(),strokeGradient:Xe.optional(),textPath:Je.optional(),text:qe.optional()});function Ye(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!Qe.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 He(t,e){var n;const r=!1!==(null==e?void 0:e.strict),o={errors:[],warnings:[],strict:r},i=nn.isValid(t,o,["root"])?[]:[...o.errors];if(t&&"object"==typeof t){for(const e of Ye(t,{strict:r}))i.includes(e)||i.push(e);const e=null==(n=qt(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=qt(t))?void 0:e.version;return void 0===n||void 0!==B(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 $e=C.openObject({type:C.string(),domType:C.string().optional(),textContent:C.string().optional(),id:C.string().optional(),meta:C.any().optional(),effects:Qe.optional(),animate:ge.optional(),style:C.record(C.union([C.string(),C.number()])).optional()},De),tn=C.openObject(d(f({},$e._shape),{children:C.lazy(()=>C.array(tn),[]).optional()}),De),en=C.object({width:C.union([C.number(),C.string()]).optional(),height:C.union([C.number(),C.string()]).optional(),viewBox:C.string().optional(),animator:ze.optional()}),nn=C.openObject(d(f(f({},$e._shape),en._shape),{type:C.literal("svg"),children:C.array(tn).optional()}),De),rn=C.object({v:C.array(C.array(C.number())),i:C.array(C.array(C.number())).optional(),o:C.array(C.array(C.number())).optional(),c:C.boolean().optional()});function on(t){const e=He(t,{strict:!1});return{valid:0===e.length,errors:e}}var an=0;function sn(){return"_px_"+Date.now().toString(36)+(++an).toString(36)+Math.random().toString(36).substring(2,6)}function ln(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>ln(t));const e=t,n={};for(const t of Object.keys(e))n[t]=ln(e[t]);return n}function cn(t){var e;const n=ln(t),r=new Map,o=new Set(["href","xlink:href"]),i=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),a=new Set(["targetId","boundElementId"]),s=(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=sn();r.set(t,n),e.id=n}else e.animate&&(e.id=sn());if(Array.isArray(e.children))for(const n of e.children)t(n)}}(n),function t(e,n){if(e&&"object"==typeof e)for(const[l,c]of Object.entries(e))if("children"!==l)if("string"==typeof c)if(o.has(l)&&c.startsWith("#")){const t=c.slice(1),n=r.get(t);n&&(e[l]="#"+n)}else if(i.has(l))e[l]=un(c,r);else if(a.has(l)||s(l,n)){const t=c.startsWith("#"),n=r.get(t?c.slice(1):c);n&&(e[l]=t?"#"+n:n)}else c.includes("url(#")&&(e[l]=un(c,r));else if("style"===l&&"object"==typeof c&&null!==c)for(const[t,e]of Object.entries(c))"string"==typeof e&&(c[t]=un(e,r));else"object"==typeof c&&null!==c&&t(c,l);else if(Array.isArray(c))for(const e of c)t(e)}(n);const l=null==(e=n.animator)?void 0:e.bindings;if(Array.isArray(l)){const t=l.map(t=>{var e;const n=t.target.startsWith("#"),o=n?t.target.slice(1):t.target,i=null!=(e=r.get(o))?e:o;return d(f({},t),{target:n?"#"+i:i})});n.animator=d(f({},n.animator),{bindings:t})}return n}function un(t,e){return t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t})}function fn(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("L"+f[0]+","+f[1]):u.push("C"+i[0]+","+i[1]+","+c[0]+","+c[1]+","+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 dn(t,e,n){return t+(e-t)*n}function hn(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=dn(t[i]||0,e[i]||0,n);return r}function pn(t,e,n){return[dn(t[0]||0,e[0]||0,n),dn(t[1]||0,e[1]||0,n),dn(t[2]||0,e[2]||0,n),dn(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}function mn(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(gn(t[i],e[i],n));return o}function gn(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),p=[],m=[],g=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];p.push(hn(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;m.push(hn(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(hn(b,k,d))}return{v:p,i:m.length?m:void 0,o:g.length?g:void 0,c:null!=(f=t.c)?f:e.c}}function vn(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 yn(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,s=1-i-a;return function(t){return n=vn(e,r,t),((s*n+a)*n+i)*n;var n}}function bn(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function kn(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=vn(n,o,e),s=[n,r],l=[o,i],{left:c,right:u}=function(t,e,n,r,o){const i=bn(t,e,o),a=bn(e,n,o),s=bn(n,r,o),l=bn(i,a,o),c=bn(a,s,o),u=bn(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,p;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 m=1-f,g=1-d;return m>1e-9&&Math.abs(g)>1e-9&&(p=[(u[1][0]-f)/m,(u[1][1]-d)/g,(u[2][0]-f)/m,(u[2][1]-d)/g]),{left:h,right:p}}function An(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function xn(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 wn(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 Pn=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),jn=new Set(["translate","rotate","scale","skew"]),On=new Set(["offset-distance","offsetDistance"]);function Sn(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 Mn=1e3;function _n(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}function Tn(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var Nn=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 zn(t){return Nn.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Dn(t,e,n){return Math.max(e,Math.min(t,n))}function En(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 In=1e-4;function Cn(t,e,n,r,o){const i=Rn(t,e,n,r,o);if(0===i[0]&&0===i[1]){return Rn(t,e,n,r,o<.5?o+In:o-In)}return i}function Rn(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 Fn(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=En(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=En(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 Vn(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 Un(t){const e={};for(const n of Object.keys(t)){const r=_n(n);if(Bt.has(r))continue;if("style"===r)continue;let o=t[n];if(Pn.has(r)&&Array.isArray(o))e[r]=xn(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)jn.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),e[Wt]=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[Wt]=Sn(t,{withUnits:!1})}}return e}function Wn(t){const e=se(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 Ln(t){return ae(t)}function Bn(t){return le(t)}function Gn(t){const e=t.keyframes;if(!Array.isArray(e))return!1;if(t.autoOrient)return!0;for(const t of e)if(ce(t)||ue(t))return!0;return!1}var Kn=new WeakMap;function Zn(t,e,n,r){let o=Kn.get(t);const i=null==o?void 0:o.get(e);if(i)return i;const a=ue(t),s=ce(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=Fn(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,Kn.set(t,o)),o.set(e,f),f}var Xn=.5,Jn=5,qn=32;function Qn(t,e){var n,r,o;if(!Gn(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:Xn,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:Jn,c=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:qn,u=[],f=Wn(i[0]);if(!f)return t;const d=a?function(t,e){const n=Wn(t),r=Wn(e);if(!n||!r)return 0;const o=Zn(t,e,n,r),i=Cn(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(Hn(Ln(i[0]),er($n(i[0]),$n(i[0]),0,f,d,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=Wn(e),o=Wn(n);r&&o?(a&&t>0&&rr(u,e,n,r,o,l),ir(u,e,n,r,o,a,s,l,c)):u.push(Hn(Ln(n),er($n(n),$n(n),1,null!=o?o:[0,0],void 0,a)))}const h=Bn(i[i.length-1]);h&&(u[u.length-1].e=h),a&&Yn(u);const p={keyframes:u};return void 0!==t.loop&&(p.loop=t.loop),p}function Yn(t){let e;for(const n of t){const t=se(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 Hn(t,e){return{t:t,v:e}}function $n(t){const e=se(t);if(e&&"object"==typeof e&&!Array.isArray(e))return e}function tr(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 er(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]=tr(o,s,n))}return void 0!==o&&(a.rotate=o+nr(t,e,n)),a}function nr(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=tr(r,o,n);return"number"==typeof i?i:0}function rr(t,e,n,r,o,i){const a=t[t.length-1],s=se(a),l=null==s?void 0:s.rotate;if("number"!=typeof l)return;const c=$n(e),u=l-nr(c,c,0),f=Zn(e,n,r,o),d=Cn(f.P0,f.P1,f.P2,f.P3,0),h=180*Math.atan2(d[1],d[0])/Math.PI,p=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(h,u);if(Math.abs(p)<=i)return;const m=Ln(e),g=Math.min(m+or,(m+Ln(n))/2),v=er($n(e),$n(e),0,r,h,!0);t.push(Hn(g,v))}var or=.05;function ir(t,e,n,r,o,i,a,s,l){const c=Zn(e,n,r,o),u=Ln(e),f=Ln(n),d=Bn(e),h=(p=d)?yn([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=$n(e),g=$n(n),v=function(t,e,n,r,o){const i=[];ar(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),ar(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++)sr(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=Vn(c.lut,t),n=Dn(c.totalArc>0?e/c.totalArc:t,0,1),r={u:Dn(h(n),0,1),p:n,pos:En(c.P0,c.P1,c.P2,c.P3,t)};if(i){const e=Cn(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?Dn((n.u-k)/(1-k),0,1):1,{left:o,right:a}=kn(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=er(m,g,n.p,n.pos,n.rotateDeg,i);t.push(Hn(l,c)),b=a,k=n.u}}function ar(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 sr(t,e,n,r,o,i,a,s){const l=(t+e)/2,c=En(r.P0,r.P1,r.P2,r.P3,t),u=En(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=En(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=En(r.P0,r.P1,r.P2,r.P3,l),p=En(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(lr(d,c,u),lr(h,c,u),lr(p,c,u));let g=!0;if(o){const n=Cn(r.P0,r.P1,r.P2,r.P3,t),o=Cn(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)}m<=i&&g||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,sr(t,l,n,r,o,i,a,s),sr(l,e,n,r,o,i,a,s))}function lr(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 cr(t,e){const n=ur(t,e);return null!=n?n:t}function ur(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=ur(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&&Gn(n)){const o=Qn(n,e);o!==n&&(r=d(f({},t),{transform:o}))}}if(!n&&!r)return null;const i=f({},t);return n&&(i.children=n),r&&(i.animate=r),i}var fr=1;function dr(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=>dr(t[n],e[n]))}function hr(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 pr(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function mr(t){return"string"==typeof t&&void 0!==pr(t)}function gr(t){if(t&&"object"==typeof t&&"string"==typeof t.pathData){const e=pr(t.pathData);return e?{paths:hr(e)}:t}if(t&&"object"==typeof t&&"paths"in t){const e=t.paths;if(Array.isArray(e)&&e.length>0&&mr(e[0])){const t=[];for(const n of e){const e=pr(n);e&&t.push(...hr(e))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&mr(t[0])){const e=[];for(const n of t){const t=pr(n);t&&e.push(...hr(t))}return{paths:e}}return{paths:t}}if(mr(t)){return{paths:hr(pr(t))}}return t}function vr(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 yr(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 br(t,e,n,r){var o,i;if("d"===t){return{paths:mn(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)}}return Pn.has(t)?pn(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?dn(e,n,r):jn.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?hn(e||[],n||[],r):dn(+(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]=dn(+(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]=hn(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function kr(t,e,n,r){var o,i,a,s,l;const c=e.length-1,u=Dn(null!=(o=n.segmentCount)?o:c,1,c);let h;h=n.repeatAt===_t.start?e.slice(0,u+1):e.slice(c-u);const p=null!=(i=e[0].t)?i:0,m=null!=(a=e[e.length-1].t)?a:0;let g,v;n.repeatAt===_t.start?(g=0,v=p):(g=m,v=r);const y=v-g;if(y<=0)return e;const b=null!=(s=h[0].t)?s:0,k=(null!=(l=h[h.length-1].t)?l:0)-b;if(k<=0)return e;const A=h.map(t=>({relT:(t.t-b)/k,v:t.v,e:t.e,tangentIn:ce(t),tangentOut:ue(t)})),x=Math.floor(y/k),w=y-x*k,P=w/k,j=[],O=n.repeatAt!==_t.start,S=e[e.length-1];let M,_=!1;function T(e,n,r){var o;let i;if(n){i=[];for(let t=A.length-1;t>=0;t--)i.push({relT:1-A[t].relT,v:A[t].v,e:t>0?An(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else i=A;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?yn(o.e)(l):l,u=br(t,o.v,r.v,c),{left:f}=kn(o.e,l);return j.length>0&&o.relT<=a&&(j[j.length-1].e=f),void j.push({t:e+a*k,v:u,e:void 0})}const s=j.length>0?j[j.length-1]:S,l=O&&0===n&&void 0!==s&&Math.abs((null!=(o=s.t)?o:0)-(e+r.relT*k))<1e-9;if(l){if(dr(s.v,r.v)){j.length>0?(s.e=r.e,s.tangentOut=r.tangentOut):(M=r.e,_=!0);continue}j.length>0&&(delete s.tangentIn,delete s.tangentOut)}const c={t:e+r.relT*k+(l?fr: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),j.push(c)}}if(n.repeatAt===_t.start){if(P>1e-9){!function(e,n,r){let o;if(n){o=[];for(let t=A.length-1;t>=0;t--)o.push({relT:1-A[t].relT,v:A[t].v,e:t>0?An(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else o=A;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?yn(a.e)(o):o,l=br(t,a.v,r.v,s),{right:c}=kn(a.e,o);j.push({t:e,v:l,e:c})}const s={t:e+(r.relT-i)*k,v:r.v,e:n<o.length-1?r.e:void 0};r.tangentIn&&(s.tangentIn=r.tangentIn),r.tangentOut&&(s.tangentOut=r.tangentOut),j.push(s)}}(g,n.direction===Tt.alternate&&x%2==0,P)}for(let t=0;t<x;t++){const e=x-1-t,r=n.direction===Tt.alternate&&e%2==0;T(g+w+t*k,r)}}else{for(let t=0;t<x;t++){const e=n.direction===Tt.alternate&&t%2==0;T(g+t*k,e)}if(P>1e-9){const t=n.direction===Tt.alternate&&x%2==0;T(g+x*k,t,P)}}if(n.repeatAt===_t.start)return[...j,...e];if(_&&e.length>0){return[...e.slice(0,-1),d(f({},e[e.length-1]),{e:M}),...j]}return[...e,...j]}function Ar(t,e,n,r){var o;const i=e.keyframes||[],a=[];for(const e of i){const n=ae(e);let i=se(e);const s=le(e);"d"===t&&(i=gr(i));const l=Tn(t)?zn(t):t;Pn.has(l)&&(i=null!=(o=wn(i))?o:i);const c={t:n,v:i,e:vr(s,r)},u=ce(e),f=ue(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?kr(t,a,l,n):a}function xr(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=Tn(t)?zn(t):t,s=Pn.has(a),l=i.map(e=>{var n;const r=ae(e);let o=se(e);"d"===t&&(o=gr(o)),s&&(o=null!=(n=wn(o))?n:o);const i={t:r,v:o,e:le(e)},a=ce(e),l=ue(e);return a&&(i.tangentIn=a),l&&(i.tangentOut=l),i}),c={keyframes:kr(t,l,o,n)};return void 0!==e.autoOrient&&(c.autoOrient=e.autoOrient),c}function wr(t,e){const n=Pr(t,e);return null!=n?n:t}function Pr(t,e){let n,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Pr(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=xr(n,o,e);i!==o&&(r||(r=f({},t)),r[n]=i)}}if(!n&&!r)return null;const i=f({},t);return n&&(i.children=n),r&&(i.animate=r),i}var jr=0;function Or(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)?f(f({},n),t):t,o=t[Wt];if(o&&"object"==typeof o){const e=o;if(Array.isArray(e.keyframes)){const n=d(f({},e),{keyframes:e.keyframes.map(t=>d(f({},t),{value:r(t.value)}))});return void 0!==n.value&&(n.value=r(n.value)),d(f({},t),{transform:n})}return t}const i=Object.keys(t).filter(t=>jn.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=d(f({},s),{keyframes:s.keyframes.map(t=>d(f({},t),{value:d(f({},n),{[a]:t.value})}))});void 0!==l.value&&(l.value=d(f({},n),{[a]:l.value}));const c=f({},t);return delete c[a],d(f({},c),{transform:l})}function Sr(t,e=bt.native){const n=qt(t)||{},r=te(t),o=n.duration||1e3,i=[],a=(t,n,i)=>{if(0===n.length)return null;const a=function(t,e,n,r=bt.native){const o={};for(const[i,a]of Object.entries(t)){if("transform"===i&&"offsetPath"===a.alongPathMode&&void 0!==t.offsetDistance)continue;const s=Ar(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===bt.native&&"transform"===i?Qn(t):t}}return o}(Or(function(t){const e={};for(const n of t)for(const[t,r]of Object.entries(n))e[t]=r;return e}(n),i),o,r,e);return 0===Object.keys(a).length?null:{id:t,animate:a}},s=ee(t);if(s)for(const t of s){const e=t.target.startsWith("#")?t.target.slice(1):t.target,n=t.animateWith.map(t=>yr(t,r)).filter(t=>!!t),o=a(e,n);o&&i.push(o)}const l=t=>{const e=t.animate;if(e&&Object.keys(e).length>0){const n=t.id||"_px_el_"+ ++jr;t.id=n;const o=a(n,function(t,e){if(!t)return[];const n=[];if("string"==typeof t){const r=yr(t,e);r&&n.push(r)}else if(Array.isArray(t))for(const r of t){const t=yr(r,e);t&&n.push(t)}else n.push(t);return n}(e,r),t.transform);o&&i.push(o)}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 Mr(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,p=0,m=1,h===d?p:p+(f-d)/(h-d)*(m-p));var f,d,h,p,m;u=Dn(u,0,1);const g=le(l);if(g&&Array.isArray(g))try{u=yn(g)(u)}catch(t){}let v=Tn(t)?zn(t):t,y=null;const b=null==l?void 0:l.v,k=null==c?void 0:c.v;if("d"===v){y=mn(null!=(i=null==b?void 0:b.paths)?i:Array.isArray(b)?b:[],null!=(a=null==k?void 0:k.paths)?a:Array.isArray(k)?k:[],u).map(t=>fn(t)).join("")}else if(Pn.has(v))y=xn(pn(b||[0,0,0,1],k||[0,0,0,1],u)),v=t;else if("stroke-dasharray"===v)y=hn(b||[],k||[],u).join(" "),v=t;else if("transform"!==v||null===b||"object"!=typeof b||Array.isArray(b))if("translate"===v){y="translate("+hn(b||[0,0],k||[0,0],u).join(",")+")",v="transform"}else if("rotate"===v){y="rotate("+dn(+(b||0),+(k||0),u)+")",v="transform"}else if("scale"===v){y="scale("+hn(b||[1,1],k||[1,1],u).join(",")+")",v="transform"}else{y=dn(+(b||0),+(k||0),u)}else{const t=new Set([...b?Object.keys(b):[],...k?Object.keys(k):[]]),n={};for(const e of t){const t=null==b?void 0:b[e],r=null==k?void 0:k[e];if("rotate"===e||"skew"===e)n[e]=dn(+(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=hn(t||o,r||o,u);n[e]=i}}if(Gn(e)){const t=b.translate,r=k.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,e,n,r,o,i){const a=Zn(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=En(a.P0,a.P1,a.P2,a.P3,s);if(!i)return{translate:l};const c=Cn(a.P0,a.P1,a.P2,a.P3,s);return{translate:l,rotateDeg:180*Math.atan2(c[1],c[0])/Math.PI}}(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)}}y=Sn(n,{withUnits:!1}),v="transform"}return On.has(v)&&"number"==typeof y&&(y=100*y+"%"),{k:v,v:null===y?"":""+y}}function _r(t,e){const n={};for(const[r,o]of Object.entries(t)){const t=Mr(r,o,e);t&&(n[t.k]=t.v)}return n}function Tr(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 Nr(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(Dr),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 zr(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=f({},c||{}),d={keyframes:n.keyframes};void 0!==n.loop&&(d.loop=n.loop),void 0!==n.autoOrient&&(d.autoOrient=n.autoOrient),u[e]=d,t.animate=u;const h=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!==h&&(t[e]=l(h))}function Dr(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=f({},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 Er(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 Ir(t,e,n){if(!e)return t;delete t.transform;let r=t;return r=Rr(r,e.origin,!0),r=Cr(r,"scale",e.scale,n),r=Cr(r,"skew",e.skew,n),r=Cr(r,"rotate",e.rotate,n),r=Rr(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=Cr(r,"translate",e.translate,n):(r=Rr(r,e.origin,!0),r=Cr(r,"translate",e.translate,n),r=Rr(r,e.origin,!1)),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function Cr(t,e,n,r){if(void 0===n)return t;const o=Nr(n);if("static"===o.kind)return{type:"g",transform:{value:Tr(e,o.value,void 0)},children:[t]};if("animated"===o.kind){const n={keyframes:o.keyframes.map(t=>Er(t,Tr(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 Rr(t,e,n){if(void 0===e)return t;const r=Nr(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=>Er(t,{translate:o(t.value)}))};return void 0!==r.loop&&(e.loop=r.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function Fr(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(Fr);const e={};for(const n of Object.keys(t))e[n]=Fr(t[n]);return e}function Vr(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 Wr(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 Lr(t,e){return"_lw_"+e+"_"+t.nextId++}function Br(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function Gr(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Gr(t,e))}var Kr=Fr;function Zr(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=Br(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=>Zr(t,e,n))}function Xr(t,e,n,r,o){const i=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=qr(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&&qr((null==(r=t.animate)?void 0:r.transform)||void 0)||a&&qr((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=Jr(i.full),r=Jr(o.full),a=-n[0],s=-n[1],l=r[0]-a,c=r[1]-s;if(0===l&&0===c)return{rest:t};return{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: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=f({},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:a,inner:s}=function(t){if(!t)return{};const e=qr(t.translate),n=void 0!==t.rotate||void 0!==t.scale,r={},o={};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);return{outer:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(e);let l=t;l=Ir(l,s,o);let c={type:"g",id:n,children:[{type:"g",id:r,children:[l]}]};return void 0!==i.transform&&(c.transform=i.transform),void 0!==i.animate&&(c.animate=i.animate),a&&(delete c.id,c=Ir(c,a,o),c.id=n),c}function Jr(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 qr(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 Qr(t,e,n,r){if(!e)return t;const o=Lr(n,"grad"),i=function(t,e){const n={type:t.type===Xt.radial?"radialGradient":"linearGradient",id:e};t.type===Xt.linear?(Yr(n,"x1","y1",t.start),Yr(n,"x2","y2",t.end)):(Yr(n,"cx","cy",t.center),function(t,e,n){const r=Nr(n);if("absent"===r.kind)return;zr(t,e,r,{asString:!0})}(n,"r",t.radius),Yr(n,"fx","fy",t.focal));t.gradientUnits&&(n.gradientUnits=t.gradientUnits);t.spreadMethod&&(n.spreadMethod=t.spreadMethod);t.gradientTransform&&(n.gradientTransform=t.gradientTransform);return n.children=function(t){var e,n;if(!t)return[];const r=Nr(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(Hr):[];const o=r.keyframes;if(!o.length)return[];const i=r.loop;let a=0;for(const t of o){const e=se(t);Array.isArray(e)&&e.length>a&&(a=e.length)}if(!a)return[];const s=se(o[0]),l=[];for(let t=0;t<a;t++){const r=null!=(n=null!=(e=null==s?void 0:s[t])?e:$r(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=ae(r),c=se(r),u=null!=(i=null==c?void 0:c[n])?i:$r(e,e.indexOf(r),n);if(!u)continue;const f=le(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:to(t.offset),stopColor:t.color},u={};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);return c}(t,o,e,0,i))}(t.stops),n}(e,o);return n.defs.push(i),t[r]="url(#"+o+")",t}function Yr(t,e,n,r){var o,i,a;const s=Nr(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 Hr(t){return{type:"stop",offset:to(t.offset),stopColor:t.color}}function $r(t,e,n){for(let r=e;r>=0;r--){const e=se(t[r]);if(null==e?void 0:e[n])return e[n]}for(let r=e+1;r<t.length;r++){const e=se(t[r]);if(null==e?void 0:e[n])return e[n]}}function to(t){return Math.round(1e3*t)/10+"%"}function eo(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.pathData?t.pathData:void 0}function no(t,e,n,r){if(!e)return t;const o=Br(e.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=Lr(r,"mask");let a={type:"use",href:"#"+o};if(n)a=ro(a,n,r);else if(so(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=Er(t,void 0);if(Array.isArray(e.translate)&&a.push(d(f(f({},r),ao(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(d(f({},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(d(f({},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 h=t;a.length&&(h={type:"g",animate:{transform:u(a)},children:[h]});s.length&&(h={type:"g",animate:{transform:u(s)},children:[h]});l.length&&(h={type:"g",animate:{transform:u(l)},children:[h]});return h}(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 p=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let m;const g=[];for(;null!==(m=p.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);g.push({name:m[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,p=null!=(o=v.args[1])?o:0;if(h!==-f||p!==-d)continue;const m={};m.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;m.translate=m.translate?[m.translate[0]+t,m.translate[1]+n]:[t,n]}for(let e=t+1;e<g.length-1;e++){const t=g[e];if("rotate"===t.name)m.rotate=(null!=(s=m.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;m.scale=m.scale?[m.scale[0]*e,m.scale[1]*n]:[e,n]}}return m}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={};y&&(A.translate=y);void 0!==b&&(A.rotate=b);k&&(A.scale=k);return 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}}return}(t);e&&(a=ro(a,e,r))}const s=void 0===n&&!function(t){return"string"==typeof t.transform||(!(!t.transform||"object"!=typeof t.transform)||so(t))}(t);a=function(t,e,n,r,o){const i=r.idMap.get(n),a=r.maskAncestorChains.get(e)||[],s=o?fo(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=lo(l),n=lo(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]}}const f=Array.from(u).sort((t,e)=>t-e);return{type:"g",animate:{transform:{keyframes:f.map(t=>{const e=co(l,t),n=co(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}function ro(t,e,n){if(!e)return t;const r=function(t,e){var n;const r=Nr(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=oo(o,"translate",e.translate,void 0,n),o=oo(o,"rotate",e.rotate,r,n),o=oo(o,"scale",e.scale,r,n),o}function oo(t,e,n,r,o){if(void 0===n)return t;const i=Nr("scale"===e&&Array.isArray(n)?[n[0]/100,n[1]/100]:n);if("static"===i.kind)return{type:"g",transform:{value:Tr(e,io(e,i.value),r)},children:[t]};if("animated"===i.kind){const n={keyframes:i.keyframes.map(t=>{const n=Er(t,Tr(e,io(e,t.value),r));return"translate"===e?f(f({},n),ao(t)):n})};return void 0!==i.loop&&(n.loop=i.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function io(t,e){return"translate"===t?[-e[0],-e[1]]:"rotate"===t?-e:[1/e[0],1/e[1]]}function ao(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 so(t){const e=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!e||!e.transform)}function lo(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 co(t,e){let n=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=uo(o.translateKeyframes,e);n+=t[0],r+=t[1]}else o.translate&&(n+=o.translate[0],r+=o.translate[1]);return[n,r]}function uo(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 fo(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}s&&e.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t);return 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 ho(t,e,n){if(!e)return;const r=Br(e.source);if(!r)return void(e.without===Dt.translate&&n.errors.push("clone: content ref missing `source`"));const o=e.without===Dt.translate&&n.contentRefInnerIds.get(r)||r;t.href="#"+o}function po(t,e){const n={};return void 0!==t.translate&&(n.translate=mo(t.translate,t=>[t[0]*e,t[1]*e])),void 0!==t.rotate&&(n.rotate=mo(t.rotate,t=>t*e)),void 0!==t.skew&&(n.skew=mo(t.skew,t=>t*e)),void 0!==t.scale&&(n.scale=function(t,e){const n=t=>[Math.pow(t[0],e),Math.pow(t[1],e)];return mo(t,n,!0)}(t.scale,e)),void 0!==t.origin&&(n.origin=t.origin),Object.keys(n).length?n:void 0}function mo(t,e,n=!1){const r=Nr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=e(r.value);return("number"==typeof t||Array.isArray(t))&&!n?o:{value:o}}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?d(f({},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 go=!1;function vo(t){var e,n;return{start:null!=(e=t.start)?e:0,stretch:null!=(n=t.stretch)?n:1}}var yo=1;function bo(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-yo),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+yo,value:0}],a=f({},t);for(const e of Object.keys(t))delete t[e];t.type="g",t.children=[a],t.animate={opacity:{keyframes:i}}}function ko(t,e){return{start:e.start+e.stretch*t.start,stretch:e.stretch*t.stretch}}function Ao(t){var e,n;return null==(n=null==(e=t.effects)?void 0:e.clone)?void 0:n.retime}function xo(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 wo(t,e,n){const r=Br(t.href);if(!r)return void n.errors.push("retime: <use> has no href to follow");const o=Po(r,e,n,new Set);if(o)if(go){const e=n.idMap.get(o);t.type="g",delete t.href,t.children=[e],Wr(t),n.defs=n.defs.filter(t=>t!==e)}else t.href="#"+o}function Po(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=Kr(o);if(function(t,e){Vr(t,()=>Lr(e,"retimed"))}(i,n),"use"===o.type?Oo(i,e.start,e.stretch):jo(i,e.start,e.stretch),xo(i),"use"===o.type&&o.href){const a=Br(o.href);if(a){const s=Ao(o),l=s?ko(vo(s),e):e,c=new Set(r);c.add(t);const u=Po(a,l,n,c);u&&(i.href="#"+u)}}else!function(t,e,n,r,o){const i=t=>{var a;const s=Ao(t);if("use"===t.type&&s&&t.href){const i=Br(t.href);if(i){const a=ko(vo(s),e),l=new Set(r);l.add(o);const c=Po(i,a,n,l);c&&(t.href="#"+c)}xo(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 jo(t,e,n){var r;Oo(t,e,n),null==(r=t.children)||r.forEach(t=>jo(t,e,n))}function Oo(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,Mo=/[MmLlHhVvCcSsQqTtAaZz]/;function _o(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 To(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++]),p=(t,e,r)=>{const a=[o,i],s=Fn(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]},m=(t,e)=>{p([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];Mo.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)m(h()+(n?o:0),h()+(n?i:0));else if("H"===g)m(h()+(n?o:0),i);else if("V"===g)m(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],p(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],p(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}=_o([o,i],t,e);p(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}=_o([o,i],t,e);p(r,a,e)}else{if("A"!==g){r++;continue}r+=5,m(h()+(n?o:0),h()+(n?i:0))}d=t}else m(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]=En(o.P0,o.P1,o.P2,o.P3,a),[c,u]=Cn(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((o=r,(e=t)<(n=0)?n:e>o?o:e));var e,n,o}}}var No=.15;function zo(t){const e=Nr(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 Do(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 Eo=t=>Math.round(1e3*t)/1e3;function Io(t,e,n){var r;if(!e||"string"!=typeof e.pathData||!e.pathData)return t;const o=Lr(n,"tpath"),{d:i,startShift:a}=function(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=To(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=No*o,a=zo(e.startOffset),s=zo(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 p=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.]+/,"");p="M"+Eo(e)+","+Eo(n)+"L"+Eo(d.x)+","+Eo(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;p+="L"+Eo(t)+","+Eo(e)}return{d:p,startShift:u}}(e.pathData,{pathOverflow:e.pathOverflow,startOffset:e.startOffset,textLength:e.textLength,advance:Do(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),Co(s,"startOffset",function(t,e){if(!e||null==t)return t;const n=Nr(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=>d(f({},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}(e.startOffset,a)),Co(s,"textLength",e.textLength),t.children=[s],t}function Co(t,e,n){null!=n&&zr(t,e,Nr(n),{asString:!0})}var Ro=(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 Fo(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Vo(t,e){let n="";for(let r=0;r<t.length;r++){const o=Fo(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function Uo(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var Wo=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function Lo(t,e,n=2){const r=[];let o;for(Wo.lastIndex=0;null!==(o=Wo.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]=Uo(e,s(),s());i+=t+Vo([r,o],n)}else if("C"===t){const[t,r]=Uo(e,s(),s()),[o,a]=Uo(e,s(),s()),[l,c]=Uo(e,s(),s());i+="C"+Vo([t,r,o,a,l,c],n)}else if("Q"===t){const[t,r]=Uo(e,s(),s()),[o,a]=Uo(e,s(),s());i+="Q"+Vo([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var Bo=16,Go=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",Vt,"xml:space"],Ko=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],Zo=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function Xo(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function Jo(t){return"string"==typeof t?t:void 0}function qo(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of Zo)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function Qo(t,e){var n,r,o,i,a,s,l,c,u,f;const d="text"===t.type,h=t.style,p=e=>{var n;return d?void 0:null!=(n=t[e])?n:null==h?void 0:h[e]},m={fontFamily:null!=(n=Jo(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=Xo(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=Xo(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=Xo(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(c=Xo(p("opacity")))?c:e.opacity,animate:null!=(u=d?void 0:qo(t))?u:e.animate};for(const t of Ko){const n=null!=(f=p(t))?f:e[t];void 0!==n&&(m[t]=n)}return m}function Yo(t){var e,n,r;return{fontFamily:Jo(t.fontFamily),fontSize:null!=(e=Xo(t.fontSize))?e:Bo,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=Xo(t.letterSpacing))?n:0,wordSpacing:null!=(r=Xo(t.wordSpacing))?r:0}}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&&1!==t.opacity&&(e.opacity=t.opacity);for(const n of Ko)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function $o(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 ti(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var ei=.6,ni="px-missing-glyph";function ri(t,e){if(t<=0||e<=0)return"";const n=.08,r=t*n,o=.92*t,i=.92*-e,a=o-r,s=-i,l=Math.max(1,.12*Math.min(a,s)),c="M"+r+" 0L"+o+" 0L"+o+" "+i+"L"+r+" "+i+"Z";if(a<=2*l||s<=2*l)return c;const u=r+l,f=o-l,d=-l,h=i+l;return c+"M"+u+" "+d+"L"+u+" "+h+"L"+f+" "+h+"L"+f+" "+d+"Z"}function oi(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 ii(t,e,n,r,o,i){const{glyphs:a,create:s=Ro,warnings:l}=r,c=e?To(e):null;if(!c)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const u=ti(a),{cells:h,width:p}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,c;const u=Qo(t,s),f=Jo(t[Vt]);if(f&&!(null==(l=t.children)?void 0:l.length)){const t=$o(u,e,n,r);if(t){const e=u.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=Ho(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:ei*t.unitsPerEm,s=a*e;o.push({glyphD:ri(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,Yo(t)),{cells:o,width:i}}(t,a,u,l);if(!h.length)return hi(t,[],s);const{along:m,perp:g}=function(t){var e,n,r;return{along:(null!=(e=Xo(t.x))?e:0)+(null!=(n=Xo(t.dx))?n:0),perp:null!=(r=Xo(t.dy))?r:0}}(t),v=ai(n),y=ai(o),b=t=>t>0&&p>0?t/p:1,k="clip"===i&&!c.closed;if(v.animated||y.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}(v.times,y.times),n=(t,e)=>m+v.at(e)+b(y.at(e))*t.midBase,r=v.animated?v.loop:y.loop;return hi(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/si,.5),c=t=>t>=0&&t<=e.totalLength,u=[];for(const h of t){const t=[h.scale,0,0,h.scale,-h.scale*(h.widthEm/2),0],p=Lo(h.glyphD,t),m=(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:[ci(r-s*l,3),ci(o+s*a,3)],rotate:ci(180*i/Math.PI,3)}}},g=[],v=[],y=(t,e)=>{g.push(m(t,e)),a&&v.push({time:e,value:c(t)?1:0})};y(n(h,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],i=n(h,e),a=n(h,o),s=Math.min(li,Math.max(1,Math.ceil(Math.abs(a-i)/l)));for(let t=1;t<=s;t++){const r=e+t/s*(o-e);y(n(h,r),r)}}Yn(g);const b={keyframes:g};void 0!==o&&(b.loop=o);const k={transform:b};if(h.paint.animate&&Object.assign(k,h.paint.animate),a&&v.some(t=>0===t.value)){const t={keyframes:v};void 0!==o&&(t.loop=o),k.opacity=t}u.push(i("path",d(f(f({d:p},ui(h.paint)),fi(h.isMissing)),{animate:k}),[]))}return u}(h,c,n,e,r,s,k,g),s)}const A=b(y.at(0)),x=m+v.at(0);return hi(t,di((k?h.filter(t=>{const e=x+t.midBase*A;return e>=0&&e<=c.totalLength}):h).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:oi(c,x+t.midBase*A,t.scale,t.widthEm,g)})),s,l),s)}function ai(t){var e;const n=Nr(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 si=48,li=64;function ci(t,e){const n=c(10,e);return Math.round(t*n)/n}function ui(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 Ko)void 0!==t[n]&&(e[n]=t[n]);return e}function fi(t){return t?{[Ut]:ni}:{}}function di(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=Lo(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",f(f(f({d:n},ui(t)),fi(i)),void 0!==t.animate?{animate:f({},t.animate)}:{}),[]));return o}function hi(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===Go.indexOf(e)&&(r[e]=t[e]);if(r.style&&"object"==typeof r.style){const t=f({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return n("g",r,e)}function pi(t,e,n){return(null==e?void 0:e.useGlyphs)?n.glyphs?function(t,e){var n,r,o;const{glyphs:i,create:a=Ro,warnings:s}=e,l=ti(i),c={x:null!=(n=Xo(t.x))?n:0,y:null!=(r=Xo(t.y))?r:0},u=[],f=[{start:c.x,end:c.x}];let d=0;const h=(t,e)=>{var n;const r=$o(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,p=Ho(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:p,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:ei*o;u.push({glyphD:ri(t,h),m:[a,0,0,a,c.x,c.y],paint:p,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}},p=(t,e)=>{var n,r,o;const i=Qo(t,e),a=Xo(t.x),s=Xo(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=Xo(t.dx))?n:0,c.y+=null!=(r=Xo(t.dy))?r:0;const l=Jo(t[Vt]);if(l&&!(null==(o=t.children)?void 0:o.length)&&h(l,i),t.children)for(const e of t.children)p(e,i)},m=Yo(t);if(t.children)for(const e of t.children)p(e,m);const g=Jo(t[Vt]);g&&!(null==(o=t.children)?void 0:o.length)&&h(g,m);const v=Jo(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 hi(t,di(u,a,s),a)}(t,{glyphs:n.glyphs,warnings:n.warnings}):(n.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}function mi(t,e,n){if(!e)return t;const r=e.subPaths===Ft.combined,o=[],i=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const e of t.children)i(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*Ti,d=o*Ti,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"}return}(t);if(void 0===e)return;const n=hr(e);if(!n.length)return;const r={leaf:t,subpaths:[]};for(const t of n){const e=Mi(t);r.subpaths.push({subpath:t,lengthPx:e,startOffsetPx:0})}o.push(r)};if(i(t),!o.length)return t;let a=0;const s=r?[...o].reverse():o;for(const t of s)for(const e of t.subpaths)r||(a=0),e.startOffsetPx=a,a+=e.lengthPx;const l=a;if(r&&l<.001)return t;const c=Nr(e.offset),u="absent"===c.kind?{kind:"static",value:0}:c,h=function(t){const e=Nr(t);if("animated"!==e.kind)return e;const n=e.keyframes.map(t=>({time:ae(t),value:se(t),easing:le(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=Oi(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=Si(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=Si(n,t),r=(e[0]+e[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(e.range),p="absent"===h.kind?{kind:"static",value:[0,1]}:h,m=function(t){if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const e=[];for(const n of t.keyframes){const t=se(n);"number"==typeof t&&e.push(t)}return e}(u),g=[m.length?Math.min(...m):0,m.length?Math.max(...m):0];if(1===o.length&&o[0].leaf===t&&1===o[0].subpaths.length){const e=o[0],n=e.subpaths[0],i=r?l:n.lengthPx;if(i<.001)return t;const a=r?n.startOffsetPx/i:0;return function(t,e,n,r,o,i){const a=bi(n,e,r),s=ki(e,r),l=f({},t);return delete l.effects,wi(l,"strokeDasharray",xi(i,s)),wi(l,"strokeDashoffset",xi(o,a)),wi(l,"strokeOpacity",ji(i)),l}(e.leaf,i,a,g,u,p)}const v=new Map;for(const t of o){const e=[];for(const o of t.subpaths){const i=r?l:o.lengthPx;if(i<.001)continue;const a=r?o.startOffsetPx/i:0;e.push(...vi(t.leaf,o.subpath,i,a,g,u,p,n))}v.set(t.leaf,gi(t.leaf,e))}const y=t=>{const e=v.get(t);return e||(Array.isArray(t.children)&&t.children.length>0?d(f({},t),{children:t.children.map(y)}):t)};return y(t)}function gi(t,e){const n=d(f({},t),{type:"g",children:e});return delete n.d,delete n.strokeDasharray,delete n.strokeDashoffset,delete n.effects,n}function vi(t,e,n,r,o,i,a,s){const l=bi(r,n,o),c=ki(n,o),u=xi(i,l),f=xi(a,c),d=ji(a),h=function(t){return{type:"path",d:t}}(fn(e));return wi(h,"strokeDasharray",f),wi(h,"strokeDashoffset",u),wi(h,"strokeOpacity",d),[h]}var yi=1;function bi(t,e,n){const[r]=Ai(n);return n=>e*(-n-r+t)+yi}function ki(t,e){const[n,r]=Ai(e),o=r-n+1;return e=>{const n=Dn(e[0],0,1),r=Dn(e[1],0,1),i=Math.min(n,r),a=Math.max(n,r),s=[0];let l=yi;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+yi),s}}function Ai(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function xi(t,e){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:e(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:ae(t),value:e(se(t)),easing:le(t)})),loop:t.loop}}function wi(t,e,n){n&&zr(t,e,n)}var Pi=10;function ji(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(se(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=ae(r),l=e(se(r)),c=o?l&&e(se(o)):l,u=a?l&&e(se(a)):l;c&&!u?(i.push({time:s,value:0}),i.push({time:s+Pi,value:1})):!c&&u&&(i.push({time:s-Pi,value:1}),i.push({time:s,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function Oi(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 Si(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 Mi(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+=_i(t,r,r+1);return t.c&&e.length>1&&(n+=_i(t,e.length-1,0)),n}function _i(t,e,n){var r,o,i,a;const s=t.v,l=s[e],c=s[n],u=Fn(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 Ti=.5522847498307936;function Ni(t){var e,n;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:At(null==(e=qt(t))?void 0:e.engine),glyphs:null==(n=te(t))?void 0:n.fonts},o=Kr(t);Gr(o,r.idMap),Zr(o,r,()=>Lr(r,"inner")),function(t,e){const n=new Set,r=t=>{var o,i;const a=Br(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=fo(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(),Gr(t,e.idMap);const n=[],r=t=>{var e;Ao(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&&Ao(o)&&n++,"use"===o.type&&o.href){const t=Br(o.href);t&&!r.has(t)&&(r.add(t),i(e.idMap.get(t)))}null==(a=o.children)||a.forEach(i)}},a=Br(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=Ao(t);if(!n)continue;const r=n.timeCrop;xo(t),wo(t,vo(n),e),r&&bo(t,r,e)}}(t,e),t}(zi(o,r),r);return function(t,e){if(!e.length)return;(t.children||(t.children=[])).unshift({type:"defs",children:e})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function zi(t,e){t.children&&(t.children=t.children.map(t=>zi(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:p}=null!=n?n:{};n&&delete t.effects;let m=t,g=!1;if(null==p?void 0:p.useGlyphs)if(h){const t="string"==typeof h.pathData?h.pathData:void 0,n=function(t,e,n,r,o,i){return e.glyphs?ii(t,n,r,{glyphs:e.glyphs,warnings:e.warnings},o,i):(e.warnings.push("textGlyphs: no definitions.fonts"),null)}(m,e,t,h.startOffset,h.textLength,h.pathOverflow);n&&(m=n,g=!0)}else m=pi(m,p,e),g=!0;return g||(m=Io(m,h,e)),m=function(t,e,n){return Qr(t,e,n,"fill")}(m,f,e),m=function(t,e,n){return Qr(t,e,n,"stroke")}(m,d,e),m=mi(m,c,e),m=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=Kr(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 r=Kr(l),o=po(e,t),i=o?Ir(r,o,n):r;c.push(i)}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}(m,a,e),m=no(m,s,i,e),m=function(t,e,n){if(!(null==e?void 0:e.pathData))return t;const r=Lr(n,"clip"),o={type:"path"},i=Nr(e.pathData);return"absent"!==i.kind&&("static"===i.kind?o.d=eo(i.value):(zr(o,"d",i),void 0!==o.d&&(o.d=eo(o.d)))),n.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(m,l,e),o?(ho(m,u,e),m=Xr(m,i,r,o,e)):m=function(t,e,n,r){return ho(t,e,r),Ir(t,n,r)}(m,u,i,e),(null==u?void 0:u.retime)&&(t.effects={clone:{retime:u.retime}}),r&&e.idMap.set(r,m),m}function Di(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 Ei(t,e,n,r,o=64){let i=0,a=t;for(let s=1;s<=o;s++){const l=Di(t,e,n,r,s/o);i+=Math.hypot(l[0]-a[0],l[1]-a[1]),a=l}return i}var Ii=t=>{const e=Math.round(1e4*t)/1e4;return Object.is(e,-0)?"0":String(e)};function Ci(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=se(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=se(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=>ce(t)||ue(t)))return;let l="M"+Ii(s[0][0])+","+Ii(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=ue(o[t]))?n:[0,0],u=null!=(r=ce(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"+Ii(f[0])+","+Ii(f[1])+","+Ii(d[0])+","+Ii(d[1])+","+Ii(i[0])+","+Ii(i[1]),c.push(Ei(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:ae(o[t]),v:d/u},n=le(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=f({},o);delete n[Wt];const a={keyframes:e.distanceKfs};void 0!==i.loop&&(a.loop=i.loop),n[Lt]=a;const s=t.transform;let l=s;if(s&&"object"==typeof s){const t=f({},s);delete t[Gt.translate],delete t[Gt.origin],l=Object.keys(t).length?t:void 0}r=d(f({},t),{animate:n,style:d(f({},t.style),{offsetPath:"path('"+e.pathStr+"')",offsetAnchor:Ii(e.anchor[0])+"px "+Ii(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=d(f({},r),{children:t}))}return r};return e(t)}function Ri(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=Vi(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=Wi(t.viewBox);if(e)return[e[2],e[3]];const n=Fi(t.width),r=Fi(t.height);return void 0!==n&&void 0!==r?[n,r]:[1,1]}(t),a=[],s=Li(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 d(f({},s),{children:c})}function Fi(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:void 0}}function Vi(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function Ui(t,e,n,r,o,i,a){var s,l,c,u;const h=Fr(e);Vr(h,o);const p="symbol"===h.type?Wi(h.viewBox):void 0,m=null!=(l=null!=(s=Fi(t.width))?s:null==p?void 0:p[2])?l:a[0],g=null!=(u=null!=(c=Fi(t.height))?c:null==p?void 0:p[3])?u:a[1],v="symbol"===h.type?function(t,e,n,r,o){const i=Wi(t.viewBox),a=d(f({},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,h=c>0&&u>0?Math.min(r/c,o/u):1,p=(r-c*h)/2,m=(o-u*h)/2,g=[];0===p&&0===m||g.push("translate("+p+","+m+")");1!==h&&g.push("scale("+h+")");0===s&&0===l||g.push("translate("+-s+","+-l+")");g.length&&(a.transform=g.join(""));const v=e();return n.push({type:"clipPath",id:v,children:[{type:"rect",x:s,y:l,width:c,height:u}]}),a.clipPath="url(#"+v+")",a}(h,o,i,m,g):h,y=Li(v,n,r,o,i,a),b=d(f({},t),{type:"g",children:[y]});return delete b.href,delete b.width,delete b.height,Wr(b)}function Wi(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 Li(t,e,n,r,o,i){if("use"===t.type&&"string"==typeof t.href){const a=Vi(t.href);if(a&&n.has(a)){const s=e.get(a);if(s)return Ui(t,s,e,n,r,o,i)}}if(!t.children)return t;let a=!1;const s=t.children.map(t=>{const s=Li(t,e,n,r,o,i);return s!==t&&(a=!0),s});return a?d(f({},t),{children:s}):t}function Bi(t,e,n){var r,o;let i=Ni(t).root;i=Ci(i);return i=wr(i,null!=(o=null==(r=qt(i))?void 0:r.duration)?o:Mn),e===bt.native&&(i=cr(i,null==n?void 0:n.motionPath),i=Ri(i),i=function(t){const e=t=>t.startsWith("#")?t.slice(1):t,n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let r=!0;for(;r;){r=!1;const o=new Set;n(t,t=>{"use"===t.type&&"string"==typeof t.href&&o.add(e(t.href))}),n(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&&!o.has(t.id)))),e=e.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),e.length!==t.children.length&&(t.children=e,r=!0)})}return t}(i)),i}var Gi="setPlaybackRate: rate must be finite and non-zero";function Ki(t){return Number.isFinite(t)&&0!==t}function Zi(t,e){return t>0?e===1/0?1/0:t*(e>0?e:1):0}function Xi(t,e){return t>0?e===1/0?t:t*(e>0?e:1):0}function Ji(t,e){return Number.isNaN(t)||t<0?0:Number.isFinite(e)?t>e?e:t:Number.isFinite(t)?t:0}function qi(t,e,n){const r=Xi(e,n);return r>0&&Number.isFinite(t)?t<=0?0:n===1/0?t%r/r:t>=r?1:t/r:0}function Qi(t,e,n){const r=Xi(e,n);return r>0&&Number.isFinite(t)?t<=0?0:t>=1?r:t*r:0}function Yi(t,e=Date.now){let n=0,r=0,o=!1,i=1;const a=()=>Ji(o?n+(e()-r)*i:n,t);return{now:a,isRunning:()=>o,start:(s,l)=>{n=Ji(null!=l?l:a(),t),i=Ki(s)?s:1,r=e(),o=!0},stop:()=>{n=a(),r=0,o=!1},seek:i=>{n=Ji(i,t),o&&(r=e())}}}function Hi(t){const e=globalThis;"function"!=typeof e.cancelAnimationFrame?e.clearTimeout(t):e.cancelAnimationFrame(t)}function $i(t,e,n){var r;const o=qt(t)||{},i=Sr(t,bt.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||Mn),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 p=null,m=!1,g=-(o.delay||0),v=0,y=1,b=!1;const k=o.frameRate,A=k&&k>0?1e3/k:0;let x=0;const w=()=>{const t=v?(Date.now()-v)*y:0;return g+t},P=()=>{let t=w();return Number.isFinite(c)&&t>c&&(t=c),t<0&&(t=0),t};function j(t){let n=function(){const e=l>0?l:1;let n=0,r=0;if(l>0){t=Dn(t,0,s*e),r=Math.max(0,Math.ceil(t/e)-1),r=Math.min(r,s-1);n=Dn((t-r*e)/e,0,1)}else 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=_r(r,n*l);for(const[n,r]of Object.entries(o))e.setAttribute(t.id,n,r)}}o.delay&&(o.delay<0?j(P()):h&&j(0));const O=()=>!!m&&(!!e.isConnected()&&(y<0?w()>0:!(Number.isFinite(c)&&P()>=c))),S=t=>{null!==p&&(Hi(p),p=null),(t||O())&&(p=function(t){const e=globalThis;return"function"==typeof e.requestAnimationFrame?e.requestAnimationFrame(t):e.setTimeout(t,16)}(()=>{p=null,(()=>{var t,r;if(!e.isConnected())return void M();const o=P(),i=w();if(i<0&&y>0)h&&j(0);else{if(y<0&&i<=0)return M(),j(0),void(b||(b=!0,null==(t=null==n?void 0:n.onFinish)||t.call(n)));if(y>0&&c&&Number.isFinite(c)&&o>=c)return M(),j(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(x&&t-x<A)return;x=t}j(o)}})(),S()}))},M=()=>{if(!m)return;let t=w();Number.isFinite(c)&&t>c&&(t=c),g=t,v=0,m=!1,null!==p&&(Hi(p),p=null),t>=0?j(t):h&&j(0)},_={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!m){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,m=!0,v=Date.now(),S(!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,m=!1,b=!1,j(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,m=!1,null!==p&&(Hi(p),p=null),j(d?g:0),t&&!b&&(b=!0,null==(e=null==n?void 0:n.onFinish)||e.call(n))})(!0)},setPlaybackRate:t=>{if(!Ki(t))return void console.warn(Gi);let e=w();Number.isFinite(c)&&e>c&&(e=c),t<0!=y<0&&(b=!1),y=t,g=e,m&&(v=Date.now())},getCurrentTime:()=>P(),setCurrentTime:t=>{t=Ji(t,c),g=t,m&&(v=Date.now()),(!Number.isFinite(c)||t<c)&&(b=!1),j(P())},getCurrentProgress:()=>qi(P(),l,s),setCurrentProgress:t=>{_.setCurrentTime(Qi(t,l,s))},destroy:()=>{var t;_.cancel(),null==(t=null==n?void 0:n.onRemove)||t.call(n)}};return _}var ta={document:"document",host:"host",platform:"platform",usage:"usage",internal:"internal"},ea=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],na=["definitions","bindings"],ra=t=>!!t&&"object"==typeof t&&!Array.isArray(t),oa=t=>ra(t)&&"string"==typeof t.type?t.type:"time",ia=t=>"scroll"===t||"view"===t;function aa(t,e){const n=ra(t)?f({},t):{};for(const t of Object.keys(e)){const r=e[t];null!==r?ra(r)?n[t]=aa(n[t],r):n[t]=r:delete n[t]}return n}function sa(t,e,n){const r=oa(t),o=ra(e)&&"string"==typeof e.type?String(e.type):r;let i;if(o!==r){const n={};if(ra(t))for(const e of gt)void 0!==t[e]&&(n[e]=t[e]);i=aa(n,e)}else i=aa(t,e);if(ia(o)){for(const t of vt)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 la(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=ra(n)?f({},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=d(f({},s.trigger),{startOn:a})),{timeline:s}}function ca(t,e){const n=[],r=t=>n.push(t);if(null===e)return{config:void 0,warnings:n};if(!ra(e)||0===Object.keys(e).length)return{config:t,warnings:n};const o=ra(t)?ea.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=ra(t)?f({},t):{};for(const t of Object.keys(e)){const n=e[t];null!==n?"timeline"!==t?ra(n)?i[t]=aa(i[t],n):i[t]=n:i.timeline=ra(n)?sa(i.timeline,n,r):n:delete i[t]}return{config:i,warnings:n}}function ua(t,e,n){var r,o;const i=!!(null==n?void 0:n.resetTimeline);if(!(t&&void 0!==e&&(i||null!==e&&ra(e)&&Object.keys(e).length)))return{doc:t,warnings:[]};const a=t,s=ra(a.animator),l=!s&&ra(null==(r=a.meta)?void 0:r.animator),c=s?a.animator:l?a.meta.animator:void 0,u=[];s&&ra(null==(o=a.meta)?void 0:o.animator)&&u.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let h=c;if(i){const t={};for(const e of na)ra(c)&&void 0!==c[e]&&(t[e]=c[e]);h=t}const p=ca(h,null!=e?e:{});return u.push(...p.warnings),p.config===c?{doc:t,warnings:u}:l?{doc:d(f({},a),{meta:d(f({},a.meta),{animator:p.config})}),warnings:u}:{doc:d(f({},a),{animator:p.config}),warnings:u}}function fa(t){try{return{problems:He(t)}}catch(t){return{problems:[]}}}