@pixodesk/svg-animator-core 1.0.41 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{PxDocumentDiagnostic-COGEjBbg.d.cts → PxDocumentDiagnostic-n8yiyL0k.d.cts} +259 -84
- package/dist/{PxDocumentDiagnostic-COGEjBbg.d.ts → PxDocumentDiagnostic-n8yiyL0k.d.ts} +259 -84
- package/dist/{chunk-L6GJ6Y2M.js → chunk-EFQLDGFY.js} +90 -38
- package/dist/chunk-EFQLDGFY.js.map +1 -0
- package/dist/chunk-YWBPS6E4.min.js +1 -0
- package/dist/index.cjs +115 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +44 -9
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/dist/internal.cjs +39 -29
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/internal.min.cjs +1 -1
- package/dist/internal.min.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-7ZO7PQKZ.min.js +0 -1
- package/dist/chunk-L6GJ6Y2M.js.map +0 -1
package/dist/internal.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as PxNode,
|
|
2
|
-
export {
|
|
1
|
+
import { e as PxNode, Q as PxGlyphFont, bo as PxAnimatable, c as PxAnimatorConfig, ai as PxScroll, al as PxScrollPhase, s as PxBezierPath, aE as PxTransformParts, ag as PxSchema, aS as PxWireVersionStep, aP as PxWireStepKind } from './PxDocumentDiagnostic-n8yiyL0k.cjs';
|
|
2
|
+
export { bp as PX_ANIM_ATTR_NAME, bq as PX_ANIM_SRC_ATTR_NAME, br as PX_CSS_ONLY_STYLE_PROPS, bs as PX_DISALLOWED_SVG_TAGS_LOWER, bt as PX_LOOP_JUMP_SHIFT_MS, bu as PX_TEXT_CONTENT_ATTR, bv as PX_UNKNOWN_KEY_ERROR, bw as PxAnyKeyframe, bx as PxMaterializeAllOptions, by as PxNormalizedKeyframe, bz as PxNormalizedPropertyAnimation, bA as createDiagnostics, bB as deepClone, bC as generateUniqueId, bD as interpolateValue, bE as keyframeEasing, bF as keyframeValue, bG as materializeMotionPathInPropAnim, bH as mergeStaticTransformIntoAnimDef, bI as reportDocumentDiagnostics, bJ as sanitizeAttributeValue } from './PxDocumentDiagnostic-n8yiyL0k.cjs';
|
|
3
3
|
|
|
4
4
|
interface VmNode {
|
|
5
5
|
type?: string;
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as PxNode,
|
|
2
|
-
export {
|
|
1
|
+
import { e as PxNode, Q as PxGlyphFont, bo as PxAnimatable, c as PxAnimatorConfig, ai as PxScroll, al as PxScrollPhase, s as PxBezierPath, aE as PxTransformParts, ag as PxSchema, aS as PxWireVersionStep, aP as PxWireStepKind } from './PxDocumentDiagnostic-n8yiyL0k.js';
|
|
2
|
+
export { bp as PX_ANIM_ATTR_NAME, bq as PX_ANIM_SRC_ATTR_NAME, br as PX_CSS_ONLY_STYLE_PROPS, bs as PX_DISALLOWED_SVG_TAGS_LOWER, bt as PX_LOOP_JUMP_SHIFT_MS, bu as PX_TEXT_CONTENT_ATTR, bv as PX_UNKNOWN_KEY_ERROR, bw as PxAnyKeyframe, bx as PxMaterializeAllOptions, by as PxNormalizedKeyframe, bz as PxNormalizedPropertyAnimation, bA as createDiagnostics, bB as deepClone, bC as generateUniqueId, bD as interpolateValue, bE as keyframeEasing, bF as keyframeValue, bG as materializeMotionPathInPropAnim, bH as mergeStaticTransformIntoAnimDef, bI as reportDocumentDiagnostics, bJ as sanitizeAttributeValue } from './PxDocumentDiagnostic-n8yiyL0k.js';
|
|
3
3
|
|
|
4
4
|
interface VmNode {
|
|
5
5
|
type?: string;
|
package/dist/internal.js
CHANGED
package/dist/internal.min.cjs
CHANGED
|
@@ -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},h=(t,e)=>n(t,o(e)),d=(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_ANIM_ATTR_NAME:()=>it,PX_ANIM_SRC_ATTR_NAME:()=>ot,PX_COLOR_ATTR_NAMES:()=>wn,PX_CSS_ONLY_STYLE_PROPS:()=>Uo,PX_DEFAULT_DURATION_MS:()=>En,PX_DISALLOWED_SVG_TAGS_LOWER:()=>Wo,PX_LOOP_JUMP_SHIFT_MS:()=>cr,PX_PCT_BASED_ATTR_NAMES:()=>On,PX_STYLE_ATTR_NAMES:()=>zn,PX_TEXT_CONTENT_ATTR:()=>oe,PX_TRANSFORM_FN_NAMES:()=>Mn,PX_UNKNOWN_KEY_ERROR:()=>m,bezierToSvgPath:()=>pn,camelCaseToKebabWordIfNeeded:()=>Tn,clamp:()=>Vn,composeTransformParts:()=>jn,createDiagnostics:()=>wo,createPathSampler:()=>Rr,cubicBezier:()=>kn,deepClone:()=>Lo,diffFieldUniverse:()=>Yo,diffInEffect:()=>Er,extendedPathForBrowser:()=>So,generateUniqueId:()=>Ro,interpolateValue:()=>ur,isScrollTimeline:()=>Mo,kebabToCamelCaseWord:()=>Nn,keyframeEasing:()=>Se,keyframeValue:()=>Ae,layoutGlyphTextChars:()=>ao,materializeGlyphText:()=>bo,materializeGlyphTextAlongPath:()=>co,materializeMotionPathInPropAnim:()=>Kn,mergeStaticTransformIntoAnimDef:()=>fr,planSchemaRelease:()=>Ko,releaseLogProblems:()=>Qo,reportDocumentDiagnostics:()=>Po,reverseEasing:()=>_n,sanitizeAttributeValue:()=>qo,schemaFieldUniverse:()=>Zo,scrollOffsetProgress:()=>Do,scrollPhaseInterval:()=>jo,scrollResolveAxis:()=>To,scrollTotalDurationMs:()=>Oo,scrollViewProgress:()=>No,splitEasing:()=>Sn,subdivideCubicBezier:()=>An,toRGBA:()=>Pn}),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 v(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 y(this)}},y=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)}},b=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(v(null!=n?n:[])+": expected string, got "+typeof t),!1)}},k=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(v(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},x=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(v(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(v(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},S=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(v(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},_=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=v(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(v(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)}},w=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(v(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(v(o)+": "+m),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},M=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(v(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)}},O=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(v(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)}},j=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(v(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)}},z=class extends g{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},E=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(v(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)}},D=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(v(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 T(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 V=(t="")=>new b(t),R=(t=0)=>new k(t),L=(t=!1)=>new x(t),W=t=>new A(t),C=(t,e)=>new S(t,e),I=(t,e)=>new _(t,e),U=(t,e)=>new P(t,e),F=t=>new w(t),X=(t,e)=>new M(t,e),B=t=>new O(t),G=t=>new j(t),q=()=>new z,Z=()=>new E,J=t=>new D(t),Y=(t,e)=>new N(t,e),K="forwards",Q="backwards",H="both",$="none",tt="normal",et="reverse",nt="alternate",rt="alternate-reverse",ot="data-px-animation-src",it="_px_animator",at="load",st="mouseOver",lt="click",ct="scrollIntoView",ut="programmatic",ft="continue",ht="pause",dt="reset",pt="reverse",mt="hold",vt="reset",gt="view",yt="scroll",bt="block",kt="inline",xt="x",At="y",St="nearest",_t="root",Pt="top",wt="center",Mt="bottom",Ot="cover",jt="contain",zt="entry",Et="exit",Nt="entry-crossing",Dt="exit-crossing",Tt="sampled",Vt="offsetPath",Rt=["duration","iterations","engine","frameRate","trigger","delay","fillMode","direction","fill","resetOnFinish","timelineSource","scroll"],Lt=h(f({},{native:"native",js:"js"}),{auto:"auto"}),Wt="load",Ct="continue",It="start",Ut="end",Ft="normal",Xt="alternate",Bt="luminance",Gt="alpha",qt="userSpaceOnUse",Zt="objectBoundingBox",Jt="clip",Yt="extend",Kt="spacing",Qt="spacingAndGlyphs",Ht="align",$t="stretch",te="auto",ee="exact",ne="separate",re="combined",oe="textContent",ie="class",ae="transform",se="pad",le="reflect",ce="repeat",ue="linear",fe="radial";function he(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=de.get(n);if(r)return r;const o=n,i=Rt.filter(t=>void 0!==o[t]),a=i.length?f({},o):n;for(const t of i)delete a[t];const s=function(t){const e=t.timeline;if(null==e||"object"!=typeof e)return t;const n=pe.get(t);if(n)return n;const r=t,{timeline:o}=r,i=d(r,["timeline"]);void 0!==e.engine&&(i.engine=e.engine);void 0!==e.frameRate&&(i.frameRate=e.frameRate);if("scroll"===e.type||"view"===e.type){i.timelineSource="scroll",void 0!==e.duration&&(i.duration=e.duration),void 0!==e.iterations&&(i.iterations=e.iterations);const t=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=d(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 pe.set(t,i),i}(a);return de.set(n,s),s}var de=new WeakMap,pe=new WeakMap;var me,ve=/^(\d+)\.(\d+)(?:\.(\d+))?$/;function ge(t){if("string"!=typeof t)return;const e=ve.exec(t.trim());return e?{a:Number(e[1]),b:Number(e[2]),c:void 0===e[3]?0:Number(e[3])}:void 0}me=ge("1.1");var ye=I([V(),J([R(),R(),R(),R()])]),be=I([V(),R(),B(R()),F({pathData:V()}),Y(()=>B(en),[]),Y(()=>Oe,{})]),ke=F({time:R().optional(),value:be.optional(),easing:ye.optional(),tangentOut:J([R(),R()]).optional(),tangentIn:J([R(),R()]).optional()}),xe=t=>{var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0},Ae=t=>{var e;return null!=(e=t.value)?e:t.v},Se=t=>{var e;return null!=(e=t.easing)?e:t.e},_e=t=>t.tangentIn,Pe=t=>t.tangentOut,we=F({segmentCount:R().optional(),repeatAt:C([It,Ut]).optional(),direction:C([Ft,Xt]).optional()}),Me=F({value:be.optional(),keyframes:B(ke).optional(),loop:I([we,L()]).optional(),autoOrient:L().optional(),alongPathMode:C([Tt,Vt]).optional()}),Oe=F({translate:J([R(),R()]).optional(),rotate:R().optional(),skew:R().optional(),scale:J([R(),R()]).optional(),origin:J([R(),R()]).optional()}),je=(I([V(),Oe,F({value:Oe}),Me]),G(Me)),ze=I([V(),B(I([V(),je])),je]),Ee=F({startOn:C([at,st,lt,ct,ut],Wt).optional(),outAction:C([ft,ht,dt,pt],Ct).optional(),finishAction:C([mt,vt]).optional(),scrollIntoViewThreshold:R().optional()}),Ne=F({width:R(),pathData:V()}),De=F({fontFamily:V(),fontStyle:V(),ascent:R(),unitsPerEm:R(),glyphs:G(Ne)}),Te=F({easings:G(J([R(),R(),R(),R()])).optional(),animations:G(je).optional(),fonts:G(De).optional()}),Ve=F({phase:C([Ot,jt,zt,Et,Nt,Dt]).optional(),fraction:R().optional()}),Re=F({start:Ve.optional(),end:Ve.optional()}),Le=(F({kind:C([gt,yt]).optional(),axis:C([bt,kt,xt,At]).optional(),source:C([St,_t]).optional(),subject:V().optional(),smoothing:R().optional(),pin:L().optional(),pinAlign:C([Pt,wt,Mt]).optional(),pinOffset:R().optional(),pinDistance:R().optional(),range:Re.optional()}),F({align:C([Pt,wt,Mt]).optional(),offset:R().optional(),distance:R().optional()})),We=C([Lt.auto,Lt.native,Lt.js]).optional(),Ce=F({type:W("time").optional(),engine:We,frameRate:R().optional(),duration:R().optional(),trigger:Ee.optional(),delay:R().optional(),iterations:I([R(),W("infinite")]).optional(),fillMode:C([K,Q,H,$]).optional(),direction:C([tt,et,nt,rt]).optional()}),Ie={duration:R().optional(),iterations:R().optional(),engine:We,frameRate:R().optional(),axis:C([bt,kt,xt,At]).optional(),source:C([St,_t]).optional(),subject:V().optional(),smoothing:R().optional(),pin:I([L(),Le]).optional(),range:Re.optional()},Ue=U("type",[Ce,F(f({type:W("scroll")},Ie)),F(f({type:W("view")},Ie))]),Fe=F({target:V(),animateWith:B(V())}),Xe=F({timeline:Ue.optional(),definitions:Te.optional(),bindings:B(Fe).optional(),debugGlobalName:V().optional(),version:V().optional()}),Be=I([V(),R(),B(R()),F({value:Z()}),Oe]),Ge=I([R(),Me,F({value:R()})]),qe=I([J([R(),R()]),Me,F({value:J([R(),R()])})]),Ze=I([V(),Me,F({value:V()})]),Je=F({translate:qe.optional(),rotate:Ge.optional(),scale:qe.optional(),skew:Ge.optional(),origin:qe.optional()}),Ye=F({copies:R().optional(),translate:qe.optional(),rotate:Ge.optional(),skew:Ge.optional(),scale:qe.optional(),origin:qe.optional()}),Ke=F({source:V().optional(),maskType:C([Bt,Gt]).optional(),maskUnits:C([qt,Zt]).optional(),maskContentUnits:C([qt,Zt]).optional(),x:R().optional(),y:R().optional(),width:R().optional(),height:R().optional()}),Qe=F({pathData:Ze.optional()}),He=F({offset:Ge.optional(),range:qe.optional(),subPaths:C([ne,re]).optional()}),$e=F({start:R().optional(),stretch:R().optional(),timeCrop:J([R(),R()]).optional()}),tn=F({without:C(["translate"]).optional(),source:V().optional(),retime:$e.optional()}),en=F({offset:R(),color:V()}),nn=I([B(en),F({value:B(en)}),Me]),rn=F({type:C([ue,fe]),start:qe.optional(),end:qe.optional(),center:qe.optional(),radius:Ge.optional(),focal:qe.optional(),stops:nn.optional(),gradientUnits:C([qt,Zt]).optional(),spreadMethod:C([se,le,ce]).optional(),gradientTransform:V().optional()}),on=rn,an=F({pathData:V(),pathOverflow:C([Jt,Yt]).optional(),lengthAdjust:C([Kt,Qt]).optional(),method:C([Ht,$t]).optional(),spacing:C([te,ee]).optional(),startOffset:Ge.optional(),textLength:Ge.optional()}),sn=F({useGlyphs:L().optional()}),ln=F({transformBy:Je.optional(),repeater:Ye.optional(),maskedBy:Ke.optional(),clipPath:Qe.optional(),strokeTrim:He.optional(),clone:tn.optional(),fillGradient:rn.optional(),strokeGradient:on.optional(),textPath:an.optional(),text:sn.optional()});function cn(t,e){var n;const r=!1!==(null==e?void 0:e.strict),o={errors:[],warnings:[],strict:r},i=dn.isValid(t,o,["root"])?[]:[...o.errors];if(t&&"object"==typeof t){for(const e of function(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!ln.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}(t,{strict:r}))i.includes(e)||i.push(e);const e=null==(n=he(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=he(t))?void 0:e.version;return void 0===n||void 0!==ge(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 un=X({type:V(),domType:V().optional(),textContent:V().optional(),id:V().optional(),meta:q().optional(),effects:ln.optional(),animate:ze.optional(),style:G(I([V(),R()])).optional()},Be),fn=X(h(f({},un._shape),{children:Y(()=>B(fn),[]).optional()}),Be),hn=F({width:I([R(),V()]).optional(),height:I([R(),V()]).optional(),viewBox:V().optional(),animator:Xe.optional()}),dn=X(h(f(f({},un._shape),hn._shape),{type:W("svg"),children:B(fn).optional()}),Be);F({v:B(B(R())),i:B(B(R())).optional(),o:B(B(R())).optional(),c:L().optional()});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 vn(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 gn(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(yn(t[i],e[i],n));return o}function yn(t,e,n){var r,o,i,a,s,l,c,u,f;if(!t||!e)return t||e||{v:[]};const h=Math.min(Math.max(n,0),1),d=Math.min(t.v.length,e.v.length),p=[],m=[],v=[];for(let n=0;n<d;n++){const f=t.v[n],d=e.v[n];p.push(vn(f,d,h));const g=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,y=null!=(a=null==(i=e.i)?void 0:i[n])?a:d;m.push(vn(g,y,h));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:d;v.push(vn(b,k,h))}return{v:p,i:m.length?m:void 0,o:v.length?v:void 0,c:null!=(f=t.c)?f:e.c}}function bn(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 kn(t){const[e,n,r,o]=t,i=3*n,a=3*(o-n)-i,s=1-i-a;return function(t){return n=bn(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 An(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 Sn(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=bn(n,o,e),s=[n,r],l=[o,i],{left:c,right:u}=An([0,0],s,l,[1,1],a),f=c[3][0],h=c[3][1];let d,p;f>1e-9&&Math.abs(h)>1e-9&&(d=[c[1][0]/f,c[1][1]/h,c[2][0]/f,c[2][1]/h]);const m=1-f,v=1-h;return m>1e-9&&Math.abs(v)>1e-9&&(p=[(u[1][0]-f)/m,(u[1][1]-h)/v,(u[2][0]-f)/m,(u[2][1]-h)/v]),{left:d,right:p}}function _n(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function Pn(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+")"}var wn=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),Mn=new Set(["translate","rotate","scale","skew"]),On=new Set(["offset-distance","offsetDistance"]);function jn(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 zn=new Set(["offset-distance","offsetDistance"]),En=1e3;function Nn(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}var Dn=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 Tn(t){return Dn.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 Rn(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 Wn(t,e,n,r,o){const i=Cn(t,e,n,r,o);if(0===i[0]&&0===i[1]){return Cn(t,e,n,r,o<.5?o+Ln:o-Ln)}return i}function Cn(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 In(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=Rn(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=Rn(t,e,n,r,i),h=f[0]-l[0],d=f[1]-l[1];c+=Math.sqrt(h*h+d*d),a[u]=i,s[u]=c,l=f}return{ts:a,ds:s}}function Un(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 Fn(t){const e=Ae(t);if(!e)return;if(Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1])return[e[0],e[1]];const n=e.translate;return Array.isArray(n)&&n.length>=2?[n[0],n[1]]:void 0}function Xn(t){return xe(t)}function Bn(t){return Se(t)}var Gn=new WeakMap;function qn(t,e,n,r){let o=Gn.get(t);const i=null==o?void 0:o.get(e);if(i)return i;const a=Pe(t),s=_e(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=In(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,Gn.set(t,o)),o.set(e,f),f}var Zn=.5,Jn=5,Yn=32;function Kn(t,e){var n,r,o;if(!function(t){const e=t.keyframes;if(!Array.isArray(e))return!1;if(t.autoOrient)return!0;for(const t of e)if(_e(t)||Pe(t))return!0;return!1}(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:Zn,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:Jn,c=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:Yn,u=[],f=Fn(i[0]);if(!f)return t;const h=a?function(t,e){const n=Fn(t),r=Fn(e);if(!n||!r)return 0;const o=qn(t,e,n,r),i=Wn(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(Xn(i[0]),er($n(i[0]),$n(i[0]),0,f,h,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=Fn(e),o=Fn(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(Xn(n),er($n(n),$n(n),1,null!=o?o:[0,0],void 0,a)))}const d=Bn(i[i.length-1]);d&&(u[u.length-1].e=d),a&&Qn(u);const p={keyframes:u};return void 0!==t.loop&&(p.loop=t.loop),p}function Qn(t){let e;for(const n of t){const t=Ae(n);if(!t||"number"!=typeof t.rotate)continue;if(void 0===e){e=t.rotate;continue}let r=t.rotate;for(;r-e>180;)r-=360;for(;r-e<-180;)r+=360;t.rotate=r,e=r}}function Hn(t,e){return{t:t,v:e}}function $n(t){const e=Ae(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=Ae(a),l=null==s?void 0:s.rotate;if("number"!=typeof l)return;const c=$n(e),u=l-nr(c,c,0),f=qn(e,n,r,o),h=Wn(f.P0,f.P1,f.P2,f.P3,0),d=180*Math.atan2(h[1],h[0])/Math.PI,p=function(t,e){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}(d,u);if(Math.abs(p)<=i)return;const m=Xn(e),v=Math.min(m+or,(m+Xn(n))/2),g=er($n(e),$n(e),0,r,d,!0);t.push(Hn(v,g))}var or=.05;function ir(t,e,n,r,o,i,a,s,l){const c=qn(e,n,r,o),u=Xn(e),f=Xn(n),h=Bn(e),d=(p=h)?kn([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=$n(e),v=$n(n),g=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 g){const e=Un(c.lut,t),n=Vn(c.totalArc>0?e/c.totalArc:t,0,1),r={u:Vn(d(n),0,1),p:n,pos:Rn(c.P0,c.P1,c.P2,c.P3,t)};if(i){const e=Wn(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=h,k=0;const x=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}=Sn(b,r),s=0===e?x:t.length-1;o?t[s].e=o:delete t[s].e;const l=u+n.u*(f-u),c=er(m,v,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),h=(-l-f)/(2*s),d=(-l+f)/(2*s);h>1e-6&&h<.999999&&o.push(h),d>1e-6&&d<.999999&&o.push(d)}function sr(t,e,n,r,o,i,a,s){const l=(t+e)/2,c=Rn(r.P0,r.P1,r.P2,r.P3,t),u=Rn(r.P0,r.P1,r.P2,r.P3,e),f=e-t,h=Rn(r.P0,r.P1,r.P2,r.P3,t+.25*f),d=Rn(r.P0,r.P1,r.P2,r.P3,l),p=Rn(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(lr(h,c,u),lr(d,c,u),lr(p,c,u));let v=!0;if(o){const n=Wn(r.P0,r.P1,r.P2,r.P3,t),o=Wn(r.P0,r.P1,r.P2,r.P3,e),i=180*Math.atan2(n[1],n[0])/Math.PI,s=180*Math.atan2(o[1],o[0])/Math.PI;let l=Math.abs(i-s);l>180&&(l=360-l),l>a&&(v=!1)}m<=i&&v||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)}var cr=1;function ur(t,e,n,r){var o,i;if("d"===t){return{paths:gn(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 wn.has(t)?function(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)]}(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):Mn.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?vn(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]=vn(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function fr(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[ae];if(o&&"object"==typeof o){const e=o;if(Array.isArray(e.keyframes)){const n=h(f({},e),{keyframes:e.keyframes.map(t=>h(f({},t),{value:r(t.value)}))});return void 0!==n.value&&(n.value=r(n.value)),h(f({},t),{transform:n})}return t}const i=Object.keys(t).filter(t=>Mn.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=h(f({},s),{keyframes:s.keyframes.map(t=>h(f({},t),{value:h(f({},n),{[a]:t.value})}))});void 0!==l.value&&(l.value=h(f({},n),{[a]:l.value}));const c=f({},t);return delete c[a],h(f({},c),{transform:l})}var hr=[1,0,0,1,0,0];function dr(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 pr=(t,e)=>[1,0,0,1,t,e],mr=(t,e)=>[t,0,0,e,0,0];function vr(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var gr=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],yr=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function br(t){let e=hr;t.translate&&(e=dr(e,pr(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=dr(e,pr(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=dr(e,vr(t.rotate))),t.scale&&(e=dr(e,mr(t.scale[0],t.scale[1]))),n&&(e=dr(e,pr(-t.origin[0],-t.origin[1]))),e}function kr(t,e,n){return t+(e-t)*n}function xr(t,e){return null==t?hr:"string"==typeof t?function(t){let e=hr;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=dr(e,pr(n[0]||0,n[1]||0)):"scale"===t?e=dr(e,mr(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=dr(e,vr(n[0])):"skewX"===t?e=dr(e,gr(n[0])):"skewY"===t?e=dr(e,yr(n[0])):"matrix"===t&&(e=dr(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?br(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],h=(e-(null!=(i=u.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=u.time)?s:0)||1),d=u.value||{},p=f.value||{},m={};return d.translate&&p.translate?m.translate=[kr(d.translate[0],p.translate[0],h),kr(d.translate[1],p.translate[1],h)]:m.translate=d.translate||p.translate,void 0!==d.rotate&&void 0!==p.rotate?m.rotate=kr(d.rotate,p.rotate,h):m.rotate=null!=(l=d.rotate)?l:p.rotate,d.scale&&p.scale?m.scale=[kr(d.scale[0],p.scale[0],h),kr(d.scale[1],p.scale[1],h)]:m.scale=d.scale||p.scale,m.origin=d.origin||p.origin,m}(t.keyframes,e)):t.value?br(t.value):"object"!=typeof t||Array.isArray(t)?hr:br(t)}var Ar=new Set(["svg","g","symbol"]),Sr=new Set(["defs","mask","clipPath","title"]);function _r(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>_r(t,e))}function Pr(t){return null==t?0:Number(t)}function wr(t){return Math.round(100*t)/100+0}function Mr(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=wr(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],h=(r-(null!=(s=u.time)?s:0))/((null!=(l=f.time)?l:0)-(null!=(c=u.time)?c:0)||1);return kr(u.value,f.value,h)}return void 0!==e?Number(e):n}(null==(s=t.animate)?void 0:s.opacity,t.opacity,1,n)),h=t.mask?1:0,d=e.map(wr).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Pr(t.width)+","+Pr(t.height)+","+Pr(t.x)+","+Pr(t.y);case"ellipse":return Pr(t.rx)+","+Pr(t.ry)+","+Pr(t.cx)+","+Pr(t.cy);case"circle":return Pr(t.r)+","+Pr(t.cx)+","+Pr(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+d+"]|f:"+l+"|s:"+c+"|sw:"+(Pr(u)||"")+"|o:"+f+"|m:"+h}function Or(t,e,n,r,o){var i;const a=t.type||"";if(Sr.has(a))return;const s=dr(e,function(t,e){return t.animate&&t.animate.transform?xr(t.animate.transform,e):void 0!==t.transform?xr(t.transform,e):hr}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=dr(s,pr(Pr(t.x),Pr(t.y)));return void(i?Or(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}Ar.has(a)?null==(i=t.children)||i.forEach(t=>Or(t,s,n,r,o)):o.push(Mr(t,s,n))}function jr(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=>jr(t,e))}function zr(t,e){const n=new Map;_r(t,n);const r=[];return Or(t,hr,e,n,r),r.sort()}function Er(t,e){const n=new Set;jr(t,n),jr(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=zr(t,o),i=zr(e,o),a=Nr(n,i),s=Nr(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function Nr(t,e){const n=new Map;for(const t of e)n.set(t,(n.get(t)||0)+1);const r=[];for(const e of t){const t=n.get(e)||0;t>0?n.set(e,t-1):r.push(e)}return r}var Dr=48,Tr=/[MmLlHhVvCcSsQqTtAaZz]/;function Vr(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 Rr(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,h="";const d=()=>parseFloat(e[r++]),p=(t,e,r)=>{const a=[o,i],s=In(a,t,e,r,Dr);n.push({P0:a,P1:t,P2:e,P3:r,lut:s,len:s.ds[s.ds.length-1]}),o=r[0],i=r[1]},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];Tr.test(t)?r++:t="M"===h?"L":"m"===h?"l":h;const n=t>="a",v=t.toUpperCase();if("Z"!==v){if("M"===v){const e=d()+(n?o:0),r=d()+(n?i:0);o=e,i=r,a=e,s=r,h=t;continue}if("L"===v)m(d()+(n?o:0),d()+(n?i:0));else if("H"===v)m(d()+(n?o:0),i);else if("V"===v)m(o,d()+(n?i:0));else if("C"===v){const t=[d()+(n?o:0),d()+(n?i:0)],e=[d()+(n?o:0),d()+(n?i:0)],r=[d()+(n?o:0),d()+(n?i:0)];l=e[0],c=e[1],p(t,e,r)}else if("S"===v){const t="C"===h.toUpperCase()||"S"===h.toUpperCase()?[2*o-l,2*i-c]:[o,i],e=[d()+(n?o:0),d()+(n?i:0)],r=[d()+(n?o:0),d()+(n?i:0)];l=e[0],c=e[1],p(t,e,r)}else if("Q"===v){const t=[d()+(n?o:0),d()+(n?i:0)],e=[d()+(n?o:0),d()+(n?i:0)];u=t[0],f=t[1];const{P1:r,P2:a}=Vr([o,i],t,e);p(r,a,e)}else if("T"===v){const t="Q"===h.toUpperCase()||"T"===h.toUpperCase()?[2*o-u,2*i-f]:[o,i],e=[d()+(n?o:0),d()+(n?i:0)];u=t[0],f=t[1];const{P1:r,P2:a}=Vr([o,i],t,e);p(r,a,e)}else{if("A"!==v){r++;continue}r+=5,m(d()+(n?o:0),d()+(n?i:0))}h=t}else m(a,s),o=a,i=s,h=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]=Rn(o.P0,o.P1,o.P2,o.P3,a),[c,u]=Wn(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 Lr=(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 Wr(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Cr(t,e){let n="";for(let r=0;r<t.length;r++){const o=Wr(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function Ir(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var Ur=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function Fr(t,e,n=2){const r=[];let o;for(Ur.lastIndex=0;null!==(o=Ur.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]=Ir(e,s(),s());i+=t+Cr([r,o],n)}else if("C"===t){const[t,r]=Ir(e,s(),s()),[o,a]=Ir(e,s(),s()),[l,c]=Ir(e,s(),s());i+="C"+Cr([t,r,o,a,l,c],n)}else if("Q"===t){const[t,r]=Ir(e,s(),s()),[o,a]=Ir(e,s(),s());i+="Q"+Cr([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}function Xr(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(Br),autoOrient:r.autoOrient,loop:r.loop},n=null!=(e=r.value)?e:r.v;return void 0!==n&&"animated"===t.kind&&(t.base=n),t}const i=null!=(n=r.value)?n:r.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function Br(t){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}var Gr=16,qr=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",oe,"xml:space"],Zr=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],Jr=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function Yr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function Kr(t){return"string"==typeof t?t:void 0}function Qr(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of Jr)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function Hr(t,e){var n,r,o,i,a,s,l,c,u,f;const h="text"===t.type,d=t.style,p=e=>{var n;return h?void 0:null!=(n=t[e])?n:null==d?void 0:d[e]},m={fontFamily:null!=(n=Kr(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=Yr(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=Yr(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=Yr(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(c=Yr(p("opacity")))?c:e.opacity,animate:null!=(u=h?void 0:Qr(t))?u:e.animate};for(const t of Zr){const n=null!=(f=p(t))?f:e[t];void 0!==n&&(m[t]=n)}return m}function $r(t){var e,n,r;return{fontFamily:Kr(t.fontFamily),fontSize:null!=(e=Yr(t.fontSize))?e:Gr,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=Yr(t.letterSpacing))?n:0,wordSpacing:null!=(r=Yr(t.wordSpacing))?r:0}}function to(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 Zr)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function eo(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 no(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var ro=.6,oo="px-missing-glyph";function io(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,h=-l,d=i+l;return c+"M"+u+" "+h+"L"+u+" "+d+"L"+f+" "+d+"L"+f+" "+h+"Z"}function ao(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=Rr(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const c=no(i),u=[];let f=0;const h=(t,e)=>{var n,r;const o=Hr(t,e),s=Kr(t[oe]);if(s&&!(null==(n=t.children)?void 0:n.length)){const t=eo(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)h(e,o)};h(t,$r(t));const d=f,p=Xr(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,v=m>0&&d>0?m/d:1,g=Xr(null==s?void 0:s.startOffset),{along:y,perp:b}=lo(t),k=y+("animated"===g.kind?Number(null==(o=g.keyframes[0])?void 0:o.value)||0:"static"===g.kind&&Number(g.value)||0),x=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*v,n=k+t.advEnd*v,r=x(l.sampleAtDistance(e)),o=x(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*v);return{x:r.x,y:r.y,width:t.advEnd-t.advStart,ascent:t.ascent,fontSize:t.fontSize,endX:o.x,endY:o.y,rotation:180*i.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:s,warnings:l}=e,c=no(s),u={x:null!=(r=Yr(t.x))?r:0,y:null!=(o=Yr(t.y))?o:0},f=[],h=[{start:u.x,end:u.x}];let p=0;const m=(t,e)=>{var n;const r=eo(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,h[p].end=u.x}},v=(t,e)=>{var n,r,o;const i=Hr(t,e),a=Yr(t.x),s=Yr(t.y);void 0!==a&&(u.x=a,p=h.length,h.push({start:u.x,end:u.x})),void 0!==s&&(u.y=s),u.x+=null!=(n=Yr(t.dx))?n:0,u.y+=null!=(r=Yr(t.dy))?r:0;const l=Kr(t[oe]);if(l&&!(null==(o=t.children)?void 0:o.length)&&m(l,i),t.children)for(const e of t.children)v(e,i)},g=$r(t);if(t.children)for(const e of t.children){const t=f.length;if(v(e,g),f.length===t){const t=Hr(e,g),n=eo(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=Kr(t[oe]);y&&!(null==(a=t.children)?void 0:a.length)&&m(y,g);const b=Kr(t.textAnchor);if("middle"===b||"end"===b)for(const t of f){const e=h[t.line].end-h[t.line].start;t.x+="middle"===b?-e/2:-e}return f.map(t=>{var e=t,{line:n}=e;return d(e,["line"])})}function so(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 lo(t){var e,n,r;return{along:(null!=(e=Yr(t.x))?e:0)+(null!=(n=Yr(t.dx))?n:0),perp:null!=(r=Yr(t.dy))?r:0}}function co(t,e,n,r,o,i){const{glyphs:a,create:s=Lr,warnings:l}=r,c=e?Rr(e):null;if(!c)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const u=no(a),{cells:d,width:p}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,c;const u=Hr(t,s),f=Kr(t[oe]);if(f&&!(null==(l=t.children)?void 0:l.length)){const t=eo(u,e,n,r);if(t){const e=u.fontSize/t.unitsPerEm,n=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=to(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:ro*t.unitsPerEm,s=a*e;o.push({glyphD:io(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,$r(t)),{cells:o,width:i}}(t,a,u,l);if(!d.length)return yo(t,[],s);const{along:m,perp:v}=lo(t),g=uo(n),y=uo(o),b=t=>t>0&&p>0?t/p:1,k="clip"===i&&!c.closed;if(g.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}(g.times,y.times),n=(t,e)=>m+g.at(e)+b(y.at(e))*t.midBase,r=g.animated?g.loop:y.loop;return yo(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/fo,.5),c=t=>t>=0&&t<=e.totalLength,u=[];for(const d of t){const t=[d.scale,0,0,d.scale,-d.scale*(d.widthEm/2),0],p=Fr(d.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:[po(r-s*l,3),po(o+s*a,3)],rotate:po(180*i/Math.PI,3)}}},v=[],g=[],y=(t,e)=>{v.push(m(t,e)),a&&g.push({time:e,value:c(t)?1:0})};y(n(d,r[0]),r[0]);for(let t=1;t<r.length;t++){const e=r[t-1],o=r[t],i=n(d,e),a=n(d,o),s=Math.min(ho,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(d,r),r)}}Qn(v);const b={keyframes:v};void 0!==o&&(b.loop=o);const k={transform:b};if(d.paint.animate&&Object.assign(k,d.paint.animate),a&&g.some(t=>0===t.value)){const t={keyframes:g};void 0!==o&&(t.loop=o),k.opacity=t}u.push(i("path",h(f(f({d:p},mo(d.paint)),vo(d.isMissing)),{animate:k}),[]))}return u}(d,c,n,e,r,s,k,v),s)}const x=b(y.at(0)),A=m+g.at(0);return yo(t,go((k?d.filter(t=>{const e=A+t.midBase*x;return e>=0&&e<=c.totalLength}):d).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:so(c,A+t.midBase*x,t.scale,t.widthEm,v)})),s,l),s)}function uo(t){var e;const n=Xr(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 fo=48,ho=64;function po(t,e){const n=c(10,e);return Math.round(t*n)/n}function mo(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 Zr)void 0!==t[n]&&(e[n]=t[n]);return e}function vo(t){return t?{[ie]:oo}:{}}function go(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=Fr(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},mo(t)),vo(i)),void 0!==t.animate?{animate:f({},t.animate)}:{}),[]));return o}function yo(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===qr.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 bo(t,e){return e.alongPath?co(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):function(t,e){var n,r,o;const{glyphs:i,create:a=Lr,warnings:s}=e,l=no(i),c={x:null!=(n=Yr(t.x))?n:0,y:null!=(r=Yr(t.y))?r:0},u=[],f=[{start:c.x,end:c.x}];let h=0;const d=(t,e)=>{var n;const r=eo(e,i,l,s),o=(null==r?void 0:r.unitsPerEm)||1e3,a=e.fontSize/o,d=null!=(n=null==r?void 0:r.ascent)?n:.9*o,p=to(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:h,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:ro*o;u.push({glyphD:io(t,d),m:[a,0,0,a,c.x,c.y],paint:p,isMissing:!0,line:h,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[h].end=c.x}},p=(t,e)=>{var n,r,o;const i=Hr(t,e),a=Yr(t.x),s=Yr(t.y);void 0!==a&&(c.x=a,h=f.length,f.push({start:c.x,end:c.x})),void 0!==s&&(c.y=s),c.x+=null!=(n=Yr(t.dx))?n:0,c.y+=null!=(r=Yr(t.dy))?r:0;const l=Kr(t[oe]);if(l&&!(null==(o=t.children)?void 0:o.length)&&d(l,i),t.children)for(const e of t.children)p(e,i)},m=$r(t);if(t.children)for(const e of t.children)p(e,m);const v=Kr(t[oe]);v&&!(null==(o=t.children)?void 0:o.length)&&d(v,m);const g=Kr(t.textAnchor);if("middle"===g||"end"===g)for(const t of u){const e=f[t.line].end-f[t.line].start,n="middle"===g?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return yo(t,go(u,a,s),a)}(t,e)}var ko=.15;function xo(t){const e=Xr(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}}var Ao=t=>Math.round(1e3*t)/1e3;function So(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Rr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=ko*o,a=xo(e.startOffset),s=xo(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 h=r.sampleAtDistance(0),d=r.sampleAtDistance(o);let p=t;if(u>0){const e=h.x-Math.cos(h.angle)*u,n=h.y-Math.sin(h.angle)*u,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");p="M"+Ao(e)+","+Ao(n)+"L"+Ao(h.x)+","+Ao(h.y)+r}if(f>0){const t=d.x+Math.cos(d.angle)*f,e=d.y+Math.sin(d.angle)*f;p+="L"+Ao(t)+","+Ao(e)}return{d:p,startShift:u}}var _o=6;function Po(t,e){const{problems:n}=function(t){try{return{problems:cn(t)}}catch(t){return{problems:[]}}}(t);if(!n.length)return;const r=n.slice(0,_o),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.")}function wo(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)}}}function Mo(t){return"scroll"===(null==t?void 0:t.timelineSource)}function Oo(t){return("number"==typeof(null==t?void 0:t.duration)&&t.duration>0?t.duration:En)*("number"==typeof(null==t?void 0:t.iterations)&&t.iterations>0?t.iterations:1)}function jo(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 zo="cover";function Eo(t,e,n,r){var o;const[i,a]=jo(null!=(o=null==t?void 0:t.phase)?o:zo,n,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:e)*(a-i)}function No(t,e,n,r){const o=n-t,i=Eo(null==r?void 0:r.start,0,e,n),a=Eo(null==r?void 0:r.end,1,e,n);return a<=i?o>=a?1:0:Vn((o-i)/(a-i),0,1)}function Do(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 To(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"}var Vo=0;function Ro(){return"_px_"+Date.now().toString(36)+(++Vo).toString(36)+Math.random().toString(36).substring(2,6)}function Lo(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>Lo(t));const e=t,n={};for(const t of Object.keys(e))n[t]=Lo(e[t]);return n}var Wo=new Set(["script","foreignobject"]),Co=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Io=new Set(["href","xlink:href","src"]),Uo=new Set(["mixBlendMode","isolation"]),Fo=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Xo=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Bo=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Go=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function qo(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(Co.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||Io.has(n)&&(Fo.test(t)||Xo.test(t)||function(t){const e=Bo.exec(t);return!!e&&Go.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 Zo(t){const e=new Set,n=new Set,r=[{schema:t,path:""}];for(;r.length;){const{schema:t,path:o}=r.shift(),i=T(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+"|"+Jo(t,i.key)})}}return[...e].sort()}function Jo(t,e){const n=T(t);if("shape"!==n.kind)return"?";const r=n.shape[e];if(void 0===r)return"?";const o=T(r);return String(("optional"===o.kind?o.inner:r)._default)}function Yo(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 Ko(t){const e=t.added.length>0||t.removed.length>0,n=ge(t.lastReleased),r=ge(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_WIRE_SCHEMA_VERSION is "+t.declared+". Set it to "+o+" and add the PX_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 PX_WIRE_STEPS entry reaches "+t.declared+"."}}function Qo(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=ge(t[n-1].version),i=ge(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 PX_WIRE_STEPS entry.")}const i=t[t.length-1].version;return i!==n&&o.push("PX_WIRE_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,u=Math.pow,c=(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)&&c(t,n,e[n]);if(a)for(var n of a(e))l.call(e,n)&&c(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_ANIM_ATTR_NAME:()=>it,PX_ANIM_SRC_ATTR_NAME:()=>ot,PX_COLOR_ATTR_NAMES:()=>jn,PX_CSS_ONLY_STYLE_PROPS:()=>qo,PX_DEFAULT_DURATION_MS:()=>Tn,PX_DISALLOWED_SVG_TAGS_LOWER:()=>Xo,PX_LOOP_JUMP_SHIFT_MS:()=>dr,PX_PCT_BASED_ATTR_NAMES:()=>En,PX_STYLE_ATTR_NAMES:()=>Dn,PX_TEXT_CONTENT_ATTR:()=>se,PX_TRANSFORM_FN_NAMES:()=>zn,PX_UNKNOWN_KEY_ERROR:()=>m,bezierToSvgPath:()=>gn,camelCaseToKebabWordIfNeeded:()=>Ln,clamp:()=>Wn,composeTransformParts:()=>Nn,createDiagnostics:()=>Eo,createPathSampler:()=>Cr,cubicBezier:()=>An,deepClone:()=>Fo,diffFieldUniverse:()=>ti,diffInEffect:()=>Tr,extendedPathForBrowser:()=>wo,generateUniqueId:()=>Uo,interpolateValue:()=>hr,isScrollTimeline:()=>No,kebabToCamelCaseWord:()=>Vn,keyframeEasing:()=>we,keyframeValue:()=>_e,layoutGlyphTextChars:()=>uo,materializeGlyphText:()=>So,materializeGlyphTextAlongPath:()=>ho,materializeMotionPathInPropAnim:()=>$n,mergeStaticTransformIntoAnimDef:()=>pr,planSchemaRelease:()=>ei,releaseLogProblems:()=>ni,reportDocumentDiagnostics:()=>Oo,reverseEasing:()=>Mn,sanitizeAttributeValue:()=>Qo,schemaFieldUniverse:()=>Ho,scrollOffsetProgress:()=>Wo,scrollPhaseInterval:()=>To,scrollResolveAxis:()=>Co,scrollTotalDurationMs:()=>Do,scrollViewProgress:()=>Lo,splitEasing:()=>wn,subdivideCubicBezier:()=>_n,toRGBA:()=>On}),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 v(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 y(this)}},y=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)}},b=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(v(null!=n?n:[])+": expected string, got "+typeof t),!1)}},k=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(v(null!=n?n:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},x=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(v(null!=n?n:[])+": expected boolean, got "+typeof t),!1)}},S=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(v(null!=n?n:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},A=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(v(null!=n?n:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},P=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=v(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 u=Math.max(...o.errors.map(t=>t.slice(0,t.indexOf(":")).length));if((u>s||u===s&&a&&o.errors.length<a.length)&&(s=u,a=o.errors),u<=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))}},_=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(v(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)}},w=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(v(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(v(o)+": "+m),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},M=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(v(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)}},O=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(v(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)}},j=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(v(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)}},z=class extends g{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,e,n){return!0}_canSanitize(t){return!0}},E=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(v(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)}},D=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(v(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 T(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 V=(t="")=>new b(t),R=(t=0)=>new k(t),L=(t=!1)=>new x(t),W=t=>new S(t),C=(t,e)=>new A(t,e),I=(t,e)=>new P(t,e),U=(t,e)=>new _(t,e),F=t=>new w(t),X=(t,e)=>new M(t,e),B=t=>new O(t),G=t=>new j(t),q=()=>new z,Z=()=>new E,J=t=>new D(t),Y=(t,e)=>new N(t,e),K="forwards",Q="backwards",H="both",$="none",tt="normal",et="reverse",nt="alternate",rt="alternate-reverse",ot="data-px-animation-src",it="_px_animator",at="load",st="mouseOver",lt="click",ut="none",ct="pause",ft="continue",dt="reset",ht="continue",pt="pause",mt="reset",vt="reverse",gt="hold",yt="reset",bt="view",kt="scroll",xt="block",St="inline",At="x",Pt="y",_t="nearest",wt="root",Mt="top",Ot="center",jt="bottom",zt="cover",Et="contain",Nt="entry",Dt="exit",Tt="entry-crossing",Vt="exit-crossing",Rt="sampled",Lt="offsetPath",Wt=["duration","iterations","engine","frameRate","trigger","delay","fillMode","direction","fill","resetOnFinish","timelineSource","scroll"],Ct=d(f({},{native:"native",js:"js"}),{auto:"auto"}),It="load",Ut="pause",Ft="continue",Xt="start",Bt="end",Gt="normal",qt="alternate",Zt="luminance",Jt="alpha",Yt="userSpaceOnUse",Kt="objectBoundingBox",Qt="clip",Ht="extend",$t="spacing",te="spacingAndGlyphs",ee="align",ne="stretch",re="auto",oe="exact",ie="separate",ae="combined",se="textContent",le="class",ue="transform",ce="pad",fe="reflect",de="repeat",he="linear",pe="radial";function me(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=ve.get(n);if(r)return r;const o=n,i=Wt.filter(t=>void 0!==o[t]),a=i.length?f({},o):n;for(const t of i)delete a[t];const s=function(t){const e=t.timeline;if(null==e||"object"!=typeof e)return t;const n=ge.get(t);if(n)return n;const r=t,{timeline:o}=r,i=h(r,["timeline"]);void 0!==e.engine&&(i.engine=e.engine);void 0!==e.frameRate&&(i.frameRate=e.frameRate);if("scroll"===e.type||"view"===e.type){i.timelineSource="scroll",void 0!==e.duration&&(i.duration=e.duration),void 0!==e.iterations&&(i.iterations=e.iterations);const t=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,{finish:n}=t,r=h(t,["finish"]);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 ge.set(t,i),i}(a);return ve.set(n,s),s}var ve=new WeakMap,ge=new WeakMap;var ye,be=/^(\d+)\.(\d+)(?:\.(\d+))?$/;function ke(t){if("string"!=typeof t)return;const e=be.exec(t.trim());return e?{a:Number(e[1]),b:Number(e[2]),c:void 0===e[3]?0:Number(e[3])}:void 0}ye=ke("1.2");var xe=I([V(),J([R(),R(),R(),R()])]),Se=I([V(),R(),B(R()),F({pathData:V()}),Y(()=>B(on),[]),Y(()=>Ee,{})]),Ae=F({time:R().optional(),value:Se.optional(),easing:xe.optional(),tangentOut:J([R(),R()]).optional(),tangentIn:J([R(),R()]).optional()}),Pe=t=>{var e,n;return null!=(n=null!=(e=t.time)?e:t.t)?n:0},_e=t=>{var e;return null!=(e=t.value)?e:t.v},we=t=>{var e;return null!=(e=t.easing)?e:t.e},Me=t=>t.tangentIn,Oe=t=>t.tangentOut,je=F({segmentCount:R().optional(),repeatAt:C([Xt,Bt]).optional(),direction:C([Gt,qt]).optional()}),ze=F({value:Se.optional(),keyframes:B(Ae).optional(),loop:I([je,L()]).optional(),autoOrient:L().optional(),alongPathMode:C([Rt,Lt]).optional()}),Ee=F({translate:J([R(),R()]).optional(),rotate:R().optional(),skew:R().optional(),scale:J([R(),R()]).optional(),origin:J([R(),R()]).optional()}),Ne=(I([V(),Ee,F({value:Ee}),ze]),G(ze)),De=I([V(),B(I([V(),Ne])),Ne]),Te=F({start:C([at,st,lt,ut],It).optional(),offScreen:C([ct,ft,dt],Ut).optional(),mouseOut:C([ht,pt,mt,vt],Ft).optional(),finish:C([gt,yt]).optional(),visibilityThreshold:R().optional(),visibilityDebounce:R().optional()}),Ve=F({width:R(),pathData:V()}),Re=F({fontFamily:V(),fontStyle:V(),ascent:R(),unitsPerEm:R(),glyphs:G(Ve)}),Le=F({easings:G(J([R(),R(),R(),R()])).optional(),animations:G(Ne).optional(),fonts:G(Re).optional()}),We=F({phase:C([zt,Et,Nt,Dt,Tt,Vt]).optional(),fraction:R().optional()}),Ce=F({start:We.optional(),end:We.optional()}),Ie=(F({kind:C([bt,kt]).optional(),axis:C([xt,St,At,Pt]).optional(),source:C([_t,wt]).optional(),subject:V().optional(),smoothing:R().optional(),pin:L().optional(),pinAlign:C([Mt,Ot,jt]).optional(),pinOffset:R().optional(),pinDistance:R().optional(),range:Ce.optional()}),F({align:C([Mt,Ot,jt]).optional(),offset:R().optional(),distance:R().optional()})),Ue=C([Ct.auto,Ct.native,Ct.js]).optional(),Fe=F({type:W("time").optional(),engine:Ue,frameRate:R().optional(),duration:R().optional(),trigger:Te.optional(),delay:R().optional(),iterations:I([R(),W("infinite")]).optional(),fillMode:C([K,Q,H,$]).optional(),direction:C([tt,et,nt,rt]).optional()}),Xe={duration:R().optional(),iterations:R().optional(),engine:Ue,frameRate:R().optional(),axis:C([xt,St,At,Pt]).optional(),source:C([_t,wt]).optional(),subject:V().optional(),smoothing:R().optional(),pin:I([L(),Ie]).optional(),range:Ce.optional()},Be=U("type",[Fe,F(f({type:W("scroll")},Xe)),F(f({type:W("view")},Xe))]),Ge=F({target:V(),animateWith:B(V())}),qe=F({timeline:Be.optional(),definitions:Le.optional(),bindings:B(Ge).optional(),debugGlobalName:V().optional(),version:V().optional()}),Ze=I([V(),R(),B(R()),F({value:Z()}),Ee]),Je=I([R(),ze,F({value:R()})]),Ye=I([J([R(),R()]),ze,F({value:J([R(),R()])})]),Ke=I([V(),ze,F({value:V()})]),Qe=F({translate:Ye.optional(),rotate:Je.optional(),scale:Ye.optional(),skew:Je.optional(),origin:Ye.optional()}),He=F({copies:R().optional(),translate:Ye.optional(),rotate:Je.optional(),skew:Je.optional(),scale:Ye.optional(),origin:Ye.optional()}),$e=F({source:V().optional(),maskType:C([Zt,Jt]).optional(),maskUnits:C([Yt,Kt]).optional(),maskContentUnits:C([Yt,Kt]).optional(),x:R().optional(),y:R().optional(),width:R().optional(),height:R().optional()}),tn=F({pathData:Ke.optional()}),en=F({offset:Je.optional(),range:Ye.optional(),subPaths:C([ie,ae]).optional()}),nn=F({start:R().optional(),stretch:R().optional(),timeCrop:J([R(),R()]).optional()}),rn=F({without:C(["translate"]).optional(),source:V().optional(),retime:nn.optional()}),on=F({offset:R(),color:V()}),an=I([B(on),F({value:B(on)}),ze]),sn=F({type:C([he,pe]),start:Ye.optional(),end:Ye.optional(),center:Ye.optional(),radius:Je.optional(),focal:Ye.optional(),stops:an.optional(),gradientUnits:C([Yt,Kt]).optional(),spreadMethod:C([ce,fe,de]).optional(),gradientTransform:V().optional()}),ln=sn,un=F({pathData:V(),pathOverflow:C([Qt,Ht]).optional(),lengthAdjust:C([$t,te]).optional(),method:C([ee,ne]).optional(),spacing:C([re,oe]).optional(),startOffset:Je.optional(),textLength:Je.optional()}),cn=F({useGlyphs:L().optional()}),fn=F({transformBy:Qe.optional(),repeater:He.optional(),maskedBy:$e.optional(),clipPath:tn.optional(),strokeTrim:en.optional(),clone:rn.optional(),fillGradient:sn.optional(),strokeGradient:ln.optional(),textPath:un.optional(),text:cn.optional()});function dn(t,e){var n;const r=!1!==(null==e?void 0:e.strict),o={errors:[],warnings:[],strict:r},i=vn.isValid(t,o,["root"])?[]:[...o.errors];if(t&&"object"==typeof t){for(const e of function(t,e){const n=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==e?void 0:e.strict)};if(!fn.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}(t,{strict:r}))i.includes(e)||i.push(e);const e=null==(n=me(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 u="string"==typeof t.fontFamily?t.fontFamily:void 0,c=null!=u?u:i,f=a||"text"===t.type&&!!(null==(l=null==(s=t.effects)?void 0:s.text)?void 0:l.useGlyphs);if(f&&u&&!Object.prototype.hasOwnProperty.call(e,u)){const t=o+': glyph-mode text uses font-family "'+u+'", 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+"]",c,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=me(t))?void 0:e.version;return void 0===n||void 0!==ke(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 hn=X({type:V(),domType:V().optional(),textContent:V().optional(),id:V().optional(),meta:q().optional(),effects:fn.optional(),animate:De.optional(),style:G(I([V(),R()])).optional()},Ze),pn=X(d(f({},hn._shape),{children:Y(()=>B(pn),[]).optional()}),Ze),mn=F({width:I([R(),V()]).optional(),height:I([R(),V()]).optional(),viewBox:V().optional(),animator:qe.optional()}),vn=X(d(f(f({},hn._shape),mn._shape),{type:W("svg"),children:B(pn).optional()}),Ze);F({v:B(B(R())),i:B(B(R())).optional(),o:B(B(R())).optional(),c:L().optional()});function gn(t,e=!1){var n,r,o,i;const a=t.v,s=t.i,l=t.o,u=t.c;if(!a.length)return"";const c=[],f=a.length;c.push("M"+a[0][0]+","+a[0][1]);for(let t=1;t<f;t++){const o=a[t-1],i=null!=(n=null==l?void 0:l[t-1])?n:o,u=null!=(r=null==s?void 0:s[t])?r:a[t],f=a[t];!e&&i[0]===o[0]&&i[1]===o[1]&&u[0]===f[0]&&u[1]===f[1]?c.push("L"+f[0]+","+f[1]):c.push("C"+i[0]+","+i[1]+","+u[0]+","+u[1]+","+f[0]+","+f[1])}if(u&&f>0){const t=a[f-1],n=null!=(o=null==l?void 0:l[f-1])?o:t,r=null!=(i=null==s?void 0:s[0])?i:a[0],u=a[0];!e&&n[0]===t[0]&&n[1]===t[1]&&r[0]===u[0]&&r[1]===u[1]||c.push("C"+n[0]+","+n[1]+","+r[0]+","+r[1]+","+u[0]+","+u[1]),c.push("z")}return c.join("")}function yn(t,e,n){return t+(e-t)*n}function bn(t,e,n){const r=[],o=Math.max(t.length,e.length);for(let i=0;i<o;i++)r[i]=yn(t[i]||0,e[i]||0,n);return r}function kn(t,e,n){const r=Math.max(t.length,e.length),o=[];for(let i=0;i<r;i++)o.push(xn(t[i],e[i],n));return o}function xn(t,e,n){var r,o,i,a,s,l,u,c,f;if(!t||!e)return t||e||{v:[]};const d=Math.min(Math.max(n,0),1),h=Math.min(t.v.length,e.v.length),p=[],m=[],v=[];for(let n=0;n<h;n++){const f=t.v[n],h=e.v[n];p.push(bn(f,h,d));const g=null!=(o=null==(r=t.i)?void 0:r[n])?o:f,y=null!=(a=null==(i=e.i)?void 0:i[n])?a:h;m.push(bn(g,y,d));const b=null!=(l=null==(s=t.o)?void 0:s[n])?l:f,k=null!=(c=null==(u=e.o)?void 0:u[n])?c:h;v.push(bn(b,k,d))}return{v:p,i:m.length?m:void 0,o:v.length?v:void 0,c:null!=(f=t.c)?f:e.c}}function Sn(t,e,n){if(n<=0)return 0;if(n>=1)return 1;const r=3*t,o=3*(e-t)-r,i=1-r-o;function a(t){return((i*t+o)*t+r)*t}function s(t){return(3*i*t+2*o)*t+r}let l=n,u=0,c=1;for(let t=0;t<8;t++){const t=a(l)-n;if(Math.abs(t)<1e-6)return l;const e=s(l);if(Math.abs(e)<1e-6)break;l-=t/e}for(l=n;u<c;){const t=a(l);if(Math.abs(t-n)<1e-6)return l;n>t?u=l:c=l,l=(c+u)/2}return l}function 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=Sn(e,r,t),((s*n+a)*n+i)*n;var n}}function Pn(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function _n(t,e,n,r,o){const i=Pn(t,e,o),a=Pn(e,n,o),s=Pn(n,r,o),l=Pn(i,a,o),u=Pn(a,s,o),c=Pn(l,u,o);return{left:[t,i,l,c],right:[c,u,s,r]}}function wn(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=Sn(n,o,e),s=[n,r],l=[o,i],{left:u,right:c}=_n([0,0],s,l,[1,1],a),f=u[3][0],d=u[3][1];let h,p;f>1e-9&&Math.abs(d)>1e-9&&(h=[u[1][0]/f,u[1][1]/d,u[2][0]/f,u[2][1]/d]);const m=1-f,v=1-d;return m>1e-9&&Math.abs(v)>1e-9&&(p=[(c[1][0]-f)/m,(c[1][1]-d)/v,(c[2][0]-f)/m,(c[2][1]-d)/v]),{left:h,right:p}}function Mn(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+")"}var jn=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),zn=new Set(["translate","rotate","scale","skew"]),En=new Set(["offset-distance","offsetDistance"]);function Nn(t,e){var n;if(!t)return"";const r=null==(n=null==e?void 0:e.withUnits)||n,o=[],i=t.translate,a=t.origin,s=t.rotate,l=t.skew,u=t.scale,c=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+c+","+i[1]+c+")"),a&&o.push("translate("+a[0]+c+","+a[1]+c+")"),null!=s&&o.push("rotate("+s+f+")"),null!=l&&o.push("skewX("+l+f+")"),u&&o.push("scale("+u[0]+","+u[1]+")"),a&&o.push("translate("+-a[0]+c+","+-a[1]+c+")"),o.join("")}var Dn=new Set(["offset-distance","offsetDistance"]),Tn=1e3;function Vn(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()):t}var Rn=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 Ln(t){return Rn.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Wn(t,e,n){return Math.max(e,Math.min(t,n))}function Cn(t,e,n,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,a=i*i,s=o*o,l=a*i,u=3*o*a,c=3*s*i,f=s*o;return[l*t[0]+u*e[0]+c*n[0]+f*r[0],l*t[1]+u*e[1]+c*n[1]+f*r[1]]}var In=1e-4;function Un(t,e,n,r,o){const i=Fn(t,e,n,r,o);if(0===i[0]&&0===i[1]){return Fn(t,e,n,r,o<.5?o+In:o-In)}return i}function Fn(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 Xn(t,e,n,r,o=100){const i=o+1,a=new Float64Array(i),s=new Float64Array(i);let l=Cn(t,e,n,r,0);a[0]=0,s[0]=0;let u=0;for(let c=1;c<i;c++){const i=c/o,f=Cn(t,e,n,r,i),d=f[0]-l[0],h=f[1]-l[1];u+=Math.sqrt(d*d+h*h),a[c]=i,s[c]=u,l=f}return{ts:a,ds:s}}function Bn(t,e){const{ts:n,ds:r}=t,o=n.length-1;if(e<=n[0])return r[0];if(e>=n[o])return r[o];let i=1,a=o;for(;i<a;){const t=i+a>>>1;n[t]<e?i=t+1:a=t}const s=n[a-1],l=n[a]-s,u=l>0?(e-s)/l:0;return r[a-1]+u*(r[a]-r[a-1])}function Gn(t){const e=_e(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 qn(t){return Pe(t)}function Zn(t){return we(t)}var Jn=new WeakMap;function Yn(t,e,n,r){let o=Jn.get(t);const i=null==o?void 0:o.get(e);if(i)return i;const a=Oe(t),s=Me(e),l=[n[0]+(a?a[0]:0),n[1]+(a?a[1]:0)],u=[r[0]+(s?s[0]:0),r[1]+(s?s[1]:0)],c=Xn(n,l,u,r),f={P0:n,P1:l,P2:u,P3:r,lut:c,totalArc:c.ds[c.ds.length-1]};return o||(o=new WeakMap,Jn.set(t,o)),o.set(e,f),f}var Kn=.5,Qn=5,Hn=32;function $n(t,e){var n,r,o;if(!function(t){const e=t.keyframes;if(!Array.isArray(e))return!1;if(t.autoOrient)return!0;for(const t of e)if(Me(t)||Oe(t))return!0;return!1}(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:Kn,l=null!=(r=null==e?void 0:e.rotationTolerance)?r:Qn,u=null!=(o=null==e?void 0:e.maxSamplesPerSegment)?o:Hn,c=[],f=Gn(i[0]);if(!f)return t;const d=a?function(t,e){const n=Gn(t),r=Gn(e);if(!n||!r)return 0;const o=Yn(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;c.push(er(qn(i[0]),or(nr(i[0]),nr(i[0]),0,f,d,a)));for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1],r=Gn(e),o=Gn(n);r&&o?(a&&t>0&&ar(c,e,n,r,o,l),lr(c,e,n,r,o,a,s,l,u)):c.push(er(qn(n),or(nr(n),nr(n),1,null!=o?o:[0,0],void 0,a)))}const h=Zn(i[i.length-1]);h&&(c[c.length-1].e=h),a&&tr(c);const p={keyframes:c};return void 0!==t.loop&&(p.loop=t.loop),p}function tr(t){let e;for(const n of t){const t=_e(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 er(t,e){return{t:t,v:e}}function nr(t){const e=_e(t);if(e&&"object"==typeof e&&!Array.isArray(e))return e}function rr(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 or(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]=rr(o,s,n))}return void 0!==o&&(a.rotate=o+ir(t,e,n)),a}function ir(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=rr(r,o,n);return"number"==typeof i?i:0}function ar(t,e,n,r,o,i){const a=t[t.length-1],s=_e(a),l=null==s?void 0:s.rotate;if("number"!=typeof l)return;const u=nr(e),c=l-ir(u,u,0),f=Yn(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,c);if(Math.abs(p)<=i)return;const m=qn(e),v=Math.min(m+sr,(m+qn(n))/2),g=or(nr(e),nr(e),0,r,h,!0);t.push(er(v,g))}var sr=.05;function lr(t,e,n,r,o,i,a,s,l){const u=Yn(e,n,r,o),c=qn(e),f=qn(n),d=Zn(e),h=(p=d)?An([p[1],p[0],p[3],p[2]]):t=>t;var p;const m=nr(e),v=nr(n),g=function(t,e,n,r,o){const i=[];ur(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),ur(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++)cr(a[o],a[o+1],s,t,e,n,r,l);return s}(u,i,a,s,l),y=[];for(const t of g){const e=Bn(u.lut,t),n=Wn(u.totalArc>0?e/u.totalArc:t,0,1),r={u:Wn(h(n),0,1),p:n,pos:Cn(u.P0,u.P1,u.P2,u.P3,t)};if(i){const e=Un(u.P0,u.P1,u.P2,u.P3,t);r.rotateDeg=180*Math.atan2(e[1],e[0])/Math.PI}y.push(r)}let b=d,k=0;const x=t.length-1;for(let e=0;e<y.length;e++){const n=y[e],r=k<1?Wn((n.u-k)/(1-k),0,1):1,{left:o,right:a}=wn(b,r),s=0===e?x:t.length-1;o?t[s].e=o:delete t[s].e;const l=c+n.u*(f-c),u=or(m,v,n.p,n.pos,n.rotateDeg,i);t.push(er(l,u)),b=a,k=n.u}}function ur(t,e,n,r,o){const i=e-t,a=n-e,s=i-2*a+(r-n),l=2*(a-i),u=i;if(Math.abs(s)<1e-10){if(Math.abs(l)>1e-10){const t=-u/l;t>1e-6&&t<.999999&&o.push(t)}return}const c=l*l-4*s*u;if(c<0)return;const f=Math.sqrt(c),d=(-l-f)/(2*s),h=(-l+f)/(2*s);d>1e-6&&d<.999999&&o.push(d),h>1e-6&&h<.999999&&o.push(h)}function cr(t,e,n,r,o,i,a,s){const l=(t+e)/2,u=Cn(r.P0,r.P1,r.P2,r.P3,t),c=Cn(r.P0,r.P1,r.P2,r.P3,e),f=e-t,d=Cn(r.P0,r.P1,r.P2,r.P3,t+.25*f),h=Cn(r.P0,r.P1,r.P2,r.P3,l),p=Cn(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(fr(d,u,c),fr(h,u,c),fr(p,u,c));let v=!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&&(v=!1)}m<=i&&v||s.remaining<=0||f<1e-6?n.push(e):(s.remaining-=1,cr(t,l,n,r,o,i,a,s),cr(l,e,n,r,o,i,a,s))}function fr(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)}var dr=1;function hr(t,e,n,r){var o,i;if("d"===t){return{paths:kn(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 jn.has(t)?function(t,e,n){return[yn(t[0]||0,e[0]||0,n),yn(t[1]||0,e[1]||0,n),yn(t[2]||0,e[2]||0,n),yn(void 0===t[3]?1:t[3],void 0===e[3]?1:e[3],n)]}(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?yn(e,n,r):zn.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?bn(e||[],n||[],r):yn(+(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]=yn(+(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]=bn(r||t,a||t,n)}else o[i]=null!=a?a:r}return o}(e,n,r)}function pr(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[ue];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=>zn.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 u=f({},t);return delete u[a],d(f({},u),{transform:l})}var mr=[1,0,0,1,0,0];function vr(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 gr=(t,e)=>[1,0,0,1,t,e],yr=(t,e)=>[t,0,0,e,0,0];function br(t){const e=t*Math.PI/180;return[Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]}var kr=t=>[1,0,Math.tan(t*Math.PI/180),1,0,0],xr=t=>[1,Math.tan(t*Math.PI/180),0,1,0,0];function Sr(t){let e=mr;t.translate&&(e=vr(e,gr(t.translate[0],t.translate[1])));const n=t.origin&&(void 0!==t.rotate||t.scale);return n&&(e=vr(e,gr(t.origin[0],t.origin[1]))),void 0!==t.rotate&&(e=vr(e,br(t.rotate))),t.scale&&(e=vr(e,yr(t.scale[0],t.scale[1]))),n&&(e=vr(e,gr(-t.origin[0],-t.origin[1]))),e}function Ar(t,e,n){return t+(e-t)*n}function Pr(t,e){return null==t?mr:"string"==typeof t?function(t){let e=mr;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=vr(e,gr(n[0]||0,n[1]||0)):"scale"===t?e=vr(e,yr(n[0],n.length>1?n[1]:n[0])):"rotate"===t?e=vr(e,br(n[0])):"skewX"===t?e=vr(e,kr(n[0])):"skewY"===t?e=vr(e,xr(n[0])):"matrix"===t&&(e=vr(e,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return e}(t):t.keyframes?Sr(function(t,e){var n,r,o,i,a,s,l;if(!t.length)return{};if(e<=(null!=(n=t[0].time)?n:0))return t[0].value||{};if(e>=(null!=(r=t[t.length-1].time)?r:0))return t[t.length-1].value||{};let u=0;for(;u<t.length-1&&(null!=(o=t[u+1].time)?o:0)<e;)u++;const c=t[u],f=t[u+1],d=(e-(null!=(i=c.time)?i:0))/((null!=(a=f.time)?a:0)-(null!=(s=c.time)?s:0)||1),h=c.value||{},p=f.value||{},m={};return h.translate&&p.translate?m.translate=[Ar(h.translate[0],p.translate[0],d),Ar(h.translate[1],p.translate[1],d)]:m.translate=h.translate||p.translate,void 0!==h.rotate&&void 0!==p.rotate?m.rotate=Ar(h.rotate,p.rotate,d):m.rotate=null!=(l=h.rotate)?l:p.rotate,h.scale&&p.scale?m.scale=[Ar(h.scale[0],p.scale[0],d),Ar(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?Sr(t.value):"object"!=typeof t||Array.isArray(t)?mr:Sr(t)}var _r=new Set(["svg","g","symbol"]),wr=new Set(["defs","mask","clipPath","title"]);function Mr(t,e){var n;"string"==typeof t.id&&e.set(t.id,t),null==(n=t.children)||n.forEach(t=>Mr(t,e))}function Or(t){return null==t?0:Number(t)}function jr(t){return Math.round(100*t)/100+0}function zr(t,e,n){var r,o,i,a,s;const l=null!=(r=t.fill)?r:"",u=null!=(o=t.stroke)?o:"",c=null!=(a=null!=(i=t["stroke-width"])?i:t.strokeWidth)?a:"",f=jr(function(t,e,n,r){var o,i,a,s,l,u;if(t&&t.keyframes&&t.keyframes.length){const e=t.keyframes;if(r<=(null!=(o=e[0].time)?o:0))return e[0].value;if(r>=(null!=(i=e[e.length-1].time)?i:0))return e[e.length-1].value;let n=0;for(;n<e.length-1&&(null!=(a=e[n+1].time)?a:0)<r;)n++;const c=e[n],f=e[n+1],d=(r-(null!=(s=c.time)?s:0))/((null!=(l=f.time)?l:0)-(null!=(u=c.time)?u:0)||1);return Ar(c.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(jr).join(",");return t.type+"|"+function(t){var e;switch(t.type){case"rect":return Or(t.width)+","+Or(t.height)+","+Or(t.x)+","+Or(t.y);case"ellipse":return Or(t.rx)+","+Or(t.ry)+","+Or(t.cx)+","+Or(t.cy);case"circle":return Or(t.r)+","+Or(t.cx)+","+Or(t.cy);case"path":return String(null!=(e=t.d)?e:"");default:return""}}(t)+"|["+h+"]|f:"+l+"|s:"+u+"|sw:"+(Or(c)||"")+"|o:"+f+"|m:"+d}function Er(t,e,n,r,o){var i;const a=t.type||"";if(wr.has(a))return;const s=vr(e,function(t,e){return t.animate&&t.animate.transform?Pr(t.animate.transform,e):void 0!==t.transform?Pr(t.transform,e):mr}(t,n));if("use"===a){const e="string"==typeof t.href?t.href.replace(/^#/,""):"",i=r.get(e),a=vr(s,gr(Or(t.x),Or(t.y)));return void(i?Er(i,a,n,r,o):o.push("UNRESOLVED_USE:#"+e))}_r.has(a)?null==(i=t.children)||i.forEach(t=>Er(t,s,n,r,o)):o.push(zr(t,s,n))}function Nr(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=>Nr(t,e))}function Dr(t,e){const n=new Map;Mr(t,n);const r=[];return Er(t,mr,e,n,r),r.sort()}function Tr(t,e){const n=new Set;Nr(t,n),Nr(e,n);const r=[];for(const o of Array.from(n).sort((t,e)=>t-e)){const n=Dr(t,o),i=Dr(e,o),a=Vr(n,i),s=Vr(i,n);(a.length||s.length)&&r.push({time:o,onlyInA:a,onlyInB:s})}return r}function Vr(t,e){const n=new Map;for(const t of e)n.set(t,(n.get(t)||0)+1);const r=[];for(const e of t){const t=n.get(e)||0;t>0?n.set(e,t-1):r.push(e)}return r}var Rr=48,Lr=/[MmLlHhVvCcSsQqTtAaZz]/;function Wr(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 Cr(t){const e=function(t){const e=function(t){const e=[],n=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=n.exec(t));)e.push(r[0]);return e}(t),n=[];let r=0,o=0,i=0,a=0,s=0,l=0,u=0,c=0,f=0,d="";const h=()=>parseFloat(e[r++]),p=(t,e,r)=>{const a=[o,i],s=Xn(a,t,e,r,Rr);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];Lr.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const n=t>="a",v=t.toUpperCase();if("Z"!==v){if("M"===v){const e=h()+(n?o:0),r=h()+(n?i:0);o=e,i=r,a=e,s=r,d=t;continue}if("L"===v)m(h()+(n?o:0),h()+(n?i:0));else if("H"===v)m(h()+(n?o:0),i);else if("V"===v)m(o,h()+(n?i:0));else if("C"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],p(t,e,r)}else if("S"===v){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-l,2*i-u]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)],r=[h()+(n?o:0),h()+(n?i:0)];l=e[0],u=e[1],p(t,e,r)}else if("Q"===v){const t=[h()+(n?o:0),h()+(n?i:0)],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Wr([o,i],t,e);p(r,a,e)}else if("T"===v){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-c,2*i-f]:[o,i],e=[h()+(n?o:0),h()+(n?i:0)];c=t[0],f=t[1];const{P1:r,P2:a}=Wr([o,i],t,e);p(r,a,e)}else{if("A"!==v){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,u=l>0?(e-s)/l:0;return n[a-1]+u*(n[a]-n[a-1])}(o.lut,i):0,[s,l]=Cn(o.P0,o.P1,o.P2,o.P3,a),[u,c]=Un(o.P0,o.P1,o.P2,o.P3,a);return{x:s,y:l,angle:Math.atan2(c,u)}};return{totalLength:r,closed:a,sampleAtDistance(t){if(a&&r>0&&(t<0||t>r))return s((t%r+r)%r);if(!a&&(t<0||t>r)){const e=t<0?0:r,n=s(e),o=t-e;return{x:n.x+Math.cos(n.angle)*o,y:n.y+Math.sin(n.angle)*o,angle:n.angle}}return s((o=r,(e=t)<(n=0)?n:e>o?o:e));var e,n,o}}}var Ir=(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 Ur(t,e){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function Fr(t,e){let n="";for(let r=0;r<t.length;r++){const o=Ur(t[r],e);r>0&&45!==o.charCodeAt(0)&&(n+=" "),n+=o}return n}function Xr(t,e,n){return[t[0]*e+t[2]*n+t[4],t[1]*e+t[3]*n+t[5]]}var Br=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function Gr(t,e,n=2){const r=[];let o;for(Br.lastIndex=0;null!==(o=Br.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]=Xr(e,s(),s());i+=t+Fr([r,o],n)}else if("C"===t){const[t,r]=Xr(e,s(),s()),[o,a]=Xr(e,s(),s()),[l,u]=Xr(e,s(),s());i+="C"+Fr([t,r,o,a,l,u],n)}else if("Q"===t){const[t,r]=Xr(e,s(),s()),[o,a]=Xr(e,s(),s());i+="Q"+Fr([t,r,o,a],n)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}function qr(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(Zr),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){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}var Jr=16,Yr=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",se,"xml:space"],Kr=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],Qr=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function Hr(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:e}}function $r(t){return"string"==typeof t?t:void 0}function to(t){const e=t.animate;if(!e||"object"!=typeof e)return;let n;for(const t of Qr)void 0!==e[t]&&((null!=n?n:n={})[t]=e[t]);return n}function eo(t,e){var n,r,o,i,a,s,l,u,c,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=$r(t.fontFamily))?n:e.fontFamily,fontSize:null!=(r=Hr(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=Hr(t.letterSpacing))?s:e.letterSpacing,wordSpacing:null!=(l=Hr(t.wordSpacing))?l:e.wordSpacing,opacity:null!=(u=Hr(p("opacity")))?u:e.opacity,animate:null!=(c=d?void 0:to(t))?c:e.animate};for(const t of Kr){const n=null!=(f=p(t))?f:e[t];void 0!==n&&(m[t]=n)}return m}function no(t){var e,n,r;return{fontFamily:$r(t.fontFamily),fontSize:null!=(e=Hr(t.fontSize))?e:Jr,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(n=Hr(t.letterSpacing))?n:0,wordSpacing:null!=(r=Hr(t.wordSpacing))?r:0}}function ro(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 Kr)void 0!==t[n]&&(e[n]=t[n]);return void 0!==t.animate&&(e.animate=t.animate),e}function oo(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 io(t){const e=Object.keys(t);return 1===e.length?t[e[0]]:void 0}var ao=.6,so="px-missing-glyph";function lo(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)),u="M"+r+" 0L"+o+" 0L"+o+" "+i+"L"+r+" "+i+"Z";if(a<=2*l||s<=2*l)return u;const c=r+l,f=o-l,d=-l,h=i+l;return u+"M"+c+" "+d+"L"+c+" "+h+"L"+f+" "+h+"L"+f+" "+d+"Z"}function uo(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=Cr(e);if(!l)return null==a||a.push("textGlyphs: unparsable along-path geometry (caret)"),[];const u=io(i),c=[];let f=0;const d=(t,e)=>{var n,r;const o=eo(t,e),s=$r(t[se]);if(s&&!(null==(n=t.children)?void 0:n.length)){const t=oo(o,i,u,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,u=a+o.letterSpacing+(" "===r?o.wordSpacing:0);c.push({advStart:f,advEnd:f+u,glyphW:a,ascent:l,fontSize:o.fontSize}),f+=u}}if(t.children)for(const e of t.children)d(e,o)};d(t,no(t));const h=f,p=qr(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,v=m>0&&h>0?m/h:1,g=qr(null==s?void 0:s.startOffset),{along:y,perp:b}=fo(t),k=y+("animated"===g.kind?Number(null==(o=g.keyframes[0])?void 0:o.value)||0:"static"===g.kind&&Number(g.value)||0),x=t=>({x:t.x-b*Math.sin(t.angle),y:t.y+b*Math.cos(t.angle),angle:t.angle});return c.map(t=>{const e=k+t.advStart*v,n=k+t.advEnd*v,r=x(l.sampleAtDistance(e)),o=x(l.sampleAtDistance(n)),i=l.sampleAtDistance(k+(t.advStart+t.glyphW/2)*v);return{x:r.x,y:r.y,width:t.advEnd-t.advStart,ascent:t.ascent,fontSize:t.fontSize,endX:o.x,endY:o.y,rotation:180*i.angle/Math.PI}})}(t,e.alongPath.pathD,e);const{glyphs:s,warnings:l}=e,u=io(s),c={x:null!=(r=Hr(t.x))?r:0,y:null!=(o=Hr(t.y))?o:0},f=[],d=[{start:c.x,end:c.x}];let p=0;const m=(t,e)=>{var n;const r=oo(e,s,u,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:c.x,y:c.y,width:l,ascent:a,fontSize:e.fontSize,line:p}),c.x+=l,d[p].end=c.x}},v=(t,e)=>{var n,r,o;const i=eo(t,e),a=Hr(t.x),s=Hr(t.y);void 0!==a&&(c.x=a,p=d.length,d.push({start:c.x,end:c.x})),void 0!==s&&(c.y=s),c.x+=null!=(n=Hr(t.dx))?n:0,c.y+=null!=(r=Hr(t.dy))?r:0;const l=$r(t[se]);if(l&&!(null==(o=t.children)?void 0:o.length)&&m(l,i),t.children)for(const e of t.children)v(e,i)},g=no(t);if(t.children)for(const e of t.children){const t=f.length;if(v(e,g),f.length===t){const t=eo(e,g),n=oo(t,s,u),r=(null==n?void 0:n.unitsPerEm)||1e3;f.push({x:c.x,y:c.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=$r(t[se]);y&&!(null==(a=t.children)?void 0:a.length)&&m(y,g);const b=$r(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 co(t,e,n,r,o=0){const{x:i,y:a,angle:s}=t.sampleAtDistance(e),l=Math.cos(s),u=Math.sin(s),c=r/2;return[n*l,n*u,-n*u,n*l,i-n*l*c-o*u,a-n*u*c+o*l]}function fo(t){var e,n,r;return{along:(null!=(e=Hr(t.x))?e:0)+(null!=(n=Hr(t.dx))?n:0),perp:null!=(r=Hr(t.dy))?r:0}}function ho(t,e,n,r,o,i){const{glyphs:a,create:s=Ir,warnings:l}=r,u=e?Cr(e):null;if(!u)return null==l||l.push("textGlyphs: unparsable along-path geometry"),null;const c=io(a),{cells:h,width:p}=function(t,e,n,r){const o=[];let i=0;const a=(t,s)=>{var l,u;const c=eo(t,s),f=$r(t[se]);if(f&&!(null==(l=t.children)?void 0:l.length)){const t=oo(c,e,n,r);if(t){const e=c.fontSize/t.unitsPerEm,n=null!=(u=t.ascent)?u:.9*t.unitsPerEm,r=ro(c);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:ao*t.unitsPerEm,s=a*e;o.push({glyphD:lo(a,n),widthEm:a,scale:e,paint:r,isMissing:!0,midBase:i+s/2}),i+=s}else i+=(l?l.width:0)*e;i+=c.letterSpacing+(" "===s?c.wordSpacing:0)}}}if(t.children)for(const e of t.children)a(e,c)};return a(t,no(t)),{cells:o,width:i}}(t,a,c,l);if(!h.length)return xo(t,[],s);const{along:m,perp:v}=fo(t),g=po(n),y=po(o),b=t=>t>0&&p>0?t/p:1,k="clip"===i&&!u.closed;if(g.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}(g.times,y.times),n=(t,e)=>m+g.at(e)+b(y.at(e))*t.midBase,r=g.animated?g.loop:y.loop;return xo(t,function(t,e,n,r,o,i,a,s=0){const l=Math.max(e.totalLength/mo,.5),u=t=>t>=0&&t<=e.totalLength,c=[];for(const h of t){const t=[h.scale,0,0,h.scale,-h.scale*(h.widthEm/2),0],p=Gr(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:[go(r-s*l,3),go(o+s*a,3)],rotate:go(180*i/Math.PI,3)}}},v=[],g=[],y=(t,e)=>{v.push(m(t,e)),a&&g.push({time:e,value:u(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(vo,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)}}tr(v);const b={keyframes:v};void 0!==o&&(b.loop=o);const k={transform:b};if(h.paint.animate&&Object.assign(k,h.paint.animate),a&&g.some(t=>0===t.value)){const t={keyframes:g};void 0!==o&&(t.loop=o),k.opacity=t}c.push(i("path",d(f(f({d:p},yo(h.paint)),bo(h.isMissing)),{animate:k}),[]))}return c}(h,u,n,e,r,s,k,v),s)}const x=b(y.at(0)),S=m+g.at(0);return xo(t,ko((k?h.filter(t=>{const e=S+t.midBase*x;return e>=0&&e<=u.totalLength}):h).map(t=>({glyphD:t.glyphD,paint:t.paint,isMissing:t.isMissing,m:co(u,S+t.midBase*x,t.scale,t.widthEm,v)})),s,l),s)}function po(t){var e;const n=qr(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 mo=48,vo=64;function go(t,e){const n=u(10,e);return Math.round(t*n)/n}function yo(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 Kr)void 0!==t[n]&&(e[n]=t[n]);return e}function bo(t){return t?{[le]:so}:{}}function ko(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=Gr(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},yo(t)),bo(i)),void 0!==t.animate?{animate:f({},t.animate)}:{}),[]));return o}function xo(t,e,n){const r={};for(const e of Object.keys(t))"type"!==e&&"children"!==e&&-1===Yr.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 So(t,e){return e.alongPath?ho(t,e.alongPath.pathD,e.alongPath.startOffset,e,e.alongPath.textLength,e.alongPath.pathOverflow):function(t,e){var n,r,o;const{glyphs:i,create:a=Ir,warnings:s}=e,l=io(i),u={x:null!=(n=Hr(t.x))?n:0,y:null!=(r=Hr(t.y))?r:0},c=[],f=[{start:u.x,end:u.x}];let d=0;const h=(t,e)=>{var n;const r=oo(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=ro(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)c.push({glyphD:s.pathData,m:[a,0,0,a,u.x,u.y],paint:p,line:d,x:u.x,y:u.y,scale:a}),u.x+=s.width*a;else if(/\S/.test(i)){const t=s&&s.width>0?s.width:ao*o;c.push({glyphD:lo(t,h),m:[a,0,0,a,u.x,u.y],paint:p,isMissing:!0,line:d,x:u.x,y:u.y,scale:a}),u.x+=t*a}else u.x+=(s?s.width:0)*a;u.x+=e.letterSpacing+(" "===i?e.wordSpacing:0),f[d].end=u.x}},p=(t,e)=>{var n,r,o;const i=eo(t,e),a=Hr(t.x),s=Hr(t.y);void 0!==a&&(u.x=a,d=f.length,f.push({start:u.x,end:u.x})),void 0!==s&&(u.y=s),u.x+=null!=(n=Hr(t.dx))?n:0,u.y+=null!=(r=Hr(t.dy))?r:0;const l=$r(t[se]);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=no(t);if(t.children)for(const e of t.children)p(e,m);const v=$r(t[se]);v&&!(null==(o=t.children)?void 0:o.length)&&h(v,m);const g=$r(t.textAnchor);if("middle"===g||"end"===g)for(const t of c){const e=f[t.line].end-f[t.line].start,n="middle"===g?-e/2:-e;t.m=[t.scale,0,0,t.scale,t.x+n,t.y]}return xo(t,ko(c,a,s),a)}(t,e)}var Ao=.15;function Po(t){const e=qr(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}}var _o=t=>Math.round(1e3*t)/1e3;function wo(t,e){var n;if("clip"===e.pathOverflow)return{d:t,startShift:0};const r=Cr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Ao*o,a=Po(e.startOffset),s=Po(e.textLength).max||(null!=(n=e.advance)?n:0),l=Math.max(0,-a.min),u=Math.max(0,a.max+s-o),c=l>0?l+i:0,f=u>0?u+i:0;if(f<=0&&c<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),h=r.sampleAtDistance(o);let p=t;if(c>0){const e=d.x-Math.cos(d.angle)*c,n=d.y-Math.sin(d.angle)*c,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");p="M"+_o(e)+","+_o(n)+"L"+_o(d.x)+","+_o(d.y)+r}if(f>0){const t=h.x+Math.cos(h.angle)*f,e=h.y+Math.sin(h.angle)*f;p+="L"+_o(t)+","+_o(e)}return{d:p,startShift:c}}var Mo=6;function Oo(t,e){const{problems:n}=function(t){try{return{problems:dn(t)}}catch(t){return{problems:[]}}}(t);if(!n.length)return;const r=n.slice(0,Mo),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 jo="https://github.com/pixodesk/pixodesk-svg-animator/blob/main/docs/diagnostics.md";function zo(t){return"PX"+t+" "+jo+"#px"+t}function Eo(t,e){const n=e?e+" ":"";return{warn:(e,r,...o)=>{const i=zo(r);(null==t?void 0:t.onWarn)?t.onWarn({code:r,kind:e,data:o,message:i}):(null==t?void 0:t.muteWarn)||console.warn(n+e+" "+i,...o)},error:(e,r,...o)=>{const i=zo(r),a=function(t){return t.find(t=>t instanceof Error)}(o);(null==t?void 0:t.onError)?t.onError({code:r,kind:e,data:o,message:i,error:a}):(null==t?void 0:t.muteError)||console.error(n+e+" "+i,...o)}}}function No(t){return"scroll"===(null==t?void 0:t.timelineSource)}function Do(t){return("number"==typeof(null==t?void 0:t.duration)&&t.duration>0?t.duration:Tn)*("number"==typeof(null==t?void 0:t.iterations)&&t.iterations>0?t.iterations:1)}function To(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 Vo="cover";function Ro(t,e,n,r){var o;const[i,a]=To(null!=(o=null==t?void 0:t.phase)?o:Vo,n,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:e)*(a-i)}function Lo(t,e,n,r){const o=n-t,i=Ro(null==r?void 0:r.start,0,e,n),a=Ro(null==r?void 0:r.end,1,e,n);return a<=i?o>=a?1:0:Wn((o-i)/(a-i),0,1)}function Wo(t,e,n){var r,o;const i=e>0?Wn(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:Wn((i-a)/(s-a),0,1)}function Co(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"}var Io=0;function Uo(){return"_px_"+Date.now().toString(36)+(++Io).toString(36)+Math.random().toString(36).substring(2,6)}function Fo(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>Fo(t));const e=t,n={};for(const t of Object.keys(e))n[t]=Fo(e[t]);return n}var Xo=new Set(["script","foreignobject"]),Bo=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),Go=new Set(["href","xlink:href","src"]),qo=new Set(["mixBlendMode","isolation"]),Zo=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,Jo=/^data:image\/svg\+xml(?:;[^,]*)?,/i,Yo=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,Ko=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function Qo(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(Bo.has(n)){const t=String(e);return t.startsWith("#")||(/^url\(#[^)]+\)$/.test(t)||Go.has(n)&&(Zo.test(t)||Jo.test(t)||function(t){const e=Yo.exec(t);return!!e&&Ko.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 Ho(t){const e=new Set,n=new Set,r=[{schema:t,path:""}];for(;r.length;){const{schema:t,path:o}=r.shift(),i=T(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+"|"+$o(t,i.key)})}}return[...e].sort()}function $o(t,e){const n=T(t);if("shape"!==n.kind)return"?";const r=n.shape[e];if(void 0===r)return"?";const o=T(r);return String(("optional"===o.kind?o.inner:r)._default)}function ti(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 ei(t){const e=t.added.length>0||t.removed.length>0,n=ke(t.lastReleased),r=ke(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_WIRE_SCHEMA_VERSION is "+t.declared+". Set it to "+o+" and add the PX_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 PX_WIRE_STEPS entry reaches "+t.declared+"."}}function ni(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=ke(t[n-1].version),i=ke(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 PX_WIRE_STEPS entry.")}const i=t[t.length-1].version;return i!==n&&o.push("PX_WIRE_SCHEMA_VERSION is "+n+" but the last release record is "+i+" — a bump needs its changelog entry (run scripts/schema-release.mjs --apply)."),o}
|
package/dist/internal.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PX_ANIM_ATTR_NAME as e,PX_ANIM_SRC_ATTR_NAME as t,PX_COLOR_ATTR_NAMES as n,PX_CSS_ONLY_STYLE_PROPS as r,PX_DEFAULT_DURATION_MS as a,PX_DISALLOWED_SVG_TAGS_LOWER as s,PX_LOOP_JUMP_SHIFT_MS as o,PX_PCT_BASED_ATTR_NAMES as i,PX_STYLE_ATTR_NAMES as l,PX_TEXT_CONTENT_ATTR as c,PX_TRANSFORM_FN_NAMES as u,PX_UNKNOWN_KEY_ERROR as d,bezierToSvgPath as h,camelCaseToKebabWordIfNeeded as f,clamp as m,composeTransformParts as v,createDiagnostics as p,createPathSampler as y,cubicBezier as g,deepClone as b,describeSchema as k,extendedPathForBrowser as w,generateUniqueId as E,interpolateValue as S,kebabToCamelCaseWord as M,keyframeEasing as x,keyframeValue as R,layoutGlyphTextChars as _,materializeGlyphText as P,materializeGlyphTextAlongPath as I,materializeMotionPathInPropAnim as V,mergeStaticTransformIntoAnimDef as j,parseWireVersion as q,reportDocumentDiagnostics as A,reverseEasing as N,sanitizeAttributeValue as O,splitEasing as T,subdivideCubicBezier as W,toRGBA as X}from"./chunk-7ZO7PQKZ.min.js";var K=[1,0,0,1,0,0];function U(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}var B=(e,t)=>[1,0,0,1,e,t],C=(e,t)=>[e,0,0,t,0,0];function D(e){const t=e*Math.PI/180;return[Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0]}var H=e=>[1,0,Math.tan(e*Math.PI/180),1,0,0],Y=e=>[1,Math.tan(e*Math.PI/180),0,1,0,0];function Z(e){let t=K;e.translate&&(t=U(t,B(e.translate[0],e.translate[1])));const n=e.origin&&(void 0!==e.rotate||e.scale);return n&&(t=U(t,B(e.origin[0],e.origin[1]))),void 0!==e.rotate&&(t=U(t,D(e.rotate))),e.scale&&(t=U(t,C(e.scale[0],e.scale[1]))),n&&(t=U(t,B(-e.origin[0],-e.origin[1]))),t}function z(e,t,n){return e+(t-e)*n}function L(e,t){return null==e?K:"string"==typeof e?function(e){let t=K;const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(e);){const e=r[1],n=r[2].split(/[\s,]+/).filter(Boolean).map(Number);"translate"===e?t=U(t,B(n[0]||0,n[1]||0)):"scale"===e?t=U(t,C(n[0],n.length>1?n[1]:n[0])):"rotate"===e?t=U(t,D(n[0])):"skewX"===e?t=U(t,H(n[0])):"skewY"===e?t=U(t,Y(n[0])):"matrix"===e&&(t=U(t,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return t}(e):e.keyframes?Z(function(e,t){var n,r,a,s,o,i,l;if(!e.length)return{};if(t<=(null!=(n=e[0].time)?n:0))return e[0].value||{};if(t>=(null!=(r=e[e.length-1].time)?r:0))return e[e.length-1].value||{};let c=0;for(;c<e.length-1&&(null!=(a=e[c+1].time)?a:0)<t;)c++;const u=e[c],d=e[c+1],h=(t-(null!=(s=u.time)?s:0))/((null!=(o=d.time)?o:0)-(null!=(i=u.time)?i:0)||1),f=u.value||{},m=d.value||{},v={};return f.translate&&m.translate?v.translate=[z(f.translate[0],m.translate[0],h),z(f.translate[1],m.translate[1],h)]:v.translate=f.translate||m.translate,void 0!==f.rotate&&void 0!==m.rotate?v.rotate=z(f.rotate,m.rotate,h):v.rotate=null!=(l=f.rotate)?l:m.rotate,f.scale&&m.scale?v.scale=[z(f.scale[0],m.scale[0],h),z(f.scale[1],m.scale[1],h)]:v.scale=f.scale||m.scale,v.origin=f.origin||m.origin,v}(e.keyframes,t)):e.value?Z(e.value):"object"!=typeof e||Array.isArray(e)?K:Z(e)}var Q=new Set(["svg","g","symbol"]),F=new Set(["defs","mask","clipPath","title"]);function G(e,t){var n;"string"==typeof e.id&&t.set(e.id,e),null==(n=e.children)||n.forEach(e=>G(e,t))}function J(e){return null==e?0:Number(e)}function $(e){return Math.round(100*e)/100+0}function ee(e,t,n){var r,a,s,o,i;const l=null!=(r=e.fill)?r:"",c=null!=(a=e.stroke)?a:"",u=null!=(o=null!=(s=e["stroke-width"])?s:e.strokeWidth)?o:"",d=$(function(e,t,n,r){var a,s,o,i,l,c;if(e&&e.keyframes&&e.keyframes.length){const t=e.keyframes;if(r<=(null!=(a=t[0].time)?a:0))return t[0].value;if(r>=(null!=(s=t[t.length-1].time)?s:0))return t[t.length-1].value;let n=0;for(;n<t.length-1&&(null!=(o=t[n+1].time)?o:0)<r;)n++;const u=t[n],d=t[n+1],h=(r-(null!=(i=u.time)?i:0))/((null!=(l=d.time)?l:0)-(null!=(c=u.time)?c:0)||1);return z(u.value,d.value,h)}return void 0!==t?Number(t):n}(null==(i=e.animate)?void 0:i.opacity,e.opacity,1,n)),h=e.mask?1:0,f=t.map($).join(",");return e.type+"|"+function(e){var t;switch(e.type){case"rect":return J(e.width)+","+J(e.height)+","+J(e.x)+","+J(e.y);case"ellipse":return J(e.rx)+","+J(e.ry)+","+J(e.cx)+","+J(e.cy);case"circle":return J(e.r)+","+J(e.cx)+","+J(e.cy);case"path":return String(null!=(t=e.d)?t:"");default:return""}}(e)+"|["+f+"]|f:"+l+"|s:"+c+"|sw:"+(J(u)||"")+"|o:"+d+"|m:"+h}function te(e,t,n,r,a){var s;const o=e.type||"";if(F.has(o))return;const i=U(t,function(e,t){return e.animate&&e.animate.transform?L(e.animate.transform,t):void 0!==e.transform?L(e.transform,t):K}(e,n));if("use"===o){const t="string"==typeof e.href?e.href.replace(/^#/,""):"",s=r.get(t),o=U(i,B(J(e.x),J(e.y)));return void(s?te(s,o,n,r,a):a.push("UNRESOLVED_USE:#"+t))}Q.has(o)?null==(s=e.children)||s.forEach(e=>te(e,i,n,r,a)):a.push(ee(e,i,n))}function ne(e,t){var n;t.add(0);(e=>{var n;if(e&&"object"==typeof e)for(const r of Object.keys(e)){const a=null==(n=e[r])?void 0:n.keyframes;Array.isArray(a)&&a.forEach(e=>{var n;return t.add(null!=(n=e.time)?n:0)})}})(e.animate),e.transform&&"object"==typeof e.transform&&e.transform.keyframes&&e.transform.keyframes.forEach(e=>{var n;return t.add(null!=(n=e.time)?n:0)}),null==(n=e.children)||n.forEach(e=>ne(e,t))}function re(e,t){const n=new Map;G(e,n);const r=[];return te(e,K,t,n,r),r.sort()}function ae(e,t){const n=new Set;ne(e,n),ne(t,n);const r=[];for(const a of Array.from(n).sort((e,t)=>e-t)){const n=re(e,a),s=re(t,a),o=se(n,s),i=se(s,n);(o.length||i.length)&&r.push({time:a,onlyInA:o,onlyInB:i})}return r}function se(e,t){const n=new Map;for(const e of t)n.set(e,(n.get(e)||0)+1);const r=[];for(const t of e){const e=n.get(t)||0;e>0?n.set(t,e-1):r.push(t)}return r}function oe(e){return"scroll"===(null==e?void 0:e.timelineSource)}function ie(e){return("number"==typeof(null==e?void 0:e.duration)&&e.duration>0?e.duration:a)*("number"==typeof(null==e?void 0:e.iterations)&&e.iterations>0?e.iterations:1)}function le(e,t,n){const r=t,a=n;switch(e){case"cover":return[0,r+a];case"entry":return[0,Math.min(r,a)];case"contain":return[Math.min(r,a),Math.max(r,a)];case"exit":return[Math.max(r,a),r+a];case"entry-crossing":return[0,r];case"exit-crossing":return[a,r+a]}}function ce(e,t,n,r){var a;const[s,o]=le(null!=(a=null==e?void 0:e.phase)?a:"cover",n,r);return s+("number"==typeof(null==e?void 0:e.fraction)?e.fraction:t)*(o-s)}function ue(e,t,n,r){const a=n-e,s=ce(null==r?void 0:r.start,0,t,n),o=ce(null==r?void 0:r.end,1,t,n);return o<=s?a>=o?1:0:m((a-s)/(o-s),0,1)}function de(e,t,n){var r,a;const s=t>0?m(e/t,0,1):1,o="number"==typeof(null==(r=null==n?void 0:n.start)?void 0:r.fraction)?n.start.fraction:0,i="number"==typeof(null==(a=null==n?void 0:n.end)?void 0:a.fraction)?n.end.fraction:1;return i<=o?s>=i?1:0:m((s-o)/(i-o),0,1)}function he(e,t){const n=null!=e?e:"block";if("x"===n||"y"===n)return n;const r=!!t&&t.startsWith("vertical");return"inline"===n?r?"y":"x":r?"x":"y"}function fe(e){const t=new Set,n=new Set,r=[{schema:e,path:""}];for(;r.length;){const{schema:e,path:a}=r.shift(),s=k(e);switch(s.kind){case"shape":if(n.has(e))break;n.add(e);for(const e of Object.keys(s.shape)){const n=a?a+"."+e:e;t.add(n),r.push({schema:s.shape[e],path:n})}s.openValue&&r.push({schema:s.openValue,path:a+"{*}"});break;case"optional":r.push({schema:s.inner,path:a});break;case"array":r.push({schema:s.item,path:a+"[]"});break;case"lazy":r.push({schema:s.resolved,path:a});break;case"record":r.push({schema:s.value,path:a+"{*}"});break;case"union":s.members.forEach((e,t)=>r.push({schema:e,path:a+"|"+t}));break;case"discriminatedUnion":for(const e of s.members)r.push({schema:e,path:a+"|"+me(e,s.key)})}}return[...t].sort()}function me(e,t){const n=k(e);if("shape"!==n.kind)return"?";const r=n.shape[t];if(void 0===r)return"?";const a=k(r);return String(("optional"===a.kind?a.inner:r)._default)}function ve(e,t){const n=new Set(e),r=new Set(t);return{added:t.filter(e=>!n.has(e)).sort(),removed:e.filter(e=>!r.has(e)).sort()}}function pe(e){const t=e.added.length>0||e.removed.length>0,n=q(e.lastReleased),r=q(e.declared);if(!n||!r)return{changed:t,refuse:"Unparseable version: "+e.lastReleased+" / "+e.declared+"."};const a=n.a+"."+(n.b+1);if(!t){if(r.b===n.b&&r.a===n.a)return{changed:t};return e.steps.find(t=>t.to===e.declared)?{changed:t,requiredVersion:e.declared}:{changed:t,refuse:"The version moved to "+e.declared+" with no key change and no step explaining it."}}const s=e.removed.length?"converted":"additive",o=e.added.length+" key(s) added, "+e.removed.length+" removed";if(r.a!==n.a||r.b!==n.b+1)return{changed:t,requiredKind:s,requiredVersion:a,refuse:"The player schema changed ("+o+") but PX_WIRE_SCHEMA_VERSION is "+e.declared+". Set it to "+a+" and add the PX_WIRE_STEPS entry."};const i=e.steps.find(t=>t.to===e.declared);return i?"converted"===s&&"converted"!==i.kind?{changed:t,requiredKind:s,requiredVersion:a,refuse:"Keys were REMOVED ("+e.removed.join(", ")+"), which is never additive — the "+e.declared+" step must be `converted`, with an up()."}:{changed:t,requiredKind:s,requiredVersion:a}:{changed:t,requiredKind:s,requiredVersion:a,refuse:"No PX_WIRE_STEPS entry reaches "+e.declared+"."}}function ye(e,t,n,r){const a=[];if(!e.length)return["The release log is empty."];e[0].baseline&&e[0].version===r||a.push("The first release must be the baseline "+r+".");for(let n=1;n<e.length;n++){const r=q(e[n-1].version),s=q(e[n].version);r&&s&&s.a===r.a&&s.b===r.b+1||a.push("Release "+e[n].version+" does not follow "+e[n-1].version+" by one `b` step."),e[n].date<e[n-1].date&&a.push("Release "+e[n].version+" is dated before its predecessor.");const o=t.find(t=>t.to===e[n].version);o?e[n].removed.length&&"converted"!==o.kind&&a.push("Release "+e[n].version+" removed keys, but its step is not `converted`."):a.push("Release "+e[n].version+" has no PX_WIRE_STEPS entry.")}const s=e[e.length-1].version;return s!==n&&a.push("PX_WIRE_SCHEMA_VERSION is "+n+" but the last release record is "+s+" — a bump needs its changelog entry (run scripts/schema-release.mjs --apply)."),a}export{e as PX_ANIM_ATTR_NAME,t as PX_ANIM_SRC_ATTR_NAME,n as PX_COLOR_ATTR_NAMES,r as PX_CSS_ONLY_STYLE_PROPS,a as PX_DEFAULT_DURATION_MS,s as PX_DISALLOWED_SVG_TAGS_LOWER,o as PX_LOOP_JUMP_SHIFT_MS,i as PX_PCT_BASED_ATTR_NAMES,l as PX_STYLE_ATTR_NAMES,c as PX_TEXT_CONTENT_ATTR,u as PX_TRANSFORM_FN_NAMES,d as PX_UNKNOWN_KEY_ERROR,h as bezierToSvgPath,f as camelCaseToKebabWordIfNeeded,m as clamp,v as composeTransformParts,p as createDiagnostics,y as createPathSampler,g as cubicBezier,b as deepClone,ve as diffFieldUniverse,ae as diffInEffect,w as extendedPathForBrowser,E as generateUniqueId,S as interpolateValue,oe as isScrollTimeline,M as kebabToCamelCaseWord,x as keyframeEasing,R as keyframeValue,_ as layoutGlyphTextChars,P as materializeGlyphText,I as materializeGlyphTextAlongPath,V as materializeMotionPathInPropAnim,j as mergeStaticTransformIntoAnimDef,pe as planSchemaRelease,ye as releaseLogProblems,A as reportDocumentDiagnostics,N as reverseEasing,O as sanitizeAttributeValue,fe as schemaFieldUniverse,de as scrollOffsetProgress,le as scrollPhaseInterval,he as scrollResolveAxis,ie as scrollTotalDurationMs,ue as scrollViewProgress,T as splitEasing,W as subdivideCubicBezier,X as toRGBA};
|
|
1
|
+
import{PX_ANIM_ATTR_NAME as e,PX_ANIM_SRC_ATTR_NAME as t,PX_COLOR_ATTR_NAMES as n,PX_CSS_ONLY_STYLE_PROPS as r,PX_DEFAULT_DURATION_MS as a,PX_DISALLOWED_SVG_TAGS_LOWER as s,PX_LOOP_JUMP_SHIFT_MS as o,PX_PCT_BASED_ATTR_NAMES as i,PX_STYLE_ATTR_NAMES as l,PX_TEXT_CONTENT_ATTR as c,PX_TRANSFORM_FN_NAMES as u,PX_UNKNOWN_KEY_ERROR as d,bezierToSvgPath as h,camelCaseToKebabWordIfNeeded as f,clamp as m,composeTransformParts as v,createDiagnostics as p,createPathSampler as y,cubicBezier as g,deepClone as b,describeSchema as k,extendedPathForBrowser as w,generateUniqueId as E,interpolateValue as S,kebabToCamelCaseWord as M,keyframeEasing as x,keyframeValue as R,layoutGlyphTextChars as _,materializeGlyphText as P,materializeGlyphTextAlongPath as I,materializeMotionPathInPropAnim as V,mergeStaticTransformIntoAnimDef as j,parseWireVersion as q,reportDocumentDiagnostics as A,reverseEasing as W,sanitizeAttributeValue as N,splitEasing as T,subdivideCubicBezier as X,toRGBA as O}from"./chunk-YWBPS6E4.min.js";var K=[1,0,0,1,0,0];function U(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}var B=(e,t)=>[1,0,0,1,e,t],Y=(e,t)=>[e,0,0,t,0,0];function C(e){const t=e*Math.PI/180;return[Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0]}var D=e=>[1,0,Math.tan(e*Math.PI/180),1,0,0],H=e=>[1,Math.tan(e*Math.PI/180),0,1,0,0];function z(e){let t=K;e.translate&&(t=U(t,B(e.translate[0],e.translate[1])));const n=e.origin&&(void 0!==e.rotate||e.scale);return n&&(t=U(t,B(e.origin[0],e.origin[1]))),void 0!==e.rotate&&(t=U(t,C(e.rotate))),e.scale&&(t=U(t,Y(e.scale[0],e.scale[1]))),n&&(t=U(t,B(-e.origin[0],-e.origin[1]))),t}function L(e,t,n){return e+(t-e)*n}function F(e,t){return null==e?K:"string"==typeof e?function(e){let t=K;const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=n.exec(e);){const e=r[1],n=r[2].split(/[\s,]+/).filter(Boolean).map(Number);"translate"===e?t=U(t,B(n[0]||0,n[1]||0)):"scale"===e?t=U(t,Y(n[0],n.length>1?n[1]:n[0])):"rotate"===e?t=U(t,C(n[0])):"skewX"===e?t=U(t,D(n[0])):"skewY"===e?t=U(t,H(n[0])):"matrix"===e&&(t=U(t,[n[0],n[1],n[2],n[3],n[4],n[5]]))}return t}(e):e.keyframes?z(function(e,t){var n,r,a,s,o,i,l;if(!e.length)return{};if(t<=(null!=(n=e[0].time)?n:0))return e[0].value||{};if(t>=(null!=(r=e[e.length-1].time)?r:0))return e[e.length-1].value||{};let c=0;for(;c<e.length-1&&(null!=(a=e[c+1].time)?a:0)<t;)c++;const u=e[c],d=e[c+1],h=(t-(null!=(s=u.time)?s:0))/((null!=(o=d.time)?o:0)-(null!=(i=u.time)?i:0)||1),f=u.value||{},m=d.value||{},v={};return f.translate&&m.translate?v.translate=[L(f.translate[0],m.translate[0],h),L(f.translate[1],m.translate[1],h)]:v.translate=f.translate||m.translate,void 0!==f.rotate&&void 0!==m.rotate?v.rotate=L(f.rotate,m.rotate,h):v.rotate=null!=(l=f.rotate)?l:m.rotate,f.scale&&m.scale?v.scale=[L(f.scale[0],m.scale[0],h),L(f.scale[1],m.scale[1],h)]:v.scale=f.scale||m.scale,v.origin=f.origin||m.origin,v}(e.keyframes,t)):e.value?z(e.value):"object"!=typeof e||Array.isArray(e)?K:z(e)}var G=new Set(["svg","g","symbol"]),J=new Set(["defs","mask","clipPath","title"]);function Q(e,t){var n;"string"==typeof e.id&&t.set(e.id,e),null==(n=e.children)||n.forEach(e=>Q(e,t))}function Z(e){return null==e?0:Number(e)}function $(e){return Math.round(100*e)/100+0}function ee(e,t,n){var r,a,s,o,i;const l=null!=(r=e.fill)?r:"",c=null!=(a=e.stroke)?a:"",u=null!=(o=null!=(s=e["stroke-width"])?s:e.strokeWidth)?o:"",d=$(function(e,t,n,r){var a,s,o,i,l,c;if(e&&e.keyframes&&e.keyframes.length){const t=e.keyframes;if(r<=(null!=(a=t[0].time)?a:0))return t[0].value;if(r>=(null!=(s=t[t.length-1].time)?s:0))return t[t.length-1].value;let n=0;for(;n<t.length-1&&(null!=(o=t[n+1].time)?o:0)<r;)n++;const u=t[n],d=t[n+1],h=(r-(null!=(i=u.time)?i:0))/((null!=(l=d.time)?l:0)-(null!=(c=u.time)?c:0)||1);return L(u.value,d.value,h)}return void 0!==t?Number(t):n}(null==(i=e.animate)?void 0:i.opacity,e.opacity,1,n)),h=e.mask?1:0,f=t.map($).join(",");return e.type+"|"+function(e){var t;switch(e.type){case"rect":return Z(e.width)+","+Z(e.height)+","+Z(e.x)+","+Z(e.y);case"ellipse":return Z(e.rx)+","+Z(e.ry)+","+Z(e.cx)+","+Z(e.cy);case"circle":return Z(e.r)+","+Z(e.cx)+","+Z(e.cy);case"path":return String(null!=(t=e.d)?t:"");default:return""}}(e)+"|["+f+"]|f:"+l+"|s:"+c+"|sw:"+(Z(u)||"")+"|o:"+d+"|m:"+h}function te(e,t,n,r,a){var s;const o=e.type||"";if(J.has(o))return;const i=U(t,function(e,t){return e.animate&&e.animate.transform?F(e.animate.transform,t):void 0!==e.transform?F(e.transform,t):K}(e,n));if("use"===o){const t="string"==typeof e.href?e.href.replace(/^#/,""):"",s=r.get(t),o=U(i,B(Z(e.x),Z(e.y)));return void(s?te(s,o,n,r,a):a.push("UNRESOLVED_USE:#"+t))}G.has(o)?null==(s=e.children)||s.forEach(e=>te(e,i,n,r,a)):a.push(ee(e,i,n))}function ne(e,t){var n;t.add(0);(e=>{var n;if(e&&"object"==typeof e)for(const r of Object.keys(e)){const a=null==(n=e[r])?void 0:n.keyframes;Array.isArray(a)&&a.forEach(e=>{var n;return t.add(null!=(n=e.time)?n:0)})}})(e.animate),e.transform&&"object"==typeof e.transform&&e.transform.keyframes&&e.transform.keyframes.forEach(e=>{var n;return t.add(null!=(n=e.time)?n:0)}),null==(n=e.children)||n.forEach(e=>ne(e,t))}function re(e,t){const n=new Map;Q(e,n);const r=[];return te(e,K,t,n,r),r.sort()}function ae(e,t){const n=new Set;ne(e,n),ne(t,n);const r=[];for(const a of Array.from(n).sort((e,t)=>e-t)){const n=re(e,a),s=re(t,a),o=se(n,s),i=se(s,n);(o.length||i.length)&&r.push({time:a,onlyInA:o,onlyInB:i})}return r}function se(e,t){const n=new Map;for(const e of t)n.set(e,(n.get(e)||0)+1);const r=[];for(const t of e){const e=n.get(t)||0;e>0?n.set(t,e-1):r.push(t)}return r}function oe(e){return"scroll"===(null==e?void 0:e.timelineSource)}function ie(e){return("number"==typeof(null==e?void 0:e.duration)&&e.duration>0?e.duration:a)*("number"==typeof(null==e?void 0:e.iterations)&&e.iterations>0?e.iterations:1)}function le(e,t,n){const r=t,a=n;switch(e){case"cover":return[0,r+a];case"entry":return[0,Math.min(r,a)];case"contain":return[Math.min(r,a),Math.max(r,a)];case"exit":return[Math.max(r,a),r+a];case"entry-crossing":return[0,r];case"exit-crossing":return[a,r+a]}}function ce(e,t,n,r){var a;const[s,o]=le(null!=(a=null==e?void 0:e.phase)?a:"cover",n,r);return s+("number"==typeof(null==e?void 0:e.fraction)?e.fraction:t)*(o-s)}function ue(e,t,n,r){const a=n-e,s=ce(null==r?void 0:r.start,0,t,n),o=ce(null==r?void 0:r.end,1,t,n);return o<=s?a>=o?1:0:m((a-s)/(o-s),0,1)}function de(e,t,n){var r,a;const s=t>0?m(e/t,0,1):1,o="number"==typeof(null==(r=null==n?void 0:n.start)?void 0:r.fraction)?n.start.fraction:0,i="number"==typeof(null==(a=null==n?void 0:n.end)?void 0:a.fraction)?n.end.fraction:1;return i<=o?s>=i?1:0:m((s-o)/(i-o),0,1)}function he(e,t){const n=null!=e?e:"block";if("x"===n||"y"===n)return n;const r=!!t&&t.startsWith("vertical");return"inline"===n?r?"y":"x":r?"x":"y"}function fe(e){const t=new Set,n=new Set,r=[{schema:e,path:""}];for(;r.length;){const{schema:e,path:a}=r.shift(),s=k(e);switch(s.kind){case"shape":if(n.has(e))break;n.add(e);for(const e of Object.keys(s.shape)){const n=a?a+"."+e:e;t.add(n),r.push({schema:s.shape[e],path:n})}s.openValue&&r.push({schema:s.openValue,path:a+"{*}"});break;case"optional":r.push({schema:s.inner,path:a});break;case"array":r.push({schema:s.item,path:a+"[]"});break;case"lazy":r.push({schema:s.resolved,path:a});break;case"record":r.push({schema:s.value,path:a+"{*}"});break;case"union":s.members.forEach((e,t)=>r.push({schema:e,path:a+"|"+t}));break;case"discriminatedUnion":for(const e of s.members)r.push({schema:e,path:a+"|"+me(e,s.key)})}}return[...t].sort()}function me(e,t){const n=k(e);if("shape"!==n.kind)return"?";const r=n.shape[t];if(void 0===r)return"?";const a=k(r);return String(("optional"===a.kind?a.inner:r)._default)}function ve(e,t){const n=new Set(e),r=new Set(t);return{added:t.filter(e=>!n.has(e)).sort(),removed:e.filter(e=>!r.has(e)).sort()}}function pe(e){const t=e.added.length>0||e.removed.length>0,n=q(e.lastReleased),r=q(e.declared);if(!n||!r)return{changed:t,refuse:"Unparseable version: "+e.lastReleased+" / "+e.declared+"."};const a=n.a+"."+(n.b+1);if(!t){if(r.b===n.b&&r.a===n.a)return{changed:t};return e.steps.find(t=>t.to===e.declared)?{changed:t,requiredVersion:e.declared}:{changed:t,refuse:"The version moved to "+e.declared+" with no key change and no step explaining it."}}const s=e.removed.length?"converted":"additive",o=e.added.length+" key(s) added, "+e.removed.length+" removed";if(r.a!==n.a||r.b!==n.b+1)return{changed:t,requiredKind:s,requiredVersion:a,refuse:"The player schema changed ("+o+") but PX_WIRE_SCHEMA_VERSION is "+e.declared+". Set it to "+a+" and add the PX_WIRE_STEPS entry."};const i=e.steps.find(t=>t.to===e.declared);return i?"converted"===s&&"converted"!==i.kind?{changed:t,requiredKind:s,requiredVersion:a,refuse:"Keys were REMOVED ("+e.removed.join(", ")+"), which is never additive — the "+e.declared+" step must be `converted`, with an up()."}:{changed:t,requiredKind:s,requiredVersion:a}:{changed:t,requiredKind:s,requiredVersion:a,refuse:"No PX_WIRE_STEPS entry reaches "+e.declared+"."}}function ye(e,t,n,r){const a=[];if(!e.length)return["The release log is empty."];e[0].baseline&&e[0].version===r||a.push("The first release must be the baseline "+r+".");for(let n=1;n<e.length;n++){const r=q(e[n-1].version),s=q(e[n].version);r&&s&&s.a===r.a&&s.b===r.b+1||a.push("Release "+e[n].version+" does not follow "+e[n-1].version+" by one `b` step."),e[n].date<e[n-1].date&&a.push("Release "+e[n].version+" is dated before its predecessor.");const o=t.find(t=>t.to===e[n].version);o?e[n].removed.length&&"converted"!==o.kind&&a.push("Release "+e[n].version+" removed keys, but its step is not `converted`."):a.push("Release "+e[n].version+" has no PX_WIRE_STEPS entry.")}const s=e[e.length-1].version;return s!==n&&a.push("PX_WIRE_SCHEMA_VERSION is "+n+" but the last release record is "+s+" — a bump needs its changelog entry (run scripts/schema-release.mjs --apply)."),a}export{e as PX_ANIM_ATTR_NAME,t as PX_ANIM_SRC_ATTR_NAME,n as PX_COLOR_ATTR_NAMES,r as PX_CSS_ONLY_STYLE_PROPS,a as PX_DEFAULT_DURATION_MS,s as PX_DISALLOWED_SVG_TAGS_LOWER,o as PX_LOOP_JUMP_SHIFT_MS,i as PX_PCT_BASED_ATTR_NAMES,l as PX_STYLE_ATTR_NAMES,c as PX_TEXT_CONTENT_ATTR,u as PX_TRANSFORM_FN_NAMES,d as PX_UNKNOWN_KEY_ERROR,h as bezierToSvgPath,f as camelCaseToKebabWordIfNeeded,m as clamp,v as composeTransformParts,p as createDiagnostics,y as createPathSampler,g as cubicBezier,b as deepClone,ve as diffFieldUniverse,ae as diffInEffect,w as extendedPathForBrowser,E as generateUniqueId,S as interpolateValue,oe as isScrollTimeline,M as kebabToCamelCaseWord,x as keyframeEasing,R as keyframeValue,_ as layoutGlyphTextChars,P as materializeGlyphText,I as materializeGlyphTextAlongPath,V as materializeMotionPathInPropAnim,j as mergeStaticTransformIntoAnimDef,pe as planSchemaRelease,ye as releaseLogProblems,A as reportDocumentDiagnostics,W as reverseEasing,N as sanitizeAttributeValue,fe as schemaFieldUniverse,de as scrollOffsetProgress,le as scrollPhaseInterval,he as scrollResolveAxis,ie as scrollTotalDurationMs,ue as scrollViewProgress,T as splitEasing,X as subdivideCubicBezier,O as toRGBA};
|
package/package.json
CHANGED