@pixodesk/svg-animator-web 1.0.43 → 1.0.45
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 +2 -2
- package/dist/{PxAnimator-yjuSFhQw.d.cts → PxAnimator-BS-SZULN.d.cts} +10 -0
- package/dist/{PxAnimator-yjuSFhQw.d.ts → PxAnimator-BS-SZULN.d.ts} +10 -0
- package/dist/chunk-QE7KJWAN.js +6532 -0
- package/dist/chunk-QE7KJWAN.js.map +1 -0
- package/dist/chunk-RQ5KZXDT.min.js +1 -0
- package/dist/index.cjs +551 -293
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -28
- package/dist/index.d.ts +58 -28
- package/dist/index.js +299 -6416
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.prerendered-waapi.umd.js +293 -109
- package/dist/index.prerendered-waapi.umd.js.map +1 -1
- package/dist/index.prerendered-waapi.umd.min.js +1 -1
- package/dist/index.prerendered.umd.js +293 -105
- package/dist/index.prerendered.umd.js.map +1 -1
- package/dist/index.prerendered.umd.min.js +1 -1
- package/dist/internal.cjs +1164 -2
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +51 -3
- package/dist/internal.d.ts +51 -3
- package/dist/internal.js +7 -3
- package/dist/internal.min.cjs +1 -1
- package/dist/internal.min.js +1 -1
- package/dist/pixodesk-svg-animator.umd.js +458 -184
- package/dist/pixodesk-svg-animator.umd.js.map +1 -1
- package/dist/pixodesk-svg-animator.umd.min.js +1 -1
- package/mangle-reserved.json +14 -4
- package/package.json +2 -2
- package/dist/chunk-BYDBNKO7.js +0 -42
- package/dist/chunk-BYDBNKO7.js.map +0 -1
- package/dist/chunk-RK3CEIRB.min.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var PixodeskAnimator=(()=>{var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=Math.pow,c=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,a=(t,n)=>{for(var e in n||(n={}))s.call(n,e)&&c(t,e,n[e]);if(i)for(var e of i(n))l.call(n,e)&&c(t,e,n[e]);return t},f=(t,e)=>n(t,r(e)),d=(t,n)=>{var e={};for(var r in t)s.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&i)for(var r of i(t))n.indexOf(r)<0&&l.call(t,r)&&(e[r]=t[r]);return e},v={};function y(t){if(!t.length)return".";let n="";for(const e of t)e.startsWith("[")?n+=e:n+=(n?".":"")+e;return n}((n,e)=>{for(var r in e)t(n,r,{get:e[r],enumerable:!0})})(v,{PX_ANIMATOR_DOC_KEY:()=>Gi,PX_ANIM_ATTR_NAME:()=>G,PX_ANIM_SRC_ATTR_NAME:()=>Z,PxTimelineEngine:()=>tt,PxTimelineEngineSetting:()=>nt,createAnimator:()=>Ji,generateNewIds:()=>Mn,loadTagAnimators:()=>Xi,setupAnimationTriggers:()=>Oi,validateDocument:()=>pn});var m=class{_canSanitize(t){return this.isValid(t)}optional(){return new p(this)}},p=class extends m{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,n,e){return null==t||this.inner.isValid(t,n,e)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},h=class extends m{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,n,e){return"string"==typeof t||(null==n||n.errors.push(y(null!=e?e:[])+": expected string, got "+typeof t),!1)}},g=class extends m{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,n,e){return!("number"!=typeof t||!isFinite(t))||(null==n||n.errors.push(y(null!=e?e:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},b=class extends m{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(y(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},w=class extends m{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,n,e){return t===this.value||(null==n||n.errors.push(y(null!=e?e:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},A=class extends m{constructor(t,n){super(),this.values=t,this._default=null!=n?n:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,n,e){return!!this.values.includes(t)||(null==n||n.errors.push(y(null!=e?e:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},k=class extends m{constructor(t,n){super(),this.l=t,this.h="union",this._default=null!=n?n:t[0]._default}sanitize(t){for(const n of this.l)if(n.isValid(t))return n.sanitize(t);return this._default}isValid(t,n,e){var r;const o=n&&{errors:[],warnings:[],strict:n.strict};if(this.l.some(n=>n.isValid(t,o,e?[...e]:void 0)))return!0;if(!n)return!1;const i=y(null!=e?e:[]);let s;n.errors.push(i+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240));let l=-1;const u=[];for(const r of this.l){const o={errors:[],warnings:[],strict:n.strict};if(r.isValid(t,o,e?[...e]:void 0),!o.errors.length)continue;const c=Math.max(...o.errors.map(t=>t.slice(0,t.indexOf(":")).length));if((c>l||c===l&&s&&o.errors.length<s.length)&&(l=c,s=o.errors),c<=i.length)for(const t of o.errors){const n=/: expected (.+?), got /.exec(t);n&&!u.includes(n[1])&&u.push(n[1])}}if(s&&l>i.length)for(const t of s.slice(0,4))n.errors.includes(t)||n.errors.push(t);else u.length&&n.errors.push(i+": expected "+u.join(" | "));return!1}_canSanitize(t){return this.l.some(n=>n._canSanitize(t))}},j=class extends m{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e={};for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(y(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),n.errors.push(y(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},M=class extends m{constructor(t,n){super(),this._shape=t,this.A=n;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e=a({},n);for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}if(this.A)for(const t of Object.keys(n))t in this._shape||(e[t]=this.A.sanitize(n[t]));return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(y(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(this.A)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.A.isValid(r[t],n,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},x=class extends m{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item._canSanitize(e)&&n.push(this.item.sanitize(e));return n}isValid(t,n,e){if(!Array.isArray(t))return null==n||n.errors.push(y(null!=e?e:[])+": expected array, got "+typeof t),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<t.length;e++)r.push("["+e+"]"),this.item.isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},O=class extends m{constructor(t){super(),this.value=t,this.h="record",this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value._canSanitize(r)&&(n[e]=this.value.sanitize(r));return n}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(y(null!=e?e:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(const[e,i]of Object.entries(t))r.push(e),this.value.isValid(i,n,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},S=class extends m{constructor(t,n){super(),this.fn=t,this._default=n,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,n,e){return this.schema.isValid(t,n,e)}_canSanitize(t){return this.schema._canSanitize(t)}},N=class extends m{constructor(t){super(),this.l=t,this.h="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.l.length?this.l.map((n,e)=>n.sanitize(t[e])):this._default}isValid(t,n,e){if(!Array.isArray(t)||t.length!==this.l.length)return null==n||n.errors.push(y(null!=e?e:[])+": expected tuple of length "+this.l.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<this.l.length;e++)r.push("["+e+"]"),this.l[e].isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.l.length}},P=(t="")=>new h(t),z=(t=0)=>new g(t),C=(t=!1)=>new b(t),T=t=>new w(t),_=(t,n)=>new A(t,n),D=(t,n)=>new k(t,n),R=t=>new j(t),L=(t,n)=>new M(t,n),E=t=>new x(t),V=t=>new O(t),F=t=>new N(t),I=(t,n)=>new S(t,n),U=/^(\d+)\.(\d+)(?:\.(\d+))?$/;function B(t){if("string"!=typeof t)return;const n=U.exec(t.trim());return n?{a:Number(n[1]),b:Number(n[2]),c:void 0===n[3]?0:Number(n[3])}:void 0}B("1.1");var Z="data-px-animation-src",G="_px_animator",W="block",J="inline",X="nearest",q="root",Q="center",K="bottom",Y=["duration","iterations","engine","frameRate"],H=["trigger","delay","fillMode","direction"],$=[...Y,...H,"fill","resetOnFinish","timelineSource","scroll"],tt={native:"native",js:"js"},nt=f(a({},tt),{auto:"auto"});function et(t){return t===nt.js?tt.js:tt.native}function rt(t){return t===nt.native}var ot={startOn:"load",outAction:"continue",scrollIntoViewThreshold:0},it={start:"start",end:"end"},st={normal:"normal",alternate:"alternate"},lt="userSpaceOnUse",ut="objectBoundingBox",ct={translate:"translate"},at={separate:"separate",combined:"combined"},ft="textContent",dt="class",vt="transform",yt="offsetDistance",mt=new Set(["type","children","animator","meta","animate","effects",ft]),pt={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},ht=(pt.translate,pt.rotate,pt.scale,pt.origin,"pad"),gt={linear:"linear",radial:"radial"};function bt(t){var n;const e=(null==t?void 0:t.animator)||(null==(n=null==t?void 0:t.meta)?void 0:n.animator);if(!e)return;const r=wt.get(e);if(r)return r;const o=e,i=$.filter(t=>void 0!==o[t]),s=i.length?a({},o):e;for(const t of i)delete s[t];const l=function(t){const n=t.timeline;if(null==n||"object"!=typeof n)return t;const e=At.get(t);if(e)return e;const r=t,{timeline:o}=r,i=d(r,["timeline"]);if(void 0!==n.engine&&(i.engine=n.engine),void 0!==n.frameRate&&(i.frameRate=n.frameRate),"scroll"===n.type||"view"===n.type){i.timelineSource="scroll",void 0!==n.duration&&(i.duration=n.duration),void 0!==n.iterations&&(i.iterations=n.iterations);const t=a({},i.scroll||{});t.kind=n.type,void 0!==n.axis&&(t.axis=n.axis),void 0!==n.source&&(t.source=n.source),void 0!==n.subject&&(t.subject=n.subject),void 0!==n.smoothing&&(t.smoothing=n.smoothing),void 0!==n.range&&(t.range=n.range);const e=n.pin;"boolean"==typeof e?t.pin=e:e&&"object"==typeof e&&(t.pin=!0,void 0!==e.align&&(t.pinAlign=e.align),void 0!==e.offset&&(t.pinOffset=e.offset),void 0!==e.distance&&(t.pinDistance=e.distance)),i.scroll=t}else{if(void 0!==n.duration&&(i.duration=n.duration),void 0!==n.trigger){const t=n.trigger,{finishAction:e}=t,r=d(t,["finishAction"]);Object.keys(r).length&&(i.trigger=r),void 0!==e&&(i.resetOnFinish="reset"===e)}void 0!==n.delay&&(i.delay=n.delay),void 0!==n.iterations&&(i.iterations=n.iterations),void 0!==n.direction&&(i.direction=n.direction),void 0!==n.fillMode&&(i.fill=n.fillMode)}return At.set(t,i),i}(s);return wt.set(e,l),l}var wt=new WeakMap,At=new WeakMap;function kt(t){var n;if(t)return null==(n=bt(t))?void 0:n.definitions}var jt,Mt=D([P(),F([z(),z(),z(),z()])]),xt=D([P(),z(),E(z()),R({pathData:P()}),I(()=>E(un),[]),I(()=>Dt,{})]),Ot=R({time:z().optional(),value:xt.optional(),easing:Mt.optional(),tangentOut:F([z(),z()]).optional(),tangentIn:F([z(),z()]).optional()}),St=t=>{var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0},Nt=t=>{var n;return null!=(n=t.value)?n:t.v},Pt=t=>{var n;return null!=(n=t.easing)?n:t.e},zt=t=>t.tangentIn,Ct=t=>t.tangentOut,Tt=R({segmentCount:z().optional(),repeatAt:_([it.start,it.end]).optional(),direction:_([st.normal,st.alternate]).optional()}),_t=R({value:xt.optional(),keyframes:E(Ot).optional(),loop:D([Tt,C()]).optional(),autoOrient:C().optional(),alongPathMode:_(["sampled","offsetPath"]).optional()}),Dt=R({translate:F([z(),z()]).optional(),rotate:z().optional(),skew:z().optional(),scale:F([z(),z()]).optional(),origin:F([z(),z()]).optional()}),Rt=(D([P(),Dt,R({value:Dt}),_t]),V(_t)),Lt=D([P(),E(D([P(),Rt])),Rt]),Et=R({startOn:_(["load","mouseOver","click","scrollIntoView","programmatic"],ot.startOn).optional(),outAction:_(["continue","pause","reset","reverse"],ot.outAction).optional(),finishAction:_(["hold","reset"]).optional(),scrollIntoViewThreshold:z().optional()}),Vt=R({width:z(),pathData:P()}),Ft=R({fontFamily:P(),fontStyle:P(),ascent:z(),unitsPerEm:z(),glyphs:V(Vt)}),It=R({easings:V(F([z(),z(),z(),z()])).optional(),animations:V(Rt).optional(),fonts:V(Ft).optional()}),Ut=R({phase:_(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:z().optional()}),Bt=R({start:Ut.optional(),end:Ut.optional()}),Zt=(R({kind:_(["view","scroll"]).optional(),axis:_([W,J,"x","y"]).optional(),source:_([X,q]).optional(),subject:P().optional(),smoothing:z().optional(),pin:C().optional(),pinAlign:_(["top",Q,K]).optional(),pinOffset:z().optional(),pinDistance:z().optional(),range:Bt.optional()}),R({align:_(["top",Q,K]).optional(),offset:z().optional(),distance:z().optional()})),Gt=_([nt.auto,nt.native,nt.js]).optional(),Wt=R({type:T("time").optional(),engine:Gt,frameRate:z().optional(),duration:z().optional(),trigger:Et.optional(),delay:z().optional(),iterations:D([z(),T("infinite")]).optional(),fillMode:_(["forwards","backwards","both","none"]).optional(),direction:_(["normal","reverse","alternate","alternate-reverse"]).optional()}),Jt={duration:z().optional(),iterations:z().optional(),engine:Gt,frameRate:z().optional(),axis:_([W,J,"x","y"]).optional(),source:_([X,q]).optional(),subject:P().optional(),smoothing:z().optional(),pin:D([C(),Zt]).optional(),range:Bt.optional()},Xt=(jt=[Wt,R(a({type:T("scroll")},Jt)),R(a({type:T("view")},Jt))],new class extends m{constructor(t,n,e){var r;super(),this.j=t,this.M=n,this.h="discriminatedUnion",this._default=null!=e?e:n[0]._default,this.O=new Map;for(const e of n){const n=e._shape[t];if(!n)continue;const o=null!=(r=n.inner)?r:n;this.O.set(o._default,e),n.inner&&(this.S=e)}}N(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const n=t[this.j];return null==n?this.S:this.O.get(n)}sanitize(t){var n;return(null!=(n=this.N(t))?n:this.M[0]).sanitize(t)}isValid(t,n,e){const r=this.N(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this.j];return null==n||n.errors.push(y(null!=e?e:[])+": no discriminated union member matched "+this.j+"="+JSON.stringify(r)),!1}return r.isValid(t,n,e)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const n=this.N(t);return n?n._canSanitize(t):this.M[0]._canSanitize(t)}}("type",jt)),qt=R({target:P(),animateWith:E(P())}),Qt=R({timeline:Xt.optional(),definitions:It.optional(),bindings:E(qt).optional(),debugGlobalName:P().optional(),version:P().optional()}),Kt=D([P(),z(),E(z()),R({value:new class extends m{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return void 0!==t||(null==n||n.errors.push(y(null!=e?e:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}}}),Dt]),Yt=D([z(),_t,R({value:z()})]),Ht=D([F([z(),z()]),_t,R({value:F([z(),z()])})]),$t=D([P(),_t,R({value:P()})]),tn=R({translate:Ht.optional(),rotate:Yt.optional(),scale:Ht.optional(),skew:Yt.optional(),origin:Ht.optional()}),nn=R({copies:z().optional(),translate:Ht.optional(),rotate:Yt.optional(),skew:Yt.optional(),scale:Ht.optional(),origin:Ht.optional()}),en=R({source:P().optional(),maskType:_(["luminance","alpha"]).optional(),maskUnits:_([lt,ut]).optional(),maskContentUnits:_([lt,ut]).optional(),x:z().optional(),y:z().optional(),width:z().optional(),height:z().optional()}),rn=R({pathData:$t.optional()}),on=R({offset:Yt.optional(),range:Ht.optional(),subPaths:_([at.separate,at.combined]).optional()}),sn=R({start:z().optional(),stretch:z().optional(),timeCrop:F([z(),z()]).optional()}),ln=R({without:_([ct.translate]).optional(),source:P().optional(),retime:sn.optional()}),un=R({offset:z(),color:P()}),cn=D([E(un),R({value:E(un)}),_t]),an=R({type:_([gt.linear,gt.radial]),start:Ht.optional(),end:Ht.optional(),center:Ht.optional(),radius:Yt.optional(),focal:Ht.optional(),stops:cn.optional(),gradientUnits:_([lt,ut]).optional(),spreadMethod:_([ht,"reflect","repeat"]).optional(),gradientTransform:P().optional()}),fn=an,dn=R({pathData:P(),pathOverflow:_(["clip","extend"]).optional(),lengthAdjust:_(["spacing","spacingAndGlyphs"]).optional(),method:_(["align","stretch"]).optional(),spacing:_(["auto","exact"]).optional(),startOffset:Yt.optional(),textLength:Yt.optional()}),vn=R({useGlyphs:C().optional()}),yn=R({transformBy:tn.optional(),repeater:nn.optional(),maskedBy:en.optional(),clipPath:rn.optional(),strokeTrim:on.optional(),clone:ln.optional(),fillGradient:an.optional(),strokeGradient:fn.optional(),textPath:dn.optional(),text:vn.optional()});function mn(t,n){const e=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==n?void 0:n.strict)};if(!yn.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)e.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,n)=>r(t,o+".children["+n+"]"))};return r(t,"root"),e}function pn(t,n){var e;const r=!1!==(null==n?void 0:n.strict),o={errors:[],warnings:[],strict:r},i=wn.isValid(t,o,["root"])?[]:[...o.errors];if(t&&"object"==typeof t){for(const n of mn(t,{strict:r}))i.includes(n)||i.push(n);const n=null==(e=bt(t))?void 0:e.definitions;for(const e of function(t,n){if(!n||!Object.keys(n).length)return[];const e=[],r=(t,o,i,s)=>{var l,u;if(!t)return;const c="string"==typeof t.fontFamily?t.fontFamily:void 0,a=null!=c?c:i,f=s||"text"===t.type&&!!(null==(u=null==(l=t.effects)?void 0:l.text)?void 0:u.useGlyphs);if(f&&c&&!Object.prototype.hasOwnProperty.call(n,c)){const t=o+': glyph-mode text uses font-family "'+c+'", which has no entry in animator.definitions.fonts';e.includes(t)||e.push(t)}Array.isArray(t.children)&&t.children.forEach((t,n)=>r(t,o+".children["+n+"]",a,f))};return r(t,"root",void 0,!1),e}(t,null==n?void 0:n.fonts))i.includes(e)||i.push(e);for(const e of function(t,n){const e=[],r=(t,o)=>{if(Array.isArray(t))return void t.forEach((t,n)=>r(t,o+"["+n+"]"));if(!t||"object"!=typeof t)return;const i=t.easing;if(!("string"!=typeof i||n&&Object.prototype.hasOwnProperty.call(n,i))){const t=o+'.easing: "'+i+'" names no entry in animator.definitions.easings — it will play linear';e.includes(t)||e.push(t)}for(const[n,e]of Object.entries(t))"easing"!==n&&e&&"object"==typeof e&&r(e,o+"."+n)};return r(t,"root"),e}(t,null==n?void 0:n.easings))i.includes(e)||i.push(e);for(const n of function(t){var n;const e=null==(n=bt(t))?void 0:n.version;return void 0===e||void 0!==B(e)?[]:["root.animator.version: "+JSON.stringify(e)+' is not a version stamp ("a.b" or "a.b.c") — it reads as unstamped']}(t))i.includes(n)||i.push(n)}return i}var hn=L({type:P(),domType:P().optional(),textContent:P().optional(),id:P().optional(),meta:(new class extends m{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return!0}_canSanitize(t){return!0}}).optional(),effects:yn.optional(),animate:Lt.optional(),style:V(D([P(),z()])).optional()},Kt),gn=L(f(a({},hn._shape),{children:I(()=>E(gn),[]).optional()}),Kt),bn=R({width:D([z(),P()]).optional(),height:D([z(),P()]).optional(),viewBox:P().optional(),animator:Qt.optional()}),wn=L(f(a(a({},hn._shape),bn._shape),{type:T("svg"),children:E(gn).optional()}),Kt),An=(R({v:E(E(z())),i:E(E(z())).optional(),o:E(E(z())).optional(),c:C().optional()}),0);function kn(){return"_px_"+Date.now().toString(36)+(++An).toString(36)+Math.random().toString(36).substring(2,6)}function jn(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>jn(t));const n=t,e={};for(const t of Object.keys(n))e[t]=jn(n[t]);return e}function Mn(t){var n;const e=jn(t),r=new Map,o=new Set(["href","xlink:href"]),i=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["targetId","boundElementId"]),l=(t,n)=>"source"===t&&("maskedBy"===n||"clone"===n);!function t(n){if(n&&"object"==typeof n){if(n.id&&"string"==typeof n.id){const t=n.id,e=kn();r.set(t,e),n.id=e}else n.animate&&(n.id=kn());if(Array.isArray(n.children))for(const e of n.children)t(e)}}(e),function t(n,e){if(n&&"object"==typeof n)for(const[u,c]of Object.entries(n))if("children"!==u)if("string"==typeof c)if(o.has(u)&&c.startsWith("#")){const t=c.slice(1),e=r.get(t);e&&(n[u]="#"+e)}else if(i.has(u))n[u]=xn(c,r);else if(s.has(u)||l(u,e)){const t=c.startsWith("#"),e=r.get(t?c.slice(1):c);e&&(n[u]=t?"#"+e:e)}else c.includes("url(#")&&(n[u]=xn(c,r));else if("style"===u&&"object"==typeof c&&null!==c)for(const[t,n]of Object.entries(c))"string"==typeof n&&(c[t]=xn(n,r));else"object"==typeof c&&null!==c&&t(c,u);else if(Array.isArray(c))for(const n of c)t(n)}(e);const u=null==(n=e.animator)?void 0:n.bindings;if(Array.isArray(u)){const t=u.map(t=>{var n;const e=t.target.startsWith("#"),o=e?t.target.slice(1):t.target,i=null!=(n=r.get(o))?n:o;return f(a({},t),{target:e?"#"+i:i})});e.animator=f(a({},e.animator),{bindings:t})}return e}function xn(t,n){return t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t})}function On(t,n=!1){var e,r,o,i;const s=t.v,l=t.i,u=t.o,c=t.c;if(!s.length)return"";const a=[],f=s.length;a.push("M"+s[0][0]+","+s[0][1]);for(let t=1;t<f;t++){const o=s[t-1],i=null!=(e=null==u?void 0:u[t-1])?e:o,c=null!=(r=null==l?void 0:l[t])?r:s[t],f=s[t];n||i[0]!==o[0]||i[1]!==o[1]||c[0]!==f[0]||c[1]!==f[1]?a.push("C"+i[0]+","+i[1]+","+c[0]+","+c[1]+","+f[0]+","+f[1]):a.push("L"+f[0]+","+f[1])}if(c&&f>0){const t=s[f-1],e=null!=(o=null==u?void 0:u[f-1])?o:t,r=null!=(i=null==l?void 0:l[0])?i:s[0],c=s[0];!n&&e[0]===t[0]&&e[1]===t[1]&&r[0]===c[0]&&r[1]===c[1]||a.push("C"+e[0]+","+e[1]+","+r[0]+","+r[1]+","+c[0]+","+c[1]),a.push("z")}return a.join("")}function Sn(t,n,e){return t+(n-t)*e}function Nn(t,n,e){const r=[],o=Math.max(t.length,n.length);for(let i=0;i<o;i++)r[i]=Sn(t[i]||0,n[i]||0,e);return r}function Pn(t,n,e){return[Sn(t[0]||0,n[0]||0,e),Sn(t[1]||0,n[1]||0,e),Sn(t[2]||0,n[2]||0,e),Sn(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}function zn(t,n,e){const r=Math.max(t.length,n.length),o=[];for(let i=0;i<r;i++)o.push(Cn(t[i],n[i],e));return o}function Cn(t,n,e){var r,o,i,s,l,u,c,a,f;if(!t||!n)return t||n||{v:[]};const d=Math.min(Math.max(e,0),1),v=Math.min(t.v.length,n.v.length),y=[],m=[],p=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];y.push(Nn(f,v,d));const h=null!=(o=null==(r=t.i)?void 0:r[e])?o:f,g=null!=(s=null==(i=n.i)?void 0:i[e])?s:v;m.push(Nn(h,g,d));const b=null!=(u=null==(l=t.o)?void 0:l[e])?u:f,w=null!=(a=null==(c=n.o)?void 0:c[e])?a:v;p.push(Nn(b,w,d))}return{v:y,i:m.length?m:void 0,o:p.length?p:void 0,c:null!=(f=t.c)?f:n.c}}function Tn(t,n,e){if(e<=0)return 0;if(e>=1)return 1;const r=3*t,o=3*(n-t)-r,i=1-r-o;function s(t){return((i*t+o)*t+r)*t}function l(t){return(3*i*t+2*o)*t+r}let u=e,c=0,a=1;for(let t=0;t<8;t++){const t=s(u)-e;if(Math.abs(t)<1e-6)return u;const n=l(u);if(Math.abs(n)<1e-6)break;u-=t/n}for(u=e;c<a;){const t=s(u);if(Math.abs(t-e)<1e-6)return u;e>t?c=u:a=u,u=(a+c)/2}return u}function _n(t){const[n,e,r,o]=t,i=3*e,s=3*(o-e)-i,l=1-i-s;return function(t){return e=Tn(n,r,t),((l*e+s)*e+i)*e;var e}}function Dn(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function Rn(t,n){if(!t)return{left:void 0,right:void 0};if(n<=0)return{left:void 0,right:t};if(n>=1)return{left:t,right:void 0};const[e,r,o,i]=t,s=Tn(e,o,n),l=[e,r],u=[o,i],{left:c,right:a}=function(t,n,e,r,o){const i=Dn(t,n,o),s=Dn(n,e,o),l=Dn(e,r,o),u=Dn(i,s,o),c=Dn(s,l,o),a=Dn(u,c,o);return{left:[t,i,u,a],right:[a,c,l,r]}}([0,0],l,u,[1,1],s),f=c[3][0],d=c[3][1];let v,y;f>1e-9&&Math.abs(d)>1e-9&&(v=[c[1][0]/f,c[1][1]/d,c[2][0]/f,c[2][1]/d]);const m=1-f,p=1-d;return m>1e-9&&Math.abs(p)>1e-9&&(y=[(a[1][0]-f)/m,(a[1][1]-d)/p,(a[2][0]-f)/m,(a[2][1]-d)/p]),{left:v,right:y}}function Ln(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function En(t){const n=Math.round(255*t[0]),e=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+n+","+e+","+r+","+t[3]+")":"rgb("+n+","+e+","+r+")"}function Vn(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const n=t.slice(1),e=n.length<=4,r=e?n[0]+n[0]:n.slice(0,2),o=e?n[1]+n[1]:n.slice(2,4),i=e?n[2]+n[2]:n.slice(4,6),s=4===n.length?n[3]+n[3]:8===n.length?n.slice(6,8):null,l=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==s&&l.push(parseInt(s,16)/255),l}(t):t.startsWith("rgb")?function(t){var n;const e=null==(n=t.match(/rgba?\((.*)\)/))?void 0:n[1];if(!e)throw new Error("Invalid rgb/rgba format");const r=e.split(",").map(t=>+t.trim());return[r[0]/255,r[1]/255,r[2]/255,...void 0!==r[3]?[r[3]]:[]]}(t):void console.warn("Unsupported color format: "+t)}}var Fn=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),In=new Set(["translate","rotate","scale","skew"]),Un=new Set(["offset-distance","offsetDistance"]);function Bn(t,n){var e;if(!t)return"";const r=null==(e=null==n?void 0:n.P)||e,o=[],i=t.translate,s=t.origin,l=t.rotate,u=t.skew,c=t.scale,a=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+a+","+i[1]+a+")"),s&&o.push("translate("+s[0]+a+","+s[1]+a+")"),null!=l&&o.push("rotate("+l+f+")"),null!=u&&o.push("skewX("+u+f+")"),c&&o.push("scale("+c[0]+","+c[1]+")"),s&&o.push("translate("+-s[0]+a+","+-s[1]+a+")"),o.join("")}var Zn=new Set(["offset-distance","offsetDistance"]),Gn=1e3;function Wn(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):t}function Jn(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var Xn=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 qn(t){return Xn.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Qn(t,n,e){return Math.max(n,Math.min(t,e))}function Kn(t,n,e,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,s=i*i,l=o*o,u=s*i,c=3*o*s,a=3*l*i,f=l*o;return[u*t[0]+c*n[0]+a*e[0]+f*r[0],u*t[1]+c*n[1]+a*e[1]+f*r[1]]}var Yn=1e-4;function Hn(t,n,e,r,o){const i=$n(t,n,e,r,o);return 0===i[0]&&0===i[1]?$n(t,n,e,r,o<.5?o+Yn:o-Yn):i}function $n(t,n,e,r,o){const i=1-o,s=3*i*i,l=6*o*i,u=3*o*o;return[s*(n[0]-t[0])+l*(e[0]-n[0])+u*(r[0]-e[0]),s*(n[1]-t[1])+l*(e[1]-n[1])+u*(r[1]-e[1])]}function te(t,n,e,r,o=100){const i=o+1,s=new Float64Array(i),l=new Float64Array(i);let u=Kn(t,n,e,r,0);s[0]=0,l[0]=0;let c=0;for(let a=1;a<i;a++){const i=a/o,f=Kn(t,n,e,r,i),d=f[0]-u[0],v=f[1]-u[1];c+=Math.sqrt(d*d+v*v),s[a]=i,l[a]=c,u=f}return{ts:s,ds:l}}function ne(t,n){const{ts:e,ds:r}=t,o=e.length-1;if(n<=e[0])return r[0];if(n>=e[o])return r[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;e[t]<n?i=t+1:s=t}const l=e[s-1],u=e[s]-l,c=u>0?(n-l)/u:0;return r[s-1]+c*(r[s]-r[s-1])}var ee=new Set(["script","foreignobject"]),re=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),oe=new Set(["href","xlink:href","src"]),ie=new Set(["mixBlendMode","isolation"]),se=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,le=/^data:image\/svg\+xml(?:;[^,]*)?,/i,ue=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,ce=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function ae(t,n){const e=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(e)){if("fill"===e||"stroke"===e||"stopcolor"===e){const t=String(n);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+e+'" blocked: url() must be internal url(#id), got:',n):n}if(re.has(e)){const t=String(n);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||oe.has(e)&&(se.test(t)||le.test(t)||function(t){const n=ue.exec(t);return!!n&&ce.some(t=>n[1].startsWith(t))}(t))?n:void console.warn('Attribute "'+e+'" blocked: must be #id, url(#id), or data:image/… URI, got:',n)}return n}console.warn("Attribute blocked (event handler / dangerous): ",e)}function fe(t){const n=Nt(t);if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const e=n.translate;return Array.isArray(e)&&e.length>=2?[e[0],e[1]]:void 0}function de(t){return St(t)}function ve(t){return Pt(t)}function ye(t){const n=t.keyframes;if(!Array.isArray(n))return!1;if(t.autoOrient)return!0;for(const t of n)if(zt(t)||Ct(t))return!0;return!1}var me=new WeakMap;function pe(t,n,e,r){let o=me.get(t);const i=null==o?void 0:o.get(n);if(i)return i;const s=Ct(t),l=zt(n),u=[e[0]+(s?s[0]:0),e[1]+(s?s[1]:0)],c=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],a=te(e,u,c,r),f={P0:e,P1:u,P2:c,P3:r,C:a,T:a.ds[a.ds.length-1]};return o||(o=new WeakMap,me.set(t,o)),o.set(n,f),f}var he=.5,ge=5,be=32;function we(t,n){var e,r,o;if(!ye(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const s=!!t.autoOrient,l=null!=(e=null==n?void 0:n.flatnessTolerance)?e:he,u=null!=(r=null==n?void 0:n.rotationTolerance)?r:ge,c=null!=(o=null==n?void 0:n.maxSamplesPerSegment)?o:be,a=[],f=fe(i[0]);if(!f)return t;const d=s?function(t,n){const e=fe(t),r=fe(n);if(!e||!r)return 0;const o=pe(t,n,e,r),i=Hn(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;a.push(ke(de(i[0]),xe(je(i[0]),je(i[0]),0,f,d,s)));for(let t=0;t<i.length-1;t++){const n=i[t],e=i[t+1],r=fe(n),o=fe(e);r&&o?(s&&t>0&&Se(a,n,e,r,o,u),Pe(a,n,e,r,o,s,l,u,c)):a.push(ke(de(e),xe(je(e),je(e),1,null!=o?o:[0,0],void 0,s)))}const v=ve(i[i.length-1]);v&&(a[a.length-1].e=v),s&&Ae(a);const y={keyframes:a};return void 0!==t.loop&&(y.loop=t.loop),y}function Ae(t){let n;for(const e of t){const t=Nt(e);if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let r=t.rotate;for(;r-n>180;)r-=360;for(;r-n<-180;)r+=360;t.rotate=r,n=r}}function ke(t,n){return{t:t,v:n}}function je(t){const n=Nt(t);if(n&&"object"==typeof n&&!Array.isArray(n))return n}function Me(t,n,e){if(void 0===t)return n;if(void 0===n)return t;if("number"==typeof t&&"number"==typeof n)return t+(n-t)*e;if(Array.isArray(t)&&Array.isArray(n)&&t.length===n.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,s="number"==typeof n[o]?n[o]:0;r[o]=i+(s-i)*e}return r}return e<.5?t:n}function xe(t,n,e,r,o,i){const s={translate:r},l=new Set;if(t)for(const n of Object.keys(t))l.add(n);if(n)for(const t of Object.keys(n))l.add(t);for(const r of l){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],l=null==n?void 0:n[r];void 0===o&&void 0===l||(s[r]=Me(o,l,e))}return void 0!==o&&(s.rotate=o+Oe(t,n,e)),s}function Oe(t,n,e){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=Me(r,o,e);return"number"==typeof i?i:0}function Se(t,n,e,r,o,i){const s=t[t.length-1],l=Nt(s),u=null==l?void 0:l.rotate;if("number"!=typeof u)return;const c=je(n),a=u-Oe(c,c,0),f=pe(n,e,r,o),d=Hn(f.P0,f.P1,f.P2,f.P3,0),v=180*Math.atan2(d[1],d[0])/Math.PI,y=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(v,a);if(Math.abs(y)<=i)return;const m=de(n),p=Math.min(m+Ne,(m+de(e))/2),h=xe(je(n),je(n),0,r,v,!0);t.push(ke(p,h))}var Ne=.05;function Pe(t,n,e,r,o,i,s,l,u){const c=pe(n,e,r,o),a=de(n),f=de(e),d=ve(n),v=(y=d)?_n([y[1],y[0],y[3],y[2]]):t=>t;var y;const m=je(n),p=je(e),h=function(t,n,e,r,o){const i=[];ze(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),ze(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,n)=>t-n);const s=[0];for(const t of i)t>s[s.length-1]+1e-6&&t<.999999&&s.push(t);s.push(1);const l=[],u={_:o-s.length};for(let o=0;o<s.length-1;o++)Ce(s[o],s[o+1],l,t,n,e,r,u);return l}(c,i,s,l,u),g=[];for(const t of h){const n=ne(c.C,t),e=Qn(c.T>0?n/c.T:t,0,1),r={u:Qn(v(e),0,1),p:e,D:Kn(c.P0,c.P1,c.P2,c.P3,t)};if(i){const n=Hn(c.P0,c.P1,c.P2,c.P3,t);r.rotateDeg=180*Math.atan2(n[1],n[0])/Math.PI}g.push(r)}let b=d,w=0;const A=t.length-1;for(let n=0;n<g.length;n++){const e=g[n],r=w<1?Qn((e.u-w)/(1-w),0,1):1,{left:o,right:s}=Rn(b,r),l=0===n?A:t.length-1;o?t[l].e=o:delete t[l].e;const u=a+e.u*(f-a),c=xe(m,p,e.p,e.D,e.rotateDeg,i);t.push(ke(u,c)),b=s,w=e.u}}function ze(t,n,e,r,o){const i=n-t,s=e-n,l=i-2*s+(r-e),u=2*(s-i),c=i;if(Math.abs(l)<1e-10){if(Math.abs(u)>1e-10){const t=-c/u;t>1e-6&&t<.999999&&o.push(t)}return}const a=u*u-4*l*c;if(a<0)return;const f=Math.sqrt(a),d=(-u-f)/(2*l),v=(-u+f)/(2*l);d>1e-6&&d<.999999&&o.push(d),v>1e-6&&v<.999999&&o.push(v)}function Ce(t,n,e,r,o,i,s,l){const u=(t+n)/2,c=Kn(r.P0,r.P1,r.P2,r.P3,t),a=Kn(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=Kn(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=Kn(r.P0,r.P1,r.P2,r.P3,u),y=Kn(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(Te(d,c,a),Te(v,c,a),Te(y,c,a));let p=!0;if(o){const e=Hn(r.P0,r.P1,r.P2,r.P3,t),o=Hn(r.P0,r.P1,r.P2,r.P3,n),i=180*Math.atan2(e[1],e[0])/Math.PI,l=180*Math.atan2(o[1],o[0])/Math.PI;let u=Math.abs(i-l);u>180&&(u=360-u),u>s&&(p=!1)}m<=i&&p||l._<=0||f<1e-6?e.push(n):(l._-=1,Ce(t,u,e,r,o,i,s,l),Ce(u,n,e,r,o,i,s,l))}function Te(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=r*r+o*o;if(i<1e-20){const e=t[0]-n[0],r=t[1]-n[1];return Math.sqrt(e*e+r*r)}const s=(t[0]-n[0])*o-(t[1]-n[1])*r;return Math.abs(s)/Math.sqrt(i)}function _e(t,n){const e=De(t,n);return null!=e?e:t}function De(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=De(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o,e=t.transform;if(e&&"object"==typeof e&&ye(e)){const o=we(e,n);o!==e&&(r=f(a({},t),{transform:o}))}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var Re=1;function Le(t,n){if(t===n)return!0;if(typeof t!=typeof n||null===t||null===n||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(n))return!1;const e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(e=>Le(t[e],n[e]))}function Ee(t){const n=[];let e;const r=function(t){const n=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),e=[];let r=null;for(const t of n)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},e.push(r);else if(r){const n=+t;r.values.push(Number.isNaN(n)?0:n)}return e}(t);for(const t of r){const r=t.type,o=t.values;if("M"===r||"m"===r){const t=o[0]||0,r=o[1]||0;e={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},n.push(e);continue}if(e||(e={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},n.push(e)),"L"===r){const t=o[0]||0,n=o[1]||0;e.v.push([t,n]),e.i.push([t,n]),e.o.push([t,n])}else if("C"===r){const t=o[0]||0,n=o[1]||0,r=o[2]||0,i=o[3]||0,s=o[4]||0,l=o[5]||0;e.o[e.o.length-1]=[t,n],e.v.push([s,l]),e.i.push([r,i]),e.o.push([s,l])}else"Z"===r||"z"===r?e.c=!0:console.warn('Unsupported path command "'+r+'"')}return n}function Ve(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Fe(t){return"string"==typeof t&&void 0!==Ve(t)}function Ie(t){if(t&&"object"==typeof t&&"string"==typeof t.pathData){const n=Ve(t.pathData);return n?{paths:Ee(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&Fe(n[0])){const t=[];for(const e of n){const n=Ve(e);n&&t.push(...Ee(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Fe(t[0])){const n=[];for(const e of t){const t=Ve(e);t&&n.push(...Ee(t))}return{paths:n}}return{paths:t}}return Fe(t)?{paths:Ee(Ve(t))}:t}function Ue(t,n){var e;if(t)return Array.isArray(t)?t:(null==(e=null==n?void 0:n.easings)?void 0:e[t])?n.easings[t]:void console.warn("Unknown easing name: "+t)}function Be(t,n){var e;if("string"==typeof t){const r=null==(e=null==n?void 0:n.animations)?void 0:e[t];return r||console.warn("Unknown animation name: "+t),r}return t}function Ze(t,n,e,r){var o,i;return"d"===t?{paths:zn(null!=(o=null==n?void 0:n.paths)?o:Array.isArray(n)?n:[],null!=(i=null==e?void 0:e.paths)?i:Array.isArray(e)?e:[],r)}:Fn.has(t)?Pn(n||[0,0,0,1],e||[0,0,0,1],r):"transform"!==t||"object"!=typeof n||null===n||Array.isArray(n)||"object"!=typeof e||null===e||Array.isArray(e)?"rotate"===t&&"number"==typeof n&&"number"==typeof e?Sn(n,e,r):In.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?Nn(n||[],e||[],r):Sn(+(n||0),+(e||0),r):function(t,n,e){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=n?n:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],s=null==n?void 0:n[i];if("rotate"===i||"skew"===i)o[i]=Sn(+(null!=r?r:0),+(null!=s?s:0),e);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=Nn(r||t,s||t,e)}else o[i]=null!=s?s:r}return o}(n,e,r)}function Ge(t,n,e,r){var o,i,s,l,u;const c=n.length-1,d=Qn(null!=(o=e.segmentCount)?o:c,1,c);let v;v=e.repeatAt===it.start?n.slice(0,d+1):n.slice(c-d);const y=null!=(i=n[0].t)?i:0,m=null!=(s=n[n.length-1].t)?s:0;let p,h;e.repeatAt===it.start?(p=0,h=y):(p=m,h=r);const g=h-p;if(g<=0)return n;const b=null!=(l=v[0].t)?l:0,w=(null!=(u=v[v.length-1].t)?u:0)-b;if(w<=0)return n;const A=v.map(t=>({R:(t.t-b)/w,v:t.v,e:t.e,tangentIn:zt(t),tangentOut:Ct(t)})),k=Math.floor(g/w),j=g-k*w,M=j/w,x=[],O=e.repeatAt!==it.start,S=n[n.length-1];let N,P=!1;function z(n,e,r){var o;let i;if(e){i=[];for(let t=A.length-1;t>=0;t--)i.push({R:1-A[t].R,v:A[t].v,e:t>0?Ln(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else i=A;const s=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.R>s+1e-9){const o=i[e-1],l=r.R-o.R,u=(s-o.R)/l,c=o.e?_n(o.e)(u):u,a=Ze(t,o.v,r.v,c),{left:f}=Rn(o.e,u);return x.length>0&&o.R<=s&&(x[x.length-1].e=f),void x.push({t:n+s*w,v:a,e:void 0})}const l=x.length>0?x[x.length-1]:S,u=O&&0===e&&void 0!==l&&Math.abs((null!=(o=l.t)?o:0)-(n+r.R*w))<1e-9;if(u){if(Le(l.v,r.v)){x.length>0?(l.e=r.e,l.tangentOut=r.tangentOut):(N=r.e,P=!0);continue}x.length>0&&(delete l.tangentIn,delete l.tangentOut)}const c={t:n+r.R*w+(u?Re:0),v:r.v,e:e<i.length-1?r.e:void 0};r.tangentIn&&(c.tangentIn=r.tangentIn),r.tangentOut&&(c.tangentOut=r.tangentOut),x.push(c)}}if(e.repeatAt===it.start){M>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=A.length-1;t>=0;t--)o.push({R:1-A[t].R,v:A[t].v,e:t>0?Ln(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else o=A;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.R<i-1e-9)continue;const s=o[e-1];if(s&&s.R<i-1e-9&&r.R>i+1e-9){const e=r.R-s.R,o=(i-s.R)/e,l=s.e?_n(s.e)(o):o,u=Ze(t,s.v,r.v,l),{right:c}=Rn(s.e,o);x.push({t:n,v:u,e:c})}const l={t:n+(r.R-i)*w,v:r.v,e:e<o.length-1?r.e:void 0};r.tangentIn&&(l.tangentIn=r.tangentIn),r.tangentOut&&(l.tangentOut=r.tangentOut),x.push(l)}}(p,e.direction===st.alternate&&k%2==0,M);for(let t=0;t<k;t++){const n=k-1-t,r=e.direction===st.alternate&&n%2==0;z(p+j+t*w,r)}}else{for(let t=0;t<k;t++){const n=e.direction===st.alternate&&t%2==0;z(p+t*w,n)}if(M>1e-9){const t=e.direction===st.alternate&&k%2==0;z(p+k*w,t,M)}}return e.repeatAt===it.start?[...x,...n]:P&&n.length>0?[...n.slice(0,-1),f(a({},n[n.length-1]),{e:N}),...x]:[...n,...x]}function We(t,n,e,r){var o;const i=n.keyframes||[],s=[];for(const n of i){const e=St(n);let i=Nt(n);const l=Pt(n);"d"===t&&(i=Ie(i));const u=Jn(t)?qn(t):t;Fn.has(u)&&(i=null!=(o=Vn(i))?o:i);const c={t:e,v:i,e:Ue(l,r)},a=zt(n),f=Ct(n);a&&(c.tangentIn=a),f&&(c.tangentOut=f),s.push(c)}s.sort((t,n)=>{var e,r;return(null!=(e=t.t)?e:0)-(null!=(r=n.t)?r:0)});const l=n.loop,u=!0===l?{}:l||void 0;return u&&s.length>=2?Ge(t,s,u,e):s}function Je(t,n,e){const r=n.loop;if(null==r||!1===r)return n;const o=!0===r?{}:r,i=n.keyframes;if(!Array.isArray(i)||i.length<2)return n;const s=Jn(t)?qn(t):t,l=Fn.has(s),u=i.map(n=>{var e;const r=St(n);let o=Nt(n);"d"===t&&(o=Ie(o)),l&&(o=null!=(e=Vn(o))?e:o);const i={t:r,v:o,e:Pt(n)},s=zt(n),u=Ct(n);return s&&(i.tangentIn=s),u&&(i.tangentOut=u),i}),c={keyframes:Ge(t,u,o,e)};return void 0!==n.autoOrient&&(c.autoOrient=n.autoOrient),c}function Xe(t,n){const e=qe(t,n);return null!=e?e:t}function qe(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=qe(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const e of Object.keys(t)){const o=t[e],i=Je(e,o,n);i!==o&&(r||(r=a({},t)),r[e]=i)}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var Qe=0;function Ke(t,n=tt.native){const e=bt(t)||{},r=kt(t),o=e.duration||1e3,i=[],s=(t,e,i)=>{if(0===e.length)return null;const s=function(t,n,e,r=tt.native){const o={};for(const[i,s]of Object.entries(t)){if("transform"===i&&"offsetPath"===s.alongPathMode&&void 0!==t.offsetDistance)continue;const l=We(i,s,n,e);if(l.length>0){const t={keyframes:l};void 0!==s.autoOrient&&(t.autoOrient=s.autoOrient),void 0!==s.loop&&(t.loop=s.loop),o[i]=r===tt.native&&"transform"===i?we(t):t}}return o}(function(t,n){if(!t)return t;const e=n&&"object"==typeof n&&!Array.isArray(n)?n:function(t){var n,e;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let s,l=-1;for(;null!==(s=o.exec(t));){const t=s[1],o=i.indexOf(t);if(o<0||o<=l)return;l=o;const u=s[2].split(/[\s,]+/).filter(Boolean).map(Number);if(u.some(t=>Number.isNaN(t)))return;if("translate"===t){if(u.length<1||u.length>2)return;r.translate=[u[0],null!=(n=u[1])?n:0]}else if("rotate"===t){if(1!==u.length)return;r.rotate=u[0]}else if("skewX"===t){if(1!==u.length)return;r.skew=u[0]}else{if(u.length<1||u.length>2)return;r.scale=[u[0],null!=(e=u[1])?e:u[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}(n);if(!e||!Object.keys(e).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?a(a({},e),t):t,o=t[vt];if(o&&"object"==typeof o){const n=o;if(Array.isArray(n.keyframes)){const e=f(a({},n),{keyframes:n.keyframes.map(t=>f(a({},t),{value:r(t.value)}))});return void 0!==e.value&&(e.value=r(e.value)),f(a({},t),{transform:e})}return t}const i=Object.keys(t).filter(t=>In.has(t));if(1!==i.length)return t;const s=i[0],l=t[s];if(!l||"object"!=typeof l||!Array.isArray(l.keyframes))return t;const u=f(a({},l),{keyframes:l.keyframes.map(t=>f(a({},t),{value:f(a({},e),{[s]:t.value})}))});void 0!==u.value&&(u.value=f(a({},e),{[s]:u.value}));const c=a({},t);return delete c[s],f(a({},c),{transform:u})}(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(e),i),o,r,n);return 0===Object.keys(s).length?null:{id:t,animate:s}},l=function(t){var n;if(t)return null==(n=bt(t))?void 0:n.bindings}(t);if(l)for(const t of l){const n=t.target.startsWith("#")?t.target.slice(1):t.target,e=t.animateWith.map(t=>Be(t,r)).filter(t=>!!t),o=s(n,e);o&&i.push(o)}const u=t=>{const n=t.animate;if(n&&Object.keys(n).length>0){const e=t.id||"_px_el_"+ ++Qe;t.id=e;const o=s(e,function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=Be(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=Be(r,n);t&&e.push(t)}else e.push(t);return e}(n,r),t.transform);o&&i.push(o)}if(t.children)for(let n=0;n<t.children.length;n++)u(t.children[n])};if(t.children)for(let n=0;n<t.children.length;n++)u(t.children[n]);return i}function Ye(t,n,e){var r,o,i,s;const l=n.keyframes||[];if(0===l.length)return null;const{L:u,V:c}=function(t,n){var e,r;const o=t.length-1;let i=t[0],s=t[o>0?1:0];for(let l=0;l<o;l++){const u=null!=(e=t[l].t)?e:0,c=null!=(r=t[l+1].t)?r:0;if(u<=n&&n<=c){i=t[l],s=t[l+1];break}n>c&&l===o-1&&(i=t[o>0?o-1:0],s=t[o])}return{L:i,V:s}}(l,e);let a=u===c?0:(f=e,d=null!=(r=u.t)?r:0,(v=null!=(o=c.t)?o:0)===d?0:0+(f-d)/(v-d)*1);var f,d,v;a=Qn(a,0,1);const y=Pt(u);if(y&&Array.isArray(y))try{a=_n(y)(a)}catch(t){}let m=Jn(t)?qn(t):t,p=null;const h=null==u?void 0:u.v,g=null==c?void 0:c.v;if("d"===m)p=zn(null!=(i=null==h?void 0:h.paths)?i:Array.isArray(h)?h:[],null!=(s=null==g?void 0:g.paths)?s:Array.isArray(g)?g:[],a).map(t=>On(t)).join("");else if(Fn.has(m))p=En(Pn(h||[0,0,0,1],g||[0,0,0,1],a)),m=t;else if("stroke-dasharray"===m)p=Nn(h||[],g||[],a).join(" "),m=t;else if("transform"!==m||null===h||"object"!=typeof h||Array.isArray(h))"translate"===m?(p="translate("+Nn(h||[0,0],g||[0,0],a).join(",")+")",m="transform"):"rotate"===m?(p="rotate("+Sn(+(h||0),+(g||0),a)+")",m="transform"):"scale"===m?(p="scale("+Nn(h||[1,1],g||[1,1],a).join(",")+")",m="transform"):p=Sn(+(h||0),+(g||0),a);else{const t=new Set([...h?Object.keys(h):[],...g?Object.keys(g):[]]),e={};for(const n of t){const t=null==h?void 0:h[n],r=null==g?void 0:g[n];if("rotate"===n||"skew"===n)e[n]=Sn(+(null!=t?t:0),+(null!=r?r:0),a);else if("translate"===n||"scale"===n||"origin"===n){const o="scale"===n?[1,1]:[0,0],i=Nn(t||o,r||o,a);e[n]=i}}if(ye(n)){const t=h.translate,r=g.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,n,e,r,o,i){const s=pe(t,n,e,r),l=0===s.T?o:function(t,n){const e=n*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(e<=0)return r[0];if(e>=o[i])return r[i];let s=1,l=i;for(;s<l;){const t=s+l>>>1;o[t]<e?s=t+1:l=t}const u=o[l-1],c=o[l]-u,a=c>0?(e-u)/c:0;return r[l-1]+a*(r[l]-r[l-1])}(s.C,o),u=Kn(s.P0,s.P1,s.P2,s.P3,l);if(!i)return{translate:u};const c=Hn(s.P0,s.P1,s.P2,s.P3,l);return{translate:u,rotateDeg:180*Math.atan2(c[1],c[0])/Math.PI}}(u,c,[+t[0],+t[1]],[+r[0],+r[1]],a,!!n.autoOrient);e.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(e.rotate=o.rotateDeg)}}p=Bn(e,{P:!1}),m="transform"}return Un.has(m)&&"number"==typeof p&&(p=100*p+"%"),{k:m,v:null===p?"":""+p}}function He(t,n){const e={};for(const[r,o]of Object.entries(t)){const t=Ye(r,o,n);t&&(e[t.k]=t.v)}return e}function $e(t,n,e){const r={};return"translate"===t?r.translate=n:"rotate"===t?r.rotate=n:"skew"===t?r.skew=n:r.scale=n,e&&"translate"!==t&&(r.origin=e),r}function tr(t){var n,e;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(er),autoOrient:r.autoOrient,loop:r.loop},e=null!=(n=r.value)?n:r.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const i=null!=(e=r.value)?e:r.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function nr(t,n,e,r){var o,i,s,l;const u=t=>(null==r?void 0:r.F)&&null!=t?String(t):t;if("absent"===e.kind)return;if("static"===e.kind)return void(t[n]=u(e.value));const c=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,f=a({},c||{}),d={keyframes:e.keyframes};void 0!==e.loop&&(d.loop=e.loop),void 0!==e.autoOrient&&(d.autoOrient=e.autoOrient),f[n]=d,t.animate=f;const v=null!=(l=null!=(i=e.base)?i:null==(o=e.keyframes[0])?void 0:o.value)?l:null==(s=e.keyframes[0])?void 0:s.v;void 0!==v&&(t[n]=u(v))}function er(t){if(!t||"object"!=typeof t)return t;const n=t;if(void 0===n.t&&void 0===n.v&&void 0===n.e&&void 0===n.to&&void 0===n.ti)return t;const e=a({},n);return void 0===e.time&&void 0!==n.t&&(e.time=n.t),void 0===e.value&&void 0!==n.v&&(e.value=n.v),void 0===e.easing&&void 0!==n.e&&(e.easing=n.e),void 0===e.tangentOut&&void 0!==n.to&&(e.tangentOut=n.to),void 0===e.tangentIn&&void 0!==n.ti&&(e.tangentIn=n.ti),e}function rr(t,n){const e={value:n};return void 0!==t.time&&(e.time=t.time),void 0!==t.easing&&(e.easing=t.easing),void 0!==t.tangentOut&&(e.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(e.tangentIn=t.tangentIn),e}function or(t,n,e){if(!n)return t;delete t.transform;let r=t;return r=sr(r,n.origin,!0),r=ir(r,"scale",n.scale),r=ir(r,"skew",n.skew),r=ir(r,"rotate",n.rotate),r=sr(r,n.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}(n.translate)?(r=sr(r,n.origin,!0),r=ir(r,"translate",n.translate),r=sr(r,n.origin,!1)):r=ir(r,"translate",n.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function ir(t,n,e,r){if(void 0===e)return t;const o=tr(e);if("static"===o.kind)return{type:"g",transform:{value:$e(n,o.value,void 0)},children:[t]};if("animated"===o.kind){const e={keyframes:o.keyframes.map(t=>rr(t,$e(n,t.value,void 0)))};return o.autoOrient&&(e.autoOrient=!0),void 0!==o.loop&&(e.loop=o.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function sr(t,n,e){if(void 0===n)return t;const r=tr(n),o=t=>e?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const n={keyframes:r.keyframes.map(t=>rr(t,{translate:o(t.value)}))};return void 0!==r.loop&&(n.loop=r.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function lr(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(lr);const n={};for(const e of Object.keys(t))n[e]=lr(t[e]);return n}function ur(t,n){const e=new Map,r=t=>{var o;if("string"==typeof t.id){const r=n();e.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t}),i=t=>{var n;if("string"==typeof t.href&&t.href.startsWith("#")){const n=e.get(t.href.slice(1));n&&(t.href="#"+n)}for(const n of Object.keys(t)){if("children"===n||"effects"===n||"meta"===n||"animate"===n||"href"===n||"id"===n)continue;const e=t[n];"string"==typeof e&&-1!==e.indexOf("url(#")&&(t[n]=o(e))}null==(n=t.children)||n.forEach(i)};return i(t),e}function cr(t){const n="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(n)?n:0}function ar(t){var n;const e=cr(t.x),r=cr(t.y);if(delete t.x,delete t.y,!e&&!r)return t;const o="translate("+e+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const e={type:"g",transform:o,children:null!=(n=t.children)?n:[]};t.children=[e]}else t.transform=o;return t}function fr(t,n){return"_lw_"+n+"_"+t.nextId++}function dr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function vr(t,n){var e;"string"==typeof t.id&&n.set(t.id,t),null==(e=t.children)||e.forEach(t=>vr(t,n))}var yr=lr;function mr(t,n,e){var r,o,i;if("use"===t.type&&"translate"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.without)){const r=dr(t.effects.clone.source);"string"==typeof r&&r&&!n.contentRefInnerIds.has(r)&&n.contentRefInnerIds.set(r,e(r))}null==(i=t.children)||i.forEach(t=>mr(t,n,e))}function pr(t){const n=/translate\(([^)]*)\)/.exec(t);if(!n)return[0,0];const e=n[1].split(/[\s,]+/).filter(Boolean).map(Number);return[e[0]||0,e[1]||0]}function hr(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||!!Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}function gr(t,n,e,r){if(!n)return t;const o=fr(e,"grad"),i=function(t,n){const e={type:t.type===gt.radial?"radialGradient":"linearGradient",id:n};return t.type===gt.linear?(br(e,"x1","y1",t.start),br(e,"x2","y2",t.end)):(br(e,"cx","cy",t.center),function(t,n,e){const r=tr(e);"absent"!==r.kind&&nr(t,"r",r,{F:!0})}(e,0,t.radius),br(e,"fx","fy",t.focal)),t.gradientUnits&&(e.gradientUnits=t.gradientUnits),t.spreadMethod&&(e.spreadMethod=t.spreadMethod),t.gradientTransform&&(e.gradientTransform=t.gradientTransform),e.children=function(t){var n,e;if(!t)return[];const r=tr(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(wr):[];const o=r.keyframes;if(!o.length)return[];const i=r.loop;let s=0;for(const t of o){const n=Nt(t);Array.isArray(n)&&n.length>s&&(s=n.length)}if(!s)return[];const l=Nt(o[0]),u=[];for(let t=0;t<s;t++){const r=null!=(e=null!=(n=null==l?void 0:l[t])?n:Ar(o,0,t))?e:{offset:t/Math.max(1,s-1),color:"#000000"};u.push({offset:r.offset,color:r.color})}return u.map((t,n)=>function(t,n,e,r,o){var i;const s=[],l=[];let u=!1;for(const r of n){const o=St(r),c=Nt(r),a=null!=(i=null==c?void 0:c[e])?i:Ar(n,n.indexOf(r),e);if(!a)continue;const f=Pt(r),d={time:o,value:a.color};void 0!==f&&(d.easing=f),s.push(d);const v={time:o,value:a.offset};void 0!==f&&(v.easing=f),l.push(v),a.offset!==t.offset&&(u=!0)}const c={type:"stop",offset:kr(t.offset),stopColor:t.color},a={};return s.length&&(a.stopColor={keyframes:s},void 0!==o&&(a.stopColor.loop=o)),u&&l.length&&(a.offset={keyframes:l},void 0!==o&&(a.offset.loop=o)),Object.keys(a).length&&(c.animate=a),c}(t,o,n,0,i))}(t.stops),e}(n,o);return e.defs.push(i),t[r]="url(#"+o+")",t}function br(t,n,e,r){var o,i,s;const l=tr(r);if("absent"===l.kind)return;if("static"===l.kind)return t[n]=String(l.value[0]),void(t[e]=String(l.value[1]));const u=t=>{const n={keyframes:l.keyframes.map(n=>{const e={time:n.time,value:Array.isArray(n.value)?n.value[t]:void 0};return void 0!==n.easing&&(e.easing=n.easing),e})};return void 0!==l.loop&&(n.loop=l.loop),n},c=null!=(o=t.animate)?o:{};c[n]=u(0),c[e]=u(1),t.animate=c;const a=null!=(s=l.base)?s:null==(i=l.keyframes[0])?void 0:i.value;Array.isArray(a)&&(t[n]=String(a[0]),t[e]=String(a[1]))}function wr(t){return{type:"stop",offset:kr(t.offset),stopColor:t.color}}function Ar(t,n,e){for(let r=n;r>=0;r--){const n=Nt(t[r]);if(null==n?void 0:n[e])return n[e]}for(let r=n+1;r<t.length;r++){const n=Nt(t[r]);if(null==n?void 0:n[e])return n[e]}}function kr(t){return Math.round(1e3*t)/10+"%"}function jr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.pathData?t.pathData:void 0}function Mr(t,n,e){if(!n)return t;const r=function(t,n){var e;const r=tr(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(n.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(e=r.keyframes[0])?void 0:e.value)}(n.origin,e);let o=t;return o=xr(o,"translate",n.translate,void 0),o=xr(o,"rotate",n.rotate,r),o=xr(o,"scale",n.scale,r),o}function xr(t,n,e,r,o){if(void 0===e)return t;const i=tr("scale"===n&&Array.isArray(e)?[e[0]/100,e[1]/100]:e);if("static"===i.kind)return{type:"g",transform:{value:$e(n,Or(n,i.value),r)},children:[t]};if("animated"===i.kind){const e={keyframes:i.keyframes.map(t=>{const e=rr(t,$e(n,Or(n,t.value),r));return"translate"===n?a(a({},e),Sr(t)):e})};return void 0!==i.loop&&(e.loop=i.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function Or(t,n){return"translate"===t?[-n[0],-n[1]]:"rotate"===t?-n:[1/n[0],1/n[1]]}function Sr(t){var n,e;const r={},o=null!=(n=t.tangentOut)?n:t.to,i=null!=(e=t.tangentIn)?e:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Nr(t){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!n||!n.transform)}function Pr(t){let n=0,e=0;for(const r of t)r.translate&&(n+=r.translate[0],e+=r.translate[1]);return[n,e]}function zr(t,n){let e=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Cr(o.translateKeyframes,n);e+=t[0],r+=t[1]}else o.translate&&(e+=o.translate[0],r+=o.translate[1]);return[e,r]}function Cr(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Tr(t,n){var e,r,o;const i=t.transform,s=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!s)return;const l={};if("string"==typeof i){const t=function(t,n){const e=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,s=!1,l=!1;for(;null!==(r=e.exec(t));){const t=r[1],n=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=n[0]||0,i+=n[1]||0,s=!0):l=!0}return l&&n.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),s?[o,i]:void 0}(i,n);t&&(l.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes){const t=i.value,e=t&&"object"==typeof t?t:i;e&&"object"==typeof e&&Array.isArray(e.translate)&&(l.translate=[e.translate[0]||0,e.translate[1]||0]),!e||void 0===e.rotate&&void 0===e.scale&&void 0===e.skew||n.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(s&&Array.isArray(s.keyframes)){const t=s.keyframes,i=[];for(const s of t){const t=null!=(e=s.value)?e:s.v,l=null!=(o=null!=(r=s.time)?r:s.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:l,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||n.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(l.translateKeyframes=i)}return l.translate||l.translateKeyframes?l:void 0}function _r(t,n,e){if(!n)return;const r=dr(n.source);if(!r)return void(n.without===ct.translate&&e.errors.push("clone: content ref missing `source`"));const o=n.without===ct.translate&&e.contentRefInnerIds.get(r)||r;t.href="#"+o}function Dr(t,n){const e={};return void 0!==t.translate&&(e.translate=Rr(t.translate,t=>[t[0]*n,t[1]*n])),void 0!==t.rotate&&(e.rotate=Rr(t.rotate,t=>t*n)),void 0!==t.skew&&(e.skew=Rr(t.skew,t=>t*n)),void 0!==t.scale&&(e.scale=function(t,n){return Rr(t,t=>[Math.pow(t[0],n),Math.pow(t[1],n)],!0)}(t.scale,n)),void 0!==t.origin&&(e.origin=t.origin),Object.keys(e).length?e:void 0}function Rr(t,n,e=!1){const r=tr(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=n(r.value);return"number"!=typeof t&&!Array.isArray(t)||e?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?f(a({},t),{value:n(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=n(r.base)),o}var Lr=!1;function Er(t){var n,e;return{start:null!=(n=t.start)?n:0,stretch:null!=(e=t.stretch)?e:1}}var Vr=1;function Fr(t,n,e){const[r,o]=n;if(!Number.isFinite(r)||!Number.isFinite(o))return void e.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-Vr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Vr,value:0}],s=a({},t);for(const n of Object.keys(t))delete t[n];t.type="g",t.children=[s],t.animate={opacity:{keyframes:i}}}function Ir(t,n){return{start:n.start+n.stretch*t.start,stretch:n.stretch*t.stretch}}function Ur(t){var n,e;return null==(e=null==(n=t.effects)?void 0:n.clone)?void 0:e.retime}function Br(t){var n;const e=null==(n=t.effects)?void 0:n.clone;e&&(delete e.retime,0===Object.keys(e).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function Zr(t,n,e){const r=dr(t.href);if(!r)return void e.errors.push("retime: <use> has no href to follow");const o=Gr(r,n,e,new Set);if(o)if(Lr){const n=e.idMap.get(o);t.type="g",delete t.href,t.children=[n],ar(t),e.defs=e.defs.filter(t=>t!==n)}else t.href="#"+o}function Gr(t,n,e,r){if(r.has(t))return void e.errors.push('retime: loop via "'+t+'"');const o=e.idMap.get(t);if(!o)return void e.warnings.push('retime: target "'+t+'" not found');const i=yr(o);if(function(t,n){ur(t,()=>fr(n,"retimed"))}(i,e),"use"===o.type?Jr(i,n.start,n.stretch):Wr(i,n.start,n.stretch),Br(i),"use"===o.type&&o.href){const s=dr(o.href);if(s){const l=Ur(o),u=l?Ir(Er(l),n):n,c=new Set(r);c.add(t);const a=Gr(s,u,e,c);a&&(i.href="#"+a)}}else!function(t,n,e,r,o){const i=t=>{var s;const l=Ur(t);if("use"===t.type&&l&&t.href){const i=dr(t.href);if(i){const s=Ir(Er(l),n),u=new Set(r);u.add(o);const c=Gr(i,s,e,u);c&&(t.href="#"+c)}Br(t)}null==(s=t.children)||s.forEach(i)};i(t)}(i,n,e,r,t);return e.defs.push(i),"string"==typeof i.id&&e.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Wr(t,n,e){var r;Jr(t,n,e),null==(r=t.children)||r.forEach(t=>Wr(t,n,e))}function Jr(t,n,e){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=n+r.time*e)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const n of Object.keys(t.animate)){const e=t.animate[n];e&&Array.isArray(e.keyframes)&&r(e.keyframes)}}var Xr=48,qr=/[MmLlHhVvCcSsQqTtAaZz]/;function Qr(t,n,e){return{P1:[t[0]+2/3*(n[0]-t[0]),t[1]+2/3*(n[1]-t[1])],P2:[e[0]+2/3*(n[0]-e[0]),e[1]+2/3*(n[1]-e[1])]}}function Kr(t){const n=function(t){const n=function(t){const n=[],e=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=e.exec(t));)n.push(r[0]);return n}(t),e=[];let r=0,o=0,i=0,s=0,l=0,u=0,c=0,a=0,f=0,d="";const v=()=>parseFloat(n[r++]),y=(t,n,r)=>{const s=[o,i],l=te(s,t,n,r,Xr);e.push({P0:s,P1:t,P2:n,P3:r,C:l,I:l.ds[l.ds.length-1]}),o=r[0],i=r[1]},m=(t,n)=>{y([o+(t-o)/3,i+(n-i)/3],[o+2*(t-o)/3,i+2*(n-i)/3],[t,n])};for(;r<n.length;){let t=n[r];qr.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const e=t>="a",p=t.toUpperCase();if("Z"!==p){if("M"===p){const n=v()+(e?o:0),r=v()+(e?i:0);o=n,i=r,s=n,l=r,d=t;continue}if("L"===p)m(v()+(e?o:0),v()+(e?i:0));else if("H"===p)m(v()+(e?o:0),i);else if("V"===p)m(o,v()+(e?i:0));else if("C"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];u=n[0],c=n[1],y(t,n,r)}else if("S"===p){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-u,2*i-c]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];u=n[0],c=n[1],y(t,n,r)}else if("Q"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=Qr([o,i],t,n);y(r,s,n)}else if("T"===p){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-a,2*i-f]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=Qr([o,i],t,n);y(r,s,n)}else{if("A"!==p){r++;continue}r+=5,m(v()+(e?o:0),v()+(e?i:0))}d=t}else m(s,l),o=s,i=l,d=t}return e.length?e:null}(t);if(!n)return null;const e=new Float64Array(n.length+1);for(let t=0;t<n.length;t++)e[t+1]=e[t]+n[t].I;const r=e[n.length],o=n[0].P0,i=n[n.length-1].P3,s=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,l=t=>{let r=0;for(;r<n.length-1&&t>e[r+1];)r++;const o=n[r],i=t-e[r],s=o.I>0?function(t,n){const{ts:e,ds:r}=t,o=r.length-1;if(n<=0)return e[0];if(n>=r[o])return e[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;r[t]<n?i=t+1:s=t}const l=r[s-1],u=r[s]-l,c=u>0?(n-l)/u:0;return e[s-1]+c*(e[s]-e[s-1])}(o.C,i):0,[l,u]=Kn(o.P0,o.P1,o.P2,o.P3,s),[c,a]=Hn(o.P0,o.P1,o.P2,o.P3,s);return{x:l,y:u,angle:Math.atan2(a,c)}};return{totalLength:r,closed:s,sampleAtDistance(t){if(s&&r>0&&(t<0||t>r))return l((t%r+r)%r);if(!s&&(t<0||t>r)){const n=t<0?0:r,e=l(n),o=t-n;return{x:e.x+Math.cos(e.angle)*o,y:e.y+Math.sin(e.angle)*o,angle:e.angle}}return l((e=r,(n=t)<0?0:n>e?e:n));var n,e}}}var Yr=.15;function Hr(t){const n=tr(t);if("static"===n.kind&&"number"==typeof n.value)return{min:n.value,max:n.value};if("animated"===n.kind&&n.keyframes.length){const t=n.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function $r(t){let n=0,e=16;const r=t=>{var o;const i=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;i&&(e=Math.max(e,i));const s=t.textContent;if("string"==typeof s&&(n+=s.length),t.children)for(const n of t.children)r(n)};return r(t),n*e}var to=t=>Math.round(1e3*t)/1e3;function no(t,n,e){null!=e&&nr(t,n,tr(e),{F:!0})}var eo=(t,n,e)=>{const r={type:t};for(const t in n)void 0!==n[t]&&(r[t]=n[t]);const o=Array.isArray(e)?e.filter(t=>null!=t):null!=e?[e]:[];return o.length&&(r.children=o),r};function ro(t,n){return Math.round(t)===t?""+Math.round(t):t.toFixed(n)}function oo(t,n){let e="";for(let r=0;r<t.length;r++){const o=ro(t[r],n);r>0&&45!==o.charCodeAt(0)&&(e+=" "),e+=o}return e}function io(t,n,e){return[t[0]*n+t[2]*e+t[4],t[1]*n+t[3]*e+t[5]]}var so=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function lo(t,n,e=2){const r=[];let o;for(so.lastIndex=0;null!==(o=so.exec(t));)r.push(o[0]);let i="",s=0;const l=()=>parseFloat(r[s++]);for(;s<r.length;){const t=r[s++];if("M"===t||"L"===t){const[r,o]=io(n,l(),l());i+=t+oo([r,o],e)}else if("C"===t){const[t,r]=io(n,l(),l()),[o,s]=io(n,l(),l()),[u,c]=io(n,l(),l());i+="C"+oo([t,r,o,s,u,c],e)}else if("Q"===t){const[t,r]=io(n,l(),l()),[o,s]=io(n,l(),l());i+="Q"+oo([t,r,o,s],e)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var uo=16,co=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",ft,"xml:space"],ao=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],fo=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function vo(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return isNaN(n)?void 0:n}}function yo(t){return"string"==typeof t?t:void 0}function mo(t){const n=t.animate;if(!n||"object"!=typeof n)return;let e;for(const t of fo)void 0!==n[t]&&((null!=e?e:e={})[t]=n[t]);return e}function po(t,n){var e,r,o,i,s,l,u,c,a,f;const d="text"===t.type,v=t.style,y=n=>{var e;return d?void 0:null!=(e=t[n])?e:null==v?void 0:v[n]},m={fontFamily:null!=(e=yo(t.fontFamily))?e:n.fontFamily,fontSize:null!=(r=vo(t.fontSize))?r:n.fontSize,fill:null!=(o=t.fill)?o:n.fill,stroke:null!=(i=t.stroke)?i:n.stroke,strokeWidth:null!=(s=t.strokeWidth)?s:n.strokeWidth,letterSpacing:null!=(l=vo(t.letterSpacing))?l:n.letterSpacing,wordSpacing:null!=(u=vo(t.wordSpacing))?u:n.wordSpacing,opacity:null!=(c=vo(y("opacity")))?c:n.opacity,animate:null!=(a=d?void 0:mo(t))?a:n.animate};for(const t of ao){const e=null!=(f=y(t))?f:n[t];void 0!==e&&(m[t]=e)}return m}function ho(t){var n,e,r;return{fontFamily:yo(t.fontFamily),fontSize:null!=(n=vo(t.fontSize))?n:uo,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(e=vo(t.letterSpacing))?e:0,wordSpacing:null!=(r=vo(t.wordSpacing))?r:0}}function go(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(n.opacity=t.opacity);for(const e of ao)void 0!==t[e]&&(n[e]=t[e]);return void 0!==t.animate&&(n.animate=t.animate),n}function bo(t,n,e,r){var o;const i=t.fontFamily?n[t.fontFamily]:e;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function wo(t){const n=Object.keys(t);return 1===n.length?t[n[0]]:void 0}var Ao=.6,ko="px-missing-glyph";function jo(t,n){if(t<=0||n<=0)return"";const e=.08*t,r=.92*t,o=.92*-n,i=r-e,s=-o,l=Math.max(1,.12*Math.min(i,s)),u="M"+e+" 0L"+r+" 0L"+r+" "+o+"L"+e+" "+o+"Z";if(i<=2*l||s<=2*l)return u;const c=e+l,a=r-l,f=-l,d=o+l;return u+"M"+c+" "+f+"L"+c+" "+d+"L"+a+" "+d+"L"+a+" "+f+"Z"}function Mo(t,n,e,r,o=0){const{x:i,y:s,angle:l}=t.sampleAtDistance(n),u=Math.cos(l),c=Math.sin(l),a=r/2;return[e*u,e*c,-e*c,e*u,i-e*u*a-o*c,s-e*c*a+o*u]}function xo(t){var n;const e=tr(t);if("animated"===e.kind&&e.keyframes.length>=2){const t=[...e.keyframes].sort((t,n)=>(Number(t.time)||0)-(Number(n.time)||0)),n=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,U:n,loop:e.loop,at(t){if(t<=n[0])return r[0];for(let e=1;e<n.length;e++)if(t<=n[e]){const o=n[e]-n[e-1],i=o>0?(t-n[e-1])/o:1;return r[e-1]+i*(r[e]-r[e-1])}return r[r.length-1]}}}const r="animated"===e.kind?Number(null==(n=e.keyframes[0])?void 0:n.value)||0:"static"===e.kind&&Number(e.value)||0;return{animated:!1,U:[],at:()=>r}}var Oo=48,So=64;function No(t,n){const e=u(10,n);return Math.round(t*e)/e}function Po(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(n.opacity=t.opacity);for(const e of ao)void 0!==t[e]&&(n[e]=t[e]);return n}function zo(t){return t?{[dt]:ko}:{}}function Co(t,n,e){if(!t.length)return null==e||e.push("textGlyphs: nothing to render"),[];const r=new Map;for(const n of t){const t=JSON.stringify([n.B,!!n.Z]),e=lo(n.G,n.m),o=r.get(t);o?o.d+=e:r.set(t,{B:n.B,d:e,Z:n.Z})}const o=[];for(const{B:t,d:e,Z:i}of r.values())o.push(n("path",a(a(a({d:e},Po(t)),zo(i)),void 0!==t.animate?{animate:a({},t.animate)}:{}),[]));return o}function To(t,n,e){const r={};for(const n of Object.keys(t))"type"!==n&&"children"!==n&&-1===co.indexOf(n)&&(r[n]=t[n]);if(r.style&&"object"==typeof r.style){const t=a({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return e("g",r,n)}function _o(t,n){const e=f(a({},t),{type:"g",children:n});return delete e.d,delete e.strokeDasharray,delete e.strokeDashoffset,delete e.effects,e}function Do(t,n,e,r,o,i,s,l){const u=Lo(r,e,o),c=Eo(e,o),a=Fo(i,u),f=Fo(s,c),d=Bo(s),v={type:"path",d:On(n)};return Io(v,"strokeDasharray",f),Io(v,"strokeDashoffset",a),Io(v,"strokeOpacity",d),[v]}var Ro=1;function Lo(t,n,e){const[r]=Vo(e);return e=>n*(-e-r+t)+Ro}function Eo(t,n){const[e,r]=Vo(n),o=r-e+1;return n=>{const e=Qn(n[0],0,1),r=Qn(n[1],0,1),i=Math.min(e,r),s=Math.max(e,r),l=[0];let u=Ro;for(let n=0;n<o;n++)l.push(u+i*t),l.push((s-i)*t),u=(1-s)*t;return l.push(u+Ro),l}}function Vo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Fo(t,n){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:n(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:St(t),value:n(Nt(t)),easing:Pt(t)})),loop:t.loop}}function Io(t,n,e){e&&nr(t,n,e)}var Uo=10;function Bo(t){const n=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return n(t.value)?{kind:"static",value:0}:void 0;const e=t.keyframes;let r=!1,o=!0;for(const t of e)n(Nt(t))?r=!0:o=!1;if(!r)return;if(o)return{kind:"static",value:0};const i=[];for(let t=0;t<e.length;t++){const r=e[t],o=t>0?e[t-1]:void 0,s=t<e.length-1?e[t+1]:void 0,l=St(r),u=n(Nt(r)),c=o?u&&n(Nt(o)):u,a=s?u&&n(Nt(s)):u;c&&!a?(i.push({time:l,value:0}),i.push({time:l+Uo,value:1})):!c&&a&&(i.push({time:l-Uo,value:1}),i.push({time:l,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function Zo(t,n){const e=e=>{const r=(e-t.time)/(n.time-t.time),o=t.value[0]+(n.value[0]-t.value[0])*r;return t.value[1]+(n.value[1]-t.value[1])*r-o};let r=t.time,o=n.time,i=e(r);if(0===i)return r;const s=e(o);if(0===s)return o;if(i*s>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,n=e(t);if(0===n||Math.abs(o-r)<1e-4)return t;i*n<0?o=t:(r=t,i=n)}return(r+o)/2}function Go(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Wo(t){const n=t.v;if(!n||n.length<2)return 0;let e=0;for(let r=0;r<n.length-1;r++)e+=Jo(t,r,r+1);return t.c&&n.length>1&&(e+=Jo(t,n.length-1,0)),e}function Jo(t,n,e){var r,o,i,s;const l=t.v,u=l[n],c=l[e],a=te(u,null!=(o=null==(r=t.o)?void 0:r[n])?o:u,null!=(s=null==(i=t.i)?void 0:i[e])?s:c,c);return a.ds[a.ds.length-1]}var Xo=.5522847498307936;function qo(t){var n,e;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:et(null==(n=bt(t))?void 0:n.engine),glyphs:null==(e=kt(t))?void 0:e.fonts},o=yr(t);vr(o,r.idMap),mr(o,r,()=>fr(r,"inner")),function(t,n){const e=new Set,r=t=>{var o,i;const s=dr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.source);if("string"==typeof s){e.add(t);const r=n.idMap.get(s);r&&e.add(r)}if(Array.isArray(t.children))for(const n of t.children)r(n)};if(r(t),0===e.size)return;const o=(t,r)=>{if(e.has(t)&&n.maskAncestorChains.set(t,r),Array.isArray(t.children)){const e=Tr(t,n),i=e?[...r,e]:r;for(const n of t.children)o(n,i)}};o(t,[])}(o,r);const i=function(t,n){return function(t,n){n.idMap.clear(),vr(t,n.idMap);const e=[],r=t=>{var n;Ur(t)&&e.push(t),null==(n=t.children)||n.forEach(r)};r(t);const o=new Map;for(const t of e){let e=0;const r=new Set,i=o=>{var s;if(o){if(o!==t&&Ur(o)&&e++,"use"===o.type&&o.href){const t=dr(o.href);t&&!r.has(t)&&(r.add(t),i(n.idMap.get(t)))}null==(s=o.children)||s.forEach(i)}},s=dr(t.href);s&&(r.add(s),i(n.idMap.get(s))),o.set(t,e)}e.sort((t,n)=>{var e,r;return(null!=(e=o.get(n))?e:0)-(null!=(r=o.get(t))?r:0)});for(const t of e){const e=Ur(t);if(!e)continue;const r=e.timeCrop;Br(t),Zr(t,Er(e),n),r&&Fr(t,r,n)}}(t,n),t}(Qo(o,r),r);return function(t,n){n.length&&(t.children||(t.children=[])).unshift({type:"defs",children:n})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Qo(t,n){t.children&&(t.children=t.children.map(t=>Qo(t,n)));const e=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?n.contentRefInnerIds.get(r):void 0;if(!e&&!o)return t;const{transformBy:i,repeater:s,maskedBy:l,clipPath:u,strokeTrim:c,clone:d,fillGradient:v,strokeGradient:y,textPath:m,text:p}=null!=e?e:{};e&&delete t.effects;let h=t,g=!1;if(null==p?void 0:p.useGlyphs)if(m){const t="string"==typeof m.pathData?m.pathData:void 0,e=function(t,n,e,r,o,i){return n.glyphs?function(t,n,e,r,o,i){const{glyphs:s,create:l=eo,warnings:u}=r,c=n?Kr(n):null;if(!c)return null==u||u.push("textGlyphs: unparsable along-path geometry"),null;const d=wo(s),{cells:v,width:y}=function(t,n,e,r){const o=[];let i=0;const s=(t,l)=>{var u,c;const a=po(t,l),f=yo(t[ft]);if(f&&!(null==(u=t.children)?void 0:u.length)){const t=bo(a,n,e,r);if(t){const n=a.fontSize/t.unitsPerEm,e=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=go(a);for(let s=0;s<f.length;s++){const l=f.charAt(s),u=t.glyphs[l];if(u&&u.pathData){const t=u.width*n;o.push({G:u.pathData,W:u.width,scale:n,B:r,J:i+t/2}),i+=t}else if(/\S/.test(l)){const s=u&&u.width>0?u.width:Ao*t.unitsPerEm,l=s*n;o.push({G:jo(s,e),W:s,scale:n,B:r,Z:!0,J:i+l/2}),i+=l}else i+=(u?u.width:0)*n;i+=a.letterSpacing+(" "===l?a.wordSpacing:0)}}}if(t.children)for(const n of t.children)s(n,a)};return s(t,ho(t)),{cells:o,width:i}}(t,s,d,u);if(!v.length)return To(t,[],l);const{X:m,q:p}=function(t){var n,e,r;return{X:(null!=(n=vo(t.x))?n:0)+(null!=(e=vo(t.dx))?e:0),q:null!=(r=vo(t.dy))?r:0}}(t),h=xo(e),g=xo(o),b=t=>t>0&&y>0?t/y:1,w="clip"===i&&!c.closed;if(h.animated||g.animated){const n=function(t,n){const e=[...t,...n].sort((t,n)=>t-n),r=[];for(const t of e)r.length&&t===r[r.length-1]||r.push(t);return r}(h.U,g.U),e=(t,n)=>m+h.at(n)+b(g.at(n))*t.J,r=h.animated?h.loop:g.loop;return To(t,function(t,n,e,r,o,i,s,l=0){const u=Math.max(n.totalLength/Oo,.5),c=t=>t>=0&&t<=n.totalLength,d=[];for(const v of t){const t=[v.scale,0,0,v.scale,-v.scale*(v.W/2),0],y=lo(v.G,t),m=(t,e)=>{const{x:r,y:o,angle:i}=n.sampleAtDistance(t),s=Math.cos(i),u=Math.sin(i);return{time:e,value:{translate:[No(r-l*u,3),No(o+l*s,3)],rotate:No(180*i/Math.PI,3)}}},p=[],h=[],g=(t,n)=>{p.push(m(t,n)),s&&h.push({time:n,value:c(t)?1:0})};g(e(v,r[0]),r[0]);for(let t=1;t<r.length;t++){const n=r[t-1],o=r[t],i=e(v,n),s=e(v,o),l=Math.min(So,Math.max(1,Math.ceil(Math.abs(s-i)/u)));for(let t=1;t<=l;t++){const r=n+t/l*(o-n);g(e(v,r),r)}}Ae(p);const b={keyframes:p};void 0!==o&&(b.loop=o);const w={transform:b};if(v.B.animate&&Object.assign(w,v.B.animate),s&&h.some(t=>0===t.value)){const t={keyframes:h};void 0!==o&&(t.loop=o),w.opacity=t}d.push(i("path",f(a(a({d:y},Po(v.B)),zo(v.Z)),{animate:w}),[]))}return d}(v,c,e,n,r,l,w,p),l)}const A=b(g.at(0)),k=m+h.at(0);return To(t,Co((w?v.filter(t=>{const n=k+t.J*A;return n>=0&&n<=c.totalLength}):v).map(t=>({G:t.G,B:t.B,Z:t.Z,m:Mo(c,k+t.J*A,t.scale,t.W,p)})),l,u),l)}(t,e,r,{glyphs:n.glyphs,warnings:n.warnings},o,i):(n.warnings.push("textGlyphs: no definitions.fonts"),null)}(h,n,t,m.startOffset,m.textLength,m.pathOverflow);e&&(h=e,g=!0)}else h=function(t,n,e){return(null==n?void 0:n.useGlyphs)?e.glyphs?function(t,n){var e,r,o;const{glyphs:i,create:s=eo,warnings:l}=n,u=wo(i),c={x:null!=(e=vo(t.x))?e:0,y:null!=(r=vo(t.y))?r:0},a=[],f=[{start:c.x,end:c.x}];let d=0;const v=(t,n)=>{var e;const r=bo(n,i,u,l),o=(null==r?void 0:r.unitsPerEm)||1e3,s=n.fontSize/o,v=null!=(e=null==r?void 0:r.ascent)?e:.9*o,y=go(n);for(let e=0;e<t.length;e++){const i=t.charAt(e),l=null==r?void 0:r.glyphs[i];if(l&&l.pathData)a.push({G:l.pathData,m:[s,0,0,s,c.x,c.y],B:y,line:d,x:c.x,y:c.y,scale:s}),c.x+=l.width*s;else if(/\S/.test(i)){const t=l&&l.width>0?l.width:Ao*o;a.push({G:jo(t,v),m:[s,0,0,s,c.x,c.y],B:y,Z:!0,line:d,x:c.x,y:c.y,scale:s}),c.x+=t*s}else c.x+=(l?l.width:0)*s;c.x+=n.letterSpacing+(" "===i?n.wordSpacing:0),f[d].end=c.x}},y=(t,n)=>{var e,r,o;const i=po(t,n),s=vo(t.x),l=vo(t.y);void 0!==s&&(c.x=s,d=f.length,f.push({start:c.x,end:c.x})),void 0!==l&&(c.y=l),c.x+=null!=(e=vo(t.dx))?e:0,c.y+=null!=(r=vo(t.dy))?r:0;const u=yo(t[ft]);if(u&&!(null==(o=t.children)?void 0:o.length)&&v(u,i),t.children)for(const n of t.children)y(n,i)},m=ho(t);if(t.children)for(const n of t.children)y(n,m);const p=yo(t[ft]);p&&!(null==(o=t.children)?void 0:o.length)&&v(p,m);const h=yo(t.textAnchor);if("middle"===h||"end"===h)for(const t of a){const n=f[t.line].end-f[t.line].start,e="middle"===h?-n/2:-n;t.m=[t.scale,0,0,t.scale,t.x+e,t.y]}return To(t,Co(a,s,l),s)}(t,{glyphs:e.glyphs,warnings:e.warnings}):(e.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}(h,p,n),g=!0;return g||(h=function(t,n,e){var r;if(!n||"string"!=typeof n.pathData||!n.pathData)return t;const o=fr(e,"tpath"),{d:i,startShift:s}=function(t,n){var e;if("clip"===n.pathOverflow)return{d:t,startShift:0};const r=Kr(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=Yr*o,s=Hr(n.startOffset),l=Hr(n.textLength).max||(null!=(e=n.advance)?e:0),u=Math.max(0,-s.min),c=Math.max(0,s.max+l-o),a=u>0?u+i:0,f=c>0?c+i:0;if(f<=0&&a<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),v=r.sampleAtDistance(o);let y=t;if(a>0){const n=d.x-Math.cos(d.angle)*a,e=d.y-Math.sin(d.angle)*a,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");y="M"+to(n)+","+to(e)+"L"+to(d.x)+","+to(d.y)+r}if(f>0){const t=v.x+Math.cos(v.angle)*f,n=v.y+Math.sin(v.angle)*f;y+="L"+to(t)+","+to(n)}return{d:y,startShift:a}}(n.pathData,{pathOverflow:n.pathOverflow,startOffset:n.startOffset,textLength:n.textLength,advance:$r(t)});e.defs.push({type:"path",id:o,d:i});const l={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==n.lengthAdjust&&(l.lengthAdjust=n.lengthAdjust),void 0!==n.method&&(l.method=n.method),void 0!==n.spacing&&(l.spacing=n.spacing),no(l,"startOffset",function(t,n){if(!n||null==t)return t;const e=tr(t);if("absent"===e.kind)return t;if("static"===e.kind)return"number"==typeof t?e.value+n:{value:e.value+n};const r={keyframes:e.keyframes.map(t=>f(a({},t),{value:(Number(t.value)||0)+n}))};return void 0!==e.loop&&(r.loop=e.loop),void 0!==e.autoOrient&&(r.autoOrient=e.autoOrient),void 0!==e.base&&(r.value=e.base+n),r}(n.startOffset,s)),no(l,"textLength",n.textLength),t.children=[l],t}(h,m,n)),h=function(t,n,e){return gr(t,n,e,"fill")}(h,v,n),h=function(t,n,e){return gr(t,n,e,"stroke")}(h,y,n),h=function(t,n){if(!n)return t;const e=n.subPaths===at.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const n of t.children)o(n);return}const n="string"==typeof t.d?t.d:function(t){var n,e,r,o,i,s,l,u,c,a;if("rect"===t.type){const i=Number(null!=(n=t.x)?n:0),s=Number(null!=(e=t.y)?e:0),l=Number(null!=(r=t.width)?r:0),u=Number(null!=(o=t.height)?o:0);return"M"+(i+l)+","+s+"L"+(i+l)+","+(s+u)+"L"+i+","+(s+u)+"L"+i+","+s+"L"+(i+l)+","+s+"z"}if("ellipse"===t.type||"circle"===t.type){const n=Number(null!=(i=t.cx)?i:0),e=Number(null!=(s=t.cy)?s:0),r="circle"===t.type?Number(null!=(l=t.r)?l:0):Number(null!=(u=t.rx)?u:0),o="circle"===t.type?Number(null!=(c=t.r)?c:0):Number(null!=(a=t.ry)?a:0);if(!(r>0&&o>0))return;const f=r*Xo,d=o*Xo,v=(t,n,e,r,o,i)=>"C"+t+","+n+" "+e+","+r+" "+o+","+i;return"M"+(n+r)+","+e+v(n+r,e+d,n+f,e+o,n,e+o)+v(n-f,e+o,n-r,e+d,n-r,e)+v(n-r,e-d,n-f,e-o,n,e-o)+v(n+f,e-o,n+r,e-d,n+r,e)+"z"}}(t);if(void 0===n)return;const e=Ee(n);if(!e.length)return;const i={leaf:t,K:[]};for(const t of e){const n=Wo(t);i.K.push({Y:t,H:n,$:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const s=e?[...r].reverse():r;for(const t of s)for(const n of t.K)e||(i=0),n.$=i,i+=n.H;const l=i;if(e&&l<.001)return t;const u=tr(n.offset),c="absent"===u.kind?{kind:"static",value:0}:u,d=function(t){const n=tr(t);if("animated"!==n.kind)return n;const e=n.keyframes.map(t=>({time:St(t),value:Nt(t),easing:Pt(t)}));if(!e.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:e.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<e.length;t++){const n=e[t-1],o=e[t];if((n.value[1]-n.value[0])*(o.value[1]-o.value[0])<0){const t=Zo(n,o);null!==t&&t>n.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,n)=>t-n),i=[];let s=0;for(const t of e){for(;s<o.length&&o[s]<t.time;){const t=o[s++],n=Go(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}const n=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:n,easing:t.easing})}for(;s<o.length;){const t=o[s++],n=Go(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(n.range),v="absent"===d.kind?{kind:"static",value:[0,1]}:d,y=function(t){if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const n=[];for(const e of t.keyframes){const t=Nt(e);"number"==typeof t&&n.push(t)}return n}(c),m=[y.length?Math.min(...y):0,y.length?Math.max(...y):0];if(1===r.length&&r[0].leaf===t&&1===r[0].K.length){const n=r[0],o=n.K[0],i=e?l:o.H;if(i<.001)return t;const s=e?o.$/i:0;return function(t,n,e,r,o,i){const s=Lo(e,n,r),l=Eo(n,r),u=a({},t);return delete u.effects,Io(u,"strokeDasharray",Fo(i,l)),Io(u,"strokeDashoffset",Fo(o,s)),Io(u,"strokeOpacity",Bo(i)),u}(n.leaf,i,s,m,c,v)}const p=new Map;for(const t of r){const n=[];for(const r of t.K){const o=e?l:r.H;if(o<.001)continue;const i=e?r.$/o:0;n.push(...Do(t.leaf,r.Y,o,i,m,c,v))}p.set(t.leaf,_o(t.leaf,n))}const h=t=>p.get(t)||(Array.isArray(t.children)&&t.children.length>0?f(a({},t),{children:t.children.map(h)}):t);return h(t)}(h,c),h=function(t,n,e){var r,o;if(!n)return t;const i=null!=(r=n.copies)?r:1;if(i<1)return e.errors.push("repeater.copies invalid: "+n.copies),t;const s=t.transform,l=null==(o=t.animate)?void 0:o.transform,u=yr(t);delete u.transform,u.animate&&(delete u.animate.transform,0===Object.keys(u.animate).length&&delete u.animate),delete u.id;const c=[u];for(let t=1;t<i;t++){const e=yr(u),r=Dr(n,t),o=r?or(e,r):e;c.push(o)}const a={type:"g",children:c};return t.id&&(a.id=t.id),void 0!==s&&(a.transform=s),void 0!==l&&(a.animate={transform:l}),a}(h,s,n),h=function(t,n,e,r){if(!n)return t;const o=dr(n.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=fr(r,"mask");let s={type:"use",href:"#"+o};if(e)s=Mr(s,e,r);else if(Nr(t))s=function(t,n){var e;const r=n.animate&&"object"==typeof n.animate&&!Array.isArray(n.animate)?n.animate:void 0,o=null==r?void 0:r.transform,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const s=[],l=[],u=[];for(const t of i){const n=(null!=(e=t.value)?e:t.v)||{},r=rr(t,void 0);if(Array.isArray(n.translate)&&s.push(f(a(a({},r),Sr(t)),{value:{translate:[-n.translate[0],-n.translate[1]]}})),"number"==typeof n.rotate){const t={rotate:-n.rotate};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),l.push(f(a({},r),{value:t}))}if(Array.isArray(n.scale)){const t={scale:[1/n.scale[0],1/n.scale[1]]};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),u.push(f(a({},r),{value:t}))}}const c=null==o?void 0:o.loop,d=t=>{const n={keyframes:t};return void 0!==c&&(n.loop=c),n};let v=t;return s.length&&(v={type:"g",animate:{transform:d(s)},children:[v]}),l.length&&(v={type:"g",animate:{transform:d(l)},children:[v]}),u.length&&(v={type:"g",animate:{transform:d(u)},children:[v]}),v}(s,t);else{const n=function(t){if("string"==typeof t.transform){const n=function(t){var n,e,r,o,i,s,l,u,c,a,f,d,v;const y=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let m;const p=[];for(;null!==(m=y.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);p.push({name:m[1],tt:t})}if(!p.length)return;const h=p[p.length-1];if("translate"===h.name)for(let t=p.length-2;t>=0;t--){const a=p[t];if("translate"!==a.name)continue;const f=null!=(n=a.tt[0])?n:0,d=null!=(e=a.tt[1])?e:0,v=null!=(r=h.tt[0])?r:0,y=null!=(o=h.tt[1])?o:0;if(v!==-f||y!==-d)continue;const m={};m.origin=[f,d];for(let n=0;n<t;n++)if("translate"===p[n].name){const t=null!=(i=p[n].tt[0])?i:0,e=null!=(s=p[n].tt[1])?s:0;m.translate=m.translate?[m.translate[0]+t,m.translate[1]+e]:[t,e]}for(let n=t+1;n<p.length-1;n++){const t=p[n];if("rotate"===t.name)m.rotate=(null!=(l=m.rotate)?l:0)+(null!=(u=t.tt[0])?u:0);else if("scale"===t.name){const n=null!=(c=t.tt[0])?c:1,e=t.tt.length>1?t.tt[1]:n;m.scale=m.scale?[m.scale[0]*n,m.scale[1]*e]:[n,e]}}return m}let g,b,w;for(const t of p)if("translate"===t.name){const n=null!=(a=t.tt[0])?a:0,e=null!=(f=t.tt[1])?f:0;g=g?[g[0]+n,g[1]+e]:[n,e]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.tt[0])?d:0);else if("scale"===t.name){const n=null!=(v=t.tt[0])?v:1,e=t.tt.length>1?t.tt[1]:n;w=w?[w[0]*n,w[1]*e]:[n,e]}const A={};return g&&(A.translate=g),void 0!==b&&(A.rotate=b),w&&(A.scale=w),Object.keys(A).length?A:void 0}(t.transform);if(!n)return;const e={};return n.translate&&(e.translate=n.translate),void 0!==n.rotate&&(e.rotate=n.rotate),n.scale&&(e.scale={value:n.scale}),n.origin&&(e.origin=n.origin),Object.keys(e).length?e:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const n=t.transform.value,e=n&&"object"==typeof n?n:t.transform;if(e&&"object"==typeof e){const t={};return Array.isArray(e.translate)&&(t.translate=e.translate),"number"==typeof e.rotate&&(t.rotate=e.rotate),"number"==typeof e.skew&&(t.skew=e.skew),Array.isArray(e.scale)&&(t.scale={value:e.scale}),Array.isArray(e.origin)&&(t.origin=e.origin),Object.keys(t).length?t:void 0}}}(t);n&&(s=Mr(s,n,r))}const l=void 0===e&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Nr(t)}(t);s=function(t,n,e,r,o){const i=r.idMap.get(e),s=r.maskAncestorChains.get(n)||[],l=o?Tr(n,r):void 0,u=l?[...s,l]:s,c=i&&r.maskAncestorChains.get(i)||[];if(!u.length&&!c.length)return t;const a=new Set;for(const t of u)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);for(const t of c)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);if(!(a.size>0)){const n=Pr(u),e=Pr(c),r=e[0]-n[0],o=e[1]-n[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(a).sort((t,n)=>t-n).map(t=>{const n=zr(u,t),e=zr(c,t);return{time:t,value:{translate:[e[0]-n[0],e[1]-n[1]]}}})}},children:[t]}}(s,t,o,r,l);const u={type:"mask",id:i,children:[s]};return n.maskType&&(u.maskType=n.maskType),n.maskUnits&&(u.maskUnits=n.maskUnits),n.maskContentUnits&&(u.maskContentUnits=n.maskContentUnits),void 0!==n.x&&(u.x=String(n.x)),void 0!==n.y&&(u.y=String(n.y)),void 0!==n.width&&(u.width=String(n.width)),void 0!==n.height&&(u.height=String(n.height)),r.defs.push(u),t.mask="url(#"+i+")",t}(h,l,i,n),h=function(t,n,e){if(!(null==n?void 0:n.pathData))return t;const r=fr(e,"clip"),o={type:"path"},i=tr(n.pathData);return"absent"!==i.kind&&("static"===i.kind?o.d=jr(i.value):(nr(o,"d",i),void 0!==o.d&&(o.d=jr(o.d)))),e.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(h,u,n),o?(_r(h,d,n),h=function(t,n,e,r){const o=function(t,n){var e,r,o;const i={};let s=!1;const l=null==(e=t.animate)?void 0:e.transform;if(l&&"object"==typeof l&&Array.isArray(l.keyframes)){const n=l.keyframes;if(n.some(t=>t.value&&t.value.translate)){const e=hr(l),r={keyframes:n.map(t=>{const n=t.value||{},r={};void 0!==n.translate&&(r.translate=n.translate),e&&void 0!==n.origin&&(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};l.autoOrient&&(r.autoOrient=!0);const o=l.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const u=n.some(t=>{const n=t.value||{};return void 0!==n.rotate||void 0!==n.scale}),c=n.map(t=>{const n=t.value||{},r={};void 0!==n.rotate&&(r.rotate=n.rotate),void 0!==n.scale&&(r.scale=n.scale),void 0===n.origin||e&&!u||(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(c.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const n={keyframes:c};void 0!==o&&(n.loop=o),t.animate.transform=n}s=!0}}const u=void 0!==(null==n?void 0:n.translate),c=s||u,f=s&&hr((null==(r=t.animate)?void 0:r.transform)||void 0)||s&&hr((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const n=function(t){const n=[],e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=e.exec(t);)n.push({name:r[1],nt:r[0]});if(!n.length)return{et:t||void 0};if(n.every(t=>"translate"===t.name))return{translate:n.map(t=>t.nt).join("")};const o=n[0],i=n[n.length-1];if("translate"===i.name&&"translate"===o.name){const e=pr(i.nt),r=pr(o.nt),s=-e[0],l=-e[1],u=r[0]-s,c=r[1]-l;return 0===u&&0===c?{et:t}:{translate:"translate("+u+","+c+")",et:"translate("+s+","+l+")"+n.slice(1).map(t=>t.nt).join("")}}if("translate"===i.name)return{et:t};const s=[];let l=0;for(;l<n.length&&"translate"===n[l].name;)s.push(n[l].nt),l++;if(!s.length)return{et:t};const u=n.slice(l).map(t=>t.nt).join("");return{translate:s.join(""),et:u||void 0}}(t.transform);c?void 0!==n.translate?n.et?t.transform=n.et:delete t.transform:(function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,e=[];let r;for(;r=n.exec(t);)e.push({name:r[1],nt:r[0]});if(1!==e.length)return!1;if("translate"===e[0].name)return!0;if("matrix"!==e[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(e[0].nt);if(!o)return!1;const i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)||f&&function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let e,r=0,o=!1;for(;e=n.exec(t);)r++,"matrix"===e[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:n.translate&&(i.transform=n.translate,n.et?t.transform=n.et:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const n=t.transform.value,e=!(!n||"object"!=typeof n),r=e?n:t.transform,o=t=>e?{value:t}:t;if(Array.isArray(r.translate)){const n=a({},r);delete n.translate;const e=Object.keys(n).length>0;c||(i.transform=o({translate:r.translate})),e?t.transform=o(n):delete t.transform}}return i}(t,n);"string"==typeof t.id&&delete t.id;const{rt:i,inner:s}=function(t){if(!t)return{};const n=hr(t.translate),e=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),n&&void 0!==t.origin&&(r.origin=t.origin),void 0!==t.rotate&&(o.rotate=t.rotate),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.skew&&(o.skew=t.skew),void 0===t.origin||n&&!e||(o.origin=t.origin),{rt:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(n);let l=t;l=or(l,s);let u={type:"g",id:e,children:[{type:"g",id:r,children:[l]}]};return void 0!==o.transform&&(u.transform=o.transform),void 0!==o.animate&&(u.animate=o.animate),i&&(delete u.id,u=or(u,i),u.id=e),u}(h,i,r,o)):h=function(t,n,e,r){return _r(t,n,r),or(t,e)}(h,d,i,n),(null==d?void 0:d.retime)&&(t.effects={clone:{retime:d.retime}}),r&&n.idMap.set(r,h),h}function Ko(t,n,e,r,o){const i=1-o,s=i*i*i,l=3*i*i*o,u=3*i*o*o,c=o*o*o;return[s*t[0]+l*n[0]+u*e[0]+c*r[0],s*t[1]+l*n[1]+u*e[1]+c*r[1]]}function Yo(t,n,e,r,o=64){let i=0,s=t;for(let l=1;l<=o;l++){const u=Ko(t,n,e,r,l/o);i+=Math.hypot(u[0]-s[0],u[1]-s[1]),s=u}return i}var Ho=t=>{const n=Math.round(1e4*t)/1e4;return Object.is(n,-0)?"0":String(n)};function $o(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return Number.isFinite(n)?n:void 0}}function ti(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function ni(t){if("string"!=typeof t)return;const n=t.trim().split(/[\s,]+/).map(Number);return n.length<4||n.some(t=>!Number.isFinite(t))?void 0:[n[0],n[1],n[2],n[3]]}function ei(t,n,e,r,o,i){if("use"===t.type&&"string"==typeof t.href){const s=ti(t.href);if(s&&e.has(s)){const l=n.get(s);if(l)return function(t,n,e,r,o,i,s){var l,u,c,d;const v=lr(n);ur(v,o);const y="symbol"===v.type?ni(v.viewBox):void 0,m=null!=(u=null!=(l=$o(t.width))?l:null==y?void 0:y[2])?u:s[0],p=null!=(d=null!=(c=$o(t.height))?c:null==y?void 0:y[3])?d:s[1],h="symbol"===v.type?function(t,n,e,r,o){const i=ni(t.viewBox),s=f(a({},t),{type:"g"});if(delete s.viewBox,delete s.preserveAspectRatio,delete s.width,delete s.height,!i)return s;const[l,u,c,d]=i,v=c>0&&d>0?Math.min(r/c,o/d):1,y=(r-c*v)/2,m=(o-d*v)/2,p=[];0===y&&0===m||p.push("translate("+y+","+m+")"),1!==v&&p.push("scale("+v+")"),0===l&&0===u||p.push("translate("+-l+","+-u+")"),p.length&&(s.transform=p.join(""));const h=n();return e.push({type:"clipPath",id:h,children:[{type:"rect",x:l,y:u,width:c,height:d}]}),s.clipPath="url(#"+h+")",s}(v,o,i,m,p):v,g=ei(h,e,r,o,i,s),b=f(a({},t),{type:"g",children:[g]});return delete b.href,delete b.width,delete b.height,ar(b)}(t,l,n,e,r,o,i)}}if(!t.children)return t;let s=!1;const l=t.children.map(t=>{const l=ei(t,n,e,r,o,i);return l!==t&&(s=!0),l});return s?f(a({},t),{children:l}):t}function ri(t,n,e){var r,o;let i=qo(t).root;return i=function(t){const n=t=>{var e;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const n=function(t){var n,e,r;if("offsetPath"!==t.alongPathMode)return;const o=t.keyframes;if(!o||o.length<2)return;const i=Nt(o[0]),s=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],l=[];for(const t of o){const e=Nt(t),r=null==e?void 0:e.translate;if(!r||r.length<2)return;if(Object.keys(e).some(t=>"translate"!==t&&"origin"!==t))return;const o=null!=(n=null==e?void 0:e.origin)?n:[0,0];if(o[0]!==s[0]||o[1]!==s[1])return;l.push([r[0]+s[0],r[1]+s[1]])}if(!o.some(t=>zt(t)||Ct(t)))return;let u="M"+Ho(l[0][0])+","+Ho(l[0][1]);const c=[];for(let t=0;t<l.length-1;t++){const n=l[t],i=l[t+1],s=null!=(e=Ct(o[t]))?e:[0,0],a=null!=(r=zt(o[t+1]))?r:[0,0],f=[n[0]+s[0],n[1]+s[1]],d=[i[0]+a[0],i[1]+a[1]];u+="C"+Ho(f[0])+","+Ho(f[1])+","+Ho(d[0])+","+Ho(d[1])+","+Ho(i[0])+","+Ho(i[1]),c.push(Yo(n,f,d,i))}const a=c.reduce((t,n)=>t+n,0);if(!(a>0))return;const f=[];let d=0;for(let t=0;t<o.length;t++){t>0&&(d+=c[t-1]);const n={t:St(o[t]),v:d/a},e=Pt(o[t]);void 0!==e&&(n.e=e),f.push(n)}return{ot:u,it:f,autoOrient:!!t.autoOrient,anchor:s}}(i);if(n){const e=a({},o);delete e[vt];const s={keyframes:n.it};void 0!==i.loop&&(s.loop=i.loop),e[yt]=s;const l=t.transform;let u=l;if(l&&"object"==typeof l){const t=a({},l);delete t[pt.translate],delete t[pt.origin],u=Object.keys(t).length?t:void 0}r=f(a({},t),{animate:e,style:f(a({},t.style),{offsetPath:"path('"+n.ot+"')",offsetAnchor:Ho(n.anchor[0])+"px "+Ho(n.anchor[1])+"px",offsetRotate:n.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==u?r.transform=u:delete r.transform}}if(null==(e=r.children)?void 0:e.length){const t=r.children.map(n);t.some((t,n)=>t!==r.children[n])&&(r=f(a({},r),{children:t}))}return r};return n(t)}(i),i=Xe(i,null!=(o=null==(r=bt(i))?void 0:r.duration)?o:Gn),n===tt.native&&(i=_e(i,null==e?void 0:e.motionPath),i=function(t){var n;const e=function(t){const n=new Map,e=t=>{var r;"string"==typeof t.id&&n.set(t.id,t),null==(r=t.children)||r.forEach(e)};return e(t),n}(t),r=function(t,n){const e=new WeakMap,r=new Set,o=(t,r)=>{const i=e.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let s=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const n in t.animate){s=!0;break}if(!s&&t.children)for(const n of t.children)if(o(n,r)){s=!0;break}if(!s&&"use"===t.type&&"string"==typeof t.href){const e=ti(t.href),i=e?n.get(e):void 0;i&&(s=o(i,r))}return r.delete(t),e.set(t,s),s};for(const[t,e]of n)o(e,new Set)&&r.add(t);return r}(0,e);if(0===r.size)return t;let o=0;const i=function(t){const n=ni(t.viewBox);if(n)return[n[2],n[3]];const e=$o(t.width),r=$o(t.height);return void 0!==e&&void 0!==r?[e,r]:[1,1]}(t),s=[],l=ei(t,e,r,()=>"_lw_use_mat_"+ ++o,s,i);if(0===s.length)return l;const u={type:"defs",children:s},c=[...null!=(n=l.children)?n:[],u];return f(a({},l),{children:c})}(i),i=function(t){const n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let e=!0;for(;e;){e=!1;const r=new Set;n(t,t=>{var n;"use"===t.type&&"string"==typeof t.href&&r.add((n=t.href).startsWith("#")?n.slice(1):n)}),n(t,t=>{if(!t.children)return;let n=t.children;"defs"===t.type&&(n=n.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),n=n.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),n.length!==t.children.length&&(t.children=n,e=!0)})}return t}(i)),i}var oi="setPlaybackRate: rate must be finite and non-zero";function ii(t){return Number.isFinite(t)&&0!==t}function si(t,n){return t>0?n===1/0?t:t*(n>0?n:1):0}function li(t,n){return Number.isNaN(t)||t<0?0:Number.isFinite(n)?t>n?n:t:Number.isFinite(t)?t:0}function ui(t,n,e){const r=si(n,e);return r>0&&Number.isFinite(t)?t<=0?0:e===1/0?t%r/r:t>=r?1:t/r:0}function ci(t,n,e){const r=si(n,e);return r>0&&Number.isFinite(t)?t<=0?0:t>=1?r:t*r:0}function ai(t){const n=globalThis;"function"!=typeof n.cancelAnimationFrame?n.clearTimeout(t):n.cancelAnimationFrame(t)}var fi={document:"document",host:"host",platform:"platform",usage:"usage",internal:"internal"},di="https://github.com/pixodesk/pixodesk-svg-animator/blob/main/docs/diagnostics.md";function vi(t){return"PX"+t+" "+di+"#px"+t}function yi(t,n){const e=n?n+" ":"";return{warn:(n,r,...o)=>{const i=vi(r);(null==t?void 0:t.onWarn)?t.onWarn({code:r,kind:n,data:o,message:i}):(null==t?void 0:t.muteWarn)||console.warn(e+n+" "+i,...o)},error:(n,r,...o)=>{const i=vi(r),s=function(t){return t.find(t=>t instanceof Error)}(o);(null==t?void 0:t.onError)?t.onError({code:r,kind:n,data:o,message:i,error:s}):(null==t?void 0:t.muteError)||console.error(e+n+" "+i,...o)}}}var mi=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],pi=["definitions","bindings"],hi=t=>!!t&&"object"==typeof t&&!Array.isArray(t),gi=t=>hi(t)&&"string"==typeof t.type?t.type:"time",bi=t=>"scroll"===t||"view"===t;function wi(t,n){const e=hi(t)?a({},t):{};for(const t of Object.keys(n)){const r=n[t];null!==r?hi(r)?e[t]=wi(e[t],r):e[t]=r:delete e[t]}return e}function Ai(t,n,e){const r=gi(t),o=hi(n)&&"string"==typeof n.type?String(n.type):r;let i;if(o!==r){const e={};if(hi(t))for(const n of Y)void 0!==t[n]&&(e[n]=t[n]);i=wi(e,n)}else i=wi(t,n);if(bi(o)){for(const t of H)void 0!==i[t]&&(e("animator.timeline."+t+": no slot on a '"+o+"' timeline — dropped"),delete i[t]);"infinite"===i.iterations&&(e("animator.timeline.iterations: 'infinite' cannot map onto a scroll range — dropped"),delete i.iterations)}return i}var ki=6;function ji(t){return"scroll"===(null==t?void 0:t.timelineSource)}var Mi="cover";function xi(t,n,e,r){var o;const[i,s]=function(t,n,e){const r=n,o=e;switch(t){case"cover":return[0,r+o];case"entry":return[0,Math.min(r,o)];case"contain":return[Math.min(r,o),Math.max(r,o)];case"exit":return[Math.max(r,o),r+o];case"entry-crossing":return[0,r];case"exit-crossing":return[o,r+o]}}(null!=(o=null==t?void 0:t.phase)?o:Mi,e,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:n)*(s-i)}function Oi(t,n,e){const r=null!=e?e:yi(void 0,"[PxAnimator]"),o=[],i=()=>{for(const t of o.splice(0))t()},{startOn:s,outAction:l,scrollIntoViewThreshold:u}=function(t){var n,e,r;return{startOn:null!=(n=null==t?void 0:t.startOn)?n:ot.startOn,outAction:null!=(e=null==t?void 0:t.outAction)?e:ot.outAction,scrollIntoViewThreshold:null!=(r=null==t?void 0:t.scrollIntoViewThreshold)?r:ot.scrollIntoViewThreshold}}(n),c=t.getRootElement();if(!c)return r.warn(fi.host,1201),i;let a=!1;const f=()=>{a&&(a=!1,t.setPlaybackRate(1)),t.play()},d=()=>{switch(l){case"pause":t.pause();break;case"reset":t.cancel();break;case"reverse":a=!0,t.setPlaybackRate(-1),t.play()}};switch(s){case"load":{const t=()=>f();"complete"===document.readyState?t():(window.addEventListener("load",t,{once:!0}),o.push(()=>window.removeEventListener("load",t)));break}case"mouseOver":{let t=!1;const n=()=>{t=!0,f()},e=()=>{t&&d()};c.addEventListener("mouseenter",n),c.addEventListener("mouseleave",e),o.push(()=>{c.removeEventListener("mouseenter",n),c.removeEventListener("mouseleave",e)});break}case"click":{const n=()=>{t.isPlaying()?d():f()};c.addEventListener("click",n),o.push(()=>c.removeEventListener("click",n));break}case"scrollIntoView":{const t=t=>{var n,e;const r=t.boundingClientRect,o=t.intersectionRect;if(!(null==r?void 0:r.height)||!o)return t.intersectionRatio;const i="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,s=null!=(e=null==(n=t.rootBounds)?void 0:n.height)?e:1/0,l=Math.min(i,s),u=Math.min(r.height,Number.isFinite(l)?l:r.height);return u>0?o.height/u:t.intersectionRatio},n=Array.from({length:21},(t,n)=>n/20);let e=!1;const r=new IntersectionObserver(n=>{n.forEach(n=>{n.isIntersecting&&t(n)>=u?(e=!0,f()):e&&(e=!1,d())})},{threshold:n});r.observe(c),o.push(()=>r.disconnect());break}}return i}function Si(t){return"#"+t}function Ni(t,n,e,r){var o;const i=bt(t)||{},s=yi(e,"[PxAnimator]");if(!r)if(t.id){const n=Si(t.id);(r=document.querySelector(n))||s.warn(fi.host,1202,n)}else s.warn(fi.host,1203);const l=function(t,n,e){var r;const o=bt(t)||{},i=Ke(t,tt.js),s=o.iterations;let l=1;"number"==typeof s&&(l=s||1),"infinite"===s&&(l=1/0),l<1&&(l=1);const u=+(o.duration||Gn),c=u&&l?u*(l===1/0?1/0:l):u?(null!=l?l:1)*u:0,a=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,v="backwards"===f||"both"===f;let y=null,m=!1,p=-(o.delay||0),h=0,g=1,b=!1;const w=o.frameRate,A=w&&w>0?1e3/w:0;let k=0;const j=()=>{const t=h?(Date.now()-h)*g:0;return p+t},M=()=>{let t=j();return Number.isFinite(c)&&t>c&&(t=c),t<0&&(t=0),t};function x(t){let e=function(){const n=u>0?u:1;let e=0,r=0;u>0?(t=Qn(t,0,l*n),r=Math.max(0,Math.ceil(t/n)-1),r=Math.min(r,l-1),e=Qn((t-r*n)/n,0,1)):e=t;const o=a||"normal";let i=e;return"reverse"===o?i=1-e:"alternate"===o?r%2==1&&(i=1-e):"alternate-reverse"===o&&r%2==0&&(i=1-e),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=He(r,e*u);for(const[e,r]of Object.entries(o))n.setAttribute(t.id,e,r)}}o.delay&&(o.delay<0?x(M()):v&&x(0));const O=()=>!!m&&!!n.isConnected()&&(g<0?j()>0:!(Number.isFinite(c)&&M()>=c)),S=t=>{null!==y&&(ai(y),y=null),(t||O())&&(y=function(t){const n=globalThis;return"function"==typeof n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,16)}(()=>{y=null,(()=>{var t,r;if(!n.isConnected())return void N();const o=M(),i=j();if(i<0&&g>0)v&&x(0);else{if(g<0&&i<=0)return N(),x(0),void(b||(b=!0,null==(t=null==e?void 0:e.onFinish)||t.call(e)));if(g>0&&c&&Number.isFinite(c)&&o>=c)return N(),x(d?c:0),void(b||(b=!0,null==(r=null==e?void 0:e.onFinish)||r.call(e)));if(A>0){const t=Date.now();if(k&&t-k<A)return;k=t}x(o)}})(),S()}))},N=()=>{if(!m)return;let t=j();Number.isFinite(c)&&t>c&&(t=c),p=t,h=0,m=!1,null!==y&&(ai(y),y=null),t>=0?x(t):v&&x(0)},P={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!m){if(g>=0)Number.isFinite(c)&&p>=c&&(p=0);else if(p<=0){if(!Number.isFinite(c))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");p=c}b=!1,m=!0,h=Date.now(),S(!0)}})(),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;N(),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;N(),p=0,h=0,m=!1,b=!1,x(p),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{((t=!0)=>{var n;p=Number.isFinite(c)?c:M(),h=0,m=!1,null!==y&&(ai(y),y=null),x(d?p:0),t&&!b&&(b=!0,null==(n=null==e?void 0:e.onFinish)||n.call(e))})(!0)},setPlaybackRate:t=>{if(!ii(t))return void console.warn(oi);let n=j();Number.isFinite(c)&&n>c&&(n=c),t<0!=g<0&&(b=!1),g=t,p=n,m&&(h=Date.now())},getCurrentTime:()=>M(),setCurrentTime:t=>{t=li(t,c),p=t,m&&(h=Date.now()),(!Number.isFinite(c)||t<c)&&(b=!1),x(M())},getCurrentProgress:()=>ui(M(),u,l),setCurrentProgress:t=>{P.setCurrentTime(ci(t,u,l))},destroy:()=>{var t;P.cancel(),null==(t=null==e?void 0:e.onRemove)||t.call(e)}};return P}(t,n||function(t,n){const e=new Set,r=null!=n?n:yi(void 0,"[PxAnimator]");return{isConnected:()=>!t||t.isConnected,setAttribute:(n,o,i)=>{o=qn(o);const s=Si(n),l=(null==t?void 0:t.querySelectorAll(s))||document.querySelectorAll(s);0!==l.length||e.has(s)||(e.add(s),r.warn(fi.host,1207,s));for(let t=0;t<l.length;t++){const n=l[t],e="transform"===o&&"pattern"===n.tagName?"patternTransform":o;n.setAttribute(e,i),Zn.has(o)&&(n.style[o]=i)}}}}(r,s),e),u=f(a({},l),{getRootElement:()=>r||null});if(ji(i))i.trigger&&s.warn(fi.usage,1306);else{const t=Oi(u,null!=(o=i.trigger)?o:{},s),n=u.destroy.bind(u);u.destroy=()=>{t(),n()}}return u}function Pi(t,n,e,r){let o=Nt(t);const i=Pt(t),s={offset:n,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let l,u=e;return Fn.has(e)&&Array.isArray(o)?l=En(o):"transform"!==e||null===o||"object"!=typeof o||Array.isArray(o)?In.has(e)?(Array.isArray(o)&&("translate"===e&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===e&&(o+="deg"),l=e+"("+o+")",u="transform"):l="d"===e?'path("'+(o&&"object"==typeof o&&Array.isArray(o.paths)?o.paths:[]).map(t=>On(t,!0)).join("")+'")':Un.has(e)&&"number"==typeof o?100*o+"%":""+o:(l=Bn(o,{P:!0}),u="transform"),CSS.supports(qn(u),l)||r.add(u),u=Wn(u),s[u]=l,s}function zi(t,n,e){var r,o,i,s,l;const u=[];for(let c=0;c<n.length;c++){const d=n[c],v=null!=(r=d.t)?r:0;if(v<0){const e=n[c+1];if(e&&(null!=(o=e.t)?o:0)>=0){const n=(0-v)/((null!=(i=e.t)?i:0)-v),r=d.e?_n(d.e)(n):n,{right:o}=Rn(d.e,n);u.push({t:0,v:Ze(t,d.v,e.v,r),e:o})}continue}if(v>e){const r=n[c-1];if(r&&(null!=(s=r.t)?s:0)<=e){const n=null!=(l=r.t)?l:0,o=(e-n)/(v-n),i=r.e?_n(r.e)(o):o,{left:s}=Rn(r.e,o);u.length>0&&(u[u.length-1]=f(a({},u[u.length-1]),{e:s})),u.push({t:e,v:Ze(t,r.v,d.v,i),e:void 0})}break}u.push(d)}return u}function Ci(t,n,e){var r;const o=new Map;for(const[i,s]of Object.entries(t)){const t=e.duration||1,l=zi(i,s.keyframes||[],t),u=[];for(let e=0;e<l.length;e++){const o=l[e],s=Pi(o,Qn((null!=(r=o.t)?r:0)/t,0,1),i,n);0===e&&(s.offset||0)>0&&u.push(f(a({},s),{offset:0})),u.push(s)}u.length>0&&(u[u.length-1].offset||0)<1&&u.push(f(a({},u[u.length-1]),{offset:1})),u.length>0&&o.set(i,u)}return o}function Ti(t,n,e,r,o){var i,s;const l=bt(t)||{},u=yi(n,"[PxAnimator]");if(!e)if(t.id){const n=Si(t.id);(e=document.querySelector(n))||u.warn(fi.host,1202,n)}else u.warn(fi.host,1203);const c=Ke(t,tt.native),a=[],f=l.iterations;let d;"number"==typeof f&&(d=f),"infinite"===f&&(d=1/0);const v=new Set;let y=!1,m=!1;(null==c?void 0:c.length)||u.warn(fi.document,1105);for(const t of c||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){u.warn(fi.document,1106,t);continue}const s=Si(t.id),c=(null==e?void 0:e.querySelectorAll(s))||document.querySelectorAll(s);0===c.length&&u.warn(fi.host,1206,s);const f=Ci(r,v,l),p=l.delay&&l.delay>0?l.delay:void 0;let h;if(l.delay&&l.delay<0&&l.duration){const t=-l.delay;h=d===1/0?t%l.duration:Math.min(t,l.duration*(null!=d?d:1))}const g={duration:l.duration,delay:p,fill:null!=(i=l.fill)?i:"forwards",direction:l.direction,iterations:d};for(let t=0;t<c.length;t++){const e=c[t];for(const[,t]of f)if(t.length>0)try{const r=new KeyframeEffect(e,t,g),i=new Animation(r,o?o.timeline:document.timeline);if(o){const t=i;o.rangeStart&&(t.rangeStart=o.rangeStart),o.rangeEnd&&(t.rangeEnd=o.rangeEnd)}(null==n?void 0:n.onFinish)&&(i.onfinish=()=>{var t;y||(y=!0,null==(t=n.onFinish)||t.call(n))}),(null==n?void 0:n.onRemove)&&(i.onremove=()=>{var t;m||(m=!0,null==(t=n.onRemove)||t.call(n))}),void 0!==h&&(i.currentTime=h),a.push(i)}catch(t){u.warn(fi.internal,1004,t)}}}if(!r&&v.size)return u.warn(fi.platform,1104,[...v].join(", ")),null;const p={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var t;return"running"===(null==(t=a[0])?void 0:t.playState)},play:()=>{var t;y=!1,a.forEach(t=>t.play()),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;a.forEach(t=>t.pause()),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;y=!1,a.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{var t;for(const n of a)try{(null==(t=n.effect)?void 0:t.getTiming().iterations)===1/0?(n.effect.updateTiming({iterations:1}),n.finish(),n.effect.updateTiming({iterations:1/0})):n.finish()}catch(t){n.cancel()}},setPlaybackRate:t=>ii(t)?(a.forEach(n=>n.playbackRate=t),p):(u.warn(fi.usage,1401),p),getCurrentTime:()=>{var t,n;const e=null!=(n=null==(t=a[0])?void 0:t.currentTime)?n:null;return null!==e?+e:null},setCurrentTime:t=>{var n;const e=function(t,n){return t>0?n===1/0?1/0:t*(n>0?n:1):0}(null!=(n=l.duration)?n:0,null!=d?d:1),r=e>0?li(t,e):Math.max(0,t);y=!1,a.forEach(t=>{t.currentTime=r})},getCurrentProgress:()=>{var t;const n=p.getCurrentTime();return null===n?null:ui(n,null!=(t=l.duration)?t:0,null!=d?d:1)},setCurrentProgress:t=>{var n;p.setCurrentTime(ci(t,null!=(n=l.duration)?n:0,null!=d?d:1))},destroy:()=>{var t;p.cancel(),a.splice(0,a.length),m||(m=!0,null==(t=null==n?void 0:n.onRemove)||t.call(n))}};if("scroll"===l.timelineSource)l.trigger&&u.warn(fi.usage,1306);else{const t=Oi(p,null!=(s=l.trigger)?s:{},u),n=p.destroy.bind(p);p.destroy=()=>{t(),n()}}return o&&a.forEach(t=>t.play()),p}function _i(t,n,e){var r,o,i;const s="number"==typeof(null==t?void 0:t.fraction)?t.fraction:n,l=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*s);if(void 0!==l)return e?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:l}:{offset:l}}function Di(t,n){const e=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===e||o===r)return null;const t=getComputedStyle(o),i="y"===n?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function Ri(){return document.scrollingElement||document.documentElement}var Li="parent",Ei="scroller";function Vi(t,n,e){var r,o;const i=null!=e?e:yi(void 0,"[PxAnimator]"),s=null==n?void 0:n.trim();if(!s)return t;if(s===Li){let n=null;for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement){const t=getComputedStyle(e).position;"sticky"!==t&&"fixed"!==t||(n=e)}return null!=(o=null!=(r=null==n?void 0:n.parentElement)?r:t.parentElement)?o:t}if(s===Ei)return Di(t,"y")||Di(t,"x")||Ri();let l=null;try{l=document.querySelector(s)}catch(n){return i.warn(fi.document,1303,s),t}return l||(i.warn(fi.host,1304,s),t)}function Fi(t,n){const e=t;if(!(null==n?void 0:n.pin)||!e.style)return()=>{};const r=e.style,o=r.position,i=r.top;r.position="sticky";const s="center"===n.pinAlign?.5:"bottom"===n.pinAlign?1:0,l=()=>{var e;const o=null!=(e=n.pinOffset)?e:0;if(!s)return void(r.top=o+"px");const i=function(t){const n=Di(t,"y");return n?n.clientHeight:document.documentElement.clientHeight}(t),l=t.getBoundingClientRect().height;r.top=Math.round((i-l)*s+o)+"px"};l();let u=null;const c=s?l:null;s&&(c&&window.addEventListener("resize",c),"undefined"!=typeof ResizeObserver&&(u=new ResizeObserver(l),u.observe(t)));let a=null;const f=t.parentElement;return n.pinDistance&&n.pinDistance>0&&f&&(a=document.createElement("div"),a.setAttribute("data-px-pin",""),a.style.height=100*n.pinDistance+"vh",f.insertBefore(a,t),a.appendChild(t)),()=>{c&&window.removeEventListener("resize",c),null==u||u.disconnect(),r.position=o,r.top=i,(null==a?void 0:a.parentElement)&&(a.parentElement.insertBefore(t,a),a.remove())}}function Ii(t,n,e){let r,o=n;t.resetOnFinish&&(o=f(a({},n),{onFinish:()=>{var t;null==(t=null==n?void 0:n.onFinish)||t.call(n),null==r||r.cancel()}}));const i=e(o);return r=i,t.debugGlobalName&&(window[t.debugGlobalName]=i),i}var Ui="http://www.w3.org/2000/svg";function Bi(t,n,e){if(!t)return null;const r=t,{type:o,children:i,style:s}=r,l=d(r,["type","children","style"]),u=l.domType;void 0!==u&&delete l.domType;const c=kt(t)||n,a=s;let f;if(i)for(const t of i){const n=Bi(t,c,e);n&&(f||(f=[]),f.push(n))}const v=function(t,n,e,r,o,i){if(ee.has(t.toLowerCase()))return(null!=i?i:yi(void 0,"[PxAnimator]")).warn(fi.document,1103,t),null;const s=document.createElementNS(Ui,t);for(const t in n){const e=ae(t,n[t]);void 0!==e&&(ie.has(t)?s.style[t]=String(e):s.setAttribute(qn(t),e))}if(e)for(const t in e)s.style[t]=String(e[t]);if(null==r?void 0:r.length)for(const t of r)s.appendChild(t);else o&&(s.textContent=o);return s}(o||"g",function(t){const n={};for(const e of Object.keys(t)){const r=Wn(e);if(mt.has(r))continue;if("style"===r)continue;let o=t[e];if(Fn.has(r)&&Array.isArray(o))n[r]=En(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)In.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),n[vt]=r+"("+o+")"):Array.isArray(o)?n[r]=o.join(","):null!=o&&(n[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;n[vt]=Bn(t,{P:!1})}}return n}(l),a,f,l[ft],e);return v&&void 0!==u&&v.setAttribute("type",u),v}var Zi,Gi="doc";function Wi(t,n,e,r,o,i){const s=yi(e,"[PxAnimator]"),l=mn(t);for(const t of l)s.warn(fi.document,1101,t);if(function(t){const{problems:n}=function(t){try{return{problems:pn(t)}}catch(t){return{problems:[]}}}(t);if(!n.length)return;const e=n.slice(0,ki),r=n.length-e.length;console.warn("[PxAnimator] createAnimator: this document does not match the animation schema in "+n.length+" place"+(1===n.length?"":"s")+".\n"+e.map(t=>" - "+t).join("\n")+(r>0?"\n … and "+r+" more":"")+"\n\nIf you did not author these keys, the usual cause is a build that MANGLES PROPERTY NAMES. An animation document is data loaded at runtime, so renaming the property reads inside the player stops them matching the keys in the JSON, and the animation silently does nothing. Feed the published reserved-name list to your minifier — @pixodesk/svg-animator-web/mangle-reserved.json — see docs/library/minification.md.")}(t),void 0!==o||i){const n=function(t,n,e){var r,o;const i=!!(null==e?void 0:e.resetTimeline);if(!t||void 0===n||!(i||null!==n&&hi(n)&&Object.keys(n).length))return{doc:t,warnings:[]};const s=t,l=hi(s.animator),u=!l&&hi(null==(r=s.meta)?void 0:r.animator),c=l?s.animator:u?s.meta.animator:void 0,d=[];l&&hi(null==(o=s.meta)?void 0:o.animator)&&d.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let v=c;if(i){const t={};for(const n of pi)hi(c)&&void 0!==c[n]&&(t[n]=c[n]);v=t}const y=function(t,n){const e=[],r=t=>e.push(t);if(null===n)return{config:void 0,warnings:e};if(!hi(n)||0===Object.keys(n).length)return{config:t,warnings:e};const o=hi(t)?mi.filter(n=>void 0!==t[n]):[];o.length&&r("animator: the base carries the flat runtime spelling ("+o.join(", ")+"); the patch merges the wire spelling only");const i=hi(t)?a({},t):{};for(const t of Object.keys(n)){const e=n[t];null!==e?"timeline"!==t?hi(e)?i[t]=wi(i[t],e):i[t]=e:i.timeline=hi(e)?Ai(i.timeline,e,r):e:delete i[t]}return{config:i,warnings:e}}(v,null!=n?n:{});return d.push(...y.warnings),y.config===c?{doc:t,warnings:d}:u?{doc:f(a({},s),{meta:f(a({},s.meta),{animator:y.config})}),warnings:d}:{doc:f(a({},s),{animator:y.config}),warnings:d}}(t,null!=o?o:{},{resetTimeline:!!i});for(const t of n.warnings)s.warn(fi.usage,1102,t);t=n.doc}t=ri(t,et((bt(t)||{}).engine));let u=null;if(r){t=Mn(t);const n="string"==typeof r?document.querySelector(r):r;n&&(u=Bi(t,void 0,s),u&&n.replaceChildren(u))}const c=function(t,n,e,r){return function(t,n,e,r){const o=bt(t)||{},i=yi(e,"[PxAnimator]");return ji(o)?Ii(o,e,e=>{var s;let l=()=>{};if(o.engine!==nt.js&&r){l=Fi(r,o.scroll);const n=function(t,n,e){var r,o,i,s;const l=null!=e?e:yi(void 0,"[PxAnimator]");if(!n||!ji(n))return null;const u=n.scroll||{},c=null!=(r=u.kind)?r:"view";if(u.smoothing)return l.warn(fi.platform,1301),null;const a=globalThis,f="view"===c,d=f?a.ViewTimeline:a.ScrollTimeline;if("function"!=typeof d)return null;const v=null!=(o=u.axis)?o:"block";let y;try{y=new d(f?{subject:Vi(t,u.subject,l),axis:v}:{source:"root"===u.source?Ri():Di(t,"y")||Di(t,"x")||Ri(),axis:v})}catch(t){return l.warn(fi.platform,1302,t),null}return{timeline:y,rangeStart:_i(null==(i=u.range)?void 0:i.start,0,f),rangeEnd:_i(null==(s=u.range)?void 0:s.end,1,f)}}(r,o,i);if(n){const i=Ti(t,e,r,rt(o.engine),n);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{l(),t()},i}}l(),l=()=>{}}const u=(o.engine!==nt.js?Ti(t,e,r,rt(o.engine)):null)||Ni(t,n,e,r),c=(null==(s=u.getRootElement)?void 0:s.call(u))||r;if(c){l=Fi(c,o.scroll);const t=("number"==typeof(null==(a=o)?void 0:a.duration)&&a.duration>0?a.duration:Gn)*("number"==typeof(null==a?void 0:a.iterations)&&a.iterations>0?a.iterations:1),n=function(t,n,e,r){var o,i;if(!n||!ji(n))return null;const s=null!=r?r:yi(void 0,"[PxAnimator]"),l=n.scroll||{},u=null!=(o=l.kind)?o:"view",c=Vi(t,l.subject,s),a=Di(t,"y")||Di(t,"x"),f="scroll"===u&&"root"===l.source?Ri():a||Ri(),d=f===Ri(),v=function(t,n){const e=null!=t?t:"block";if("x"===e||"y"===e)return e;const r=!!n&&n.startsWith("vertical");return"inline"===e?r?"y":"x":r?"x":"y"}(l.axis,getComputedStyle(f).writingMode),y=()=>{if("scroll"===u)return function(t,n,e){var r,o;const i=n>0?Qn(t/n,0,1):1,s="number"==typeof(null==(r=null==e?void 0:e.start)?void 0:r.fraction)?e.start.fraction:0,l="number"==typeof(null==(o=null==e?void 0:e.end)?void 0:o.fraction)?e.end.fraction:1;return l<=s?i>=l?1:0:Qn((i-s)/(l-s),0,1)}("y"===v?f.scrollTop:f.scrollLeft,"y"===v?f.scrollHeight-f.clientHeight:f.scrollWidth-f.clientWidth,l.range);const t=c.getBoundingClientRect();let n,e;if(d)n=0,e="y"===v?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=f.getBoundingClientRect();n="y"===v?t.top:t.left,e="y"===v?f.clientHeight:f.clientWidth}return function(t,n,e,r){const o=e-t,i=xi(null==r?void 0:r.start,0,n,e),s=xi(null==r?void 0:r.end,1,n,e);return s<=i?o>=s?1:0:Qn((o-i)/(s-i),0,1)}(("y"===v?t.top:t.left)-n,"y"===v?t.height:t.width,e,l.range)},m=Math.max(0,null!=(i=l.smoothing)?i:0)/1e3;let p=!1,h=null,g=null,b=0,w=null;const A=()=>{w=null,p||(t=>{if(!m)return void e(t);if(null===h)return h=t,void e(t);if(null!==g)return;b=0;const n=t=>{if(g=null,p)return;const r=b?Math.min(.1,(t-b)/1e3):1/60;b=t;const o=y(),i=1-Math.exp(-r/m);h+=(o-h)*i,Math.abs(o-h)<.001&&(h=o),e(h),h!==o&&(g=requestAnimationFrame(n))};g=requestAnimationFrame(n)})(y())},k=()=>{p||null!==w||(w=requestAnimationFrame(A))},j=d?window:f;let M;j.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k,{passive:!0}),"undefined"!=typeof ResizeObserver&&(M=new ResizeObserver(k),M.observe(c),c!==t&&M.observe(t),d||M.observe(f));const x={destroy:()=>{p||(p=!0,j.removeEventListener("scroll",k),window.removeEventListener("resize",k),null==M||M.disconnect(),null!==w&&(cancelAnimationFrame(w),w=null),null!==g&&(cancelAnimationFrame(g),g=null))},refresh:()=>{p||(h=y(),e(h))}};return x.refresh(),x}(c,o,n=>u.setCurrentTime(n*t),i);if(n){const t=u.destroy.bind(u);u.destroy=()=>{n.destroy(),l(),t()}}}else i.warn(fi.host,1305);var a;return u}):Ii(o,e,e=>o.engine===nt.js?Ni(t,n,e,r):Ti(t,e,r,rt(o.engine))||Ni(t,n,e,r))}(t,n,e,r)}(t,n,e,u);if(r&&u){const t=u,n=c.destroy.bind(c);c.destroy=()=>{n(),t.remove()}}return c}function Ji(t){const{src:n,doc:e,container:r,resetTimeline:o}=t,i=function(t){return"adapter"in t}(t)?t.adapter:void 0,s=function(t){const{timeline:n,duration:e,delay:r,iterations:o,startOn:i}=t;return function(t,n){let e;if("string"==typeof t)try{e=JSON.parse(t)}catch(t){console.warn("timeline override: not valid JSON — ignored",t),e=void 0}else e=null!=t?t:void 0;const{duration:r,delay:o,iterations:i,startOn:s}=n;if(void 0===r&&void 0===o&&void 0===i&&void 0===s)return void 0===e?void 0:{timeline:e};const l=hi(e)?a({},e):{};return void 0!==r&&(l.duration=r),void 0!==o&&(l.delay=o),void 0!==i&&(l.iterations=i),void 0!==s&&(l.trigger=f(a({},l.trigger),{startOn:s})),{timeline:l}}(n,{duration:e,delay:r,iterations:o,startOn:i})}(t),l=function(t){const{onPlay:n,onPause:e,onCancel:r,onFinish:o,onRemove:i,onStop:s,onWarn:l,onError:u,muteWarn:c,muteError:a}=null!=t?t:{},f=t=>t||s?()=>{null==t||t(),null==s||s()}:void 0;return{onPlay:n,onPause:f(e),onCancel:f(r),onFinish:f(o),onRemove:f(i),onWarn:l,onError:u,muteWarn:c,muteError:a}}(t);if(void 0!==e&&void 0!==n)throw new Error("createAnimator: provide either `src` or `doc`, not both");if(void 0===e&&void 0===n)throw new Error("createAnimator: either `src` or `doc` is required");let u=null,c=[],d=!1;const v=t=>{u?t(u):c&&c.push(t)},y=yi(l,"[PxAnimator]"),m=(t,n,...e)=>{c=null,y.error(t,n,...e)},p=t=>{try{(t=>{u=t;const n=c;c=null,null==n||n.forEach(n=>n(t))})(Wi(t,i,l,r,s,o))}catch(t){const n=function(t){return t instanceof Error?t:new Error(String(t))}(t);m(fi.internal,1001,n)}};return void 0!==e?p(e):fetch(n).then(t=>t.json()).then(t=>{d||(function(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}(t)?p(t):m(fi.document,1002,n))}).catch(t=>{var e;m(fi.host,1003,n,null!=(e=null==t?void 0:t.message)?e:String(t))}),{isReady:()=>!!u,getRootElement:()=>u?u.getRootElement():null,isPlaying:()=>(null==u?void 0:u.isPlaying())||!1,play:()=>{v(t=>t.play())},pause:()=>{v(t=>t.pause())},cancel:()=>{v(t=>t.cancel())},finish:()=>{v(t=>t.finish())},setPlaybackRate:t=>{v(n=>n.setPlaybackRate(t))},getCurrentTime:()=>u?u.getCurrentTime():null,setCurrentTime:t=>{v(n=>n.setCurrentTime(t))},getCurrentProgress:()=>u?u.getCurrentProgress():null,setCurrentProgress:t=>{v(n=>n.setCurrentProgress(t))},destroy:()=>{d=!0,c=null,null==u||u.destroy()}}}function Xi(t){const n=document.querySelectorAll("["+Z+"]");for(let e=0;e<n.length;e++){const r=n[e];if(!r[G]){const n=r.getAttribute(Z);n&&(r[G]=Ji(f(a({},t),{src:n,container:r})))}}}return Zi=v,((n,r,i,l)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let i of o(r))s.call(n,i)||void 0===i||t(n,i,{get:()=>r[i],enumerable:!(l=e(r,i))||l.enumerable});return n})(t({},"__esModule",{value:!0}),Zi)})();
|
|
1
|
+
"use strict";var PixodeskAnimator=(()=>{var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=Math.pow,c=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,a=(t,n)=>{for(var e in n||(n={}))s.call(n,e)&&c(t,e,n[e]);if(i)for(var e of i(n))l.call(n,e)&&c(t,e,n[e]);return t},f=(t,e)=>n(t,r(e)),d=(t,n)=>{var e={};for(var r in t)s.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&i)for(var r of i(t))n.indexOf(r)<0&&l.call(t,r)&&(e[r]=t[r]);return e},v={};function y(t){if(!t.length)return".";let n="";for(const e of t)e.startsWith("[")?n+=e:n+=(n?".":"")+e;return n}((n,e)=>{for(var r in e)t(n,r,{get:e[r],enumerable:!0})})(v,{PX_ANIMATOR_DOC_KEY:()=>ms,PX_ANIM_ATTR_NAME:()=>G,PX_ANIM_SRC_ATTR_NAME:()=>Z,PxTimelineEngine:()=>rt,PxTimelineEngineSetting:()=>ot,createAnimator:()=>gs,generateNewIds:()=>Sn,getAllAnimators:()=>Xi,loadTagAnimators:()=>bs,onAnimatorsChange:()=>qi,setupAnimationTriggers:()=>$i,validateDocument:()=>bn});var m=class{_canSanitize(t){return this.isValid(t)}optional(){return new p(this)}},p=class extends m{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,n,e){return null==t||this.inner.isValid(t,n,e)}_canSanitize(t){return null==t||this.inner._canSanitize(t)}},h=class extends m{constructor(t=""){super(),this._default=t}sanitize(t){return"string"==typeof t?t:this._default}isValid(t,n,e){return"string"==typeof t||(null==n||n.errors.push(y(null!=e?e:[])+": expected string, got "+typeof t),!1)}},g=class extends m{constructor(t=0){super(),this._default=t}sanitize(t){return"number"==typeof t&&isFinite(t)?t:this._default}isValid(t,n,e){return!("number"!=typeof t||!isFinite(t))||(null==n||n.errors.push(y(null!=e?e:[])+": expected finite number, got "+JSON.stringify(t)),!1)}},b=class extends m{constructor(t=!1){super(),this._default=t}sanitize(t){return"boolean"==typeof t?t:this._default}isValid(t,n,e){return"boolean"==typeof t||(null==n||n.errors.push(y(null!=e?e:[])+": expected boolean, got "+typeof t),!1)}},w=class extends m{constructor(t){super(),this.value=t,this._default=t}sanitize(t){return t===this.value?this.value:this._default}isValid(t,n,e){return t===this.value||(null==n||n.errors.push(y(null!=e?e:[])+": expected "+JSON.stringify(this.value)+", got "+JSON.stringify(t)),!1)}},A=class extends m{constructor(t,n){super(),this.values=t,this._default=null!=n?n:t[0]}sanitize(t){return this.values.includes(t)?t:this._default}isValid(t,n,e){return!!this.values.includes(t)||(null==n||n.errors.push(y(null!=e?e:[])+": expected one of "+this.values.map(t=>JSON.stringify(t)).join(" | ")+", got "+JSON.stringify(t)),!1)}},k=class extends m{constructor(t,n){super(),this.l=t,this.h="union",this._default=null!=n?n:t[0]._default}sanitize(t){for(const n of this.l)if(n.isValid(t))return n.sanitize(t);return this._default}isValid(t,n,e){var r;const o=n&&{errors:[],warnings:[],strict:n.strict};if(this.l.some(n=>n.isValid(t,o,e?[...e]:void 0)))return!0;if(!n)return!1;const i=y(null!=e?e:[]);let s;n.errors.push(i+": no union member matched for value "+(null!=(r=JSON.stringify(t))?r:"").slice(0,240));let l=-1;const u=[];for(const r of this.l){const o={errors:[],warnings:[],strict:n.strict};if(r.isValid(t,o,e?[...e]:void 0),!o.errors.length)continue;const c=Math.max(...o.errors.map(t=>t.slice(0,t.indexOf(":")).length));if((c>l||c===l&&s&&o.errors.length<s.length)&&(l=c,s=o.errors),c<=i.length)for(const t of o.errors){const n=/: expected (.+?), got /.exec(t);n&&!u.includes(n[1])&&u.push(n[1])}}if(s&&l>i.length)for(const t of s.slice(0,4))n.errors.includes(t)||n.errors.push(t);else u.length&&n.errors.push(i+": expected "+u.join(" | "));return!1}_canSanitize(t){return this.l.some(n=>n._canSanitize(t))}},j=class extends m{constructor(t){super(),this._shape=t;const n={};for(const e of Object.keys(t))n[e]=t[e]._default;this._default=n}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e={};for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(y(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(null==n?void 0:n.strict)for(const t of Object.keys(r))t in this._shape||void 0!==r[t]&&(o.push(t),n.errors.push(y(o)+": unexpected extra key"),o.pop(),i=!1);return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},M=class extends m{constructor(t,n){super(),this._shape=t,this.A=n;const e={};for(const n of Object.keys(t))e[n]=t[n]._default;this._default=e}sanitize(t){const n=t&&"object"==typeof t&&!Array.isArray(t)?t:{},e=a({},n);for(const t of Object.keys(this._shape)){const r=this._shape[t].sanitize(n[t]);void 0!==r&&(e[t]=r)}if(this.A)for(const t of Object.keys(n))t in this._shape||(e[t]=this.A.sanitize(n[t]));return e}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(y(null!=e?e:[])+": expected object, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=t,o=null!=e?e:[];let i=!0;for(const t of Object.keys(this._shape))o.push(t),this._shape[t].isValid(r[t],n,o)||(i=!1),o.pop();if(this.A)for(const t of Object.keys(r))t in this._shape||(o.push(t),this.A.isValid(r[t],n,o)||(i=!1),o.pop());return i}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},x=class extends m{constructor(t){super(),this.item=t,this._default=[]}sanitize(t){if(!Array.isArray(t))return[];const n=[];for(const e of t)this.item._canSanitize(e)&&n.push(this.item.sanitize(e));return n}isValid(t,n,e){if(!Array.isArray(t))return null==n||n.errors.push(y(null!=e?e:[])+": expected array, got "+typeof t),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<t.length;e++)r.push("["+e+"]"),this.item.isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)}},O=class extends m{constructor(t){super(),this.value=t,this.h="record",this._default={}}sanitize(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const n={};for(const[e,r]of Object.entries(t))this.value._canSanitize(r)&&(n[e]=this.value.sanitize(r));return n}isValid(t,n,e){if(!t||"object"!=typeof t||Array.isArray(t))return null==n||n.errors.push(y(null!=e?e:[])+": expected object/record, got "+(Array.isArray(t)?"array":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(const[e,i]of Object.entries(t))r.push(e),this.value.isValid(i,n,r)||(o=!1),r.pop();return o}_canSanitize(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}},S=class extends m{constructor(t,n){super(),this.fn=t,this._default=n,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,n,e){return this.schema.isValid(t,n,e)}_canSanitize(t){return this.schema._canSanitize(t)}},N=class extends m{constructor(t){super(),this.l=t,this.h="tuple",this._default=t.map(t=>t._default)}sanitize(t){return Array.isArray(t)&&t.length===this.l.length?this.l.map((n,e)=>n.sanitize(t[e])):this._default}isValid(t,n,e){if(!Array.isArray(t)||t.length!==this.l.length)return null==n||n.errors.push(y(null!=e?e:[])+": expected tuple of length "+this.l.length+", got "+(Array.isArray(t)?"array["+t.length+"]":typeof t)),!1;const r=null!=e?e:[];let o=!0;for(let e=0;e<this.l.length;e++)r.push("["+e+"]"),this.l[e].isValid(t[e],n,r)||(o=!1),r.pop();return o}_canSanitize(t){return Array.isArray(t)&&t.length===this.l.length}},P=(t="")=>new h(t),z=(t=0)=>new g(t),C=(t=!1)=>new b(t),T=t=>new w(t),_=(t,n)=>new A(t,n),D=(t,n)=>new k(t,n),R=t=>new j(t),E=(t,n)=>new M(t,n),L=t=>new x(t),F=t=>new O(t),U=t=>new N(t),B=(t,n)=>new S(t,n),I=/^(\d+)\.(\d+)(?:\.(\d+))?$/;function V(t){if("string"!=typeof t)return;const n=I.exec(t.trim());return n?{a:Number(n[1]),b:Number(n[2]),c:void 0===n[3]?0:Number(n[3])}:void 0}V("1.2");var Z="data-px-animation-src",G="_px_animator",W={load:"load",mouseOver:"mouseOver",click:"click",none:"none"},J={pause:"pause",continue:"continue",reset:"reset"},X={continue:"continue",pause:"pause",reset:"reset",reverse:"reverse"},q="block",Q="inline",K="nearest",Y="root",$="center",H="bottom",tt=["duration","iterations","engine","frameRate"],nt=["trigger","delay","fillMode","direction"],et=[...tt,...nt,"fill","resetOnFinish","timelineSource","scroll"],rt={native:"native",js:"js"},ot=f(a({},rt),{auto:"auto"});function it(t){return t===ot.js?rt.js:rt.native}function st(t){return t===ot.native}var lt={start:"load",offScreen:"pause",mouseOut:"continue",visibilityThreshold:.5,visibilityDebounce:150},ut={start:"start",end:"end"},ct={normal:"normal",alternate:"alternate"},at="userSpaceOnUse",ft="objectBoundingBox",dt={translate:"translate"},vt={separate:"separate",combined:"combined"},yt="textContent",mt="class",pt="transform",ht="offsetDistance",gt=new Set(["type","children","animator","meta","animate","effects",yt]),bt={translate:"translate",rotate:"rotate",scale:"scale",origin:"origin"},wt=(bt.translate,bt.rotate,bt.scale,bt.origin,"pad"),At={linear:"linear",radial:"radial"};function kt(t){var n;const e=(null==t?void 0:t.animator)||(null==(n=null==t?void 0:t.meta)?void 0:n.animator);if(!e)return;const r=jt.get(e);if(r)return r;const o=e,i=et.filter(t=>void 0!==o[t]),s=i.length?a({},o):e;for(const t of i)delete s[t];const l=function(t){const n=t.timeline;if(null==n||"object"!=typeof n)return t;const e=Mt.get(t);if(e)return e;const r=t,{timeline:o}=r,i=d(r,["timeline"]);if(void 0!==n.engine&&(i.engine=n.engine),void 0!==n.frameRate&&(i.frameRate=n.frameRate),"scroll"===n.type||"view"===n.type){i.timelineSource="scroll",void 0!==n.duration&&(i.duration=n.duration),void 0!==n.iterations&&(i.iterations=n.iterations);const t=a({},i.scroll||{});t.kind=n.type,void 0!==n.axis&&(t.axis=n.axis),void 0!==n.source&&(t.source=n.source),void 0!==n.subject&&(t.subject=n.subject),void 0!==n.smoothing&&(t.smoothing=n.smoothing),void 0!==n.range&&(t.range=n.range);const e=n.pin;"boolean"==typeof e?t.pin=e:e&&"object"==typeof e&&(t.pin=!0,void 0!==e.align&&(t.pinAlign=e.align),void 0!==e.offset&&(t.pinOffset=e.offset),void 0!==e.distance&&(t.pinDistance=e.distance)),i.scroll=t}else{if(void 0!==n.duration&&(i.duration=n.duration),void 0!==n.trigger){const t=n.trigger,{finish:e}=t,r=d(t,["finish"]);Object.keys(r).length&&(i.trigger=r),void 0!==e&&(i.resetOnFinish="reset"===e)}void 0!==n.delay&&(i.delay=n.delay),void 0!==n.iterations&&(i.iterations=n.iterations),void 0!==n.direction&&(i.direction=n.direction),void 0!==n.fillMode&&(i.fill=n.fillMode)}return Mt.set(t,i),i}(s);return jt.set(e,l),l}var jt=new WeakMap,Mt=new WeakMap;function xt(t){var n;if(t)return null==(n=kt(t))?void 0:n.definitions}var Ot,St=D([P(),U([z(),z(),z(),z()])]),Nt=D([P(),z(),L(z()),R({pathData:P()}),B(()=>L(fn),[]),B(()=>Lt,{})]),Pt=R({time:z().optional(),value:Nt.optional(),easing:St.optional(),tangentOut:U([z(),z()]).optional(),tangentIn:U([z(),z()]).optional()}),zt=t=>{var n,e;return null!=(e=null!=(n=t.time)?n:t.t)?e:0},Ct=t=>{var n;return null!=(n=t.value)?n:t.v},Tt=t=>{var n;return null!=(n=t.easing)?n:t.e},_t=t=>t.tangentIn,Dt=t=>t.tangentOut,Rt=R({segmentCount:z().optional(),repeatAt:_([ut.start,ut.end]).optional(),direction:_([ct.normal,ct.alternate]).optional()}),Et=R({value:Nt.optional(),keyframes:L(Pt).optional(),loop:D([Rt,C()]).optional(),autoOrient:C().optional(),alongPathMode:_(["sampled","offsetPath"]).optional()}),Lt=R({translate:U([z(),z()]).optional(),rotate:z().optional(),skew:z().optional(),scale:U([z(),z()]).optional(),origin:U([z(),z()]).optional()}),Ft=(D([P(),Lt,R({value:Lt}),Et]),F(Et)),Ut=D([P(),L(D([P(),Ft])),Ft]),Bt=R({start:_([W.load,W.mouseOver,W.click,W.none],lt.start).optional(),offScreen:_([J.pause,J.continue,J.reset],lt.offScreen).optional(),mouseOut:_([X.continue,X.pause,X.reset,X.reverse],lt.mouseOut).optional(),finish:_(["hold","reset"]).optional(),visibilityThreshold:z().optional(),visibilityDebounce:z().optional()}),It=R({width:z(),pathData:P()}),Vt=R({fontFamily:P(),fontStyle:P(),ascent:z(),unitsPerEm:z(),glyphs:F(It)}),Zt=R({easings:F(U([z(),z(),z(),z()])).optional(),animations:F(Ft).optional(),fonts:F(Vt).optional()}),Gt=R({phase:_(["cover","contain","entry","exit","entry-crossing","exit-crossing"]).optional(),fraction:z().optional()}),Wt=R({start:Gt.optional(),end:Gt.optional()}),Jt=(R({kind:_(["view","scroll"]).optional(),axis:_([q,Q,"x","y"]).optional(),source:_([K,Y]).optional(),subject:P().optional(),smoothing:z().optional(),pin:C().optional(),pinAlign:_(["top",$,H]).optional(),pinOffset:z().optional(),pinDistance:z().optional(),range:Wt.optional()}),R({align:_(["top",$,H]).optional(),offset:z().optional(),distance:z().optional()})),Xt=_([ot.auto,ot.native,ot.js]).optional(),qt=R({type:T("time").optional(),engine:Xt,frameRate:z().optional(),duration:z().optional(),trigger:Bt.optional(),delay:z().optional(),iterations:D([z(),T("infinite")]).optional(),fillMode:_(["forwards","backwards","both","none"]).optional(),direction:_(["normal","reverse","alternate","alternate-reverse"]).optional()}),Qt={duration:z().optional(),iterations:z().optional(),engine:Xt,frameRate:z().optional(),axis:_([q,Q,"x","y"]).optional(),source:_([K,Y]).optional(),subject:P().optional(),smoothing:z().optional(),pin:D([C(),Jt]).optional(),range:Wt.optional()},Kt=(Ot=[qt,R(a({type:T("scroll")},Qt)),R(a({type:T("view")},Qt))],new class extends m{constructor(t,n,e){var r;super(),this.j=t,this.M=n,this.h="discriminatedUnion",this._default=null!=e?e:n[0]._default,this.O=new Map;for(const e of n){const n=e._shape[t];if(!n)continue;const o=null!=(r=n.inner)?r:n;this.O.set(o._default,e),n.inner&&(this.S=e)}}N(t){if(null===t||"object"!=typeof t||Array.isArray(t))return;const n=t[this.j];return null==n?this.S:this.O.get(n)}sanitize(t){var n;return(null!=(n=this.N(t))?n:this.M[0]).sanitize(t)}isValid(t,n,e){const r=this.N(t);if(!r){const r=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t[this.j];return null==n||n.errors.push(y(null!=e?e:[])+": no discriminated union member matched "+this.j+"="+JSON.stringify(r)),!1}return r.isValid(t,n,e)}_canSanitize(t){if(null===t||"object"!=typeof t||Array.isArray(t))return!1;const n=this.N(t);return n?n._canSanitize(t):this.M[0]._canSanitize(t)}}("type",Ot)),Yt=R({target:P(),animateWith:L(P())}),$t=R({timeline:Kt.optional(),definitions:Zt.optional(),bindings:L(Yt).optional(),debugGlobalName:P().optional(),version:P().optional()}),Ht=D([P(),z(),L(z()),R({value:new class extends m{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return void 0!==t||(null==n||n.errors.push(y(null!=e?e:[])+": required value is missing"),!1)}_canSanitize(t){return void 0!==t}}}),Lt]),tn=D([z(),Et,R({value:z()})]),nn=D([U([z(),z()]),Et,R({value:U([z(),z()])})]),en=D([P(),Et,R({value:P()})]),rn=R({translate:nn.optional(),rotate:tn.optional(),scale:nn.optional(),skew:tn.optional(),origin:nn.optional()}),on=R({copies:z().optional(),translate:nn.optional(),rotate:tn.optional(),skew:tn.optional(),scale:nn.optional(),origin:nn.optional()}),sn=R({source:P().optional(),maskType:_(["luminance","alpha"]).optional(),maskUnits:_([at,ft]).optional(),maskContentUnits:_([at,ft]).optional(),x:z().optional(),y:z().optional(),width:z().optional(),height:z().optional()}),ln=R({pathData:en.optional()}),un=R({offset:tn.optional(),range:nn.optional(),subPaths:_([vt.separate,vt.combined]).optional()}),cn=R({start:z().optional(),stretch:z().optional(),timeCrop:U([z(),z()]).optional()}),an=R({without:_([dt.translate]).optional(),source:P().optional(),retime:cn.optional()}),fn=R({offset:z(),color:P()}),dn=D([L(fn),R({value:L(fn)}),Et]),vn=R({type:_([At.linear,At.radial]),start:nn.optional(),end:nn.optional(),center:nn.optional(),radius:tn.optional(),focal:nn.optional(),stops:dn.optional(),gradientUnits:_([at,ft]).optional(),spreadMethod:_([wt,"reflect","repeat"]).optional(),gradientTransform:P().optional()}),yn=vn,mn=R({pathData:P(),pathOverflow:_(["clip","extend"]).optional(),lengthAdjust:_(["spacing","spacingAndGlyphs"]).optional(),method:_(["align","stretch"]).optional(),spacing:_(["auto","exact"]).optional(),startOffset:tn.optional(),textLength:tn.optional()}),pn=R({useGlyphs:C().optional()}),hn=R({transformBy:rn.optional(),repeater:on.optional(),maskedBy:sn.optional(),clipPath:ln.optional(),strokeTrim:un.optional(),clone:an.optional(),fillGradient:vn.optional(),strokeGradient:yn.optional(),textPath:mn.optional(),text:pn.optional()});function gn(t,n){const e=[],r=(t,o)=>{if(t&&t.effects){const r={errors:[],warnings:[],strict:!!(null==n?void 0:n.strict)};if(!hn.isValid(t.effects,r,[o+".effects"]))for(const t of r.errors)e.push(t)}t&&Array.isArray(t.children)&&t.children.forEach((t,n)=>r(t,o+".children["+n+"]"))};return r(t,"root"),e}function bn(t,n){var e;const r=!1!==(null==n?void 0:n.strict),o={errors:[],warnings:[],strict:r},i=jn.isValid(t,o,["root"])?[]:[...o.errors];if(t&&"object"==typeof t){for(const n of gn(t,{strict:r}))i.includes(n)||i.push(n);const n=null==(e=kt(t))?void 0:e.definitions;for(const e of function(t,n){if(!n||!Object.keys(n).length)return[];const e=[],r=(t,o,i,s)=>{var l,u;if(!t)return;const c="string"==typeof t.fontFamily?t.fontFamily:void 0,a=null!=c?c:i,f=s||"text"===t.type&&!!(null==(u=null==(l=t.effects)?void 0:l.text)?void 0:u.useGlyphs);if(f&&c&&!Object.prototype.hasOwnProperty.call(n,c)){const t=o+': glyph-mode text uses font-family "'+c+'", which has no entry in animator.definitions.fonts';e.includes(t)||e.push(t)}Array.isArray(t.children)&&t.children.forEach((t,n)=>r(t,o+".children["+n+"]",a,f))};return r(t,"root",void 0,!1),e}(t,null==n?void 0:n.fonts))i.includes(e)||i.push(e);for(const e of function(t,n){const e=[],r=(t,o)=>{if(Array.isArray(t))return void t.forEach((t,n)=>r(t,o+"["+n+"]"));if(!t||"object"!=typeof t)return;const i=t.easing;if(!("string"!=typeof i||n&&Object.prototype.hasOwnProperty.call(n,i))){const t=o+'.easing: "'+i+'" names no entry in animator.definitions.easings — it will play linear';e.includes(t)||e.push(t)}for(const[n,e]of Object.entries(t))"easing"!==n&&e&&"object"==typeof e&&r(e,o+"."+n)};return r(t,"root"),e}(t,null==n?void 0:n.easings))i.includes(e)||i.push(e);for(const n of function(t){var n;const e=null==(n=kt(t))?void 0:n.version;return void 0===e||void 0!==V(e)?[]:["root.animator.version: "+JSON.stringify(e)+' is not a version stamp ("a.b" or "a.b.c") — it reads as unstamped']}(t))i.includes(n)||i.push(n)}return i}var wn=E({type:P(),domType:P().optional(),textContent:P().optional(),id:P().optional(),meta:(new class extends m{constructor(){super(...arguments),this._default=void 0}sanitize(t){return t}isValid(t,n,e){return!0}_canSanitize(t){return!0}}).optional(),effects:hn.optional(),animate:Ut.optional(),style:F(D([P(),z()])).optional()},Ht),An=E(f(a({},wn._shape),{children:B(()=>L(An),[]).optional()}),Ht),kn=R({width:D([z(),P()]).optional(),height:D([z(),P()]).optional(),viewBox:P().optional(),animator:$t.optional()}),jn=E(f(a(a({},wn._shape),kn._shape),{type:T("svg"),children:L(An).optional()}),Ht),Mn=(R({v:L(L(z())),i:L(L(z())).optional(),o:L(L(z())).optional(),c:C().optional()}),0);function xn(){return"_px_"+Date.now().toString(36)+(++Mn).toString(36)+Math.random().toString(36).substring(2,6)}function On(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>On(t));const n=t,e={};for(const t of Object.keys(n))e[t]=On(n[t]);return e}function Sn(t){var n;const e=On(t),r=new Map,o=new Set(["href","xlink:href"]),i=new Set(["fill","stroke","clip-path","clipPath","mask","marker","marker-start","marker-mid","marker-end","filter","flood-color","lighting-color"]),s=new Set(["targetId","boundElementId"]),l=(t,n)=>"source"===t&&("maskedBy"===n||"clone"===n);!function t(n){if(n&&"object"==typeof n){if(n.id&&"string"==typeof n.id){const t=n.id,e=xn();r.set(t,e),n.id=e}else n.animate&&(n.id=xn());if(Array.isArray(n.children))for(const e of n.children)t(e)}}(e),function t(n,e){if(n&&"object"==typeof n)for(const[u,c]of Object.entries(n))if("children"!==u)if("string"==typeof c)if(o.has(u)&&c.startsWith("#")){const t=c.slice(1),e=r.get(t);e&&(n[u]="#"+e)}else if(i.has(u))n[u]=Nn(c,r);else if(s.has(u)||l(u,e)){const t=c.startsWith("#"),e=r.get(t?c.slice(1):c);e&&(n[u]=t?"#"+e:e)}else c.includes("url(#")&&(n[u]=Nn(c,r));else if("style"===u&&"object"==typeof c&&null!==c)for(const[t,n]of Object.entries(c))"string"==typeof n&&(c[t]=Nn(n,r));else"object"==typeof c&&null!==c&&t(c,u);else if(Array.isArray(c))for(const n of c)t(n)}(e);const u=null==(n=e.animator)?void 0:n.bindings;if(Array.isArray(u)){const t=u.map(t=>{var n;const e=t.target.startsWith("#"),o=e?t.target.slice(1):t.target,i=null!=(n=r.get(o))?n:o;return f(a({},t),{target:e?"#"+i:i})});e.animator=f(a({},e.animator),{bindings:t})}return e}function Nn(t,n){return t.replace(/url\(#([^)]+)\)/g,(t,e)=>{const r=n.get(e);return r?"url(#"+r+")":t})}function Pn(t,n=!1){var e,r,o,i;const s=t.v,l=t.i,u=t.o,c=t.c;if(!s.length)return"";const a=[],f=s.length;a.push("M"+s[0][0]+","+s[0][1]);for(let t=1;t<f;t++){const o=s[t-1],i=null!=(e=null==u?void 0:u[t-1])?e:o,c=null!=(r=null==l?void 0:l[t])?r:s[t],f=s[t];n||i[0]!==o[0]||i[1]!==o[1]||c[0]!==f[0]||c[1]!==f[1]?a.push("C"+i[0]+","+i[1]+","+c[0]+","+c[1]+","+f[0]+","+f[1]):a.push("L"+f[0]+","+f[1])}if(c&&f>0){const t=s[f-1],e=null!=(o=null==u?void 0:u[f-1])?o:t,r=null!=(i=null==l?void 0:l[0])?i:s[0],c=s[0];!n&&e[0]===t[0]&&e[1]===t[1]&&r[0]===c[0]&&r[1]===c[1]||a.push("C"+e[0]+","+e[1]+","+r[0]+","+r[1]+","+c[0]+","+c[1]),a.push("z")}return a.join("")}function zn(t,n,e){return t+(n-t)*e}function Cn(t,n,e){const r=[],o=Math.max(t.length,n.length);for(let i=0;i<o;i++)r[i]=zn(t[i]||0,n[i]||0,e);return r}function Tn(t,n,e){return[zn(t[0]||0,n[0]||0,e),zn(t[1]||0,n[1]||0,e),zn(t[2]||0,n[2]||0,e),zn(void 0===t[3]?1:t[3],void 0===n[3]?1:n[3],e)]}function _n(t,n,e){const r=Math.max(t.length,n.length),o=[];for(let i=0;i<r;i++)o.push(Dn(t[i],n[i],e));return o}function Dn(t,n,e){var r,o,i,s,l,u,c,a,f;if(!t||!n)return t||n||{v:[]};const d=Math.min(Math.max(e,0),1),v=Math.min(t.v.length,n.v.length),y=[],m=[],p=[];for(let e=0;e<v;e++){const f=t.v[e],v=n.v[e];y.push(Cn(f,v,d));const h=null!=(o=null==(r=t.i)?void 0:r[e])?o:f,g=null!=(s=null==(i=n.i)?void 0:i[e])?s:v;m.push(Cn(h,g,d));const b=null!=(u=null==(l=t.o)?void 0:l[e])?u:f,w=null!=(a=null==(c=n.o)?void 0:c[e])?a:v;p.push(Cn(b,w,d))}return{v:y,i:m.length?m:void 0,o:p.length?p:void 0,c:null!=(f=t.c)?f:n.c}}function Rn(t,n,e){if(e<=0)return 0;if(e>=1)return 1;const r=3*t,o=3*(n-t)-r,i=1-r-o;function s(t){return((i*t+o)*t+r)*t}function l(t){return(3*i*t+2*o)*t+r}let u=e,c=0,a=1;for(let t=0;t<8;t++){const t=s(u)-e;if(Math.abs(t)<1e-6)return u;const n=l(u);if(Math.abs(n)<1e-6)break;u-=t/n}for(u=e;c<a;){const t=s(u);if(Math.abs(t-e)<1e-6)return u;e>t?c=u:a=u,u=(a+c)/2}return u}function En(t){const[n,e,r,o]=t,i=3*e,s=3*(o-e)-i,l=1-i-s;return function(t){return e=Rn(n,r,t),((l*e+s)*e+i)*e;var e}}function Ln(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e]}function Fn(t,n){if(!t)return{left:void 0,right:void 0};if(n<=0)return{left:void 0,right:t};if(n>=1)return{left:t,right:void 0};const[e,r,o,i]=t,s=Rn(e,o,n),l=[e,r],u=[o,i],{left:c,right:a}=function(t,n,e,r,o){const i=Ln(t,n,o),s=Ln(n,e,o),l=Ln(e,r,o),u=Ln(i,s,o),c=Ln(s,l,o),a=Ln(u,c,o);return{left:[t,i,u,a],right:[a,c,l,r]}}([0,0],l,u,[1,1],s),f=c[3][0],d=c[3][1];let v,y;f>1e-9&&Math.abs(d)>1e-9&&(v=[c[1][0]/f,c[1][1]/d,c[2][0]/f,c[2][1]/d]);const m=1-f,p=1-d;return m>1e-9&&Math.abs(p)>1e-9&&(y=[(a[1][0]-f)/m,(a[1][1]-d)/p,(a[2][0]-f)/m,(a[2][1]-d)/p]),{left:v,right:y}}function Un(t){if(t)return[1-t[2],1-t[3],1-t[0],1-t[1]]}function Bn(t){const n=Math.round(255*t[0]),e=Math.round(255*t[1]),r=Math.round(255*t[2]);return 4===t.length?"rgba("+n+","+e+","+r+","+t[3]+")":"rgb("+n+","+e+","+r+")"}function In(t){if(t){if(Array.isArray(t))return t;if("string"==typeof t)return t.startsWith("#")?function(t){const n=t.slice(1),e=n.length<=4,r=e?n[0]+n[0]:n.slice(0,2),o=e?n[1]+n[1]:n.slice(2,4),i=e?n[2]+n[2]:n.slice(4,6),s=4===n.length?n[3]+n[3]:8===n.length?n.slice(6,8):null,l=[parseInt(r,16)/255,parseInt(o,16)/255,parseInt(i,16)/255];return null!==s&&l.push(parseInt(s,16)/255),l}(t):t.startsWith("rgb")?function(t){var n;const e=null==(n=t.match(/rgba?\((.*)\)/))?void 0:n[1];if(!e)throw new Error("Invalid rgb/rgba format");const r=e.split(",").map(t=>+t.trim());return[r[0]/255,r[1]/255,r[2]/255,...void 0!==r[3]?[r[3]]:[]]}(t):void console.warn("Unsupported color format: "+t)}}var Vn=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]),Zn=new Set(["translate","rotate","scale","skew"]),Gn=new Set(["offset-distance","offsetDistance"]);function Wn(t,n){var e;if(!t)return"";const r=null==(e=null==n?void 0:n.P)||e,o=[],i=t.translate,s=t.origin,l=t.rotate,u=t.skew,c=t.scale,a=r?"px":"",f=r?"deg":"";return i&&o.push("translate("+i[0]+a+","+i[1]+a+")"),s&&o.push("translate("+s[0]+a+","+s[1]+a+")"),null!=l&&o.push("rotate("+l+f+")"),null!=u&&o.push("skewX("+u+f+")"),c&&o.push("scale("+c[0]+","+c[1]+")"),s&&o.push("translate("+-s[0]+a+","+-s[1]+a+")"),o.join("")}var Jn=new Set(["offset-distance","offsetDistance"]),Xn=1e3;function qn(t){return t.includes("-")?t.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()):t}function Qn(t){return!t.includes("-")&&/[a-z][A-Z]/.test(t)}var Kn=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 Yn(t){return Kn.has(t)?t:t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function $n(t,n,e){return Math.max(n,Math.min(t,e))}function Hn(t,n,e,r,o){if(o<=0)return[t[0],t[1]];if(o>=1)return[r[0],r[1]];const i=1-o,s=i*i,l=o*o,u=s*i,c=3*o*s,a=3*l*i,f=l*o;return[u*t[0]+c*n[0]+a*e[0]+f*r[0],u*t[1]+c*n[1]+a*e[1]+f*r[1]]}var te=1e-4;function ne(t,n,e,r,o){const i=ee(t,n,e,r,o);return 0===i[0]&&0===i[1]?ee(t,n,e,r,o<.5?o+te:o-te):i}function ee(t,n,e,r,o){const i=1-o,s=3*i*i,l=6*o*i,u=3*o*o;return[s*(n[0]-t[0])+l*(e[0]-n[0])+u*(r[0]-e[0]),s*(n[1]-t[1])+l*(e[1]-n[1])+u*(r[1]-e[1])]}function re(t,n,e,r,o=100){const i=o+1,s=new Float64Array(i),l=new Float64Array(i);let u=Hn(t,n,e,r,0);s[0]=0,l[0]=0;let c=0;for(let a=1;a<i;a++){const i=a/o,f=Hn(t,n,e,r,i),d=f[0]-u[0],v=f[1]-u[1];c+=Math.sqrt(d*d+v*v),s[a]=i,l[a]=c,u=f}return{ts:s,ds:l}}function oe(t,n){const{ts:e,ds:r}=t,o=e.length-1;if(n<=e[0])return r[0];if(n>=e[o])return r[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;e[t]<n?i=t+1:s=t}const l=e[s-1],u=e[s]-l,c=u>0?(n-l)/u:0;return r[s-1]+c*(r[s]-r[s-1])}var ie=new Set(["script","foreignobject"]),se=new Set(["href","xlink:href","src","filter","clippath","mask","markerstart","markermid","markerend"]),le=new Set(["href","xlink:href","src"]),ue=new Set(["mixBlendMode","isolation"]),ce=/^data:image\/(?:png|jpe?g|gif|webp|bmp);base64,/i,ae=/^data:image\/svg\+xml(?:;[^,]*)?,/i,fe=/^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i,de=["iVBORw0K","/9j/","R0lGOD","UklGR","Qk"];function ve(t,n){const e=t.toLowerCase();if(!function(t){return!!t.startsWith("on")}(e)){if("fill"===e||"stroke"===e||"stopcolor"===e){const t=String(n);return t.includes("url(")&&!/^url\(#[^)]+\)$/.test(t)?void console.warn('Attribute "'+e+'" blocked: url() must be internal url(#id), got:',n):n}if(se.has(e)){const t=String(n);return t.startsWith("#")||/^url\(#[^)]+\)$/.test(t)||le.has(e)&&(ce.test(t)||ae.test(t)||function(t){const n=fe.exec(t);return!!n&&de.some(t=>n[1].startsWith(t))}(t))?n:void console.warn('Attribute "'+e+'" blocked: must be #id, url(#id), or data:image/… URI, got:',n)}return n}console.warn("Attribute blocked (event handler / dangerous): ",e)}function ye(t,n){if(!t)return t;const e=n&&"object"==typeof n&&!Array.isArray(n)?n:function(t){var n,e;if(!t||"string"!=typeof t)return;const r={},o=/([a-zA-Z]+)\s*\(([^)]*)\)/g,i=["translate","rotate","skewX","scale"];let s,l=-1;for(;null!==(s=o.exec(t));){const t=s[1],o=i.indexOf(t);if(o<0||o<=l)return;l=o;const u=s[2].split(/[\s,]+/).filter(Boolean).map(Number);if(u.some(t=>Number.isNaN(t)))return;if("translate"===t){if(u.length<1||u.length>2)return;r.translate=[u[0],null!=(n=u[1])?n:0]}else if("rotate"===t){if(1!==u.length)return;r.rotate=u[0]}else if("skewX"===t){if(1!==u.length)return;r.skew=u[0]}else{if(u.length<1||u.length>2)return;r.scale=[u[0],null!=(e=u[1])?e:u[0]]}}return t.replace(/([a-zA-Z]+)\s*\(([^)]*)\)/g,"").replace(/[\s,]/g,"").length?void 0:Object.keys(r).length?r:void 0}(n);if(!e||!Object.keys(e).length)return t;const r=t=>t&&"object"==typeof t&&!Array.isArray(t)?a(a({},e),t):t,o=t[pt];if(o&&"object"==typeof o){const n=o;if(Array.isArray(n.keyframes)){const e=f(a({},n),{keyframes:n.keyframes.map(t=>f(a({},t),{value:r(t.value)}))});return void 0!==e.value&&(e.value=r(e.value)),f(a({},t),{transform:e})}return t}const i=Object.keys(t).filter(t=>Zn.has(t));if(1!==i.length)return t;const s=i[0],l=t[s];if(!l||"object"!=typeof l||!Array.isArray(l.keyframes))return t;const u=f(a({},l),{keyframes:l.keyframes.map(t=>f(a({},t),{value:f(a({},e),{[s]:t.value})}))});void 0!==u.value&&(u.value=f(a({},e),{[s]:u.value}));const c=a({},t);return delete c[s],f(a({},c),{transform:u})}function me(t){const n=Ct(t);if(!n)return;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&"number"==typeof n[1])return[n[0],n[1]];const e=n.translate;return Array.isArray(e)&&e.length>=2?[e[0],e[1]]:void 0}function pe(t){return zt(t)}function he(t){return Tt(t)}function ge(t){const n=t.keyframes;if(!Array.isArray(n))return!1;if(t.autoOrient)return!0;for(const t of n)if(_t(t)||Dt(t))return!0;return!1}var be=new WeakMap;function we(t,n,e,r){let o=be.get(t);const i=null==o?void 0:o.get(n);if(i)return i;const s=Dt(t),l=_t(n),u=[e[0]+(s?s[0]:0),e[1]+(s?s[1]:0)],c=[r[0]+(l?l[0]:0),r[1]+(l?l[1]:0)],a=re(e,u,c,r),f={P0:e,P1:u,P2:c,P3:r,C:a,T:a.ds[a.ds.length-1]};return o||(o=new WeakMap,be.set(t,o)),o.set(n,f),f}var Ae=.5,ke=5,je=32;function Me(t,n){var e,r,o;if(!ge(t))return t;const i=t.keyframes;if(!Array.isArray(i)||i.length<2)return t;const s=!!t.autoOrient,l=null!=(e=null==n?void 0:n.flatnessTolerance)?e:Ae,u=null!=(r=null==n?void 0:n.rotationTolerance)?r:ke,c=null!=(o=null==n?void 0:n.maxSamplesPerSegment)?o:je,a=[],f=me(i[0]);if(!f)return t;const d=s?function(t,n){const e=me(t),r=me(n);if(!e||!r)return 0;const o=we(t,n,e,r),i=ne(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;a.push(Oe(pe(i[0]),Pe(Se(i[0]),Se(i[0]),0,f,d,s)));for(let t=0;t<i.length-1;t++){const n=i[t],e=i[t+1],r=me(n),o=me(e);r&&o?(s&&t>0&&Ce(a,n,e,r,o,u),_e(a,n,e,r,o,s,l,u,c)):a.push(Oe(pe(e),Pe(Se(e),Se(e),1,null!=o?o:[0,0],void 0,s)))}const v=he(i[i.length-1]);v&&(a[a.length-1].e=v),s&&xe(a);const y={keyframes:a};return void 0!==t.loop&&(y.loop=t.loop),y}function xe(t){let n;for(const e of t){const t=Ct(e);if(!t||"number"!=typeof t.rotate)continue;if(void 0===n){n=t.rotate;continue}let r=t.rotate;for(;r-n>180;)r-=360;for(;r-n<-180;)r+=360;t.rotate=r,n=r}}function Oe(t,n){return{t:t,v:n}}function Se(t){const n=Ct(t);if(n&&"object"==typeof n&&!Array.isArray(n))return n}function Ne(t,n,e){if(void 0===t)return n;if(void 0===n)return t;if("number"==typeof t&&"number"==typeof n)return t+(n-t)*e;if(Array.isArray(t)&&Array.isArray(n)&&t.length===n.length){const r=new Array(t.length);for(let o=0;o<t.length;o++){const i="number"==typeof t[o]?t[o]:0,s="number"==typeof n[o]?n[o]:0;r[o]=i+(s-i)*e}return r}return e<.5?t:n}function Pe(t,n,e,r,o,i){const s={translate:r},l=new Set;if(t)for(const n of Object.keys(t))l.add(n);if(n)for(const t of Object.keys(n))l.add(t);for(const r of l){if("translate"===r)continue;if("rotate"===r&&i)continue;const o=null==t?void 0:t[r],l=null==n?void 0:n[r];void 0===o&&void 0===l||(s[r]=Ne(o,l,e))}return void 0!==o&&(s.rotate=o+ze(t,n,e)),s}function ze(t,n,e){const r="number"==typeof(null==t?void 0:t.rotate)?t.rotate:void 0,o="number"==typeof(null==n?void 0:n.rotate)?n.rotate:void 0;if(void 0===r&&void 0===o)return 0;const i=Ne(r,o,e);return"number"==typeof i?i:0}function Ce(t,n,e,r,o,i){const s=t[t.length-1],l=Ct(s),u=null==l?void 0:l.rotate;if("number"!=typeof u)return;const c=Se(n),a=u-ze(c,c,0),f=we(n,e,r,o),d=ne(f.P0,f.P1,f.P2,f.P3,0),v=180*Math.atan2(d[1],d[0])/Math.PI,y=function(t,n){let e=t-n;for(;e>180;)e-=360;for(;e<-180;)e+=360;return e}(v,a);if(Math.abs(y)<=i)return;const m=pe(n),p=Math.min(m+Te,(m+pe(e))/2),h=Pe(Se(n),Se(n),0,r,v,!0);t.push(Oe(p,h))}var Te=.05;function _e(t,n,e,r,o,i,s,l,u){const c=we(n,e,r,o),a=pe(n),f=pe(e),d=he(n),v=(y=d)?En([y[1],y[0],y[3],y[2]]):t=>t;var y;const m=Se(n),p=Se(e),h=function(t,n,e,r,o){const i=[];De(t.P0[0],t.P1[0],t.P2[0],t.P3[0],i),De(t.P0[1],t.P1[1],t.P2[1],t.P3[1],i),i.sort((t,n)=>t-n);const s=[0];for(const t of i)t>s[s.length-1]+1e-6&&t<.999999&&s.push(t);s.push(1);const l=[],u={_:o-s.length};for(let o=0;o<s.length-1;o++)Re(s[o],s[o+1],l,t,n,e,r,u);return l}(c,i,s,l,u),g=[];for(const t of h){const n=oe(c.C,t),e=$n(c.T>0?n/c.T:t,0,1),r={u:$n(v(e),0,1),p:e,D:Hn(c.P0,c.P1,c.P2,c.P3,t)};if(i){const n=ne(c.P0,c.P1,c.P2,c.P3,t);r.rotateDeg=180*Math.atan2(n[1],n[0])/Math.PI}g.push(r)}let b=d,w=0;const A=t.length-1;for(let n=0;n<g.length;n++){const e=g[n],r=w<1?$n((e.u-w)/(1-w),0,1):1,{left:o,right:s}=Fn(b,r),l=0===n?A:t.length-1;o?t[l].e=o:delete t[l].e;const u=a+e.u*(f-a),c=Pe(m,p,e.p,e.D,e.rotateDeg,i);t.push(Oe(u,c)),b=s,w=e.u}}function De(t,n,e,r,o){const i=n-t,s=e-n,l=i-2*s+(r-e),u=2*(s-i),c=i;if(Math.abs(l)<1e-10){if(Math.abs(u)>1e-10){const t=-c/u;t>1e-6&&t<.999999&&o.push(t)}return}const a=u*u-4*l*c;if(a<0)return;const f=Math.sqrt(a),d=(-u-f)/(2*l),v=(-u+f)/(2*l);d>1e-6&&d<.999999&&o.push(d),v>1e-6&&v<.999999&&o.push(v)}function Re(t,n,e,r,o,i,s,l){const u=(t+n)/2,c=Hn(r.P0,r.P1,r.P2,r.P3,t),a=Hn(r.P0,r.P1,r.P2,r.P3,n),f=n-t,d=Hn(r.P0,r.P1,r.P2,r.P3,t+.25*f),v=Hn(r.P0,r.P1,r.P2,r.P3,u),y=Hn(r.P0,r.P1,r.P2,r.P3,t+.75*f),m=Math.max(Ee(d,c,a),Ee(v,c,a),Ee(y,c,a));let p=!0;if(o){const e=ne(r.P0,r.P1,r.P2,r.P3,t),o=ne(r.P0,r.P1,r.P2,r.P3,n),i=180*Math.atan2(e[1],e[0])/Math.PI,l=180*Math.atan2(o[1],o[0])/Math.PI;let u=Math.abs(i-l);u>180&&(u=360-u),u>s&&(p=!1)}m<=i&&p||l._<=0||f<1e-6?e.push(n):(l._-=1,Re(t,u,e,r,o,i,s,l),Re(u,n,e,r,o,i,s,l))}function Ee(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=r*r+o*o;if(i<1e-20){const e=t[0]-n[0],r=t[1]-n[1];return Math.sqrt(e*e+r*r)}const s=(t[0]-n[0])*o-(t[1]-n[1])*r;return Math.abs(s)/Math.sqrt(i)}function Le(t,n){const e=Fe(t,n);return null!=e?e:t}function Fe(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=Fe(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const e=ye(o,t.transform),i=e.transform;if(i&&"object"==typeof i&&ge(i)){const t=Me(i,n);t!==i&&(r=f(a({},e),{transform:t}))}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var Ue=1;function Be(t,n){if(t===n)return!0;if(typeof t!=typeof n||null===t||null===n||"object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(n))return!1;const e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(e=>Be(t[e],n[e]))}function Ie(t){const n=[];let e;const r=function(t){const n=t.split(/([MLCZmlcz]|[\s,]+)/).map(t=>t.trim()).filter(t=>t&&","!==t),e=[];let r=null;for(const t of n)if(/[MLCZmlcz]/.test(t))r={type:t,values:[]},e.push(r);else if(r){const n=+t;r.values.push(Number.isNaN(n)?0:n)}return e}(t);for(const t of r){const r=t.type,o=t.values;if("M"===r||"m"===r){const t=o[0]||0,r=o[1]||0;e={v:[[t,r]],i:[[t,r]],o:[[t,r]],c:!1},n.push(e);continue}if(e||(e={v:[[0,0]],i:[[0,0]],o:[[0,0]],c:!1},n.push(e)),"L"===r){const t=o[0]||0,n=o[1]||0;e.v.push([t,n]),e.i.push([t,n]),e.o.push([t,n])}else if("C"===r){const t=o[0]||0,n=o[1]||0,r=o[2]||0,i=o[3]||0,s=o[4]||0,l=o[5]||0;e.o[e.o.length-1]=[t,n],e.v.push([s,l]),e.i.push([r,i]),e.o.push([s,l])}else"Z"===r||"z"===r?e.c=!0:console.warn('Unsupported path command "'+r+'"')}return n}function Ve(t){return t.startsWith("path(")&&t.endsWith(")")?t.slice(5,-1):/^[MmZzLlHhVvCcSsQqTtAa]/.test(t)?t:void 0}function Ze(t){return"string"==typeof t&&void 0!==Ve(t)}function Ge(t){if(t&&"object"==typeof t&&"string"==typeof t.pathData){const n=Ve(t.pathData);return n?{paths:Ie(n)}:t}if(t&&"object"==typeof t&&"paths"in t){const n=t.paths;if(Array.isArray(n)&&n.length>0&&Ze(n[0])){const t=[];for(const e of n){const n=Ve(e);n&&t.push(...Ie(n))}return{paths:t}}return t}if(Array.isArray(t)){if(t.length>0&&Ze(t[0])){const n=[];for(const e of t){const t=Ve(e);t&&n.push(...Ie(t))}return{paths:n}}return{paths:t}}return Ze(t)?{paths:Ie(Ve(t))}:t}function We(t,n){var e;if(t)return Array.isArray(t)?t:(null==(e=null==n?void 0:n.easings)?void 0:e[t])?n.easings[t]:void console.warn("Unknown easing name: "+t)}function Je(t,n){var e;if("string"==typeof t){const r=null==(e=null==n?void 0:n.animations)?void 0:e[t];return r||console.warn("Unknown animation name: "+t),r}return t}function Xe(t,n,e,r){var o,i;return"d"===t?{paths:_n(null!=(o=null==n?void 0:n.paths)?o:Array.isArray(n)?n:[],null!=(i=null==e?void 0:e.paths)?i:Array.isArray(e)?e:[],r)}:Vn.has(t)?Tn(n||[0,0,0,1],e||[0,0,0,1],r):"transform"!==t||"object"!=typeof n||null===n||Array.isArray(n)||"object"!=typeof e||null===e||Array.isArray(e)?"rotate"===t&&"number"==typeof n&&"number"==typeof e?zn(n,e,r):Zn.has(t)||"stroke-dasharray"===t||"strokeDasharray"===t?Cn(n||[],e||[],r):zn(+(n||0),+(e||0),r):function(t,n,e){const r=new Set([...Object.keys(null!=t?t:{}),...Object.keys(null!=n?n:{})]),o={};for(const i of r){const r=null==t?void 0:t[i],s=null==n?void 0:n[i];if("rotate"===i||"skew"===i)o[i]=zn(+(null!=r?r:0),+(null!=s?s:0),e);else if("translate"===i||"scale"===i||"origin"===i){const t="scale"===i?[1,1]:[0,0];o[i]=Cn(r||t,s||t,e)}else o[i]=null!=s?s:r}return o}(n,e,r)}function qe(t,n,e,r){var o,i,s,l,u;const c=n.length-1,d=$n(null!=(o=e.segmentCount)?o:c,1,c);let v;v=e.repeatAt===ut.start?n.slice(0,d+1):n.slice(c-d);const y=null!=(i=n[0].t)?i:0,m=null!=(s=n[n.length-1].t)?s:0;let p,h;e.repeatAt===ut.start?(p=0,h=y):(p=m,h=r);const g=h-p;if(g<=0)return n;const b=null!=(l=v[0].t)?l:0,w=(null!=(u=v[v.length-1].t)?u:0)-b;if(w<=0)return n;const A=v.map(t=>({R:(t.t-b)/w,v:t.v,e:t.e,tangentIn:_t(t),tangentOut:Dt(t)})),k=Math.floor(g/w),j=g-k*w,M=j/w,x=[],O=e.repeatAt!==ut.start,S=n[n.length-1];let N,P=!1;function z(n,e,r){var o;let i;if(e){i=[];for(let t=A.length-1;t>=0;t--)i.push({R:1-A[t].R,v:A[t].v,e:t>0?Un(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else i=A;const s=void 0!==r?r:1;for(let e=0;e<i.length;e++){const r=i[e];if(r.R>s+1e-9){const o=i[e-1],l=r.R-o.R,u=(s-o.R)/l,c=o.e?En(o.e)(u):u,a=Xe(t,o.v,r.v,c),{left:f}=Fn(o.e,u);return x.length>0&&o.R<=s&&(x[x.length-1].e=f),void x.push({t:n+s*w,v:a,e:void 0})}const l=x.length>0?x[x.length-1]:S,u=O&&0===e&&void 0!==l&&Math.abs((null!=(o=l.t)?o:0)-(n+r.R*w))<1e-9;if(u){if(Be(l.v,r.v)){x.length>0?(l.e=r.e,l.tangentOut=r.tangentOut):(N=r.e,P=!0);continue}x.length>0&&(delete l.tangentIn,delete l.tangentOut)}const c={t:n+r.R*w+(u?Ue:0),v:r.v,e:e<i.length-1?r.e:void 0};r.tangentIn&&(c.tangentIn=r.tangentIn),r.tangentOut&&(c.tangentOut=r.tangentOut),x.push(c)}}if(e.repeatAt===ut.start){M>1e-9&&function(n,e,r){let o;if(e){o=[];for(let t=A.length-1;t>=0;t--)o.push({R:1-A[t].R,v:A[t].v,e:t>0?Un(A[t-1].e):void 0,tangentIn:A[t].tangentOut,tangentOut:A[t].tangentIn})}else o=A;const i=1-r;for(let e=0;e<o.length;e++){const r=o[e];if(r.R<i-1e-9)continue;const s=o[e-1];if(s&&s.R<i-1e-9&&r.R>i+1e-9){const e=r.R-s.R,o=(i-s.R)/e,l=s.e?En(s.e)(o):o,u=Xe(t,s.v,r.v,l),{right:c}=Fn(s.e,o);x.push({t:n,v:u,e:c})}const l={t:n+(r.R-i)*w,v:r.v,e:e<o.length-1?r.e:void 0};r.tangentIn&&(l.tangentIn=r.tangentIn),r.tangentOut&&(l.tangentOut=r.tangentOut),x.push(l)}}(p,e.direction===ct.alternate&&k%2==0,M);for(let t=0;t<k;t++){const n=k-1-t,r=e.direction===ct.alternate&&n%2==0;z(p+j+t*w,r)}}else{for(let t=0;t<k;t++){const n=e.direction===ct.alternate&&t%2==0;z(p+t*w,n)}if(M>1e-9){const t=e.direction===ct.alternate&&k%2==0;z(p+k*w,t,M)}}return e.repeatAt===ut.start?[...x,...n]:P&&n.length>0?[...n.slice(0,-1),f(a({},n[n.length-1]),{e:N}),...x]:[...n,...x]}function Qe(t,n,e,r){var o;const i=n.keyframes||[],s=[];for(const n of i){const e=zt(n);let i=Ct(n);const l=Tt(n);"d"===t&&(i=Ge(i));const u=Qn(t)?Yn(t):t;Vn.has(u)&&(i=null!=(o=In(i))?o:i);const c={t:e,v:i,e:We(l,r)},a=_t(n),f=Dt(n);a&&(c.tangentIn=a),f&&(c.tangentOut=f),s.push(c)}s.sort((t,n)=>{var e,r;return(null!=(e=t.t)?e:0)-(null!=(r=n.t)?r:0)});const l=n.loop,u=!0===l?{}:l||void 0;return u&&s.length>=2?qe(t,s,u,e):s}function Ke(t,n,e){const r=n.loop;if(null==r||!1===r)return n;const o=!0===r?{}:r,i=n.keyframes;if(!Array.isArray(i)||i.length<2)return n;const s=Qn(t)?Yn(t):t,l=Vn.has(s),u=i.map(n=>{var e;const r=zt(n);let o=Ct(n);"d"===t&&(o=Ge(o)),l&&(o=null!=(e=In(o))?e:o);const i={t:r,v:o,e:Tt(n)},s=_t(n),u=Dt(n);return s&&(i.tangentIn=s),u&&(i.tangentOut=u),i}),c={keyframes:qe(t,u,o,e)};return void 0!==n.autoOrient&&(c.autoOrient=n.autoOrient),c}function Ye(t,n){const e=$e(t,n);return null!=e?e:t}function $e(t,n){let e,r;if(t.children)for(let r=0;r<t.children.length;r++){const o=$e(t.children[r],n);null!==o&&(e||(e=t.children.slice()),e[r]=o)}const o=t.animate;if(o&&"object"==typeof o&&!Array.isArray(o)){const t=o;for(const e of Object.keys(t)){const o=t[e],i=Ke(e,o,n);i!==o&&(r||(r=a({},t)),r[e]=i)}}if(!e&&!r)return null;const i=a({},t);return e&&(i.children=e),r&&(i.animate=r),i}var He=0;function tr(t,n=rt.native){const e=kt(t)||{},r=xt(t),o=e.duration||1e3,i=[],s=(t,e,i)=>{if(0===e.length)return null;const s=function(t,n,e,r=rt.native){const o={};for(const[i,s]of Object.entries(t)){if("transform"===i&&"offsetPath"===s.alongPathMode&&void 0!==t.offsetDistance)continue;const l=Qe(i,s,n,e);if(l.length>0){const t={keyframes:l};void 0!==s.autoOrient&&(t.autoOrient=s.autoOrient),void 0!==s.loop&&(t.loop=s.loop),o[i]=r===rt.native&&"transform"===i?Me(t):t}}return o}(ye(function(t){const n={};for(const e of t)for(const[t,r]of Object.entries(e))n[t]=r;return n}(e),i),o,r,n);return 0===Object.keys(s).length?null:{id:t,animate:s}},l=function(t){var n;if(t)return null==(n=kt(t))?void 0:n.bindings}(t);if(l)for(const t of l){const n=t.target.startsWith("#")?t.target.slice(1):t.target,e=t.animateWith.map(t=>Je(t,r)).filter(t=>!!t),o=s(n,e);o&&i.push(o)}const u=t=>{const n=t.animate;if(n&&Object.keys(n).length>0){const e=t.id||"_px_el_"+ ++He;t.id=e;const o=s(e,function(t,n){if(!t)return[];const e=[];if("string"==typeof t){const r=Je(t,n);r&&e.push(r)}else if(Array.isArray(t))for(const r of t){const t=Je(r,n);t&&e.push(t)}else e.push(t);return e}(n,r),t.transform);o&&i.push(o)}if(t.children)for(let n=0;n<t.children.length;n++)u(t.children[n])};if(t.children)for(let n=0;n<t.children.length;n++)u(t.children[n]);return i}function nr(t,n,e){var r,o,i,s,l;const u=n.keyframes||[];if(0===u.length)return null;const{L:c,F:a}=function(t,n){var e,r;const o=t.length-1;let i=t[0],s=t[o>0?1:0];for(let l=0;l<o;l++){const u=null!=(e=t[l].t)?e:0,c=null!=(r=t[l+1].t)?r:0;if(u<=n&&n<=c){i=t[l],s=t[l+1];break}n>c&&l===o-1&&(i=t[o>0?o-1:0],s=t[o])}return{L:i,F:s}}(u,e);let f=c===a?0:(d=e,v=null!=(r=c.t)?r:0,(y=null!=(o=a.t)?o:0)===v?0:0+(d-v)/(y-v)*1);var d,v,y;f=$n(f,0,1);const m=Tt(c);if(m&&Array.isArray(m))try{f=En(m)(f)}catch(t){}let p=Qn(t)?Yn(t):t,h=null;const g=null==c?void 0:c.v,b=null==a?void 0:a.v;if("d"===p)h=_n(null!=(i=null==g?void 0:g.paths)?i:Array.isArray(g)?g:[],null!=(s=null==b?void 0:b.paths)?s:Array.isArray(b)?b:[],f).map(t=>Pn(t)).join("");else if(Vn.has(p))h=Bn(Tn(g||[0,0,0,1],b||[0,0,0,1],f)),p=t;else if("stroke-dasharray"===p)h=Cn(g||[],b||[],f).join(" "),p=t;else if("transform"!==p||null===g||"object"!=typeof g||Array.isArray(g))"translate"===p?(h="translate("+Cn(g||[0,0],b||[0,0],f).join(",")+")",p="transform"):"rotate"===p?(h="rotate("+zn(+(g||0),+(b||0),f)+")",p="transform"):"scale"===p?(h="scale("+Cn(g||[1,1],b||[1,1],f).join(",")+")",p="transform"):h=zn(+(g||0),+(b||0),f);else{const t=new Set([...g?Object.keys(g):[],...b?Object.keys(b):[]]),e={};for(const n of t){const t=null==g?void 0:g[n],r=null==b?void 0:b[n];if("rotate"===n||"skew"===n)e[n]=zn(+(null!=t?t:0),+(null!=r?r:0),f);else if("translate"===n||"scale"===n||"origin"===n){const o="scale"===n?[1,1]:[0,0],i=Cn(t||o,r||o,f);e[n]=i}}if(ge(n)){const t=g.translate,r=b.translate;if(Array.isArray(t)&&Array.isArray(r)){const o=function(t,n,e,r,o,i){const s=we(t,n,e,r),l=0===s.T?o:function(t,n){const e=n*t.ds[t.ds.length-1],{ts:r,ds:o}=t,i=o.length-1;if(e<=0)return r[0];if(e>=o[i])return r[i];let s=1,l=i;for(;s<l;){const t=s+l>>>1;o[t]<e?s=t+1:l=t}const u=o[l-1],c=o[l]-u,a=c>0?(e-u)/c:0;return r[l-1]+a*(r[l]-r[l-1])}(s.C,o),u=Hn(s.P0,s.P1,s.P2,s.P3,l);if(!i)return{translate:u};const c=ne(s.P0,s.P1,s.P2,s.P3,l);return{translate:u,rotateDeg:180*Math.atan2(c[1],c[0])/Math.PI}}(c,a,[+t[0],+t[1]],[+r[0],+r[1]],f,!!n.autoOrient);e.translate=[o.translate[0],o.translate[1]],void 0!==o.rotateDeg&&(e.rotate=o.rotateDeg+(null!=(l=e.rotate)?l:0))}}h=Wn(e,{P:!1}),p="transform"}return Gn.has(p)&&"number"==typeof h&&(h=100*h+"%"),{k:p,v:null===h?"":""+h}}function er(t,n){const e={};for(const[r,o]of Object.entries(t)){const t=nr(r,o,n);t&&(e[t.k]=t.v)}return e}function rr(t,n,e){const r={};return"translate"===t?r.translate=n:"rotate"===t?r.rotate=n:"skew"===t?r.skew=n:r.scale=n,e&&"translate"!==t&&(r.origin=e),r}function or(t){var n,e;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(sr),autoOrient:r.autoOrient,loop:r.loop},e=null!=(n=r.value)?n:r.v;return void 0!==e&&"animated"===t.kind&&(t.base=e),t}const i=null!=(e=r.value)?e:r.v;if(void 0!==i)return{kind:"static",value:i}}return{kind:"static",value:t}}function ir(t,n,e,r){var o,i,s,l;const u=t=>(null==r?void 0:r.U)&&null!=t?String(t):t;if("absent"===e.kind)return;if("static"===e.kind)return void(t[n]=u(e.value));const c=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0,f=a({},c||{}),d={keyframes:e.keyframes};void 0!==e.loop&&(d.loop=e.loop),void 0!==e.autoOrient&&(d.autoOrient=e.autoOrient),f[n]=d,t.animate=f;const v=null!=(l=null!=(i=e.base)?i:null==(o=e.keyframes[0])?void 0:o.value)?l:null==(s=e.keyframes[0])?void 0:s.v;void 0!==v&&(t[n]=u(v))}function sr(t){if(!t||"object"!=typeof t)return t;const n=t;if(void 0===n.t&&void 0===n.v&&void 0===n.e&&void 0===n.to&&void 0===n.ti)return t;const e=a({},n);return void 0===e.time&&void 0!==n.t&&(e.time=n.t),void 0===e.value&&void 0!==n.v&&(e.value=n.v),void 0===e.easing&&void 0!==n.e&&(e.easing=n.e),void 0===e.tangentOut&&void 0!==n.to&&(e.tangentOut=n.to),void 0===e.tangentIn&&void 0!==n.ti&&(e.tangentIn=n.ti),e}function lr(t,n){const e={value:n};return void 0!==t.time&&(e.time=t.time),void 0!==t.easing&&(e.easing=t.easing),void 0!==t.tangentOut&&(e.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(e.tangentIn=t.tangentIn),e}function ur(t,n,e){if(!n)return t;delete t.transform;let r=t;return r=ar(r,n.origin,!0),r=cr(r,"scale",n.scale),r=cr(r,"skew",n.skew),r=cr(r,"rotate",n.rotate),r=ar(r,n.origin,!1),function(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}(n.translate)?(r=ar(r,n.origin,!0),r=cr(r,"translate",n.translate),r=ar(r,n.origin,!1)):r=cr(r,"translate",n.translate),r!==t&&t.id&&(r.id=t.id,delete t.id),r}function cr(t,n,e,r){if(void 0===e)return t;const o=or(e);if("static"===o.kind)return{type:"g",transform:{value:rr(n,o.value,void 0)},children:[t]};if("animated"===o.kind){const e={keyframes:o.keyframes.map(t=>lr(t,rr(n,t.value,void 0)))};return o.autoOrient&&(e.autoOrient=!0),void 0!==o.loop&&(e.loop=o.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function ar(t,n,e){if(void 0===n)return t;const r=or(n),o=t=>e?[-t[0],-t[1]]:t;if("absent"===r.kind)return t;if("static"===r.kind)return 0===r.value[0]&&0===r.value[1]?t:{type:"g",transform:{value:{translate:o(r.value)}},children:[t]};if("animated"===r.kind){const n={keyframes:r.keyframes.map(t=>lr(t,{translate:o(t.value)}))};return void 0!==r.loop&&(n.loop=r.loop),{type:"g",animate:{transform:n},children:[t]}}return t}function fr(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(fr);const n={};for(const e of Object.keys(t))n[e]=fr(t[e]);return n}function dr(t,n){const e=new Map,r=t=>{var o;if("string"==typeof t.id){const r=n();e.set(t.id,r),t.id=r}null==(o=t.children)||o.forEach(r)};r(t);const o=t=>t.replace(/url\(#([^)]+)\)/g,(t,n)=>{const r=e.get(n);return r?"url(#"+r+")":t}),i=t=>{var n;if("string"==typeof t.href&&t.href.startsWith("#")){const n=e.get(t.href.slice(1));n&&(t.href="#"+n)}for(const n of Object.keys(t)){if("children"===n||"effects"===n||"meta"===n||"animate"===n||"href"===n||"id"===n)continue;const e=t[n];"string"==typeof e&&-1!==e.indexOf("url(#")&&(t[n]=o(e))}null==(n=t.children)||n.forEach(i)};return i(t),e}function vr(t){const n="number"==typeof t?t:"string"==typeof t?parseFloat(t):NaN;return Number.isFinite(n)?n:0}function yr(t){var n;const e=vr(t.x),r=vr(t.y);if(delete t.x,delete t.y,!e&&!r)return t;const o="translate("+e+","+r+")";if(void 0!==t.transform||void 0!==t.animate){const e={type:"g",transform:o,children:null!=(n=t.children)?n:[]};t.children=[e]}else t.transform=o;return t}function mr(t,n){return"_lw_"+n+"_"+t.nextId++}function pr(t){return"string"==typeof t?t.replace(/^#/,""):void 0}function hr(t,n){var e;"string"==typeof t.id&&n.set(t.id,t),null==(e=t.children)||e.forEach(t=>hr(t,n))}var gr=fr;function br(t,n,e){var r,o,i;if("use"===t.type&&"translate"===(null==(o=null==(r=t.effects)?void 0:r.clone)?void 0:o.without)){const r=pr(t.effects.clone.source);"string"==typeof r&&r&&!n.contentRefInnerIds.has(r)&&n.contentRefInnerIds.set(r,e(r))}null==(i=t.children)||i.forEach(t=>br(t,n,e))}function wr(t){const n=/translate\(([^)]*)\)/.exec(t);if(!n)return[0,0];const e=n[1].split(/[\s,]+/).filter(Boolean).map(Number);return[e[0]||0,e[1]||0]}function Ar(t){if(!t||"object"!=typeof t)return!1;const n=t;return!!n.autoOrient||!!Array.isArray(n.keyframes)&&n.keyframes.some(t=>t.tangentOut||t.tangentIn)}function kr(t,n,e,r){if(!n)return t;const o=mr(e,"grad"),i=function(t,n){const e={type:t.type===At.radial?"radialGradient":"linearGradient",id:n};return t.type===At.linear?(jr(e,"x1","y1",t.start),jr(e,"x2","y2",t.end)):(jr(e,"cx","cy",t.center),function(t,n,e){const r=or(e);"absent"!==r.kind&&ir(t,"r",r,{U:!0})}(e,0,t.radius),jr(e,"fx","fy",t.focal)),t.gradientUnits&&(e.gradientUnits=t.gradientUnits),t.spreadMethod&&(e.spreadMethod=t.spreadMethod),t.gradientTransform&&(e.gradientTransform=t.gradientTransform),e.children=function(t){var n,e;if(!t)return[];const r=or(t);if("absent"===r.kind)return[];if("static"===r.kind)return Array.isArray(r.value)?r.value.map(Mr):[];const o=r.keyframes;if(!o.length)return[];const i=r.loop;let s=0;for(const t of o){const n=Ct(t);Array.isArray(n)&&n.length>s&&(s=n.length)}if(!s)return[];const l=Ct(o[0]),u=[];for(let t=0;t<s;t++){const r=null!=(e=null!=(n=null==l?void 0:l[t])?n:xr(o,0,t))?e:{offset:t/Math.max(1,s-1),color:"#000000"};u.push({offset:r.offset,color:r.color})}return u.map((t,n)=>function(t,n,e,r,o){var i;const s=[],l=[];let u=!1;for(const r of n){const o=zt(r),c=Ct(r),a=null!=(i=null==c?void 0:c[e])?i:xr(n,n.indexOf(r),e);if(!a)continue;const f=Tt(r),d={time:o,value:a.color};void 0!==f&&(d.easing=f),s.push(d);const v={time:o,value:a.offset};void 0!==f&&(v.easing=f),l.push(v),a.offset!==t.offset&&(u=!0)}const c={type:"stop",offset:Or(t.offset),stopColor:t.color},a={};return s.length&&(a.stopColor={keyframes:s},void 0!==o&&(a.stopColor.loop=o)),u&&l.length&&(a.offset={keyframes:l},void 0!==o&&(a.offset.loop=o)),Object.keys(a).length&&(c.animate=a),c}(t,o,n,0,i))}(t.stops),e}(n,o);return e.defs.push(i),t[r]="url(#"+o+")",t}function jr(t,n,e,r){var o,i,s;const l=or(r);if("absent"===l.kind)return;if("static"===l.kind)return t[n]=String(l.value[0]),void(t[e]=String(l.value[1]));const u=t=>{const n={keyframes:l.keyframes.map(n=>{const e={time:n.time,value:Array.isArray(n.value)?n.value[t]:void 0};return void 0!==n.easing&&(e.easing=n.easing),e})};return void 0!==l.loop&&(n.loop=l.loop),n},c=null!=(o=t.animate)?o:{};c[n]=u(0),c[e]=u(1),t.animate=c;const a=null!=(s=l.base)?s:null==(i=l.keyframes[0])?void 0:i.value;Array.isArray(a)&&(t[n]=String(a[0]),t[e]=String(a[1]))}function Mr(t){return{type:"stop",offset:Or(t.offset),stopColor:t.color}}function xr(t,n,e){for(let r=n;r>=0;r--){const n=Ct(t[r]);if(null==n?void 0:n[e])return n[e]}for(let r=n+1;r<t.length;r++){const n=Ct(t[r]);if(null==n?void 0:n[e])return n[e]}}function Or(t){return Math.round(1e3*t)/10+"%"}function Sr(t){return"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.pathData?t.pathData:void 0}function Nr(t,n,e){if(!n)return t;const r=function(t,n){var e;const r=or(t);if("absent"!==r.kind)return"static"===r.kind?r.value:(n.warnings.push("transformBy.origin: animated origin approximated by its first keyframe"),null==(e=r.keyframes[0])?void 0:e.value)}(n.origin,e);let o=t;return o=Pr(o,"translate",n.translate,void 0),o=Pr(o,"rotate",n.rotate,r),o=Pr(o,"scale",n.scale,r),o}function Pr(t,n,e,r,o){if(void 0===e)return t;const i=or("scale"===n&&Array.isArray(e)?[e[0]/100,e[1]/100]:e);if("static"===i.kind)return{type:"g",transform:{value:rr(n,zr(n,i.value),r)},children:[t]};if("animated"===i.kind){const e={keyframes:i.keyframes.map(t=>{const e=lr(t,rr(n,zr(n,t.value),r));return"translate"===n?a(a({},e),Cr(t)):e})};return void 0!==i.loop&&(e.loop=i.loop),{type:"g",animate:{transform:e},children:[t]}}return t}function zr(t,n){return"translate"===t?[-n[0],-n[1]]:"rotate"===t?-n:[1/n[0],1/n[1]]}function Cr(t){var n,e;const r={},o=null!=(n=t.tangentOut)?n:t.to,i=null!=(e=t.tangentIn)?e:t.ti;return Array.isArray(o)&&(r.tangentOut=[-o[0],-o[1]]),Array.isArray(i)&&(r.tangentIn=[-i[0],-i[1]]),r}function Tr(t){const n=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate:void 0;return!(!n||!n.transform)}function _r(t){let n=0,e=0;for(const r of t)r.translate&&(n+=r.translate[0],e+=r.translate[1]);return[n,e]}function Dr(t,n){let e=0,r=0;for(const o of t)if(o.translateKeyframes&&o.translateKeyframes.length){const t=Rr(o.translateKeyframes,n);e+=t[0],r+=t[1]}else o.translate&&(e+=o.translate[0],r+=o.translate[1]);return[e,r]}function Rr(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Er(t,n){var e,r,o;const i=t.transform,s=t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate)?t.animate.transform:void 0;if(void 0===i&&!s)return;const l={};if("string"==typeof i){const t=function(t,n){const e=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let r,o=0,i=0,s=!1,l=!1;for(;null!==(r=e.exec(t));){const t=r[1],n=r[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);"translate"===t?(o+=n[0]||0,i+=n[1]||0,s=!0):l=!0}return l&&n.warnings.push("maskedBy ancestor: non-translate transform in string ignored: "+t),s?[o,i]:void 0}(i,n);t&&(l.translate=t)}else if(i&&"object"==typeof i&&!i.keyframes){const t=i.value,e=t&&"object"==typeof t?t:i;e&&"object"==typeof e&&Array.isArray(e.translate)&&(l.translate=[e.translate[0]||0,e.translate[1]||0]),!e||void 0===e.rotate&&void 0===e.scale&&void 0===e.skew||n.warnings.push("maskedBy ancestor: non-translate transform parts ignored (rotate/scale not yet supported)")}if(s&&Array.isArray(s.keyframes)){const t=s.keyframes,i=[];for(const s of t){const t=null!=(e=s.value)?e:s.v,l=null!=(o=null!=(r=s.time)?r:s.t)?o:0;t&&"object"==typeof t&&Array.isArray(t.translate)&&(i.push({time:l,value:[t.translate[0]||0,t.translate[1]||0]}),void 0===t.rotate&&void 0===t.scale&&void 0===t.skew||n.warnings.push("maskedBy ancestor: animated non-translate parts ignored"))}i.length&&(l.translateKeyframes=i)}return l.translate||l.translateKeyframes?l:void 0}function Lr(t,n,e){if(!n)return;const r=pr(n.source);if(!r)return void(n.without===dt.translate&&e.errors.push("clone: content ref missing `source`"));const o=n.without===dt.translate&&e.contentRefInnerIds.get(r)||r;t.href="#"+o}function Fr(t,n){const e={};return void 0!==t.translate&&(e.translate=Ur(t.translate,t=>[t[0]*n,t[1]*n])),void 0!==t.rotate&&(e.rotate=Ur(t.rotate,t=>t*n)),void 0!==t.skew&&(e.skew=Ur(t.skew,t=>t*n)),void 0!==t.scale&&(e.scale=function(t,n){return Ur(t,t=>[Math.pow(t[0],n),Math.pow(t[1],n)],!0)}(t.scale,n)),void 0!==t.origin&&(e.origin=t.origin),Object.keys(e).length?e:void 0}function Ur(t,n,e=!1){const r=or(t);if("absent"===r.kind)return t;if("static"===r.kind){const o=n(r.value);return"number"!=typeof t&&!Array.isArray(t)||e?{value:o}:o}const o={keyframes:r.keyframes.map(t=>t&&void 0!==t.value?f(a({},t),{value:n(t.value)}):t)};return void 0!==r.loop&&(o.loop=r.loop),void 0!==r.autoOrient&&(o.autoOrient=r.autoOrient),void 0!==r.base&&(o.value=n(r.base)),o}var Br=!1;function Ir(t){var n,e;return{start:null!=(n=t.start)?n:0,stretch:null!=(e=t.stretch)?e:1}}var Vr=1;function Zr(t,n,e){const[r,o]=n;if(!Number.isFinite(r)||!Number.isFinite(o))return void e.warnings.push("retime: timeCrop is not a pair of finite numbers — ignored");const i=o<=r?[{time:0,value:0}]:[...r>0?[{time:Math.max(0,r-Vr),value:0}]:[],{time:Math.max(0,r),value:1},{time:o,value:1},{time:o+Vr,value:0}],s=a({},t);for(const n of Object.keys(t))delete t[n];t.type="g",t.children=[s],t.animate={opacity:{keyframes:i}}}function Gr(t,n){return{start:n.start+n.stretch*t.start,stretch:n.stretch*t.stretch}}function Wr(t){var n,e;return null==(e=null==(n=t.effects)?void 0:n.clone)?void 0:e.retime}function Jr(t){var n;const e=null==(n=t.effects)?void 0:n.clone;e&&(delete e.retime,0===Object.keys(e).length&&delete t.effects.clone,t.effects&&0===Object.keys(t.effects).length&&delete t.effects)}function Xr(t,n,e){const r=pr(t.href);if(!r)return void e.errors.push("retime: <use> has no href to follow");const o=qr(r,n,e,new Set);if(o)if(Br){const n=e.idMap.get(o);t.type="g",delete t.href,t.children=[n],yr(t),e.defs=e.defs.filter(t=>t!==n)}else t.href="#"+o}function qr(t,n,e,r){if(r.has(t))return void e.errors.push('retime: loop via "'+t+'"');const o=e.idMap.get(t);if(!o)return void e.warnings.push('retime: target "'+t+'" not found');const i=gr(o);if(function(t,n){dr(t,()=>mr(n,"retimed"))}(i,e),"use"===o.type?Kr(i,n.start,n.stretch):Qr(i,n.start,n.stretch),Jr(i),"use"===o.type&&o.href){const s=pr(o.href);if(s){const l=Wr(o),u=l?Gr(Ir(l),n):n,c=new Set(r);c.add(t);const a=qr(s,u,e,c);a&&(i.href="#"+a)}}else!function(t,n,e,r,o){const i=t=>{var s;const l=Wr(t);if("use"===t.type&&l&&t.href){const i=pr(t.href);if(i){const s=Gr(Ir(l),n),u=new Set(r);u.add(o);const c=qr(i,s,e,u);c&&(t.href="#"+c)}Jr(t)}null==(s=t.children)||s.forEach(i)};i(t)}(i,n,e,r,t);return e.defs.push(i),"string"==typeof i.id&&e.idMap.set(i.id,i),"string"==typeof i.id?i.id:void 0}function Qr(t,n,e){var r;Kr(t,n,e),null==(r=t.children)||r.forEach(t=>Qr(t,n,e))}function Kr(t,n,e){const r=t=>{for(const r of t)"number"==typeof r.time&&(r.time=n+r.time*e)};if(t.transform&&"object"==typeof t.transform&&Array.isArray(t.transform.keyframes)&&r(t.transform.keyframes),t.animate&&"object"==typeof t.animate)for(const n of Object.keys(t.animate)){const e=t.animate[n];e&&Array.isArray(e.keyframes)&&r(e.keyframes)}}var Yr=48,$r=/[MmLlHhVvCcSsQqTtAaZz]/;function Hr(t,n,e){return{P1:[t[0]+2/3*(n[0]-t[0]),t[1]+2/3*(n[1]-t[1])],P2:[e[0]+2/3*(n[0]-e[0]),e[1]+2/3*(n[1]-e[1])]}}function to(t){const n=function(t){const n=function(t){const n=[],e=/([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let r;for(;null!==(r=e.exec(t));)n.push(r[0]);return n}(t),e=[];let r=0,o=0,i=0,s=0,l=0,u=0,c=0,a=0,f=0,d="";const v=()=>parseFloat(n[r++]),y=(t,n,r)=>{const s=[o,i],l=re(s,t,n,r,Yr);e.push({P0:s,P1:t,P2:n,P3:r,C:l,B:l.ds[l.ds.length-1]}),o=r[0],i=r[1]},m=(t,n)=>{y([o+(t-o)/3,i+(n-i)/3],[o+2*(t-o)/3,i+2*(n-i)/3],[t,n])};for(;r<n.length;){let t=n[r];$r.test(t)?r++:t="M"===d?"L":"m"===d?"l":d;const e=t>="a",p=t.toUpperCase();if("Z"!==p){if("M"===p){const n=v()+(e?o:0),r=v()+(e?i:0);o=n,i=r,s=n,l=r,d=t;continue}if("L"===p)m(v()+(e?o:0),v()+(e?i:0));else if("H"===p)m(v()+(e?o:0),i);else if("V"===p)m(o,v()+(e?i:0));else if("C"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];u=n[0],c=n[1],y(t,n,r)}else if("S"===p){const t="C"===d.toUpperCase()||"S"===d.toUpperCase()?[2*o-u,2*i-c]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)],r=[v()+(e?o:0),v()+(e?i:0)];u=n[0],c=n[1],y(t,n,r)}else if("Q"===p){const t=[v()+(e?o:0),v()+(e?i:0)],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=Hr([o,i],t,n);y(r,s,n)}else if("T"===p){const t="Q"===d.toUpperCase()||"T"===d.toUpperCase()?[2*o-a,2*i-f]:[o,i],n=[v()+(e?o:0),v()+(e?i:0)];a=t[0],f=t[1];const{P1:r,P2:s}=Hr([o,i],t,n);y(r,s,n)}else{if("A"!==p){r++;continue}r+=5,m(v()+(e?o:0),v()+(e?i:0))}d=t}else m(s,l),o=s,i=l,d=t}return e.length?e:null}(t);if(!n)return null;const e=new Float64Array(n.length+1);for(let t=0;t<n.length;t++)e[t+1]=e[t]+n[t].B;const r=e[n.length],o=n[0].P0,i=n[n.length-1].P3,s=Math.hypot(i[0]-o[0],i[1]-o[1])<.001,l=t=>{let r=0;for(;r<n.length-1&&t>e[r+1];)r++;const o=n[r],i=t-e[r],s=o.B>0?function(t,n){const{ts:e,ds:r}=t,o=r.length-1;if(n<=0)return e[0];if(n>=r[o])return e[o];let i=1,s=o;for(;i<s;){const t=i+s>>>1;r[t]<n?i=t+1:s=t}const l=r[s-1],u=r[s]-l,c=u>0?(n-l)/u:0;return e[s-1]+c*(e[s]-e[s-1])}(o.C,i):0,[l,u]=Hn(o.P0,o.P1,o.P2,o.P3,s),[c,a]=ne(o.P0,o.P1,o.P2,o.P3,s);return{x:l,y:u,angle:Math.atan2(a,c)}};return{totalLength:r,closed:s,sampleAtDistance(t){if(s&&r>0&&(t<0||t>r))return l((t%r+r)%r);if(!s&&(t<0||t>r)){const n=t<0?0:r,e=l(n),o=t-n;return{x:e.x+Math.cos(e.angle)*o,y:e.y+Math.sin(e.angle)*o,angle:e.angle}}return l((e=r,(n=t)<0?0:n>e?e:n));var n,e}}}var no=.15;function eo(t){const n=or(t);if("static"===n.kind&&"number"==typeof n.value)return{min:n.value,max:n.value};if("animated"===n.kind&&n.keyframes.length){const t=n.keyframes.map(t=>Number(t.value)||0);return{min:Math.min(...t),max:Math.max(...t)}}return{min:0,max:0}}function ro(t){let n=0,e=16;const r=t=>{var o;const i=parseFloat(String(null!=(o=t.fontSize)?o:""))||0;i&&(e=Math.max(e,i));const s=t.textContent;if("string"==typeof s&&(n+=s.length),t.children)for(const n of t.children)r(n)};return r(t),n*e}var oo=t=>Math.round(1e3*t)/1e3;function io(t,n,e){null!=e&&ir(t,n,or(e),{U:!0})}var so=(t,n,e)=>{const r={type:t};for(const t in n)void 0!==n[t]&&(r[t]=n[t]);const o=Array.isArray(e)?e.filter(t=>null!=t):null!=e?[e]:[];return o.length&&(r.children=o),r};function lo(t,n){return Math.round(t)===t?""+Math.round(t):t.toFixed(n)}function uo(t,n){let e="";for(let r=0;r<t.length;r++){const o=lo(t[r],n);r>0&&45!==o.charCodeAt(0)&&(e+=" "),e+=o}return e}function co(t,n,e){return[t[0]*n+t[2]*e+t[4],t[1]*n+t[3]*e+t[5]]}var ao=/([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;function fo(t,n,e=2){const r=[];let o;for(ao.lastIndex=0;null!==(o=ao.exec(t));)r.push(o[0]);let i="",s=0;const l=()=>parseFloat(r[s++]);for(;s<r.length;){const t=r[s++];if("M"===t||"L"===t){const[r,o]=co(n,l(),l());i+=t+uo([r,o],e)}else if("C"===t){const[t,r]=co(n,l(),l()),[o,s]=co(n,l(),l()),[u,c]=co(n,l(),l());i+="C"+uo([t,r,o,s,u,c],e)}else if("Q"===t){const[t,r]=co(n,l(),l()),[o,s]=co(n,l(),l());i+="Q"+uo([t,r,o,s],e)}else"Z"!==t&&"z"!==t||(i+="Z")}return i}var vo=16,yo=["fontFamily","fontSize","fontWeight","fontStyle","textAnchor","letterSpacing","wordSpacing","textDecoration","textTransform","whiteSpace","x","y","dx","dy","lengthAdjust","fill","stroke","strokeWidth","effects",yt,"xml:space"],mo=["fillOpacity","fillRule","strokeOpacity","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","mixBlendMode","filter"],po=["fill","stroke","strokeWidth","opacity","fillOpacity","strokeOpacity","strokeDasharray","strokeDashoffset"];function ho(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return isNaN(n)?void 0:n}}function go(t){return"string"==typeof t?t:void 0}function bo(t){const n=t.animate;if(!n||"object"!=typeof n)return;let e;for(const t of po)void 0!==n[t]&&((null!=e?e:e={})[t]=n[t]);return e}function wo(t,n){var e,r,o,i,s,l,u,c,a,f;const d="text"===t.type,v=t.style,y=n=>{var e;return d?void 0:null!=(e=t[n])?e:null==v?void 0:v[n]},m={fontFamily:null!=(e=go(t.fontFamily))?e:n.fontFamily,fontSize:null!=(r=ho(t.fontSize))?r:n.fontSize,fill:null!=(o=t.fill)?o:n.fill,stroke:null!=(i=t.stroke)?i:n.stroke,strokeWidth:null!=(s=t.strokeWidth)?s:n.strokeWidth,letterSpacing:null!=(l=ho(t.letterSpacing))?l:n.letterSpacing,wordSpacing:null!=(u=ho(t.wordSpacing))?u:n.wordSpacing,opacity:null!=(c=ho(y("opacity")))?c:n.opacity,animate:null!=(a=d?void 0:bo(t))?a:n.animate};for(const t of mo){const e=null!=(f=y(t))?f:n[t];void 0!==e&&(m[t]=e)}return m}function Ao(t){var n,e,r;return{fontFamily:go(t.fontFamily),fontSize:null!=(n=ho(t.fontSize))?n:vo,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,letterSpacing:null!=(e=ho(t.letterSpacing))?e:0,wordSpacing:null!=(r=ho(t.wordSpacing))?r:0}}function ko(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&1!==t.opacity&&(n.opacity=t.opacity);for(const e of mo)void 0!==t[e]&&(n[e]=t[e]);return void 0!==t.animate&&(n.animate=t.animate),n}function jo(t,n,e,r){var o;const i=t.fontFamily?n[t.fontFamily]:e;return i||null==r||r.push('textGlyphs: no glyphs for font "'+(null!=(o=t.fontFamily)?o:"")+'"'),i}function Mo(t){const n=Object.keys(t);return 1===n.length?t[n[0]]:void 0}var xo=.6,Oo="px-missing-glyph";function So(t,n){if(t<=0||n<=0)return"";const e=.08*t,r=.92*t,o=.92*-n,i=r-e,s=-o,l=Math.max(1,.12*Math.min(i,s)),u="M"+e+" 0L"+r+" 0L"+r+" "+o+"L"+e+" "+o+"Z";if(i<=2*l||s<=2*l)return u;const c=e+l,a=r-l,f=-l,d=o+l;return u+"M"+c+" "+f+"L"+c+" "+d+"L"+a+" "+d+"L"+a+" "+f+"Z"}function No(t,n,e,r,o=0){const{x:i,y:s,angle:l}=t.sampleAtDistance(n),u=Math.cos(l),c=Math.sin(l),a=r/2;return[e*u,e*c,-e*c,e*u,i-e*u*a-o*c,s-e*c*a+o*u]}function Po(t){var n;const e=or(t);if("animated"===e.kind&&e.keyframes.length>=2){const t=[...e.keyframes].sort((t,n)=>(Number(t.time)||0)-(Number(n.time)||0)),n=t.map(t=>Number(t.time)||0),r=t.map(t=>Number(t.value)||0);return{animated:!0,I:n,loop:e.loop,at(t){if(t<=n[0])return r[0];for(let e=1;e<n.length;e++)if(t<=n[e]){const o=n[e]-n[e-1],i=o>0?(t-n[e-1])/o:1;return r[e-1]+i*(r[e]-r[e-1])}return r[r.length-1]}}}const r="animated"===e.kind?Number(null==(n=e.keyframes[0])?void 0:n.value)||0:"static"===e.kind&&Number(e.value)||0;return{animated:!1,I:[],at:()=>r}}var zo=48,Co=64;function To(t,n){const e=u(10,n);return Math.round(t*e)/e}function _o(t){const n={};void 0!==t.fill&&(n.fill=t.fill),void 0!==t.stroke&&(n.stroke=t.stroke),void 0!==t.strokeWidth&&(n.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(n.opacity=t.opacity);for(const e of mo)void 0!==t[e]&&(n[e]=t[e]);return n}function Do(t){return t?{[mt]:Oo}:{}}function Ro(t,n,e){if(!t.length)return null==e||e.push("textGlyphs: nothing to render"),[];const r=new Map;for(const n of t){const t=JSON.stringify([n.V,!!n.Z]),e=fo(n.G,n.m),o=r.get(t);o?o.d+=e:r.set(t,{V:n.V,d:e,Z:n.Z})}const o=[];for(const{V:t,d:e,Z:i}of r.values())o.push(n("path",a(a(a({d:e},_o(t)),Do(i)),void 0!==t.animate?{animate:a({},t.animate)}:{}),[]));return o}function Eo(t,n,e){const r={};for(const n of Object.keys(t))"type"!==n&&"children"!==n&&-1===yo.indexOf(n)&&(r[n]=t[n]);if(r.style&&"object"==typeof r.style){const t=a({},r.style);delete t["white-space"],Object.keys(t).length?r.style=t:delete r.style}return e("g",r,n)}function Lo(t,n){const e=f(a({},t),{type:"g",children:n});return delete e.d,delete e.strokeDasharray,delete e.strokeDashoffset,delete e.effects,e}function Fo(t,n,e,r,o,i,s,l){const u=Bo(r,e,o),c=Io(e,o),a=Zo(i,u),f=Zo(s,c),d=Jo(s),v={type:"path",d:Pn(n)};return Go(v,"strokeDasharray",f),Go(v,"strokeDashoffset",a),Go(v,"strokeOpacity",d),[v]}var Uo=1;function Bo(t,n,e){const[r]=Vo(e);return e=>n*(-e-r+t)+Uo}function Io(t,n){const[e,r]=Vo(n),o=r-e+1;return n=>{const e=$n(n[0],0,1),r=$n(n[1],0,1),i=Math.min(e,r),s=Math.max(e,r),l=[0];let u=Uo;for(let n=0;n<o;n++)l.push(u+i*t),l.push((s-i)*t),u=(1-s)*t;return l.push(u+Uo),l}}function Vo(t){return[Math.floor(Math.min(-t[0],-t[1])),Math.ceil(Math.max(-t[0],-t[1]))]}function Zo(t,n){if("absent"!==t.kind)return"static"===t.kind?{kind:"static",value:n(t.value)}:{kind:"animated",keyframes:t.keyframes.map(t=>({time:zt(t),value:n(Ct(t)),easing:Tt(t)})),loop:t.loop}}function Go(t,n,e){e&&ir(t,n,e)}var Wo=10;function Jo(t){const n=t=>t[0]===t[1];if("absent"===t.kind)return;if("static"===t.kind)return n(t.value)?{kind:"static",value:0}:void 0;const e=t.keyframes;let r=!1,o=!0;for(const t of e)n(Ct(t))?r=!0:o=!1;if(!r)return;if(o)return{kind:"static",value:0};const i=[];for(let t=0;t<e.length;t++){const r=e[t],o=t>0?e[t-1]:void 0,s=t<e.length-1?e[t+1]:void 0,l=zt(r),u=n(Ct(r)),c=o?u&&n(Ct(o)):u,a=s?u&&n(Ct(s)):u;c&&!a?(i.push({time:l,value:0}),i.push({time:l+Wo,value:1})):!c&&a&&(i.push({time:l-Wo,value:1}),i.push({time:l,value:0}))}return i.length<=1?void 0:{kind:"animated",keyframes:i}}function Xo(t,n){const e=e=>{const r=(e-t.time)/(n.time-t.time),o=t.value[0]+(n.value[0]-t.value[0])*r;return t.value[1]+(n.value[1]-t.value[1])*r-o};let r=t.time,o=n.time,i=e(r);if(0===i)return r;const s=e(o);if(0===s)return o;if(i*s>0)return null;for(let t=0;t<100;t++){const t=(r+o)/2,n=e(t);if(0===n||Math.abs(o-r)<1e-4)return t;i*n<0?o=t:(r=t,i=n)}return(r+o)/2}function qo(t,n){if(n<=t[0].time)return t[0].value;if(n>=t[t.length-1].time)return t[t.length-1].value;for(let e=1;e<t.length;e++)if(n<=t[e].time){const r=t[e-1],o=t[e],i=(n-r.time)/(o.time-r.time);return[r.value[0]+(o.value[0]-r.value[0])*i,r.value[1]+(o.value[1]-r.value[1])*i]}return t[t.length-1].value}function Qo(t){const n=t.v;if(!n||n.length<2)return 0;let e=0;for(let r=0;r<n.length-1;r++)e+=Ko(t,r,r+1);return t.c&&n.length>1&&(e+=Ko(t,n.length-1,0)),e}function Ko(t,n,e){var r,o,i,s;const l=t.v,u=l[n],c=l[e],a=re(u,null!=(o=null==(r=t.o)?void 0:r[n])?o:u,null!=(s=null==(i=t.i)?void 0:i[e])?s:c,c);return a.ds[a.ds.length-1]}var Yo=.5522847498307936;function $o(t){var n,e;const r={defs:[],warnings:[],errors:[],idMap:new Map,nextId:0,contentRefInnerIds:new Map,maskAncestorChains:new Map,engine:it(null==(n=kt(t))?void 0:n.engine),glyphs:null==(e=xt(t))?void 0:e.fonts},o=gr(t);hr(o,r.idMap),br(o,r,()=>mr(r,"inner")),function(t,n){const e=new Set,r=t=>{var o,i;const s=pr(null==(i=null==(o=t.effects)?void 0:o.maskedBy)?void 0:i.source);if("string"==typeof s){e.add(t);const r=n.idMap.get(s);r&&e.add(r)}if(Array.isArray(t.children))for(const n of t.children)r(n)};if(r(t),0===e.size)return;const o=(t,r)=>{if(e.has(t)&&n.maskAncestorChains.set(t,r),Array.isArray(t.children)){const e=Er(t,n),i=e?[...r,e]:r;for(const n of t.children)o(n,i)}};o(t,[])}(o,r);const i=function(t,n){return function(t,n){n.idMap.clear(),hr(t,n.idMap);const e=[],r=t=>{var n;Wr(t)&&e.push(t),null==(n=t.children)||n.forEach(r)};r(t);const o=new Map;for(const t of e){let e=0;const r=new Set,i=o=>{var s;if(o){if(o!==t&&Wr(o)&&e++,"use"===o.type&&o.href){const t=pr(o.href);t&&!r.has(t)&&(r.add(t),i(n.idMap.get(t)))}null==(s=o.children)||s.forEach(i)}},s=pr(t.href);s&&(r.add(s),i(n.idMap.get(s))),o.set(t,e)}e.sort((t,n)=>{var e,r;return(null!=(e=o.get(n))?e:0)-(null!=(r=o.get(t))?r:0)});for(const t of e){const e=Wr(t);if(!e)continue;const r=e.timeCrop;Jr(t),Xr(t,Ir(e),n),r&&Zr(t,r,n)}}(t,n),t}(Ho(o,r),r);return function(t,n){n.length&&(t.children||(t.children=[])).unshift({type:"defs",children:n})}(i,r.defs),{root:i,defs:r.defs,warnings:r.warnings,errors:r.errors}}function Ho(t,n){t.children&&(t.children=t.children.map(t=>Ho(t,n)));const e=t.effects,r="string"==typeof t.id?t.id:void 0,o=r?n.contentRefInnerIds.get(r):void 0;if(!e&&!o)return t;const{transformBy:i,repeater:s,maskedBy:l,clipPath:u,strokeTrim:c,clone:d,fillGradient:v,strokeGradient:y,textPath:m,text:p}=null!=e?e:{};e&&delete t.effects;let h=t,g=!1;if(null==p?void 0:p.useGlyphs)if(m){const t="string"==typeof m.pathData?m.pathData:void 0,e=function(t,n,e,r,o,i){return n.glyphs?function(t,n,e,r,o,i){const{glyphs:s,create:l=so,warnings:u}=r,c=n?to(n):null;if(!c)return null==u||u.push("textGlyphs: unparsable along-path geometry"),null;const d=Mo(s),{cells:v,width:y}=function(t,n,e,r){const o=[];let i=0;const s=(t,l)=>{var u,c;const a=wo(t,l),f=go(t[yt]);if(f&&!(null==(u=t.children)?void 0:u.length)){const t=jo(a,n,e,r);if(t){const n=a.fontSize/t.unitsPerEm,e=null!=(c=t.ascent)?c:.9*t.unitsPerEm,r=ko(a);for(let s=0;s<f.length;s++){const l=f.charAt(s),u=t.glyphs[l];if(u&&u.pathData){const t=u.width*n;o.push({G:u.pathData,W:u.width,scale:n,V:r,J:i+t/2}),i+=t}else if(/\S/.test(l)){const s=u&&u.width>0?u.width:xo*t.unitsPerEm,l=s*n;o.push({G:So(s,e),W:s,scale:n,V:r,Z:!0,J:i+l/2}),i+=l}else i+=(u?u.width:0)*n;i+=a.letterSpacing+(" "===l?a.wordSpacing:0)}}}if(t.children)for(const n of t.children)s(n,a)};return s(t,Ao(t)),{cells:o,width:i}}(t,s,d,u);if(!v.length)return Eo(t,[],l);const{X:m,q:p}=function(t){var n,e,r;return{X:(null!=(n=ho(t.x))?n:0)+(null!=(e=ho(t.dx))?e:0),q:null!=(r=ho(t.dy))?r:0}}(t),h=Po(e),g=Po(o),b=t=>t>0&&y>0?t/y:1,w="clip"===i&&!c.closed;if(h.animated||g.animated){const n=function(t,n){const e=[...t,...n].sort((t,n)=>t-n),r=[];for(const t of e)r.length&&t===r[r.length-1]||r.push(t);return r}(h.I,g.I),e=(t,n)=>m+h.at(n)+b(g.at(n))*t.J,r=h.animated?h.loop:g.loop;return Eo(t,function(t,n,e,r,o,i,s,l=0){const u=Math.max(n.totalLength/zo,.5),c=t=>t>=0&&t<=n.totalLength,d=[];for(const v of t){const t=[v.scale,0,0,v.scale,-v.scale*(v.W/2),0],y=fo(v.G,t),m=(t,e)=>{const{x:r,y:o,angle:i}=n.sampleAtDistance(t),s=Math.cos(i),u=Math.sin(i);return{time:e,value:{translate:[To(r-l*u,3),To(o+l*s,3)],rotate:To(180*i/Math.PI,3)}}},p=[],h=[],g=(t,n)=>{p.push(m(t,n)),s&&h.push({time:n,value:c(t)?1:0})};g(e(v,r[0]),r[0]);for(let t=1;t<r.length;t++){const n=r[t-1],o=r[t],i=e(v,n),s=e(v,o),l=Math.min(Co,Math.max(1,Math.ceil(Math.abs(s-i)/u)));for(let t=1;t<=l;t++){const r=n+t/l*(o-n);g(e(v,r),r)}}xe(p);const b={keyframes:p};void 0!==o&&(b.loop=o);const w={transform:b};if(v.V.animate&&Object.assign(w,v.V.animate),s&&h.some(t=>0===t.value)){const t={keyframes:h};void 0!==o&&(t.loop=o),w.opacity=t}d.push(i("path",f(a(a({d:y},_o(v.V)),Do(v.Z)),{animate:w}),[]))}return d}(v,c,e,n,r,l,w,p),l)}const A=b(g.at(0)),k=m+h.at(0);return Eo(t,Ro((w?v.filter(t=>{const n=k+t.J*A;return n>=0&&n<=c.totalLength}):v).map(t=>({G:t.G,V:t.V,Z:t.Z,m:No(c,k+t.J*A,t.scale,t.W,p)})),l,u),l)}(t,e,r,{glyphs:n.glyphs,warnings:n.warnings},o,i):(n.warnings.push("textGlyphs: no definitions.fonts"),null)}(h,n,t,m.startOffset,m.textLength,m.pathOverflow);e&&(h=e,g=!0)}else h=function(t,n,e){return(null==n?void 0:n.useGlyphs)?e.glyphs?function(t,n){var e,r,o;const{glyphs:i,create:s=so,warnings:l}=n,u=Mo(i),c={x:null!=(e=ho(t.x))?e:0,y:null!=(r=ho(t.y))?r:0},a=[],f=[{start:c.x,end:c.x}];let d=0;const v=(t,n)=>{var e;const r=jo(n,i,u,l),o=(null==r?void 0:r.unitsPerEm)||1e3,s=n.fontSize/o,v=null!=(e=null==r?void 0:r.ascent)?e:.9*o,y=ko(n);for(let e=0;e<t.length;e++){const i=t.charAt(e),l=null==r?void 0:r.glyphs[i];if(l&&l.pathData)a.push({G:l.pathData,m:[s,0,0,s,c.x,c.y],V:y,line:d,x:c.x,y:c.y,scale:s}),c.x+=l.width*s;else if(/\S/.test(i)){const t=l&&l.width>0?l.width:xo*o;a.push({G:So(t,v),m:[s,0,0,s,c.x,c.y],V:y,Z:!0,line:d,x:c.x,y:c.y,scale:s}),c.x+=t*s}else c.x+=(l?l.width:0)*s;c.x+=n.letterSpacing+(" "===i?n.wordSpacing:0),f[d].end=c.x}},y=(t,n)=>{var e,r,o;const i=wo(t,n),s=ho(t.x),l=ho(t.y);void 0!==s&&(c.x=s,d=f.length,f.push({start:c.x,end:c.x})),void 0!==l&&(c.y=l),c.x+=null!=(e=ho(t.dx))?e:0,c.y+=null!=(r=ho(t.dy))?r:0;const u=go(t[yt]);if(u&&!(null==(o=t.children)?void 0:o.length)&&v(u,i),t.children)for(const n of t.children)y(n,i)},m=Ao(t);if(t.children)for(const n of t.children)y(n,m);const p=go(t[yt]);p&&!(null==(o=t.children)?void 0:o.length)&&v(p,m);const h=go(t.textAnchor);if("middle"===h||"end"===h)for(const t of a){const n=f[t.line].end-f[t.line].start,e="middle"===h?-n/2:-n;t.m=[t.scale,0,0,t.scale,t.x+e,t.y]}return Eo(t,Ro(a,s,l),s)}(t,{glyphs:e.glyphs,warnings:e.warnings}):(e.warnings.push("textGlyphs: no definitions.fonts — left as native <text>"),t):t}(h,p,n),g=!0;return g||(h=function(t,n,e){var r;if(!n||"string"!=typeof n.pathData||!n.pathData)return t;const o=mr(e,"tpath"),{d:i,startShift:s}=function(t,n){var e;if("clip"===n.pathOverflow)return{d:t,startShift:0};const r=to(t);if(!r||r.closed||r.totalLength<=0)return{d:t,startShift:0};const o=r.totalLength,i=no*o,s=eo(n.startOffset),l=eo(n.textLength).max||(null!=(e=n.advance)?e:0),u=Math.max(0,-s.min),c=Math.max(0,s.max+l-o),a=u>0?u+i:0,f=c>0?c+i:0;if(f<=0&&a<=0)return{d:t,startShift:0};const d=r.sampleAtDistance(0),v=r.sampleAtDistance(o);let y=t;if(a>0){const n=d.x-Math.cos(d.angle)*a,e=d.y-Math.sin(d.angle)*a,r=t.replace(/^\s*[Mm]\s*-?[\d.]+[\s,]+-?[\d.]+/,"");y="M"+oo(n)+","+oo(e)+"L"+oo(d.x)+","+oo(d.y)+r}if(f>0){const t=v.x+Math.cos(v.angle)*f,n=v.y+Math.sin(v.angle)*f;y+="L"+oo(t)+","+oo(n)}return{d:y,startShift:a}}(n.pathData,{pathOverflow:n.pathOverflow,startOffset:n.startOffset,textLength:n.textLength,advance:ro(t)});e.defs.push({type:"path",id:o,d:i});const l={type:"textPath",href:"#"+o,children:null!=(r=t.children)?r:[]};return void 0!==n.lengthAdjust&&(l.lengthAdjust=n.lengthAdjust),void 0!==n.method&&(l.method=n.method),void 0!==n.spacing&&(l.spacing=n.spacing),io(l,"startOffset",function(t,n){if(!n||null==t)return t;const e=or(t);if("absent"===e.kind)return t;if("static"===e.kind)return"number"==typeof t?e.value+n:{value:e.value+n};const r={keyframes:e.keyframes.map(t=>f(a({},t),{value:(Number(t.value)||0)+n}))};return void 0!==e.loop&&(r.loop=e.loop),void 0!==e.autoOrient&&(r.autoOrient=e.autoOrient),void 0!==e.base&&(r.value=e.base+n),r}(n.startOffset,s)),io(l,"textLength",n.textLength),t.children=[l],t}(h,m,n)),h=function(t,n,e){return kr(t,n,e,"fill")}(h,v,n),h=function(t,n,e){return kr(t,n,e,"stroke")}(h,y,n),h=function(t,n){if(!n)return t;const e=n.subPaths===vt.combined,r=[],o=t=>{if(Array.isArray(t.children)&&t.children.length>0){for(const n of t.children)o(n);return}const n="string"==typeof t.d?t.d:function(t){var n,e,r,o,i,s,l,u,c,a;if("rect"===t.type){const i=Number(null!=(n=t.x)?n:0),s=Number(null!=(e=t.y)?e:0),l=Number(null!=(r=t.width)?r:0),u=Number(null!=(o=t.height)?o:0);return"M"+(i+l)+","+s+"L"+(i+l)+","+(s+u)+"L"+i+","+(s+u)+"L"+i+","+s+"L"+(i+l)+","+s+"z"}if("ellipse"===t.type||"circle"===t.type){const n=Number(null!=(i=t.cx)?i:0),e=Number(null!=(s=t.cy)?s:0),r="circle"===t.type?Number(null!=(l=t.r)?l:0):Number(null!=(u=t.rx)?u:0),o="circle"===t.type?Number(null!=(c=t.r)?c:0):Number(null!=(a=t.ry)?a:0);if(!(r>0&&o>0))return;const f=r*Yo,d=o*Yo,v=(t,n,e,r,o,i)=>"C"+t+","+n+" "+e+","+r+" "+o+","+i;return"M"+(n+r)+","+e+v(n+r,e+d,n+f,e+o,n,e+o)+v(n-f,e+o,n-r,e+d,n-r,e)+v(n-r,e-d,n-f,e-o,n,e-o)+v(n+f,e-o,n+r,e-d,n+r,e)+"z"}}(t);if(void 0===n)return;const e=Ie(n);if(!e.length)return;const i={leaf:t,K:[]};for(const t of e){const n=Qo(t);i.K.push({Y:t,$:n,H:0})}r.push(i)};if(o(t),!r.length)return t;let i=0;const s=e?[...r].reverse():r;for(const t of s)for(const n of t.K)e||(i=0),n.H=i,i+=n.$;const l=i;if(e&&l<.001)return t;const u=or(n.offset),c="absent"===u.kind?{kind:"static",value:0}:u,d=function(t){const n=or(t);if("animated"!==n.kind)return n;const e=n.keyframes.map(t=>({time:zt(t),value:Ct(t),easing:Tt(t)}));if(!e.some(t=>t.value[0]>t.value[1]))return{kind:"animated",keyframes:e.map(t=>({time:t.time,value:t.value,easing:t.easing}))};const r=[];for(let t=1;t<e.length;t++){const n=e[t-1],o=e[t];if((n.value[1]-n.value[0])*(o.value[1]-o.value[0])<0){const t=Xo(n,o);null!==t&&t>n.time&&t<o.time&&r.push(Math.round(t))}}const o=Array.from(new Set(r)).sort((t,n)=>t-n),i=[];let s=0;for(const t of e){for(;s<o.length&&o[s]<t.time;){const t=o[s++],n=qo(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}const n=t.value[0]>t.value[1]?[t.value[1],t.value[0]]:t.value;i.push({time:t.time,value:n,easing:t.easing})}for(;s<o.length;){const t=o[s++],n=qo(e,t),r=(n[0]+n[1])/2;i.push({time:t,value:[r,r]})}return{kind:"animated",keyframes:i}}(n.range),v="absent"===d.kind?{kind:"static",value:[0,1]}:d,y=function(t){if("absent"===t.kind)return[];if("static"===t.kind)return[t.value];const n=[];for(const e of t.keyframes){const t=Ct(e);"number"==typeof t&&n.push(t)}return n}(c),m=[y.length?Math.min(...y):0,y.length?Math.max(...y):0];if(1===r.length&&r[0].leaf===t&&1===r[0].K.length){const n=r[0],o=n.K[0],i=e?l:o.$;if(i<.001)return t;const s=e?o.H/i:0;return function(t,n,e,r,o,i){const s=Bo(e,n,r),l=Io(n,r),u=a({},t);return delete u.effects,Go(u,"strokeDasharray",Zo(i,l)),Go(u,"strokeDashoffset",Zo(o,s)),Go(u,"strokeOpacity",Jo(i)),u}(n.leaf,i,s,m,c,v)}const p=new Map;for(const t of r){const n=[];for(const r of t.K){const o=e?l:r.$;if(o<.001)continue;const i=e?r.H/o:0;n.push(...Fo(t.leaf,r.Y,o,i,m,c,v))}p.set(t.leaf,Lo(t.leaf,n))}const h=t=>p.get(t)||(Array.isArray(t.children)&&t.children.length>0?f(a({},t),{children:t.children.map(h)}):t);return h(t)}(h,c),h=function(t,n,e){var r,o;if(!n)return t;const i=null!=(r=n.copies)?r:1;if(i<1)return e.errors.push("repeater.copies invalid: "+n.copies),t;const s=t.transform,l=null==(o=t.animate)?void 0:o.transform,u=gr(t);delete u.transform,u.animate&&(delete u.animate.transform,0===Object.keys(u.animate).length&&delete u.animate),delete u.id;const c=[u];for(let t=1;t<i;t++){const e=gr(u),r=Fr(n,t),o=r?ur(e,r):e;c.push(o)}const a={type:"g",children:c};return t.id&&(a.id=t.id),void 0!==s&&(a.transform=s),void 0!==l&&(a.animate={transform:l}),a}(h,s,n),h=function(t,n,e,r){if(!n)return t;const o=pr(n.source);if(!o)return r.errors.push("maskedBy.source missing — cannot build mask"),t;const i=mr(r,"mask");let s={type:"use",href:"#"+o};if(e)s=Nr(s,e,r);else if(Tr(t))s=function(t,n){var e;const r=n.animate&&"object"==typeof n.animate&&!Array.isArray(n.animate)?n.animate:void 0,o=null==r?void 0:r.transform,i=o&&"object"==typeof o&&Array.isArray(o.keyframes)?o.keyframes:void 0;if(!i||!i.length)return t;const s=[],l=[],u=[];for(const t of i){const n=(null!=(e=t.value)?e:t.v)||{},r=lr(t,void 0);if(Array.isArray(n.translate)&&s.push(f(a(a({},r),Cr(t)),{value:{translate:[-n.translate[0],-n.translate[1]]}})),"number"==typeof n.rotate){const t={rotate:-n.rotate};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),l.push(f(a({},r),{value:t}))}if(Array.isArray(n.scale)){const t={scale:[1/n.scale[0],1/n.scale[1]]};Array.isArray(n.origin)&&(t.origin=[n.origin[0],n.origin[1]]),u.push(f(a({},r),{value:t}))}}const c=null==o?void 0:o.loop,d=t=>{const n={keyframes:t};return void 0!==c&&(n.loop=c),n};let v=t;return s.length&&(v={type:"g",animate:{transform:d(s)},children:[v]}),l.length&&(v={type:"g",animate:{transform:d(l)},children:[v]}),u.length&&(v={type:"g",animate:{transform:d(u)},children:[v]}),v}(s,t);else{const n=function(t){if("string"==typeof t.transform){const n=function(t){var n,e,r,o,i,s,l,u,c,a,f,d,v;const y=/([a-zA-Z]+)\s*\(([^)]*)\)/g;let m;const p=[];for(;null!==(m=y.exec(t));){const t=m[2].split(/[\s,]+/).filter(t=>t.length>0).map(Number);p.push({name:m[1],tt:t})}if(!p.length)return;const h=p[p.length-1];if("translate"===h.name)for(let t=p.length-2;t>=0;t--){const a=p[t];if("translate"!==a.name)continue;const f=null!=(n=a.tt[0])?n:0,d=null!=(e=a.tt[1])?e:0,v=null!=(r=h.tt[0])?r:0,y=null!=(o=h.tt[1])?o:0;if(v!==-f||y!==-d)continue;const m={};m.origin=[f,d];for(let n=0;n<t;n++)if("translate"===p[n].name){const t=null!=(i=p[n].tt[0])?i:0,e=null!=(s=p[n].tt[1])?s:0;m.translate=m.translate?[m.translate[0]+t,m.translate[1]+e]:[t,e]}for(let n=t+1;n<p.length-1;n++){const t=p[n];if("rotate"===t.name)m.rotate=(null!=(l=m.rotate)?l:0)+(null!=(u=t.tt[0])?u:0);else if("scale"===t.name){const n=null!=(c=t.tt[0])?c:1,e=t.tt.length>1?t.tt[1]:n;m.scale=m.scale?[m.scale[0]*n,m.scale[1]*e]:[n,e]}}return m}let g,b,w;for(const t of p)if("translate"===t.name){const n=null!=(a=t.tt[0])?a:0,e=null!=(f=t.tt[1])?f:0;g=g?[g[0]+n,g[1]+e]:[n,e]}else if("rotate"===t.name)b=(null!=b?b:0)+(null!=(d=t.tt[0])?d:0);else if("scale"===t.name){const n=null!=(v=t.tt[0])?v:1,e=t.tt.length>1?t.tt[1]:n;w=w?[w[0]*n,w[1]*e]:[n,e]}const A={};return g&&(A.translate=g),void 0!==b&&(A.rotate=b),w&&(A.scale=w),Object.keys(A).length?A:void 0}(t.transform);if(!n)return;const e={};return n.translate&&(e.translate=n.translate),void 0!==n.rotate&&(e.rotate=n.rotate),n.scale&&(e.scale={value:n.scale}),n.origin&&(e.origin=n.origin),Object.keys(e).length?e:void 0}if(t.transform&&"object"==typeof t.transform&&!t.transform.keyframes){const n=t.transform.value,e=n&&"object"==typeof n?n:t.transform;if(e&&"object"==typeof e){const t={};return Array.isArray(e.translate)&&(t.translate=e.translate),"number"==typeof e.rotate&&(t.rotate=e.rotate),"number"==typeof e.skew&&(t.skew=e.skew),Array.isArray(e.scale)&&(t.scale={value:e.scale}),Array.isArray(e.origin)&&(t.origin=e.origin),Object.keys(t).length?t:void 0}}}(t);n&&(s=Nr(s,n,r))}const l=void 0===e&&!function(t){return"string"==typeof t.transform||!(!t.transform||"object"!=typeof t.transform)||Tr(t)}(t);s=function(t,n,e,r,o){const i=r.idMap.get(e),s=r.maskAncestorChains.get(n)||[],l=o?Er(n,r):void 0,u=l?[...s,l]:s,c=i&&r.maskAncestorChains.get(i)||[];if(!u.length&&!c.length)return t;const a=new Set;for(const t of u)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);for(const t of c)if(t.translateKeyframes)for(const n of t.translateKeyframes)a.add(n.time);if(!(a.size>0)){const n=_r(u),e=_r(c),r=e[0]-n[0],o=e[1]-n[1];return 0===r&&0===o?t:{type:"g",transform:"translate("+r+","+o+")",children:[t]}}return{type:"g",animate:{transform:{keyframes:Array.from(a).sort((t,n)=>t-n).map(t=>{const n=Dr(u,t),e=Dr(c,t);return{time:t,value:{translate:[e[0]-n[0],e[1]-n[1]]}}})}},children:[t]}}(s,t,o,r,l);const u={type:"mask",id:i,children:[s]};return n.maskType&&(u.maskType=n.maskType),n.maskUnits&&(u.maskUnits=n.maskUnits),n.maskContentUnits&&(u.maskContentUnits=n.maskContentUnits),void 0!==n.x&&(u.x=String(n.x)),void 0!==n.y&&(u.y=String(n.y)),void 0!==n.width&&(u.width=String(n.width)),void 0!==n.height&&(u.height=String(n.height)),r.defs.push(u),t.mask="url(#"+i+")",t}(h,l,i,n),h=function(t,n,e){if(!(null==n?void 0:n.pathData))return t;const r=mr(e,"clip"),o={type:"path"},i=or(n.pathData);return"absent"!==i.kind&&("static"===i.kind?o.d=Sr(i.value):(ir(o,"d",i),void 0!==o.d&&(o.d=Sr(o.d)))),e.defs.push({type:"clipPath",id:r,children:[o]}),t.clipPath="url(#"+r+")",t}(h,u,n),o?(Lr(h,d,n),h=function(t,n,e,r){const o=function(t,n){var e,r,o;const i={};let s=!1;const l=null==(e=t.animate)?void 0:e.transform;if(l&&"object"==typeof l&&Array.isArray(l.keyframes)){const n=l.keyframes;if(n.some(t=>t.value&&t.value.translate)){const e=Ar(l),r={keyframes:n.map(t=>{const n=t.value||{},r={};void 0!==n.translate&&(r.translate=n.translate),e&&void 0!==n.origin&&(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),void 0!==t.tangentOut&&(o.tangentOut=t.tangentOut),void 0!==t.tangentIn&&(o.tangentIn=t.tangentIn),o})};l.autoOrient&&(r.autoOrient=!0);const o=l.loop;void 0!==o&&(r.loop=o),i.animate={transform:r};const u=n.some(t=>{const n=t.value||{};return void 0!==n.rotate||void 0!==n.scale}),c=n.map(t=>{const n=t.value||{},r={};void 0!==n.rotate&&(r.rotate=n.rotate),void 0!==n.scale&&(r.scale=n.scale),void 0===n.origin||e&&!u||(r.origin=n.origin);const o={value:r};return void 0!==t.time&&(o.time=t.time),void 0!==t.easing&&(o.easing=t.easing),o});if(c.every(t=>0===Object.keys(t.value).length))delete t.animate.transform,t.animate&&0===Object.keys(t.animate).length&&delete t.animate;else{const n={keyframes:c};void 0!==o&&(n.loop=o),t.animate.transform=n}s=!0}}const u=void 0!==(null==n?void 0:n.translate),c=s||u,f=s&&Ar((null==(r=t.animate)?void 0:r.transform)||void 0)||s&&Ar((null==(o=i.animate)?void 0:o.transform)||void 0);if("string"==typeof t.transform){const n=function(t){const n=[],e=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let r;for(;r=e.exec(t);)n.push({name:r[1],nt:r[0]});if(!n.length)return{et:t||void 0};if(n.every(t=>"translate"===t.name))return{translate:n.map(t=>t.nt).join("")};const o=n[0],i=n[n.length-1];if("translate"===i.name&&"translate"===o.name){const e=wr(i.nt),r=wr(o.nt),s=-e[0],l=-e[1],u=r[0]-s,c=r[1]-l;return 0===u&&0===c?{et:t}:{translate:"translate("+u+","+c+")",et:"translate("+s+","+l+")"+n.slice(1).map(t=>t.nt).join("")}}if("translate"===i.name)return{et:t};const s=[];let l=0;for(;l<n.length&&"translate"===n[l].name;)s.push(n[l].nt),l++;if(!s.length)return{et:t};const u=n.slice(l).map(t=>t.nt).join("");return{translate:s.join(""),et:u||void 0}}(t.transform);c?void 0!==n.translate?n.et?t.transform=n.et:delete t.transform:(function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g,e=[];let r;for(;r=n.exec(t);)e.push({name:r[1],nt:r[0]});if(1!==e.length)return!1;if("translate"===e[0].name)return!0;if("matrix"!==e[0].name)return!1;const o=/matrix\(([^)]*)\)/.exec(e[0].nt);if(!o)return!1;const i=o[1].split(/[\s,]+/).filter(Boolean).map(Number);return i.length>=4&&1===i[0]&&0===i[1]&&0===i[2]&&1===i[3]}(t.transform)||f&&function(t){const n=/(translate|rotate|scale|matrix|skewX|skewY)\(([^)]*)\)/g;let e,r=0,o=!1;for(;e=n.exec(t);)r++,"matrix"===e[1]&&(o=!0);return 1===r&&o}(t.transform))&&delete t.transform:n.translate&&(i.transform=n.translate,n.et?t.transform=n.et:delete t.transform)}else if(t.transform&&"object"==typeof t.transform&&!Array.isArray(t.transform)&&!t.transform.keyframes){const n=t.transform.value,e=!(!n||"object"!=typeof n),r=e?n:t.transform,o=t=>e?{value:t}:t;if(Array.isArray(r.translate)){const n=a({},r);delete n.translate;const e=Object.keys(n).length>0;c||(i.transform=o({translate:r.translate})),e?t.transform=o(n):delete t.transform}}return i}(t,n);"string"==typeof t.id&&delete t.id;const{rt:i,inner:s}=function(t){if(!t)return{};const n=Ar(t.translate),e=void 0!==t.rotate||void 0!==t.scale,r={},o={};return void 0!==t.translate&&(r.translate=t.translate),n&&void 0!==t.origin&&(r.origin=t.origin),void 0!==t.rotate&&(o.rotate=t.rotate),void 0!==t.scale&&(o.scale=t.scale),void 0!==t.skew&&(o.skew=t.skew),void 0===t.origin||n&&!e||(o.origin=t.origin),{rt:Object.keys(r).length?r:void 0,inner:Object.keys(o).length?o:void 0}}(n);let l=t;l=ur(l,s);let u={type:"g",id:e,children:[{type:"g",id:r,children:[l]}]};return void 0!==o.transform&&(u.transform=o.transform),void 0!==o.animate&&(u.animate=o.animate),i&&(delete u.id,u=ur(u,i),u.id=e),u}(h,i,r,o)):h=function(t,n,e,r){return Lr(t,n,r),ur(t,e)}(h,d,i,n),(null==d?void 0:d.retime)&&(t.effects={clone:{retime:d.retime}}),r&&n.idMap.set(r,h),h}function ti(t,n,e,r,o){const i=1-o,s=i*i*i,l=3*i*i*o,u=3*i*o*o,c=o*o*o;return[s*t[0]+l*n[0]+u*e[0]+c*r[0],s*t[1]+l*n[1]+u*e[1]+c*r[1]]}function ni(t,n,e,r,o=64){let i=0,s=t;for(let l=1;l<=o;l++){const u=ti(t,n,e,r,l/o);i+=Math.hypot(u[0]-s[0],u[1]-s[1]),s=u}return i}var ei=t=>{const n=Math.round(1e4*t)/1e4;return Object.is(n,-0)?"0":String(n)};function ri(t){if("number"==typeof t)return t;if("string"==typeof t){const n=parseFloat(t);return Number.isFinite(n)?n:void 0}}function oi(t){if("string"==typeof t)return t.startsWith("#")?t.slice(1):t}function ii(t){if("string"!=typeof t)return;const n=t.trim().split(/[\s,]+/).map(Number);return n.length<4||n.some(t=>!Number.isFinite(t))?void 0:[n[0],n[1],n[2],n[3]]}function si(t,n,e,r,o,i){if("use"===t.type&&"string"==typeof t.href){const s=oi(t.href);if(s&&e.has(s)){const l=n.get(s);if(l)return function(t,n,e,r,o,i,s){var l,u,c,d;const v=fr(n);dr(v,o);const y="symbol"===v.type?ii(v.viewBox):void 0,m=null!=(u=null!=(l=ri(t.width))?l:null==y?void 0:y[2])?u:s[0],p=null!=(d=null!=(c=ri(t.height))?c:null==y?void 0:y[3])?d:s[1],h="symbol"===v.type?function(t,n,e,r,o){const i=ii(t.viewBox),s=f(a({},t),{type:"g"});if(delete s.viewBox,delete s.preserveAspectRatio,delete s.width,delete s.height,!i)return s;const[l,u,c,d]=i,v=c>0&&d>0?Math.min(r/c,o/d):1,y=(r-c*v)/2,m=(o-d*v)/2,p=[];0===y&&0===m||p.push("translate("+y+","+m+")"),1!==v&&p.push("scale("+v+")"),0===l&&0===u||p.push("translate("+-l+","+-u+")"),p.length&&(s.transform=p.join(""));const h=n();return e.push({type:"clipPath",id:h,children:[{type:"rect",x:l,y:u,width:c,height:d}]}),s.clipPath="url(#"+h+")",s}(v,o,i,m,p):v,g=si(h,e,r,o,i,s),b=f(a({},t),{type:"g",children:[g]});return delete b.href,delete b.width,delete b.height,yr(b)}(t,l,n,e,r,o,i)}}if(!t.children)return t;let s=!1;const l=t.children.map(t=>{const l=si(t,n,e,r,o,i);return l!==t&&(s=!0),l});return s?f(a({},t),{children:l}):t}var li="transform",ui=new Set(["reverse","alternate-reverse"]),ci="__px_rest_";function ai(t,n){if(void 0!==t[n])return!1;if(Zn.has(n))return!1;if(n===li)for(const n of Zn)if(void 0!==t[n])return!1;return!0}function fi(t,n,e){const r=Object.values(er({[n]:t[n]},e));return 1===r.length&&""!==r[0]?r[0]:void 0}function di(t,n){const e=On(t),r=new Map;for(const[t,n]of vi(e))void 0===n.id&&(n.id=ci+t),r.set(String(n.id),t);const o=new Map;for(const t of tr(e,n)){const n=r.get(t.id);void 0!==n&&o.set(n,t.animate)}return o}function vi(t){const n=new Map;let e=0;const r=t=>{if(t.animate&&n.set(String(e++),t),t.children)for(const n of t.children)r(n)};if(t.children)for(const n of t.children)r(n);return n}function yi(t,n,e){var r,o;let i=$o(t).root;return i=function(t){const n=t=>{var e;let r=t;const o=t.animate,i=null==o?void 0:o.transform;if(i){const n=function(t){var n,e,r;if("offsetPath"!==t.alongPathMode)return;const o=t.keyframes;if(!o||o.length<2)return;const i=Ct(o[0]),s=(null==i?void 0:i.origin)&&i.origin.length>=2?[i.origin[0],i.origin[1]]:[0,0],l=[];let u=!1;for(const t of o){const e=Ct(t),r=null==e?void 0:e.translate;if(!r||r.length<2)return;if(Object.keys(e).some(t=>t!==bt.translate&&t!==bt.origin&&t!==bt.rotate))return;if(void 0!==(null==e?void 0:e.rotate)){if(0!==e.rotate)return;u=!0}const o=null!=(n=null==e?void 0:e.origin)?n:[0,0];if(o[0]!==s[0]||o[1]!==s[1])return;l.push([r[0]+s[0],r[1]+s[1]])}if(!o.some(t=>_t(t)||Dt(t)))return;let c="M"+ei(l[0][0])+","+ei(l[0][1]);const a=[];for(let t=0;t<l.length-1;t++){const n=l[t],i=l[t+1],s=null!=(e=Dt(o[t]))?e:[0,0],u=null!=(r=_t(o[t+1]))?r:[0,0],f=[n[0]+s[0],n[1]+s[1]],d=[i[0]+u[0],i[1]+u[1]];c+="C"+ei(f[0])+","+ei(f[1])+","+ei(d[0])+","+ei(d[1])+","+ei(i[0])+","+ei(i[1]),a.push(ni(n,f,d,i))}const f=a.reduce((t,n)=>t+n,0);if(!(f>0))return;const d=[];let v=0;for(let t=0;t<o.length;t++){t>0&&(v+=a[t-1]);const n={t:zt(o[t]),v:v/f},e=Tt(o[t]);void 0!==e&&(n.e=e),d.push(n)}return{ot:c,it:d,autoOrient:!!t.autoOrient,anchor:s,st:u}}(i);if(n){const e=a({},o);delete e[pt];const s={keyframes:n.it};void 0!==i.loop&&(s.loop=i.loop),e[ht]=s;const l=t.transform;let u=l;if(l&&"object"==typeof l){const t=a({},l);delete t[bt.translate],delete t[bt.origin],n.st&&delete t[bt.rotate],u=Object.keys(t).length?t:void 0}r=f(a({},t),{animate:e,style:f(a({},t.style),{offsetPath:"path('"+n.ot+"')",offsetAnchor:ei(n.anchor[0])+"px "+ei(n.anchor[1])+"px",offsetRotate:n.autoOrient?"auto":"0deg",offsetDistance:"0%"})}),void 0!==u?r.transform=u:delete r.transform}}if(null==(e=r.children)?void 0:e.length){const t=r.children.map(n);t.some((t,n)=>t!==r.children[n])&&(r=f(a({},r),{children:t}))}return r};return n(t)}(i),i=Ye(i,null!=(o=null==(r=kt(i))?void 0:r.duration)?o:Xn),n===rt.native&&(i=Le(i,null==e?void 0:e.motionPath),i=function(t){var n;const e=function(t){const n=new Map,e=t=>{var r;"string"==typeof t.id&&n.set(t.id,t),null==(r=t.children)||r.forEach(e)};return e(t),n}(t),r=function(t,n){const e=new WeakMap,r=new Set,o=(t,r)=>{const i=e.get(t);if(void 0!==i)return i;if(r.has(t))return!1;r.add(t);let s=!1;if(t.animate&&"object"==typeof t.animate&&!Array.isArray(t.animate))for(const n in t.animate){s=!0;break}if(!s&&t.children)for(const n of t.children)if(o(n,r)){s=!0;break}if(!s&&"use"===t.type&&"string"==typeof t.href){const e=oi(t.href),i=e?n.get(e):void 0;i&&(s=o(i,r))}return r.delete(t),e.set(t,s),s};for(const[t,e]of n)o(e,new Set)&&r.add(t);return r}(0,e);if(0===r.size)return t;let o=0;const i=function(t){const n=ii(t.viewBox);if(n)return[n[2],n[3]];const e=ri(t.width),r=ri(t.height);return void 0!==e&&void 0!==r?[e,r]:[1,1]}(t),s=[],l=si(t,e,r,()=>"_lw_use_mat_"+ ++o,s,i);if(0===s.length)return l;const u={type:"defs",children:s},c=[...null!=(n=l.children)?n:[],u];return f(a({},l),{children:c})}(i),i=function(t){const n=(t,e)=>{var r;e(t),null==(r=t.children)||r.forEach(t=>n(t,e))};let e=!0;for(;e;){e=!1;const r=new Set;n(t,t=>{var n;"use"===t.type&&"string"==typeof t.href&&r.add((n=t.href).startsWith("#")?n.slice(1):n)}),n(t,t=>{if(!t.children)return;let n=t.children;"defs"===t.type&&(n=n.filter(t=>!(("g"===t.type||"symbol"===t.type)&&"string"==typeof t.id&&!r.has(t.id)))),n=n.filter(t=>!("defs"===t.type&&(!t.children||0===t.children.length))),n.length!==t.children.length&&(t.children=n,e=!0)})}return t}(i)),i=function(t,n){var e;const r=On(t),o=kt(r)||{},i=+(o.duration||Xn),s=ui.has(String(o.direction))?i:0,l=vi(r);if(!l.size)return r;const u=di(r,n),c=new Map;for(const[t,n]of u){const r=l.get(t);if(r)for(const o of Object.keys(n)){if(!ai(r,o))continue;const i=fi(n,o,s);void 0!==i&&(r[o]=i,c.set(t,[...null!=(e=c.get(t))?e:[],o]))}}if(c.size){const t=di(r,n);for(const[n,e]of c){if(JSON.stringify(t.get(n))===JSON.stringify(u.get(n)))continue;const r=l.get(n);if(r)for(const t of e)delete r[t]}}return r}(i,n),i}var mi="setPlaybackRate: rate must be finite and non-zero";function pi(t){return Number.isFinite(t)&&0!==t}function hi(t,n){return t>0?n===1/0?t:t*(n>0?n:1):0}function gi(t,n){return Number.isNaN(t)||t<0?0:Number.isFinite(n)?t>n?n:t:Number.isFinite(t)?t:0}function bi(t,n,e){const r=hi(n,e);return r>0&&Number.isFinite(t)?t<=0?0:e===1/0?t%r/r:t>=r?1:t/r:0}function wi(t,n,e){const r=hi(n,e);return r>0&&Number.isFinite(t)?t<=0?0:t>=1?r:t*r:0}function Ai(t){const n=globalThis;"function"!=typeof n.cancelAnimationFrame?n.clearTimeout(t):n.cancelAnimationFrame(t)}var ki={document:"document",host:"host",platform:"platform",usage:"usage",internal:"internal"},ji="https://github.com/pixodesk/pixodesk-svg-animator/blob/main/docs/diagnostics.md";function Mi(t){return"PX"+t+" "+ji+"#px"+t}function xi(t,n){const e=n?n+" ":"";return{warn:(n,r,...o)=>{const i=Mi(r);(null==t?void 0:t.onWarn)?t.onWarn({code:r,kind:n,data:o,message:i}):(null==t?void 0:t.muteWarn)||console.warn(e+n+" "+i,...o)},error:(n,r,...o)=>{const i=Mi(r),s=function(t){return t.find(t=>t instanceof Error)}(o);(null==t?void 0:t.onError)?t.onError({code:r,kind:n,data:o,message:i,error:s}):(null==t?void 0:t.muteError)||console.error(e+n+" "+i,...o)}}}var Oi=["timelineSource","scroll","trigger","delay","iterations","direction","fill","resetOnFinish","duration","mode","frameRate"],Si=["definitions","bindings"],Ni=t=>!!t&&"object"==typeof t&&!Array.isArray(t),Pi=t=>Ni(t)&&"string"==typeof t.type?t.type:"time",zi=t=>"scroll"===t||"view"===t;function Ci(t,n){const e=Ni(t)?a({},t):{};for(const t of Object.keys(n)){const r=n[t];null!==r?Ni(r)?e[t]=Ci(e[t],r):e[t]=r:delete e[t]}return e}function Ti(t,n,e){const r=Pi(t),o=Ni(n)&&"string"==typeof n.type?String(n.type):r;let i;if(o!==r){const e={};if(Ni(t))for(const n of tt)void 0!==t[n]&&(e[n]=t[n]);i=Ci(e,n)}else i=Ci(t,n);if(zi(o)){for(const t of nt)void 0!==i[t]&&(e("animator.timeline."+t+": no slot on a '"+o+"' timeline — dropped"),delete i[t]);"infinite"===i.iterations&&(e("animator.timeline.iterations: 'infinite' cannot map onto a scroll range — dropped"),delete i.iterations)}return i}var _i=6,Di="className",Ri="class",Ei="domType",Li="type",Fi="g";function Ui(t,n,e){return t?Bi(t,n,e,!0,0):null}function Bi(t,n,e,r,o){const i=t,{type:s,children:l,style:u}=i,c=d(i,["type","children","style"]),a=s||Fi;if(ie.has(a.toLowerCase()))return(null!=e?e:xi(void 0,"[PxAnimator]")).warn(ki.document,1103,a),null;const f=c[Ei];void 0!==f&&delete c[Ei];const v={};let y;const m=function(t){const n={};for(const e of Object.keys(t)){const r=qn(e);if(gt.has(r))continue;if("style"===r)continue;let o=t[e];if(Vn.has(r)&&Array.isArray(o))n[r]=Bn(o);else if("transform"!==r||null===o||"object"!=typeof o||Array.isArray(o)||o.keyframes)Zn.has(r)?(Array.isArray(o)&&("translate"===r&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===r&&(o+="deg"),n[pt]=r+"("+o+")"):Array.isArray(o)?n[r]=o.join(","):null!=o&&(n[r]=String(o));else{const t=o.value&&"object"==typeof o.value?o.value:o;n[pt]=Wn(t,{P:!1})}}return n}(c);for(const t of Object.keys(m)){const n=ve(t,m[t]);void 0!==n&&(ue.has(t)?(null!=y?y:y={})[t]=String(n):v[t===Di?Ri:Yn(t)]=n)}if(void 0!==f&&(v[Li]=String(f)),u)for(const t of Object.keys(u))(null!=y?y:y={})[t]=String(u[t]);const p=[];l&&l.forEach((t,r)=>{const o=Bi(t,n,e,!1,r);null!==o&&p.push(o)});const h=c[yt],g=!p.length&&"string"==typeof h&&h?h:void 0;return n({tag:a,attrs:v,style:y,children:p,text:g,node:t,isRoot:r,index:o})}function Ii(t){return"scroll"===(null==t?void 0:t.timelineSource)}var Vi="cover";function Zi(t,n,e,r){var o;const[i,s]=function(t,n,e){const r=n,o=e;switch(t){case"cover":return[0,r+o];case"entry":return[0,Math.min(r,o)];case"contain":return[Math.min(r,o),Math.max(r,o)];case"exit":return[Math.max(r,o),r+o];case"entry-crossing":return[0,r];case"exit-crossing":return[o,r+o]}}(null!=(o=null==t?void 0:t.phase)?o:Vi,e,r);return i+("number"==typeof(null==t?void 0:t.fraction)?t.fraction:n)*(s-i)}var Gi=Symbol.for("@pixodesk/svg-animator-web:animators"),Wi="__pixodeskAnimators";function Ji(){const t=globalThis;let n=t[Gi];if(!n){const e=new Set,r=new Set;n={animators:e,listeners:r,getAll:()=>Array.from(e),subscribe:t=>(r.add(t),()=>{r.delete(t)})},t[Gi]=n,void 0===t[Wi]&&(t[Wi]=n)}return n}function Xi(){return Ji().getAll()}function qi(t){return Ji().subscribe(t)}function Qi(t,n){for(const e of Ji().listeners)try{e(t,n)}catch(t){setTimeout(()=>{throw t},0)}}lt.offScreen,lt.visibilityThreshold,lt.visibilityDebounce;var Ki=Array.from({length:21},(t,n)=>n/20);function Yi(t){return{requestStart:()=>t.play(),dispose:()=>{}}}function $i(t,n,e){const r=null!=e?e:xi(void 0,"[PxAnimator]"),o=[],i=()=>{for(const t of o.splice(0))t()},s=function(t){var n,e,r,o,i;return{start:null!=(n=null==t?void 0:t.start)?n:lt.start,offScreen:null!=(e=null==t?void 0:t.offScreen)?e:lt.offScreen,mouseOut:null!=(r=null==t?void 0:t.mouseOut)?r:lt.mouseOut,visibilityThreshold:null!=(o=null==t?void 0:t.visibilityThreshold)?o:lt.visibilityThreshold,visibilityDebounce:null!=(i=null==t?void 0:t.visibilityDebounce)?i:lt.visibilityDebounce}}(n),l=t.getRootElement();if(!l)return r.warn(ki.host,1201),i;let u=!1;const c=function(t,n,e){if(n.offScreen===J.continue)return Yi(e);if("undefined"==typeof IntersectionObserver)return Yi(e);const r=n.visibilityThreshold,o=n.visibilityDebounce;let i,s,l=!1,u=!1,c=0;const a=()=>{void 0!==s&&(clearTimeout(s),s=void 0)},f=()=>{s=void 0,!0!==i&&(i=!0,(l||u)&&(l=!1,u=!1,e.play()))},d=()=>{a(),!1!==i&&(i=!1,e.isPlaying()&&(n.offScreen===J.reset?e.cancel():e.pause(),u=!0))},v=t=>{if(c=t,"undefined"==typeof document||"hidden"!==document.visibilityState)if(t>=r){if(!0===i||void 0!==s)return;o>0?s=setTimeout(f,o):f()}else t<=0?d():!0!==i&&a();else d()},y=new IntersectionObserver(t=>{const n=t[t.length-1];n&&v(n.isIntersecting?function(t){var n,e;const r=t.boundingClientRect,o=t.intersectionRect;if(!(null==r?void 0:r.height)||!o)return t.intersectionRatio;const i="undefined"!=typeof window&&window.innerHeight?window.innerHeight:1/0,s=null!=(e=null==(n=t.rootBounds)?void 0:n.height)?e:1/0,l=Math.min(i,s),u=Math.min(r.height,Number.isFinite(l)?l:r.height);return u>0?o.height/u:t.intersectionRatio}(n):0)},{threshold:Ki});y.observe(t);const m=()=>{v(c)},p="undefined"!=typeof document;return p&&document.addEventListener("visibilitychange",m),{requestStart:t=>{if(t||!0===i)return a(),i=!0,l=!1,u=!1,void e.play();l=!0},dispose:()=>{a(),y.disconnect(),p&&document.removeEventListener("visibilitychange",m)}}}(l,s,{isPlaying:()=>t.isPlaying(),play:()=>{u&&(u=!1,t.setPlaybackRate(1)),t.play()},pause:()=>t.pause(),cancel:()=>t.cancel()});switch(o.push(()=>c.dispose()),s.start){case W.load:{const t=()=>c.requestStart(!1);"complete"===document.readyState?t():(window.addEventListener("load",t,{once:!0}),o.push(()=>window.removeEventListener("load",t)));break}case W.mouseOver:{let n=!1;const e=()=>{n=!0,c.requestStart(!0)},r=()=>{n&&(()=>{switch(s.mouseOut){case X.pause:t.pause();break;case X.reset:t.cancel();break;case X.reverse:u=!0,t.setPlaybackRate(-1),t.play();case X.continue:}})()};l.addEventListener("mouseenter",e),l.addEventListener("mouseleave",r),o.push(()=>{l.removeEventListener("mouseenter",e),l.removeEventListener("mouseleave",r)});break}case W.click:{const n=()=>{t.isPlaying()?t.pause():c.requestStart(!0)};l.addEventListener("click",n),o.push(()=>l.removeEventListener("click",n));break}case W.none:}return i}function Hi(t){return"#"+function(t){const n=globalThis.CSS;return"function"==typeof(null==n?void 0:n.escape)?n.escape(t):t.replace(/^([0-9])/,(t,n)=>"\\3"+n+" ").replace(/([^\w\-\\ ])/g,"\\$1")}(t)}function ts(t,n,e,r){var o;const i=kt(t)||{},s=xi(e,"[PxAnimator]");if(!r)if(t.id){const n=Hi(t.id);(r=document.querySelector(n))||s.warn(ki.host,1202,n)}else s.warn(ki.host,1203);const l=function(t,n,e){var r;const o=kt(t)||{},i=tr(t,rt.js),s=o.iterations;let l=1;"number"==typeof s&&(l=s||1),"infinite"===s&&(l=1/0),l<1&&(l=1);const u=+(o.duration||Xn),c=u&&l?u*(l===1/0?1/0:l):u?(null!=l?l:1)*u:0,a=o.direction||"normal",f=null!=(r=o.fill)?r:"forwards",d="forwards"===f||"both"===f,v="backwards"===f||"both"===f;let y=null,m=!1,p=-(o.delay||0),h=0,g=1,b=!1;const w=o.frameRate,A=w&&w>0?1e3/w:0;let k=0;const j=()=>{const t=h?(Date.now()-h)*g:0;return p+t},M=()=>{let t=j();return Number.isFinite(c)&&t>c&&(t=c),t<0&&(t=0),t};function x(t){let e=function(){const n=u>0?u:1;let e=0,r=0;u>0?(t=$n(t,0,l*n),r=Math.max(0,Math.ceil(t/n)-1),r=Math.min(r,l-1),e=$n((t-r*n)/n,0,1)):e=t;const o=a||"normal";let i=e;return"reverse"===o?i=1-e:"alternate"===o?r%2==1&&(i=1-e):"alternate-reverse"===o&&r%2==0&&(i=1-e),i}();for(const t of i||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){console.warn("Empty or unresolved binding",t);continue}const o=er(r,e*u);for(const[e,r]of Object.entries(o))n.setAttribute(t.id,e,r)}}o.delay&&(o.delay<0?x(M()):v&&x(0));const O=()=>!!m&&!!n.isConnected()&&(g<0?j()>0:!(Number.isFinite(c)&&M()>=c)),S=t=>{null!==y&&(Ai(y),y=null),(t||O())&&(y=function(t){const n=globalThis;return"function"==typeof n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,16)}(()=>{y=null,(()=>{var t,r;if(!n.isConnected())return void N();const o=M(),i=j();if(i<0&&g>0)v&&x(0);else{if(g<0&&i<=0)return N(),x(0),void(b||(b=!0,null==(t=null==e?void 0:e.onFinish)||t.call(e)));if(g>0&&c&&Number.isFinite(c)&&o>=c)return N(),x(d?c:0),void(b||(b=!0,null==(r=null==e?void 0:e.onFinish)||r.call(e)));if(A>0){const t=Date.now();if(k&&t-k<A)return;k=t}x(o)}})(),S()}))},N=()=>{if(!m)return;let t=j();Number.isFinite(c)&&t>c&&(t=c),p=t,h=0,m=!1,null!==y&&(Ai(y),y=null),t>=0?x(t):v&&x(0)},P={isReady:()=>!0,getRootElement:()=>null,isPlaying:()=>O(),play:()=>{var t;(()=>{if(!m){if(g>=0)Number.isFinite(c)&&p>=c&&(p=0);else if(p<=0){if(!Number.isFinite(c))return void console.warn("play: cannot start reverse playback of an infinite animation from time 0");p=c}b=!1,m=!0,h=Date.now(),S(!0)}})(),null==(t=null==e?void 0:e.onPlay)||t.call(e)},pause:()=>{var t;N(),null==(t=null==e?void 0:e.onPause)||t.call(e)},cancel:()=>{var t;N(),p=0,h=0,m=!1,b=!1,x(p),null==(t=null==e?void 0:e.onCancel)||t.call(e)},finish:()=>{((t=!0)=>{var n;p=Number.isFinite(c)?c:M(),h=0,m=!1,null!==y&&(Ai(y),y=null),x(d?p:0),t&&!b&&(b=!0,null==(n=null==e?void 0:e.onFinish)||n.call(e))})(!0)},setPlaybackRate:t=>{if(!pi(t))return void console.warn(mi);let n=j();Number.isFinite(c)&&n>c&&(n=c),t<0!=g<0&&(b=!1),g=t,p=n,m&&(h=Date.now())},getCurrentTime:()=>M(),setCurrentTime:t=>{t=gi(t,c),p=t,m&&(h=Date.now()),(!Number.isFinite(c)||t<c)&&(b=!1),x(M())},getCurrentProgress:()=>bi(M(),u,l),setCurrentProgress:t=>{P.setCurrentTime(wi(t,u,l))},destroy:()=>{var t;P.cancel(),null==(t=null==e?void 0:e.onRemove)||t.call(e)}};return P}(t,n||function(t,n){const e=new Set,r=null!=n?n:xi(void 0,"[PxAnimator]");return{isConnected:()=>!t||t.isConnected,setAttribute:(n,o,i)=>{o=Yn(o);const s=Hi(n),l=(null==t?void 0:t.querySelectorAll(s))||document.querySelectorAll(s);0!==l.length||e.has(s)||(e.add(s),r.warn(ki.host,1207,s));for(let t=0;t<l.length;t++){const n=l[t],e="transform"===o&&"pattern"===n.tagName?"patternTransform":o;n.setAttribute(e,i),Jn.has(o)&&(n.style[o]=i)}}}}(r,s),e),u=f(a({},l),{getRootElement:()=>r||null});if(Ii(i))i.trigger&&s.warn(ki.usage,1306);else{const t=$i(u,null!=(o=i.trigger)?o:{},s),n=u.destroy.bind(u);u.destroy=()=>{t(),n()}}return u}function ns(t,n,e,r){let o=Ct(t);const i=Tt(t),s={offset:n,easing:i&&Array.isArray(i)?"cubic-bezier("+i.join(",")+")":void 0};let l,u=e;return Vn.has(e)&&Array.isArray(o)?l=Bn(o):"transform"!==e||null===o||"object"!=typeof o||Array.isArray(o)?Zn.has(e)?(Array.isArray(o)&&("translate"===e&&(o=o.map(t=>t+"px")),o=o.join(",")),"rotate"===e&&(o+="deg"),l=e+"("+o+")",u="transform"):l="d"===e?'path("'+(o&&"object"==typeof o&&Array.isArray(o.paths)?o.paths:[]).map(t=>Pn(t,!0)).join("")+'")':Gn.has(e)&&"number"==typeof o?100*o+"%":""+o:(l=Wn(o,{P:!0}),u="transform"),CSS.supports(Yn(u),l)||r.add(u),u=qn(u),s[u]=l,s}function es(t,n,e){var r,o,i,s,l;const u=[];for(let c=0;c<n.length;c++){const d=n[c],v=null!=(r=d.t)?r:0;if(v<0){const e=n[c+1];if(e&&(null!=(o=e.t)?o:0)>=0){const n=(0-v)/((null!=(i=e.t)?i:0)-v),r=d.e?En(d.e)(n):n,{right:o}=Fn(d.e,n);u.push({t:0,v:Xe(t,d.v,e.v,r),e:o})}continue}if(v>e){const r=n[c-1];if(r&&(null!=(s=r.t)?s:0)<=e){const n=null!=(l=r.t)?l:0,o=(e-n)/(v-n),i=r.e?En(r.e)(o):o,{left:s}=Fn(r.e,o);u.length>0&&(u[u.length-1]=f(a({},u[u.length-1]),{e:s})),u.push({t:e,v:Xe(t,r.v,d.v,i),e:void 0})}break}u.push(d)}return u}function rs(t,n,e){var r;const o=new Map;for(const[i,s]of Object.entries(t)){const t=e.duration||1,l=es(i,s.keyframes||[],t),u=[];for(let e=0;e<l.length;e++){const o=l[e],s=ns(o,$n((null!=(r=o.t)?r:0)/t,0,1),i,n);0===e&&(s.offset||0)>0&&u.push(f(a({},s),{offset:0})),u.push(s)}u.length>0&&(u[u.length-1].offset||0)<1&&u.push(f(a({},u[u.length-1]),{offset:1})),u.length>0&&o.set(i,u)}return o}function os(t,n,e,r,o){var i,s;const l=kt(t)||{},u=xi(n,"[PxAnimator]");if(!e)if(t.id){const n=Hi(t.id);(e=document.querySelector(n))||u.warn(ki.host,1202,n)}else u.warn(ki.host,1203);const c=tr(t,rt.native),a=[],f=l.iterations;let d;"number"==typeof f&&(d=f),"infinite"===f&&(d=1/0);const v=new Set;let y=!1,m=!1;(null==c?void 0:c.length)||u.warn(ki.document,1105);for(const t of c||[]){const r=t.animate;if(!r||"object"!=typeof r||Array.isArray(r)){u.warn(ki.document,1106,t);continue}const s=Hi(t.id),c=(null==e?void 0:e.querySelectorAll(s))||document.querySelectorAll(s);0===c.length&&u.warn(ki.host,1206,s);const f=rs(r,v,l),p=l.delay&&l.delay>0?l.delay:void 0;let h;if(l.delay&&l.delay<0&&l.duration){const t=-l.delay;h=d===1/0?t%l.duration:Math.min(t,l.duration*(null!=d?d:1))}const g={duration:l.duration,delay:p,fill:null!=(i=l.fill)?i:"forwards",direction:l.direction,iterations:d};for(let t=0;t<c.length;t++){const e=c[t];for(const[,t]of f)if(t.length>0)try{const r=new KeyframeEffect(e,t,g),i=new Animation(r,o?o.timeline:document.timeline);if(o){const t=i;o.rangeStart&&(t.rangeStart=o.rangeStart),o.rangeEnd&&(t.rangeEnd=o.rangeEnd)}(null==n?void 0:n.onFinish)&&(i.onfinish=()=>{var t;y||(y=!0,null==(t=n.onFinish)||t.call(n))}),(null==n?void 0:n.onRemove)&&(i.onremove=()=>{var t;m||(m=!0,null==(t=n.onRemove)||t.call(n))}),void 0!==h&&(i.currentTime=h),a.push(i)}catch(t){u.warn(ki.internal,1004,t)}}}if(!r&&v.size)return u.warn(ki.platform,1104,[...v].join(", ")),null;const p={isReady:()=>!0,getRootElement:()=>e||null,isPlaying:()=>{var t;return"running"===(null==(t=a[0])?void 0:t.playState)},play:()=>{var t;y=!1,a.forEach(t=>t.play()),null==(t=null==n?void 0:n.onPlay)||t.call(n)},pause:()=>{var t;a.forEach(t=>t.pause()),null==(t=null==n?void 0:n.onPause)||t.call(n)},cancel:()=>{var t;y=!1,a.forEach(t=>t.cancel()),null==(t=null==n?void 0:n.onCancel)||t.call(n)},finish:()=>{var t;for(const n of a)try{(null==(t=n.effect)?void 0:t.getTiming().iterations)===1/0?(n.effect.updateTiming({iterations:1}),n.finish(),n.effect.updateTiming({iterations:1/0})):n.finish()}catch(t){n.cancel()}},setPlaybackRate:t=>pi(t)?(a.forEach(n=>n.playbackRate=t),p):(u.warn(ki.usage,1401),p),getCurrentTime:()=>{var t,n;const e=null!=(n=null==(t=a[0])?void 0:t.currentTime)?n:null;return null!==e?+e:null},setCurrentTime:t=>{var n;const e=function(t,n){return t>0?n===1/0?1/0:t*(n>0?n:1):0}(null!=(n=l.duration)?n:0,null!=d?d:1),r=e>0?gi(t,e):Math.max(0,t);y=!1,a.forEach(t=>{t.currentTime=r})},getCurrentProgress:()=>{var t;const n=p.getCurrentTime();return null===n?null:bi(n,null!=(t=l.duration)?t:0,null!=d?d:1)},setCurrentProgress:t=>{var n;p.setCurrentTime(wi(t,null!=(n=l.duration)?n:0,null!=d?d:1))},destroy:()=>{var t;p.cancel(),a.splice(0,a.length),m||(m=!0,null==(t=null==n?void 0:n.onRemove)||t.call(n))}};if("scroll"===l.timelineSource)l.trigger&&u.warn(ki.usage,1306);else{const t=$i(p,null!=(s=l.trigger)?s:{},u),n=p.destroy.bind(p);p.destroy=()=>{t(),n()}}return o&&a.forEach(t=>t.play()),p}function is(t,n,e){var r,o,i;const s="number"==typeof(null==t?void 0:t.fraction)?t.fraction:n,l=null==(o=null==(r=globalThis.CSS)?void 0:r.percent)?void 0:o.call(r,100*s);if(void 0!==l)return e?{rangeName:null!=(i=null==t?void 0:t.phase)?i:"cover",offset:l}:{offset:l}}function ss(t,n){const e=document.body,r=document.documentElement;for(let o=t.parentElement;o;o=o.parentElement){if(o===e||o===r)return null;const t=getComputedStyle(o),i="y"===n?t.overflowY:t.overflowX;if("auto"===i||"scroll"===i||"hidden"===i||"overlay"===i)return o}return null}function ls(){return document.scrollingElement||document.documentElement}var us="parent",cs="scroller";function as(t,n,e){var r,o;const i=null!=e?e:xi(void 0,"[PxAnimator]"),s=null==n?void 0:n.trim();if(!s)return t;if(s===us){let n=null;for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement){const t=getComputedStyle(e).position;"sticky"!==t&&"fixed"!==t||(n=e)}return null!=(o=null!=(r=null==n?void 0:n.parentElement)?r:t.parentElement)?o:t}if(s===cs)return ss(t,"y")||ss(t,"x")||ls();let l=null;try{l=document.querySelector(s)}catch(n){return i.warn(ki.document,1303,s),t}return l||(i.warn(ki.host,1304,s),t)}function fs(t,n){const e=t;if(!(null==n?void 0:n.pin)||!e.style)return()=>{};const r=e.style,o=r.position,i=r.top;r.position="sticky";const s="center"===n.pinAlign?.5:"bottom"===n.pinAlign?1:0,l=()=>{var e;const o=null!=(e=n.pinOffset)?e:0;if(!s)return void(r.top=o+"px");const i=function(t){const n=ss(t,"y");return n?n.clientHeight:document.documentElement.clientHeight}(t),l=t.getBoundingClientRect().height;r.top=Math.round((i-l)*s+o)+"px"};l();let u=null;const c=s?l:null;s&&(c&&window.addEventListener("resize",c),"undefined"!=typeof ResizeObserver&&(u=new ResizeObserver(l),u.observe(t)));let a=null;const f=t.parentElement;return n.pinDistance&&n.pinDistance>0&&f&&(a=document.createElement("div"),a.setAttribute("data-px-pin",""),a.style.height=100*n.pinDistance+"vh",f.insertBefore(a,t),a.appendChild(t)),()=>{c&&window.removeEventListener("resize",c),null==u||u.disconnect(),r.position=o,r.top=i,(null==a?void 0:a.parentElement)&&(a.parentElement.insertBefore(t,a),a.remove())}}function ds(t,n,e){let r,o=n;t.resetOnFinish&&(o=f(a({},n),{onFinish:()=>{var t;null==(t=null==n?void 0:n.onFinish)||t.call(n),null==r||r.cancel()}}));const i=e(o);return r=i,t.debugGlobalName&&(window[t.debugGlobalName]=i),i}var vs,ys=({tag:t,attrs:n,style:e,children:r,text:o})=>{const i=document.createElementNS("http://www.w3.org/2000/svg",t);for(const t of Object.keys(n))i.setAttribute(t,n[t]);if(e){const t=i.style;for(const n of Object.keys(e))t[n]=e[n]}for(const t of r)i.appendChild(t);return void 0!==o&&(i.textContent=o),i},ms="doc";function ps(t,n,e,r,o,i,s){const l=xi(e,"[PxAnimator]"),u=gn(t);for(const t of u)l.warn(ki.document,1101,t);if(function(t){const{problems:n}=function(t){try{return{problems:bn(t)}}catch(t){return{problems:[]}}}(t);if(!n.length)return;const e=n.slice(0,_i),r=n.length-e.length;console.warn("[PxAnimator] createAnimator: this document does not match the animation schema in "+n.length+" place"+(1===n.length?"":"s")+".\n"+e.map(t=>" - "+t).join("\n")+(r>0?"\n … and "+r+" more":"")+"\n\nIf you did not author these keys, the usual cause is a build that MANGLES PROPERTY NAMES. An animation document is data loaded at runtime, so renaming the property reads inside the player stops them matching the keys in the JSON, and the animation silently does nothing. Feed the published reserved-name list to your minifier — @pixodesk/svg-animator-web/mangle-reserved.json — see docs/library/minification.md.")}(t),void 0!==o||i){const n=function(t,n,e){var r,o;const i=!!(null==e?void 0:e.resetTimeline);if(!t||void 0===n||!(i||null!==n&&Ni(n)&&Object.keys(n).length))return{doc:t,warnings:[]};const s=t,l=Ni(s.animator),u=!l&&Ni(null==(r=s.meta)?void 0:r.animator),c=l?s.animator:u?s.meta.animator:void 0,d=[];l&&Ni(null==(o=s.meta)?void 0:o.animator)&&d.push("animator: doc.meta.animator is shadowed by doc.animator and was not patched");let v=c;if(i){const t={};for(const n of Si)Ni(c)&&void 0!==c[n]&&(t[n]=c[n]);v=t}const y=function(t,n){const e=[],r=t=>e.push(t);if(null===n)return{config:void 0,warnings:e};if(!Ni(n)||0===Object.keys(n).length)return{config:t,warnings:e};const o=Ni(t)?Oi.filter(n=>void 0!==t[n]):[];o.length&&r("animator: the base carries the flat runtime spelling ("+o.join(", ")+"); the patch merges the wire spelling only");const i=Ni(t)?a({},t):{};for(const t of Object.keys(n)){const e=n[t];null!==e?"timeline"!==t?Ni(e)?i[t]=Ci(i[t],e):i[t]=e:i.timeline=Ni(e)?Ti(i.timeline,e,r):e:delete i[t]}return{config:i,warnings:e}}(v,null!=n?n:{});return d.push(...y.warnings),y.config===c?{doc:t,warnings:d}:u?{doc:f(a({},s),{meta:f(a({},s.meta),{animator:y.config})}),warnings:d}:{doc:f(a({},s),{animator:y.config}),warnings:d}}(t,null!=o?o:{},{resetTimeline:!!i});for(const t of n.warnings)l.warn(ki.usage,1102,t);t=n.doc}t=yi(t,it((kt(t)||{}).engine));let c=null;if(r){t=Sn(t);const n="string"==typeof r?document.querySelector(r):r;n&&(c=function(t,n,e){return Ui(t,ys,e)}(t,0,l),c&&n.replaceChildren(c))}!c&&s&&(c=s);const d=function(t,n,e,r){return function(t,n,e,r){const o=kt(t)||{},i=xi(e,"[PxAnimator]");return Ii(o)?ds(o,e,e=>{var s;let l=()=>{};if(o.engine!==ot.js&&r){l=fs(r,o.scroll);const n=function(t,n,e){var r,o,i,s;const l=null!=e?e:xi(void 0,"[PxAnimator]");if(!n||!Ii(n))return null;const u=n.scroll||{},c=null!=(r=u.kind)?r:"view";if(u.smoothing)return l.warn(ki.platform,1301),null;const a=globalThis,f="view"===c,d=f?a.ViewTimeline:a.ScrollTimeline;if("function"!=typeof d)return null;const v=null!=(o=u.axis)?o:"block";let y;try{y=new d(f?{subject:as(t,u.subject,l),axis:v}:{source:"root"===u.source?ls():ss(t,"y")||ss(t,"x")||ls(),axis:v})}catch(t){return l.warn(ki.platform,1302,t),null}return{timeline:y,rangeStart:is(null==(i=u.range)?void 0:i.start,0,f),rangeEnd:is(null==(s=u.range)?void 0:s.end,1,f)}}(r,o,i);if(n){const i=os(t,e,r,st(o.engine),n);if(i){const t=i.destroy.bind(i);return i.destroy=()=>{l(),t()},i}}l(),l=()=>{}}const u=(o.engine!==ot.js?os(t,e,r,st(o.engine)):null)||ts(t,n,e,r),c=(null==(s=u.getRootElement)?void 0:s.call(u))||r;if(c){l=fs(c,o.scroll);const t=("number"==typeof(null==(a=o)?void 0:a.duration)&&a.duration>0?a.duration:Xn)*("number"==typeof(null==a?void 0:a.iterations)&&a.iterations>0?a.iterations:1),n=function(t,n,e,r){var o,i;if(!n||!Ii(n))return null;const s=null!=r?r:xi(void 0,"[PxAnimator]"),l=n.scroll||{},u=null!=(o=l.kind)?o:"view",c=as(t,l.subject,s),a=ss(t,"y")||ss(t,"x"),f="scroll"===u&&"root"===l.source?ls():a||ls(),d=f===ls(),v=function(t,n){const e=null!=t?t:"block";if("x"===e||"y"===e)return e;const r=!!n&&n.startsWith("vertical");return"inline"===e?r?"y":"x":r?"x":"y"}(l.axis,getComputedStyle(f).writingMode),y=()=>{if("scroll"===u)return function(t,n,e){var r,o;const i=n>0?$n(t/n,0,1):1,s="number"==typeof(null==(r=null==e?void 0:e.start)?void 0:r.fraction)?e.start.fraction:0,l="number"==typeof(null==(o=null==e?void 0:e.end)?void 0:o.fraction)?e.end.fraction:1;return l<=s?i>=l?1:0:$n((i-s)/(l-s),0,1)}("y"===v?f.scrollTop:f.scrollLeft,"y"===v?f.scrollHeight-f.clientHeight:f.scrollWidth-f.clientWidth,l.range);const t=c.getBoundingClientRect();let n,e;if(d)n=0,e="y"===v?document.documentElement.clientHeight:document.documentElement.clientWidth;else{const t=f.getBoundingClientRect();n="y"===v?t.top:t.left,e="y"===v?f.clientHeight:f.clientWidth}return function(t,n,e,r){const o=e-t,i=Zi(null==r?void 0:r.start,0,n,e),s=Zi(null==r?void 0:r.end,1,n,e);return s<=i?o>=s?1:0:$n((o-i)/(s-i),0,1)}(("y"===v?t.top:t.left)-n,"y"===v?t.height:t.width,e,l.range)},m=Math.max(0,null!=(i=l.smoothing)?i:0)/1e3;let p=!1,h=null,g=null,b=0,w=null;const A=()=>{w=null,p||(t=>{if(!m)return void e(t);if(null===h)return h=t,void e(t);if(null!==g)return;b=0;const n=t=>{if(g=null,p)return;const r=b?Math.min(.1,(t-b)/1e3):1/60;b=t;const o=y(),i=1-Math.exp(-r/m);h+=(o-h)*i,Math.abs(o-h)<.001&&(h=o),e(h),h!==o&&(g=requestAnimationFrame(n))};g=requestAnimationFrame(n)})(y())},k=()=>{p||null!==w||(w=requestAnimationFrame(A))},j=d?window:f;let M;j.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k,{passive:!0}),"undefined"!=typeof ResizeObserver&&(M=new ResizeObserver(k),M.observe(c),c!==t&&M.observe(t),d||M.observe(f));const x={destroy:()=>{p||(p=!0,j.removeEventListener("scroll",k),window.removeEventListener("resize",k),null==M||M.disconnect(),null!==w&&(cancelAnimationFrame(w),w=null),null!==g&&(cancelAnimationFrame(g),g=null))},refresh:()=>{p||(h=y(),e(h))}};return x.refresh(),x}(c,o,n=>u.setCurrentTime(n*t),i);if(n){const t=u.destroy.bind(u);u.destroy=()=>{n.destroy(),l(),t()}}}else i.warn(ki.host,1305);var a;return u}):ds(o,e,e=>o.engine===ot.js?ts(t,n,e,r):os(t,e,r,st(o.engine))||ts(t,n,e,r))}(t,n,e,r)}(t,n,e,c);if(r&&c){const t=c,n=d.destroy.bind(d);d.destroy=()=>{n(),t.remove()}}return d}function hs(t){return"adapter"in t||"rootElement"in t}function gs(t){const{src:n,doc:e,container:r,resetTimeline:o}=t,i=hs(t)?t.adapter:void 0,s=hs(t)?t.rootElement:void 0,l=function(t){const{timeline:n,duration:e,delay:r,iterations:o,start:i}=t;return function(t,n){let e;if("string"==typeof t)try{e=JSON.parse(t)}catch(t){console.warn("timeline override: not valid JSON — ignored",t),e=void 0}else e=null!=t?t:void 0;const{duration:r,delay:o,iterations:i,start:s}=n;if(void 0===r&&void 0===o&&void 0===i&&void 0===s)return void 0===e?void 0:{timeline:e};const l=Ni(e)?a({},e):{};return void 0!==r&&(l.duration=r),void 0!==o&&(l.delay=o),void 0!==i&&(l.iterations=i),void 0!==s&&(l.trigger=f(a({},l.trigger),{start:s})),{timeline:l}}(n,{duration:e,delay:r,iterations:o,start:i})}(t);let u;const c=function(t){const n=t=>{u&&Qi(t,u)};return f(a({},t),{onPlay:()=>{var e;null==(e=null==t?void 0:t.onPlay)||e.call(t),n("play")},onPause:()=>{var e;null==(e=null==t?void 0:t.onPause)||e.call(t),n("pause")},onCancel:()=>{var e;null==(e=null==t?void 0:t.onCancel)||e.call(t),n("cancel")},onFinish:()=>{var e;null==(e=null==t?void 0:t.onFinish)||e.call(t),n("finish")}})}(function(t){const{onPlay:n,onPause:e,onCancel:r,onFinish:o,onRemove:i,onStop:s,onWarn:l,onError:u,muteWarn:c,muteError:a}=null!=t?t:{},f=t=>t||s?()=>{null==t||t(),null==s||s()}:void 0;return{onPlay:n,onPause:f(e),onCancel:f(r),onFinish:f(o),onRemove:f(i),onWarn:l,onError:u,muteWarn:c,muteError:a}}(t));if(void 0!==e&&void 0!==n)throw new Error("createAnimator: provide either `src` or `doc`, not both");if(void 0===e&&void 0===n)throw new Error("createAnimator: either `src` or `doc` is required");let d=null,v=[],y=!1;const m=t=>{d?t(d):v&&v.push(t)},p=xi(c,"[PxAnimator]"),h=(t,n,...e)=>{v=null,p.error(t,n,...e)},g=t=>{try{(t=>{d=t;const n=v;v=null,null==n||n.forEach(n=>n(t))})(ps(t,i,c,r,l,o,s))}catch(t){const n=function(t){return t instanceof Error?t:new Error(String(t))}(t);h(ki.internal,1001,n)}};return u={isReady:()=>!!d,getRootElement:()=>d?d.getRootElement():null,isPlaying:()=>(null==d?void 0:d.isPlaying())||!1,play:()=>{m(t=>t.play())},pause:()=>{m(t=>t.pause())},cancel:()=>{m(t=>t.cancel())},finish:()=>{m(t=>t.finish())},setPlaybackRate:t=>{m(n=>n.setPlaybackRate(t))},getCurrentTime:()=>d?d.getCurrentTime():null,setCurrentTime:t=>{m(n=>n.setCurrentTime(t))},getCurrentProgress:()=>d?d.getCurrentProgress():null,setCurrentProgress:t=>{m(n=>n.setCurrentProgress(t))},destroy:()=>{y=!0,v=null,null==d||d.destroy()}},function(t){const n=Ji();if(n.animators.has(t))return;n.animators.add(t),Qi("add",t);const e=t.destroy.bind(t);t.destroy=()=>{e(),n.animators.delete(t)&&Qi("remove",t)}}(u),void 0!==e?g(e):fetch(n).then(t=>t.json()).then(t=>{y||(function(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&"svg"===t.type}(t)?g(t):h(ki.document,1002,n))}).catch(t=>{var e;h(ki.host,1003,n,null!=(e=null==t?void 0:t.message)?e:String(t))}),u}function bs(t){const n=document.querySelectorAll("["+Z+"]");for(let e=0;e<n.length;e++){const r=n[e];if(!r[G]){const n=r.getAttribute(Z);n&&(r[G]=gs(f(a({},t),{src:n,container:r})))}}}return vs=v,((n,r,i,l)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let i of o(r))s.call(n,i)||void 0===i||t(n,i,{get:()=>r[i],enumerable:!(l=e(r,i))||l.enumerable});return n})(t({},"__esModule",{value:!0}),vs)})();
|