reacthub-pixitweenjs 0.2.107-alpha.99 → 0.2.107-test.0

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.
Files changed (30) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +35 -14
  3. package/dist/.gitkeep +0 -0
  4. package/dist/components/PixiAudioSprite/PixiAudioSprite.d.ts +4 -3
  5. package/dist/components/PixiAudioSprite/PixiAudioSprite.stories.d.ts +55 -12
  6. package/dist/components/PixiAudioSprite/useAudioVisualizer.d.ts +18 -0
  7. package/dist/components/PixiAudioSprite/wave-config.d.ts +4 -0
  8. package/dist/components/PixiGifSprite/PixiGifSprite.stories.d.ts +1 -0
  9. package/dist/components/PixiLottieSprite/PixiLottieSprite.d.ts +14 -0
  10. package/dist/components/PixiLottieSprite/PixiLottieSprite.stories.d.ts +149 -0
  11. package/dist/components/PixiLottieSprite/index.d.ts +1 -0
  12. package/dist/components/PixiTransformer/MenuIcons.d.ts +40 -0
  13. package/dist/components/PixiTransformer/MenuUtils.d.ts +2 -0
  14. package/dist/components/PixiTransformer/PixiColorPicker.d.ts +14 -0
  15. package/dist/components/PixiTransformer/PixiDropdownMenu.d.ts +16 -0
  16. package/dist/components/PixiTransformer/PixiMenuText.d.ts +2 -0
  17. package/dist/components/PixiTransformer/PixiTransformer.d.ts +2 -1
  18. package/dist/components/PixiTransformer/PixiTransformerMenu.d.ts +9 -0
  19. package/dist/components/PixiVideoSprite/PixiVideoSprite.d.ts +1 -0
  20. package/dist/components/index.d.ts +1 -0
  21. package/dist/index.es.js +21039 -10616
  22. package/dist/index.umd.js +183 -168
  23. package/dist/providers/AudioContextProvider.d.ts +12 -0
  24. package/dist/stories/Features/TimelineTest.stories.d.ts +0 -1
  25. package/dist/types/Animations.d.ts +2 -1
  26. package/dist/types/BaseProps.d.ts +2 -4
  27. package/dist/types/Effects.d.ts +8 -0
  28. package/dist/utils/isRemoteAsset.d.ts +1 -0
  29. package/package.json +17 -4
  30. package/dist/components/PixiGifSprite/PixiGifSprite.d.ts +0 -19
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(le,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("gsap"),require("reacthub-react-bindings")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","gsap","reacthub-react-bindings"],P):(le=typeof globalThis<"u"?globalThis:le||self,P(le["reacthub-pixitweenjs"]={},le.React,le.PIXIReact,le.PIXI,le.gsap,le.reacthubReactBindings))})(this,function(le,P,ee,Fh,k,Oh){"use strict";function Wa(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const L=Wa(P),$e=Wa(Fh);var Ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Nh(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}),r}var qa={exports:{}},yi={};/**
1
+ (function(C,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("gsap"),require("reacthub-react-bindings"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","gsap","reacthub-react-bindings","react-dom"],E):(C=typeof globalThis<"u"?globalThis:C||self,E(C["reacthub-pixitweenjs"]={},C.React,C.PIXIReact,C.PIXI,C.gsap,C.reacthubReactBindings,C.ReactDOM))})(this,function(exports,React,react,PIXI,gsap$2,reacthubReactBindings,require$$0$1){"use strict";function _interopNamespaceDefault(C){const E=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(C){for(const I in C)if(I!=="default"){const B=Object.getOwnPropertyDescriptor(C,I);Object.defineProperty(E,I,B.get?B:{enumerable:!0,get:()=>C[I]})}}return E.default=C,Object.freeze(E)}const React__namespace=_interopNamespaceDefault(React),PIXI__namespace=_interopNamespaceDefault(PIXI);var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(C){return C&&C.__esModule&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C}function getAugmentedNamespace(C){if(C.__esModule)return C;var E=C.default;if(typeof E=="function"){var I=function B(){return this instanceof B?Reflect.construct(E,arguments,this.constructor):E.apply(this,arguments)};I.prototype=E.prototype}else I={};return Object.defineProperty(I,"__esModule",{value:!0}),Object.keys(C).forEach(function(B){var U=Object.getOwnPropertyDescriptor(C,B);Object.defineProperty(I,B,U.get?U:{enumerable:!0,get:function(){return C[B]}})}),I}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var kh=P,Lh=Symbol.for("react.element"),Dh=Symbol.for("react.fragment"),Bh=Object.prototype.hasOwnProperty,Uh=kh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$h={key:!0,ref:!0,__self:!0,__source:!0};function Ya(t,e,r){var i,n={},s=null,a=null;r!==void 0&&(s=""+r),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(a=e.ref);for(i in e)Bh.call(e,i)&&!$h.hasOwnProperty(i)&&(n[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps,e)n[i]===void 0&&(n[i]=e[i]);return{$$typeof:Lh,type:t,key:s,ref:a,props:n,_owner:Uh.current}}yi.Fragment=Dh,yi.jsx=Ya,yi.jsxs=Ya,qa.exports=yi;var Z=qa.exports,Dt=(t=>(t.BlackAndWhite="BlackAndWhite",t.Sepia="Sepia",t.RetroVintage="RetroVintage",t.NightVision="NightVision",t.Normal="Normal",t.Vignette="Vignette",t.None="Normal",t))(Dt||{});let Ka;function Za(){return Ka=document.body,Ka}function Oe(t,e,r){let i;return P.useEffect(()=>{i=i||Za();const n=s=>{const a=s.detail;e(a)};return i.addEventListener(t,n,!1),()=>{i==null||i.removeEventListener(t,n,!1)}},r),n=>{i=n}}function nr(t,e){const r=Za(),i=new CustomEvent(t,{detail:e});r.dispatchEvent(i)}function Gh(){let t;function e(r){t=r}return e.emit=function(r,i){const n=new CustomEvent(r,{bubbles:!0,detail:i});t==null||t.dispatchEvent(n)},e}const At=L.createContext({}),we={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE",SCRUBBER_CLICKED:"GSAP_SCRUBBER_CLICKED",TRANSFORMER_DRAG_START:"TRANSFORMER_DRAG_START",TRANSFORMER_DRAG_END:"TRANSFORMER_DRAG_END",REVERSE_MODE_START:"REVERSE_MODE_START",REVERSE_MODE_END:"REVERSE_MODE_END"},zh=({children:t})=>{const[e,r]=P.useState(0),i=P.useRef(),n=P.useRef(),s=P.useRef(0),a=P.useRef(!1),o=P.useRef(!1),[u,h]=P.useState(!1);P.useLayoutEffect(()=>(n.current=k.context(()=>{i.current&&i.current.progress(0).kill(),i.current&&i.current.clear(),i.current&&k.killTweensOf(i.current),i.current=k.timeline({paused:!0,defaults:{duration:0}})}),()=>{i.current&&i.current.revert(),n.current.revert()}),[]);const d=P.useCallback(()=>{if(i.current){let x=i.current.time();x<s.current?a.current=!0:a.current=!1,s.current=x}},[]);P.useEffect(()=>{if(i.current){const _=i.current;_.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){_.pause(),d()}).eventCallback("onUpdate",function(){d()}).eventCallback("onRepeat",function(){console.log("onrepeat",_.progress())}).eventCallback("onReverseComplete",function(){console.log("onReverseComplete",_.progress())}).eventCallback("onComplete",function(){_.seek(0),_.pause(),nr(we.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),d()})}},[]);const l=P.useCallback(()=>{i.current&&i.current.revert()},[]),c=P.useCallback(()=>{i.current&&i.current.restart()},[]),f=P.useCallback(()=>{if(i.current){const _=i.current;_.repeat(1),_.restart()}},[]),p=P.useCallback(_=>{i.current&&i.current.seek(_)},[]),m=P.useCallback(()=>{i.current&&i.current.seek(4)},[]),v=P.useCallback(()=>{const _=i.current;return _?_.totalDuration():0},[]),g=()=>{i.current&&(i.current.pause(),nr(we.PAUSE))},y=()=>{i.current&&(i.current.resume(),nr(we.RESUME))};return Oe(we.SEEK_START,()=>{o.current=!0}),Oe(we.SCRUBBER_PLAY,()=>{y()}),Oe(we.SCRUBBER_PAUSE,()=>{g()}),Oe(we.SCRUBBER_SEEK,_=>{p(_)}),Oe(we.SEEK_END,()=>{o.current=!1}),Oe(we.REVERSE_MODE_START,()=>{a.current=!0}),Oe(we.REVERSE_MODE_END,()=>{a.current=!1}),Oe(we.SCRUBBER_PROGRESS_UPDATE,_=>{}),Z.jsx(At.Provider,{value:{gsapCtx:n,tl:i,handlePlay:y,handlePause:g,handleReset:l,handleSeek:p,handleSeekTest:m,handleRestart:c,handleRepeat:f,playerTimeRef:s,getTimelineDuration:v,totalDuration:e,setTotalDuration:r,reverseModeRef:a,dragModeRef:o,isRemotion:u,setIsRemotion:h},children:t})},jh=({pixiTransformerRef:t,imageRef:e,isMounted:r,transformCommit:i,transformChange:n,mouseoverEvent:s,onDoubleClick:a,uniqueId:o="",isText:u=!1})=>{const h=$e.utils.string2hex("#F3C409"),d=$e.utils.string2hex("#F3C409"),l=L.useRef({isDragging:!1}),c=ee.useApp(),f=c.screen.width,p=c.screen.height,m=L.useMemo(()=>{const b=Math.min(f,p)/800;return 1.5*b<2?2:1.5*b},[f,p]),v=300,g=L.useRef(0),y=L.useCallback(()=>{s&&!l.current.isDragging&&s(!0)},[s]),_=L.useCallback(()=>{s&&!l.current.isDragging&&s(!1)},[s]),x=L.useCallback(()=>{l.current.isDragging=!0;const b=new Date().getTime();b-g.current<v&&a&&a(),g.current=b},[]),T=L.useCallback(b=>{l.current.isDragging=!0,n&&n(b),nr(we.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[n]),w=L.useCallback(()=>{if(e.current===null)return;const b=e.current.x,S=e.current.y,A=e.current.width,I=e.current.height,F=e.current.rotation,B=[e.current.scale.x,e.current.scale.y],E=B[0]<0?-1:1,C=B[1]<0?-1:1;i&&(i({uniqueId:o,transformation:{x:Math.round(b),y:Math.round(S),width:Math.round(Math.max(5,A)),height:Math.round(Math.max(5,I)),rotation:F,scale:u?B:[E,C]}}),nr(we.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),l.current.isDragging=!1},[i]);return L.useEffect(()=>(t.current&&(t.current.on("mouseover",y),t.current.on("mouseout",_),t.current.on("mousedown",x)),()=>{t.current&&(t.current.off("mouseover",y),t.current.off("mouseout",_),t.current.off("mousedown",x))}),[]),Z.jsx(Oh.Transformer,{ref:t,group:r?[e.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:m,color:d},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:h,shape:"circle",radius:10},transformchange:T,transformcommit:w})};function Hh(){this.__data__=[],this.size=0}var Vh=Hh;function Xh(t,e){return t===e||t!==t&&e!==e}var Qa=Xh,Wh=Qa;function qh(t,e){for(var r=t.length;r--;)if(Wh(t[r][0],e))return r;return-1}var xi=qh,Yh=xi,Kh=Array.prototype,Zh=Kh.splice;function Qh(t){var e=this.__data__,r=Yh(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():Zh.call(e,r,1),--this.size,!0}var Jh=Qh,ef=xi;function tf(t){var e=this.__data__,r=ef(e,t);return r<0?void 0:e[r][1]}var rf=tf,nf=xi;function sf(t){return nf(this.__data__,t)>-1}var af=sf,of=xi;function lf(t,e){var r=this.__data__,i=of(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}var uf=lf,cf=Vh,hf=Jh,ff=rf,df=af,pf=uf;function sr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}sr.prototype.clear=cf,sr.prototype.delete=hf,sr.prototype.get=ff,sr.prototype.has=df,sr.prototype.set=pf;var bi=sr,mf=bi;function gf(){this.__data__=new mf,this.size=0}var vf=gf;function _f(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var yf=_f;function xf(t){return this.__data__.get(t)}var bf=xf;function Tf(t){return this.__data__.has(t)}var wf=Tf,Sf=typeof Ve=="object"&&Ve&&Ve.Object===Object&&Ve,Ja=Sf,Af=Ja,Ef=typeof self=="object"&&self&&self.Object===Object&&self,Cf=Af||Ef||Function("return this")(),ht=Cf,If=ht,Rf=If.Symbol,Ti=Rf,eo=Ti,to=Object.prototype,Pf=to.hasOwnProperty,Mf=to.toString,Ur=eo?eo.toStringTag:void 0;function Ff(t){var e=Pf.call(t,Ur),r=t[Ur];try{t[Ur]=void 0;var i=!0}catch{}var n=Mf.call(t);return i&&(e?t[Ur]=r:delete t[Ur]),n}var Of=Ff,Nf=Object.prototype,kf=Nf.toString;function Lf(t){return kf.call(t)}var Df=Lf,ro=Ti,Bf=Of,Uf=Df,$f="[object Null]",Gf="[object Undefined]",io=ro?ro.toStringTag:void 0;function zf(t){return t==null?t===void 0?Gf:$f:io&&io in Object(t)?Bf(t):Uf(t)}var $r=zf;function jf(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Gr=jf,Hf=$r,Vf=Gr,Xf="[object AsyncFunction]",Wf="[object Function]",qf="[object GeneratorFunction]",Yf="[object Proxy]";function Kf(t){if(!Vf(t))return!1;var e=Hf(t);return e==Wf||e==qf||e==Xf||e==Yf}var no=Kf,Zf=ht,Qf=Zf["__core-js_shared__"],Jf=Qf,Gn=Jf,so=function(){var t=/[^.]+$/.exec(Gn&&Gn.keys&&Gn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ed(t){return!!so&&so in t}var td=ed,rd=Function.prototype,id=rd.toString;function nd(t){if(t!=null){try{return id.call(t)}catch{}try{return t+""}catch{}}return""}var ao=nd,sd=no,ad=td,od=Gr,ld=ao,ud=/[\\^$.*+?()[\]{}|]/g,cd=/^\[object .+?Constructor\]$/,hd=Function.prototype,fd=Object.prototype,dd=hd.toString,pd=fd.hasOwnProperty,md=RegExp("^"+dd.call(pd).replace(ud,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gd(t){if(!od(t)||ad(t))return!1;var e=sd(t)?md:cd;return e.test(ld(t))}var vd=gd;function _d(t,e){return t==null?void 0:t[e]}var yd=_d,xd=vd,bd=yd;function Td(t,e){var r=bd(t,e);return xd(r)?r:void 0}var ar=Td,wd=ar,Sd=ht,Ad=wd(Sd,"Map"),zn=Ad,Ed=ar,Cd=Ed(Object,"create"),wi=Cd,oo=wi;function Id(){this.__data__=oo?oo(null):{},this.size=0}var Rd=Id;function Pd(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Md=Pd,Fd=wi,Od="__lodash_hash_undefined__",Nd=Object.prototype,kd=Nd.hasOwnProperty;function Ld(t){var e=this.__data__;if(Fd){var r=e[t];return r===Od?void 0:r}return kd.call(e,t)?e[t]:void 0}var Dd=Ld,Bd=wi,Ud=Object.prototype,$d=Ud.hasOwnProperty;function Gd(t){var e=this.__data__;return Bd?e[t]!==void 0:$d.call(e,t)}var zd=Gd,jd=wi,Hd="__lodash_hash_undefined__";function Vd(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=jd&&e===void 0?Hd:e,this}var Xd=Vd,Wd=Rd,qd=Md,Yd=Dd,Kd=zd,Zd=Xd;function or(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}or.prototype.clear=Wd,or.prototype.delete=qd,or.prototype.get=Yd,or.prototype.has=Kd,or.prototype.set=Zd;var Qd=or,lo=Qd,Jd=bi,ep=zn;function tp(){this.size=0,this.__data__={hash:new lo,map:new(ep||Jd),string:new lo}}var rp=tp;function ip(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var np=ip,sp=np;function ap(t,e){var r=t.__data__;return sp(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Si=ap,op=Si;function lp(t){var e=op(this,t).delete(t);return this.size-=e?1:0,e}var up=lp,cp=Si;function hp(t){return cp(this,t).get(t)}var fp=hp,dp=Si;function pp(t){return dp(this,t).has(t)}var mp=pp,gp=Si;function vp(t,e){var r=gp(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}var _p=vp,yp=rp,xp=up,bp=fp,Tp=mp,wp=_p;function lr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}lr.prototype.clear=yp,lr.prototype.delete=xp,lr.prototype.get=bp,lr.prototype.has=Tp,lr.prototype.set=wp;var jn=lr,Sp=bi,Ap=zn,Ep=jn,Cp=200;function Ip(t,e){var r=this.__data__;if(r instanceof Sp){var i=r.__data__;if(!Ap||i.length<Cp-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new Ep(i)}return r.set(t,e),this.size=r.size,this}var Rp=Ip,Pp=bi,Mp=vf,Fp=yf,Op=bf,Np=wf,kp=Rp;function ur(t){var e=this.__data__=new Pp(t);this.size=e.size}ur.prototype.clear=Mp,ur.prototype.delete=Fp,ur.prototype.get=Op,ur.prototype.has=Np,ur.prototype.set=kp;var uo=ur,Lp="__lodash_hash_undefined__";function Dp(t){return this.__data__.set(t,Lp),this}var Bp=Dp;function Up(t){return this.__data__.has(t)}var $p=Up,Gp=jn,zp=Bp,jp=$p;function Ai(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Gp;++e<r;)this.add(t[e])}Ai.prototype.add=Ai.prototype.push=zp,Ai.prototype.has=jp;var Hp=Ai;function Vp(t,e){for(var r=-1,i=t==null?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}var Xp=Vp;function Wp(t,e){return t.has(e)}var qp=Wp,Yp=Hp,Kp=Xp,Zp=qp,Qp=1,Jp=2;function em(t,e,r,i,n,s){var a=r&Qp,o=t.length,u=e.length;if(o!=u&&!(a&&u>o))return!1;var h=s.get(t),d=s.get(e);if(h&&d)return h==e&&d==t;var l=-1,c=!0,f=r&Jp?new Yp:void 0;for(s.set(t,e),s.set(e,t);++l<o;){var p=t[l],m=e[l];if(i)var v=a?i(m,p,l,e,t,s):i(p,m,l,t,e,s);if(v!==void 0){if(v)continue;c=!1;break}if(f){if(!Kp(e,function(g,y){if(!Zp(f,y)&&(p===g||n(p,g,r,i,s)))return f.push(y)})){c=!1;break}}else if(!(p===m||n(p,m,r,i,s))){c=!1;break}}return s.delete(t),s.delete(e),c}var co=em,tm=ht,rm=tm.Uint8Array,im=rm;function nm(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}var sm=nm;function am(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var om=am,ho=Ti,fo=im,lm=Qa,um=co,cm=sm,hm=om,fm=1,dm=2,pm="[object Boolean]",mm="[object Date]",gm="[object Error]",vm="[object Map]",_m="[object Number]",ym="[object RegExp]",xm="[object Set]",bm="[object String]",Tm="[object Symbol]",wm="[object ArrayBuffer]",Sm="[object DataView]",po=ho?ho.prototype:void 0,Hn=po?po.valueOf:void 0;function Am(t,e,r,i,n,s,a){switch(r){case Sm:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case wm:return!(t.byteLength!=e.byteLength||!s(new fo(t),new fo(e)));case pm:case mm:case _m:return lm(+t,+e);case gm:return t.name==e.name&&t.message==e.message;case ym:case bm:return t==e+"";case vm:var o=cm;case xm:var u=i&fm;if(o||(o=hm),t.size!=e.size&&!u)return!1;var h=a.get(t);if(h)return h==e;i|=dm,a.set(t,e);var d=um(o(t),o(e),i,n,s,a);return a.delete(t),d;case Tm:if(Hn)return Hn.call(t)==Hn.call(e)}return!1}var Em=Am;function Cm(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var Im=Cm,Rm=Array.isArray,ft=Rm,Pm=Im,Mm=ft;function Fm(t,e,r){var i=e(t);return Mm(t)?i:Pm(i,r(t))}var Om=Fm;function Nm(t,e){for(var r=-1,i=t==null?0:t.length,n=0,s=[];++r<i;){var a=t[r];e(a,r,t)&&(s[n++]=a)}return s}var km=Nm;function Lm(){return[]}var Dm=Lm,Bm=km,Um=Dm,$m=Object.prototype,Gm=$m.propertyIsEnumerable,mo=Object.getOwnPropertySymbols,zm=mo?function(t){return t==null?[]:(t=Object(t),Bm(mo(t),function(e){return Gm.call(t,e)}))}:Um,jm=zm;function Hm(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var Vm=Hm;function Xm(t){return t!=null&&typeof t=="object"}var zr=Xm,Wm=$r,qm=zr,Ym="[object Arguments]";function Km(t){return qm(t)&&Wm(t)==Ym}var Zm=Km,go=Zm,Qm=zr,vo=Object.prototype,Jm=vo.hasOwnProperty,e0=vo.propertyIsEnumerable,t0=go(function(){return arguments}())?go:function(t){return Qm(t)&&Jm.call(t,"callee")&&!e0.call(t,"callee")},Vn=t0,Ei={exports:{}};function r0(){return!1}var i0=r0;Ei.exports,function(t,e){var r=ht,i=i0,n=e&&!e.nodeType&&e,s=n&&!0&&t&&!t.nodeType&&t,a=s&&s.exports===n,o=a?r.Buffer:void 0,u=o?o.isBuffer:void 0,h=u||i;t.exports=h}(Ei,Ei.exports);var Xn=Ei.exports,n0=9007199254740991,s0=/^(?:0|[1-9]\d*)$/;function a0(t,e){var r=typeof t;return e=e??n0,!!e&&(r=="number"||r!="symbol"&&s0.test(t))&&t>-1&&t%1==0&&t<e}var _o=a0,o0=9007199254740991;function l0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=o0}var Wn=l0,u0=$r,c0=Wn,h0=zr,f0="[object Arguments]",d0="[object Array]",p0="[object Boolean]",m0="[object Date]",g0="[object Error]",v0="[object Function]",_0="[object Map]",y0="[object Number]",x0="[object Object]",b0="[object RegExp]",T0="[object Set]",w0="[object String]",S0="[object WeakMap]",A0="[object ArrayBuffer]",E0="[object DataView]",C0="[object Float32Array]",I0="[object Float64Array]",R0="[object Int8Array]",P0="[object Int16Array]",M0="[object Int32Array]",F0="[object Uint8Array]",O0="[object Uint8ClampedArray]",N0="[object Uint16Array]",k0="[object Uint32Array]",ve={};ve[C0]=ve[I0]=ve[R0]=ve[P0]=ve[M0]=ve[F0]=ve[O0]=ve[N0]=ve[k0]=!0,ve[f0]=ve[d0]=ve[A0]=ve[p0]=ve[E0]=ve[m0]=ve[g0]=ve[v0]=ve[_0]=ve[y0]=ve[x0]=ve[b0]=ve[T0]=ve[w0]=ve[S0]=!1;function L0(t){return h0(t)&&c0(t.length)&&!!ve[u0(t)]}var D0=L0;function B0(t){return function(e){return t(e)}}var U0=B0,Ci={exports:{}};Ci.exports,function(t,e){var r=Ja,i=e&&!e.nodeType&&e,n=i&&!0&&t&&!t.nodeType&&t,s=n&&n.exports===i,a=s&&r.process,o=function(){try{var u=n&&n.require&&n.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();t.exports=o}(Ci,Ci.exports);var $0=Ci.exports,G0=D0,z0=U0,yo=$0,xo=yo&&yo.isTypedArray,j0=xo?z0(xo):G0,qn=j0,H0=Vm,V0=Vn,X0=ft,W0=Xn,q0=_o,Y0=qn,K0=Object.prototype,Z0=K0.hasOwnProperty;function Q0(t,e){var r=X0(t),i=!r&&V0(t),n=!r&&!i&&W0(t),s=!r&&!i&&!n&&Y0(t),a=r||i||n||s,o=a?H0(t.length,String):[],u=o.length;for(var h in t)(e||Z0.call(t,h))&&!(a&&(h=="length"||n&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||q0(h,u)))&&o.push(h);return o}var J0=Q0,eg=Object.prototype;function tg(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||eg;return t===r}var bo=tg;function rg(t,e){return function(r){return t(e(r))}}var ig=rg,ng=ig,sg=ng(Object.keys,Object),ag=sg,og=bo,lg=ag,ug=Object.prototype,cg=ug.hasOwnProperty;function hg(t){if(!og(t))return lg(t);var e=[];for(var r in Object(t))cg.call(t,r)&&r!="constructor"&&e.push(r);return e}var To=hg,fg=no,dg=Wn;function pg(t){return t!=null&&dg(t.length)&&!fg(t)}var Ii=pg,mg=J0,gg=To,vg=Ii;function _g(t){return vg(t)?mg(t):gg(t)}var Yn=_g,yg=Om,xg=jm,bg=Yn;function Tg(t){return yg(t,bg,xg)}var wg=Tg,wo=wg,Sg=1,Ag=Object.prototype,Eg=Ag.hasOwnProperty;function Cg(t,e,r,i,n,s){var a=r&Sg,o=wo(t),u=o.length,h=wo(e),d=h.length;if(u!=d&&!a)return!1;for(var l=u;l--;){var c=o[l];if(!(a?c in e:Eg.call(e,c)))return!1}var f=s.get(t),p=s.get(e);if(f&&p)return f==e&&p==t;var m=!0;s.set(t,e),s.set(e,t);for(var v=a;++l<u;){c=o[l];var g=t[c],y=e[c];if(i)var _=a?i(y,g,c,e,t,s):i(g,y,c,t,e,s);if(!(_===void 0?g===y||n(g,y,r,i,s):_)){m=!1;break}v||(v=c=="constructor")}if(m&&!v){var x=t.constructor,T=e.constructor;x!=T&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof T=="function"&&T instanceof T)&&(m=!1)}return s.delete(t),s.delete(e),m}var Ig=Cg,Rg=ar,Pg=ht,Mg=Rg(Pg,"DataView"),Fg=Mg,Og=ar,Ng=ht,kg=Og(Ng,"Promise"),Lg=kg,Dg=ar,Bg=ht,Ug=Dg(Bg,"Set"),$g=Ug,Gg=ar,zg=ht,jg=Gg(zg,"WeakMap"),Hg=jg,Kn=Fg,Zn=zn,Qn=Lg,Jn=$g,es=Hg,So=$r,cr=ao,Ao="[object Map]",Vg="[object Object]",Eo="[object Promise]",Co="[object Set]",Io="[object WeakMap]",Ro="[object DataView]",Xg=cr(Kn),Wg=cr(Zn),qg=cr(Qn),Yg=cr(Jn),Kg=cr(es),Bt=So;(Kn&&Bt(new Kn(new ArrayBuffer(1)))!=Ro||Zn&&Bt(new Zn)!=Ao||Qn&&Bt(Qn.resolve())!=Eo||Jn&&Bt(new Jn)!=Co||es&&Bt(new es)!=Io)&&(Bt=function(t){var e=So(t),r=e==Vg?t.constructor:void 0,i=r?cr(r):"";if(i)switch(i){case Xg:return Ro;case Wg:return Ao;case qg:return Eo;case Yg:return Co;case Kg:return Io}return e});var Po=Bt,ts=uo,Zg=co,Qg=Em,Jg=Ig,Mo=Po,Fo=ft,Oo=Xn,ev=qn,tv=1,No="[object Arguments]",ko="[object Array]",Ri="[object Object]",rv=Object.prototype,Lo=rv.hasOwnProperty;function iv(t,e,r,i,n,s){var a=Fo(t),o=Fo(e),u=a?ko:Mo(t),h=o?ko:Mo(e);u=u==No?Ri:u,h=h==No?Ri:h;var d=u==Ri,l=h==Ri,c=u==h;if(c&&Oo(t)){if(!Oo(e))return!1;a=!0,d=!1}if(c&&!d)return s||(s=new ts),a||ev(t)?Zg(t,e,r,i,n,s):Qg(t,e,u,r,i,n,s);if(!(r&tv)){var f=d&&Lo.call(t,"__wrapped__"),p=l&&Lo.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,v=p?e.value():e;return s||(s=new ts),n(m,v,r,i,s)}}return c?(s||(s=new ts),Jg(t,e,r,i,n,s)):!1}var nv=iv,sv=nv,Do=zr;function Bo(t,e,r,i,n){return t===e?!0:t==null||e==null||!Do(t)&&!Do(e)?t!==t&&e!==e:sv(t,e,r,i,Bo,n)}var rs=Bo,av=rs;function ov(t,e){return av(t,e)}var lv=ov;const uv=Lt(lv),cv=(t,e)=>{const r=P.useRef(!0),i=P.useRef(e);P.useEffect(()=>{const n=i.current.every((s,a)=>uv(s,e[a]));(r.current||!n)&&t(),r.current=!1,i.current=e},e)};function hv(t,e=700){const[r,i]=P.useState(t);return cv(()=>{const n=setTimeout(()=>{i(t)},e);return()=>{clearTimeout(n)}},[t,e]),r}var fv=To,dv=Po,pv=Vn,mv=ft,gv=Ii,vv=Xn,_v=bo,yv=qn,xv="[object Map]",bv="[object Set]",Tv=Object.prototype,wv=Tv.hasOwnProperty;function Sv(t){if(t==null)return!0;if(gv(t)&&(mv(t)||typeof t=="string"||typeof t.splice=="function"||vv(t)||yv(t)||pv(t)))return!t.length;var e=dv(t);if(e==xv||e==bv)return!t.size;if(_v(t))return!fv(t).length;for(var r in t)if(wv.call(t,r))return!1;return!0}var Av=Sv;const hr=Lt(Av);var is=(t=>(t.NONE="none",t.NORMAL="normal",t.LENSFLARE="lensflare",t.FILMSTRIP="filmstrip",t.GRUNGE="grunge",t.BRICKS="bricks",t))(is||{});const Uo={normal:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:0},lensflare:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:1},filmstrip:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/frames_filmstrip_5.png",blendmode:"ADD",alpha:1},grunge:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/pixi_overlay_grunge_60.jpg",blendmode:"ADD",alpha:1},bricks:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/bricks_Overlay_100.jpg",blendmode:"MULTIPLY",alpha:1}},Ev=t=>{const{overlay:e,width:r,height:i,x:n,y:s}=t,{src:a,blendmode:o}=Uo[e]||Uo.normal;return Z.jsx(ee.TilingSprite,{image:a,width:r,height:i,x:n,y:s,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})};/*!
9
+ */var f$5=React,k$2=Symbol.for("react.element"),l$6=Symbol.for("react.fragment"),m$5=Object.prototype.hasOwnProperty,n$6=f$5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p$4={key:!0,ref:!0,__self:!0,__source:!0};function q(C,E,I){var B,U={},V=null,X=null;I!==void 0&&(V=""+I),E.key!==void 0&&(V=""+E.key),E.ref!==void 0&&(X=E.ref);for(B in E)m$5.call(E,B)&&!p$4.hasOwnProperty(B)&&(U[B]=E[B]);if(C&&C.defaultProps)for(B in E=C.defaultProps,E)U[B]===void 0&&(U[B]=E[B]);return{$$typeof:k$2,type:C,key:V,ref:X,props:U,_owner:n$6.current}}reactJsxRuntime_production_min.Fragment=l$6,reactJsxRuntime_production_min.jsx=q,reactJsxRuntime_production_min.jsxs=q,jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports,Effects=(C=>(C.BlackAndWhite="BlackAndWhite",C.Sepia="Sepia",C.RetroVintage="RetroVintage",C.NightVision="NightVision",C.Normal="Normal",C.Vignette="Vignette",C.None="Normal",C))(Effects||{}),Waveforms=(C=>(C.NONE="none",C.EQUALIZER="equalizer",C.ROUNDBARS="roundbars",C.LED="led",C.RADIAL_SPECTRUM="radial_spectrum",C.LUMI_BARS="lumi_bars",C))(Waveforms||{});let targetElement;function getElement(){return targetElement=document.body,targetElement}function useCustomEventListener(C,E,I){let B;return React.useEffect(()=>{B=B||getElement();const U=V=>{const X=V.detail;E(X)};return B.addEventListener(C,U,!1),()=>{B==null||B.removeEventListener(C,U,!1)}},I),U=>{B=U}}function emitCustomEvent(C,E){const I=getElement(),B=new CustomEvent(C,{detail:E});I.dispatchEvent(B)}function newCustomEventEmitter(){let C;function E(I){C=I}return E.emit=function(I,B){const U=new CustomEvent(I,{bubbles:!0,detail:B});C==null||C.dispatchEvent(U)},E}const GsapPixieContext=React__namespace.createContext({}),Events={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE",SCRUBBER_CLICKED:"GSAP_SCRUBBER_CLICKED",TRANSFORMER_DRAG_START:"TRANSFORMER_DRAG_START",TRANSFORMER_DRAG_END:"TRANSFORMER_DRAG_END",REVERSE_MODE_START:"REVERSE_MODE_START",REVERSE_MODE_END:"REVERSE_MODE_END"},GsapPixieContextProvider=({children:C})=>{const[E,I]=React.useState(0),B=React.useRef(),U=React.useRef(),V=React.useRef(0),X=React.useRef(!1),Y=React.useRef(!1),[K,J]=React.useState(!1);React.useLayoutEffect(()=>(U.current=gsap$2.context(()=>{B.current&&B.current.progress(0).kill(),B.current&&B.current.clear(),B.current&&gsap$2.killTweensOf(B.current),B.current=gsap$2.timeline({paused:!0,defaults:{duration:0}})}),()=>{B.current&&B.current.revert(),U.current.revert()}),[]);const xe=React.useCallback(()=>{if(B.current){let Ie=B.current.time();Ie<V.current?X.current=!0:X.current=!1,V.current=Ie}},[]);React.useEffect(()=>{if(B.current){const Pe=B.current;Pe.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){Pe.pause(),xe()}).eventCallback("onUpdate",function(){xe()}).eventCallback("onRepeat",function(){console.log("onrepeat",Pe.progress())}).eventCallback("onReverseComplete",function(){console.log("onReverseComplete",Pe.progress())}).eventCallback("onComplete",function(){Pe.seek(0),Pe.pause(),emitCustomEvent(Events.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),xe()})}},[]);const Z=React.useCallback(()=>{B.current&&B.current.revert()},[]),_e=React.useCallback(()=>{B.current&&B.current.restart()},[]),Se=React.useCallback(()=>{if(B.current){const Pe=B.current;Pe.repeat(1),Pe.restart()}},[]),Ee=React.useCallback(Pe=>{B.current&&B.current.seek(Pe)},[]),Ae=React.useCallback(()=>{B.current&&B.current.seek(4)},[]),Re=React.useCallback(()=>{const Pe=B.current;return Pe?Pe.totalDuration():0},[]),Te=()=>{B.current&&(B.current.pause(),emitCustomEvent(Events.PAUSE))},we=()=>{B.current&&(B.current.resume(),emitCustomEvent(Events.RESUME))};return useCustomEventListener(Events.SEEK_START,()=>{Y.current=!0}),useCustomEventListener(Events.SCRUBBER_PLAY,()=>{we()}),useCustomEventListener(Events.SCRUBBER_PAUSE,()=>{Te()}),useCustomEventListener(Events.SCRUBBER_SEEK,Pe=>{Ee(Pe)}),useCustomEventListener(Events.SEEK_END,()=>{Y.current=!1}),useCustomEventListener(Events.REVERSE_MODE_START,()=>{X.current=!0}),useCustomEventListener(Events.REVERSE_MODE_END,()=>{X.current=!1}),useCustomEventListener(Events.SCRUBBER_PROGRESS_UPDATE,Pe=>{}),jsxRuntimeExports.jsx(GsapPixieContext.Provider,{value:{gsapCtx:U,tl:B,handlePlay:we,handlePause:Te,handleReset:Z,handleSeek:Ee,handleSeekTest:Ae,handleRestart:_e,handleRepeat:Se,playerTimeRef:V,getTimelineDuration:Re,totalDuration:E,setTotalDuration:I,reverseModeRef:X,dragModeRef:Y,isRemotion:K,setIsRemotion:J},children:C})},PixiTransformer=({pixiTransformerRef:C,imageRef:E,isMounted:I,transformCommit:B,transformChange:U,mouseoverEvent:V,onDoubleClick:X,uniqueId:Y="",isText:K=!1})=>{const J=PIXI__namespace.utils.string2hex("#F3C409"),xe=PIXI__namespace.utils.string2hex("#F3C409"),Z=React__namespace.useRef({isDragging:!1}),_e=react.useApp(),Se=_e.screen.width,Ee=_e.screen.height,Ae=React__namespace.useMemo(()=>{const Le=Math.min(Se,Ee)/800;return 1.5*Le<2?2:1.5*Le},[Se,Ee]),Re=300,Te=React__namespace.useRef(0),we=React__namespace.useCallback(()=>{V&&!Z.current.isDragging&&V(!0)},[V]),Pe=React__namespace.useCallback(()=>{V&&!Z.current.isDragging&&V(!1)},[V]),Ie=React__namespace.useCallback(()=>{Z.current.isDragging=!0;const Le=new Date().getTime();Le-Te.current<Re&&X&&X(),Te.current=Le},[]),Me=React__namespace.useCallback(Le=>{Z.current.isDragging=!0,U&&U(Le),emitCustomEvent(Events.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[U]),Oe=React__namespace.useCallback(()=>{if(E.current===null)return;const Le=E.current.x,Ne=E.current.y,Ve=E.current.width,Xe=E.current.height,Ue=E.current.rotation,We=[E.current.scale.x,E.current.scale.y],ze=We[0]<0?-1:1,He=We[1]<0?-1:1;B&&(B({uniqueId:Y,transformation:{x:Math.round(Le),y:Math.round(Ne),width:Math.round(Math.max(5,Ve)),height:Math.round(Math.max(5,Xe)),rotation:Ue,scale:K?We:[ze,He]}}),emitCustomEvent(Events.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),Z.current.isDragging=!1},[B]);return React__namespace.useEffect(()=>(C.current&&(C.current.on("mouseover",we),C.current.on("mouseout",Pe),C.current.on("mousedown",Ie)),()=>{C.current&&(C.current.off("mouseover",we),C.current.off("mouseout",Pe),C.current.off("mousedown",Ie))}),[]),jsxRuntimeExports.jsx(reacthubReactBindings.Transformer,{ref:C,group:I?[E.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:Ae,color:xe},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:J,shape:"circle",radius:10},transformchange:Me,transformcommit:Oe})};function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$2(C,E){return C===E||C!==C&&E!==E}var eq_1=eq$2,eq$1=eq_1;function assocIndexOf$4(C,E){for(var I=C.length;I--;)if(eq$1(C[I][0],E))return I;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(C){var E=this.__data__,I=assocIndexOf$3(E,C);if(I<0)return!1;var B=E.length-1;return I==B?E.pop():splice.call(E,I,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(C){var E=this.__data__,I=assocIndexOf$2(E,C);return I<0?void 0:E[I][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(C){return assocIndexOf$1(this.__data__,C)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(C,E){var I=this.__data__,B=assocIndexOf(I,C);return B<0?(++this.size,I.push([C,E])):I[B][1]=E,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(C){var E=-1,I=C==null?0:C.length;for(this.clear();++E<I;){var B=C[E];this.set(B[0],B[1])}}ListCache$4.prototype.clear=listCacheClear,ListCache$4.prototype.delete=listCacheDelete,ListCache$4.prototype.get=listCacheGet,ListCache$4.prototype.has=listCacheHas,ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,ListCache$3=_ListCache;function stackClear$1(){this.__data__=new ListCache$3,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(C){var E=this.__data__,I=E.delete(C);return this.size=E.size,I}var _stackDelete=stackDelete$1;function stackGet$1(C){return this.__data__.get(C)}var _stackGet=stackGet$1;function stackHas$1(C){return this.__data__.has(C)}var _stackHas=stackHas$1,freeGlobal$1=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$9=freeGlobal||freeSelf||Function("return this")(),_root=root$9,root$8=_root,Symbol$5=root$8.Symbol,_Symbol=Symbol$5,Symbol$4=_Symbol,objectProto$c=Object.prototype,hasOwnProperty$9=objectProto$c.hasOwnProperty,nativeObjectToString$1=objectProto$c.toString,symToStringTag$1=Symbol$4?Symbol$4.toStringTag:void 0;function getRawTag$1(C){var E=hasOwnProperty$9.call(C,symToStringTag$1),I=C[symToStringTag$1];try{C[symToStringTag$1]=void 0;var B=!0}catch{}var U=nativeObjectToString$1.call(C);return B&&(E?C[symToStringTag$1]=I:delete C[symToStringTag$1]),U}var _getRawTag=getRawTag$1,objectProto$b=Object.prototype,nativeObjectToString=objectProto$b.toString;function objectToString$2(C){return nativeObjectToString.call(C)}var _objectToString=objectToString$2,Symbol$3=_Symbol,getRawTag=_getRawTag,objectToString$1=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$3?Symbol$3.toStringTag:void 0;function baseGetTag$5(C){return C==null?C===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(C)?getRawTag(C):objectToString$1(C)}var _baseGetTag=baseGetTag$5;function isObject$5(C){var E=typeof C;return C!=null&&(E=="object"||E=="function")}var isObject_1=isObject$5,baseGetTag$4=_baseGetTag,isObject$4=isObject_1,asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(C){if(!isObject$4(C))return!1;var E=baseGetTag$4(C);return E==funcTag$1||E==genTag||E==asyncTag||E==proxyTag}var isFunction_1=isFunction$2,root$7=_root,coreJsData$1=root$7["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var C=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return C?"Symbol(src)_1."+C:""}();function isMasked$1(C){return!!maskSrcKey&&maskSrcKey in C}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$2(C){if(C!=null){try{return funcToString$1.call(C)}catch{}try{return C+""}catch{}}return""}var _toSource=toSource$2,isFunction$1=isFunction_1,isMasked=_isMasked,isObject$3=isObject_1,toSource$1=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$a=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$8=objectProto$a.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$8).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(C){if(!isObject$3(C)||isMasked(C))return!1;var E=isFunction$1(C)?reIsNative:reIsHostCtor;return E.test(toSource$1(C))}var _baseIsNative=baseIsNative$1;function getValue$1(C,E){return C==null?void 0:C[E]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$6(C,E){var I=getValue(C,E);return baseIsNative(I)?I:void 0}var _getNative=getNative$6,getNative$5=_getNative,root$6=_root,Map$4=getNative$5(root$6,"Map"),_Map=Map$4,getNative$4=_getNative,nativeCreate$4=getNative$4(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(C){var E=this.has(C)&&delete this.__data__[C];return this.size-=E?1:0,E}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$9=Object.prototype,hasOwnProperty$7=objectProto$9.hasOwnProperty;function hashGet$1(C){var E=this.__data__;if(nativeCreate$2){var I=E[C];return I===HASH_UNDEFINED$2?void 0:I}return hasOwnProperty$7.call(E,C)?E[C]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function hashHas$1(C){var E=this.__data__;return nativeCreate$1?E[C]!==void 0:hasOwnProperty$6.call(E,C)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet$1(C,E){var I=this.__data__;return this.size+=this.has(C)?0:1,I[C]=nativeCreate&&E===void 0?HASH_UNDEFINED$1:E,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(C){var E=-1,I=C==null?0:C.length;for(this.clear();++E<I;){var B=C[E];this.set(B[0],B[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1,Hash=_Hash,ListCache$2=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$2),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(C){var E=typeof C;return E=="string"||E=="number"||E=="symbol"||E=="boolean"?C!=="__proto__":C===null}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(C,E){var I=C.__data__;return isKeyable(E)?I[typeof E=="string"?"string":"hash"]:I.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(C){var E=getMapData$3(this,C).delete(C);return this.size-=E?1:0,E}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(C){return getMapData$2(this,C).get(C)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(C){return getMapData$1(this,C).has(C)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(C,E){var I=getMapData(this,C),B=I.size;return I.set(C,E),this.size+=I.size==B?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$3(C){var E=-1,I=C==null?0:C.length;for(this.clear();++E<I;){var B=C[E];this.set(B[0],B[1])}}MapCache$3.prototype.clear=mapCacheClear,MapCache$3.prototype.delete=mapCacheDelete,MapCache$3.prototype.get=mapCacheGet,MapCache$3.prototype.has=mapCacheHas,MapCache$3.prototype.set=mapCacheSet;var _MapCache=MapCache$3,ListCache$1=_ListCache,Map$2=_Map,MapCache$2=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(C,E){var I=this.__data__;if(I instanceof ListCache$1){var B=I.__data__;if(!Map$2||B.length<LARGE_ARRAY_SIZE-1)return B.push([C,E]),this.size=++I.size,this;I=this.__data__=new MapCache$2(B)}return I.set(C,E),this.size=I.size,this}var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$2(C){var E=this.__data__=new ListCache(C);this.size=E.size}Stack$2.prototype.clear=stackClear,Stack$2.prototype.delete=stackDelete,Stack$2.prototype.get=stackGet,Stack$2.prototype.has=stackHas,Stack$2.prototype.set=stackSet;var _Stack=Stack$2,HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(C){return this.__data__.set(C,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(C){return this.__data__.has(C)}var _setCacheHas=setCacheHas$1,MapCache$1=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$1(C){var E=-1,I=C==null?0:C.length;for(this.__data__=new MapCache$1;++E<I;)this.add(C[E])}SetCache$1.prototype.add=SetCache$1.prototype.push=setCacheAdd,SetCache$1.prototype.has=setCacheHas;var _SetCache=SetCache$1;function arraySome$1(C,E){for(var I=-1,B=C==null?0:C.length;++I<B;)if(E(C[I],I,C))return!0;return!1}var _arraySome=arraySome$1;function cacheHas$1(C,E){return C.has(E)}var _cacheHas=cacheHas$1,SetCache=_SetCache,arraySome=_arraySome,cacheHas=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(C,E,I,B,U,V){var X=I&COMPARE_PARTIAL_FLAG$5,Y=C.length,K=E.length;if(Y!=K&&!(X&&K>Y))return!1;var J=V.get(C),xe=V.get(E);if(J&&xe)return J==E&&xe==C;var Z=-1,_e=!0,Se=I&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(V.set(C,E),V.set(E,C);++Z<Y;){var Ee=C[Z],Ae=E[Z];if(B)var Re=X?B(Ae,Ee,Z,E,C,V):B(Ee,Ae,Z,C,E,V);if(Re!==void 0){if(Re)continue;_e=!1;break}if(Se){if(!arraySome(E,function(Te,we){if(!cacheHas(Se,we)&&(Ee===Te||U(Ee,Te,I,B,V)))return Se.push(we)})){_e=!1;break}}else if(!(Ee===Ae||U(Ee,Ae,I,B,V))){_e=!1;break}}return V.delete(C),V.delete(E),_e}var _equalArrays=equalArrays$2,root$5=_root,Uint8Array$2=root$5.Uint8Array,_Uint8Array=Uint8Array$2;function mapToArray$1(C){var E=-1,I=Array(C.size);return C.forEach(function(B,U){I[++E]=[U,B]}),I}var _mapToArray=mapToArray$1;function setToArray$1(C){var E=-1,I=Array(C.size);return C.forEach(function(B){I[++E]=B}),I}var _setToArray=setToArray$1,Symbol$2=_Symbol,Uint8Array$1=_Uint8Array,eq=eq_1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$3="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$3="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$2="[object DataView]",symbolProto$1=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto$1?symbolProto$1.valueOf:void 0;function equalByTag$1(C,E,I,B,U,V,X){switch(I){case dataViewTag$2:if(C.byteLength!=E.byteLength||C.byteOffset!=E.byteOffset)return!1;C=C.buffer,E=E.buffer;case arrayBufferTag$1:return!(C.byteLength!=E.byteLength||!V(new Uint8Array$1(C),new Uint8Array$1(E)));case boolTag$1:case dateTag$1:case numberTag$1:return eq(+C,+E);case errorTag$1:return C.name==E.name&&C.message==E.message;case regexpTag$1:case stringTag$1:return C==E+"";case mapTag$3:var Y=mapToArray;case setTag$3:var K=B&COMPARE_PARTIAL_FLAG$4;if(Y||(Y=setToArray),C.size!=E.size&&!K)return!1;var J=X.get(C);if(J)return J==E;B|=COMPARE_UNORDERED_FLAG$2,X.set(C,E);var xe=equalArrays$1(Y(C),Y(E),B,U,V,X);return X.delete(C),xe;case symbolTag$1:if(symbolValueOf)return symbolValueOf.call(C)==symbolValueOf.call(E)}return!1}var _equalByTag=equalByTag$1;function arrayPush$1(C,E){for(var I=-1,B=E.length,U=C.length;++I<B;)C[U+I]=E[I];return C}var _arrayPush=arrayPush$1,isArray$e=Array.isArray,isArray_1=isArray$e,arrayPush=_arrayPush,isArray$d=isArray_1;function baseGetAllKeys$1(C,E,I){var B=E(C);return isArray$d(C)?B:arrayPush(B,I(C))}var _baseGetAllKeys=baseGetAllKeys$1;function arrayFilter$1(C,E){for(var I=-1,B=C==null?0:C.length,U=0,V=[];++I<B;){var X=C[I];E(X,I,C)&&(V[U++]=X)}return V}var _arrayFilter=arrayFilter$1;function stubArray$1(){return[]}var stubArray_1=stubArray$1,arrayFilter=_arrayFilter,stubArray=stubArray_1,objectProto$7=Object.prototype,propertyIsEnumerable$1=objectProto$7.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols$1=nativeGetSymbols?function(C){return C==null?[]:(C=Object(C),arrayFilter(nativeGetSymbols(C),function(E){return propertyIsEnumerable$1.call(C,E)}))}:stubArray,_getSymbols=getSymbols$1;function baseTimes$1(C,E){for(var I=-1,B=Array(C);++I<C;)B[I]=E(I);return B}var _baseTimes=baseTimes$1;function isObjectLike$5(C){return C!=null&&typeof C=="object"}var isObjectLike_1=isObjectLike$5,baseGetTag$3=_baseGetTag,isObjectLike$4=isObjectLike_1,argsTag$2="[object Arguments]";function baseIsArguments$1(C){return isObjectLike$4(C)&&baseGetTag$3(C)==argsTag$2}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$3=isObjectLike_1,objectProto$6=Object.prototype,hasOwnProperty$5=objectProto$6.hasOwnProperty,propertyIsEnumerable=objectProto$6.propertyIsEnumerable,isArguments$3=baseIsArguments(function(){return arguments}())?baseIsArguments:function(C){return isObjectLike$3(C)&&hasOwnProperty$5.call(C,"callee")&&!propertyIsEnumerable.call(C,"callee")},isArguments_1=isArguments$3,isBuffer$4={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;isBuffer$4.exports,function(C,E){var I=_root,B=stubFalse_1,U=E&&!E.nodeType&&E,V=U&&!0&&C&&!C.nodeType&&C,X=V&&V.exports===U,Y=X?I.Buffer:void 0,K=Y?Y.isBuffer:void 0,J=K||B;C.exports=J}(isBuffer$4,isBuffer$4.exports);var isBufferExports=isBuffer$4.exports,MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$2(C,E){var I=typeof C;return E=E??MAX_SAFE_INTEGER$1,!!E&&(I=="number"||I!="symbol"&&reIsUint.test(C))&&C>-1&&C%1==0&&C<E}var _isIndex=isIndex$2,MAX_SAFE_INTEGER=9007199254740991;function isLength$3(C){return typeof C=="number"&&C>-1&&C%1==0&&C<=MAX_SAFE_INTEGER}var isLength_1=isLength$3,baseGetTag$2=_baseGetTag,isLength$2=isLength_1,isObjectLike$2=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$2="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$2="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$2]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$2]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray$1(C){return isObjectLike$2(C)&&isLength$2(C.length)&&!!typedArrayTags[baseGetTag$2(C)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$1(C){return function(E){return C(E)}}var _baseUnary=baseUnary$1,_nodeUtil={exports:{}};_nodeUtil.exports,function(C,E){var I=_freeGlobal,B=E&&!E.nodeType&&E,U=B&&!0&&C&&!C.nodeType&&C,V=U&&U.exports===B,X=V&&I.process,Y=function(){try{var K=U&&U.require&&U.require("util").types;return K||X&&X.binding&&X.binding("util")}catch{}}();C.exports=Y}(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$3=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$3,baseTimes=_baseTimes,isArguments$2=isArguments_1,isArray$c=isArray_1,isBuffer$3=isBufferExports,isIndex$1=_isIndex,isTypedArray$2=isTypedArray_1,objectProto$5=Object.prototype,hasOwnProperty$4=objectProto$5.hasOwnProperty;function arrayLikeKeys$1(C,E){var I=isArray$c(C),B=!I&&isArguments$2(C),U=!I&&!B&&isBuffer$3(C),V=!I&&!B&&!U&&isTypedArray$2(C),X=I||B||U||V,Y=X?baseTimes(C.length,String):[],K=Y.length;for(var J in C)(E||hasOwnProperty$4.call(C,J))&&!(X&&(J=="length"||U&&(J=="offset"||J=="parent")||V&&(J=="buffer"||J=="byteLength"||J=="byteOffset")||isIndex$1(J,K)))&&Y.push(J);return Y}var _arrayLikeKeys=arrayLikeKeys$1,objectProto$4=Object.prototype;function isPrototype$2(C){var E=C&&C.constructor,I=typeof E=="function"&&E.prototype||objectProto$4;return C===I}var _isPrototype=isPrototype$2;function overArg$1(C,E){return function(I){return C(E(I))}}var _overArg=overArg$1,overArg=_overArg,nativeKeys$1=overArg(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype$1=_isPrototype,nativeKeys=_nativeKeys,objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function baseKeys$2(C){if(!isPrototype$1(C))return nativeKeys(C);var E=[];for(var I in Object(C))hasOwnProperty$3.call(C,I)&&I!="constructor"&&E.push(I);return E}var _baseKeys=baseKeys$2,isFunction=isFunction_1,isLength$1=isLength_1;function isArrayLike$4(C){return C!=null&&isLength$1(C.length)&&!isFunction(C)}var isArrayLike_1=isArrayLike$4,arrayLikeKeys=_arrayLikeKeys,baseKeys$1=_baseKeys,isArrayLike$3=isArrayLike_1;function keys$3(C){return isArrayLike$3(C)?arrayLikeKeys(C):baseKeys$1(C)}var keys_1=keys$3,baseGetAllKeys=_baseGetAllKeys,getSymbols=_getSymbols,keys$2=keys_1;function getAllKeys$1(C){return baseGetAllKeys(C,keys$2,getSymbols)}var _getAllKeys=getAllKeys$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function equalObjects$1(C,E,I,B,U,V){var X=I&COMPARE_PARTIAL_FLAG$3,Y=getAllKeys(C),K=Y.length,J=getAllKeys(E),xe=J.length;if(K!=xe&&!X)return!1;for(var Z=K;Z--;){var _e=Y[Z];if(!(X?_e in E:hasOwnProperty$2.call(E,_e)))return!1}var Se=V.get(C),Ee=V.get(E);if(Se&&Ee)return Se==E&&Ee==C;var Ae=!0;V.set(C,E),V.set(E,C);for(var Re=X;++Z<K;){_e=Y[Z];var Te=C[_e],we=E[_e];if(B)var Pe=X?B(we,Te,_e,E,C,V):B(Te,we,_e,C,E,V);if(!(Pe===void 0?Te===we||U(Te,we,I,B,V):Pe)){Ae=!1;break}Re||(Re=_e=="constructor")}if(Ae&&!Re){var Ie=C.constructor,Me=E.constructor;Ie!=Me&&"constructor"in C&&"constructor"in E&&!(typeof Ie=="function"&&Ie instanceof Ie&&typeof Me=="function"&&Me instanceof Me)&&(Ae=!1)}return V.delete(C),V.delete(E),Ae}var _equalObjects=equalObjects$1,getNative$3=_getNative,root$4=_root,DataView$2=getNative$3(root$4,"DataView"),_DataView=DataView$2,getNative$2=_getNative,root$3=_root,Promise$2=getNative$2(root$3,"Promise"),_Promise=Promise$2,getNative$1=_getNative,root$2=_root,Set$2=getNative$1(root$2,"Set"),_Set=Set$2,getNative=_getNative,root$1=_root,WeakMap$2=getNative(root$1,"WeakMap"),_WeakMap=WeakMap$2,DataView$1=_DataView,Map$1=_Map,Promise$1=_Promise,Set$1=_Set,WeakMap$1=_WeakMap,baseGetTag$1=_baseGetTag,toSource=_toSource,mapTag$1="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag$1="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap$1),getTag$2=baseGetTag$1;(DataView$1&&getTag$2(new DataView$1(new ArrayBuffer(1)))!=dataViewTag||Map$1&&getTag$2(new Map$1)!=mapTag$1||Promise$1&&getTag$2(Promise$1.resolve())!=promiseTag||Set$1&&getTag$2(new Set$1)!=setTag$1||WeakMap$1&&getTag$2(new WeakMap$1)!=weakMapTag)&&(getTag$2=function(C){var E=baseGetTag$1(C),I=E==objectTag$1?C.constructor:void 0,B=I?toSource(I):"";if(B)switch(B){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag$1;case promiseCtorString:return promiseTag;case setCtorString:return setTag$1;case weakMapCtorString:return weakMapTag}return E});var _getTag=getTag$2,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag$1=_getTag,isArray$b=isArray_1,isBuffer$2=isBufferExports,isTypedArray$1=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function baseIsEqualDeep$1(C,E,I,B,U,V){var X=isArray$b(C),Y=isArray$b(E),K=X?arrayTag:getTag$1(C),J=Y?arrayTag:getTag$1(E);K=K==argsTag?objectTag:K,J=J==argsTag?objectTag:J;var xe=K==objectTag,Z=J==objectTag,_e=K==J;if(_e&&isBuffer$2(C)){if(!isBuffer$2(E))return!1;X=!0,xe=!1}if(_e&&!xe)return V||(V=new Stack$1),X||isTypedArray$1(C)?equalArrays(C,E,I,B,U,V):equalByTag(C,E,K,I,B,U,V);if(!(I&COMPARE_PARTIAL_FLAG$2)){var Se=xe&&hasOwnProperty$1.call(C,"__wrapped__"),Ee=Z&&hasOwnProperty$1.call(E,"__wrapped__");if(Se||Ee){var Ae=Se?C.value():C,Re=Ee?E.value():E;return V||(V=new Stack$1),U(Ae,Re,I,B,V)}}return _e?(V||(V=new Stack$1),equalObjects(C,E,I,B,U,V)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$3(C,E,I,B,U){return C===E?!0:C==null||E==null||!isObjectLike$1(C)&&!isObjectLike$1(E)?C!==C&&E!==E:baseIsEqualDeep(C,E,I,B,baseIsEqual$3,U)}var _baseIsEqual=baseIsEqual$3,baseIsEqual$2=_baseIsEqual;function isEqual(C,E){return baseIsEqual$2(C,E)}var isEqual_1=isEqual;const isEqual$1=getDefaultExportFromCjs(isEqual_1),useDeepEffect=(C,E)=>{const I=React.useRef(!0),B=React.useRef(E);React.useEffect(()=>{const U=B.current.every((V,X)=>isEqual$1(V,E[X]));(I.current||!U)&&C(),I.current=!1,B.current=E},E)};function useDebounce(C,E=700){const[I,B]=React.useState(C);return useDeepEffect(()=>{const U=setTimeout(()=>{B(C)},E);return()=>{clearTimeout(U)}},[C,E]),I}var baseKeys=_baseKeys,getTag=_getTag,isArguments$1=isArguments_1,isArray$a=isArray_1,isArrayLike$2=isArrayLike_1,isBuffer$1=isBufferExports,isPrototype=_isPrototype,isTypedArray=isTypedArray_1,mapTag="[object Map]",setTag="[object Set]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(C){if(C==null)return!0;if(isArrayLike$2(C)&&(isArray$a(C)||typeof C=="string"||typeof C.splice=="function"||isBuffer$1(C)||isTypedArray(C)||isArguments$1(C)))return!C.length;var E=getTag(C);if(E==mapTag||E==setTag)return!C.size;if(isPrototype(C))return!baseKeys(C).length;for(var I in C)if(hasOwnProperty.call(C,I))return!1;return!0}var isEmpty_1=isEmpty;const isEmpty$1=getDefaultExportFromCjs(isEmpty_1);var OverlayTypes=(C=>(C.NONE="none",C.NORMAL="normal",C.LENSFLARE="lensflare",C.FILMSTRIP="filmstrip",C.GRUNGE="grunge",C.BRICKS="bricks",C))(OverlayTypes||{});const overlays={normal:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:0},lensflare:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:1},filmstrip:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/frames_filmstrip_5.png",blendmode:"ADD",alpha:1},grunge:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/pixi_overlay_grunge_60.jpg",blendmode:"ADD",alpha:1},bricks:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/bricks_Overlay_100.jpg",blendmode:"MULTIPLY",alpha:1}},PixiOverlayTilingSprite=C=>{const{overlay:E,width:I,height:B,x:U,y:V}=C,{src:X,blendmode:Y}=overlays[E]||overlays.normal;return jsxRuntimeExports.jsx(react.TilingSprite,{image:X,width:I,height:B,x:U,y:V,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})};/*!
10
10
  * paths 3.11.5
11
11
  * https://greensock.com
12
12
  *
@@ -14,7 +14,7 @@
14
14
  * Subject to the terms at https://greensock.com/standard-license or for
15
15
  * Club GreenSock members, the agreement issued with that membership.
16
16
  * @author: Jack Doyle, jack@greensock.com
17
- */var Cv=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,Iv=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,Rv=Math.PI/180,Pi=Math.sin,Mi=Math.cos,jr=Math.abs,Hr=Math.sqrt,Pv=function(e){return typeof e=="number"},$o=1e5,Et=function(e){return Math.round(e*$o)/$o||0};function Mv(t,e,r,i,n,s,a){for(var o=t.length,u,h,d,l,c;--o>-1;)for(u=t[o],h=u.length,d=0;d<h;d+=2)l=u[d],c=u[d+1],u[d]=l*e+c*i+s,u[d+1]=l*r+c*n+a;return t._dirty=1,t}function Fv(t,e,r,i,n,s,a,o,u){if(!(t===o&&e===u)){r=jr(r),i=jr(i);var h=n%360*Rv,d=Mi(h),l=Pi(h),c=Math.PI,f=c*2,p=(t-o)/2,m=(e-u)/2,v=d*p+l*m,g=-l*p+d*m,y=v*v,_=g*g,x=y/(r*r)+_/(i*i);x>1&&(r=Hr(x)*r,i=Hr(x)*i);var T=r*r,w=i*i,b=(T*w-T*_-w*y)/(T*_+w*y);b<0&&(b=0);var S=(s===a?-1:1)*Hr(b),A=S*(r*g/i),I=S*-(i*v/r),F=(t+o)/2,B=(e+u)/2,E=F+(d*A-l*I),C=B+(l*A+d*I),$=(v-A)/r,G=(g-I)/i,R=(-v-A)/r,U=(-g-I)/i,X=$*$+G*G,M=(G<0?-1:1)*Math.acos($/Hr(X)),O=($*U-G*R<0?-1:1)*Math.acos(($*R+G*U)/Hr(X*(R*R+U*U)));isNaN(O)&&(O=c),!a&&O>0?O-=f:a&&O<0&&(O+=f),M%=f,O%=f;var H=Math.ceil(jr(O)/(f/4)),V=[],W=O/H,ne=4/3*Pi(W/2)/(1+Mi(W/2)),oe=d*r,ce=l*r,ge=l*-i,fe=d*i,z;for(z=0;z<H;z++)n=M+z*W,v=Mi(n),g=Pi(n),$=Mi(n+=W),G=Pi(n),V.push(v-ne*g,g+ne*v,$+ne*G,G-ne*$,$,G);for(z=0;z<V.length;z+=2)v=V[z],g=V[z+1],V[z]=v*oe+g*ge+E,V[z+1]=v*ce+g*fe+C;return V[z-2]=o,V[z-1]=u,V}}function Ov(t){var e=(t+"").replace(Iv,function(A){var I=+A;return I<1e-4&&I>-1e-4?0:I}).match(Cv)||[],r=[],i=0,n=0,s=2/3,a=e.length,o=0,u="ERROR: malformed path: "+t,h,d,l,c,f,p,m,v,g,y,_,x,T,w,b,S=function(I,F,B,E){y=(B-I)/3,_=(E-F)/3,m.push(I+y,F+_,B-y,E-_,B,E)};if(!t||!isNaN(e[0])||isNaN(e[1]))return console.log(u),r;for(h=0;h<a;h++)if(T=f,isNaN(e[h])?(f=e[h].toUpperCase(),p=f!==e[h]):h--,l=+e[h+1],c=+e[h+2],p&&(l+=i,c+=n),h||(v=l,g=c),f==="M")m&&(m.length<8?r.length-=1:o+=m.length),i=v=l,n=g=c,m=[l,c],r.push(m),h+=2,f="L";else if(f==="C")m||(m=[0,0]),p||(i=n=0),m.push(l,c,i+e[h+3]*1,n+e[h+4]*1,i+=e[h+5]*1,n+=e[h+6]*1),h+=6;else if(f==="S")y=i,_=n,(T==="C"||T==="S")&&(y+=i-m[m.length-4],_+=n-m[m.length-3]),p||(i=n=0),m.push(y,_,l,c,i+=e[h+3]*1,n+=e[h+4]*1),h+=4;else if(f==="Q")y=i+(l-i)*s,_=n+(c-n)*s,p||(i=n=0),i+=e[h+3]*1,n+=e[h+4]*1,m.push(y,_,i+(l-i)*s,n+(c-n)*s,i,n),h+=4;else if(f==="T")y=i-m[m.length-4],_=n-m[m.length-3],m.push(i+y,n+_,l+(i+y*1.5-l)*s,c+(n+_*1.5-c)*s,i=l,n=c),h+=2;else if(f==="H")S(i,n,i=l,n),h+=1;else if(f==="V")S(i,n,i,n=l+(p?n-i:0)),h+=1;else if(f==="L"||f==="Z")f==="Z"&&(l=v,c=g,m.closed=!0),(f==="L"||jr(i-l)>.5||jr(n-c)>.5)&&(S(i,n,l,c),f==="L"&&(h+=2)),i=l,n=c;else if(f==="A"){if(w=e[h+4],b=e[h+5],y=e[h+6],_=e[h+7],d=7,w.length>1&&(w.length<3?(_=y,y=b,d--):(_=b,y=w.substr(2),d-=2),b=w.charAt(1),w=w.charAt(0)),x=Fv(i,n,+e[h+1],+e[h+2],+e[h+3],+w,+b,(p?i:0)+y*1,(p?n:0)+_*1),h+=d,x)for(d=0;d<x.length;d++)m.push(x[d]);i=m[m.length-2],n=m[m.length-1]}else console.log(u);return h=m.length,h<6?(r.pop(),h=0):m[0]===m[h-2]&&m[1]===m[h-1]&&(m.closed=!0),r.totalPoints=o+h,r}function Nv(t){Pv(t[0])&&(t=[t]);var e="",r=t.length,i,n,s,a;for(n=0;n<r;n++){for(a=t[n],e+="M"+Et(a[0])+","+Et(a[1])+" C",i=a.length,s=2;s<i;s++)e+=Et(a[s++])+","+Et(a[s++])+" "+Et(a[s++])+","+Et(a[s++])+" "+Et(a[s++])+","+Et(a[s])+" ";a.closed&&(e+="z")}return e}/*!
17
+ */var _svgPathExp=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,_scientific=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,_DEG2RAD$1=Math.PI/180,_sin=Math.sin,_cos=Math.cos,_abs=Math.abs,_sqrt=Math.sqrt,_isNumber=function(E){return typeof E=="number"},_roundingNum=1e5,_round$1=function(E){return Math.round(E*_roundingNum)/_roundingNum||0};function transformRawPath(C,E,I,B,U,V,X){for(var Y=C.length,K,J,xe,Z,_e;--Y>-1;)for(K=C[Y],J=K.length,xe=0;xe<J;xe+=2)Z=K[xe],_e=K[xe+1],K[xe]=Z*E+_e*B+V,K[xe+1]=Z*I+_e*U+X;return C._dirty=1,C}function arcToSegment(C,E,I,B,U,V,X,Y,K){if(!(C===Y&&E===K)){I=_abs(I),B=_abs(B);var J=U%360*_DEG2RAD$1,xe=_cos(J),Z=_sin(J),_e=Math.PI,Se=_e*2,Ee=(C-Y)/2,Ae=(E-K)/2,Re=xe*Ee+Z*Ae,Te=-Z*Ee+xe*Ae,we=Re*Re,Pe=Te*Te,Ie=we/(I*I)+Pe/(B*B);Ie>1&&(I=_sqrt(Ie)*I,B=_sqrt(Ie)*B);var Me=I*I,Oe=B*B,Le=(Me*Oe-Me*Pe-Oe*we)/(Me*Pe+Oe*we);Le<0&&(Le=0);var Ne=(V===X?-1:1)*_sqrt(Le),Ve=Ne*(I*Te/B),Xe=Ne*-(B*Re/I),Ue=(C+Y)/2,We=(E+K)/2,ze=Ue+(xe*Ve-Z*Xe),He=We+(Z*Ve+xe*Xe),je=(Re-Ve)/I,$e=(Te-Xe)/B,De=(-Re-Ve)/I,Fe=(-Te-Xe)/B,ke=je*je+$e*$e,Ge=($e<0?-1:1)*Math.acos(je/_sqrt(ke)),Be=(je*Fe-$e*De<0?-1:1)*Math.acos((je*De+$e*Fe)/_sqrt(ke*(De*De+Fe*Fe)));isNaN(Be)&&(Be=_e),!X&&Be>0?Be-=Se:X&&Be<0&&(Be+=Se),Ge%=Se,Be%=Se;var qe=Math.ceil(_abs(Be)/(Se/4)),Ke=[],Ye=Be/qe,Qe=4/3*_sin(Ye/2)/(1+_cos(Ye/2)),Ze=xe*I,it=Z*I,at=Z*-B,st=xe*B,Je;for(Je=0;Je<qe;Je++)U=Ge+Je*Ye,Re=_cos(U),Te=_sin(U),je=_cos(U+=Ye),$e=_sin(U),Ke.push(Re-Qe*Te,Te+Qe*Re,je+Qe*$e,$e-Qe*je,je,$e);for(Je=0;Je<Ke.length;Je+=2)Re=Ke[Je],Te=Ke[Je+1],Ke[Je]=Re*Ze+Te*at+ze,Ke[Je+1]=Re*it+Te*st+He;return Ke[Je-2]=Y,Ke[Je-1]=K,Ke}}function stringToRawPath(C){var E=(C+"").replace(_scientific,function(Ve){var Xe=+Ve;return Xe<1e-4&&Xe>-1e-4?0:Xe}).match(_svgPathExp)||[],I=[],B=0,U=0,V=2/3,X=E.length,Y=0,K="ERROR: malformed path: "+C,J,xe,Z,_e,Se,Ee,Ae,Re,Te,we,Pe,Ie,Me,Oe,Le,Ne=function(Xe,Ue,We,ze){we=(We-Xe)/3,Pe=(ze-Ue)/3,Ae.push(Xe+we,Ue+Pe,We-we,ze-Pe,We,ze)};if(!C||!isNaN(E[0])||isNaN(E[1]))return console.log(K),I;for(J=0;J<X;J++)if(Me=Se,isNaN(E[J])?(Se=E[J].toUpperCase(),Ee=Se!==E[J]):J--,Z=+E[J+1],_e=+E[J+2],Ee&&(Z+=B,_e+=U),J||(Re=Z,Te=_e),Se==="M")Ae&&(Ae.length<8?I.length-=1:Y+=Ae.length),B=Re=Z,U=Te=_e,Ae=[Z,_e],I.push(Ae),J+=2,Se="L";else if(Se==="C")Ae||(Ae=[0,0]),Ee||(B=U=0),Ae.push(Z,_e,B+E[J+3]*1,U+E[J+4]*1,B+=E[J+5]*1,U+=E[J+6]*1),J+=6;else if(Se==="S")we=B,Pe=U,(Me==="C"||Me==="S")&&(we+=B-Ae[Ae.length-4],Pe+=U-Ae[Ae.length-3]),Ee||(B=U=0),Ae.push(we,Pe,Z,_e,B+=E[J+3]*1,U+=E[J+4]*1),J+=4;else if(Se==="Q")we=B+(Z-B)*V,Pe=U+(_e-U)*V,Ee||(B=U=0),B+=E[J+3]*1,U+=E[J+4]*1,Ae.push(we,Pe,B+(Z-B)*V,U+(_e-U)*V,B,U),J+=4;else if(Se==="T")we=B-Ae[Ae.length-4],Pe=U-Ae[Ae.length-3],Ae.push(B+we,U+Pe,Z+(B+we*1.5-Z)*V,_e+(U+Pe*1.5-_e)*V,B=Z,U=_e),J+=2;else if(Se==="H")Ne(B,U,B=Z,U),J+=1;else if(Se==="V")Ne(B,U,B,U=Z+(Ee?U-B:0)),J+=1;else if(Se==="L"||Se==="Z")Se==="Z"&&(Z=Re,_e=Te,Ae.closed=!0),(Se==="L"||_abs(B-Z)>.5||_abs(U-_e)>.5)&&(Ne(B,U,Z,_e),Se==="L"&&(J+=2)),B=Z,U=_e;else if(Se==="A"){if(Oe=E[J+4],Le=E[J+5],we=E[J+6],Pe=E[J+7],xe=7,Oe.length>1&&(Oe.length<3?(Pe=we,we=Le,xe--):(Pe=Le,we=Oe.substr(2),xe-=2),Le=Oe.charAt(1),Oe=Oe.charAt(0)),Ie=arcToSegment(B,U,+E[J+1],+E[J+2],+E[J+3],+Oe,+Le,(Ee?B:0)+we*1,(Ee?U:0)+Pe*1),J+=xe,Ie)for(xe=0;xe<Ie.length;xe++)Ae.push(Ie[xe]);B=Ae[Ae.length-2],U=Ae[Ae.length-1]}else console.log(K);return J=Ae.length,J<6?(I.pop(),J=0):Ae[0]===Ae[J-2]&&Ae[1]===Ae[J-1]&&(Ae.closed=!0),I.totalPoints=Y+J,I}function rawPathToString(C){_isNumber(C[0])&&(C=[C]);var E="",I=C.length,B,U,V,X;for(U=0;U<I;U++){for(X=C[U],E+="M"+_round$1(X[0])+","+_round$1(X[1])+" C",B=X.length,V=2;V<B;V++)E+=_round$1(X[V++])+","+_round$1(X[V++])+" "+_round$1(X[V++])+","+_round$1(X[V++])+" "+_round$1(X[V++])+","+_round$1(X[V])+" ";X.closed&&(E+="z")}return E}/*!
18
18
  * CustomEase 3.11.5
19
19
  * https://greensock.com
20
20
  *
@@ -22,7 +22,7 @@
22
22
  * Subject to the terms at https://greensock.com/standard-license or for
23
23
  * Club GreenSock members, the agreement issued with that membership.
24
24
  * @author: Jack Doyle, jack@greensock.com
25
- */var Ge,Go,zo=function(){return Ge||typeof window<"u"&&(Ge=window.gsap)&&Ge.registerPlugin&&Ge},jo=function(){Ge=zo(),Ge?(Ge.registerEase("_CE",Vr.create),Go=1):console.warn("Please gsap.registerPlugin(CustomEase)")},kv=1e20,Fi=function(e){return~~(e*1e3+(e<0?-.5:.5))/1e3},Lv=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,Dv=/[cLlsSaAhHvVtTqQ]/g,Bv=function(e){var r=e.length,i=kv,n;for(n=1;n<r;n+=6)+e[n]<i&&(i=+e[n]);return i},Uv=function(e,r,i){!i&&i!==0&&(i=Math.max(+e[e.length-1],+e[1]));var n=+e[0]*-1,s=-i,a=e.length,o=1/(+e[a-2]+n),u=-r||(Math.abs(+e[a-1]-+e[1])<.01*(+e[a-2]-+e[0])?Bv(e)+s:+e[a-1]+s),h;for(u?u=1/u:u=-o,h=0;h<a;h+=2)e[h]=(+e[h]+n)*o,e[h+1]=(+e[h+1]+s)*u},$v=function t(e,r,i,n,s,a,o,u,h,d,l){var c=(e+i)/2,f=(r+n)/2,p=(i+s)/2,m=(n+a)/2,v=(s+o)/2,g=(a+u)/2,y=(c+p)/2,_=(f+m)/2,x=(p+v)/2,T=(m+g)/2,w=(y+x)/2,b=(_+T)/2,S=o-e,A=u-r,I=Math.abs((i-o)*A-(n-u)*S),F=Math.abs((s-o)*A-(a-u)*S),B;return d||(d=[{x:e,y:r},{x:o,y:u}],l=1),d.splice(l||d.length-1,0,{x:w,y:b}),(I+F)*(I+F)>h*(S*S+A*A)&&(B=d.length,t(e,r,c,f,y,_,w,b,h,d,l),t(w,b,x,T,v,g,o,u,h,d,l+1+(d.length-B))),d},Vr=function(){function t(r,i,n){Go||jo(),this.id=r,this.setData(i,n)}var e=t.prototype;return e.setData=function(i,n){n=n||{},i=i||"0,0,1,1";var s=i.match(Lv),a=1,o=[],u=[],h=n.precision||1,d=h<=1,l,c,f,p,m,v,g,y,_;if(this.data=i,(Dv.test(i)||~i.indexOf("M")&&i.indexOf("C")<0)&&(s=Ov(i)[0]),l=s.length,l===4)s.unshift(0,0),s.push(1,1),l=8;else if((l-2)%6)throw"Invalid CustomEase";for((+s[0]!=0||+s[l-2]!=1)&&Uv(s,n.height,n.originY),this.segment=s,p=2;p<l;p+=6)c={x:+s[p-2],y:+s[p-1]},f={x:+s[p+4],y:+s[p+5]},o.push(c,f),$v(c.x,c.y,+s[p],+s[p+1],+s[p+2],+s[p+3],f.x,f.y,1/(h*2e5),o,o.length-1);for(l=o.length,p=0;p<l;p++)g=o[p],y=o[p-1]||g,(g.x>y.x||y.y!==g.y&&y.x===g.x||g===y)&&g.x<=1?(y.cx=g.x-y.x,y.cy=g.y-y.y,y.n=g,y.nx=g.x,d&&p>1&&Math.abs(y.cy/y.cx-o[p-2].cy/o[p-2].cx)>2&&(d=0),y.cx<a&&(y.cx?a=y.cx:(y.cx=.001,p===l-1&&(y.x-=.001,a=Math.min(a,.001),d=0)))):(o.splice(p--,1),l--);if(l=1/a+1|0,m=1/l,v=0,g=o[0],d){for(p=0;p<l;p++)_=p*m,g.nx<_&&(g=o[++v]),c=g.y+(_-g.x)/g.cx*g.cy,u[p]={x:_,cx:m,y:c,cy:0,nx:9},p&&(u[p-1].cy=c-u[p-1].y);u[l-1].cy=o[o.length-1].y-c}else{for(p=0;p<l;p++)g.nx<p*m&&(g=o[++v]),u[p]=g;v<o.length-1&&(u[p-1]=o[o.length-2])}return this.ease=function(x){var T=u[x*l|0]||u[l-1];return T.nx<x&&(T=T.n),T.y+(x-T.x)/T.cx*T.cy},this.ease.custom=this,this.id&&Ge&&Ge.registerEase(this.id,this.ease),this},e.getSVGData=function(i){return t.getSVGData(this,i)},t.create=function(i,n,s){return new t(i,n,s).ease},t.register=function(i){Ge=i,jo()},t.get=function(i){return Ge.parseEase(i)},t.getSVGData=function(i,n){n=n||{};var s=n.width||100,a=n.height||100,o=n.x||0,u=(n.y||0)+a,h=Ge.utils.toArray(n.path)[0],d,l,c,f,p,m,v,g,y,_;if(n.invert&&(a=-a,u=0),typeof i=="string"&&(i=Ge.parseEase(i)),i.custom&&(i=i.custom),i instanceof t)d=Nv(Mv([i.segment],s,0,0,-a,o,u));else{for(d=[o,u],v=Math.max(5,(n.precision||1)*200),f=1/v,v+=2,g=5/v,y=Fi(o+f*s),_=Fi(u+i(f)*-a),l=(_-u)/(y-o),c=2;c<v;c++)p=Fi(o+c*f*s),m=Fi(u+i(c*f)*-a),(Math.abs((m-_)/(p-y)-l)>g||c===v-1)&&(d.push(y,_),l=(m-_)/(p-y)),y=p,_=m;d="M"+d.join(",")}return h&&h.setAttribute("d",d),d},t}();zo()&&Ge.registerPlugin(Vr),Vr.version="3.11.5";/*!
25
+ */var gsap$1,_coreInitted,_getGSAP$1=function(){return gsap$1||typeof window<"u"&&(gsap$1=window.gsap)&&gsap$1.registerPlugin&&gsap$1},_initCore$1=function(){gsap$1=_getGSAP$1(),gsap$1?(gsap$1.registerEase("_CE",CustomEase.create),_coreInitted=1):console.warn("Please gsap.registerPlugin(CustomEase)")},_bigNum=1e20,_round=function(E){return~~(E*1e3+(E<0?-.5:.5))/1e3},_numExp=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,_needsParsingExp=/[cLlsSaAhHvVtTqQ]/g,_findMinimum=function(E){var I=E.length,B=_bigNum,U;for(U=1;U<I;U+=6)+E[U]<B&&(B=+E[U]);return B},_normalize=function(E,I,B){!B&&B!==0&&(B=Math.max(+E[E.length-1],+E[1]));var U=+E[0]*-1,V=-B,X=E.length,Y=1/(+E[X-2]+U),K=-I||(Math.abs(+E[X-1]-+E[1])<.01*(+E[X-2]-+E[0])?_findMinimum(E)+V:+E[X-1]+V),J;for(K?K=1/K:K=-Y,J=0;J<X;J+=2)E[J]=(+E[J]+U)*Y,E[J+1]=(+E[J+1]+V)*K},_bezierToPoints=function C(E,I,B,U,V,X,Y,K,J,xe,Z){var _e=(E+B)/2,Se=(I+U)/2,Ee=(B+V)/2,Ae=(U+X)/2,Re=(V+Y)/2,Te=(X+K)/2,we=(_e+Ee)/2,Pe=(Se+Ae)/2,Ie=(Ee+Re)/2,Me=(Ae+Te)/2,Oe=(we+Ie)/2,Le=(Pe+Me)/2,Ne=Y-E,Ve=K-I,Xe=Math.abs((B-Y)*Ve-(U-K)*Ne),Ue=Math.abs((V-Y)*Ve-(X-K)*Ne),We;return xe||(xe=[{x:E,y:I},{x:Y,y:K}],Z=1),xe.splice(Z||xe.length-1,0,{x:Oe,y:Le}),(Xe+Ue)*(Xe+Ue)>J*(Ne*Ne+Ve*Ve)&&(We=xe.length,C(E,I,_e,Se,we,Pe,Oe,Le,J,xe,Z),C(Oe,Le,Ie,Me,Re,Te,Y,K,J,xe,Z+1+(xe.length-We))),xe},CustomEase=function(){function C(I,B,U){_coreInitted||_initCore$1(),this.id=I,this.setData(B,U)}var E=C.prototype;return E.setData=function(B,U){U=U||{},B=B||"0,0,1,1";var V=B.match(_numExp),X=1,Y=[],K=[],J=U.precision||1,xe=J<=1,Z,_e,Se,Ee,Ae,Re,Te,we,Pe;if(this.data=B,(_needsParsingExp.test(B)||~B.indexOf("M")&&B.indexOf("C")<0)&&(V=stringToRawPath(B)[0]),Z=V.length,Z===4)V.unshift(0,0),V.push(1,1),Z=8;else if((Z-2)%6)throw"Invalid CustomEase";for((+V[0]!=0||+V[Z-2]!=1)&&_normalize(V,U.height,U.originY),this.segment=V,Ee=2;Ee<Z;Ee+=6)_e={x:+V[Ee-2],y:+V[Ee-1]},Se={x:+V[Ee+4],y:+V[Ee+5]},Y.push(_e,Se),_bezierToPoints(_e.x,_e.y,+V[Ee],+V[Ee+1],+V[Ee+2],+V[Ee+3],Se.x,Se.y,1/(J*2e5),Y,Y.length-1);for(Z=Y.length,Ee=0;Ee<Z;Ee++)Te=Y[Ee],we=Y[Ee-1]||Te,(Te.x>we.x||we.y!==Te.y&&we.x===Te.x||Te===we)&&Te.x<=1?(we.cx=Te.x-we.x,we.cy=Te.y-we.y,we.n=Te,we.nx=Te.x,xe&&Ee>1&&Math.abs(we.cy/we.cx-Y[Ee-2].cy/Y[Ee-2].cx)>2&&(xe=0),we.cx<X&&(we.cx?X=we.cx:(we.cx=.001,Ee===Z-1&&(we.x-=.001,X=Math.min(X,.001),xe=0)))):(Y.splice(Ee--,1),Z--);if(Z=1/X+1|0,Ae=1/Z,Re=0,Te=Y[0],xe){for(Ee=0;Ee<Z;Ee++)Pe=Ee*Ae,Te.nx<Pe&&(Te=Y[++Re]),_e=Te.y+(Pe-Te.x)/Te.cx*Te.cy,K[Ee]={x:Pe,cx:Ae,y:_e,cy:0,nx:9},Ee&&(K[Ee-1].cy=_e-K[Ee-1].y);K[Z-1].cy=Y[Y.length-1].y-_e}else{for(Ee=0;Ee<Z;Ee++)Te.nx<Ee*Ae&&(Te=Y[++Re]),K[Ee]=Te;Re<Y.length-1&&(K[Ee-1]=Y[Y.length-2])}return this.ease=function(Ie){var Me=K[Ie*Z|0]||K[Z-1];return Me.nx<Ie&&(Me=Me.n),Me.y+(Ie-Me.x)/Me.cx*Me.cy},this.ease.custom=this,this.id&&gsap$1&&gsap$1.registerEase(this.id,this.ease),this},E.getSVGData=function(B){return C.getSVGData(this,B)},C.create=function(B,U,V){return new C(B,U,V).ease},C.register=function(B){gsap$1=B,_initCore$1()},C.get=function(B){return gsap$1.parseEase(B)},C.getSVGData=function(B,U){U=U||{};var V=U.width||100,X=U.height||100,Y=U.x||0,K=(U.y||0)+X,J=gsap$1.utils.toArray(U.path)[0],xe,Z,_e,Se,Ee,Ae,Re,Te,we,Pe;if(U.invert&&(X=-X,K=0),typeof B=="string"&&(B=gsap$1.parseEase(B)),B.custom&&(B=B.custom),B instanceof C)xe=rawPathToString(transformRawPath([B.segment],V,0,0,-X,Y,K));else{for(xe=[Y,K],Re=Math.max(5,(U.precision||1)*200),Se=1/Re,Re+=2,Te=5/Re,we=_round(Y+Se*V),Pe=_round(K+B(Se)*-X),Z=(Pe-K)/(we-Y),_e=2;_e<Re;_e++)Ee=_round(Y+_e*Se*V),Ae=_round(K+B(_e*Se)*-X),(Math.abs((Ae-Pe)/(Ee-we)-Z)>Te||_e===Re-1)&&(xe.push(we,Pe),Z=(Ae-Pe)/(Ee-we)),we=Ee,Pe=Ae;xe="M"+xe.join(",")}return J&&J.setAttribute("d",xe),xe},C}();_getGSAP$1()&&gsap$1.registerPlugin(CustomEase),CustomEase.version="3.11.5";/*!
26
26
  * PixiPlugin 3.11.5
27
27
  * https://greensock.com
28
28
  *
@@ -30,24 +30,24 @@
30
30
  * Subject to the terms at https://greensock.com/standard-license or for
31
31
  * Club GreenSock members, the agreement issued with that membership.
32
32
  * @author: Jack Doyle, jack@greensock.com
33
- */var Ct,Ho,Oi,Xe,Xr,Vo,ns,Xo=function(){return typeof window<"u"},Wo=function(){return Ct||Xo()&&(Ct=window.gsap)&&Ct.registerPlugin&&Ct},qo=function(e){return typeof e=="function"},Gv=function(e){return console.warn(e)},zv=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],We=.212671,qe=.71516,Ye=.072169,Ni=function(e,r){var i=[],n=0,s=0,a,o;for(a=0;a<4;a++){for(o=0;o<5;o++)s=o===4?e[n+4]:0,i[n+o]=e[n]*r[o]+e[n+1]*r[o+5]+e[n+2]*r[o+10]+e[n+3]*r[o+15]+s;n+=5}return i},Yo=function(e,r){var i=1-r,n=i*We,s=i*qe,a=i*Ye;return Ni([n+r,s,a,0,0,n,s+r,a,0,0,n,s,a+r,0,0,0,0,0,1,0],e)},Ko=function(e,r,i){var n=Oi(r),s=n[0]/255,a=n[1]/255,o=n[2]/255,u=1-i;return Ni([u+i*s*We,i*s*qe,i*s*Ye,0,0,i*a*We,u+i*a*qe,i*a*Ye,0,0,i*o*We,i*o*qe,u+i*o*Ye,0,0,0,0,0,1,0],e)},Zo=function(e,r){r*=Math.PI/180;var i=Math.cos(r),n=Math.sin(r);return Ni([We+i*(1-We)+n*-We,qe+i*-qe+n*-qe,Ye+i*-Ye+n*(1-Ye),0,0,We+i*-We+n*.143,qe+i*(1-qe)+n*.14,Ye+i*-Ye+n*-.283,0,0,We+i*-We+n*-(1-We),qe+i*-qe+n*qe,Ye+i*(1-Ye)+n*Ye,0,0,0,0,0,1,0,0,0,0,0,1],e)},Qo=function(e,r){return Ni([r,0,0,0,.5*(1-r),0,r,0,0,.5*(1-r),0,0,r,0,.5*(1-r),0,0,0,1,0],e)},Jo=function(e,r){var i=Xe.filters[r],n=e.filters||[],s=n.length,a;for(i||Gv(r+" not found. PixiPlugin.registerPIXI(PIXI)");--s>-1;)if(n[s]instanceof i)return n[s];return a=new i,r==="BlurFilter"&&(a.blur=0),n.push(a),e.filters=n,a},Ce=function(e,r,i,n){r.add(i,e,i[e],n[e]),r._props.push(e)},el=function(e,r){var i=new Xe.filters.ColorMatrixFilter;return i.matrix=r,i.brightness(e,!0),i.matrix},jv=function(e){var r={},i;for(i in e)r[i]=e[i];return r},ze={contrast:1,saturation:1,colorizeAmount:0,colorize:"rgb(255,255,255)",hue:0,brightness:1},Hv=function(e,r,i){var n=Jo(e,"ColorMatrixFilter"),s=e._gsColorMatrixFilter=e._gsColorMatrixFilter||jv(ze),a=r.combineCMF&&!("colorMatrixFilter"in r&&!r.colorMatrixFilter),o,u,h;for(h=n.matrix,r.resolution&&(n.resolution=r.resolution),r.matrix&&r.matrix.length===h.length?(u=r.matrix,s.contrast!==1&&Ce("contrast",i,s,ze),s.hue&&Ce("hue",i,s,ze),s.brightness!==1&&Ce("brightness",i,s,ze),s.colorizeAmount&&(Ce("colorize",i,s,ze),Ce("colorizeAmount",i,s,ze)),s.saturation!==1&&Ce("saturation",i,s,ze)):(u=zv.slice(),r.contrast!=null?(u=Qo(u,+r.contrast),Ce("contrast",i,s,r)):s.contrast!==1&&(a?u=Qo(u,s.contrast):Ce("contrast",i,s,ze)),r.hue!=null?(u=Zo(u,+r.hue),Ce("hue",i,s,r)):s.hue&&(a?u=Zo(u,s.hue):Ce("hue",i,s,ze)),r.brightness!=null?(u=el(+r.brightness,u),Ce("brightness",i,s,r)):s.brightness!==1&&(a?u=el(s.brightness,u):Ce("brightness",i,s,ze)),r.colorize!=null?(r.colorizeAmount="colorizeAmount"in r?+r.colorizeAmount:1,u=Ko(u,r.colorize,r.colorizeAmount),Ce("colorize",i,s,r),Ce("colorizeAmount",i,s,r)):s.colorizeAmount&&(a?u=Ko(u,s.colorize,s.colorizeAmount):(Ce("colorize",i,s,ze),Ce("colorizeAmount",i,s,ze))),r.saturation!=null?(u=Yo(u,+r.saturation),Ce("saturation",i,s,r)):s.saturation!==1&&(a?u=Yo(u,s.saturation):Ce("saturation",i,s,ze))),o=u.length;--o>-1;)u[o]!==h[o]&&i.add(h,o,h[o],u[o],"colorMatrixFilter");i._props.push("colorMatrixFilter")},Vv=function(e,r){var i=r.t,n=r.p,s=r.color,a=r.set;a(i,n,s[0]<<16|s[1]<<8|s[2])},Xv=function(e,r){var i=r.g;i&&(i.dirty++,i.clearDirty++)},Wv=function(e,r){r.t.visible=!!r.t.alpha},tl=function(e,r,i,n){var s=e[r],a=Oi(qo(s)?e[r.indexOf("set")||!qo(e["get"+r.substr(3)])?r:"get"+r.substr(3)]():s),o=Oi(i);n._pt=new Xr(n._pt,e,r,0,0,Vv,{t:e,p:r,color:a,set:Vo(e,r)}),n.add(a,0,a[0],o[0]),n.add(a,1,a[1],o[1]),n.add(a,2,a[2],o[2])},qv={tint:1,lineColor:1,fillColor:1},rl="position,scale,skew,pivot,anchor,tilePosition,tileScale".split(","),ss={x:"position",y:"position",tileX:"tilePosition",tileY:"tilePosition"},Yv={colorMatrixFilter:1,saturation:1,contrast:1,hue:1,colorize:1,colorizeAmount:1,brightness:1,combineCMF:1},ki=Math.PI/180,il=function(e){return typeof e=="string"},Kv=function(e){return il(e)&&e.charAt(1)==="="?e.substr(0,2)+parseFloat(e.substr(2))*ki:e*ki},Zv=function(e,r){return r.set(r.t,r.p,e===1?r.e:Math.round((r.s+r.c*e)*1e5)/1e5,r)},Qv=function(e,r,i,n,s,a){var o=360*(a?ki:1),u=il(s),h=u&&s.charAt(1)==="="?+(s.charAt(0)+"1"):0,d=parseFloat(h?s.substr(2):s)*(a?ki:1),l=h?d*h:d-n,c=n+l,f,p;return u&&(f=s.split("_")[1],f==="short"&&(l%=o,l!==l%(o/2)&&(l+=l<0?o:-o)),f==="cw"&&l<0?l=(l+o*1e10)%o-~~(l/o)*o:f==="ccw"&&l>0&&(l=(l-o*1e10)%o-~~(l/o)*o)),e._pt=p=new Xr(e._pt,r,i,n,l,Zv),p.e=c,p},nl=function(){Xo()&&(Ho=window,Ct=Wo(),Xe=Xe||Ho.PIXI,ns=Xe&&Xe.VERSION&&Xe.VERSION.charAt(0)==="4",Oi=function(r){return Ct.utils.splitColor((r+"").substr(0,2)==="0x"?"#"+r.substr(2):r)})},Li,Wr;for(Li=0;Li<rl.length;Li++)Wr=rl[Li],ss[Wr+"X"]=Wr,ss[Wr+"Y"]=Wr;var as={version:"3.11.5",name:"pixi",register:function(e,r,i){Ct=e,Xr=i,Vo=r.getSetter,nl()},registerPIXI:function(e){Xe=e},init:function(e,r,i,n,s){if(Xe||nl(),!Xe||!(e instanceof Xe.DisplayObject))return console.warn(e,"is not a DisplayObject or PIXI was not found. PixiPlugin.registerPIXI(PIXI);"),!1;var a,o,u,h,d,l,c,f,p;for(l in r){if(a=ss[l],u=r[l],a)o=~l.charAt(l.length-1).toLowerCase().indexOf("x")?"x":"y",this.add(e[a],o,e[a][o],a==="skew"?Kv(u):u,0,0,0,0,0,1);else if(l==="scale"||l==="anchor"||l==="pivot"||l==="tileScale")this.add(e[l],"x",e[l].x,u),this.add(e[l],"y",e[l].y,u);else if(l==="rotation"||l==="angle")Qv(this,e,l,e[l],u,l==="rotation");else if(Yv[l])h||(Hv(e,r.colorMatrixFilter||r,this),h=!0);else if(l==="blur"||l==="blurX"||l==="blurY"||l==="blurPadding"){if(d=Jo(e,"BlurFilter"),this.add(d,l,d[l],u),r.blurPadding!==0)for(c=r.blurPadding||Math.max(d[l],u)*2,f=e.filters.length;--f>-1;)e.filters[f].padding=Math.max(e.filters[f].padding,c)}else if(qv[l])if((l==="lineColor"||l==="fillColor")&&e instanceof Xe.Graphics)for(p=(e.geometry||e).graphicsData,this._pt=new Xr(this._pt,e,l,0,0,Xv,{g:e.geometry||e}),f=p.length;--f>-1;)tl(ns?p[f]:p[f][l.substr(0,4)+"Style"],ns?l:"color",u,this);else tl(e,l,u,this);else l==="autoAlpha"?(this._pt=new Xr(this._pt,e,"visible",0,0,Wv),this.add(e,"alpha",e.alpha,u),this._props.push("alpha","visible")):l!=="resolution"&&this.add(e,l,"get",u);this._props.push(l)}}};Wo()&&Ct.registerPlugin(as),k.registerPlugin(as),as.registerPIXI($e),k.registerPlugin(Vr),Vr.create("springBounce","0.32, 1.06, 0.61, 0.93"),k.registerEffect({name:"PULSE",effect(t,e){return k.timeline().fromTo(t,{pixi:{scaleX:.9,scaleY:.9}},{pixi:{scaleX:1.2,scaleY:1.2},duration:.5,ease:"slow"}).to(t,{pixi:{scaleX:1,scaleY:1,...e},duration:.5})}}),k.registerEffect({name:"SHAKE",effect(t,e){return k.timeline().to(t,{duration:.1,pixi:{x:"+=5"}}).to(t,{duration:.1,pixi:{x:"-=10"}}).to(t,{duration:.1,pixi:{x:"+=10"}}).to(t,{duration:.1,pixi:{x:"-=10"}}).to(t,{duration:.1,pixi:{x:"+=5"}}).to(t,{pixi:{...e},duration:.5})}}),k.registerEffect({name:"SWING",effect(t,e){return k.timeline().to(t,{duration:.5,pixi:{rotation:1}}).to(t,{duration:.5,pixi:{rotation:-1.5}}).to(t,{pixi:{rotation:0,...e},duration:.5})}}),k.registerEffect({name:"JELLO",effect(t,e){return k.timeline().to(t,{duration:.3,pixi:{scaleX:.5,rotation:-1}}).to(t,{duration:.4,pixi:{scaleX:1.5,rotation:1}}).to(t,{duration:.3,pixi:{scaleX:1,rotation:0}}).to(t,{pixi:{rotation:0,...e},duration:.5})}}),k.registerEffect({name:"WOOBLE",effect(t,e){return k.timeline().to(t,{duration:.3,pixi:{scaleX:.5,x:e.x*-.5}}).to(t,{duration:.3,pixi:{scaleX:1.5,x:e.x*1.5}}).to(t,{duration:.3,pixi:{scaleX:.5,x:e.x*-.01}}).to(t,{duration:.3,pixi:{scaleX:1,x:e.x}}).to(t,{rotation:0,pixi:{...e,rotation:0},duration:.5})}}),k.registerEffect({name:"NONE",effect(t,e){return k.timeline().to(t,{duration:0})}}),k.registerEffect({name:"FLASH",effect(t,e){return k.timeline().to(t,{duration:.2,alpha:0}).to(t,{duration:.2,alpha:1}).to(t,{duration:.2,alpha:0}).to(t,{duration:.2,alpha:1}).to(t,{duration:.2,alpha:0}).to(t,{duration:.2,alpha:1,...e})}}),k.registerEffect({name:"BOUNCE_IN",effect(t,e){return k.timeline().fromTo(t,{pixi:{scaleX:1.5,scaleY:1.5}},{...e,pixi:{x:e==null?void 0:e.x,y:e==null?void 0:e.y,scaleX:1,scaleY:1},duration:2,ease:"bounce.out"})}}),k.registerEffect({name:"BOUNCE_IN_DOWN",effect(t,e){return k.timeline().from(t,{duration:2,ease:"bounce.out",immediateRender:!0,pixi:{...e,x:e==null?void 0:e.x,y:-2500,alpha:0}})}}),k.registerEffect({name:"BOUNCE_IN_LEFT",effect(t,e){return k.timeline().from(t,{ease:"bounce.out",duration:2,pixi:{...e,x:-1500,alpha:0}})}}),k.registerEffect({name:"BOUNCE_IN_RIGHT",effect(t,e){const r=Math.max(1e3,(e==null?void 0:e.maxX)+500);return k.timeline().from(t,{ease:"bounce.out",duration:2,pixi:{...e,x:r}})}}),k.registerEffect({name:"BOUNCE_IN_UP",effect(t,e){return k.timeline().from(t,{ease:"bounce.out",pixi:{...e,y:2e3},duration:2})}}),k.registerEffect({name:"BOUNCE_OUT",effect(t,e){return k.timeline().from(t,{...e,ease:"bounce.in",pixi:{y:2e3},duration:1.5})}}),k.registerEffect({name:"FADE_IN",effect(t){return k.timeline().fromTo(t,{alpha:0},{ease:"power4.in",alpha:1,duration:1})}}),k.registerEffect({name:"FADE_IN_DOWN",effect(t,e){return k.timeline().fromTo(t,{pixi:{y:-1500,alpha:0}},{duration:1,ease:"power4.in",pixi:{y:0,alpha:1,...e}})}}),k.registerEffect({name:"FADE_IN_LEFT",effect(t,e){return k.timeline().fromTo(t,{pixi:{alpha:0,x:-2e3}},{ease:"power4.in",pixi:{x:0,alpha:1,...e},duration:1})}}),k.registerEffect({name:"FADE_IN_RIGHT",effect(t,e){return k.fromTo(t,{pixi:{x:2e3,alpha:0}},{duration:1,ease:"power4.in",pixi:{x:0,alpha:1,...e}})}}),k.registerEffect({name:"FADE_IN_UP",effect(t,e){return k.fromTo(t,{pixi:{y:2e3,alpha:0}},{duration:.8,ease:"power4.in",pixi:{y:0,alpha:1,...e}})}}),k.registerEffect({name:"SPIN",effect(t){return k.to(t,{rotation:(e,r)=>k.utils.snap(360,Number(k.getProperty(r,"rotation"))+360)})}});function sl(){return{updateEffect:P.useCallback((e,r,i)=>k.effects[r]&&e?k.effects[r](e,i):k.effects.NONE(e,i),[])}}var os=(t=>(t.NONE="NONE",t.FLASH="FLASH",t.PULSE="PULSE",t.SHAKE="SHAKE",t.SWING="SWING",t.JELLO="JELLO",t.WOOBLE="WOOBLE",t.FADE_IN="FADE_IN",t.FADE_OUT="FADE_OUT",t.FADE_IN_OUT="FADE_IN_OUT",t.SLIDE_IN_LEFT="SLIDE_IN_LEFT",t.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",t.SLIDE_IN_TOP="SLIDE_IN_TOP",t.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",t.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",t.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",t.SLIDE_OUT_TOP="SLIDE_OUT_TOP",t.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",t.ZOOM_IN="ZOOM_IN",t.ZOOM_OUT="ZOOM_OUT",t.ZOOM_IN_OUT="ZOOM_IN_OUT",t.BOUNCE_IN="BOUNCE_IN",t.BOUNCE_OUT="BOUNCE_OUT",t.BOUNCE_IN_OUT="BOUNCE_IN_OUT",t.BOUNCE_IN_DOWN="BOUNCE_IN_DOWN",t.BOUNCE_IN_LEFT="BOUNCE_IN_LEFT",t.BOUNCE_IN_RIGHT="BOUNCE_IN_RIGHT",t.BOUNCE_IN_UP="BOUNCE_IN_UP",t.BOUNCE_OUT_DOWN="BOUNCE_OUT_DOWN",t.BOUNCE_OUT_LEFT="BOUNCE_OUT_LEFT",t.BOUNCE_OUT_RIGHT="BOUNCE_OUT_RIGHT",t.BOUNCE_OUT_UP="BOUNCE_OUT_UP",t.FADE_IN_DOWN="FADE_IN_DOWN",t.FADE_IN_LEFT="FADE_IN_LEFT",t.FADE_IN_RIGHT="FADE_IN_RIGHT",t.FADE_IN_UP="FADE_IN_UP",t.FADE_OUT_DOWN="FADE_OUT_DOWN",t.FADE_OUT_LEFT="FADE_OUT_LEFT",t.FADE_OUT_RIGHT="FADE_OUT_RIGHT",t.FADE_OUT_UP="FADE_OUT_UP",t.ELASTIC_IN="ELASTIC_IN",t.ELASTIC_OUT="ELASTIC_OUT",t.ELASTIC_IN_OUT="ELASTIC_IN_OUT",t.BACK_IN="BACK_IN",t.BACK_OUT="BACK_OUT",t.BACK_IN_OUT="BACK_IN_OUT",t.CIRCULAR_IN="CIRCULAR_IN",t.CIRCULAR_OUT="CIRCULAR_OUT",t.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",t.EXPO_IN="EXPO_IN",t.EXPO_OUT="EXPO_OUT",t.EXPO_IN_OUT="EXPO_IN_OUT",t.SINE_IN="SINE_IN",t.SINE_OUT="SINE_OUT",t.SINE_IN_OUT="SINE_IN_OUT",t.BOUNCE="BOUNCE",t.ELASTIC="ELASTIC",t.BACK="BACK",t.CIRCULAR="CIRCULAR",t.EXPO="EXPO",t.SINE="SINE",t))(os||{});const Jv=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Ut=L.forwardRef((t,e)=>{const[r,i]=L.useState(!1),[n,s]=P.useState(!1),[a,o]=P.useState(!1),[u,h]=P.useState(),d=hv(u,300),l=P.useRef(null),c=P.useRef(null),f=P.useRef(null),p=P.useRef(null),m=P.useRef(null),v=P.useRef(null),{tl:g}=P.useContext(At),y=ee.useApp(),_=y.screen.width,x=y.screen.height,{uniqueId:T,visible:w,startAt:b,transformation:{x:S,y:A,width:I,height:F,scale:B=[1,1],rotation:E=0,effect:C,overlay:$,animation:G=os.NONE},applyTransformer:R,disabled:U,pointerdown:X,pointerout:M,pointerover:O,isText:H,isDragging:V,isGif:W,onDoubleClick:ne,isTextEditMode:oe}=t,ce=sl();Oe(we.COMPLETE,()=>{l.current}),L.useImperativeHandle(e,()=>({getIsTransformerDragging:()=>n,getIsMouseOverTransformer:()=>a}),[n,a]),L.useEffect(()=>{l.current&&i(!0)},[]),L.useEffect(()=>{h({x:S,y:A,width:I,height:F,animation:G,maxX:_,maxY:x})},[G,S,A,I,F,_,x]),L.useEffect(()=>{if(!c.current)return;const Y=k.context(()=>{if(g.current&&d){const{x:pe,y:De,animation:K,maxX:_e,maxY:Qe}=d||{},ct=g.current.progress(),Fe=ce.updateEffect(l.current,K,{immediateRender:!1,x:pe,y:De,overwrite:!0,maxX:_e,maxY:Qe});m.current&&(g.current.remove(m.current),m.current.progress(0).kill()),ct>.1?(Fe.eventCallback("onComplete",()=>{Fe.remove("onComplete"),g.current.add(Fe,b),m.current=Fe}),Fe.play()):(Fe.progress(1),g.current.add(Fe,b),m.current=Fe)}else m.current&&m.current.progress(0).kill()},c.current);return()=>{Y.revert()}},[b,d]);const ge=L.useCallback(()=>{o(!0),O&&O()},[]),fe=L.useCallback(()=>{s(!0)},[]),z=L.useCallback(Y=>{t.onAnchorTransformationEnd&&t.onAnchorTransformationEnd(Y),s(!1)},[]),q=ee.withFilters(ee.Container,{matrix:$e.filters.ColorMatrixFilter});return Z.jsxs(ee.Container,{ref:c,children:[Z.jsx(ee.Container,{ref:l,position:[S,A],pivot:[S,A],width:I,height:F,scale:B,rotation:E,...!U&&w&&!n&&!V&&{interactive:!0,buttonMode:!0,pointerdown:X,pointerover:O,pointerout:M},children:Z.jsxs(ee.Container,{ref:v,children:[!W&&Z.jsx(q,{scale:1,apply:({matrix:Y})=>{C===Dt.BlackAndWhite?Y.desaturate():C===Dt.Sepia?Y.sepia():C===Dt.RetroVintage||C===Dt.NightVision?Y.negative():C===Dt.Normal&&Y.reset()},matrix:{enabled:!0,matrix:Jv},children:Z.jsx(ee.Container,{ref:f,children:t.children})}),W&&Z.jsx(ee.Container,{ref:f,children:t.children}),!hr($)&&$!==is.NONE&&$!==is.NORMAL&&Z.jsx(Ev,{overlay:$,width:I,height:F,x:S,y:A})]})}),R&&w&&!oe&&Z.jsx(jh,{pixiTransformerRef:p,imageRef:l,isMounted:r,transformCommit:z,transformChange:fe,mouseoverEvent:ge,uniqueId:T,isText:H,onDoubleClick:ne})]})});var $t=(t=>(t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2",t))($t||{}),al=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS",t))(al||{}),ls=(t=>(t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL",t))(ls||{}),j=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR",t))(j||{}),It=(t=>(t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN",t))(It||{}),N=(t=>(t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t))(N||{}),fr=(t=>(t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t))(fr||{}),se=(t=>(t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT",t))(se||{}),us=(t=>(t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t))(us||{}),dt=(t=>(t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR",t))(dt||{}),qr=(t=>(t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",t))(qr||{}),Gt=(t=>(t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL",t))(Gt||{}),Rt=(t=>(t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",t))(Rt||{}),zt=(t=>(t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT",t))(zt||{}),cs=(t=>(t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL",t))(cs||{}),Ke=(t=>(t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp",t))(Ke||{}),Ee=(t=>(t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE",t[t.COLOR=4]="COLOR",t))(Ee||{}),Ae=(t=>(t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH",t))(Ae||{}),pt=(t=>(t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t))(pt||{});const Q={ADAPTER:{createCanvas:(t,e)=>{const r=document.createElement("canvas");return r.width=t,r.height=e,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(t,e)=>fetch(t,e),parseXML:t=>new DOMParser().parseFromString(t,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var hs=/iPhone/i,ol=/iPod/i,ll=/iPad/i,ul=/\biOS-universal(?:.+)Mac\b/i,fs=/\bAndroid(?:.+)Mobile\b/i,cl=/Android/i,dr=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Di=/Silk/i,yt=/Windows Phone/i,hl=/\bWindows(?:.+)ARM\b/i,fl=/BlackBerry/i,dl=/BB10/i,pl=/Opera Mini/i,ml=/\b(CriOS|Chrome)(?:.+)Mobile/i,gl=/Mobile(?:.+)Firefox\b/i,vl=function(t){return typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream>"u"};function e_(t){return function(e){return e.test(t)}}function _l(t){var e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});var r=e.userAgent,i=r.split("[FBAN");typeof i[1]<"u"&&(r=i[0]),i=r.split("Twitter"),typeof i[1]<"u"&&(r=i[0]);var n=e_(r),s={apple:{phone:n(hs)&&!n(yt),ipod:n(ol),tablet:!n(hs)&&(n(ll)||vl(e))&&!n(yt),universal:n(ul),device:(n(hs)||n(ol)||n(ll)||n(ul)||vl(e))&&!n(yt)},amazon:{phone:n(dr),tablet:!n(dr)&&n(Di),device:n(dr)||n(Di)},android:{phone:!n(yt)&&n(dr)||!n(yt)&&n(fs),tablet:!n(yt)&&!n(dr)&&!n(fs)&&(n(Di)||n(cl)),device:!n(yt)&&(n(dr)||n(Di)||n(fs)||n(cl))||n(/\bokhttp\b/i)},windows:{phone:n(yt),tablet:n(hl),device:n(yt)||n(hl)},other:{blackberry:n(fl),blackberry10:n(dl),opera:n(pl),firefox:n(gl),chrome:n(ml),device:n(fl)||n(dl)||n(pl)||n(gl)||n(ml)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const pr=(_l.default??_l)(globalThis.navigator);Q.RETINA_PREFIX=/@([0-9\.]+)x/,Q.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var yl={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function n(u,h,d){this.fn=u,this.context=h,this.once=d||!1}function s(u,h,d,l,c){if(typeof d!="function")throw new TypeError("The listener must be a function");var f=new n(d,l||u,c),p=r?r+h:h;return u._events[p]?u._events[p].fn?u._events[p]=[u._events[p],f]:u._events[p].push(f):(u._events[p]=f,u._eventsCount++),u}function a(u,h){--u._eventsCount===0?u._events=new i:delete u._events[h]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var h=[],d,l;if(this._eventsCount===0)return h;for(l in d=this._events)e.call(d,l)&&h.push(r?l.slice(1):l);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},o.prototype.listeners=function(h){var d=r?r+h:h,l=this._events[d];if(!l)return[];if(l.fn)return[l.fn];for(var c=0,f=l.length,p=new Array(f);c<f;c++)p[c]=l[c].fn;return p},o.prototype.listenerCount=function(h){var d=r?r+h:h,l=this._events[d];return l?l.fn?1:l.length:0},o.prototype.emit=function(h,d,l,c,f,p){var m=r?r+h:h;if(!this._events[m])return!1;var v=this._events[m],g=arguments.length,y,_;if(v.fn){switch(v.once&&this.removeListener(h,v.fn,void 0,!0),g){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,l),!0;case 4:return v.fn.call(v.context,d,l,c),!0;case 5:return v.fn.call(v.context,d,l,c,f),!0;case 6:return v.fn.call(v.context,d,l,c,f,p),!0}for(_=1,y=new Array(g-1);_<g;_++)y[_-1]=arguments[_];v.fn.apply(v.context,y)}else{var x=v.length,T;for(_=0;_<x;_++)switch(v[_].once&&this.removeListener(h,v[_].fn,void 0,!0),g){case 1:v[_].fn.call(v[_].context);break;case 2:v[_].fn.call(v[_].context,d);break;case 3:v[_].fn.call(v[_].context,d,l);break;case 4:v[_].fn.call(v[_].context,d,l,c);break;default:if(!y)for(T=1,y=new Array(g-1);T<g;T++)y[T-1]=arguments[T];v[_].fn.apply(v[_].context,y)}}return!0},o.prototype.on=function(h,d,l){return s(this,h,d,l,!1)},o.prototype.once=function(h,d,l){return s(this,h,d,l,!0)},o.prototype.removeListener=function(h,d,l,c){var f=r?r+h:h;if(!this._events[f])return this;if(!d)return a(this,f),this;var p=this._events[f];if(p.fn)p.fn===d&&(!c||p.once)&&(!l||p.context===l)&&a(this,f);else{for(var m=0,v=[],g=p.length;m<g;m++)(p[m].fn!==d||c&&!p[m].once||l&&p[m].context!==l)&&v.push(p[m]);v.length?this._events[f]=v.length===1?v[0]:v:a(this,f)}return this},o.prototype.removeAllListeners=function(h){var d;return h?(d=r?r+h:h,this._events[d]&&a(this,d)):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,t.exports=o})(yl);var t_=yl.exports;const Bi=Lt(t_);var ds={exports:{}};ds.exports=Ui,ds.exports.default=Ui;function Ui(t,e,r){r=r||2;var i=e&&e.length,n=i?e[0]*r:t.length,s=xl(t,0,n,r,!0),a=[];if(!s||s.next===s.prev)return a;var o,u,h,d,l,c,f;if(i&&(s=a_(t,e,s,r)),t.length>80*r){o=h=t[0],u=d=t[1];for(var p=r;p<n;p+=r)l=t[p],c=t[p+1],l<o&&(o=l),c<u&&(u=c),l>h&&(h=l),c>d&&(d=c);f=Math.max(h-o,d-u),f=f!==0?32767/f:0}return Yr(s,a,r,o,u,f,0),a}function xl(t,e,r,i,n){var s,a;if(n===gs(t,e,r,i)>0)for(s=e;s<r;s+=i)a=wl(s,t[s],t[s+1],a);else for(s=r-i;s>=e;s-=i)a=wl(s,t[s],t[s+1],a);return a&&$i(a,a.next)&&(Zr(a),a=a.next),a}function jt(t,e){if(!t)return t;e||(e=t);var r=t,i;do if(i=!1,!r.steiner&&($i(r,r.next)||xe(r.prev,r,r.next)===0)){if(Zr(r),r=e=r.prev,r===r.next)break;i=!0}else r=r.next;while(i||r!==e);return e}function Yr(t,e,r,i,n,s,a){if(t){!a&&s&&h_(t,i,n,s);for(var o=t,u,h;t.prev!==t.next;){if(u=t.prev,h=t.next,s?i_(t,i,n,s):r_(t)){e.push(u.i/r|0),e.push(t.i/r|0),e.push(h.i/r|0),Zr(t),t=h.next,o=h.next;continue}if(t=h,t===o){a?a===1?(t=n_(jt(t),e,r),Yr(t,e,r,i,n,s,2)):a===2&&s_(t,e,r,i,n,s):Yr(jt(t),e,r,i,n,s,1);break}}}}function r_(t){var e=t.prev,r=t,i=t.next;if(xe(e,r,i)>=0)return!1;for(var n=e.x,s=r.x,a=i.x,o=e.y,u=r.y,h=i.y,d=n<s?n<a?n:a:s<a?s:a,l=o<u?o<h?o:h:u<h?u:h,c=n>s?n>a?n:a:s>a?s:a,f=o>u?o>h?o:h:u>h?u:h,p=i.next;p!==e;){if(p.x>=d&&p.x<=c&&p.y>=l&&p.y<=f&&mr(n,o,s,u,a,h,p.x,p.y)&&xe(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function i_(t,e,r,i){var n=t.prev,s=t,a=t.next;if(xe(n,s,a)>=0)return!1;for(var o=n.x,u=s.x,h=a.x,d=n.y,l=s.y,c=a.y,f=o<u?o<h?o:h:u<h?u:h,p=d<l?d<c?d:c:l<c?l:c,m=o>u?o>h?o:h:u>h?u:h,v=d>l?d>c?d:c:l>c?l:c,g=ps(f,p,e,r,i),y=ps(m,v,e,r,i),_=t.prevZ,x=t.nextZ;_&&_.z>=g&&x&&x.z<=y;){if(_.x>=f&&_.x<=m&&_.y>=p&&_.y<=v&&_!==n&&_!==a&&mr(o,d,u,l,h,c,_.x,_.y)&&xe(_.prev,_,_.next)>=0||(_=_.prevZ,x.x>=f&&x.x<=m&&x.y>=p&&x.y<=v&&x!==n&&x!==a&&mr(o,d,u,l,h,c,x.x,x.y)&&xe(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;_&&_.z>=g;){if(_.x>=f&&_.x<=m&&_.y>=p&&_.y<=v&&_!==n&&_!==a&&mr(o,d,u,l,h,c,_.x,_.y)&&xe(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;x&&x.z<=y;){if(x.x>=f&&x.x<=m&&x.y>=p&&x.y<=v&&x!==n&&x!==a&&mr(o,d,u,l,h,c,x.x,x.y)&&xe(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function n_(t,e,r){var i=t;do{var n=i.prev,s=i.next.next;!$i(n,s)&&bl(n,i,i.next,s)&&Kr(n,s)&&Kr(s,n)&&(e.push(n.i/r|0),e.push(i.i/r|0),e.push(s.i/r|0),Zr(i),Zr(i.next),i=t=s),i=i.next}while(i!==t);return jt(i)}function s_(t,e,r,i,n,s){var a=t;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&p_(a,o)){var u=Tl(a,o);a=jt(a,a.next),u=jt(u,u.next),Yr(a,e,r,i,n,s,0),Yr(u,e,r,i,n,s,0);return}o=o.next}a=a.next}while(a!==t)}function a_(t,e,r,i){var n=[],s,a,o,u,h;for(s=0,a=e.length;s<a;s++)o=e[s]*i,u=s<a-1?e[s+1]*i:t.length,h=xl(t,o,u,i,!1),h===h.next&&(h.steiner=!0),n.push(d_(h));for(n.sort(o_),s=0;s<n.length;s++)r=l_(n[s],r);return r}function o_(t,e){return t.x-e.x}function l_(t,e){var r=u_(t,e);if(!r)return e;var i=Tl(r,t);return jt(i,i.next),jt(r,r.next)}function u_(t,e){var r=e,i=t.x,n=t.y,s=-1/0,a;do{if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){var o=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=i&&o>s&&(s=o,a=r.x<r.next.x?r:r.next,o===i))return a}r=r.next}while(r!==e);if(!a)return null;var u=a,h=a.x,d=a.y,l=1/0,c;r=a;do i>=r.x&&r.x>=h&&i!==r.x&&mr(n<d?i:s,n,h,d,n<d?s:i,n,r.x,r.y)&&(c=Math.abs(n-r.y)/(i-r.x),Kr(r,t)&&(c<l||c===l&&(r.x>a.x||r.x===a.x&&c_(a,r)))&&(a=r,l=c)),r=r.next;while(r!==u);return a}function c_(t,e){return xe(t.prev,t,e.prev)<0&&xe(e.next,t,t.next)<0}function h_(t,e,r,i){var n=t;do n.z===0&&(n.z=ps(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,f_(n)}function f_(t){var e,r,i,n,s,a,o,u,h=1;do{for(r=t,t=null,s=null,a=0;r;){for(a++,i=r,o=0,e=0;e<h&&(o++,i=i.nextZ,!!i);e++);for(u=h;o>0||u>0&&i;)o!==0&&(u===0||!i||r.z<=i.z)?(n=r,r=r.nextZ,o--):(n=i,i=i.nextZ,u--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;r=i}s.nextZ=null,h*=2}while(a>1);return t}function ps(t,e,r,i,n){return t=(t-r)*n|0,e=(e-i)*n|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function d_(t){var e=t,r=t;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==t);return r}function mr(t,e,r,i,n,s,a,o){return(n-a)*(e-o)>=(t-a)*(s-o)&&(t-a)*(i-o)>=(r-a)*(e-o)&&(r-a)*(s-o)>=(n-a)*(i-o)}function p_(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!m_(t,e)&&(Kr(t,e)&&Kr(e,t)&&g_(t,e)&&(xe(t.prev,t,e.prev)||xe(t,e.prev,e))||$i(t,e)&&xe(t.prev,t,t.next)>0&&xe(e.prev,e,e.next)>0)}function xe(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function $i(t,e){return t.x===e.x&&t.y===e.y}function bl(t,e,r,i){var n=zi(xe(t,e,r)),s=zi(xe(t,e,i)),a=zi(xe(r,i,t)),o=zi(xe(r,i,e));return!!(n!==s&&a!==o||n===0&&Gi(t,r,e)||s===0&&Gi(t,i,e)||a===0&&Gi(r,t,i)||o===0&&Gi(r,e,i))}function Gi(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function zi(t){return t>0?1:t<0?-1:0}function m_(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&bl(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function Kr(t,e){return xe(t.prev,t,t.next)<0?xe(t,e,t.next)>=0&&xe(t,t.prev,e)>=0:xe(t,e,t.prev)<0||xe(t,t.next,e)<0}function g_(t,e){var r=t,i=!1,n=(t.x+e.x)/2,s=(t.y+e.y)/2;do r.y>s!=r.next.y>s&&r.next.y!==r.y&&n<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==t);return i}function Tl(t,e){var r=new ms(t.i,t.x,t.y),i=new ms(e.i,e.x,e.y),n=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,s.next=i,i.prev=s,i}function wl(t,e,r,i){var n=new ms(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function Zr(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ms(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Ui.deviation=function(t,e,r,i){var n=e&&e.length,s=n?e[0]*r:t.length,a=Math.abs(gs(t,0,s,r));if(n)for(var o=0,u=e.length;o<u;o++){var h=e[o]*r,d=o<u-1?e[o+1]*r:t.length;a-=Math.abs(gs(t,h,d,r))}var l=0;for(o=0;o<i.length;o+=3){var c=i[o]*r,f=i[o+1]*r,p=i[o+2]*r;l+=Math.abs((t[c]-t[p])*(t[f+1]-t[c+1])-(t[c]-t[f])*(t[p+1]-t[c+1]))}return a===0&&l===0?0:Math.abs((l-a)/a)};function gs(t,e,r,i){for(var n=0,s=e,a=r-i;s<r;s+=i)n+=(t[a]-t[s])*(t[s+1]+t[a+1]),a=s;return n}Ui.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var s=0;s<t[n].length;s++)for(var a=0;a<e;a++)r.vertices.push(t[n][s][a]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r};var v_=ds.exports;const __=Lt(v_);var ji={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */ji.exports,function(t,e){(function(r){var i=e&&!e.nodeType&&e,n=t&&!t.nodeType&&t,s=typeof Ve=="object"&&Ve;(s.global===s||s.window===s||s.self===s)&&(r=s);var a,o=2147483647,u=36,h=1,d=26,l=38,c=700,f=72,p=128,m="-",v=/^xn--/,g=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=u-h,T=Math.floor,w=String.fromCharCode,b;function S(M){throw new RangeError(_[M])}function A(M,O){for(var H=M.length,V=[];H--;)V[H]=O(M[H]);return V}function I(M,O){var H=M.split("@"),V="";H.length>1&&(V=H[0]+"@",M=H[1]),M=M.replace(y,".");var W=M.split("."),ne=A(W,O).join(".");return V+ne}function F(M){for(var O=[],H=0,V=M.length,W,ne;H<V;)W=M.charCodeAt(H++),W>=55296&&W<=56319&&H<V?(ne=M.charCodeAt(H++),(ne&64512)==56320?O.push(((W&1023)<<10)+(ne&1023)+65536):(O.push(W),H--)):O.push(W);return O}function B(M){return A(M,function(O){var H="";return O>65535&&(O-=65536,H+=w(O>>>10&1023|55296),O=56320|O&1023),H+=w(O),H}).join("")}function E(M){return M-48<10?M-22:M-65<26?M-65:M-97<26?M-97:u}function C(M,O){return M+22+75*(M<26)-((O!=0)<<5)}function $(M,O,H){var V=0;for(M=H?T(M/c):M>>1,M+=T(M/O);M>x*d>>1;V+=u)M=T(M/x);return T(V+(x+1)*M/(M+l))}function G(M){var O=[],H=M.length,V,W=0,ne=p,oe=f,ce,ge,fe,z,q,Y,pe,De,K;for(ce=M.lastIndexOf(m),ce<0&&(ce=0),ge=0;ge<ce;++ge)M.charCodeAt(ge)>=128&&S("not-basic"),O.push(M.charCodeAt(ge));for(fe=ce>0?ce+1:0;fe<H;){for(z=W,q=1,Y=u;fe>=H&&S("invalid-input"),pe=E(M.charCodeAt(fe++)),(pe>=u||pe>T((o-W)/q))&&S("overflow"),W+=pe*q,De=Y<=oe?h:Y>=oe+d?d:Y-oe,!(pe<De);Y+=u)K=u-De,q>T(o/K)&&S("overflow"),q*=K;V=O.length+1,oe=$(W-z,V,z==0),T(W/V)>o-ne&&S("overflow"),ne+=T(W/V),W%=V,O.splice(W++,0,ne)}return B(O)}function R(M){var O,H,V,W,ne,oe,ce,ge,fe,z,q,Y=[],pe,De,K,_e;for(M=F(M),pe=M.length,O=p,H=0,ne=f,oe=0;oe<pe;++oe)q=M[oe],q<128&&Y.push(w(q));for(V=W=Y.length,W&&Y.push(m);V<pe;){for(ce=o,oe=0;oe<pe;++oe)q=M[oe],q>=O&&q<ce&&(ce=q);for(De=V+1,ce-O>T((o-H)/De)&&S("overflow"),H+=(ce-O)*De,O=ce,oe=0;oe<pe;++oe)if(q=M[oe],q<O&&++H>o&&S("overflow"),q==O){for(ge=H,fe=u;z=fe<=ne?h:fe>=ne+d?d:fe-ne,!(ge<z);fe+=u)_e=ge-z,K=u-z,Y.push(w(C(z+_e%K,0))),ge=T(_e/K);Y.push(w(C(ge,0))),ne=$(H,De,V==W),H=0,++V}++H,++O}return Y.join("")}function U(M){return I(M,function(O){return v.test(O)?G(O.slice(4).toLowerCase()):O})}function X(M){return I(M,function(O){return g.test(O)?"xn--"+R(O):O})}if(a={version:"1.4.1",ucs2:{decode:F,encode:B},decode:G,encode:R,toASCII:X,toUnicode:U},i&&n)if(t.exports==i)n.exports=a;else for(b in a)a.hasOwnProperty(b)&&(i[b]=a[b]);else r.punycode=a})(Ve)}(ji,ji.exports);var y_=ji.exports,x_=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[r]=n;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,r);if(a.value!==n||a.enumerable!==!0)return!1}return!0},Sl=typeof Symbol<"u"&&Symbol,b_=x_,T_=function(){return typeof Sl!="function"||typeof Symbol!="function"||typeof Sl("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:b_()},Al={foo:{}},w_=Object,S_=function(){return{__proto__:Al}.foo===Al.foo&&!({__proto__:null}instanceof w_)},A_="Function.prototype.bind called on incompatible ",vs=Array.prototype.slice,E_=Object.prototype.toString,C_="[object Function]",I_=function(e){var r=this;if(typeof r!="function"||E_.call(r)!==C_)throw new TypeError(A_+r);for(var i=vs.call(arguments,1),n,s=function(){if(this instanceof n){var d=r.apply(this,i.concat(vs.call(arguments)));return Object(d)===d?d:this}else return r.apply(e,i.concat(vs.call(arguments)))},a=Math.max(0,r.length-i.length),o=[],u=0;u<a;u++)o.push("$"+u);if(n=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var h=function(){};h.prototype=r.prototype,n.prototype=new h,h.prototype=null}return n},R_=I_,_s=Function.prototype.bind||R_,P_=_s,M_=P_.call(Function.call,Object.prototype.hasOwnProperty),J,gr=SyntaxError,El=Function,vr=TypeError,ys=function(t){try{return El('"use strict"; return ('+t+").constructor;")()}catch{}},Ht=Object.getOwnPropertyDescriptor;if(Ht)try{Ht({},"")}catch{Ht=null}var xs=function(){throw new vr},F_=Ht?function(){try{return arguments.callee,xs}catch{try{return Ht(arguments,"callee").get}catch{return xs}}}():xs,_r=T_(),O_=S_(),Ie=Object.getPrototypeOf||(O_?function(t){return t.__proto__}:null),yr={},N_=typeof Uint8Array>"u"||!Ie?J:Ie(Uint8Array),Vt={"%AggregateError%":typeof AggregateError>"u"?J:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?J:ArrayBuffer,"%ArrayIteratorPrototype%":_r&&Ie?Ie([][Symbol.iterator]()):J,"%AsyncFromSyncIteratorPrototype%":J,"%AsyncFunction%":yr,"%AsyncGenerator%":yr,"%AsyncGeneratorFunction%":yr,"%AsyncIteratorPrototype%":yr,"%Atomics%":typeof Atomics>"u"?J:Atomics,"%BigInt%":typeof BigInt>"u"?J:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?J:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?J:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?J:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?J:Float32Array,"%Float64Array%":typeof Float64Array>"u"?J:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?J:FinalizationRegistry,"%Function%":El,"%GeneratorFunction%":yr,"%Int8Array%":typeof Int8Array>"u"?J:Int8Array,"%Int16Array%":typeof Int16Array>"u"?J:Int16Array,"%Int32Array%":typeof Int32Array>"u"?J:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_r&&Ie?Ie(Ie([][Symbol.iterator]())):J,"%JSON%":typeof JSON=="object"?JSON:J,"%Map%":typeof Map>"u"?J:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_r||!Ie?J:Ie(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?J:Promise,"%Proxy%":typeof Proxy>"u"?J:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?J:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?J:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_r||!Ie?J:Ie(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?J:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_r&&Ie?Ie(""[Symbol.iterator]()):J,"%Symbol%":_r?Symbol:J,"%SyntaxError%":gr,"%ThrowTypeError%":F_,"%TypedArray%":N_,"%TypeError%":vr,"%Uint8Array%":typeof Uint8Array>"u"?J:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?J:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?J:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?J:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?J:WeakMap,"%WeakRef%":typeof WeakRef>"u"?J:WeakRef,"%WeakSet%":typeof WeakSet>"u"?J:WeakSet};if(Ie)try{null.error}catch(t){var k_=Ie(Ie(t));Vt["%Error.prototype%"]=k_}var L_=function t(e){var r;if(e==="%AsyncFunction%")r=ys("async function () {}");else if(e==="%GeneratorFunction%")r=ys("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=ys("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&Ie&&(r=Ie(n.prototype))}return Vt[e]=r,r},Cl={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qr=_s,Hi=M_,D_=Qr.call(Function.call,Array.prototype.concat),B_=Qr.call(Function.apply,Array.prototype.splice),Il=Qr.call(Function.call,String.prototype.replace),Vi=Qr.call(Function.call,String.prototype.slice),U_=Qr.call(Function.call,RegExp.prototype.exec),$_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G_=/\\(\\)?/g,z_=function(e){var r=Vi(e,0,1),i=Vi(e,-1);if(r==="%"&&i!=="%")throw new gr("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new gr("invalid intrinsic syntax, expected opening `%`");var n=[];return Il(e,$_,function(s,a,o,u){n[n.length]=o?Il(u,G_,"$1"):a||s}),n},j_=function(e,r){var i=e,n;if(Hi(Cl,i)&&(n=Cl[i],i="%"+n[0]+"%"),Hi(Vt,i)){var s=Vt[i];if(s===yr&&(s=L_(i)),typeof s>"u"&&!r)throw new vr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new gr("intrinsic "+e+" does not exist!")},bs=function(e,r){if(typeof e!="string"||e.length===0)throw new vr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new vr('"allowMissing" argument must be a boolean');if(U_(/^%?[^%]*%?$/,e)===null)throw new gr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=z_(e),n=i.length>0?i[0]:"",s=j_("%"+n+"%",r),a=s.name,o=s.value,u=!1,h=s.alias;h&&(n=h[0],B_(i,D_([0,1],h)));for(var d=1,l=!0;d<i.length;d+=1){var c=i[d],f=Vi(c,0,1),p=Vi(c,-1);if((f==='"'||f==="'"||f==="`"||p==='"'||p==="'"||p==="`")&&f!==p)throw new gr("property names with quotes must have matching quotes");if((c==="constructor"||!l)&&(u=!0),n+="."+c,a="%"+n+"%",Hi(Vt,a))o=Vt[a];else if(o!=null){if(!(c in o)){if(!r)throw new vr("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ht&&d+1>=i.length){var m=Ht(o,c);l=!!m,l&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[c]}else l=Hi(o,c),o=o[c];l&&!u&&(Vt[a]=o)}}return o},Rl={exports:{}};(function(t){var e=_s,r=bs,i=r("%Function.prototype.apply%"),n=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||e.call(n,i),a=r("%Object.getOwnPropertyDescriptor%",!0),o=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(o)try{o({},"a",{value:1})}catch{o=null}t.exports=function(l){var c=s(e,n,arguments);if(a&&o){var f=a(c,"length");f.configurable&&o(c,"length",{value:1+u(0,l.length-(arguments.length-1))})}return c};var h=function(){return s(e,i,arguments)};o?o(t.exports,"apply",{value:h}):t.exports.apply=h})(Rl);var H_=Rl.exports,Pl=bs,Ml=H_,V_=Ml(Pl("String.prototype.indexOf")),X_=function(e,r){var i=Pl(e,!!r);return typeof i=="function"&&V_(e,".prototype.")>-1?Ml(i):i};const W_=Nh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ts=typeof Map=="function"&&Map.prototype,ws=Object.getOwnPropertyDescriptor&&Ts?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Xi=Ts&&ws&&typeof ws.get=="function"?ws.get:null,Fl=Ts&&Map.prototype.forEach,Ss=typeof Set=="function"&&Set.prototype,As=Object.getOwnPropertyDescriptor&&Ss?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wi=Ss&&As&&typeof As.get=="function"?As.get:null,Ol=Ss&&Set.prototype.forEach,q_=typeof WeakMap=="function"&&WeakMap.prototype,Jr=q_?WeakMap.prototype.has:null,Y_=typeof WeakSet=="function"&&WeakSet.prototype,ei=Y_?WeakSet.prototype.has:null,K_=typeof WeakRef=="function"&&WeakRef.prototype,Nl=K_?WeakRef.prototype.deref:null,Z_=Boolean.prototype.valueOf,Q_=Object.prototype.toString,J_=Function.prototype.toString,ey=String.prototype.match,Es=String.prototype.slice,Pt=String.prototype.replace,ty=String.prototype.toUpperCase,kl=String.prototype.toLowerCase,Ll=RegExp.prototype.test,Dl=Array.prototype.concat,mt=Array.prototype.join,ry=Array.prototype.slice,Bl=Math.floor,Cs=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Is=Object.getOwnPropertySymbols,Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,xr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ne=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===xr||"symbol")?Symbol.toStringTag:null,Ul=Object.prototype.propertyIsEnumerable,$l=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Gl(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ll.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var i=t<0?-Bl(-t):Bl(t);if(i!==t){var n=String(i),s=Es.call(e,n.length+1);return Pt.call(n,r,"$&_")+"."+Pt.call(Pt.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Pt.call(e,r,"$&_")}var Ps=W_,zl=Ps.custom,jl=Xl(zl)?zl:null,iy=function t(e,r,i,n){var s=r||{};if(Mt(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Mt(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Mt(s,"customInspect")?s.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Mt(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Mt(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return ql(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var u=String(e);return o?Gl(e,u):u}if(typeof e=="bigint"){var h=String(e)+"n";return o?Gl(e,h):h}var d=typeof s.depth>"u"?5:s.depth;if(typeof i>"u"&&(i=0),i>=d&&d>0&&typeof e=="object")return Ms(e)?"[Array]":"[Object]";var l=by(s,i);if(typeof n>"u")n=[];else if(Wl(n,e)>=0)return"[Circular]";function c(E,C,$){if(C&&(n=ry.call(n),n.push(C)),$){var G={depth:s.depth};return Mt(s,"quoteStyle")&&(G.quoteStyle=s.quoteStyle),t(E,G,i+1,n)}return t(E,s,i+1,n)}if(typeof e=="function"&&!Vl(e)){var f=fy(e),p=qi(e,c);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+mt.call(p,", ")+" }":"")}if(Xl(e)){var m=xr?Pt.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Rs.call(e);return typeof e=="object"&&!xr?ti(m):m}if(_y(e)){for(var v="<"+kl.call(String(e.nodeName)),g=e.attributes||[],y=0;y<g.length;y++)v+=" "+g[y].name+"="+Hl(ny(g[y].value),"double",s);return v+=">",e.childNodes&&e.childNodes.length&&(v+="..."),v+="</"+kl.call(String(e.nodeName))+">",v}if(Ms(e)){if(e.length===0)return"[]";var _=qi(e,c);return l&&!xy(_)?"["+Os(_,l)+"]":"[ "+mt.call(_,", ")+" ]"}if(ay(e)){var x=qi(e,c);return!("cause"in Error.prototype)&&"cause"in e&&!Ul.call(e,"cause")?"{ ["+String(e)+"] "+mt.call(Dl.call("[cause]: "+c(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+mt.call(x,", ")+" }"}if(typeof e=="object"&&a){if(jl&&typeof e[jl]=="function"&&Ps)return Ps(e,{depth:d-i});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(dy(e)){var T=[];return Fl&&Fl.call(e,function(E,C){T.push(c(C,e,!0)+" => "+c(E,e))}),Yl("Map",Xi.call(e),T,l)}if(gy(e)){var w=[];return Ol&&Ol.call(e,function(E){w.push(c(E,e))}),Yl("Set",Wi.call(e),w,l)}if(py(e))return Fs("WeakMap");if(vy(e))return Fs("WeakSet");if(my(e))return Fs("WeakRef");if(ly(e))return ti(c(Number(e)));if(cy(e))return ti(c(Cs.call(e)));if(uy(e))return ti(Z_.call(e));if(oy(e))return ti(c(String(e)));if(!sy(e)&&!Vl(e)){var b=qi(e,c),S=$l?$l(e)===Object.prototype:e instanceof Object||e.constructor===Object,A=e instanceof Object?"":"null prototype",I=!S&&Ne&&Object(e)===e&&Ne in e?Es.call(Ft(e),8,-1):A?"Object":"",F=S||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",B=F+(I||A?"["+mt.call(Dl.call([],I||[],A||[]),": ")+"] ":"");return b.length===0?B+"{}":l?B+"{"+Os(b,l)+"}":B+"{ "+mt.call(b,", ")+" }"}return String(e)};function Hl(t,e,r){var i=(r.quoteStyle||e)==="double"?'"':"'";return i+t+i}function ny(t){return Pt.call(String(t),/"/g,"&quot;")}function Ms(t){return Ft(t)==="[object Array]"&&(!Ne||!(typeof t=="object"&&Ne in t))}function sy(t){return Ft(t)==="[object Date]"&&(!Ne||!(typeof t=="object"&&Ne in t))}function Vl(t){return Ft(t)==="[object RegExp]"&&(!Ne||!(typeof t=="object"&&Ne in t))}function ay(t){return Ft(t)==="[object Error]"&&(!Ne||!(typeof t=="object"&&Ne in t))}function oy(t){return Ft(t)==="[object String]"&&(!Ne||!(typeof t=="object"&&Ne in t))}function ly(t){return Ft(t)==="[object Number]"&&(!Ne||!(typeof t=="object"&&Ne in t))}function uy(t){return Ft(t)==="[object Boolean]"&&(!Ne||!(typeof t=="object"&&Ne in t))}function Xl(t){if(xr)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Rs)return!1;try{return Rs.call(t),!0}catch{}return!1}function cy(t){if(!t||typeof t!="object"||!Cs)return!1;try{return Cs.call(t),!0}catch{}return!1}var hy=Object.prototype.hasOwnProperty||function(t){return t in this};function Mt(t,e){return hy.call(t,e)}function Ft(t){return Q_.call(t)}function fy(t){if(t.name)return t.name;var e=ey.call(J_.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Wl(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}function dy(t){if(!Xi||!t||typeof t!="object")return!1;try{Xi.call(t);try{Wi.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function py(t){if(!Jr||!t||typeof t!="object")return!1;try{Jr.call(t,Jr);try{ei.call(t,ei)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function my(t){if(!Nl||!t||typeof t!="object")return!1;try{return Nl.call(t),!0}catch{}return!1}function gy(t){if(!Wi||!t||typeof t!="object")return!1;try{Wi.call(t);try{Xi.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function vy(t){if(!ei||!t||typeof t!="object")return!1;try{ei.call(t,ei);try{Jr.call(t,Jr)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function _y(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function ql(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return ql(Es.call(t,0,e.maxStringLength),e)+i}var n=Pt.call(Pt.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,yy);return Hl(n,"single",e)}function yy(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+ty.call(e.toString(16))}function ti(t){return"Object("+t+")"}function Fs(t){return t+" { ? }"}function Yl(t,e,r,i){var n=i?Os(r,i):mt.call(r,", ");return t+" ("+e+") {"+n+"}"}function xy(t){for(var e=0;e<t.length;e++)if(Wl(t[e],`
34
- `)>=0)return!1;return!0}function by(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=mt.call(Array(t.indent+1)," ");else return null;return{base:r,prev:mt.call(Array(e+1),r)}}function Os(t,e){if(t.length===0)return"";var r=`
35
- `+e.prev+e.base;return r+mt.call(t,","+r)+`
36
- `+e.prev}function qi(t,e){var r=Ms(t),i=[];if(r){i.length=t.length;for(var n=0;n<t.length;n++)i[n]=Mt(t,n)?e(t[n],t):""}var s=typeof Is=="function"?Is(t):[],a;if(xr){a={};for(var o=0;o<s.length;o++)a["$"+s[o]]=s[o]}for(var u in t)Mt(t,u)&&(r&&String(Number(u))===u&&u<t.length||xr&&a["$"+u]instanceof Symbol||(Ll.call(/[^\w$]/,u)?i.push(e(u,t)+": "+e(t[u],t)):i.push(u+": "+e(t[u],t))));if(typeof Is=="function")for(var h=0;h<s.length;h++)Ul.call(t,s[h])&&i.push("["+e(s[h])+"]: "+e(t[s[h]],t));return i}var Ns=bs,br=X_,Ty=iy,wy=Ns("%TypeError%"),Yi=Ns("%WeakMap%",!0),Ki=Ns("%Map%",!0),Sy=br("WeakMap.prototype.get",!0),Ay=br("WeakMap.prototype.set",!0),Ey=br("WeakMap.prototype.has",!0),Cy=br("Map.prototype.get",!0),Iy=br("Map.prototype.set",!0),Ry=br("Map.prototype.has",!0),ks=function(t,e){for(var r=t,i;(i=r.next)!==null;r=i)if(i.key===e)return r.next=i.next,i.next=t.next,t.next=i,i},Py=function(t,e){var r=ks(t,e);return r&&r.value},My=function(t,e,r){var i=ks(t,e);i?i.value=r:t.next={key:e,next:t.next,value:r}},Fy=function(t,e){return!!ks(t,e)},Oy=function(){var e,r,i,n={assert:function(s){if(!n.has(s))throw new wy("Side channel does not contain "+Ty(s))},get:function(s){if(Yi&&s&&(typeof s=="object"||typeof s=="function")){if(e)return Sy(e,s)}else if(Ki){if(r)return Cy(r,s)}else if(i)return Py(i,s)},has:function(s){if(Yi&&s&&(typeof s=="object"||typeof s=="function")){if(e)return Ey(e,s)}else if(Ki){if(r)return Ry(r,s)}else if(i)return Fy(i,s);return!1},set:function(s,a){Yi&&s&&(typeof s=="object"||typeof s=="function")?(e||(e=new Yi),Ay(e,s,a)):Ki?(r||(r=new Ki),Iy(r,s,a)):(i||(i={key:{},next:null}),My(i,s,a))}};return n},Ny=String.prototype.replace,ky=/%20/g,Ls={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ds={default:Ls.RFC3986,formatters:{RFC1738:function(t){return Ny.call(t,ky,"+")},RFC3986:function(t){return String(t)}},RFC1738:Ls.RFC1738,RFC3986:Ls.RFC3986},Ly=Ds,Bs=Object.prototype.hasOwnProperty,Xt=Array.isArray,gt=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Dy=function(e){for(;e.length>1;){var r=e.pop(),i=r.obj[r.prop];if(Xt(i)){for(var n=[],s=0;s<i.length;++s)typeof i[s]<"u"&&n.push(i[s]);r.obj[r.prop]=n}}},Kl=function(e,r){for(var i=r&&r.plainObjects?Object.create(null):{},n=0;n<e.length;++n)typeof e[n]<"u"&&(i[n]=e[n]);return i},By=function t(e,r,i){if(!r)return e;if(typeof r!="object"){if(Xt(e))e.push(r);else if(e&&typeof e=="object")(i&&(i.plainObjects||i.allowPrototypes)||!Bs.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var n=e;return Xt(e)&&!Xt(r)&&(n=Kl(e,i)),Xt(e)&&Xt(r)?(r.forEach(function(s,a){if(Bs.call(e,a)){var o=e[a];o&&typeof o=="object"&&s&&typeof s=="object"?e[a]=t(o,s,i):e.push(s)}else e[a]=s}),e):Object.keys(r).reduce(function(s,a){var o=r[a];return Bs.call(s,a)?s[a]=t(s[a],o,i):s[a]=o,s},n)},Uy=function(e,r){return Object.keys(r).reduce(function(i,n){return i[n]=r[n],i},e)},$y=function(t,e,r){var i=t.replace(/\+/g," ");if(r==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},Gy=function(e,r,i,n,s){if(e.length===0)return e;var a=e;if(typeof e=="symbol"?a=Symbol.prototype.toString.call(e):typeof e!="string"&&(a=String(e)),i==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var o="",u=0;u<a.length;++u){var h=a.charCodeAt(u);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===Ly.RFC1738&&(h===40||h===41)){o+=a.charAt(u);continue}if(h<128){o=o+gt[h];continue}if(h<2048){o=o+(gt[192|h>>6]+gt[128|h&63]);continue}if(h<55296||h>=57344){o=o+(gt[224|h>>12]+gt[128|h>>6&63]+gt[128|h&63]);continue}u+=1,h=65536+((h&1023)<<10|a.charCodeAt(u)&1023),o+=gt[240|h>>18]+gt[128|h>>12&63]+gt[128|h>>6&63]+gt[128|h&63]}return o},zy=function(e){for(var r=[{obj:{o:e},prop:"o"}],i=[],n=0;n<r.length;++n)for(var s=r[n],a=s.obj[s.prop],o=Object.keys(a),u=0;u<o.length;++u){var h=o[u],d=a[h];typeof d=="object"&&d!==null&&i.indexOf(d)===-1&&(r.push({obj:a,prop:h}),i.push(d))}return Dy(r),e},jy=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Hy=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Vy=function(e,r){return[].concat(e,r)},Xy=function(e,r){if(Xt(e)){for(var i=[],n=0;n<e.length;n+=1)i.push(r(e[n]));return i}return r(e)},Zl={arrayToObject:Kl,assign:Uy,combine:Vy,compact:zy,decode:$y,encode:Gy,isBuffer:Hy,isRegExp:jy,maybeMap:Xy,merge:By},Ql=Oy,Zi=Zl,ri=Ds,Wy=Object.prototype.hasOwnProperty,Jl={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},xt=Array.isArray,qy=Array.prototype.push,eu=function(t,e){qy.apply(t,xt(e)?e:[e])},Yy=Date.prototype.toISOString,tu=ri.default,ke={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Zi.encode,encodeValuesOnly:!1,format:tu,formatter:ri.formatters[tu],indices:!1,serializeDate:function(e){return Yy.call(e)},skipNulls:!1,strictNullHandling:!1},Ky=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Us={},Zy=function t(e,r,i,n,s,a,o,u,h,d,l,c,f,p,m,v){for(var g=e,y=v,_=0,x=!1;(y=y.get(Us))!==void 0&&!x;){var T=y.get(e);if(_+=1,typeof T<"u"){if(T===_)throw new RangeError("Cyclic object value");x=!0}typeof y.get(Us)>"u"&&(_=0)}if(typeof u=="function"?g=u(r,g):g instanceof Date?g=l(g):i==="comma"&&xt(g)&&(g=Zi.maybeMap(g,function(G){return G instanceof Date?l(G):G})),g===null){if(s)return o&&!p?o(r,ke.encoder,m,"key",c):r;g=""}if(Ky(g)||Zi.isBuffer(g)){if(o){var w=p?r:o(r,ke.encoder,m,"key",c);return[f(w)+"="+f(o(g,ke.encoder,m,"value",c))]}return[f(r)+"="+f(String(g))]}var b=[];if(typeof g>"u")return b;var S;if(i==="comma"&&xt(g))p&&o&&(g=Zi.maybeMap(g,o)),S=[{value:g.length>0?g.join(",")||null:void 0}];else if(xt(u))S=u;else{var A=Object.keys(g);S=h?A.sort(h):A}for(var I=n&&xt(g)&&g.length===1?r+"[]":r,F=0;F<S.length;++F){var B=S[F],E=typeof B=="object"&&typeof B.value<"u"?B.value:g[B];if(!(a&&E===null)){var C=xt(g)?typeof i=="function"?i(I,B):I:I+(d?"."+B:"["+B+"]");v.set(e,_);var $=Ql();$.set(Us,v),eu(b,t(E,C,i,n,s,a,i==="comma"&&p&&xt(g)?null:o,u,h,d,l,c,f,p,m,$))}}return b},Qy=function(e){if(!e)return ke;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||ke.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=ri.default;if(typeof e.format<"u"){if(!Wy.call(ri.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var n=ri.formatters[i],s=ke.filter;return(typeof e.filter=="function"||xt(e.filter))&&(s=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:ke.addQueryPrefix,allowDots:typeof e.allowDots>"u"?ke.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ke.charsetSentinel,delimiter:typeof e.delimiter>"u"?ke.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:ke.encode,encoder:typeof e.encoder=="function"?e.encoder:ke.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:ke.encodeValuesOnly,filter:s,format:i,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:ke.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:ke.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ke.strictNullHandling}},Jy=function(t,e){var r=t,i=Qy(e),n,s;typeof i.filter=="function"?(s=i.filter,r=s("",r)):xt(i.filter)&&(s=i.filter,n=s);var a=[];if(typeof r!="object"||r===null)return"";var o;e&&e.arrayFormat in Jl?o=e.arrayFormat:e&&"indices"in e?o=e.indices?"indices":"repeat":o="indices";var u=Jl[o];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=u==="comma"&&e&&e.commaRoundTrip;n||(n=Object.keys(r)),i.sort&&n.sort(i.sort);for(var d=Ql(),l=0;l<n.length;++l){var c=n[l];i.skipNulls&&r[c]===null||eu(a,Zy(r[c],c,u,h,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,d))}var f=a.join(i.delimiter),p=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),f.length>0?p+f:""},Tr=Zl,$s=Object.prototype.hasOwnProperty,ex=Array.isArray,Re={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Tr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},tx=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},ru=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},rx="utf8=%26%2310003%3B",ix="utf8=%E2%9C%93",nx=function(e,r){var i={__proto__:null},n=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=r.parameterLimit===1/0?void 0:r.parameterLimit,a=n.split(r.delimiter,s),o=-1,u,h=r.charset;if(r.charsetSentinel)for(u=0;u<a.length;++u)a[u].indexOf("utf8=")===0&&(a[u]===ix?h="utf-8":a[u]===rx&&(h="iso-8859-1"),o=u,u=a.length);for(u=0;u<a.length;++u)if(u!==o){var d=a[u],l=d.indexOf("]="),c=l===-1?d.indexOf("="):l+1,f,p;c===-1?(f=r.decoder(d,Re.decoder,h,"key"),p=r.strictNullHandling?null:""):(f=r.decoder(d.slice(0,c),Re.decoder,h,"key"),p=Tr.maybeMap(ru(d.slice(c+1),r),function(m){return r.decoder(m,Re.decoder,h,"value")})),p&&r.interpretNumericEntities&&h==="iso-8859-1"&&(p=tx(p)),d.indexOf("[]=")>-1&&(p=ex(p)?[p]:p),$s.call(i,f)?i[f]=Tr.combine(i[f],p):i[f]=p}return i},sx=function(t,e,r,i){for(var n=i?e:ru(e,r),s=t.length-1;s>=0;--s){var a,o=t[s];if(o==="[]"&&r.parseArrays)a=[].concat(n);else{a=r.plainObjects?Object.create(null):{};var u=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,h=parseInt(u,10);!r.parseArrays&&u===""?a={0:n}:!isNaN(h)&&o!==u&&String(h)===u&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(a=[],a[h]=n):u!=="__proto__"&&(a[u]=n)}n=a}return n},ax=function(e,r,i,n){if(e){var s=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,u=i.depth>0&&a.exec(s),h=u?s.slice(0,u.index):s,d=[];if(h){if(!i.plainObjects&&$s.call(Object.prototype,h)&&!i.allowPrototypes)return;d.push(h)}for(var l=0;i.depth>0&&(u=o.exec(s))!==null&&l<i.depth;){if(l+=1,!i.plainObjects&&$s.call(Object.prototype,u[1].slice(1,-1))&&!i.allowPrototypes)return;d.push(u[1])}return u&&d.push("["+s.slice(u.index)+"]"),sx(d,r,i,n)}},ox=function(e){if(!e)return Re;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof e.charset>"u"?Re.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?Re.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Re.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Re.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Re.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Re.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Re.comma,decoder:typeof e.decoder=="function"?e.decoder:Re.decoder,delimiter:typeof e.delimiter=="string"||Tr.isRegExp(e.delimiter)?e.delimiter:Re.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Re.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Re.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Re.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Re.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Re.strictNullHandling}},lx=function(t,e){var r=ox(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var i=typeof t=="string"?nx(t,r):t,n=r.plainObjects?Object.create(null):{},s=Object.keys(i),a=0;a<s.length;++a){var o=s[a],u=ax(o,i[o],r,typeof t=="string");n=Tr.merge(n,u,r)}return r.allowSparse===!0?n:Tr.compact(n)},ux=Jy,cx=lx,hx=Ds,fx={formats:hx,parse:cx,stringify:ux},dx=y_;function Je(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var px=/^([a-z0-9.+-]+:)/i,mx=/:[0-9]*$/,gx=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,vx=["<",">",'"',"`"," ","\r",`
37
- `," "],_x=["{","}","|","\\","^","`"].concat(vx),Gs=["'"].concat(_x),iu=["%","/","?",";","#"].concat(Gs),nu=["/","?","#"],yx=255,su=/^[+a-z0-9A-Z_-]{0,63}$/,xx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,bx={javascript:!0,"javascript:":!0},zs={javascript:!0,"javascript:":!0},wr={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},js=fx;function Qi(t,e,r){if(t&&typeof t=="object"&&t instanceof Je)return t;var i=new Je;return i.parse(t,e,r),i}Je.prototype.parse=function(t,e,r){if(typeof t!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),n=i!==-1&&i<t.indexOf("#")?"?":"#",s=t.split(n),a=/\\/g;s[0]=s[0].replace(a,"/"),t=s.join(n);var o=t;if(o=o.trim(),!r&&t.split("#").length===1){var u=gx.exec(o);if(u)return this.path=o,this.href=o,this.pathname=u[1],u[2]?(this.search=u[2],e?this.query=js.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=px.exec(o);if(h){h=h[0];var d=h.toLowerCase();this.protocol=d,o=o.substr(h.length)}if(r||h||o.match(/^\/\/[^@/]+@[^@/]+/)){var l=o.substr(0,2)==="//";l&&!(h&&zs[h])&&(o=o.substr(2),this.slashes=!0)}if(!zs[h]&&(l||h&&!wr[h])){for(var c=-1,f=0;f<nu.length;f++){var p=o.indexOf(nu[f]);p!==-1&&(c===-1||p<c)&&(c=p)}var m,v;c===-1?v=o.lastIndexOf("@"):v=o.lastIndexOf("@",c),v!==-1&&(m=o.slice(0,v),o=o.slice(v+1),this.auth=decodeURIComponent(m)),c=-1;for(var f=0;f<iu.length;f++){var p=o.indexOf(iu[f]);p!==-1&&(c===-1||p<c)&&(c=p)}c===-1&&(c=o.length),this.host=o.slice(0,c),o=o.slice(c),this.parseHost(),this.hostname=this.hostname||"";var g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g)for(var y=this.hostname.split(/\./),f=0,_=y.length;f<_;f++){var x=y[f];if(x&&!x.match(su)){for(var T="",w=0,b=x.length;w<b;w++)x.charCodeAt(w)>127?T+="x":T+=x[w];if(!T.match(su)){var S=y.slice(0,f),A=y.slice(f+1),I=x.match(xx);I&&(S.push(I[1]),A.unshift(I[2])),A.length&&(o="/"+A.join(".")+o),this.hostname=S.join(".");break}}}this.hostname.length>yx?this.hostname="":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=dx.toASCII(this.hostname));var F=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+F,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!bx[d])for(var f=0,_=Gs.length;f<_;f++){var E=Gs[f];if(o.indexOf(E)!==-1){var C=encodeURIComponent(E);C===E&&(C=escape(E)),o=o.split(E).join(C)}}var $=o.indexOf("#");$!==-1&&(this.hash=o.substr($),o=o.slice(0,$));var G=o.indexOf("?");if(G!==-1?(this.search=o.substr(G),this.query=o.substr(G+1),e&&(this.query=js.parse(this.query)),o=o.slice(0,G)):e&&(this.search="",this.query={}),o&&(this.pathname=o),wr[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var F=this.pathname||"",R=this.search||"";this.path=F+R}return this.href=this.format(),this};function Tx(t){return typeof t=="string"&&(t=Qi(t)),t instanceof Je?t.format():Je.prototype.format.call(t)}Je.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,s="";this.host?n=t+this.host:this.hostname&&(n=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(s=js.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||wr[e])&&n!==!1?(n="//"+(n||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):n||(n=""),i&&i.charAt(0)!=="#"&&(i="#"+i),a&&a.charAt(0)!=="?"&&(a="?"+a),r=r.replace(/[?#]/g,function(o){return encodeURIComponent(o)}),a=a.replace("#","%23"),e+n+r+a+i};function wx(t,e){return Qi(t,!1,!0).resolve(e)}Je.prototype.resolve=function(t){return this.resolveObject(Qi(t,!1,!0)).format()},Je.prototype.resolveObject=function(t){if(typeof t=="string"){var e=new Je;e.parse(t,!1,!0),t=e}for(var r=new Je,i=Object.keys(this),n=0;n<i.length;n++){var s=i[n];r[s]=this[s]}if(r.hash=t.hash,t.href==="")return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),o=0;o<a.length;o++){var u=a[o];u!=="protocol"&&(r[u]=t[u])}return wr[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!wr[t.protocol]){for(var h=Object.keys(t),d=0;d<h.length;d++){var l=h[d];r[l]=t[l]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!zs[t.protocol]){for(var _=(t.pathname||"").split("/");_.length&&!(t.host=_.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),_[0]!==""&&_.unshift(""),_.length<2&&_.unshift(""),r.pathname=_.join("/")}else r.pathname=t.pathname;if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var c=r.pathname||"",f=r.search||"";r.path=c+f}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var p=r.pathname&&r.pathname.charAt(0)==="/",m=t.host||t.pathname&&t.pathname.charAt(0)==="/",v=m||p||r.host&&t.pathname,g=v,y=r.pathname&&r.pathname.split("/")||[],_=t.pathname&&t.pathname.split("/")||[],x=r.protocol&&!wr[r.protocol];if(x&&(r.hostname="",r.port=null,r.host&&(y[0]===""?y[0]=r.host:y.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(_[0]===""?_[0]=t.host:_.unshift(t.host)),t.host=null),v=v&&(_[0]===""||y[0]==="")),m)r.host=t.host||t.host===""?t.host:r.host,r.hostname=t.hostname||t.hostname===""?t.hostname:r.hostname,r.search=t.search,r.query=t.query,y=_;else if(_.length)y||(y=[]),y.pop(),y=y.concat(_),r.search=t.search,r.query=t.query;else if(t.search!=null){if(x){r.host=y.shift(),r.hostname=r.host;var T=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;T&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname)}return r.search=t.search,r.query=t.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!y.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var w=y.slice(-1)[0],b=(r.host||t.host||y.length>1)&&(w==="."||w==="..")||w==="",S=0,A=y.length;A>=0;A--)w=y[A],w==="."?y.splice(A,1):w===".."?(y.splice(A,1),S++):S&&(y.splice(A,1),S--);if(!v&&!g)for(;S--;S)y.unshift("..");v&&y[0]!==""&&(!y[0]||y[0].charAt(0)!=="/")&&y.unshift(""),b&&y.join("/").substr(-1)!=="/"&&y.push("");var I=y[0]===""||y[0]&&y[0].charAt(0)==="/";if(x){r.hostname=I?"":y.length?y.shift():"",r.host=r.hostname;var T=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;T&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname)}return v=v||r.host&&y.length,v&&!I&&y.unshift(""),y.length>0?r.pathname=y.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},Je.prototype.parseHost=function(){var t=this.host,e=mx.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var Sx=Qi,Ax=wx,Ex=Tx;const Cx={parse:Sx,format:Ex,resolve:Ax},au={};function re(t,e,r=3){if(au[e])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
38
- Deprecated since v${t}`):(i=i.split(`
39
- `).splice(r).join(`
40
- `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
41
- Deprecated since v${t}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
42
- Deprecated since v${t}`),console.warn(i))),au[e]=!0}let Hs;function Ix(){return typeof Hs>"u"&&(Hs=function(){var r;const e={stencil:!0,failIfMajorPerformanceCaveat:Q.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Q.ADAPTER.getWebGLRenderingContext())return!1;const i=Q.ADAPTER.createCanvas();let n=i.getContext("webgl",e)||i.getContext("experimental-webgl",e);const s=!!((r=n==null?void 0:n.getContextAttributes())!=null&&r.stencil);if(n){const a=n.getExtension("WEBGL_lose_context");a&&a.loseContext()}return n=null,s}catch{return!1}}()),Hs}var Rx={grad:.9,turn:360,rad:360/(2*Math.PI)},bt=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},Pe=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},Ze=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},ou=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},lu=function(t){return{r:Ze(t.r,0,255),g:Ze(t.g,0,255),b:Ze(t.b,0,255),a:Ze(t.a)}},Vs=function(t){return{r:Pe(t.r),g:Pe(t.g),b:Pe(t.b),a:Pe(t.a,3)}},Px=/^#([0-9a-f]{3,8})$/i,Ji=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},uu=function(t){var e=t.r,r=t.g,i=t.b,n=t.a,s=Math.max(e,r,i),a=s-Math.min(e,r,i),o=a?s===e?(r-i)/a:s===r?2+(i-e)/a:4+(e-r)/a:0;return{h:60*(o<0?o+6:o),s:s?a/s*100:0,v:s/255*100,a:n}},cu=function(t){var e=t.h,r=t.s,i=t.v,n=t.a;e=e/360*6,r/=100,i/=100;var s=Math.floor(e),a=i*(1-r),o=i*(1-(e-s)*r),u=i*(1-(1-e+s)*r),h=s%6;return{r:255*[i,o,a,a,u,i][h],g:255*[u,i,i,o,a,a][h],b:255*[a,a,u,i,i,o][h],a:n}},hu=function(t){return{h:ou(t.h),s:Ze(t.s,0,100),l:Ze(t.l,0,100),a:Ze(t.a)}},fu=function(t){return{h:Pe(t.h),s:Pe(t.s),l:Pe(t.l),a:Pe(t.a,3)}},du=function(t){return cu((r=(e=t).s,{h:e.h,s:(r*=((i=e.l)<50?i:100-i)/100)>0?2*r/(i+r)*100:0,v:i+r,a:e.a}));var e,r,i},ii=function(t){return{h:(e=uu(t)).h,s:(n=(200-(r=e.s))*(i=e.v)/100)>0&&n<200?r*i/100/(n<=100?n:200-n)*100:0,l:n/2,a:e.a};var e,r,i,n},Mx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ox=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Nx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xs={string:[[function(t){var e=Px.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Pe(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?Pe(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Ox.exec(t)||Nx.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:lu({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Mx.exec(t)||Fx.exec(t);if(!e)return null;var r,i,n=hu({h:(r=e[1],i=e[2],i===void 0&&(i="deg"),Number(r)*(Rx[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return du(n)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,i=t.b,n=t.a,s=n===void 0?1:n;return bt(e)&&bt(r)&&bt(i)?lu({r:Number(e),g:Number(r),b:Number(i),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,r=t.s,i=t.l,n=t.a,s=n===void 0?1:n;if(!bt(e)||!bt(r)||!bt(i))return null;var a=hu({h:Number(e),s:Number(r),l:Number(i),a:Number(s)});return du(a)},"hsl"],[function(t){var e=t.h,r=t.s,i=t.v,n=t.a,s=n===void 0?1:n;if(!bt(e)||!bt(r)||!bt(i))return null;var a=function(o){return{h:ou(o.h),s:Ze(o.s,0,100),v:Ze(o.v,0,100),a:Ze(o.a)}}({h:Number(e),s:Number(r),v:Number(i),a:Number(s)});return cu(a)},"hsv"]]},pu=function(t,e){for(var r=0;r<e.length;r++){var i=e[r][0](t);if(i)return[i,e[r][1]]}return[null,void 0]},kx=function(t){return typeof t=="string"?pu(t.trim(),Xs.string):typeof t=="object"&&t!==null?pu(t,Xs.object):[null,void 0]},Ws=function(t,e){var r=ii(t);return{h:r.h,s:Ze(r.s+100*e,0,100),l:r.l,a:r.a}},qs=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},mu=function(t,e){var r=ii(t);return{h:r.h,s:r.s,l:Ze(r.l+100*e,0,100),a:r.a}},Ys=function(){function t(e){this.parsed=kx(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return Pe(qs(this.rgba),2)},t.prototype.isDark=function(){return qs(this.rgba)<.5},t.prototype.isLight=function(){return qs(this.rgba)>=.5},t.prototype.toHex=function(){return e=Vs(this.rgba),r=e.r,i=e.g,n=e.b,a=(s=e.a)<1?Ji(Pe(255*s)):"","#"+Ji(r)+Ji(i)+Ji(n)+a;var e,r,i,n,s,a},t.prototype.toRgb=function(){return Vs(this.rgba)},t.prototype.toRgbString=function(){return e=Vs(this.rgba),r=e.r,i=e.g,n=e.b,(s=e.a)<1?"rgba("+r+", "+i+", "+n+", "+s+")":"rgb("+r+", "+i+", "+n+")";var e,r,i,n,s},t.prototype.toHsl=function(){return fu(ii(this.rgba))},t.prototype.toHslString=function(){return e=fu(ii(this.rgba)),r=e.h,i=e.s,n=e.l,(s=e.a)<1?"hsla("+r+", "+i+"%, "+n+"%, "+s+")":"hsl("+r+", "+i+"%, "+n+"%)";var e,r,i,n,s},t.prototype.toHsv=function(){return e=uu(this.rgba),{h:Pe(e.h),s:Pe(e.s),v:Pe(e.v),a:Pe(e.a,3)};var e},t.prototype.invert=function(){return vt({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),vt(Ws(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),vt(Ws(this.rgba,-e))},t.prototype.grayscale=function(){return vt(Ws(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),vt(mu(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),vt(mu(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?vt({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):Pe(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=ii(this.rgba);return typeof e=="number"?vt({h:e,s:r.s,l:r.l,a:r.a}):Pe(r.h)},t.prototype.isEqual=function(e){return this.toHex()===vt(e).toHex()},t}(),vt=function(t){return t instanceof Ys?t:new Ys(t)},gu=[],Lx=function(t){t.forEach(function(e){gu.indexOf(e)<0&&(e(Ys,Xs),gu.push(e))})};function Dx(t,e){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var n in r)i[r[n]]=n;var s={};t.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,u,h=i[this.toHex()];if(h)return h;if(a!=null&&a.closest){var d=this.toRgb(),l=1/0,c="black";if(!s.length)for(var f in r)s[f]=new t(r[f]).toRgb();for(var p in r){var m=(o=d,u=s[p],Math.pow(o.r-u.r,2)+Math.pow(o.g-u.g,2)+Math.pow(o.b-u.b,2));m<l&&(l=m,c=p)}return c}},e.string.push([function(a){var o=a.toLowerCase(),u=o==="transparent"?"#0000":r[o];return u?new t(u).toRgb():null},"name"])}Lx([Dx]);const Sr=class{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof Sr)this._value=this.cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,t))&&(this.normalize(t),this._value=this.cloneSource(t))}}get value(){return this._value}cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}isSourceEqual(t,e){const r=typeof t;if(r!==typeof e)return!1;if(r==="number"||r==="string"||t instanceof Number)return t===e;if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length!==e.length?!1:t.every((n,s)=>n===e[s]);if(t!==null&&e!==null){const n=Object.keys(t),s=Object.keys(e);return n.length!==s.length?!1:n.every(a=>t[a]===e[a])}return t===e}toRgba(){const[t,e,r,i]=this._components;return{r:t,g:e,b:r,a:i}}toRgb(){const[t,e,r]=this._components;return{r:t,g:e,b:r}}toRgbaString(){const[t,e,r]=this.toUint8RgbArray();return`rgba(${t},${e},${r},${this.alpha})`}toUint8RgbArray(t){const[e,r,i]=this._components;return t=t??[],t[0]=Math.round(e*255),t[1]=Math.round(r*255),t[2]=Math.round(i*255),t}toRgbArray(t){t=t??[];const[e,r,i]=this._components;return t[0]=e,t[1]=r,t[2]=i,t}toNumber(){return this._int}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[e,r,i,n]=Sr.temp.setValue(t)._components;return this._components[0]*=e,this._components[1]*=r,this._components[2]*=i,this._components[3]*=n,this.refreshInt(),this._value=null,this}premultiply(t,e=!0){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this.refreshInt(),this._value=null,this}toPremultiplied(t){if(t===1)return(t*255<<24)+this._int;if(t===0)return 0;let e=this._int>>16&255,r=this._int>>8&255,i=this._int&255;return e=e*t+.5|0,r=r*t+.5|0,i=i*t+.5|0,(t*255<<24)+(e<<16)+(r<<8)+i}toHex(){const t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(t){return this._components[3]=this._clamp(t),this}round(t){const[e,r,i]=this._components;return this._components[0]=Math.round(e*t)/t,this._components[1]=Math.round(r*t)/t,this._components[2]=Math.round(i*t)/t,this.refreshInt(),this._value=null,this}toArray(t){t=t??[];const[e,r,i,n]=this._components;return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t}normalize(t){let e;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const r=t;e=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4){t=this._clamp(t);const[r,i,n,s=1]=t;e=[r,i,n,s]}else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4){t=this._clamp(t,0,255);const[r,i,n,s=255]=t;e=[r/255,i/255,n/255,s/255]}else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const i=Sr.HEX_PATTERN.exec(t);i&&(t=`#${i[2]}`)}const r=vt(t);if(r.isValid()){const{r:i,g:n,b:s,a}=r.rgba;e=[i/255,n/255,s/255,a]}}if(e)this._components.set(e),this.refreshInt();else throw new Error(`Unable to convert color ${t}`)}refreshInt(){this._clamp(this._components);const[t,e,r]=this._components;this._int=(t*255<<16)+(e*255<<8)+(r*255|0)}_clamp(t,e=0,r=1){return typeof t=="number"?Math.min(Math.max(t,e),r):(t.forEach((i,n)=>{t[n]=Math.min(Math.max(i,e),r)}),t)}};let Le=Sr;Le.shared=new Sr,Le.temp=new Sr,Le.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function en(t,e=[]){return re("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Le.shared.setValue(t).toRgbArray(e)}function Ks(t){return re("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Le.shared.setValue(t).toNumber()}function Bx(){const t=[],e=[];for(let i=0;i<32;i++)t[i]=i,e[i]=i;t[j.NORMAL_NPM]=j.NORMAL,t[j.ADD_NPM]=j.ADD,t[j.SCREEN_NPM]=j.SCREEN,e[j.NORMAL]=j.NORMAL_NPM,e[j.ADD]=j.ADD_NPM,e[j.SCREEN]=j.SCREEN_NPM;const r=[];return r.push(e),r.push(t),r}const Ux=Bx();function vu(t){if(t.BYTES_PER_ELEMENT===4)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(t.BYTES_PER_ELEMENT===2){if(t instanceof Uint16Array)return"Uint16Array"}else if(t.BYTES_PER_ELEMENT===1&&t instanceof Uint8Array)return"Uint8Array";return null}function tn(t){return t+=t===0?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1}function _u(t){return!(t&t-1)&&!!t}function yu(t){let e=(t>65535?1:0)<<4;t>>>=e;let r=(t>255?1:0)<<3;return t>>>=r,e|=r,r=(t>15?1:0)<<2,t>>>=r,e|=r,r=(t>3?1:0)<<1,t>>>=r,e|=r,e|t>>1}function rn(t,e,r){const i=t.length;let n;if(e>=i||r===0)return;r=e+r>i?i-e:r;const s=i-r;for(n=e;n<s;++n)t[n]=t[n+r];t.length=s}let $x=0;function ni(){return++$x}const xu={},_t=Object.create(null),Ot=Object.create(null);let nn;function Gx(t,e=globalThis.location){if(t.startsWith("data:"))return"";e=e||globalThis.location,nn||(nn=document.createElement("a")),nn.href=t;const r=Cx.parse(nn.href),i=!r.port&&e.port===""||r.port===e.port;return r.hostname!==e.hostname||!i||r.protocol!==e.protocol?"anonymous":""}function bu(t,e=1){var i;const r=(i=Q.RETINA_PREFIX)==null?void 0:i.exec(t);return r?parseFloat(r[1]):e}var te=(t=>(t.Renderer="renderer",t.Application="application",t.RendererSystem="renderer-webgl-system",t.RendererPlugin="renderer-webgl-plugin",t.CanvasRendererSystem="renderer-canvas-system",t.CanvasRendererPlugin="renderer-canvas-plugin",t.Asset="asset",t.LoadParser="load-parser",t.ResolveParser="resolve-parser",t.CacheParser="cache-parser",t.DetectionParser="detection-parser",t))(te||{});const Zs=t=>{if(typeof t=="function"||typeof t=="object"&&t.extension){if(!t.extension)throw new Error("Extension class must have an extension object");t={...typeof t.extension!="object"?{type:t.extension}:t.extension,ref:t}}if(typeof t=="object")t={...t};else throw new Error("Invalid extension type");return typeof t.type=="string"&&(t.type=[t.type]),t},Tu=(t,e)=>Zs(t).priority??e,he={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(Zs).forEach(e=>{e.type.forEach(r=>{var i,n;return(n=(i=this._removeHandlers)[r])==null?void 0:n.call(i,e)})}),this},add(...t){return t.map(Zs).forEach(e=>{e.type.forEach(r=>{const i=this._addHandlers,n=this._queue;i[r]?i[r](e):(n[r]=n[r]||[],n[r].push(e))})}),this},handle(t,e,r){const i=this._addHandlers,n=this._removeHandlers;if(i[t]||n[t])throw new Error(`Extension type ${t} already has a handler`);i[t]=e,n[t]=r;const s=this._queue;return s[t]&&(s[t].forEach(a=>e(a)),delete s[t]),this},handleByMap(t,e){return this.handle(t,r=>{e[r.name]=r.ref},r=>{delete e[r.name]})},handleByList(t,e,r=-1){return this.handle(t,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((n,s)=>Tu(s,r)-Tu(n,r)))},i=>{const n=e.indexOf(i.ref);n!==-1&&e.splice(n,1)})}};class zx{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const jx=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
43
- `);function Hx(t){let e="";for(let r=0;r<t;++r)r>0&&(e+=`
44
- else `),r<t-1&&(e+=`if(test == ${r}.0){}`);return e}function Vx(t,e){if(t===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=e.createShader(e.FRAGMENT_SHADER);for(;;){const i=jx.replace(/%forloop%/gi,Hx(t));if(e.shaderSource(r,i),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))t=t/2|0;else break}return t}const Qs=0,Js=1,ea=2,ta=3,ra=4,ia=5;let sn=class Ph{constructor(){this.data=0,this.blendMode=j.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Qs)}set blend(e){!!(this.data&1<<Qs)!==e&&(this.data^=1<<Qs)}get offsets(){return!!(this.data&1<<Js)}set offsets(e){!!(this.data&1<<Js)!==e&&(this.data^=1<<Js)}get culling(){return!!(this.data&1<<ea)}set culling(e){!!(this.data&1<<ea)!==e&&(this.data^=1<<ea)}get depthTest(){return!!(this.data&1<<ta)}set depthTest(e){!!(this.data&1<<ta)!==e&&(this.data^=1<<ta)}get depthMask(){return!!(this.data&1<<ia)}set depthMask(e){!!(this.data&1<<ia)!==e&&(this.data^=1<<ia)}get clockwiseFrontFace(){return!!(this.data&1<<ra)}set clockwiseFrontFace(e){!!(this.data&1<<ra)!==e&&(this.data^=1<<ra)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==j.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const e=new Ph;return e.depthTest=!1,e.blend=!0,e}};const na=[];function wu(t,e){if(!t)return null;let r="";if(typeof t=="string"){const i=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);i&&(r=i[1].toLowerCase())}for(let i=na.length-1;i>=0;--i){const n=na[i];if(n.test&&n.test(t,r))return new n(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class et{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,r,i,n,s,a,o,u){if(arguments.length>8)throw new Error("max arguments reached");const{name:h,items:d}=this;this._aliasCount++;for(let l=0,c=d.length;l<c;l++)d[l][h](e,r,i,n,s,a,o,u);return d===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const r=this.items.indexOf(e);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(et.prototype,{dispatch:{value:et.prototype.emit},run:{value:et.prototype.emit}});class si{constructor(e=0,r=0){this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new et("setRealSize"),this.onUpdate=new et("update"),this.onError=new et("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,r){(e!==this._width||r!==this._height)&&(this._width=e,this._height=r,this.onResize.emit(e,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,r,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,r){return!1}}class sa extends si{constructor(e,r){const{width:i,height:n}=r||{};if(!i||!n)throw new Error("BufferResource width or height invalid");super(i,n),this.data=e}upload(e,r,i){const n=e.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Rt.UNPACK);const s=r.realWidth,a=r.realHeight;return i.width===s&&i.height===a?n.texSubImage2D(r.target,0,0,0,s,a,r.format,i.type,this.data):(i.width=s,i.height=a,n.texImage2D(r.target,0,i.internalFormat,s,a,0,r.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e instanceof Float32Array||e instanceof Uint8Array||e instanceof Uint32Array}}const Xx={scaleMode:dt.NEAREST,format:N.RGBA,alphaMode:Rt.NPM},Ar=class extends Bi{constructor(t=null,e=null){super(),e=Object.assign({},Ar.defaultOptions,e);const{alphaMode:r,mipmap:i,anisotropicLevel:n,scaleMode:s,width:a,height:o,wrapMode:u,format:h,type:d,target:l,resolution:c,resourceOptions:f}=e;t&&!(t instanceof si)&&(t=wu(t,f),t.internal=!0),this.resolution=c||Q.RESOLUTION,this.width=Math.round((a||0)*this.resolution)/this.resolution,this.height=Math.round((o||0)*this.resolution)/this.resolution,this._mipmap=i,this.anisotropicLevel=n,this._wrapMode=u,this._scaleMode=s,this.format=h,this.type=d,this.target=l,this.alphaMode=r,this.uid=ni(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&o>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(t)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(t){this._mipmap!==t&&(this._mipmap=t,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(t){this._scaleMode!==t&&(this._scaleMode=t,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(t){this._wrapMode!==t&&(this._wrapMode=t,this.dirtyStyleId++)}setStyle(t,e){let r;return t!==void 0&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),e!==void 0&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this}setSize(t,e,r){return r=r||this.resolution,this.setRealSize(t*r,e*r,r)}setRealSize(t,e,r){return this.resolution=r||this.resolution,this.width=Math.round(t)/this.resolution,this.height=Math.round(e)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=_u(this.realWidth)&&_u(this.realHeight)}setResolution(t){const e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=Math.round(this.width*e)/t,this.height=Math.round(this.height*e)/t,this.emit("update",this)),this._refreshPOT(),this)}setResource(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(t){this.emit("error",this,t)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Ot[this.cacheId],delete _t[this.cacheId],this.cacheId=null),this.dispose(),Ar.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(t,e,r=Q.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let n=null;if(i)n=t;else{if(!t._pixiId){const a=(e==null?void 0:e.pixiIdPrefix)||"pixiid";t._pixiId=`${a}_${ni()}`}n=t._pixiId}let s=Ot[n];if(i&&r&&!s)throw new Error(`The cacheId "${n}" does not exist in BaseTextureCache.`);return s||(s=new Ar(t,e),s.cacheId=n,Ar.addToCache(s,n)),s}static fromBuffer(t,e,r,i){t=t||new Float32Array(e*r*4);const n=new sa(t,{width:e,height:r}),s=t instanceof Float32Array?se.FLOAT:se.UNSIGNED_BYTE;return new Ar(n,Object.assign({},Xx,i||{width:e,height:r,type:s}))}static addToCache(t,e){e&&(t.textureCacheIds.includes(e)||t.textureCacheIds.push(e),Ot[e]&&Ot[e]!==t&&console.warn(`BaseTexture added to the cache with an id [${e}] that already had an entry`),Ot[e]=t)}static removeFromCache(t){if(typeof t=="string"){const e=Ot[t];if(e){const r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete Ot[t],e}}else if(t!=null&&t.textureCacheIds){for(let e=0;e<t.textureCacheIds.length;++e)delete Ot[t.textureCacheIds[e]];return t.textureCacheIds.length=0,t}return null}};let ae=Ar;ae.defaultOptions={mipmap:Gt.POW2,anisotropicLevel:0,scaleMode:dt.LINEAR,wrapMode:qr.CLAMP,alphaMode:Rt.UNPACK,target:fr.TEXTURE_2D,format:N.RGBA,type:se.UNSIGNED_BYTE},ae._globalBatch=0;class aa{constructor(){this.texArray=null,this.blend=0,this.type=It.TRIANGLES,this.start=0,this.size=0,this.data=null}}let Wx=0;class Be{constructor(e,r=!0,i=!1){this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=i,this.static=r,this.id=Wx++,this.disposeRunner=new et("disposeBuffer")}update(e){e instanceof Array&&(e=new Float32Array(e)),this.data=e||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(e){this.type=e?pt.ELEMENT_ARRAY_BUFFER:pt.ARRAY_BUFFER}get index(){return this.type===pt.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new Be(e)}}class an{constructor(e,r=0,i=!1,n=se.FLOAT,s,a,o,u=1){this.buffer=e,this.size=r,this.normalized=i,this.type=n,this.stride=s,this.start=a,this.instance=o,this.divisor=u}destroy(){this.buffer=null}static from(e,r,i,n,s){return new an(e,r,i,n,s)}}const qx={Float32Array,Uint32Array,Int32Array,Uint8Array};function Yx(t,e){let r=0,i=0;const n={};for(let u=0;u<t.length;u++)i+=e[u],r+=t[u].length;const s=new ArrayBuffer(r*4);let a=null,o=0;for(let u=0;u<t.length;u++){const h=e[u],d=t[u],l=vu(d);n[l]||(n[l]=new qx[l](s)),a=n[l];for(let c=0;c<d.length;c++){const f=(c/h|0)*i+o,p=c%h;a[f+p]=d[c]}o+=h}return new Float32Array(s)}const Su={5126:4,5123:2,5121:1};let Kx=0;const Zx={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class Er{constructor(e=[],r={}){this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=Kx++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new et("disposeGeometry"),this.refCount=0}addAttribute(e,r,i=0,n=!1,s,a,o,u=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Be||(r instanceof Array&&(r=new Float32Array(r)),r=new Be(r));const h=e.split("|");if(h.length>1){for(let l=0;l<h.length;l++)this.addAttribute(h[l],r,i,n,s);return this}let d=this.buffers.indexOf(r);return d===-1&&(this.buffers.push(r),d=this.buffers.length-1),this.attributes[e]=new an(d,i,n,s,a,o,u),this.instanced=this.instanced||u,this}getAttribute(e){return this.attributes[e]}getBuffer(e){return this.buffers[this.getAttribute(e).buffer]}addIndex(e){return e instanceof Be||(e instanceof Array&&(e=new Uint16Array(e)),e=new Be(e)),e.type=pt.ELEMENT_ARRAY_BUFFER,this.indexBuffer=e,this.buffers.includes(e)||this.buffers.push(e),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const e=[],r=[],i=new Be;let n;for(n in this.attributes){const s=this.attributes[n],a=this.buffers[s.buffer];e.push(a.data),r.push(s.size*Su[s.type]/4),s.buffer=0}for(i.data=Yx(e,r),n=0;n<this.buffers.length;n++)this.buffers[n]!==this.indexBuffer&&this.buffers[n].destroy();return this.buffers=[i],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const e in this.attributes){const r=this.attributes[e];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const e=new Er;for(let r=0;r<this.buffers.length;r++)e.buffers[r]=new Be(this.buffers[r].data.slice(0));for(const r in this.attributes){const i=this.attributes[r];e.attributes[r]=new an(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=pt.ELEMENT_ARRAY_BUFFER),e}static merge(e){const r=new Er,i=[],n=[],s=[];let a;for(let o=0;o<e.length;o++){a=e[o];for(let u=0;u<a.buffers.length;u++)n[u]=n[u]||0,n[u]+=a.buffers[u].data.length,s[u]=0}for(let o=0;o<a.buffers.length;o++)i[o]=new Zx[vu(a.buffers[o].data)](n[o]),r.buffers[o]=new Be(i[o]);for(let o=0;o<e.length;o++){a=e[o];for(let u=0;u<a.buffers.length;u++)i[u].set(a.buffers[u].data,s[u]),s[u]+=a.buffers[u].data.length}if(r.attributes=a.attributes,a.indexBuffer){r.indexBuffer=r.buffers[a.buffers.indexOf(a.indexBuffer)],r.indexBuffer.type=pt.ELEMENT_ARRAY_BUFFER;let o=0,u=0,h=0,d=0;for(let l=0;l<a.buffers.length;l++)if(a.buffers[l]!==a.indexBuffer){d=l;break}for(const l in a.attributes){const c=a.attributes[l];(c.buffer|0)===d&&(u+=c.size*Su[c.type]/4)}for(let l=0;l<e.length;l++){const c=e[l].indexBuffer.data;for(let f=0;f<c.length;f++)r.indexBuffer.data[f+h]+=o;o+=e[l].buffers[d].data.length/u,h+=c.length}}return r}}class Au extends Er{constructor(e=!1){super(),this._buffer=new Be(null,e,!1),this._indexBuffer=new Be(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,se.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,se.FLOAT).addAttribute("aColor",this._buffer,4,!0,se.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,se.FLOAT).addIndex(this._indexBuffer)}}const on=Math.PI*2,Qx=180/Math.PI,ai=Math.PI/180;var Me=(t=>(t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC",t))(Me||{});class me{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new me(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,r=e){return this.x=e,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const ln=[new me,new me,new me,new me];class de{constructor(e=0,r=0,i=0,n=0){this.x=Number(e),this.y=Number(r),this.width=Number(i),this.height=Number(n),this.type=Me.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new de(0,0,0,0)}clone(){return new de(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,r){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(e,r){if(!r){const S=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=S)return!1;const I=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>I}const i=this.left,n=this.right,s=this.top,a=this.bottom;if(n<=i||a<=s)return!1;const o=ln[0].set(e.left,e.top),u=ln[1].set(e.left,e.bottom),h=ln[2].set(e.right,e.top),d=ln[3].set(e.right,e.bottom);if(h.x<=o.x||u.y<=o.y)return!1;const l=Math.sign(r.a*r.d-r.b*r.c);if(l===0||(r.apply(o,o),r.apply(u,u),r.apply(h,h),r.apply(d,d),Math.max(o.x,u.x,h.x,d.x)<=i||Math.min(o.x,u.x,h.x,d.x)>=n||Math.max(o.y,u.y,h.y,d.y)<=s||Math.min(o.y,u.y,h.y,d.y)>=a))return!1;const c=l*(u.y-o.y),f=l*(o.x-u.x),p=c*i+f*s,m=c*n+f*s,v=c*i+f*a,g=c*n+f*a;if(Math.max(p,m,v,g)<=c*o.x+f*o.y||Math.min(p,m,v,g)>=c*d.x+f*d.y)return!1;const y=l*(o.y-h.y),_=l*(h.x-o.x),x=y*i+_*s,T=y*n+_*s,w=y*i+_*a,b=y*n+_*a;return!(Math.max(x,T,w,b)<=y*o.x+_*o.y||Math.min(x,T,w,b)>=y*d.x+_*d.y)}pad(e=0,r=e){return this.x-=e,this.y-=r,this.width+=e*2,this.height+=r*2,this}fit(e){const r=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),n=Math.max(this.y,e.y),s=Math.min(this.y+this.height,e.y+e.height);return this.x=r,this.width=Math.max(i-r,0),this.y=n,this.height=Math.max(s-n,0),this}ceil(e=1,r=.001){const i=Math.ceil((this.x+this.width-r)*e)/e,n=Math.ceil((this.y+this.height-r)*e)/e;return this.x=Math.floor((this.x+r)*e)/e,this.y=Math.floor((this.y+r)*e)/e,this.width=i-this.x,this.height=n-this.y,this}enlarge(e){const r=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),n=Math.min(this.y,e.y),s=Math.max(this.y+this.height,e.y+e.height);return this.x=r,this.width=i-r,this.y=n,this.height=s-n,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class oa{constructor(e=0,r=0,i=0){this.x=e,this.y=r,this.radius=i,this.type=Me.CIRC}clone(){return new oa(this.x,this.y,this.radius)}contains(e,r){if(this.radius<=0)return!1;const i=this.radius*this.radius;let n=this.x-e,s=this.y-r;return n*=n,s*=s,n+s<=i}getBounds(){return new de(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let Jx=class Mh{constructor(e=0,r=0,i=0,n=0){this.x=e,this.y=r,this.width=i,this.height=n,this.type=Me.ELIP}clone(){return new Mh(this.x,this.y,this.width,this.height)}contains(e,r){if(this.width<=0||this.height<=0)return!1;let i=(e-this.x)/this.width,n=(r-this.y)/this.height;return i*=i,n*=n,i+n<=1}getBounds(){return new de(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class oi{constructor(...e){let r=Array.isArray(e[0])?e[0]:e;if(typeof r[0]!="number"){const i=[];for(let n=0,s=r.length;n<s;n++)i.push(r[n].x,r[n].y);r=i}this.points=r,this.type=Me.POLY,this.closeStroke=!0}clone(){const e=this.points.slice(),r=new oi(e);return r.closeStroke=this.closeStroke,r}contains(e,r){let i=!1;const n=this.points.length/2;for(let s=0,a=n-1;s<n;a=s++){const o=this.points[s*2],u=this.points[s*2+1],h=this.points[a*2],d=this.points[a*2+1];u>r!=d>r&&e<(h-o)*((r-u)/(d-u))+o&&(i=!i)}return i}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((e,r)=>`${e}, ${r}`,"")}]`}}class la{constructor(e=0,r=0,i=0,n=0,s=20){this.x=e,this.y=r,this.width=i,this.height=n,this.radius=s,this.type=Me.RREC}clone(){return new la(this.x,this.y,this.width,this.height,this.radius)}contains(e,r){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+i&&r<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let n=e-(this.x+i),s=r-(this.y+i);const a=i*i;if(n*n+s*s<=a||(n=e-(this.x+this.width-i),n*n+s*s<=a)||(s=r-(this.y+this.height-i),n*n+s*s<=a)||(n=e-(this.x+i),n*n+s*s<=a))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let Ue=class $n{constructor(e=1,r=0,i=0,n=1,s=0,a=0){this.array=null,this.a=e,this.b=r,this.c=i,this.d=n,this.tx=s,this.ty=a}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,r,i,n,s,a){return this.a=e,this.b=r,this.c=i,this.d=n,this.tx=s,this.ty=a,this}toArray(e,r){this.array||(this.array=new Float32Array(9));const i=r||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,r){r=r||new me;const i=e.x,n=e.y;return r.x=this.a*i+this.c*n+this.tx,r.y=this.b*i+this.d*n+this.ty,r}applyInverse(e,r){r=r||new me;const i=1/(this.a*this.d+this.c*-this.b),n=e.x,s=e.y;return r.x=this.d*i*n+-this.c*i*s+(this.ty*this.c-this.tx*this.d)*i,r.y=this.a*i*s+-this.b*i*n+(-this.ty*this.a+this.tx*this.b)*i,r}translate(e,r){return this.tx+=e,this.ty+=r,this}scale(e,r){return this.a*=e,this.d*=r,this.c*=e,this.b*=r,this.tx*=e,this.ty*=r,this}rotate(e){const r=Math.cos(e),i=Math.sin(e),n=this.a,s=this.c,a=this.tx;return this.a=n*r-this.b*i,this.b=n*i+this.b*r,this.c=s*r-this.d*i,this.d=s*i+this.d*r,this.tx=a*r-this.ty*i,this.ty=a*i+this.ty*r,this}append(e){const r=this.a,i=this.b,n=this.c,s=this.d;return this.a=e.a*r+e.b*n,this.b=e.a*i+e.b*s,this.c=e.c*r+e.d*n,this.d=e.c*i+e.d*s,this.tx=e.tx*r+e.ty*n+this.tx,this.ty=e.tx*i+e.ty*s+this.ty,this}setTransform(e,r,i,n,s,a,o,u,h){return this.a=Math.cos(o+h)*s,this.b=Math.sin(o+h)*s,this.c=-Math.sin(o-u)*a,this.d=Math.cos(o-u)*a,this.tx=e-(i*this.a+n*this.c),this.ty=r-(i*this.b+n*this.d),this}prepend(e){const r=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,n=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=n*e.a+this.d*e.c,this.d=n*e.b+this.d*e.d}return this.tx=r*e.a+this.ty*e.c+e.tx,this.ty=r*e.b+this.ty*e.d+e.ty,this}decompose(e){const r=this.a,i=this.b,n=this.c,s=this.d,a=e.pivot,o=-Math.atan2(-n,s),u=Math.atan2(i,r),h=Math.abs(o+u);return h<1e-5||Math.abs(on-h)<1e-5?(e.rotation=u,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=u),e.scale.x=Math.sqrt(r*r+i*i),e.scale.y=Math.sqrt(n*n+s*s),e.position.x=this.tx+(a.x*r+a.y*n),e.position.y=this.ty+(a.x*i+a.y*s),e}invert(){const e=this.a,r=this.b,i=this.c,n=this.d,s=this.tx,a=e*n-r*i;return this.a=n/a,this.b=-r/a,this.c=-i/a,this.d=e/a,this.tx=(i*this.ty-n*s)/a,this.ty=-(e*this.ty-r*s)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new $n;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new $n}static get TEMP_MATRIX(){return new $n}};const Wt=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],qt=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Yt=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Kt=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],ua=[],Eu=[],un=Math.sign;function eb(){for(let t=0;t<16;t++){const e=[];ua.push(e);for(let r=0;r<16;r++){const i=un(Wt[t]*Wt[r]+Yt[t]*qt[r]),n=un(qt[t]*Wt[r]+Kt[t]*qt[r]),s=un(Wt[t]*Yt[r]+Yt[t]*Kt[r]),a=un(qt[t]*Yt[r]+Kt[t]*Kt[r]);for(let o=0;o<16;o++)if(Wt[o]===i&&qt[o]===n&&Yt[o]===s&&Kt[o]===a){e.push(o);break}}}for(let t=0;t<16;t++){const e=new Ue;e.set(Wt[t],qt[t],Yt[t],Kt[t],0,0),Eu.push(e)}}eb();const be={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:t=>Wt[t],uY:t=>qt[t],vX:t=>Yt[t],vY:t=>Kt[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>ua[t][e],sub:(t,e)=>ua[t][be.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?be.S:be.N:Math.abs(e)*2<=Math.abs(t)?t>0?be.E:be.W:e>0?t>0?be.SE:be.SW:t>0?be.NE:be.NW,matrixAppendRotationInv:(t,e,r=0,i=0)=>{const n=Eu[be.inv(e)];n.tx=r,n.ty=i,t.append(n)}};class Zt{constructor(e,r,i=0,n=0){this._x=i,this._y=n,this.cb=e,this.scope=r}clone(e=this.cb,r=this.scope){return new Zt(e,r,this._x,this._y)}set(e=0,r=e){return(this._x!==e||this._y!==r)&&(this._x=e,this._y=r,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}const Cu=class{constructor(){this.worldTransform=new Ue,this.localTransform=new Ue,this.position=new Zt(this.onChange,this,0,0),this.scale=new Zt(this.onChange,this,1,1),this.pivot=new Zt(this.onChange,this,0,0),this.skew=new Zt(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(t){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){const r=t.worldTransform,i=this.worldTransform;i.a=e.a*r.a+e.b*r.c,i.b=e.a*r.b+e.b*r.d,i.c=e.c*r.a+e.d*r.c,i.d=e.c*r.b+e.d*r.d,i.tx=e.tx*r.a+e.ty*r.c+r.tx,i.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}}setFromMatrix(t){t.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())}};let ca=Cu;ca.IDENTITY=new Cu;var tb=`varying vec2 vTextureCoord;
33
+ */var gsap,_win,_splitColor,_PIXI,PropTween,_getSetter,_isV4,_windowExists=function(){return typeof window<"u"},_getGSAP=function(){return gsap||_windowExists()&&(gsap=window.gsap)&&gsap.registerPlugin&&gsap},_isFunction=function(E){return typeof E=="function"},_warn=function(E){return console.warn(E)},_idMatrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],_lumR=.212671,_lumG=.71516,_lumB=.072169,_applyMatrix=function(E,I){var B=[],U=0,V=0,X,Y;for(X=0;X<4;X++){for(Y=0;Y<5;Y++)V=Y===4?E[U+4]:0,B[U+Y]=E[U]*I[Y]+E[U+1]*I[Y+5]+E[U+2]*I[Y+10]+E[U+3]*I[Y+15]+V;U+=5}return B},_setSaturation=function(E,I){var B=1-I,U=B*_lumR,V=B*_lumG,X=B*_lumB;return _applyMatrix([U+I,V,X,0,0,U,V+I,X,0,0,U,V,X+I,0,0,0,0,0,1,0],E)},_colorize=function(E,I,B){var U=_splitColor(I),V=U[0]/255,X=U[1]/255,Y=U[2]/255,K=1-B;return _applyMatrix([K+B*V*_lumR,B*V*_lumG,B*V*_lumB,0,0,B*X*_lumR,K+B*X*_lumG,B*X*_lumB,0,0,B*Y*_lumR,B*Y*_lumG,K+B*Y*_lumB,0,0,0,0,0,1,0],E)},_setHue=function(E,I){I*=Math.PI/180;var B=Math.cos(I),U=Math.sin(I);return _applyMatrix([_lumR+B*(1-_lumR)+U*-_lumR,_lumG+B*-_lumG+U*-_lumG,_lumB+B*-_lumB+U*(1-_lumB),0,0,_lumR+B*-_lumR+U*.143,_lumG+B*(1-_lumG)+U*.14,_lumB+B*-_lumB+U*-.283,0,0,_lumR+B*-_lumR+U*-(1-_lumR),_lumG+B*-_lumG+U*_lumG,_lumB+B*(1-_lumB)+U*_lumB,0,0,0,0,0,1,0,0,0,0,0,1],E)},_setContrast=function(E,I){return _applyMatrix([I,0,0,0,.5*(1-I),0,I,0,0,.5*(1-I),0,0,I,0,.5*(1-I),0,0,0,1,0],E)},_getFilter=function(E,I){var B=_PIXI.filters[I],U=E.filters||[],V=U.length,X;for(B||_warn(I+" not found. PixiPlugin.registerPIXI(PIXI)");--V>-1;)if(U[V]instanceof B)return U[V];return X=new B,I==="BlurFilter"&&(X.blur=0),U.push(X),E.filters=U,X},_addColorMatrixFilterCacheTween=function(E,I,B,U){I.add(B,E,B[E],U[E]),I._props.push(E)},_applyBrightnessToMatrix=function(E,I){var B=new _PIXI.filters.ColorMatrixFilter;return B.matrix=I,B.brightness(E,!0),B.matrix},_copy=function(E){var I={},B;for(B in E)I[B]=E[B];return I},_CMFdefaults={contrast:1,saturation:1,colorizeAmount:0,colorize:"rgb(255,255,255)",hue:0,brightness:1},_parseColorMatrixFilter=function(E,I,B){var U=_getFilter(E,"ColorMatrixFilter"),V=E._gsColorMatrixFilter=E._gsColorMatrixFilter||_copy(_CMFdefaults),X=I.combineCMF&&!("colorMatrixFilter"in I&&!I.colorMatrixFilter),Y,K,J;for(J=U.matrix,I.resolution&&(U.resolution=I.resolution),I.matrix&&I.matrix.length===J.length?(K=I.matrix,V.contrast!==1&&_addColorMatrixFilterCacheTween("contrast",B,V,_CMFdefaults),V.hue&&_addColorMatrixFilterCacheTween("hue",B,V,_CMFdefaults),V.brightness!==1&&_addColorMatrixFilterCacheTween("brightness",B,V,_CMFdefaults),V.colorizeAmount&&(_addColorMatrixFilterCacheTween("colorize",B,V,_CMFdefaults),_addColorMatrixFilterCacheTween("colorizeAmount",B,V,_CMFdefaults)),V.saturation!==1&&_addColorMatrixFilterCacheTween("saturation",B,V,_CMFdefaults)):(K=_idMatrix.slice(),I.contrast!=null?(K=_setContrast(K,+I.contrast),_addColorMatrixFilterCacheTween("contrast",B,V,I)):V.contrast!==1&&(X?K=_setContrast(K,V.contrast):_addColorMatrixFilterCacheTween("contrast",B,V,_CMFdefaults)),I.hue!=null?(K=_setHue(K,+I.hue),_addColorMatrixFilterCacheTween("hue",B,V,I)):V.hue&&(X?K=_setHue(K,V.hue):_addColorMatrixFilterCacheTween("hue",B,V,_CMFdefaults)),I.brightness!=null?(K=_applyBrightnessToMatrix(+I.brightness,K),_addColorMatrixFilterCacheTween("brightness",B,V,I)):V.brightness!==1&&(X?K=_applyBrightnessToMatrix(V.brightness,K):_addColorMatrixFilterCacheTween("brightness",B,V,_CMFdefaults)),I.colorize!=null?(I.colorizeAmount="colorizeAmount"in I?+I.colorizeAmount:1,K=_colorize(K,I.colorize,I.colorizeAmount),_addColorMatrixFilterCacheTween("colorize",B,V,I),_addColorMatrixFilterCacheTween("colorizeAmount",B,V,I)):V.colorizeAmount&&(X?K=_colorize(K,V.colorize,V.colorizeAmount):(_addColorMatrixFilterCacheTween("colorize",B,V,_CMFdefaults),_addColorMatrixFilterCacheTween("colorizeAmount",B,V,_CMFdefaults))),I.saturation!=null?(K=_setSaturation(K,+I.saturation),_addColorMatrixFilterCacheTween("saturation",B,V,I)):V.saturation!==1&&(X?K=_setSaturation(K,V.saturation):_addColorMatrixFilterCacheTween("saturation",B,V,_CMFdefaults))),Y=K.length;--Y>-1;)K[Y]!==J[Y]&&B.add(J,Y,J[Y],K[Y],"colorMatrixFilter");B._props.push("colorMatrixFilter")},_renderColor=function(E,I){var B=I.t,U=I.p,V=I.color,X=I.set;X(B,U,V[0]<<16|V[1]<<8|V[2])},_renderDirtyCache=function(E,I){var B=I.g;B&&(B.dirty++,B.clearDirty++)},_renderAutoAlpha=function(E,I){I.t.visible=!!I.t.alpha},_addColorTween=function(E,I,B,U){var V=E[I],X=_splitColor(_isFunction(V)?E[I.indexOf("set")||!_isFunction(E["get"+I.substr(3)])?I:"get"+I.substr(3)]():V),Y=_splitColor(B);U._pt=new PropTween(U._pt,E,I,0,0,_renderColor,{t:E,p:I,color:X,set:_getSetter(E,I)}),U.add(X,0,X[0],Y[0]),U.add(X,1,X[1],Y[1]),U.add(X,2,X[2],Y[2])},_colorProps={tint:1,lineColor:1,fillColor:1},_xyContexts="position,scale,skew,pivot,anchor,tilePosition,tileScale".split(","),_contexts={x:"position",y:"position",tileX:"tilePosition",tileY:"tilePosition"},_colorMatrixFilterProps={colorMatrixFilter:1,saturation:1,contrast:1,hue:1,colorize:1,colorizeAmount:1,brightness:1,combineCMF:1},_DEG2RAD=Math.PI/180,_isString=function(E){return typeof E=="string"},_degreesToRadians=function(E){return _isString(E)&&E.charAt(1)==="="?E.substr(0,2)+parseFloat(E.substr(2))*_DEG2RAD:E*_DEG2RAD},_renderPropWithEnd=function(E,I){return I.set(I.t,I.p,E===1?I.e:Math.round((I.s+I.c*E)*1e5)/1e5,I)},_addRotationalPropTween=function(E,I,B,U,V,X){var Y=360*(X?_DEG2RAD:1),K=_isString(V),J=K&&V.charAt(1)==="="?+(V.charAt(0)+"1"):0,xe=parseFloat(J?V.substr(2):V)*(X?_DEG2RAD:1),Z=J?xe*J:xe-U,_e=U+Z,Se,Ee;return K&&(Se=V.split("_")[1],Se==="short"&&(Z%=Y,Z!==Z%(Y/2)&&(Z+=Z<0?Y:-Y)),Se==="cw"&&Z<0?Z=(Z+Y*1e10)%Y-~~(Z/Y)*Y:Se==="ccw"&&Z>0&&(Z=(Z-Y*1e10)%Y-~~(Z/Y)*Y)),E._pt=Ee=new PropTween(E._pt,I,B,U,Z,_renderPropWithEnd),Ee.e=_e,Ee},_initCore=function(){_windowExists()&&(_win=window,gsap=_getGSAP(),_PIXI=_PIXI||_win.PIXI,_isV4=_PIXI&&_PIXI.VERSION&&_PIXI.VERSION.charAt(0)==="4",_splitColor=function(I){return gsap.utils.splitColor((I+"").substr(0,2)==="0x"?"#"+I.substr(2):I)})},i$7,p$3;for(i$7=0;i$7<_xyContexts.length;i$7++)p$3=_xyContexts[i$7],_contexts[p$3+"X"]=p$3,_contexts[p$3+"Y"]=p$3;var PixiPlugin={version:"3.11.5",name:"pixi",register:function(E,I,B){gsap=E,PropTween=B,_getSetter=I.getSetter,_initCore()},registerPIXI:function(E){_PIXI=E},init:function(E,I,B,U,V){if(_PIXI||_initCore(),!_PIXI||!(E instanceof _PIXI.DisplayObject))return console.warn(E,"is not a DisplayObject or PIXI was not found. PixiPlugin.registerPIXI(PIXI);"),!1;var X,Y,K,J,xe,Z,_e,Se,Ee;for(Z in I){if(X=_contexts[Z],K=I[Z],X)Y=~Z.charAt(Z.length-1).toLowerCase().indexOf("x")?"x":"y",this.add(E[X],Y,E[X][Y],X==="skew"?_degreesToRadians(K):K,0,0,0,0,0,1);else if(Z==="scale"||Z==="anchor"||Z==="pivot"||Z==="tileScale")this.add(E[Z],"x",E[Z].x,K),this.add(E[Z],"y",E[Z].y,K);else if(Z==="rotation"||Z==="angle")_addRotationalPropTween(this,E,Z,E[Z],K,Z==="rotation");else if(_colorMatrixFilterProps[Z])J||(_parseColorMatrixFilter(E,I.colorMatrixFilter||I,this),J=!0);else if(Z==="blur"||Z==="blurX"||Z==="blurY"||Z==="blurPadding"){if(xe=_getFilter(E,"BlurFilter"),this.add(xe,Z,xe[Z],K),I.blurPadding!==0)for(_e=I.blurPadding||Math.max(xe[Z],K)*2,Se=E.filters.length;--Se>-1;)E.filters[Se].padding=Math.max(E.filters[Se].padding,_e)}else if(_colorProps[Z])if((Z==="lineColor"||Z==="fillColor")&&E instanceof _PIXI.Graphics)for(Ee=(E.geometry||E).graphicsData,this._pt=new PropTween(this._pt,E,Z,0,0,_renderDirtyCache,{g:E.geometry||E}),Se=Ee.length;--Se>-1;)_addColorTween(_isV4?Ee[Se]:Ee[Se][Z.substr(0,4)+"Style"],_isV4?Z:"color",K,this);else _addColorTween(E,Z,K,this);else Z==="autoAlpha"?(this._pt=new PropTween(this._pt,E,"visible",0,0,_renderAutoAlpha),this.add(E,"alpha",E.alpha,K),this._props.push("alpha","visible")):Z!=="resolution"&&this.add(E,Z,"get",K);this._props.push(Z)}}};_getGSAP()&&gsap.registerPlugin(PixiPlugin),gsap$2.registerPlugin(PixiPlugin),PixiPlugin.registerPIXI(PIXI__namespace),gsap$2.registerPlugin(CustomEase),CustomEase.create("springBounce","0.32, 1.06, 0.61, 0.93"),gsap$2.registerEffect({name:"PULSE",effect(C,E){return gsap$2.timeline().fromTo(C,{pixi:{scaleX:.9,scaleY:.9}},{pixi:{scaleX:1.2,scaleY:1.2},duration:.5,ease:"slow"}).to(C,{pixi:{scaleX:1,scaleY:1,...E},duration:.5})}}),gsap$2.registerEffect({name:"SHAKE",effect(C,E){return gsap$2.timeline().to(C,{duration:.1,pixi:{x:"+=5"}}).to(C,{duration:.1,pixi:{x:"-=10"}}).to(C,{duration:.1,pixi:{x:"+=10"}}).to(C,{duration:.1,pixi:{x:"-=10"}}).to(C,{duration:.1,pixi:{x:"+=5"}}).to(C,{pixi:{...E},duration:.5})}}),gsap$2.registerEffect({name:"SWING",effect(C,E){return gsap$2.timeline().to(C,{duration:.5,pixi:{rotation:1}}).to(C,{duration:.5,pixi:{rotation:-1.5}}).to(C,{pixi:{rotation:0,...E},duration:.5})}}),gsap$2.registerEffect({name:"JELLO",effect(C,E){return gsap$2.timeline().to(C,{duration:.3,pixi:{scaleX:.5,rotation:-1}}).to(C,{duration:.4,pixi:{scaleX:1.5,rotation:1}}).to(C,{duration:.3,pixi:{scaleX:1,rotation:0}}).to(C,{pixi:{rotation:0,...E},duration:.5})}}),gsap$2.registerEffect({name:"WOOBLE",effect(C,E){return gsap$2.timeline().to(C,{duration:.3,pixi:{scaleX:.5,x:E.x*-.5}}).to(C,{duration:.3,pixi:{scaleX:1.5,x:E.x*1.5}}).to(C,{duration:.3,pixi:{scaleX:.5,x:E.x*-.01}}).to(C,{duration:.3,pixi:{scaleX:1,x:E.x}}).to(C,{rotation:0,pixi:{...E,rotation:0},duration:.5})}}),gsap$2.registerEffect({name:"NONE",effect(C,E){return gsap$2.timeline().to(C,{duration:0})}}),gsap$2.registerEffect({name:"FLASH",effect(C,E){return gsap$2.timeline().to(C,{duration:.2,alpha:0}).to(C,{duration:.2,alpha:1}).to(C,{duration:.2,alpha:0}).to(C,{duration:.2,alpha:1}).to(C,{duration:.2,alpha:0}).to(C,{duration:.2,alpha:1,...E})}}),gsap$2.registerEffect({name:"BOUNCE_IN",effect(C,E){return gsap$2.timeline().fromTo(C,{pixi:{scaleX:1.5,scaleY:1.5}},{...E,pixi:{x:E==null?void 0:E.x,y:E==null?void 0:E.y,scaleX:1,scaleY:1},duration:2,ease:"bounce.out"})}}),gsap$2.registerEffect({name:"BOUNCE_IN_DOWN",effect(C,E){return gsap$2.timeline().from(C,{duration:2,ease:"bounce.out",immediateRender:!0,pixi:{...E,x:E==null?void 0:E.x,y:-2500,alpha:0}})}}),gsap$2.registerEffect({name:"BOUNCE_IN_LEFT",effect(C,E){return gsap$2.timeline().from(C,{ease:"bounce.out",duration:2,pixi:{...E,x:-1500,alpha:0}})}}),gsap$2.registerEffect({name:"BOUNCE_IN_RIGHT",effect(C,E){const I=Math.max(1e3,(E==null?void 0:E.maxX)+500);return gsap$2.timeline().from(C,{ease:"bounce.out",duration:2,pixi:{...E,x:I}})}}),gsap$2.registerEffect({name:"BOUNCE_IN_UP",effect(C,E){return gsap$2.timeline().from(C,{ease:"bounce.out",pixi:{...E,y:2e3},duration:2})}}),gsap$2.registerEffect({name:"BOUNCE_OUT",effect(C,E){return gsap$2.timeline().from(C,{...E,ease:"bounce.in",pixi:{y:2e3},duration:1.5})}}),gsap$2.registerEffect({name:"FADE_IN",effect(C){return gsap$2.timeline().fromTo(C,{alpha:0},{ease:"power4.in",alpha:1,duration:1})}}),gsap$2.registerEffect({name:"FADE_IN_DOWN",effect(C,E){return gsap$2.timeline().fromTo(C,{pixi:{y:-1500,alpha:0}},{duration:1,ease:"power4.in",pixi:{y:0,alpha:1,...E}})}}),gsap$2.registerEffect({name:"FADE_IN_LEFT",effect(C,E){return gsap$2.timeline().fromTo(C,{pixi:{alpha:0,x:-2e3}},{ease:"power4.in",pixi:{x:0,alpha:1,...E},duration:1})}}),gsap$2.registerEffect({name:"FADE_IN_RIGHT",effect(C,E){return gsap$2.fromTo(C,{pixi:{x:2e3,alpha:0}},{duration:1,ease:"power4.in",pixi:{x:0,alpha:1,...E}})}}),gsap$2.registerEffect({name:"FADE_IN_UP",effect(C,E){return gsap$2.fromTo(C,{pixi:{y:2e3,alpha:0}},{duration:.8,ease:"power4.in",pixi:{y:0,alpha:1,...E}})}}),gsap$2.registerEffect({name:"SPIN",effect(C){return gsap$2.to(C,{rotation:(E,I)=>gsap$2.utils.snap(360,Number(gsap$2.getProperty(I,"rotation"))+360)})}});function useGsapEffect(){return{updateEffect:React.useCallback((E,I,B)=>gsap$2.effects[I]&&E?gsap$2.effects[I](E,B):gsap$2.effects.NONE(E,B),[])}}var Animations=(C=>(C.NONE="NONE",C.FLASH="FLASH",C.PULSE="PULSE",C.SHAKE="SHAKE",C.SWING="SWING",C.JELLO="JELLO",C.WOOBLE="WOOBLE",C.FADE_IN="FADE_IN",C.FADE_OUT="FADE_OUT",C.FADE_IN_OUT="FADE_IN_OUT",C.SLIDE_IN_LEFT="SLIDE_IN_LEFT",C.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",C.SLIDE_IN_TOP="SLIDE_IN_TOP",C.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",C.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",C.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",C.SLIDE_OUT_TOP="SLIDE_OUT_TOP",C.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",C.ZOOM_IN="ZOOM_IN",C.ZOOM_OUT="ZOOM_OUT",C.ZOOM_IN_OUT="ZOOM_IN_OUT",C.BOUNCE_IN="BOUNCE_IN",C.BOUNCE_OUT="BOUNCE_OUT",C.BOUNCE_IN_OUT="BOUNCE_IN_OUT",C.BOUNCE_IN_DOWN="BOUNCE_IN_DOWN",C.BOUNCE_IN_LEFT="BOUNCE_IN_LEFT",C.BOUNCE_IN_RIGHT="BOUNCE_IN_RIGHT",C.BOUNCE_IN_UP="BOUNCE_IN_UP",C.BOUNCE_OUT_DOWN="BOUNCE_OUT_DOWN",C.BOUNCE_OUT_LEFT="BOUNCE_OUT_LEFT",C.BOUNCE_OUT_RIGHT="BOUNCE_OUT_RIGHT",C.BOUNCE_OUT_UP="BOUNCE_OUT_UP",C.FADE_IN_DOWN="FADE_IN_DOWN",C.FADE_IN_LEFT="FADE_IN_LEFT",C.FADE_IN_RIGHT="FADE_IN_RIGHT",C.FADE_IN_UP="FADE_IN_UP",C.FADE_OUT_DOWN="FADE_OUT_DOWN",C.FADE_OUT_LEFT="FADE_OUT_LEFT",C.FADE_OUT_RIGHT="FADE_OUT_RIGHT",C.FADE_OUT_UP="FADE_OUT_UP",C.ELASTIC_IN="ELASTIC_IN",C.ELASTIC_OUT="ELASTIC_OUT",C.ELASTIC_IN_OUT="ELASTIC_IN_OUT",C.BACK_IN="BACK_IN",C.BACK_OUT="BACK_OUT",C.BACK_IN_OUT="BACK_IN_OUT",C.CIRCULAR_IN="CIRCULAR_IN",C.CIRCULAR_OUT="CIRCULAR_OUT",C.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",C.EXPO_IN="EXPO_IN",C.EXPO_OUT="EXPO_OUT",C.EXPO_IN_OUT="EXPO_IN_OUT",C.SINE_IN="SINE_IN",C.SINE_OUT="SINE_OUT",C.SINE_IN_OUT="SINE_IN_OUT",C.BOUNCE="BOUNCE",C.ELASTIC="ELASTIC",C.BACK="BACK",C.CIRCULAR="CIRCULAR",C.EXPO="EXPO",C.SINE="SINE",C.SPIN="SPIN",C))(Animations||{}),createRoot,m$4=require$$0$1;createRoot=m$4.createRoot,m$4.hydrateRoot;var ENV=(C=>(C[C.WEBGL_LEGACY=0]="WEBGL_LEGACY",C[C.WEBGL=1]="WEBGL",C[C.WEBGL2=2]="WEBGL2",C))(ENV||{}),RENDERER_TYPE=(C=>(C[C.UNKNOWN=0]="UNKNOWN",C[C.WEBGL=1]="WEBGL",C[C.CANVAS=2]="CANVAS",C))(RENDERER_TYPE||{}),BUFFER_BITS=(C=>(C[C.COLOR=16384]="COLOR",C[C.DEPTH=256]="DEPTH",C[C.STENCIL=1024]="STENCIL",C))(BUFFER_BITS||{}),BLEND_MODES=(C=>(C[C.NORMAL=0]="NORMAL",C[C.ADD=1]="ADD",C[C.MULTIPLY=2]="MULTIPLY",C[C.SCREEN=3]="SCREEN",C[C.OVERLAY=4]="OVERLAY",C[C.DARKEN=5]="DARKEN",C[C.LIGHTEN=6]="LIGHTEN",C[C.COLOR_DODGE=7]="COLOR_DODGE",C[C.COLOR_BURN=8]="COLOR_BURN",C[C.HARD_LIGHT=9]="HARD_LIGHT",C[C.SOFT_LIGHT=10]="SOFT_LIGHT",C[C.DIFFERENCE=11]="DIFFERENCE",C[C.EXCLUSION=12]="EXCLUSION",C[C.HUE=13]="HUE",C[C.SATURATION=14]="SATURATION",C[C.COLOR=15]="COLOR",C[C.LUMINOSITY=16]="LUMINOSITY",C[C.NORMAL_NPM=17]="NORMAL_NPM",C[C.ADD_NPM=18]="ADD_NPM",C[C.SCREEN_NPM=19]="SCREEN_NPM",C[C.NONE=20]="NONE",C[C.SRC_OVER=0]="SRC_OVER",C[C.SRC_IN=21]="SRC_IN",C[C.SRC_OUT=22]="SRC_OUT",C[C.SRC_ATOP=23]="SRC_ATOP",C[C.DST_OVER=24]="DST_OVER",C[C.DST_IN=25]="DST_IN",C[C.DST_OUT=26]="DST_OUT",C[C.DST_ATOP=27]="DST_ATOP",C[C.ERASE=26]="ERASE",C[C.SUBTRACT=28]="SUBTRACT",C[C.XOR=29]="XOR",C))(BLEND_MODES||{}),DRAW_MODES=(C=>(C[C.POINTS=0]="POINTS",C[C.LINES=1]="LINES",C[C.LINE_LOOP=2]="LINE_LOOP",C[C.LINE_STRIP=3]="LINE_STRIP",C[C.TRIANGLES=4]="TRIANGLES",C[C.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",C[C.TRIANGLE_FAN=6]="TRIANGLE_FAN",C))(DRAW_MODES||{}),FORMATS=(C=>(C[C.RGBA=6408]="RGBA",C[C.RGB=6407]="RGB",C[C.RG=33319]="RG",C[C.RED=6403]="RED",C[C.RGBA_INTEGER=36249]="RGBA_INTEGER",C[C.RGB_INTEGER=36248]="RGB_INTEGER",C[C.RG_INTEGER=33320]="RG_INTEGER",C[C.RED_INTEGER=36244]="RED_INTEGER",C[C.ALPHA=6406]="ALPHA",C[C.LUMINANCE=6409]="LUMINANCE",C[C.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",C[C.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",C[C.DEPTH_STENCIL=34041]="DEPTH_STENCIL",C))(FORMATS||{}),TARGETS=(C=>(C[C.TEXTURE_2D=3553]="TEXTURE_2D",C[C.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",C[C.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",C[C.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",C[C.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",C[C.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",C[C.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",C[C.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",C[C.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",C))(TARGETS||{}),TYPES=(C=>(C[C.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",C[C.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",C[C.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",C[C.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",C[C.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",C[C.UNSIGNED_INT=5125]="UNSIGNED_INT",C[C.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",C[C.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",C[C.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",C[C.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",C[C.BYTE=5120]="BYTE",C[C.SHORT=5122]="SHORT",C[C.INT=5124]="INT",C[C.FLOAT=5126]="FLOAT",C[C.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",C[C.HALF_FLOAT=36193]="HALF_FLOAT",C))(TYPES||{}),SAMPLER_TYPES=(C=>(C[C.FLOAT=0]="FLOAT",C[C.INT=1]="INT",C[C.UINT=2]="UINT",C))(SAMPLER_TYPES||{}),SCALE_MODES=(C=>(C[C.NEAREST=0]="NEAREST",C[C.LINEAR=1]="LINEAR",C))(SCALE_MODES||{}),WRAP_MODES=(C=>(C[C.CLAMP=33071]="CLAMP",C[C.REPEAT=10497]="REPEAT",C[C.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",C))(WRAP_MODES||{}),MIPMAP_MODES=(C=>(C[C.OFF=0]="OFF",C[C.POW2=1]="POW2",C[C.ON=2]="ON",C[C.ON_MANUAL=3]="ON_MANUAL",C))(MIPMAP_MODES||{}),ALPHA_MODES=(C=>(C[C.NPM=0]="NPM",C[C.UNPACK=1]="UNPACK",C[C.PMA=2]="PMA",C[C.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",C[C.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",C[C.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",C))(ALPHA_MODES||{}),CLEAR_MODES=(C=>(C[C.NO=0]="NO",C[C.YES=1]="YES",C[C.AUTO=2]="AUTO",C[C.BLEND=0]="BLEND",C[C.CLEAR=1]="CLEAR",C[C.BLIT=2]="BLIT",C))(CLEAR_MODES||{}),GC_MODES=(C=>(C[C.AUTO=0]="AUTO",C[C.MANUAL=1]="MANUAL",C))(GC_MODES||{}),PRECISION=(C=>(C.LOW="lowp",C.MEDIUM="mediump",C.HIGH="highp",C))(PRECISION||{}),MASK_TYPES=(C=>(C[C.NONE=0]="NONE",C[C.SCISSOR=1]="SCISSOR",C[C.STENCIL=2]="STENCIL",C[C.SPRITE=3]="SPRITE",C[C.COLOR=4]="COLOR",C))(MASK_TYPES||{}),MSAA_QUALITY=(C=>(C[C.NONE=0]="NONE",C[C.LOW=2]="LOW",C[C.MEDIUM=4]="MEDIUM",C[C.HIGH=8]="HIGH",C))(MSAA_QUALITY||{}),BUFFER_TYPE=(C=>(C[C.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",C[C.ARRAY_BUFFER=34962]="ARRAY_BUFFER",C[C.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",C))(BUFFER_TYPE||{});const BrowserAdapter={createCanvas:(C,E)=>{const I=document.createElement("canvas");return I.width=C,I.height=E,I},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(C,E)=>fetch(C,E),parseXML:C=>new DOMParser().parseFromString(C,"text/xml")},settings={ADAPTER:BrowserAdapter,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var appleIphone=/iPhone/i,appleIpod=/iPod/i,appleTablet=/iPad/i,appleUniversal=/\biOS-universal(?:.+)Mac\b/i,androidPhone=/\bAndroid(?:.+)Mobile\b/i,androidTablet=/Android/i,amazonPhone=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,amazonTablet=/Silk/i,windowsPhone=/Windows Phone/i,windowsTablet=/\bWindows(?:.+)ARM\b/i,otherBlackBerry=/BlackBerry/i,otherBlackBerry10=/BB10/i,otherOpera=/Opera Mini/i,otherChrome=/\b(CriOS|Chrome)(?:.+)Mobile/i,otherFirefox=/Mobile(?:.+)Firefox\b/i,isAppleTabletOnIos13=function(C){return typeof C<"u"&&C.platform==="MacIntel"&&typeof C.maxTouchPoints=="number"&&C.maxTouchPoints>1&&typeof MSStream>"u"};function createMatch(C){return function(E){return E.test(C)}}function isMobile$1(C){var E={userAgent:"",platform:"",maxTouchPoints:0};!C&&typeof navigator<"u"?E={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof C=="string"?E.userAgent=C:C&&C.userAgent&&(E={userAgent:C.userAgent,platform:C.platform,maxTouchPoints:C.maxTouchPoints||0});var I=E.userAgent,B=I.split("[FBAN");typeof B[1]<"u"&&(I=B[0]),B=I.split("Twitter"),typeof B[1]<"u"&&(I=B[0]);var U=createMatch(I),V={apple:{phone:U(appleIphone)&&!U(windowsPhone),ipod:U(appleIpod),tablet:!U(appleIphone)&&(U(appleTablet)||isAppleTabletOnIos13(E))&&!U(windowsPhone),universal:U(appleUniversal),device:(U(appleIphone)||U(appleIpod)||U(appleTablet)||U(appleUniversal)||isAppleTabletOnIos13(E))&&!U(windowsPhone)},amazon:{phone:U(amazonPhone),tablet:!U(amazonPhone)&&U(amazonTablet),device:U(amazonPhone)||U(amazonTablet)},android:{phone:!U(windowsPhone)&&U(amazonPhone)||!U(windowsPhone)&&U(androidPhone),tablet:!U(windowsPhone)&&!U(amazonPhone)&&!U(androidPhone)&&(U(amazonTablet)||U(androidTablet)),device:!U(windowsPhone)&&(U(amazonPhone)||U(amazonTablet)||U(androidPhone)||U(androidTablet))||U(/\bokhttp\b/i)},windows:{phone:U(windowsPhone),tablet:U(windowsTablet),device:U(windowsPhone)||U(windowsTablet)},other:{blackberry:U(otherBlackBerry),blackberry10:U(otherBlackBerry10),opera:U(otherOpera),firefox:U(otherFirefox),chrome:U(otherChrome),device:U(otherBlackBerry)||U(otherBlackBerry10)||U(otherOpera)||U(otherFirefox)||U(otherChrome)},any:!1,phone:!1,tablet:!1};return V.any=V.apple.device||V.android.device||V.windows.device||V.other.device,V.phone=V.apple.phone||V.android.phone||V.windows.phone,V.tablet=V.apple.tablet||V.android.tablet||V.windows.tablet,V}const isMobileCall=isMobile$1.default??isMobile$1,isMobile=isMobileCall(globalThis.navigator);settings.RETINA_PREFIX=/@([0-9\.]+)x/,settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var eventemitter3={exports:{}};(function(C){var E=Object.prototype.hasOwnProperty,I="~";function B(){}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(I=!1));function U(K,J,xe){this.fn=K,this.context=J,this.once=xe||!1}function V(K,J,xe,Z,_e){if(typeof xe!="function")throw new TypeError("The listener must be a function");var Se=new U(xe,Z||K,_e),Ee=I?I+J:J;return K._events[Ee]?K._events[Ee].fn?K._events[Ee]=[K._events[Ee],Se]:K._events[Ee].push(Se):(K._events[Ee]=Se,K._eventsCount++),K}function X(K,J){--K._eventsCount===0?K._events=new B:delete K._events[J]}function Y(){this._events=new B,this._eventsCount=0}Y.prototype.eventNames=function(){var J=[],xe,Z;if(this._eventsCount===0)return J;for(Z in xe=this._events)E.call(xe,Z)&&J.push(I?Z.slice(1):Z);return Object.getOwnPropertySymbols?J.concat(Object.getOwnPropertySymbols(xe)):J},Y.prototype.listeners=function(J){var xe=I?I+J:J,Z=this._events[xe];if(!Z)return[];if(Z.fn)return[Z.fn];for(var _e=0,Se=Z.length,Ee=new Array(Se);_e<Se;_e++)Ee[_e]=Z[_e].fn;return Ee},Y.prototype.listenerCount=function(J){var xe=I?I+J:J,Z=this._events[xe];return Z?Z.fn?1:Z.length:0},Y.prototype.emit=function(J,xe,Z,_e,Se,Ee){var Ae=I?I+J:J;if(!this._events[Ae])return!1;var Re=this._events[Ae],Te=arguments.length,we,Pe;if(Re.fn){switch(Re.once&&this.removeListener(J,Re.fn,void 0,!0),Te){case 1:return Re.fn.call(Re.context),!0;case 2:return Re.fn.call(Re.context,xe),!0;case 3:return Re.fn.call(Re.context,xe,Z),!0;case 4:return Re.fn.call(Re.context,xe,Z,_e),!0;case 5:return Re.fn.call(Re.context,xe,Z,_e,Se),!0;case 6:return Re.fn.call(Re.context,xe,Z,_e,Se,Ee),!0}for(Pe=1,we=new Array(Te-1);Pe<Te;Pe++)we[Pe-1]=arguments[Pe];Re.fn.apply(Re.context,we)}else{var Ie=Re.length,Me;for(Pe=0;Pe<Ie;Pe++)switch(Re[Pe].once&&this.removeListener(J,Re[Pe].fn,void 0,!0),Te){case 1:Re[Pe].fn.call(Re[Pe].context);break;case 2:Re[Pe].fn.call(Re[Pe].context,xe);break;case 3:Re[Pe].fn.call(Re[Pe].context,xe,Z);break;case 4:Re[Pe].fn.call(Re[Pe].context,xe,Z,_e);break;default:if(!we)for(Me=1,we=new Array(Te-1);Me<Te;Me++)we[Me-1]=arguments[Me];Re[Pe].fn.apply(Re[Pe].context,we)}}return!0},Y.prototype.on=function(J,xe,Z){return V(this,J,xe,Z,!1)},Y.prototype.once=function(J,xe,Z){return V(this,J,xe,Z,!0)},Y.prototype.removeListener=function(J,xe,Z,_e){var Se=I?I+J:J;if(!this._events[Se])return this;if(!xe)return X(this,Se),this;var Ee=this._events[Se];if(Ee.fn)Ee.fn===xe&&(!_e||Ee.once)&&(!Z||Ee.context===Z)&&X(this,Se);else{for(var Ae=0,Re=[],Te=Ee.length;Ae<Te;Ae++)(Ee[Ae].fn!==xe||_e&&!Ee[Ae].once||Z&&Ee[Ae].context!==Z)&&Re.push(Ee[Ae]);Re.length?this._events[Se]=Re.length===1?Re[0]:Re:X(this,Se)}return this},Y.prototype.removeAllListeners=function(J){var xe;return J?(xe=I?I+J:J,this._events[xe]&&X(this,xe)):(this._events=new B,this._eventsCount=0),this},Y.prototype.off=Y.prototype.removeListener,Y.prototype.addListener=Y.prototype.on,Y.prefixed=I,Y.EventEmitter=Y,C.exports=Y})(eventemitter3);var eventemitter3Exports=eventemitter3.exports;const EventEmitter=getDefaultExportFromCjs(eventemitter3Exports);var earcut$2={exports:{}};earcut$2.exports=earcut,earcut$2.exports.default=earcut;function earcut(C,E,I){I=I||2;var B=E&&E.length,U=B?E[0]*I:C.length,V=linkedList(C,0,U,I,!0),X=[];if(!V||V.next===V.prev)return X;var Y,K,J,xe,Z,_e,Se;if(B&&(V=eliminateHoles(C,E,V,I)),C.length>80*I){Y=J=C[0],K=xe=C[1];for(var Ee=I;Ee<U;Ee+=I)Z=C[Ee],_e=C[Ee+1],Z<Y&&(Y=Z),_e<K&&(K=_e),Z>J&&(J=Z),_e>xe&&(xe=_e);Se=Math.max(J-Y,xe-K),Se=Se!==0?32767/Se:0}return earcutLinked(V,X,I,Y,K,Se,0),X}function linkedList(C,E,I,B,U){var V,X;if(U===signedArea(C,E,I,B)>0)for(V=E;V<I;V+=B)X=insertNode(V,C[V],C[V+1],X);else for(V=I-B;V>=E;V-=B)X=insertNode(V,C[V],C[V+1],X);return X&&equals(X,X.next)&&(removeNode(X),X=X.next),X}function filterPoints(C,E){if(!C)return C;E||(E=C);var I=C,B;do if(B=!1,!I.steiner&&(equals(I,I.next)||area(I.prev,I,I.next)===0)){if(removeNode(I),I=E=I.prev,I===I.next)break;B=!0}else I=I.next;while(B||I!==E);return E}function earcutLinked(C,E,I,B,U,V,X){if(C){!X&&V&&indexCurve(C,B,U,V);for(var Y=C,K,J;C.prev!==C.next;){if(K=C.prev,J=C.next,V?isEarHashed(C,B,U,V):isEar(C)){E.push(K.i/I|0),E.push(C.i/I|0),E.push(J.i/I|0),removeNode(C),C=J.next,Y=J.next;continue}if(C=J,C===Y){X?X===1?(C=cureLocalIntersections(filterPoints(C),E,I),earcutLinked(C,E,I,B,U,V,2)):X===2&&splitEarcut(C,E,I,B,U,V):earcutLinked(filterPoints(C),E,I,B,U,V,1);break}}}}function isEar(C){var E=C.prev,I=C,B=C.next;if(area(E,I,B)>=0)return!1;for(var U=E.x,V=I.x,X=B.x,Y=E.y,K=I.y,J=B.y,xe=U<V?U<X?U:X:V<X?V:X,Z=Y<K?Y<J?Y:J:K<J?K:J,_e=U>V?U>X?U:X:V>X?V:X,Se=Y>K?Y>J?Y:J:K>J?K:J,Ee=B.next;Ee!==E;){if(Ee.x>=xe&&Ee.x<=_e&&Ee.y>=Z&&Ee.y<=Se&&pointInTriangle(U,Y,V,K,X,J,Ee.x,Ee.y)&&area(Ee.prev,Ee,Ee.next)>=0)return!1;Ee=Ee.next}return!0}function isEarHashed(C,E,I,B){var U=C.prev,V=C,X=C.next;if(area(U,V,X)>=0)return!1;for(var Y=U.x,K=V.x,J=X.x,xe=U.y,Z=V.y,_e=X.y,Se=Y<K?Y<J?Y:J:K<J?K:J,Ee=xe<Z?xe<_e?xe:_e:Z<_e?Z:_e,Ae=Y>K?Y>J?Y:J:K>J?K:J,Re=xe>Z?xe>_e?xe:_e:Z>_e?Z:_e,Te=zOrder(Se,Ee,E,I,B),we=zOrder(Ae,Re,E,I,B),Pe=C.prevZ,Ie=C.nextZ;Pe&&Pe.z>=Te&&Ie&&Ie.z<=we;){if(Pe.x>=Se&&Pe.x<=Ae&&Pe.y>=Ee&&Pe.y<=Re&&Pe!==U&&Pe!==X&&pointInTriangle(Y,xe,K,Z,J,_e,Pe.x,Pe.y)&&area(Pe.prev,Pe,Pe.next)>=0||(Pe=Pe.prevZ,Ie.x>=Se&&Ie.x<=Ae&&Ie.y>=Ee&&Ie.y<=Re&&Ie!==U&&Ie!==X&&pointInTriangle(Y,xe,K,Z,J,_e,Ie.x,Ie.y)&&area(Ie.prev,Ie,Ie.next)>=0))return!1;Ie=Ie.nextZ}for(;Pe&&Pe.z>=Te;){if(Pe.x>=Se&&Pe.x<=Ae&&Pe.y>=Ee&&Pe.y<=Re&&Pe!==U&&Pe!==X&&pointInTriangle(Y,xe,K,Z,J,_e,Pe.x,Pe.y)&&area(Pe.prev,Pe,Pe.next)>=0)return!1;Pe=Pe.prevZ}for(;Ie&&Ie.z<=we;){if(Ie.x>=Se&&Ie.x<=Ae&&Ie.y>=Ee&&Ie.y<=Re&&Ie!==U&&Ie!==X&&pointInTriangle(Y,xe,K,Z,J,_e,Ie.x,Ie.y)&&area(Ie.prev,Ie,Ie.next)>=0)return!1;Ie=Ie.nextZ}return!0}function cureLocalIntersections(C,E,I){var B=C;do{var U=B.prev,V=B.next.next;!equals(U,V)&&intersects(U,B,B.next,V)&&locallyInside(U,V)&&locallyInside(V,U)&&(E.push(U.i/I|0),E.push(B.i/I|0),E.push(V.i/I|0),removeNode(B),removeNode(B.next),B=C=V),B=B.next}while(B!==C);return filterPoints(B)}function splitEarcut(C,E,I,B,U,V){var X=C;do{for(var Y=X.next.next;Y!==X.prev;){if(X.i!==Y.i&&isValidDiagonal(X,Y)){var K=splitPolygon(X,Y);X=filterPoints(X,X.next),K=filterPoints(K,K.next),earcutLinked(X,E,I,B,U,V,0),earcutLinked(K,E,I,B,U,V,0);return}Y=Y.next}X=X.next}while(X!==C)}function eliminateHoles(C,E,I,B){var U=[],V,X,Y,K,J;for(V=0,X=E.length;V<X;V++)Y=E[V]*B,K=V<X-1?E[V+1]*B:C.length,J=linkedList(C,Y,K,B,!1),J===J.next&&(J.steiner=!0),U.push(getLeftmost(J));for(U.sort(compareX),V=0;V<U.length;V++)I=eliminateHole(U[V],I);return I}function compareX(C,E){return C.x-E.x}function eliminateHole(C,E){var I=findHoleBridge(C,E);if(!I)return E;var B=splitPolygon(I,C);return filterPoints(B,B.next),filterPoints(I,I.next)}function findHoleBridge(C,E){var I=E,B=C.x,U=C.y,V=-1/0,X;do{if(U<=I.y&&U>=I.next.y&&I.next.y!==I.y){var Y=I.x+(U-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Y<=B&&Y>V&&(V=Y,X=I.x<I.next.x?I:I.next,Y===B))return X}I=I.next}while(I!==E);if(!X)return null;var K=X,J=X.x,xe=X.y,Z=1/0,_e;I=X;do B>=I.x&&I.x>=J&&B!==I.x&&pointInTriangle(U<xe?B:V,U,J,xe,U<xe?V:B,U,I.x,I.y)&&(_e=Math.abs(U-I.y)/(B-I.x),locallyInside(I,C)&&(_e<Z||_e===Z&&(I.x>X.x||I.x===X.x&&sectorContainsSector(X,I)))&&(X=I,Z=_e)),I=I.next;while(I!==K);return X}function sectorContainsSector(C,E){return area(C.prev,C,E.prev)<0&&area(E.next,C,C.next)<0}function indexCurve(C,E,I,B){var U=C;do U.z===0&&(U.z=zOrder(U.x,U.y,E,I,B)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==C);U.prevZ.nextZ=null,U.prevZ=null,sortLinked(U)}function sortLinked(C){var E,I,B,U,V,X,Y,K,J=1;do{for(I=C,C=null,V=null,X=0;I;){for(X++,B=I,Y=0,E=0;E<J&&(Y++,B=B.nextZ,!!B);E++);for(K=J;Y>0||K>0&&B;)Y!==0&&(K===0||!B||I.z<=B.z)?(U=I,I=I.nextZ,Y--):(U=B,B=B.nextZ,K--),V?V.nextZ=U:C=U,U.prevZ=V,V=U;I=B}V.nextZ=null,J*=2}while(X>1);return C}function zOrder(C,E,I,B,U){return C=(C-I)*U|0,E=(E-B)*U|0,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,C|E<<1}function getLeftmost(C){var E=C,I=C;do(E.x<I.x||E.x===I.x&&E.y<I.y)&&(I=E),E=E.next;while(E!==C);return I}function pointInTriangle(C,E,I,B,U,V,X,Y){return(U-X)*(E-Y)>=(C-X)*(V-Y)&&(C-X)*(B-Y)>=(I-X)*(E-Y)&&(I-X)*(V-Y)>=(U-X)*(B-Y)}function isValidDiagonal(C,E){return C.next.i!==E.i&&C.prev.i!==E.i&&!intersectsPolygon(C,E)&&(locallyInside(C,E)&&locallyInside(E,C)&&middleInside(C,E)&&(area(C.prev,C,E.prev)||area(C,E.prev,E))||equals(C,E)&&area(C.prev,C,C.next)>0&&area(E.prev,E,E.next)>0)}function area(C,E,I){return(E.y-C.y)*(I.x-E.x)-(E.x-C.x)*(I.y-E.y)}function equals(C,E){return C.x===E.x&&C.y===E.y}function intersects(C,E,I,B){var U=sign(area(C,E,I)),V=sign(area(C,E,B)),X=sign(area(I,B,C)),Y=sign(area(I,B,E));return!!(U!==V&&X!==Y||U===0&&onSegment(C,I,E)||V===0&&onSegment(C,B,E)||X===0&&onSegment(I,C,B)||Y===0&&onSegment(I,E,B))}function onSegment(C,E,I){return E.x<=Math.max(C.x,I.x)&&E.x>=Math.min(C.x,I.x)&&E.y<=Math.max(C.y,I.y)&&E.y>=Math.min(C.y,I.y)}function sign(C){return C>0?1:C<0?-1:0}function intersectsPolygon(C,E){var I=C;do{if(I.i!==C.i&&I.next.i!==C.i&&I.i!==E.i&&I.next.i!==E.i&&intersects(I,I.next,C,E))return!0;I=I.next}while(I!==C);return!1}function locallyInside(C,E){return area(C.prev,C,C.next)<0?area(C,E,C.next)>=0&&area(C,C.prev,E)>=0:area(C,E,C.prev)<0||area(C,C.next,E)<0}function middleInside(C,E){var I=C,B=!1,U=(C.x+E.x)/2,V=(C.y+E.y)/2;do I.y>V!=I.next.y>V&&I.next.y!==I.y&&U<(I.next.x-I.x)*(V-I.y)/(I.next.y-I.y)+I.x&&(B=!B),I=I.next;while(I!==C);return B}function splitPolygon(C,E){var I=new Node$1(C.i,C.x,C.y),B=new Node$1(E.i,E.x,E.y),U=C.next,V=E.prev;return C.next=E,E.prev=C,I.next=U,U.prev=I,B.next=I,I.prev=B,V.next=B,B.prev=V,B}function insertNode(C,E,I,B){var U=new Node$1(C,E,I);return B?(U.next=B.next,U.prev=B,B.next.prev=U,B.next=U):(U.prev=U,U.next=U),U}function removeNode(C){C.next.prev=C.prev,C.prev.next=C.next,C.prevZ&&(C.prevZ.nextZ=C.nextZ),C.nextZ&&(C.nextZ.prevZ=C.prevZ)}function Node$1(C,E,I){this.i=C,this.x=E,this.y=I,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}earcut.deviation=function(C,E,I,B){var U=E&&E.length,V=U?E[0]*I:C.length,X=Math.abs(signedArea(C,0,V,I));if(U)for(var Y=0,K=E.length;Y<K;Y++){var J=E[Y]*I,xe=Y<K-1?E[Y+1]*I:C.length;X-=Math.abs(signedArea(C,J,xe,I))}var Z=0;for(Y=0;Y<B.length;Y+=3){var _e=B[Y]*I,Se=B[Y+1]*I,Ee=B[Y+2]*I;Z+=Math.abs((C[_e]-C[Ee])*(C[Se+1]-C[_e+1])-(C[_e]-C[Se])*(C[Ee+1]-C[_e+1]))}return X===0&&Z===0?0:Math.abs((Z-X)/X)};function signedArea(C,E,I,B){for(var U=0,V=E,X=I-B;V<I;V+=B)U+=(C[X]-C[V])*(C[V+1]+C[X+1]),X=V;return U}earcut.flatten=function(C){for(var E=C[0][0].length,I={vertices:[],holes:[],dimensions:E},B=0,U=0;U<C.length;U++){for(var V=0;V<C[U].length;V++)for(var X=0;X<E;X++)I.vertices.push(C[U][V][X]);U>0&&(B+=C[U-1].length,I.holes.push(B))}return I};var earcutExports=earcut$2.exports;const earcut$1=getDefaultExportFromCjs(earcutExports);var punycode$1={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */punycode$1.exports,function(C,E){(function(I){var B=E&&!E.nodeType&&E,U=C&&!C.nodeType&&C,V=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1;(V.global===V||V.window===V||V.self===V)&&(I=V);var X,Y=2147483647,K=36,J=1,xe=26,Z=38,_e=700,Se=72,Ee=128,Ae="-",Re=/^xn--/,Te=/[^\x20-\x7E]/,we=/[\x2E\u3002\uFF0E\uFF61]/g,Pe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ie=K-J,Me=Math.floor,Oe=String.fromCharCode,Le;function Ne(Ge){throw new RangeError(Pe[Ge])}function Ve(Ge,Be){for(var qe=Ge.length,Ke=[];qe--;)Ke[qe]=Be(Ge[qe]);return Ke}function Xe(Ge,Be){var qe=Ge.split("@"),Ke="";qe.length>1&&(Ke=qe[0]+"@",Ge=qe[1]),Ge=Ge.replace(we,".");var Ye=Ge.split("."),Qe=Ve(Ye,Be).join(".");return Ke+Qe}function Ue(Ge){for(var Be=[],qe=0,Ke=Ge.length,Ye,Qe;qe<Ke;)Ye=Ge.charCodeAt(qe++),Ye>=55296&&Ye<=56319&&qe<Ke?(Qe=Ge.charCodeAt(qe++),(Qe&64512)==56320?Be.push(((Ye&1023)<<10)+(Qe&1023)+65536):(Be.push(Ye),qe--)):Be.push(Ye);return Be}function We(Ge){return Ve(Ge,function(Be){var qe="";return Be>65535&&(Be-=65536,qe+=Oe(Be>>>10&1023|55296),Be=56320|Be&1023),qe+=Oe(Be),qe}).join("")}function ze(Ge){return Ge-48<10?Ge-22:Ge-65<26?Ge-65:Ge-97<26?Ge-97:K}function He(Ge,Be){return Ge+22+75*(Ge<26)-((Be!=0)<<5)}function je(Ge,Be,qe){var Ke=0;for(Ge=qe?Me(Ge/_e):Ge>>1,Ge+=Me(Ge/Be);Ge>Ie*xe>>1;Ke+=K)Ge=Me(Ge/Ie);return Me(Ke+(Ie+1)*Ge/(Ge+Z))}function $e(Ge){var Be=[],qe=Ge.length,Ke,Ye=0,Qe=Ee,Ze=Se,it,at,st,Je,et,nt,rt,tt,ot;for(it=Ge.lastIndexOf(Ae),it<0&&(it=0),at=0;at<it;++at)Ge.charCodeAt(at)>=128&&Ne("not-basic"),Be.push(Ge.charCodeAt(at));for(st=it>0?it+1:0;st<qe;){for(Je=Ye,et=1,nt=K;st>=qe&&Ne("invalid-input"),rt=ze(Ge.charCodeAt(st++)),(rt>=K||rt>Me((Y-Ye)/et))&&Ne("overflow"),Ye+=rt*et,tt=nt<=Ze?J:nt>=Ze+xe?xe:nt-Ze,!(rt<tt);nt+=K)ot=K-tt,et>Me(Y/ot)&&Ne("overflow"),et*=ot;Ke=Be.length+1,Ze=je(Ye-Je,Ke,Je==0),Me(Ye/Ke)>Y-Qe&&Ne("overflow"),Qe+=Me(Ye/Ke),Ye%=Ke,Be.splice(Ye++,0,Qe)}return We(Be)}function De(Ge){var Be,qe,Ke,Ye,Qe,Ze,it,at,st,Je,et,nt=[],rt,tt,ot,ut;for(Ge=Ue(Ge),rt=Ge.length,Be=Ee,qe=0,Qe=Se,Ze=0;Ze<rt;++Ze)et=Ge[Ze],et<128&&nt.push(Oe(et));for(Ke=Ye=nt.length,Ye&&nt.push(Ae);Ke<rt;){for(it=Y,Ze=0;Ze<rt;++Ze)et=Ge[Ze],et>=Be&&et<it&&(it=et);for(tt=Ke+1,it-Be>Me((Y-qe)/tt)&&Ne("overflow"),qe+=(it-Be)*tt,Be=it,Ze=0;Ze<rt;++Ze)if(et=Ge[Ze],et<Be&&++qe>Y&&Ne("overflow"),et==Be){for(at=qe,st=K;Je=st<=Qe?J:st>=Qe+xe?xe:st-Qe,!(at<Je);st+=K)ut=at-Je,ot=K-Je,nt.push(Oe(He(Je+ut%ot,0))),at=Me(ut/ot);nt.push(Oe(He(at,0))),Qe=je(qe,tt,Ke==Ye),qe=0,++Ke}++qe,++Be}return nt.join("")}function Fe(Ge){return Xe(Ge,function(Be){return Re.test(Be)?$e(Be.slice(4).toLowerCase()):Be})}function ke(Ge){return Xe(Ge,function(Be){return Te.test(Be)?"xn--"+De(Be):Be})}if(X={version:"1.4.1",ucs2:{decode:Ue,encode:We},decode:$e,encode:De,toASCII:ke,toUnicode:Fe},B&&U)if(C.exports==B)U.exports=X;else for(Le in X)X.hasOwnProperty(Le)&&(B[Le]=X[Le]);else I.punycode=X})(commonjsGlobal$1)}(punycode$1,punycode$1.exports);var punycodeExports=punycode$1.exports,shams=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var E={},I=Symbol("test"),B=Object(I);if(typeof I=="string"||Object.prototype.toString.call(I)!=="[object Symbol]"||Object.prototype.toString.call(B)!=="[object Symbol]")return!1;var U=42;E[I]=U;for(I in E)return!1;if(typeof Object.keys=="function"&&Object.keys(E).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(E).length!==0)return!1;var V=Object.getOwnPropertySymbols(E);if(V.length!==1||V[0]!==I||!Object.prototype.propertyIsEnumerable.call(E,I))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var X=Object.getOwnPropertyDescriptor(E,I);if(X.value!==U||X.enumerable!==!0)return!1}return!0},origSymbol=typeof Symbol<"u"&&Symbol,hasSymbolSham=shams,hasSymbols$1=function(){return typeof origSymbol!="function"||typeof Symbol!="function"||typeof origSymbol("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hasSymbolSham()},test={foo:{}},$Object=Object,hasProto$1=function(){return{__proto__:test}.foo===test.foo&&!({__proto__:null}instanceof $Object)},ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice=Array.prototype.slice,toStr$1=Object.prototype.toString,funcType="[object Function]",implementation$1=function(E){var I=this;if(typeof I!="function"||toStr$1.call(I)!==funcType)throw new TypeError(ERROR_MESSAGE+I);for(var B=slice.call(arguments,1),U,V=function(){if(this instanceof U){var xe=I.apply(this,B.concat(slice.call(arguments)));return Object(xe)===xe?xe:this}else return I.apply(E,B.concat(slice.call(arguments)))},X=Math.max(0,I.length-B.length),Y=[],K=0;K<X;K++)Y.push("$"+K);if(U=Function("binder","return function ("+Y.join(",")+"){ return binder.apply(this,arguments); }")(V),I.prototype){var J=function(){};J.prototype=I.prototype,U.prototype=new J,J.prototype=null}return U},implementation=implementation$1,functionBind=Function.prototype.bind||implementation,bind$1=functionBind,src=bind$1.call(Function.call,Object.prototype.hasOwnProperty),undefined$1,$SyntaxError=SyntaxError,$Function=Function,$TypeError$1=TypeError,getEvalledConstructor=function(C){try{return $Function('"use strict"; return ('+C+").constructor;")()}catch{}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch{$gOPD=null}var throwTypeError=function(){throw new $TypeError$1},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch{try{return $gOPD(arguments,"callee").get}catch{return throwTypeError}}}():throwTypeError,hasSymbols=hasSymbols$1(),hasProto=hasProto$1(),getProto=Object.getPrototypeOf||(hasProto?function(C){return C.__proto__}:null),needsEval={},TypedArray=typeof Uint8Array>"u"||!getProto?undefined$1:getProto(Uint8Array),INTRINSICS={"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols||!getProto?undefined$1:getProto(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols||!getProto?undefined$1:getProto(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$1,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet};if(getProto)try{null.error}catch(C){var errorProto=getProto(getProto(C));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function C(E){var I;if(E==="%AsyncFunction%")I=getEvalledConstructor("async function () {}");else if(E==="%GeneratorFunction%")I=getEvalledConstructor("function* () {}");else if(E==="%AsyncGeneratorFunction%")I=getEvalledConstructor("async function* () {}");else if(E==="%AsyncGenerator%"){var B=C("%AsyncGeneratorFunction%");B&&(I=B.prototype)}else if(E==="%AsyncIteratorPrototype%"){var U=C("%AsyncGenerator%");U&&getProto&&(I=getProto(U.prototype))}return INTRINSICS[E]=I,I},LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=functionBind,hasOwn$1=src,$concat$1=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace$1=bind.call(Function.call,String.prototype.replace),$strSlice=bind.call(Function.call,String.prototype.slice),$exec=bind.call(Function.call,RegExp.prototype.exec),rePropName$1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar$1=/\\(\\)?/g,stringToPath$2=function(E){var I=$strSlice(E,0,1),B=$strSlice(E,-1);if(I==="%"&&B!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&I!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var U=[];return $replace$1(E,rePropName$1,function(V,X,Y,K){U[U.length]=Y?$replace$1(K,reEscapeChar$1,"$1"):X||V}),U},getBaseIntrinsic=function(E,I){var B=E,U;if(hasOwn$1(LEGACY_ALIASES,B)&&(U=LEGACY_ALIASES[B],B="%"+U[0]+"%"),hasOwn$1(INTRINSICS,B)){var V=INTRINSICS[B];if(V===needsEval&&(V=doEval(B)),typeof V>"u"&&!I)throw new $TypeError$1("intrinsic "+E+" exists, but is not available. Please file an issue!");return{alias:U,name:B,value:V}}throw new $SyntaxError("intrinsic "+E+" does not exist!")},getIntrinsic=function(E,I){if(typeof E!="string"||E.length===0)throw new $TypeError$1("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof I!="boolean")throw new $TypeError$1('"allowMissing" argument must be a boolean');if($exec(/^%?[^%]*%?$/,E)===null)throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=stringToPath$2(E),U=B.length>0?B[0]:"",V=getBaseIntrinsic("%"+U+"%",I),X=V.name,Y=V.value,K=!1,J=V.alias;J&&(U=J[0],$spliceApply(B,$concat$1([0,1],J)));for(var xe=1,Z=!0;xe<B.length;xe+=1){var _e=B[xe],Se=$strSlice(_e,0,1),Ee=$strSlice(_e,-1);if((Se==='"'||Se==="'"||Se==="`"||Ee==='"'||Ee==="'"||Ee==="`")&&Se!==Ee)throw new $SyntaxError("property names with quotes must have matching quotes");if((_e==="constructor"||!Z)&&(K=!0),U+="."+_e,X="%"+U+"%",hasOwn$1(INTRINSICS,X))Y=INTRINSICS[X];else if(Y!=null){if(!(_e in Y)){if(!I)throw new $TypeError$1("base intrinsic for "+E+" exists, but the property is not available.");return}if($gOPD&&xe+1>=B.length){var Ae=$gOPD(Y,_e);Z=!!Ae,Z&&"get"in Ae&&!("originalValue"in Ae.get)?Y=Ae.get:Y=Y[_e]}else Z=hasOwn$1(Y,_e),Y=Y[_e];Z&&!K&&(INTRINSICS[X]=Y)}}return Y},callBind$1={exports:{}};(function(C){var E=functionBind,I=getIntrinsic,B=I("%Function.prototype.apply%"),U=I("%Function.prototype.call%"),V=I("%Reflect.apply%",!0)||E.call(U,B),X=I("%Object.getOwnPropertyDescriptor%",!0),Y=I("%Object.defineProperty%",!0),K=I("%Math.max%");if(Y)try{Y({},"a",{value:1})}catch{Y=null}C.exports=function(Z){var _e=V(E,U,arguments);if(X&&Y){var Se=X(_e,"length");Se.configurable&&Y(_e,"length",{value:1+K(0,Z.length-(arguments.length-1))})}return _e};var J=function(){return V(E,B,arguments)};Y?Y(C.exports,"apply",{value:J}):C.exports.apply=J})(callBind$1);var callBindExports=callBind$1.exports,GetIntrinsic$1=getIntrinsic,callBind=callBindExports,$indexOf=callBind(GetIntrinsic$1("String.prototype.indexOf")),callBound$1=function(E,I){var B=GetIntrinsic$1(E,!!I);return typeof B=="function"&&$indexOf(E,".prototype.")>-1?callBind(B):B};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(__viteBrowserExternal$1);var hasMap=typeof Map=="function"&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize$1=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get=="function"?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet=typeof Set=="function"&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get=="function"?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap=typeof WeakMap=="function"&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet=typeof WeakSet=="function"&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef=typeof WeakRef=="function"&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hasShammedSymbols=typeof Symbol=="function"&&typeof Symbol.iterator=="object",toStringTag=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols||"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(C){return C.__proto__}:null);function addNumericSeparator(C,E){if(C===1/0||C===-1/0||C!==C||C&&C>-1e3&&C<1e3||$test.call(/e/,E))return E;var I=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof C=="number"){var B=C<0?-$floor(-C):$floor(C);if(B!==C){var U=String(B),V=$slice.call(E,U.length+1);return $replace.call(U,I,"$&_")+"."+$replace.call($replace.call(V,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(E,I,"$&_")}var utilInspect=require$$0,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol$5(inspectCustom)?inspectCustom:null,objectInspect=function C(E,I,B,U){var V=I||{};if(has$3(V,"quoteStyle")&&V.quoteStyle!=="single"&&V.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(V,"maxStringLength")&&(typeof V.maxStringLength=="number"?V.maxStringLength<0&&V.maxStringLength!==1/0:V.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var X=has$3(V,"customInspect")?V.customInspect:!0;if(typeof X!="boolean"&&X!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(V,"indent")&&V.indent!==null&&V.indent!==" "&&!(parseInt(V.indent,10)===V.indent&&V.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(V,"numericSeparator")&&typeof V.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Y=V.numericSeparator;if(typeof E>"u")return"undefined";if(E===null)return"null";if(typeof E=="boolean")return E?"true":"false";if(typeof E=="string")return inspectString(E,V);if(typeof E=="number"){if(E===0)return 1/0/E>0?"0":"-0";var K=String(E);return Y?addNumericSeparator(E,K):K}if(typeof E=="bigint"){var J=String(E)+"n";return Y?addNumericSeparator(E,J):J}var xe=typeof V.depth>"u"?5:V.depth;if(typeof B>"u"&&(B=0),B>=xe&&xe>0&&typeof E=="object")return isArray$9(E)?"[Array]":"[Object]";var Z=getIndent(V,B);if(typeof U>"u")U=[];else if(indexOf(U,E)>=0)return"[Circular]";function _e(ze,He,je){if(He&&(U=$arrSlice.call(U),U.push(He)),je){var $e={depth:V.depth};return has$3(V,"quoteStyle")&&($e.quoteStyle=V.quoteStyle),C(ze,$e,B+1,U)}return C(ze,V,B+1,U)}if(typeof E=="function"&&!isRegExp$1(E)){var Se=nameOf(E),Ee=arrObjKeys(E,_e);return"[Function"+(Se?": "+Se:" (anonymous)")+"]"+(Ee.length>0?" { "+$join.call(Ee,", ")+" }":"")}if(isSymbol$5(E)){var Ae=hasShammedSymbols?$replace.call(String(E),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(E);return typeof E=="object"&&!hasShammedSymbols?markBoxed(Ae):Ae}if(isElement(E)){for(var Re="<"+$toLowerCase.call(String(E.nodeName)),Te=E.attributes||[],we=0;we<Te.length;we++)Re+=" "+Te[we].name+"="+wrapQuotes(quote(Te[we].value),"double",V);return Re+=">",E.childNodes&&E.childNodes.length&&(Re+="..."),Re+="</"+$toLowerCase.call(String(E.nodeName))+">",Re}if(isArray$9(E)){if(E.length===0)return"[]";var Pe=arrObjKeys(E,_e);return Z&&!singleLineValues(Pe)?"["+indentedJoin(Pe,Z)+"]":"[ "+$join.call(Pe,", ")+" ]"}if(isError(E)){var Ie=arrObjKeys(E,_e);return!("cause"in Error.prototype)&&"cause"in E&&!isEnumerable.call(E,"cause")?"{ ["+String(E)+"] "+$join.call($concat.call("[cause]: "+_e(E.cause),Ie),", ")+" }":Ie.length===0?"["+String(E)+"]":"{ ["+String(E)+"] "+$join.call(Ie,", ")+" }"}if(typeof E=="object"&&X){if(inspectSymbol&&typeof E[inspectSymbol]=="function"&&utilInspect)return utilInspect(E,{depth:xe-B});if(X!=="symbol"&&typeof E.inspect=="function")return E.inspect()}if(isMap(E)){var Me=[];return mapForEach&&mapForEach.call(E,function(ze,He){Me.push(_e(He,E,!0)+" => "+_e(ze,E))}),collectionOf("Map",mapSize$1.call(E),Me,Z)}if(isSet(E)){var Oe=[];return setForEach&&setForEach.call(E,function(ze){Oe.push(_e(ze,E))}),collectionOf("Set",setSize.call(E),Oe,Z)}if(isWeakMap(E))return weakCollectionOf("WeakMap");if(isWeakSet(E))return weakCollectionOf("WeakSet");if(isWeakRef(E))return weakCollectionOf("WeakRef");if(isNumber(E))return markBoxed(_e(Number(E)));if(isBigInt(E))return markBoxed(_e(bigIntValueOf.call(E)));if(isBoolean(E))return markBoxed(booleanValueOf.call(E));if(isString(E))return markBoxed(_e(String(E)));if(!isDate(E)&&!isRegExp$1(E)){var Le=arrObjKeys(E,_e),Ne=gPO?gPO(E)===Object.prototype:E instanceof Object||E.constructor===Object,Ve=E instanceof Object?"":"null prototype",Xe=!Ne&&toStringTag&&Object(E)===E&&toStringTag in E?$slice.call(toStr(E),8,-1):Ve?"Object":"",Ue=Ne||typeof E.constructor!="function"?"":E.constructor.name?E.constructor.name+" ":"",We=Ue+(Xe||Ve?"["+$join.call($concat.call([],Xe||[],Ve||[]),": ")+"] ":"");return Le.length===0?We+"{}":Z?We+"{"+indentedJoin(Le,Z)+"}":We+"{ "+$join.call(Le,", ")+" }"}return String(E)};function wrapQuotes(C,E,I){var B=(I.quoteStyle||E)==="double"?'"':"'";return B+C+B}function quote(C){return $replace.call(String(C),/"/g,"&quot;")}function isArray$9(C){return toStr(C)==="[object Array]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isDate(C){return toStr(C)==="[object Date]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isRegExp$1(C){return toStr(C)==="[object RegExp]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isError(C){return toStr(C)==="[object Error]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isString(C){return toStr(C)==="[object String]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isNumber(C){return toStr(C)==="[object Number]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isBoolean(C){return toStr(C)==="[object Boolean]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isSymbol$5(C){if(hasShammedSymbols)return C&&typeof C=="object"&&C instanceof Symbol;if(typeof C=="symbol")return!0;if(!C||typeof C!="object"||!symToString)return!1;try{return symToString.call(C),!0}catch{}return!1}function isBigInt(C){if(!C||typeof C!="object"||!bigIntValueOf)return!1;try{return bigIntValueOf.call(C),!0}catch{}return!1}var hasOwn=Object.prototype.hasOwnProperty||function(C){return C in this};function has$3(C,E){return hasOwn.call(C,E)}function toStr(C){return objectToString.call(C)}function nameOf(C){if(C.name)return C.name;var E=$match.call(functionToString.call(C),/^function\s*([\w$]+)/);return E?E[1]:null}function indexOf(C,E){if(C.indexOf)return C.indexOf(E);for(var I=0,B=C.length;I<B;I++)if(C[I]===E)return I;return-1}function isMap(C){if(!mapSize$1||!C||typeof C!="object")return!1;try{mapSize$1.call(C);try{setSize.call(C)}catch{return!0}return C instanceof Map}catch{}return!1}function isWeakMap(C){if(!weakMapHas||!C||typeof C!="object")return!1;try{weakMapHas.call(C,weakMapHas);try{weakSetHas.call(C,weakSetHas)}catch{return!0}return C instanceof WeakMap}catch{}return!1}function isWeakRef(C){if(!weakRefDeref||!C||typeof C!="object")return!1;try{return weakRefDeref.call(C),!0}catch{}return!1}function isSet(C){if(!setSize||!C||typeof C!="object")return!1;try{setSize.call(C);try{mapSize$1.call(C)}catch{return!0}return C instanceof Set}catch{}return!1}function isWeakSet(C){if(!weakSetHas||!C||typeof C!="object")return!1;try{weakSetHas.call(C,weakSetHas);try{weakMapHas.call(C,weakMapHas)}catch{return!0}return C instanceof WeakSet}catch{}return!1}function isElement(C){return!C||typeof C!="object"?!1:typeof HTMLElement<"u"&&C instanceof HTMLElement?!0:typeof C.nodeName=="string"&&typeof C.getAttribute=="function"}function inspectString(C,E){if(C.length>E.maxStringLength){var I=C.length-E.maxStringLength,B="... "+I+" more character"+(I>1?"s":"");return inspectString($slice.call(C,0,E.maxStringLength),E)+B}var U=$replace.call($replace.call(C,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(U,"single",E)}function lowbyte(C){var E=C.charCodeAt(0),I={8:"b",9:"t",10:"n",12:"f",13:"r"}[E];return I?"\\"+I:"\\x"+(E<16?"0":"")+$toUpperCase.call(E.toString(16))}function markBoxed(C){return"Object("+C+")"}function weakCollectionOf(C){return C+" { ? }"}function collectionOf(C,E,I,B){var U=B?indentedJoin(I,B):$join.call(I,", ");return C+" ("+E+") {"+U+"}"}function singleLineValues(C){for(var E=0;E<C.length;E++)if(indexOf(C[E],`
34
+ `)>=0)return!1;return!0}function getIndent(C,E){var I;if(C.indent===" ")I=" ";else if(typeof C.indent=="number"&&C.indent>0)I=$join.call(Array(C.indent+1)," ");else return null;return{base:I,prev:$join.call(Array(E+1),I)}}function indentedJoin(C,E){if(C.length===0)return"";var I=`
35
+ `+E.prev+E.base;return I+$join.call(C,","+I)+`
36
+ `+E.prev}function arrObjKeys(C,E){var I=isArray$9(C),B=[];if(I){B.length=C.length;for(var U=0;U<C.length;U++)B[U]=has$3(C,U)?E(C[U],C):""}var V=typeof gOPS=="function"?gOPS(C):[],X;if(hasShammedSymbols){X={};for(var Y=0;Y<V.length;Y++)X["$"+V[Y]]=V[Y]}for(var K in C)has$3(C,K)&&(I&&String(Number(K))===K&&K<C.length||hasShammedSymbols&&X["$"+K]instanceof Symbol||($test.call(/[^\w$]/,K)?B.push(E(K,C)+": "+E(C[K],C)):B.push(K+": "+E(C[K],C))));if(typeof gOPS=="function")for(var J=0;J<V.length;J++)isEnumerable.call(C,V[J])&&B.push("["+E(V[J])+"]: "+E(C[V[J]],C));return B}var GetIntrinsic=getIntrinsic,callBound=callBound$1,inspect=objectInspect,$TypeError=GetIntrinsic("%TypeError%"),$WeakMap=GetIntrinsic("%WeakMap%",!0),$Map=GetIntrinsic("%Map%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSet=callBound("Map.prototype.set",!0),$mapHas=callBound("Map.prototype.has",!0),listGetNode=function(C,E){for(var I=C,B;(B=I.next)!==null;I=B)if(B.key===E)return I.next=B.next,B.next=C.next,C.next=B,B},listGet=function(C,E){var I=listGetNode(C,E);return I&&I.value},listSet=function(C,E,I){var B=listGetNode(C,E);B?B.value=I:C.next={key:E,next:C.next,value:I}},listHas=function(C,E){return!!listGetNode(C,E)},sideChannel=function(){var E,I,B,U={assert:function(V){if(!U.has(V))throw new $TypeError("Side channel does not contain "+inspect(V))},get:function(V){if($WeakMap&&V&&(typeof V=="object"||typeof V=="function")){if(E)return $weakMapGet(E,V)}else if($Map){if(I)return $mapGet(I,V)}else if(B)return listGet(B,V)},has:function(V){if($WeakMap&&V&&(typeof V=="object"||typeof V=="function")){if(E)return $weakMapHas(E,V)}else if($Map){if(I)return $mapHas(I,V)}else if(B)return listHas(B,V);return!1},set:function(V,X){$WeakMap&&V&&(typeof V=="object"||typeof V=="function")?(E||(E=new $WeakMap),$weakMapSet(E,V,X)):$Map?(I||(I=new $Map),$mapSet(I,V,X)):(B||(B={key:{},next:null}),listSet(B,V,X))}};return U},replace=String.prototype.replace,percentTwenties=/%20/g,Format={RFC1738:"RFC1738",RFC3986:"RFC3986"},formats$3={default:Format.RFC3986,formatters:{RFC1738:function(C){return replace.call(C,percentTwenties,"+")},RFC3986:function(C){return String(C)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986},formats$2=formats$3,has$2=Object.prototype.hasOwnProperty,isArray$8=Array.isArray,hexTable=function(){for(var C=[],E=0;E<256;++E)C.push("%"+((E<16?"0":"")+E.toString(16)).toUpperCase());return C}(),compactQueue=function(E){for(;E.length>1;){var I=E.pop(),B=I.obj[I.prop];if(isArray$8(B)){for(var U=[],V=0;V<B.length;++V)typeof B[V]<"u"&&U.push(B[V]);I.obj[I.prop]=U}}},arrayToObject=function(E,I){for(var B=I&&I.plainObjects?Object.create(null):{},U=0;U<E.length;++U)typeof E[U]<"u"&&(B[U]=E[U]);return B},merge=function C(E,I,B){if(!I)return E;if(typeof I!="object"){if(isArray$8(E))E.push(I);else if(E&&typeof E=="object")(B&&(B.plainObjects||B.allowPrototypes)||!has$2.call(Object.prototype,I))&&(E[I]=!0);else return[E,I];return E}if(!E||typeof E!="object")return[E].concat(I);var U=E;return isArray$8(E)&&!isArray$8(I)&&(U=arrayToObject(E,B)),isArray$8(E)&&isArray$8(I)?(I.forEach(function(V,X){if(has$2.call(E,X)){var Y=E[X];Y&&typeof Y=="object"&&V&&typeof V=="object"?E[X]=C(Y,V,B):E.push(V)}else E[X]=V}),E):Object.keys(I).reduce(function(V,X){var Y=I[X];return has$2.call(V,X)?V[X]=C(V[X],Y,B):V[X]=Y,V},U)},assign=function(E,I){return Object.keys(I).reduce(function(B,U){return B[U]=I[U],B},E)},decode=function(C,E,I){var B=C.replace(/\+/g," ");if(I==="iso-8859-1")return B.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(B)}catch{return B}},encode=function(E,I,B,U,V){if(E.length===0)return E;var X=E;if(typeof E=="symbol"?X=Symbol.prototype.toString.call(E):typeof E!="string"&&(X=String(E)),B==="iso-8859-1")return escape(X).replace(/%u[0-9a-f]{4}/gi,function(xe){return"%26%23"+parseInt(xe.slice(2),16)+"%3B"});for(var Y="",K=0;K<X.length;++K){var J=X.charCodeAt(K);if(J===45||J===46||J===95||J===126||J>=48&&J<=57||J>=65&&J<=90||J>=97&&J<=122||V===formats$2.RFC1738&&(J===40||J===41)){Y+=X.charAt(K);continue}if(J<128){Y=Y+hexTable[J];continue}if(J<2048){Y=Y+(hexTable[192|J>>6]+hexTable[128|J&63]);continue}if(J<55296||J>=57344){Y=Y+(hexTable[224|J>>12]+hexTable[128|J>>6&63]+hexTable[128|J&63]);continue}K+=1,J=65536+((J&1023)<<10|X.charCodeAt(K)&1023),Y+=hexTable[240|J>>18]+hexTable[128|J>>12&63]+hexTable[128|J>>6&63]+hexTable[128|J&63]}return Y},compact=function(E){for(var I=[{obj:{o:E},prop:"o"}],B=[],U=0;U<I.length;++U)for(var V=I[U],X=V.obj[V.prop],Y=Object.keys(X),K=0;K<Y.length;++K){var J=Y[K],xe=X[J];typeof xe=="object"&&xe!==null&&B.indexOf(xe)===-1&&(I.push({obj:X,prop:J}),B.push(xe))}return compactQueue(I),E},isRegExp=function(E){return Object.prototype.toString.call(E)==="[object RegExp]"},isBuffer=function(E){return!E||typeof E!="object"?!1:!!(E.constructor&&E.constructor.isBuffer&&E.constructor.isBuffer(E))},combine$1=function(E,I){return[].concat(E,I)},maybeMap=function(E,I){if(isArray$8(E)){for(var B=[],U=0;U<E.length;U+=1)B.push(I(E[U]));return B}return I(E)},utils$2={arrayToObject,assign,combine:combine$1,compact,decode,encode,isBuffer,isRegExp,maybeMap,merge},getSideChannel=sideChannel,utils$1=utils$2,formats$1=formats$3,has$1=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(E){return E+"[]"},comma:"comma",indices:function(E,I){return E+"["+I+"]"},repeat:function(E){return E}},isArray$7=Array.isArray,push=Array.prototype.push,pushToArray=function(C,E){push.apply(C,isArray$7(E)?E:[E])},toISO=Date.prototype.toISOString,defaultFormat=formats$1.default,defaults$1={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:utils$1.encode,encodeValuesOnly:!1,format:defaultFormat,formatter:formats$1.formatters[defaultFormat],indices:!1,serializeDate:function(E){return toISO.call(E)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function(E){return typeof E=="string"||typeof E=="number"||typeof E=="boolean"||typeof E=="symbol"||typeof E=="bigint"},sentinel={},stringify$1=function C(E,I,B,U,V,X,Y,K,J,xe,Z,_e,Se,Ee,Ae,Re){for(var Te=E,we=Re,Pe=0,Ie=!1;(we=we.get(sentinel))!==void 0&&!Ie;){var Me=we.get(E);if(Pe+=1,typeof Me<"u"){if(Me===Pe)throw new RangeError("Cyclic object value");Ie=!0}typeof we.get(sentinel)>"u"&&(Pe=0)}if(typeof K=="function"?Te=K(I,Te):Te instanceof Date?Te=Z(Te):B==="comma"&&isArray$7(Te)&&(Te=utils$1.maybeMap(Te,function($e){return $e instanceof Date?Z($e):$e})),Te===null){if(V)return Y&&!Ee?Y(I,defaults$1.encoder,Ae,"key",_e):I;Te=""}if(isNonNullishPrimitive(Te)||utils$1.isBuffer(Te)){if(Y){var Oe=Ee?I:Y(I,defaults$1.encoder,Ae,"key",_e);return[Se(Oe)+"="+Se(Y(Te,defaults$1.encoder,Ae,"value",_e))]}return[Se(I)+"="+Se(String(Te))]}var Le=[];if(typeof Te>"u")return Le;var Ne;if(B==="comma"&&isArray$7(Te))Ee&&Y&&(Te=utils$1.maybeMap(Te,Y)),Ne=[{value:Te.length>0?Te.join(",")||null:void 0}];else if(isArray$7(K))Ne=K;else{var Ve=Object.keys(Te);Ne=J?Ve.sort(J):Ve}for(var Xe=U&&isArray$7(Te)&&Te.length===1?I+"[]":I,Ue=0;Ue<Ne.length;++Ue){var We=Ne[Ue],ze=typeof We=="object"&&typeof We.value<"u"?We.value:Te[We];if(!(X&&ze===null)){var He=isArray$7(Te)?typeof B=="function"?B(Xe,We):Xe:Xe+(xe?"."+We:"["+We+"]");Re.set(E,Pe);var je=getSideChannel();je.set(sentinel,Re),pushToArray(Le,C(ze,He,B,U,V,X,B==="comma"&&Ee&&isArray$7(Te)?null:Y,K,J,xe,Z,_e,Se,Ee,Ae,je))}}return Le},normalizeStringifyOptions=function(E){if(!E)return defaults$1;if(E.encoder!==null&&typeof E.encoder<"u"&&typeof E.encoder!="function")throw new TypeError("Encoder has to be a function.");var I=E.charset||defaults$1.charset;if(typeof E.charset<"u"&&E.charset!=="utf-8"&&E.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var B=formats$1.default;if(typeof E.format<"u"){if(!has$1.call(formats$1.formatters,E.format))throw new TypeError("Unknown format option provided.");B=E.format}var U=formats$1.formatters[B],V=defaults$1.filter;return(typeof E.filter=="function"||isArray$7(E.filter))&&(V=E.filter),{addQueryPrefix:typeof E.addQueryPrefix=="boolean"?E.addQueryPrefix:defaults$1.addQueryPrefix,allowDots:typeof E.allowDots>"u"?defaults$1.allowDots:!!E.allowDots,charset:I,charsetSentinel:typeof E.charsetSentinel=="boolean"?E.charsetSentinel:defaults$1.charsetSentinel,delimiter:typeof E.delimiter>"u"?defaults$1.delimiter:E.delimiter,encode:typeof E.encode=="boolean"?E.encode:defaults$1.encode,encoder:typeof E.encoder=="function"?E.encoder:defaults$1.encoder,encodeValuesOnly:typeof E.encodeValuesOnly=="boolean"?E.encodeValuesOnly:defaults$1.encodeValuesOnly,filter:V,format:B,formatter:U,serializeDate:typeof E.serializeDate=="function"?E.serializeDate:defaults$1.serializeDate,skipNulls:typeof E.skipNulls=="boolean"?E.skipNulls:defaults$1.skipNulls,sort:typeof E.sort=="function"?E.sort:null,strictNullHandling:typeof E.strictNullHandling=="boolean"?E.strictNullHandling:defaults$1.strictNullHandling}},stringify_1=function(C,E){var I=C,B=normalizeStringifyOptions(E),U,V;typeof B.filter=="function"?(V=B.filter,I=V("",I)):isArray$7(B.filter)&&(V=B.filter,U=V);var X=[];if(typeof I!="object"||I===null)return"";var Y;E&&E.arrayFormat in arrayPrefixGenerators?Y=E.arrayFormat:E&&"indices"in E?Y=E.indices?"indices":"repeat":Y="indices";var K=arrayPrefixGenerators[Y];if(E&&"commaRoundTrip"in E&&typeof E.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var J=K==="comma"&&E&&E.commaRoundTrip;U||(U=Object.keys(I)),B.sort&&U.sort(B.sort);for(var xe=getSideChannel(),Z=0;Z<U.length;++Z){var _e=U[Z];B.skipNulls&&I[_e]===null||pushToArray(X,stringify$1(I[_e],_e,K,J,B.strictNullHandling,B.skipNulls,B.encode?B.encoder:null,B.filter,B.sort,B.allowDots,B.serializeDate,B.format,B.formatter,B.encodeValuesOnly,B.charset,xe))}var Se=X.join(B.delimiter),Ee=B.addQueryPrefix===!0?"?":"";return B.charsetSentinel&&(B.charset==="iso-8859-1"?Ee+="utf8=%26%2310003%3B&":Ee+="utf8=%E2%9C%93&"),Se.length>0?Ee+Se:""},utils=utils$2,has=Object.prototype.hasOwnProperty,isArray$6=Array.isArray,defaults={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:utils.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(C){return C.replace(/&#(\d+);/g,function(E,I){return String.fromCharCode(parseInt(I,10))})},parseArrayValue=function(C,E){return C&&typeof C=="string"&&E.comma&&C.indexOf(",")>-1?C.split(","):C},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function(E,I){var B={__proto__:null},U=I.ignoreQueryPrefix?E.replace(/^\?/,""):E,V=I.parameterLimit===1/0?void 0:I.parameterLimit,X=U.split(I.delimiter,V),Y=-1,K,J=I.charset;if(I.charsetSentinel)for(K=0;K<X.length;++K)X[K].indexOf("utf8=")===0&&(X[K]===charsetSentinel?J="utf-8":X[K]===isoSentinel&&(J="iso-8859-1"),Y=K,K=X.length);for(K=0;K<X.length;++K)if(K!==Y){var xe=X[K],Z=xe.indexOf("]="),_e=Z===-1?xe.indexOf("="):Z+1,Se,Ee;_e===-1?(Se=I.decoder(xe,defaults.decoder,J,"key"),Ee=I.strictNullHandling?null:""):(Se=I.decoder(xe.slice(0,_e),defaults.decoder,J,"key"),Ee=utils.maybeMap(parseArrayValue(xe.slice(_e+1),I),function(Ae){return I.decoder(Ae,defaults.decoder,J,"value")})),Ee&&I.interpretNumericEntities&&J==="iso-8859-1"&&(Ee=interpretNumericEntities(Ee)),xe.indexOf("[]=")>-1&&(Ee=isArray$6(Ee)?[Ee]:Ee),has.call(B,Se)?B[Se]=utils.combine(B[Se],Ee):B[Se]=Ee}return B},parseObject=function(C,E,I,B){for(var U=B?E:parseArrayValue(E,I),V=C.length-1;V>=0;--V){var X,Y=C[V];if(Y==="[]"&&I.parseArrays)X=[].concat(U);else{X=I.plainObjects?Object.create(null):{};var K=Y.charAt(0)==="["&&Y.charAt(Y.length-1)==="]"?Y.slice(1,-1):Y,J=parseInt(K,10);!I.parseArrays&&K===""?X={0:U}:!isNaN(J)&&Y!==K&&String(J)===K&&J>=0&&I.parseArrays&&J<=I.arrayLimit?(X=[],X[J]=U):K!=="__proto__"&&(X[K]=U)}U=X}return U},parseKeys=function(E,I,B,U){if(E){var V=B.allowDots?E.replace(/\.([^.[]+)/g,"[$1]"):E,X=/(\[[^[\]]*])/,Y=/(\[[^[\]]*])/g,K=B.depth>0&&X.exec(V),J=K?V.slice(0,K.index):V,xe=[];if(J){if(!B.plainObjects&&has.call(Object.prototype,J)&&!B.allowPrototypes)return;xe.push(J)}for(var Z=0;B.depth>0&&(K=Y.exec(V))!==null&&Z<B.depth;){if(Z+=1,!B.plainObjects&&has.call(Object.prototype,K[1].slice(1,-1))&&!B.allowPrototypes)return;xe.push(K[1])}return K&&xe.push("["+V.slice(K.index)+"]"),parseObject(xe,I,B,U)}},normalizeParseOptions=function(E){if(!E)return defaults;if(E.decoder!==null&&E.decoder!==void 0&&typeof E.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof E.charset<"u"&&E.charset!=="utf-8"&&E.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var I=typeof E.charset>"u"?defaults.charset:E.charset;return{allowDots:typeof E.allowDots>"u"?defaults.allowDots:!!E.allowDots,allowPrototypes:typeof E.allowPrototypes=="boolean"?E.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof E.allowSparse=="boolean"?E.allowSparse:defaults.allowSparse,arrayLimit:typeof E.arrayLimit=="number"?E.arrayLimit:defaults.arrayLimit,charset:I,charsetSentinel:typeof E.charsetSentinel=="boolean"?E.charsetSentinel:defaults.charsetSentinel,comma:typeof E.comma=="boolean"?E.comma:defaults.comma,decoder:typeof E.decoder=="function"?E.decoder:defaults.decoder,delimiter:typeof E.delimiter=="string"||utils.isRegExp(E.delimiter)?E.delimiter:defaults.delimiter,depth:typeof E.depth=="number"||E.depth===!1?+E.depth:defaults.depth,ignoreQueryPrefix:E.ignoreQueryPrefix===!0,interpretNumericEntities:typeof E.interpretNumericEntities=="boolean"?E.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof E.parameterLimit=="number"?E.parameterLimit:defaults.parameterLimit,parseArrays:E.parseArrays!==!1,plainObjects:typeof E.plainObjects=="boolean"?E.plainObjects:defaults.plainObjects,strictNullHandling:typeof E.strictNullHandling=="boolean"?E.strictNullHandling:defaults.strictNullHandling}},parse$3=function(C,E){var I=normalizeParseOptions(E);if(C===""||C===null||typeof C>"u")return I.plainObjects?Object.create(null):{};for(var B=typeof C=="string"?parseValues(C,I):C,U=I.plainObjects?Object.create(null):{},V=Object.keys(B),X=0;X<V.length;++X){var Y=V[X],K=parseKeys(Y,B[Y],I,typeof C=="string");U=utils.merge(U,K,I)}return I.allowSparse===!0?U:utils.compact(U)},stringify=stringify_1,parse$2=parse$3,formats=formats$3,lib$2={formats,parse:parse$2,stringify},punycode=punycodeExports;function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r",`
37
+ `," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=lib$2;function urlParse(C,E,I){if(C&&typeof C=="object"&&C instanceof Url)return C;var B=new Url;return B.parse(C,E,I),B}Url.prototype.parse=function(C,E,I){if(typeof C!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof C);var B=C.indexOf("?"),U=B!==-1&&B<C.indexOf("#")?"?":"#",V=C.split(U),X=/\\/g;V[0]=V[0].replace(X,"/"),C=V.join(U);var Y=C;if(Y=Y.trim(),!I&&C.split("#").length===1){var K=simplePathPattern.exec(Y);if(K)return this.path=Y,this.href=Y,this.pathname=K[1],K[2]?(this.search=K[2],E?this.query=querystring.parse(this.search.substr(1)):this.query=this.search.substr(1)):E&&(this.search="",this.query={}),this}var J=protocolPattern.exec(Y);if(J){J=J[0];var xe=J.toLowerCase();this.protocol=xe,Y=Y.substr(J.length)}if(I||J||Y.match(/^\/\/[^@/]+@[^@/]+/)){var Z=Y.substr(0,2)==="//";Z&&!(J&&hostlessProtocol[J])&&(Y=Y.substr(2),this.slashes=!0)}if(!hostlessProtocol[J]&&(Z||J&&!slashedProtocol[J])){for(var _e=-1,Se=0;Se<hostEndingChars.length;Se++){var Ee=Y.indexOf(hostEndingChars[Se]);Ee!==-1&&(_e===-1||Ee<_e)&&(_e=Ee)}var Ae,Re;_e===-1?Re=Y.lastIndexOf("@"):Re=Y.lastIndexOf("@",_e),Re!==-1&&(Ae=Y.slice(0,Re),Y=Y.slice(Re+1),this.auth=decodeURIComponent(Ae)),_e=-1;for(var Se=0;Se<nonHostChars.length;Se++){var Ee=Y.indexOf(nonHostChars[Se]);Ee!==-1&&(_e===-1||Ee<_e)&&(_e=Ee)}_e===-1&&(_e=Y.length),this.host=Y.slice(0,_e),Y=Y.slice(_e),this.parseHost(),this.hostname=this.hostname||"";var Te=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Te)for(var we=this.hostname.split(/\./),Se=0,Pe=we.length;Se<Pe;Se++){var Ie=we[Se];if(Ie&&!Ie.match(hostnamePartPattern)){for(var Me="",Oe=0,Le=Ie.length;Oe<Le;Oe++)Ie.charCodeAt(Oe)>127?Me+="x":Me+=Ie[Oe];if(!Me.match(hostnamePartPattern)){var Ne=we.slice(0,Se),Ve=we.slice(Se+1),Xe=Ie.match(hostnamePartStart);Xe&&(Ne.push(Xe[1]),Ve.unshift(Xe[2])),Ve.length&&(Y="/"+Ve.join(".")+Y),this.hostname=Ne.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),Te||(this.hostname=punycode.toASCII(this.hostname));var Ue=this.port?":"+this.port:"",We=this.hostname||"";this.host=We+Ue,this.href+=this.host,Te&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Y[0]!=="/"&&(Y="/"+Y))}if(!unsafeProtocol[xe])for(var Se=0,Pe=autoEscape.length;Se<Pe;Se++){var ze=autoEscape[Se];if(Y.indexOf(ze)!==-1){var He=encodeURIComponent(ze);He===ze&&(He=escape(ze)),Y=Y.split(ze).join(He)}}var je=Y.indexOf("#");je!==-1&&(this.hash=Y.substr(je),Y=Y.slice(0,je));var $e=Y.indexOf("?");if($e!==-1?(this.search=Y.substr($e),this.query=Y.substr($e+1),E&&(this.query=querystring.parse(this.query)),Y=Y.slice(0,$e)):E&&(this.search="",this.query={}),Y&&(this.pathname=Y),slashedProtocol[xe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Ue=this.pathname||"",De=this.search||"";this.path=Ue+De}return this.href=this.format(),this};function urlFormat(C){return typeof C=="string"&&(C=urlParse(C)),C instanceof Url?C.format():Url.prototype.format.call(C)}Url.prototype.format=function(){var C=this.auth||"";C&&(C=encodeURIComponent(C),C=C.replace(/%3A/i,":"),C+="@");var E=this.protocol||"",I=this.pathname||"",B=this.hash||"",U=!1,V="";this.host?U=C+this.host:this.hostname&&(U=C+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(U+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(V=querystring.stringify(this.query));var X=this.search||V&&"?"+V||"";return E&&E.substr(-1)!==":"&&(E+=":"),this.slashes||(!E||slashedProtocol[E])&&U!==!1?(U="//"+(U||""),I&&I.charAt(0)!=="/"&&(I="/"+I)):U||(U=""),B&&B.charAt(0)!=="#"&&(B="#"+B),X&&X.charAt(0)!=="?"&&(X="?"+X),I=I.replace(/[?#]/g,function(Y){return encodeURIComponent(Y)}),X=X.replace("#","%23"),E+U+I+X+B};function urlResolve(C,E){return urlParse(C,!1,!0).resolve(E)}Url.prototype.resolve=function(C){return this.resolveObject(urlParse(C,!1,!0)).format()},Url.prototype.resolveObject=function(C){if(typeof C=="string"){var E=new Url;E.parse(C,!1,!0),C=E}for(var I=new Url,B=Object.keys(this),U=0;U<B.length;U++){var V=B[U];I[V]=this[V]}if(I.hash=C.hash,C.href==="")return I.href=I.format(),I;if(C.slashes&&!C.protocol){for(var X=Object.keys(C),Y=0;Y<X.length;Y++){var K=X[Y];K!=="protocol"&&(I[K]=C[K])}return slashedProtocol[I.protocol]&&I.hostname&&!I.pathname&&(I.pathname="/",I.path=I.pathname),I.href=I.format(),I}if(C.protocol&&C.protocol!==I.protocol){if(!slashedProtocol[C.protocol]){for(var J=Object.keys(C),xe=0;xe<J.length;xe++){var Z=J[xe];I[Z]=C[Z]}return I.href=I.format(),I}if(I.protocol=C.protocol,!C.host&&!hostlessProtocol[C.protocol]){for(var Pe=(C.pathname||"").split("/");Pe.length&&!(C.host=Pe.shift()););C.host||(C.host=""),C.hostname||(C.hostname=""),Pe[0]!==""&&Pe.unshift(""),Pe.length<2&&Pe.unshift(""),I.pathname=Pe.join("/")}else I.pathname=C.pathname;if(I.search=C.search,I.query=C.query,I.host=C.host||"",I.auth=C.auth,I.hostname=C.hostname||C.host,I.port=C.port,I.pathname||I.search){var _e=I.pathname||"",Se=I.search||"";I.path=_e+Se}return I.slashes=I.slashes||C.slashes,I.href=I.format(),I}var Ee=I.pathname&&I.pathname.charAt(0)==="/",Ae=C.host||C.pathname&&C.pathname.charAt(0)==="/",Re=Ae||Ee||I.host&&C.pathname,Te=Re,we=I.pathname&&I.pathname.split("/")||[],Pe=C.pathname&&C.pathname.split("/")||[],Ie=I.protocol&&!slashedProtocol[I.protocol];if(Ie&&(I.hostname="",I.port=null,I.host&&(we[0]===""?we[0]=I.host:we.unshift(I.host)),I.host="",C.protocol&&(C.hostname=null,C.port=null,C.host&&(Pe[0]===""?Pe[0]=C.host:Pe.unshift(C.host)),C.host=null),Re=Re&&(Pe[0]===""||we[0]==="")),Ae)I.host=C.host||C.host===""?C.host:I.host,I.hostname=C.hostname||C.hostname===""?C.hostname:I.hostname,I.search=C.search,I.query=C.query,we=Pe;else if(Pe.length)we||(we=[]),we.pop(),we=we.concat(Pe),I.search=C.search,I.query=C.query;else if(C.search!=null){if(Ie){I.host=we.shift(),I.hostname=I.host;var Me=I.host&&I.host.indexOf("@")>0?I.host.split("@"):!1;Me&&(I.auth=Me.shift(),I.hostname=Me.shift(),I.host=I.hostname)}return I.search=C.search,I.query=C.query,(I.pathname!==null||I.search!==null)&&(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.href=I.format(),I}if(!we.length)return I.pathname=null,I.search?I.path="/"+I.search:I.path=null,I.href=I.format(),I;for(var Oe=we.slice(-1)[0],Le=(I.host||C.host||we.length>1)&&(Oe==="."||Oe==="..")||Oe==="",Ne=0,Ve=we.length;Ve>=0;Ve--)Oe=we[Ve],Oe==="."?we.splice(Ve,1):Oe===".."?(we.splice(Ve,1),Ne++):Ne&&(we.splice(Ve,1),Ne--);if(!Re&&!Te)for(;Ne--;Ne)we.unshift("..");Re&&we[0]!==""&&(!we[0]||we[0].charAt(0)!=="/")&&we.unshift(""),Le&&we.join("/").substr(-1)!=="/"&&we.push("");var Xe=we[0]===""||we[0]&&we[0].charAt(0)==="/";if(Ie){I.hostname=Xe?"":we.length?we.shift():"",I.host=I.hostname;var Me=I.host&&I.host.indexOf("@")>0?I.host.split("@"):!1;Me&&(I.auth=Me.shift(),I.hostname=Me.shift(),I.host=I.hostname)}return Re=Re||I.host&&we.length,Re&&!Xe&&we.unshift(""),we.length>0?I.pathname=we.join("/"):(I.pathname=null,I.path=null),(I.pathname!==null||I.search!==null)&&(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.auth=C.auth||I.auth,I.slashes=I.slashes||C.slashes,I.href=I.format(),I},Url.prototype.parseHost=function(){var C=this.host,E=portPattern.exec(C);E&&(E=E[0],E!==":"&&(this.port=E.substr(1)),C=C.substr(0,C.length-E.length)),C&&(this.hostname=C)};var parse$1=urlParse,resolve=urlResolve,format=urlFormat;const url={parse:parse$1,format,resolve},warnings={};function deprecation(C,E,I=3){if(warnings[E])return;let B=new Error().stack;typeof B>"u"?console.warn("PixiJS Deprecation Warning: ",`${E}
38
+ Deprecated since v${C}`):(B=B.split(`
39
+ `).splice(I).join(`
40
+ `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${E}
41
+ Deprecated since v${C}`),console.warn(B),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${E}
42
+ Deprecated since v${C}`),console.warn(B))),warnings[E]=!0}let supported;function isWebGLSupported(){return typeof supported>"u"&&(supported=function(){var I;const E={stencil:!0,failIfMajorPerformanceCaveat:settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!settings.ADAPTER.getWebGLRenderingContext())return!1;const B=settings.ADAPTER.createCanvas();let U=B.getContext("webgl",E)||B.getContext("experimental-webgl",E);const V=!!((I=U==null?void 0:U.getContextAttributes())!=null&&I.stencil);if(U){const X=U.getExtension("WEBGL_lose_context");X&&X.loseContext()}return U=null,V}catch{return!1}}()),supported}var r$4={grad:.9,turn:360,rad:360/(2*Math.PI)},t$3=function(C){return typeof C=="string"?C.length>0:typeof C=="number"},n$5=function(C,E,I){return E===void 0&&(E=0),I===void 0&&(I=Math.pow(10,E)),Math.round(I*C)/I+0},e$3=function(C,E,I){return E===void 0&&(E=0),I===void 0&&(I=1),C>I?I:C>E?C:E},u$4=function(C){return(C=isFinite(C)?C%360:0)>0?C:C+360},a$6=function(C){return{r:e$3(C.r,0,255),g:e$3(C.g,0,255),b:e$3(C.b,0,255),a:e$3(C.a)}},o$5=function(C){return{r:n$5(C.r),g:n$5(C.g),b:n$5(C.b),a:n$5(C.a,3)}},i$6=/^#([0-9a-f]{3,8})$/i,s$5=function(C){var E=C.toString(16);return E.length<2?"0"+E:E},h$1=function(C){var E=C.r,I=C.g,B=C.b,U=C.a,V=Math.max(E,I,B),X=V-Math.min(E,I,B),Y=X?V===E?(I-B)/X:V===I?2+(B-E)/X:4+(E-I)/X:0;return{h:60*(Y<0?Y+6:Y),s:V?X/V*100:0,v:V/255*100,a:U}},b$2=function(C){var E=C.h,I=C.s,B=C.v,U=C.a;E=E/360*6,I/=100,B/=100;var V=Math.floor(E),X=B*(1-I),Y=B*(1-(E-V)*I),K=B*(1-(1-E+V)*I),J=V%6;return{r:255*[B,Y,X,X,K,B][J],g:255*[K,B,B,Y,X,X][J],b:255*[X,X,K,B,B,Y][J],a:U}},g$2=function(C){return{h:u$4(C.h),s:e$3(C.s,0,100),l:e$3(C.l,0,100),a:e$3(C.a)}},d$4=function(C){return{h:n$5(C.h),s:n$5(C.s),l:n$5(C.l),a:n$5(C.a,3)}},f$4=function(C){return b$2((I=(E=C).s,{h:E.h,s:(I*=((B=E.l)<50?B:100-B)/100)>0?2*I/(B+I)*100:0,v:B+I,a:E.a}));var E,I,B},c$7=function(C){return{h:(E=h$1(C)).h,s:(U=(200-(I=E.s))*(B=E.v)/100)>0&&U<200?I*B/100/(U<=100?U:200-U)*100:0,l:U/2,a:E.a};var E,I,B,U},l$5=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p$2=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v$3=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m$3=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y$2={string:[[function(C){var E=i$6.exec(C);return E?(C=E[1]).length<=4?{r:parseInt(C[0]+C[0],16),g:parseInt(C[1]+C[1],16),b:parseInt(C[2]+C[2],16),a:C.length===4?n$5(parseInt(C[3]+C[3],16)/255,2):1}:C.length===6||C.length===8?{r:parseInt(C.substr(0,2),16),g:parseInt(C.substr(2,2),16),b:parseInt(C.substr(4,2),16),a:C.length===8?n$5(parseInt(C.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(C){var E=v$3.exec(C)||m$3.exec(C);return E?E[2]!==E[4]||E[4]!==E[6]?null:a$6({r:Number(E[1])/(E[2]?100/255:1),g:Number(E[3])/(E[4]?100/255:1),b:Number(E[5])/(E[6]?100/255:1),a:E[7]===void 0?1:Number(E[7])/(E[8]?100:1)}):null},"rgb"],[function(C){var E=l$5.exec(C)||p$2.exec(C);if(!E)return null;var I,B,U=g$2({h:(I=E[1],B=E[2],B===void 0&&(B="deg"),Number(I)*(r$4[B]||1)),s:Number(E[3]),l:Number(E[4]),a:E[5]===void 0?1:Number(E[5])/(E[6]?100:1)});return f$4(U)},"hsl"]],object:[[function(C){var E=C.r,I=C.g,B=C.b,U=C.a,V=U===void 0?1:U;return t$3(E)&&t$3(I)&&t$3(B)?a$6({r:Number(E),g:Number(I),b:Number(B),a:Number(V)}):null},"rgb"],[function(C){var E=C.h,I=C.s,B=C.l,U=C.a,V=U===void 0?1:U;if(!t$3(E)||!t$3(I)||!t$3(B))return null;var X=g$2({h:Number(E),s:Number(I),l:Number(B),a:Number(V)});return f$4(X)},"hsl"],[function(C){var E=C.h,I=C.s,B=C.v,U=C.a,V=U===void 0?1:U;if(!t$3(E)||!t$3(I)||!t$3(B))return null;var X=function(Y){return{h:u$4(Y.h),s:e$3(Y.s,0,100),v:e$3(Y.v,0,100),a:e$3(Y.a)}}({h:Number(E),s:Number(I),v:Number(B),a:Number(V)});return b$2(X)},"hsv"]]},N$1=function(C,E){for(var I=0;I<E.length;I++){var B=E[I][0](C);if(B)return[B,E[I][1]]}return[null,void 0]},x$3=function(C){return typeof C=="string"?N$1(C.trim(),y$2.string):typeof C=="object"&&C!==null?N$1(C,y$2.object):[null,void 0]},M$1=function(C,E){var I=c$7(C);return{h:I.h,s:e$3(I.s+100*E,0,100),l:I.l,a:I.a}},H=function(C){return(299*C.r+587*C.g+114*C.b)/1e3/255},$=function(C,E){var I=c$7(C);return{h:I.h,s:I.s,l:e$3(I.l+100*E,0,100),a:I.a}},j=function(){function C(E){this.parsed=x$3(E)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return C.prototype.isValid=function(){return this.parsed!==null},C.prototype.brightness=function(){return n$5(H(this.rgba),2)},C.prototype.isDark=function(){return H(this.rgba)<.5},C.prototype.isLight=function(){return H(this.rgba)>=.5},C.prototype.toHex=function(){return E=o$5(this.rgba),I=E.r,B=E.g,U=E.b,X=(V=E.a)<1?s$5(n$5(255*V)):"","#"+s$5(I)+s$5(B)+s$5(U)+X;var E,I,B,U,V,X},C.prototype.toRgb=function(){return o$5(this.rgba)},C.prototype.toRgbString=function(){return E=o$5(this.rgba),I=E.r,B=E.g,U=E.b,(V=E.a)<1?"rgba("+I+", "+B+", "+U+", "+V+")":"rgb("+I+", "+B+", "+U+")";var E,I,B,U,V},C.prototype.toHsl=function(){return d$4(c$7(this.rgba))},C.prototype.toHslString=function(){return E=d$4(c$7(this.rgba)),I=E.h,B=E.s,U=E.l,(V=E.a)<1?"hsla("+I+", "+B+"%, "+U+"%, "+V+")":"hsl("+I+", "+B+"%, "+U+"%)";var E,I,B,U,V},C.prototype.toHsv=function(){return E=h$1(this.rgba),{h:n$5(E.h),s:n$5(E.s),v:n$5(E.v),a:n$5(E.a,3)};var E},C.prototype.invert=function(){return w$1({r:255-(E=this.rgba).r,g:255-E.g,b:255-E.b,a:E.a});var E},C.prototype.saturate=function(E){return E===void 0&&(E=.1),w$1(M$1(this.rgba,E))},C.prototype.desaturate=function(E){return E===void 0&&(E=.1),w$1(M$1(this.rgba,-E))},C.prototype.grayscale=function(){return w$1(M$1(this.rgba,-1))},C.prototype.lighten=function(E){return E===void 0&&(E=.1),w$1($(this.rgba,E))},C.prototype.darken=function(E){return E===void 0&&(E=.1),w$1($(this.rgba,-E))},C.prototype.rotate=function(E){return E===void 0&&(E=15),this.hue(this.hue()+E)},C.prototype.alpha=function(E){return typeof E=="number"?w$1({r:(I=this.rgba).r,g:I.g,b:I.b,a:E}):n$5(this.rgba.a,3);var I},C.prototype.hue=function(E){var I=c$7(this.rgba);return typeof E=="number"?w$1({h:E,s:I.s,l:I.l,a:I.a}):n$5(I.h)},C.prototype.isEqual=function(E){return this.toHex()===w$1(E).toHex()},C}(),w$1=function(C){return C instanceof j?C:new j(C)},S$1=[],k$1=function(C){C.forEach(function(E){S$1.indexOf(E)<0&&(E(j,y$2),S$1.push(E))})};function namesPlugin(C,E){var I={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},B={};for(var U in I)B[I[U]]=U;var V={};C.prototype.toName=function(X){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var Y,K,J=B[this.toHex()];if(J)return J;if(X!=null&&X.closest){var xe=this.toRgb(),Z=1/0,_e="black";if(!V.length)for(var Se in I)V[Se]=new C(I[Se]).toRgb();for(var Ee in I){var Ae=(Y=xe,K=V[Ee],Math.pow(Y.r-K.r,2)+Math.pow(Y.g-K.g,2)+Math.pow(Y.b-K.b,2));Ae<Z&&(Z=Ae,_e=Ee)}return _e}},E.string.push([function(X){var Y=X.toLowerCase(),K=Y==="transparent"?"#0000":I[Y];return K?new C(K).toRgb():null},"name"])}k$1([namesPlugin]);const _Color=class{constructor(C=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=C}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(C){return this.value=C,this}set value(C){if(C instanceof _Color)this._value=this.cloneSource(C._value),this._int=C._int,this._components.set(C._components);else{if(C===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,C))&&(this.normalize(C),this._value=this.cloneSource(C))}}get value(){return this._value}cloneSource(C){return typeof C=="string"||typeof C=="number"||C instanceof Number||C===null?C:Array.isArray(C)||ArrayBuffer.isView(C)?C.slice(0):typeof C=="object"&&C!==null?{...C}:C}isSourceEqual(C,E){const I=typeof C;if(I!==typeof E)return!1;if(I==="number"||I==="string"||C instanceof Number)return C===E;if(Array.isArray(C)&&Array.isArray(E)||ArrayBuffer.isView(C)&&ArrayBuffer.isView(E))return C.length!==E.length?!1:C.every((U,V)=>U===E[V]);if(C!==null&&E!==null){const U=Object.keys(C),V=Object.keys(E);return U.length!==V.length?!1:U.every(X=>C[X]===E[X])}return C===E}toRgba(){const[C,E,I,B]=this._components;return{r:C,g:E,b:I,a:B}}toRgb(){const[C,E,I]=this._components;return{r:C,g:E,b:I}}toRgbaString(){const[C,E,I]=this.toUint8RgbArray();return`rgba(${C},${E},${I},${this.alpha})`}toUint8RgbArray(C){const[E,I,B]=this._components;return C=C??[],C[0]=Math.round(E*255),C[1]=Math.round(I*255),C[2]=Math.round(B*255),C}toRgbArray(C){C=C??[];const[E,I,B]=this._components;return C[0]=E,C[1]=I,C[2]=B,C}toNumber(){return this._int}toLittleEndianNumber(){const C=this._int;return(C>>16)+(C&65280)+((C&255)<<16)}multiply(C){const[E,I,B,U]=_Color.temp.setValue(C)._components;return this._components[0]*=E,this._components[1]*=I,this._components[2]*=B,this._components[3]*=U,this.refreshInt(),this._value=null,this}premultiply(C,E=!0){return E&&(this._components[0]*=C,this._components[1]*=C,this._components[2]*=C),this._components[3]=C,this.refreshInt(),this._value=null,this}toPremultiplied(C){if(C===1)return(C*255<<24)+this._int;if(C===0)return 0;let E=this._int>>16&255,I=this._int>>8&255,B=this._int&255;return E=E*C+.5|0,I=I*C+.5|0,B=B*C+.5|0,(C*255<<24)+(E<<16)+(I<<8)+B}toHex(){const C=this._int.toString(16);return`#${"000000".substring(0,6-C.length)+C}`}toHexa(){const E=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-E.length)+E}setAlpha(C){return this._components[3]=this._clamp(C),this}round(C){const[E,I,B]=this._components;return this._components[0]=Math.round(E*C)/C,this._components[1]=Math.round(I*C)/C,this._components[2]=Math.round(B*C)/C,this.refreshInt(),this._value=null,this}toArray(C){C=C??[];const[E,I,B,U]=this._components;return C[0]=E,C[1]=I,C[2]=B,C[3]=U,C}normalize(C){let E;if((typeof C=="number"||C instanceof Number)&&C>=0&&C<=16777215){const I=C;E=[(I>>16&255)/255,(I>>8&255)/255,(I&255)/255,1]}else if((Array.isArray(C)||C instanceof Float32Array)&&C.length>=3&&C.length<=4){C=this._clamp(C);const[I,B,U,V=1]=C;E=[I,B,U,V]}else if((C instanceof Uint8Array||C instanceof Uint8ClampedArray)&&C.length>=3&&C.length<=4){C=this._clamp(C,0,255);const[I,B,U,V=255]=C;E=[I/255,B/255,U/255,V/255]}else if(typeof C=="string"||typeof C=="object"){if(typeof C=="string"){const B=_Color.HEX_PATTERN.exec(C);B&&(C=`#${B[2]}`)}const I=w$1(C);if(I.isValid()){const{r:B,g:U,b:V,a:X}=I.rgba;E=[B/255,U/255,V/255,X]}}if(E)this._components.set(E),this.refreshInt();else throw new Error(`Unable to convert color ${C}`)}refreshInt(){this._clamp(this._components);const[C,E,I]=this._components;this._int=(C*255<<16)+(E*255<<8)+(I*255|0)}_clamp(C,E=0,I=1){return typeof C=="number"?Math.min(Math.max(C,E),I):(C.forEach((B,U)=>{C[U]=Math.min(Math.max(B,E),I)}),C)}};let Color=_Color;Color.shared=new _Color,Color.temp=new _Color,Color.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function hex2rgb(C,E=[]){return deprecation("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Color.shared.setValue(C).toRgbArray(E)}function rgb2hex(C){return deprecation("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Color.shared.setValue(C).toNumber()}function mapPremultipliedBlendModes(){const C=[],E=[];for(let B=0;B<32;B++)C[B]=B,E[B]=B;C[BLEND_MODES.NORMAL_NPM]=BLEND_MODES.NORMAL,C[BLEND_MODES.ADD_NPM]=BLEND_MODES.ADD,C[BLEND_MODES.SCREEN_NPM]=BLEND_MODES.SCREEN,E[BLEND_MODES.NORMAL]=BLEND_MODES.NORMAL_NPM,E[BLEND_MODES.ADD]=BLEND_MODES.ADD_NPM,E[BLEND_MODES.SCREEN]=BLEND_MODES.SCREEN_NPM;const I=[];return I.push(E),I.push(C),I}const premultiplyBlendMode=mapPremultipliedBlendModes();function getBufferType(C){if(C.BYTES_PER_ELEMENT===4)return C instanceof Float32Array?"Float32Array":C instanceof Uint32Array?"Uint32Array":"Int32Array";if(C.BYTES_PER_ELEMENT===2){if(C instanceof Uint16Array)return"Uint16Array"}else if(C.BYTES_PER_ELEMENT===1&&C instanceof Uint8Array)return"Uint8Array";return null}function nextPow2(C){return C+=C===0?1:0,--C,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C+1}function isPow2(C){return!(C&C-1)&&!!C}function log2(C){let E=(C>65535?1:0)<<4;C>>>=E;let I=(C>255?1:0)<<3;return C>>>=I,E|=I,I=(C>15?1:0)<<2,C>>>=I,E|=I,I=(C>3?1:0)<<1,C>>>=I,E|=I,E|C>>1}function removeItems(C,E,I){const B=C.length;let U;if(E>=B||I===0)return;I=E+I>B?B-E:I;const V=B-I;for(U=E;U<V;++U)C[U]=C[U+I];C.length=V}let nextUid=0;function uid(){return++nextUid}const ProgramCache={},TextureCache=Object.create(null),BaseTextureCache=Object.create(null);let tempAnchor;function determineCrossOrigin(C,E=globalThis.location){if(C.startsWith("data:"))return"";E=E||globalThis.location,tempAnchor||(tempAnchor=document.createElement("a")),tempAnchor.href=C;const I=url.parse(tempAnchor.href),B=!I.port&&E.port===""||I.port===E.port;return I.hostname!==E.hostname||!B||I.protocol!==E.protocol?"anonymous":""}function getResolutionOfUrl(C,E=1){var B;const I=(B=settings.RETINA_PREFIX)==null?void 0:B.exec(C);return I?parseFloat(I[1]):E}var ExtensionType=(C=>(C.Renderer="renderer",C.Application="application",C.RendererSystem="renderer-webgl-system",C.RendererPlugin="renderer-webgl-plugin",C.CanvasRendererSystem="renderer-canvas-system",C.CanvasRendererPlugin="renderer-canvas-plugin",C.Asset="asset",C.LoadParser="load-parser",C.ResolveParser="resolve-parser",C.CacheParser="cache-parser",C.DetectionParser="detection-parser",C))(ExtensionType||{});const normalizeExtension=C=>{if(typeof C=="function"||typeof C=="object"&&C.extension){if(!C.extension)throw new Error("Extension class must have an extension object");C={...typeof C.extension!="object"?{type:C.extension}:C.extension,ref:C}}if(typeof C=="object")C={...C};else throw new Error("Invalid extension type");return typeof C.type=="string"&&(C.type=[C.type]),C},normalizePriority=(C,E)=>normalizeExtension(C).priority??E,extensions={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...C){return C.map(normalizeExtension).forEach(E=>{E.type.forEach(I=>{var B,U;return(U=(B=this._removeHandlers)[I])==null?void 0:U.call(B,E)})}),this},add(...C){return C.map(normalizeExtension).forEach(E=>{E.type.forEach(I=>{const B=this._addHandlers,U=this._queue;B[I]?B[I](E):(U[I]=U[I]||[],U[I].push(E))})}),this},handle(C,E,I){const B=this._addHandlers,U=this._removeHandlers;if(B[C]||U[C])throw new Error(`Extension type ${C} already has a handler`);B[C]=E,U[C]=I;const V=this._queue;return V[C]&&(V[C].forEach(X=>E(X)),delete V[C]),this},handleByMap(C,E){return this.handle(C,I=>{E[I.name]=I.ref},I=>{delete E[I.name]})},handleByList(C,E,I=-1){return this.handle(C,B=>{E.includes(B.ref)||(E.push(B.ref),E.sort((U,V)=>normalizePriority(V,I)-normalizePriority(U,I)))},B=>{const U=E.indexOf(B.ref);U!==-1&&E.splice(U,1)})}};class ViewableBuffer{constructor(E){typeof E=="number"?this.rawBinaryData=new ArrayBuffer(E):E instanceof Uint8Array?this.rawBinaryData=E.buffer:this.rawBinaryData=E,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(E){return this[`${E}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(E){switch(E){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${E} isn't a valid view type`)}}}const fragTemplate=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
43
+ `);function generateIfTestSrc(C){let E="";for(let I=0;I<C;++I)I>0&&(E+=`
44
+ else `),I<C-1&&(E+=`if(test == ${I}.0){}`);return E}function checkMaxIfStatementsInShader(C,E){if(C===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const I=E.createShader(E.FRAGMENT_SHADER);for(;;){const B=fragTemplate.replace(/%forloop%/gi,generateIfTestSrc(C));if(E.shaderSource(I,B),E.compileShader(I),!E.getShaderParameter(I,E.COMPILE_STATUS))C=C/2|0;else break}return C}const BLEND$1=0,OFFSET$1=1,CULLING$1=2,DEPTH_TEST$1=3,WINDING$1=4,DEPTH_MASK$1=5;let State$1=class hr{constructor(){this.data=0,this.blendMode=BLEND_MODES.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<BLEND$1)}set blend(E){!!(this.data&1<<BLEND$1)!==E&&(this.data^=1<<BLEND$1)}get offsets(){return!!(this.data&1<<OFFSET$1)}set offsets(E){!!(this.data&1<<OFFSET$1)!==E&&(this.data^=1<<OFFSET$1)}get culling(){return!!(this.data&1<<CULLING$1)}set culling(E){!!(this.data&1<<CULLING$1)!==E&&(this.data^=1<<CULLING$1)}get depthTest(){return!!(this.data&1<<DEPTH_TEST$1)}set depthTest(E){!!(this.data&1<<DEPTH_TEST$1)!==E&&(this.data^=1<<DEPTH_TEST$1)}get depthMask(){return!!(this.data&1<<DEPTH_MASK$1)}set depthMask(E){!!(this.data&1<<DEPTH_MASK$1)!==E&&(this.data^=1<<DEPTH_MASK$1)}get clockwiseFrontFace(){return!!(this.data&1<<WINDING$1)}set clockwiseFrontFace(E){!!(this.data&1<<WINDING$1)!==E&&(this.data^=1<<WINDING$1)}get blendMode(){return this._blendMode}set blendMode(E){this.blend=E!==BLEND_MODES.NONE,this._blendMode=E}get polygonOffset(){return this._polygonOffset}set polygonOffset(E){this.offsets=!!E,this._polygonOffset=E}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const E=new hr;return E.depthTest=!1,E.blend=!0,E}};const INSTALLED=[];function autoDetectResource(C,E){if(!C)return null;let I="";if(typeof C=="string"){const B=/\.(\w{3,4})(?:$|\?|#)/i.exec(C);B&&(I=B[1].toLowerCase())}for(let B=INSTALLED.length-1;B>=0;--B){const U=INSTALLED[B];if(U.test&&U.test(C,I))return new U(C,E)}throw new Error("Unrecognized source type to auto-detect Resource")}class Runner{constructor(E){this.items=[],this._name=E,this._aliasCount=0}emit(E,I,B,U,V,X,Y,K){if(arguments.length>8)throw new Error("max arguments reached");const{name:J,items:xe}=this;this._aliasCount++;for(let Z=0,_e=xe.length;Z<_e;Z++)xe[Z][J](E,I,B,U,V,X,Y,K);return xe===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(E){return E[this._name]&&(this.ensureNonAliasedItems(),this.remove(E),this.items.push(E)),this}remove(E){const I=this.items.indexOf(E);return I!==-1&&(this.ensureNonAliasedItems(),this.items.splice(I,1)),this}contains(E){return this.items.includes(E)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Runner.prototype,{dispatch:{value:Runner.prototype.emit},run:{value:Runner.prototype.emit}});class Resource{constructor(E=0,I=0){this._width=E,this._height=I,this.destroyed=!1,this.internal=!1,this.onResize=new Runner("setRealSize"),this.onUpdate=new Runner("update"),this.onError=new Runner("onError")}bind(E){this.onResize.add(E),this.onUpdate.add(E),this.onError.add(E),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(E){this.onResize.remove(E),this.onUpdate.remove(E),this.onError.remove(E)}resize(E,I){(E!==this._width||I!==this._height)&&(this._width=E,this._height=I,this.onResize.emit(E,I))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(E,I,B){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(E,I){return!1}}class BufferResource extends Resource{constructor(E,I){const{width:B,height:U}=I||{};if(!B||!U)throw new Error("BufferResource width or height invalid");super(B,U),this.data=E}upload(E,I,B){const U=E.gl;U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.alphaMode===ALPHA_MODES.UNPACK);const V=I.realWidth,X=I.realHeight;return B.width===V&&B.height===X?U.texSubImage2D(I.target,0,0,0,V,X,I.format,B.type,this.data):(B.width=V,B.height=X,U.texImage2D(I.target,0,B.internalFormat,V,X,0,I.format,B.type,this.data)),!0}dispose(){this.data=null}static test(E){return E instanceof Float32Array||E instanceof Uint8Array||E instanceof Uint32Array}}const defaultBufferOptions={scaleMode:SCALE_MODES.NEAREST,format:FORMATS.RGBA,alphaMode:ALPHA_MODES.NPM},_BaseTexture=class extends EventEmitter{constructor(C=null,E=null){super(),E=Object.assign({},_BaseTexture.defaultOptions,E);const{alphaMode:I,mipmap:B,anisotropicLevel:U,scaleMode:V,width:X,height:Y,wrapMode:K,format:J,type:xe,target:Z,resolution:_e,resourceOptions:Se}=E;C&&!(C instanceof Resource)&&(C=autoDetectResource(C,Se),C.internal=!0),this.resolution=_e||settings.RESOLUTION,this.width=Math.round((X||0)*this.resolution)/this.resolution,this.height=Math.round((Y||0)*this.resolution)/this.resolution,this._mipmap=B,this.anisotropicLevel=U,this._wrapMode=K,this._scaleMode=V,this.format=J,this.type=xe,this.target=Z,this.alphaMode=I,this.uid=uid(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=X>0&&Y>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(C)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(C){this._mipmap!==C&&(this._mipmap=C,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(C){this._scaleMode!==C&&(this._scaleMode=C,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(C){this._wrapMode!==C&&(this._wrapMode=C,this.dirtyStyleId++)}setStyle(C,E){let I;return C!==void 0&&C!==this.scaleMode&&(this.scaleMode=C,I=!0),E!==void 0&&E!==this.mipmap&&(this.mipmap=E,I=!0),I&&this.dirtyStyleId++,this}setSize(C,E,I){return I=I||this.resolution,this.setRealSize(C*I,E*I,I)}setRealSize(C,E,I){return this.resolution=I||this.resolution,this.width=Math.round(C)/this.resolution,this.height=Math.round(E)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=isPow2(this.realWidth)&&isPow2(this.realHeight)}setResolution(C){const E=this.resolution;return E===C?this:(this.resolution=C,this.valid&&(this.width=Math.round(this.width*E)/C,this.height=Math.round(this.height*E)/C,this.emit("update",this)),this._refreshPOT(),this)}setResource(C){if(this.resource===C)return this;if(this.resource)throw new Error("Resource can be set only once");return C.bind(this),this.resource=C,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(C){this.emit("error",this,C)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete BaseTextureCache[this.cacheId],delete TextureCache[this.cacheId],this.cacheId=null),this.dispose(),_BaseTexture.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(C,E,I=settings.STRICT_TEXTURE_CACHE){const B=typeof C=="string";let U=null;if(B)U=C;else{if(!C._pixiId){const X=(E==null?void 0:E.pixiIdPrefix)||"pixiid";C._pixiId=`${X}_${uid()}`}U=C._pixiId}let V=BaseTextureCache[U];if(B&&I&&!V)throw new Error(`The cacheId "${U}" does not exist in BaseTextureCache.`);return V||(V=new _BaseTexture(C,E),V.cacheId=U,_BaseTexture.addToCache(V,U)),V}static fromBuffer(C,E,I,B){C=C||new Float32Array(E*I*4);const U=new BufferResource(C,{width:E,height:I}),V=C instanceof Float32Array?TYPES.FLOAT:TYPES.UNSIGNED_BYTE;return new _BaseTexture(U,Object.assign({},defaultBufferOptions,B||{width:E,height:I,type:V}))}static addToCache(C,E){E&&(C.textureCacheIds.includes(E)||C.textureCacheIds.push(E),BaseTextureCache[E]&&BaseTextureCache[E]!==C&&console.warn(`BaseTexture added to the cache with an id [${E}] that already had an entry`),BaseTextureCache[E]=C)}static removeFromCache(C){if(typeof C=="string"){const E=BaseTextureCache[C];if(E){const I=E.textureCacheIds.indexOf(C);return I>-1&&E.textureCacheIds.splice(I,1),delete BaseTextureCache[C],E}}else if(C!=null&&C.textureCacheIds){for(let E=0;E<C.textureCacheIds.length;++E)delete BaseTextureCache[C.textureCacheIds[E]];return C.textureCacheIds.length=0,C}return null}};let BaseTexture=_BaseTexture;BaseTexture.defaultOptions={mipmap:MIPMAP_MODES.POW2,anisotropicLevel:0,scaleMode:SCALE_MODES.LINEAR,wrapMode:WRAP_MODES.CLAMP,alphaMode:ALPHA_MODES.UNPACK,target:TARGETS.TEXTURE_2D,format:FORMATS.RGBA,type:TYPES.UNSIGNED_BYTE},BaseTexture._globalBatch=0;class BatchDrawCall{constructor(){this.texArray=null,this.blend=0,this.type=DRAW_MODES.TRIANGLES,this.start=0,this.size=0,this.data=null}}let UID$4=0;class Buffer{constructor(E,I=!0,B=!1){this.data=E||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=B,this.static=I,this.id=UID$4++,this.disposeRunner=new Runner("disposeBuffer")}update(E){E instanceof Array&&(E=new Float32Array(E)),this.data=E||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(E){this.type=E?BUFFER_TYPE.ELEMENT_ARRAY_BUFFER:BUFFER_TYPE.ARRAY_BUFFER}get index(){return this.type===BUFFER_TYPE.ELEMENT_ARRAY_BUFFER}static from(E){return E instanceof Array&&(E=new Float32Array(E)),new Buffer(E)}}class Attribute{constructor(E,I=0,B=!1,U=TYPES.FLOAT,V,X,Y,K=1){this.buffer=E,this.size=I,this.normalized=B,this.type=U,this.stride=V,this.start=X,this.instance=Y,this.divisor=K}destroy(){this.buffer=null}static from(E,I,B,U,V){return new Attribute(E,I,B,U,V)}}const map$3={Float32Array,Uint32Array,Int32Array,Uint8Array};function interleaveTypedArrays(C,E){let I=0,B=0;const U={};for(let K=0;K<C.length;K++)B+=E[K],I+=C[K].length;const V=new ArrayBuffer(I*4);let X=null,Y=0;for(let K=0;K<C.length;K++){const J=E[K],xe=C[K],Z=getBufferType(xe);U[Z]||(U[Z]=new map$3[Z](V)),X=U[Z];for(let _e=0;_e<xe.length;_e++){const Se=(_e/J|0)*B+Y,Ee=_e%J;X[Se+Ee]=xe[_e]}Y+=J}return new Float32Array(V)}const byteSizeMap$1={5126:4,5123:2,5121:1};let UID$3=0;const map$2={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class Geometry{constructor(E=[],I={}){this.buffers=E,this.indexBuffer=null,this.attributes=I,this.glVertexArrayObjects={},this.id=UID$3++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new Runner("disposeGeometry"),this.refCount=0}addAttribute(E,I,B=0,U=!1,V,X,Y,K=!1){if(!I)throw new Error("You must pass a buffer when creating an attribute");I instanceof Buffer||(I instanceof Array&&(I=new Float32Array(I)),I=new Buffer(I));const J=E.split("|");if(J.length>1){for(let Z=0;Z<J.length;Z++)this.addAttribute(J[Z],I,B,U,V);return this}let xe=this.buffers.indexOf(I);return xe===-1&&(this.buffers.push(I),xe=this.buffers.length-1),this.attributes[E]=new Attribute(xe,B,U,V,X,Y,K),this.instanced=this.instanced||K,this}getAttribute(E){return this.attributes[E]}getBuffer(E){return this.buffers[this.getAttribute(E).buffer]}addIndex(E){return E instanceof Buffer||(E instanceof Array&&(E=new Uint16Array(E)),E=new Buffer(E)),E.type=BUFFER_TYPE.ELEMENT_ARRAY_BUFFER,this.indexBuffer=E,this.buffers.includes(E)||this.buffers.push(E),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const E=[],I=[],B=new Buffer;let U;for(U in this.attributes){const V=this.attributes[U],X=this.buffers[V.buffer];E.push(X.data),I.push(V.size*byteSizeMap$1[V.type]/4),V.buffer=0}for(B.data=interleaveTypedArrays(E,I),U=0;U<this.buffers.length;U++)this.buffers[U]!==this.indexBuffer&&this.buffers[U].destroy();return this.buffers=[B],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const E in this.attributes){const I=this.attributes[E];return this.buffers[I.buffer].data.length/(I.stride/4||I.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const E=new Geometry;for(let I=0;I<this.buffers.length;I++)E.buffers[I]=new Buffer(this.buffers[I].data.slice(0));for(const I in this.attributes){const B=this.attributes[I];E.attributes[I]=new Attribute(B.buffer,B.size,B.normalized,B.type,B.stride,B.start,B.instance)}return this.indexBuffer&&(E.indexBuffer=E.buffers[this.buffers.indexOf(this.indexBuffer)],E.indexBuffer.type=BUFFER_TYPE.ELEMENT_ARRAY_BUFFER),E}static merge(E){const I=new Geometry,B=[],U=[],V=[];let X;for(let Y=0;Y<E.length;Y++){X=E[Y];for(let K=0;K<X.buffers.length;K++)U[K]=U[K]||0,U[K]+=X.buffers[K].data.length,V[K]=0}for(let Y=0;Y<X.buffers.length;Y++)B[Y]=new map$2[getBufferType(X.buffers[Y].data)](U[Y]),I.buffers[Y]=new Buffer(B[Y]);for(let Y=0;Y<E.length;Y++){X=E[Y];for(let K=0;K<X.buffers.length;K++)B[K].set(X.buffers[K].data,V[K]),V[K]+=X.buffers[K].data.length}if(I.attributes=X.attributes,X.indexBuffer){I.indexBuffer=I.buffers[X.buffers.indexOf(X.indexBuffer)],I.indexBuffer.type=BUFFER_TYPE.ELEMENT_ARRAY_BUFFER;let Y=0,K=0,J=0,xe=0;for(let Z=0;Z<X.buffers.length;Z++)if(X.buffers[Z]!==X.indexBuffer){xe=Z;break}for(const Z in X.attributes){const _e=X.attributes[Z];(_e.buffer|0)===xe&&(K+=_e.size*byteSizeMap$1[_e.type]/4)}for(let Z=0;Z<E.length;Z++){const _e=E[Z].indexBuffer.data;for(let Se=0;Se<_e.length;Se++)I.indexBuffer.data[Se+J]+=Y;Y+=E[Z].buffers[xe].data.length/K,J+=_e.length}}return I}}class BatchGeometry extends Geometry{constructor(E=!1){super(),this._buffer=new Buffer(null,E,!1),this._indexBuffer=new Buffer(null,E,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,TYPES.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,TYPES.FLOAT).addAttribute("aColor",this._buffer,4,!0,TYPES.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,TYPES.FLOAT).addIndex(this._indexBuffer)}}const PI_2=Math.PI*2,RAD_TO_DEG=180/Math.PI,DEG_TO_RAD=Math.PI/180;var SHAPES=(C=>(C[C.POLY=0]="POLY",C[C.RECT=1]="RECT",C[C.CIRC=2]="CIRC",C[C.ELIP=3]="ELIP",C[C.RREC=4]="RREC",C))(SHAPES||{});class Point{constructor(E=0,I=0){this.x=0,this.y=0,this.x=E,this.y=I}clone(){return new Point(this.x,this.y)}copyFrom(E){return this.set(E.x,E.y),this}copyTo(E){return E.set(this.x,this.y),E}equals(E){return E.x===this.x&&E.y===this.y}set(E=0,I=E){return this.x=E,this.y=I,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const tempPoints$1=[new Point,new Point,new Point,new Point];class Rectangle{constructor(E=0,I=0,B=0,U=0){this.x=Number(E),this.y=Number(I),this.width=Number(B),this.height=Number(U),this.type=SHAPES.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Rectangle(0,0,0,0)}clone(){return new Rectangle(this.x,this.y,this.width,this.height)}copyFrom(E){return this.x=E.x,this.y=E.y,this.width=E.width,this.height=E.height,this}copyTo(E){return E.x=this.x,E.y=this.y,E.width=this.width,E.height=this.height,E}contains(E,I){return this.width<=0||this.height<=0?!1:E>=this.x&&E<this.x+this.width&&I>=this.y&&I<this.y+this.height}intersects(E,I){if(!I){const Ne=this.x<E.x?E.x:this.x;if((this.right>E.right?E.right:this.right)<=Ne)return!1;const Xe=this.y<E.y?E.y:this.y;return(this.bottom>E.bottom?E.bottom:this.bottom)>Xe}const B=this.left,U=this.right,V=this.top,X=this.bottom;if(U<=B||X<=V)return!1;const Y=tempPoints$1[0].set(E.left,E.top),K=tempPoints$1[1].set(E.left,E.bottom),J=tempPoints$1[2].set(E.right,E.top),xe=tempPoints$1[3].set(E.right,E.bottom);if(J.x<=Y.x||K.y<=Y.y)return!1;const Z=Math.sign(I.a*I.d-I.b*I.c);if(Z===0||(I.apply(Y,Y),I.apply(K,K),I.apply(J,J),I.apply(xe,xe),Math.max(Y.x,K.x,J.x,xe.x)<=B||Math.min(Y.x,K.x,J.x,xe.x)>=U||Math.max(Y.y,K.y,J.y,xe.y)<=V||Math.min(Y.y,K.y,J.y,xe.y)>=X))return!1;const _e=Z*(K.y-Y.y),Se=Z*(Y.x-K.x),Ee=_e*B+Se*V,Ae=_e*U+Se*V,Re=_e*B+Se*X,Te=_e*U+Se*X;if(Math.max(Ee,Ae,Re,Te)<=_e*Y.x+Se*Y.y||Math.min(Ee,Ae,Re,Te)>=_e*xe.x+Se*xe.y)return!1;const we=Z*(Y.y-J.y),Pe=Z*(J.x-Y.x),Ie=we*B+Pe*V,Me=we*U+Pe*V,Oe=we*B+Pe*X,Le=we*U+Pe*X;return!(Math.max(Ie,Me,Oe,Le)<=we*Y.x+Pe*Y.y||Math.min(Ie,Me,Oe,Le)>=we*xe.x+Pe*xe.y)}pad(E=0,I=E){return this.x-=E,this.y-=I,this.width+=E*2,this.height+=I*2,this}fit(E){const I=Math.max(this.x,E.x),B=Math.min(this.x+this.width,E.x+E.width),U=Math.max(this.y,E.y),V=Math.min(this.y+this.height,E.y+E.height);return this.x=I,this.width=Math.max(B-I,0),this.y=U,this.height=Math.max(V-U,0),this}ceil(E=1,I=.001){const B=Math.ceil((this.x+this.width-I)*E)/E,U=Math.ceil((this.y+this.height-I)*E)/E;return this.x=Math.floor((this.x+I)*E)/E,this.y=Math.floor((this.y+I)*E)/E,this.width=B-this.x,this.height=U-this.y,this}enlarge(E){const I=Math.min(this.x,E.x),B=Math.max(this.x+this.width,E.x+E.width),U=Math.min(this.y,E.y),V=Math.max(this.y+this.height,E.y+E.height);return this.x=I,this.width=B-I,this.y=U,this.height=V-U,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Circle{constructor(E=0,I=0,B=0){this.x=E,this.y=I,this.radius=B,this.type=SHAPES.CIRC}clone(){return new Circle(this.x,this.y,this.radius)}contains(E,I){if(this.radius<=0)return!1;const B=this.radius*this.radius;let U=this.x-E,V=this.y-I;return U*=U,V*=V,U+V<=B}getBounds(){return new Rectangle(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let Ellipse$1=class ur{constructor(E=0,I=0,B=0,U=0){this.x=E,this.y=I,this.width=B,this.height=U,this.type=SHAPES.ELIP}clone(){return new ur(this.x,this.y,this.width,this.height)}contains(E,I){if(this.width<=0||this.height<=0)return!1;let B=(E-this.x)/this.width,U=(I-this.y)/this.height;return B*=B,U*=U,B+U<=1}getBounds(){return new Rectangle(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class Polygon{constructor(...E){let I=Array.isArray(E[0])?E[0]:E;if(typeof I[0]!="number"){const B=[];for(let U=0,V=I.length;U<V;U++)B.push(I[U].x,I[U].y);I=B}this.points=I,this.type=SHAPES.POLY,this.closeStroke=!0}clone(){const E=this.points.slice(),I=new Polygon(E);return I.closeStroke=this.closeStroke,I}contains(E,I){let B=!1;const U=this.points.length/2;for(let V=0,X=U-1;V<U;X=V++){const Y=this.points[V*2],K=this.points[V*2+1],J=this.points[X*2],xe=this.points[X*2+1];K>I!=xe>I&&E<(J-Y)*((I-K)/(xe-K))+Y&&(B=!B)}return B}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((E,I)=>`${E}, ${I}`,"")}]`}}class RoundedRectangle{constructor(E=0,I=0,B=0,U=0,V=20){this.x=E,this.y=I,this.width=B,this.height=U,this.radius=V,this.type=SHAPES.RREC}clone(){return new RoundedRectangle(this.x,this.y,this.width,this.height,this.radius)}contains(E,I){if(this.width<=0||this.height<=0)return!1;if(E>=this.x&&E<=this.x+this.width&&I>=this.y&&I<=this.y+this.height){const B=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(I>=this.y+B&&I<=this.y+this.height-B||E>=this.x+B&&E<=this.x+this.width-B)return!0;let U=E-(this.x+B),V=I-(this.y+B);const X=B*B;if(U*U+V*V<=X||(U=E-(this.x+this.width-B),U*U+V*V<=X)||(V=I-(this.y+this.height-B),U*U+V*V<=X)||(U=E-(this.x+B),U*U+V*V<=X))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let Matrix$2=class tr{constructor(E=1,I=0,B=0,U=1,V=0,X=0){this.array=null,this.a=E,this.b=I,this.c=B,this.d=U,this.tx=V,this.ty=X}fromArray(E){this.a=E[0],this.b=E[1],this.c=E[3],this.d=E[4],this.tx=E[2],this.ty=E[5]}set(E,I,B,U,V,X){return this.a=E,this.b=I,this.c=B,this.d=U,this.tx=V,this.ty=X,this}toArray(E,I){this.array||(this.array=new Float32Array(9));const B=I||this.array;return E?(B[0]=this.a,B[1]=this.b,B[2]=0,B[3]=this.c,B[4]=this.d,B[5]=0,B[6]=this.tx,B[7]=this.ty,B[8]=1):(B[0]=this.a,B[1]=this.c,B[2]=this.tx,B[3]=this.b,B[4]=this.d,B[5]=this.ty,B[6]=0,B[7]=0,B[8]=1),B}apply(E,I){I=I||new Point;const B=E.x,U=E.y;return I.x=this.a*B+this.c*U+this.tx,I.y=this.b*B+this.d*U+this.ty,I}applyInverse(E,I){I=I||new Point;const B=1/(this.a*this.d+this.c*-this.b),U=E.x,V=E.y;return I.x=this.d*B*U+-this.c*B*V+(this.ty*this.c-this.tx*this.d)*B,I.y=this.a*B*V+-this.b*B*U+(-this.ty*this.a+this.tx*this.b)*B,I}translate(E,I){return this.tx+=E,this.ty+=I,this}scale(E,I){return this.a*=E,this.d*=I,this.c*=E,this.b*=I,this.tx*=E,this.ty*=I,this}rotate(E){const I=Math.cos(E),B=Math.sin(E),U=this.a,V=this.c,X=this.tx;return this.a=U*I-this.b*B,this.b=U*B+this.b*I,this.c=V*I-this.d*B,this.d=V*B+this.d*I,this.tx=X*I-this.ty*B,this.ty=X*B+this.ty*I,this}append(E){const I=this.a,B=this.b,U=this.c,V=this.d;return this.a=E.a*I+E.b*U,this.b=E.a*B+E.b*V,this.c=E.c*I+E.d*U,this.d=E.c*B+E.d*V,this.tx=E.tx*I+E.ty*U+this.tx,this.ty=E.tx*B+E.ty*V+this.ty,this}setTransform(E,I,B,U,V,X,Y,K,J){return this.a=Math.cos(Y+J)*V,this.b=Math.sin(Y+J)*V,this.c=-Math.sin(Y-K)*X,this.d=Math.cos(Y-K)*X,this.tx=E-(B*this.a+U*this.c),this.ty=I-(B*this.b+U*this.d),this}prepend(E){const I=this.tx;if(E.a!==1||E.b!==0||E.c!==0||E.d!==1){const B=this.a,U=this.c;this.a=B*E.a+this.b*E.c,this.b=B*E.b+this.b*E.d,this.c=U*E.a+this.d*E.c,this.d=U*E.b+this.d*E.d}return this.tx=I*E.a+this.ty*E.c+E.tx,this.ty=I*E.b+this.ty*E.d+E.ty,this}decompose(E){const I=this.a,B=this.b,U=this.c,V=this.d,X=E.pivot,Y=-Math.atan2(-U,V),K=Math.atan2(B,I),J=Math.abs(Y+K);return J<1e-5||Math.abs(PI_2-J)<1e-5?(E.rotation=K,E.skew.x=E.skew.y=0):(E.rotation=0,E.skew.x=Y,E.skew.y=K),E.scale.x=Math.sqrt(I*I+B*B),E.scale.y=Math.sqrt(U*U+V*V),E.position.x=this.tx+(X.x*I+X.y*U),E.position.y=this.ty+(X.x*B+X.y*V),E}invert(){const E=this.a,I=this.b,B=this.c,U=this.d,V=this.tx,X=E*U-I*B;return this.a=U/X,this.b=-I/X,this.c=-B/X,this.d=E/X,this.tx=(B*this.ty-U*V)/X,this.ty=-(E*this.ty-I*V)/X,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const E=new tr;return E.a=this.a,E.b=this.b,E.c=this.c,E.d=this.d,E.tx=this.tx,E.ty=this.ty,E}copyTo(E){return E.a=this.a,E.b=this.b,E.c=this.c,E.d=this.d,E.tx=this.tx,E.ty=this.ty,E}copyFrom(E){return this.a=E.a,this.b=E.b,this.c=E.c,this.d=E.d,this.tx=E.tx,this.ty=E.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new tr}static get TEMP_MATRIX(){return new tr}};const ux=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],uy=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],vx=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],vy=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],rotationCayley=[],rotationMatrices=[],signum=Math.sign;function init(){for(let C=0;C<16;C++){const E=[];rotationCayley.push(E);for(let I=0;I<16;I++){const B=signum(ux[C]*ux[I]+vx[C]*uy[I]),U=signum(uy[C]*ux[I]+vy[C]*uy[I]),V=signum(ux[C]*vx[I]+vx[C]*vy[I]),X=signum(uy[C]*vx[I]+vy[C]*vy[I]);for(let Y=0;Y<16;Y++)if(ux[Y]===B&&uy[Y]===U&&vx[Y]===V&&vy[Y]===X){E.push(Y);break}}}for(let C=0;C<16;C++){const E=new Matrix$2;E.set(ux[C],uy[C],vx[C],vy[C],0,0),rotationMatrices.push(E)}}init();const groupD8={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:C=>ux[C],uY:C=>uy[C],vX:C=>vx[C],vY:C=>vy[C],inv:C=>C&8?C&15:-C&7,add:(C,E)=>rotationCayley[C][E],sub:(C,E)=>rotationCayley[C][groupD8.inv(E)],rotate180:C=>C^4,isVertical:C=>(C&3)===2,byDirection:(C,E)=>Math.abs(C)*2<=Math.abs(E)?E>=0?groupD8.S:groupD8.N:Math.abs(E)*2<=Math.abs(C)?C>0?groupD8.E:groupD8.W:E>0?C>0?groupD8.SE:groupD8.SW:C>0?groupD8.NE:groupD8.NW,matrixAppendRotationInv:(C,E,I=0,B=0)=>{const U=rotationMatrices[groupD8.inv(E)];U.tx=I,U.ty=B,C.append(U)}};class ObservablePoint{constructor(E,I,B=0,U=0){this._x=B,this._y=U,this.cb=E,this.scope=I}clone(E=this.cb,I=this.scope){return new ObservablePoint(E,I,this._x,this._y)}set(E=0,I=E){return(this._x!==E||this._y!==I)&&(this._x=E,this._y=I,this.cb.call(this.scope)),this}copyFrom(E){return(this._x!==E.x||this._y!==E.y)&&(this._x=E.x,this._y=E.y,this.cb.call(this.scope)),this}copyTo(E){return E.set(this._x,this._y),E}equals(E){return E.x===this._x&&E.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(E){this._x!==E&&(this._x=E,this.cb.call(this.scope))}get y(){return this._y}set y(E){this._y!==E&&(this._y=E,this.cb.call(this.scope))}}const _Transform=class{constructor(){this.worldTransform=new Matrix$2,this.localTransform=new Matrix$2,this.position=new ObservablePoint(this.onChange,this,0,0),this.scale=new ObservablePoint(this.onChange,this,1,1),this.pivot=new ObservablePoint(this.onChange,this,0,0),this.skew=new ObservablePoint(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const C=this.localTransform;this._localID!==this._currentLocalID&&(C.a=this._cx*this.scale.x,C.b=this._sx*this.scale.x,C.c=this._cy*this.scale.y,C.d=this._sy*this.scale.y,C.tx=this.position.x-(this.pivot.x*C.a+this.pivot.y*C.c),C.ty=this.position.y-(this.pivot.x*C.b+this.pivot.y*C.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(C){const E=this.localTransform;if(this._localID!==this._currentLocalID&&(E.a=this._cx*this.scale.x,E.b=this._sx*this.scale.x,E.c=this._cy*this.scale.y,E.d=this._sy*this.scale.y,E.tx=this.position.x-(this.pivot.x*E.a+this.pivot.y*E.c),E.ty=this.position.y-(this.pivot.x*E.b+this.pivot.y*E.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==C._worldID){const I=C.worldTransform,B=this.worldTransform;B.a=E.a*I.a+E.b*I.c,B.b=E.a*I.b+E.b*I.d,B.c=E.c*I.a+E.d*I.c,B.d=E.c*I.b+E.d*I.d,B.tx=E.tx*I.a+E.ty*I.c+I.tx,B.ty=E.tx*I.b+E.ty*I.d+I.ty,this._parentID=C._worldID,this._worldID++}}setFromMatrix(C){C.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(C){this._rotation!==C&&(this._rotation=C,this.updateSkew())}};let Transform=_Transform;Transform.IDENTITY=new _Transform;var defaultFragment$2=`varying vec2 vTextureCoord;
45
45
 
46
46
  uniform sampler2D uSampler;
47
47
 
48
48
  void main(void){
49
49
  gl_FragColor *= texture2D(uSampler, vTextureCoord);
50
- }`,rb=`attribute vec2 aVertexPosition;
50
+ }`,defaultVertex$2=`attribute vec2 aVertexPosition;
51
51
  attribute vec2 aTextureCoord;
52
52
 
53
53
  uniform mat3 projectionMatrix;
@@ -58,64 +58,64 @@ void main(void){
58
58
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
59
59
  vTextureCoord = aTextureCoord;
60
60
  }
61
- `;function Iu(t,e,r){const i=t.createShader(e);return t.shaderSource(i,r),t.compileShader(i),i}function ha(t){const e=new Array(t);for(let r=0;r<e.length;r++)e[r]=!1;return e}function Ru(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return ha(2*e);case"bvec3":return ha(3*e);case"bvec4":return ha(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const Cr=[{test:t=>t.type==="float"&&t.size===1&&!t.isArray,code:t=>`
62
- if(uv["${t}"] !== ud["${t}"].value)
61
+ `;function compileShader(C,E,I){const B=C.createShader(E);return C.shaderSource(B,I),C.compileShader(B),B}function booleanArray(C){const E=new Array(C);for(let I=0;I<E.length;I++)E[I]=!1;return E}function defaultValue(C,E){switch(C){case"float":return 0;case"vec2":return new Float32Array(2*E);case"vec3":return new Float32Array(3*E);case"vec4":return new Float32Array(4*E);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*E);case"ivec3":return new Int32Array(3*E);case"ivec4":return new Int32Array(4*E);case"uvec2":return new Uint32Array(2*E);case"uvec3":return new Uint32Array(3*E);case"uvec4":return new Uint32Array(4*E);case"bool":return!1;case"bvec2":return booleanArray(2*E);case"bvec3":return booleanArray(3*E);case"bvec4":return booleanArray(4*E);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const uniformParsers=[{test:C=>C.type==="float"&&C.size===1&&!C.isArray,code:C=>`
62
+ if(uv["${C}"] !== ud["${C}"].value)
63
63
  {
64
- ud["${t}"].value = uv["${t}"]
65
- gl.uniform1f(ud["${t}"].location, uv["${t}"])
64
+ ud["${C}"].value = uv["${C}"]
65
+ gl.uniform1f(ud["${C}"].location, uv["${C}"])
66
66
  }
67
- `},{test:(t,e)=>(t.type==="sampler2D"||t.type==="samplerCube"||t.type==="sampler2DArray")&&t.size===1&&!t.isArray&&(e==null||e.castToBaseTexture!==void 0),code:t=>`t = syncData.textureCount++;
67
+ `},{test:(C,E)=>(C.type==="sampler2D"||C.type==="samplerCube"||C.type==="sampler2DArray")&&C.size===1&&!C.isArray&&(E==null||E.castToBaseTexture!==void 0),code:C=>`t = syncData.textureCount++;
68
68
 
69
- renderer.texture.bind(uv["${t}"], t);
69
+ renderer.texture.bind(uv["${C}"], t);
70
70
 
71
- if(ud["${t}"].value !== t)
71
+ if(ud["${C}"].value !== t)
72
72
  {
73
- ud["${t}"].value = t;
74
- gl.uniform1i(ud["${t}"].location, t);
73
+ ud["${C}"].value = t;
74
+ gl.uniform1i(ud["${C}"].location, t);
75
75
  ; // eslint-disable-line max-len
76
- }`},{test:(t,e)=>t.type==="mat3"&&t.size===1&&!t.isArray&&e.a!==void 0,code:t=>`
77
- gl.uniformMatrix3fv(ud["${t}"].location, false, uv["${t}"].toArray(true));
78
- `,codeUbo:t=>`
79
- var ${t}_matrix = uv.${t}.toArray(true);
80
-
81
- data[offset] = ${t}_matrix[0];
82
- data[offset+1] = ${t}_matrix[1];
83
- data[offset+2] = ${t}_matrix[2];
76
+ }`},{test:(C,E)=>C.type==="mat3"&&C.size===1&&!C.isArray&&E.a!==void 0,code:C=>`
77
+ gl.uniformMatrix3fv(ud["${C}"].location, false, uv["${C}"].toArray(true));
78
+ `,codeUbo:C=>`
79
+ var ${C}_matrix = uv.${C}.toArray(true);
80
+
81
+ data[offset] = ${C}_matrix[0];
82
+ data[offset+1] = ${C}_matrix[1];
83
+ data[offset+2] = ${C}_matrix[2];
84
84
 
85
- data[offset + 4] = ${t}_matrix[3];
86
- data[offset + 5] = ${t}_matrix[4];
87
- data[offset + 6] = ${t}_matrix[5];
85
+ data[offset + 4] = ${C}_matrix[3];
86
+ data[offset + 5] = ${C}_matrix[4];
87
+ data[offset + 6] = ${C}_matrix[5];
88
88
 
89
- data[offset + 8] = ${t}_matrix[6];
90
- data[offset + 9] = ${t}_matrix[7];
91
- data[offset + 10] = ${t}_matrix[8];
92
- `},{test:(t,e)=>t.type==="vec2"&&t.size===1&&!t.isArray&&e.x!==void 0,code:t=>`
93
- cv = ud["${t}"].value;
94
- v = uv["${t}"];
89
+ data[offset + 8] = ${C}_matrix[6];
90
+ data[offset + 9] = ${C}_matrix[7];
91
+ data[offset + 10] = ${C}_matrix[8];
92
+ `},{test:(C,E)=>C.type==="vec2"&&C.size===1&&!C.isArray&&E.x!==void 0,code:C=>`
93
+ cv = ud["${C}"].value;
94
+ v = uv["${C}"];
95
95
 
96
96
  if(cv[0] !== v.x || cv[1] !== v.y)
97
97
  {
98
98
  cv[0] = v.x;
99
99
  cv[1] = v.y;
100
- gl.uniform2f(ud["${t}"].location, v.x, v.y);
101
- }`,codeUbo:t=>`
102
- v = uv.${t};
100
+ gl.uniform2f(ud["${C}"].location, v.x, v.y);
101
+ }`,codeUbo:C=>`
102
+ v = uv.${C};
103
103
 
104
104
  data[offset] = v.x;
105
105
  data[offset+1] = v.y;
106
- `},{test:t=>t.type==="vec2"&&t.size===1&&!t.isArray,code:t=>`
107
- cv = ud["${t}"].value;
108
- v = uv["${t}"];
106
+ `},{test:C=>C.type==="vec2"&&C.size===1&&!C.isArray,code:C=>`
107
+ cv = ud["${C}"].value;
108
+ v = uv["${C}"];
109
109
 
110
110
  if(cv[0] !== v[0] || cv[1] !== v[1])
111
111
  {
112
112
  cv[0] = v[0];
113
113
  cv[1] = v[1];
114
- gl.uniform2f(ud["${t}"].location, v[0], v[1]);
114
+ gl.uniform2f(ud["${C}"].location, v[0], v[1]);
115
115
  }
116
- `},{test:(t,e)=>t.type==="vec4"&&t.size===1&&!t.isArray&&e.width!==void 0,code:t=>`
117
- cv = ud["${t}"].value;
118
- v = uv["${t}"];
116
+ `},{test:(C,E)=>C.type==="vec4"&&C.size===1&&!C.isArray&&E.width!==void 0,code:C=>`
117
+ cv = ud["${C}"].value;
118
+ v = uv["${C}"];
119
119
 
120
120
  if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
121
121
  {
@@ -123,17 +123,17 @@ void main(void){
123
123
  cv[1] = v.y;
124
124
  cv[2] = v.width;
125
125
  cv[3] = v.height;
126
- gl.uniform4f(ud["${t}"].location, v.x, v.y, v.width, v.height)
127
- }`,codeUbo:t=>`
128
- v = uv.${t};
126
+ gl.uniform4f(ud["${C}"].location, v.x, v.y, v.width, v.height)
127
+ }`,codeUbo:C=>`
128
+ v = uv.${C};
129
129
 
130
130
  data[offset] = v.x;
131
131
  data[offset+1] = v.y;
132
132
  data[offset+2] = v.width;
133
133
  data[offset+3] = v.height;
134
- `},{test:(t,e)=>t.type==="vec4"&&t.size===1&&!t.isArray&&e.red!==void 0,code:t=>`
135
- cv = ud["${t}"].value;
136
- v = uv["${t}"];
134
+ `},{test:(C,E)=>C.type==="vec4"&&C.size===1&&!C.isArray&&E.red!==void 0,code:C=>`
135
+ cv = ud["${C}"].value;
136
+ v = uv["${C}"];
137
137
 
138
138
  if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)
139
139
  {
@@ -141,17 +141,17 @@ void main(void){
141
141
  cv[1] = v.green;
142
142
  cv[2] = v.blue;
143
143
  cv[3] = v.alpha;
144
- gl.uniform4f(ud["${t}"].location, v.red, v.green, v.blue, v.alpha)
145
- }`,codeUbo:t=>`
146
- v = uv.${t};
144
+ gl.uniform4f(ud["${C}"].location, v.red, v.green, v.blue, v.alpha)
145
+ }`,codeUbo:C=>`
146
+ v = uv.${C};
147
147
 
148
148
  data[offset] = v.red;
149
149
  data[offset+1] = v.green;
150
150
  data[offset+2] = v.blue;
151
151
  data[offset+3] = v.alpha;
152
- `},{test:(t,e)=>t.type==="vec3"&&t.size===1&&!t.isArray&&e.red!==void 0,code:t=>`
153
- cv = ud["${t}"].value;
154
- v = uv["${t}"];
152
+ `},{test:(C,E)=>C.type==="vec3"&&C.size===1&&!C.isArray&&E.red!==void 0,code:C=>`
153
+ cv = ud["${C}"].value;
154
+ v = uv["${C}"];
155
155
 
156
156
  if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)
157
157
  {
@@ -159,16 +159,16 @@ void main(void){
159
159
  cv[1] = v.green;
160
160
  cv[2] = v.blue;
161
161
 
162
- gl.uniform3f(ud["${t}"].location, v.red, v.green, v.blue)
163
- }`,codeUbo:t=>`
164
- v = uv.${t};
162
+ gl.uniform3f(ud["${C}"].location, v.red, v.green, v.blue)
163
+ }`,codeUbo:C=>`
164
+ v = uv.${C};
165
165
 
166
166
  data[offset] = v.red;
167
167
  data[offset+1] = v.green;
168
168
  data[offset+2] = v.blue;
169
- `},{test:t=>t.type==="vec4"&&t.size===1&&!t.isArray,code:t=>`
170
- cv = ud["${t}"].value;
171
- v = uv["${t}"];
169
+ `},{test:C=>C.type==="vec4"&&C.size===1&&!C.isArray,code:C=>`
170
+ cv = ud["${C}"].value;
171
+ v = uv["${C}"];
172
172
 
173
173
  if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
174
174
  {
@@ -177,8 +177,8 @@ void main(void){
177
177
  cv[2] = v[2];
178
178
  cv[3] = v[3];
179
179
 
180
- gl.uniform4f(ud["${t}"].location, v[0], v[1], v[2], v[3])
181
- }`}],ib={float:`
180
+ gl.uniform4f(ud["${C}"].location, v[0], v[1], v[2], v[3])
181
+ }`}],GLSL_TO_SINGLE_SETTERS_CACHED={float:`
182
182
  if (cv !== v)
183
183
  {
184
184
  cu.value = v;
@@ -314,36 +314,36 @@ void main(void){
314
314
  cu.value = v;
315
315
 
316
316
  gl.uniform1i(location, v);
317
- }`},nb={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function sb(t,e){var i;const r=[`
317
+ }`},GLSL_TO_ARRAY_SETTERS={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function generateUniformsSync(C,E){var B;const I=[`
318
318
  var v = null;
319
319
  var cv = null;
320
320
  var cu = null;
321
321
  var t = 0;
322
322
  var gl = renderer.gl;
323
- `];for(const n in t.uniforms){const s=e[n];if(!s){(i=t.uniforms[n])!=null&&i.group&&(t.uniforms[n].ubo?r.push(`
324
- renderer.shader.syncUniformBufferGroup(uv.${n}, '${n}');
325
- `):r.push(`
326
- renderer.shader.syncUniformGroup(uv.${n}, syncData);
327
- `));continue}const a=t.uniforms[n];let o=!1;for(let u=0;u<Cr.length;u++)if(Cr[u].test(s,a)){r.push(Cr[u].code(n,a)),o=!0;break}if(!o){const h=(s.size===1&&!s.isArray?ib:nb)[s.type].replace("location",`ud["${n}"].location`);r.push(`
328
- cu = ud["${n}"];
323
+ `];for(const U in C.uniforms){const V=E[U];if(!V){(B=C.uniforms[U])!=null&&B.group&&(C.uniforms[U].ubo?I.push(`
324
+ renderer.shader.syncUniformBufferGroup(uv.${U}, '${U}');
325
+ `):I.push(`
326
+ renderer.shader.syncUniformGroup(uv.${U}, syncData);
327
+ `));continue}const X=C.uniforms[U];let Y=!1;for(let K=0;K<uniformParsers.length;K++)if(uniformParsers[K].test(V,X)){I.push(uniformParsers[K].code(U,X)),Y=!0;break}if(!Y){const J=(V.size===1&&!V.isArray?GLSL_TO_SINGLE_SETTERS_CACHED:GLSL_TO_ARRAY_SETTERS)[V.type].replace("location",`ud["${U}"].location`);I.push(`
328
+ cu = ud["${U}"];
329
329
  cv = cu.value;
330
- v = uv["${n}"];
331
- ${h};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
332
- `))}const Pu={};let Ir=Pu;function ab(){if(Ir===Pu||Ir!=null&&Ir.isContextLost()){const t=Q.ADAPTER.createCanvas();let e;Q.PREFER_ENV>=$t.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Ir=e}return Ir}let cn;function ob(){if(!cn){cn=Ke.MEDIUM;const t=ab();t&&t.getShaderPrecisionFormat&&(cn=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision?Ke.HIGH:Ke.MEDIUM)}return cn}function Mu(t,e){const r=t.getShaderSource(e).split(`
333
- `).map((h,d)=>`${d}: ${h}`),i=t.getShaderInfoLog(e),n=i.split(`
334
- `),s={},a=n.map(h=>parseFloat(h.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(h=>h&&!s[h]?(s[h]=!0,!0):!1),o=[""];a.forEach(h=>{r[h-1]=`%c${r[h-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const u=r.join(`
335
- `);o[0]=u,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function lb(t,e,r,i){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||Mu(t,r),t.getShaderParameter(i,t.COMPILE_STATUS)||Mu(t,i),console.error("PixiJS Error: Could not initialize shader."),t.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}const ub={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Fu(t){return ub[t]}let hn=null;const Ou={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Nu(t,e){if(!hn){const r=Object.keys(Ou);hn={};for(let i=0;i<r.length;++i){const n=r[i];hn[t[n]]=Ou[n]}}return hn[e]}function ku(t,e,r){if(t.substring(0,9)!=="precision"){let i=e;return e===Ke.HIGH&&r!==Ke.HIGH&&(i=Ke.MEDIUM),`precision ${i} float;
336
- ${t}`}else if(r!==Ke.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}let li;function cb(){if(typeof li=="boolean")return li;try{li=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{li=!1}return li}let hb=0;const fn={},Rr=class{constructor(t,e,r="pixi-shader",i={}){this.extra={},this.id=hb++,this.vertexSrc=t||Rr.defaultVertexSrc,this.fragmentSrc=e||Rr.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=i,this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),fn[r]?(fn[r]++,r+=`-${fn[r]}`):fn[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
337
- ${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${r}
338
- ${this.fragmentSrc}`,this.vertexSrc=ku(this.vertexSrc,Rr.defaultVertexPrecision,Ke.HIGH),this.fragmentSrc=ku(this.fragmentSrc,Rr.defaultFragmentPrecision,ob())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return rb}static get defaultFragmentSrc(){return tb}static from(t,e,r){const i=t+e;let n=xu[i];return n||(xu[i]=n=new Rr(t,e,r)),n}};let Tt=Rr;Tt.defaultVertexPrecision=Ke.HIGH,Tt.defaultFragmentPrecision=pr.apple.device?Ke.HIGH:Ke.MEDIUM;let fb=0;class tt{constructor(e,r,i){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=fb++,this.static=!!r,this.ubo=!!i,e instanceof Be?(this.buffer=e,this.buffer.type=pt.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new Be(new Float32Array(1)),this.buffer.type=pt.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,r,i){if(!this.ubo)this.uniforms[e]=new tt(r,i);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,r,i){return new tt(e,r,i)}static uboFrom(e,r){return new tt(e,r??!0,!0)}}class ui{constructor(e,r){this.uniformBindCount=0,this.program=e,r?r instanceof tt?this.uniformGroup=r:this.uniformGroup=new tt(r):this.uniformGroup=new tt({}),this.disposeRunner=new et("disposeShader")}checkUniformExists(e,r){if(r.uniforms[e])return!0;for(const i in r.uniforms){const n=r.uniforms[i];if(n.group&&this.checkUniformExists(e,n))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,r,i){const n=Tt.from(e,r);return new ui(n,i)}}class db{constructor(e,r){if(this.vertexSrc=e,this.fragTemplate=r,this.programCache={},this.defaultGroupCache={},!r.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!r.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const i=new Int32Array(e);for(let s=0;s<e;s++)i[s]=s;this.defaultGroupCache[e]=tt.from({uSamplers:i},!0);let n=this.fragTemplate;n=n.replace(/%count%/gi,`${e}`),n=n.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new Tt(this.vertexSrc,n)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new Ue,default:this.defaultGroupCache[e]};return new ui(this.programCache[e],r)}generateSampleSrc(e){let r="";r+=`
339
- `,r+=`
340
- `;for(let i=0;i<e;i++)i>0&&(r+=`
341
- else `),i<e-1&&(r+=`if(vTextureId < ${i}.5)`),r+=`
342
- {`,r+=`
343
- color = texture2D(uSamplers[${i}], vTextureCoord);`,r+=`
344
- }`;return r+=`
345
- `,r+=`
346
- `,r}}class fa{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function pb(){return!pr.apple.device}function mb(t){let e=!0;const r=Q.ADAPTER.getNavigator();if(pr.tablet||pr.phone){if(pr.apple.device){const i=r.userAgent.match(/OS (\d+)_(\d+)?/);i&&parseInt(i[1],10)<11&&(e=!1)}if(pr.android.device){const i=r.userAgent.match(/Android\s([0-9.]*)/);i&&parseInt(i[1],10)<7&&(e=!1)}}return e?t:4}class Lu{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var gb=`varying vec2 vTextureCoord;
330
+ v = uv["${U}"];
331
+ ${J};`)}}return new Function("ud","uv","renderer","syncData",I.join(`
332
+ `))}const unknownContext={};let context=unknownContext;function getTestContext(){if(context===unknownContext||context!=null&&context.isContextLost()){const C=settings.ADAPTER.createCanvas();let E;settings.PREFER_ENV>=ENV.WEBGL2&&(E=C.getContext("webgl2",{})),E||(E=C.getContext("webgl",{})||C.getContext("experimental-webgl",{}),E?E.getExtension("WEBGL_draw_buffers"):E=null),context=E}return context}let maxFragmentPrecision;function getMaxFragmentPrecision(){if(!maxFragmentPrecision){maxFragmentPrecision=PRECISION.MEDIUM;const C=getTestContext();C&&C.getShaderPrecisionFormat&&(maxFragmentPrecision=C.getShaderPrecisionFormat(C.FRAGMENT_SHADER,C.HIGH_FLOAT).precision?PRECISION.HIGH:PRECISION.MEDIUM)}return maxFragmentPrecision}function logPrettyShaderError(C,E){const I=C.getShaderSource(E).split(`
333
+ `).map((J,xe)=>`${xe}: ${J}`),B=C.getShaderInfoLog(E),U=B.split(`
334
+ `),V={},X=U.map(J=>parseFloat(J.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(J=>J&&!V[J]?(V[J]=!0,!0):!1),Y=[""];X.forEach(J=>{I[J-1]=`%c${I[J-1]}%c`,Y.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const K=I.join(`
335
+ `);Y[0]=K,console.error(B),console.groupCollapsed("click to view full shader code"),console.warn(...Y),console.groupEnd()}function logProgramError(C,E,I,B){C.getProgramParameter(E,C.LINK_STATUS)||(C.getShaderParameter(I,C.COMPILE_STATUS)||logPrettyShaderError(C,I),C.getShaderParameter(B,C.COMPILE_STATUS)||logPrettyShaderError(C,B),console.error("PixiJS Error: Could not initialize shader."),C.getProgramInfoLog(E)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",C.getProgramInfoLog(E)))}const GLSL_TO_SIZE={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function mapSize(C){return GLSL_TO_SIZE[C]}let GL_TABLE=null;const GL_TO_GLSL_TYPES={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function mapType(C,E){if(!GL_TABLE){const I=Object.keys(GL_TO_GLSL_TYPES);GL_TABLE={};for(let B=0;B<I.length;++B){const U=I[B];GL_TABLE[C[U]]=GL_TO_GLSL_TYPES[U]}}return GL_TABLE[E]}function setPrecision(C,E,I){if(C.substring(0,9)!=="precision"){let B=E;return E===PRECISION.HIGH&&I!==PRECISION.HIGH&&(B=PRECISION.MEDIUM),`precision ${B} float;
336
+ ${C}`}else if(I!==PRECISION.HIGH&&C.substring(0,15)==="precision highp")return C.replace("precision highp","precision mediump");return C}let unsafeEval;function unsafeEvalSupported(){if(typeof unsafeEval=="boolean")return unsafeEval;try{unsafeEval=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{unsafeEval=!1}return unsafeEval}let UID$2=0;const nameCache={},_Program=class{constructor(C,E,I="pixi-shader",B={}){this.extra={},this.id=UID$2++,this.vertexSrc=C||_Program.defaultVertexSrc,this.fragmentSrc=E||_Program.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=B,this.vertexSrc.substring(0,8)!=="#version"&&(I=I.replace(/\s+/g,"-"),nameCache[I]?(nameCache[I]++,I+=`-${nameCache[I]}`):nameCache[I]=1,this.vertexSrc=`#define SHADER_NAME ${I}
337
+ ${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${I}
338
+ ${this.fragmentSrc}`,this.vertexSrc=setPrecision(this.vertexSrc,_Program.defaultVertexPrecision,PRECISION.HIGH),this.fragmentSrc=setPrecision(this.fragmentSrc,_Program.defaultFragmentPrecision,getMaxFragmentPrecision())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return defaultVertex$2}static get defaultFragmentSrc(){return defaultFragment$2}static from(C,E,I){const B=C+E;let U=ProgramCache[B];return U||(ProgramCache[B]=U=new _Program(C,E,I)),U}};let Program=_Program;Program.defaultVertexPrecision=PRECISION.HIGH,Program.defaultFragmentPrecision=isMobile.apple.device?PRECISION.HIGH:PRECISION.MEDIUM;let UID$1=0;class UniformGroup{constructor(E,I,B){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=UID$1++,this.static=!!I,this.ubo=!!B,E instanceof Buffer?(this.buffer=E,this.buffer.type=BUFFER_TYPE.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=E,this.ubo&&(this.buffer=new Buffer(new Float32Array(1)),this.buffer.type=BUFFER_TYPE.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(E,I,B){if(!this.ubo)this.uniforms[E]=new UniformGroup(I,B);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(E,I,B){return new UniformGroup(E,I,B)}static uboFrom(E,I){return new UniformGroup(E,I??!0,!0)}}class Shader{constructor(E,I){this.uniformBindCount=0,this.program=E,I?I instanceof UniformGroup?this.uniformGroup=I:this.uniformGroup=new UniformGroup(I):this.uniformGroup=new UniformGroup({}),this.disposeRunner=new Runner("disposeShader")}checkUniformExists(E,I){if(I.uniforms[E])return!0;for(const B in I.uniforms){const U=I.uniforms[B];if(U.group&&this.checkUniformExists(E,U))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(E,I,B){const U=Program.from(E,I);return new Shader(U,B)}}class BatchShaderGenerator{constructor(E,I){if(this.vertexSrc=E,this.fragTemplate=I,this.programCache={},this.defaultGroupCache={},!I.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!I.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(E){if(!this.programCache[E]){const B=new Int32Array(E);for(let V=0;V<E;V++)B[V]=V;this.defaultGroupCache[E]=UniformGroup.from({uSamplers:B},!0);let U=this.fragTemplate;U=U.replace(/%count%/gi,`${E}`),U=U.replace(/%forloop%/gi,this.generateSampleSrc(E)),this.programCache[E]=new Program(this.vertexSrc,U)}const I={tint:new Float32Array([1,1,1,1]),translationMatrix:new Matrix$2,default:this.defaultGroupCache[E]};return new Shader(this.programCache[E],I)}generateSampleSrc(E){let I="";I+=`
339
+ `,I+=`
340
+ `;for(let B=0;B<E;B++)B>0&&(I+=`
341
+ else `),B<E-1&&(I+=`if(vTextureId < ${B}.5)`),I+=`
342
+ {`,I+=`
343
+ color = texture2D(uSamplers[${B}], vTextureCoord);`,I+=`
344
+ }`;return I+=`
345
+ `,I+=`
346
+ `,I}}class BatchTextureArray{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let E=0;E<this.count;E++)this.elements[E]=null;this.count=0}}function canUploadSameBuffer(){return!isMobile.apple.device}function maxRecommendedTextures(C){let E=!0;const I=settings.ADAPTER.getNavigator();if(isMobile.tablet||isMobile.phone){if(isMobile.apple.device){const B=I.userAgent.match(/OS (\d+)_(\d+)?/);B&&parseInt(B[1],10)<11&&(E=!1)}if(isMobile.android.device){const B=I.userAgent.match(/Android\s([0-9.]*)/);B&&parseInt(B[1],10)<7&&(E=!1)}}return E?C:4}class ObjectRenderer{constructor(E){this.renderer=E}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(E){}}var defaultFragment$1=`varying vec2 vTextureCoord;
347
347
  varying vec4 vColor;
348
348
  varying float vTextureId;
349
349
  uniform sampler2D uSamplers[%count%];
@@ -353,7 +353,7 @@ void main(void){
353
353
  %forloop%
354
354
  gl_FragColor = color * vColor;
355
355
  }
356
- `,vb=`precision highp float;
356
+ `,defaultVertex$1=`precision highp float;
357
357
  attribute vec2 aVertexPosition;
358
358
  attribute vec2 aTextureCoord;
359
359
  attribute vec4 aColor;
@@ -374,14 +374,14 @@ void main(void){
374
374
  vTextureId = aTextureId;
375
375
  vColor = aColor * tint;
376
376
  }
377
- `;const rt=class extends Lu{constructor(t){super(t),this.setShaderGenerator(),this.geometryClass=Au,this.vertexSize=6,this.state=sn.for2d(),this.size=rt.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),t.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??mb(32),this._defaultMaxTextures}static set defaultMaxTextures(t){this._defaultMaxTextures=t}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??pb(),this._canUploadSameBuffer}static set canUploadSameBuffer(t){this._canUploadSameBuffer=t}get MAX_TEXTURES(){return re("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return vb}static get defaultFragmentTemplate(){return gb}setShaderGenerator({vertex:t=rt.defaultVertexSrc,fragment:e=rt.defaultFragmentTemplate}={}){this.shaderGenerator=new db(t,e)}contextChange(){const t=this.renderer.gl;Q.PREFER_ENV===$t.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),rt.defaultMaxTextures),this.maxTextures=Vx(this.maxTextures,t)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:t,_textureArrayPool:e}=rt,r=this.size/4,i=Math.floor(r/this.maxTextures)+1;for(;t.length<r;)t.push(new aa);for(;e.length<i;)e.push(new fa);for(let n=0;n<this.maxTextures;n++)this._tempBoundTextures[n]=null}onPrerender(){this._flushId=0}render(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)}buildTexturesAndDrawCalls(){const{_bufferedTextures:t,maxTextures:e}=this,r=rt._textureArrayPool,i=this.renderer.batch,n=this._tempBoundTextures,s=this.renderer.textureGC.count;let a=++ae._globalBatch,o=0,u=r[0],h=0;i.copyBoundTextures(n,e);for(let d=0;d<this._bufferSize;++d){const l=t[d];t[d]=null,l._batchEnabled!==a&&(u.count>=e&&(i.boundArray(u,n,a,e),this.buildDrawCalls(u,h,d),h=d,u=r[++o],++a),l._batchEnabled=a,l.touched=s,u.elements[u.count++]=l)}u.count>0&&(i.boundArray(u,n,a,e),this.buildDrawCalls(u,h,this._bufferSize),++o,++a);for(let d=0;d<n.length;d++)n[d]=null;ae._globalBatch=a}buildDrawCalls(t,e,r){const{_bufferedElements:i,_attributeBuffer:n,_indexBuffer:s,vertexSize:a}=this,o=rt._drawCallPool;let u=this._dcIndex,h=this._aIndex,d=this._iIndex,l=o[u];l.start=this._iIndex,l.texArray=t;for(let c=e;c<r;++c){const f=i[c],p=f._texture.baseTexture,m=Ux[p.alphaMode?1:0][f.blendMode];i[c]=null,e<c&&l.blend!==m&&(l.size=d-l.start,e=c,l=o[++u],l.texArray=t,l.start=d),this.packInterleavedGeometry(f,n,s,h,d),h+=f.vertexData.length/2*a,d+=f.indices.length,l.blend=m}e<r&&(l.size=d-l.start,++u),this._dcIndex=u,this._aIndex=h,this._iIndex=d}bindAndClearTexArray(t){const e=this.renderer.texture;for(let r=0;r<t.count;r++)e.bind(t.elements[r],t.ids[r]),t.elements[r]=null;t.count=0}updateGeometry(){const{_packedGeometries:t,_attributeBuffer:e,_indexBuffer:r}=this;rt.canUploadSameBuffer?(t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,t[this._flushId]=new this.geometryClass),t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(t[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const t=this._dcIndex,{gl:e,state:r}=this.renderer,i=rt._drawCallPool;let n=null;for(let s=0;s<t;s++){const{texArray:a,type:o,size:u,start:h,blend:d}=i[s];n!==a&&(n=a,this.bindAndClearTexArray(a)),this.state.blendMode=d,r.set(this.state),e.drawElements(o,u,e.UNSIGNED_SHORT,h*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),rt.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]&&this._packedGeometries[t].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(t){const e=tn(Math.ceil(t/8)),r=yu(e),i=e*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let n=this._aBuffers[i];return n||(this._aBuffers[i]=n=new zx(i*this.vertexSize*4)),n}getIndexBuffer(t){const e=tn(Math.ceil(t/12)),r=yu(e),i=e*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let n=this._iBuffers[r];return n||(this._iBuffers[r]=n=new Uint16Array(i)),n}packInterleavedGeometry(t,e,r,i,n){const{uint32View:s,float32View:a}=e,o=i/this.vertexSize,u=t.uvs,h=t.indices,d=t.vertexData,l=t._texture.baseTexture._batchLocation,c=Math.min(t.worldAlpha,1),f=Le.shared.setValue(t._tintRGB).toPremultiplied(c);for(let p=0;p<d.length;p+=2)a[i++]=d[p],a[i++]=d[p+1],a[i++]=u[p],a[i++]=u[p+1],s[i++]=f,a[i++]=l;for(let p=0;p<h.length;p++)r[n++]=o+h[p]}};let it=rt;it.defaultBatchSize=4096,it.extension={name:"batch",type:te.RendererPlugin},it._drawCallPool=[],it._textureArrayPool=[],he.add(it);var _b=`varying vec2 vTextureCoord;
377
+ `;const _BatchRenderer=class extends ObjectRenderer{constructor(C){super(C),this.setShaderGenerator(),this.geometryClass=BatchGeometry,this.vertexSize=6,this.state=State$1.for2d(),this.size=_BatchRenderer.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),C.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??maxRecommendedTextures(32),this._defaultMaxTextures}static set defaultMaxTextures(C){this._defaultMaxTextures=C}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??canUploadSameBuffer(),this._canUploadSameBuffer}static set canUploadSameBuffer(C){this._canUploadSameBuffer=C}get MAX_TEXTURES(){return deprecation("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return defaultVertex$1}static get defaultFragmentTemplate(){return defaultFragment$1}setShaderGenerator({vertex:C=_BatchRenderer.defaultVertexSrc,fragment:E=_BatchRenderer.defaultFragmentTemplate}={}){this.shaderGenerator=new BatchShaderGenerator(C,E)}contextChange(){const C=this.renderer.gl;settings.PREFER_ENV===ENV.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(C.getParameter(C.MAX_TEXTURE_IMAGE_UNITS),_BatchRenderer.defaultMaxTextures),this.maxTextures=checkMaxIfStatementsInShader(this.maxTextures,C)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let E=0;E<this._packedGeometryPoolSize;E++)this._packedGeometries[E]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:C,_textureArrayPool:E}=_BatchRenderer,I=this.size/4,B=Math.floor(I/this.maxTextures)+1;for(;C.length<I;)C.push(new BatchDrawCall);for(;E.length<B;)E.push(new BatchTextureArray);for(let U=0;U<this.maxTextures;U++)this._tempBoundTextures[U]=null}onPrerender(){this._flushId=0}render(C){C._texture.valid&&(this._vertexCount+C.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=C.vertexData.length/2,this._indexCount+=C.indices.length,this._bufferedTextures[this._bufferSize]=C._texture.baseTexture,this._bufferedElements[this._bufferSize++]=C)}buildTexturesAndDrawCalls(){const{_bufferedTextures:C,maxTextures:E}=this,I=_BatchRenderer._textureArrayPool,B=this.renderer.batch,U=this._tempBoundTextures,V=this.renderer.textureGC.count;let X=++BaseTexture._globalBatch,Y=0,K=I[0],J=0;B.copyBoundTextures(U,E);for(let xe=0;xe<this._bufferSize;++xe){const Z=C[xe];C[xe]=null,Z._batchEnabled!==X&&(K.count>=E&&(B.boundArray(K,U,X,E),this.buildDrawCalls(K,J,xe),J=xe,K=I[++Y],++X),Z._batchEnabled=X,Z.touched=V,K.elements[K.count++]=Z)}K.count>0&&(B.boundArray(K,U,X,E),this.buildDrawCalls(K,J,this._bufferSize),++Y,++X);for(let xe=0;xe<U.length;xe++)U[xe]=null;BaseTexture._globalBatch=X}buildDrawCalls(C,E,I){const{_bufferedElements:B,_attributeBuffer:U,_indexBuffer:V,vertexSize:X}=this,Y=_BatchRenderer._drawCallPool;let K=this._dcIndex,J=this._aIndex,xe=this._iIndex,Z=Y[K];Z.start=this._iIndex,Z.texArray=C;for(let _e=E;_e<I;++_e){const Se=B[_e],Ee=Se._texture.baseTexture,Ae=premultiplyBlendMode[Ee.alphaMode?1:0][Se.blendMode];B[_e]=null,E<_e&&Z.blend!==Ae&&(Z.size=xe-Z.start,E=_e,Z=Y[++K],Z.texArray=C,Z.start=xe),this.packInterleavedGeometry(Se,U,V,J,xe),J+=Se.vertexData.length/2*X,xe+=Se.indices.length,Z.blend=Ae}E<I&&(Z.size=xe-Z.start,++K),this._dcIndex=K,this._aIndex=J,this._iIndex=xe}bindAndClearTexArray(C){const E=this.renderer.texture;for(let I=0;I<C.count;I++)E.bind(C.elements[I],C.ids[I]),C.elements[I]=null;C.count=0}updateGeometry(){const{_packedGeometries:C,_attributeBuffer:E,_indexBuffer:I}=this;_BatchRenderer.canUploadSameBuffer?(C[this._flushId]._buffer.update(E.rawBinaryData),C[this._flushId]._indexBuffer.update(I),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,C[this._flushId]=new this.geometryClass),C[this._flushId]._buffer.update(E.rawBinaryData),C[this._flushId]._indexBuffer.update(I),this.renderer.geometry.bind(C[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const C=this._dcIndex,{gl:E,state:I}=this.renderer,B=_BatchRenderer._drawCallPool;let U=null;for(let V=0;V<C;V++){const{texArray:X,type:Y,size:K,start:J,blend:xe}=B[V];U!==X&&(U=X,this.bindAndClearTexArray(X)),this.state.blendMode=xe,I.set(this.state),E.drawElements(Y,K,E.UNSIGNED_SHORT,J*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),_BatchRenderer.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let C=0;C<this._packedGeometryPoolSize;C++)this._packedGeometries[C]&&this._packedGeometries[C].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(C){const E=nextPow2(Math.ceil(C/8)),I=log2(E),B=E*8;this._aBuffers.length<=I&&(this._iBuffers.length=I+1);let U=this._aBuffers[B];return U||(this._aBuffers[B]=U=new ViewableBuffer(B*this.vertexSize*4)),U}getIndexBuffer(C){const E=nextPow2(Math.ceil(C/12)),I=log2(E),B=E*12;this._iBuffers.length<=I&&(this._iBuffers.length=I+1);let U=this._iBuffers[I];return U||(this._iBuffers[I]=U=new Uint16Array(B)),U}packInterleavedGeometry(C,E,I,B,U){const{uint32View:V,float32View:X}=E,Y=B/this.vertexSize,K=C.uvs,J=C.indices,xe=C.vertexData,Z=C._texture.baseTexture._batchLocation,_e=Math.min(C.worldAlpha,1),Se=Color.shared.setValue(C._tintRGB).toPremultiplied(_e);for(let Ee=0;Ee<xe.length;Ee+=2)X[B++]=xe[Ee],X[B++]=xe[Ee+1],X[B++]=K[Ee],X[B++]=K[Ee+1],V[B++]=Se,X[B++]=Z;for(let Ee=0;Ee<J.length;Ee++)I[U++]=Y+J[Ee]}};let BatchRenderer=_BatchRenderer;BatchRenderer.defaultBatchSize=4096,BatchRenderer.extension={name:"batch",type:ExtensionType.RendererPlugin},BatchRenderer._drawCallPool=[],BatchRenderer._textureArrayPool=[],extensions.add(BatchRenderer);var defaultFragment=`varying vec2 vTextureCoord;
378
378
 
379
379
  uniform sampler2D uSampler;
380
380
 
381
381
  void main(void){
382
382
  gl_FragColor = texture2D(uSampler, vTextureCoord);
383
383
  }
384
- `,yb=`attribute vec2 aVertexPosition;
384
+ `,defaultVertex=`attribute vec2 aVertexPosition;
385
385
 
386
386
  uniform mat3 projectionMatrix;
387
387
 
@@ -407,7 +407,7 @@ void main(void)
407
407
  gl_Position = filterVertexPosition();
408
408
  vTextureCoord = filterTextureCoord();
409
409
  }
410
- `;const ci=class extends ui{constructor(t,e,r){const i=Tt.from(t||ci.defaultVertexSrc,e||ci.defaultFragmentSrc);super(i,r),this.padding=0,this.resolution=ci.defaultResolution,this.multisample=ci.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new sn}apply(t,e,r,i,n){t.applyFilter(this,e,r,i)}get blendMode(){return this.state.blendMode}set blendMode(t){this.state.blendMode=t}get resolution(){return this._resolution}set resolution(t){this._resolution=t}static get defaultVertexSrc(){return yb}static get defaultFragmentSrc(){return _b}};let ue=ci;ue.defaultResolution=1,ue.defaultMultisample=Ae.NONE;class dn{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Le(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:r,background:i,backgroundAlpha:n}=e,s=i??r;s!==void 0&&(this.color=s),this.alpha=n}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}dn.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},dn.extension={type:[te.RendererSystem,te.CanvasRendererSystem],name:"background"},he.add(dn);class Du{constructor(e){this.renderer=e,this.emptyRenderer=new Lu(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,r){const{boundTextures:i}=this.renderer.texture;for(let n=r-1;n>=0;--n)e[n]=i[n]||null,e[n]&&(e[n]._batchLocation=n)}boundArray(e,r,i,n){const{elements:s,ids:a,count:o}=e;let u=0;for(let h=0;h<o;h++){const d=s[h],l=d._batchLocation;if(l>=0&&l<n&&r[l]===d){a[h]=l;continue}for(;u<n;){const c=r[u];if(c&&c._batchEnabled===i&&c._batchLocation===u){u++;continue}a[h]=u,d._batchLocation=u,r[u]=d;break}}}destroy(){this.renderer=null}}Du.extension={type:te.RendererSystem,name:"batch"},he.add(Du);let Bu=0;class pn{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=Bu++}init(e){if(e.context)this.initFromContext(e.context);else{const r=this.renderer.background.alpha<1,i=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:i,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=Bu++,this.renderer.runners.contextChange.emit(e);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const r=this.createContext(this.renderer.view,e);this.initFromContext(r)}createContext(e,r){let i;if(Q.PREFER_ENV>=$t.WEBGL2&&(i=e.getContext("webgl2",r)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",r)||e.getContext("experimental-webgl",r),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,r={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const r=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const n=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=n,n||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}pn.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},pn.extension={type:te.RendererSystem,name:"context"},he.add(pn);class xb extends sa{upload(e,r,i){const n=e.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Rt.UNPACK);const s=r.realWidth,a=r.realHeight;return i.width===s&&i.height===a?n.texSubImage2D(r.target,0,0,0,s,a,r.format,i.type,this.data):(i.width=s,i.height=a,n.texImage2D(r.target,0,i.internalFormat,s,a,0,r.format,i.type,this.data)),!0}}class da{constructor(e,r){this.width=Math.round(e||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new et("disposeFramebuffer"),this.multisample=Ae.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,r){return this.colorTextures[e]=r||new ae(null,{scaleMode:dt.NEAREST,resolution:1,mipmap:Gt.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new ae(new xb(null,{width:this.width,height:this.height}),{scaleMode:dt.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Gt.OFF,format:N.DEPTH_COMPONENT,type:se.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,r){if(e=Math.round(e),r=Math.round(r),!(e===this.width&&r===this.height)){this.width=e,this.height=r,this.dirtyId++,this.dirtySize++;for(let i=0;i<this.colorTextures.length;i++){const n=this.colorTextures[i],s=n.resolution;n.setSize(e/s,r/s)}if(this.depthTexture){const i=this.depthTexture.resolution;this.depthTexture.setSize(e/i,r/i)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class Uu extends ae{constructor(e={}){if(typeof e=="number"){const r=arguments[0],i=arguments[1],n=arguments[2],s=arguments[3];e={width:r,height:i,scaleMode:n,resolution:s}}e.width=e.width||100,e.height=e.height||100,e.multisample??(e.multisample=Ae.NONE),super(null,e),this.mipmap=Gt.OFF,this.valid=!0,this._clear=new Le([0,0,0,0]),this.framebuffer=new da(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=e.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(e){this._clear.setValue(e)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(e,r){this.framebuffer.resize(e*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class Nt extends si{constructor(e){const r=e,i=r.naturalWidth||r.videoWidth||r.width,n=r.naturalHeight||r.videoHeight||r.height;super(i,n),this.source=e,this.noSubImage=!1}static crossOrigin(e,r,i){i===void 0&&!r.startsWith("data:")?e.crossOrigin=Gx(r):i!==!1&&(e.crossOrigin=typeof i=="string"?i:"anonymous")}upload(e,r,i,n){const s=e.gl,a=r.realWidth,o=r.realHeight;if(n=n||this.source,typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement){if(!n.complete||n.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&n instanceof HTMLVideoElement&&n.readyState<=1&&n.buffered.length===0)return!1;return s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Rt.UNPACK),!this.noSubImage&&r.target===s.TEXTURE_2D&&i.width===a&&i.height===o?s.texSubImage2D(s.TEXTURE_2D,0,0,0,r.format,i.type,n):(i.width=a,i.height=o,s.texImage2D(r.target,0,i.internalFormat,r.format,i.type,n)),!0}update(){if(this.destroyed)return;const e=this.source,r=e.naturalWidth||e.videoWidth||e.width,i=e.naturalHeight||e.videoHeight||e.height;this.resize(r,i),super.update()}dispose(){this.source=null}}class $u extends Nt{constructor(e,r){if(r=r||{},typeof e=="string"){const i=new Image;Nt.crossOrigin(i,e,r.crossorigin),i.src=e,e=i}super(e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??Q.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(e){return this._load?this._load:(e!==void 0&&(this.createBitmap=e),this._load=new Promise((r,i)=>{const n=this.source;this.url=n.src;const s=()=>{this.destroyed||(n.onload=null,n.onerror=null,this.resize(n.width,n.height),this._load=null,this.createBitmap?r(this.process()):r(this))};n.complete&&n.src?s():(n.onload=s,n.onerror=a=>{i(a),this.onError.emit(a)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,i=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then(n=>n.blob()).then(n=>r(n,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Rt.UNPACK?"premultiply":"none"})).then(n=>this.destroyed?Promise.reject():(this.bitmap=n,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,r,i){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,r,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,r,i,this.bitmap),!this.preserveBitmap){let n=!0;const s=r._glTextures;for(const a in s){const o=s[a];if(o!==i&&o.dirtyId!==r.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class Gu{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,r,i){const n=r.width,s=r.height;if(i){const a=e.width/2/n,o=e.height/2/s,u=e.x/n+a,h=e.y/s+o;i=be.add(i,be.NW),this.x0=u+a*be.uX(i),this.y0=h+o*be.uY(i),i=be.add(i,2),this.x1=u+a*be.uX(i),this.y1=h+o*be.uY(i),i=be.add(i,2),this.x2=u+a*be.uX(i),this.y2=h+o*be.uY(i),i=be.add(i,2),this.x3=u+a*be.uX(i),this.y3=h+o*be.uY(i)}else this.x0=e.x/n,this.y0=e.y/s,this.x1=(e.x+e.width)/n,this.y1=e.y/s,this.x2=(e.x+e.width)/n,this.y2=(e.y+e.height)/s,this.x3=e.x/n,this.y3=(e.y+e.height)/s;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const zu=new Gu;function mn(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}class ie extends Bi{constructor(e,r,i,n,s,a,o){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new de(0,0,1,1)),e instanceof ie&&(e=e.baseTexture),this.baseTexture=e,this._frame=r,this.trim=n,this.valid=!1,this._uvs=zu,this.uvMatrix=null,this.orig=i||r,this._rotate=Number(s||0),s===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new me(a.x,a.y):new me(0,0),this.defaultBorders=o,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=r:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:r}=this.baseTexture;r!=null&&r.url&&_t[r.url]&&ie.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,ie.removeFromCache(this),this.textureCacheIds=null}clone(){var n;const e=this._frame.clone(),r=this._frame===this.orig?e:this.orig.clone(),i=new ie(this.baseTexture,!this.noFrame&&e,r,(n=this.trim)==null?void 0:n.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(i._frame=e),i}updateUvs(){this._uvs===zu&&(this._uvs=new Gu),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,r={},i=Q.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let s=null;if(n)s=e;else if(e instanceof ae){if(!e.cacheId){const o=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e.cacheId=`${o}-${ni()}`,ae.addToCache(e,e.cacheId)}s=e.cacheId}else{if(!e._pixiId){const o=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${o}_${ni()}`}s=e._pixiId}let a=_t[s];if(n&&i&&!a)throw new Error(`The cacheId "${s}" does not exist in TextureCache.`);return!a&&!(e instanceof ae)?(r.resolution||(r.resolution=bu(e)),a=new ie(new ae(e,r)),a.baseTexture.cacheId=s,ae.addToCache(a.baseTexture,s),ie.addToCache(a,s)):!a&&e instanceof ae&&(a=new ie(e),ie.addToCache(a,s)),a}static fromURL(e,r){const i=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),n=ie.from(e,Object.assign({resourceOptions:i},r),!1),s=n.baseTexture.resource;return n.baseTexture.valid?Promise.resolve(n):s.load().then(()=>Promise.resolve(n))}static fromBuffer(e,r,i,n){return new ie(ae.fromBuffer(e,r,i,n))}static fromLoader(e,r,i,n){const s=new ae(e,Object.assign({scaleMode:ae.defaultOptions.scaleMode,resolution:bu(r)},n)),{resource:a}=s;a instanceof $u&&(a.url=r);const o=new ie(s);return i||(i=r),ae.addToCache(o.baseTexture,i),ie.addToCache(o,i),i!==r&&(ae.addToCache(o.baseTexture,r),ie.addToCache(o,r)),o.baseTexture.valid?Promise.resolve(o):new Promise(u=>{o.baseTexture.once("loaded",()=>u(o))})}static addToCache(e,r){r&&(e.textureCacheIds.includes(r)||e.textureCacheIds.push(r),_t[r]&&_t[r]!==e&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),_t[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=_t[e];if(r){const i=r.textureCacheIds.indexOf(e);return i>-1&&r.textureCacheIds.splice(i,1),delete _t[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)_t[e.textureCacheIds[r]]===e&&delete _t[e.textureCacheIds[r]];return e.textureCacheIds.length=0,e}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(e){this._frame=e,this.noFrame=!1;const{x:r,y:i,width:n,height:s}=e,a=r+n>this.baseTexture.width,o=i+s>this.baseTexture.height;if(a||o){const u=a&&o?"and":"or",h=`X: ${r} + ${n} = ${r+n} > ${this.baseTexture.width}`,d=`Y: ${i} + ${s} = ${i+s} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${u} ${d}`)}this.valid=n&&s&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ie._EMPTY||(ie._EMPTY=new ie(new ae),mn(ie._EMPTY),mn(ie._EMPTY.baseTexture)),ie._EMPTY}static get WHITE(){if(!ie._WHITE){const e=Q.ADAPTER.createCanvas(16,16),r=e.getContext("2d");e.width=16,e.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),ie._WHITE=new ie(ae.from(e)),mn(ie._WHITE),mn(ie._WHITE.baseTexture)}return ie._WHITE}}class gn extends ie{constructor(e,r){super(e,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,r,i=!0){const n=this.baseTexture.resolution,s=Math.round(e*n)/n,a=Math.round(r*n)/n;this.valid=s>0&&a>0,this._frame.width=this.orig.width=s,this._frame.height=this.orig.height=a,i&&this.baseTexture.resize(s,a),this.updateUvs()}setResolution(e){const{baseTexture:r}=this;r.resolution!==e&&(r.setResolution(e),this.resize(r.width,r.height,!1))}static create(e){return new gn(new Uu(e))}}class ju{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,r,i=Ae.NONE){const n=new Uu(Object.assign({width:e,height:r,resolution:1,multisample:i},this.textureOptions));return new gn(n)}getOptimalTexture(e,r,i=1,n=Ae.NONE){let s;e=Math.ceil(e*i-1e-6),r=Math.ceil(r*i-1e-6),!this.enableFullScreen||e!==this._pixelsWidth||r!==this._pixelsHeight?(e=tn(e),r=tn(r),s=((e&65535)<<16|r&65535)>>>0,n>1&&(s+=n*4294967296)):s=n>1?-n:-1,this.texturePool[s]||(this.texturePool[s]=[]);let a=this.texturePool[s].pop();return a||(a=this.createTexture(e,r,n)),a.filterPoolKey=s,a.setResolution(i),a}getFilterTexture(e,r,i){const n=this.getOptimalTexture(e.width,e.height,r||e.resolution,i||Ae.NONE);return n.filterFrame=e.filterFrame,n}returnTexture(e){const r=e.filterPoolKey;e.filterFrame=null,this.texturePool[r].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const r in this.texturePool){const i=this.texturePool[r];if(i)for(let n=0;n<i.length;n++)i[n].destroy(!0)}this.texturePool={}}setScreenSize(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const i=this.texturePool[r];if(i)for(let n=0;n<i.length;n++)i[n].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}}}ju.SCREEN_KEY=-1;class bb extends Er{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Tb extends Er{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Be(this.vertices),this.uvBuffer=new Be(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(e,r){let i=0,n=0;return this.uvs[0]=i,this.uvs[1]=n,this.uvs[2]=i+r.width/e.width,this.uvs[3]=n,this.uvs[4]=i+r.width/e.width,this.uvs[5]=n+r.height/e.height,this.uvs[6]=i,this.uvs[7]=n+r.height/e.height,i=r.x,n=r.y,this.vertices[0]=i,this.vertices[1]=n,this.vertices[2]=i+r.width,this.vertices[3]=n,this.vertices[4]=i+r.width,this.vertices[5]=n+r.height,this.vertices[6]=i,this.vertices[7]=n+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class wb{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=Ae.NONE,this.sourceFrame=new de,this.destinationFrame=new de,this.bindingSourceFrame=new de,this.bindingDestinationFrame=new de,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const vn=[new me,new me,new me,new me],pa=new Ue;class Hu{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new ju,this.statePool=[],this.quad=new bb,this.quadUv=new Tb,this.tempRect=new de,this.activeState={},this.globalUniforms=new tt({outputFrame:new de,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(e,r){const i=this.renderer,n=this.defaultFilterStack,s=this.statePool.pop()||new wb,a=this.renderer.renderTexture;let o=r[0].resolution,u=r[0].multisample,h=r[0].padding,d=r[0].autoFit,l=r[0].legacy??!0;for(let p=1;p<r.length;p++){const m=r[p];o=Math.min(o,m.resolution),u=Math.min(u,m.multisample),h=this.useMaxPadding?Math.max(h,m.padding):h+m.padding,d=d&&m.autoFit,l=l||(m.legacy??!0)}n.length===1&&(this.defaultFilterStack[0].renderTexture=a.current),n.push(s),s.resolution=o,s.multisample=u,s.legacy=l,s.target=e,s.sourceFrame.copyFrom(e.filterArea||e.getBounds(!0)),s.sourceFrame.pad(h);const c=this.tempRect.copyFrom(a.sourceFrame);i.projection.transform&&this.transformAABB(pa.copyFrom(i.projection.transform).invert(),c),d?(s.sourceFrame.fit(c),(s.sourceFrame.width<=0||s.sourceFrame.height<=0)&&(s.sourceFrame.width=0,s.sourceFrame.height=0)):s.sourceFrame.intersects(c)||(s.sourceFrame.width=0,s.sourceFrame.height=0),this.roundFrame(s.sourceFrame,a.current?a.current.resolution:i.resolution,a.sourceFrame,a.destinationFrame,i.projection.transform),s.renderTexture=this.getOptimalFilterTexture(s.sourceFrame.width,s.sourceFrame.height,o,u),s.filters=r,s.destinationFrame.width=s.renderTexture.width,s.destinationFrame.height=s.renderTexture.height;const f=this.tempRect;f.x=0,f.y=0,f.width=s.sourceFrame.width,f.height=s.sourceFrame.height,s.renderTexture.filterFrame=s.sourceFrame,s.bindingSourceFrame.copyFrom(a.sourceFrame),s.bindingDestinationFrame.copyFrom(a.destinationFrame),s.transform=i.projection.transform,i.projection.transform=null,a.bind(s.renderTexture,s.sourceFrame,f),i.framebuffer.clear(0,0,0,0)}pop(){const e=this.defaultFilterStack,r=e.pop(),i=r.filters;this.activeState=r;const n=this.globalUniforms.uniforms;n.outputFrame=r.sourceFrame,n.resolution=r.resolution;const s=n.inputSize,a=n.inputPixel,o=n.inputClamp;if(s[0]=r.destinationFrame.width,s[1]=r.destinationFrame.height,s[2]=1/s[0],s[3]=1/s[1],a[0]=Math.round(s[0]*r.resolution),a[1]=Math.round(s[1]*r.resolution),a[2]=1/a[0],a[3]=1/a[1],o[0]=.5*a[2],o[1]=.5*a[3],o[2]=r.sourceFrame.width*s[2]-.5*a[2],o[3]=r.sourceFrame.height*s[3]-.5*a[3],r.legacy){const h=n.filterArea;h[0]=r.destinationFrame.width,h[1]=r.destinationFrame.height,h[2]=r.sourceFrame.x,h[3]=r.sourceFrame.y,n.filterClamp=n.inputClamp}this.globalUniforms.update();const u=e[e.length-1];if(this.renderer.framebuffer.blit(),i.length===1)i[0].apply(this,r.renderTexture,u.renderTexture,zt.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let h=r.renderTexture,d=this.getOptimalFilterTexture(h.width,h.height,r.resolution);d.filterFrame=h.filterFrame;let l=0;for(l=0;l<i.length-1;++l){l===1&&r.multisample>1&&(d=this.getOptimalFilterTexture(h.width,h.height,r.resolution),d.filterFrame=h.filterFrame),i[l].apply(this,h,d,zt.CLEAR,r);const c=h;h=d,d=c}i[l].apply(this,h,u.renderTexture,zt.BLEND,r),l>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(h),this.returnFilterTexture(d)}r.clear(),this.statePool.push(r)}bindAndClear(e,r=zt.CLEAR){const{renderTexture:i,state:n}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e!=null&&e.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,i.bind(e,e.filterFrame,a)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const s=n.stateId&1||this.forceClear;(r===zt.CLEAR||r===zt.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,r,i,n){const s=this.renderer;s.state.set(e.state),this.bindAndClear(i,n),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,s.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(r._frame,r.filterFrame),s.geometry.bind(this.quadUv),s.geometry.draw(It.TRIANGLES)):(s.geometry.bind(this.quad),s.geometry.draw(It.TRIANGLE_STRIP))}calculateSpriteMatrix(e,r){const{sourceFrame:i,destinationFrame:n}=this.activeState,{orig:s}=r._texture,a=e.set(n.width,0,0,n.height,i.x,i.y),o=r.worldTransform.copyTo(Ue.TEMP_MATRIX);return o.invert(),a.prepend(o),a.scale(1/s.width,1/s.height),a.translate(r.anchor.x,r.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,r,i=1,n=Ae.NONE){return this.texturePool.getOptimalTexture(e,r,i,n)}getFilterTexture(e,r,i){if(typeof e=="number"){const s=e;e=r,r=s}e=e||this.activeState.renderTexture;const n=this.texturePool.getOptimalTexture(e.width,e.height,r||e.resolution,i||Ae.NONE);return n.filterFrame=e.filterFrame,n}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,r){const i=vn[0],n=vn[1],s=vn[2],a=vn[3];i.set(r.left,r.top),n.set(r.left,r.bottom),s.set(r.right,r.top),a.set(r.right,r.bottom),e.apply(i,i),e.apply(n,n),e.apply(s,s),e.apply(a,a);const o=Math.min(i.x,n.x,s.x,a.x),u=Math.min(i.y,n.y,s.y,a.y),h=Math.max(i.x,n.x,s.x,a.x),d=Math.max(i.y,n.y,s.y,a.y);r.x=o,r.y=u,r.width=h-o,r.height=d-u}roundFrame(e,r,i,n,s){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(s){const{a,b:o,c:u,d:h}=s;if((Math.abs(o)>1e-4||Math.abs(u)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(h)>1e-4))return}s=s?pa.copyFrom(s):pa.identity(),s.translate(-i.x,-i.y).scale(n.width/i.width,n.height/i.height).translate(n.x,n.y),this.transformAABB(s,e),e.ceil(r),this.transformAABB(s.invert(),e)}}}Hu.extension={type:te.RendererSystem,name:"filter"},he.add(Hu);class Sb{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Ae.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Ab=new de;class Vu{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new da(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new de,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;Q.PREFER_ENV===$t.WEBGL_LEGACY&&(r=null,i=null),r?e.drawBuffers=n=>r.drawBuffersWEBGL(n):(this.hasMRT=!1,e.drawBuffers=()=>{}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,r,i=0){const{gl:n}=this;if(e){const s=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,n.bindFramebuffer(n.FRAMEBUFFER,s.framebuffer)),s.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,s.mipLevel=i),s.dirtyId!==e.dirtyId&&(s.dirtyId=e.dirtyId,s.dirtyFormat!==e.dirtyFormat?(s.dirtyFormat=e.dirtyFormat,s.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):s.dirtySize!==e.dirtySize&&(s.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let a=0;a<e.colorTextures.length;a++){const o=e.colorTextures[a];this.renderer.texture.unbind(o.parentTextureArray||o)}if(e.depthTexture&&this.renderer.texture.unbind(e.depthTexture),r){const a=r.width>>i,o=r.height>>i,u=a/r.width;this.setViewport(r.x*u,r.y*u,a,o)}else{const a=e.width>>i,o=e.height>>i;this.setViewport(0,0,a,o)}}else this.current&&(this.current=null,n.bindFramebuffer(n.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,r,i,n){const s=this.viewport;e=Math.round(e),r=Math.round(r),i=Math.round(i),n=Math.round(n),(s.width!==i||s.height!==n||s.x!==e||s.y!==r)&&(s.x=e,s.y=r,s.width=i,s.height=n,this.gl.viewport(e,r,i,n))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,r,i,n,s=ls.COLOR|ls.DEPTH){const{gl:a}=this;a.clearColor(e,r,i,n),a.clear(s)}initFramebuffer(e){const{gl:r}=this,i=new Sb(r.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i}resizeFramebuffer(e){const{gl:r}=this,i=e.glFramebuffers[this.CONTEXT_UID];i.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e.width,e.height));const n=e.colorTextures;let s=n.length;r.drawBuffers||(s=Math.min(s,1));for(let a=0;a<s;a++){const o=n[a],u=o.parentTextureArray||o;this.renderer.texture.bind(u,0),a===0&&i.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,i.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,u._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height))}e.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(e.depthTexture,0)}updateFramebuffer(e,r){const{gl:i}=this,n=e.glFramebuffers[this.CONTEXT_UID],s=e.colorTextures;let a=s.length;i.drawBuffers||(a=Math.min(a,1)),n.multisample>1&&this.canMultisampleFramebuffer(e)?n.msaaBuffer=n.msaaBuffer||i.createRenderbuffer():n.msaaBuffer&&(i.deleteRenderbuffer(n.msaaBuffer),n.msaaBuffer=null,n.blitFramebuffer&&(n.blitFramebuffer.dispose(),n.blitFramebuffer=null));const o=[];for(let u=0;u<a;u++){const h=s[u],d=h.parentTextureArray||h;this.renderer.texture.bind(d,0),u===0&&n.msaaBuffer?(i.bindRenderbuffer(i.RENDERBUFFER,n.msaaBuffer),i.renderbufferStorageMultisample(i.RENDERBUFFER,n.multisample,d._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,n.msaaBuffer)):(i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+u,h.target,d._glTextures[this.CONTEXT_UID].texture,r),o.push(i.COLOR_ATTACHMENT0+u))}if(o.length>1&&i.drawBuffers(o),e.depthTexture&&this.writeDepthTexture){const h=e.depthTexture;this.renderer.texture.bind(h,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(n.stencil=n.stencil||i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,n.stencil),n.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,n.multisample,i.DEPTH24_STENCIL8,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,n.stencil)):n.stencil&&(i.deleteRenderbuffer(n.stencil),n.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:r}=this;let i=Ae.NONE;if(e<=1||r===null)return i;for(let n=0;n<r.length;n++)if(r[n]<=e){i=r[n];break}return i===1&&(i=Ae.NONE),i}blit(e,r,i){const{current:n,renderer:s,gl:a,CONTEXT_UID:o}=this;if(s.context.webGLVersion!==2||!n)return;const u=n.glFramebuffers[o];if(!u)return;if(!e){if(!u.msaaBuffer)return;const d=n.colorTextures[0];if(!d)return;u.blitFramebuffer||(u.blitFramebuffer=new da(n.width,n.height),u.blitFramebuffer.addColorTexture(0,d)),e=u.blitFramebuffer,e.colorTextures[0]!==d&&(e.colorTextures[0]=d,e.dirtyId++,e.dirtyFormat++),(e.width!==n.width||e.height!==n.height)&&(e.width=n.width,e.height=n.height,e.dirtyId++,e.dirtySize++)}r||(r=Ab,r.width=n.width,r.height=n.height),i||(i=r);const h=r.width===i.width&&r.height===i.height;this.bind(e),a.bindFramebuffer(a.READ_FRAMEBUFFER,u.framebuffer),a.blitFramebuffer(r.left,r.top,r.right,r.bottom,i.left,i.top,i.right,i.bottom,a.COLOR_BUFFER_BIT,h?a.NEAREST:a.LINEAR)}disposeFramebuffer(e,r){const i=e.glFramebuffers[this.CONTEXT_UID],n=this.gl;if(!i)return;delete e.glFramebuffers[this.CONTEXT_UID];const s=this.managedFramebuffers.indexOf(e);s>=0&&this.managedFramebuffers.splice(s,1),e.disposeRunner.remove(this),r||(n.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&n.deleteRenderbuffer(i.msaaBuffer),i.stencil&&n.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&this.disposeFramebuffer(i.blitFramebuffer,r)}disposeAll(e){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;i<r.length;i++)this.disposeFramebuffer(r[i],e)}forceStencil(){const e=this.current;if(!e)return;const r=e.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;e.stencil=!0;const i=e.width,n=e.height,s=this.gl,a=s.createRenderbuffer();s.bindRenderbuffer(s.RENDERBUFFER,a),r.msaaBuffer?s.renderbufferStorageMultisample(s.RENDERBUFFER,r.multisample,s.DEPTH24_STENCIL8,i,n):s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_STENCIL,i,n),r.stencil=a,s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,a)}reset(){this.current=this.unknownFramebuffer,this.viewport=new de}destroy(){this.renderer=null}}Vu.extension={type:te.RendererSystem,name:"framebuffer"},he.add(Vu);const ma={5126:4,5123:2,5121:1};class Xu{constructor(e){this.renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let i=this.renderer.context.extensions.vertexArrayObject;Q.PREFER_ENV===$t.WEBGL_LEGACY&&(i=null),i?(e.createVertexArray=()=>i.createVertexArrayOES(),e.bindVertexArray=n=>i.bindVertexArrayOES(n),e.deleteVertexArray=n=>i.deleteVertexArrayOES(n)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=(n,s)=>i.vertexAttribDivisorANGLE(n,s),e.drawElementsInstanced=(n,s,a,o,u)=>i.drawElementsInstancedANGLE(n,s,a,o,u),e.drawArraysInstanced=(n,s,a,o)=>i.drawArraysInstancedANGLE(n,s,a,o)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(e,r){r=r||this.renderer.shader.shader;const{gl:i}=this;let n=e.glVertexArrayObjects[this.CONTEXT_UID],s=!1;n||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=n={},s=!0);const a=n[r.program.id]||this.initGeometryVao(e,r,s);this._activeGeometry=e,this._activeVao!==a&&(this._activeVao=a,this.hasVao?i.bindVertexArray(a):this.activateVao(e,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,r=this.renderer.buffer;for(let i=0;i<e.buffers.length;i++){const n=e.buffers[i];r.update(n)}}checkCompatibility(e,r){const i=e.attributes,n=r.attributeData;for(const s in n)if(!i[s])throw new Error(`shader and geometry incompatible, geometry missing the "${s}" attribute`)}getSignature(e,r){const i=e.attributes,n=r.attributeData,s=["g",e.id];for(const a in i)n[a]&&s.push(a,n[a].location);return s.join("-")}initGeometryVao(e,r,i=!0){const n=this.gl,s=this.CONTEXT_UID,a=this.renderer.buffer,o=r.program;o.glPrograms[s]||this.renderer.shader.generateProgram(r),this.checkCompatibility(e,o);const u=this.getSignature(e,o),h=e.glVertexArrayObjects[this.CONTEXT_UID];let d=h[u];if(d)return h[o.id]=d,d;const l=e.buffers,c=e.attributes,f={},p={};for(const m in l)f[m]=0,p[m]=0;for(const m in c)!c[m].size&&o.attributeData[m]?c[m].size=o.attributeData[m].size:c[m].size||console.warn(`PIXI Geometry attribute '${m}' size cannot be determined (likely the bound shader does not have the attribute)`),f[c[m].buffer]+=c[m].size*ma[c[m].type];for(const m in c){const v=c[m],g=v.size;v.stride===void 0&&(f[v.buffer]===g*ma[v.type]?v.stride=0:v.stride=f[v.buffer]),v.start===void 0&&(v.start=p[v.buffer],p[v.buffer]+=g*ma[v.type])}d=n.createVertexArray(),n.bindVertexArray(d);for(let m=0;m<l.length;m++){const v=l[m];a.bind(v),i&&v._glBuffers[s].refCount++}return this.activateVao(e,o),h[o.id]=d,h[u]=d,n.bindVertexArray(null),a.unbind(pt.ARRAY_BUFFER),d}disposeGeometry(e,r){var o;if(!this.managedGeometries[e.id])return;delete this.managedGeometries[e.id];const i=e.glVertexArrayObjects[this.CONTEXT_UID],n=this.gl,s=e.buffers,a=(o=this.renderer)==null?void 0:o.buffer;if(e.disposeRunner.remove(this),!!i){if(a)for(let u=0;u<s.length;u++){const h=s[u]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&a.dispose(s[u],r))}if(!r){for(const u in i)if(u[0]==="g"){const h=i[u];this._activeVao===h&&this.unbind(),n.deleteVertexArray(h)}}delete e.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(e){const r=Object.keys(this.managedGeometries);for(let i=0;i<r.length;i++)this.disposeGeometry(this.managedGeometries[r[i]],e)}activateVao(e,r){const i=this.gl,n=this.CONTEXT_UID,s=this.renderer.buffer,a=e.buffers,o=e.attributes;e.indexBuffer&&s.bind(e.indexBuffer);let u=null;for(const h in o){const d=o[h],l=a[d.buffer],c=l._glBuffers[n];if(r.attributeData[h]){u!==c&&(s.bind(l),u=c);const f=r.attributeData[h].location;if(i.enableVertexAttribArray(f),i.vertexAttribPointer(f,d.size,d.type||i.FLOAT,d.normalized,d.stride,d.start),d.instance)if(this.hasInstance)i.vertexAttribDivisor(f,d.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,r,i,n){const{gl:s}=this,a=this._activeGeometry;if(a.indexBuffer){const o=a.indexBuffer.data.BYTES_PER_ELEMENT,u=o===2?s.UNSIGNED_SHORT:s.UNSIGNED_INT;o===2||o===4&&this.canUseUInt32ElementIndex?a.instanced?s.drawElementsInstanced(e,r||a.indexBuffer.data.length,u,(i||0)*o,n||1):s.drawElements(e,r||a.indexBuffer.data.length,u,(i||0)*o):console.warn("unsupported index buffer type: uint32")}else a.instanced?s.drawArraysInstanced(e,i,r||a.getSize(),n||1):s.drawArrays(e,i,r||a.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}Xu.extension={type:te.RendererSystem,name:"geometry"},he.add(Xu);const Wu=new Ue;class Eb{constructor(e,r){this._texture=e,this.mapCoord=new Ue,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,r){r===void 0&&(r=e);const i=this.mapCoord;for(let n=0;n<e.length;n+=2){const s=e[n],a=e[n+1];r[n]=s*i.a+a*i.c+i.tx,r[n+1]=s*i.b+a*i.d+i.ty}return r}update(e){const r=this._texture;if(!r||!r.valid||!e&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const i=r._uvs;this.mapCoord.set(i.x1-i.x0,i.y1-i.y0,i.x3-i.x0,i.y3-i.y0,i.x0,i.y0);const n=r.orig,s=r.trim;s&&(Wu.set(n.width/s.width,0,0,n.height/s.height,-s.x/s.width,-s.y/s.height),this.mapCoord.append(Wu));const a=r.baseTexture,o=this.uClampFrame,u=this.clampMargin/a.resolution,h=this.clampOffset;return o[0]=(r._frame.x+u+h)/a.width,o[1]=(r._frame.y+u+h)/a.height,o[2]=(r._frame.x+r._frame.width-u+h)/a.width,o[3]=(r._frame.y+r._frame.height-u+h)/a.height,this.uClampOffset[0]=h/a.realWidth,this.uClampOffset[1]=h/a.realHeight,this.isSimple=r._frame.width===a.width&&r._frame.height===a.height&&r.rotate===0,!0}}var Cb=`varying vec2 vMaskCoord;
410
+ `;const _Filter=class extends Shader{constructor(C,E,I){const B=Program.from(C||_Filter.defaultVertexSrc,E||_Filter.defaultFragmentSrc);super(B,I),this.padding=0,this.resolution=_Filter.defaultResolution,this.multisample=_Filter.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new State$1}apply(C,E,I,B,U){C.applyFilter(this,E,I,B)}get blendMode(){return this.state.blendMode}set blendMode(C){this.state.blendMode=C}get resolution(){return this._resolution}set resolution(C){this._resolution=C}static get defaultVertexSrc(){return defaultVertex}static get defaultFragmentSrc(){return defaultFragment}};let Filter=_Filter;Filter.defaultResolution=1,Filter.defaultMultisample=MSAA_QUALITY.NONE;class BackgroundSystem{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Color(0),this.alpha=1}init(E){this.clearBeforeRender=E.clearBeforeRender;const{backgroundColor:I,background:B,backgroundAlpha:U}=E,V=B??I;V!==void 0&&(this.color=V),this.alpha=U}get color(){return this._backgroundColor.value}set color(E){this._backgroundColor.setValue(E)}get alpha(){return this._backgroundColor.alpha}set alpha(E){this._backgroundColor.setAlpha(E)}get backgroundColor(){return this._backgroundColor}destroy(){}}BackgroundSystem.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},BackgroundSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"background"},extensions.add(BackgroundSystem);class BatchSystem{constructor(E){this.renderer=E,this.emptyRenderer=new ObjectRenderer(E),this.currentRenderer=this.emptyRenderer}setObjectRenderer(E){this.currentRenderer!==E&&(this.currentRenderer.stop(),this.currentRenderer=E,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(E,I){const{boundTextures:B}=this.renderer.texture;for(let U=I-1;U>=0;--U)E[U]=B[U]||null,E[U]&&(E[U]._batchLocation=U)}boundArray(E,I,B,U){const{elements:V,ids:X,count:Y}=E;let K=0;for(let J=0;J<Y;J++){const xe=V[J],Z=xe._batchLocation;if(Z>=0&&Z<U&&I[Z]===xe){X[J]=Z;continue}for(;K<U;){const _e=I[K];if(_e&&_e._batchEnabled===B&&_e._batchLocation===K){K++;continue}X[J]=K,xe._batchLocation=K,I[K]=xe;break}}}destroy(){this.renderer=null}}BatchSystem.extension={type:ExtensionType.RendererSystem,name:"batch"},extensions.add(BatchSystem);let CONTEXT_UID_COUNTER=0;class ContextSystem{constructor(E){this.renderer=E,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(E){this.gl=E,this.renderer.gl=E,this.renderer.CONTEXT_UID=CONTEXT_UID_COUNTER++}init(E){if(E.context)this.initFromContext(E.context);else{const I=this.renderer.background.alpha<1,B=E.premultipliedAlpha;this.preserveDrawingBuffer=E.preserveDrawingBuffer,this.useContextAlpha=E.useContextAlpha,this.powerPreference=E.powerPreference,this.initFromOptions({alpha:I,premultipliedAlpha:B,antialias:E.antialias,stencil:!0,preserveDrawingBuffer:E.preserveDrawingBuffer,powerPreference:E.powerPreference})}}initFromContext(E){this.gl=E,this.validateContext(E),this.renderer.gl=E,this.renderer.CONTEXT_UID=CONTEXT_UID_COUNTER++,this.renderer.runners.contextChange.emit(E);const I=this.renderer.view;I.addEventListener!==void 0&&(I.addEventListener("webglcontextlost",this.handleContextLost,!1),I.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(E){const I=this.createContext(this.renderer.view,E);this.initFromContext(I)}createContext(E,I){let B;if(settings.PREFER_ENV>=ENV.WEBGL2&&(B=E.getContext("webgl2",I)),B)this.webGLVersion=2;else if(this.webGLVersion=1,B=E.getContext("webgl",I)||E.getContext("experimental-webgl",I),!B)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=B,this.getExtensions(),this.gl}getExtensions(){const{gl:E}=this,I={loseContext:E.getExtension("WEBGL_lose_context"),anisotropicFiltering:E.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:E.getExtension("OES_texture_float_linear"),s3tc:E.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:E.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:E.getExtension("WEBGL_compressed_texture_etc"),etc1:E.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:E.getExtension("WEBGL_compressed_texture_pvrtc")||E.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:E.getExtension("WEBGL_compressed_texture_atc"),astc:E.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,I,{drawBuffers:E.getExtension("WEBGL_draw_buffers"),depthTexture:E.getExtension("WEBGL_depth_texture"),vertexArrayObject:E.getExtension("OES_vertex_array_object")||E.getExtension("MOZ_OES_vertex_array_object")||E.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:E.getExtension("OES_element_index_uint"),floatTexture:E.getExtension("OES_texture_float"),floatTextureLinear:E.getExtension("OES_texture_float_linear"),textureHalfFloat:E.getExtension("OES_texture_half_float"),textureHalfFloatLinear:E.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,I,{colorBufferFloat:E.getExtension("EXT_color_buffer_float")})}handleContextLost(E){E.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const E=this.renderer.view;this.renderer=null,E.removeEventListener!==void 0&&(E.removeEventListener("webglcontextlost",this.handleContextLost),E.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(E){const I=E.getContextAttributes(),B="WebGL2RenderingContext"in globalThis&&E instanceof globalThis.WebGL2RenderingContext;B&&(this.webGLVersion=2),I&&!I.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const U=B||!!E.getExtension("OES_element_index_uint");this.supports.uint32Indices=U,U||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}ContextSystem.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},ContextSystem.extension={type:ExtensionType.RendererSystem,name:"context"},extensions.add(ContextSystem);class DepthResource extends BufferResource{upload(E,I,B){const U=E.gl;U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.alphaMode===ALPHA_MODES.UNPACK);const V=I.realWidth,X=I.realHeight;return B.width===V&&B.height===X?U.texSubImage2D(I.target,0,0,0,V,X,I.format,B.type,this.data):(B.width=V,B.height=X,U.texImage2D(I.target,0,B.internalFormat,V,X,0,I.format,B.type,this.data)),!0}}class Framebuffer{constructor(E,I){this.width=Math.round(E||100),this.height=Math.round(I||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Runner("disposeFramebuffer"),this.multisample=MSAA_QUALITY.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(E=0,I){return this.colorTextures[E]=I||new BaseTexture(null,{scaleMode:SCALE_MODES.NEAREST,resolution:1,mipmap:MIPMAP_MODES.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(E){return this.depthTexture=E||new BaseTexture(new DepthResource(null,{width:this.width,height:this.height}),{scaleMode:SCALE_MODES.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:MIPMAP_MODES.OFF,format:FORMATS.DEPTH_COMPONENT,type:TYPES.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(E,I){if(E=Math.round(E),I=Math.round(I),!(E===this.width&&I===this.height)){this.width=E,this.height=I,this.dirtyId++,this.dirtySize++;for(let B=0;B<this.colorTextures.length;B++){const U=this.colorTextures[B],V=U.resolution;U.setSize(E/V,I/V)}if(this.depthTexture){const B=this.depthTexture.resolution;this.depthTexture.setSize(E/B,I/B)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class BaseRenderTexture extends BaseTexture{constructor(E={}){if(typeof E=="number"){const I=arguments[0],B=arguments[1],U=arguments[2],V=arguments[3];E={width:I,height:B,scaleMode:U,resolution:V}}E.width=E.width||100,E.height=E.height||100,E.multisample??(E.multisample=MSAA_QUALITY.NONE),super(null,E),this.mipmap=MIPMAP_MODES.OFF,this.valid=!0,this._clear=new Color([0,0,0,0]),this.framebuffer=new Framebuffer(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=E.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(E){this._clear.setValue(E)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(E,I){this.framebuffer.resize(E*this.resolution,I*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class BaseImageResource extends Resource{constructor(E){const I=E,B=I.naturalWidth||I.videoWidth||I.width,U=I.naturalHeight||I.videoHeight||I.height;super(B,U),this.source=E,this.noSubImage=!1}static crossOrigin(E,I,B){B===void 0&&!I.startsWith("data:")?E.crossOrigin=determineCrossOrigin(I):B!==!1&&(E.crossOrigin=typeof B=="string"?B:"anonymous")}upload(E,I,B,U){const V=E.gl,X=I.realWidth,Y=I.realHeight;if(U=U||this.source,typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement){if(!U.complete||U.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&U instanceof HTMLVideoElement&&U.readyState<=1&&U.buffered.length===0)return!1;return V.pixelStorei(V.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.alphaMode===ALPHA_MODES.UNPACK),!this.noSubImage&&I.target===V.TEXTURE_2D&&B.width===X&&B.height===Y?V.texSubImage2D(V.TEXTURE_2D,0,0,0,I.format,B.type,U):(B.width=X,B.height=Y,V.texImage2D(I.target,0,B.internalFormat,I.format,B.type,U)),!0}update(){if(this.destroyed)return;const E=this.source,I=E.naturalWidth||E.videoWidth||E.width,B=E.naturalHeight||E.videoHeight||E.height;this.resize(I,B),super.update()}dispose(){this.source=null}}class ImageResource extends BaseImageResource{constructor(E,I){if(I=I||{},typeof E=="string"){const B=new Image;BaseImageResource.crossOrigin(B,E,I.crossorigin),B.src=E,E=B}super(E),!E.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=E.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(I.createBitmap??settings.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof I.alphaMode=="number"?I.alphaMode:null,this.bitmap=null,this._load=null,I.autoLoad!==!1&&this.load()}load(E){return this._load?this._load:(E!==void 0&&(this.createBitmap=E),this._load=new Promise((I,B)=>{const U=this.source;this.url=U.src;const V=()=>{this.destroyed||(U.onload=null,U.onerror=null,this.resize(U.width,U.height),this._load=null,this.createBitmap?I(this.process()):I(this))};U.complete&&U.src?V():(U.onload=V,U.onerror=X=>{B(X),this.onError.emit(X)})}),this._load)}process(){const E=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const I=globalThis.createImageBitmap,B=!E.crossOrigin||E.crossOrigin==="anonymous";return this._process=fetch(E.src,{mode:B?"cors":"no-cors"}).then(U=>U.blob()).then(U=>I(U,0,0,E.width,E.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ALPHA_MODES.UNPACK?"premultiply":"none"})).then(U=>this.destroyed?Promise.reject():(this.bitmap=U,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(E,I,B){if(typeof this.alphaMode=="number"&&(I.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(E,I,B);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(E,I,B,this.bitmap),!this.preserveBitmap){let U=!0;const V=I._glTextures;for(const X in V){const Y=V[X];if(Y!==B&&Y.dirtyId!==I.dirtyId){U=!1;break}}U&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(E){return typeof HTMLImageElement<"u"&&(typeof E=="string"||E instanceof HTMLImageElement)}}class TextureUvs{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(E,I,B){const U=I.width,V=I.height;if(B){const X=E.width/2/U,Y=E.height/2/V,K=E.x/U+X,J=E.y/V+Y;B=groupD8.add(B,groupD8.NW),this.x0=K+X*groupD8.uX(B),this.y0=J+Y*groupD8.uY(B),B=groupD8.add(B,2),this.x1=K+X*groupD8.uX(B),this.y1=J+Y*groupD8.uY(B),B=groupD8.add(B,2),this.x2=K+X*groupD8.uX(B),this.y2=J+Y*groupD8.uY(B),B=groupD8.add(B,2),this.x3=K+X*groupD8.uX(B),this.y3=J+Y*groupD8.uY(B)}else this.x0=E.x/U,this.y0=E.y/V,this.x1=(E.x+E.width)/U,this.y1=E.y/V,this.x2=(E.x+E.width)/U,this.y2=(E.y+E.height)/V,this.x3=E.x/U,this.y3=(E.y+E.height)/V;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const DEFAULT_UVS=new TextureUvs;function removeAllHandlers(C){C.destroy=function(){},C.on=function(){},C.once=function(){},C.emit=function(){}}class Texture extends EventEmitter{constructor(E,I,B,U,V,X,Y){if(super(),this.noFrame=!1,I||(this.noFrame=!0,I=new Rectangle(0,0,1,1)),E instanceof Texture&&(E=E.baseTexture),this.baseTexture=E,this._frame=I,this.trim=U,this.valid=!1,this._uvs=DEFAULT_UVS,this.uvMatrix=null,this.orig=B||I,this._rotate=Number(V||0),V===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=X?new Point(X.x,X.y):new Point(0,0),this.defaultBorders=Y,this._updateID=0,this.textureCacheIds=[],E.valid?this.noFrame?E.valid&&this.onBaseTextureUpdated(E):this.frame=I:E.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&E.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(E){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=E.width,this._frame.height=E.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(E){if(this.baseTexture){if(E){const{resource:I}=this.baseTexture;I!=null&&I.url&&TextureCache[I.url]&&Texture.removeFromCache(I.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Texture.removeFromCache(this),this.textureCacheIds=null}clone(){var U;const E=this._frame.clone(),I=this._frame===this.orig?E:this.orig.clone(),B=new Texture(this.baseTexture,!this.noFrame&&E,I,(U=this.trim)==null?void 0:U.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(B._frame=E),B}updateUvs(){this._uvs===DEFAULT_UVS&&(this._uvs=new TextureUvs),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(E,I={},B=settings.STRICT_TEXTURE_CACHE){const U=typeof E=="string";let V=null;if(U)V=E;else if(E instanceof BaseTexture){if(!E.cacheId){const Y=(I==null?void 0:I.pixiIdPrefix)||"pixiid";E.cacheId=`${Y}-${uid()}`,BaseTexture.addToCache(E,E.cacheId)}V=E.cacheId}else{if(!E._pixiId){const Y=(I==null?void 0:I.pixiIdPrefix)||"pixiid";E._pixiId=`${Y}_${uid()}`}V=E._pixiId}let X=TextureCache[V];if(U&&B&&!X)throw new Error(`The cacheId "${V}" does not exist in TextureCache.`);return!X&&!(E instanceof BaseTexture)?(I.resolution||(I.resolution=getResolutionOfUrl(E)),X=new Texture(new BaseTexture(E,I)),X.baseTexture.cacheId=V,BaseTexture.addToCache(X.baseTexture,V),Texture.addToCache(X,V)):!X&&E instanceof BaseTexture&&(X=new Texture(E),Texture.addToCache(X,V)),X}static fromURL(E,I){const B=Object.assign({autoLoad:!1},I==null?void 0:I.resourceOptions),U=Texture.from(E,Object.assign({resourceOptions:B},I),!1),V=U.baseTexture.resource;return U.baseTexture.valid?Promise.resolve(U):V.load().then(()=>Promise.resolve(U))}static fromBuffer(E,I,B,U){return new Texture(BaseTexture.fromBuffer(E,I,B,U))}static fromLoader(E,I,B,U){const V=new BaseTexture(E,Object.assign({scaleMode:BaseTexture.defaultOptions.scaleMode,resolution:getResolutionOfUrl(I)},U)),{resource:X}=V;X instanceof ImageResource&&(X.url=I);const Y=new Texture(V);return B||(B=I),BaseTexture.addToCache(Y.baseTexture,B),Texture.addToCache(Y,B),B!==I&&(BaseTexture.addToCache(Y.baseTexture,I),Texture.addToCache(Y,I)),Y.baseTexture.valid?Promise.resolve(Y):new Promise(K=>{Y.baseTexture.once("loaded",()=>K(Y))})}static addToCache(E,I){I&&(E.textureCacheIds.includes(I)||E.textureCacheIds.push(I),TextureCache[I]&&TextureCache[I]!==E&&console.warn(`Texture added to the cache with an id [${I}] that already had an entry`),TextureCache[I]=E)}static removeFromCache(E){if(typeof E=="string"){const I=TextureCache[E];if(I){const B=I.textureCacheIds.indexOf(E);return B>-1&&I.textureCacheIds.splice(B,1),delete TextureCache[E],I}}else if(E!=null&&E.textureCacheIds){for(let I=0;I<E.textureCacheIds.length;++I)TextureCache[E.textureCacheIds[I]]===E&&delete TextureCache[E.textureCacheIds[I]];return E.textureCacheIds.length=0,E}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(E){this._frame=E,this.noFrame=!1;const{x:I,y:B,width:U,height:V}=E,X=I+U>this.baseTexture.width,Y=B+V>this.baseTexture.height;if(X||Y){const K=X&&Y?"and":"or",J=`X: ${I} + ${U} = ${I+U} > ${this.baseTexture.width}`,xe=`Y: ${B} + ${V} = ${B+V} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${J} ${K} ${xe}`)}this.valid=U&&V&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=E),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(E){this._rotate=E,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Texture._EMPTY||(Texture._EMPTY=new Texture(new BaseTexture),removeAllHandlers(Texture._EMPTY),removeAllHandlers(Texture._EMPTY.baseTexture)),Texture._EMPTY}static get WHITE(){if(!Texture._WHITE){const E=settings.ADAPTER.createCanvas(16,16),I=E.getContext("2d");E.width=16,E.height=16,I.fillStyle="white",I.fillRect(0,0,16,16),Texture._WHITE=new Texture(BaseTexture.from(E)),removeAllHandlers(Texture._WHITE),removeAllHandlers(Texture._WHITE.baseTexture)}return Texture._WHITE}}class RenderTexture extends Texture{constructor(E,I){super(E,I),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(E){this.framebuffer.multisample=E}resize(E,I,B=!0){const U=this.baseTexture.resolution,V=Math.round(E*U)/U,X=Math.round(I*U)/U;this.valid=V>0&&X>0,this._frame.width=this.orig.width=V,this._frame.height=this.orig.height=X,B&&this.baseTexture.resize(V,X),this.updateUvs()}setResolution(E){const{baseTexture:I}=this;I.resolution!==E&&(I.setResolution(E),this.resize(I.width,I.height,!1))}static create(E){return new RenderTexture(new BaseRenderTexture(E))}}class RenderTexturePool{constructor(E){this.texturePool={},this.textureOptions=E||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(E,I,B=MSAA_QUALITY.NONE){const U=new BaseRenderTexture(Object.assign({width:E,height:I,resolution:1,multisample:B},this.textureOptions));return new RenderTexture(U)}getOptimalTexture(E,I,B=1,U=MSAA_QUALITY.NONE){let V;E=Math.ceil(E*B-1e-6),I=Math.ceil(I*B-1e-6),!this.enableFullScreen||E!==this._pixelsWidth||I!==this._pixelsHeight?(E=nextPow2(E),I=nextPow2(I),V=((E&65535)<<16|I&65535)>>>0,U>1&&(V+=U*4294967296)):V=U>1?-U:-1,this.texturePool[V]||(this.texturePool[V]=[]);let X=this.texturePool[V].pop();return X||(X=this.createTexture(E,I,U)),X.filterPoolKey=V,X.setResolution(B),X}getFilterTexture(E,I,B){const U=this.getOptimalTexture(E.width,E.height,I||E.resolution,B||MSAA_QUALITY.NONE);return U.filterFrame=E.filterFrame,U}returnTexture(E){const I=E.filterPoolKey;E.filterFrame=null,this.texturePool[I].push(E)}returnFilterTexture(E){this.returnTexture(E)}clear(E){if(E=E!==!1,E)for(const I in this.texturePool){const B=this.texturePool[I];if(B)for(let U=0;U<B.length;U++)B[U].destroy(!0)}this.texturePool={}}setScreenSize(E){if(!(E.width===this._pixelsWidth&&E.height===this._pixelsHeight)){this.enableFullScreen=E.width>0&&E.height>0;for(const I in this.texturePool){if(!(Number(I)<0))continue;const B=this.texturePool[I];if(B)for(let U=0;U<B.length;U++)B[U].destroy(!0);this.texturePool[I]=[]}this._pixelsWidth=E.width,this._pixelsHeight=E.height}}}RenderTexturePool.SCREEN_KEY=-1;class Quad extends Geometry{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class QuadUv extends Geometry{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Buffer(this.vertices),this.uvBuffer=new Buffer(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(E,I){let B=0,U=0;return this.uvs[0]=B,this.uvs[1]=U,this.uvs[2]=B+I.width/E.width,this.uvs[3]=U,this.uvs[4]=B+I.width/E.width,this.uvs[5]=U+I.height/E.height,this.uvs[6]=B,this.uvs[7]=U+I.height/E.height,B=I.x,U=I.y,this.vertices[0]=B,this.vertices[1]=U,this.vertices[2]=B+I.width,this.vertices[3]=U,this.vertices[4]=B+I.width,this.vertices[5]=U+I.height,this.vertices[6]=B,this.vertices[7]=U+I.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class FilterState{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=MSAA_QUALITY.NONE,this.sourceFrame=new Rectangle,this.destinationFrame=new Rectangle,this.bindingSourceFrame=new Rectangle,this.bindingDestinationFrame=new Rectangle,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const tempPoints=[new Point,new Point,new Point,new Point],tempMatrix$2=new Matrix$2;class FilterSystem{constructor(E){this.renderer=E,this.defaultFilterStack=[{}],this.texturePool=new RenderTexturePool,this.statePool=[],this.quad=new Quad,this.quadUv=new QuadUv,this.tempRect=new Rectangle,this.activeState={},this.globalUniforms=new UniformGroup({outputFrame:new Rectangle,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(E,I){const B=this.renderer,U=this.defaultFilterStack,V=this.statePool.pop()||new FilterState,X=this.renderer.renderTexture;let Y=I[0].resolution,K=I[0].multisample,J=I[0].padding,xe=I[0].autoFit,Z=I[0].legacy??!0;for(let Ee=1;Ee<I.length;Ee++){const Ae=I[Ee];Y=Math.min(Y,Ae.resolution),K=Math.min(K,Ae.multisample),J=this.useMaxPadding?Math.max(J,Ae.padding):J+Ae.padding,xe=xe&&Ae.autoFit,Z=Z||(Ae.legacy??!0)}U.length===1&&(this.defaultFilterStack[0].renderTexture=X.current),U.push(V),V.resolution=Y,V.multisample=K,V.legacy=Z,V.target=E,V.sourceFrame.copyFrom(E.filterArea||E.getBounds(!0)),V.sourceFrame.pad(J);const _e=this.tempRect.copyFrom(X.sourceFrame);B.projection.transform&&this.transformAABB(tempMatrix$2.copyFrom(B.projection.transform).invert(),_e),xe?(V.sourceFrame.fit(_e),(V.sourceFrame.width<=0||V.sourceFrame.height<=0)&&(V.sourceFrame.width=0,V.sourceFrame.height=0)):V.sourceFrame.intersects(_e)||(V.sourceFrame.width=0,V.sourceFrame.height=0),this.roundFrame(V.sourceFrame,X.current?X.current.resolution:B.resolution,X.sourceFrame,X.destinationFrame,B.projection.transform),V.renderTexture=this.getOptimalFilterTexture(V.sourceFrame.width,V.sourceFrame.height,Y,K),V.filters=I,V.destinationFrame.width=V.renderTexture.width,V.destinationFrame.height=V.renderTexture.height;const Se=this.tempRect;Se.x=0,Se.y=0,Se.width=V.sourceFrame.width,Se.height=V.sourceFrame.height,V.renderTexture.filterFrame=V.sourceFrame,V.bindingSourceFrame.copyFrom(X.sourceFrame),V.bindingDestinationFrame.copyFrom(X.destinationFrame),V.transform=B.projection.transform,B.projection.transform=null,X.bind(V.renderTexture,V.sourceFrame,Se),B.framebuffer.clear(0,0,0,0)}pop(){const E=this.defaultFilterStack,I=E.pop(),B=I.filters;this.activeState=I;const U=this.globalUniforms.uniforms;U.outputFrame=I.sourceFrame,U.resolution=I.resolution;const V=U.inputSize,X=U.inputPixel,Y=U.inputClamp;if(V[0]=I.destinationFrame.width,V[1]=I.destinationFrame.height,V[2]=1/V[0],V[3]=1/V[1],X[0]=Math.round(V[0]*I.resolution),X[1]=Math.round(V[1]*I.resolution),X[2]=1/X[0],X[3]=1/X[1],Y[0]=.5*X[2],Y[1]=.5*X[3],Y[2]=I.sourceFrame.width*V[2]-.5*X[2],Y[3]=I.sourceFrame.height*V[3]-.5*X[3],I.legacy){const J=U.filterArea;J[0]=I.destinationFrame.width,J[1]=I.destinationFrame.height,J[2]=I.sourceFrame.x,J[3]=I.sourceFrame.y,U.filterClamp=U.inputClamp}this.globalUniforms.update();const K=E[E.length-1];if(this.renderer.framebuffer.blit(),B.length===1)B[0].apply(this,I.renderTexture,K.renderTexture,CLEAR_MODES.BLEND,I),this.returnFilterTexture(I.renderTexture);else{let J=I.renderTexture,xe=this.getOptimalFilterTexture(J.width,J.height,I.resolution);xe.filterFrame=J.filterFrame;let Z=0;for(Z=0;Z<B.length-1;++Z){Z===1&&I.multisample>1&&(xe=this.getOptimalFilterTexture(J.width,J.height,I.resolution),xe.filterFrame=J.filterFrame),B[Z].apply(this,J,xe,CLEAR_MODES.CLEAR,I);const _e=J;J=xe,xe=_e}B[Z].apply(this,J,K.renderTexture,CLEAR_MODES.BLEND,I),Z>1&&I.multisample>1&&this.returnFilterTexture(I.renderTexture),this.returnFilterTexture(J),this.returnFilterTexture(xe)}I.clear(),this.statePool.push(I)}bindAndClear(E,I=CLEAR_MODES.CLEAR){const{renderTexture:B,state:U}=this.renderer;if(E===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,E!=null&&E.filterFrame){const X=this.tempRect;X.x=0,X.y=0,X.width=E.filterFrame.width,X.height=E.filterFrame.height,B.bind(E,E.filterFrame,X)}else E!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?B.bind(E):this.renderer.renderTexture.bind(E,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const V=U.stateId&1||this.forceClear;(I===CLEAR_MODES.CLEAR||I===CLEAR_MODES.BLIT&&V)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(E,I,B,U){const V=this.renderer;V.state.set(E.state),this.bindAndClear(B,U),E.uniforms.uSampler=I,E.uniforms.filterGlobals=this.globalUniforms,V.shader.bind(E),E.legacy=!!E.program.attributeData.aTextureCoord,E.legacy?(this.quadUv.map(I._frame,I.filterFrame),V.geometry.bind(this.quadUv),V.geometry.draw(DRAW_MODES.TRIANGLES)):(V.geometry.bind(this.quad),V.geometry.draw(DRAW_MODES.TRIANGLE_STRIP))}calculateSpriteMatrix(E,I){const{sourceFrame:B,destinationFrame:U}=this.activeState,{orig:V}=I._texture,X=E.set(U.width,0,0,U.height,B.x,B.y),Y=I.worldTransform.copyTo(Matrix$2.TEMP_MATRIX);return Y.invert(),X.prepend(Y),X.scale(1/V.width,1/V.height),X.translate(I.anchor.x,I.anchor.y),X}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(E,I,B=1,U=MSAA_QUALITY.NONE){return this.texturePool.getOptimalTexture(E,I,B,U)}getFilterTexture(E,I,B){if(typeof E=="number"){const V=E;E=I,I=V}E=E||this.activeState.renderTexture;const U=this.texturePool.getOptimalTexture(E.width,E.height,I||E.resolution,B||MSAA_QUALITY.NONE);return U.filterFrame=E.filterFrame,U}returnFilterTexture(E){this.texturePool.returnTexture(E)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(E,I){const B=tempPoints[0],U=tempPoints[1],V=tempPoints[2],X=tempPoints[3];B.set(I.left,I.top),U.set(I.left,I.bottom),V.set(I.right,I.top),X.set(I.right,I.bottom),E.apply(B,B),E.apply(U,U),E.apply(V,V),E.apply(X,X);const Y=Math.min(B.x,U.x,V.x,X.x),K=Math.min(B.y,U.y,V.y,X.y),J=Math.max(B.x,U.x,V.x,X.x),xe=Math.max(B.y,U.y,V.y,X.y);I.x=Y,I.y=K,I.width=J-Y,I.height=xe-K}roundFrame(E,I,B,U,V){if(!(E.width<=0||E.height<=0||B.width<=0||B.height<=0)){if(V){const{a:X,b:Y,c:K,d:J}=V;if((Math.abs(Y)>1e-4||Math.abs(K)>1e-4)&&(Math.abs(X)>1e-4||Math.abs(J)>1e-4))return}V=V?tempMatrix$2.copyFrom(V):tempMatrix$2.identity(),V.translate(-B.x,-B.y).scale(U.width/B.width,U.height/B.height).translate(U.x,U.y),this.transformAABB(V,E),E.ceil(I),this.transformAABB(V.invert(),E)}}}FilterSystem.extension={type:ExtensionType.RendererSystem,name:"filter"},extensions.add(FilterSystem);class GLFramebuffer{constructor(E){this.framebuffer=E,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=MSAA_QUALITY.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const tempRectangle=new Rectangle;class FramebufferSystem{constructor(E){this.renderer=E,this.managedFramebuffers=[],this.unknownFramebuffer=new Framebuffer(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const E=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Rectangle,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let I=this.renderer.context.extensions.drawBuffers,B=this.renderer.context.extensions.depthTexture;settings.PREFER_ENV===ENV.WEBGL_LEGACY&&(I=null,B=null),I?E.drawBuffers=U=>I.drawBuffersWEBGL(U):(this.hasMRT=!1,E.drawBuffers=()=>{}),B||(this.writeDepthTexture=!1)}else this.msaaSamples=E.getInternalformatParameter(E.RENDERBUFFER,E.RGBA8,E.SAMPLES)}bind(E,I,B=0){const{gl:U}=this;if(E){const V=E.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(E);this.current!==E&&(this.current=E,U.bindFramebuffer(U.FRAMEBUFFER,V.framebuffer)),V.mipLevel!==B&&(E.dirtyId++,E.dirtyFormat++,V.mipLevel=B),V.dirtyId!==E.dirtyId&&(V.dirtyId=E.dirtyId,V.dirtyFormat!==E.dirtyFormat?(V.dirtyFormat=E.dirtyFormat,V.dirtySize=E.dirtySize,this.updateFramebuffer(E,B)):V.dirtySize!==E.dirtySize&&(V.dirtySize=E.dirtySize,this.resizeFramebuffer(E)));for(let X=0;X<E.colorTextures.length;X++){const Y=E.colorTextures[X];this.renderer.texture.unbind(Y.parentTextureArray||Y)}if(E.depthTexture&&this.renderer.texture.unbind(E.depthTexture),I){const X=I.width>>B,Y=I.height>>B,K=X/I.width;this.setViewport(I.x*K,I.y*K,X,Y)}else{const X=E.width>>B,Y=E.height>>B;this.setViewport(0,0,X,Y)}}else this.current&&(this.current=null,U.bindFramebuffer(U.FRAMEBUFFER,null)),I?this.setViewport(I.x,I.y,I.width,I.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(E,I,B,U){const V=this.viewport;E=Math.round(E),I=Math.round(I),B=Math.round(B),U=Math.round(U),(V.width!==B||V.height!==U||V.x!==E||V.y!==I)&&(V.x=E,V.y=I,V.width=B,V.height=U,this.gl.viewport(E,I,B,U))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(E,I,B,U,V=BUFFER_BITS.COLOR|BUFFER_BITS.DEPTH){const{gl:X}=this;X.clearColor(E,I,B,U),X.clear(V)}initFramebuffer(E){const{gl:I}=this,B=new GLFramebuffer(I.createFramebuffer());return B.multisample=this.detectSamples(E.multisample),E.glFramebuffers[this.CONTEXT_UID]=B,this.managedFramebuffers.push(E),E.disposeRunner.add(this),B}resizeFramebuffer(E){const{gl:I}=this,B=E.glFramebuffers[this.CONTEXT_UID];B.stencil&&(I.bindRenderbuffer(I.RENDERBUFFER,B.stencil),B.msaaBuffer?I.renderbufferStorageMultisample(I.RENDERBUFFER,B.multisample,I.DEPTH24_STENCIL8,E.width,E.height):I.renderbufferStorage(I.RENDERBUFFER,I.DEPTH_STENCIL,E.width,E.height));const U=E.colorTextures;let V=U.length;I.drawBuffers||(V=Math.min(V,1));for(let X=0;X<V;X++){const Y=U[X],K=Y.parentTextureArray||Y;this.renderer.texture.bind(K,0),X===0&&B.msaaBuffer&&(I.bindRenderbuffer(I.RENDERBUFFER,B.msaaBuffer),I.renderbufferStorageMultisample(I.RENDERBUFFER,B.multisample,K._glTextures[this.CONTEXT_UID].internalFormat,E.width,E.height))}E.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(E.depthTexture,0)}updateFramebuffer(E,I){const{gl:B}=this,U=E.glFramebuffers[this.CONTEXT_UID],V=E.colorTextures;let X=V.length;B.drawBuffers||(X=Math.min(X,1)),U.multisample>1&&this.canMultisampleFramebuffer(E)?U.msaaBuffer=U.msaaBuffer||B.createRenderbuffer():U.msaaBuffer&&(B.deleteRenderbuffer(U.msaaBuffer),U.msaaBuffer=null,U.blitFramebuffer&&(U.blitFramebuffer.dispose(),U.blitFramebuffer=null));const Y=[];for(let K=0;K<X;K++){const J=V[K],xe=J.parentTextureArray||J;this.renderer.texture.bind(xe,0),K===0&&U.msaaBuffer?(B.bindRenderbuffer(B.RENDERBUFFER,U.msaaBuffer),B.renderbufferStorageMultisample(B.RENDERBUFFER,U.multisample,xe._glTextures[this.CONTEXT_UID].internalFormat,E.width,E.height),B.framebufferRenderbuffer(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.RENDERBUFFER,U.msaaBuffer)):(B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0+K,J.target,xe._glTextures[this.CONTEXT_UID].texture,I),Y.push(B.COLOR_ATTACHMENT0+K))}if(Y.length>1&&B.drawBuffers(Y),E.depthTexture&&this.writeDepthTexture){const J=E.depthTexture;this.renderer.texture.bind(J,0),B.framebufferTexture2D(B.FRAMEBUFFER,B.DEPTH_ATTACHMENT,B.TEXTURE_2D,J._glTextures[this.CONTEXT_UID].texture,I)}(E.stencil||E.depth)&&!(E.depthTexture&&this.writeDepthTexture)?(U.stencil=U.stencil||B.createRenderbuffer(),B.bindRenderbuffer(B.RENDERBUFFER,U.stencil),U.msaaBuffer?B.renderbufferStorageMultisample(B.RENDERBUFFER,U.multisample,B.DEPTH24_STENCIL8,E.width,E.height):B.renderbufferStorage(B.RENDERBUFFER,B.DEPTH_STENCIL,E.width,E.height),B.framebufferRenderbuffer(B.FRAMEBUFFER,B.DEPTH_STENCIL_ATTACHMENT,B.RENDERBUFFER,U.stencil)):U.stencil&&(B.deleteRenderbuffer(U.stencil),U.stencil=null)}canMultisampleFramebuffer(E){return this.renderer.context.webGLVersion!==1&&E.colorTextures.length<=1&&!E.depthTexture}detectSamples(E){const{msaaSamples:I}=this;let B=MSAA_QUALITY.NONE;if(E<=1||I===null)return B;for(let U=0;U<I.length;U++)if(I[U]<=E){B=I[U];break}return B===1&&(B=MSAA_QUALITY.NONE),B}blit(E,I,B){const{current:U,renderer:V,gl:X,CONTEXT_UID:Y}=this;if(V.context.webGLVersion!==2||!U)return;const K=U.glFramebuffers[Y];if(!K)return;if(!E){if(!K.msaaBuffer)return;const xe=U.colorTextures[0];if(!xe)return;K.blitFramebuffer||(K.blitFramebuffer=new Framebuffer(U.width,U.height),K.blitFramebuffer.addColorTexture(0,xe)),E=K.blitFramebuffer,E.colorTextures[0]!==xe&&(E.colorTextures[0]=xe,E.dirtyId++,E.dirtyFormat++),(E.width!==U.width||E.height!==U.height)&&(E.width=U.width,E.height=U.height,E.dirtyId++,E.dirtySize++)}I||(I=tempRectangle,I.width=U.width,I.height=U.height),B||(B=I);const J=I.width===B.width&&I.height===B.height;this.bind(E),X.bindFramebuffer(X.READ_FRAMEBUFFER,K.framebuffer),X.blitFramebuffer(I.left,I.top,I.right,I.bottom,B.left,B.top,B.right,B.bottom,X.COLOR_BUFFER_BIT,J?X.NEAREST:X.LINEAR)}disposeFramebuffer(E,I){const B=E.glFramebuffers[this.CONTEXT_UID],U=this.gl;if(!B)return;delete E.glFramebuffers[this.CONTEXT_UID];const V=this.managedFramebuffers.indexOf(E);V>=0&&this.managedFramebuffers.splice(V,1),E.disposeRunner.remove(this),I||(U.deleteFramebuffer(B.framebuffer),B.msaaBuffer&&U.deleteRenderbuffer(B.msaaBuffer),B.stencil&&U.deleteRenderbuffer(B.stencil)),B.blitFramebuffer&&this.disposeFramebuffer(B.blitFramebuffer,I)}disposeAll(E){const I=this.managedFramebuffers;this.managedFramebuffers=[];for(let B=0;B<I.length;B++)this.disposeFramebuffer(I[B],E)}forceStencil(){const E=this.current;if(!E)return;const I=E.glFramebuffers[this.CONTEXT_UID];if(!I||I.stencil)return;E.stencil=!0;const B=E.width,U=E.height,V=this.gl,X=V.createRenderbuffer();V.bindRenderbuffer(V.RENDERBUFFER,X),I.msaaBuffer?V.renderbufferStorageMultisample(V.RENDERBUFFER,I.multisample,V.DEPTH24_STENCIL8,B,U):V.renderbufferStorage(V.RENDERBUFFER,V.DEPTH_STENCIL,B,U),I.stencil=X,V.framebufferRenderbuffer(V.FRAMEBUFFER,V.DEPTH_STENCIL_ATTACHMENT,V.RENDERBUFFER,X)}reset(){this.current=this.unknownFramebuffer,this.viewport=new Rectangle}destroy(){this.renderer=null}}FramebufferSystem.extension={type:ExtensionType.RendererSystem,name:"framebuffer"},extensions.add(FramebufferSystem);const byteSizeMap={5126:4,5123:2,5121:1};class GeometrySystem{constructor(E){this.renderer=E,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const E=this.gl=this.renderer.gl,I=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,I.webGLVersion!==2){let B=this.renderer.context.extensions.vertexArrayObject;settings.PREFER_ENV===ENV.WEBGL_LEGACY&&(B=null),B?(E.createVertexArray=()=>B.createVertexArrayOES(),E.bindVertexArray=U=>B.bindVertexArrayOES(U),E.deleteVertexArray=U=>B.deleteVertexArrayOES(U)):(this.hasVao=!1,E.createVertexArray=()=>null,E.bindVertexArray=()=>null,E.deleteVertexArray=()=>null)}if(I.webGLVersion!==2){const B=E.getExtension("ANGLE_instanced_arrays");B?(E.vertexAttribDivisor=(U,V)=>B.vertexAttribDivisorANGLE(U,V),E.drawElementsInstanced=(U,V,X,Y,K)=>B.drawElementsInstancedANGLE(U,V,X,Y,K),E.drawArraysInstanced=(U,V,X,Y)=>B.drawArraysInstancedANGLE(U,V,X,Y)):this.hasInstance=!1}this.canUseUInt32ElementIndex=I.webGLVersion===2||!!I.extensions.uint32ElementIndex}bind(E,I){I=I||this.renderer.shader.shader;const{gl:B}=this;let U=E.glVertexArrayObjects[this.CONTEXT_UID],V=!1;U||(this.managedGeometries[E.id]=E,E.disposeRunner.add(this),E.glVertexArrayObjects[this.CONTEXT_UID]=U={},V=!0);const X=U[I.program.id]||this.initGeometryVao(E,I,V);this._activeGeometry=E,this._activeVao!==X&&(this._activeVao=X,this.hasVao?B.bindVertexArray(X):this.activateVao(E,I.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const E=this._activeGeometry,I=this.renderer.buffer;for(let B=0;B<E.buffers.length;B++){const U=E.buffers[B];I.update(U)}}checkCompatibility(E,I){const B=E.attributes,U=I.attributeData;for(const V in U)if(!B[V])throw new Error(`shader and geometry incompatible, geometry missing the "${V}" attribute`)}getSignature(E,I){const B=E.attributes,U=I.attributeData,V=["g",E.id];for(const X in B)U[X]&&V.push(X,U[X].location);return V.join("-")}initGeometryVao(E,I,B=!0){const U=this.gl,V=this.CONTEXT_UID,X=this.renderer.buffer,Y=I.program;Y.glPrograms[V]||this.renderer.shader.generateProgram(I),this.checkCompatibility(E,Y);const K=this.getSignature(E,Y),J=E.glVertexArrayObjects[this.CONTEXT_UID];let xe=J[K];if(xe)return J[Y.id]=xe,xe;const Z=E.buffers,_e=E.attributes,Se={},Ee={};for(const Ae in Z)Se[Ae]=0,Ee[Ae]=0;for(const Ae in _e)!_e[Ae].size&&Y.attributeData[Ae]?_e[Ae].size=Y.attributeData[Ae].size:_e[Ae].size||console.warn(`PIXI Geometry attribute '${Ae}' size cannot be determined (likely the bound shader does not have the attribute)`),Se[_e[Ae].buffer]+=_e[Ae].size*byteSizeMap[_e[Ae].type];for(const Ae in _e){const Re=_e[Ae],Te=Re.size;Re.stride===void 0&&(Se[Re.buffer]===Te*byteSizeMap[Re.type]?Re.stride=0:Re.stride=Se[Re.buffer]),Re.start===void 0&&(Re.start=Ee[Re.buffer],Ee[Re.buffer]+=Te*byteSizeMap[Re.type])}xe=U.createVertexArray(),U.bindVertexArray(xe);for(let Ae=0;Ae<Z.length;Ae++){const Re=Z[Ae];X.bind(Re),B&&Re._glBuffers[V].refCount++}return this.activateVao(E,Y),J[Y.id]=xe,J[K]=xe,U.bindVertexArray(null),X.unbind(BUFFER_TYPE.ARRAY_BUFFER),xe}disposeGeometry(E,I){var Y;if(!this.managedGeometries[E.id])return;delete this.managedGeometries[E.id];const B=E.glVertexArrayObjects[this.CONTEXT_UID],U=this.gl,V=E.buffers,X=(Y=this.renderer)==null?void 0:Y.buffer;if(E.disposeRunner.remove(this),!!B){if(X)for(let K=0;K<V.length;K++){const J=V[K]._glBuffers[this.CONTEXT_UID];J&&(J.refCount--,J.refCount===0&&!I&&X.dispose(V[K],I))}if(!I){for(const K in B)if(K[0]==="g"){const J=B[K];this._activeVao===J&&this.unbind(),U.deleteVertexArray(J)}}delete E.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(E){const I=Object.keys(this.managedGeometries);for(let B=0;B<I.length;B++)this.disposeGeometry(this.managedGeometries[I[B]],E)}activateVao(E,I){const B=this.gl,U=this.CONTEXT_UID,V=this.renderer.buffer,X=E.buffers,Y=E.attributes;E.indexBuffer&&V.bind(E.indexBuffer);let K=null;for(const J in Y){const xe=Y[J],Z=X[xe.buffer],_e=Z._glBuffers[U];if(I.attributeData[J]){K!==_e&&(V.bind(Z),K=_e);const Se=I.attributeData[J].location;if(B.enableVertexAttribArray(Se),B.vertexAttribPointer(Se,xe.size,xe.type||B.FLOAT,xe.normalized,xe.stride,xe.start),xe.instance)if(this.hasInstance)B.vertexAttribDivisor(Se,xe.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(E,I,B,U){const{gl:V}=this,X=this._activeGeometry;if(X.indexBuffer){const Y=X.indexBuffer.data.BYTES_PER_ELEMENT,K=Y===2?V.UNSIGNED_SHORT:V.UNSIGNED_INT;Y===2||Y===4&&this.canUseUInt32ElementIndex?X.instanced?V.drawElementsInstanced(E,I||X.indexBuffer.data.length,K,(B||0)*Y,U||1):V.drawElements(E,I||X.indexBuffer.data.length,K,(B||0)*Y):console.warn("unsupported index buffer type: uint32")}else X.instanced?V.drawArraysInstanced(E,B,I||X.getSize(),U||1):V.drawArrays(E,B,I||X.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}GeometrySystem.extension={type:ExtensionType.RendererSystem,name:"geometry"},extensions.add(GeometrySystem);const tempMat=new Matrix$2;class TextureMatrix{constructor(E,I){this._texture=E,this.mapCoord=new Matrix$2,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof I>"u"?.5:I,this.isSimple=!1}get texture(){return this._texture}set texture(E){this._texture=E,this._textureID=-1}multiplyUvs(E,I){I===void 0&&(I=E);const B=this.mapCoord;for(let U=0;U<E.length;U+=2){const V=E[U],X=E[U+1];I[U]=V*B.a+X*B.c+B.tx,I[U+1]=V*B.b+X*B.d+B.ty}return I}update(E){const I=this._texture;if(!I||!I.valid||!E&&this._textureID===I._updateID)return!1;this._textureID=I._updateID,this._updateID++;const B=I._uvs;this.mapCoord.set(B.x1-B.x0,B.y1-B.y0,B.x3-B.x0,B.y3-B.y0,B.x0,B.y0);const U=I.orig,V=I.trim;V&&(tempMat.set(U.width/V.width,0,0,U.height/V.height,-V.x/V.width,-V.y/V.height),this.mapCoord.append(tempMat));const X=I.baseTexture,Y=this.uClampFrame,K=this.clampMargin/X.resolution,J=this.clampOffset;return Y[0]=(I._frame.x+K+J)/X.width,Y[1]=(I._frame.y+K+J)/X.height,Y[2]=(I._frame.x+I._frame.width-K+J)/X.width,Y[3]=(I._frame.y+I._frame.height-K+J)/X.height,this.uClampOffset[0]=J/X.realWidth,this.uClampOffset[1]=J/X.realHeight,this.isSimple=I._frame.width===X.width&&I._frame.height===X.height&&I.rotate===0,!0}}var fragment=`varying vec2 vMaskCoord;
411
411
  varying vec2 vTextureCoord;
412
412
 
413
413
  uniform sampler2D uSampler;
@@ -432,7 +432,7 @@ void main(void)
432
432
 
433
433
  gl_FragColor = original;
434
434
  }
435
- `,Ib=`attribute vec2 aVertexPosition;
435
+ `,vertex=`attribute vec2 aVertexPosition;
436
436
  attribute vec2 aTextureCoord;
437
437
 
438
438
  uniform mat3 projectionMatrix;
@@ -448,7 +448,7 @@ void main(void)
448
448
  vTextureCoord = aTextureCoord;
449
449
  vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
450
450
  }
451
- `;class Rb extends ue{constructor(e,r,i){let n=null;typeof e!="string"&&r===void 0&&i===void 0&&(n=e,e=void 0,r=void 0,i=void 0),super(e||Ib,r||Cb,i),this.maskSprite=n,this.maskMatrix=new Ue}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,r,i,n){const s=this._maskSprite,a=s._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new Eb(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,s).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=s.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,e.applyFilter(this,r,i,n))}}class Pb{constructor(e=null){this.type=Ee.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=ue.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ee.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class qu{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,r){let i=r;if(!i.isMaskData){const s=this.maskDataPool.pop()||new Pb;s.pooled=!0,s.maskObject=r,i=s}const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(n),i._colorMask=n?n._colorMask:15,i.autoDetect&&this.detect(i),i._target=e,i.type!==Ee.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case Ee.SCISSOR:this.renderer.scissor.push(i);break;case Ee.STENCIL:this.renderer.stencil.push(i);break;case Ee.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case Ee.COLOR:this.pushColorMask(i);break}i.type===Ee.SPRITE&&this.maskStack.push(i)}pop(e){const r=this.maskStack.pop();if(!(!r||r._target!==e)){if(r.enabled)switch(r.type){case Ee.SCISSOR:this.renderer.scissor.pop(r);break;case Ee.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case Ee.SPRITE:this.popSpriteMask(r);break;case Ee.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const i=this.maskStack[this.maskStack.length-1];i.type===Ee.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}}detect(e){const r=e.maskObject;r?r.isSprite?e.type=Ee.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=Ee.SCISSOR:e.type=Ee.STENCIL:e.type=Ee.COLOR}pushSpriteMask(e){const{maskObject:r}=e,i=e._target;let n=e._filters;n||(n=this.alphaMaskPool[this.alphaMaskIndex],n||(n=this.alphaMaskPool[this.alphaMaskIndex]=[new Rb]));const s=this.renderer,a=s.renderTexture;let o,u;if(a.current){const d=a.current;o=e.resolution||d.resolution,u=e.multisample??d.multisample}else o=e.resolution||s.resolution,u=e.multisample??s.multisample;n[0].resolution=o,n[0].multisample=u,n[0].maskSprite=r;const h=i.filterArea;i.filterArea=r.getBounds(!0),s.filter.push(i,n),i.filterArea=h,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const r=e._colorMask,i=e._colorMask=r&e.colorMask;i!==r&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}popColorMask(e){const r=e._colorMask,i=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==r&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}qu.extension={type:te.RendererSystem,name:"mask"},he.add(qu);class Yu{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:r}=this.renderer,i=this.getStackLength();this.maskStack=e;const n=this.getStackLength();n!==i&&(n===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Ku=new Ue,Zu=[],_n=class extends Yu{constructor(t){super(t),this.glConst=Q.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0}calcScissorRect(t){if(t._scissorRectLocal)return;const e=t._scissorRect,{maskObject:r}=t,{renderer:i}=this,n=i.renderTexture,s=r.getBounds(!0,Zu.pop()??new de);this.roundFrameToPixels(s,n.current?n.current.resolution:i.resolution,n.sourceFrame,n.destinationFrame,i.projection.transform),e&&s.fit(e),t._scissorRectLocal=s}static isMatrixRotated(t){if(!t)return!1;const{a:e,b:r,c:i,d:n}=t;return(Math.abs(r)>1e-4||Math.abs(i)>1e-4)&&(Math.abs(e)>1e-4||Math.abs(n)>1e-4)}testScissor(t){const{maskObject:e}=t;if(!e.isFastRect||!e.isFastRect()||_n.isMatrixRotated(e.worldTransform)||_n.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(t);const r=t._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(t,e,r,i,n){_n.isMatrixRotated(n)||(n=n?Ku.copyFrom(n):Ku.identity(),n.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.renderer.filter.transformAABB(n,t),t.fit(i),t.x=Math.round(t.x*e),t.y=Math.round(t.y*e),t.width=Math.round(t.width*e),t.height=Math.round(t.height*e))}push(t){t._scissorRectLocal||this.calcScissorRect(t);const{gl:e}=this.renderer;t._scissorRect||e.enable(e.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=t._scissorRectLocal,this._useCurrent()}pop(t){const{gl:e}=this.renderer;t&&Zu.push(t._scissorRectLocal),this.getStackLength()>0?this._useCurrent():e.disable(e.SCISSOR_TEST)}_useCurrent(){const t=this.maskStack[this.maskStack.length-1]._scissorRect;let e;this.renderer.renderTexture.current?e=t.y:e=this.renderer.height-t.height-t.y,this.renderer.gl.scissor(t.x,e,t.width,t.height)}};let Qu=_n;Qu.extension={type:te.RendererSystem,name:"scissor"},he.add(Qu);class Ju extends Yu{constructor(e){super(e),this.glConst=Q.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const r=e.maskObject,{gl:i}=this.renderer,n=e._stencilCounter;n===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),e._stencilCounter++;const s=e._colorMask;s!==0&&(e._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,n,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,s!==0&&(e._colorMask=s,i.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}pop(e){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,n=i?i._colorMask:15;n!==0&&(i._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,n!==0&&(i._colorMask=n,r.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}Ju.extension={type:te.RendererSystem,name:"stencil"},he.add(Ju);class ec{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return re("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return re("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return re("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const r in e)this.plugins[r]=new e[r](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}ec.extension={type:[te.RendererSystem,te.CanvasRendererSystem],name:"_plugin"},he.add(ec);class tc{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Ue,this.transform=null}update(e,r,i,n){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,n),this.transform&&this.projectionMatrix.append(this.transform);const s=this.renderer;s.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,s.globalUniforms.update(),s.shader.shader&&s.shader.syncUniformGroup(s.shader.shader.uniforms.globals)}calculateProjection(e,r,i,n){const s=this.projectionMatrix,a=n?-1:1;s.identity(),s.a=1/r.width*2,s.d=a*(1/r.height*2),s.tx=-1-r.x*s.a,s.ty=-a-r.y*s.d}setTransform(e){}destroy(){this.renderer=null}}tc.extension={type:te.RendererSystem,name:"projection"},he.add(tc);const Mb=new ca;class rc{constructor(e){this.renderer=e,this._tempMatrix=new Ue}generateTexture(e,r){const{region:i,...n}=r||{},s=i||e.getLocalBounds(null,!0);s.width===0&&(s.width=1),s.height===0&&(s.height=1);const a=gn.create({width:s.width,height:s.height,...n});this._tempMatrix.tx=-s.x,this._tempMatrix.ty=-s.y;const o=e.transform;return e.transform=Mb,this.renderer.render(e,{renderTexture:a,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=o,a}destroy(){}}rc.extension={type:[te.RendererSystem,te.CanvasRendererSystem],name:"textureGenerator"},he.add(rc);const Qt=new de,hi=new de;class ic{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new de,this.destinationFrame=new de,this.viewportFrame=new de}bind(e=null,r,i){const n=this.renderer;this.current=e;let s,a,o;e?(s=e.baseTexture,o=s.resolution,r||(Qt.width=e.frame.width,Qt.height=e.frame.height,r=Qt),i||(hi.x=e.frame.x,hi.y=e.frame.y,hi.width=r.width,hi.height=r.height,i=hi),a=s.framebuffer):(o=n.resolution,r||(Qt.width=n._view.screen.width,Qt.height=n._view.screen.height,r=Qt),i||(i=Qt,i.width=r.width,i.height=r.height));const u=this.viewportFrame;u.x=i.x*o,u.y=i.y*o,u.width=i.width*o,u.height=i.height*o,e||(u.y=n.view.height-(u.y+u.height)),u.ceil(),this.renderer.framebuffer.bind(a,u),this.renderer.projection.update(i,r,o,!a),e?this.renderer.mask.setMaskStack(s.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(i)}clear(e,r){const i=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,n=e?Le.shared.setValue(e):i,s=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,o=s.width!==a.width||s.height!==a.height;if(o){let{x:u,y:h,width:d,height:l}=this.viewportFrame;u=Math.round(u),h=Math.round(h),d=Math.round(d),l=Math.round(l),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(u,h,d,l)}this.renderer.framebuffer.clear(n.red,n.green,n.blue,n.alpha,r),o&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}ic.extension={type:te.RendererSystem,name:"renderTexture"},he.add(ic);class Fb{constructor(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Ob(t,e){const r={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let n=0;n<i;n++){const s=e.getActiveAttrib(t,n);if(s.name.startsWith("gl_"))continue;const a=Nu(e,s.type),o={type:a,name:s.name,size:Fu(a),location:e.getAttribLocation(t,s.name)};r[s.name]=o}return r}function Nb(t,e){const r={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let n=0;n<i;n++){const s=e.getActiveUniform(t,n),a=s.name.replace(/\[.*?\]$/,""),o=!!s.name.match(/\[.*?\]$/),u=Nu(e,s.type);r[a]={name:a,index:n,type:u,size:s.size,isArray:o,value:Ru(u,s.size)}}return r}function kb(t,e){var u;const r=Iu(t,t.VERTEX_SHADER,e.vertexSrc),i=Iu(t,t.FRAGMENT_SHADER,e.fragmentSrc),n=t.createProgram();t.attachShader(n,r),t.attachShader(n,i);const s=(u=e.extra)==null?void 0:u.transformFeedbackVaryings;if(s&&(typeof t.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):t.transformFeedbackVaryings(n,s.names,s.bufferMode==="separate"?t.SEPARATE_ATTRIBS:t.INTERLEAVED_ATTRIBS)),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||lb(t,n,r,i),e.attributeData=Ob(n,t),e.uniformData=Nb(n,t),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){const h=Object.keys(e.attributeData);h.sort((d,l)=>d>l?1:-1);for(let d=0;d<h.length;d++)e.attributeData[h[d]].location=d,t.bindAttribLocation(n,d,h[d]);t.linkProgram(n)}t.deleteShader(r),t.deleteShader(i);const a={};for(const h in e.uniformData){const d=e.uniformData[h];a[h]={location:t.getUniformLocation(n,h),value:Ru(d.type,d.size)}}return new Fb(n,a)}function Lb(t,e,r,i,n){r.buffer.update(n)}const Db={float:`
451
+ `;class SpriteMaskFilter extends Filter{constructor(E,I,B){let U=null;typeof E!="string"&&I===void 0&&B===void 0&&(U=E,E=void 0,I=void 0,B=void 0),super(E||vertex,I||fragment,B),this.maskSprite=U,this.maskMatrix=new Matrix$2}get maskSprite(){return this._maskSprite}set maskSprite(E){this._maskSprite=E,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(E,I,B,U){const V=this._maskSprite,X=V._texture;X.valid&&(X.uvMatrix||(X.uvMatrix=new TextureMatrix(X,0)),X.uvMatrix.update(),this.uniforms.npmAlpha=X.baseTexture.alphaMode?0:1,this.uniforms.mask=X,this.uniforms.otherMatrix=E.calculateSpriteMatrix(this.maskMatrix,V).prepend(X.uvMatrix.mapCoord),this.uniforms.alpha=V.worldAlpha,this.uniforms.maskClamp=X.uvMatrix.uClampFrame,E.applyFilter(this,I,B,U))}}class MaskData{constructor(E=null){this.type=MASK_TYPES.NONE,this.autoDetect=!0,this.maskObject=E||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Filter.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(E){E?this._filters?this._filters[0]=E:this._filters=[E]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=MASK_TYPES.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(E){E?(this._stencilCounter=E._stencilCounter,this._scissorCounter=E._scissorCounter,this._scissorRect=E._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class MaskSystem{constructor(E){this.renderer=E,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(E){this.maskStack=E,this.renderer.scissor.setMaskStack(E),this.renderer.stencil.setMaskStack(E)}push(E,I){let B=I;if(!B.isMaskData){const V=this.maskDataPool.pop()||new MaskData;V.pooled=!0,V.maskObject=I,B=V}const U=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(B.copyCountersOrReset(U),B._colorMask=U?U._colorMask:15,B.autoDetect&&this.detect(B),B._target=E,B.type!==MASK_TYPES.SPRITE&&this.maskStack.push(B),B.enabled)switch(B.type){case MASK_TYPES.SCISSOR:this.renderer.scissor.push(B);break;case MASK_TYPES.STENCIL:this.renderer.stencil.push(B);break;case MASK_TYPES.SPRITE:B.copyCountersOrReset(null),this.pushSpriteMask(B);break;case MASK_TYPES.COLOR:this.pushColorMask(B);break}B.type===MASK_TYPES.SPRITE&&this.maskStack.push(B)}pop(E){const I=this.maskStack.pop();if(!(!I||I._target!==E)){if(I.enabled)switch(I.type){case MASK_TYPES.SCISSOR:this.renderer.scissor.pop(I);break;case MASK_TYPES.STENCIL:this.renderer.stencil.pop(I.maskObject);break;case MASK_TYPES.SPRITE:this.popSpriteMask(I);break;case MASK_TYPES.COLOR:this.popColorMask(I);break}if(I.reset(),I.pooled&&this.maskDataPool.push(I),this.maskStack.length!==0){const B=this.maskStack[this.maskStack.length-1];B.type===MASK_TYPES.SPRITE&&B._filters&&(B._filters[0].maskSprite=B.maskObject)}}}detect(E){const I=E.maskObject;I?I.isSprite?E.type=MASK_TYPES.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(E)?E.type=MASK_TYPES.SCISSOR:E.type=MASK_TYPES.STENCIL:E.type=MASK_TYPES.COLOR}pushSpriteMask(E){const{maskObject:I}=E,B=E._target;let U=E._filters;U||(U=this.alphaMaskPool[this.alphaMaskIndex],U||(U=this.alphaMaskPool[this.alphaMaskIndex]=[new SpriteMaskFilter]));const V=this.renderer,X=V.renderTexture;let Y,K;if(X.current){const xe=X.current;Y=E.resolution||xe.resolution,K=E.multisample??xe.multisample}else Y=E.resolution||V.resolution,K=E.multisample??V.multisample;U[0].resolution=Y,U[0].multisample=K,U[0].maskSprite=I;const J=B.filterArea;B.filterArea=I.getBounds(!0),V.filter.push(B,U),B.filterArea=J,E._filters||this.alphaMaskIndex++}popSpriteMask(E){this.renderer.filter.pop(),E._filters?E._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(E){const I=E._colorMask,B=E._colorMask=I&E.colorMask;B!==I&&this.renderer.gl.colorMask((B&1)!==0,(B&2)!==0,(B&4)!==0,(B&8)!==0)}popColorMask(E){const I=E._colorMask,B=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;B!==I&&this.renderer.gl.colorMask((B&1)!==0,(B&2)!==0,(B&4)!==0,(B&8)!==0)}destroy(){this.renderer=null}}MaskSystem.extension={type:ExtensionType.RendererSystem,name:"mask"},extensions.add(MaskSystem);class AbstractMaskSystem{constructor(E){this.renderer=E,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(E){const{gl:I}=this.renderer,B=this.getStackLength();this.maskStack=E;const U=this.getStackLength();U!==B&&(U===0?I.disable(this.glConst):(I.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const tempMatrix$1=new Matrix$2,rectPool=[],_ScissorSystem=class extends AbstractMaskSystem{constructor(C){super(C),this.glConst=settings.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const C=this.maskStack[this.maskStack.length-1];return C?C._scissorCounter:0}calcScissorRect(C){if(C._scissorRectLocal)return;const E=C._scissorRect,{maskObject:I}=C,{renderer:B}=this,U=B.renderTexture,V=I.getBounds(!0,rectPool.pop()??new Rectangle);this.roundFrameToPixels(V,U.current?U.current.resolution:B.resolution,U.sourceFrame,U.destinationFrame,B.projection.transform),E&&V.fit(E),C._scissorRectLocal=V}static isMatrixRotated(C){if(!C)return!1;const{a:E,b:I,c:B,d:U}=C;return(Math.abs(I)>1e-4||Math.abs(B)>1e-4)&&(Math.abs(E)>1e-4||Math.abs(U)>1e-4)}testScissor(C){const{maskObject:E}=C;if(!E.isFastRect||!E.isFastRect()||_ScissorSystem.isMatrixRotated(E.worldTransform)||_ScissorSystem.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(C);const I=C._scissorRectLocal;return I.width>0&&I.height>0}roundFrameToPixels(C,E,I,B,U){_ScissorSystem.isMatrixRotated(U)||(U=U?tempMatrix$1.copyFrom(U):tempMatrix$1.identity(),U.translate(-I.x,-I.y).scale(B.width/I.width,B.height/I.height).translate(B.x,B.y),this.renderer.filter.transformAABB(U,C),C.fit(B),C.x=Math.round(C.x*E),C.y=Math.round(C.y*E),C.width=Math.round(C.width*E),C.height=Math.round(C.height*E))}push(C){C._scissorRectLocal||this.calcScissorRect(C);const{gl:E}=this.renderer;C._scissorRect||E.enable(E.SCISSOR_TEST),C._scissorCounter++,C._scissorRect=C._scissorRectLocal,this._useCurrent()}pop(C){const{gl:E}=this.renderer;C&&rectPool.push(C._scissorRectLocal),this.getStackLength()>0?this._useCurrent():E.disable(E.SCISSOR_TEST)}_useCurrent(){const C=this.maskStack[this.maskStack.length-1]._scissorRect;let E;this.renderer.renderTexture.current?E=C.y:E=this.renderer.height-C.height-C.y,this.renderer.gl.scissor(C.x,E,C.width,C.height)}};let ScissorSystem=_ScissorSystem;ScissorSystem.extension={type:ExtensionType.RendererSystem,name:"scissor"},extensions.add(ScissorSystem);class StencilSystem extends AbstractMaskSystem{constructor(E){super(E),this.glConst=settings.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const E=this.maskStack[this.maskStack.length-1];return E?E._stencilCounter:0}push(E){const I=E.maskObject,{gl:B}=this.renderer,U=E._stencilCounter;U===0&&(this.renderer.framebuffer.forceStencil(),B.clearStencil(0),B.clear(B.STENCIL_BUFFER_BIT),B.enable(B.STENCIL_TEST)),E._stencilCounter++;const V=E._colorMask;V!==0&&(E._colorMask=0,B.colorMask(!1,!1,!1,!1)),B.stencilFunc(B.EQUAL,U,4294967295),B.stencilOp(B.KEEP,B.KEEP,B.INCR),I.renderable=!0,I.render(this.renderer),this.renderer.batch.flush(),I.renderable=!1,V!==0&&(E._colorMask=V,B.colorMask((V&1)!==0,(V&2)!==0,(V&4)!==0,(V&8)!==0)),this._useCurrent()}pop(E){const I=this.renderer.gl;if(this.getStackLength()===0)I.disable(I.STENCIL_TEST);else{const B=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,U=B?B._colorMask:15;U!==0&&(B._colorMask=0,I.colorMask(!1,!1,!1,!1)),I.stencilOp(I.KEEP,I.KEEP,I.DECR),E.renderable=!0,E.render(this.renderer),this.renderer.batch.flush(),E.renderable=!1,U!==0&&(B._colorMask=U,I.colorMask((U&1)!==0,(U&2)!==0,(U&4)!==0,(U&8)!==0)),this._useCurrent()}}_useCurrent(){const E=this.renderer.gl;E.stencilFunc(E.EQUAL,this.getStackLength(),4294967295),E.stencilOp(E.KEEP,E.KEEP,E.KEEP)}}StencilSystem.extension={type:ExtensionType.RendererSystem,name:"stencil"},extensions.add(StencilSystem);class PluginSystem{constructor(E){this.renderer=E,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return deprecation("7.0.0","renderer.plugins.extract has moved to renderer.extract"),E.extract}},prepare:{enumerable:!1,get(){return deprecation("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),E.prepare}},interaction:{enumerable:!1,get(){return deprecation("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),E.events}}})}init(){const E=this.rendererPlugins;for(const I in E)this.plugins[I]=new E[I](this.renderer)}destroy(){for(const E in this.plugins)this.plugins[E].destroy(),this.plugins[E]=null}}PluginSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"_plugin"},extensions.add(PluginSystem);class ProjectionSystem{constructor(E){this.renderer=E,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Matrix$2,this.transform=null}update(E,I,B,U){this.destinationFrame=E||this.destinationFrame||this.defaultFrame,this.sourceFrame=I||this.sourceFrame||E,this.calculateProjection(this.destinationFrame,this.sourceFrame,B,U),this.transform&&this.projectionMatrix.append(this.transform);const V=this.renderer;V.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,V.globalUniforms.update(),V.shader.shader&&V.shader.syncUniformGroup(V.shader.shader.uniforms.globals)}calculateProjection(E,I,B,U){const V=this.projectionMatrix,X=U?-1:1;V.identity(),V.a=1/I.width*2,V.d=X*(1/I.height*2),V.tx=-1-I.x*V.a,V.ty=-X-I.y*V.d}setTransform(E){}destroy(){this.renderer=null}}ProjectionSystem.extension={type:ExtensionType.RendererSystem,name:"projection"},extensions.add(ProjectionSystem);const tempTransform=new Transform;class GenerateTextureSystem{constructor(E){this.renderer=E,this._tempMatrix=new Matrix$2}generateTexture(E,I){const{region:B,...U}=I||{},V=B||E.getLocalBounds(null,!0);V.width===0&&(V.width=1),V.height===0&&(V.height=1);const X=RenderTexture.create({width:V.width,height:V.height,...U});this._tempMatrix.tx=-V.x,this._tempMatrix.ty=-V.y;const Y=E.transform;return E.transform=tempTransform,this.renderer.render(E,{renderTexture:X,transform:this._tempMatrix,skipUpdateTransform:!!E.parent,blit:!0}),E.transform=Y,X}destroy(){}}GenerateTextureSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"textureGenerator"},extensions.add(GenerateTextureSystem);const tempRect=new Rectangle,tempRect2=new Rectangle;class RenderTextureSystem{constructor(E){this.renderer=E,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Rectangle,this.destinationFrame=new Rectangle,this.viewportFrame=new Rectangle}bind(E=null,I,B){const U=this.renderer;this.current=E;let V,X,Y;E?(V=E.baseTexture,Y=V.resolution,I||(tempRect.width=E.frame.width,tempRect.height=E.frame.height,I=tempRect),B||(tempRect2.x=E.frame.x,tempRect2.y=E.frame.y,tempRect2.width=I.width,tempRect2.height=I.height,B=tempRect2),X=V.framebuffer):(Y=U.resolution,I||(tempRect.width=U._view.screen.width,tempRect.height=U._view.screen.height,I=tempRect),B||(B=tempRect,B.width=I.width,B.height=I.height));const K=this.viewportFrame;K.x=B.x*Y,K.y=B.y*Y,K.width=B.width*Y,K.height=B.height*Y,E||(K.y=U.view.height-(K.y+K.height)),K.ceil(),this.renderer.framebuffer.bind(X,K),this.renderer.projection.update(B,I,Y,!X),E?this.renderer.mask.setMaskStack(V.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(I),this.destinationFrame.copyFrom(B)}clear(E,I){const B=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,U=E?Color.shared.setValue(E):B,V=this.destinationFrame,X=this.current?this.current.baseTexture:this.renderer._view.screen,Y=V.width!==X.width||V.height!==X.height;if(Y){let{x:K,y:J,width:xe,height:Z}=this.viewportFrame;K=Math.round(K),J=Math.round(J),xe=Math.round(xe),Z=Math.round(Z),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(K,J,xe,Z)}this.renderer.framebuffer.clear(U.red,U.green,U.blue,U.alpha,I),Y&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}RenderTextureSystem.extension={type:ExtensionType.RendererSystem,name:"renderTexture"},extensions.add(RenderTextureSystem);class GLProgram{constructor(E,I){this.program=E,this.uniformData=I,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function getAttributeData(C,E){const I={},B=E.getProgramParameter(C,E.ACTIVE_ATTRIBUTES);for(let U=0;U<B;U++){const V=E.getActiveAttrib(C,U);if(V.name.startsWith("gl_"))continue;const X=mapType(E,V.type),Y={type:X,name:V.name,size:mapSize(X),location:E.getAttribLocation(C,V.name)};I[V.name]=Y}return I}function getUniformData(C,E){const I={},B=E.getProgramParameter(C,E.ACTIVE_UNIFORMS);for(let U=0;U<B;U++){const V=E.getActiveUniform(C,U),X=V.name.replace(/\[.*?\]$/,""),Y=!!V.name.match(/\[.*?\]$/),K=mapType(E,V.type);I[X]={name:X,index:U,type:K,size:V.size,isArray:Y,value:defaultValue(K,V.size)}}return I}function generateProgram(C,E){var K;const I=compileShader(C,C.VERTEX_SHADER,E.vertexSrc),B=compileShader(C,C.FRAGMENT_SHADER,E.fragmentSrc),U=C.createProgram();C.attachShader(U,I),C.attachShader(U,B);const V=(K=E.extra)==null?void 0:K.transformFeedbackVaryings;if(V&&(typeof C.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):C.transformFeedbackVaryings(U,V.names,V.bufferMode==="separate"?C.SEPARATE_ATTRIBS:C.INTERLEAVED_ATTRIBS)),C.linkProgram(U),C.getProgramParameter(U,C.LINK_STATUS)||logProgramError(C,U,I,B),E.attributeData=getAttributeData(U,C),E.uniformData=getUniformData(U,C),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(E.vertexSrc)){const J=Object.keys(E.attributeData);J.sort((xe,Z)=>xe>Z?1:-1);for(let xe=0;xe<J.length;xe++)E.attributeData[J[xe]].location=xe,C.bindAttribLocation(U,xe,J[xe]);C.linkProgram(U)}C.deleteShader(I),C.deleteShader(B);const X={};for(const J in E.uniformData){const xe=E.uniformData[J];X[J]={location:C.getUniformLocation(U,J),value:defaultValue(xe.type,xe.size)}}return new GLProgram(U,X)}function uboUpdate(C,E,I,B,U){I.buffer.update(U)}const UBO_TO_SINGLE_SETTERS={float:`
452
452
  data[offset] = v;
453
453
  `,vec2:`
454
454
  data[offset] = v[0];
@@ -486,7 +486,7 @@ void main(void)
486
486
  {
487
487
  data[offset + i] = v[i];
488
488
  }
489
- `},nc={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function Bb(t){const e=t.map(s=>({data:s,offset:0,dataLen:0,dirty:0}));let r=0,i=0,n=0;for(let s=0;s<e.length;s++){const a=e[s];if(r=nc[a.data.type],a.data.size>1&&(r=Math.max(r,16)*a.data.size),a.dataLen=r,i%r!==0&&i<16){const o=i%r%16;i+=o,n+=o}i+r>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=r,i=r):(a.offset=n,i+=r,n+=r)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function Ub(t,e){const r=[];for(const i in t)e[i]&&r.push(e[i]);return r.sort((i,n)=>i.index-n.index),r}function $b(t,e){if(!t.autoManage)return{size:0,syncFunc:Lb};const r=Ub(t.uniforms,e),{uboElements:i,size:n}=Bb(r),s=[`
489
+ `},GLSL_TO_STD40_SIZE={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function createUBOElements(C){const E=C.map(V=>({data:V,offset:0,dataLen:0,dirty:0}));let I=0,B=0,U=0;for(let V=0;V<E.length;V++){const X=E[V];if(I=GLSL_TO_STD40_SIZE[X.data.type],X.data.size>1&&(I=Math.max(I,16)*X.data.size),X.dataLen=I,B%I!==0&&B<16){const Y=B%I%16;B+=Y,U+=Y}B+I>16?(U=Math.ceil(U/16)*16,X.offset=U,U+=I,B=I):(X.offset=U,B+=I,U+=I)}return U=Math.ceil(U/16)*16,{uboElements:E,size:U}}function getUBOData(C,E){const I=[];for(const B in C)E[B]&&I.push(E[B]);return I.sort((B,U)=>B.index-U.index),I}function generateUniformBufferSync(C,E){if(!C.autoManage)return{size:0,syncFunc:uboUpdate};const I=getUBOData(C.uniforms,E),{uboElements:B,size:U}=createUBOElements(I),V=[`
490
490
  var v = null;
491
491
  var v2 = null;
492
492
  var cv = null;
@@ -494,31 +494,31 @@ void main(void)
494
494
  var gl = renderer.gl
495
495
  var index = 0;
496
496
  var data = buffer.data;
497
- `];for(let a=0;a<i.length;a++){const o=i[a],u=t.uniforms[o.data.name],h=o.data.name;let d=!1;for(let l=0;l<Cr.length;l++){const c=Cr[l];if(c.codeUbo&&c.test(o.data,u)){s.push(`offset = ${o.offset/4};`,Cr[l].codeUbo(o.data.name,u)),d=!0;break}}if(!d)if(o.data.size>1){const l=Fu(o.data.type),c=Math.max(nc[o.data.type]/16,1),f=l/c,p=(4-f%4)%4;s.push(`
498
- cv = ud.${h}.value;
499
- v = uv.${h};
500
- offset = ${o.offset/4};
497
+ `];for(let X=0;X<B.length;X++){const Y=B[X],K=C.uniforms[Y.data.name],J=Y.data.name;let xe=!1;for(let Z=0;Z<uniformParsers.length;Z++){const _e=uniformParsers[Z];if(_e.codeUbo&&_e.test(Y.data,K)){V.push(`offset = ${Y.offset/4};`,uniformParsers[Z].codeUbo(Y.data.name,K)),xe=!0;break}}if(!xe)if(Y.data.size>1){const Z=mapSize(Y.data.type),_e=Math.max(GLSL_TO_STD40_SIZE[Y.data.type]/16,1),Se=Z/_e,Ee=(4-Se%4)%4;V.push(`
498
+ cv = ud.${J}.value;
499
+ v = uv.${J};
500
+ offset = ${Y.offset/4};
501
501
 
502
502
  t = 0;
503
503
 
504
- for(var i=0; i < ${o.data.size*c}; i++)
504
+ for(var i=0; i < ${Y.data.size*_e}; i++)
505
505
  {
506
- for(var j = 0; j < ${f}; j++)
506
+ for(var j = 0; j < ${Se}; j++)
507
507
  {
508
508
  data[offset++] = v[t++];
509
509
  }
510
- offset += ${p};
510
+ offset += ${Ee};
511
511
  }
512
512
 
513
- `)}else{const l=Db[o.data.type];s.push(`
514
- cv = ud.${h}.value;
515
- v = uv.${h};
516
- offset = ${o.offset/4};
517
- ${l};
518
- `)}}return s.push(`
513
+ `)}else{const Z=UBO_TO_SINGLE_SETTERS[Y.data.type];V.push(`
514
+ cv = ud.${J}.value;
515
+ v = uv.${J};
516
+ offset = ${Y.offset/4};
517
+ ${Z};
518
+ `)}}return V.push(`
519
519
  renderer.buffer.update(buffer);
520
- `),{size:n,syncFunc:new Function("ud","uv","renderer","syncData","buffer",s.join(`
521
- `))}}let Gb=0;const yn={textureCount:0,uboCount:0};class sc{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Gb++}systemCheck(){if(!cb())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,r){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,n=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(n.program)),r||(yn.textureCount=0,yn.uboCount=0,this.syncUniformGroup(e.uniformGroup,yn)),n}setUniforms(e){const r=this.shader.program,i=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,r){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,r))}syncUniforms(e,r,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(r.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const r=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=sb(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[r],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,r){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const n=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,r);e.buffer.update(),n(i.uniformData,e.uniforms,this.renderer,yn,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[r])}createSyncBufferGroup(e,r,i){const{gl:n}=this.renderer;this.renderer.buffer.bind(e.buffer);const s=this.gl.getUniformBlockIndex(r.program,i);r.uniformBufferBindings[i]=this.shader.uniformBindCount,n.uniformBlockBinding(r.program,s,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=$b(e,this.shader.program.uniformData)),e.autoManage){const u=new Float32Array(o.size/4);e.buffer.update(u)}return r.uniformGroups[e.id]=o.syncFunc,r.uniformGroups[e.id]}getSignature(e,r,i){const n=e.uniforms,s=[`${i}-`];for(const a in n)s.push(a),r[a]&&s.push(r[a].type);return s.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const r=this.gl,i=e.program,n=kb(r,i);return i.glPrograms[this.renderer.CONTEXT_UID]=n,n}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}sc.extension={type:te.RendererSystem,name:"shader"},he.add(sc);class xn{constructor(e){this.renderer=e}run(e){const{renderer:r}=this;r.runners.init.emit(r.options),e.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}xn.defaultOptions={hello:!1},xn.extension={type:[te.RendererSystem,te.CanvasRendererSystem],name:"startup"},he.add(xn);function zb(t,e=[]){return e[j.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.ADD]=[t.ONE,t.ONE],e[j.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.NONE]=[0,0],e[j.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[j.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[j.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[j.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[j.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[j.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[j.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[j.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[j.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[j.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[j.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}const jb=0,Hb=1,Vb=2,Xb=3,Wb=4,qb=5,ga=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=j.NONE,this._blendEq=!1,this.map=[],this.map[jb]=this.setBlend,this.map[Hb]=this.setOffset,this.map[Vb]=this.setCullFace,this.map[Xb]=this.setDepthTest,this.map[Wb]=this.setFrontFace,this.map[qb]=this.setDepthMask,this.checks=[],this.defaultState=new sn,this.defaultState.blend=!0}contextChange(t){this.gl=t,this.blendModes=zb(t),this.set(this.defaultState),this.reset()}set(t){if(t=t||this.defaultState,this.stateId!==t.data){let e=this.stateId^t.data,r=0;for(;e;)e&1&&this.map[r].call(this,!!(t.data&1<<r)),e=e>>1,r++;this.stateId=t.data}for(let e=0;e<this.checks.length;e++)this.checks[e](this,t)}forceState(t){t=t||this.defaultState;for(let e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(let e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data}setBlend(t){this.updateCheck(ga.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)}setOffset(t){this.updateCheck(ga.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(t){this.gl.depthMask(t)}setCullFace(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])}setBlendMode(t){if(t===this.blendMode)return;this.blendMode=t;const e=this.blendModes[t],r=this.gl;e.length===2?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(t,e){this.gl.polygonOffset(t,e)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(t,e){const r=this.checks.indexOf(t);e&&r===-1?this.checks.push(t):!e&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(t,e){t.setBlendMode(e.blendMode)}static checkPolygonOffset(t,e){t.setPolygonOffset(1,e.polygonOffset)}destroy(){this.gl=null}};let ac=ga;ac.extension={type:te.RendererSystem,name:"state"},he.add(ac);class Yb extends Bi{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);const r=(e.priority??[]).filter(n=>e.systems[n]),i=[...r,...Object.keys(e.systems).filter(n=>!r.includes(n))];for(const n of i)this.addSystem(e.systems[n],n)}addRunners(...e){e.forEach(r=>{this.runners[r]=new et(r)})}addSystem(e,r){const i=new e(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=i,this._systemsHash[r]=i;for(const n in this.runners)this.runners[n].add(i);return this}emitWithCustomOptions(e,r){const i=Object.keys(this._systemsHash);e.items.forEach(n=>{const s=i.find(a=>this._systemsHash[a]===n);n[e.name](r[s])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const bn=class{constructor(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=bn.defaultMaxIdle,this.checkCountMax=bn.defaultCheckCountMax,this.mode=bn.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==cs.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const t=this.renderer.texture,e=t.managedTextures;let r=!1;for(let i=0;i<e.length;i++){const n=e[i];!n.framebuffer&&this.count-n.touched>this.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){let i=0;for(let n=0;n<e.length;n++)e[n]!==null&&(e[i++]=e[n]);e.length=i}}unload(t){const e=this.renderer.texture,r=t._texture;r&&!r.framebuffer&&e.destroyTexture(r);for(let i=t.children.length-1;i>=0;i--)this.unload(t.children[i])}destroy(){this.renderer=null}};let nt=bn;nt.defaultMode=cs.AUTO,nt.defaultMaxIdle=60*60,nt.defaultCheckCountMax=60*10,nt.extension={type:te.RendererSystem,name:"textureGC"},he.add(nt);class va{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=se.UNSIGNED_BYTE,this.internalFormat=N.RGBA,this.samplerType=0}}function Kb(t){let e;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?e={[se.UNSIGNED_BYTE]:{[N.RGBA]:t.RGBA8,[N.RGB]:t.RGB8,[N.RG]:t.RG8,[N.RED]:t.R8,[N.RGBA_INTEGER]:t.RGBA8UI,[N.RGB_INTEGER]:t.RGB8UI,[N.RG_INTEGER]:t.RG8UI,[N.RED_INTEGER]:t.R8UI,[N.ALPHA]:t.ALPHA,[N.LUMINANCE]:t.LUMINANCE,[N.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[se.BYTE]:{[N.RGBA]:t.RGBA8_SNORM,[N.RGB]:t.RGB8_SNORM,[N.RG]:t.RG8_SNORM,[N.RED]:t.R8_SNORM,[N.RGBA_INTEGER]:t.RGBA8I,[N.RGB_INTEGER]:t.RGB8I,[N.RG_INTEGER]:t.RG8I,[N.RED_INTEGER]:t.R8I},[se.UNSIGNED_SHORT]:{[N.RGBA_INTEGER]:t.RGBA16UI,[N.RGB_INTEGER]:t.RGB16UI,[N.RG_INTEGER]:t.RG16UI,[N.RED_INTEGER]:t.R16UI,[N.DEPTH_COMPONENT]:t.DEPTH_COMPONENT16},[se.SHORT]:{[N.RGBA_INTEGER]:t.RGBA16I,[N.RGB_INTEGER]:t.RGB16I,[N.RG_INTEGER]:t.RG16I,[N.RED_INTEGER]:t.R16I},[se.UNSIGNED_INT]:{[N.RGBA_INTEGER]:t.RGBA32UI,[N.RGB_INTEGER]:t.RGB32UI,[N.RG_INTEGER]:t.RG32UI,[N.RED_INTEGER]:t.R32UI,[N.DEPTH_COMPONENT]:t.DEPTH_COMPONENT24},[se.INT]:{[N.RGBA_INTEGER]:t.RGBA32I,[N.RGB_INTEGER]:t.RGB32I,[N.RG_INTEGER]:t.RG32I,[N.RED_INTEGER]:t.R32I},[se.FLOAT]:{[N.RGBA]:t.RGBA32F,[N.RGB]:t.RGB32F,[N.RG]:t.RG32F,[N.RED]:t.R32F,[N.DEPTH_COMPONENT]:t.DEPTH_COMPONENT32F},[se.HALF_FLOAT]:{[N.RGBA]:t.RGBA16F,[N.RGB]:t.RGB16F,[N.RG]:t.RG16F,[N.RED]:t.R16F},[se.UNSIGNED_SHORT_5_6_5]:{[N.RGB]:t.RGB565},[se.UNSIGNED_SHORT_4_4_4_4]:{[N.RGBA]:t.RGBA4},[se.UNSIGNED_SHORT_5_5_5_1]:{[N.RGBA]:t.RGB5_A1},[se.UNSIGNED_INT_2_10_10_10_REV]:{[N.RGBA]:t.RGB10_A2,[N.RGBA_INTEGER]:t.RGB10_A2UI},[se.UNSIGNED_INT_10F_11F_11F_REV]:{[N.RGB]:t.R11F_G11F_B10F},[se.UNSIGNED_INT_5_9_9_9_REV]:{[N.RGB]:t.RGB9_E5},[se.UNSIGNED_INT_24_8]:{[N.DEPTH_STENCIL]:t.DEPTH24_STENCIL8},[se.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[N.DEPTH_STENCIL]:t.DEPTH32F_STENCIL8}}:e={[se.UNSIGNED_BYTE]:{[N.RGBA]:t.RGBA,[N.RGB]:t.RGB,[N.ALPHA]:t.ALPHA,[N.LUMINANCE]:t.LUMINANCE,[N.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[se.UNSIGNED_SHORT_5_6_5]:{[N.RGB]:t.RGB},[se.UNSIGNED_SHORT_4_4_4_4]:{[N.RGBA]:t.RGBA},[se.UNSIGNED_SHORT_5_5_5_1]:{[N.RGBA]:t.RGBA}},e}class oc{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new ae,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=Kb(e);const r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let n=0;n<r;n++)this.boundTextures[n]=null;this.emptyTextures={};const i=new va(e.createTexture());e.bindTexture(e.TEXTURE_2D,i.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=i,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new va(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let n=0;n<6;n++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let n=0;n<this.boundTextures.length;n++)this.bind(null,n)}bind(e,r=0){const{gl:i}=this;if(e=e==null?void 0:e.castToBaseTexture(),e!=null&&e.valid&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;const n=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[r]!==e&&(this.currentLocation!==r&&(this.currentLocation=r,i.activeTexture(i.TEXTURE0+r)),i.bindTexture(e.target,n.texture)),n.dirtyId!==e.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,i.activeTexture(i.TEXTURE0+r)),this.updateTexture(e)):n.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[r]=e}else this.currentLocation!==r&&(this.currentLocation=r,i.activeTexture(i.TEXTURE0+r)),i.bindTexture(i.TEXTURE_2D,this.emptyTextures[i.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){const{gl:r,boundTextures:i}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let n=0;n<i.length;n++)i[n]===this.unknownTexture&&this.bind(null,n)}for(let n=0;n<i.length;n++)i[n]===e&&(this.currentLocation!==n&&(r.activeTexture(r.TEXTURE0+n),this.currentLocation=n),r.bindTexture(e.target,this.emptyTextures[e.target].texture),i[n]=null)}ensureSamplerType(e){const{boundTextures:r,hasIntegerTextures:i,CONTEXT_UID:n}=this;if(i)for(let s=e-1;s>=0;--s){const a=r[s];a&&a._glTextures[n].samplerType!==us.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(e){const r=new va(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r}initTextureType(e,r){var i;r.internalFormat=((i=this.internalFormats[e.type])==null?void 0:i[e.format])??e.format,this.webGLVersion===2&&e.type===se.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type}updateTexture(e){var n;const r=e._glTextures[this.CONTEXT_UID];if(!r)return;const i=this.renderer;if(this.initTextureType(e,r),(n=e.resource)!=null&&n.upload(i,e,r))r.samplerType!==us.FLOAT&&(this.hasIntegerTextures=!0);else{const s=e.realWidth,a=e.realHeight,o=i.gl;(r.width!==s||r.height!==a||r.dirtyId<0)&&(r.width=s,r.height=a,o.texImage2D(e.target,0,r.internalFormat,s,a,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}destroyTexture(e,r){const{gl:i}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){const n=this.managedTextures.indexOf(e);n!==-1&&rn(this.managedTextures,n,1)}}updateTextureStyle(e){var i;const r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===Gt.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=qr.CLAMP:r.wrapMode=e.wrapMode,(i=e.resource)!=null&&i.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)}setStyle(e,r){const i=this.gl;if(r.mipmap&&e.mipmap!==Gt.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,r.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===dt.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);const n=this.renderer.context.extensions.anisotropicFiltering;if(n&&e.anisotropicLevel>0&&e.scaleMode===dt.LINEAR){const s=Math.min(e.anisotropicLevel,i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,n.TEXTURE_MAX_ANISOTROPY_EXT,s)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===dt.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===dt.LINEAR?i.LINEAR:i.NEAREST)}destroy(){this.renderer=null}}oc.extension={type:te.RendererSystem,name:"texture"},he.add(oc);class lc{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:i}=this,n=e._glTransformFeedbacks[i]||this.createGLTransformFeedback(e);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,n)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,r){const{gl:i,renderer:n}=this;r&&n.shader.bind(r),i.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:r,renderer:i,CONTEXT_UID:n}=this,s=r.createTransformFeedback();e._glTransformFeedbacks[n]=s,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,s);for(let a=0;a<e.buffers.length;a++){const o=e.buffers[a];o&&(i.buffer.update(o),o._glBuffers[n].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,a,o._glBuffers[n].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),s}disposeTransformFeedback(e,r){const i=e._glTransformFeedbacks[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this);const s=this.renderer.buffer;if(s)for(let a=0;a<e.buffers.length;a++){const o=e.buffers[a];if(!o)continue;const u=o._glBuffers[this.CONTEXT_UID];u&&(u.refCount--,u.refCount===0&&!r&&s.dispose(o,r))}i&&(r||n.deleteTransformFeedback(i),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}lc.extension={type:te.RendererSystem,name:"transformFeedback"},he.add(lc);class Tn{constructor(e){this.renderer=e}init(e){this.screen=new de(0,0,e.width,e.height),this.element=e.view||Q.ADAPTER.createCanvas(),this.resolution=e.resolution||Q.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,r){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(r*this.resolution);const i=this.element.width/this.resolution,n=this.element.height/this.resolution;this.screen.width=i,this.screen.height=n,this.autoDensity&&(this.element.style.width=`${i}px`,this.element.style.height=`${n}px`),this.renderer.emit("resize",i,n),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){var r;e&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Tn.defaultOptions={width:800,height:600,resolution:Q.RESOLUTION,autoDensity:!1},Tn.extension={type:[te.RendererSystem,te.CanvasRendererSystem],name:"_view"},he.add(Tn),Q.PREFER_ENV=$t.WEBGL2,Q.STRICT_TEXTURE_CACHE=!1,Q.RENDER_OPTIONS={...pn.defaultOptions,...dn.defaultOptions,...Tn.defaultOptions,...xn.defaultOptions},Object.defineProperties(Q,{WRAP_MODE:{get(){return ae.defaultOptions.wrapMode},set(t){re("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),ae.defaultOptions.wrapMode=t}},SCALE_MODE:{get(){return ae.defaultOptions.scaleMode},set(t){re("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),ae.defaultOptions.scaleMode=t}},MIPMAP_TEXTURES:{get(){return ae.defaultOptions.mipmap},set(t){re("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),ae.defaultOptions.mipmap=t}},ANISOTROPIC_LEVEL:{get(){return ae.defaultOptions.anisotropicLevel},set(t){re("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),ae.defaultOptions.anisotropicLevel=t}},FILTER_RESOLUTION:{get(){return re("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),ue.defaultResolution},set(t){ue.defaultResolution=t}},FILTER_MULTISAMPLE:{get(){return re("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),ue.defaultMultisample},set(t){ue.defaultMultisample=t}},SPRITE_MAX_TEXTURES:{get(){return it.defaultMaxTextures},set(t){re("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),it.defaultMaxTextures=t}},SPRITE_BATCH_SIZE:{get(){return it.defaultBatchSize},set(t){re("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),it.defaultBatchSize=t}},CAN_UPLOAD_SAME_BUFFER:{get(){return it.canUploadSameBuffer},set(t){re("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),it.canUploadSameBuffer=t}},GC_MODE:{get(){return nt.defaultMode},set(t){re("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),nt.defaultMode=t}},GC_MAX_IDLE:{get(){return nt.defaultMaxIdle},set(t){re("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),nt.defaultMaxIdle=t}},GC_MAX_CHECK_COUNT:{get(){return nt.defaultCheckCountMax},set(t){re("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),nt.defaultCheckCountMax=t}},PRECISION_VERTEX:{get(){return Tt.defaultVertexPrecision},set(t){re("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Tt.defaultVertexPrecision=t}},PRECISION_FRAGMENT:{get(){return Tt.defaultFragmentPrecision},set(t){re("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Tt.defaultFragmentPrecision=t}}});var wn=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(wn||{});class _a{constructor(e,r=null,i=0,n=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=r,this.priority=i,this.once=n}match(e,r=null){return this.fn===e&&this.context===r}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=e?null:r,this.previous=null,r}}const je=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new _a(null,null,1/0),this.deltaMS=1/je.targetFPMS,this.elapsedMS=1/je.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,e,r=wn.NORMAL){return this._addListener(new _a(t,e,r))}addOnce(t,e,r=wn.NORMAL){return this._addListener(new _a(t,e,r,!0))}_addListener(t){let e=this._head.next,r=this._head;if(!e)t.connect(r);else{for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}return this._startIfPossible(),this}remove(t,e){let r=this._head.next;for(;r;)r.match(t,e)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let e;if(t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){const n=t-this._lastFrame|0;if(n<this._minElapsedMS)return;this._lastFrame=t-n%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*je.targetFPMS;const r=this._head;let i=r.next;for(;i;)i=i.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){const e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,je.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){if(t===0)this._minElapsedMS=0;else{const e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!je._shared){const t=je._shared=new je;t.autoStart=!0,t._protected=!0}return je._shared}static get system(){if(!je._system){const t=je._system=new je;t.autoStart=!0,t._protected=!0}return je._system}};let st=je;st.targetFPMS=.06,Object.defineProperties(Q,{TARGET_FPMS:{get(){return st.targetFPMS},set(t){re("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),st.targetFPMS=t}}});class uc{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,wn.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?st.shared:new st,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}uc.extension=te.Application,he.add(uc);const Zb=[];he.handleByList(te.Renderer,Zb);class cc{constructor(e){this.renderer=e}contextChange(e){let r;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}r>=Ae.HIGH?this.multisample=Ae.HIGH:r>=Ae.MEDIUM?this.multisample=Ae.MEDIUM:r>=Ae.LOW?this.multisample=Ae.LOW:this.multisample=Ae.NONE}destroy(){}}cc.extension={type:te.RendererSystem,name:"_multisample"},he.add(cc);class Qb{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class hc{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);r.bindBuffer(e.type,n.buffer)}unbind(e){const{gl:r}=this;r.bindBuffer(e,null)}bindBufferBase(e,r){const{gl:i,CONTEXT_UID:n}=this;if(this.boundBufferBases[r]!==e){const s=e._glBuffers[n]||this.createGLBuffer(e);this.boundBufferBases[r]=e,i.bindBufferBase(i.UNIFORM_BUFFER,r,s.buffer)}}bindBufferRange(e,r,i){const{gl:n,CONTEXT_UID:s}=this;i=i||0;const a=e._glBuffers[s]||this.createGLBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,r||0,a.buffer,i*256,256)}update(e){const{gl:r,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==n.updateID)if(n.updateID=e._updateID,r.bindBuffer(e.type,n.buffer),n.byteLength>=e.data.byteLength)r.bufferSubData(e.type,0,e.data);else{const s=e.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;n.byteLength=e.data.byteLength,r.bufferData(e.type,e.data,s)}}dispose(e,r){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),i&&(r||n.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const r=Object.keys(this.managedBuffers);for(let i=0;i<r.length;i++)this.dispose(this.managedBuffers[r[i]],e)}createGLBuffer(e){const{CONTEXT_UID:r,gl:i}=this;return e._glBuffers[r]=new Qb(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[r]}}hc.extension={type:te.RendererSystem,name:"buffer"},he.add(hc);class fc{constructor(e){this.renderer=e}render(e,r){const i=this.renderer;let n,s,a,o;if(r&&(n=r.renderTexture,s=r.clear,a=r.transform,o=r.skipUpdateTransform),this.renderingToScreen=!n,i.runners.prerender.emit(),i.emit("prerender"),i.projection.transform=a,!i.context.isLost){if(n||(this.lastObjectRendered=e),!o){const u=e.enableTempParent();e.updateTransform(),e.disableTempParent(u)}i.renderTexture.bind(n),i.batch.currentRenderer.start(),(s??i.background.clearBeforeRender)&&i.renderTexture.clear(),e.render(i),i.batch.currentRenderer.flush(),n&&(r.blit&&i.framebuffer.blit(),n.baseTexture.update()),i.runners.postrender.emit(),i.projection.transform=null,i.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}fc.extension={type:te.RendererSystem,name:"objectRenderer"},he.add(fc);const ya=class extends Yb{constructor(t){super(),this.type=al.WEBGL,t=Object.assign({},Q.RENDER_OPTIONS,t),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new tt({projectionMatrix:new Ue},!0);const e={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:ya.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(e),"useContextAlpha"in t&&(re("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),t.premultipliedAlpha=t.useContextAlpha&&t.useContextAlpha!=="notMultiplied",t.backgroundAlpha=t.useContextAlpha===!1?1:t.backgroundAlpha),this._plugin.rendererPlugins=ya.__plugins,this.options=t,this.startup.run(this.options)}static test(t){return t!=null&&t.forceCanvas?!1:Ix()}render(t,e){this.objectRenderer.render(t,e)}resize(t,e){this._view.resizeView(t,e)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(t=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:t}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(t){this._view.resolution=t,this.runners.resolutionChange.emit(t)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return re("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return re("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return re("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return re("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(t){re("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=t}get backgroundAlpha(){return re("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(t){re("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=t}get powerPreference(){return re("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(t,e){return this.textureGenerator.generateTexture(t,e)}};let Pr=ya;Pr.extension={type:te.Renderer,priority:1},Pr.__plugins={},Pr.__systems={},he.handleByMap(te.RendererPlugin,Pr.__plugins),he.handleByMap(te.RendererSystem,Pr.__systems),he.add(Pr);class dc extends si{constructor(e,r){const{width:i,height:n}=r||{};super(i,n),this.items=[],this.itemDirtyIds=[];for(let s=0;s<e;s++){const a=new ae;this.items.push(a),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,r){for(let i=0;i<this.length;i++)e[i]&&(e[i].castToBaseTexture?this.addBaseTextureAt(e[i].castToBaseTexture(),i):e[i]instanceof si?this.addResourceAt(e[i],i):this.addResourceAt(wu(e[i],r),i))}dispose(){for(let e=0,r=this.length;e<r;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[r].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)}unbind(e){super.unbind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)}load(){if(this._load)return this._load;const r=this.items.map(i=>i.resource).filter(i=>i).map(i=>i.load());return this._load=Promise.all(r).then(()=>{const{realWidth:i,realHeight:n}=this.items[0];return this.resize(i,n),Promise.resolve(this)}),this._load}}class Jb extends dc{constructor(e,r){const{width:i,height:n}=r||{};let s,a;Array.isArray(e)?(s=e,a=e.length):a=e,super(a,{width:i,height:n}),s&&this.initFromArray(s,r)}addBaseTextureAt(e,r){if(e.resource)this.addResourceAt(e.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=fr.TEXTURE_2D_ARRAY}upload(e,r,i){const{length:n,itemDirtyIds:s,items:a}=this,{gl:o}=e;i.dirtyId<0&&o.texImage3D(o.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,n,0,r.format,i.type,null);for(let u=0;u<n;u++){const h=a[u];s[u]<h.dirtyId&&(s[u]=h.dirtyId,h.valid&&o.texSubImage3D(o.TEXTURE_2D_ARRAY,0,0,0,u,h.resource.width,h.resource.height,1,r.format,i.type,h.resource.source))}return!0}}class e1 extends Nt{constructor(e){super(e)}static test(e){const{OffscreenCanvas:r}=globalThis;return r&&e instanceof r?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}}const fi=class extends dc{constructor(t,e){const{width:r,height:i,autoLoad:n,linkBaseTexture:s}=e||{};if(t&&t.length!==fi.SIDES)throw new Error(`Invalid length. Got ${t.length}, expected 6`);super(6,{width:r,height:i});for(let a=0;a<fi.SIDES;a++)this.items[a].target=fr.TEXTURE_CUBE_MAP_POSITIVE_X+a;this.linkBaseTexture=s!==!1,t&&this.initFromArray(t,e),n!==!1&&this.load()}bind(t){super.bind(t),t.target=fr.TEXTURE_CUBE_MAP}addBaseTextureAt(t,e,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[e])throw new Error(`Index ${e} is out of bounds`);if(!this.linkBaseTexture||t.parentTextureArray||Object.keys(t._glTextures).length>0)if(t.resource)this.addResourceAt(t.resource,e);else throw new Error("CubeResource does not support copying of renderTexture.");else t.target=fr.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this}upload(t,e,r){const i=this.itemDirtyIds;for(let n=0;n<fi.SIDES;n++){const s=this.items[n];(i[n]<s.dirtyId||r.dirtyId<e.dirtyId)&&(s.valid&&s.resource?(s.resource.upload(t,s,r),i[n]=s.dirtyId):i[n]<-1&&(t.gl.texImage2D(s.target,0,r.internalFormat,e.realWidth,e.realHeight,0,e.format,r.type,null),i[n]=-1))}return!0}static test(t){return Array.isArray(t)&&t.length===fi.SIDES}};let pc=fi;pc.SIDES=6;class Mr extends Nt{constructor(e,r){r=r||{};let i,n;typeof e=="string"?(i=Mr.EMPTY,n=e):(i=e,n=null),super(i),this.url=n,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,r)=>{if(this.url===null){e(this);return}try{const i=await Q.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const n=await i.blob();if(this.destroyed)return;const s=await createImageBitmap(n,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Rt.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=s,this.update(),e(this)}catch(i){if(this.destroyed)return;r(i),this.onError.emit(i)}}),this._load)}upload(e,r,i){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(e,r,i)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return Mr._EMPTY=Mr._EMPTY??Q.ADAPTER.createCanvas(0,0),Mr._EMPTY}}const Sn=class extends Nt{constructor(t,e){e=e||{},super(Q.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=t,this.scale=e.scale||1,this._overrideWidth=e.width,this._overrideHeight=e.height,this._resolve=null,this._crossorigin=e.crossorigin,this._load=null,e.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(t=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),t(this)},Sn.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const t=new Image;Nt.crossOrigin(t,this.svg,this._crossorigin),t.src=this.svg,t.onerror=e=>{this._resolve&&(t.onerror=null,this.onError.emit(e))},t.onload=()=>{if(!this._resolve)return;const e=t.width,r=t.height;if(!e||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let i=e*this.scale,n=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(i=this._overrideWidth||this._overrideHeight/r*e,n=this._overrideHeight||this._overrideWidth/e*r),i=Math.round(i),n=Math.round(n);const s=this.source;s.width=i,s.height=n,s._pixiId=`canvas_${ni()}`,s.getContext("2d").drawImage(t,0,0,e,r,0,0,i,n),this._resolve(),this._resolve=null}}static getSize(t){const e=Sn.SVG_SIZE.exec(t),r={};return e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(t,e){return e==="svg"||typeof t=="string"&&t.startsWith("data:image/svg+xml")||typeof t=="string"&&Sn.SVG_XML.test(t)}};let xa=Sn;xa.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,xa.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const ba=class extends Nt{constructor(t,e){if(e=e||{},!(t instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof t=="string"&&(t=[t]);const i=t[0].src||t[0];Nt.crossOrigin(r,i,e.crossorigin);for(let n=0;n<t.length;++n){const s=document.createElement("source");let{src:a,mime:o}=t[n];a=a||t[n];const u=a.split("?").shift().toLowerCase(),h=u.slice(u.lastIndexOf(".")+1);o=o||ba.MIME_TYPES[h]||`video/${h}`,s.src=a,s.type=o,r.appendChild(s)}t=r}super(t),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),e.autoLoad!==!1&&this.load()}update(t=0){if(!this.destroyed){const e=st.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const t=this.source;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("error",this._onError,!0)),this._load=new Promise(e=>{this.valid?e(this):(this._resolve=e,t.load())}),this._load}_onError(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)}_isSourcePlaying(){const t=this.source;return!t.paused&&!t.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(st.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(st.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);const e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()}dispose(){this._isConnectedToTicker&&(st.shared.remove(this.update,this),this._isConnectedToTicker=!1);const t=this.source;t&&(t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(st.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(st.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t)}static test(t,e){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement||ba.TYPES.includes(e)}};let Ta=ba;Ta.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],Ta.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},na.push(Mr,$u,e1,Ta,xa,sa,pc,Jb);var t1=`attribute vec2 aVertexPosition;
520
+ `),{size:U,syncFunc:new Function("ud","uv","renderer","syncData","buffer",V.join(`
521
+ `))}}let UID=0;const defaultSyncData={textureCount:0,uboCount:0};class ShaderSystem{constructor(E){this.destroyed=!1,this.renderer=E,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=UID++}systemCheck(){if(!unsafeEvalSupported())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(E){this.gl=E,this.reset()}bind(E,I){E.disposeRunner.add(this),E.uniforms.globals=this.renderer.globalUniforms;const B=E.program,U=B.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(E);return this.shader=E,this.program!==B&&(this.program=B,this.gl.useProgram(U.program)),I||(defaultSyncData.textureCount=0,defaultSyncData.uboCount=0,this.syncUniformGroup(E.uniformGroup,defaultSyncData)),U}setUniforms(E){const I=this.shader.program,B=I.glPrograms[this.renderer.CONTEXT_UID];I.syncUniforms(B.uniformData,E,this.renderer)}syncUniformGroup(E,I){const B=this.getGlProgram();(!E.static||E.dirtyId!==B.uniformDirtyGroups[E.id])&&(B.uniformDirtyGroups[E.id]=E.dirtyId,this.syncUniforms(E,B,I))}syncUniforms(E,I,B){(E.syncUniforms[this.shader.program.id]||this.createSyncGroups(E))(I.uniformData,E.uniforms,this.renderer,B)}createSyncGroups(E){const I=this.getSignature(E,this.shader.program.uniformData,"u");return this.cache[I]||(this.cache[I]=generateUniformsSync(E,this.shader.program.uniformData)),E.syncUniforms[this.shader.program.id]=this.cache[I],E.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(E,I){const B=this.getGlProgram();if(!E.static||E.dirtyId!==0||!B.uniformGroups[E.id]){E.dirtyId=0;const U=B.uniformGroups[E.id]||this.createSyncBufferGroup(E,B,I);E.buffer.update(),U(B.uniformData,E.uniforms,this.renderer,defaultSyncData,E.buffer)}this.renderer.buffer.bindBufferBase(E.buffer,B.uniformBufferBindings[I])}createSyncBufferGroup(E,I,B){const{gl:U}=this.renderer;this.renderer.buffer.bind(E.buffer);const V=this.gl.getUniformBlockIndex(I.program,B);I.uniformBufferBindings[B]=this.shader.uniformBindCount,U.uniformBlockBinding(I.program,V,this.shader.uniformBindCount),this.shader.uniformBindCount++;const X=this.getSignature(E,this.shader.program.uniformData,"ubo");let Y=this._uboCache[X];if(Y||(Y=this._uboCache[X]=generateUniformBufferSync(E,this.shader.program.uniformData)),E.autoManage){const K=new Float32Array(Y.size/4);E.buffer.update(K)}return I.uniformGroups[E.id]=Y.syncFunc,I.uniformGroups[E.id]}getSignature(E,I,B){const U=E.uniforms,V=[`${B}-`];for(const X in U)V.push(X),I[X]&&V.push(I[X].type);return V.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(E){const I=this.gl,B=E.program,U=generateProgram(I,B);return B.glPrograms[this.renderer.CONTEXT_UID]=U,U}reset(){this.program=null,this.shader=null}disposeShader(E){this.shader===E&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}ShaderSystem.extension={type:ExtensionType.RendererSystem,name:"shader"},extensions.add(ShaderSystem);class StartupSystem{constructor(E){this.renderer=E}run(E){const{renderer:I}=this;I.runners.init.emit(I.options),E.hello&&console.log(`PixiJS 7.2.3 - ${I.rendererLogId} - https://pixijs.com`),I.resize(I.screen.width,I.screen.height)}destroy(){}}StartupSystem.defaultOptions={hello:!1},StartupSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"startup"},extensions.add(StartupSystem);function mapWebGLBlendModesToPixi(C,E=[]){return E[BLEND_MODES.NORMAL]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.ADD]=[C.ONE,C.ONE],E[BLEND_MODES.MULTIPLY]=[C.DST_COLOR,C.ONE_MINUS_SRC_ALPHA,C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SCREEN]=[C.ONE,C.ONE_MINUS_SRC_COLOR,C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.OVERLAY]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.DARKEN]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.LIGHTEN]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.COLOR_DODGE]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.COLOR_BURN]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.HARD_LIGHT]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SOFT_LIGHT]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.DIFFERENCE]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.EXCLUSION]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.HUE]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SATURATION]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.COLOR]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.LUMINOSITY]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.NONE]=[0,0],E[BLEND_MODES.NORMAL_NPM]=[C.SRC_ALPHA,C.ONE_MINUS_SRC_ALPHA,C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.ADD_NPM]=[C.SRC_ALPHA,C.ONE,C.ONE,C.ONE],E[BLEND_MODES.SCREEN_NPM]=[C.SRC_ALPHA,C.ONE_MINUS_SRC_COLOR,C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SRC_IN]=[C.DST_ALPHA,C.ZERO],E[BLEND_MODES.SRC_OUT]=[C.ONE_MINUS_DST_ALPHA,C.ZERO],E[BLEND_MODES.SRC_ATOP]=[C.DST_ALPHA,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.DST_OVER]=[C.ONE_MINUS_DST_ALPHA,C.ONE],E[BLEND_MODES.DST_IN]=[C.ZERO,C.SRC_ALPHA],E[BLEND_MODES.DST_OUT]=[C.ZERO,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.DST_ATOP]=[C.ONE_MINUS_DST_ALPHA,C.SRC_ALPHA],E[BLEND_MODES.XOR]=[C.ONE_MINUS_DST_ALPHA,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SUBTRACT]=[C.ONE,C.ONE,C.ONE,C.ONE,C.FUNC_REVERSE_SUBTRACT,C.FUNC_ADD],E}const BLEND=0,OFFSET=1,CULLING=2,DEPTH_TEST=3,WINDING=4,DEPTH_MASK=5,_StateSystem=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=BLEND_MODES.NONE,this._blendEq=!1,this.map=[],this.map[BLEND]=this.setBlend,this.map[OFFSET]=this.setOffset,this.map[CULLING]=this.setCullFace,this.map[DEPTH_TEST]=this.setDepthTest,this.map[WINDING]=this.setFrontFace,this.map[DEPTH_MASK]=this.setDepthMask,this.checks=[],this.defaultState=new State$1,this.defaultState.blend=!0}contextChange(C){this.gl=C,this.blendModes=mapWebGLBlendModesToPixi(C),this.set(this.defaultState),this.reset()}set(C){if(C=C||this.defaultState,this.stateId!==C.data){let E=this.stateId^C.data,I=0;for(;E;)E&1&&this.map[I].call(this,!!(C.data&1<<I)),E=E>>1,I++;this.stateId=C.data}for(let E=0;E<this.checks.length;E++)this.checks[E](this,C)}forceState(C){C=C||this.defaultState;for(let E=0;E<this.map.length;E++)this.map[E].call(this,!!(C.data&1<<E));for(let E=0;E<this.checks.length;E++)this.checks[E](this,C);this.stateId=C.data}setBlend(C){this.updateCheck(_StateSystem.checkBlendMode,C),this.gl[C?"enable":"disable"](this.gl.BLEND)}setOffset(C){this.updateCheck(_StateSystem.checkPolygonOffset,C),this.gl[C?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(C){this.gl[C?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(C){this.gl.depthMask(C)}setCullFace(C){this.gl[C?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(C){this.gl.frontFace(this.gl[C?"CW":"CCW"])}setBlendMode(C){if(C===this.blendMode)return;this.blendMode=C;const E=this.blendModes[C],I=this.gl;E.length===2?I.blendFunc(E[0],E[1]):I.blendFuncSeparate(E[0],E[1],E[2],E[3]),E.length===6?(this._blendEq=!0,I.blendEquationSeparate(E[4],E[5])):this._blendEq&&(this._blendEq=!1,I.blendEquationSeparate(I.FUNC_ADD,I.FUNC_ADD))}setPolygonOffset(C,E){this.gl.polygonOffset(C,E)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(C,E){const I=this.checks.indexOf(C);E&&I===-1?this.checks.push(C):!E&&I!==-1&&this.checks.splice(I,1)}static checkBlendMode(C,E){C.setBlendMode(E.blendMode)}static checkPolygonOffset(C,E){C.setPolygonOffset(1,E.polygonOffset)}destroy(){this.gl=null}};let StateSystem=_StateSystem;StateSystem.extension={type:ExtensionType.RendererSystem,name:"state"},extensions.add(StateSystem);class SystemManager extends EventEmitter{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(E){this.addRunners(...E.runners);const I=(E.priority??[]).filter(U=>E.systems[U]),B=[...I,...Object.keys(E.systems).filter(U=>!I.includes(U))];for(const U of B)this.addSystem(E.systems[U],U)}addRunners(...E){E.forEach(I=>{this.runners[I]=new Runner(I)})}addSystem(E,I){const B=new E(this);if(this[I])throw new Error(`Whoops! The name "${I}" is already in use`);this[I]=B,this._systemsHash[I]=B;for(const U in this.runners)this.runners[U].add(B);return this}emitWithCustomOptions(E,I){const B=Object.keys(this._systemsHash);E.items.forEach(U=>{const V=B.find(X=>this._systemsHash[X]===U);U[E.name](I[V])})}destroy(){Object.values(this.runners).forEach(E=>{E.destroy()}),this._systemsHash={}}}const _TextureGCSystem=class{constructor(C){this.renderer=C,this.count=0,this.checkCount=0,this.maxIdle=_TextureGCSystem.defaultMaxIdle,this.checkCountMax=_TextureGCSystem.defaultCheckCountMax,this.mode=_TextureGCSystem.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const C=this.renderer.texture,E=C.managedTextures;let I=!1;for(let B=0;B<E.length;B++){const U=E[B];!U.framebuffer&&this.count-U.touched>this.maxIdle&&(C.destroyTexture(U,!0),E[B]=null,I=!0)}if(I){let B=0;for(let U=0;U<E.length;U++)E[U]!==null&&(E[B++]=E[U]);E.length=B}}unload(C){const E=this.renderer.texture,I=C._texture;I&&!I.framebuffer&&E.destroyTexture(I);for(let B=C.children.length-1;B>=0;B--)this.unload(C.children[B])}destroy(){this.renderer=null}};let TextureGCSystem=_TextureGCSystem;TextureGCSystem.defaultMode=GC_MODES.AUTO,TextureGCSystem.defaultMaxIdle=60*60,TextureGCSystem.defaultCheckCountMax=60*10,TextureGCSystem.extension={type:ExtensionType.RendererSystem,name:"textureGC"},extensions.add(TextureGCSystem);class GLTexture{constructor(E){this.texture=E,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=TYPES.UNSIGNED_BYTE,this.internalFormat=FORMATS.RGBA,this.samplerType=0}}function mapTypeAndFormatToInternalFormat(C){let E;return"WebGL2RenderingContext"in globalThis&&C instanceof globalThis.WebGL2RenderingContext?E={[TYPES.UNSIGNED_BYTE]:{[FORMATS.RGBA]:C.RGBA8,[FORMATS.RGB]:C.RGB8,[FORMATS.RG]:C.RG8,[FORMATS.RED]:C.R8,[FORMATS.RGBA_INTEGER]:C.RGBA8UI,[FORMATS.RGB_INTEGER]:C.RGB8UI,[FORMATS.RG_INTEGER]:C.RG8UI,[FORMATS.RED_INTEGER]:C.R8UI,[FORMATS.ALPHA]:C.ALPHA,[FORMATS.LUMINANCE]:C.LUMINANCE,[FORMATS.LUMINANCE_ALPHA]:C.LUMINANCE_ALPHA},[TYPES.BYTE]:{[FORMATS.RGBA]:C.RGBA8_SNORM,[FORMATS.RGB]:C.RGB8_SNORM,[FORMATS.RG]:C.RG8_SNORM,[FORMATS.RED]:C.R8_SNORM,[FORMATS.RGBA_INTEGER]:C.RGBA8I,[FORMATS.RGB_INTEGER]:C.RGB8I,[FORMATS.RG_INTEGER]:C.RG8I,[FORMATS.RED_INTEGER]:C.R8I},[TYPES.UNSIGNED_SHORT]:{[FORMATS.RGBA_INTEGER]:C.RGBA16UI,[FORMATS.RGB_INTEGER]:C.RGB16UI,[FORMATS.RG_INTEGER]:C.RG16UI,[FORMATS.RED_INTEGER]:C.R16UI,[FORMATS.DEPTH_COMPONENT]:C.DEPTH_COMPONENT16},[TYPES.SHORT]:{[FORMATS.RGBA_INTEGER]:C.RGBA16I,[FORMATS.RGB_INTEGER]:C.RGB16I,[FORMATS.RG_INTEGER]:C.RG16I,[FORMATS.RED_INTEGER]:C.R16I},[TYPES.UNSIGNED_INT]:{[FORMATS.RGBA_INTEGER]:C.RGBA32UI,[FORMATS.RGB_INTEGER]:C.RGB32UI,[FORMATS.RG_INTEGER]:C.RG32UI,[FORMATS.RED_INTEGER]:C.R32UI,[FORMATS.DEPTH_COMPONENT]:C.DEPTH_COMPONENT24},[TYPES.INT]:{[FORMATS.RGBA_INTEGER]:C.RGBA32I,[FORMATS.RGB_INTEGER]:C.RGB32I,[FORMATS.RG_INTEGER]:C.RG32I,[FORMATS.RED_INTEGER]:C.R32I},[TYPES.FLOAT]:{[FORMATS.RGBA]:C.RGBA32F,[FORMATS.RGB]:C.RGB32F,[FORMATS.RG]:C.RG32F,[FORMATS.RED]:C.R32F,[FORMATS.DEPTH_COMPONENT]:C.DEPTH_COMPONENT32F},[TYPES.HALF_FLOAT]:{[FORMATS.RGBA]:C.RGBA16F,[FORMATS.RGB]:C.RGB16F,[FORMATS.RG]:C.RG16F,[FORMATS.RED]:C.R16F},[TYPES.UNSIGNED_SHORT_5_6_5]:{[FORMATS.RGB]:C.RGB565},[TYPES.UNSIGNED_SHORT_4_4_4_4]:{[FORMATS.RGBA]:C.RGBA4},[TYPES.UNSIGNED_SHORT_5_5_5_1]:{[FORMATS.RGBA]:C.RGB5_A1},[TYPES.UNSIGNED_INT_2_10_10_10_REV]:{[FORMATS.RGBA]:C.RGB10_A2,[FORMATS.RGBA_INTEGER]:C.RGB10_A2UI},[TYPES.UNSIGNED_INT_10F_11F_11F_REV]:{[FORMATS.RGB]:C.R11F_G11F_B10F},[TYPES.UNSIGNED_INT_5_9_9_9_REV]:{[FORMATS.RGB]:C.RGB9_E5},[TYPES.UNSIGNED_INT_24_8]:{[FORMATS.DEPTH_STENCIL]:C.DEPTH24_STENCIL8},[TYPES.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[FORMATS.DEPTH_STENCIL]:C.DEPTH32F_STENCIL8}}:E={[TYPES.UNSIGNED_BYTE]:{[FORMATS.RGBA]:C.RGBA,[FORMATS.RGB]:C.RGB,[FORMATS.ALPHA]:C.ALPHA,[FORMATS.LUMINANCE]:C.LUMINANCE,[FORMATS.LUMINANCE_ALPHA]:C.LUMINANCE_ALPHA},[TYPES.UNSIGNED_SHORT_5_6_5]:{[FORMATS.RGB]:C.RGB},[TYPES.UNSIGNED_SHORT_4_4_4_4]:{[FORMATS.RGBA]:C.RGBA},[TYPES.UNSIGNED_SHORT_5_5_5_1]:{[FORMATS.RGBA]:C.RGBA}},E}class TextureSystem{constructor(E){this.renderer=E,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new BaseTexture,this.hasIntegerTextures=!1}contextChange(){const E=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=mapTypeAndFormatToInternalFormat(E);const I=E.getParameter(E.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=I;for(let U=0;U<I;U++)this.boundTextures[U]=null;this.emptyTextures={};const B=new GLTexture(E.createTexture());E.bindTexture(E.TEXTURE_2D,B.texture),E.texImage2D(E.TEXTURE_2D,0,E.RGBA,1,1,0,E.RGBA,E.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[E.TEXTURE_2D]=B,this.emptyTextures[E.TEXTURE_CUBE_MAP]=new GLTexture(E.createTexture()),E.bindTexture(E.TEXTURE_CUBE_MAP,this.emptyTextures[E.TEXTURE_CUBE_MAP].texture);for(let U=0;U<6;U++)E.texImage2D(E.TEXTURE_CUBE_MAP_POSITIVE_X+U,0,E.RGBA,1,1,0,E.RGBA,E.UNSIGNED_BYTE,null);E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_MAG_FILTER,E.LINEAR),E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_MIN_FILTER,E.LINEAR);for(let U=0;U<this.boundTextures.length;U++)this.bind(null,U)}bind(E,I=0){const{gl:B}=this;if(E=E==null?void 0:E.castToBaseTexture(),E!=null&&E.valid&&!E.parentTextureArray){E.touched=this.renderer.textureGC.count;const U=E._glTextures[this.CONTEXT_UID]||this.initTexture(E);this.boundTextures[I]!==E&&(this.currentLocation!==I&&(this.currentLocation=I,B.activeTexture(B.TEXTURE0+I)),B.bindTexture(E.target,U.texture)),U.dirtyId!==E.dirtyId?(this.currentLocation!==I&&(this.currentLocation=I,B.activeTexture(B.TEXTURE0+I)),this.updateTexture(E)):U.dirtyStyleId!==E.dirtyStyleId&&this.updateTextureStyle(E),this.boundTextures[I]=E}else this.currentLocation!==I&&(this.currentLocation=I,B.activeTexture(B.TEXTURE0+I)),B.bindTexture(B.TEXTURE_2D,this.emptyTextures[B.TEXTURE_2D].texture),this.boundTextures[I]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let E=0;E<this.boundTextures.length;E++)this.boundTextures[E]=this.unknownTexture}unbind(E){const{gl:I,boundTextures:B}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let U=0;U<B.length;U++)B[U]===this.unknownTexture&&this.bind(null,U)}for(let U=0;U<B.length;U++)B[U]===E&&(this.currentLocation!==U&&(I.activeTexture(I.TEXTURE0+U),this.currentLocation=U),I.bindTexture(E.target,this.emptyTextures[E.target].texture),B[U]=null)}ensureSamplerType(E){const{boundTextures:I,hasIntegerTextures:B,CONTEXT_UID:U}=this;if(B)for(let V=E-1;V>=0;--V){const X=I[V];X&&X._glTextures[U].samplerType!==SAMPLER_TYPES.FLOAT&&this.renderer.texture.unbind(X)}}initTexture(E){const I=new GLTexture(this.gl.createTexture());return I.dirtyId=-1,E._glTextures[this.CONTEXT_UID]=I,this.managedTextures.push(E),E.on("dispose",this.destroyTexture,this),I}initTextureType(E,I){var B;I.internalFormat=((B=this.internalFormats[E.type])==null?void 0:B[E.format])??E.format,this.webGLVersion===2&&E.type===TYPES.HALF_FLOAT?I.type=this.gl.HALF_FLOAT:I.type=E.type}updateTexture(E){var U;const I=E._glTextures[this.CONTEXT_UID];if(!I)return;const B=this.renderer;if(this.initTextureType(E,I),(U=E.resource)!=null&&U.upload(B,E,I))I.samplerType!==SAMPLER_TYPES.FLOAT&&(this.hasIntegerTextures=!0);else{const V=E.realWidth,X=E.realHeight,Y=B.gl;(I.width!==V||I.height!==X||I.dirtyId<0)&&(I.width=V,I.height=X,Y.texImage2D(E.target,0,I.internalFormat,V,X,0,E.format,I.type,null))}E.dirtyStyleId!==I.dirtyStyleId&&this.updateTextureStyle(E),I.dirtyId=E.dirtyId}destroyTexture(E,I){const{gl:B}=this;if(E=E.castToBaseTexture(),E._glTextures[this.CONTEXT_UID]&&(this.unbind(E),B.deleteTexture(E._glTextures[this.CONTEXT_UID].texture),E.off("dispose",this.destroyTexture,this),delete E._glTextures[this.CONTEXT_UID],!I)){const U=this.managedTextures.indexOf(E);U!==-1&&removeItems(this.managedTextures,U,1)}}updateTextureStyle(E){var B;const I=E._glTextures[this.CONTEXT_UID];I&&((E.mipmap===MIPMAP_MODES.POW2||this.webGLVersion!==2)&&!E.isPowerOfTwo?I.mipmap=!1:I.mipmap=E.mipmap>=1,this.webGLVersion!==2&&!E.isPowerOfTwo?I.wrapMode=WRAP_MODES.CLAMP:I.wrapMode=E.wrapMode,(B=E.resource)!=null&&B.style(this.renderer,E,I)||this.setStyle(E,I),I.dirtyStyleId=E.dirtyStyleId)}setStyle(E,I){const B=this.gl;if(I.mipmap&&E.mipmap!==MIPMAP_MODES.ON_MANUAL&&B.generateMipmap(E.target),B.texParameteri(E.target,B.TEXTURE_WRAP_S,I.wrapMode),B.texParameteri(E.target,B.TEXTURE_WRAP_T,I.wrapMode),I.mipmap){B.texParameteri(E.target,B.TEXTURE_MIN_FILTER,E.scaleMode===SCALE_MODES.LINEAR?B.LINEAR_MIPMAP_LINEAR:B.NEAREST_MIPMAP_NEAREST);const U=this.renderer.context.extensions.anisotropicFiltering;if(U&&E.anisotropicLevel>0&&E.scaleMode===SCALE_MODES.LINEAR){const V=Math.min(E.anisotropicLevel,B.getParameter(U.MAX_TEXTURE_MAX_ANISOTROPY_EXT));B.texParameterf(E.target,U.TEXTURE_MAX_ANISOTROPY_EXT,V)}}else B.texParameteri(E.target,B.TEXTURE_MIN_FILTER,E.scaleMode===SCALE_MODES.LINEAR?B.LINEAR:B.NEAREST);B.texParameteri(E.target,B.TEXTURE_MAG_FILTER,E.scaleMode===SCALE_MODES.LINEAR?B.LINEAR:B.NEAREST)}destroy(){this.renderer=null}}TextureSystem.extension={type:ExtensionType.RendererSystem,name:"texture"},extensions.add(TextureSystem);class TransformFeedbackSystem{constructor(E){this.renderer=E}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(E){const{gl:I,CONTEXT_UID:B}=this,U=E._glTransformFeedbacks[B]||this.createGLTransformFeedback(E);I.bindTransformFeedback(I.TRANSFORM_FEEDBACK,U)}unbind(){const{gl:E}=this;E.bindTransformFeedback(E.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(E,I){const{gl:B,renderer:U}=this;I&&U.shader.bind(I),B.beginTransformFeedback(E)}endTransformFeedback(){const{gl:E}=this;E.endTransformFeedback()}createGLTransformFeedback(E){const{gl:I,renderer:B,CONTEXT_UID:U}=this,V=I.createTransformFeedback();E._glTransformFeedbacks[U]=V,I.bindTransformFeedback(I.TRANSFORM_FEEDBACK,V);for(let X=0;X<E.buffers.length;X++){const Y=E.buffers[X];Y&&(B.buffer.update(Y),Y._glBuffers[U].refCount++,I.bindBufferBase(I.TRANSFORM_FEEDBACK_BUFFER,X,Y._glBuffers[U].buffer||null))}return I.bindTransformFeedback(I.TRANSFORM_FEEDBACK,null),E.disposeRunner.add(this),V}disposeTransformFeedback(E,I){const B=E._glTransformFeedbacks[this.CONTEXT_UID],U=this.gl;E.disposeRunner.remove(this);const V=this.renderer.buffer;if(V)for(let X=0;X<E.buffers.length;X++){const Y=E.buffers[X];if(!Y)continue;const K=Y._glBuffers[this.CONTEXT_UID];K&&(K.refCount--,K.refCount===0&&!I&&V.dispose(Y,I))}B&&(I||U.deleteTransformFeedback(B),delete E._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}TransformFeedbackSystem.extension={type:ExtensionType.RendererSystem,name:"transformFeedback"},extensions.add(TransformFeedbackSystem);class ViewSystem{constructor(E){this.renderer=E}init(E){this.screen=new Rectangle(0,0,E.width,E.height),this.element=E.view||settings.ADAPTER.createCanvas(),this.resolution=E.resolution||settings.RESOLUTION,this.autoDensity=!!E.autoDensity}resizeView(E,I){this.element.width=Math.round(E*this.resolution),this.element.height=Math.round(I*this.resolution);const B=this.element.width/this.resolution,U=this.element.height/this.resolution;this.screen.width=B,this.screen.height=U,this.autoDensity&&(this.element.style.width=`${B}px`,this.element.style.height=`${U}px`),this.renderer.emit("resize",B,U),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(E){var I;E&&((I=this.element.parentNode)==null||I.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}ViewSystem.defaultOptions={width:800,height:600,resolution:settings.RESOLUTION,autoDensity:!1},ViewSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"_view"},extensions.add(ViewSystem),settings.PREFER_ENV=ENV.WEBGL2,settings.STRICT_TEXTURE_CACHE=!1,settings.RENDER_OPTIONS={...ContextSystem.defaultOptions,...BackgroundSystem.defaultOptions,...ViewSystem.defaultOptions,...StartupSystem.defaultOptions},Object.defineProperties(settings,{WRAP_MODE:{get(){return BaseTexture.defaultOptions.wrapMode},set(C){deprecation("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),BaseTexture.defaultOptions.wrapMode=C}},SCALE_MODE:{get(){return BaseTexture.defaultOptions.scaleMode},set(C){deprecation("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),BaseTexture.defaultOptions.scaleMode=C}},MIPMAP_TEXTURES:{get(){return BaseTexture.defaultOptions.mipmap},set(C){deprecation("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),BaseTexture.defaultOptions.mipmap=C}},ANISOTROPIC_LEVEL:{get(){return BaseTexture.defaultOptions.anisotropicLevel},set(C){deprecation("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),BaseTexture.defaultOptions.anisotropicLevel=C}},FILTER_RESOLUTION:{get(){return deprecation("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Filter.defaultResolution},set(C){Filter.defaultResolution=C}},FILTER_MULTISAMPLE:{get(){return deprecation("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Filter.defaultMultisample},set(C){Filter.defaultMultisample=C}},SPRITE_MAX_TEXTURES:{get(){return BatchRenderer.defaultMaxTextures},set(C){deprecation("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),BatchRenderer.defaultMaxTextures=C}},SPRITE_BATCH_SIZE:{get(){return BatchRenderer.defaultBatchSize},set(C){deprecation("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),BatchRenderer.defaultBatchSize=C}},CAN_UPLOAD_SAME_BUFFER:{get(){return BatchRenderer.canUploadSameBuffer},set(C){deprecation("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),BatchRenderer.canUploadSameBuffer=C}},GC_MODE:{get(){return TextureGCSystem.defaultMode},set(C){deprecation("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),TextureGCSystem.defaultMode=C}},GC_MAX_IDLE:{get(){return TextureGCSystem.defaultMaxIdle},set(C){deprecation("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),TextureGCSystem.defaultMaxIdle=C}},GC_MAX_CHECK_COUNT:{get(){return TextureGCSystem.defaultCheckCountMax},set(C){deprecation("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),TextureGCSystem.defaultCheckCountMax=C}},PRECISION_VERTEX:{get(){return Program.defaultVertexPrecision},set(C){deprecation("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Program.defaultVertexPrecision=C}},PRECISION_FRAGMENT:{get(){return Program.defaultFragmentPrecision},set(C){deprecation("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Program.defaultFragmentPrecision=C}}});var UPDATE_PRIORITY=(C=>(C[C.INTERACTION=50]="INTERACTION",C[C.HIGH=25]="HIGH",C[C.NORMAL=0]="NORMAL",C[C.LOW=-25]="LOW",C[C.UTILITY=-50]="UTILITY",C))(UPDATE_PRIORITY||{});class TickerListener{constructor(E,I=null,B=0,U=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=E,this.context=I,this.priority=B,this.once=U}match(E,I=null){return this.fn===E&&this.context===I}emit(E){this.fn&&(this.context?this.fn.call(this.context,E):this.fn(E));const I=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),I}connect(E){this.previous=E,E.next&&(E.next.previous=this),this.next=E.next,E.next=this}destroy(E=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const I=this.next;return this.next=E?null:I,this.previous=null,I}}const _Ticker=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new TickerListener(null,null,1/0),this.deltaMS=1/_Ticker.targetFPMS,this.elapsedMS=1/_Ticker.targetFPMS,this._tick=C=>{this._requestId=null,this.started&&(this.update(C),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(C,E,I=UPDATE_PRIORITY.NORMAL){return this._addListener(new TickerListener(C,E,I))}addOnce(C,E,I=UPDATE_PRIORITY.NORMAL){return this._addListener(new TickerListener(C,E,I,!0))}_addListener(C){let E=this._head.next,I=this._head;if(!E)C.connect(I);else{for(;E;){if(C.priority>E.priority){C.connect(I);break}I=E,E=E.next}C.previous||C.connect(I)}return this._startIfPossible(),this}remove(C,E){let I=this._head.next;for(;I;)I.match(C,E)?I=I.destroy():I=I.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let C=0,E=this._head;for(;E=E.next;)C++;return C}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let C=this._head.next;for(;C;)C=C.destroy(!0);this._head.destroy(),this._head=null}}update(C=performance.now()){let E;if(C>this.lastTime){if(E=this.elapsedMS=C-this.lastTime,E>this._maxElapsedMS&&(E=this._maxElapsedMS),E*=this.speed,this._minElapsedMS){const U=C-this._lastFrame|0;if(U<this._minElapsedMS)return;this._lastFrame=C-U%this._minElapsedMS}this.deltaMS=E,this.deltaTime=this.deltaMS*_Ticker.targetFPMS;const I=this._head;let B=I.next;for(;B;)B=B.emit(this.deltaTime);I.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=C}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(C){const E=Math.min(this.maxFPS,C),I=Math.min(Math.max(0,E)/1e3,_Ticker.targetFPMS);this._maxElapsedMS=1/I}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(C){if(C===0)this._minElapsedMS=0;else{const E=Math.max(this.minFPS,C);this._minElapsedMS=1/(E/1e3)}}static get shared(){if(!_Ticker._shared){const C=_Ticker._shared=new _Ticker;C.autoStart=!0,C._protected=!0}return _Ticker._shared}static get system(){if(!_Ticker._system){const C=_Ticker._system=new _Ticker;C.autoStart=!0,C._protected=!0}return _Ticker._system}};let Ticker=_Ticker;Ticker.targetFPMS=.06,Object.defineProperties(settings,{TARGET_FPMS:{get(){return Ticker.targetFPMS},set(C){deprecation("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Ticker.targetFPMS=C}}});class TickerPlugin{static init(E){E=Object.assign({autoStart:!0,sharedTicker:!1},E),Object.defineProperty(this,"ticker",{set(I){this._ticker&&this._ticker.remove(this.render,this),this._ticker=I,I&&I.add(this.render,this,UPDATE_PRIORITY.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=E.sharedTicker?Ticker.shared:new Ticker,E.autoStart&&this.start()}static destroy(){if(this._ticker){const E=this._ticker;this.ticker=null,E.destroy()}}}TickerPlugin.extension=ExtensionType.Application,extensions.add(TickerPlugin);const renderers=[];extensions.handleByList(ExtensionType.Renderer,renderers);class MultisampleSystem{constructor(E){this.renderer=E}contextChange(E){let I;if(this.renderer.context.webGLVersion===1){const B=E.getParameter(E.FRAMEBUFFER_BINDING);E.bindFramebuffer(E.FRAMEBUFFER,null),I=E.getParameter(E.SAMPLES),E.bindFramebuffer(E.FRAMEBUFFER,B)}else{const B=E.getParameter(E.DRAW_FRAMEBUFFER_BINDING);E.bindFramebuffer(E.DRAW_FRAMEBUFFER,null),I=E.getParameter(E.SAMPLES),E.bindFramebuffer(E.DRAW_FRAMEBUFFER,B)}I>=MSAA_QUALITY.HIGH?this.multisample=MSAA_QUALITY.HIGH:I>=MSAA_QUALITY.MEDIUM?this.multisample=MSAA_QUALITY.MEDIUM:I>=MSAA_QUALITY.LOW?this.multisample=MSAA_QUALITY.LOW:this.multisample=MSAA_QUALITY.NONE}destroy(){}}MultisampleSystem.extension={type:ExtensionType.RendererSystem,name:"_multisample"},extensions.add(MultisampleSystem);class GLBuffer{constructor(E){this.buffer=E||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class BufferSystem{constructor(E){this.renderer=E,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(E){const{gl:I,CONTEXT_UID:B}=this,U=E._glBuffers[B]||this.createGLBuffer(E);I.bindBuffer(E.type,U.buffer)}unbind(E){const{gl:I}=this;I.bindBuffer(E,null)}bindBufferBase(E,I){const{gl:B,CONTEXT_UID:U}=this;if(this.boundBufferBases[I]!==E){const V=E._glBuffers[U]||this.createGLBuffer(E);this.boundBufferBases[I]=E,B.bindBufferBase(B.UNIFORM_BUFFER,I,V.buffer)}}bindBufferRange(E,I,B){const{gl:U,CONTEXT_UID:V}=this;B=B||0;const X=E._glBuffers[V]||this.createGLBuffer(E);U.bindBufferRange(U.UNIFORM_BUFFER,I||0,X.buffer,B*256,256)}update(E){const{gl:I,CONTEXT_UID:B}=this,U=E._glBuffers[B]||this.createGLBuffer(E);if(E._updateID!==U.updateID)if(U.updateID=E._updateID,I.bindBuffer(E.type,U.buffer),U.byteLength>=E.data.byteLength)I.bufferSubData(E.type,0,E.data);else{const V=E.static?I.STATIC_DRAW:I.DYNAMIC_DRAW;U.byteLength=E.data.byteLength,I.bufferData(E.type,E.data,V)}}dispose(E,I){if(!this.managedBuffers[E.id])return;delete this.managedBuffers[E.id];const B=E._glBuffers[this.CONTEXT_UID],U=this.gl;E.disposeRunner.remove(this),B&&(I||U.deleteBuffer(B.buffer),delete E._glBuffers[this.CONTEXT_UID])}disposeAll(E){const I=Object.keys(this.managedBuffers);for(let B=0;B<I.length;B++)this.dispose(this.managedBuffers[I[B]],E)}createGLBuffer(E){const{CONTEXT_UID:I,gl:B}=this;return E._glBuffers[I]=new GLBuffer(B.createBuffer()),this.managedBuffers[E.id]=E,E.disposeRunner.add(this),E._glBuffers[I]}}BufferSystem.extension={type:ExtensionType.RendererSystem,name:"buffer"},extensions.add(BufferSystem);class ObjectRendererSystem{constructor(E){this.renderer=E}render(E,I){const B=this.renderer;let U,V,X,Y;if(I&&(U=I.renderTexture,V=I.clear,X=I.transform,Y=I.skipUpdateTransform),this.renderingToScreen=!U,B.runners.prerender.emit(),B.emit("prerender"),B.projection.transform=X,!B.context.isLost){if(U||(this.lastObjectRendered=E),!Y){const K=E.enableTempParent();E.updateTransform(),E.disableTempParent(K)}B.renderTexture.bind(U),B.batch.currentRenderer.start(),(V??B.background.clearBeforeRender)&&B.renderTexture.clear(),E.render(B),B.batch.currentRenderer.flush(),U&&(I.blit&&B.framebuffer.blit(),U.baseTexture.update()),B.runners.postrender.emit(),B.projection.transform=null,B.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}ObjectRendererSystem.extension={type:ExtensionType.RendererSystem,name:"objectRenderer"},extensions.add(ObjectRendererSystem);const _Renderer=class extends SystemManager{constructor(C){super(),this.type=RENDERER_TYPE.WEBGL,C=Object.assign({},settings.RENDER_OPTIONS,C),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new UniformGroup({projectionMatrix:new Matrix$2},!0);const E={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:_Renderer.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(E),"useContextAlpha"in C&&(deprecation("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),C.premultipliedAlpha=C.useContextAlpha&&C.useContextAlpha!=="notMultiplied",C.backgroundAlpha=C.useContextAlpha===!1?1:C.backgroundAlpha),this._plugin.rendererPlugins=_Renderer.__plugins,this.options=C,this.startup.run(this.options)}static test(C){return C!=null&&C.forceCanvas?!1:isWebGLSupported()}render(C,E){this.objectRenderer.render(C,E)}resize(C,E){this._view.resizeView(C,E)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(C=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:C}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(C){this._view.resolution=C,this.runners.resolutionChange.emit(C)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return deprecation("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return deprecation("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return deprecation("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return deprecation("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(C){deprecation("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=C}get backgroundAlpha(){return deprecation("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(C){deprecation("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=C}get powerPreference(){return deprecation("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(C,E){return this.textureGenerator.generateTexture(C,E)}};let Renderer=_Renderer;Renderer.extension={type:ExtensionType.Renderer,priority:1},Renderer.__plugins={},Renderer.__systems={},extensions.handleByMap(ExtensionType.RendererPlugin,Renderer.__plugins),extensions.handleByMap(ExtensionType.RendererSystem,Renderer.__systems),extensions.add(Renderer);class AbstractMultiResource extends Resource{constructor(E,I){const{width:B,height:U}=I||{};super(B,U),this.items=[],this.itemDirtyIds=[];for(let V=0;V<E;V++){const X=new BaseTexture;this.items.push(X),this.itemDirtyIds.push(-2)}this.length=E,this._load=null,this.baseTexture=null}initFromArray(E,I){for(let B=0;B<this.length;B++)E[B]&&(E[B].castToBaseTexture?this.addBaseTextureAt(E[B].castToBaseTexture(),B):E[B]instanceof Resource?this.addResourceAt(E[B],B):this.addResourceAt(autoDetectResource(E[B],I),B))}dispose(){for(let E=0,I=this.length;E<I;E++)this.items[E].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(E,I){if(!this.items[I])throw new Error(`Index ${I} is out of bounds`);return E.valid&&!this.valid&&this.resize(E.width,E.height),this.items[I].setResource(E),this}bind(E){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(E);for(let I=0;I<this.length;I++)this.items[I].parentTextureArray=E,this.items[I].on("update",E.update,E)}unbind(E){super.unbind(E);for(let I=0;I<this.length;I++)this.items[I].parentTextureArray=null,this.items[I].off("update",E.update,E)}load(){if(this._load)return this._load;const I=this.items.map(B=>B.resource).filter(B=>B).map(B=>B.load());return this._load=Promise.all(I).then(()=>{const{realWidth:B,realHeight:U}=this.items[0];return this.resize(B,U),Promise.resolve(this)}),this._load}}class ArrayResource extends AbstractMultiResource{constructor(E,I){const{width:B,height:U}=I||{};let V,X;Array.isArray(E)?(V=E,X=E.length):X=E,super(X,{width:B,height:U}),V&&this.initFromArray(V,I)}addBaseTextureAt(E,I){if(E.resource)this.addResourceAt(E.resource,I);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(E){super.bind(E),E.target=TARGETS.TEXTURE_2D_ARRAY}upload(E,I,B){const{length:U,itemDirtyIds:V,items:X}=this,{gl:Y}=E;B.dirtyId<0&&Y.texImage3D(Y.TEXTURE_2D_ARRAY,0,B.internalFormat,this._width,this._height,U,0,I.format,B.type,null);for(let K=0;K<U;K++){const J=X[K];V[K]<J.dirtyId&&(V[K]=J.dirtyId,J.valid&&Y.texSubImage3D(Y.TEXTURE_2D_ARRAY,0,0,0,K,J.resource.width,J.resource.height,1,I.format,B.type,J.resource.source))}return!0}}class CanvasResource extends BaseImageResource{constructor(E){super(E)}static test(E){const{OffscreenCanvas:I}=globalThis;return I&&E instanceof I?!0:globalThis.HTMLCanvasElement&&E instanceof HTMLCanvasElement}}const _CubeResource=class extends AbstractMultiResource{constructor(C,E){const{width:I,height:B,autoLoad:U,linkBaseTexture:V}=E||{};if(C&&C.length!==_CubeResource.SIDES)throw new Error(`Invalid length. Got ${C.length}, expected 6`);super(6,{width:I,height:B});for(let X=0;X<_CubeResource.SIDES;X++)this.items[X].target=TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+X;this.linkBaseTexture=V!==!1,C&&this.initFromArray(C,E),U!==!1&&this.load()}bind(C){super.bind(C),C.target=TARGETS.TEXTURE_CUBE_MAP}addBaseTextureAt(C,E,I){if(I===void 0&&(I=this.linkBaseTexture),!this.items[E])throw new Error(`Index ${E} is out of bounds`);if(!this.linkBaseTexture||C.parentTextureArray||Object.keys(C._glTextures).length>0)if(C.resource)this.addResourceAt(C.resource,E);else throw new Error("CubeResource does not support copying of renderTexture.");else C.target=TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+E,C.parentTextureArray=this.baseTexture,this.items[E]=C;return C.valid&&!this.valid&&this.resize(C.realWidth,C.realHeight),this.items[E]=C,this}upload(C,E,I){const B=this.itemDirtyIds;for(let U=0;U<_CubeResource.SIDES;U++){const V=this.items[U];(B[U]<V.dirtyId||I.dirtyId<E.dirtyId)&&(V.valid&&V.resource?(V.resource.upload(C,V,I),B[U]=V.dirtyId):B[U]<-1&&(C.gl.texImage2D(V.target,0,I.internalFormat,E.realWidth,E.realHeight,0,E.format,I.type,null),B[U]=-1))}return!0}static test(C){return Array.isArray(C)&&C.length===_CubeResource.SIDES}};let CubeResource=_CubeResource;CubeResource.SIDES=6;class ImageBitmapResource extends BaseImageResource{constructor(E,I){I=I||{};let B,U;typeof E=="string"?(B=ImageBitmapResource.EMPTY,U=E):(B=E,U=null),super(B),this.url=U,this.crossOrigin=I.crossOrigin??!0,this.alphaMode=typeof I.alphaMode=="number"?I.alphaMode:null,this._load=null,I.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(E,I)=>{if(this.url===null){E(this);return}try{const B=await settings.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const U=await B.blob();if(this.destroyed)return;const V=await createImageBitmap(U,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ALPHA_MODES.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=V,this.update(),E(this)}catch(B){if(this.destroyed)return;I(B),this.onError.emit(B)}}),this._load)}upload(E,I,B){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(I.alphaMode=this.alphaMode),super.upload(E,I,B)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(E){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof E=="string"||E instanceof ImageBitmap)}static get EMPTY(){return ImageBitmapResource._EMPTY=ImageBitmapResource._EMPTY??settings.ADAPTER.createCanvas(0,0),ImageBitmapResource._EMPTY}}const _SVGResource=class extends BaseImageResource{constructor(C,E){E=E||{},super(settings.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=C,this.scale=E.scale||1,this._overrideWidth=E.width,this._overrideHeight=E.height,this._resolve=null,this._crossorigin=E.crossorigin,this._load=null,E.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(C=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),C(this)},_SVGResource.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const C=new Image;BaseImageResource.crossOrigin(C,this.svg,this._crossorigin),C.src=this.svg,C.onerror=E=>{this._resolve&&(C.onerror=null,this.onError.emit(E))},C.onload=()=>{if(!this._resolve)return;const E=C.width,I=C.height;if(!E||!I)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let B=E*this.scale,U=I*this.scale;(this._overrideWidth||this._overrideHeight)&&(B=this._overrideWidth||this._overrideHeight/I*E,U=this._overrideHeight||this._overrideWidth/E*I),B=Math.round(B),U=Math.round(U);const V=this.source;V.width=B,V.height=U,V._pixiId=`canvas_${uid()}`,V.getContext("2d").drawImage(C,0,0,E,I,0,0,B,U),this._resolve(),this._resolve=null}}static getSize(C){const E=_SVGResource.SVG_SIZE.exec(C),I={};return E&&(I[E[1]]=Math.round(parseFloat(E[3])),I[E[5]]=Math.round(parseFloat(E[7]))),I}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(C,E){return E==="svg"||typeof C=="string"&&C.startsWith("data:image/svg+xml")||typeof C=="string"&&_SVGResource.SVG_XML.test(C)}};let SVGResource=_SVGResource;SVGResource.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,SVGResource.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const _VideoResource=class extends BaseImageResource{constructor(C,E){if(E=E||{},!(C instanceof HTMLVideoElement)){const I=document.createElement("video");I.setAttribute("preload","auto"),I.setAttribute("webkit-playsinline",""),I.setAttribute("playsinline",""),typeof C=="string"&&(C=[C]);const B=C[0].src||C[0];BaseImageResource.crossOrigin(I,B,E.crossorigin);for(let U=0;U<C.length;++U){const V=document.createElement("source");let{src:X,mime:Y}=C[U];X=X||C[U];const K=X.split("?").shift().toLowerCase(),J=K.slice(K.lastIndexOf(".")+1);Y=Y||_VideoResource.MIME_TYPES[J]||`video/${J}`,V.src=X,V.type=Y,I.appendChild(V)}C=I}super(C),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=E.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=E.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),E.autoLoad!==!1&&this.load()}update(C=0){if(!this.destroyed){const E=Ticker.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-E),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const C=this.source;return(C.readyState===C.HAVE_ENOUGH_DATA||C.readyState===C.HAVE_FUTURE_DATA)&&C.width&&C.height&&(C.complete=!0),C.addEventListener("play",this._onPlayStart.bind(this)),C.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(C.addEventListener("canplay",this._onCanPlay),C.addEventListener("canplaythrough",this._onCanPlay),C.addEventListener("error",this._onError,!0)),this._load=new Promise(E=>{this.valid?E(this):(this._resolve=E,C.load())}),this._load}_onError(C){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(C)}_isSourcePlaying(){const C=this.source;return!C.paused&&!C.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Ticker.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const C=this.source;C.removeEventListener("canplay",this._onCanPlay),C.removeEventListener("canplaythrough",this._onCanPlay);const E=this.valid;this.resize(C.videoWidth,C.videoHeight),!E&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&C.play()}dispose(){this._isConnectedToTicker&&(Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1);const C=this.source;C&&(C.removeEventListener("error",this._onError,!0),C.pause(),C.src="",C.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(C){C!==this._autoUpdate&&(this._autoUpdate=C,!this._autoUpdate&&this._isConnectedToTicker?(Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Ticker.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(C){C!==this._updateFPS&&(this._updateFPS=C)}static test(C,E){return globalThis.HTMLVideoElement&&C instanceof HTMLVideoElement||_VideoResource.TYPES.includes(E)}};let VideoResource=_VideoResource;VideoResource.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],VideoResource.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},INSTALLED.push(ImageBitmapResource,ImageResource,CanvasResource,VideoResource,SVGResource,BufferResource,CubeResource,ArrayResource);var e$2=`attribute vec2 aVertexPosition;
522
522
  attribute vec2 aTextureCoord;
523
523
 
524
524
  uniform mat3 projectionMatrix;
@@ -529,7 +529,7 @@ void main(void)
529
529
  {
530
530
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
531
531
  vTextureCoord = aTextureCoord;
532
- }`,r1=`varying vec2 vTextureCoord;
532
+ }`,o$4=`varying vec2 vTextureCoord;
533
533
  uniform sampler2D uSampler;
534
534
 
535
535
  uniform float gamma;
@@ -560,7 +560,7 @@ void main(void)
560
560
 
561
561
  gl_FragColor = c * alpha;
562
562
  }
563
- `;let i1=class extends ue{constructor(e){super(t1,r1),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,e)}apply(e,r,i,n){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,r,i,n)}};var n1=`attribute vec2 aVertexPosition;
563
+ `;let s$4=class extends Filter{constructor(E){super(e$2,o$4),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,E)}apply(E,I,B,U){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,E.applyFilter(this,I,B,U)}};var c$6=`attribute vec2 aVertexPosition;
564
564
  attribute vec2 aTextureCoord;
565
565
 
566
566
  uniform mat3 projectionMatrix;
@@ -571,7 +571,7 @@ void main(void)
571
571
  {
572
572
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
573
573
  vTextureCoord = aTextureCoord;
574
- }`,s1=`
574
+ }`,v$2=`
575
575
  varying vec2 vTextureCoord;
576
576
  uniform sampler2D uSampler;
577
577
 
@@ -597,7 +597,7 @@ void main(void)
597
597
  color *= 0.25;
598
598
 
599
599
  gl_FragColor = color;
600
- }`,a1=`
600
+ }`,y$1=`
601
601
  varying vec2 vTextureCoord;
602
602
  uniform sampler2D uSampler;
603
603
 
@@ -625,7 +625,7 @@ void main(void)
625
625
 
626
626
  gl_FragColor = color;
627
627
  }
628
- `;let di=class extends ue{constructor(e=4,r=3,i=!1){super(n1,i?a1:s1),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new me,this.pixelSize=1,this._clamp=i,Array.isArray(e)?this.kernels=e:(this._blur=e,this.quality=r)}apply(e,r,i,n){const s=this._pixelSize.x/r._frame.width,a=this._pixelSize.y/r._frame.height;let o;if(this._quality===1||this._blur===0)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*s,this.uniforms.uOffset[1]=o*a,e.applyFilter(this,r,i,n);else{const u=e.getFilterTexture();let h=r,d=u,l;const c=this._quality-1;for(let f=0;f<c;f++)o=this._kernels[f]+.5,this.uniforms.uOffset[0]=o*s,this.uniforms.uOffset[1]=o*a,e.applyFilter(this,h,d,1),l=h,h=d,d=l;o=this._kernels[c]+.5,this.uniforms.uOffset[0]=o*s,this.uniforms.uOffset[1]=o*a,e.applyFilter(this,h,i,n),e.returnFilterTexture(u)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((e,r)=>e+r+.5,0))}_generateKernels(){const e=this._blur,r=this._quality,i=[e];if(e>0){let n=e;const s=e/r;for(let a=1;a<r;a++)n-=s,i.push(n)}this._kernels=i,this._updatePadding()}get kernels(){return this._kernels}set kernels(e){Array.isArray(e)&&e.length>0?(this._kernels=e,this._quality=e.length,this._blur=Math.max(...e)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(e){typeof e=="number"?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof me?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()}get blur(){return this._blur}set blur(e){this._blur=e,this._generateKernels()}};var mc=`attribute vec2 aVertexPosition;
628
+ `;let _$1=class extends Filter{constructor(E=4,I=3,B=!1){super(c$6,B?y$1:v$2),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new Point,this.pixelSize=1,this._clamp=B,Array.isArray(E)?this.kernels=E:(this._blur=E,this.quality=I)}apply(E,I,B,U){const V=this._pixelSize.x/I._frame.width,X=this._pixelSize.y/I._frame.height;let Y;if(this._quality===1||this._blur===0)Y=this._kernels[0]+.5,this.uniforms.uOffset[0]=Y*V,this.uniforms.uOffset[1]=Y*X,E.applyFilter(this,I,B,U);else{const K=E.getFilterTexture();let J=I,xe=K,Z;const _e=this._quality-1;for(let Se=0;Se<_e;Se++)Y=this._kernels[Se]+.5,this.uniforms.uOffset[0]=Y*V,this.uniforms.uOffset[1]=Y*X,E.applyFilter(this,J,xe,1),Z=J,J=xe,xe=Z;Y=this._kernels[_e]+.5,this.uniforms.uOffset[0]=Y*V,this.uniforms.uOffset[1]=Y*X,E.applyFilter(this,J,B,U),E.returnFilterTexture(K)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((E,I)=>E+I+.5,0))}_generateKernels(){const E=this._blur,I=this._quality,B=[E];if(E>0){let U=E;const V=E/I;for(let X=1;X<I;X++)U-=V,B.push(U)}this._kernels=B,this._updatePadding()}get kernels(){return this._kernels}set kernels(E){Array.isArray(E)&&E.length>0?(this._kernels=E,this._quality=E.length,this._blur=Math.max(...E)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(E){typeof E=="number"?(this._pixelSize.x=E,this._pixelSize.y=E):Array.isArray(E)?(this._pixelSize.x=E[0],this._pixelSize.y=E[1]):E instanceof Point?(this._pixelSize.x=E.x,this._pixelSize.y=E.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(E){this._quality=Math.max(1,Math.round(E)),this._generateKernels()}get blur(){return this._blur}set blur(E){this._blur=E,this._generateKernels()}};var a$5=`attribute vec2 aVertexPosition;
629
629
  attribute vec2 aTextureCoord;
630
630
 
631
631
  uniform mat3 projectionMatrix;
@@ -636,7 +636,7 @@ void main(void)
636
636
  {
637
637
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
638
638
  vTextureCoord = aTextureCoord;
639
- }`,o1=`
639
+ }`,m$2=`
640
640
  uniform sampler2D uSampler;
641
641
  varying vec2 vTextureCoord;
642
642
 
@@ -657,7 +657,7 @@ void main() {
657
657
  gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
658
658
  }
659
659
  }
660
- `;let l1=class extends ue{constructor(e=.5){super(mc,o1),this.threshold=e}get threshold(){return this.uniforms.threshold}set threshold(e){this.uniforms.threshold=e}};var u1=`uniform sampler2D uSampler;
660
+ `;let x$2=class extends Filter{constructor(E=.5){super(a$5,m$2),this.threshold=E}get threshold(){return this.uniforms.threshold}set threshold(E){this.uniforms.threshold=E}};var g$1=`uniform sampler2D uSampler;
661
661
  varying vec2 vTextureCoord;
662
662
 
663
663
  uniform sampler2D bloomTexture;
@@ -671,7 +671,7 @@ void main() {
671
671
  bloomColor.rgb *= bloomScale;
672
672
  gl_FragColor = color + bloomColor;
673
673
  }
674
- `;const gc=class extends ue{constructor(e){super(mc,u1),this.bloomScale=1,this.brightness=1,this._resolution=Q.FILTER_RESOLUTION,typeof e=="number"&&(e={threshold:e});const r=Object.assign(gc.defaults,e);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:i,blur:n,quality:s,pixelSize:a,resolution:o}=r;this._extractFilter=new l1(r.threshold),this._extractFilter.resolution=o,this._blurFilter=i?new di(i):new di(n,s),this.pixelSize=a,this.resolution=o}apply(e,r,i,n,s){const a=e.getFilterTexture();this._extractFilter.apply(e,r,a,1,s);const o=e.getFilterTexture();this._blurFilter.apply(e,a,o,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=o,e.applyFilter(this,r,i,n),e.returnFilterTexture(o),e.returnFilterTexture(a)}get resolution(){return this._resolution}set resolution(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)}get threshold(){return this._extractFilter.threshold}set threshold(e){this._extractFilter.threshold=e}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get blur(){return this._blurFilter.blur}set blur(e){this._blurFilter.blur=e}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){this._blurFilter.pixelSize=e}};let c1=gc;c1.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:Q.FILTER_RESOLUTION};var h1=`attribute vec2 aVertexPosition;
674
+ `;const c$5=class extends Filter{constructor(E){super(a$5,g$1),this.bloomScale=1,this.brightness=1,this._resolution=settings.FILTER_RESOLUTION,typeof E=="number"&&(E={threshold:E});const I=Object.assign(c$5.defaults,E);this.bloomScale=I.bloomScale,this.brightness=I.brightness;const{kernels:B,blur:U,quality:V,pixelSize:X,resolution:Y}=I;this._extractFilter=new x$2(I.threshold),this._extractFilter.resolution=Y,this._blurFilter=B?new _$1(B):new _$1(U,V),this.pixelSize=X,this.resolution=Y}apply(E,I,B,U,V){const X=E.getFilterTexture();this._extractFilter.apply(E,I,X,1,V);const Y=E.getFilterTexture();this._blurFilter.apply(E,X,Y,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=Y,E.applyFilter(this,I,B,U),E.returnFilterTexture(Y),E.returnFilterTexture(X)}get resolution(){return this._resolution}set resolution(E){this._resolution=E,this._extractFilter&&(this._extractFilter.resolution=E),this._blurFilter&&(this._blurFilter.resolution=E)}get threshold(){return this._extractFilter.threshold}set threshold(E){this._extractFilter.threshold=E}get kernels(){return this._blurFilter.kernels}set kernels(E){this._blurFilter.kernels=E}get blur(){return this._blurFilter.blur}set blur(E){this._blurFilter.blur=E}get quality(){return this._blurFilter.quality}set quality(E){this._blurFilter.quality=E}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(E){this._blurFilter.pixelSize=E}};let b$1=c$5;b$1.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:settings.FILTER_RESOLUTION};var d$3=`attribute vec2 aVertexPosition;
675
675
  attribute vec2 aTextureCoord;
676
676
 
677
677
  uniform mat3 projectionMatrix;
@@ -682,7 +682,7 @@ void main(void)
682
682
  {
683
683
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
684
684
  vTextureCoord = aTextureCoord;
685
- }`,f1=`uniform float radius;
685
+ }`,u$3=`uniform float radius;
686
686
  uniform float strength;
687
687
  uniform vec2 center;
688
688
  uniform sampler2D uSampler;
@@ -715,7 +715,7 @@ void main()
715
715
 
716
716
  gl_FragColor = color;
717
717
  }
718
- `;const vc=class extends ue{constructor(e){super(h1,f1),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,vc.defaults,e)}apply(e,r,i,n){const{width:s,height:a}=r.filterFrame;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=a,e.applyFilter(this,r,i,n)}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}get strength(){return this.uniforms.strength}set strength(e){this.uniforms.strength=e}get center(){return this.uniforms.center}set center(e){this.uniforms.center=e}};let d1=vc;d1.defaults={center:[.5,.5],radius:100,strength:1};var p1=`const float PI = 3.1415926538;
718
+ `;const n$4=class extends Filter{constructor(E){super(d$3,u$3),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,n$4.defaults,E)}apply(E,I,B,U){const{width:V,height:X}=I.filterFrame;this.uniforms.dimensions[0]=V,this.uniforms.dimensions[1]=X,E.applyFilter(this,I,B,U)}get radius(){return this.uniforms.radius}set radius(E){this.uniforms.radius=E}get strength(){return this.uniforms.strength}set strength(E){this.uniforms.strength=E}get center(){return this.uniforms.center}set center(E){this.uniforms.center=E}};let t$2=n$4;t$2.defaults={center:[.5,.5],radius:100,strength:1};var Q=`const float PI = 3.1415926538;
719
719
  const float PI_2 = PI*2.;
720
720
 
721
721
  varying vec2 vTextureCoord;
@@ -842,7 +842,7 @@ void main(void) {
842
842
  // mix resulting color with current color
843
843
  gl_FragColor = gradientColor + currentColor*(1.-gradientColor.a);
844
844
  }
845
- `,m1=`attribute vec2 aVertexPosition;
845
+ `,W=`attribute vec2 aVertexPosition;
846
846
  attribute vec2 aTextureCoord;
847
847
 
848
848
  uniform mat3 projectionMatrix;
@@ -858,7 +858,7 @@ void main(void)
858
858
  vTextureCoord = aTextureCoord;
859
859
  vFilterCoord = vTextureCoord * inputSize.xy / outputFrame.zw;
860
860
  }
861
- `,Jt=Jt||{};Jt.stringify=function(){var t={"visit_linear-gradient":function(e){return t.visit_gradient(e)},"visit_repeating-linear-gradient":function(e){return t.visit_gradient(e)},"visit_radial-gradient":function(e){return t.visit_gradient(e)},"visit_repeating-radial-gradient":function(e){return t.visit_gradient(e)},visit_gradient:function(e){var r=t.visit(e.orientation);return r&&(r+=", "),e.type+"("+r+t.visit(e.colorStops)+")"},visit_shape:function(e){var r=e.value,i=t.visit(e.at),n=t.visit(e.style);return n&&(r+=" "+n),i&&(r+=" at "+i),r},"visit_default-radial":function(e){var r="",i=t.visit(e.at);return i&&(r+=i),r},"visit_extent-keyword":function(e){var r=e.value,i=t.visit(e.at);return i&&(r+=" at "+i),r},"visit_position-keyword":function(e){return e.value},visit_position:function(e){return t.visit(e.value.x)+" "+t.visit(e.value.y)},"visit_%":function(e){return e.value+"%"},visit_em:function(e){return e.value+"em"},visit_px:function(e){return e.value+"px"},visit_literal:function(e){return t.visit_color(e.value,e)},visit_hex:function(e){return t.visit_color("#"+e.value,e)},visit_rgb:function(e){return t.visit_color("rgb("+e.value.join(", ")+")",e)},visit_rgba:function(e){return t.visit_color("rgba("+e.value.join(", ")+")",e)},visit_color:function(e,r){var i=e,n=t.visit(r.length);return n&&(i+=" "+n),i},visit_angular:function(e){return e.value+"deg"},visit_directional:function(e){return"to "+e.value},visit_array:function(e){var r="",i=e.length;return e.forEach(function(n,s){r+=t.visit(n),s<i-1&&(r+=", ")}),r},visit:function(e){if(!e)return"";var r="";if(e instanceof Array)return t.visit_array(e,r);if(e.type){var i=t["visit_"+e.type];if(i)return i(e);throw Error("Missing visitor visit_"+e.type)}else throw Error("Invalid node.")}};return function(e){return t.visit(e)}}();var Jt=Jt||{};Jt.parse=function(){var t={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function r(R){var U=new Error(e+": "+R);throw U.source=e,U}function i(){var R=n();return e.length>0&&r("Invalid input not EOF"),R}function n(){return _(s)}function s(){return a("linear-gradient",t.linearGradient,u)||a("repeating-linear-gradient",t.repeatingLinearGradient,u)||a("radial-gradient",t.radialGradient,l)||a("repeating-radial-gradient",t.repeatingRadialGradient,l)}function a(R,U,X){return o(U,function(M){var O=X();return O&&($(t.comma)||r("Missing comma before color stops")),{type:R,orientation:O,colorStops:_(x)}})}function o(R,U){var X=$(R);if(X){$(t.startCall)||r("Missing (");var M=U(X);return $(t.endCall)||r("Missing )"),M}}function u(){return h()||d()}function h(){return C("directional",t.sideOrCorner,1)}function d(){return C("angular",t.angleValue,1)}function l(){var R,U=c(),X;return U&&(R=[],R.push(U),X=e,$(t.comma)&&(U=c(),U?R.push(U):e=X)),R}function c(){var R=f()||p();if(R)R.at=v();else{var U=m();if(U){R=U;var X=v();X&&(R.at=X)}else{var M=g();M&&(R={type:"default-radial",at:M})}}return R}function f(){var R=C("shape",/^(circle)/i,0);return R&&(R.style=E()||m()),R}function p(){var R=C("shape",/^(ellipse)/i,0);return R&&(R.style=F()||m()),R}function m(){return C("extent-keyword",t.extentKeywords,1)}function v(){if(C("position",/^at/,0)){var R=g();return R||r("Missing positioning value"),R}}function g(){var R=y();if(R.x||R.y)return{type:"position",value:R}}function y(){return{x:F(),y:F()}}function _(R){var U=R(),X=[];if(U)for(X.push(U);$(t.comma);)U=R(),U?X.push(U):r("One extra comma");return X}function x(){var R=T();return R||r("Expected color definition"),R.length=F(),R}function T(){return b()||A()||S()||w()}function w(){return C("literal",t.literalColor,0)}function b(){return C("hex",t.hexColor,1)}function S(){return o(t.rgbColor,function(){return{type:"rgb",value:_(I)}})}function A(){return o(t.rgbaColor,function(){return{type:"rgba",value:_(I)}})}function I(){return $(t.number)[1]}function F(){return C("%",t.percentageValue,1)||B()||E()}function B(){return C("position-keyword",t.positionKeywords,1)}function E(){return C("px",t.pixelValue,1)||C("em",t.emValue,1)}function C(R,U,X){var M=$(U);if(M)return{type:R,value:M[X]}}function $(R){var U,X;return X=/^[\n\r\t\s]+/.exec(e),X&&G(X[0].length),U=R.exec(e),U&&G(U[0].length),U}function G(R){e=e.substr(R)}return function(R){return e=R.toString(),i()}}();var g1=Jt.parse;Jt.stringify;var _c={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},yc={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function v1(t){var e,r=[],i=1,n;if(typeof t=="string")if(_c[t])r=_c[t].slice(),n="rgb";else if(t==="transparent")i=0,n="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var s=t.slice(1),a=s.length,o=a<=4;i=1,o?(r=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],a===4&&(i=parseInt(s[3]+s[3],16)/255)):(r=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],a===8&&(i=parseInt(s[6]+s[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),n="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var u=e[1],h=u==="rgb",s=u.replace(/a$/,"");n=s;var a=s==="cmyk"?4:s==="gray"?1:3;r=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,f){if(/%$/.test(c))return f===a?parseFloat(c)/100:s==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(s[f]==="h"){if(/deg$/.test(c))return parseFloat(c);if(yc[c]!==void 0)return yc[c]}return parseFloat(c)}),u===s&&r.push(1),i=h||r[a]===void 0?1:r[a],r=r.slice(0,a)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(r=t.match(/([0-9]+)/g).map(function(d){return parseFloat(d)}),n=t.match(/([a-z])/ig).join("").toLowerCase());else isNaN(t)?Array.isArray(t)||t.length?(r=[t[0],t[1],t[2]],n="rgb",i=t.length===4?t[3]:1):t instanceof Object&&(t.r!=null||t.red!=null||t.R!=null?(n="rgb",r=[t.r||t.red||t.R||0,t.g||t.green||t.G||0,t.b||t.blue||t.B||0]):(n="hsl",r=[t.h||t.hue||t.H||0,t.s||t.saturation||t.S||0,t.l||t.lightness||t.L||t.b||t.brightness]),i=t.a||t.alpha||t.opacity||1,t.opacity!=null&&(i/=100)):(n="rgb",r=[t>>>16,(t&65280)>>>8,t&255]);return{space:n,values:r,alpha:i}}var wa={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},Sa={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,a,o,u;if(r===0)return u=i*255,[u,u,u];i<.5?s=i*(1+r):s=i+r-i*r,n=2*i-s,o=[0,0,0];for(var h=0;h<3;h++)a=e+1/3*-(h-1),a<0?a++:a>1&&a--,6*a<1?u=n+(s-n)*6*a:2*a<1?u=s:3*a<2?u=n+(s-n)*(2/3-a)*6:u=n,o[h]=u*255;return o}};wa.hsl=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=s-n,o,u,h;return s===n?o=0:e===s?o=(r-i)/a:r===s?o=2+(i-e)/a:i===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),h=(n+s)/2,s===n?u=0:h<=.5?u=a/(s+n):u=a/(2-s-n),[o,u*100,h*100]};function _1(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments));var e,r=v1(t);if(!r.space)return[];const i=r.space[0]==="h"?Sa.min:wa.min,n=r.space[0]==="h"?Sa.max:wa.max;return e=Array(3),e[0]=Math.min(Math.max(r.values[0],i[0]),n[0]),e[1]=Math.min(Math.max(r.values[1],i[1]),n[1]),e[2]=Math.min(Math.max(r.values[2],i[2]),n[2]),r.space[0]==="h"&&(e=Sa.rgb(e)),e.push(Math.min(Math.max(r.alpha,0),1)),e}function xc(t){switch(typeof t){case"string":return y1(t);case"number":return en(t);default:return t}}function y1(t){const e=_1(t);if(!e)throw new Error(`Unable to parse color "${t}" as RGBA.`);return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function x1(t){const e=g1(R1(t));if(e.length===0)throw new Error("Invalid CSS gradient.");if(e.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=e[0],i=b1(r.type),n=T1(r.colorStops),s=C1(r.orientation);return{type:i,stops:n,angle:s}}function b1(t){const e={"linear-gradient":0,"radial-gradient":1};if(!(t in e))throw new Error(`Unsupported gradient type "${t}"`);return e[t]}function T1(t){const e=A1(t),r=[];for(let i=0;i<t.length;i++){const n=w1(t[i]);r.push({offset:e[i],color:n.slice(0,3),alpha:n[3]})}return r}function w1(t){return xc(S1(t))}function S1(t){switch(t.type){case"hex":return`#${t.value}`;case"literal":return t.value;default:return`${t.type}(${t.value.join(",")})`}}function A1(t){const e=[];for(let n=0;n<t.length;n++){const s=t[n];let a=-1;s.type==="literal"&&s.length&&"type"in s.length&&s.length.type==="%"&&"value"in s.length&&(a=parseFloat(s.length.value)/100),e.push(a)}const r=n=>{for(let s=n;s<e.length;s++)if(e[s]!==-1)return{indexDelta:s-n,offset:e[s]};return{indexDelta:e.length-1-n,offset:1}};let i=0;for(let n=0;n<e.length;n++){const s=e[n];if(s!==-1)i=s;else if(n===0)e[n]=0;else if(n+1===e.length)e[n]=1;else{const a=r(n),o=(a.offset-i)/(1+a.indexDelta);for(let u=0;u<=a.indexDelta;u++)e[n+u]=i+(u+1)*o;n+=a.indexDelta,i=e[n]}}return e.map(E1)}function E1(t){return t.toString().length>6?parseFloat(t.toString().substring(0,6)):t}function C1(t){if(typeof t>"u")return 0;if("type"in t&&"value"in t)switch(t.type){case"angular":return parseFloat(t.value);case"directional":return I1(t.value)}return 0}function I1(t){const e={left:270,top:0,bottom:180,right:90,"left top":315,"top left":315,"left bottom":225,"bottom left":225,"right top":45,"top right":45,"right bottom":135,"bottom right":135};if(!(t in e))throw new Error(`Unsupported directional value "${t}"`);return e[t]}function R1(t){let e=t.replace(/\s{2,}/gu," ");return e=e.replace(/;/g,""),e=e.replace(/ ,/g,","),e=e.replace(/\( /g,"("),e=e.replace(/ \)/g,")"),e.trim()}var P1=Object.defineProperty,M1=Object.defineProperties,F1=Object.getOwnPropertyDescriptors,bc=Object.getOwnPropertySymbols,O1=Object.prototype.hasOwnProperty,N1=Object.prototype.propertyIsEnumerable,Tc=(t,e,r)=>e in t?P1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Aa=(t,e)=>{for(var r in e||(e={}))O1.call(e,r)&&Tc(t,r,e[r]);if(bc)for(var r of bc(e))N1.call(e,r)&&Tc(t,r,e[r]);return t},k1=(t,e)=>M1(t,F1(e));const wc=90;function L1(t){return[...t].sort((e,r)=>e.offset-r.offset)}const Ea=class extends ue{constructor(e){e&&"css"in e&&(e=k1(Aa({},x1(e.css||"")),{alpha:e.alpha,maxColors:e.maxColors}));const r=Aa(Aa({},Ea.defaults),e);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(m1,p1),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(e){const r=L1(e),i=new Float32Array(r.length*3),n=0,s=1,a=2;for(let o=0;o<r.length;o++){const u=xc(r[o].color),h=o*3;i[h+n]=u[n],i[h+s]=u[s],i[h+a]=u[a]}this.uniforms.uColors=i,this.uniforms.uOffsets=r.map(o=>o.offset),this.uniforms.uAlphas=r.map(o=>o.alpha),this.uniforms.uNumStops=r.length,this._stops=r}set type(e){this.uniforms.uType=e}get type(){return this.uniforms.uType}set angle(e){this.uniforms.uAngle=e-wc}get angle(){return this.uniforms.uAngle+wc}set alpha(e){this.uniforms.uAlpha=e}get alpha(){return this.uniforms.uAlpha}set maxColors(e){this.uniforms.uMaxColors=e}get maxColors(){return this.uniforms.uMaxColors}};let An=Ea;An.LINEAR=0,An.RADIAL=1,An.CONIC=2,An.defaults={type:Ea.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var D1=`attribute vec2 aVertexPosition;
861
+ `,v$1=v$1||{};v$1.stringify=function(){var C={"visit_linear-gradient":function(E){return C.visit_gradient(E)},"visit_repeating-linear-gradient":function(E){return C.visit_gradient(E)},"visit_radial-gradient":function(E){return C.visit_gradient(E)},"visit_repeating-radial-gradient":function(E){return C.visit_gradient(E)},visit_gradient:function(E){var I=C.visit(E.orientation);return I&&(I+=", "),E.type+"("+I+C.visit(E.colorStops)+")"},visit_shape:function(E){var I=E.value,B=C.visit(E.at),U=C.visit(E.style);return U&&(I+=" "+U),B&&(I+=" at "+B),I},"visit_default-radial":function(E){var I="",B=C.visit(E.at);return B&&(I+=B),I},"visit_extent-keyword":function(E){var I=E.value,B=C.visit(E.at);return B&&(I+=" at "+B),I},"visit_position-keyword":function(E){return E.value},visit_position:function(E){return C.visit(E.value.x)+" "+C.visit(E.value.y)},"visit_%":function(E){return E.value+"%"},visit_em:function(E){return E.value+"em"},visit_px:function(E){return E.value+"px"},visit_literal:function(E){return C.visit_color(E.value,E)},visit_hex:function(E){return C.visit_color("#"+E.value,E)},visit_rgb:function(E){return C.visit_color("rgb("+E.value.join(", ")+")",E)},visit_rgba:function(E){return C.visit_color("rgba("+E.value.join(", ")+")",E)},visit_color:function(E,I){var B=E,U=C.visit(I.length);return U&&(B+=" "+U),B},visit_angular:function(E){return E.value+"deg"},visit_directional:function(E){return"to "+E.value},visit_array:function(E){var I="",B=E.length;return E.forEach(function(U,V){I+=C.visit(U),V<B-1&&(I+=", ")}),I},visit:function(E){if(!E)return"";var I="";if(E instanceof Array)return C.visit_array(E,I);if(E.type){var B=C["visit_"+E.type];if(B)return B(E);throw Error("Missing visitor visit_"+E.type)}else throw Error("Invalid node.")}};return function(E){return C.visit(E)}}();var v$1=v$1||{};v$1.parse=function(){var C={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},E="";function I(De){var Fe=new Error(E+": "+De);throw Fe.source=E,Fe}function B(){var De=U();return E.length>0&&I("Invalid input not EOF"),De}function U(){return Pe(V)}function V(){return X("linear-gradient",C.linearGradient,K)||X("repeating-linear-gradient",C.repeatingLinearGradient,K)||X("radial-gradient",C.radialGradient,Z)||X("repeating-radial-gradient",C.repeatingRadialGradient,Z)}function X(De,Fe,ke){return Y(Fe,function(Ge){var Be=ke();return Be&&(je(C.comma)||I("Missing comma before color stops")),{type:De,orientation:Be,colorStops:Pe(Ie)}})}function Y(De,Fe){var ke=je(De);if(ke){je(C.startCall)||I("Missing (");var Ge=Fe(ke);return je(C.endCall)||I("Missing )"),Ge}}function K(){return J()||xe()}function J(){return He("directional",C.sideOrCorner,1)}function xe(){return He("angular",C.angleValue,1)}function Z(){var De,Fe=_e(),ke;return Fe&&(De=[],De.push(Fe),ke=E,je(C.comma)&&(Fe=_e(),Fe?De.push(Fe):E=ke)),De}function _e(){var De=Se()||Ee();if(De)De.at=Re();else{var Fe=Ae();if(Fe){De=Fe;var ke=Re();ke&&(De.at=ke)}else{var Ge=Te();Ge&&(De={type:"default-radial",at:Ge})}}return De}function Se(){var De=He("shape",/^(circle)/i,0);return De&&(De.style=ze()||Ae()),De}function Ee(){var De=He("shape",/^(ellipse)/i,0);return De&&(De.style=Ue()||Ae()),De}function Ae(){return He("extent-keyword",C.extentKeywords,1)}function Re(){if(He("position",/^at/,0)){var De=Te();return De||I("Missing positioning value"),De}}function Te(){var De=we();if(De.x||De.y)return{type:"position",value:De}}function we(){return{x:Ue(),y:Ue()}}function Pe(De){var Fe=De(),ke=[];if(Fe)for(ke.push(Fe);je(C.comma);)Fe=De(),Fe?ke.push(Fe):I("One extra comma");return ke}function Ie(){var De=Me();return De||I("Expected color definition"),De.length=Ue(),De}function Me(){return Le()||Ve()||Ne()||Oe()}function Oe(){return He("literal",C.literalColor,0)}function Le(){return He("hex",C.hexColor,1)}function Ne(){return Y(C.rgbColor,function(){return{type:"rgb",value:Pe(Xe)}})}function Ve(){return Y(C.rgbaColor,function(){return{type:"rgba",value:Pe(Xe)}})}function Xe(){return je(C.number)[1]}function Ue(){return He("%",C.percentageValue,1)||We()||ze()}function We(){return He("position-keyword",C.positionKeywords,1)}function ze(){return He("px",C.pixelValue,1)||He("em",C.emValue,1)}function He(De,Fe,ke){var Ge=je(Fe);if(Ge)return{type:De,value:Ge[ke]}}function je(De){var Fe,ke;return ke=/^[\n\r\t\s]+/.exec(E),ke&&$e(ke[0].length),Fe=De.exec(E),Fe&&$e(Fe[0].length),Fe}function $e(De){E=E.substr(De)}return function(De){return E=De.toString(),B()}}();var ee=v$1.parse;v$1.stringify;var R={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},G={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function te(C){var E,I=[],B=1,U;if(typeof C=="string")if(R[C])I=R[C].slice(),U="rgb";else if(C==="transparent")B=0,U="rgb",I=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(C)){var V=C.slice(1),X=V.length,Y=X<=4;B=1,Y?(I=[parseInt(V[0]+V[0],16),parseInt(V[1]+V[1],16),parseInt(V[2]+V[2],16)],X===4&&(B=parseInt(V[3]+V[3],16)/255)):(I=[parseInt(V[0]+V[1],16),parseInt(V[2]+V[3],16),parseInt(V[4]+V[5],16)],X===8&&(B=parseInt(V[6]+V[7],16)/255)),I[0]||(I[0]=0),I[1]||(I[1]=0),I[2]||(I[2]=0),U="rgb"}else if(E=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(C)){var K=E[1],J=K==="rgb",V=K.replace(/a$/,"");U=V;var X=V==="cmyk"?4:V==="gray"?1:3;I=E[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(_e,Se){if(/%$/.test(_e))return Se===X?parseFloat(_e)/100:V==="rgb"?parseFloat(_e)*255/100:parseFloat(_e);if(V[Se]==="h"){if(/deg$/.test(_e))return parseFloat(_e);if(G[_e]!==void 0)return G[_e]}return parseFloat(_e)}),K===V&&I.push(1),B=J||I[X]===void 0?1:I[X],I=I.slice(0,X)}else C.length>10&&/[0-9](?:\s|\/)/.test(C)&&(I=C.match(/([0-9]+)/g).map(function(xe){return parseFloat(xe)}),U=C.match(/([a-z])/ig).join("").toLowerCase());else isNaN(C)?Array.isArray(C)||C.length?(I=[C[0],C[1],C[2]],U="rgb",B=C.length===4?C[3]:1):C instanceof Object&&(C.r!=null||C.red!=null||C.R!=null?(U="rgb",I=[C.r||C.red||C.R||0,C.g||C.green||C.G||0,C.b||C.blue||C.B||0]):(U="hsl",I=[C.h||C.hue||C.H||0,C.s||C.saturation||C.S||0,C.l||C.lightness||C.L||C.b||C.brightness]),B=C.a||C.alpha||C.opacity||1,C.opacity!=null&&(B/=100)):(U="rgb",I=[C>>>16,(C&65280)>>>8,C&255]);return{space:U,values:I,alpha:B}}var A={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},S={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(C){var E=C[0]/360,I=C[1]/100,B=C[2]/100,U,V,X,Y,K;if(I===0)return K=B*255,[K,K,K];B<.5?V=B*(1+I):V=B+I-B*I,U=2*B-V,Y=[0,0,0];for(var J=0;J<3;J++)X=E+1/3*-(J-1),X<0?X++:X>1&&X--,6*X<1?K=U+(V-U)*6*X:2*X<1?K=V:3*X<2?K=U+(V-U)*(2/3-X)*6:K=U,Y[J]=K*255;return Y}};A.hsl=function(C){var E=C[0]/255,I=C[1]/255,B=C[2]/255,U=Math.min(E,I,B),V=Math.max(E,I,B),X=V-U,Y,K,J;return V===U?Y=0:E===V?Y=(I-B)/X:I===V?Y=2+(B-E)/X:B===V&&(Y=4+(E-I)/X),Y=Math.min(Y*60,360),Y<0&&(Y+=360),J=(U+V)/2,V===U?K=0:J<=.5?K=X/(V+U):K=X/(2-V-U),[Y,K*100,J*100]};function re(C){Array.isArray(C)&&C.raw&&(C=String.raw(...arguments));var E,I=te(C);if(!I.space)return[];const B=I.space[0]==="h"?S.min:A.min,U=I.space[0]==="h"?S.max:A.max;return E=Array(3),E[0]=Math.min(Math.max(I.values[0],B[0]),U[0]),E[1]=Math.min(Math.max(I.values[1],B[1]),U[1]),E[2]=Math.min(Math.max(I.values[2],B[2]),U[2]),I.space[0]==="h"&&(E=S.rgb(E)),E.push(Math.min(Math.max(I.alpha,0),1)),E}function L(C){switch(typeof C){case"string":return ne(C);case"number":return hex2rgb(C);default:return C}}function ne(C){const E=re(C);if(!E)throw new Error(`Unable to parse color "${C}" as RGBA.`);return[E[0]/255,E[1]/255,E[2]/255,E[3]]}function ie(C){const E=ee(ge(C));if(E.length===0)throw new Error("Invalid CSS gradient.");if(E.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const I=E[0],B=oe(I.type),U=ae(I.colorStops),V=ce(I.orientation);return{type:B,stops:U,angle:V}}function oe(C){const E={"linear-gradient":0,"radial-gradient":1};if(!(C in E))throw new Error(`Unsupported gradient type "${C}"`);return E[C]}function ae(C){const E=ue(C),I=[];for(let B=0;B<C.length;B++){const U=le(C[B]);I.push({offset:E[B],color:U.slice(0,3),alpha:U[3]})}return I}function le(C){return L(se(C))}function se(C){switch(C.type){case"hex":return`#${C.value}`;case"literal":return C.value;default:return`${C.type}(${C.value.join(",")})`}}function ue(C){const E=[];for(let U=0;U<C.length;U++){const V=C[U];let X=-1;V.type==="literal"&&V.length&&"type"in V.length&&V.length.type==="%"&&"value"in V.length&&(X=parseFloat(V.length.value)/100),E.push(X)}const I=U=>{for(let V=U;V<E.length;V++)if(E[V]!==-1)return{indexDelta:V-U,offset:E[V]};return{indexDelta:E.length-1-U,offset:1}};let B=0;for(let U=0;U<E.length;U++){const V=E[U];if(V!==-1)B=V;else if(U===0)E[U]=0;else if(U+1===E.length)E[U]=1;else{const X=I(U),Y=(X.offset-B)/(1+X.indexDelta);for(let K=0;K<=X.indexDelta;K++)E[U+K]=B+(K+1)*Y;U+=X.indexDelta,B=E[U]}}return E.map(fe)}function fe(C){return C.toString().length>6?parseFloat(C.toString().substring(0,6)):C}function ce(C){if(typeof C>"u")return 0;if("type"in C&&"value"in C)switch(C.type){case"angular":return parseFloat(C.value);case"directional":return pe(C.value)}return 0}function pe(C){const E={left:270,top:0,bottom:180,right:90,"left top":315,"top left":315,"left bottom":225,"bottom left":225,"right top":45,"top right":45,"right bottom":135,"bottom right":135};if(!(C in E))throw new Error(`Unsupported directional value "${C}"`);return E[C]}function ge(C){let E=C.replace(/\s{2,}/gu," ");return E=E.replace(/;/g,""),E=E.replace(/ ,/g,","),E=E.replace(/\( /g,"("),E=E.replace(/ \)/g,")"),E.trim()}var he=Object.defineProperty,me=Object.defineProperties,de=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,z$1=(C,E,I)=>E in C?he(C,E,{enumerable:!0,configurable:!0,writable:!0,value:I}):C[E]=I,k=(C,E)=>{for(var I in E||(E={}))ve.call(E,I)&&z$1(C,I,E[I]);if(N)for(var I of N(E))ye.call(E,I)&&z$1(C,I,E[I]);return C},be=(C,E)=>me(C,de(E));const D=90;function Ce(C){return[...C].sort((E,I)=>E.offset-I.offset)}const P$1=class extends Filter{constructor(E){E&&"css"in E&&(E=be(k({},ie(E.css||"")),{alpha:E.alpha,maxColors:E.maxColors}));const I=k(k({},P$1.defaults),E);if(!I.stops||I.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(W,Q),this._stops=[],this.autoFit=!1,Object.assign(this,I)}get stops(){return this._stops}set stops(E){const I=Ce(E),B=new Float32Array(I.length*3),U=0,V=1,X=2;for(let Y=0;Y<I.length;Y++){const K=L(I[Y].color),J=Y*3;B[J+U]=K[U],B[J+V]=K[V],B[J+X]=K[X]}this.uniforms.uColors=B,this.uniforms.uOffsets=I.map(Y=>Y.offset),this.uniforms.uAlphas=I.map(Y=>Y.alpha),this.uniforms.uNumStops=I.length,this._stops=I}set type(E){this.uniforms.uType=E}get type(){return this.uniforms.uType}set angle(E){this.uniforms.uAngle=E-D}get angle(){return this.uniforms.uAngle+D}set alpha(E){this.uniforms.uAlpha=E}get alpha(){return this.uniforms.uAlpha}set maxColors(E){this.uniforms.uMaxColors=E}get maxColors(){return this.uniforms.uMaxColors}};let y=P$1;y.LINEAR=0,y.RADIAL=1,y.CONIC=2,y.defaults={type:P$1.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var o$3=`attribute vec2 aVertexPosition;
862
862
  attribute vec2 aTextureCoord;
863
863
 
864
864
  uniform mat3 projectionMatrix;
@@ -869,7 +869,7 @@ void main(void)
869
869
  {
870
870
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
871
871
  vTextureCoord = aTextureCoord;
872
- }`,B1=`precision mediump float;
872
+ }`,x$1=`precision mediump float;
873
873
 
874
874
  varying mediump vec2 vTextureCoord;
875
875
 
@@ -898,7 +898,7 @@ void main(void)
898
898
 
899
899
  gl_FragColor.a = c22.a;
900
900
  }
901
- `;let U1=class extends ue{constructor(e,r=200,i=200){super(D1,B1),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),e!==void 0&&(this.matrix=e),this.width=r,this.height=i}get matrix(){return this.uniforms.matrix}set matrix(e){e.forEach((r,i)=>{this.uniforms.matrix[i]=r})}get width(){return 1/this.uniforms.texelSize[0]}set width(e){this.uniforms.texelSize[0]=1/e}get height(){return 1/this.uniforms.texelSize[1]}set height(e){this.uniforms.texelSize[1]=1/e}};var $1=`attribute vec2 aVertexPosition;
901
+ `;let n$3=class extends Filter{constructor(E,I=200,B=200){super(o$3,x$1),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),E!==void 0&&(this.matrix=E),this.width=I,this.height=B}get matrix(){return this.uniforms.matrix}set matrix(E){E.forEach((I,B)=>{this.uniforms.matrix[B]=I})}get width(){return 1/this.uniforms.texelSize[0]}set width(E){this.uniforms.texelSize[0]=1/E}get height(){return 1/this.uniforms.texelSize[1]}set height(E){this.uniforms.texelSize[1]=1/E}};var a$4=`attribute vec2 aVertexPosition;
902
902
  attribute vec2 aTextureCoord;
903
903
 
904
904
  uniform mat3 projectionMatrix;
@@ -909,7 +909,7 @@ void main(void)
909
909
  {
910
910
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
911
911
  vTextureCoord = aTextureCoord;
912
- }`,G1=`varying vec2 vTextureCoord;
912
+ }`,g=`varying vec2 vTextureCoord;
913
913
  uniform sampler2D uSampler;
914
914
 
915
915
  uniform vec4 filterArea;
@@ -975,7 +975,7 @@ void main(void)
975
975
 
976
976
  gl_FragColor.rgb = rgb;
977
977
  }
978
- `;const Sc=class extends ue{constructor(e){super($1,G1),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Sc.defaults,e)}apply(e,r,i,n){const{width:s,height:a}=r.filterFrame;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=a,this.uniforms.seed=this.seed,this.uniforms.time=this.time,e.applyFilter(this,r,i,n)}set curvature(e){this.uniforms.curvature=e}get curvature(){return this.uniforms.curvature}set lineWidth(e){this.uniforms.lineWidth=e}get lineWidth(){return this.uniforms.lineWidth}set lineContrast(e){this.uniforms.lineContrast=e}get lineContrast(){return this.uniforms.lineContrast}set verticalLine(e){this.uniforms.verticalLine=e}get verticalLine(){return this.uniforms.verticalLine}set noise(e){this.uniforms.noise=e}get noise(){return this.uniforms.noise}set noiseSize(e){this.uniforms.noiseSize=e}get noiseSize(){return this.uniforms.noiseSize}set vignetting(e){this.uniforms.vignetting=e}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(e){this.uniforms.vignettingAlpha=e}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(e){this.uniforms.vignettingBlur=e}get vignettingBlur(){return this.uniforms.vignettingBlur}};let z1=Sc;z1.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var j1=`attribute vec2 aVertexPosition;
978
+ `;const e$1=class extends Filter{constructor(E){super(a$4,g),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,e$1.defaults,E)}apply(E,I,B,U){const{width:V,height:X}=I.filterFrame;this.uniforms.dimensions[0]=V,this.uniforms.dimensions[1]=X,this.uniforms.seed=this.seed,this.uniforms.time=this.time,E.applyFilter(this,I,B,U)}set curvature(E){this.uniforms.curvature=E}get curvature(){return this.uniforms.curvature}set lineWidth(E){this.uniforms.lineWidth=E}get lineWidth(){return this.uniforms.lineWidth}set lineContrast(E){this.uniforms.lineContrast=E}get lineContrast(){return this.uniforms.lineContrast}set verticalLine(E){this.uniforms.verticalLine=E}get verticalLine(){return this.uniforms.verticalLine}set noise(E){this.uniforms.noise=E}get noise(){return this.uniforms.noise}set noiseSize(E){this.uniforms.noiseSize=E}get noiseSize(){return this.uniforms.noiseSize}set vignetting(E){this.uniforms.vignetting=E}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(E){this.uniforms.vignettingAlpha=E}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(E){this.uniforms.vignettingBlur=E}get vignettingBlur(){return this.uniforms.vignettingBlur}};let t$1=e$1;t$1.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var w=`attribute vec2 aVertexPosition;
979
979
  attribute vec2 aTextureCoord;
980
980
 
981
981
  uniform mat3 projectionMatrix;
@@ -986,7 +986,7 @@ void main(void)
986
986
  {
987
987
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
988
988
  vTextureCoord = aTextureCoord;
989
- }`,H1=`varying vec2 vTextureCoord;
989
+ }`,O=`varying vec2 vTextureCoord;
990
990
  uniform sampler2D uSampler;
991
991
  uniform float alpha;
992
992
  uniform vec3 color;
@@ -1004,7 +1004,7 @@ void main(void){
1004
1004
  sample *= alpha;
1005
1005
 
1006
1006
  gl_FragColor = sample;
1007
- }`,V1=Object.defineProperty,Ac=Object.getOwnPropertySymbols,X1=Object.prototype.hasOwnProperty,W1=Object.prototype.propertyIsEnumerable,Ec=(t,e,r)=>e in t?V1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cc=(t,e)=>{for(var r in e||(e={}))X1.call(e,r)&&Ec(t,r,e[r]);if(Ac)for(var r of Ac(e))W1.call(e,r)&&Ec(t,r,e[r]);return t};const Ca=class extends ue{constructor(e){super(),this.angle=45,this._distance=5,this._resolution=Q.FILTER_RESOLUTION;const r=e?Cc(Cc({},Ca.defaults),e):Ca.defaults,{kernels:i,blur:n,quality:s,pixelSize:a,resolution:o}=r;this._offset=new Zt(this._updatePadding,this),this._tintFilter=new ue(j1,H1),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=o,this._blurFilter=i?new di(i):new di(n,s),this.pixelSize=a,this.resolution=o;const{shadowOnly:u,rotation:h,distance:d,offset:l,alpha:c,color:f}=r;this.shadowOnly=u,h!==void 0&&d!==void 0?(this.rotation=h,this.distance=d):this.offset=l,this.alpha=c,this.color=f}apply(e,r,i,n){const s=e.getFilterTexture();this._tintFilter.apply(e,r,s,1),this._blurFilter.apply(e,s,i,n),this.shadowOnly!==!0&&e.applyFilter(this,r,i,0),e.returnFilterTexture(s)}_updatePadding(){const e=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=e+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(e){this._offset.copyFrom(e),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(e){this._resolution=e,this._tintFilter&&(this._tintFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)}get distance(){return this._distance}set distance(e){re("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=e,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/ai}set rotation(e){re("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=e*ai,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(e){this._tintFilter.uniforms.alpha=e}get color(){return Ks(this._tintFilter.uniforms.color)}set color(e){en(e,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get blur(){return this._blurFilter.blur}set blur(e){this._blurFilter.blur=e,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){this._blurFilter.pixelSize=e}};let q1=Ca;q1.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:Q.FILTER_RESOLUTION};var Y1=`attribute vec2 aVertexPosition;
1007
+ }`,P=Object.defineProperty,c$4=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,_=(C,E,I)=>E in C?P(C,E,{enumerable:!0,configurable:!0,writable:!0,value:I}):C[E]=I,b=(C,E)=>{for(var I in E||(E={}))T.call(E,I)&&_(C,I,E[I]);if(c$4)for(var I of c$4(E))z.call(E,I)&&_(C,I,E[I]);return C};const o$2=class extends Filter{constructor(E){super(),this.angle=45,this._distance=5,this._resolution=settings.FILTER_RESOLUTION;const I=E?b(b({},o$2.defaults),E):o$2.defaults,{kernels:B,blur:U,quality:V,pixelSize:X,resolution:Y}=I;this._offset=new ObservablePoint(this._updatePadding,this),this._tintFilter=new Filter(w,O),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=Y,this._blurFilter=B?new _$1(B):new _$1(U,V),this.pixelSize=X,this.resolution=Y;const{shadowOnly:K,rotation:J,distance:xe,offset:Z,alpha:_e,color:Se}=I;this.shadowOnly=K,J!==void 0&&xe!==void 0?(this.rotation=J,this.distance=xe):this.offset=Z,this.alpha=_e,this.color=Se}apply(E,I,B,U){const V=E.getFilterTexture();this._tintFilter.apply(E,I,V,1),this._blurFilter.apply(E,V,B,U),this.shadowOnly!==!0&&E.applyFilter(this,I,B,0),E.returnFilterTexture(V)}_updatePadding(){const E=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=E+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(E){this._offset.copyFrom(E),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(E){this._resolution=E,this._tintFilter&&(this._tintFilter.resolution=E),this._blurFilter&&(this._blurFilter.resolution=E)}get distance(){return this._distance}set distance(E){deprecation("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=E,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/DEG_TO_RAD}set rotation(E){deprecation("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=E*DEG_TO_RAD,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(E){this._tintFilter.uniforms.alpha=E}get color(){return rgb2hex(this._tintFilter.uniforms.color)}set color(E){hex2rgb(E,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(E){this._blurFilter.kernels=E}get blur(){return this._blurFilter.blur}set blur(E){this._blurFilter.blur=E,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(E){this._blurFilter.quality=E}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(E){this._blurFilter.pixelSize=E}};let F=o$2;F.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:settings.FILTER_RESOLUTION};var p$1=`attribute vec2 aVertexPosition;
1008
1008
  attribute vec2 aTextureCoord;
1009
1009
 
1010
1010
  uniform mat3 projectionMatrix;
@@ -1015,7 +1015,7 @@ void main(void)
1015
1015
  {
1016
1016
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1017
1017
  vTextureCoord = aTextureCoord;
1018
- }`,K1=`// precision highp float;
1018
+ }`,M=`// precision highp float;
1019
1019
 
1020
1020
  varying vec2 vTextureCoord;
1021
1021
  uniform sampler2D uSampler;
@@ -1111,7 +1111,7 @@ void main(void)
1111
1111
  gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;
1112
1112
  gl_FragColor.a = texture2D(uSampler, coord).a;
1113
1113
  }
1114
- `;const Ia=class extends ue{constructor(e){super(Y1,K1),this.offset=100,this.fillMode=Ia.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=ie.from(this._canvas,{scaleMode:dt.NEAREST}),Object.assign(this,Ia.defaults,e)}apply(e,r,i,n){const{width:s,height:a}=r.filterFrame;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/s,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,e.applyFilter(this,r,i,n)}_randomizeSizes(){const e=this._sizes,r=this._slices-1,i=this.sampleSize,n=Math.min(this.minSize/i,.9/this._slices);if(this.average){const s=this._slices;let a=1;for(let o=0;o<r;o++){const u=a/(s-o),h=Math.max(u*(1-Math.random()*.6),n);e[o]=h,a-=h}e[r]=a}else{let s=1;const a=Math.sqrt(1/this._slices);for(let o=0;o<r;o++){const u=Math.max(a*s*Math.random(),n);e[o]=u,s-=u}e[r]=s}this.shuffle()}shuffle(){const e=this._sizes,r=this._slices-1;for(let i=r;i>0;i--){const n=Math.random()*i>>0,s=e[i];e[i]=e[n],e[n]=s}}_randomizeOffsets(){for(let e=0;e<this._slices;e++)this._offsets[e]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const e=this.sampleSize,r=this.texture,i=this._canvas.getContext("2d");i.clearRect(0,0,8,e);let n,s=0;for(let a=0;a<this._slices;a++){n=Math.floor(this._offsets[a]*256);const o=this._sizes[a]*e,u=n>0?n:0,h=n<0?-n:0;i.fillStyle=`rgba(${u}, ${h}, 0, 1)`,i.fillRect(0,s>>0,e,o+1>>0),s+=o}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(e){const r=Math.min(this._slices,e.length);for(let i=0;i<r;i++)this._sizes[i]=e[i]}get sizes(){return this._sizes}set offsets(e){const r=Math.min(this._slices,e.length);for(let i=0;i<r;i++)this._offsets[i]=e[i]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(e){this._slices!==e&&(this._slices=e,this.uniforms.slices=e,this._sizes=this.uniforms.slicesWidth=new Float32Array(e),this._offsets=this.uniforms.slicesOffset=new Float32Array(e),this.refresh())}get direction(){return this._direction}set direction(e){if(this._direction===e)return;this._direction=e;const r=e*ai;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(e){this.uniforms.red=e}get green(){return this.uniforms.green}set green(e){this.uniforms.green=e}get blue(){return this.uniforms.blue}set blue(e){this.uniforms.blue=e}destroy(){var e;(e=this.texture)==null||e.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let Fr=Ia;Fr.defaults={slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},Fr.TRANSPARENT=0,Fr.ORIGINAL=1,Fr.LOOP=2,Fr.CLAMP=3,Fr.MIRROR=4;var Z1=`attribute vec2 aVertexPosition;
1114
+ `;const c$3=class extends Filter{constructor(E){super(p$1,M),this.offset=100,this.fillMode=c$3.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=Texture.from(this._canvas,{scaleMode:SCALE_MODES.NEAREST}),Object.assign(this,c$3.defaults,E)}apply(E,I,B,U){const{width:V,height:X}=I.filterFrame;this.uniforms.dimensions[0]=V,this.uniforms.dimensions[1]=X,this.uniforms.aspect=X/V,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,E.applyFilter(this,I,B,U)}_randomizeSizes(){const E=this._sizes,I=this._slices-1,B=this.sampleSize,U=Math.min(this.minSize/B,.9/this._slices);if(this.average){const V=this._slices;let X=1;for(let Y=0;Y<I;Y++){const K=X/(V-Y),J=Math.max(K*(1-Math.random()*.6),U);E[Y]=J,X-=J}E[I]=X}else{let V=1;const X=Math.sqrt(1/this._slices);for(let Y=0;Y<I;Y++){const K=Math.max(X*V*Math.random(),U);E[Y]=K,V-=K}E[I]=V}this.shuffle()}shuffle(){const E=this._sizes,I=this._slices-1;for(let B=I;B>0;B--){const U=Math.random()*B>>0,V=E[B];E[B]=E[U],E[U]=V}}_randomizeOffsets(){for(let E=0;E<this._slices;E++)this._offsets[E]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const E=this.sampleSize,I=this.texture,B=this._canvas.getContext("2d");B.clearRect(0,0,8,E);let U,V=0;for(let X=0;X<this._slices;X++){U=Math.floor(this._offsets[X]*256);const Y=this._sizes[X]*E,K=U>0?U:0,J=U<0?-U:0;B.fillStyle=`rgba(${K}, ${J}, 0, 1)`,B.fillRect(0,V>>0,E,Y+1>>0),V+=Y}I.baseTexture.update(),this.uniforms.displacementMap=I}set sizes(E){const I=Math.min(this._slices,E.length);for(let B=0;B<I;B++)this._sizes[B]=E[B]}get sizes(){return this._sizes}set offsets(E){const I=Math.min(this._slices,E.length);for(let B=0;B<I;B++)this._offsets[B]=E[B]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(E){this._slices!==E&&(this._slices=E,this.uniforms.slices=E,this._sizes=this.uniforms.slicesWidth=new Float32Array(E),this._offsets=this.uniforms.slicesOffset=new Float32Array(E),this.refresh())}get direction(){return this._direction}set direction(E){if(this._direction===E)return;this._direction=E;const I=E*DEG_TO_RAD;this.uniforms.sinDir=Math.sin(I),this.uniforms.cosDir=Math.cos(I)}get red(){return this.uniforms.red}set red(E){this.uniforms.red=E}get green(){return this.uniforms.green}set green(E){this.uniforms.green=E}get blue(){return this.uniforms.blue}set blue(E){this.uniforms.blue=E}destroy(){var E;(E=this.texture)==null||E.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let l$4=c$3;l$4.defaults={slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},l$4.TRANSPARENT=0,l$4.ORIGINAL=1,l$4.LOOP=2,l$4.CLAMP=3,l$4.MIRROR=4;var f$3=`attribute vec2 aVertexPosition;
1115
1115
  attribute vec2 aTextureCoord;
1116
1116
 
1117
1117
  uniform mat3 projectionMatrix;
@@ -1122,7 +1122,7 @@ void main(void)
1122
1122
  {
1123
1123
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1124
1124
  vTextureCoord = aTextureCoord;
1125
- }`,Q1=`varying vec2 vTextureCoord;
1125
+ }`,p=`varying vec2 vTextureCoord;
1126
1126
  varying vec4 vColor;
1127
1127
 
1128
1128
  uniform sampler2D uSampler;
@@ -1188,7 +1188,7 @@ void main(void) {
1188
1188
  gl_FragColor = innerColor + outerGlowColor;
1189
1189
  }
1190
1190
  }
1191
- `;const Ic=class extends ue{constructor(t){const e=Object.assign({},Ic.defaults,t),{outerStrength:r,innerStrength:i,color:n,knockout:s,quality:a,alpha:o}=e,u=Math.round(e.distance);super(Z1,Q1.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/a/u).toFixed(7)}`).replace(/__DIST__/gi,`${u.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:n,outerStrength:r,innerStrength:i,padding:u,knockout:s,alpha:o})}get color(){return Ks(this.uniforms.glowColor)}set color(t){en(t,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(t){this.uniforms.outerStrength=t}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(t){this.uniforms.innerStrength=t}get knockout(){return this.uniforms.knockout}set knockout(t){this.uniforms.knockout=t}get alpha(){return this.uniforms.alpha}set alpha(t){this.uniforms.alpha=t}};let J1=Ic;J1.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var eT=`attribute vec2 aVertexPosition;
1191
+ `;const e=class extends Filter{constructor(C){const E=Object.assign({},e.defaults,C),{outerStrength:I,innerStrength:B,color:U,knockout:V,quality:X,alpha:Y}=E,K=Math.round(E.distance);super(f$3,p.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/X/K).toFixed(7)}`).replace(/__DIST__/gi,`${K.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:U,outerStrength:I,innerStrength:B,padding:K,knockout:V,alpha:Y})}get color(){return rgb2hex(this.uniforms.glowColor)}set color(C){hex2rgb(C,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(C){this.uniforms.outerStrength=C}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(C){this.uniforms.innerStrength=C}get knockout(){return this.uniforms.knockout}set knockout(C){this.uniforms.knockout=C}get alpha(){return this.uniforms.alpha}set alpha(C){this.uniforms.alpha=C}};let l$3=e;l$3.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var v=`attribute vec2 aVertexPosition;
1192
1192
  attribute vec2 aTextureCoord;
1193
1193
 
1194
1194
  uniform mat3 projectionMatrix;
@@ -1199,7 +1199,7 @@ void main(void)
1199
1199
  {
1200
1200
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1201
1201
  vTextureCoord = aTextureCoord;
1202
- }`,tT=`vec3 mod289(vec3 x)
1202
+ }`,f$2=`vec3 mod289(vec3 x)
1203
1203
  {
1204
1204
  return x - floor(x * (1.0 / 289.0)) * 289.0;
1205
1205
  }
@@ -1294,7 +1294,7 @@ float turb(vec3 P, vec3 rep, float lacunarity, float gain)
1294
1294
  }
1295
1295
  return abs(sum);
1296
1296
  }
1297
- `,rT=`varying vec2 vTextureCoord;
1297
+ `,x=`varying vec2 vTextureCoord;
1298
1298
  uniform sampler2D uSampler;
1299
1299
  uniform vec4 filterArea;
1300
1300
  uniform vec2 dimensions;
@@ -1339,7 +1339,7 @@ void main(void) {
1339
1339
  gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;
1340
1340
 
1341
1341
  }
1342
- `;const Rc=class extends ue{constructor(e){super(eT,rT.replace("${perlin}",tT)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(Rc.defaults,e);this._angleLight=new me,this.angle=r.angle,this.gain=r.gain,this.lacunarity=r.lacunarity,this.alpha=r.alpha,this.parallel=r.parallel,this.center=r.center,this.time=r.time}apply(e,r,i,n){const{width:s,height:a}=r.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/s,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,e.applyFilter(this,r,i,n)}get angle(){return this._angle}set angle(e){this._angle=e;const r=e*ai;this._angleLight.x=Math.cos(r),this._angleLight.y=Math.sin(r)}get gain(){return this.uniforms.gain}set gain(e){this.uniforms.gain=e}get lacunarity(){return this.uniforms.lacunarity}set lacunarity(e){this.uniforms.lacunarity=e}get alpha(){return this.uniforms.alpha}set alpha(e){this.uniforms.alpha=e}};let iT=Rc;iT.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var nT=`attribute vec2 aVertexPosition;
1342
+ `;const a$3=class extends Filter{constructor(E){super(v,x.replace("${perlin}",f$2)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const I=Object.assign(a$3.defaults,E);this._angleLight=new Point,this.angle=I.angle,this.gain=I.gain,this.lacunarity=I.lacunarity,this.alpha=I.alpha,this.parallel=I.parallel,this.center=I.center,this.time=I.time}apply(E,I,B,U){const{width:V,height:X}=I.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=V,this.uniforms.dimensions[1]=X,this.uniforms.aspect=X/V,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,E.applyFilter(this,I,B,U)}get angle(){return this._angle}set angle(E){this._angle=E;const I=E*DEG_TO_RAD;this._angleLight.x=Math.cos(I),this._angleLight.y=Math.sin(I)}get gain(){return this.uniforms.gain}set gain(E){this.uniforms.gain=E}get lacunarity(){return this.uniforms.lacunarity}set lacunarity(E){this.uniforms.lacunarity=E}get alpha(){return this.uniforms.alpha}set alpha(E){this.uniforms.alpha=E}};let r$3=a$3;r$3.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var i$5=`attribute vec2 aVertexPosition;
1343
1343
  attribute vec2 aTextureCoord;
1344
1344
 
1345
1345
  uniform mat3 projectionMatrix;
@@ -1350,7 +1350,7 @@ void main(void)
1350
1350
  {
1351
1351
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1352
1352
  vTextureCoord = aTextureCoord;
1353
- }`,sT=`precision mediump float;
1353
+ }`,s$3=`precision mediump float;
1354
1354
 
1355
1355
  varying vec2 vTextureCoord;
1356
1356
  uniform sampler2D uSampler;
@@ -1408,7 +1408,7 @@ void main()
1408
1408
  // alpha
1409
1409
  gl_FragColor = mix(color, result, uAlpha);
1410
1410
  }
1411
- `;const Pc=class extends ue{constructor(t){super(nT,sT),this._hue=0;const e=Object.assign({},Pc.defaults,t);Object.assign(this,e)}get hue(){return this._hue}set hue(t){this._hue=t,this.uniforms.uHue=this._hue*(Math.PI/180)}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}get colorize(){return this.uniforms.uColorize}set colorize(t){this.uniforms.uColorize=t}get lightness(){return this.uniforms.uLightness}set lightness(t){this.uniforms.uLightness=t}get saturation(){return this.uniforms.uSaturation}set saturation(t){this.uniforms.uSaturation=t}};let aT=Pc;aT.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var oT=`attribute vec2 aVertexPosition;
1411
+ `;const t=class extends Filter{constructor(C){super(i$5,s$3),this._hue=0;const E=Object.assign({},t.defaults,C);Object.assign(this,E)}get hue(){return this._hue}set hue(C){this._hue=C,this.uniforms.uHue=this._hue*(Math.PI/180)}get alpha(){return this.uniforms.uAlpha}set alpha(C){this.uniforms.uAlpha=C}get colorize(){return this.uniforms.uColorize}set colorize(C){this.uniforms.uColorize=C}get lightness(){return this.uniforms.uLightness}set lightness(C){this.uniforms.uLightness=C}get saturation(){return this.uniforms.uSaturation}set saturation(C){this.uniforms.uSaturation=C}};let n$2=t;n$2.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var l$2=`attribute vec2 aVertexPosition;
1412
1412
  attribute vec2 aTextureCoord;
1413
1413
 
1414
1414
  uniform mat3 projectionMatrix;
@@ -1419,7 +1419,7 @@ void main(void)
1419
1419
  {
1420
1420
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1421
1421
  vTextureCoord = aTextureCoord;
1422
- }`,lT=`varying vec2 vTextureCoord;
1422
+ }`,d$2=`varying vec2 vTextureCoord;
1423
1423
  uniform sampler2D uSampler;
1424
1424
  uniform vec4 filterArea;
1425
1425
  uniform vec2 dimensions;
@@ -1523,7 +1523,7 @@ void main()
1523
1523
 
1524
1524
  gl_FragColor.rgb = color;
1525
1525
  }
1526
- `;const Mc=class extends ue{constructor(e,r=0){super(oT,lT),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof e=="number"?(this.seed=e,e=void 0):this.seed=r,Object.assign(this,Mc.defaults,e)}apply(e,r,i,n){var s,a;this.uniforms.dimensions[0]=(s=r.filterFrame)==null?void 0:s.width,this.uniforms.dimensions[1]=(a=r.filterFrame)==null?void 0:a.height,this.uniforms.seed=this.seed,e.applyFilter(this,r,i,n)}set sepia(e){this.uniforms.sepia=e}get sepia(){return this.uniforms.sepia}set noise(e){this.uniforms.noise=e}get noise(){return this.uniforms.noise}set noiseSize(e){this.uniforms.noiseSize=e}get noiseSize(){return this.uniforms.noiseSize}set scratch(e){this.uniforms.scratch=e}get scratch(){return this.uniforms.scratch}set scratchDensity(e){this.uniforms.scratchDensity=e}get scratchDensity(){return this.uniforms.scratchDensity}set scratchWidth(e){this.uniforms.scratchWidth=e}get scratchWidth(){return this.uniforms.scratchWidth}set vignetting(e){this.uniforms.vignetting=e}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(e){this.uniforms.vignettingAlpha=e}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(e){this.uniforms.vignettingBlur=e}get vignettingBlur(){return this.uniforms.vignettingBlur}};let Fc=Mc;Fc.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var uT=`attribute vec2 aVertexPosition;
1526
+ `;const s$2=class extends Filter{constructor(E,I=0){super(l$2,d$2),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof E=="number"?(this.seed=E,E=void 0):this.seed=I,Object.assign(this,s$2.defaults,E)}apply(E,I,B,U){var V,X;this.uniforms.dimensions[0]=(V=I.filterFrame)==null?void 0:V.width,this.uniforms.dimensions[1]=(X=I.filterFrame)==null?void 0:X.height,this.uniforms.seed=this.seed,E.applyFilter(this,I,B,U)}set sepia(E){this.uniforms.sepia=E}get sepia(){return this.uniforms.sepia}set noise(E){this.uniforms.noise=E}get noise(){return this.uniforms.noise}set noiseSize(E){this.uniforms.noiseSize=E}get noiseSize(){return this.uniforms.noiseSize}set scratch(E){this.uniforms.scratch=E}get scratch(){return this.uniforms.scratch}set scratchDensity(E){this.uniforms.scratchDensity=E}get scratchDensity(){return this.uniforms.scratchDensity}set scratchWidth(E){this.uniforms.scratchWidth=E}get scratchWidth(){return this.uniforms.scratchWidth}set vignetting(E){this.uniforms.vignetting=E}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(E){this.uniforms.vignettingAlpha=E}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(E){this.uniforms.vignettingBlur=E}get vignettingBlur(){return this.uniforms.vignettingBlur}};let r$2=s$2;r$2.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var u$2=`attribute vec2 aVertexPosition;
1527
1527
  attribute vec2 aTextureCoord;
1528
1528
 
1529
1529
  uniform mat3 projectionMatrix;
@@ -1534,7 +1534,7 @@ void main(void)
1534
1534
  {
1535
1535
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1536
1536
  vTextureCoord = aTextureCoord;
1537
- }`,cT=`varying vec2 vTextureCoord;
1537
+ }`,c$2=`varying vec2 vTextureCoord;
1538
1538
  uniform sampler2D uSampler;
1539
1539
  uniform vec4 filterClamp;
1540
1540
 
@@ -1572,7 +1572,7 @@ void main(void) {
1572
1572
  vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
1573
1573
  gl_FragColor = contentColor + outlineColor;
1574
1574
  }
1575
- `;const En=class extends ue{constructor(e=1,r=0,i=.1,n=1,s=!1){super(uT,cT.replace(/\$\{angleStep\}/,En.getAngleStep(i))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=n,this.uniforms.uKnockout=s,Object.assign(this,{thickness:e,color:r,quality:i,alpha:n,knockout:s})}static getAngleStep(e){const r=Math.max(e*En.MAX_SAMPLES,En.MIN_SAMPLES);return(Math.PI*2/r).toFixed(7)}apply(e,r,i,n){this.uniforms.uThickness[0]=this._thickness/r._frame.width,this.uniforms.uThickness[1]=this._thickness/r._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,e.applyFilter(this,r,i,n)}get alpha(){return this._alpha}set alpha(e){this._alpha=e}get color(){return Ks(this.uniforms.uColor)}set color(e){en(e,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(e){this._knockout=e}get thickness(){return this._thickness}set thickness(e){this._thickness=e,this.padding=e}};let Oc=En;Oc.MIN_SAMPLES=1,Oc.MAX_SAMPLES=100;var hT=`attribute vec2 aVertexPosition;
1575
+ `;const r$1=class extends Filter{constructor(E=1,I=0,B=.1,U=1,V=!1){super(u$2,c$2.replace(/\$\{angleStep\}/,r$1.getAngleStep(B))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=U,this.uniforms.uKnockout=V,Object.assign(this,{thickness:E,color:I,quality:B,alpha:U,knockout:V})}static getAngleStep(E){const I=Math.max(E*r$1.MAX_SAMPLES,r$1.MIN_SAMPLES);return(Math.PI*2/I).toFixed(7)}apply(E,I,B,U){this.uniforms.uThickness[0]=this._thickness/I._frame.width,this.uniforms.uThickness[1]=this._thickness/I._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,E.applyFilter(this,I,B,U)}get alpha(){return this._alpha}set alpha(E){this._alpha=E}get color(){return rgb2hex(this.uniforms.uColor)}set color(E){hex2rgb(E,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(E){this._knockout=E}get thickness(){return this._thickness}set thickness(E){this._thickness=E,this.padding=E}};let i$4=r$1;i$4.MIN_SAMPLES=1,i$4.MAX_SAMPLES=100;var m$1=`attribute vec2 aVertexPosition;
1576
1576
  attribute vec2 aTextureCoord;
1577
1577
 
1578
1578
  uniform mat3 projectionMatrix;
@@ -1583,7 +1583,7 @@ void main(void)
1583
1583
  {
1584
1584
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1585
1585
  vTextureCoord = aTextureCoord;
1586
- }`,fT=`varying vec2 vTextureCoord;
1586
+ }`,s$1=`varying vec2 vTextureCoord;
1587
1587
  uniform sampler2D uSampler;
1588
1588
 
1589
1589
  uniform vec4 filterArea;
@@ -1627,7 +1627,7 @@ void main(void)
1627
1627
 
1628
1628
  gl_FragColor = color * _alpha;
1629
1629
  }
1630
- `;const Nc=class extends ue{constructor(e){super(hT,fT),this.time=0,this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Nc.defaults,e)}apply(e,r,i,n){var s,a;this.uniforms.dimensions[0]=(s=r.filterFrame)==null?void 0:s.width,this.uniforms.dimensions[1]=(a=r.filterFrame)==null?void 0:a.height,this.uniforms.time=this.time,e.applyFilter(this,r,i,n)}set mirror(e){this.uniforms.mirror=e}get mirror(){return this.uniforms.mirror}set boundary(e){this.uniforms.boundary=e}get boundary(){return this.uniforms.boundary}set amplitude(e){this.uniforms.amplitude[0]=e[0],this.uniforms.amplitude[1]=e[1]}get amplitude(){return this.uniforms.amplitude}set waveLength(e){this.uniforms.waveLength[0]=e[0],this.uniforms.waveLength[1]=e[1]}get waveLength(){return this.uniforms.waveLength}set alpha(e){this.uniforms.alpha[0]=e[0],this.uniforms.alpha[1]=e[1]}get alpha(){return this.uniforms.alpha}};let dT=Nc;dT.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var pT=`attribute vec2 aVertexPosition;
1630
+ `;const i$3=class extends Filter{constructor(E){super(m$1,s$1),this.time=0,this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,i$3.defaults,E)}apply(E,I,B,U){var V,X;this.uniforms.dimensions[0]=(V=I.filterFrame)==null?void 0:V.width,this.uniforms.dimensions[1]=(X=I.filterFrame)==null?void 0:X.height,this.uniforms.time=this.time,E.applyFilter(this,I,B,U)}set mirror(E){this.uniforms.mirror=E}get mirror(){return this.uniforms.mirror}set boundary(E){this.uniforms.boundary=E}get boundary(){return this.uniforms.boundary}set amplitude(E){this.uniforms.amplitude[0]=E[0],this.uniforms.amplitude[1]=E[1]}get amplitude(){return this.uniforms.amplitude}set waveLength(E){this.uniforms.waveLength[0]=E[0],this.uniforms.waveLength[1]=E[1]}get waveLength(){return this.uniforms.waveLength}set alpha(E){this.uniforms.alpha[0]=E[0],this.uniforms.alpha[1]=E[1]}get alpha(){return this.uniforms.alpha}};let o$1=i$3;o$1.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var s=`attribute vec2 aVertexPosition;
1631
1631
  attribute vec2 aTextureCoord;
1632
1632
 
1633
1633
  uniform mat3 projectionMatrix;
@@ -1638,7 +1638,7 @@ void main(void)
1638
1638
  {
1639
1639
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1640
1640
  vTextureCoord = aTextureCoord;
1641
- }`,mT=`varying vec2 vTextureCoord;
1641
+ }`,f$1=`varying vec2 vTextureCoord;
1642
1642
  uniform sampler2D uSampler;
1643
1643
  uniform vec4 filterArea;
1644
1644
  uniform vec4 filterClamp;
@@ -1707,7 +1707,7 @@ void main()
1707
1707
 
1708
1708
  gl_FragColor = color;
1709
1709
  }
1710
- `;const kc=class extends ue{constructor(e=[0,0],r,i=0){super(pT,mT),this.center=e,Object.assign(this,kc.defaults,r),this.time=i}apply(e,r,i,n){this.uniforms.time=this.time,e.applyFilter(this,r,i,n)}get center(){return this.uniforms.center}set center(e){this.uniforms.center=e}get amplitude(){return this.uniforms.amplitude}set amplitude(e){this.uniforms.amplitude=e}get wavelength(){return this.uniforms.wavelength}set wavelength(e){this.uniforms.wavelength=e}get brightness(){return this.uniforms.brightness}set brightness(e){this.uniforms.brightness=e}get speed(){return this.uniforms.speed}set speed(e){this.uniforms.speed=e}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}};let gT=kc;gT.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var vT=`attribute vec2 aVertexPosition;
1710
+ `;const n$1=class extends Filter{constructor(E=[0,0],I,B=0){super(s,f$1),this.center=E,Object.assign(this,n$1.defaults,I),this.time=B}apply(E,I,B,U){this.uniforms.time=this.time,E.applyFilter(this,I,B,U)}get center(){return this.uniforms.center}set center(E){this.uniforms.center=E}get amplitude(){return this.uniforms.amplitude}set amplitude(E){this.uniforms.amplitude=E}get wavelength(){return this.uniforms.wavelength}set wavelength(E){this.uniforms.wavelength=E}get brightness(){return this.uniforms.brightness}set brightness(E){this.uniforms.brightness=E}get speed(){return this.uniforms.speed}set speed(E){this.uniforms.speed=E}get radius(){return this.uniforms.radius}set radius(E){this.uniforms.radius=E}};let i$2=n$1;i$2.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var m=`attribute vec2 aVertexPosition;
1711
1711
  attribute vec2 aTextureCoord;
1712
1712
 
1713
1713
  uniform mat3 projectionMatrix;
@@ -1718,7 +1718,7 @@ void main(void)
1718
1718
  {
1719
1719
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1720
1720
  vTextureCoord = aTextureCoord;
1721
- }`,_T=`varying vec2 vTextureCoord;
1721
+ }`,c$1=`varying vec2 vTextureCoord;
1722
1722
 
1723
1723
  uniform sampler2D uSampler;
1724
1724
  uniform float blur;
@@ -1757,7 +1757,7 @@ void main(void)
1757
1757
 
1758
1758
  gl_FragColor = color;
1759
1759
  }
1760
- `;let Lc=class extends ue{constructor(e){var r,i;super(vT,_T),this.uniforms.blur=e.blur,this.uniforms.gradientBlur=e.gradientBlur,this.uniforms.start=(r=e.start)!=null?r:new me(0,window.innerHeight/2),this.uniforms.end=(i=e.end)!=null?i:new me(600,window.innerHeight/2),this.uniforms.delta=new me(30,30),this.uniforms.texSize=new me(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(e){this.uniforms.blur=e}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(e){this.uniforms.gradientBlur=e}get start(){return this.uniforms.start}set start(e){this.uniforms.start=e,this.updateDelta()}get end(){return this.uniforms.end}set end(e){this.uniforms.end=e,this.updateDelta()}},yT=class extends Lc{updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,i=Math.sqrt(e*e+r*r);this.uniforms.delta.x=e/i,this.uniforms.delta.y=r/i}},xT=class extends Lc{updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,i=Math.sqrt(e*e+r*r);this.uniforms.delta.x=-r/i,this.uniforms.delta.y=e/i}};const Dc=class extends ue{constructor(e,r,i,n){super(),typeof e=="number"&&(re("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),e={blur:e,gradientBlur:r,start:i,end:n}),e=Object.assign({},Dc.defaults,e),this.tiltShiftXFilter=new yT(e),this.tiltShiftYFilter=new xT(e)}apply(e,r,i,n){const s=e.getFilterTexture();this.tiltShiftXFilter.apply(e,r,s,1),this.tiltShiftYFilter.apply(e,s,i,n),e.returnFilterTexture(s)}get blur(){return this.tiltShiftXFilter.blur}set blur(e){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=e}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(e){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=e}get start(){return this.tiltShiftXFilter.start}set start(e){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=e}get end(){return this.tiltShiftXFilter.end}set end(e){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=e}};let bT=Dc;bT.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var TT=`attribute vec2 aVertexPosition;
1760
+ `;let l$1=class extends Filter{constructor(E){var I,B;super(m,c$1),this.uniforms.blur=E.blur,this.uniforms.gradientBlur=E.gradientBlur,this.uniforms.start=(I=E.start)!=null?I:new Point(0,window.innerHeight/2),this.uniforms.end=(B=E.end)!=null?B:new Point(600,window.innerHeight/2),this.uniforms.delta=new Point(30,30),this.uniforms.texSize=new Point(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(E){this.uniforms.blur=E}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(E){this.uniforms.gradientBlur=E}get start(){return this.uniforms.start}set start(E){this.uniforms.start=E,this.updateDelta()}get end(){return this.uniforms.end}set end(E){this.uniforms.end=E,this.updateDelta()}},a$2=class extends l$1{updateDelta(){const E=this.uniforms.end.x-this.uniforms.start.x,I=this.uniforms.end.y-this.uniforms.start.y,B=Math.sqrt(E*E+I*I);this.uniforms.delta.x=E/B,this.uniforms.delta.y=I/B}},u$1=class extends l$1{updateDelta(){const E=this.uniforms.end.x-this.uniforms.start.x,I=this.uniforms.end.y-this.uniforms.start.y,B=Math.sqrt(E*E+I*I);this.uniforms.delta.x=-I/B,this.uniforms.delta.y=E/B}};const d$1=class extends Filter{constructor(E,I,B,U){super(),typeof E=="number"&&(deprecation("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),E={blur:E,gradientBlur:I,start:B,end:U}),E=Object.assign({},d$1.defaults,E),this.tiltShiftXFilter=new a$2(E),this.tiltShiftYFilter=new u$1(E)}apply(E,I,B,U){const V=E.getFilterTexture();this.tiltShiftXFilter.apply(E,I,V,1),this.tiltShiftYFilter.apply(E,V,B,U),E.returnFilterTexture(V)}get blur(){return this.tiltShiftXFilter.blur}set blur(E){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=E}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(E){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=E}get start(){return this.tiltShiftXFilter.start}set start(E){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=E}get end(){return this.tiltShiftXFilter.end}set end(E){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=E}};let h=d$1;h.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var i$1=`attribute vec2 aVertexPosition;
1761
1761
  attribute vec2 aTextureCoord;
1762
1762
 
1763
1763
  uniform mat3 projectionMatrix;
@@ -1768,7 +1768,7 @@ void main(void)
1768
1768
  {
1769
1769
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1770
1770
  vTextureCoord = aTextureCoord;
1771
- }`,wT=`varying vec2 vTextureCoord;
1771
+ }`,a$1=`varying vec2 vTextureCoord;
1772
1772
 
1773
1773
  uniform sampler2D uSampler;
1774
1774
  uniform float radius;
@@ -1824,7 +1824,7 @@ void main(void)
1824
1824
  gl_FragColor = texture2D(uSampler, coord );
1825
1825
 
1826
1826
  }
1827
- `;const Bc=class extends ue{constructor(t){super(TT,wT),Object.assign(this,Bc.defaults,t)}get offset(){return this.uniforms.offset}set offset(t){this.uniforms.offset=t}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}get angle(){return this.uniforms.angle}set angle(t){this.uniforms.angle=t}};let ST=Bc;ST.defaults={radius:200,angle:4,padding:20,offset:new me};var AT=`attribute vec2 aVertexPosition;
1827
+ `;const n=class extends Filter{constructor(C){super(i$1,a$1),Object.assign(this,n.defaults,C)}get offset(){return this.uniforms.offset}set offset(C){this.uniforms.offset=C}get radius(){return this.uniforms.radius}set radius(C){this.uniforms.radius=C}get angle(){return this.uniforms.angle}set angle(C){this.uniforms.angle=C}};let r=n;r.defaults={radius:200,angle:4,padding:20,offset:new Point};var l=`attribute vec2 aVertexPosition;
1828
1828
  attribute vec2 aTextureCoord;
1829
1829
 
1830
1830
  uniform mat3 projectionMatrix;
@@ -1835,7 +1835,7 @@ void main(void)
1835
1835
  {
1836
1836
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1837
1837
  vTextureCoord = aTextureCoord;
1838
- }`,ET=`varying vec2 vTextureCoord;
1838
+ }`,u=`varying vec2 vTextureCoord;
1839
1839
  uniform sampler2D uSampler;
1840
1840
  uniform vec4 filterArea;
1841
1841
 
@@ -1921,7 +1921,7 @@ void main() {
1921
1921
 
1922
1922
  gl_FragColor = color;
1923
1923
  }
1924
- `,Uc=Object.getOwnPropertySymbols,CT=Object.prototype.hasOwnProperty,IT=Object.prototype.propertyIsEnumerable,RT=(t,e)=>{var r={};for(var i in t)CT.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&Uc)for(var i of Uc(t))e.indexOf(i)<0&&IT.call(t,i)&&(r[i]=t[i]);return r};const $c=class extends ue{constructor(t){const e=Object.assign($c.defaults,t),{maxKernelSize:r}=e,i=RT(e,["maxKernelSize"]);super(AT,ET.replace("${maxKernelSize}",r.toFixed(1))),Object.assign(this,i)}get center(){return this.uniforms.uCenter}set center(t){this.uniforms.uCenter=t}get strength(){return this.uniforms.uStrength}set strength(t){this.uniforms.uStrength=t}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(t){this.uniforms.uInnerRadius=t}get radius(){return this.uniforms.uRadius}set radius(t){(t<0||t===1/0)&&(t=-1),this.uniforms.uRadius=t}};let PT=$c;PT.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const er=t=>{const{contrast:e=1,saturation:r=1,brightness:i=1,alpha:n=1,red:s=1,blue:a=1,gamma:o=1,green:u=1,blurRadius:h=0,temperature:d=0,hue:l=0,sharpness:c=0,vignette:f=0,noise:p=0}=t||{},m=new $e.Filter(null,`
1924
+ `,i=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,c=(C,E)=>{var I={};for(var B in C)d.call(C,B)&&E.indexOf(B)<0&&(I[B]=C[B]);if(C!=null&&i)for(var B of i(C))E.indexOf(B)<0&&f.call(C,B)&&(I[B]=C[B]);return I};const a=class extends Filter{constructor(C){const E=Object.assign(a.defaults,C),{maxKernelSize:I}=E,B=c(E,["maxKernelSize"]);super(l,u.replace("${maxKernelSize}",I.toFixed(1))),Object.assign(this,B)}get center(){return this.uniforms.uCenter}set center(C){this.uniforms.uCenter=C}get strength(){return this.uniforms.uStrength}set strength(C){this.uniforms.uStrength=C}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(C){this.uniforms.uInnerRadius=C}get radius(){return this.uniforms.uRadius}set radius(C){(C<0||C===1/0)&&(C=-1),this.uniforms.uRadius=C}};let o=a;o.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};function _extends(){return _extends=Object.assign?Object.assign.bind():function(C){for(var E=1;E<arguments.length;E++){var I=arguments[E];for(var B in I)Object.prototype.hasOwnProperty.call(I,B)&&(C[B]=I[B])}return C},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(C,E){if(C==null)return{};var I={},B=Object.keys(C),U,V;for(V=0;V<B.length;V++)U=B[V],!(E.indexOf(U)>=0)&&(I[U]=C[U]);return I}var RGB_MAX=255,SV_MAX=100,rgbaToHsva=C=>{var{r:E,g:I,b:B,a:U}=C,V=Math.max(E,I,B),X=V-Math.min(E,I,B),Y=X?V===E?(I-B)/X:V===I?2+(B-E)/X:4+(E-I)/X:0;return{h:60*(Y<0?Y+6:Y),s:V?X/V*SV_MAX:0,v:V/RGB_MAX*SV_MAX,a:U}},hsvaToHslaString=C=>{var{h:E,s:I,l:B,a:U}=hsvaToHsla(C);return"hsla("+E+", "+I+"%, "+B+"%, "+U+")"},hsvaToHsla=C=>{var{h:E,s:I,v:B,a:U}=C,V=(200-I)*B/SV_MAX;return{h:E,s:V>0&&V<200?I*B/SV_MAX/(V<=SV_MAX?V:200-V)*SV_MAX:0,l:V/2,a:U}},rgbaToHex$1=C=>{var{r:E,g:I,b:B}=C,U=E<<16|I<<8|B;return"#"+(V=>new Array(7-V.length).join("0")+V)(U.toString(16))},rgbaToHexa=C=>{var{r:E,g:I,b:B,a:U}=C,V=typeof U=="number"&&(U*255|256).toString(16).slice(1);return""+rgbaToHex$1({r:E,g:I,b:B,a:U})+(V||"")},hexToHsva=C=>rgbaToHsva(hexToRgba(C)),hexToRgba=C=>{var E=C.replace("#","");/^#?/.test(C)&&E.length===3&&(C="#"+E.charAt(0)+E.charAt(0)+E.charAt(1)+E.charAt(1)+E.charAt(2)+E.charAt(2));var I=new RegExp("[A-Za-z0-9]{2}","g"),[B,U,V=0,X]=C.match(I).map(Y=>parseInt(Y,16));return{r:B,g:U,b:V,a:(X??255)/RGB_MAX}},hsvaToRgba=C=>{var{h:E,s:I,v:B,a:U}=C,V=E/60,X=I/SV_MAX,Y=B/SV_MAX,K=Math.floor(V)%6,J=V-Math.floor(V),xe=RGB_MAX*Y*(1-X),Z=RGB_MAX*Y*(1-X*J),_e=RGB_MAX*Y*(1-X*(1-J));Y*=RGB_MAX;var Se={};switch(K){case 0:Se.r=Y,Se.g=_e,Se.b=xe;break;case 1:Se.r=Z,Se.g=Y,Se.b=xe;break;case 2:Se.r=xe,Se.g=Y,Se.b=_e;break;case 3:Se.r=xe,Se.g=Z,Se.b=Y;break;case 4:Se.r=_e,Se.g=xe,Se.b=Y;break;case 5:Se.r=Y,Se.g=xe,Se.b=Z;break}return Se.r=Math.round(Se.r),Se.g=Math.round(Se.g),Se.b=Math.round(Se.b),_extends({},Se,{a:U})},hsvaToRgbaString=C=>{var{r:E,g:I,b:B,a:U}=hsvaToRgba(C);return"rgba("+E+", "+I+", "+B+", "+U+")"},rgbaToRgb=C=>{var{r:E,g:I,b:B}=C;return{r:E,g:I,b:B}},hslaToHsl=C=>{var{h:E,s:I,l:B}=C;return{h:E,s:I,l:B}},hsvaToHex=C=>rgbaToHex$1(hsvaToRgba(C)),hsvaToHsv=C=>{var{h:E,s:I,v:B}=C;return{h:E,s:I,v:B}},rgbToXY=C=>{var{r:E,g:I,b:B}=C,U=function(xe){return xe<=.04045?xe/12.92:Math.pow((xe+.055)/1.055,2.4)},V=U(E/255),X=U(I/255),Y=U(B/255),K={};return K.x=V*.4124+X*.3576+Y*.1805,K.y=V*.2126+X*.7152+Y*.0722,K.bri=V*.0193+X*.1192+Y*.9505,K},color=C=>{var E,I,B,U,V,X,Y,K,J;return typeof C=="string"&&validHex$1(C)?(X=hexToHsva(C),K=C):typeof C!="string"&&(X=C),X&&(B=hsvaToHsv(X),V=hsvaToHsla(X),U=hsvaToRgba(X),J=rgbaToHexa(U),K=hsvaToHex(X),I=hslaToHsl(V),E=rgbaToRgb(U),Y=rgbToXY(E)),{rgb:E,hsl:I,hsv:B,rgba:U,hsla:V,hsva:X,hex:K,hexa:J,xy:Y}},validHex$1=C=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(C);function useEventCallback$1(C){var E=React.useRef(C);return React.useEffect(()=>{E.current=C}),React.useCallback((I,B)=>E.current&&E.current(I,B),[])}var isTouch=C=>"touches"in C,preventDefaultMove=C=>{!isTouch(C)&&C.preventDefault&&C.preventDefault()},clamp=function(E,I,B){return I===void 0&&(I=0),B===void 0&&(B=1),E>B?B:E<I?I:E},getRelativePosition=(C,E)=>{var I=C.getBoundingClientRect(),B=isTouch(E)?E.touches[0]:E;return{left:clamp((B.pageX-(I.left+window.pageXOffset))/I.width),top:clamp((B.pageY-(I.top+window.pageYOffset))/I.height),width:I.width,height:I.height,x:B.pageX-(I.left+window.pageXOffset),y:B.pageY-(I.top+window.pageYOffset)}},_excluded$8=["prefixCls","className","onMove","onDown"],Interactive=React.forwardRef((C,E)=>{var{prefixCls:I="w-color-interactive",className:B,onMove:U,onDown:V}=C,X=_objectWithoutPropertiesLoose(C,_excluded$8),Y=React.useRef(null),K=React.useRef(!1),[J,xe]=React.useState(!1),Z=useEventCallback$1(U),_e=useEventCallback$1(V),Se=we=>K.current&&!isTouch(we)?!1:(K.current=isTouch(we),!0),Ee=React.useCallback(we=>{preventDefaultMove(we);var Pe=isTouch(we)?we.touches.length>0:we.buttons>0;Pe&&Y.current?Z&&Z(getRelativePosition(Y.current,we),we):xe(!1)},[Z]),Ae=React.useCallback(()=>xe(!1),[]),Re=React.useCallback(we=>{var Pe=we?window.addEventListener:window.removeEventListener;Pe(K.current?"touchmove":"mousemove",Ee),Pe(K.current?"touchend":"mouseup",Ae)},[]);React.useEffect(()=>(Re(J),()=>{J&&Re(!1)}),[J,Re]);var Te=React.useCallback(we=>{preventDefaultMove(we.nativeEvent),Se(we.nativeEvent)&&(_e&&_e(getRelativePosition(Y.current,we.nativeEvent),we.nativeEvent),xe(!0))},[_e]);return jsxRuntimeExports.jsx("div",_extends({},X,{className:[I,B||""].filter(Boolean).join(" "),style:_extends({},X.style,{touchAction:"none"}),ref:Y,tabIndex:0,onMouseDown:Te,onTouchStart:Te}))});Interactive.displayName="Interactive";const Interactive$1=Interactive;var Pointer$1=C=>{var{className:E,color:I,left:B,top:U,prefixCls:V}=C,X={position:"absolute",top:U,left:B},Y={"--saturation-pointer-box-shadow":"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",width:6,height:6,transform:"translate(-3px, -3px)",boxShadow:"var(--saturation-pointer-box-shadow)",borderRadius:"50%",backgroundColor:I};return React.useMemo(()=>jsxRuntimeExports.jsx("div",{className:V+"-pointer "+(E||""),style:X,children:jsxRuntimeExports.jsx("div",{className:V+"-fill",style:Y})}),[U,B,I,E,V])},_excluded$7=["prefixCls","radius","pointer","className","hue","style","hsva","onChange"],Saturation=React.forwardRef((C,E)=>{var I,{prefixCls:B="w-color-saturation",radius:U=0,pointer:V,className:X,hue:Y=0,style:K,hsva:J,onChange:xe}=C,Z=_objectWithoutPropertiesLoose(C,_excluded$7),_e=_extends({width:200,height:200,borderRadius:U},K,{position:"relative"}),Se=(Ae,Re)=>{xe&&J&&xe({h:J.h,s:Ae.left*100,v:(1-Ae.top)*100,a:J.a})},Ee=React.useMemo(()=>{if(!J)return null;var Ae={top:100-J.v+"%",left:J.s+"%",color:hsvaToHslaString(J)};return V&&typeof V=="function"?V(_extends({prefixCls:B},Ae)):jsxRuntimeExports.jsx(Pointer$1,_extends({prefixCls:B},Ae))},[J,V,B]);return jsxRuntimeExports.jsx(Interactive$1,_extends({className:[B,X||""].filter(Boolean).join(" ")},Z,{style:_extends({position:"absolute",inset:0,cursor:"crosshair",backgroundImage:"linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl("+((I=J==null?void 0:J.h)!=null?I:Y)+", 100%, 50%))"},_e),ref:E,onMove:Se,onDown:Se,children:Ee}))});Saturation.displayName="Saturation";const Saturation$1=Saturation;var _excluded$6=["className","prefixCls","left","top","style","fillProps"],Pointer=C=>{var{className:E,prefixCls:I,left:B,top:U,style:V,fillProps:X}=C,Y=_objectWithoutPropertiesLoose(C,_excluded$6),K=_extends({},V,{position:"absolute",left:B,top:U}),J=_extends({width:18,height:18,boxShadow:"var(--alpha-pointer-box-shadow)",borderRadius:"50%",backgroundColor:"var(--alpha-pointer-background-color)"},X==null?void 0:X.style,{transform:B?"translate(-9px, -1px)":"translate(-1px, -9px)"});return jsxRuntimeExports.jsx("div",_extends({className:I+"-pointer "+(E||""),style:K},Y,{children:jsxRuntimeExports.jsx("div",_extends({className:I+"-fill"},X,{style:J}))}))},_excluded$5=["prefixCls","className","hsva","background","bgProps","innerProps","pointerProps","radius","width","height","direction","style","onChange","pointer"],BACKGROUND_IMG="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==",Alpha=React.forwardRef((C,E)=>{var{prefixCls:I="w-color-alpha",className:B,hsva:U,background:V,bgProps:X={},innerProps:Y={},pointerProps:K={},radius:J=0,width:xe,height:Z=16,direction:_e="horizontal",style:Se,onChange:Ee,pointer:Ae}=C,Re=_objectWithoutPropertiesLoose(C,_excluded$5),Te=Le=>{Ee&&Ee(_extends({},U,{a:_e==="horizontal"?Le.left:Le.top}),Le)},we=hsvaToHslaString(Object.assign({},U,{a:1})),Pe="linear-gradient(to "+(_e==="horizontal"?"right":"bottom")+", rgba(244, 67, 54, 0) 0%, "+we+" 100%)",Ie={};_e==="horizontal"?Ie.left=U.a*100+"%":Ie.top=U.a*100+"%";var Me=_extends({"--alpha-background-color":"#fff","--alpha-pointer-background-color":"rgb(248, 248, 248)","--alpha-pointer-box-shadow":"rgb(0 0 0 / 37%) 0px 1px 4px 0px",borderRadius:J,background:"url("+BACKGROUND_IMG+") left center",backgroundColor:"var(--alpha-background-color)"},{width:xe,height:Z},Se,{position:"relative"}),Oe=Ae&&typeof Ae=="function"?Ae(_extends({prefixCls:I},K,Ie)):jsxRuntimeExports.jsx(Pointer,_extends({},K,{prefixCls:I},Ie));return jsxRuntimeExports.jsxs("div",_extends({},Re,{className:[I,I+"-"+_e,B||""].filter(Boolean).join(" "),style:Me,ref:E,children:[jsxRuntimeExports.jsx("div",_extends({},X,{style:_extends({inset:0,position:"absolute",background:V||Pe,borderRadius:J},X.style)})),jsxRuntimeExports.jsx(Interactive$1,_extends({},Y,{style:_extends({},Y.style,{inset:0,zIndex:1,position:"absolute"}),onMove:Te,onDown:Te,children:Oe}))]}))});Alpha.displayName="Alpha";const Alpha$1=Alpha;var _excluded$4=["prefixCls","placement","label","value","className","style","labelStyle","inputStyle","onChange","onBlur"],validHex=C=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(C),getNumberValue=C=>Number(String(C).replace(/%/g,"")),EditableInput=React.forwardRef((C,E)=>{var{prefixCls:I="w-color-editable-input",placement:B="bottom",label:U,value:V,className:X,style:Y,labelStyle:K,inputStyle:J,onChange:xe,onBlur:Z}=C,_e=_objectWithoutPropertiesLoose(C,_excluded$4),[Se,Ee]=React.useState(V),Ae=React.useRef(!1);React.useEffect(()=>{C.value!==Se&&(Ae.current||Ee(C.value))},[C.value]);function Re(Me,Oe){var Le=(Oe||Me.target.value).trim().replace(/^#/,"");validHex(Le)&&xe&&xe(Me,Le);var Ne=getNumberValue(Le);isNaN(Ne)||xe&&xe(Me,Ne),Ee(Le)}function Te(Me){Ae.current=!1,Ee(C.value),Z&&Z(Me)}var we={};B==="bottom"&&(we.flexDirection="column"),B==="top"&&(we.flexDirection="column-reverse"),B==="left"&&(we.flexDirection="row-reverse");var Pe=_extends({"--editable-input-label-color":"rgb(153, 153, 153)","--editable-input-box-shadow":"rgb(204 204 204) 0px 0px 0px 1px inset","--editable-input-color":"#666",position:"relative",alignItems:"center",display:"flex",fontSize:11},we,Y),Ie=_extends({width:"100%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,fontSize:11,background:"transparent",boxSizing:"border-box",border:"none",color:"var(--editable-input-color)",boxShadow:"var(--editable-input-box-shadow)"},J);return jsxRuntimeExports.jsxs("div",{className:[I,X||""].filter(Boolean).join(" "),style:Pe,children:[jsxRuntimeExports.jsx("input",_extends({ref:E,value:Se,onChange:Re,onBlur:Te,autoComplete:"off",onFocus:()=>Ae.current=!0},_e,{style:Ie})),U&&jsxRuntimeExports.jsx("span",{style:_extends({color:"var(--editable-input-label-color)",textTransform:"capitalize"},K),children:U})]})});EditableInput.displayName="EditableInput";const EditableInput$1=EditableInput;var _excluded$3=["prefixCls","hsva","placement","rProps","gProps","bProps","aProps","className","style","onChange"],EditableInputRGBA=React.forwardRef((C,E)=>{var{prefixCls:I="w-color-editable-input-rgba",hsva:B,placement:U="bottom",rProps:V={},gProps:X={},bProps:Y={},aProps:K={},className:J,style:xe,onChange:Z}=C,_e=_objectWithoutPropertiesLoose(C,_excluded$3),Se=B?hsvaToRgba(B):{};function Ee(Re){var Te=Number(Re.target.value);Te&&Te>255&&(Re.target.value="255"),Te&&Te<0&&(Re.target.value="0")}var Ae=(Re,Te,we)=>{typeof Re=="number"&&(Te==="a"&&(Re<0&&(Re=0),Re>100&&(Re=100),Z&&Z(color(rgbaToHsva(_extends({},Se,{a:Re/100}))))),Re>255&&(Re=255,we.target.value="255"),Re<0&&(Re=0,we.target.value="0"),Te==="r"&&Z&&Z(color(rgbaToHsva(_extends({},Se,{r:Re})))),Te==="g"&&Z&&Z(color(rgbaToHsva(_extends({},Se,{g:Re})))),Te==="b"&&Z&&Z(color(rgbaToHsva(_extends({},Se,{b:Re})))))};return jsxRuntimeExports.jsxs("div",_extends({ref:E,className:[I,J||""].filter(Boolean).join(" ")},_e,{style:_extends({fontSize:11,display:"flex"},xe),children:[jsxRuntimeExports.jsx(EditableInput$1,_extends({label:"R",value:Se.r||0,onBlur:Ee,placement:U,onChange:(Re,Te)=>Ae(Te,"r",Re)},V,{style:_extends({},V.style)})),jsxRuntimeExports.jsx(EditableInput$1,_extends({label:"G",value:Se.g||0,onBlur:Ee,placement:U,onChange:(Re,Te)=>Ae(Te,"g",Re)},X,{style:_extends({marginLeft:5},V.style)})),jsxRuntimeExports.jsx(EditableInput$1,_extends({label:"B",value:Se.b||0,onBlur:Ee,placement:U,onChange:(Re,Te)=>Ae(Te,"b",Re)},Y,{style:_extends({marginLeft:5},Y.style)})),K&&jsxRuntimeExports.jsx(EditableInput$1,_extends({label:"A",value:Se.a?parseInt(String(Se.a*100),10):0,onBlur:Ee,placement:U,onChange:(Re,Te)=>Ae(Te,"a",Re)},K,{style:_extends({marginLeft:5},K.style)}))]}))});EditableInputRGBA.displayName="EditableInputRGBA";const RGBA=EditableInputRGBA;var _excluded$2=["prefixCls","className","hue","onChange","direction"],Hue=React.forwardRef((C,E)=>{var{prefixCls:I="w-color-hue",className:B,hue:U=0,onChange:V,direction:X="horizontal"}=C,Y=_objectWithoutPropertiesLoose(C,_excluded$2);return jsxRuntimeExports.jsx(Alpha$1,_extends({ref:E,className:I+" "+(B||"")},Y,{direction:X,background:"linear-gradient(to "+(X==="horizontal"?"right":"bottom")+", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)",hsva:{h:U,s:100,v:100,a:U/360},onChange:(K,J)=>{V&&V({h:X==="horizontal"?360*J.left:360*J.top})}}))});Hue.displayName="Hue";const Hue$1=Hue;var _excluded$1=["prefixCls","className","color","colors","style","rectProps","onChange","addonAfter","addonBefore","rectRender"],Swatch=React.forwardRef((C,E)=>{var{prefixCls:I="w-color-swatch",className:B,color:U,colors:V=[],style:X,rectProps:Y={},onChange:K,addonAfter:J,addonBefore:xe,rectRender:Z}=C,_e=_objectWithoutPropertiesLoose(C,_excluded$1),Se=_extends({"--swatch-background-color":"rgb(144, 19, 254)",background:"var(--swatch-background-color)",height:15,width:15,marginRight:5,marginBottom:5,cursor:"pointer",position:"relative",outline:"none",borderRadius:2},Y.style),Ee=(Ae,Re)=>{K&&K(hexToHsva(Ae),color(hexToHsva(Ae)),Re)};return jsxRuntimeExports.jsxs("div",_extends({ref:E},_e,{className:[I,B||""].filter(Boolean).join(" "),style:_extends({display:"flex",flexWrap:"wrap",position:"relative"},X),children:[xe&&React.isValidElement(xe)&&xe,V&&Array.isArray(V)&&V.map((Ae,Re)=>{var Te="",we="";typeof Ae=="string"&&(Te=Ae,we=Ae),typeof Ae=="object"&&Ae.color&&(Te=Ae.title||Ae.color,we=Ae.color);var Pe=U&&U.toLocaleLowerCase()===we.toLocaleLowerCase(),Ie=Z&&Z({title:Te,color:we,checked:!!Pe,style:_extends({},Se,{background:we}),onClick:Oe=>Ee(we,Oe)});if(Ie)return jsxRuntimeExports.jsx(React.Fragment,{children:Ie},Re);var Me=Y.children&&React.isValidElement(Y.children)?React.cloneElement(Y.children,{color:we,checked:Pe}):null;return jsxRuntimeExports.jsx("div",_extends({tabIndex:0,title:Te,onClick:Oe=>Ee(we,Oe)},Y,{children:Me,style:_extends({},Se,{background:we})}),Re)}),J&&React.isValidElement(J)&&J]}))});Swatch.displayName="Swatch";const Swatch$1=Swatch;var _excluded=["prefixCls","className","onChange","width","presetColors","color","editableDisable","disableAlpha","style"],PRESET_COLORS=["#D0021B","#F5A623","#f8e61b","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"],Bar=C=>jsxRuntimeExports.jsx("div",{style:{boxShadow:"rgb(0 0 0 / 60%) 0px 0px 2px",width:4,top:1,bottom:1,left:C.left,borderRadius:1,position:"absolute",backgroundColor:"#fff"}}),Sketch=React.forwardRef((C,E)=>{var{prefixCls:I="w-color-sketch",className:B,onChange:U,width:V=218,presetColors:X=PRESET_COLORS,color:Y,editableDisable:K=!0,disableAlpha:J=!1,style:xe}=C,Z=_objectWithoutPropertiesLoose(C,_excluded),[_e,Se]=React.useState({h:209,s:36,v:90,a:1});React.useEffect(()=>{typeof Y=="string"&&validHex$1(Y)&&Se(hexToHsva(Y)),typeof Y=="object"&&Se(Y)},[Y]);var Ee=Oe=>{Se(Oe),U&&U(color(Oe))},Ae=(Oe,Le)=>{typeof Oe=="string"&&validHex$1(Oe)&&/(3|6)/.test(String(Oe.length))&&Ee(hexToHsva(Oe))},Re=Oe=>Ee(_extends({},_e,{a:Oe.a})),Te=Oe=>Ee(_extends({},_e,Oe,{a:_e.a})),we=_extends({"--sketch-background":"rgb(255, 255, 255)","--sketch-box-shadow":"rgb(0 0 0 / 15%) 0px 0px 0px 1px, rgb(0 0 0 / 15%) 0px 8px 16px","--sketch-swatch-box-shadow":"rgb(0 0 0 / 15%) 0px 0px 0px 1px inset","--sketch-alpha-box-shadow":"rgb(0 0 0 / 15%) 0px 0px 0px 1px inset, rgb(0 0 0 / 25%) 0px 0px 4px inset","--sketch-swatch-border-top":"1px solid rgb(238, 238, 238)",background:"var(--sketch-background)",borderRadius:4,boxShadow:"var(--sketch-box-shadow)",width:V},xe),Pe={borderRadius:2,background:hsvaToRgbaString(_e),boxShadow:"var(--sketch-alpha-box-shadow)"},Ie={borderTop:"var(--sketch-swatch-border-top)",paddingTop:10,paddingLeft:10},Me={marginRight:10,marginBottom:10,borderRadius:3,boxShadow:"var(--sketch-swatch-box-shadow)"};return jsxRuntimeExports.jsxs("div",_extends({},Z,{className:I+" "+(B||""),ref:E,style:we,children:[jsxRuntimeExports.jsxs("div",{style:{padding:"10px 10px 8px"},children:[jsxRuntimeExports.jsx(Saturation$1,{hsva:_e,style:{width:"auto",height:150},onChange:Te}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",marginTop:4},children:[jsxRuntimeExports.jsxs("div",{style:{flex:1},children:[jsxRuntimeExports.jsx(Hue$1,{width:"auto",height:10,hue:_e.h,pointer:Bar,innerProps:{style:{marginLeft:1,marginRight:5}},onChange:Oe=>Ee(_extends({},_e,Oe))}),!J&&jsxRuntimeExports.jsx(Alpha$1,{width:"auto",height:10,hsva:_e,pointer:Bar,style:{marginTop:4},innerProps:{style:{marginLeft:1,marginRight:5}},onChange:Re})]}),!J&&jsxRuntimeExports.jsx(Alpha$1,{width:24,height:24,hsva:_e,radius:2,style:{marginLeft:4},bgProps:{style:{background:"transparent"}},innerProps:{style:Pe},pointer:()=>jsxRuntimeExports.jsx(React.Fragment,{})})]})]}),K&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",margin:"0 10px 3px 10px"},children:[jsxRuntimeExports.jsx(EditableInput$1,{label:"Hex",value:hsvaToHex(_e).replace(/^#/,"").toLocaleUpperCase(),onChange:(Oe,Le)=>Ae(Le),style:{minWidth:58}}),jsxRuntimeExports.jsx(RGBA,{hsva:_e,style:{marginLeft:6},aProps:J?!1:{},onChange:Oe=>Ee(Oe.hsva)})]}),X&&X.length>0&&jsxRuntimeExports.jsx(Swatch$1,{style:Ie,colors:X,color:hsvaToHex(_e),onChange:Oe=>Ee(Oe),rectProps:{style:Me}})]}))});Sketch.displayName="Sketch";const Sketch$1=Sketch,ColorPickerPortal=({position:C,color:E,onChange:I,onClose:B})=>{const U=React__namespace.useCallback(K=>{I(K.hex)},[I]);React__namespace.useEffect(()=>{const K=J=>{var xe;J.target instanceof Node&&!((xe=document.getElementById("color-picker-portal"))!=null&&xe.contains(J.target))&&B()};return document.addEventListener("mousedown",K),()=>{document.removeEventListener("mousedown",K)}},[B]);const V=React__namespace.useCallback(()=>{const Z=window.innerWidth,_e=window.innerHeight;let{x:Se,y:Ee}=C;return Se+220+10>Z&&(Se=Z-220-10),Ee+300+10>_e&&(Ee=Ee-300-10),{x:Se,y:Ee}},[C]),{x:X,y:Y}=V();return require$$0$1.createPortal(jsxRuntimeExports.jsxs("div",{style:{position:"fixed",left:X,top:Y,zIndex:9999,backgroundColor:"white",borderRadius:"8px",boxShadow:"0 10px 15px rgba(0, 0, 0, 0.1)",padding:"8px"},children:[jsxRuntimeExports.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:-1},onClick:B}),jsxRuntimeExports.jsx(Sketch$1,{color:E,onChange:U})]}),document.body)},MENUS_ICONS={ARROW_DOWN:"▼",ARROW_UP:"▲",COLOR:"🎨",COPY:"📋",DELETE:"❌",TRASH:"🗑️",EYE:"👁️",EYE_SLASH:"👁️‍🗨️",LOCK:"🔒",UNLOCK:"🔓",PASTE:"📋",PENCIL:"✏️",PLUS:"➕",MINUS:"➖",ROTATE:"🔄",SCALE:"⚖️",SAVE:"💾",RESET:"🔄",SETTINGS:"⚙️",ZOOM_IN:"🔍",ZOOM_OUT:"🔍",ALIGN_LEFT:"☰",ALIGN_CENTER:"≣",ALIGN_RIGHT:"⋰",DISTRIBUTE_HORIZONTALLY:"↔️",DISTRIBUTE_VERTICALLY:"↕️",FLIP_HORIZONTAL:"↔️",FLIP_VERTICAL:"↕️",ROTATE_LEFT:"↺",ROTATE_RIGHT:"↻",SCALE_DOWN:"➖",SCALE_UP:"➕",ADJUST_EQUALISER:"🔊",ADJUST_EQUALISER_SLIDERS:"🎚️",ADJUST_HORIZONTAL_SLIDERS:"🔲",COLOR_FILL:"🎨"},MAX_RECENT_COLORS=10,useDropDownMenu=C=>{const E=React.useRef(null),I=react.useApp();return{createMenu:React.useCallback((U,V,X)=>{if(!U||!I)return;const Y=new PIXI__namespace.Container;I.stage.addChild(Y),E.current=Y;const K=132,J=(32+4)*V.length+8,xe=new PIXI__namespace.Graphics;xe.beginFill(16777215,.95),xe.lineStyle(1,14540253),xe.drawRoundedRect(0,0,K,J,4),xe.endFill(),Y.addChild(xe);const Z=new F;Z.alpha=.2,Z.blur=2,Z.distance=3,Y.filters=[Z],V.forEach((Se,Ee)=>{const Ae=new PIXI__namespace.Container;Ae.eventMode="static";const Re=new PIXI__namespace.Graphics;Re.beginFill(16777215,0),Re.drawRect(0,0,K,32),Re.endFill(),Ae.addChild(Re);const Te=new PIXI__namespace.Text(Se.icon,{fontSize:14,fontFamily:"Arial",fill:3355443});Te.x=8,Te.y=32/2-Te.height/2,Ae.addChild(Te);const we=new PIXI__namespace.Text(Se.label,{fontSize:12,fontFamily:"Arial",fill:3355443});we.x=32+4,we.y=32/2-we.height/2,Ae.addChild(we),Ae.y=Ee*(32+4)+4,Ae.on("pointerover",()=>{Re.clear(),Re.beginFill(15790320),Re.drawRect(0,0,K,32),Re.endFill()}).on("pointerout",()=>{Re.clear(),Re.beginFill(16777215,0),Re.drawRect(0,0,K,32),Re.endFill()}).on("pointerup",()=>{Se.action(),C(!1)}),Y.addChild(Ae)}),Y.x=X.x,Y.y=X.y;const _e=Se=>{const Ee=new PIXI__namespace.Point(Se.global.x,Se.global.y);Y.getBounds().contains(Ee.x,Ee.y)||C(!1)};return I.stage.on("pointerdown",_e),()=>{I.stage.off("pointerdown",_e),Y.parent&&Y.parent.removeChild(Y)}},[]),dropdownRef:E}},TransformerMenu=({PixiTransformer:C})=>{const E=React.useRef(null),I=React.useRef(null),B=React.useRef(null),U=react.useApp(),[V,X]=React.useState(!1),[Y,K]=React.useState({x:0,y:0}),[,J]=React.useState(!1),[xe,Z]=React.useState("#000000"),[,_e]=React.useState({x:0,y:0}),[Se,Ee]=React.useState(!1),[Ae,Re]=React.useState({x:0,y:0}),[Te,we]=React.useState(()=>{const ke=localStorage.getItem("recentColors");return ke?JSON.parse(ke):[]}),{createMenu:Pe,dropdownRef:Ie}=useDropDownMenu(Ee),Me=32,Oe=4,Le=8,Ne=[{icon:"B",action:()=>{},tooltip:"Bold"},{icon:"I",action:()=>{},tooltip:"Italic"},{icon:"U",action:()=>{},tooltip:"Underline"},{icon:"🎨",action:(ke,Ge)=>{const Be={x:Y.x+ke,y:Y.y+Ge+33},qe=U.view.getBoundingClientRect(),Ke=qe.left+Be.x,Ye=qe.top+Be.y;De(Ke,Ye)},tooltip:"Color",withPreview:!0},{icon:MENUS_ICONS.ARROW_DOWN,action:(ke,Ge)=>{We(ke,Ge)},tooltip:"Alignment Options"}],Ve=[{icon:MENUS_ICONS.ALIGN_LEFT,action:()=>console.log("Align Left"),label:"Left"},{icon:MENUS_ICONS.ALIGN_CENTER,action:()=>console.log("Align Center"),label:"Center"},{icon:MENUS_ICONS.ALIGN_RIGHT,action:()=>console.log("Align Right"),label:"Right"},{icon:"↑",action:()=>console.log("bring forward"),label:"Bring Forward"},{icon:"↓",action:()=>console.log("send backward"),label:"Send Backward"}],Xe=(Me+Oe)*Ne.length+Le*2-Oe,Ue=Me+Le*2,We=React.useCallback((ke,Ge)=>{Ee(Be=>!Be),Re({x:Y.x+ke,y:Y.y+Ge+Me+5})},[Y,Me]),ze=React.useCallback(()=>{B.current&&(B.current.unmount(),J(!1)),Ie.current&&Ie.current.parent&&(Ie.current.parent.removeChild(Ie.current),Ie.current=null,Ee(!1))},[]),He=React.useCallback(()=>{const ke=document.createElement("div");return ke.id="color-picker-portal",document.body.appendChild(ke),I.current=ke,B.current=createRoot(ke),()=>{ke&&ke.parentNode&&document.body.removeChild(ke)}},[]);React.useEffect(()=>{He()},[]);const je=React.useCallback(ke=>{Z(ke),we(Ge=>{const Be=[ke,...Ge.filter(qe=>qe!==ke)].slice(0,MAX_RECENT_COLORS);return localStorage.setItem("recentColors",JSON.stringify(Be)),Be})},[]),$e=React.useCallback(()=>{J(!1),B.current&&B.current.unmount()},[]),De=React.useCallback((ke,Ge)=>{I.current&&B.current&&(_e({x:ke,y:Ge}),J(!0),(!B.current||!B.current._internalRoot)&&He(),B.current.render(jsxRuntimeExports.jsx(ColorPickerPortal,{position:{x:ke,y:Ge},color:xe,onChange:je,onClose:$e,recentColors:Te})))},[xe,je,$e]);React.useEffect(()=>{const ke=()=>{if(C.current){const Be=C.current.getBounds();K({x:Be.x+Be.width/2-Xe/2,y:Be.y+Be.height})}},Ge=setTimeout(()=>{E.current&&(ke(),X(!0))},300);return()=>{clearTimeout(Ge)}},[]);const Fe=React.useCallback(()=>{if(ze(),C.current){const ke=C.current.getBounds();K({x:ke.x+ke.width/2-Xe/2,y:ke.y+ke.height})}},[ze]);return React.useEffect(()=>{const ke=Ge=>{if(I.current){const Be=I.current.firstChild;Be&&!Be.contains(Ge.target)&&ze()}(Ge.type==="resize"||Ge.type==="scroll")&&ze()};return window.addEventListener("click",ke),window.addEventListener("resize",ke),window.addEventListener("scroll",ke),()=>{window.removeEventListener("click",ke),window.removeEventListener("resize",ke),window.removeEventListener("scroll",ke)}},[ze]),React.useEffect(()=>{var Ke;if(!U||!V||!C.current||!E.current)return;const ke=C.current,Ge=new PIXI__namespace.Container;(Ke=E.current)==null||Ke.addChild(Ge),ke.addListener("transformchange",Fe);const Be=new PIXI__namespace.Graphics;Be.beginFill(16777215,.9),Be.lineStyle(1,14540253),Be.drawRoundedRect(0,0,Xe,Ue,4),Be.endFill(),Ge.addChild(Be);const qe=new F;return qe.alpha=.2,qe.blur=2,qe.distance=3,Ge.filters=[qe],Ne.forEach((Ye,Qe)=>{const Ze=new PIXI__namespace.Container,it=Le+(Me+Oe)*Qe,at=Le,st=new PIXI__namespace.Graphics;st.beginFill(16119285),st.drawRoundedRect(0,0,Me,Me,4),st.endFill(),Ze.addChild(st);const Je=new PIXI__namespace.Text(Ye.icon,{fontSize:14,fontFamily:"Arial",fill:Ye.icon==="🎨"?xe:3355443,fontWeight:"bold"});Je.x=Me/2-Je.width/2,Je.y=Me/2-Je.height/2,Ze.addChild(Je),Ze.x=it,Ze.y=at,Ze.interactive=!0,Ze.eventMode="static",Ze.on("pointerover",()=>{st.clear(),st.beginFill(15658734),st.drawRoundedRect(0,0,Me,Me,4),st.endFill(),Ye.icon!=="🎨"&&(Je.style.fill=0)}),Ze.on("pointerout",()=>{st.clear(),st.beginFill(16119285),st.drawRoundedRect(0,0,Me,Me,4),st.endFill(),Ye.icon!=="🎨"&&(Je.style.fill=3355443)}),Ze.on("pointerdown",()=>{st.clear(),st.beginFill(14737632),st.drawRoundedRect(0,0,Me,Me,4),st.endFill()}),Ze.on("pointerup",()=>{st.clear(),st.beginFill(16119285),st.drawRoundedRect(0,0,Me,Me,4),st.endFill(),Ye.action(it,at)}),Ge.addChild(Ze)}),Ge.x=Y.x,Ge.y=Y.y,Ge.visible=ke.visible,()=>{E.current&&E.current.removeChild(Ge),C.current&&C.current.removeListener("transformchange",Fe)}},[U,V,Y,Ne,Xe,Ue,xe]),React.useEffect(()=>Pe(Se,Ve,Ae),[Se,Ve,Ae]),React.useEffect(()=>()=>{ze()},[ze]),jsxRuntimeExports.jsx(react.Sprite,{texture:PIXI__namespace.Texture.EMPTY,ref:E,x:10,y:10})},CYAN=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],initalTransforms$1={x:0,y:0,width:0,height:0,anchor:.5,animation:Animations.NONE,maxX:0,maxY:0,scale:1,rotation:0,effect:Effects.Normal,overlay:OverlayTypes.NONE},AbstractContainer=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(!1),[U,V]=React.useState(!1),[X,Y]=React.useState(!1),[K,J]=React.useState(),xe=useDebounce(K,300),Z=React.useRef(null),_e=React.useRef(null),Se=React.useRef(null),Ee=React.useRef(null),Ae=React.useRef(null),Re=React.useRef(null),{tl:Te}=React.useContext(GsapPixieContext),we=react.useApp(),Pe=we.screen.width,Ie=we.screen.height,{uniqueId:Me,visible:Oe,startAt:Le,transformation:Ne=initalTransforms$1,applyTransformer:Ve,disabled:Xe,pointerdown:Ue,pointerout:We,pointerover:ze,isText:He,isDragging:je,isGif:$e,onDoubleClick:De,isTextEditMode:Fe}=C,{x:ke=0,y:Ge=0,width:Be,height:qe,scale:Ke=[1,1],rotation:Ye=0,effect:Qe,overlay:Ze,animation:it=Animations.NONE}=Ne,at=useGsapEffect();useCustomEventListener(Events.COMPLETE,()=>{Z.current}),React__namespace.useImperativeHandle(E,()=>({getIsTransformerDragging:()=>U,getIsMouseOverTransformer:()=>X}),[U,X]),React__namespace.useEffect(()=>{Z.current&&B(!0)},[]),React__namespace.useEffect(()=>{J({x:ke,y:Ge,width:Be,height:qe,animation:it,maxX:Pe,maxY:Ie})},[it,ke,Ge,Be,qe,Pe,Ie]),React__namespace.useEffect(()=>{if(!_e.current)return;const rt=gsap$2.context(()=>{if(Te.current&&xe){const{x:tt,y:ot,animation:ut,maxX:mt,maxY:pt}=xe||{},yt=Te.current.progress(),gt=at.updateEffect(Z.current,ut,{immediateRender:!1,x:tt,y:ot,overwrite:!0,maxX:mt,maxY:pt});Ae.current&&(Te.current.remove(Ae.current),Ae.current.progress(0).kill()),yt>.1?(gt.eventCallback("onComplete",()=>{gt.remove("onComplete"),Te.current.add(gt,Le),Ae.current=gt}),gt.play()):(gt.progress(1),Te.current.add(gt,Le),Ae.current=gt)}else Ae.current&&Ae.current.progress(0).kill()},_e.current);return()=>{rt.revert()}},[Le,xe]);const st=React__namespace.useCallback(()=>{Y(!0),ze&&ze()},[]),Je=React__namespace.useCallback(()=>{V(!0)},[]),et=React__namespace.useCallback(rt=>{C.onAnchorTransformationEnd&&C.onAnchorTransformationEnd(rt),V(!1)},[]),nt=react.withFilters(react.Container,{matrix:PIXI__namespace.filters.ColorMatrixFilter});return jsxRuntimeExports.jsxs(react.Container,{ref:_e,children:[jsxRuntimeExports.jsx(react.Container,{ref:Z,position:[ke,Ge],pivot:[ke,Ge],width:Be,height:qe,scale:Ke,rotation:Ye,...!Xe&&Oe&&!U&&!je&&{interactive:!0,buttonMode:!0,pointerdown:Ue,pointerover:ze,pointerout:We},children:jsxRuntimeExports.jsxs(react.Container,{ref:Re,children:[!$e&&jsxRuntimeExports.jsx(nt,{scale:1,apply:({matrix:rt})=>{Qe===Effects.BlackAndWhite?rt.desaturate():Qe===Effects.Sepia?rt.sepia():Qe===Effects.RetroVintage||Qe===Effects.NightVision?rt.negative():Qe===Effects.Normal&&rt.reset()},matrix:{enabled:!0,matrix:CYAN},children:jsxRuntimeExports.jsx(react.Container,{ref:Se,children:C.children})}),$e&&jsxRuntimeExports.jsx(react.Container,{ref:Se,children:C.children}),!isEmpty$1(Ze)&&Ze!==OverlayTypes.NONE&&Ze!==OverlayTypes.NORMAL&&jsxRuntimeExports.jsx(PixiOverlayTilingSprite,{overlay:Ze,width:Be,height:qe,x:ke,y:Ge})]})}),Ve&&Oe&&!Fe&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PixiTransformer,{pixiTransformerRef:Ee,imageRef:Z,isMounted:I,transformCommit:et,transformChange:Je,mouseoverEvent:st,uniqueId:Me,isText:He,onDoubleClick:De}),jsxRuntimeExports.jsx(TransformerMenu,{PixiTransformer:Ee,uniqueId:Me,isText:!!He})]})]})}),withFiltersHook=C=>{const{contrast:E=1,saturation:I=1,brightness:B=1,alpha:U=1,red:V=1,blue:X=1,gamma:Y=1,green:K=1,blurRadius:J=0,temperature:xe=0,hue:Z=0,sharpness:_e=0,vignette:Se=0,noise:Ee=0}=C||{},Ae=new PIXI__namespace.Filter(null,`
1925
1925
  precision mediump float;
1926
1926
  varying vec2 vTextureCoord;
1927
1927
  uniform sampler2D uSampler;
@@ -1933,7 +1933,7 @@ void main() {
1933
1933
  color.b = color.b - (temperature / 100.0);
1934
1934
  gl_FragColor = color;
1935
1935
  }
1936
- `);m.uniforms.temperature=d;const v=new U1([0,-c,0,-c,1+4*c,-c,0,-c,0]),g=new $e.filters.ColorMatrixFilter;g.hue(l,!1);const y=new di(h,1,!0),_=new Fc({vignetting:f}),x=new $e.filters.NoiseFilter(p);return{adjustmentFilter:new i1({...o&&{gamma:o},...i&&{brightness:i},...e&&{contrast:e},...r&&{saturation:r},...s&&{red:s},...u&&{green:u},...a&&{blue:a},...n&&{alpha:n}}),blurFilter:y,hueFilter:g,sharpnessFilter:v,temperatureFilter:m,vignetteFilter:_,noiseFilter:x}},MT=()=>{const t=new $e.Filter(null,`
1936
+ `);Ae.uniforms.temperature=xe;const Re=new n$3([0,-_e,0,-_e,1+4*_e,-_e,0,-_e,0]),Te=new PIXI__namespace.filters.ColorMatrixFilter;Te.hue(Z,!1);const we=new _$1(J,1,!0),Pe=new r$2({vignetting:Se}),Ie=new PIXI__namespace.filters.NoiseFilter(Ee);return{adjustmentFilter:new s$4({...Y&&{gamma:Y},...B&&{brightness:B},...E&&{contrast:E},...I&&{saturation:I},...V&&{red:V},...K&&{green:K},...X&&{blue:X},...U&&{alpha:U}}),blurFilter:we,hueFilter:Te,sharpnessFilter:Re,temperatureFilter:Ae,vignetteFilter:Pe,noiseFilter:Ie}},withEffectsHooks=()=>{const C=new PIXI__namespace.Filter(null,`
1937
1937
  precision mediump float;
1938
1938
  uniform mat3 uNightVisionMatrix;
1939
1939
  varying vec2 vTextureCoord;
@@ -1944,7 +1944,7 @@ void main() {
1944
1944
  vec3 color = texColor.rgb;
1945
1945
  gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
1946
1946
  }
1947
- `),e=[.393,.769,.189,.349,.686,.168,.272,.534,.131];t.uniforms.uNightVisionMatrix=e;const r=new $e.Filter(null,`
1947
+ `),E=[.393,.769,.189,.349,.686,.168,.272,.534,.131];C.uniforms.uNightVisionMatrix=E;const I=new PIXI__namespace.Filter(null,`
1948
1948
  precision mediump float;
1949
1949
  varying vec2 vTextureCoord;
1950
1950
  uniform sampler2D uSampler;
@@ -1958,7 +1958,7 @@ void main() {
1958
1958
  float vignette = 1.0 - smoothstep(vignetteSize, 0.5, length(delta));
1959
1959
  gl_FragColor = texColor * vignetteColor * vignetteStrength * vignette;
1960
1960
  }
1961
- `);return r.uniforms.vignetteColor=[0,0,0,1],r.uniforms.vignetteSize=.7,r.uniforms.vignetteStrength=.6,{nightVisionFilter:t,vignetteFilter:r}},Gc=L.forwardRef((t,e)=>{const r=P.useRef(null),i=P.useRef(null),{src:n,visible:s,disabled:a,transformation:{x:o,y:u,width:h,height:d,anchor:l,colorCorrection:c={},effect:f},pointerdown:p}=t,{blurRadius:m=0,vignette:v=0,noise:g=0}=c,{temperatureFilter:y,sharpnessFilter:_,hueFilter:x,blurFilter:T,adjustmentFilter:w,vignetteFilter:b,noiseFilter:S}=er(c),{nightVisionFilter:A}=MT();return L.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Z.jsx(Ut,{...t,ref:e,children:Z.jsx(ee.Container,{ref:i,children:Z.jsx(ee.Sprite,{image:n,width:h,height:d,anchor:l,ref:r,alpha:s?1:0,x:o,y:u,...!a&&s&&{interactive:!0,pointerdown:p},filters:[y,_,x,w,...m>0?[T]:[],...f===Dt.NightVision?[A]:[],...v>0?[b]:[],...g>0?[S]:[]]})})})});Gc.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Cn={build(t){const e=t.points;let r,i,n,s,a,o;if(t.type===Me.CIRC){const p=t.shape;r=p.x,i=p.y,a=o=p.radius,n=s=0}else if(t.type===Me.ELIP){const p=t.shape;r=p.x,i=p.y,a=p.width,o=p.height,n=s=0}else{const p=t.shape,m=p.width/2,v=p.height/2;r=p.x+m,i=p.y+v,a=o=Math.max(0,Math.min(p.radius,Math.min(m,v))),n=m-a,s=v-o}if(!(a>=0&&o>=0&&n>=0&&s>=0)){e.length=0;return}const u=Math.ceil(2.3*Math.sqrt(a+o)),h=u*8+(n?4:0)+(s?4:0);if(e.length=h,h===0)return;if(u===0){e.length=8,e[0]=e[6]=r+n,e[1]=e[3]=i+s,e[2]=e[4]=r-n,e[5]=e[7]=i-s;return}let d=0,l=u*4+(n?2:0)+2,c=l,f=h;{const p=n+a,m=s,v=r+p,g=r-p,y=i+m;if(e[d++]=v,e[d++]=y,e[--l]=y,e[--l]=g,s){const _=i-m;e[c++]=g,e[c++]=_,e[--f]=_,e[--f]=v}}for(let p=1;p<u;p++){const m=Math.PI/2*(p/u),v=n+Math.cos(m)*a,g=s+Math.sin(m)*o,y=r+v,_=r-v,x=i+g,T=i-g;e[d++]=y,e[d++]=x,e[--l]=x,e[--l]=_,e[c++]=_,e[c++]=T,e[--f]=T,e[--f]=y}{const p=n,m=s+o,v=r+p,g=r-p,y=i+m,_=i-m;e[d++]=v,e[d++]=y,e[--f]=_,e[--f]=v,n&&(e[d++]=g,e[d++]=y,e[--f]=_,e[--f]=g)}},triangulate(t,e){const r=t.points,i=e.points,n=e.indices;if(r.length===0)return;let s=i.length/2;const a=s;let o,u;if(t.type!==Me.RREC){const d=t.shape;o=d.x,u=d.y}else{const d=t.shape;o=d.x+d.width/2,u=d.y+d.height/2}const h=t.matrix;i.push(t.matrix?h.a*o+h.c*u+h.tx:o,t.matrix?h.b*o+h.d*u+h.ty:u),s++,i.push(r[0],r[1]);for(let d=2;d<r.length;d+=2)i.push(r[d],r[d+1]),n.push(s++,a,s);n.push(a+1,a,s)}};function zc(t,e=!1){const r=t.length;if(r<6)return;let i=0;for(let n=0,s=t[r-2],a=t[r-1];n<r;n+=2){const o=t[n],u=t[n+1];i+=(o-s)*(u+a),s=o,a=u}if(!e&&i>0||e&&i<=0){const n=r/2;for(let s=n+n%2;s<r;s+=2){const a=r-s-2,o=r-s-1,u=s,h=s+1;[t[a],t[u]]=[t[u],t[a]],[t[o],t[h]]=[t[h],t[o]]}}}const jc={build(t){t.points=t.shape.points.slice()},triangulate(t,e){let r=t.points;const i=t.holes,n=e.points,s=e.indices;if(r.length>=6){zc(r,!1);const a=[];for(let h=0;h<i.length;h++){const d=i[h];zc(d.points,!0),a.push(r.length/2),r=r.concat(d.points)}const o=__(r,a,2);if(!o)return;const u=n.length/2;for(let h=0;h<o.length;h+=3)s.push(o[h]+u),s.push(o[h+1]+u),s.push(o[h+2]+u);for(let h=0;h<r.length;h++)n.push(r[h])}}},FT={build(t){const e=t.shape,r=e.x,i=e.y,n=e.width,s=e.height,a=t.points;a.length=0,n>=0&&s>=0&&a.push(r,i,r+n,i,r+n,i+s,r,i+s)},triangulate(t,e){const r=t.points,i=e.points;if(r.length===0)return;const n=i.length/2;i.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(n,n+1,n+2,n+1,n+2,n+3)}},OT={build(t){Cn.build(t)},triangulate(t,e){Cn.triangulate(t,e)}};var at=(t=>(t.MITER="miter",t.BEVEL="bevel",t.ROUND="round",t))(at||{}),tr=(t=>(t.BUTT="butt",t.ROUND="round",t.SQUARE="square",t))(tr||{});const Or={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(t,e=20){if(!this.adaptive||!t||isNaN(t))return e;let r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class Hc{static curveTo(e,r,i,n,s,a){const o=a[a.length-2],h=a[a.length-1]-r,d=o-e,l=n-r,c=i-e,f=Math.abs(h*c-d*l);if(f<1e-8||s===0)return(a[a.length-2]!==e||a[a.length-1]!==r)&&a.push(e,r),null;const p=h*h+d*d,m=l*l+c*c,v=h*l+d*c,g=s*Math.sqrt(p)/f,y=s*Math.sqrt(m)/f,_=g*v/p,x=y*v/m,T=g*c+y*d,w=g*l+y*h,b=d*(y+_),S=h*(y+_),A=c*(g+x),I=l*(g+x),F=Math.atan2(S-w,b-T),B=Math.atan2(I-w,A-T);return{cx:T+e,cy:w+r,radius:s,startAngle:F,endAngle:B,anticlockwise:d*l>c*h}}static arc(e,r,i,n,s,a,o,u,h){const d=o-a,l=Or._segmentsCount(Math.abs(d)*s,Math.ceil(Math.abs(d)/on)*40),c=d/(l*2),f=c*2,p=Math.cos(c),m=Math.sin(c),v=l-1,g=v%1/v;for(let y=0;y<=v;++y){const _=y+g*y,x=c+a+f*_,T=Math.cos(x),w=-Math.sin(x);h.push((p*T+m*w)*s+i,(p*-w+m*T)*s+n)}}}class NT{constructor(){this.reset()}begin(e,r,i){this.reset(),this.style=e,this.start=r,this.attribStart=i}end(e,r){this.attribSize=r-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Ra{static curveLength(e,r,i,n,s,a,o,u){let d=0,l=0,c=0,f=0,p=0,m=0,v=0,g=0,y=0,_=0,x=0,T=e,w=r;for(let b=1;b<=10;++b)l=b/10,c=l*l,f=c*l,p=1-l,m=p*p,v=m*p,g=v*e+3*m*l*i+3*p*c*s+f*o,y=v*r+3*m*l*n+3*p*c*a+f*u,_=T-g,x=w-y,T=g,w=y,d+=Math.sqrt(_*_+x*x);return d}static curveTo(e,r,i,n,s,a,o){const u=o[o.length-2],h=o[o.length-1];o.length-=2;const d=Or._segmentsCount(Ra.curveLength(u,h,e,r,i,n,s,a));let l=0,c=0,f=0,p=0,m=0;o.push(u,h);for(let v=1,g=0;v<=d;++v)g=v/d,l=1-g,c=l*l,f=c*l,p=g*g,m=p*g,o.push(f*u+3*c*g*e+3*l*p*i+m*s,f*h+3*c*g*r+3*l*p*n+m*a)}}function Vc(t,e,r,i,n,s,a,o){const u=t-r*n,h=e-i*n,d=t+r*s,l=e+i*s;let c,f;a?(c=i,f=-r):(c=-i,f=r);const p=u+c,m=h+f,v=d+c,g=l+f;return o.push(p,m,v,g),2}function rr(t,e,r,i,n,s,a,o){const u=r-t,h=i-e;let d=Math.atan2(u,h),l=Math.atan2(n-t,s-e);o&&d<l?d+=Math.PI*2:!o&&d>l&&(l+=Math.PI*2);let c=d;const f=l-d,p=Math.abs(f),m=Math.sqrt(u*u+h*h),v=(15*p*Math.sqrt(m)/Math.PI>>0)+1,g=f/v;if(c+=g,o){a.push(t,e,r,i);for(let y=1,_=c;y<v;y++,_+=g)a.push(t,e,t+Math.sin(_)*m,e+Math.cos(_)*m);a.push(t,e,n,s)}else{a.push(r,i,t,e);for(let y=1,_=c;y<v;y++,_+=g)a.push(t+Math.sin(_)*m,e+Math.cos(_)*m,t,e);a.push(n,s,t,e)}return v*2}function kT(t,e){const r=t.shape;let i=t.points||r.points.slice();const n=e.closePointEps;if(i.length===0)return;const s=t.lineStyle,a=new me(i[0],i[1]),o=new me(i[i.length-2],i[i.length-1]),u=r.type!==Me.POLY||r.closeStroke,h=Math.abs(a.x-o.x)<n&&Math.abs(a.y-o.y)<n;if(u){i=i.slice(),h&&(i.pop(),i.pop(),o.set(i[i.length-2],i[i.length-1]));const R=(a.x+o.x)*.5,U=(o.y+a.y)*.5;i.unshift(R,U),i.push(R,U)}const d=e.points,l=i.length/2;let c=i.length;const f=d.length/2,p=s.width/2,m=p*p,v=s.miterLimit*s.miterLimit;let g=i[0],y=i[1],_=i[2],x=i[3],T=0,w=0,b=-(y-x),S=g-_,A=0,I=0,F=Math.sqrt(b*b+S*S);b/=F,S/=F,b*=p,S*=p;const B=s.alignment,E=(1-B)*2,C=B*2;u||(s.cap===tr.ROUND?c+=rr(g-b*(E-C)*.5,y-S*(E-C)*.5,g-b*E,y-S*E,g+b*C,y+S*C,d,!0)+2:s.cap===tr.SQUARE&&(c+=Vc(g,y,b,S,E,C,!0,d))),d.push(g-b*E,y-S*E,g+b*C,y+S*C);for(let R=1;R<l-1;++R){g=i[(R-1)*2],y=i[(R-1)*2+1],_=i[R*2],x=i[R*2+1],T=i[(R+1)*2],w=i[(R+1)*2+1],b=-(y-x),S=g-_,F=Math.sqrt(b*b+S*S),b/=F,S/=F,b*=p,S*=p,A=-(x-w),I=_-T,F=Math.sqrt(A*A+I*I),A/=F,I/=F,A*=p,I*=p;const U=_-g,X=y-x,M=_-T,O=w-x,H=U*M+X*O,V=X*M-O*U,W=V<0;if(Math.abs(V)<.001*Math.abs(H)){d.push(_-b*E,x-S*E,_+b*C,x+S*C),H>=0&&(s.join===at.ROUND?c+=rr(_,x,_-b*E,x-S*E,_-A*E,x-I*E,d,!1)+4:c+=2,d.push(_-A*C,x-I*C,_+A*E,x+I*E));continue}const ne=(-b+g)*(-S+x)-(-b+_)*(-S+y),oe=(-A+T)*(-I+x)-(-A+_)*(-I+w),ce=(U*oe-M*ne)/V,ge=(O*ne-X*oe)/V,fe=(ce-_)*(ce-_)+(ge-x)*(ge-x),z=_+(ce-_)*E,q=x+(ge-x)*E,Y=_-(ce-_)*C,pe=x-(ge-x)*C,De=Math.min(U*U+X*X,M*M+O*O),K=W?E:C,_e=De+K*K*m,Qe=fe<=_e;let ct=s.join;if(ct===at.MITER&&fe/m>v&&(ct=at.BEVEL),Qe)switch(ct){case at.MITER:{d.push(z,q,Y,pe);break}case at.BEVEL:{W?d.push(z,q,_+b*C,x+S*C,z,q,_+A*C,x+I*C):d.push(_-b*E,x-S*E,Y,pe,_-A*E,x-I*E,Y,pe),c+=2;break}case at.ROUND:{W?(d.push(z,q,_+b*C,x+S*C),c+=rr(_,x,_+b*C,x+S*C,_+A*C,x+I*C,d,!0)+4,d.push(z,q,_+A*C,x+I*C)):(d.push(_-b*E,x-S*E,Y,pe),c+=rr(_,x,_-b*E,x-S*E,_-A*E,x-I*E,d,!1)+4,d.push(_-A*E,x-I*E,Y,pe));break}}else{switch(d.push(_-b*E,x-S*E,_+b*C,x+S*C),ct){case at.MITER:{W?d.push(Y,pe,Y,pe):d.push(z,q,z,q),c+=2;break}case at.ROUND:{W?c+=rr(_,x,_+b*C,x+S*C,_+A*C,x+I*C,d,!0)+2:c+=rr(_,x,_-b*E,x-S*E,_-A*E,x-I*E,d,!1)+2;break}}d.push(_-A*E,x-I*E,_+A*C,x+I*C),c+=2}}g=i[(l-2)*2],y=i[(l-2)*2+1],_=i[(l-1)*2],x=i[(l-1)*2+1],b=-(y-x),S=g-_,F=Math.sqrt(b*b+S*S),b/=F,S/=F,b*=p,S*=p,d.push(_-b*E,x-S*E,_+b*C,x+S*C),u||(s.cap===tr.ROUND?c+=rr(_-b*(E-C)*.5,x-S*(E-C)*.5,_-b*E,x-S*E,_+b*C,x+S*C,d,!1)+2:s.cap===tr.SQUARE&&(c+=Vc(_,x,b,S,E,C,!1,d)));const $=e.indices,G=Or.epsilon*Or.epsilon;for(let R=f;R<c+f-2;++R)g=d[R*2],y=d[R*2+1],_=d[(R+1)*2],x=d[(R+1)*2+1],T=d[(R+2)*2],w=d[(R+2)*2+1],!(Math.abs(g*(x-w)+_*(w-y)+T*(y-x))<G)&&$.push(R,R+1,R+2)}function LT(t,e){let r=0;const i=t.shape,n=t.points||i.points,s=i.type!==Me.POLY||i.closeStroke;if(n.length===0)return;const a=e.points,o=e.indices,u=n.length/2,h=a.length/2;let d=h;for(a.push(n[0],n[1]),r=1;r<u;r++)a.push(n[r*2],n[r*2+1]),o.push(d,d+1),d++;s&&o.push(d,h)}function Xc(t,e){t.lineStyle.native?LT(t,e):kT(t,e)}class Pa{static curveLength(e,r,i,n,s,a){const o=e-2*i+s,u=r-2*n+a,h=2*i-2*e,d=2*n-2*r,l=4*(o*o+u*u),c=4*(o*h+u*d),f=h*h+d*d,p=2*Math.sqrt(l+c+f),m=Math.sqrt(l),v=2*l*m,g=2*Math.sqrt(f),y=c/m;return(v*p+m*c*(p-g)+(4*f*l-c*c)*Math.log((2*m+y+p)/(y+g)))/(4*v)}static curveTo(e,r,i,n,s){const a=s[s.length-2],o=s[s.length-1],u=Or._segmentsCount(Pa.curveLength(a,o,e,r,i,n));let h=0,d=0;for(let l=1;l<=u;++l){const c=l/u;h=a+(e-a)*c,d=o+(r-o)*c,s.push(h+(e+(i-e)*c-h)*c,d+(r+(n-r)*c-d)*c)}}}const Ma={[Me.POLY]:jc,[Me.CIRC]:Cn,[Me.ELIP]:Cn,[Me.RECT]:FT,[Me.RREC]:OT},Wc=[],In=[];class Fa{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?de.EMPTY:(e=e||new de(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,r){const{a:i,b:n,c:s,d:a,tx:o,ty:u}=e,h=i*r.x+s*r.y+o,d=n*r.x+a*r.y+u;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(e){let r=this.minX,i=this.minY,n=this.maxX,s=this.maxY,a=e[0],o=e[1];r=a<r?a:r,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,a=e[2],o=e[3],r=a<r?a:r,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,a=e[4],o=e[5],r=a<r?a:r,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,a=e[6],o=e[7],r=a<r?a:r,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,this.minX=r,this.minY=i,this.maxX=n,this.maxY=s}addFrame(e,r,i,n,s){this.addFrameMatrix(e.worldTransform,r,i,n,s)}addFrameMatrix(e,r,i,n,s){const a=e.a,o=e.b,u=e.c,h=e.d,d=e.tx,l=e.ty;let c=this.minX,f=this.minY,p=this.maxX,m=this.maxY,v=a*r+u*i+d,g=o*r+h*i+l;c=v<c?v:c,f=g<f?g:f,p=v>p?v:p,m=g>m?g:m,v=a*n+u*i+d,g=o*n+h*i+l,c=v<c?v:c,f=g<f?g:f,p=v>p?v:p,m=g>m?g:m,v=a*r+u*s+d,g=o*r+h*s+l,c=v<c?v:c,f=g<f?g:f,p=v>p?v:p,m=g>m?g:m,v=a*n+u*s+d,g=o*n+h*s+l,c=v<c?v:c,f=g<f?g:f,p=v>p?v:p,m=g>m?g:m,this.minX=c,this.minY=f,this.maxX=p,this.maxY=m}addVertexData(e,r,i){let n=this.minX,s=this.minY,a=this.maxX,o=this.maxY;for(let u=r;u<i;u+=2){const h=e[u],d=e[u+1];n=h<n?h:n,s=d<s?d:s,a=h>a?h:a,o=d>o?d:o}this.minX=n,this.minY=s,this.maxX=a,this.maxY=o}addVertices(e,r,i,n){this.addVerticesMatrix(e.worldTransform,r,i,n)}addVerticesMatrix(e,r,i,n,s=0,a=s){const o=e.a,u=e.b,h=e.c,d=e.d,l=e.tx,c=e.ty;let f=this.minX,p=this.minY,m=this.maxX,v=this.maxY;for(let g=i;g<n;g+=2){const y=r[g],_=r[g+1],x=o*y+h*_+l,T=d*_+u*y+c;f=Math.min(f,x-s),m=Math.max(m,x+s),p=Math.min(p,T-a),v=Math.max(v,T+a)}this.minX=f,this.minY=p,this.maxX=m,this.maxY=v}addBounds(e){const r=this.minX,i=this.minY,n=this.maxX,s=this.maxY;this.minX=e.minX<r?e.minX:r,this.minY=e.minY<i?e.minY:i,this.maxX=e.maxX>n?e.maxX:n,this.maxY=e.maxY>s?e.maxY:s}addBoundsMask(e,r){const i=e.minX>r.minX?e.minX:r.minX,n=e.minY>r.minY?e.minY:r.minY,s=e.maxX<r.maxX?e.maxX:r.maxX,a=e.maxY<r.maxY?e.maxY:r.maxY;if(i<=s&&n<=a){const o=this.minX,u=this.minY,h=this.maxX,d=this.maxY;this.minX=i<o?i:o,this.minY=n<u?n:u,this.maxX=s>h?s:h,this.maxY=a>d?a:d}}addBoundsMatrix(e,r){this.addFrameMatrix(r,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,r){const i=e.minX>r.x?e.minX:r.x,n=e.minY>r.y?e.minY:r.y,s=e.maxX<r.x+r.width?e.maxX:r.x+r.width,a=e.maxY<r.y+r.height?e.maxY:r.y+r.height;if(i<=s&&n<=a){const o=this.minX,u=this.minY,h=this.maxX,d=this.maxY;this.minX=i<o?i:o,this.minY=n<u?n:u,this.maxX=s>h?s:h,this.maxY=a>d?a:d}}pad(e=0,r=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=r,this.maxY+=r)}addFramePad(e,r,i,n,s,a){e-=s,r-=a,i+=s,n+=a,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>i?this.maxX:i,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>n?this.maxY:n}}class Nr extends Bi{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new ca,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Fa,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const r=Object.keys(e);for(let i=0;i<r.length;++i){const n=r[i];Object.defineProperty(Nr.prototype,n,Object.getOwnPropertyDescriptor(e,n))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(e,r){return e||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new de),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new de),e=this._localBoundsRect),this._localBounds||(this._localBounds=new Fa);const r=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const n=this._bounds,s=this._boundsID;this._bounds=this._localBounds;const a=this.getBounds(!1,e);return this.parent=i,this.transform=r,this._bounds=n,this._bounds.updateID+=this._boundsID-s,a}toGlobal(e,r,i=!1){return i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,r)}toLocal(e,r,i,n){return r&&(e=r.toGlobal(e,i,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,i)}setParent(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e}removeFromParent(){var e;(e=this.parent)==null||e.removeChild(this)}setTransform(e=0,r=0,i=1,n=1,s=0,a=0,o=0,u=0,h=0){return this.position.x=e,this.position.y=r,this.scale.x=i||1,this.scale.y=n||1,this.rotation=s,this.skew.x=a,this.skew.y=o,this.pivot.x=u,this.pivot.y=h,this}destroy(e){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new DT),this.tempDisplayObjectParent}enableTempParent(){const e=this.parent;return this.parent=this._tempDisplayObjectParent,e}disableTempParent(e){this.parent=e}get x(){return this.position.x}set x(e){this.transform.position.x=e}get y(){return this.position.y}set y(e){this.transform.position.y=e}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(e){this.transform.position.copyFrom(e)}get scale(){return this.transform.scale}set scale(e){this.transform.scale.copyFrom(e)}get pivot(){return this.transform.pivot}set pivot(e){this.transform.pivot.copyFrom(e)}get skew(){return this.transform.skew}set skew(e){this.transform.skew.copyFrom(e)}get rotation(){return this.transform.rotation}set rotation(e){this.transform.rotation=e}get angle(){return this.transform.rotation*Qx}set angle(e){this.transform.rotation=e*ai}get zIndex(){return this._zIndex}set zIndex(e){this._zIndex=e,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}get mask(){return this._mask}set mask(e){if(this._mask!==e){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=e,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class DT extends Nr{constructor(){super(...arguments),this.sortDirty=null}}Nr.prototype.displayObjectUpdateTransform=Nr.prototype.updateTransform;const BT=new Ue;function UT(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}const Oa=class extends Nr{constructor(){super(),this.children=[],this.sortableChildren=Oa.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(t){}addChild(...t){if(t.length>1)for(let e=0;e<t.length;e++)this.addChild(t[e]);else{const e=t[0];e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.push(e),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",e,this,this.children.length-1),e.emit("added",this)}return t[0]}addChildAt(t,e){if(e<0||e>this.children.length)throw new Error(`${t}addChildAt: The index ${e} supplied is out of bounds ${this.children.length}`);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t}swapChildren(t,e){if(t===e)return;const r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t,this.onChildrenChange(r<i?r:i)}getChildIndex(t){const e=this.children.indexOf(t);if(e===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return e}setChildIndex(t,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(t);rn(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)}getChildAt(t){if(t<0||t>=this.children.length)throw new Error(`getChildAt: Index (${t}) does not exist.`);return this.children[t]}removeChild(...t){if(t.length>1)for(let e=0;e<t.length;e++)this.removeChild(t[e]);else{const e=t[0],r=this.children.indexOf(e);if(r===-1)return null;e.parent=null,e.transform._parentID=-1,rn(this.children,r,1),this._boundsID++,this.onChildrenChange(r),e.emit("removed",this),this.emit("childRemoved",e,this,r)}return t[0]}removeChildAt(t){const e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,rn(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e}removeChildren(t=0,e=this.children.length){const r=t,i=e,n=i-r;let s;if(n>0&&n<=i){s=this.children.splice(r,n);for(let a=0;a<s.length;++a)s[a].parent=null,s[a].transform&&(s[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(let a=0;a<s.length;++a)s[a].emit("removed",this),this.emit("childRemoved",s[a],this,a);return s}else if(n===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let t=!1;for(let e=0,r=this.children.length;e<r;++e){const i=this.children[e];i._lastSortedIndex=e,!t&&i.zIndex!==0&&(t=!0)}t&&this.children.length>1&&this.children.sort(UT),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let t=0,e=this.children.length;t<e;++t){const r=this.children[t];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let t=0;t<this.children.length;t++){const e=this.children[t];if(!(!e.visible||!e.renderable))if(e.calculateBounds(),e._mask){const r=e._mask.isMaskData?e._mask.maskObject:e._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(e._bounds,r._bounds)):this._bounds.addBounds(e._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(t,e=!1){const r=super.getLocalBounds(t);if(!e)for(let i=0,n=this.children.length;i<n;++i){const s=this.children[i];s.visible&&s.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(t){const e=t.renderTexture.sourceFrame;if(!(e.width>0&&e.height>0))return;let r,i;this.cullArea?(r=this.cullArea,i=this.worldTransform):this._render!==Oa.prototype._render&&(r=this.getBounds(!0));const n=t.projection.transform;if(n&&(i?(i=BT.copyFrom(i),i.prepend(n)):i=n),r&&e.intersects(r,i))this._render(t);else if(this.cullArea)return;for(let s=0,a=this.children.length;s<a;++s){const o=this.children[s],u=o.cullable;o.cullable=u||!this.cullArea,o.render(t),o.cullable=u}}render(t){var e;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(e=this.filters)!=null&&e.length)this.renderAdvanced(t);else if(this.cullable)this._renderWithCulling(t);else{this._render(t);for(let r=0,i=this.children.length;r<i;++r)this.children[r].render(t)}}renderAdvanced(t){var n,s,a;const e=this.filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let o=0;o<e.length;o++)e[o].enabled&&this._enabledFilters.push(e[o])}const i=e&&((n=this._enabledFilters)==null?void 0:n.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==Ee.NONE));if(i&&t.batch.flush(),e&&((s=this._enabledFilters)!=null&&s.length)&&t.filter.push(this,this._enabledFilters),r&&t.mask.push(this,this._mask),this.cullable)this._renderWithCulling(t);else{this._render(t);for(let o=0,u=this.children.length;o<u;++o)this.children[o].render(t)}i&&t.batch.flush(),r&&t.mask.pop(this),e&&((a=this._enabledFilters)!=null&&a.length)&&t.filter.pop()}_render(t){}destroy(t){super.destroy(),this.sortDirty=!1;const e=typeof t=="boolean"?t:t==null?void 0:t.children,r=this.removeChildren(0,this.children.length);if(e)for(let i=0;i<r.length;++i)r[i].destroy(t)}get width(){return this.scale.x*this.getLocalBounds().width}set width(t){const e=this.getLocalBounds().width;e!==0?this.scale.x=t/e:this.scale.x=1,this._width=t}get height(){return this.scale.y*this.getLocalBounds().height}set height(t){const e=this.getLocalBounds().height;e!==0?this.scale.y=t/e:this.scale.y=1,this._height=t}};let kr=Oa;kr.defaultSortableChildren=!1,kr.prototype.containerUpdateTransform=kr.prototype.updateTransform,Object.defineProperties(Q,{SORTABLE_CHILDREN:{get(){return kr.defaultSortableChildren},set(t){re("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),kr.defaultSortableChildren=t}}});class Rn{constructor(e,r=null,i=null,n=null){this.points=[],this.holes=[],this.shape=e,this.lineStyle=i,this.fillStyle=r,this.matrix=n,this.type=e.type}clone(){return new Rn(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const Lr=new me,qc=class extends Au{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Fa,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let t=0;t<this.drawCalls.length;t++)this.drawCalls[t].texArray.clear(),In.push(this.drawCalls[t]);this.drawCalls.length=0;for(let t=0;t<this.batches.length;t++){const e=this.batches[t];e.reset(),Wc.push(e)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(t,e=null,r=null,i=null){const n=new Rn(t,e,r,i);return this.graphicsData.push(n),this.dirty++,this}drawHole(t,e=null){if(!this.graphicsData.length)return null;const r=new Rn(t,null,null,e),i=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=i.lineStyle,i.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let t=0;t<this.graphicsData.length;++t)this.graphicsData[t].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(t){const e=this.graphicsData;for(let r=0;r<e.length;++r){const i=e[r];if(i.fillStyle.visible&&i.shape&&(i.matrix?i.matrix.applyInverse(t,Lr):Lr.copyFrom(t),i.shape.contains(Lr.x,Lr.y))){let n=!1;if(i.holes){for(let s=0;s<i.holes.length;s++)if(i.holes[s].shape.contains(Lr.x,Lr.y)){n=!0;break}}if(!n)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const t=this.uvs,e=this.graphicsData;let r=null,i=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],i=r.style);for(let o=this.shapeIndex;o<e.length;o++){this.shapeIndex++;const u=e[o],h=u.fillStyle,d=u.lineStyle;Ma[u.type].build(u),u.matrix&&this.transformPoints(u.points,u.matrix),(h.visible||d.visible)&&this.processHoles(u.holes);for(let c=0;c<2;c++){const f=c===0?h:d;if(!f.visible)continue;const p=f.texture.baseTexture,m=this.indices.length,v=this.points.length/2;p.wrapMode=qr.REPEAT,c===0?this.processFill(u):this.processLine(u);const g=this.points.length/2-v;g!==0&&(r&&!this._compareStyles(i,f)&&(r.end(m,v),r=null),r||(r=Wc.pop()||new NT,r.begin(f,m,v),this.batches.push(r),i=f),this.addUvs(this.points,t,f.texture,v,g,f.matrix))}}const n=this.indices.length,s=this.points.length/2;if(r&&r.end(n,s),this.batches.length===0){this.batchable=!0;return}const a=s>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&a===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=a?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(t,e){return!(!t||!e||t.texture.baseTexture!==e.texture.baseTexture||t.color+t.alpha!==e.color+e.alpha||!!t.native!=!!e.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let t=0,e=this.graphicsData.length;t<e;t++){const r=this.graphicsData[t],i=r.fillStyle,n=r.lineStyle;if(i&&!i.texture.baseTexture.valid||n&&!n.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const t=this.batches;for(let e=0,r=t.length;e<r;e++){const i=t[e];for(let n=0;n<i.size;n++){const s=i.start+n;this.indicesUint16[s]=this.indicesUint16[s]-i.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const t=this.batches;for(let e=0;e<t.length;e++)if(t[e].style.native)return!1;return this.points.length<qc.BATCHABLE_SIZE*2}buildDrawCalls(){let t=++ae._globalBatch;for(let d=0;d<this.drawCalls.length;d++)this.drawCalls[d].texArray.clear(),In.push(this.drawCalls[d]);this.drawCalls.length=0;const e=this.colors,r=this.textureIds;let i=In.pop();i||(i=new aa,i.texArray=new fa),i.texArray.count=0,i.start=0,i.size=0,i.type=It.TRIANGLES;let n=0,s=null,a=0,o=!1,u=It.TRIANGLES,h=0;this.drawCalls.push(i);for(let d=0;d<this.batches.length;d++){const l=this.batches[d],c=8,f=l.style,p=f.texture.baseTexture;o!==!!f.native&&(o=!!f.native,u=o?It.LINES:It.TRIANGLES,s=null,n=c,t++),s!==p&&(s=p,p._batchEnabled!==t&&(n===c&&(t++,n=0,i.size>0&&(i=In.pop(),i||(i=new aa,i.texArray=new fa),this.drawCalls.push(i)),i.start=h,i.size=0,i.texArray.count=0,i.type=u),p.touched=1,p._batchEnabled=t,p._batchLocation=n,p.wrapMode=qr.REPEAT,i.texArray.elements[i.texArray.count++]=p,n++)),i.size+=l.size,h+=l.size,a=p._batchLocation,this.addColors(e,f.color,f.alpha,l.attribSize,l.attribStart),this.addTextureIds(r,a,l.attribSize,l.attribStart)}ae._globalBatch=t,this.packAttributes()}packAttributes(){const t=this.points,e=this.uvs,r=this.colors,i=this.textureIds,n=new ArrayBuffer(t.length*3*4),s=new Float32Array(n),a=new Uint32Array(n);let o=0;for(let u=0;u<t.length/2;u++)s[o++]=t[u*2],s[o++]=t[u*2+1],s[o++]=e[u*2],s[o++]=e[u*2+1],a[o++]=r[u],s[o++]=i[u];this._buffer.update(n),this._indexBuffer.update(this.indicesUint16)}processFill(t){t.holes.length?jc.triangulate(t,this):Ma[t.type].triangulate(t,this)}processLine(t){Xc(t,this);for(let e=0;e<t.holes.length;e++)Xc(t.holes[e],this)}processHoles(t){for(let e=0;e<t.length;e++){const r=t[e];Ma[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const t=this._bounds;t.clear(),t.addVertexData(this.points,0,this.points.length),t.pad(this.boundsPadding,this.boundsPadding)}transformPoints(t,e){for(let r=0;r<t.length/2;r++){const i=t[r*2],n=t[r*2+1];t[r*2]=e.a*i+e.c*n+e.tx,t[r*2+1]=e.b*i+e.d*n+e.ty}}addColors(t,e,r,i,n=0){const s=Le.shared.setValue(e).toLittleEndianNumber(),a=Le.shared.setValue(s).toPremultiplied(r);t.length=Math.max(t.length,n+i);for(let o=0;o<i;o++)t[n+o]=a}addTextureIds(t,e,r,i=0){t.length=Math.max(t.length,i+r);for(let n=0;n<r;n++)t[i+n]=e}addUvs(t,e,r,i,n,s=null){let a=0;const o=e.length,u=r.frame;for(;a<n;){let d=t[(i+a)*2],l=t[(i+a)*2+1];if(s){const c=s.a*d+s.c*l+s.tx;l=s.b*d+s.d*l+s.ty,d=c}a++,e.push(d/u.width,l/u.height)}const h=r.baseTexture;(u.width<h.width||u.height<h.height)&&this.adjustUvs(e,r,o,n)}adjustUvs(t,e,r,i){const n=e.baseTexture,s=1e-6,a=r+i*2,o=e.frame,u=o.width/n.width,h=o.height/n.height;let d=o.x/o.width,l=o.y/o.height,c=Math.floor(t[r]+s),f=Math.floor(t[r+1]+s);for(let p=r+2;p<a;p+=2)c=Math.min(c,Math.floor(t[p]+s)),f=Math.min(f,Math.floor(t[p+1]+s));d-=c,l-=f;for(let p=r;p<a;p+=2)t[p]=(t[p]+d)*u,t[p+1]=(t[p+1]+l)*h}};let Yc=qc;Yc.BATCHABLE_SIZE=100;class Pn{constructor(){this.color=16777215,this.alpha=1,this.texture=ie.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const e=new Pn;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e}reset(){this.color=16777215,this.alpha=1,this.texture=ie.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Na extends Pn{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=tr.BUTT,this.join=at.MITER,this.miterLimit=10}clone(){const e=new Na;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e.width=this.width,e.alignment=this.alignment,e.native=this.native,e.cap=this.cap,e.join=this.join,e.miterLimit=this.miterLimit,e}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const ka={},Mn=class extends kr{constructor(t=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Pn,this._lineStyle=new Na,this._matrix=null,this._holeMode=!1,this.state=sn.for2d(),this._geometry=t||new Yc,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Le(16777215),this.blendMode=j.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Mn(this._geometry)}set blendMode(t){this.state.blendMode=t}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(t){this._tintColor.setValue(t)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(t=null,e=0,r,i=.5,n=!1){return typeof t=="number"&&(t={width:t,color:e,alpha:r,alignment:i,native:n}),this.lineTextureStyle(t)}lineTextureStyle(t){const e={width:0,texture:ie.WHITE,color:t!=null&&t.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:tr.BUTT,join:at.MITER,miterLimit:10};t=Object.assign(e,t),this.normalizeColor(t),this.currentPath&&this.startPoly();const r=t.width>0&&t.alpha>0;return r?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:r},t)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new oi,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new oi,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this}lineTo(t,e){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,i=r[r.length-2],n=r[r.length-1];return(i!==t||n!==e)&&r.push(t,e),this}_initCurve(t=0,e=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[t,e]):this.moveTo(t,e)}quadraticCurveTo(t,e,r,i){this._initCurve();const n=this.currentPath.points;return n.length===0&&this.moveTo(0,0),Pa.curveTo(t,e,r,i,n),this}bezierCurveTo(t,e,r,i,n,s){return this._initCurve(),Ra.curveTo(t,e,r,i,n,s,this.currentPath.points),this}arcTo(t,e,r,i,n){this._initCurve(t,e);const s=this.currentPath.points,a=Hc.curveTo(t,e,r,i,n,s);if(a){const{cx:o,cy:u,radius:h,startAngle:d,endAngle:l,anticlockwise:c}=a;this.arc(o,u,h,d,l,c)}return this}arc(t,e,r,i,n,s=!1){if(i===n)return this;if(!s&&n<=i?n+=on:s&&i<=n&&(i+=on),n-i===0)return this;const o=t+Math.cos(i)*r,u=e+Math.sin(i)*r,h=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const l=Math.abs(d[d.length-2]-o),c=Math.abs(d[d.length-1]-u);l<h&&c<h||d.push(o,u)}else this.moveTo(o,u),d=this.currentPath.points;return Hc.arc(o,u,t,e,r,i,n,s,d),this}beginFill(t=0,e){return this.beginTextureFill({texture:ie.WHITE,color:t,alpha:e})}normalizeColor(t){const e=Le.shared.setValue(t.color??0);t.color=e.toNumber(),t.alpha??(t.alpha=e.alpha)}beginTextureFill(t){const e={texture:ie.WHITE,color:16777215,matrix:null};t=Object.assign(e,t),this.normalizeColor(t),this.currentPath&&this.startPoly();const r=t.alpha>0;return r?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:r},t)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(t,e,r,i){return this.drawShape(new de(t,e,r,i))}drawRoundedRect(t,e,r,i,n){return this.drawShape(new la(t,e,r,i,n))}drawCircle(t,e,r){return this.drawShape(new oa(t,e,r))}drawEllipse(t,e,r,i){return this.drawShape(new Jx(t,e,r,i))}drawPolygon(...t){let e,r=!0;const i=t[0];i.points?(r=i.closeStroke,e=i.points):Array.isArray(t[0])?e=t[0]:e=t;const n=new oi(e);return n.closeStroke=r,this.drawShape(n),this}drawShape(t){return this._holeMode?this._geometry.drawHole(t,this._matrix):this._geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const t=this._geometry.graphicsData;return t.length===1&&t[0].shape.type===Me.RECT&&!t[0].matrix&&!t[0].holes.length&&!(t[0].lineStyle.visible&&t[0].lineStyle.width)}_render(t){this.finishPoly();const e=this._geometry;e.updateBatches(),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))}_populateBatches(){const t=this._geometry,e=this.blendMode,r=t.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(t.points);for(let i=0;i<r;i++){const n=t.batches[i],s=n.style.color,a=new Float32Array(this.vertexData.buffer,n.attribStart*4*2,n.attribSize*2),o=new Float32Array(t.uvsFloat32.buffer,n.attribStart*4*2,n.attribSize*2),u=new Uint16Array(t.indicesUint16.buffer,n.start*2,n.size),h={vertexData:a,blendMode:e,indices:u,uvs:o,_batchRGB:Le.shared.setValue(s).toRgbArray(),_tintRGB:s,_texture:n.style.texture,alpha:n.style.alpha,worldAlpha:1};this.batches[i]=h}}_renderBatched(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let e=0,r=this.batches.length;e<r;e++){const i=this.batches[e];i.worldAlpha=this.worldAlpha*i.alpha,t.plugins[this.pluginName].render(i)}}}_renderDirect(t){const e=this._resolveDirectShader(t),r=this._geometry,i=this.worldAlpha,n=e.uniforms,s=r.drawCalls;n.translationMatrix=this.transform.worldTransform,Le.shared.setValue(this._tintColor).premultiply(i).toArray(n.tint),t.shader.bind(e),t.geometry.bind(r,e),t.state.set(this.state);for(let a=0,o=s.length;a<o;a++)this._renderDrawCallDirect(t,r.drawCalls[a])}_renderDrawCallDirect(t,e){const{texArray:r,type:i,size:n,start:s}=e,a=r.count;for(let o=0;o<a;o++)t.texture.bind(r.elements[o],o);t.geometry.draw(i,n,s)}_resolveDirectShader(t){let e=this.shader;const r=this.pluginName;if(!e){if(!ka[r]){const{maxTextures:i}=t.plugins[r],n=new Int32Array(i);for(let o=0;o<i;o++)n[o]=o;const s={tint:new Float32Array([1,1,1,1]),translationMatrix:new Ue,default:tt.from({uSamplers:n},!0)},a=t.plugins[r]._shader.program;ka[r]=new ui(a,s)}e=ka[r]}return e}_calculateBounds(){this.finishPoly();const t=this._geometry;if(!t.graphicsData.length)return;const{minX:e,minY:r,maxX:i,maxY:n}=t.bounds;this._bounds.addFrame(this.transform,e,r,i,n)}containsPoint(t){return this.worldTransform.applyInverse(t,Mn._TEMP_POINT),this._geometry.containsPoint(Mn._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let t=0;t<this.batches.length;t++){const e=this.batches[t];e._tintRGB=Le.shared.setValue(this._tintColor).multiply(e._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const t=this.transform._worldID;if(this._transformID===t)return;this._transformID=t;const e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,s=e.d,a=e.tx,o=e.ty,u=this._geometry.points,h=this.vertexData;let d=0;for(let l=0;l<u.length;l+=2){const c=u[l],f=u[l+1];h[d++]=r*c+n*f+a,h[d++]=s*f+i*c+o}}closePath(){const t=this.currentPath;return t&&(t.closeStroke=!0,this.finishPoly()),this}setMatrix(t){return this._matrix=t,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(t){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(t)}};let La=Mn;La.curves=Or,La._TEMP_POINT=new me;var $T=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Da={},GT={get exports(){return Da},set exports(t){Da=t}};/*!
1961
+ `);return I.uniforms.vignetteColor=[0,0,0,1],I.uniforms.vignetteSize=.7,I.uniforms.vignetteStrength=.6,{nightVisionFilter:C,vignetteFilter:I}},PixiImageSprite=React__namespace.forwardRef((C,E)=>{const I=React.useRef(null),B=React.useRef(null),{src:U,visible:V,disabled:X,transformation:{x:Y,y:K,width:J,height:xe,anchor:Z,colorCorrection:_e={},effect:Se},pointerdown:Ee}=C,{blurRadius:Ae=0,vignette:Re=0,noise:Te=0}=_e,{temperatureFilter:we,sharpnessFilter:Pe,hueFilter:Ie,blurFilter:Me,adjustmentFilter:Oe,vignetteFilter:Le,noiseFilter:Ne}=withFiltersHook(_e),{nightVisionFilter:Ve}=withEffectsHooks();return React__namespace.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,children:jsxRuntimeExports.jsx(react.Container,{ref:B,children:jsxRuntimeExports.jsx(react.Sprite,{image:U,width:J,height:xe,anchor:Z,ref:I,alpha:V?1:0,x:Y,y:K,...!X&&V&&{interactive:!0,pointerdown:Ee},filters:[we,Pe,Ie,Oe,...Ae>0?[Me]:[],...Se===Effects.NightVision?[Ve]:[],...Re>0?[Le]:[],...Te>0?[Ne]:[]]})})})});PixiImageSprite.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const buildCircle={build(C){const E=C.points;let I,B,U,V,X,Y;if(C.type===SHAPES.CIRC){const Ee=C.shape;I=Ee.x,B=Ee.y,X=Y=Ee.radius,U=V=0}else if(C.type===SHAPES.ELIP){const Ee=C.shape;I=Ee.x,B=Ee.y,X=Ee.width,Y=Ee.height,U=V=0}else{const Ee=C.shape,Ae=Ee.width/2,Re=Ee.height/2;I=Ee.x+Ae,B=Ee.y+Re,X=Y=Math.max(0,Math.min(Ee.radius,Math.min(Ae,Re))),U=Ae-X,V=Re-Y}if(!(X>=0&&Y>=0&&U>=0&&V>=0)){E.length=0;return}const K=Math.ceil(2.3*Math.sqrt(X+Y)),J=K*8+(U?4:0)+(V?4:0);if(E.length=J,J===0)return;if(K===0){E.length=8,E[0]=E[6]=I+U,E[1]=E[3]=B+V,E[2]=E[4]=I-U,E[5]=E[7]=B-V;return}let xe=0,Z=K*4+(U?2:0)+2,_e=Z,Se=J;{const Ee=U+X,Ae=V,Re=I+Ee,Te=I-Ee,we=B+Ae;if(E[xe++]=Re,E[xe++]=we,E[--Z]=we,E[--Z]=Te,V){const Pe=B-Ae;E[_e++]=Te,E[_e++]=Pe,E[--Se]=Pe,E[--Se]=Re}}for(let Ee=1;Ee<K;Ee++){const Ae=Math.PI/2*(Ee/K),Re=U+Math.cos(Ae)*X,Te=V+Math.sin(Ae)*Y,we=I+Re,Pe=I-Re,Ie=B+Te,Me=B-Te;E[xe++]=we,E[xe++]=Ie,E[--Z]=Ie,E[--Z]=Pe,E[_e++]=Pe,E[_e++]=Me,E[--Se]=Me,E[--Se]=we}{const Ee=U,Ae=V+Y,Re=I+Ee,Te=I-Ee,we=B+Ae,Pe=B-Ae;E[xe++]=Re,E[xe++]=we,E[--Se]=Pe,E[--Se]=Re,U&&(E[xe++]=Te,E[xe++]=we,E[--Se]=Pe,E[--Se]=Te)}},triangulate(C,E){const I=C.points,B=E.points,U=E.indices;if(I.length===0)return;let V=B.length/2;const X=V;let Y,K;if(C.type!==SHAPES.RREC){const xe=C.shape;Y=xe.x,K=xe.y}else{const xe=C.shape;Y=xe.x+xe.width/2,K=xe.y+xe.height/2}const J=C.matrix;B.push(C.matrix?J.a*Y+J.c*K+J.tx:Y,C.matrix?J.b*Y+J.d*K+J.ty:K),V++,B.push(I[0],I[1]);for(let xe=2;xe<I.length;xe+=2)B.push(I[xe],I[xe+1]),U.push(V++,X,V);U.push(X+1,X,V)}};function fixOrientation(C,E=!1){const I=C.length;if(I<6)return;let B=0;for(let U=0,V=C[I-2],X=C[I-1];U<I;U+=2){const Y=C[U],K=C[U+1];B+=(Y-V)*(K+X),V=Y,X=K}if(!E&&B>0||E&&B<=0){const U=I/2;for(let V=U+U%2;V<I;V+=2){const X=I-V-2,Y=I-V-1,K=V,J=V+1;[C[X],C[K]]=[C[K],C[X]],[C[Y],C[J]]=[C[J],C[Y]]}}}const buildPoly={build(C){C.points=C.shape.points.slice()},triangulate(C,E){let I=C.points;const B=C.holes,U=E.points,V=E.indices;if(I.length>=6){fixOrientation(I,!1);const X=[];for(let J=0;J<B.length;J++){const xe=B[J];fixOrientation(xe.points,!0),X.push(I.length/2),I=I.concat(xe.points)}const Y=earcut$1(I,X,2);if(!Y)return;const K=U.length/2;for(let J=0;J<Y.length;J+=3)V.push(Y[J]+K),V.push(Y[J+1]+K),V.push(Y[J+2]+K);for(let J=0;J<I.length;J++)U.push(I[J])}}},buildRectangle={build(C){const E=C.shape,I=E.x,B=E.y,U=E.width,V=E.height,X=C.points;X.length=0,U>=0&&V>=0&&X.push(I,B,I+U,B,I+U,B+V,I,B+V)},triangulate(C,E){const I=C.points,B=E.points;if(I.length===0)return;const U=B.length/2;B.push(I[0],I[1],I[2],I[3],I[6],I[7],I[4],I[5]),E.indices.push(U,U+1,U+2,U+1,U+2,U+3)}},buildRoundedRectangle={build(C){buildCircle.build(C)},triangulate(C,E){buildCircle.triangulate(C,E)}};var LINE_JOIN=(C=>(C.MITER="miter",C.BEVEL="bevel",C.ROUND="round",C))(LINE_JOIN||{}),LINE_CAP=(C=>(C.BUTT="butt",C.ROUND="round",C.SQUARE="square",C))(LINE_CAP||{});const curves={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(C,E=20){if(!this.adaptive||!C||isNaN(C))return E;let I=Math.ceil(C/this.maxLength);return I<this.minSegments?I=this.minSegments:I>this.maxSegments&&(I=this.maxSegments),I}};class ArcUtils{static curveTo(E,I,B,U,V,X){const Y=X[X.length-2],J=X[X.length-1]-I,xe=Y-E,Z=U-I,_e=B-E,Se=Math.abs(J*_e-xe*Z);if(Se<1e-8||V===0)return(X[X.length-2]!==E||X[X.length-1]!==I)&&X.push(E,I),null;const Ee=J*J+xe*xe,Ae=Z*Z+_e*_e,Re=J*Z+xe*_e,Te=V*Math.sqrt(Ee)/Se,we=V*Math.sqrt(Ae)/Se,Pe=Te*Re/Ee,Ie=we*Re/Ae,Me=Te*_e+we*xe,Oe=Te*Z+we*J,Le=xe*(we+Pe),Ne=J*(we+Pe),Ve=_e*(Te+Ie),Xe=Z*(Te+Ie),Ue=Math.atan2(Ne-Oe,Le-Me),We=Math.atan2(Xe-Oe,Ve-Me);return{cx:Me+E,cy:Oe+I,radius:V,startAngle:Ue,endAngle:We,anticlockwise:xe*Z>_e*J}}static arc(E,I,B,U,V,X,Y,K,J){const xe=Y-X,Z=curves._segmentsCount(Math.abs(xe)*V,Math.ceil(Math.abs(xe)/PI_2)*40),_e=xe/(Z*2),Se=_e*2,Ee=Math.cos(_e),Ae=Math.sin(_e),Re=Z-1,Te=Re%1/Re;for(let we=0;we<=Re;++we){const Pe=we+Te*we,Ie=_e+X+Se*Pe,Me=Math.cos(Ie),Oe=-Math.sin(Ie);J.push((Ee*Me+Ae*Oe)*V+B,(Ee*-Oe+Ae*Me)*V+U)}}}class BatchPart{constructor(){this.reset()}begin(E,I,B){this.reset(),this.style=E,this.start=I,this.attribStart=B}end(E,I){this.attribSize=I-this.attribStart,this.size=E-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class BezierUtils{static curveLength(E,I,B,U,V,X,Y,K){let xe=0,Z=0,_e=0,Se=0,Ee=0,Ae=0,Re=0,Te=0,we=0,Pe=0,Ie=0,Me=E,Oe=I;for(let Le=1;Le<=10;++Le)Z=Le/10,_e=Z*Z,Se=_e*Z,Ee=1-Z,Ae=Ee*Ee,Re=Ae*Ee,Te=Re*E+3*Ae*Z*B+3*Ee*_e*V+Se*Y,we=Re*I+3*Ae*Z*U+3*Ee*_e*X+Se*K,Pe=Me-Te,Ie=Oe-we,Me=Te,Oe=we,xe+=Math.sqrt(Pe*Pe+Ie*Ie);return xe}static curveTo(E,I,B,U,V,X,Y){const K=Y[Y.length-2],J=Y[Y.length-1];Y.length-=2;const xe=curves._segmentsCount(BezierUtils.curveLength(K,J,E,I,B,U,V,X));let Z=0,_e=0,Se=0,Ee=0,Ae=0;Y.push(K,J);for(let Re=1,Te=0;Re<=xe;++Re)Te=Re/xe,Z=1-Te,_e=Z*Z,Se=_e*Z,Ee=Te*Te,Ae=Ee*Te,Y.push(Se*K+3*_e*Te*E+3*Z*Ee*B+Ae*V,Se*J+3*_e*Te*I+3*Z*Ee*U+Ae*X)}}function square(C,E,I,B,U,V,X,Y){const K=C-I*U,J=E-B*U,xe=C+I*V,Z=E+B*V;let _e,Se;X?(_e=B,Se=-I):(_e=-B,Se=I);const Ee=K+_e,Ae=J+Se,Re=xe+_e,Te=Z+Se;return Y.push(Ee,Ae,Re,Te),2}function round(C,E,I,B,U,V,X,Y){const K=I-C,J=B-E;let xe=Math.atan2(K,J),Z=Math.atan2(U-C,V-E);Y&&xe<Z?xe+=Math.PI*2:!Y&&xe>Z&&(Z+=Math.PI*2);let _e=xe;const Se=Z-xe,Ee=Math.abs(Se),Ae=Math.sqrt(K*K+J*J),Re=(15*Ee*Math.sqrt(Ae)/Math.PI>>0)+1,Te=Se/Re;if(_e+=Te,Y){X.push(C,E,I,B);for(let we=1,Pe=_e;we<Re;we++,Pe+=Te)X.push(C,E,C+Math.sin(Pe)*Ae,E+Math.cos(Pe)*Ae);X.push(C,E,U,V)}else{X.push(I,B,C,E);for(let we=1,Pe=_e;we<Re;we++,Pe+=Te)X.push(C+Math.sin(Pe)*Ae,E+Math.cos(Pe)*Ae,C,E);X.push(U,V,C,E)}return Re*2}function buildNonNativeLine(C,E){const I=C.shape;let B=C.points||I.points.slice();const U=E.closePointEps;if(B.length===0)return;const V=C.lineStyle,X=new Point(B[0],B[1]),Y=new Point(B[B.length-2],B[B.length-1]),K=I.type!==SHAPES.POLY||I.closeStroke,J=Math.abs(X.x-Y.x)<U&&Math.abs(X.y-Y.y)<U;if(K){B=B.slice(),J&&(B.pop(),B.pop(),Y.set(B[B.length-2],B[B.length-1]));const De=(X.x+Y.x)*.5,Fe=(Y.y+X.y)*.5;B.unshift(De,Fe),B.push(De,Fe)}const xe=E.points,Z=B.length/2;let _e=B.length;const Se=xe.length/2,Ee=V.width/2,Ae=Ee*Ee,Re=V.miterLimit*V.miterLimit;let Te=B[0],we=B[1],Pe=B[2],Ie=B[3],Me=0,Oe=0,Le=-(we-Ie),Ne=Te-Pe,Ve=0,Xe=0,Ue=Math.sqrt(Le*Le+Ne*Ne);Le/=Ue,Ne/=Ue,Le*=Ee,Ne*=Ee;const We=V.alignment,ze=(1-We)*2,He=We*2;K||(V.cap===LINE_CAP.ROUND?_e+=round(Te-Le*(ze-He)*.5,we-Ne*(ze-He)*.5,Te-Le*ze,we-Ne*ze,Te+Le*He,we+Ne*He,xe,!0)+2:V.cap===LINE_CAP.SQUARE&&(_e+=square(Te,we,Le,Ne,ze,He,!0,xe))),xe.push(Te-Le*ze,we-Ne*ze,Te+Le*He,we+Ne*He);for(let De=1;De<Z-1;++De){Te=B[(De-1)*2],we=B[(De-1)*2+1],Pe=B[De*2],Ie=B[De*2+1],Me=B[(De+1)*2],Oe=B[(De+1)*2+1],Le=-(we-Ie),Ne=Te-Pe,Ue=Math.sqrt(Le*Le+Ne*Ne),Le/=Ue,Ne/=Ue,Le*=Ee,Ne*=Ee,Ve=-(Ie-Oe),Xe=Pe-Me,Ue=Math.sqrt(Ve*Ve+Xe*Xe),Ve/=Ue,Xe/=Ue,Ve*=Ee,Xe*=Ee;const Fe=Pe-Te,ke=we-Ie,Ge=Pe-Me,Be=Oe-Ie,qe=Fe*Ge+ke*Be,Ke=ke*Ge-Be*Fe,Ye=Ke<0;if(Math.abs(Ke)<.001*Math.abs(qe)){xe.push(Pe-Le*ze,Ie-Ne*ze,Pe+Le*He,Ie+Ne*He),qe>=0&&(V.join===LINE_JOIN.ROUND?_e+=round(Pe,Ie,Pe-Le*ze,Ie-Ne*ze,Pe-Ve*ze,Ie-Xe*ze,xe,!1)+4:_e+=2,xe.push(Pe-Ve*He,Ie-Xe*He,Pe+Ve*ze,Ie+Xe*ze));continue}const Qe=(-Le+Te)*(-Ne+Ie)-(-Le+Pe)*(-Ne+we),Ze=(-Ve+Me)*(-Xe+Ie)-(-Ve+Pe)*(-Xe+Oe),it=(Fe*Ze-Ge*Qe)/Ke,at=(Be*Qe-ke*Ze)/Ke,st=(it-Pe)*(it-Pe)+(at-Ie)*(at-Ie),Je=Pe+(it-Pe)*ze,et=Ie+(at-Ie)*ze,nt=Pe-(it-Pe)*He,rt=Ie-(at-Ie)*He,tt=Math.min(Fe*Fe+ke*ke,Ge*Ge+Be*Be),ot=Ye?ze:He,ut=tt+ot*ot*Ae,mt=st<=ut;let pt=V.join;if(pt===LINE_JOIN.MITER&&st/Ae>Re&&(pt=LINE_JOIN.BEVEL),mt)switch(pt){case LINE_JOIN.MITER:{xe.push(Je,et,nt,rt);break}case LINE_JOIN.BEVEL:{Ye?xe.push(Je,et,Pe+Le*He,Ie+Ne*He,Je,et,Pe+Ve*He,Ie+Xe*He):xe.push(Pe-Le*ze,Ie-Ne*ze,nt,rt,Pe-Ve*ze,Ie-Xe*ze,nt,rt),_e+=2;break}case LINE_JOIN.ROUND:{Ye?(xe.push(Je,et,Pe+Le*He,Ie+Ne*He),_e+=round(Pe,Ie,Pe+Le*He,Ie+Ne*He,Pe+Ve*He,Ie+Xe*He,xe,!0)+4,xe.push(Je,et,Pe+Ve*He,Ie+Xe*He)):(xe.push(Pe-Le*ze,Ie-Ne*ze,nt,rt),_e+=round(Pe,Ie,Pe-Le*ze,Ie-Ne*ze,Pe-Ve*ze,Ie-Xe*ze,xe,!1)+4,xe.push(Pe-Ve*ze,Ie-Xe*ze,nt,rt));break}}else{switch(xe.push(Pe-Le*ze,Ie-Ne*ze,Pe+Le*He,Ie+Ne*He),pt){case LINE_JOIN.MITER:{Ye?xe.push(nt,rt,nt,rt):xe.push(Je,et,Je,et),_e+=2;break}case LINE_JOIN.ROUND:{Ye?_e+=round(Pe,Ie,Pe+Le*He,Ie+Ne*He,Pe+Ve*He,Ie+Xe*He,xe,!0)+2:_e+=round(Pe,Ie,Pe-Le*ze,Ie-Ne*ze,Pe-Ve*ze,Ie-Xe*ze,xe,!1)+2;break}}xe.push(Pe-Ve*ze,Ie-Xe*ze,Pe+Ve*He,Ie+Xe*He),_e+=2}}Te=B[(Z-2)*2],we=B[(Z-2)*2+1],Pe=B[(Z-1)*2],Ie=B[(Z-1)*2+1],Le=-(we-Ie),Ne=Te-Pe,Ue=Math.sqrt(Le*Le+Ne*Ne),Le/=Ue,Ne/=Ue,Le*=Ee,Ne*=Ee,xe.push(Pe-Le*ze,Ie-Ne*ze,Pe+Le*He,Ie+Ne*He),K||(V.cap===LINE_CAP.ROUND?_e+=round(Pe-Le*(ze-He)*.5,Ie-Ne*(ze-He)*.5,Pe-Le*ze,Ie-Ne*ze,Pe+Le*He,Ie+Ne*He,xe,!1)+2:V.cap===LINE_CAP.SQUARE&&(_e+=square(Pe,Ie,Le,Ne,ze,He,!1,xe)));const je=E.indices,$e=curves.epsilon*curves.epsilon;for(let De=Se;De<_e+Se-2;++De)Te=xe[De*2],we=xe[De*2+1],Pe=xe[(De+1)*2],Ie=xe[(De+1)*2+1],Me=xe[(De+2)*2],Oe=xe[(De+2)*2+1],!(Math.abs(Te*(Ie-Oe)+Pe*(Oe-we)+Me*(we-Ie))<$e)&&je.push(De,De+1,De+2)}function buildNativeLine(C,E){let I=0;const B=C.shape,U=C.points||B.points,V=B.type!==SHAPES.POLY||B.closeStroke;if(U.length===0)return;const X=E.points,Y=E.indices,K=U.length/2,J=X.length/2;let xe=J;for(X.push(U[0],U[1]),I=1;I<K;I++)X.push(U[I*2],U[I*2+1]),Y.push(xe,xe+1),xe++;V&&Y.push(xe,J)}function buildLine(C,E){C.lineStyle.native?buildNativeLine(C,E):buildNonNativeLine(C,E)}class QuadraticUtils{static curveLength(E,I,B,U,V,X){const Y=E-2*B+V,K=I-2*U+X,J=2*B-2*E,xe=2*U-2*I,Z=4*(Y*Y+K*K),_e=4*(Y*J+K*xe),Se=J*J+xe*xe,Ee=2*Math.sqrt(Z+_e+Se),Ae=Math.sqrt(Z),Re=2*Z*Ae,Te=2*Math.sqrt(Se),we=_e/Ae;return(Re*Ee+Ae*_e*(Ee-Te)+(4*Se*Z-_e*_e)*Math.log((2*Ae+we+Ee)/(we+Te)))/(4*Re)}static curveTo(E,I,B,U,V){const X=V[V.length-2],Y=V[V.length-1],K=curves._segmentsCount(QuadraticUtils.curveLength(X,Y,E,I,B,U));let J=0,xe=0;for(let Z=1;Z<=K;++Z){const _e=Z/K;J=X+(E-X)*_e,xe=Y+(I-Y)*_e,V.push(J+(E+(B-E)*_e-J)*_e,xe+(I+(U-I)*_e-xe)*_e)}}}const FILL_COMMANDS={[SHAPES.POLY]:buildPoly,[SHAPES.CIRC]:buildCircle,[SHAPES.ELIP]:buildCircle,[SHAPES.RECT]:buildRectangle,[SHAPES.RREC]:buildRoundedRectangle},BATCH_POOL=[],DRAW_CALL_POOL=[];class Bounds{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(E){return this.minX>this.maxX||this.minY>this.maxY?Rectangle.EMPTY:(E=E||new Rectangle(0,0,1,1),E.x=this.minX,E.y=this.minY,E.width=this.maxX-this.minX,E.height=this.maxY-this.minY,E)}addPoint(E){this.minX=Math.min(this.minX,E.x),this.maxX=Math.max(this.maxX,E.x),this.minY=Math.min(this.minY,E.y),this.maxY=Math.max(this.maxY,E.y)}addPointMatrix(E,I){const{a:B,b:U,c:V,d:X,tx:Y,ty:K}=E,J=B*I.x+V*I.y+Y,xe=U*I.x+X*I.y+K;this.minX=Math.min(this.minX,J),this.maxX=Math.max(this.maxX,J),this.minY=Math.min(this.minY,xe),this.maxY=Math.max(this.maxY,xe)}addQuad(E){let I=this.minX,B=this.minY,U=this.maxX,V=this.maxY,X=E[0],Y=E[1];I=X<I?X:I,B=Y<B?Y:B,U=X>U?X:U,V=Y>V?Y:V,X=E[2],Y=E[3],I=X<I?X:I,B=Y<B?Y:B,U=X>U?X:U,V=Y>V?Y:V,X=E[4],Y=E[5],I=X<I?X:I,B=Y<B?Y:B,U=X>U?X:U,V=Y>V?Y:V,X=E[6],Y=E[7],I=X<I?X:I,B=Y<B?Y:B,U=X>U?X:U,V=Y>V?Y:V,this.minX=I,this.minY=B,this.maxX=U,this.maxY=V}addFrame(E,I,B,U,V){this.addFrameMatrix(E.worldTransform,I,B,U,V)}addFrameMatrix(E,I,B,U,V){const X=E.a,Y=E.b,K=E.c,J=E.d,xe=E.tx,Z=E.ty;let _e=this.minX,Se=this.minY,Ee=this.maxX,Ae=this.maxY,Re=X*I+K*B+xe,Te=Y*I+J*B+Z;_e=Re<_e?Re:_e,Se=Te<Se?Te:Se,Ee=Re>Ee?Re:Ee,Ae=Te>Ae?Te:Ae,Re=X*U+K*B+xe,Te=Y*U+J*B+Z,_e=Re<_e?Re:_e,Se=Te<Se?Te:Se,Ee=Re>Ee?Re:Ee,Ae=Te>Ae?Te:Ae,Re=X*I+K*V+xe,Te=Y*I+J*V+Z,_e=Re<_e?Re:_e,Se=Te<Se?Te:Se,Ee=Re>Ee?Re:Ee,Ae=Te>Ae?Te:Ae,Re=X*U+K*V+xe,Te=Y*U+J*V+Z,_e=Re<_e?Re:_e,Se=Te<Se?Te:Se,Ee=Re>Ee?Re:Ee,Ae=Te>Ae?Te:Ae,this.minX=_e,this.minY=Se,this.maxX=Ee,this.maxY=Ae}addVertexData(E,I,B){let U=this.minX,V=this.minY,X=this.maxX,Y=this.maxY;for(let K=I;K<B;K+=2){const J=E[K],xe=E[K+1];U=J<U?J:U,V=xe<V?xe:V,X=J>X?J:X,Y=xe>Y?xe:Y}this.minX=U,this.minY=V,this.maxX=X,this.maxY=Y}addVertices(E,I,B,U){this.addVerticesMatrix(E.worldTransform,I,B,U)}addVerticesMatrix(E,I,B,U,V=0,X=V){const Y=E.a,K=E.b,J=E.c,xe=E.d,Z=E.tx,_e=E.ty;let Se=this.minX,Ee=this.minY,Ae=this.maxX,Re=this.maxY;for(let Te=B;Te<U;Te+=2){const we=I[Te],Pe=I[Te+1],Ie=Y*we+J*Pe+Z,Me=xe*Pe+K*we+_e;Se=Math.min(Se,Ie-V),Ae=Math.max(Ae,Ie+V),Ee=Math.min(Ee,Me-X),Re=Math.max(Re,Me+X)}this.minX=Se,this.minY=Ee,this.maxX=Ae,this.maxY=Re}addBounds(E){const I=this.minX,B=this.minY,U=this.maxX,V=this.maxY;this.minX=E.minX<I?E.minX:I,this.minY=E.minY<B?E.minY:B,this.maxX=E.maxX>U?E.maxX:U,this.maxY=E.maxY>V?E.maxY:V}addBoundsMask(E,I){const B=E.minX>I.minX?E.minX:I.minX,U=E.minY>I.minY?E.minY:I.minY,V=E.maxX<I.maxX?E.maxX:I.maxX,X=E.maxY<I.maxY?E.maxY:I.maxY;if(B<=V&&U<=X){const Y=this.minX,K=this.minY,J=this.maxX,xe=this.maxY;this.minX=B<Y?B:Y,this.minY=U<K?U:K,this.maxX=V>J?V:J,this.maxY=X>xe?X:xe}}addBoundsMatrix(E,I){this.addFrameMatrix(I,E.minX,E.minY,E.maxX,E.maxY)}addBoundsArea(E,I){const B=E.minX>I.x?E.minX:I.x,U=E.minY>I.y?E.minY:I.y,V=E.maxX<I.x+I.width?E.maxX:I.x+I.width,X=E.maxY<I.y+I.height?E.maxY:I.y+I.height;if(B<=V&&U<=X){const Y=this.minX,K=this.minY,J=this.maxX,xe=this.maxY;this.minX=B<Y?B:Y,this.minY=U<K?U:K,this.maxX=V>J?V:J,this.maxY=X>xe?X:xe}}pad(E=0,I=E){this.isEmpty()||(this.minX-=E,this.maxX+=E,this.minY-=I,this.maxY+=I)}addFramePad(E,I,B,U,V,X){E-=V,I-=X,B+=V,U+=X,this.minX=this.minX<E?this.minX:E,this.maxX=this.maxX>B?this.maxX:B,this.minY=this.minY<I?this.minY:I,this.maxY=this.maxY>U?this.maxY:U}}class DisplayObject extends EventEmitter{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Transform,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Bounds,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(E){const I=Object.keys(E);for(let B=0;B<I.length;++B){const U=I[B];Object.defineProperty(DisplayObject.prototype,U,Object.getOwnPropertyDescriptor(E,U))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(E,I){return E||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),I||(this._boundsRect||(this._boundsRect=new Rectangle),I=this._boundsRect),this._bounds.getRectangle(I)}getLocalBounds(E){E||(this._localBoundsRect||(this._localBoundsRect=new Rectangle),E=this._localBoundsRect),this._localBounds||(this._localBounds=new Bounds);const I=this.transform,B=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const U=this._bounds,V=this._boundsID;this._bounds=this._localBounds;const X=this.getBounds(!1,E);return this.parent=B,this.transform=I,this._bounds=U,this._bounds.updateID+=this._boundsID-V,X}toGlobal(E,I,B=!1){return B||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(E,I)}toLocal(E,I,B,U){return I&&(E=I.toGlobal(E,B,U)),U||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(E,B)}setParent(E){if(!E||!E.addChild)throw new Error("setParent: Argument must be a Container");return E.addChild(this),E}removeFromParent(){var E;(E=this.parent)==null||E.removeChild(this)}setTransform(E=0,I=0,B=1,U=1,V=0,X=0,Y=0,K=0,J=0){return this.position.x=E,this.position.y=I,this.scale.x=B||1,this.scale.y=U||1,this.rotation=V,this.skew.x=X,this.skew.y=Y,this.pivot.x=K,this.pivot.y=J,this}destroy(E){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new TemporaryDisplayObject),this.tempDisplayObjectParent}enableTempParent(){const E=this.parent;return this.parent=this._tempDisplayObjectParent,E}disableTempParent(E){this.parent=E}get x(){return this.position.x}set x(E){this.transform.position.x=E}get y(){return this.position.y}set y(E){this.transform.position.y=E}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(E){this.transform.position.copyFrom(E)}get scale(){return this.transform.scale}set scale(E){this.transform.scale.copyFrom(E)}get pivot(){return this.transform.pivot}set pivot(E){this.transform.pivot.copyFrom(E)}get skew(){return this.transform.skew}set skew(E){this.transform.skew.copyFrom(E)}get rotation(){return this.transform.rotation}set rotation(E){this.transform.rotation=E}get angle(){return this.transform.rotation*RAD_TO_DEG}set angle(E){this.transform.rotation=E*DEG_TO_RAD}get zIndex(){return this._zIndex}set zIndex(E){this._zIndex=E,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let E=this;do{if(!E.visible)return!1;E=E.parent}while(E);return!0}get mask(){return this._mask}set mask(E){if(this._mask!==E){if(this._mask){const I=this._mask.isMaskData?this._mask.maskObject:this._mask;I&&(I._maskRefCount--,I._maskRefCount===0&&(I.renderable=!0,I.isMask=!1))}if(this._mask=E,this._mask){const I=this._mask.isMaskData?this._mask.maskObject:this._mask;I&&(I._maskRefCount===0&&(I.renderable=!1,I.isMask=!0),I._maskRefCount++)}}}}class TemporaryDisplayObject extends DisplayObject{constructor(){super(...arguments),this.sortDirty=null}}DisplayObject.prototype.displayObjectUpdateTransform=DisplayObject.prototype.updateTransform;const tempMatrix=new Matrix$2;function sortChildren(C,E){return C.zIndex===E.zIndex?C._lastSortedIndex-E._lastSortedIndex:C.zIndex-E.zIndex}const _Container=class extends DisplayObject{constructor(){super(),this.children=[],this.sortableChildren=_Container.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(C){}addChild(...C){if(C.length>1)for(let E=0;E<C.length;E++)this.addChild(C[E]);else{const E=C[0];E.parent&&E.parent.removeChild(E),E.parent=this,this.sortDirty=!0,E.transform._parentID=-1,this.children.push(E),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",E,this,this.children.length-1),E.emit("added",this)}return C[0]}addChildAt(C,E){if(E<0||E>this.children.length)throw new Error(`${C}addChildAt: The index ${E} supplied is out of bounds ${this.children.length}`);return C.parent&&C.parent.removeChild(C),C.parent=this,this.sortDirty=!0,C.transform._parentID=-1,this.children.splice(E,0,C),this._boundsID++,this.onChildrenChange(E),C.emit("added",this),this.emit("childAdded",C,this,E),C}swapChildren(C,E){if(C===E)return;const I=this.getChildIndex(C),B=this.getChildIndex(E);this.children[I]=E,this.children[B]=C,this.onChildrenChange(I<B?I:B)}getChildIndex(C){const E=this.children.indexOf(C);if(E===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return E}setChildIndex(C,E){if(E<0||E>=this.children.length)throw new Error(`The index ${E} supplied is out of bounds ${this.children.length}`);const I=this.getChildIndex(C);removeItems(this.children,I,1),this.children.splice(E,0,C),this.onChildrenChange(E)}getChildAt(C){if(C<0||C>=this.children.length)throw new Error(`getChildAt: Index (${C}) does not exist.`);return this.children[C]}removeChild(...C){if(C.length>1)for(let E=0;E<C.length;E++)this.removeChild(C[E]);else{const E=C[0],I=this.children.indexOf(E);if(I===-1)return null;E.parent=null,E.transform._parentID=-1,removeItems(this.children,I,1),this._boundsID++,this.onChildrenChange(I),E.emit("removed",this),this.emit("childRemoved",E,this,I)}return C[0]}removeChildAt(C){const E=this.getChildAt(C);return E.parent=null,E.transform._parentID=-1,removeItems(this.children,C,1),this._boundsID++,this.onChildrenChange(C),E.emit("removed",this),this.emit("childRemoved",E,this,C),E}removeChildren(C=0,E=this.children.length){const I=C,B=E,U=B-I;let V;if(U>0&&U<=B){V=this.children.splice(I,U);for(let X=0;X<V.length;++X)V[X].parent=null,V[X].transform&&(V[X].transform._parentID=-1);this._boundsID++,this.onChildrenChange(C);for(let X=0;X<V.length;++X)V[X].emit("removed",this),this.emit("childRemoved",V[X],this,X);return V}else if(U===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let C=!1;for(let E=0,I=this.children.length;E<I;++E){const B=this.children[E];B._lastSortedIndex=E,!C&&B.zIndex!==0&&(C=!0)}C&&this.children.length>1&&this.children.sort(sortChildren),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let C=0,E=this.children.length;C<E;++C){const I=this.children[C];I.visible&&I.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let C=0;C<this.children.length;C++){const E=this.children[C];if(!(!E.visible||!E.renderable))if(E.calculateBounds(),E._mask){const I=E._mask.isMaskData?E._mask.maskObject:E._mask;I?(I.calculateBounds(),this._bounds.addBoundsMask(E._bounds,I._bounds)):this._bounds.addBounds(E._bounds)}else E.filterArea?this._bounds.addBoundsArea(E._bounds,E.filterArea):this._bounds.addBounds(E._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(C,E=!1){const I=super.getLocalBounds(C);if(!E)for(let B=0,U=this.children.length;B<U;++B){const V=this.children[B];V.visible&&V.updateTransform()}return I}_calculateBounds(){}_renderWithCulling(C){const E=C.renderTexture.sourceFrame;if(!(E.width>0&&E.height>0))return;let I,B;this.cullArea?(I=this.cullArea,B=this.worldTransform):this._render!==_Container.prototype._render&&(I=this.getBounds(!0));const U=C.projection.transform;if(U&&(B?(B=tempMatrix.copyFrom(B),B.prepend(U)):B=U),I&&E.intersects(I,B))this._render(C);else if(this.cullArea)return;for(let V=0,X=this.children.length;V<X;++V){const Y=this.children[V],K=Y.cullable;Y.cullable=K||!this.cullArea,Y.render(C),Y.cullable=K}}render(C){var E;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(E=this.filters)!=null&&E.length)this.renderAdvanced(C);else if(this.cullable)this._renderWithCulling(C);else{this._render(C);for(let I=0,B=this.children.length;I<B;++I)this.children[I].render(C)}}renderAdvanced(C){var U,V,X;const E=this.filters,I=this._mask;if(E){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let Y=0;Y<E.length;Y++)E[Y].enabled&&this._enabledFilters.push(E[Y])}const B=E&&((U=this._enabledFilters)==null?void 0:U.length)||I&&(!I.isMaskData||I.enabled&&(I.autoDetect||I.type!==MASK_TYPES.NONE));if(B&&C.batch.flush(),E&&((V=this._enabledFilters)!=null&&V.length)&&C.filter.push(this,this._enabledFilters),I&&C.mask.push(this,this._mask),this.cullable)this._renderWithCulling(C);else{this._render(C);for(let Y=0,K=this.children.length;Y<K;++Y)this.children[Y].render(C)}B&&C.batch.flush(),I&&C.mask.pop(this),E&&((X=this._enabledFilters)!=null&&X.length)&&C.filter.pop()}_render(C){}destroy(C){super.destroy(),this.sortDirty=!1;const E=typeof C=="boolean"?C:C==null?void 0:C.children,I=this.removeChildren(0,this.children.length);if(E)for(let B=0;B<I.length;++B)I[B].destroy(C)}get width(){return this.scale.x*this.getLocalBounds().width}set width(C){const E=this.getLocalBounds().width;E!==0?this.scale.x=C/E:this.scale.x=1,this._width=C}get height(){return this.scale.y*this.getLocalBounds().height}set height(C){const E=this.getLocalBounds().height;E!==0?this.scale.y=C/E:this.scale.y=1,this._height=C}};let Container=_Container;Container.defaultSortableChildren=!1,Container.prototype.containerUpdateTransform=Container.prototype.updateTransform,Object.defineProperties(settings,{SORTABLE_CHILDREN:{get(){return Container.defaultSortableChildren},set(C){deprecation("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Container.defaultSortableChildren=C}}});class GraphicsData{constructor(E,I=null,B=null,U=null){this.points=[],this.holes=[],this.shape=E,this.lineStyle=B,this.fillStyle=I,this.matrix=U,this.type=E.type}clone(){return new GraphicsData(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const tmpPoint=new Point,_GraphicsGeometry=class extends BatchGeometry{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Bounds,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let C=0;C<this.drawCalls.length;C++)this.drawCalls[C].texArray.clear(),DRAW_CALL_POOL.push(this.drawCalls[C]);this.drawCalls.length=0;for(let C=0;C<this.batches.length;C++){const E=this.batches[C];E.reset(),BATCH_POOL.push(E)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(C,E=null,I=null,B=null){const U=new GraphicsData(C,E,I,B);return this.graphicsData.push(U),this.dirty++,this}drawHole(C,E=null){if(!this.graphicsData.length)return null;const I=new GraphicsData(C,null,null,E),B=this.graphicsData[this.graphicsData.length-1];return I.lineStyle=B.lineStyle,B.holes.push(I),this.dirty++,this}destroy(){super.destroy();for(let C=0;C<this.graphicsData.length;++C)this.graphicsData[C].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(C){const E=this.graphicsData;for(let I=0;I<E.length;++I){const B=E[I];if(B.fillStyle.visible&&B.shape&&(B.matrix?B.matrix.applyInverse(C,tmpPoint):tmpPoint.copyFrom(C),B.shape.contains(tmpPoint.x,tmpPoint.y))){let U=!1;if(B.holes){for(let V=0;V<B.holes.length;V++)if(B.holes[V].shape.contains(tmpPoint.x,tmpPoint.y)){U=!0;break}}if(!U)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const C=this.uvs,E=this.graphicsData;let I=null,B=null;this.batches.length>0&&(I=this.batches[this.batches.length-1],B=I.style);for(let Y=this.shapeIndex;Y<E.length;Y++){this.shapeIndex++;const K=E[Y],J=K.fillStyle,xe=K.lineStyle;FILL_COMMANDS[K.type].build(K),K.matrix&&this.transformPoints(K.points,K.matrix),(J.visible||xe.visible)&&this.processHoles(K.holes);for(let _e=0;_e<2;_e++){const Se=_e===0?J:xe;if(!Se.visible)continue;const Ee=Se.texture.baseTexture,Ae=this.indices.length,Re=this.points.length/2;Ee.wrapMode=WRAP_MODES.REPEAT,_e===0?this.processFill(K):this.processLine(K);const Te=this.points.length/2-Re;Te!==0&&(I&&!this._compareStyles(B,Se)&&(I.end(Ae,Re),I=null),I||(I=BATCH_POOL.pop()||new BatchPart,I.begin(Se,Ae,Re),this.batches.push(I),B=Se),this.addUvs(this.points,C,Se.texture,Re,Te,Se.matrix))}}const U=this.indices.length,V=this.points.length/2;if(I&&I.end(U,V),this.batches.length===0){this.batchable=!0;return}const X=V>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&X===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=X?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(C,E){return!(!C||!E||C.texture.baseTexture!==E.texture.baseTexture||C.color+C.alpha!==E.color+E.alpha||!!C.native!=!!E.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let C=0,E=this.graphicsData.length;C<E;C++){const I=this.graphicsData[C],B=I.fillStyle,U=I.lineStyle;if(B&&!B.texture.baseTexture.valid||U&&!U.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const C=this.batches;for(let E=0,I=C.length;E<I;E++){const B=C[E];for(let U=0;U<B.size;U++){const V=B.start+U;this.indicesUint16[V]=this.indicesUint16[V]-B.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const C=this.batches;for(let E=0;E<C.length;E++)if(C[E].style.native)return!1;return this.points.length<_GraphicsGeometry.BATCHABLE_SIZE*2}buildDrawCalls(){let C=++BaseTexture._globalBatch;for(let xe=0;xe<this.drawCalls.length;xe++)this.drawCalls[xe].texArray.clear(),DRAW_CALL_POOL.push(this.drawCalls[xe]);this.drawCalls.length=0;const E=this.colors,I=this.textureIds;let B=DRAW_CALL_POOL.pop();B||(B=new BatchDrawCall,B.texArray=new BatchTextureArray),B.texArray.count=0,B.start=0,B.size=0,B.type=DRAW_MODES.TRIANGLES;let U=0,V=null,X=0,Y=!1,K=DRAW_MODES.TRIANGLES,J=0;this.drawCalls.push(B);for(let xe=0;xe<this.batches.length;xe++){const Z=this.batches[xe],_e=8,Se=Z.style,Ee=Se.texture.baseTexture;Y!==!!Se.native&&(Y=!!Se.native,K=Y?DRAW_MODES.LINES:DRAW_MODES.TRIANGLES,V=null,U=_e,C++),V!==Ee&&(V=Ee,Ee._batchEnabled!==C&&(U===_e&&(C++,U=0,B.size>0&&(B=DRAW_CALL_POOL.pop(),B||(B=new BatchDrawCall,B.texArray=new BatchTextureArray),this.drawCalls.push(B)),B.start=J,B.size=0,B.texArray.count=0,B.type=K),Ee.touched=1,Ee._batchEnabled=C,Ee._batchLocation=U,Ee.wrapMode=WRAP_MODES.REPEAT,B.texArray.elements[B.texArray.count++]=Ee,U++)),B.size+=Z.size,J+=Z.size,X=Ee._batchLocation,this.addColors(E,Se.color,Se.alpha,Z.attribSize,Z.attribStart),this.addTextureIds(I,X,Z.attribSize,Z.attribStart)}BaseTexture._globalBatch=C,this.packAttributes()}packAttributes(){const C=this.points,E=this.uvs,I=this.colors,B=this.textureIds,U=new ArrayBuffer(C.length*3*4),V=new Float32Array(U),X=new Uint32Array(U);let Y=0;for(let K=0;K<C.length/2;K++)V[Y++]=C[K*2],V[Y++]=C[K*2+1],V[Y++]=E[K*2],V[Y++]=E[K*2+1],X[Y++]=I[K],V[Y++]=B[K];this._buffer.update(U),this._indexBuffer.update(this.indicesUint16)}processFill(C){C.holes.length?buildPoly.triangulate(C,this):FILL_COMMANDS[C.type].triangulate(C,this)}processLine(C){buildLine(C,this);for(let E=0;E<C.holes.length;E++)buildLine(C.holes[E],this)}processHoles(C){for(let E=0;E<C.length;E++){const I=C[E];FILL_COMMANDS[I.type].build(I),I.matrix&&this.transformPoints(I.points,I.matrix)}}calculateBounds(){const C=this._bounds;C.clear(),C.addVertexData(this.points,0,this.points.length),C.pad(this.boundsPadding,this.boundsPadding)}transformPoints(C,E){for(let I=0;I<C.length/2;I++){const B=C[I*2],U=C[I*2+1];C[I*2]=E.a*B+E.c*U+E.tx,C[I*2+1]=E.b*B+E.d*U+E.ty}}addColors(C,E,I,B,U=0){const V=Color.shared.setValue(E).toLittleEndianNumber(),X=Color.shared.setValue(V).toPremultiplied(I);C.length=Math.max(C.length,U+B);for(let Y=0;Y<B;Y++)C[U+Y]=X}addTextureIds(C,E,I,B=0){C.length=Math.max(C.length,B+I);for(let U=0;U<I;U++)C[B+U]=E}addUvs(C,E,I,B,U,V=null){let X=0;const Y=E.length,K=I.frame;for(;X<U;){let xe=C[(B+X)*2],Z=C[(B+X)*2+1];if(V){const _e=V.a*xe+V.c*Z+V.tx;Z=V.b*xe+V.d*Z+V.ty,xe=_e}X++,E.push(xe/K.width,Z/K.height)}const J=I.baseTexture;(K.width<J.width||K.height<J.height)&&this.adjustUvs(E,I,Y,U)}adjustUvs(C,E,I,B){const U=E.baseTexture,V=1e-6,X=I+B*2,Y=E.frame,K=Y.width/U.width,J=Y.height/U.height;let xe=Y.x/Y.width,Z=Y.y/Y.height,_e=Math.floor(C[I]+V),Se=Math.floor(C[I+1]+V);for(let Ee=I+2;Ee<X;Ee+=2)_e=Math.min(_e,Math.floor(C[Ee]+V)),Se=Math.min(Se,Math.floor(C[Ee+1]+V));xe-=_e,Z-=Se;for(let Ee=I;Ee<X;Ee+=2)C[Ee]=(C[Ee]+xe)*K,C[Ee+1]=(C[Ee+1]+Z)*J}};let GraphicsGeometry=_GraphicsGeometry;GraphicsGeometry.BATCHABLE_SIZE=100;class FillStyle{constructor(){this.color=16777215,this.alpha=1,this.texture=Texture.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const E=new FillStyle;return E.color=this.color,E.alpha=this.alpha,E.texture=this.texture,E.matrix=this.matrix,E.visible=this.visible,E}reset(){this.color=16777215,this.alpha=1,this.texture=Texture.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class LineStyle extends FillStyle{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=LINE_CAP.BUTT,this.join=LINE_JOIN.MITER,this.miterLimit=10}clone(){const E=new LineStyle;return E.color=this.color,E.alpha=this.alpha,E.texture=this.texture,E.matrix=this.matrix,E.visible=this.visible,E.width=this.width,E.alignment=this.alignment,E.native=this.native,E.cap=this.cap,E.join=this.join,E.miterLimit=this.miterLimit,E}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const DEFAULT_SHADERS={},_Graphics=class extends Container{constructor(C=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new FillStyle,this._lineStyle=new LineStyle,this._matrix=null,this._holeMode=!1,this.state=State$1.for2d(),this._geometry=C||new GraphicsGeometry,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Color(16777215),this.blendMode=BLEND_MODES.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new _Graphics(this._geometry)}set blendMode(C){this.state.blendMode=C}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(C){this._tintColor.setValue(C)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(C=null,E=0,I,B=.5,U=!1){return typeof C=="number"&&(C={width:C,color:E,alpha:I,alignment:B,native:U}),this.lineTextureStyle(C)}lineTextureStyle(C){const E={width:0,texture:Texture.WHITE,color:C!=null&&C.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:LINE_CAP.BUTT,join:LINE_JOIN.MITER,miterLimit:10};C=Object.assign(E,C),this.normalizeColor(C),this.currentPath&&this.startPoly();const I=C.width>0&&C.alpha>0;return I?(C.matrix&&(C.matrix=C.matrix.clone(),C.matrix.invert()),Object.assign(this._lineStyle,{visible:I},C)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const C=this.currentPath.points,E=this.currentPath.points.length;E>2&&(this.drawShape(this.currentPath),this.currentPath=new Polygon,this.currentPath.closeStroke=!1,this.currentPath.points.push(C[E-2],C[E-1]))}else this.currentPath=new Polygon,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(C,E){return this.startPoly(),this.currentPath.points[0]=C,this.currentPath.points[1]=E,this}lineTo(C,E){this.currentPath||this.moveTo(0,0);const I=this.currentPath.points,B=I[I.length-2],U=I[I.length-1];return(B!==C||U!==E)&&I.push(C,E),this}_initCurve(C=0,E=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[C,E]):this.moveTo(C,E)}quadraticCurveTo(C,E,I,B){this._initCurve();const U=this.currentPath.points;return U.length===0&&this.moveTo(0,0),QuadraticUtils.curveTo(C,E,I,B,U),this}bezierCurveTo(C,E,I,B,U,V){return this._initCurve(),BezierUtils.curveTo(C,E,I,B,U,V,this.currentPath.points),this}arcTo(C,E,I,B,U){this._initCurve(C,E);const V=this.currentPath.points,X=ArcUtils.curveTo(C,E,I,B,U,V);if(X){const{cx:Y,cy:K,radius:J,startAngle:xe,endAngle:Z,anticlockwise:_e}=X;this.arc(Y,K,J,xe,Z,_e)}return this}arc(C,E,I,B,U,V=!1){if(B===U)return this;if(!V&&U<=B?U+=PI_2:V&&B<=U&&(B+=PI_2),U-B===0)return this;const Y=C+Math.cos(B)*I,K=E+Math.sin(B)*I,J=this._geometry.closePointEps;let xe=this.currentPath?this.currentPath.points:null;if(xe){const Z=Math.abs(xe[xe.length-2]-Y),_e=Math.abs(xe[xe.length-1]-K);Z<J&&_e<J||xe.push(Y,K)}else this.moveTo(Y,K),xe=this.currentPath.points;return ArcUtils.arc(Y,K,C,E,I,B,U,V,xe),this}beginFill(C=0,E){return this.beginTextureFill({texture:Texture.WHITE,color:C,alpha:E})}normalizeColor(C){const E=Color.shared.setValue(C.color??0);C.color=E.toNumber(),C.alpha??(C.alpha=E.alpha)}beginTextureFill(C){const E={texture:Texture.WHITE,color:16777215,matrix:null};C=Object.assign(E,C),this.normalizeColor(C),this.currentPath&&this.startPoly();const I=C.alpha>0;return I?(C.matrix&&(C.matrix=C.matrix.clone(),C.matrix.invert()),Object.assign(this._fillStyle,{visible:I},C)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(C,E,I,B){return this.drawShape(new Rectangle(C,E,I,B))}drawRoundedRect(C,E,I,B,U){return this.drawShape(new RoundedRectangle(C,E,I,B,U))}drawCircle(C,E,I){return this.drawShape(new Circle(C,E,I))}drawEllipse(C,E,I,B){return this.drawShape(new Ellipse$1(C,E,I,B))}drawPolygon(...C){let E,I=!0;const B=C[0];B.points?(I=B.closeStroke,E=B.points):Array.isArray(C[0])?E=C[0]:E=C;const U=new Polygon(E);return U.closeStroke=I,this.drawShape(U),this}drawShape(C){return this._holeMode?this._geometry.drawHole(C,this._matrix):this._geometry.drawShape(C,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const C=this._geometry.graphicsData;return C.length===1&&C[0].shape.type===SHAPES.RECT&&!C[0].matrix&&!C[0].holes.length&&!(C[0].lineStyle.visible&&C[0].lineStyle.width)}_render(C){this.finishPoly();const E=this._geometry;E.updateBatches(),E.batchable?(this.batchDirty!==E.batchDirty&&this._populateBatches(),this._renderBatched(C)):(C.batch.flush(),this._renderDirect(C))}_populateBatches(){const C=this._geometry,E=this.blendMode,I=C.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=C.batchDirty,this.batches.length=I,this.vertexData=new Float32Array(C.points);for(let B=0;B<I;B++){const U=C.batches[B],V=U.style.color,X=new Float32Array(this.vertexData.buffer,U.attribStart*4*2,U.attribSize*2),Y=new Float32Array(C.uvsFloat32.buffer,U.attribStart*4*2,U.attribSize*2),K=new Uint16Array(C.indicesUint16.buffer,U.start*2,U.size),J={vertexData:X,blendMode:E,indices:K,uvs:Y,_batchRGB:Color.shared.setValue(V).toRgbArray(),_tintRGB:V,_texture:U.style.texture,alpha:U.style.alpha,worldAlpha:1};this.batches[B]=J}}_renderBatched(C){if(this.batches.length){C.batch.setObjectRenderer(C.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let E=0,I=this.batches.length;E<I;E++){const B=this.batches[E];B.worldAlpha=this.worldAlpha*B.alpha,C.plugins[this.pluginName].render(B)}}}_renderDirect(C){const E=this._resolveDirectShader(C),I=this._geometry,B=this.worldAlpha,U=E.uniforms,V=I.drawCalls;U.translationMatrix=this.transform.worldTransform,Color.shared.setValue(this._tintColor).premultiply(B).toArray(U.tint),C.shader.bind(E),C.geometry.bind(I,E),C.state.set(this.state);for(let X=0,Y=V.length;X<Y;X++)this._renderDrawCallDirect(C,I.drawCalls[X])}_renderDrawCallDirect(C,E){const{texArray:I,type:B,size:U,start:V}=E,X=I.count;for(let Y=0;Y<X;Y++)C.texture.bind(I.elements[Y],Y);C.geometry.draw(B,U,V)}_resolveDirectShader(C){let E=this.shader;const I=this.pluginName;if(!E){if(!DEFAULT_SHADERS[I]){const{maxTextures:B}=C.plugins[I],U=new Int32Array(B);for(let Y=0;Y<B;Y++)U[Y]=Y;const V={tint:new Float32Array([1,1,1,1]),translationMatrix:new Matrix$2,default:UniformGroup.from({uSamplers:U},!0)},X=C.plugins[I]._shader.program;DEFAULT_SHADERS[I]=new Shader(X,V)}E=DEFAULT_SHADERS[I]}return E}_calculateBounds(){this.finishPoly();const C=this._geometry;if(!C.graphicsData.length)return;const{minX:E,minY:I,maxX:B,maxY:U}=C.bounds;this._bounds.addFrame(this.transform,E,I,B,U)}containsPoint(C){return this.worldTransform.applyInverse(C,_Graphics._TEMP_POINT),this._geometry.containsPoint(_Graphics._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let C=0;C<this.batches.length;C++){const E=this.batches[C];E._tintRGB=Color.shared.setValue(this._tintColor).multiply(E._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const C=this.transform._worldID;if(this._transformID===C)return;this._transformID=C;const E=this.transform.worldTransform,I=E.a,B=E.b,U=E.c,V=E.d,X=E.tx,Y=E.ty,K=this._geometry.points,J=this.vertexData;let xe=0;for(let Z=0;Z<K.length;Z+=2){const _e=K[Z],Se=K[Z+1];J[xe++]=I*_e+U*Se+X,J[xe++]=V*Se+B*_e+Y}}closePath(){const C=this.currentPath;return C&&(C.closeStroke=!0,this.finishPoly()),this}setMatrix(C){return this._matrix=C,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(C){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(C)}};let Graphics=_Graphics;Graphics.curves=curves,Graphics._TEMP_POINT=new Point;var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},parserExports={},parser={get exports(){return parserExports},set exports(C){parserExports=C}};/*!
1962
1962
  * d-path-parser - v1.0.0
1963
1963
  * by Massimo Artizzu (MaxArt2501)
1964
1964
  *
@@ -1966,10 +1966,10 @@ void main() {
1966
1966
  *
1967
1967
  * Licensed under the MIT License
1968
1968
  * See LICENSE for details
1969
- */(function(t,e){(function(r,i){t.exports=i()})($T,function(){return function(i){for(var n={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},s={number:function(m){return+f("number",m)},"coordinate pair":function(m){var v=f("number",m);if(v===null&&!m)return null;f("comma");var g=f("number",!0);return{x:+v,y:+g}},"arc definition":function(m){var v=s["coordinate pair"](m);if(!v&&!m)return null;f("comma");var g=+f("number",!0);f("comma",!0);var y=!!+f("flag",!0);f("comma");var _=!!+f("flag",!0);f("comma");var x=s["coordinate pair"](!0);return{radii:v,rotation:g,large:y,clockwise:_,end:x}}},a=0,o=[];a<i.length;){var u=f("command"),h=u.toUpperCase(),d=u!==h,l;switch(h){case"M":l=p("coordinate pair").map(function(m,v){return v===1&&(u=d?"l":"L"),c({end:m})});break;case"L":case"T":l=p("coordinate pair").map(function(m){return c({end:m})});break;case"C":if(l=p("coordinate pair"),l.length%3)throw Error("Expected coordinate pair triplet at position "+a);l=l.reduce(function(m,v,g){var y=g%3;if(!y)m.push(c({cp1:v}));else{var _=m[m.length-1];_[y===1?"cp2":"end"]=v}return m},[]);break;case"Q":case"S":if(l=p("coordinate pair"),l.length&1)throw Error("Expected coordinate pair couple at position "+a);l=l.reduce(function(m,v,g){var y=g&1;if(!y)m.push(c({cp:v}));else{var _=m[m.length-1];_.end=v}return m},[]);break;case"H":case"V":l=p("number").map(function(m){return c({value:m})});break;case"A":l=p("arc definition").map(c);break;case"Z":l=[{code:"Z"}];break}o.push.apply(o,l)}return o;function c(m){return m.code=u,m.relative=d,m}function f(m,v){n[m].lastIndex=a;var g=n[m].exec(i);if(!g||g.index!==a){if(!v)return null;throw Error("Expected "+m+" at position "+a)}return a=n[m].lastIndex,g[1]}function p(m){for(var v=[],g,y=!0;g=s[m](y);)v.push(g),y=!!f("comma");return v}}})})(GT);const zT=/^\s+/,jT=/\s+$/;function D(t,e){if(t=t||"",e=e||{},t instanceof D)return t;if(!(this instanceof D))return new D(t,e);var r=HT(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}D.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),e,r,i,n,s,a;return e=t.r/255,r=t.g/255,i=t.b/255,e<=.03928?n=e/12.92:n=Math.pow((e+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*n+.7152*s+.0722*a},setAlpha:function(t){return this._a=th(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Zc(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Zc(this._r,this._g,this._b),e=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+e+", "+r+"%, "+i+"%)":"hsva("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=Kc(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Kc(this._r,this._g,this._b),e=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+e+", "+r+"%, "+i+"%)":"hsla("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return Qc(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return qT(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ye(this._r,255)*100)+"%",g:Math.round(ye(this._g,255)*100)+"%",b:Math.round(ye(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ye(this._r,255)*100)+"%, "+Math.round(ye(this._g,255)*100)+"%, "+Math.round(ye(this._b,255)*100)+"%)":"rgba("+Math.round(ye(this._r,255)*100)+"%, "+Math.round(ye(this._g,255)*100)+"%, "+Math.round(ye(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:aw[Qc(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+Jc(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var n=D(t);r="#"+Jc(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,n=!e&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return n?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return D(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(QT,arguments)},brighten:function(){return this._applyModification(JT,arguments)},darken:function(){return this._applyModification(ew,arguments)},desaturate:function(){return this._applyModification(YT,arguments)},saturate:function(){return this._applyModification(KT,arguments)},greyscale:function(){return this._applyModification(ZT,arguments)},spin:function(){return this._applyModification(tw,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(nw,arguments)},complement:function(){return this._applyCombination(rw,arguments)},monochromatic:function(){return this._applyCombination(sw,arguments)},splitcomplement:function(){return this._applyCombination(iw,arguments)},triad:function(){return this._applyCombination(eh,[3])},tetrad:function(){return this._applyCombination(eh,[4])}},D.fromRatio=function(t,e){if(typeof t=="object"){var r={};for(var i in t)t.hasOwnProperty(i)&&(i==="a"?r[i]=t[i]:r[i]=pi(t[i]));t=r}return D(t,e)};function HT(t){var e={r:0,g:0,b:0},r=1,i=null,n=null,s=null,a=!1,o=!1;return typeof t=="string"&&(t=cw(t)),typeof t=="object"&&(wt(t.r)&&wt(t.g)&&wt(t.b)?(e=VT(t.r,t.g,t.b),a=!0,o=String(t.r).substr(-1)==="%"?"prgb":"rgb"):wt(t.h)&&wt(t.s)&&wt(t.v)?(i=pi(t.s),n=pi(t.v),e=WT(t.h,i,n),a=!0,o="hsv"):wt(t.h)&&wt(t.s)&&wt(t.l)&&(i=pi(t.s),s=pi(t.l),e=XT(t.h,i,s),a=!0,o="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=th(r),{ok:a,format:t.format||o,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}function VT(t,e,r){return{r:ye(t,255)*255,g:ye(e,255)*255,b:ye(r,255)*255}}function Kc(t,e,r){t=ye(t,255),e=ye(e,255),r=ye(r,255);var i=Math.max(t,e,r),n=Math.min(t,e,r),s,a,o=(i+n)/2;if(i==n)s=a=0;else{var u=i-n;switch(a=o>.5?u/(2-i-n):u/(i+n),i){case t:s=(e-r)/u+(e<r?6:0);break;case e:s=(r-t)/u+2;break;case r:s=(t-e)/u+4;break}s/=6}return{h:s,s:a,l:o}}function XT(t,e,r){var i,n,s;t=ye(t,360),e=ye(e,100),r=ye(r,100);function a(h,d,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?h+(d-h)*6*l:l<1/2?d:l<2/3?h+(d-h)*(2/3-l)*6:h}if(e===0)i=n=s=r;else{var o=r<.5?r*(1+e):r+e-r*e,u=2*r-o;i=a(u,o,t+1/3),n=a(u,o,t),s=a(u,o,t-1/3)}return{r:i*255,g:n*255,b:s*255}}function Zc(t,e,r){t=ye(t,255),e=ye(e,255),r=ye(r,255);var i=Math.max(t,e,r),n=Math.min(t,e,r),s,a,o=i,u=i-n;if(a=i===0?0:u/i,i==n)s=0;else{switch(i){case t:s=(e-r)/u+(e<r?6:0);break;case e:s=(r-t)/u+2;break;case r:s=(t-e)/u+4;break}s/=6}return{h:s,s:a,v:o}}function WT(t,e,r){t=ye(t,360)*6,e=ye(e,100),r=ye(r,100);var i=Math.floor(t),n=t-i,s=r*(1-e),a=r*(1-n*e),o=r*(1-(1-n)*e),u=i%6,h=[r,a,s,s,o,r][u],d=[o,r,r,a,s,s][u],l=[s,s,o,r,r,a][u];return{r:h*255,g:d*255,b:l*255}}function Qc(t,e,r,i){var n=[ot(Math.round(t).toString(16)),ot(Math.round(e).toString(16)),ot(Math.round(r).toString(16))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function qT(t,e,r,i,n){var s=[ot(Math.round(t).toString(16)),ot(Math.round(e).toString(16)),ot(Math.round(r).toString(16)),ot(rh(i))];return n&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Jc(t,e,r,i){var n=[ot(rh(i)),ot(Math.round(t).toString(16)),ot(Math.round(e).toString(16)),ot(Math.round(r).toString(16))];return n.join("")}D.equals=function(t,e){return!t||!e?!1:D(t).toRgbString()==D(e).toRgbString()},D.random=function(){return D.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function YT(t,e){e=e===0?0:e||10;var r=D(t).toHsl();return r.s-=e/100,r.s=Fn(r.s),D(r)}function KT(t,e){e=e===0?0:e||10;var r=D(t).toHsl();return r.s+=e/100,r.s=Fn(r.s),D(r)}function ZT(t){return D(t).desaturate(100)}function QT(t,e){e=e===0?0:e||10;var r=D(t).toHsl();return r.l+=e/100,r.l=Fn(r.l),D(r)}function JT(t,e){e=e===0?0:e||10;var r=D(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),D(r)}function ew(t,e){e=e===0?0:e||10;var r=D(t).toHsl();return r.l-=e/100,r.l=Fn(r.l),D(r)}function tw(t,e){var r=D(t).toHsl(),i=(r.h+e)%360;return r.h=i<0?360+i:i,D(r)}function rw(t){var e=D(t).toHsl();return e.h=(e.h+180)%360,D(e)}function eh(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=D(t).toHsl(),i=[D(t)],n=360/e,s=1;s<e;s++)i.push(D({h:(r.h+s*n)%360,s:r.s,l:r.l}));return i}function iw(t){var e=D(t).toHsl(),r=e.h;return[D(t),D({h:(r+72)%360,s:e.s,l:e.l}),D({h:(r+216)%360,s:e.s,l:e.l})]}function nw(t,e,r){e=e||6,r=r||30;var i=D(t).toHsl(),n=360/r,s=[D(t)];for(i.h=(i.h-(n*e>>1)+720)%360;--e;)i.h=(i.h+n)%360,s.push(D(i));return s}function sw(t,e){e=e||6;for(var r=D(t).toHsv(),i=r.h,n=r.s,s=r.v,a=[],o=1/e;e--;)a.push(D({h:i,s:n,v:s})),s=(s+o)%1;return a}D.mix=function(t,e,r){r=r===0?0:r||50;var i=D(t).toRgb(),n=D(e).toRgb(),s=r/100,a={r:(n.r-i.r)*s+i.r,g:(n.g-i.g)*s+i.g,b:(n.b-i.b)*s+i.b,a:(n.a-i.a)*s+i.a};return D(a)},D.readability=function(t,e){var r=D(t),i=D(e);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},D.isReadable=function(t,e,r){var i=D.readability(t,e),n,s;switch(s=!1,n=hw(r),n.level+n.size){case"AAsmall":case"AAAlarge":s=i>=4.5;break;case"AAlarge":s=i>=3;break;case"AAAsmall":s=i>=7;break}return s},D.mostReadable=function(t,e,r){var i=null,n=0,s,a,o,u;r=r||{},a=r.includeFallbackColors,o=r.level,u=r.size;for(var h=0;h<e.length;h++)s=D.readability(t,e[h]),s>n&&(n=s,i=D(e[h]));return D.isReadable(t,i,{level:o,size:u})||!a?i:(r.includeFallbackColors=!1,D.mostReadable(t,["#fff","#000"],r))};var Ba=D.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},aw=D.hexNames=ow(Ba);function ow(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function th(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function ye(t,e){lw(t)&&(t="100%");var r=uw(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function Fn(t){return Math.min(1,Math.max(0,t))}function He(t){return parseInt(t,16)}function lw(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function uw(t){return typeof t=="string"&&t.indexOf("%")!=-1}function ot(t){return t.length==1?"0"+t:""+t}function pi(t){return t<=1&&(t=t*100+"%"),t}function rh(t){return Math.round(parseFloat(t)*255).toString(16)}function ih(t){return He(t)/255}var lt=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+t+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function wt(t){return!!lt.CSS_UNIT.exec(t)}function cw(t){t=t.replace(zT,"").replace(jT,"").toLowerCase();var e=!1;if(Ba[t])t=Ba[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=lt.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=lt.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=lt.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=lt.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=lt.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=lt.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=lt.hex8.exec(t))?{r:He(r[1]),g:He(r[2]),b:He(r[3]),a:ih(r[4]),format:e?"name":"hex8"}:(r=lt.hex6.exec(t))?{r:He(r[1]),g:He(r[2]),b:He(r[3]),format:e?"name":"hex"}:(r=lt.hex4.exec(t))?{r:He(r[1]+""+r[1]),g:He(r[2]+""+r[2]),b:He(r[3]+""+r[3]),a:ih(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=lt.hex3.exec(t))?{r:He(r[1]+""+r[1]),g:He(r[2]+""+r[2]),b:He(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function hw(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:e,size:r}}var fw=function(){function t(e,r){var i=[],n=!0,s=!1,a=void 0;try{for(var o=e[Symbol.iterator](),u;!(n=(u=o.next()).done)&&(i.push(u.value),!(r&&i.length===r));n=!0);}catch(h){s=!0,a=h}finally{try{!n&&o.return&&o.return()}finally{if(s)throw a}}return i}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),mi=Math.PI*2,Ua=function(e,r,i,n,s,a,o){var u=e.x,h=e.y;u*=r,h*=i;var d=n*u-s*h,l=s*u+n*h;return{x:d+a,y:l+o}},dw=function(e,r){var i=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),n=Math.cos(e),s=Math.sin(e),a=Math.cos(e+r),o=Math.sin(e+r);return[{x:n-s*i,y:s+n*i},{x:a+o*i,y:o-a*i},{x:a,y:o}]},nh=function(e,r,i,n){var s=e*n-r*i<0?-1:1,a=e*i+r*n;return a>1&&(a=1),a<-1&&(a=-1),s*Math.acos(a)},pw=function(e,r,i,n,s,a,o,u,h,d,l,c){var f=Math.pow(s,2),p=Math.pow(a,2),m=Math.pow(l,2),v=Math.pow(c,2),g=f*p-f*v-p*m;g<0&&(g=0),g/=f*v+p*m,g=Math.sqrt(g)*(o===u?-1:1);var y=g*s/a*c,_=g*-a/s*l,x=d*y-h*_+(e+i)/2,T=h*y+d*_+(r+n)/2,w=(l-y)/s,b=(c-_)/a,S=(-l-y)/s,A=(-c-_)/a,I=nh(1,0,w,b),F=nh(w,b,S,A);return u===0&&F>0&&(F-=mi),u===1&&F<0&&(F+=mi),[x,T,I,F]},sh=function(e){var r=e.px,i=e.py,n=e.cx,s=e.cy,a=e.rx,o=e.ry,u=e.xAxisRotation,h=u===void 0?0:u,d=e.largeArcFlag,l=d===void 0?0:d,c=e.sweepFlag,f=c===void 0?0:c,p=[];if(a===0||o===0)return[];var m=Math.sin(h*mi/360),v=Math.cos(h*mi/360),g=v*(r-n)/2+m*(i-s)/2,y=-m*(r-n)/2+v*(i-s)/2;if(g===0&&y===0)return[];a=Math.abs(a),o=Math.abs(o);var _=Math.pow(g,2)/Math.pow(a,2)+Math.pow(y,2)/Math.pow(o,2);_>1&&(a*=Math.sqrt(_),o*=Math.sqrt(_));var x=pw(r,i,n,s,a,o,l,f,m,v,g,y),T=fw(x,4),w=T[0],b=T[1],S=T[2],A=T[3],I=Math.abs(A)/(mi/4);Math.abs(1-I)<1e-7&&(I=1);var F=Math.max(Math.ceil(I),1);A/=F;for(var B=0;B<F;B++)p.push(dw(S,A)),S+=A;return p.map(function(E){var C=Ua(E[0],a,o,v,m,w,b),$=C.x,G=C.y,R=Ua(E[1],a,o,v,m,w,b),U=R.x,X=R.y,M=Ua(E[2],a,o,v,m,w,b),O=M.x,H=M.y;return{x1:$,y1:G,x2:U,y2:X,x:O,y:H}})};class mw extends La{constructor(e){super(),this.lineColor=null,e&&this.drawSVG(e)}drawSVG(e){if(typeof e=="string"){const r=document.createElement("div");r.innerHTML=e.trim(),e=r.querySelector("svg")}if(!e)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(e),this._svgChildren(e.children),this}_svgChildren(e,r=!1){for(let i=0;i<e.length;i++){const n=e[i];switch(this._svgFill(n,r),n.nodeName.toLowerCase()){case"path":{this._svgPath(n);break}case"circle":case"ellipse":{this._svgCircle(n);break}case"rect":{this._svgRect(n);break}case"polygon":{this._svgPoly(n,!0);break}case"polyline":{this._svgPoly(n);break}case"g":break;default:{console.info(`[PIXI.SVG] <${n.nodeName}> elements unsupported`);break}}this._svgChildren(n.children,!0)}}_hexToUint(e){if(e[0]==="#")return e=e.substr(1),e.length===3&&(e=e.replace(/([a-f0-9])/ig,"$1$1")),parseInt(e,16);const{r,g:i,b:n}=D(e).toRgb();return(r<<16)+(i<<8)+n}_svgCircle(e){let r="r",i="r";const n=e.nodeName==="elipse";n&&(r+="x",i+="y");const s=parseFloat(e.getAttribute(i)),a=parseFloat(e.getAttribute(r)),o=e.getAttribute("cx"),u=e.getAttribute("cy");let h=0,d=0;o!==null&&(h=parseFloat(o)),u!==null&&(d=parseFloat(u)),n?this.drawEllipse(h,d,s,a):this.drawCircle(h,d,s)}_svgRect(e){const r=parseFloat(e.getAttribute("x")),i=parseFloat(e.getAttribute("y")),n=parseFloat(e.getAttribute("width")),s=parseFloat(e.getAttribute("height")),a=parseFloat(e.getAttribute("rx"));a?this.drawRoundedRect(r,i,n,s,a):this.drawRect(r,i,n,s)}_convertStyleName(e){return e.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(e){const r=e.getAttribute("style"),i=e.getAttribute("opacity"),n={fill:e.getAttribute("fill"),opacity:i||e.getAttribute("fill-opacity"),stroke:e.getAttribute("stroke"),strokeOpacity:i||e.getAttribute("stroke-opacity"),strokeWidth:e.getAttribute("stroke-width"),cap:e.getAttribute("stroke-linecap"),join:e.getAttribute("stroke-linejoin"),miterLimit:e.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(s=>{const[a,o]=s.split(":");if(a){const u=this._convertStyleName(a);n[u]||(n[u]=o.trim())}}),n}_svgPoly(e,r){const i=e.getAttribute("points").split(/[ ,]/g).map(n=>parseInt(n,10));this.drawPolygon(i),r&&this.closePath()}_svgFill(e,r){const{fill:i,opacity:n,stroke:s,strokeOpacity:a,strokeWidth:o,cap:u,join:h,miterLimit:d}=this._svgStyle(e),c=o!==null?parseFloat(o):s!==null?1:0,f=s!==null?this._hexToUint(s):this.lineColor;i?i==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(i),n!==null?parseFloat(n):1):r||this.beginFill(0),this.lineStyle({width:s===null&&o===null&&r?this.line.width:c,alpha:a===null?this.line.alpha:parseFloat(a),color:s===null&&r?this.line.color:f,cap:u===null&&r?this.line.cap:u,join:h===null&&r?this.line.join:h,miterLimit:d===null&&r?this.line.miterLimit:parseFloat(d)}),e.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(e){const r=e.getAttribute("d");let i=0,n=0;const s=Da(r.trim());for(let a=0;a<s.length;a++){const o=s[a];switch(o.code){case"m":{this.moveTo(i+=o.end.x,n+=o.end.y);break}case"M":{this.moveTo(i=o.end.x,n=o.end.y);break}case"H":{this.lineTo(i=o.value,n);break}case"h":{this.lineTo(i+=o.value,n);break}case"V":{this.lineTo(i,n=o.value);break}case"v":{this.lineTo(i,n+=o.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(i=o.end.x,n=o.end.y);break}case"l":{this.lineTo(i+=o.end.x,n+=o.end.y);break}case"C":{this.bezierCurveTo(o.cp1.x,o.cp1.y,o.cp2.x,o.cp2.y,i=o.end.x,n=o.end.y);break}case"c":{const u=i,h=n;this.bezierCurveTo(u+o.cp1.x,h+o.cp1.y,u+o.cp2.x,h+o.cp2.y,i+=o.end.x,n+=o.end.y);break}case"s":case"q":{const u=i,h=n;this.quadraticCurveTo(u+o.cp.x,h+o.cp.y,i+=o.end.x,n+=o.end.y);break}case"S":case"Q":{this.quadraticCurveTo(o.cp.x,o.cp.y,i=o.end.x,n=o.end.y);break}case"a":{sh({px:i,py:n,cx:i+=o.end.x,cy:n+=o.end.y,rx:o.radii.x,ry:o.radii.y,xAxisRotation:o.rotation,largeArcFlag:o.large?1:0,sweepFlag:o.clockwise?1:0}).forEach(({x1:u,y1:h,x2:d,y2:l,x:c,y:f})=>this.bezierCurveTo(u,h,d,l,c,f));break}case"A":{sh({px:i,py:n,cx:i=o.end.x,cy:n=o.end.y,rx:o.radii.x,ry:o.radii.y,xAxisRotation:o.rotation,largeArcFlag:o.large?1:0,sweepFlag:o.clockwise?1:0}).forEach(({x1:u,y1:h,x2:d,y2:l,x:c,y:f})=>this.bezierCurveTo(u,h,d,l,c,f));break}default:{console.info("[PIXI.SVG] Draw command not supported:",o.code,o);break}}}}}var On={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},gw=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function vw(t){return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&gw.indexOf(t)>=0}function _w(t){switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function yw(t){return(t|32)===97}function Dr(t){return t>=48&&t<=57}function xw(t){return t>=48&&t<=57||t===43||t===45||t===46}function bw(t){this.index=0,this.path=t,this.max=t.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function Nn(t){for(;t.index<t.max&&vw(t.path.charCodeAt(t.index));)t.index++}function Tw(t){var e=t.path.charCodeAt(t.index);if(e===48){t.param=0,t.index++;return}if(e===49){t.param=1,t.index++;return}t.err="SvgPath: arc flag can be 0 or 1 only (at pos "+t.index+")"}function ww(t){var e=t.index,r=e,i=t.max,n=!1,s=!1,a=!1,o=!1,u;if(r>=i){t.err="SvgPath: missed param (at pos "+r+")";return}if(u=t.path.charCodeAt(r),(u===43||u===45)&&(r++,u=r<i?t.path.charCodeAt(r):0),!Dr(u)&&u!==46){t.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(u!==46){if(n=u===48,r++,u=r<i?t.path.charCodeAt(r):0,n&&r<i&&u&&Dr(u)){t.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+e+")";return}for(;r<i&&Dr(t.path.charCodeAt(r));)r++,s=!0;u=r<i?t.path.charCodeAt(r):0}if(u===46){for(o=!0,r++;Dr(t.path.charCodeAt(r));)r++,a=!0;u=r<i?t.path.charCodeAt(r):0}if(u===101||u===69){if(o&&!s&&!a){t.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,u=r<i?t.path.charCodeAt(r):0,(u===43||u===45)&&r++,r<i&&Dr(t.path.charCodeAt(r)))for(;r<i&&Dr(t.path.charCodeAt(r));)r++;else{t.err="SvgPath: invalid float exponent (at pos "+r+")";return}}t.index=r,t.param=parseFloat(t.path.slice(e,r))+0}function $a(t){var e,r;e=t.path[t.segmentStart],r=e.toLowerCase();var i=t.data;if(r==="m"&&i.length>2&&(t.result.push([e,i[0],i[1]]),i=i.slice(2),r="l",e=e==="m"?"l":"L"),r==="r")t.result.push([e].concat(i));else for(;i.length>=On[r]&&(t.result.push([e].concat(i.splice(0,On[r]))),!!On[r]););}function Sw(t){var e=t.max,r,i,n,s,a;if(t.segmentStart=t.index,r=t.path.charCodeAt(t.index),i=yw(r),!_w(r)){t.err="SvgPath: bad command "+t.path[t.index]+" (at pos "+t.index+")";return}if(s=On[t.path[t.index].toLowerCase()],t.index++,Nn(t),t.data=[],!s){$a(t);return}for(n=!1;;){for(a=s;a>0;a--){if(i&&(a===3||a===4)?Tw(t):ww(t),t.err.length){$a(t);return}t.data.push(t.param),Nn(t),n=!1,t.index<e&&t.path.charCodeAt(t.index)===44&&(t.index++,Nn(t),n=!0)}if(!n&&(t.index>=t.max||!xw(t.path.charCodeAt(t.index))))break}$a(t)}var Aw=function(e){var r=new bw(e),i=r.max;for(Nn(r);r.index<i&&!r.err.length;)Sw(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function Ew(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function ut(){if(!(this instanceof ut))return new ut;this.queue=[],this.cache=null}ut.prototype.matrix=function(t){return t[0]===1&&t[1]===0&&t[2]===0&&t[3]===1&&t[4]===0&&t[5]===0?this:(this.cache=null,this.queue.push(t),this)},ut.prototype.translate=function(t,e){return(t!==0||e!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},ut.prototype.scale=function(t,e){return(t!==1||e!==1)&&(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},ut.prototype.rotate=function(t,e,r){var i,n,s;return t!==0&&(this.translate(e,r),i=t*Math.PI/180,n=Math.cos(i),s=Math.sin(i),this.queue.push([n,s,-s,n,0,0]),this.cache=null,this.translate(-e,-r)),this},ut.prototype.skewX=function(t){return t!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},ut.prototype.skewY=function(t){return t!==0&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},ut.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var t=1;t<this.queue.length;t++)this.cache=Ew(this.cache,this.queue[t]);return this.cache},ut.prototype.calc=function(t,e,r){var i;return this.queue.length?(this.cache||(this.cache=this.toArray()),i=this.cache,[t*i[0]+e*i[2]+(r?0:i[4]),t*i[1]+e*i[3]+(r?0:i[5])]):[t,e]};var ah=ut,Cw=ah,Iw={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},Rw=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,Pw=/[\s,]+/,Mw=function(e){var r=new Cw,i,n;return e.split(Rw).forEach(function(s){if(s.length){if(typeof Iw[s]<"u"){i=s;return}switch(n=s.split(Pw).map(function(a){return+a||0}),i){case"matrix":n.length===6&&r.matrix(n);return;case"scale":n.length===1?r.scale(n[0],n[0]):n.length===2&&r.scale(n[0],n[1]);return;case"rotate":n.length===1?r.rotate(n[0],0,0):n.length===3&&r.rotate(n[0],n[1],n[2]);return;case"translate":n.length===1?r.translate(n[0],0):n.length===2&&r.translate(n[0],n[1]);return;case"skewX":n.length===1&&r.skewX(n[0]);return;case"skewY":n.length===1&&r.skewY(n[0]);return}}}),r},gi=Math.PI*2;function oh(t,e,r,i){var n=t*i-e*r<0?-1:1,s=t*r+e*i;return s>1&&(s=1),s<-1&&(s=-1),n*Math.acos(s)}function Fw(t,e,r,i,n,s,a,o,u,h){var d=h*(t-r)/2+u*(e-i)/2,l=-u*(t-r)/2+h*(e-i)/2,c=a*a,f=o*o,p=d*d,m=l*l,v=c*f-c*m-f*p;v<0&&(v=0),v/=c*m+f*p,v=Math.sqrt(v)*(n===s?-1:1);var g=v*a/o*l,y=v*-o/a*d,_=h*g-u*y+(t+r)/2,x=u*g+h*y+(e+i)/2,T=(d-g)/a,w=(l-y)/o,b=(-d-g)/a,S=(-l-y)/o,A=oh(1,0,T,w),I=oh(T,w,b,S);return s===0&&I>0&&(I-=gi),s===1&&I<0&&(I+=gi),[_,x,A,I]}function Ow(t,e){var r=1.3333333333333333*Math.tan(e/4),i=Math.cos(t),n=Math.sin(t),s=Math.cos(t+e),a=Math.sin(t+e);return[i,n,i-n*r,n+i*r,s+a*r,a-s*r,s,a]}var Nw=function(e,r,i,n,s,a,o,u,h){var d=Math.sin(h*gi/360),l=Math.cos(h*gi/360),c=l*(e-i)/2+d*(r-n)/2,f=-d*(e-i)/2+l*(r-n)/2;if(c===0&&f===0)return[];if(o===0||u===0)return[];o=Math.abs(o),u=Math.abs(u);var p=c*c/(o*o)+f*f/(u*u);p>1&&(o*=Math.sqrt(p),u*=Math.sqrt(p));var m=Fw(e,r,i,n,s,a,o,u,d,l),v=[],g=m[2],y=m[3],_=Math.max(Math.ceil(Math.abs(y)/(gi/4)),1);y/=_;for(var x=0;x<_;x++)v.push(Ow(g,y)),g+=y;return v.map(function(T){for(var w=0;w<T.length;w+=2){var b=T[w+0],S=T[w+1];b*=o,S*=u;var A=l*b-d*S,I=d*b+l*S;T[w+0]=A+m[0],T[w+1]=I+m[1]}return T})},vi=1e-10,lh=Math.PI/180;function _i(t,e,r){if(!(this instanceof _i))return new _i(t,e,r);this.rx=t,this.ry=e,this.ax=r}_i.prototype.transform=function(t){var e=Math.cos(this.ax*lh),r=Math.sin(this.ax*lh),i=[this.rx*(t[0]*e+t[2]*r),this.rx*(t[1]*e+t[3]*r),this.ry*(-t[0]*r+t[2]*e),this.ry*(-t[1]*r+t[3]*e)],n=i[0]*i[0]+i[2]*i[2],s=i[1]*i[1]+i[3]*i[3],a=((i[0]-i[3])*(i[0]-i[3])+(i[2]+i[1])*(i[2]+i[1]))*((i[0]+i[3])*(i[0]+i[3])+(i[2]-i[1])*(i[2]-i[1])),o=(n+s)/2;if(a<vi*o)return this.rx=this.ry=Math.sqrt(o),this.ax=0,this;var u=i[0]*i[1]+i[2]*i[3];a=Math.sqrt(a);var h=o+a/2,d=o-a/2;return this.ax=Math.abs(u)<vi&&Math.abs(h-s)<vi?90:Math.atan(Math.abs(u)>Math.abs(h-s)?(h-n)/u:u/(h-s))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(d)):(this.ax+=90,this.rx=Math.sqrt(d),this.ry=Math.sqrt(h)),this},_i.prototype.isDegenerate=function(){return this.rx<vi*this.ry||this.ry<vi*this.rx};var kw=_i,Lw=Aw,Dw=Mw,kt=ah,Bw=Nw,Uw=kw;function Te(t){if(!(this instanceof Te))return new Te(t);var e=Lw(t);this.segments=e.segments,this.err=e.err,this.__stack=[]}Te.from=function(t){if(typeof t=="string")return new Te(t);if(t instanceof Te){var e=new Te("");return e.err=t.err,e.segments=t.segments.map(function(r){return r.slice()}),e.__stack=t.__stack.map(function(r){return kt().matrix(r.toArray())}),e}throw new Error("SvgPath.from: invalid param type "+t)},Te.prototype.__matrix=function(t){var e=this,r;t.queue.length&&this.iterate(function(i,n,s,a){var o,u,h,d;switch(i[0]){case"v":o=t.calc(0,i[1],!0),u=o[0]===0?["v",o[1]]:["l",o[0],o[1]];break;case"V":o=t.calc(s,i[1],!1),u=o[0]===t.calc(s,a,!1)[0]?["V",o[1]]:["L",o[0],o[1]];break;case"h":o=t.calc(i[1],0,!0),u=o[1]===0?["h",o[0]]:["l",o[0],o[1]];break;case"H":o=t.calc(i[1],a,!1),u=o[1]===t.calc(s,a,!1)[1]?["H",o[0]]:["L",o[0],o[1]];break;case"a":case"A":var l=t.toArray(),c=Uw(i[1],i[2],i[3]).transform(l);if(l[0]*l[3]-l[1]*l[2]<0&&(i[5]=i[5]?"0":"1"),o=t.calc(i[6],i[7],i[0]==="a"),i[0]==="A"&&i[6]===s&&i[7]===a||i[0]==="a"&&i[6]===0&&i[7]===0){u=[i[0]==="a"?"l":"L",o[0],o[1]];break}c.isDegenerate()?u=[i[0]==="a"?"l":"L",o[0],o[1]]:u=[i[0],c.rx,c.ry,c.ax,i[4],i[5],o[0],o[1]];break;case"m":d=n>0,o=t.calc(i[1],i[2],d),u=["m",o[0],o[1]];break;default:for(h=i[0],u=[h],d=h.toLowerCase()===h,r=1;r<i.length;r+=2)o=t.calc(i[r],i[r+1],d),u.push(o[0],o[1])}e.segments[n]=u},!0)},Te.prototype.__evaluateStack=function(){var t,e;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(t=kt(),e=this.__stack.length;--e>=0;)t.matrix(this.__stack[e].toArray());this.__matrix(t),this.__stack=[]}},Te.prototype.toString=function(){var t="",e="",r=!1;this.__evaluateStack();for(var i=0,n=this.segments.length;i<n;i++){var s=this.segments[i],a=s[0];a!==e||a==="m"||a==="M"?(a==="m"&&e==="z"&&(t+=" "),t+=a,r=!1):r=!0;for(var o=1;o<s.length;o++){var u=s[o];o===1?r&&u>=0&&(t+=" "):u>=0&&(t+=" "),t+=u}e=a}return t},Te.prototype.translate=function(t,e){return this.__stack.push(kt().translate(t,e||0)),this},Te.prototype.scale=function(t,e){return this.__stack.push(kt().scale(t,!e&&e!==0?t:e)),this},Te.prototype.rotate=function(t,e,r){return this.__stack.push(kt().rotate(t,e||0,r||0)),this},Te.prototype.skewX=function(t){return this.__stack.push(kt().skewX(t)),this},Te.prototype.skewY=function(t){return this.__stack.push(kt().skewY(t)),this},Te.prototype.matrix=function(t){return this.__stack.push(kt().matrix(t)),this},Te.prototype.transform=function(t){return t.trim()?(this.__stack.push(Dw(t)),this):this},Te.prototype.round=function(t){var e=0,r=0,i=0,n=0,s;return t=t||0,this.__evaluateStack(),this.segments.forEach(function(a){var o=a[0].toLowerCase()===a[0];switch(a[0]){case"H":case"h":o&&(a[1]+=i),i=a[1]-a[1].toFixed(t),a[1]=+a[1].toFixed(t);return;case"V":case"v":o&&(a[1]+=n),n=a[1]-a[1].toFixed(t),a[1]=+a[1].toFixed(t);return;case"Z":case"z":i=e,n=r;return;case"M":case"m":o&&(a[1]+=i,a[2]+=n),i=a[1]-a[1].toFixed(t),n=a[2]-a[2].toFixed(t),e=i,r=n,a[1]=+a[1].toFixed(t),a[2]=+a[2].toFixed(t);return;case"A":case"a":o&&(a[6]+=i,a[7]+=n),i=a[6]-a[6].toFixed(t),n=a[7]-a[7].toFixed(t),a[1]=+a[1].toFixed(t),a[2]=+a[2].toFixed(t),a[3]=+a[3].toFixed(t+2),a[6]=+a[6].toFixed(t),a[7]=+a[7].toFixed(t);return;default:s=a.length,o&&(a[s-2]+=i,a[s-1]+=n),i=a[s-2]-a[s-2].toFixed(t),n=a[s-1]-a[s-1].toFixed(t),a.forEach(function(u,h){h&&(a[h]=+a[h].toFixed(t))});return}}),this},Te.prototype.iterate=function(t,e){var r=this.segments,i={},n=!1,s=0,a=0,o=0,u=0,h,d,l;if(e||this.__evaluateStack(),r.forEach(function(c,f){var p=t(c,f,s,a);Array.isArray(p)&&(i[f]=p,n=!0);var m=c[0]===c[0].toLowerCase();switch(c[0]){case"m":case"M":s=c[1]+(m?s:0),a=c[2]+(m?a:0),o=s,u=a;return;case"h":case"H":s=c[1]+(m?s:0);return;case"v":case"V":a=c[1]+(m?a:0);return;case"z":case"Z":s=o,a=u;return;default:s=c[c.length-2]+(m?s:0),a=c[c.length-1]+(m?a:0)}}),!n)return this;for(l=[],h=0;h<r.length;h++)if(typeof i[h]<"u")for(d=0;d<i[h].length;d++)l.push(i[h][d]);else l.push(r[h]);return this.segments=l,this},Te.prototype.abs=function(){return this.iterate(function(t,e,r,i){var n=t[0],s=n.toUpperCase(),a;if(n!==s)switch(t[0]=s,n){case"v":t[1]+=i;return;case"a":t[6]+=r,t[7]+=i;return;default:for(a=1;a<t.length;a++)t[a]+=a%2?r:i}},!0),this},Te.prototype.rel=function(){return this.iterate(function(t,e,r,i){var n=t[0],s=n.toLowerCase(),a;if(n!==s&&!(e===0&&n==="M"))switch(t[0]=s,n){case"V":t[1]-=i;return;case"A":t[6]-=r,t[7]-=i;return;default:for(a=1;a<t.length;a++)t[a]-=a%2?r:i}},!0),this},Te.prototype.unarc=function(){return this.iterate(function(t,e,r,i){var n,s,a,o=[],u=t[0];return u!=="A"&&u!=="a"?null:(u==="a"?(s=r+t[6],a=i+t[7]):(s=t[6],a=t[7]),n=Bw(r,i,s,a,t[4],t[5],t[1],t[2],t[3]),n.length===0?[[t[0]==="a"?"l":"L",t[6],t[7]]]:(n.forEach(function(h){o.push(["C",h[2],h[3],h[4],h[5],h[6],h[7]])}),o))}),this},Te.prototype.unshort=function(){var t=this.segments,e,r,i,n,s;return this.iterate(function(a,o,u,h){var d=a[0],l=d.toUpperCase(),c;o&&(l==="T"?(c=d==="t",i=t[o-1],i[0]==="Q"?(e=i[1]-u,r=i[2]-h):i[0]==="q"?(e=i[1]-i[3],r=i[2]-i[4]):(e=0,r=0),n=-e,s=-r,c||(n+=u,s+=h),t[o]=[c?"q":"Q",n,s,a[1],a[2]]):l==="S"&&(c=d==="s",i=t[o-1],i[0]==="C"?(e=i[3]-u,r=i[4]-h):i[0]==="c"?(e=i[3]-i[5],r=i[4]-i[6]):(e=0,r=0),n=-e,s=-r,c||(n+=u,s+=h),t[o]=[c?"c":"C",n,s,a[1],a[2],a[3],a[4]]))}),this};var $w=Te,Gw=$w;const zw=Lt(Gw),jw=L.forwardRef((t,e)=>{const[r,i]=L.useState(null),n=P.useRef(null),s=P.useRef(null),a=P.useRef(null),{path:o,visible:u,disabled:h,transformation:{x:d,y:l,width:c,height:f,anchor:p,hexColor:m,fill:v,stroke:g="none",strokeWidth:y=0,colorCorrection:_={}},pointerdown:x,pointerup:T}=t,w=ee.useApp(),{temperatureFilter:b,sharpnessFilter:S,hueFilter:A,blurFilter:I,adjustmentFilter:F,vignetteFilter:B,noiseFilter:E}=er(_),{blurRadius:C=0,vignette:$=0,noise:G=0}=_;return L.useEffect(()=>{const R=zw(o).scale(5).translate(0,0).toString(),U=`<svg xmlns="http://www.w3.org/2000/svg" width="${c}" height="${f}">
1970
- <path stroke="${g}" stroke-width="${y}" fill="${m||v}" d="${R}">
1969
+ */(function(C,E){(function(I,B){C.exports=B()})(commonjsGlobal,function(){return function(B){for(var U={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},V={number:function(Ae){return+Se("number",Ae)},"coordinate pair":function(Ae){var Re=Se("number",Ae);if(Re===null&&!Ae)return null;Se("comma");var Te=Se("number",!0);return{x:+Re,y:+Te}},"arc definition":function(Ae){var Re=V["coordinate pair"](Ae);if(!Re&&!Ae)return null;Se("comma");var Te=+Se("number",!0);Se("comma",!0);var we=!!+Se("flag",!0);Se("comma");var Pe=!!+Se("flag",!0);Se("comma");var Ie=V["coordinate pair"](!0);return{radii:Re,rotation:Te,large:we,clockwise:Pe,end:Ie}}},X=0,Y=[];X<B.length;){var K=Se("command"),J=K.toUpperCase(),xe=K!==J,Z;switch(J){case"M":Z=Ee("coordinate pair").map(function(Ae,Re){return Re===1&&(K=xe?"l":"L"),_e({end:Ae})});break;case"L":case"T":Z=Ee("coordinate pair").map(function(Ae){return _e({end:Ae})});break;case"C":if(Z=Ee("coordinate pair"),Z.length%3)throw Error("Expected coordinate pair triplet at position "+X);Z=Z.reduce(function(Ae,Re,Te){var we=Te%3;if(!we)Ae.push(_e({cp1:Re}));else{var Pe=Ae[Ae.length-1];Pe[we===1?"cp2":"end"]=Re}return Ae},[]);break;case"Q":case"S":if(Z=Ee("coordinate pair"),Z.length&1)throw Error("Expected coordinate pair couple at position "+X);Z=Z.reduce(function(Ae,Re,Te){var we=Te&1;if(!we)Ae.push(_e({cp:Re}));else{var Pe=Ae[Ae.length-1];Pe.end=Re}return Ae},[]);break;case"H":case"V":Z=Ee("number").map(function(Ae){return _e({value:Ae})});break;case"A":Z=Ee("arc definition").map(_e);break;case"Z":Z=[{code:"Z"}];break}Y.push.apply(Y,Z)}return Y;function _e(Ae){return Ae.code=K,Ae.relative=xe,Ae}function Se(Ae,Re){U[Ae].lastIndex=X;var Te=U[Ae].exec(B);if(!Te||Te.index!==X){if(!Re)return null;throw Error("Expected "+Ae+" at position "+X)}return X=U[Ae].lastIndex,Te[1]}function Ee(Ae){for(var Re=[],Te,we=!0;Te=V[Ae](we);)Re.push(Te),we=!!Se("comma");return Re}}})})(parser);const trimLeft=/^\s+/,trimRight=/\s+$/;function tinycolor(C,E){if(C=C||"",E=E||{},C instanceof tinycolor)return C;if(!(this instanceof tinycolor))return new tinycolor(C,E);var I=inputToRGB(C);this._originalInput=C,this._r=I.r,this._g=I.g,this._b=I.b,this._a=I.a,this._roundA=Math.round(100*this._a)/100,this._format=E.format||I.format,this._gradientType=E.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=I.ok}tinycolor.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var C=this.toRgb();return(C.r*299+C.g*587+C.b*114)/1e3},getLuminance:function(){var C=this.toRgb(),E,I,B,U,V,X;return E=C.r/255,I=C.g/255,B=C.b/255,E<=.03928?U=E/12.92:U=Math.pow((E+.055)/1.055,2.4),I<=.03928?V=I/12.92:V=Math.pow((I+.055)/1.055,2.4),B<=.03928?X=B/12.92:X=Math.pow((B+.055)/1.055,2.4),.2126*U+.7152*V+.0722*X},setAlpha:function(C){return this._a=boundAlpha(C),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var C=rgbToHsv(this._r,this._g,this._b);return{h:C.h*360,s:C.s,v:C.v,a:this._a}},toHsvString:function(){var C=rgbToHsv(this._r,this._g,this._b),E=Math.round(C.h*360),I=Math.round(C.s*100),B=Math.round(C.v*100);return this._a==1?"hsv("+E+", "+I+"%, "+B+"%)":"hsva("+E+", "+I+"%, "+B+"%, "+this._roundA+")"},toHsl:function(){var C=rgbToHsl(this._r,this._g,this._b);return{h:C.h*360,s:C.s,l:C.l,a:this._a}},toHslString:function(){var C=rgbToHsl(this._r,this._g,this._b),E=Math.round(C.h*360),I=Math.round(C.s*100),B=Math.round(C.l*100);return this._a==1?"hsl("+E+", "+I+"%, "+B+"%)":"hsla("+E+", "+I+"%, "+B+"%, "+this._roundA+")"},toHex:function(C){return rgbToHex(this._r,this._g,this._b,C)},toHexString:function(C){return"#"+this.toHex(C)},toHex8:function(C){return rgbaToHex(this._r,this._g,this._b,this._a,C)},toHex8String:function(C){return"#"+this.toHex8(C)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(bound01(this._r,255)*100)+"%",g:Math.round(bound01(this._g,255)*100)+"%",b:Math.round(bound01(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(bound01(this._r,255)*100)+"%, "+Math.round(bound01(this._g,255)*100)+"%, "+Math.round(bound01(this._b,255)*100)+"%)":"rgba("+Math.round(bound01(this._r,255)*100)+"%, "+Math.round(bound01(this._g,255)*100)+"%, "+Math.round(bound01(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:hexNames[rgbToHex(this._r,this._g,this._b,!0)]||!1},toFilter:function(C){var E="#"+rgbaToArgbHex(this._r,this._g,this._b,this._a),I=E,B=this._gradientType?"GradientType = 1, ":"";if(C){var U=tinycolor(C);I="#"+rgbaToArgbHex(U._r,U._g,U._b,U._a)}return"progid:DXImageTransform.Microsoft.gradient("+B+"startColorstr="+E+",endColorstr="+I+")"},toString:function(C){var E=!!C;C=C||this._format;var I=!1,B=this._a<1&&this._a>=0,U=!E&&B&&(C==="hex"||C==="hex6"||C==="hex3"||C==="hex4"||C==="hex8"||C==="name");return U?C==="name"&&this._a===0?this.toName():this.toRgbString():(C==="rgb"&&(I=this.toRgbString()),C==="prgb"&&(I=this.toPercentageRgbString()),(C==="hex"||C==="hex6")&&(I=this.toHexString()),C==="hex3"&&(I=this.toHexString(!0)),C==="hex4"&&(I=this.toHex8String(!0)),C==="hex8"&&(I=this.toHex8String()),C==="name"&&(I=this.toName()),C==="hsl"&&(I=this.toHslString()),C==="hsv"&&(I=this.toHsvString()),I||this.toHexString())},clone:function(){return tinycolor(this.toString())},_applyModification:function(C,E){var I=C.apply(null,[this].concat([].slice.call(E)));return this._r=I._r,this._g=I._g,this._b=I._b,this.setAlpha(I._a),this},lighten:function(){return this._applyModification(lighten,arguments)},brighten:function(){return this._applyModification(brighten,arguments)},darken:function(){return this._applyModification(darken,arguments)},desaturate:function(){return this._applyModification(desaturate,arguments)},saturate:function(){return this._applyModification(saturate,arguments)},greyscale:function(){return this._applyModification(greyscale,arguments)},spin:function(){return this._applyModification(spin,arguments)},_applyCombination:function(C,E){return C.apply(null,[this].concat([].slice.call(E)))},analogous:function(){return this._applyCombination(analogous,arguments)},complement:function(){return this._applyCombination(complement,arguments)},monochromatic:function(){return this._applyCombination(monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(splitcomplement,arguments)},triad:function(){return this._applyCombination(polyad,[3])},tetrad:function(){return this._applyCombination(polyad,[4])}},tinycolor.fromRatio=function(C,E){if(typeof C=="object"){var I={};for(var B in C)C.hasOwnProperty(B)&&(B==="a"?I[B]=C[B]:I[B]=convertToPercentage(C[B]));C=I}return tinycolor(C,E)};function inputToRGB(C){var E={r:0,g:0,b:0},I=1,B=null,U=null,V=null,X=!1,Y=!1;return typeof C=="string"&&(C=stringInputToObject(C)),typeof C=="object"&&(isValidCSSUnit(C.r)&&isValidCSSUnit(C.g)&&isValidCSSUnit(C.b)?(E=rgbToRgb(C.r,C.g,C.b),X=!0,Y=String(C.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(C.h)&&isValidCSSUnit(C.s)&&isValidCSSUnit(C.v)?(B=convertToPercentage(C.s),U=convertToPercentage(C.v),E=hsvToRgb(C.h,B,U),X=!0,Y="hsv"):isValidCSSUnit(C.h)&&isValidCSSUnit(C.s)&&isValidCSSUnit(C.l)&&(B=convertToPercentage(C.s),V=convertToPercentage(C.l),E=hslToRgb(C.h,B,V),X=!0,Y="hsl"),C.hasOwnProperty("a")&&(I=C.a)),I=boundAlpha(I),{ok:X,format:C.format||Y,r:Math.min(255,Math.max(E.r,0)),g:Math.min(255,Math.max(E.g,0)),b:Math.min(255,Math.max(E.b,0)),a:I}}function rgbToRgb(C,E,I){return{r:bound01(C,255)*255,g:bound01(E,255)*255,b:bound01(I,255)*255}}function rgbToHsl(C,E,I){C=bound01(C,255),E=bound01(E,255),I=bound01(I,255);var B=Math.max(C,E,I),U=Math.min(C,E,I),V,X,Y=(B+U)/2;if(B==U)V=X=0;else{var K=B-U;switch(X=Y>.5?K/(2-B-U):K/(B+U),B){case C:V=(E-I)/K+(E<I?6:0);break;case E:V=(I-C)/K+2;break;case I:V=(C-E)/K+4;break}V/=6}return{h:V,s:X,l:Y}}function hslToRgb(C,E,I){var B,U,V;C=bound01(C,360),E=bound01(E,100),I=bound01(I,100);function X(J,xe,Z){return Z<0&&(Z+=1),Z>1&&(Z-=1),Z<1/6?J+(xe-J)*6*Z:Z<1/2?xe:Z<2/3?J+(xe-J)*(2/3-Z)*6:J}if(E===0)B=U=V=I;else{var Y=I<.5?I*(1+E):I+E-I*E,K=2*I-Y;B=X(K,Y,C+1/3),U=X(K,Y,C),V=X(K,Y,C-1/3)}return{r:B*255,g:U*255,b:V*255}}function rgbToHsv(C,E,I){C=bound01(C,255),E=bound01(E,255),I=bound01(I,255);var B=Math.max(C,E,I),U=Math.min(C,E,I),V,X,Y=B,K=B-U;if(X=B===0?0:K/B,B==U)V=0;else{switch(B){case C:V=(E-I)/K+(E<I?6:0);break;case E:V=(I-C)/K+2;break;case I:V=(C-E)/K+4;break}V/=6}return{h:V,s:X,v:Y}}function hsvToRgb(C,E,I){C=bound01(C,360)*6,E=bound01(E,100),I=bound01(I,100);var B=Math.floor(C),U=C-B,V=I*(1-E),X=I*(1-U*E),Y=I*(1-(1-U)*E),K=B%6,J=[I,X,V,V,Y,I][K],xe=[Y,I,I,X,V,V][K],Z=[V,V,Y,I,I,X][K];return{r:J*255,g:xe*255,b:Z*255}}function rgbToHex(C,E,I,B){var U=[pad2(Math.round(C).toString(16)),pad2(Math.round(E).toString(16)),pad2(Math.round(I).toString(16))];return B&&U[0].charAt(0)==U[0].charAt(1)&&U[1].charAt(0)==U[1].charAt(1)&&U[2].charAt(0)==U[2].charAt(1)?U[0].charAt(0)+U[1].charAt(0)+U[2].charAt(0):U.join("")}function rgbaToHex(C,E,I,B,U){var V=[pad2(Math.round(C).toString(16)),pad2(Math.round(E).toString(16)),pad2(Math.round(I).toString(16)),pad2(convertDecimalToHex(B))];return U&&V[0].charAt(0)==V[0].charAt(1)&&V[1].charAt(0)==V[1].charAt(1)&&V[2].charAt(0)==V[2].charAt(1)&&V[3].charAt(0)==V[3].charAt(1)?V[0].charAt(0)+V[1].charAt(0)+V[2].charAt(0)+V[3].charAt(0):V.join("")}function rgbaToArgbHex(C,E,I,B){var U=[pad2(convertDecimalToHex(B)),pad2(Math.round(C).toString(16)),pad2(Math.round(E).toString(16)),pad2(Math.round(I).toString(16))];return U.join("")}tinycolor.equals=function(C,E){return!C||!E?!1:tinycolor(C).toRgbString()==tinycolor(E).toRgbString()},tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function desaturate(C,E){E=E===0?0:E||10;var I=tinycolor(C).toHsl();return I.s-=E/100,I.s=clamp01(I.s),tinycolor(I)}function saturate(C,E){E=E===0?0:E||10;var I=tinycolor(C).toHsl();return I.s+=E/100,I.s=clamp01(I.s),tinycolor(I)}function greyscale(C){return tinycolor(C).desaturate(100)}function lighten(C,E){E=E===0?0:E||10;var I=tinycolor(C).toHsl();return I.l+=E/100,I.l=clamp01(I.l),tinycolor(I)}function brighten(C,E){E=E===0?0:E||10;var I=tinycolor(C).toRgb();return I.r=Math.max(0,Math.min(255,I.r-Math.round(255*-(E/100)))),I.g=Math.max(0,Math.min(255,I.g-Math.round(255*-(E/100)))),I.b=Math.max(0,Math.min(255,I.b-Math.round(255*-(E/100)))),tinycolor(I)}function darken(C,E){E=E===0?0:E||10;var I=tinycolor(C).toHsl();return I.l-=E/100,I.l=clamp01(I.l),tinycolor(I)}function spin(C,E){var I=tinycolor(C).toHsl(),B=(I.h+E)%360;return I.h=B<0?360+B:B,tinycolor(I)}function complement(C){var E=tinycolor(C).toHsl();return E.h=(E.h+180)%360,tinycolor(E)}function polyad(C,E){if(isNaN(E)||E<=0)throw new Error("Argument to polyad must be a positive number");for(var I=tinycolor(C).toHsl(),B=[tinycolor(C)],U=360/E,V=1;V<E;V++)B.push(tinycolor({h:(I.h+V*U)%360,s:I.s,l:I.l}));return B}function splitcomplement(C){var E=tinycolor(C).toHsl(),I=E.h;return[tinycolor(C),tinycolor({h:(I+72)%360,s:E.s,l:E.l}),tinycolor({h:(I+216)%360,s:E.s,l:E.l})]}function analogous(C,E,I){E=E||6,I=I||30;var B=tinycolor(C).toHsl(),U=360/I,V=[tinycolor(C)];for(B.h=(B.h-(U*E>>1)+720)%360;--E;)B.h=(B.h+U)%360,V.push(tinycolor(B));return V}function monochromatic(C,E){E=E||6;for(var I=tinycolor(C).toHsv(),B=I.h,U=I.s,V=I.v,X=[],Y=1/E;E--;)X.push(tinycolor({h:B,s:U,v:V})),V=(V+Y)%1;return X}tinycolor.mix=function(C,E,I){I=I===0?0:I||50;var B=tinycolor(C).toRgb(),U=tinycolor(E).toRgb(),V=I/100,X={r:(U.r-B.r)*V+B.r,g:(U.g-B.g)*V+B.g,b:(U.b-B.b)*V+B.b,a:(U.a-B.a)*V+B.a};return tinycolor(X)},tinycolor.readability=function(C,E){var I=tinycolor(C),B=tinycolor(E);return(Math.max(I.getLuminance(),B.getLuminance())+.05)/(Math.min(I.getLuminance(),B.getLuminance())+.05)},tinycolor.isReadable=function(C,E,I){var B=tinycolor.readability(C,E),U,V;switch(V=!1,U=validateWCAG2Parms(I),U.level+U.size){case"AAsmall":case"AAAlarge":V=B>=4.5;break;case"AAlarge":V=B>=3;break;case"AAAsmall":V=B>=7;break}return V},tinycolor.mostReadable=function(C,E,I){var B=null,U=0,V,X,Y,K;I=I||{},X=I.includeFallbackColors,Y=I.level,K=I.size;for(var J=0;J<E.length;J++)V=tinycolor.readability(C,E[J]),V>U&&(U=V,B=tinycolor(E[J]));return tinycolor.isReadable(C,B,{level:Y,size:K})||!X?B:(I.includeFallbackColors=!1,tinycolor.mostReadable(C,["#fff","#000"],I))};var names=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hexNames=tinycolor.hexNames=flip(names);function flip(C){var E={};for(var I in C)C.hasOwnProperty(I)&&(E[C[I]]=I);return E}function boundAlpha(C){return C=parseFloat(C),(isNaN(C)||C<0||C>1)&&(C=1),C}function bound01(C,E){isOnePointZero(C)&&(C="100%");var I=isPercentage(C);return C=Math.min(E,Math.max(0,parseFloat(C))),I&&(C=parseInt(C*E,10)/100),Math.abs(C-E)<1e-6?1:C%E/parseFloat(E)}function clamp01(C){return Math.min(1,Math.max(0,C))}function parseIntFromHex(C){return parseInt(C,16)}function isOnePointZero(C){return typeof C=="string"&&C.indexOf(".")!=-1&&parseFloat(C)===1}function isPercentage(C){return typeof C=="string"&&C.indexOf("%")!=-1}function pad2(C){return C.length==1?"0"+C:""+C}function convertToPercentage(C){return C<=1&&(C=C*100+"%"),C}function convertDecimalToHex(C){return Math.round(parseFloat(C)*255).toString(16)}function convertHexToDecimal(C){return parseIntFromHex(C)/255}var matchers=function(){var C="[-\\+]?\\d+%?",E="[-\\+]?\\d*\\.\\d+%?",I="(?:"+E+")|(?:"+C+")",B="[\\s|\\(]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")\\s*\\)?",U="[\\s|\\(]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")\\s*\\)?";return{CSS_UNIT:new RegExp(I),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function isValidCSSUnit(C){return!!matchers.CSS_UNIT.exec(C)}function stringInputToObject(C){C=C.replace(trimLeft,"").replace(trimRight,"").toLowerCase();var E=!1;if(names[C])C=names[C],E=!0;else if(C=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var I;return(I=matchers.rgb.exec(C))?{r:I[1],g:I[2],b:I[3]}:(I=matchers.rgba.exec(C))?{r:I[1],g:I[2],b:I[3],a:I[4]}:(I=matchers.hsl.exec(C))?{h:I[1],s:I[2],l:I[3]}:(I=matchers.hsla.exec(C))?{h:I[1],s:I[2],l:I[3],a:I[4]}:(I=matchers.hsv.exec(C))?{h:I[1],s:I[2],v:I[3]}:(I=matchers.hsva.exec(C))?{h:I[1],s:I[2],v:I[3],a:I[4]}:(I=matchers.hex8.exec(C))?{r:parseIntFromHex(I[1]),g:parseIntFromHex(I[2]),b:parseIntFromHex(I[3]),a:convertHexToDecimal(I[4]),format:E?"name":"hex8"}:(I=matchers.hex6.exec(C))?{r:parseIntFromHex(I[1]),g:parseIntFromHex(I[2]),b:parseIntFromHex(I[3]),format:E?"name":"hex"}:(I=matchers.hex4.exec(C))?{r:parseIntFromHex(I[1]+""+I[1]),g:parseIntFromHex(I[2]+""+I[2]),b:parseIntFromHex(I[3]+""+I[3]),a:convertHexToDecimal(I[4]+""+I[4]),format:E?"name":"hex8"}:(I=matchers.hex3.exec(C))?{r:parseIntFromHex(I[1]+""+I[1]),g:parseIntFromHex(I[2]+""+I[2]),b:parseIntFromHex(I[3]+""+I[3]),format:E?"name":"hex"}:!1}function validateWCAG2Parms(C){var E,I;return C=C||{level:"AA",size:"small"},E=(C.level||"AA").toUpperCase(),I=(C.size||"small").toLowerCase(),E!=="AA"&&E!=="AAA"&&(E="AA"),I!=="small"&&I!=="large"&&(I="small"),{level:E,size:I}}var _slicedToArray=function(){function C(E,I){var B=[],U=!0,V=!1,X=void 0;try{for(var Y=E[Symbol.iterator](),K;!(U=(K=Y.next()).done)&&(B.push(K.value),!(I&&B.length===I));U=!0);}catch(J){V=!0,X=J}finally{try{!U&&Y.return&&Y.return()}finally{if(V)throw X}}return B}return function(E,I){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return C(E,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),TAU$2=Math.PI*2,mapToEllipse=function(E,I,B,U,V,X,Y){var K=E.x,J=E.y;K*=I,J*=B;var xe=U*K-V*J,Z=V*K+U*J;return{x:xe+X,y:Z+Y}},approxUnitArc=function(E,I){var B=I===1.5707963267948966?.551915024494:I===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(I/4),U=Math.cos(E),V=Math.sin(E),X=Math.cos(E+I),Y=Math.sin(E+I);return[{x:U-V*B,y:V+U*B},{x:X+Y*B,y:Y-X*B},{x:X,y:Y}]},vectorAngle=function(E,I,B,U){var V=E*U-I*B<0?-1:1,X=E*B+I*U;return X>1&&(X=1),X<-1&&(X=-1),V*Math.acos(X)},getArcCenter=function(E,I,B,U,V,X,Y,K,J,xe,Z,_e){var Se=Math.pow(V,2),Ee=Math.pow(X,2),Ae=Math.pow(Z,2),Re=Math.pow(_e,2),Te=Se*Ee-Se*Re-Ee*Ae;Te<0&&(Te=0),Te/=Se*Re+Ee*Ae,Te=Math.sqrt(Te)*(Y===K?-1:1);var we=Te*V/X*_e,Pe=Te*-X/V*Z,Ie=xe*we-J*Pe+(E+B)/2,Me=J*we+xe*Pe+(I+U)/2,Oe=(Z-we)/V,Le=(_e-Pe)/X,Ne=(-Z-we)/V,Ve=(-_e-Pe)/X,Xe=vectorAngle(1,0,Oe,Le),Ue=vectorAngle(Oe,Le,Ne,Ve);return K===0&&Ue>0&&(Ue-=TAU$2),K===1&&Ue<0&&(Ue+=TAU$2),[Ie,Me,Xe,Ue]},arcToBezier=function(E){var I=E.px,B=E.py,U=E.cx,V=E.cy,X=E.rx,Y=E.ry,K=E.xAxisRotation,J=K===void 0?0:K,xe=E.largeArcFlag,Z=xe===void 0?0:xe,_e=E.sweepFlag,Se=_e===void 0?0:_e,Ee=[];if(X===0||Y===0)return[];var Ae=Math.sin(J*TAU$2/360),Re=Math.cos(J*TAU$2/360),Te=Re*(I-U)/2+Ae*(B-V)/2,we=-Ae*(I-U)/2+Re*(B-V)/2;if(Te===0&&we===0)return[];X=Math.abs(X),Y=Math.abs(Y);var Pe=Math.pow(Te,2)/Math.pow(X,2)+Math.pow(we,2)/Math.pow(Y,2);Pe>1&&(X*=Math.sqrt(Pe),Y*=Math.sqrt(Pe));var Ie=getArcCenter(I,B,U,V,X,Y,Z,Se,Ae,Re,Te,we),Me=_slicedToArray(Ie,4),Oe=Me[0],Le=Me[1],Ne=Me[2],Ve=Me[3],Xe=Math.abs(Ve)/(TAU$2/4);Math.abs(1-Xe)<1e-7&&(Xe=1);var Ue=Math.max(Math.ceil(Xe),1);Ve/=Ue;for(var We=0;We<Ue;We++)Ee.push(approxUnitArc(Ne,Ve)),Ne+=Ve;return Ee.map(function(ze){var He=mapToEllipse(ze[0],X,Y,Re,Ae,Oe,Le),je=He.x,$e=He.y,De=mapToEllipse(ze[1],X,Y,Re,Ae,Oe,Le),Fe=De.x,ke=De.y,Ge=mapToEllipse(ze[2],X,Y,Re,Ae,Oe,Le),Be=Ge.x,qe=Ge.y;return{x1:je,y1:$e,x2:Fe,y2:ke,x:Be,y:qe}})};class SVG extends Graphics{constructor(E){super(),this.lineColor=null,E&&this.drawSVG(E)}drawSVG(E){if(typeof E=="string"){const I=document.createElement("div");I.innerHTML=E.trim(),E=I.querySelector("svg")}if(!E)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(E),this._svgChildren(E.children),this}_svgChildren(E,I=!1){for(let B=0;B<E.length;B++){const U=E[B];switch(this._svgFill(U,I),U.nodeName.toLowerCase()){case"path":{this._svgPath(U);break}case"circle":case"ellipse":{this._svgCircle(U);break}case"rect":{this._svgRect(U);break}case"polygon":{this._svgPoly(U,!0);break}case"polyline":{this._svgPoly(U);break}case"g":break;default:{console.info(`[PIXI.SVG] <${U.nodeName}> elements unsupported`);break}}this._svgChildren(U.children,!0)}}_hexToUint(E){if(E[0]==="#")return E=E.substr(1),E.length===3&&(E=E.replace(/([a-f0-9])/ig,"$1$1")),parseInt(E,16);const{r:I,g:B,b:U}=tinycolor(E).toRgb();return(I<<16)+(B<<8)+U}_svgCircle(E){let I="r",B="r";const U=E.nodeName==="elipse";U&&(I+="x",B+="y");const V=parseFloat(E.getAttribute(B)),X=parseFloat(E.getAttribute(I)),Y=E.getAttribute("cx"),K=E.getAttribute("cy");let J=0,xe=0;Y!==null&&(J=parseFloat(Y)),K!==null&&(xe=parseFloat(K)),U?this.drawEllipse(J,xe,V,X):this.drawCircle(J,xe,V)}_svgRect(E){const I=parseFloat(E.getAttribute("x")),B=parseFloat(E.getAttribute("y")),U=parseFloat(E.getAttribute("width")),V=parseFloat(E.getAttribute("height")),X=parseFloat(E.getAttribute("rx"));X?this.drawRoundedRect(I,B,U,V,X):this.drawRect(I,B,U,V)}_convertStyleName(E){return E.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(E){const I=E.getAttribute("style"),B=E.getAttribute("opacity"),U={fill:E.getAttribute("fill"),opacity:B||E.getAttribute("fill-opacity"),stroke:E.getAttribute("stroke"),strokeOpacity:B||E.getAttribute("stroke-opacity"),strokeWidth:E.getAttribute("stroke-width"),cap:E.getAttribute("stroke-linecap"),join:E.getAttribute("stroke-linejoin"),miterLimit:E.getAttribute("stroke-miterlimit")};return I!==null&&I.split(";").forEach(V=>{const[X,Y]=V.split(":");if(X){const K=this._convertStyleName(X);U[K]||(U[K]=Y.trim())}}),U}_svgPoly(E,I){const B=E.getAttribute("points").split(/[ ,]/g).map(U=>parseInt(U,10));this.drawPolygon(B),I&&this.closePath()}_svgFill(E,I){const{fill:B,opacity:U,stroke:V,strokeOpacity:X,strokeWidth:Y,cap:K,join:J,miterLimit:xe}=this._svgStyle(E),_e=Y!==null?parseFloat(Y):V!==null?1:0,Se=V!==null?this._hexToUint(V):this.lineColor;B?B==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(B),U!==null?parseFloat(U):1):I||this.beginFill(0),this.lineStyle({width:V===null&&Y===null&&I?this.line.width:_e,alpha:X===null?this.line.alpha:parseFloat(X),color:V===null&&I?this.line.color:Se,cap:K===null&&I?this.line.cap:K,join:J===null&&I?this.line.join:J,miterLimit:xe===null&&I?this.line.miterLimit:parseFloat(xe)}),E.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(E){const I=E.getAttribute("d");let B=0,U=0;const V=parserExports(I.trim());for(let X=0;X<V.length;X++){const Y=V[X];switch(Y.code){case"m":{this.moveTo(B+=Y.end.x,U+=Y.end.y);break}case"M":{this.moveTo(B=Y.end.x,U=Y.end.y);break}case"H":{this.lineTo(B=Y.value,U);break}case"h":{this.lineTo(B+=Y.value,U);break}case"V":{this.lineTo(B,U=Y.value);break}case"v":{this.lineTo(B,U+=Y.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(B=Y.end.x,U=Y.end.y);break}case"l":{this.lineTo(B+=Y.end.x,U+=Y.end.y);break}case"C":{this.bezierCurveTo(Y.cp1.x,Y.cp1.y,Y.cp2.x,Y.cp2.y,B=Y.end.x,U=Y.end.y);break}case"c":{const K=B,J=U;this.bezierCurveTo(K+Y.cp1.x,J+Y.cp1.y,K+Y.cp2.x,J+Y.cp2.y,B+=Y.end.x,U+=Y.end.y);break}case"s":case"q":{const K=B,J=U;this.quadraticCurveTo(K+Y.cp.x,J+Y.cp.y,B+=Y.end.x,U+=Y.end.y);break}case"S":case"Q":{this.quadraticCurveTo(Y.cp.x,Y.cp.y,B=Y.end.x,U=Y.end.y);break}case"a":{arcToBezier({px:B,py:U,cx:B+=Y.end.x,cy:U+=Y.end.y,rx:Y.radii.x,ry:Y.radii.y,xAxisRotation:Y.rotation,largeArcFlag:Y.large?1:0,sweepFlag:Y.clockwise?1:0}).forEach(({x1:K,y1:J,x2:xe,y2:Z,x:_e,y:Se})=>this.bezierCurveTo(K,J,xe,Z,_e,Se));break}case"A":{arcToBezier({px:B,py:U,cx:B=Y.end.x,cy:U=Y.end.y,rx:Y.radii.x,ry:Y.radii.y,xAxisRotation:Y.rotation,largeArcFlag:Y.large?1:0,sweepFlag:Y.clockwise?1:0}).forEach(({x1:K,y1:J,x2:xe,y2:Z,x:_e,y:Se})=>this.bezierCurveTo(K,J,xe,Z,_e,Se));break}default:{console.info("[PIXI.SVG] Draw command not supported:",Y.code,Y);break}}}}}var paramCounts={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},SPECIAL_SPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isSpace(C){return C===10||C===13||C===8232||C===8233||C===32||C===9||C===11||C===12||C===160||C>=5760&&SPECIAL_SPACES.indexOf(C)>=0}function isCommand(C){switch(C|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function isArc(C){return(C|32)===97}function isDigit(C){return C>=48&&C<=57}function isDigitStart(C){return C>=48&&C<=57||C===43||C===45||C===46}function State(C){this.index=0,this.path=C,this.max=C.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function skipSpaces(C){for(;C.index<C.max&&isSpace(C.path.charCodeAt(C.index));)C.index++}function scanFlag(C){var E=C.path.charCodeAt(C.index);if(E===48){C.param=0,C.index++;return}if(E===49){C.param=1,C.index++;return}C.err="SvgPath: arc flag can be 0 or 1 only (at pos "+C.index+")"}function scanParam(C){var E=C.index,I=E,B=C.max,U=!1,V=!1,X=!1,Y=!1,K;if(I>=B){C.err="SvgPath: missed param (at pos "+I+")";return}if(K=C.path.charCodeAt(I),(K===43||K===45)&&(I++,K=I<B?C.path.charCodeAt(I):0),!isDigit(K)&&K!==46){C.err="SvgPath: param should start with 0..9 or `.` (at pos "+I+")";return}if(K!==46){if(U=K===48,I++,K=I<B?C.path.charCodeAt(I):0,U&&I<B&&K&&isDigit(K)){C.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+E+")";return}for(;I<B&&isDigit(C.path.charCodeAt(I));)I++,V=!0;K=I<B?C.path.charCodeAt(I):0}if(K===46){for(Y=!0,I++;isDigit(C.path.charCodeAt(I));)I++,X=!0;K=I<B?C.path.charCodeAt(I):0}if(K===101||K===69){if(Y&&!V&&!X){C.err="SvgPath: invalid float exponent (at pos "+I+")";return}if(I++,K=I<B?C.path.charCodeAt(I):0,(K===43||K===45)&&I++,I<B&&isDigit(C.path.charCodeAt(I)))for(;I<B&&isDigit(C.path.charCodeAt(I));)I++;else{C.err="SvgPath: invalid float exponent (at pos "+I+")";return}}C.index=I,C.param=parseFloat(C.path.slice(E,I))+0}function finalizeSegment(C){var E,I;E=C.path[C.segmentStart],I=E.toLowerCase();var B=C.data;if(I==="m"&&B.length>2&&(C.result.push([E,B[0],B[1]]),B=B.slice(2),I="l",E=E==="m"?"l":"L"),I==="r")C.result.push([E].concat(B));else for(;B.length>=paramCounts[I]&&(C.result.push([E].concat(B.splice(0,paramCounts[I]))),!!paramCounts[I]););}function scanSegment(C){var E=C.max,I,B,U,V,X;if(C.segmentStart=C.index,I=C.path.charCodeAt(C.index),B=isArc(I),!isCommand(I)){C.err="SvgPath: bad command "+C.path[C.index]+" (at pos "+C.index+")";return}if(V=paramCounts[C.path[C.index].toLowerCase()],C.index++,skipSpaces(C),C.data=[],!V){finalizeSegment(C);return}for(U=!1;;){for(X=V;X>0;X--){if(B&&(X===3||X===4)?scanFlag(C):scanParam(C),C.err.length){finalizeSegment(C);return}C.data.push(C.param),skipSpaces(C),U=!1,C.index<E&&C.path.charCodeAt(C.index)===44&&(C.index++,skipSpaces(C),U=!0)}if(!U&&(C.index>=C.max||!isDigitStart(C.path.charCodeAt(C.index))))break}finalizeSegment(C)}var path_parse=function(E){var I=new State(E),B=I.max;for(skipSpaces(I);I.index<B&&!I.err.length;)scanSegment(I);return I.result.length&&("mM".indexOf(I.result[0][0])<0?(I.err="SvgPath: string should start with `M` or `m`",I.result=[]):I.result[0][0]="M"),{err:I.err,segments:I.result}};function combine(C,E){return[C[0]*E[0]+C[2]*E[1],C[1]*E[0]+C[3]*E[1],C[0]*E[2]+C[2]*E[3],C[1]*E[2]+C[3]*E[3],C[0]*E[4]+C[2]*E[5]+C[4],C[1]*E[4]+C[3]*E[5]+C[5]]}function Matrix$1(){if(!(this instanceof Matrix$1))return new Matrix$1;this.queue=[],this.cache=null}Matrix$1.prototype.matrix=function(C){return C[0]===1&&C[1]===0&&C[2]===0&&C[3]===1&&C[4]===0&&C[5]===0?this:(this.cache=null,this.queue.push(C),this)},Matrix$1.prototype.translate=function(C,E){return(C!==0||E!==0)&&(this.cache=null,this.queue.push([1,0,0,1,C,E])),this},Matrix$1.prototype.scale=function(C,E){return(C!==1||E!==1)&&(this.cache=null,this.queue.push([C,0,0,E,0,0])),this},Matrix$1.prototype.rotate=function(C,E,I){var B,U,V;return C!==0&&(this.translate(E,I),B=C*Math.PI/180,U=Math.cos(B),V=Math.sin(B),this.queue.push([U,V,-V,U,0,0]),this.cache=null,this.translate(-E,-I)),this},Matrix$1.prototype.skewX=function(C){return C!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(C*Math.PI/180),1,0,0])),this},Matrix$1.prototype.skewY=function(C){return C!==0&&(this.cache=null,this.queue.push([1,Math.tan(C*Math.PI/180),0,1,0,0])),this},Matrix$1.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var C=1;C<this.queue.length;C++)this.cache=combine(this.cache,this.queue[C]);return this.cache},Matrix$1.prototype.calc=function(C,E,I){var B;return this.queue.length?(this.cache||(this.cache=this.toArray()),B=this.cache,[C*B[0]+E*B[2]+(I?0:B[4]),C*B[1]+E*B[3]+(I?0:B[5])]):[C,E]};var matrix$1=Matrix$1,Matrix=matrix$1,operations={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},CMD_SPLIT_RE=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,PARAMS_SPLIT_RE=/[\s,]+/,transform_parse=function(E){var I=new Matrix,B,U;return E.split(CMD_SPLIT_RE).forEach(function(V){if(V.length){if(typeof operations[V]<"u"){B=V;return}switch(U=V.split(PARAMS_SPLIT_RE).map(function(X){return+X||0}),B){case"matrix":U.length===6&&I.matrix(U);return;case"scale":U.length===1?I.scale(U[0],U[0]):U.length===2&&I.scale(U[0],U[1]);return;case"rotate":U.length===1?I.rotate(U[0],0,0):U.length===3&&I.rotate(U[0],U[1],U[2]);return;case"translate":U.length===1?I.translate(U[0],0):U.length===2&&I.translate(U[0],U[1]);return;case"skewX":U.length===1&&I.skewX(U[0]);return;case"skewY":U.length===1&&I.skewY(U[0]);return}}}),I},TAU$1=Math.PI*2;function unit_vector_angle(C,E,I,B){var U=C*B-E*I<0?-1:1,V=C*I+E*B;return V>1&&(V=1),V<-1&&(V=-1),U*Math.acos(V)}function get_arc_center(C,E,I,B,U,V,X,Y,K,J){var xe=J*(C-I)/2+K*(E-B)/2,Z=-K*(C-I)/2+J*(E-B)/2,_e=X*X,Se=Y*Y,Ee=xe*xe,Ae=Z*Z,Re=_e*Se-_e*Ae-Se*Ee;Re<0&&(Re=0),Re/=_e*Ae+Se*Ee,Re=Math.sqrt(Re)*(U===V?-1:1);var Te=Re*X/Y*Z,we=Re*-Y/X*xe,Pe=J*Te-K*we+(C+I)/2,Ie=K*Te+J*we+(E+B)/2,Me=(xe-Te)/X,Oe=(Z-we)/Y,Le=(-xe-Te)/X,Ne=(-Z-we)/Y,Ve=unit_vector_angle(1,0,Me,Oe),Xe=unit_vector_angle(Me,Oe,Le,Ne);return V===0&&Xe>0&&(Xe-=TAU$1),V===1&&Xe<0&&(Xe+=TAU$1),[Pe,Ie,Ve,Xe]}function approximate_unit_arc(C,E){var I=1.3333333333333333*Math.tan(E/4),B=Math.cos(C),U=Math.sin(C),V=Math.cos(C+E),X=Math.sin(C+E);return[B,U,B-U*I,U+B*I,V+X*I,X-V*I,V,X]}var a2c$1=function(E,I,B,U,V,X,Y,K,J){var xe=Math.sin(J*TAU$1/360),Z=Math.cos(J*TAU$1/360),_e=Z*(E-B)/2+xe*(I-U)/2,Se=-xe*(E-B)/2+Z*(I-U)/2;if(_e===0&&Se===0)return[];if(Y===0||K===0)return[];Y=Math.abs(Y),K=Math.abs(K);var Ee=_e*_e/(Y*Y)+Se*Se/(K*K);Ee>1&&(Y*=Math.sqrt(Ee),K*=Math.sqrt(Ee));var Ae=get_arc_center(E,I,B,U,V,X,Y,K,xe,Z),Re=[],Te=Ae[2],we=Ae[3],Pe=Math.max(Math.ceil(Math.abs(we)/(TAU$1/4)),1);we/=Pe;for(var Ie=0;Ie<Pe;Ie++)Re.push(approximate_unit_arc(Te,we)),Te+=we;return Re.map(function(Me){for(var Oe=0;Oe<Me.length;Oe+=2){var Le=Me[Oe+0],Ne=Me[Oe+1];Le*=Y,Ne*=K;var Ve=Z*Le-xe*Ne,Xe=xe*Le+Z*Ne;Me[Oe+0]=Ve+Ae[0],Me[Oe+1]=Xe+Ae[1]}return Me})},epsilon=1e-10,torad=Math.PI/180;function Ellipse(C,E,I){if(!(this instanceof Ellipse))return new Ellipse(C,E,I);this.rx=C,this.ry=E,this.ax=I}Ellipse.prototype.transform=function(C){var E=Math.cos(this.ax*torad),I=Math.sin(this.ax*torad),B=[this.rx*(C[0]*E+C[2]*I),this.rx*(C[1]*E+C[3]*I),this.ry*(-C[0]*I+C[2]*E),this.ry*(-C[1]*I+C[3]*E)],U=B[0]*B[0]+B[2]*B[2],V=B[1]*B[1]+B[3]*B[3],X=((B[0]-B[3])*(B[0]-B[3])+(B[2]+B[1])*(B[2]+B[1]))*((B[0]+B[3])*(B[0]+B[3])+(B[2]-B[1])*(B[2]-B[1])),Y=(U+V)/2;if(X<epsilon*Y)return this.rx=this.ry=Math.sqrt(Y),this.ax=0,this;var K=B[0]*B[1]+B[2]*B[3];X=Math.sqrt(X);var J=Y+X/2,xe=Y-X/2;return this.ax=Math.abs(K)<epsilon&&Math.abs(J-V)<epsilon?90:Math.atan(Math.abs(K)>Math.abs(J-V)?(J-U)/K:K/(J-V))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(J),this.ry=Math.sqrt(xe)):(this.ax+=90,this.rx=Math.sqrt(xe),this.ry=Math.sqrt(J)),this},Ellipse.prototype.isDegenerate=function(){return this.rx<epsilon*this.ry||this.ry<epsilon*this.rx};var ellipse$1=Ellipse,pathParse=path_parse,transformParse=transform_parse,matrix=matrix$1,a2c=a2c$1,ellipse=ellipse$1;function SvgPath(C){if(!(this instanceof SvgPath))return new SvgPath(C);var E=pathParse(C);this.segments=E.segments,this.err=E.err,this.__stack=[]}SvgPath.from=function(C){if(typeof C=="string")return new SvgPath(C);if(C instanceof SvgPath){var E=new SvgPath("");return E.err=C.err,E.segments=C.segments.map(function(I){return I.slice()}),E.__stack=C.__stack.map(function(I){return matrix().matrix(I.toArray())}),E}throw new Error("SvgPath.from: invalid param type "+C)},SvgPath.prototype.__matrix=function(C){var E=this,I;C.queue.length&&this.iterate(function(B,U,V,X){var Y,K,J,xe;switch(B[0]){case"v":Y=C.calc(0,B[1],!0),K=Y[0]===0?["v",Y[1]]:["l",Y[0],Y[1]];break;case"V":Y=C.calc(V,B[1],!1),K=Y[0]===C.calc(V,X,!1)[0]?["V",Y[1]]:["L",Y[0],Y[1]];break;case"h":Y=C.calc(B[1],0,!0),K=Y[1]===0?["h",Y[0]]:["l",Y[0],Y[1]];break;case"H":Y=C.calc(B[1],X,!1),K=Y[1]===C.calc(V,X,!1)[1]?["H",Y[0]]:["L",Y[0],Y[1]];break;case"a":case"A":var Z=C.toArray(),_e=ellipse(B[1],B[2],B[3]).transform(Z);if(Z[0]*Z[3]-Z[1]*Z[2]<0&&(B[5]=B[5]?"0":"1"),Y=C.calc(B[6],B[7],B[0]==="a"),B[0]==="A"&&B[6]===V&&B[7]===X||B[0]==="a"&&B[6]===0&&B[7]===0){K=[B[0]==="a"?"l":"L",Y[0],Y[1]];break}_e.isDegenerate()?K=[B[0]==="a"?"l":"L",Y[0],Y[1]]:K=[B[0],_e.rx,_e.ry,_e.ax,B[4],B[5],Y[0],Y[1]];break;case"m":xe=U>0,Y=C.calc(B[1],B[2],xe),K=["m",Y[0],Y[1]];break;default:for(J=B[0],K=[J],xe=J.toLowerCase()===J,I=1;I<B.length;I+=2)Y=C.calc(B[I],B[I+1],xe),K.push(Y[0],Y[1])}E.segments[U]=K},!0)},SvgPath.prototype.__evaluateStack=function(){var C,E;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(C=matrix(),E=this.__stack.length;--E>=0;)C.matrix(this.__stack[E].toArray());this.__matrix(C),this.__stack=[]}},SvgPath.prototype.toString=function(){var C="",E="",I=!1;this.__evaluateStack();for(var B=0,U=this.segments.length;B<U;B++){var V=this.segments[B],X=V[0];X!==E||X==="m"||X==="M"?(X==="m"&&E==="z"&&(C+=" "),C+=X,I=!1):I=!0;for(var Y=1;Y<V.length;Y++){var K=V[Y];Y===1?I&&K>=0&&(C+=" "):K>=0&&(C+=" "),C+=K}E=X}return C},SvgPath.prototype.translate=function(C,E){return this.__stack.push(matrix().translate(C,E||0)),this},SvgPath.prototype.scale=function(C,E){return this.__stack.push(matrix().scale(C,!E&&E!==0?C:E)),this},SvgPath.prototype.rotate=function(C,E,I){return this.__stack.push(matrix().rotate(C,E||0,I||0)),this},SvgPath.prototype.skewX=function(C){return this.__stack.push(matrix().skewX(C)),this},SvgPath.prototype.skewY=function(C){return this.__stack.push(matrix().skewY(C)),this},SvgPath.prototype.matrix=function(C){return this.__stack.push(matrix().matrix(C)),this},SvgPath.prototype.transform=function(C){return C.trim()?(this.__stack.push(transformParse(C)),this):this},SvgPath.prototype.round=function(C){var E=0,I=0,B=0,U=0,V;return C=C||0,this.__evaluateStack(),this.segments.forEach(function(X){var Y=X[0].toLowerCase()===X[0];switch(X[0]){case"H":case"h":Y&&(X[1]+=B),B=X[1]-X[1].toFixed(C),X[1]=+X[1].toFixed(C);return;case"V":case"v":Y&&(X[1]+=U),U=X[1]-X[1].toFixed(C),X[1]=+X[1].toFixed(C);return;case"Z":case"z":B=E,U=I;return;case"M":case"m":Y&&(X[1]+=B,X[2]+=U),B=X[1]-X[1].toFixed(C),U=X[2]-X[2].toFixed(C),E=B,I=U,X[1]=+X[1].toFixed(C),X[2]=+X[2].toFixed(C);return;case"A":case"a":Y&&(X[6]+=B,X[7]+=U),B=X[6]-X[6].toFixed(C),U=X[7]-X[7].toFixed(C),X[1]=+X[1].toFixed(C),X[2]=+X[2].toFixed(C),X[3]=+X[3].toFixed(C+2),X[6]=+X[6].toFixed(C),X[7]=+X[7].toFixed(C);return;default:V=X.length,Y&&(X[V-2]+=B,X[V-1]+=U),B=X[V-2]-X[V-2].toFixed(C),U=X[V-1]-X[V-1].toFixed(C),X.forEach(function(K,J){J&&(X[J]=+X[J].toFixed(C))});return}}),this},SvgPath.prototype.iterate=function(C,E){var I=this.segments,B={},U=!1,V=0,X=0,Y=0,K=0,J,xe,Z;if(E||this.__evaluateStack(),I.forEach(function(_e,Se){var Ee=C(_e,Se,V,X);Array.isArray(Ee)&&(B[Se]=Ee,U=!0);var Ae=_e[0]===_e[0].toLowerCase();switch(_e[0]){case"m":case"M":V=_e[1]+(Ae?V:0),X=_e[2]+(Ae?X:0),Y=V,K=X;return;case"h":case"H":V=_e[1]+(Ae?V:0);return;case"v":case"V":X=_e[1]+(Ae?X:0);return;case"z":case"Z":V=Y,X=K;return;default:V=_e[_e.length-2]+(Ae?V:0),X=_e[_e.length-1]+(Ae?X:0)}}),!U)return this;for(Z=[],J=0;J<I.length;J++)if(typeof B[J]<"u")for(xe=0;xe<B[J].length;xe++)Z.push(B[J][xe]);else Z.push(I[J]);return this.segments=Z,this},SvgPath.prototype.abs=function(){return this.iterate(function(C,E,I,B){var U=C[0],V=U.toUpperCase(),X;if(U!==V)switch(C[0]=V,U){case"v":C[1]+=B;return;case"a":C[6]+=I,C[7]+=B;return;default:for(X=1;X<C.length;X++)C[X]+=X%2?I:B}},!0),this},SvgPath.prototype.rel=function(){return this.iterate(function(C,E,I,B){var U=C[0],V=U.toLowerCase(),X;if(U!==V&&!(E===0&&U==="M"))switch(C[0]=V,U){case"V":C[1]-=B;return;case"A":C[6]-=I,C[7]-=B;return;default:for(X=1;X<C.length;X++)C[X]-=X%2?I:B}},!0),this},SvgPath.prototype.unarc=function(){return this.iterate(function(C,E,I,B){var U,V,X,Y=[],K=C[0];return K!=="A"&&K!=="a"?null:(K==="a"?(V=I+C[6],X=B+C[7]):(V=C[6],X=C[7]),U=a2c(I,B,V,X,C[4],C[5],C[1],C[2],C[3]),U.length===0?[[C[0]==="a"?"l":"L",C[6],C[7]]]:(U.forEach(function(J){Y.push(["C",J[2],J[3],J[4],J[5],J[6],J[7]])}),Y))}),this},SvgPath.prototype.unshort=function(){var C=this.segments,E,I,B,U,V;return this.iterate(function(X,Y,K,J){var xe=X[0],Z=xe.toUpperCase(),_e;Y&&(Z==="T"?(_e=xe==="t",B=C[Y-1],B[0]==="Q"?(E=B[1]-K,I=B[2]-J):B[0]==="q"?(E=B[1]-B[3],I=B[2]-B[4]):(E=0,I=0),U=-E,V=-I,_e||(U+=K,V+=J),C[Y]=[_e?"q":"Q",U,V,X[1],X[2]]):Z==="S"&&(_e=xe==="s",B=C[Y-1],B[0]==="C"?(E=B[3]-K,I=B[4]-J):B[0]==="c"?(E=B[3]-B[5],I=B[4]-B[6]):(E=0,I=0),U=-E,V=-I,_e||(U+=K,V+=J),C[Y]=[_e?"c":"C",U,V,X[1],X[2],X[3],X[4]]))}),this};var svgpath$2=SvgPath,svgpath=svgpath$2;const svgpath$1=getDefaultExportFromCjs(svgpath),PixiSvgPathSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(null),U=React.useRef(null),V=React.useRef(null),X=React.useRef(null),{path:Y,visible:K,disabled:J,transformation:{x:xe,y:Z,width:_e,height:Se,anchor:Ee,hexColor:Ae,fill:Re,stroke:Te="none",strokeWidth:we=0,colorCorrection:Pe={}},pointerdown:Ie,pointerup:Me}=C,Oe=react.useApp(),{temperatureFilter:Le,sharpnessFilter:Ne,hueFilter:Ve,blurFilter:Xe,adjustmentFilter:Ue,vignetteFilter:We,noiseFilter:ze}=withFiltersHook(Pe),{blurRadius:He=0,vignette:je=0,noise:$e=0}=Pe;return React__namespace.useEffect(()=>{const De=svgpath$1(Y).scale(5).translate(0,0).toString(),Fe=`<svg xmlns="http://www.w3.org/2000/svg" width="${_e}" height="${Se}">
1970
+ <path stroke="${Te}" stroke-width="${we}" fill="${Ae||Re}" d="${De}">
1971
1971
  </path>
1972
- </svg>`,X=new mw(U),M=w.renderer.generateTexture(X);return i(M),()=>{}},[w,o,g,y,m,v]),Z.jsx(Ut,{...t,ref:e,children:Z.jsx(ee.Container,{ref:s,children:Z.jsx(ee.Container,{ref:a,children:r&&Z.jsx(ee.Sprite,{texture:r,width:c,height:f,anchor:p,ref:n,x:d,y:l,alpha:u?1:0,...!h&&u&&{interactive:!0,pointerdown:x,pointerup:T},filters:[b,S,A,F,...C>0?[I]:[],...$>0?[B]:[],...G>0?[E]:[]]})})})})});var uh={};/*!
1972
+ </svg>`,ke=new SVG(Fe),Ge=Oe.renderer.generateTexture(ke);return B(Ge),()=>{}},[Oe,Y,Te,we,Ae,Re]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,children:jsxRuntimeExports.jsx(react.Container,{ref:V,children:jsxRuntimeExports.jsx(react.Container,{ref:X,children:I&&jsxRuntimeExports.jsx(react.Sprite,{texture:I,width:_e,height:Se,anchor:Ee,ref:U,x:xe,y:Z,alpha:K?1:0,...!J&&K&&{interactive:!0,pointerdown:Ie,pointerup:Me},filters:[Le,Ne,Ve,Ue,...He>0?[Xe]:[],...je>0?[We]:[],...$e>0?[ze]:[]]})})})})});var howler={};/*!
1973
1973
  * howler.js v2.2.3
1974
1974
  * howlerjs.com
1975
1975
  *
@@ -1977,7 +1977,7 @@ void main() {
1977
1977
  * goldfirestudios.com
1978
1978
  *
1979
1979
  * MIT License
1980
- */(function(t){(function(){var e=function(){this.init()};e.prototype={init:function(){var l=this||r;return l._counter=1e3,l._html5AudioPool=[],l.html5PoolSize=10,l._codecs={},l._howls=[],l._muted=!1,l._volume=1,l._canPlayEvent="canplaythrough",l._navigator=typeof window<"u"&&window.navigator?window.navigator:null,l.masterGain=null,l.noAudio=!1,l.usingWebAudio=!0,l.autoSuspend=!0,l.ctx=null,l.autoUnlock=!0,l._setup(),l},volume:function(l){var c=this||r;if(l=parseFloat(l),c.ctx||d(),typeof l<"u"&&l>=0&&l<=1){if(c._volume=l,c._muted)return c;c.usingWebAudio&&c.masterGain.gain.setValueAtTime(l,r.ctx.currentTime);for(var f=0;f<c._howls.length;f++)if(!c._howls[f]._webAudio)for(var p=c._howls[f]._getSoundIds(),m=0;m<p.length;m++){var v=c._howls[f]._soundById(p[m]);v&&v._node&&(v._node.volume=v._volume*l)}return c}return c._volume},mute:function(l){var c=this||r;c.ctx||d(),c._muted=l,c.usingWebAudio&&c.masterGain.gain.setValueAtTime(l?0:c._volume,r.ctx.currentTime);for(var f=0;f<c._howls.length;f++)if(!c._howls[f]._webAudio)for(var p=c._howls[f]._getSoundIds(),m=0;m<p.length;m++){var v=c._howls[f]._soundById(p[m]);v&&v._node&&(v._node.muted=l?!0:v._muted)}return c},stop:function(){for(var l=this||r,c=0;c<l._howls.length;c++)l._howls[c].stop();return l},unload:function(){for(var l=this||r,c=l._howls.length-1;c>=0;c--)l._howls[c].unload();return l.usingWebAudio&&l.ctx&&typeof l.ctx.close<"u"&&(l.ctx.close(),l.ctx=null,d()),l},codecs:function(l){return(this||r)._codecs[l.replace(/^x-/,"")]},_setup:function(){var l=this||r;if(l.state=l.ctx&&l.ctx.state||"suspended",l._autoSuspend(),!l.usingWebAudio)if(typeof Audio<"u")try{var c=new Audio;typeof c.oncanplaythrough>"u"&&(l._canPlayEvent="canplay")}catch{l.noAudio=!0}else l.noAudio=!0;try{var c=new Audio;c.muted&&(l.noAudio=!0)}catch{}return l.noAudio||l._setupCodecs(),l},_setupCodecs:function(){var l=this||r,c=null;try{c=typeof Audio<"u"?new Audio:null}catch{return l}if(!c||typeof c.canPlayType!="function")return l;var f=c.canPlayType("audio/mpeg;").replace(/^no$/,""),p=l._navigator?l._navigator.userAgent:"",m=p.match(/OPR\/([0-6].)/g),v=m&&parseInt(m[0].split("/")[1],10)<33,g=p.indexOf("Safari")!==-1&&p.indexOf("Chrome")===-1,y=p.match(/Version\/(.*?) /),_=g&&y&&parseInt(y[1],10)<15;return l._codecs={mp3:!!(!v&&(f||c.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!f,opus:!!c.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!c.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!c.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(c.canPlayType('audio/wav; codecs="1"')||c.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!c.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!c.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(c.canPlayType("audio/x-m4a;")||c.canPlayType("audio/m4a;")||c.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(c.canPlayType("audio/x-m4b;")||c.canPlayType("audio/m4b;")||c.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(c.canPlayType("audio/x-mp4;")||c.canPlayType("audio/mp4;")||c.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!_&&c.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!_&&c.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!c.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(c.canPlayType("audio/x-flac;")||c.canPlayType("audio/flac;")).replace(/^no$/,"")},l},_unlockAudio:function(){var l=this||r;if(!(l._audioUnlocked||!l.ctx)){l._audioUnlocked=!1,l.autoUnlock=!1,!l._mobileUnloaded&&l.ctx.sampleRate!==44100&&(l._mobileUnloaded=!0,l.unload()),l._scratchBuffer=l.ctx.createBuffer(1,1,22050);var c=function(f){for(;l._html5AudioPool.length<l.html5PoolSize;)try{var p=new Audio;p._unlocked=!0,l._releaseHtml5Audio(p)}catch{l.noAudio=!0;break}for(var m=0;m<l._howls.length;m++)if(!l._howls[m]._webAudio)for(var v=l._howls[m]._getSoundIds(),g=0;g<v.length;g++){var y=l._howls[m]._soundById(v[g]);y&&y._node&&!y._node._unlocked&&(y._node._unlocked=!0,y._node.load())}l._autoResume();var _=l.ctx.createBufferSource();_.buffer=l._scratchBuffer,_.connect(l.ctx.destination),typeof _.start>"u"?_.noteOn(0):_.start(0),typeof l.ctx.resume=="function"&&l.ctx.resume(),_.onended=function(){_.disconnect(0),l._audioUnlocked=!0,document.removeEventListener("touchstart",c,!0),document.removeEventListener("touchend",c,!0),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",c,!0);for(var x=0;x<l._howls.length;x++)l._howls[x]._emit("unlock")}};return document.addEventListener("touchstart",c,!0),document.addEventListener("touchend",c,!0),document.addEventListener("click",c,!0),document.addEventListener("keydown",c,!0),l}},_obtainHtml5Audio:function(){var l=this||r;if(l._html5AudioPool.length)return l._html5AudioPool.pop();var c=new Audio().play();return c&&typeof Promise<"u"&&(c instanceof Promise||typeof c.then=="function")&&c.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(l){var c=this||r;return l._unlocked&&c._html5AudioPool.push(l),c},_autoSuspend:function(){var l=this;if(!(!l.autoSuspend||!l.ctx||typeof l.ctx.suspend>"u"||!r.usingWebAudio)){for(var c=0;c<l._howls.length;c++)if(l._howls[c]._webAudio){for(var f=0;f<l._howls[c]._sounds.length;f++)if(!l._howls[c]._sounds[f]._paused)return l}return l._suspendTimer&&clearTimeout(l._suspendTimer),l._suspendTimer=setTimeout(function(){if(l.autoSuspend){l._suspendTimer=null,l.state="suspending";var p=function(){l.state="suspended",l._resumeAfterSuspend&&(delete l._resumeAfterSuspend,l._autoResume())};l.ctx.suspend().then(p,p)}},3e4),l}},_autoResume:function(){var l=this;if(!(!l.ctx||typeof l.ctx.resume>"u"||!r.usingWebAudio))return l.state==="running"&&l.ctx.state!=="interrupted"&&l._suspendTimer?(clearTimeout(l._suspendTimer),l._suspendTimer=null):l.state==="suspended"||l.state==="running"&&l.ctx.state==="interrupted"?(l.ctx.resume().then(function(){l.state="running";for(var c=0;c<l._howls.length;c++)l._howls[c]._emit("resume")}),l._suspendTimer&&(clearTimeout(l._suspendTimer),l._suspendTimer=null)):l.state==="suspending"&&(l._resumeAfterSuspend=!0),l}};var r=new e,i=function(l){var c=this;if(!l.src||l.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}c.init(l)};i.prototype={init:function(l){var c=this;return r.ctx||d(),c._autoplay=l.autoplay||!1,c._format=typeof l.format!="string"?l.format:[l.format],c._html5=l.html5||!1,c._muted=l.mute||!1,c._loop=l.loop||!1,c._pool=l.pool||5,c._preload=typeof l.preload=="boolean"||l.preload==="metadata"?l.preload:!0,c._rate=l.rate||1,c._sprite=l.sprite||{},c._src=typeof l.src!="string"?l.src:[l.src],c._volume=l.volume!==void 0?l.volume:1,c._xhr={method:l.xhr&&l.xhr.method?l.xhr.method:"GET",headers:l.xhr&&l.xhr.headers?l.xhr.headers:null,withCredentials:l.xhr&&l.xhr.withCredentials?l.xhr.withCredentials:!1},c._duration=0,c._state="unloaded",c._sounds=[],c._endTimers={},c._queue=[],c._playLock=!1,c._onend=l.onend?[{fn:l.onend}]:[],c._onfade=l.onfade?[{fn:l.onfade}]:[],c._onload=l.onload?[{fn:l.onload}]:[],c._onloaderror=l.onloaderror?[{fn:l.onloaderror}]:[],c._onplayerror=l.onplayerror?[{fn:l.onplayerror}]:[],c._onpause=l.onpause?[{fn:l.onpause}]:[],c._onplay=l.onplay?[{fn:l.onplay}]:[],c._onstop=l.onstop?[{fn:l.onstop}]:[],c._onmute=l.onmute?[{fn:l.onmute}]:[],c._onvolume=l.onvolume?[{fn:l.onvolume}]:[],c._onrate=l.onrate?[{fn:l.onrate}]:[],c._onseek=l.onseek?[{fn:l.onseek}]:[],c._onunlock=l.onunlock?[{fn:l.onunlock}]:[],c._onresume=[],c._webAudio=r.usingWebAudio&&!c._html5,typeof r.ctx<"u"&&r.ctx&&r.autoUnlock&&r._unlockAudio(),r._howls.push(c),c._autoplay&&c._queue.push({event:"play",action:function(){c.play()}}),c._preload&&c._preload!=="none"&&c.load(),c},load:function(){var l=this,c=null;if(r.noAudio){l._emit("loaderror",null,"No audio support.");return}typeof l._src=="string"&&(l._src=[l._src]);for(var f=0;f<l._src.length;f++){var p,m;if(l._format&&l._format[f])p=l._format[f];else{if(m=l._src[f],typeof m!="string"){l._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}p=/^data:audio\/([^;,]+);/i.exec(m),p||(p=/\.([^.]+)$/.exec(m.split("?",1)[0])),p&&(p=p[1].toLowerCase())}if(p||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),p&&r.codecs(p)){c=l._src[f];break}}if(!c){l._emit("loaderror",null,"No codec support for selected audio sources.");return}return l._src=c,l._state="loading",window.location.protocol==="https:"&&c.slice(0,5)==="http:"&&(l._html5=!0,l._webAudio=!1),new n(l),l._webAudio&&a(l),l},play:function(l,c){var f=this,p=null;if(typeof l=="number")p=l,l=null;else{if(typeof l=="string"&&f._state==="loaded"&&!f._sprite[l])return null;if(typeof l>"u"&&(l="__default",!f._playLock)){for(var m=0,v=0;v<f._sounds.length;v++)f._sounds[v]._paused&&!f._sounds[v]._ended&&(m++,p=f._sounds[v]._id);m===1?l=null:p=null}}var g=p?f._soundById(p):f._inactiveSound();if(!g)return null;if(p&&!l&&(l=g._sprite||"__default"),f._state!=="loaded"){g._sprite=l,g._ended=!1;var y=g._id;return f._queue.push({event:"play",action:function(){f.play(y)}}),y}if(p&&!g._paused)return c||f._loadQueue("play"),g._id;f._webAudio&&r._autoResume();var _=Math.max(0,g._seek>0?g._seek:f._sprite[l][0]/1e3),x=Math.max(0,(f._sprite[l][0]+f._sprite[l][1])/1e3-_),T=x*1e3/Math.abs(g._rate),w=f._sprite[l][0]/1e3,b=(f._sprite[l][0]+f._sprite[l][1])/1e3;g._sprite=l,g._ended=!1;var S=function(){g._paused=!1,g._seek=_,g._start=w,g._stop=b,g._loop=!!(g._loop||f._sprite[l][2])};if(_>=b){f._ended(g);return}var A=g._node;if(f._webAudio){var I=function(){f._playLock=!1,S(),f._refreshBuffer(g);var C=g._muted||f._muted?0:g._volume;A.gain.setValueAtTime(C,r.ctx.currentTime),g._playStart=r.ctx.currentTime,typeof A.bufferSource.start>"u"?g._loop?A.bufferSource.noteGrainOn(0,_,86400):A.bufferSource.noteGrainOn(0,_,x):g._loop?A.bufferSource.start(0,_,86400):A.bufferSource.start(0,_,x),T!==1/0&&(f._endTimers[g._id]=setTimeout(f._ended.bind(f,g),T)),c||setTimeout(function(){f._emit("play",g._id),f._loadQueue()},0)};r.state==="running"&&r.ctx.state!=="interrupted"?I():(f._playLock=!0,f.once("resume",I),f._clearTimer(g._id))}else{var F=function(){A.currentTime=_,A.muted=g._muted||f._muted||r._muted||A.muted,A.volume=g._volume*r.volume(),A.playbackRate=g._rate;try{var C=A.play();if(C&&typeof Promise<"u"&&(C instanceof Promise||typeof C.then=="function")?(f._playLock=!0,S(),C.then(function(){f._playLock=!1,A._unlocked=!0,c?f._loadQueue():f._emit("play",g._id)}).catch(function(){f._playLock=!1,f._emit("playerror",g._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),g._ended=!0,g._paused=!0})):c||(f._playLock=!1,S(),f._emit("play",g._id)),A.playbackRate=g._rate,A.paused){f._emit("playerror",g._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}l!=="__default"||g._loop?f._endTimers[g._id]=setTimeout(f._ended.bind(f,g),T):(f._endTimers[g._id]=function(){f._ended(g),A.removeEventListener("ended",f._endTimers[g._id],!1)},A.addEventListener("ended",f._endTimers[g._id],!1))}catch($){f._emit("playerror",g._id,$)}};A.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(A.src=f._src,A.load());var B=window&&window.ejecta||!A.readyState&&r._navigator.isCocoonJS;if(A.readyState>=3||B)F();else{f._playLock=!0,f._state="loading";var E=function(){f._state="loaded",F(),A.removeEventListener(r._canPlayEvent,E,!1)};A.addEventListener(r._canPlayEvent,E,!1),f._clearTimer(g._id)}}return g._id},pause:function(l){var c=this;if(c._state!=="loaded"||c._playLock)return c._queue.push({event:"pause",action:function(){c.pause(l)}}),c;for(var f=c._getSoundIds(l),p=0;p<f.length;p++){c._clearTimer(f[p]);var m=c._soundById(f[p]);if(m&&!m._paused&&(m._seek=c.seek(f[p]),m._rateSeek=0,m._paused=!0,c._stopFade(f[p]),m._node))if(c._webAudio){if(!m._node.bufferSource)continue;typeof m._node.bufferSource.stop>"u"?m._node.bufferSource.noteOff(0):m._node.bufferSource.stop(0),c._cleanBuffer(m._node)}else(!isNaN(m._node.duration)||m._node.duration===1/0)&&m._node.pause();arguments[1]||c._emit("pause",m?m._id:null)}return c},stop:function(l,c){var f=this;if(f._state!=="loaded"||f._playLock)return f._queue.push({event:"stop",action:function(){f.stop(l)}}),f;for(var p=f._getSoundIds(l),m=0;m<p.length;m++){f._clearTimer(p[m]);var v=f._soundById(p[m]);v&&(v._seek=v._start||0,v._rateSeek=0,v._paused=!0,v._ended=!0,f._stopFade(p[m]),v._node&&(f._webAudio?v._node.bufferSource&&(typeof v._node.bufferSource.stop>"u"?v._node.bufferSource.noteOff(0):v._node.bufferSource.stop(0),f._cleanBuffer(v._node)):(!isNaN(v._node.duration)||v._node.duration===1/0)&&(v._node.currentTime=v._start||0,v._node.pause(),v._node.duration===1/0&&f._clearSound(v._node))),c||f._emit("stop",v._id))}return f},mute:function(l,c){var f=this;if(f._state!=="loaded"||f._playLock)return f._queue.push({event:"mute",action:function(){f.mute(l,c)}}),f;if(typeof c>"u")if(typeof l=="boolean")f._muted=l;else return f._muted;for(var p=f._getSoundIds(c),m=0;m<p.length;m++){var v=f._soundById(p[m]);v&&(v._muted=l,v._interval&&f._stopFade(v._id),f._webAudio&&v._node?v._node.gain.setValueAtTime(l?0:v._volume,r.ctx.currentTime):v._node&&(v._node.muted=r._muted?!0:l),f._emit("mute",v._id))}return f},volume:function(){var l=this,c=arguments,f,p;if(c.length===0)return l._volume;if(c.length===1||c.length===2&&typeof c[1]>"u"){var m=l._getSoundIds(),v=m.indexOf(c[0]);v>=0?p=parseInt(c[0],10):f=parseFloat(c[0])}else c.length>=2&&(f=parseFloat(c[0]),p=parseInt(c[1],10));var g;if(typeof f<"u"&&f>=0&&f<=1){if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"volume",action:function(){l.volume.apply(l,c)}}),l;typeof p>"u"&&(l._volume=f),p=l._getSoundIds(p);for(var y=0;y<p.length;y++)g=l._soundById(p[y]),g&&(g._volume=f,c[2]||l._stopFade(p[y]),l._webAudio&&g._node&&!g._muted?g._node.gain.setValueAtTime(f,r.ctx.currentTime):g._node&&!g._muted&&(g._node.volume=f*r.volume()),l._emit("volume",g._id))}else return g=p?l._soundById(p):l._sounds[0],g?g._volume:0;return l},fade:function(l,c,f,p){var m=this;if(m._state!=="loaded"||m._playLock)return m._queue.push({event:"fade",action:function(){m.fade(l,c,f,p)}}),m;l=Math.min(Math.max(0,parseFloat(l)),1),c=Math.min(Math.max(0,parseFloat(c)),1),f=parseFloat(f),m.volume(l,p);for(var v=m._getSoundIds(p),g=0;g<v.length;g++){var y=m._soundById(v[g]);if(y){if(p||m._stopFade(v[g]),m._webAudio&&!y._muted){var _=r.ctx.currentTime,x=_+f/1e3;y._volume=l,y._node.gain.setValueAtTime(l,_),y._node.gain.linearRampToValueAtTime(c,x)}m._startFadeInterval(y,l,c,f,v[g],typeof p>"u")}}return m},_startFadeInterval:function(l,c,f,p,m,v){var g=this,y=c,_=f-c,x=Math.abs(_/.01),T=Math.max(4,x>0?p/x:p),w=Date.now();l._fadeTo=f,l._interval=setInterval(function(){var b=(Date.now()-w)/p;w=Date.now(),y+=_*b,y=Math.round(y*100)/100,_<0?y=Math.max(f,y):y=Math.min(f,y),g._webAudio?l._volume=y:g.volume(y,l._id,!0),v&&(g._volume=y),(f<c&&y<=f||f>c&&y>=f)&&(clearInterval(l._interval),l._interval=null,l._fadeTo=null,g.volume(f,l._id),g._emit("fade",l._id))},T)},_stopFade:function(l){var c=this,f=c._soundById(l);return f&&f._interval&&(c._webAudio&&f._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(f._interval),f._interval=null,c.volume(f._fadeTo,l),f._fadeTo=null,c._emit("fade",l)),c},loop:function(){var l=this,c=arguments,f,p,m;if(c.length===0)return l._loop;if(c.length===1)if(typeof c[0]=="boolean")f=c[0],l._loop=f;else return m=l._soundById(parseInt(c[0],10)),m?m._loop:!1;else c.length===2&&(f=c[0],p=parseInt(c[1],10));for(var v=l._getSoundIds(p),g=0;g<v.length;g++)m=l._soundById(v[g]),m&&(m._loop=f,l._webAudio&&m._node&&m._node.bufferSource&&(m._node.bufferSource.loop=f,f&&(m._node.bufferSource.loopStart=m._start||0,m._node.bufferSource.loopEnd=m._stop,l.playing(v[g])&&(l.pause(v[g],!0),l.play(v[g],!0)))));return l},rate:function(){var l=this,c=arguments,f,p;if(c.length===0)p=l._sounds[0]._id;else if(c.length===1){var m=l._getSoundIds(),v=m.indexOf(c[0]);v>=0?p=parseInt(c[0],10):f=parseFloat(c[0])}else c.length===2&&(f=parseFloat(c[0]),p=parseInt(c[1],10));var g;if(typeof f=="number"){if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"rate",action:function(){l.rate.apply(l,c)}}),l;typeof p>"u"&&(l._rate=f),p=l._getSoundIds(p);for(var y=0;y<p.length;y++)if(g=l._soundById(p[y]),g){l.playing(p[y])&&(g._rateSeek=l.seek(p[y]),g._playStart=l._webAudio?r.ctx.currentTime:g._playStart),g._rate=f,l._webAudio&&g._node&&g._node.bufferSource?g._node.bufferSource.playbackRate.setValueAtTime(f,r.ctx.currentTime):g._node&&(g._node.playbackRate=f);var _=l.seek(p[y]),x=(l._sprite[g._sprite][0]+l._sprite[g._sprite][1])/1e3-_,T=x*1e3/Math.abs(g._rate);(l._endTimers[p[y]]||!g._paused)&&(l._clearTimer(p[y]),l._endTimers[p[y]]=setTimeout(l._ended.bind(l,g),T)),l._emit("rate",g._id)}}else return g=l._soundById(p),g?g._rate:l._rate;return l},seek:function(){var l=this,c=arguments,f,p;if(c.length===0)l._sounds.length&&(p=l._sounds[0]._id);else if(c.length===1){var m=l._getSoundIds(),v=m.indexOf(c[0]);v>=0?p=parseInt(c[0],10):l._sounds.length&&(p=l._sounds[0]._id,f=parseFloat(c[0]))}else c.length===2&&(f=parseFloat(c[0]),p=parseInt(c[1],10));if(typeof p>"u")return 0;if(typeof f=="number"&&(l._state!=="loaded"||l._playLock))return l._queue.push({event:"seek",action:function(){l.seek.apply(l,c)}}),l;var g=l._soundById(p);if(g)if(typeof f=="number"&&f>=0){var y=l.playing(p);y&&l.pause(p,!0),g._seek=f,g._ended=!1,l._clearTimer(p),!l._webAudio&&g._node&&!isNaN(g._node.duration)&&(g._node.currentTime=f);var _=function(){y&&l.play(p,!0),l._emit("seek",p)};if(y&&!l._webAudio){var x=function(){l._playLock?setTimeout(x,0):_()};setTimeout(x,0)}else _()}else if(l._webAudio){var T=l.playing(p)?r.ctx.currentTime-g._playStart:0,w=g._rateSeek?g._rateSeek-g._seek:0;return g._seek+(w+T*Math.abs(g._rate))}else return g._node.currentTime;return l},playing:function(l){var c=this;if(typeof l=="number"){var f=c._soundById(l);return f?!f._paused:!1}for(var p=0;p<c._sounds.length;p++)if(!c._sounds[p]._paused)return!0;return!1},duration:function(l){var c=this,f=c._duration,p=c._soundById(l);return p&&(f=c._sprite[p._sprite][1]/1e3),f},state:function(){return this._state},unload:function(){for(var l=this,c=l._sounds,f=0;f<c.length;f++)c[f]._paused||l.stop(c[f]._id),l._webAudio||(l._clearSound(c[f]._node),c[f]._node.removeEventListener("error",c[f]._errorFn,!1),c[f]._node.removeEventListener(r._canPlayEvent,c[f]._loadFn,!1),c[f]._node.removeEventListener("ended",c[f]._endFn,!1),r._releaseHtml5Audio(c[f]._node)),delete c[f]._node,l._clearTimer(c[f]._id);var p=r._howls.indexOf(l);p>=0&&r._howls.splice(p,1);var m=!0;for(f=0;f<r._howls.length;f++)if(r._howls[f]._src===l._src||l._src.indexOf(r._howls[f]._src)>=0){m=!1;break}return s&&m&&delete s[l._src],r.noAudio=!1,l._state="unloaded",l._sounds=[],l=null,null},on:function(l,c,f,p){var m=this,v=m["_on"+l];return typeof c=="function"&&v.push(p?{id:f,fn:c,once:p}:{id:f,fn:c}),m},off:function(l,c,f){var p=this,m=p["_on"+l],v=0;if(typeof c=="number"&&(f=c,c=null),c||f)for(v=0;v<m.length;v++){var g=f===m[v].id;if(c===m[v].fn&&g||!c&&g){m.splice(v,1);break}}else if(l)p["_on"+l]=[];else{var y=Object.keys(p);for(v=0;v<y.length;v++)y[v].indexOf("_on")===0&&Array.isArray(p[y[v]])&&(p[y[v]]=[])}return p},once:function(l,c,f){var p=this;return p.on(l,c,f,1),p},_emit:function(l,c,f){for(var p=this,m=p["_on"+l],v=m.length-1;v>=0;v--)(!m[v].id||m[v].id===c||l==="load")&&(setTimeout((function(g){g.call(this,c,f)}).bind(p,m[v].fn),0),m[v].once&&p.off(l,m[v].fn,m[v].id));return p._loadQueue(l),p},_loadQueue:function(l){var c=this;if(c._queue.length>0){var f=c._queue[0];f.event===l&&(c._queue.shift(),c._loadQueue()),l||f.action()}return c},_ended:function(l){var c=this,f=l._sprite;if(!c._webAudio&&l._node&&!l._node.paused&&!l._node.ended&&l._node.currentTime<l._stop)return setTimeout(c._ended.bind(c,l),100),c;var p=!!(l._loop||c._sprite[f][2]);if(c._emit("end",l._id),!c._webAudio&&p&&c.stop(l._id,!0).play(l._id),c._webAudio&&p){c._emit("play",l._id),l._seek=l._start||0,l._rateSeek=0,l._playStart=r.ctx.currentTime;var m=(l._stop-l._start)*1e3/Math.abs(l._rate);c._endTimers[l._id]=setTimeout(c._ended.bind(c,l),m)}return c._webAudio&&!p&&(l._paused=!0,l._ended=!0,l._seek=l._start||0,l._rateSeek=0,c._clearTimer(l._id),c._cleanBuffer(l._node),r._autoSuspend()),!c._webAudio&&!p&&c.stop(l._id,!0),c},_clearTimer:function(l){var c=this;if(c._endTimers[l]){if(typeof c._endTimers[l]!="function")clearTimeout(c._endTimers[l]);else{var f=c._soundById(l);f&&f._node&&f._node.removeEventListener("ended",c._endTimers[l],!1)}delete c._endTimers[l]}return c},_soundById:function(l){for(var c=this,f=0;f<c._sounds.length;f++)if(l===c._sounds[f]._id)return c._sounds[f];return null},_inactiveSound:function(){var l=this;l._drain();for(var c=0;c<l._sounds.length;c++)if(l._sounds[c]._ended)return l._sounds[c].reset();return new n(l)},_drain:function(){var l=this,c=l._pool,f=0,p=0;if(!(l._sounds.length<c)){for(p=0;p<l._sounds.length;p++)l._sounds[p]._ended&&f++;for(p=l._sounds.length-1;p>=0;p--){if(f<=c)return;l._sounds[p]._ended&&(l._webAudio&&l._sounds[p]._node&&l._sounds[p]._node.disconnect(0),l._sounds.splice(p,1),f--)}}},_getSoundIds:function(l){var c=this;if(typeof l>"u"){for(var f=[],p=0;p<c._sounds.length;p++)f.push(c._sounds[p]._id);return f}else return[l]},_refreshBuffer:function(l){var c=this;return l._node.bufferSource=r.ctx.createBufferSource(),l._node.bufferSource.buffer=s[c._src],l._panner?l._node.bufferSource.connect(l._panner):l._node.bufferSource.connect(l._node),l._node.bufferSource.loop=l._loop,l._loop&&(l._node.bufferSource.loopStart=l._start||0,l._node.bufferSource.loopEnd=l._stop||0),l._node.bufferSource.playbackRate.setValueAtTime(l._rate,r.ctx.currentTime),c},_cleanBuffer:function(l){var c=this,f=r._navigator&&r._navigator.vendor.indexOf("Apple")>=0;if(r._scratchBuffer&&l.bufferSource&&(l.bufferSource.onended=null,l.bufferSource.disconnect(0),f))try{l.bufferSource.buffer=r._scratchBuffer}catch{}return l.bufferSource=null,c},_clearSound:function(l){var c=/MSIE |Trident\//.test(r._navigator&&r._navigator.userAgent);c||(l.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var n=function(l){this._parent=l,this.init()};n.prototype={init:function(){var l=this,c=l._parent;return l._muted=c._muted,l._loop=c._loop,l._volume=c._volume,l._rate=c._rate,l._seek=0,l._paused=!0,l._ended=!0,l._sprite="__default",l._id=++r._counter,c._sounds.push(l),l.create(),l},create:function(){var l=this,c=l._parent,f=r._muted||l._muted||l._parent._muted?0:l._volume;return c._webAudio?(l._node=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),l._node.gain.setValueAtTime(f,r.ctx.currentTime),l._node.paused=!0,l._node.connect(r.masterGain)):r.noAudio||(l._node=r._obtainHtml5Audio(),l._errorFn=l._errorListener.bind(l),l._node.addEventListener("error",l._errorFn,!1),l._loadFn=l._loadListener.bind(l),l._node.addEventListener(r._canPlayEvent,l._loadFn,!1),l._endFn=l._endListener.bind(l),l._node.addEventListener("ended",l._endFn,!1),l._node.src=c._src,l._node.preload=c._preload===!0?"auto":c._preload,l._node.volume=f*r.volume(),l._node.load()),l},reset:function(){var l=this,c=l._parent;return l._muted=c._muted,l._loop=c._loop,l._volume=c._volume,l._rate=c._rate,l._seek=0,l._rateSeek=0,l._paused=!0,l._ended=!0,l._sprite="__default",l._id=++r._counter,l},_errorListener:function(){var l=this;l._parent._emit("loaderror",l._id,l._node.error?l._node.error.code:0),l._node.removeEventListener("error",l._errorFn,!1)},_loadListener:function(){var l=this,c=l._parent;c._duration=Math.ceil(l._node.duration*10)/10,Object.keys(c._sprite).length===0&&(c._sprite={__default:[0,c._duration*1e3]}),c._state!=="loaded"&&(c._state="loaded",c._emit("load"),c._loadQueue()),l._node.removeEventListener(r._canPlayEvent,l._loadFn,!1)},_endListener:function(){var l=this,c=l._parent;c._duration===1/0&&(c._duration=Math.ceil(l._node.duration*10)/10,c._sprite.__default[1]===1/0&&(c._sprite.__default[1]=c._duration*1e3),c._ended(l)),l._node.removeEventListener("ended",l._endFn,!1)}};var s={},a=function(l){var c=l._src;if(s[c]){l._duration=s[c].duration,h(l);return}if(/^data:[^;]+;base64,/.test(c)){for(var f=atob(c.split(",")[1]),p=new Uint8Array(f.length),m=0;m<f.length;++m)p[m]=f.charCodeAt(m);u(p.buffer,l)}else{var v=new XMLHttpRequest;v.open(l._xhr.method,c,!0),v.withCredentials=l._xhr.withCredentials,v.responseType="arraybuffer",l._xhr.headers&&Object.keys(l._xhr.headers).forEach(function(g){v.setRequestHeader(g,l._xhr.headers[g])}),v.onload=function(){var g=(v.status+"")[0];if(g!=="0"&&g!=="2"&&g!=="3"){l._emit("loaderror",null,"Failed loading audio file with status: "+v.status+".");return}u(v.response,l)},v.onerror=function(){l._webAudio&&(l._html5=!0,l._webAudio=!1,l._sounds=[],delete s[c],l.load())},o(v)}},o=function(l){try{l.send()}catch{l.onerror()}},u=function(l,c){var f=function(){c._emit("loaderror",null,"Decoding audio data failed.")},p=function(m){m&&c._sounds.length>0?(s[c._src]=m,h(c,m)):f()};typeof Promise<"u"&&r.ctx.decodeAudioData.length===1?r.ctx.decodeAudioData(l).then(p).catch(f):r.ctx.decodeAudioData(l,p,f)},h=function(l,c){c&&!l._duration&&(l._duration=c.duration),Object.keys(l._sprite).length===0&&(l._sprite={__default:[0,l._duration*1e3]}),l._state!=="loaded"&&(l._state="loaded",l._emit("load"),l._loadQueue())},d=function(){if(r.usingWebAudio){try{typeof AudioContext<"u"?r.ctx=new AudioContext:typeof webkitAudioContext<"u"?r.ctx=new webkitAudioContext:r.usingWebAudio=!1}catch{r.usingWebAudio=!1}r.ctx||(r.usingWebAudio=!1);var l=/iP(hone|od|ad)/.test(r._navigator&&r._navigator.platform),c=r._navigator&&r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),f=c?parseInt(c[1],10):null;if(l&&f&&f<9){var p=/safari/.test(r._navigator&&r._navigator.userAgent.toLowerCase());r._navigator&&!p&&(r.usingWebAudio=!1)}r.usingWebAudio&&(r.masterGain=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),r.masterGain.gain.setValueAtTime(r._muted?0:r._volume,r.ctx.currentTime),r.masterGain.connect(r.ctx.destination)),r._setup()}};t.Howler=r,t.Howl=i,typeof Ve<"u"?(Ve.HowlerGlobal=e,Ve.Howler=r,Ve.Howl=i,Ve.Sound=n):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=r,window.Howl=i,window.Sound=n)})();/*!
1980
+ */(function(C){(function(){var E=function(){this.init()};E.prototype={init:function(){var Z=this||I;return Z._counter=1e3,Z._html5AudioPool=[],Z.html5PoolSize=10,Z._codecs={},Z._howls=[],Z._muted=!1,Z._volume=1,Z._canPlayEvent="canplaythrough",Z._navigator=typeof window<"u"&&window.navigator?window.navigator:null,Z.masterGain=null,Z.noAudio=!1,Z.usingWebAudio=!0,Z.autoSuspend=!0,Z.ctx=null,Z.autoUnlock=!0,Z._setup(),Z},volume:function(Z){var _e=this||I;if(Z=parseFloat(Z),_e.ctx||xe(),typeof Z<"u"&&Z>=0&&Z<=1){if(_e._volume=Z,_e._muted)return _e;_e.usingWebAudio&&_e.masterGain.gain.setValueAtTime(Z,I.ctx.currentTime);for(var Se=0;Se<_e._howls.length;Se++)if(!_e._howls[Se]._webAudio)for(var Ee=_e._howls[Se]._getSoundIds(),Ae=0;Ae<Ee.length;Ae++){var Re=_e._howls[Se]._soundById(Ee[Ae]);Re&&Re._node&&(Re._node.volume=Re._volume*Z)}return _e}return _e._volume},mute:function(Z){var _e=this||I;_e.ctx||xe(),_e._muted=Z,_e.usingWebAudio&&_e.masterGain.gain.setValueAtTime(Z?0:_e._volume,I.ctx.currentTime);for(var Se=0;Se<_e._howls.length;Se++)if(!_e._howls[Se]._webAudio)for(var Ee=_e._howls[Se]._getSoundIds(),Ae=0;Ae<Ee.length;Ae++){var Re=_e._howls[Se]._soundById(Ee[Ae]);Re&&Re._node&&(Re._node.muted=Z?!0:Re._muted)}return _e},stop:function(){for(var Z=this||I,_e=0;_e<Z._howls.length;_e++)Z._howls[_e].stop();return Z},unload:function(){for(var Z=this||I,_e=Z._howls.length-1;_e>=0;_e--)Z._howls[_e].unload();return Z.usingWebAudio&&Z.ctx&&typeof Z.ctx.close<"u"&&(Z.ctx.close(),Z.ctx=null,xe()),Z},codecs:function(Z){return(this||I)._codecs[Z.replace(/^x-/,"")]},_setup:function(){var Z=this||I;if(Z.state=Z.ctx&&Z.ctx.state||"suspended",Z._autoSuspend(),!Z.usingWebAudio)if(typeof Audio<"u")try{var _e=new Audio;typeof _e.oncanplaythrough>"u"&&(Z._canPlayEvent="canplay")}catch{Z.noAudio=!0}else Z.noAudio=!0;try{var _e=new Audio;_e.muted&&(Z.noAudio=!0)}catch{}return Z.noAudio||Z._setupCodecs(),Z},_setupCodecs:function(){var Z=this||I,_e=null;try{_e=typeof Audio<"u"?new Audio:null}catch{return Z}if(!_e||typeof _e.canPlayType!="function")return Z;var Se=_e.canPlayType("audio/mpeg;").replace(/^no$/,""),Ee=Z._navigator?Z._navigator.userAgent:"",Ae=Ee.match(/OPR\/([0-6].)/g),Re=Ae&&parseInt(Ae[0].split("/")[1],10)<33,Te=Ee.indexOf("Safari")!==-1&&Ee.indexOf("Chrome")===-1,we=Ee.match(/Version\/(.*?) /),Pe=Te&&we&&parseInt(we[1],10)<15;return Z._codecs={mp3:!!(!Re&&(Se||_e.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!Se,opus:!!_e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!_e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!_e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(_e.canPlayType('audio/wav; codecs="1"')||_e.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!_e.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!_e.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(_e.canPlayType("audio/x-m4a;")||_e.canPlayType("audio/m4a;")||_e.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(_e.canPlayType("audio/x-m4b;")||_e.canPlayType("audio/m4b;")||_e.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(_e.canPlayType("audio/x-mp4;")||_e.canPlayType("audio/mp4;")||_e.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!Pe&&_e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!Pe&&_e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!_e.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(_e.canPlayType("audio/x-flac;")||_e.canPlayType("audio/flac;")).replace(/^no$/,"")},Z},_unlockAudio:function(){var Z=this||I;if(!(Z._audioUnlocked||!Z.ctx)){Z._audioUnlocked=!1,Z.autoUnlock=!1,!Z._mobileUnloaded&&Z.ctx.sampleRate!==44100&&(Z._mobileUnloaded=!0,Z.unload()),Z._scratchBuffer=Z.ctx.createBuffer(1,1,22050);var _e=function(Se){for(;Z._html5AudioPool.length<Z.html5PoolSize;)try{var Ee=new Audio;Ee._unlocked=!0,Z._releaseHtml5Audio(Ee)}catch{Z.noAudio=!0;break}for(var Ae=0;Ae<Z._howls.length;Ae++)if(!Z._howls[Ae]._webAudio)for(var Re=Z._howls[Ae]._getSoundIds(),Te=0;Te<Re.length;Te++){var we=Z._howls[Ae]._soundById(Re[Te]);we&&we._node&&!we._node._unlocked&&(we._node._unlocked=!0,we._node.load())}Z._autoResume();var Pe=Z.ctx.createBufferSource();Pe.buffer=Z._scratchBuffer,Pe.connect(Z.ctx.destination),typeof Pe.start>"u"?Pe.noteOn(0):Pe.start(0),typeof Z.ctx.resume=="function"&&Z.ctx.resume(),Pe.onended=function(){Pe.disconnect(0),Z._audioUnlocked=!0,document.removeEventListener("touchstart",_e,!0),document.removeEventListener("touchend",_e,!0),document.removeEventListener("click",_e,!0),document.removeEventListener("keydown",_e,!0);for(var Ie=0;Ie<Z._howls.length;Ie++)Z._howls[Ie]._emit("unlock")}};return document.addEventListener("touchstart",_e,!0),document.addEventListener("touchend",_e,!0),document.addEventListener("click",_e,!0),document.addEventListener("keydown",_e,!0),Z}},_obtainHtml5Audio:function(){var Z=this||I;if(Z._html5AudioPool.length)return Z._html5AudioPool.pop();var _e=new Audio().play();return _e&&typeof Promise<"u"&&(_e instanceof Promise||typeof _e.then=="function")&&_e.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(Z){var _e=this||I;return Z._unlocked&&_e._html5AudioPool.push(Z),_e},_autoSuspend:function(){var Z=this;if(!(!Z.autoSuspend||!Z.ctx||typeof Z.ctx.suspend>"u"||!I.usingWebAudio)){for(var _e=0;_e<Z._howls.length;_e++)if(Z._howls[_e]._webAudio){for(var Se=0;Se<Z._howls[_e]._sounds.length;Se++)if(!Z._howls[_e]._sounds[Se]._paused)return Z}return Z._suspendTimer&&clearTimeout(Z._suspendTimer),Z._suspendTimer=setTimeout(function(){if(Z.autoSuspend){Z._suspendTimer=null,Z.state="suspending";var Ee=function(){Z.state="suspended",Z._resumeAfterSuspend&&(delete Z._resumeAfterSuspend,Z._autoResume())};Z.ctx.suspend().then(Ee,Ee)}},3e4),Z}},_autoResume:function(){var Z=this;if(!(!Z.ctx||typeof Z.ctx.resume>"u"||!I.usingWebAudio))return Z.state==="running"&&Z.ctx.state!=="interrupted"&&Z._suspendTimer?(clearTimeout(Z._suspendTimer),Z._suspendTimer=null):Z.state==="suspended"||Z.state==="running"&&Z.ctx.state==="interrupted"?(Z.ctx.resume().then(function(){Z.state="running";for(var _e=0;_e<Z._howls.length;_e++)Z._howls[_e]._emit("resume")}),Z._suspendTimer&&(clearTimeout(Z._suspendTimer),Z._suspendTimer=null)):Z.state==="suspending"&&(Z._resumeAfterSuspend=!0),Z}};var I=new E,B=function(Z){var _e=this;if(!Z.src||Z.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}_e.init(Z)};B.prototype={init:function(Z){var _e=this;return I.ctx||xe(),_e._autoplay=Z.autoplay||!1,_e._format=typeof Z.format!="string"?Z.format:[Z.format],_e._html5=Z.html5||!1,_e._muted=Z.mute||!1,_e._loop=Z.loop||!1,_e._pool=Z.pool||5,_e._preload=typeof Z.preload=="boolean"||Z.preload==="metadata"?Z.preload:!0,_e._rate=Z.rate||1,_e._sprite=Z.sprite||{},_e._src=typeof Z.src!="string"?Z.src:[Z.src],_e._volume=Z.volume!==void 0?Z.volume:1,_e._xhr={method:Z.xhr&&Z.xhr.method?Z.xhr.method:"GET",headers:Z.xhr&&Z.xhr.headers?Z.xhr.headers:null,withCredentials:Z.xhr&&Z.xhr.withCredentials?Z.xhr.withCredentials:!1},_e._duration=0,_e._state="unloaded",_e._sounds=[],_e._endTimers={},_e._queue=[],_e._playLock=!1,_e._onend=Z.onend?[{fn:Z.onend}]:[],_e._onfade=Z.onfade?[{fn:Z.onfade}]:[],_e._onload=Z.onload?[{fn:Z.onload}]:[],_e._onloaderror=Z.onloaderror?[{fn:Z.onloaderror}]:[],_e._onplayerror=Z.onplayerror?[{fn:Z.onplayerror}]:[],_e._onpause=Z.onpause?[{fn:Z.onpause}]:[],_e._onplay=Z.onplay?[{fn:Z.onplay}]:[],_e._onstop=Z.onstop?[{fn:Z.onstop}]:[],_e._onmute=Z.onmute?[{fn:Z.onmute}]:[],_e._onvolume=Z.onvolume?[{fn:Z.onvolume}]:[],_e._onrate=Z.onrate?[{fn:Z.onrate}]:[],_e._onseek=Z.onseek?[{fn:Z.onseek}]:[],_e._onunlock=Z.onunlock?[{fn:Z.onunlock}]:[],_e._onresume=[],_e._webAudio=I.usingWebAudio&&!_e._html5,typeof I.ctx<"u"&&I.ctx&&I.autoUnlock&&I._unlockAudio(),I._howls.push(_e),_e._autoplay&&_e._queue.push({event:"play",action:function(){_e.play()}}),_e._preload&&_e._preload!=="none"&&_e.load(),_e},load:function(){var Z=this,_e=null;if(I.noAudio){Z._emit("loaderror",null,"No audio support.");return}typeof Z._src=="string"&&(Z._src=[Z._src]);for(var Se=0;Se<Z._src.length;Se++){var Ee,Ae;if(Z._format&&Z._format[Se])Ee=Z._format[Se];else{if(Ae=Z._src[Se],typeof Ae!="string"){Z._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}Ee=/^data:audio\/([^;,]+);/i.exec(Ae),Ee||(Ee=/\.([^.]+)$/.exec(Ae.split("?",1)[0])),Ee&&(Ee=Ee[1].toLowerCase())}if(Ee||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),Ee&&I.codecs(Ee)){_e=Z._src[Se];break}}if(!_e){Z._emit("loaderror",null,"No codec support for selected audio sources.");return}return Z._src=_e,Z._state="loading",window.location.protocol==="https:"&&_e.slice(0,5)==="http:"&&(Z._html5=!0,Z._webAudio=!1),new U(Z),Z._webAudio&&X(Z),Z},play:function(Z,_e){var Se=this,Ee=null;if(typeof Z=="number")Ee=Z,Z=null;else{if(typeof Z=="string"&&Se._state==="loaded"&&!Se._sprite[Z])return null;if(typeof Z>"u"&&(Z="__default",!Se._playLock)){for(var Ae=0,Re=0;Re<Se._sounds.length;Re++)Se._sounds[Re]._paused&&!Se._sounds[Re]._ended&&(Ae++,Ee=Se._sounds[Re]._id);Ae===1?Z=null:Ee=null}}var Te=Ee?Se._soundById(Ee):Se._inactiveSound();if(!Te)return null;if(Ee&&!Z&&(Z=Te._sprite||"__default"),Se._state!=="loaded"){Te._sprite=Z,Te._ended=!1;var we=Te._id;return Se._queue.push({event:"play",action:function(){Se.play(we)}}),we}if(Ee&&!Te._paused)return _e||Se._loadQueue("play"),Te._id;Se._webAudio&&I._autoResume();var Pe=Math.max(0,Te._seek>0?Te._seek:Se._sprite[Z][0]/1e3),Ie=Math.max(0,(Se._sprite[Z][0]+Se._sprite[Z][1])/1e3-Pe),Me=Ie*1e3/Math.abs(Te._rate),Oe=Se._sprite[Z][0]/1e3,Le=(Se._sprite[Z][0]+Se._sprite[Z][1])/1e3;Te._sprite=Z,Te._ended=!1;var Ne=function(){Te._paused=!1,Te._seek=Pe,Te._start=Oe,Te._stop=Le,Te._loop=!!(Te._loop||Se._sprite[Z][2])};if(Pe>=Le){Se._ended(Te);return}var Ve=Te._node;if(Se._webAudio){var Xe=function(){Se._playLock=!1,Ne(),Se._refreshBuffer(Te);var He=Te._muted||Se._muted?0:Te._volume;Ve.gain.setValueAtTime(He,I.ctx.currentTime),Te._playStart=I.ctx.currentTime,typeof Ve.bufferSource.start>"u"?Te._loop?Ve.bufferSource.noteGrainOn(0,Pe,86400):Ve.bufferSource.noteGrainOn(0,Pe,Ie):Te._loop?Ve.bufferSource.start(0,Pe,86400):Ve.bufferSource.start(0,Pe,Ie),Me!==1/0&&(Se._endTimers[Te._id]=setTimeout(Se._ended.bind(Se,Te),Me)),_e||setTimeout(function(){Se._emit("play",Te._id),Se._loadQueue()},0)};I.state==="running"&&I.ctx.state!=="interrupted"?Xe():(Se._playLock=!0,Se.once("resume",Xe),Se._clearTimer(Te._id))}else{var Ue=function(){Ve.currentTime=Pe,Ve.muted=Te._muted||Se._muted||I._muted||Ve.muted,Ve.volume=Te._volume*I.volume(),Ve.playbackRate=Te._rate;try{var He=Ve.play();if(He&&typeof Promise<"u"&&(He instanceof Promise||typeof He.then=="function")?(Se._playLock=!0,Ne(),He.then(function(){Se._playLock=!1,Ve._unlocked=!0,_e?Se._loadQueue():Se._emit("play",Te._id)}).catch(function(){Se._playLock=!1,Se._emit("playerror",Te._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),Te._ended=!0,Te._paused=!0})):_e||(Se._playLock=!1,Ne(),Se._emit("play",Te._id)),Ve.playbackRate=Te._rate,Ve.paused){Se._emit("playerror",Te._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}Z!=="__default"||Te._loop?Se._endTimers[Te._id]=setTimeout(Se._ended.bind(Se,Te),Me):(Se._endTimers[Te._id]=function(){Se._ended(Te),Ve.removeEventListener("ended",Se._endTimers[Te._id],!1)},Ve.addEventListener("ended",Se._endTimers[Te._id],!1))}catch(je){Se._emit("playerror",Te._id,je)}};Ve.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(Ve.src=Se._src,Ve.load());var We=window&&window.ejecta||!Ve.readyState&&I._navigator.isCocoonJS;if(Ve.readyState>=3||We)Ue();else{Se._playLock=!0,Se._state="loading";var ze=function(){Se._state="loaded",Ue(),Ve.removeEventListener(I._canPlayEvent,ze,!1)};Ve.addEventListener(I._canPlayEvent,ze,!1),Se._clearTimer(Te._id)}}return Te._id},pause:function(Z){var _e=this;if(_e._state!=="loaded"||_e._playLock)return _e._queue.push({event:"pause",action:function(){_e.pause(Z)}}),_e;for(var Se=_e._getSoundIds(Z),Ee=0;Ee<Se.length;Ee++){_e._clearTimer(Se[Ee]);var Ae=_e._soundById(Se[Ee]);if(Ae&&!Ae._paused&&(Ae._seek=_e.seek(Se[Ee]),Ae._rateSeek=0,Ae._paused=!0,_e._stopFade(Se[Ee]),Ae._node))if(_e._webAudio){if(!Ae._node.bufferSource)continue;typeof Ae._node.bufferSource.stop>"u"?Ae._node.bufferSource.noteOff(0):Ae._node.bufferSource.stop(0),_e._cleanBuffer(Ae._node)}else(!isNaN(Ae._node.duration)||Ae._node.duration===1/0)&&Ae._node.pause();arguments[1]||_e._emit("pause",Ae?Ae._id:null)}return _e},stop:function(Z,_e){var Se=this;if(Se._state!=="loaded"||Se._playLock)return Se._queue.push({event:"stop",action:function(){Se.stop(Z)}}),Se;for(var Ee=Se._getSoundIds(Z),Ae=0;Ae<Ee.length;Ae++){Se._clearTimer(Ee[Ae]);var Re=Se._soundById(Ee[Ae]);Re&&(Re._seek=Re._start||0,Re._rateSeek=0,Re._paused=!0,Re._ended=!0,Se._stopFade(Ee[Ae]),Re._node&&(Se._webAudio?Re._node.bufferSource&&(typeof Re._node.bufferSource.stop>"u"?Re._node.bufferSource.noteOff(0):Re._node.bufferSource.stop(0),Se._cleanBuffer(Re._node)):(!isNaN(Re._node.duration)||Re._node.duration===1/0)&&(Re._node.currentTime=Re._start||0,Re._node.pause(),Re._node.duration===1/0&&Se._clearSound(Re._node))),_e||Se._emit("stop",Re._id))}return Se},mute:function(Z,_e){var Se=this;if(Se._state!=="loaded"||Se._playLock)return Se._queue.push({event:"mute",action:function(){Se.mute(Z,_e)}}),Se;if(typeof _e>"u")if(typeof Z=="boolean")Se._muted=Z;else return Se._muted;for(var Ee=Se._getSoundIds(_e),Ae=0;Ae<Ee.length;Ae++){var Re=Se._soundById(Ee[Ae]);Re&&(Re._muted=Z,Re._interval&&Se._stopFade(Re._id),Se._webAudio&&Re._node?Re._node.gain.setValueAtTime(Z?0:Re._volume,I.ctx.currentTime):Re._node&&(Re._node.muted=I._muted?!0:Z),Se._emit("mute",Re._id))}return Se},volume:function(){var Z=this,_e=arguments,Se,Ee;if(_e.length===0)return Z._volume;if(_e.length===1||_e.length===2&&typeof _e[1]>"u"){var Ae=Z._getSoundIds(),Re=Ae.indexOf(_e[0]);Re>=0?Ee=parseInt(_e[0],10):Se=parseFloat(_e[0])}else _e.length>=2&&(Se=parseFloat(_e[0]),Ee=parseInt(_e[1],10));var Te;if(typeof Se<"u"&&Se>=0&&Se<=1){if(Z._state!=="loaded"||Z._playLock)return Z._queue.push({event:"volume",action:function(){Z.volume.apply(Z,_e)}}),Z;typeof Ee>"u"&&(Z._volume=Se),Ee=Z._getSoundIds(Ee);for(var we=0;we<Ee.length;we++)Te=Z._soundById(Ee[we]),Te&&(Te._volume=Se,_e[2]||Z._stopFade(Ee[we]),Z._webAudio&&Te._node&&!Te._muted?Te._node.gain.setValueAtTime(Se,I.ctx.currentTime):Te._node&&!Te._muted&&(Te._node.volume=Se*I.volume()),Z._emit("volume",Te._id))}else return Te=Ee?Z._soundById(Ee):Z._sounds[0],Te?Te._volume:0;return Z},fade:function(Z,_e,Se,Ee){var Ae=this;if(Ae._state!=="loaded"||Ae._playLock)return Ae._queue.push({event:"fade",action:function(){Ae.fade(Z,_e,Se,Ee)}}),Ae;Z=Math.min(Math.max(0,parseFloat(Z)),1),_e=Math.min(Math.max(0,parseFloat(_e)),1),Se=parseFloat(Se),Ae.volume(Z,Ee);for(var Re=Ae._getSoundIds(Ee),Te=0;Te<Re.length;Te++){var we=Ae._soundById(Re[Te]);if(we){if(Ee||Ae._stopFade(Re[Te]),Ae._webAudio&&!we._muted){var Pe=I.ctx.currentTime,Ie=Pe+Se/1e3;we._volume=Z,we._node.gain.setValueAtTime(Z,Pe),we._node.gain.linearRampToValueAtTime(_e,Ie)}Ae._startFadeInterval(we,Z,_e,Se,Re[Te],typeof Ee>"u")}}return Ae},_startFadeInterval:function(Z,_e,Se,Ee,Ae,Re){var Te=this,we=_e,Pe=Se-_e,Ie=Math.abs(Pe/.01),Me=Math.max(4,Ie>0?Ee/Ie:Ee),Oe=Date.now();Z._fadeTo=Se,Z._interval=setInterval(function(){var Le=(Date.now()-Oe)/Ee;Oe=Date.now(),we+=Pe*Le,we=Math.round(we*100)/100,Pe<0?we=Math.max(Se,we):we=Math.min(Se,we),Te._webAudio?Z._volume=we:Te.volume(we,Z._id,!0),Re&&(Te._volume=we),(Se<_e&&we<=Se||Se>_e&&we>=Se)&&(clearInterval(Z._interval),Z._interval=null,Z._fadeTo=null,Te.volume(Se,Z._id),Te._emit("fade",Z._id))},Me)},_stopFade:function(Z){var _e=this,Se=_e._soundById(Z);return Se&&Se._interval&&(_e._webAudio&&Se._node.gain.cancelScheduledValues(I.ctx.currentTime),clearInterval(Se._interval),Se._interval=null,_e.volume(Se._fadeTo,Z),Se._fadeTo=null,_e._emit("fade",Z)),_e},loop:function(){var Z=this,_e=arguments,Se,Ee,Ae;if(_e.length===0)return Z._loop;if(_e.length===1)if(typeof _e[0]=="boolean")Se=_e[0],Z._loop=Se;else return Ae=Z._soundById(parseInt(_e[0],10)),Ae?Ae._loop:!1;else _e.length===2&&(Se=_e[0],Ee=parseInt(_e[1],10));for(var Re=Z._getSoundIds(Ee),Te=0;Te<Re.length;Te++)Ae=Z._soundById(Re[Te]),Ae&&(Ae._loop=Se,Z._webAudio&&Ae._node&&Ae._node.bufferSource&&(Ae._node.bufferSource.loop=Se,Se&&(Ae._node.bufferSource.loopStart=Ae._start||0,Ae._node.bufferSource.loopEnd=Ae._stop,Z.playing(Re[Te])&&(Z.pause(Re[Te],!0),Z.play(Re[Te],!0)))));return Z},rate:function(){var Z=this,_e=arguments,Se,Ee;if(_e.length===0)Ee=Z._sounds[0]._id;else if(_e.length===1){var Ae=Z._getSoundIds(),Re=Ae.indexOf(_e[0]);Re>=0?Ee=parseInt(_e[0],10):Se=parseFloat(_e[0])}else _e.length===2&&(Se=parseFloat(_e[0]),Ee=parseInt(_e[1],10));var Te;if(typeof Se=="number"){if(Z._state!=="loaded"||Z._playLock)return Z._queue.push({event:"rate",action:function(){Z.rate.apply(Z,_e)}}),Z;typeof Ee>"u"&&(Z._rate=Se),Ee=Z._getSoundIds(Ee);for(var we=0;we<Ee.length;we++)if(Te=Z._soundById(Ee[we]),Te){Z.playing(Ee[we])&&(Te._rateSeek=Z.seek(Ee[we]),Te._playStart=Z._webAudio?I.ctx.currentTime:Te._playStart),Te._rate=Se,Z._webAudio&&Te._node&&Te._node.bufferSource?Te._node.bufferSource.playbackRate.setValueAtTime(Se,I.ctx.currentTime):Te._node&&(Te._node.playbackRate=Se);var Pe=Z.seek(Ee[we]),Ie=(Z._sprite[Te._sprite][0]+Z._sprite[Te._sprite][1])/1e3-Pe,Me=Ie*1e3/Math.abs(Te._rate);(Z._endTimers[Ee[we]]||!Te._paused)&&(Z._clearTimer(Ee[we]),Z._endTimers[Ee[we]]=setTimeout(Z._ended.bind(Z,Te),Me)),Z._emit("rate",Te._id)}}else return Te=Z._soundById(Ee),Te?Te._rate:Z._rate;return Z},seek:function(){var Z=this,_e=arguments,Se,Ee;if(_e.length===0)Z._sounds.length&&(Ee=Z._sounds[0]._id);else if(_e.length===1){var Ae=Z._getSoundIds(),Re=Ae.indexOf(_e[0]);Re>=0?Ee=parseInt(_e[0],10):Z._sounds.length&&(Ee=Z._sounds[0]._id,Se=parseFloat(_e[0]))}else _e.length===2&&(Se=parseFloat(_e[0]),Ee=parseInt(_e[1],10));if(typeof Ee>"u")return 0;if(typeof Se=="number"&&(Z._state!=="loaded"||Z._playLock))return Z._queue.push({event:"seek",action:function(){Z.seek.apply(Z,_e)}}),Z;var Te=Z._soundById(Ee);if(Te)if(typeof Se=="number"&&Se>=0){var we=Z.playing(Ee);we&&Z.pause(Ee,!0),Te._seek=Se,Te._ended=!1,Z._clearTimer(Ee),!Z._webAudio&&Te._node&&!isNaN(Te._node.duration)&&(Te._node.currentTime=Se);var Pe=function(){we&&Z.play(Ee,!0),Z._emit("seek",Ee)};if(we&&!Z._webAudio){var Ie=function(){Z._playLock?setTimeout(Ie,0):Pe()};setTimeout(Ie,0)}else Pe()}else if(Z._webAudio){var Me=Z.playing(Ee)?I.ctx.currentTime-Te._playStart:0,Oe=Te._rateSeek?Te._rateSeek-Te._seek:0;return Te._seek+(Oe+Me*Math.abs(Te._rate))}else return Te._node.currentTime;return Z},playing:function(Z){var _e=this;if(typeof Z=="number"){var Se=_e._soundById(Z);return Se?!Se._paused:!1}for(var Ee=0;Ee<_e._sounds.length;Ee++)if(!_e._sounds[Ee]._paused)return!0;return!1},duration:function(Z){var _e=this,Se=_e._duration,Ee=_e._soundById(Z);return Ee&&(Se=_e._sprite[Ee._sprite][1]/1e3),Se},state:function(){return this._state},unload:function(){for(var Z=this,_e=Z._sounds,Se=0;Se<_e.length;Se++)_e[Se]._paused||Z.stop(_e[Se]._id),Z._webAudio||(Z._clearSound(_e[Se]._node),_e[Se]._node.removeEventListener("error",_e[Se]._errorFn,!1),_e[Se]._node.removeEventListener(I._canPlayEvent,_e[Se]._loadFn,!1),_e[Se]._node.removeEventListener("ended",_e[Se]._endFn,!1),I._releaseHtml5Audio(_e[Se]._node)),delete _e[Se]._node,Z._clearTimer(_e[Se]._id);var Ee=I._howls.indexOf(Z);Ee>=0&&I._howls.splice(Ee,1);var Ae=!0;for(Se=0;Se<I._howls.length;Se++)if(I._howls[Se]._src===Z._src||Z._src.indexOf(I._howls[Se]._src)>=0){Ae=!1;break}return V&&Ae&&delete V[Z._src],I.noAudio=!1,Z._state="unloaded",Z._sounds=[],Z=null,null},on:function(Z,_e,Se,Ee){var Ae=this,Re=Ae["_on"+Z];return typeof _e=="function"&&Re.push(Ee?{id:Se,fn:_e,once:Ee}:{id:Se,fn:_e}),Ae},off:function(Z,_e,Se){var Ee=this,Ae=Ee["_on"+Z],Re=0;if(typeof _e=="number"&&(Se=_e,_e=null),_e||Se)for(Re=0;Re<Ae.length;Re++){var Te=Se===Ae[Re].id;if(_e===Ae[Re].fn&&Te||!_e&&Te){Ae.splice(Re,1);break}}else if(Z)Ee["_on"+Z]=[];else{var we=Object.keys(Ee);for(Re=0;Re<we.length;Re++)we[Re].indexOf("_on")===0&&Array.isArray(Ee[we[Re]])&&(Ee[we[Re]]=[])}return Ee},once:function(Z,_e,Se){var Ee=this;return Ee.on(Z,_e,Se,1),Ee},_emit:function(Z,_e,Se){for(var Ee=this,Ae=Ee["_on"+Z],Re=Ae.length-1;Re>=0;Re--)(!Ae[Re].id||Ae[Re].id===_e||Z==="load")&&(setTimeout((function(Te){Te.call(this,_e,Se)}).bind(Ee,Ae[Re].fn),0),Ae[Re].once&&Ee.off(Z,Ae[Re].fn,Ae[Re].id));return Ee._loadQueue(Z),Ee},_loadQueue:function(Z){var _e=this;if(_e._queue.length>0){var Se=_e._queue[0];Se.event===Z&&(_e._queue.shift(),_e._loadQueue()),Z||Se.action()}return _e},_ended:function(Z){var _e=this,Se=Z._sprite;if(!_e._webAudio&&Z._node&&!Z._node.paused&&!Z._node.ended&&Z._node.currentTime<Z._stop)return setTimeout(_e._ended.bind(_e,Z),100),_e;var Ee=!!(Z._loop||_e._sprite[Se][2]);if(_e._emit("end",Z._id),!_e._webAudio&&Ee&&_e.stop(Z._id,!0).play(Z._id),_e._webAudio&&Ee){_e._emit("play",Z._id),Z._seek=Z._start||0,Z._rateSeek=0,Z._playStart=I.ctx.currentTime;var Ae=(Z._stop-Z._start)*1e3/Math.abs(Z._rate);_e._endTimers[Z._id]=setTimeout(_e._ended.bind(_e,Z),Ae)}return _e._webAudio&&!Ee&&(Z._paused=!0,Z._ended=!0,Z._seek=Z._start||0,Z._rateSeek=0,_e._clearTimer(Z._id),_e._cleanBuffer(Z._node),I._autoSuspend()),!_e._webAudio&&!Ee&&_e.stop(Z._id,!0),_e},_clearTimer:function(Z){var _e=this;if(_e._endTimers[Z]){if(typeof _e._endTimers[Z]!="function")clearTimeout(_e._endTimers[Z]);else{var Se=_e._soundById(Z);Se&&Se._node&&Se._node.removeEventListener("ended",_e._endTimers[Z],!1)}delete _e._endTimers[Z]}return _e},_soundById:function(Z){for(var _e=this,Se=0;Se<_e._sounds.length;Se++)if(Z===_e._sounds[Se]._id)return _e._sounds[Se];return null},_inactiveSound:function(){var Z=this;Z._drain();for(var _e=0;_e<Z._sounds.length;_e++)if(Z._sounds[_e]._ended)return Z._sounds[_e].reset();return new U(Z)},_drain:function(){var Z=this,_e=Z._pool,Se=0,Ee=0;if(!(Z._sounds.length<_e)){for(Ee=0;Ee<Z._sounds.length;Ee++)Z._sounds[Ee]._ended&&Se++;for(Ee=Z._sounds.length-1;Ee>=0;Ee--){if(Se<=_e)return;Z._sounds[Ee]._ended&&(Z._webAudio&&Z._sounds[Ee]._node&&Z._sounds[Ee]._node.disconnect(0),Z._sounds.splice(Ee,1),Se--)}}},_getSoundIds:function(Z){var _e=this;if(typeof Z>"u"){for(var Se=[],Ee=0;Ee<_e._sounds.length;Ee++)Se.push(_e._sounds[Ee]._id);return Se}else return[Z]},_refreshBuffer:function(Z){var _e=this;return Z._node.bufferSource=I.ctx.createBufferSource(),Z._node.bufferSource.buffer=V[_e._src],Z._panner?Z._node.bufferSource.connect(Z._panner):Z._node.bufferSource.connect(Z._node),Z._node.bufferSource.loop=Z._loop,Z._loop&&(Z._node.bufferSource.loopStart=Z._start||0,Z._node.bufferSource.loopEnd=Z._stop||0),Z._node.bufferSource.playbackRate.setValueAtTime(Z._rate,I.ctx.currentTime),_e},_cleanBuffer:function(Z){var _e=this,Se=I._navigator&&I._navigator.vendor.indexOf("Apple")>=0;if(I._scratchBuffer&&Z.bufferSource&&(Z.bufferSource.onended=null,Z.bufferSource.disconnect(0),Se))try{Z.bufferSource.buffer=I._scratchBuffer}catch{}return Z.bufferSource=null,_e},_clearSound:function(Z){var _e=/MSIE |Trident\//.test(I._navigator&&I._navigator.userAgent);_e||(Z.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var U=function(Z){this._parent=Z,this.init()};U.prototype={init:function(){var Z=this,_e=Z._parent;return Z._muted=_e._muted,Z._loop=_e._loop,Z._volume=_e._volume,Z._rate=_e._rate,Z._seek=0,Z._paused=!0,Z._ended=!0,Z._sprite="__default",Z._id=++I._counter,_e._sounds.push(Z),Z.create(),Z},create:function(){var Z=this,_e=Z._parent,Se=I._muted||Z._muted||Z._parent._muted?0:Z._volume;return _e._webAudio?(Z._node=typeof I.ctx.createGain>"u"?I.ctx.createGainNode():I.ctx.createGain(),Z._node.gain.setValueAtTime(Se,I.ctx.currentTime),Z._node.paused=!0,Z._node.connect(I.masterGain)):I.noAudio||(Z._node=I._obtainHtml5Audio(),Z._errorFn=Z._errorListener.bind(Z),Z._node.addEventListener("error",Z._errorFn,!1),Z._loadFn=Z._loadListener.bind(Z),Z._node.addEventListener(I._canPlayEvent,Z._loadFn,!1),Z._endFn=Z._endListener.bind(Z),Z._node.addEventListener("ended",Z._endFn,!1),Z._node.src=_e._src,Z._node.preload=_e._preload===!0?"auto":_e._preload,Z._node.volume=Se*I.volume(),Z._node.load()),Z},reset:function(){var Z=this,_e=Z._parent;return Z._muted=_e._muted,Z._loop=_e._loop,Z._volume=_e._volume,Z._rate=_e._rate,Z._seek=0,Z._rateSeek=0,Z._paused=!0,Z._ended=!0,Z._sprite="__default",Z._id=++I._counter,Z},_errorListener:function(){var Z=this;Z._parent._emit("loaderror",Z._id,Z._node.error?Z._node.error.code:0),Z._node.removeEventListener("error",Z._errorFn,!1)},_loadListener:function(){var Z=this,_e=Z._parent;_e._duration=Math.ceil(Z._node.duration*10)/10,Object.keys(_e._sprite).length===0&&(_e._sprite={__default:[0,_e._duration*1e3]}),_e._state!=="loaded"&&(_e._state="loaded",_e._emit("load"),_e._loadQueue()),Z._node.removeEventListener(I._canPlayEvent,Z._loadFn,!1)},_endListener:function(){var Z=this,_e=Z._parent;_e._duration===1/0&&(_e._duration=Math.ceil(Z._node.duration*10)/10,_e._sprite.__default[1]===1/0&&(_e._sprite.__default[1]=_e._duration*1e3),_e._ended(Z)),Z._node.removeEventListener("ended",Z._endFn,!1)}};var V={},X=function(Z){var _e=Z._src;if(V[_e]){Z._duration=V[_e].duration,J(Z);return}if(/^data:[^;]+;base64,/.test(_e)){for(var Se=atob(_e.split(",")[1]),Ee=new Uint8Array(Se.length),Ae=0;Ae<Se.length;++Ae)Ee[Ae]=Se.charCodeAt(Ae);K(Ee.buffer,Z)}else{var Re=new XMLHttpRequest;Re.open(Z._xhr.method,_e,!0),Re.withCredentials=Z._xhr.withCredentials,Re.responseType="arraybuffer",Z._xhr.headers&&Object.keys(Z._xhr.headers).forEach(function(Te){Re.setRequestHeader(Te,Z._xhr.headers[Te])}),Re.onload=function(){var Te=(Re.status+"")[0];if(Te!=="0"&&Te!=="2"&&Te!=="3"){Z._emit("loaderror",null,"Failed loading audio file with status: "+Re.status+".");return}K(Re.response,Z)},Re.onerror=function(){Z._webAudio&&(Z._html5=!0,Z._webAudio=!1,Z._sounds=[],delete V[_e],Z.load())},Y(Re)}},Y=function(Z){try{Z.send()}catch{Z.onerror()}},K=function(Z,_e){var Se=function(){_e._emit("loaderror",null,"Decoding audio data failed.")},Ee=function(Ae){Ae&&_e._sounds.length>0?(V[_e._src]=Ae,J(_e,Ae)):Se()};typeof Promise<"u"&&I.ctx.decodeAudioData.length===1?I.ctx.decodeAudioData(Z).then(Ee).catch(Se):I.ctx.decodeAudioData(Z,Ee,Se)},J=function(Z,_e){_e&&!Z._duration&&(Z._duration=_e.duration),Object.keys(Z._sprite).length===0&&(Z._sprite={__default:[0,Z._duration*1e3]}),Z._state!=="loaded"&&(Z._state="loaded",Z._emit("load"),Z._loadQueue())},xe=function(){if(I.usingWebAudio){try{typeof AudioContext<"u"?I.ctx=new AudioContext:typeof webkitAudioContext<"u"?I.ctx=new webkitAudioContext:I.usingWebAudio=!1}catch{I.usingWebAudio=!1}I.ctx||(I.usingWebAudio=!1);var Z=/iP(hone|od|ad)/.test(I._navigator&&I._navigator.platform),_e=I._navigator&&I._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),Se=_e?parseInt(_e[1],10):null;if(Z&&Se&&Se<9){var Ee=/safari/.test(I._navigator&&I._navigator.userAgent.toLowerCase());I._navigator&&!Ee&&(I.usingWebAudio=!1)}I.usingWebAudio&&(I.masterGain=typeof I.ctx.createGain>"u"?I.ctx.createGainNode():I.ctx.createGain(),I.masterGain.gain.setValueAtTime(I._muted?0:I._volume,I.ctx.currentTime),I.masterGain.connect(I.ctx.destination)),I._setup()}};C.Howler=I,C.Howl=B,typeof commonjsGlobal$1<"u"?(commonjsGlobal$1.HowlerGlobal=E,commonjsGlobal$1.Howler=I,commonjsGlobal$1.Howl=B,commonjsGlobal$1.Sound=U):typeof window<"u"&&(window.HowlerGlobal=E,window.Howler=I,window.Howl=B,window.Sound=U)})();/*!
1981
1981
  * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
1982
1982
  *
1983
1983
  * howler.js v2.2.3
@@ -1987,4 +1987,19 @@ void main() {
1987
1987
  * goldfirestudios.com
1988
1988
  *
1989
1989
  * MIT License
1990
- */(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(r){var i=this;if(!i.ctx||!i.ctx.listener)return i;for(var n=i._howls.length-1;n>=0;n--)i._howls[n].stereo(r);return i},HowlerGlobal.prototype.pos=function(r,i,n){var s=this;if(!s.ctx||!s.ctx.listener)return s;if(i=typeof i!="number"?s._pos[1]:i,n=typeof n!="number"?s._pos[2]:n,typeof r=="number")s._pos=[r,i,n],typeof s.ctx.listener.positionX<"u"?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]);else return s._pos;return s},HowlerGlobal.prototype.orientation=function(r,i,n,s,a,o){var u=this;if(!u.ctx||!u.ctx.listener)return u;var h=u._orientation;if(i=typeof i!="number"?h[1]:i,n=typeof n!="number"?h[2]:n,s=typeof s!="number"?h[3]:s,a=typeof a!="number"?h[4]:a,o=typeof o!="number"?h[5]:o,typeof r=="number")u._orientation=[r,i,n,s,a,o],typeof u.ctx.listener.forwardX<"u"?(u.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),u.ctx.listener.forwardY.setTargetAtTime(i,Howler.ctx.currentTime,.1),u.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),u.ctx.listener.upX.setTargetAtTime(s,Howler.ctx.currentTime,.1),u.ctx.listener.upY.setTargetAtTime(a,Howler.ctx.currentTime,.1),u.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):u.ctx.listener.setOrientation(r,i,n,s,a,o);else return h;return u},Howl.prototype.init=function(r){return function(i){var n=this;return n._orientation=i.orientation||[1,0,0],n._stereo=i.stereo||null,n._pos=i.pos||null,n._pannerAttr={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:360,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:360,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:0,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:"inverse",maxDistance:typeof i.maxDistance<"u"?i.maxDistance:1e4,panningModel:typeof i.panningModel<"u"?i.panningModel:"HRTF",refDistance:typeof i.refDistance<"u"?i.refDistance:1,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:1},n._onstereo=i.onstereo?[{fn:i.onstereo}]:[],n._onpos=i.onpos?[{fn:i.onpos}]:[],n._onorientation=i.onorientation?[{fn:i.onorientation}]:[],r.call(this,i)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,i){var n=this;if(!n._webAudio)return n;if(n._state!=="loaded")return n._queue.push({event:"stereo",action:function(){n.stereo(r,i)}}),n;var s=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof i>"u")if(typeof r=="number")n._stereo=r,n._pos=[r,0,0];else return n._stereo;for(var a=n._getSoundIds(i),o=0;o<a.length;o++){var u=n._soundById(a[o]);if(u)if(typeof r=="number")u._stereo=r,u._pos=[r,0,0],u._node&&(u._pannerAttr.panningModel="equalpower",(!u._panner||!u._panner.pan)&&e(u,s),s==="spatial"?typeof u._panner.positionX<"u"?(u._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),u._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),u._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):u._panner.setPosition(r,0,0):u._panner.pan.setValueAtTime(r,Howler.ctx.currentTime)),n._emit("stereo",u._id);else return u._stereo}return n},Howl.prototype.pos=function(r,i,n,s){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"pos",action:function(){a.pos(r,i,n,s)}}),a;if(i=typeof i!="number"?0:i,n=typeof n!="number"?-.5:n,typeof s>"u")if(typeof r=="number")a._pos=[r,i,n];else return a._pos;for(var o=a._getSoundIds(s),u=0;u<o.length;u++){var h=a._soundById(o[u]);if(h)if(typeof r=="number")h._pos=[r,i,n],h._node&&((!h._panner||h._panner.pan)&&e(h,"spatial"),typeof h._panner.positionX<"u"?(h._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),h._panner.positionY.setValueAtTime(i,Howler.ctx.currentTime),h._panner.positionZ.setValueAtTime(n,Howler.ctx.currentTime)):h._panner.setPosition(r,i,n)),a._emit("pos",h._id);else return h._pos}return a},Howl.prototype.orientation=function(r,i,n,s){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"orientation",action:function(){a.orientation(r,i,n,s)}}),a;if(i=typeof i!="number"?a._orientation[1]:i,n=typeof n!="number"?a._orientation[2]:n,typeof s>"u")if(typeof r=="number")a._orientation=[r,i,n];else return a._orientation;for(var o=a._getSoundIds(s),u=0;u<o.length;u++){var h=a._soundById(o[u]);if(h)if(typeof r=="number")h._orientation=[r,i,n],h._node&&(h._panner||(h._pos||(h._pos=a._pos||[0,0,-.5]),e(h,"spatial")),typeof h._panner.orientationX<"u"?(h._panner.orientationX.setValueAtTime(r,Howler.ctx.currentTime),h._panner.orientationY.setValueAtTime(i,Howler.ctx.currentTime),h._panner.orientationZ.setValueAtTime(n,Howler.ctx.currentTime)):h._panner.setOrientation(r,i,n)),a._emit("orientation",h._id);else return h._orientation}return a},Howl.prototype.pannerAttr=function(){var r=this,i=arguments,n,s,a;if(!r._webAudio)return r;if(i.length===0)return r._pannerAttr;if(i.length===1)if(typeof i[0]=="object")n=i[0],typeof s>"u"&&(n.pannerAttr||(n.pannerAttr={coneInnerAngle:n.coneInnerAngle,coneOuterAngle:n.coneOuterAngle,coneOuterGain:n.coneOuterGain,distanceModel:n.distanceModel,maxDistance:n.maxDistance,refDistance:n.refDistance,rolloffFactor:n.rolloffFactor,panningModel:n.panningModel}),r._pannerAttr={coneInnerAngle:typeof n.pannerAttr.coneInnerAngle<"u"?n.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof n.pannerAttr.coneOuterAngle<"u"?n.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof n.pannerAttr.coneOuterGain<"u"?n.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof n.pannerAttr.distanceModel<"u"?n.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof n.pannerAttr.maxDistance<"u"?n.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof n.pannerAttr.refDistance<"u"?n.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof n.pannerAttr.rolloffFactor<"u"?n.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof n.pannerAttr.panningModel<"u"?n.pannerAttr.panningModel:r._panningModel});else return a=r._soundById(parseInt(i[0],10)),a?a._pannerAttr:r._pannerAttr;else i.length===2&&(n=i[0],s=parseInt(i[1],10));for(var o=r._getSoundIds(s),u=0;u<o.length;u++)if(a=r._soundById(o[u]),a){var h=a._pannerAttr;h={coneInnerAngle:typeof n.coneInnerAngle<"u"?n.coneInnerAngle:h.coneInnerAngle,coneOuterAngle:typeof n.coneOuterAngle<"u"?n.coneOuterAngle:h.coneOuterAngle,coneOuterGain:typeof n.coneOuterGain<"u"?n.coneOuterGain:h.coneOuterGain,distanceModel:typeof n.distanceModel<"u"?n.distanceModel:h.distanceModel,maxDistance:typeof n.maxDistance<"u"?n.maxDistance:h.maxDistance,refDistance:typeof n.refDistance<"u"?n.refDistance:h.refDistance,rolloffFactor:typeof n.rolloffFactor<"u"?n.rolloffFactor:h.rolloffFactor,panningModel:typeof n.panningModel<"u"?n.panningModel:h.panningModel};var d=a._panner;d?(d.coneInnerAngle=h.coneInnerAngle,d.coneOuterAngle=h.coneOuterAngle,d.coneOuterGain=h.coneOuterGain,d.distanceModel=h.distanceModel,d.maxDistance=h.maxDistance,d.refDistance=h.refDistance,d.rolloffFactor=h.rolloffFactor,d.panningModel=h.panningModel):(a._pos||(a._pos=r._pos||[0,0,-.5]),e(a,"spatial"))}return r},Sound.prototype.init=function(r){return function(){var i=this,n=i._parent;i._orientation=n._orientation,i._stereo=n._stereo,i._pos=n._pos,i._pannerAttr=n._pannerAttr,r.call(this),i._stereo?n.stereo(i._stereo):i._pos&&n.pos(i._pos[0],i._pos[1],i._pos[2],i._id)}}(Sound.prototype.init),Sound.prototype.reset=function(r){return function(){var i=this,n=i._parent;return i._orientation=n._orientation,i._stereo=n._stereo,i._pos=n._pos,i._pannerAttr=n._pannerAttr,i._stereo?n.stereo(i._stereo):i._pos?n.pos(i._pos[0],i._pos[1],i._pos[2],i._id):i._panner&&(i._panner.disconnect(0),i._panner=void 0,n._refreshBuffer(i)),r.call(this)}}(Sound.prototype.reset);var e=function(r,i){i=i||"spatial",i==="spatial"?(r._panner=Howler.ctx.createPanner(),r._panner.coneInnerAngle=r._pannerAttr.coneInnerAngle,r._panner.coneOuterAngle=r._pannerAttr.coneOuterAngle,r._panner.coneOuterGain=r._pannerAttr.coneOuterGain,r._panner.distanceModel=r._pannerAttr.distanceModel,r._panner.maxDistance=r._pannerAttr.maxDistance,r._panner.refDistance=r._pannerAttr.refDistance,r._panner.rolloffFactor=r._pannerAttr.rolloffFactor,r._panner.panningModel=r._pannerAttr.panningModel,typeof r._panner.positionX<"u"?(r._panner.positionX.setValueAtTime(r._pos[0],Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(r._pos[1],Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(r._pos[2],Howler.ctx.currentTime)):r._panner.setPosition(r._pos[0],r._pos[1],r._pos[2]),typeof r._panner.orientationX<"u"?(r._panner.orientationX.setValueAtTime(r._orientation[0],Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(r._orientation[1],Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(r._orientation[2],Howler.ctx.currentTime)):r._panner.setOrientation(r._orientation[0],r._orientation[1],r._orientation[2])):(r._panner=Howler.ctx.createStereoPanner(),r._panner.pan.setValueAtTime(r._stereo,Howler.ctx.currentTime)),r._panner.connect(r._node),r._paused||r._parent.pause(r._id,!0).play(r._id,!0)}})()})(uh);const Hw=t=>{const e={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=L.useState(!1),i=P.useRef(null),n=P.useRef(e),s=P.useRef(null),a=L.useRef(null),{tl:o,dragModeRef:u}=P.useContext(At),{uniqueId:h,src:d,startAt:l,endAt:c,mute:f,speed:p,audioStartAt:m,audioEndAt:v,visible:g}=t;Oe(we.PAUSE,()=>{var w;i.current&&a.current&&((w=a.current)==null||w.pause(),n.current.isPlaying=!1)}),Oe(we.COMPLETE,()=>{m>0&&a.current&&a.current.seek(m)}),Oe(we.SCRUBBER_CLICKED,()=>{var w;i.current&&a.current&&((w=a.current)==null||w.pause(),n.current.isPlaying=!1)}),L.useEffect(()=>{a.current&&(u.current?(a.current.pause(),n.current.isPlaying=!1,n.current.isDragging=!0):n.current.isDragging=!1)},[u]);const y=(w,b)=>{o.current&&o.current.isActive()&&s.current&&s.current.isActive()&&!u.current&&a.current&&(console.log("gsap on start 0020",h,w,b),a.current.play(),n.current.isPlaying=!0)},_=()=>{var w;i.current&&((w=a.current)==null||w.stop(),n.current.isPlaying=!1,n.current.completed=!0)},x=w=>{var S,A;const b=w+((S=s.current)==null?void 0:S.time());a.current&&u.current?(a.current.seek(b),a.current.pause(),n.current.isPlaying=!1):i.current&&!n.current.isPlaying&&((A=o.current)!=null&&A.isActive())&&a.current&&(a.current.seek(b),a.current.play(),n.current.isPlaying=!0)},T=()=>{};return P.useEffect(()=>{let w=k.context(()=>{});if(i.current&&o.current){const b={duration:Number(v)-Number(m),onStart:y,onComplete:_,onStartParams:[m,v],onCompleteParams:[],onInterrupt:T,onUpdate:x,onUpdateParams:[m,v]};w=k.context(()=>{s.current=k.from(i.current,b,m),o.current.to(i.current,{alpha:1,duration:.01},l).to(i.current,{alpha:0,duration:.1},Number(c)),o.current.add(s.current,l)})}return()=>{s.current&&(s.current.kill(),k.killTweensOf(s.current)),w.revert()}},[l,c,m,v]),L.useEffect(()=>{i.current&&r(!0)},[]),L.useEffect(()=>(hr(d)||(a.current=new uh.Howl({src:[d],autoplay:!1,loop:!1,rate:p||1,volume:!f&&g?1:0,onload:()=>{console.log("loaded audio sprite"+h),n.current.loaded=!0,a.current&&(m>0&&a.current.seek(m),a.current.volume(!f&&g?1:0),a.current.rate(p||1),a.current.pause(),n.current.isPlaying=!1,n.current.completed=!1)},onend:()=>{console.log("end of playing audio sprite"+h),n.current.isPlaying=!1,n.current.completed=!0},onplay:()=>{console.log("play of playing audio sprite"+h),n.current.isPlaying=!0},onpause:()=>{console.log("pause of playing audio sprite"+h),n.current.isPlaying=!1},onstop:()=>{console.log("stop of playing audio sprite"+h),n.current.isPlaying=!1}})),()=>{a.current&&a.current.unload()}),[h,d,l,c,m,v,f,g,p]),L.useEffect(()=>{a.current&&(console.log("running updateEffect 2002",h,v),a.current.volume(!f&&g?1:0),a.current.rate(p||1),n.current.isPlaying=!0)},[f,g,p]),Z.jsx(ee.Container,{ref:i})};function Vw(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var ch=Vw,Xw=uo,Ww=rs,qw=1,Yw=2;function Kw(t,e,r,i){var n=r.length,s=n,a=!i;if(t==null)return!s;for(t=Object(t);n--;){var o=r[n];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<s;){o=r[n];var u=o[0],h=t[u],d=o[1];if(a&&o[2]){if(h===void 0&&!(u in t))return!1}else{var l=new Xw;if(i)var c=i(h,d,u,t,e,l);if(!(c===void 0?Ww(d,h,qw|Yw,i,l):c))return!1}}return!0}var Zw=Kw,Qw=Gr;function Jw(t){return t===t&&!Qw(t)}var hh=Jw,eS=hh,tS=Yn;function rS(t){for(var e=tS(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,eS(n)]}return e}var iS=rS;function nS(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var fh=nS,sS=Zw,aS=iS,oS=fh;function lS(t){var e=aS(t);return e.length==1&&e[0][2]?oS(e[0][0],e[0][1]):function(r){return r===t||sS(r,t,e)}}var uS=lS,cS=$r,hS=zr,fS="[object Symbol]";function dS(t){return typeof t=="symbol"||hS(t)&&cS(t)==fS}var kn=dS,pS=ft,mS=kn,gS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vS=/^\w*$/;function _S(t,e){if(pS(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||mS(t)?!0:vS.test(t)||!gS.test(t)||e!=null&&t in Object(e)}var Ga=_S,dh=jn,yS="Expected a function";function za(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(yS);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=t.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(za.Cache||dh),r}za.Cache=dh;var xS=za,bS=xS,TS=500;function wS(t){var e=bS(t,function(i){return r.size===TS&&r.clear(),i}),r=e.cache;return e}var SS=wS,AS=SS,ES=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,CS=/\\(\\)?/g,IS=AS(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ES,function(r,i,n,s){e.push(n?s.replace(CS,"$1"):i||r)}),e}),RS=IS,ph=Ti,PS=ch,MS=ft,FS=kn,OS=1/0,mh=ph?ph.prototype:void 0,gh=mh?mh.toString:void 0;function vh(t){if(typeof t=="string")return t;if(MS(t))return PS(t,vh)+"";if(FS(t))return gh?gh.call(t):"";var e=t+"";return e=="0"&&1/t==-OS?"-0":e}var NS=vh,kS=NS;function LS(t){return t==null?"":kS(t)}var DS=LS,BS=ft,US=Ga,$S=RS,GS=DS;function zS(t,e){return BS(t)?t:US(t,e)?[t]:$S(GS(t))}var _h=zS,jS=kn,HS=1/0;function VS(t){if(typeof t=="string"||jS(t))return t;var e=t+"";return e=="0"&&1/t==-HS?"-0":e}var Ln=VS,XS=_h,WS=Ln;function qS(t,e){e=XS(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[WS(e[r++])];return r&&r==i?t:void 0}var yh=qS,YS=yh;function KS(t,e,r){var i=t==null?void 0:YS(t,e);return i===void 0?r:i}var ZS=KS;function QS(t,e){return t!=null&&e in Object(t)}var JS=QS,eA=_h,tA=Vn,rA=ft,iA=_o,nA=Wn,sA=Ln;function aA(t,e,r){e=eA(e,t);for(var i=-1,n=e.length,s=!1;++i<n;){var a=sA(e[i]);if(!(s=t!=null&&r(t,a)))break;t=t[a]}return s||++i!=n?s:(n=t==null?0:t.length,!!n&&nA(n)&&iA(a,n)&&(rA(t)||tA(t)))}var oA=aA,lA=JS,uA=oA;function cA(t,e){return t!=null&&uA(t,e,lA)}var hA=cA,fA=rs,dA=ZS,pA=hA,mA=Ga,gA=hh,vA=fh,_A=Ln,yA=1,xA=2;function bA(t,e){return mA(t)&&gA(e)?vA(_A(t),e):function(r){var i=dA(r,t);return i===void 0&&i===e?pA(r,t):fA(e,i,yA|xA)}}var TA=bA;function wA(t){return t}var SA=wA;function AA(t){return function(e){return e==null?void 0:e[t]}}var EA=AA,CA=yh;function IA(t){return function(e){return CA(e,t)}}var RA=IA,PA=EA,MA=RA,FA=Ga,OA=Ln;function NA(t){return FA(t)?PA(OA(t)):MA(t)}var kA=NA,LA=uS,DA=TA,BA=SA,UA=ft,$A=kA;function GA(t){return typeof t=="function"?t:t==null?BA:typeof t=="object"?UA(t)?DA(t[0],t[1]):LA(t):$A(t)}var zA=GA;function jA(t){return function(e,r,i){for(var n=-1,s=Object(e),a=i(e),o=a.length;o--;){var u=a[t?o:++n];if(r(s[u],u,s)===!1)break}return e}}var HA=jA,VA=HA,XA=VA(),WA=XA,qA=WA,YA=Yn;function KA(t,e){return t&&qA(t,e,YA)}var ZA=KA,QA=Ii;function JA(t,e){return function(r,i){if(r==null)return r;if(!QA(r))return t(r,i);for(var n=r.length,s=e?n:-1,a=Object(r);(e?s--:++s<n)&&i(a[s],s,a)!==!1;);return r}}var eE=JA,tE=ZA,rE=eE,iE=rE(tE),nE=iE,sE=nE,aE=Ii;function oE(t,e){var r=-1,i=aE(t)?Array(t.length):[];return sE(t,function(n,s,a){i[++r]=e(n,s,a)}),i}var lE=oE,uE=ch,cE=zA,hE=lE,fE=ft;function dE(t,e){var r=fE(t)?uE:hE;return r(t,cE(e))}var pE=dE;const mE=Lt(pE);var ir={},xh={},St={};Object.defineProperty(St,"__esModule",{value:!0}),St.loop=St.conditional=St.parse=void 0;var gE=function t(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i;if(Array.isArray(r))r.forEach(function(a){return t(e,a,i,n)});else if(typeof r=="function")r(e,i,n,t);else{var s=Object.keys(r)[0];Array.isArray(r[s])?(n[s]={},t(e,r[s],i,n[s])):n[s]=r[s](e,i,n,t)}return i};St.parse=gE;var vE=function(e,r){return function(i,n,s,a){r(i,n,s)&&a(i,e,n,s)}};St.conditional=vE;var _E=function(e,r){return function(i,n,s,a){for(var o=[],u=i.pos;r(i,n,s);){var h={};if(a(i,e,n,h),i.pos===u)break;u=i.pos,o.push(h)}return o}};St.loop=_E;var Se={};Object.defineProperty(Se,"__esModule",{value:!0}),Se.readBits=Se.readArray=Se.readUnsigned=Se.readString=Se.peekBytes=Se.readBytes=Se.peekByte=Se.readByte=Se.buildStream=void 0;var yE=function(e){return{data:e,pos:0}};Se.buildStream=yE;var bh=function(){return function(e){return e.data[e.pos++]}};Se.readByte=bh;var xE=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+e]}};Se.peekByte=xE;var Dn=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};Se.readBytes=Dn;var bE=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};Se.peekBytes=bE;var TE=function(e){return function(r){return Array.from(Dn(e)(r)).map(function(i){return String.fromCharCode(i)}).join("")}};Se.readString=TE;var wE=function(e){return function(r){var i=Dn(2)(r);return e?(i[1]<<8)+i[0]:(i[0]<<8)+i[1]}};Se.readUnsigned=wE;var SE=function(e,r){return function(i,n,s){for(var a=typeof r=="function"?r(i,n,s):r,o=Dn(e),u=new Array(a),h=0;h<a;h++)u[h]=o(i);return u}};Se.readArray=SE;var AE=function(e,r,i){for(var n=0,s=0;s<i;s++)n+=e[r+s]&&Math.pow(2,i-s-1);return n},EE=function(e){return function(r){for(var i=bh()(r),n=new Array(8),s=0;s<8;s++)n[7-s]=!!(i&1<<s);return Object.keys(e).reduce(function(a,o){var u=e[o];return u.length?a[o]=AE(n,u.index,u.length):a[o]=n[u.index],a},{})}};Se.readBits=EE,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=St,r=Se,i={blocks:function(c){for(var f=0,p=[],m=c.data.length,v=0,g=(0,r.readByte)()(c);g!==f&&g;g=(0,r.readByte)()(c)){if(c.pos+g>=m){var y=m-c.pos;p.push((0,r.readBytes)(y)(c)),v+=y;break}p.push((0,r.readBytes)(g)(c)),v+=g}for(var _=new Uint8Array(v),x=0,T=0;T<p.length;T++)_.set(p[T],x),x+=p[T].length;return _}},n=(0,e.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===249}),s=(0,e.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,r.readArray)(3,function(l,c,f){return Math.pow(2,f.descriptor.lct.size+1)})},function(l,c,f){return f.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},i]}]},function(l){return(0,r.peekByte)()(l)===44}),a=(0,e.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,f,p){return(0,r.readBytes)(p.text.blockSize)(c)}},i]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===1}),o=(0,e.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,f,p){return(0,r.readString)(p.blockSize)(c)}},i]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===255}),u=(0,e.conditional)({comment:[{codes:(0,r.readBytes)(2)},i]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===254}),h=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,e.conditional)({gct:(0,r.readArray)(3,function(l,c){return Math.pow(2,c.lsd.gct.size+1)})},function(l,c){return c.lsd.gct.exists}),{frames:(0,e.loop)([n,o,u,s,a],function(l){var c=(0,r.peekByte)()(l);return c===33||c===44})}],d=h;t.default=d}(xh);var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.deinterlace=void 0;var CE=function(e,r){for(var i=new Array(e.length),n=e.length/r,s=function(c,f){var p=e.slice(f*r,(f+1)*r);i.splice.apply(i,[c*r,r].concat(p))},a=[0,4,2,1],o=[8,8,4,2],u=0,h=0;h<4;h++)for(var d=a[h];d<n;d+=o[h])s(d,u),u++;return i};Bn.deinterlace=CE;var Un={};Object.defineProperty(Un,"__esModule",{value:!0}),Un.lzw=void 0;var IE=function(e,r,i){var n=4096,s=-1,a=i,o,u,h,d,l,c,f,w,p,m,T,v,b,S,I,A,g=new Array(i),y=new Array(n),_=new Array(n),x=new Array(n+1);for(v=e,u=1<<v,l=u+1,o=u+2,f=s,d=v+1,h=(1<<d)-1,p=0;p<u;p++)y[p]=0,_[p]=p;var T,w,b,S,A,I;for(T=w=b=S=A=I=0,m=0;m<a;){if(S===0){if(w<d){T+=r[I]<<w,w+=8,I++;continue}if(p=T&h,T>>=d,w-=d,p>o||p==l)break;if(p==u){d=v+1,h=(1<<d)-1,o=u+2,f=s;continue}if(f==s){x[S++]=_[p],f=p,b=p;continue}for(c=p,p==o&&(x[S++]=b,p=f);p>u;)x[S++]=_[p],p=y[p];b=_[p]&255,x[S++]=b,o<n&&(y[o]=f,_[o]=b,o++,!(o&h)&&o<n&&(d++,h+=o)),f=c}S--,g[A++]=x[S],m++}for(m=A;m<a;m++)g[m]=0;return g};Un.lzw=IE,Object.defineProperty(ir,"__esModule",{value:!0}),ir.decompressFrames=ir.decompressFrame=ir.parseGIF=void 0;var RE=NE(xh),PE=St,ME=Se,FE=Bn,OE=Un;function NE(t){return t&&t.__esModule?t:{default:t}}var kE=function(e){var r=new Uint8Array(e);return(0,PE.parse)((0,ME.buildStream)(r),RE.default)};ir.parseGIF=kE;var LE=function(e){for(var r=e.pixels.length,i=new Uint8ClampedArray(r*4),n=0;n<r;n++){var s=n*4,a=e.pixels[n],o=e.colorTable[a]||[0,0,0];i[s]=o[0],i[s+1]=o[1],i[s+2]=o[2],i[s+3]=a!==e.transparentIndex?255:0}return i},Th=function(e,r,i){if(!e.image){console.warn("gif frame does not have associated image.");return}var n=e.image,s=n.descriptor.width*n.descriptor.height,a=(0,OE.lzw)(n.data.minCodeSize,n.data.blocks,s);n.descriptor.lct.interlaced&&(a=(0,FE.deinterlace)(a,n.descriptor.width));var o={pixels:a,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?o.colorTable=n.lct:o.colorTable=r,e.gce&&(o.delay=(e.gce.delay||10)*10,o.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(o.transparentIndex=e.gce.transparentColorIndex)),i&&(o.patch=LE(o)),o};ir.decompressFrame=Th;var DE=function(e,r){return e.frames.filter(function(i){return i.image}).map(function(i){return Th(i,e.gct,r)})};ir.decompressFrames=DE;const wh=(t,e={})=>{typeof e=="function"&&(e=e(t));const r=e.loaded&&t.loaded!==e.loaded,{playing:i,...n}=e,s={...t,...n};return r&&Object.assign(s,{playing:s.autoPlay&&s.loaded}),(e.delays!=null||e.frames!=null)&&Object.assign(s,{length:s.frames.length}),(e.index!=null||e.frames!=null)&&Object.assign(s,{index:s.length===0?0:(s.length+s.index)%s.length}),e.playing!=null&&Object.assign(s,s.loaded?{playing:i}:{autoPlay:i}),s},BE=t=>wh({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},t),UE=t=>P.useReducer(wh,t,BE);var $E='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function GE(t){const e=new Blob([$E],{type:"application/javascript"}),r=URL.createObjectURL(e),i=new Worker(r,t);return URL.revokeObjectURL(r),i}const zE=t=>({...t,frames:t.frames.map(e=>{const r=new ImageData(t.width,t.height);return r.data.set(new Uint8ClampedArray(e)),r})}),jE=(t,e)=>{const r={};return()=>(r.instance||(r.instance=t()),P.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(e&&e(r.instance),delete r.instance,delete r.timeout)})}),[r,e]),r.instance)},HE=t=>{const e=P.useRef(t);return P.useEffect(()=>{e.current=t},[t]),e},VE=t=>{const e=HE(t);return P.useCallback(r=>e.current&&e.current(r),[])},XE=jE(()=>new GE,t=>t.terminate()),WE=(t,e)=>{const r=VE(e),i=XE();P.useEffect(()=>{if(typeof t=="string"){const n=s=>{const a=s.data||s;if(a.src===t){const o=a.error?a:zE(a);r(o)}};return i.addEventListener("message",n),i.postMessage({src:t,type:"parse"}),()=>{i.postMessage({src:t,type:"cancel"}),i.removeEventListener("message",n)}}},[i,t])},qE=({isPlaying:t,forwardRef:e,...r})=>{const i=L.useRef(null);return L.useImperativeHandle(e,()=>i.current,[i]),L.useEffect(()=>{if(i.current===null)return;const n=i.current;n[t?"gotoAndPlay":"gotoAndStop"](n.currentFrame)},[t]),Z.jsx(ee.AnimatedSprite,{ref:i,...r,isPlaying:t})},Sh=L.memo(qE),YE={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0,currentFrame:0},KE=L.forwardRef((t,e)=>{const[r,i]=L.useState(0),[n,s]=L.useState([]),[,a]=P.useState(!1),o=P.useRef(null),u=P.useRef(null),h=P.useRef(YE),d=P.useRef(),[l,c]=UE({autoPlay:!1}),{tl:f}=P.useContext(At),{src:p,uniqueId:m,startAt:v,endAt:g,frameStartAt:y,frameEndAt:_,loop:x,visible:T,disabled:w,transformation:{width:b=0,height:S=0,x:A,y:I,colorCorrection:F={}},pointerdown:B}=t,{frames:E,delays:C}=l;WE(p,c);const{temperatureFilter:$,sharpnessFilter:G,hueFilter:R,blurFilter:U,adjustmentFilter:X,vignetteFilter:M,noiseFilter:O}=er(F),{blurRadius:H=0,vignette:V=0,noise:W=0}=F,ne=.1;L.useEffect(()=>{if(!hr(E)){const z=mE(E,Y=>{const{data:pe,width:De,height:K}=Y,_e=new Uint8Array(pe);return $e.Texture.fromBuffer(_e,De,K)}).map((Y,pe)=>({texture:Y,time:C[pe]}));s(z);let q=0;C.forEach(Y=>{q+=Y}),i(q/1e3),h.current.totalDuration=q,h.current.totalFrames=E.length}},[m,E,C]);const oe=()=>{o.current&&(o.current.stop(),h.current.isPlaying=!1)},ce=()=>{if(o.current&&d.current){const fe=d.current.time();let z=fe===0?0:fe/ne;z=isNaN(z)?0:z;const q=h.current.totalFrames;z=z>q?q:z,z=Math.round(z),z>=q?(o.current.gotoAndStop(0),h.current.isPlaying=!1):(o.current.currentFrame=z,h.current.isPlaying=!0)}},ge=()=>{a(!0)};return P.useEffect(()=>{let fe=k.context(()=>{});if(u.current&&f.current&&r>0){const z={duration:Number(r),onInterrupt:oe,onUpdate:ce,onUpdateParams:[y,_]},q=Number(g)-Number(v),Y=Math.max(0,Math.floor(q/r)-1);d.current&&d.current.kill(),fe=k.context(()=>{d.current=k.timeline({repeat:x?Y:0,repeatDelay:0}).from(u.current,z,y),f.current.add(d.current,v)})}return()=>{d.current&&(d.current.kill(),k.killTweensOf(d.current)),fe.revert()}},[p,m,v,g,y,_,r,x]),Z.jsx(Ut,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:Z.jsx(ee.Container,{ref:u,children:!hr(n)&&Z.jsx(Sh,{x:A,y:I,width:b,height:S,animationSpeed:1,alpha:T?1:0,loop:x,textures:n,onComplete:ge,anchor:.5,forwardRef:o,...!w&&T&&{interactive:!0,pointerdown:B},filters:[$,G,R,X,...H>0?[U]:[],...V>0?[M]:[],...W>0?[O]:[]]})})})}),ZE=L.forwardRef((t,e)=>{const i=P.useRef(null),n=P.useRef(0),s=P.useRef(null),a=P.useRef(null),o=P.useRef(16),u=P.useRef(null),{visible:h,text:d,disabled:l,transformation:c,pointerdown:f,onDobuleClick:p}=t,{x:m,y:v,fontFamily:g="Arial",fontWeight:y="normal",fontStyle:_="normal",fontSize:x=16,fontVariant:T="normal",fill:w="black",stroke:b,strokeThickness:S=0,blurRadius:A=0,blurEnabled:I=!1,dropShadowColor:F=null,dropShadow:B=!1,dropShadowBlur:E=0,wordWrapWidth:C=5e7,leading:$=0,letterSpacing:G,colorCorrection:R={}}=c,{temperatureFilter:U,sharpnessFilter:X,hueFilter:M,blurFilter:O,adjustmentFilter:H}=er(R),{blurRadius:V=0}=R;L.useEffect(()=>{o.current=Number(x)},[x]);const W=["italic","oblique"].includes(_)?_:void 0,ne=["small-caps"].includes(T),oe=["bold","bolder","lighter","100","200","300"].includes(y)?y:void 0,ce=Number(G)>0?G:void 0,ge=L.useMemo(()=>new $e.TextStyle({fontFamily:g,fontSize:x,fill:w||"white",...b&&S>0&&{stroke:b,strokeThickness:S},...W&&{fontStyle:W},...ne&&{fontVariant:ne},...oe&&{fontWeight:oe},...ce&&{letterSpacing:ce},...I&&{dropShadow:!0,dropShadowBlur:Number(A),dropShadowColor:(F==null?void 0:F.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...B&&{dropShadow:!0,dropShadowBlur:Number(E),dropShadowColor:(F==null?void 0:F.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:C||500,leading:$||0}),[I,A,w,g,x,_,$,W,oe,ne,ce,F,b,S,C,B,E]);L.useEffect(()=>{u.current={...c}},[c]);const fe=()=>{const q=new Date().getTime();q-n.current<300&&p?p():f&&f(),n.current=q},z=()=>{!l&&p&&p()};return Z.jsx(Ut,{...t,ref:e,isText:!0,onDoubleClick:z,children:Z.jsx(ee.Container,{ref:i,children:Z.jsx(ee.Container,{alpha:1,ref:a,children:Z.jsx(ee.Text,{style:ge,x:m,y:v,anchor:.5,text:d,alpha:h?1:0,...h&&!l&&{interactive:!0,buttonMode:!0,pointerdown:fe},ref:s,filters:[U,X,M,H,...V>0?[O]:[]]})})})})});var QE=ht,JE=function(){return QE.Date.now()},eC=JE,tC=/\s/;function rC(t){for(var e=t.length;e--&&tC.test(t.charAt(e)););return e}var iC=rC,nC=iC,sC=/^\s+/;function aC(t){return t&&t.slice(0,nC(t)+1).replace(sC,"")}var oC=aC,lC=oC,Ah=Gr,uC=kn,Eh=0/0,cC=/^[-+]0x[0-9a-f]+$/i,hC=/^0b[01]+$/i,fC=/^0o[0-7]+$/i,dC=parseInt;function pC(t){if(typeof t=="number")return t;if(uC(t))return Eh;if(Ah(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ah(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=lC(t);var r=hC.test(t);return r||fC.test(t)?dC(t.slice(2),r?2:8):cC.test(t)?Eh:+t}var mC=pC,gC=Gr,ja=eC,Ch=mC,vC="Expected a function",_C=Math.max,yC=Math.min;function xC(t,e,r){var i,n,s,a,o,u,h=0,d=!1,l=!1,c=!0;if(typeof t!="function")throw new TypeError(vC);e=Ch(e)||0,gC(r)&&(d=!!r.leading,l="maxWait"in r,s=l?_C(Ch(r.maxWait)||0,e):s,c="trailing"in r?!!r.trailing:c);function f(w){var b=i,S=n;return i=n=void 0,h=w,a=t.apply(S,b),a}function p(w){return h=w,o=setTimeout(g,e),d?f(w):a}function m(w){var b=w-u,S=w-h,A=e-b;return l?yC(A,s-S):A}function v(w){var b=w-u,S=w-h;return u===void 0||b>=e||b<0||l&&S>=s}function g(){var w=ja();if(v(w))return y(w);o=setTimeout(g,m(w))}function y(w){return o=void 0,c&&i?f(w):(i=n=void 0,a)}function _(){o!==void 0&&clearTimeout(o),h=0,i=u=n=o=void 0}function x(){return o===void 0?a:y(ja())}function T(){var w=ja(),b=v(w);if(i=arguments,n=this,u=w,b){if(o===void 0)return p(u);if(l)return clearTimeout(o),o=setTimeout(g,e),f(u)}return o===void 0&&(o=setTimeout(g,e)),a}return T.cancel=_,T.flush=x,T}var bC=xC;const Ha=Lt(bC),Va=(t,e,r,i)=>{const n=P.useCallback(Ha(t,i),[t,i]),s=P.useCallback(Ha(e,i),[e,i]),a=P.useCallback(Ha(r,i),[r,i]),o=P.useCallback(()=>{n()},[n]),u=P.useCallback(()=>{s()},[s]),h=P.useCallback(()=>{a()},[a]);return{onPointerOver:o,onPointerDown:u,onPointerOut:h}},TC={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Ih=L.forwardRef((t,e)=>{const[r,i]=L.useState(!1),n=L.useRef(),s=P.useRef(null),a=P.useRef(null),o=P.useRef(null),u=P.useRef(TC),h=P.useRef(),{uniqueId:d,mute:l=!1,src:c,startAt:f,endAt:p,frameStartAt:m,frameEndAt:v,visible:g,disabled:y,transformation:{x:_,y:x,width:T,height:w,animation:b,colorCorrection:S={}},pointerdown:A=()=>{},pointerout:I=()=>{},pointerover:F=()=>{},fps:B=0}=t,{tl:E,dragModeRef:C,isRemotion:$}=P.useContext(At),{onPointerDown:G,onPointerOut:R,onPointerOver:U}=Va(F,A,I,1),{blurRadius:X=0,vignette:M=0,noise:O=0}=S,{temperatureFilter:H,sharpnessFilter:V,hueFilter:W,blurFilter:ne,adjustmentFilter:oe,vignetteFilter:ce,noiseFilter:ge}=er(S),fe=c||"",z=L.useMemo(()=>{const K=document.createElement("video");return K.src=c,K.crossOrigin="Anonymus",K.autoplay=!1,K.currentTime=m===0?.001:m,K},[c,m]);Oe(we.PAUSE,()=>{o.current&&(o.current.pause(),u.current.isPlaying=!1)}),Oe(we.SCRUBBER_CLICKED,()=>{o.current&&(o.current.pause(),u.current.isPlaying=!1)}),Oe(we.REVERSE_MODE_END,()=>{o.current&&(o.current.pause(),u.current.isPlaying=!1)});const q=K=>{if(o.current){if(o.current.currentTime=Number(K),!C.current){const _e=o.current,Qe=_e.currentTime>0&&!_e.paused&&!_e.ended&&_e.readyState>_e.HAVE_CURRENT_DATA;E.current&&E.current.isActive()&&h.current&&h.current.isActive()&&(Qe||o.current.play(),u.current.isPlaying=!0)}u.current.progress=0}},Y=()=>{if(o.current){const K=o.current;K.currentTime>0&&!K.paused&&!K.ended&&K.readyState>K.HAVE_CURRENT_DATA&&o.current.pause(),u.current.isPlaying=!1,h.current&&(u.current.progress=h.current.progress())}},pe=()=>{},De=()=>{var K,_e;if(h.current&&(u.current.progress=h.current.progress()),o.current&&h.current){const Qe=m+((K=h==null?void 0:h.current)==null?void 0:K.time()),ct=Math.abs(o.current.currentTime-Qe),Fe=o.current,Br=Fe.currentTime>0&&!Fe.paused&&!Fe.ended&&Fe.readyState>Fe.HAVE_CURRENT_DATA;C.current&&n.current?(o.current.currentTime=Qe,n.current.update(),u.current.isPlaying=!1):(Br!==u.current.isPlaying||!Br)&&u.current.progress>.01&&u.current.progress<.99?(_e=E.current)!=null&&_e.isActive()&&h.current&&h.current.isActive()&&(Br||o.current.play(),u.current.isPlaying=!0):ct>.3&&u.current.progress>.01&&u.current.progress<.99&&(o.current.currentTime=Qe)}};return P.useEffect(()=>{let K=k.context(()=>{});if(a.current&&E.current){const _e={duration:Number(p)-Number(f),onStart:q,onComplete:Y,onStartParams:[m,v],onCompleteParams:[],onInterrupt:pe,onUpdate:De,onUpdateParams:[m,v],onPause:()=>{console.log("onPause video sprite pause",d)},onResume:()=>{console.log("onResume video sprite resume",d)},onReverseComplete:()=>{console.log("onReverseComplete video sprite reverse complete",d)},onKill:()=>{console.log("onKill video sprite kill",d)}};h.current&&(h.current.kill(),E.current.remove(h.current)),K=k.context(()=>{h.current=k.to(a.current,_e,m),E.current.add(h.current,f)})}return()=>{h.current&&(h.current.kill(),k.killTweensOf(h.current)),K.revert()}},[b,f,p,m,v,d]),L.useEffect(()=>{o.current&&(o.current.muted=l,u.current.isMuted=l);const K=setTimeout(()=>{o.current&&(o.current.muted=l,u.current.isMuted=l)},1500);return()=>{clearTimeout(K)}},[l]),L.useEffect(()=>{const K=Math.round((Number(m)+Number.EPSILON)*100)/100,_e=function(){o.current&&(o.current.currentTime=K,o.current.muted=l)},Qe=function(){u.current.isWaiting=!1,u.current.isStalled=!1},ct=function(){u.current.isWaiting=!0,u.current.isStalled=!1},Fe=function(){u.current.isWaiting=!1,u.current.isStalled=!1},Br=function(){u.current.isWaiting=!1,u.current.isStalled=!0},CC=Math.round((Number(m)+Number.EPSILON)*100)/100,IC=Math.round((Number(v)+Number.EPSILON)*100)/100,RC=`${fe}#t=${CC},${IC}`;return $e.Texture.fromLoader(z,RC,d,{pixiIdPrefix:d,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:B?Math.max(120,Number(B)):30}}).then(Xa=>{Xa&&(n.current=Xa,i(!0),o.current=Xa.baseTexture.resource.source,o.current.id=d,o.current.addEventListener("loadedmetadata",_e),o.current.addEventListener("ended",Qe),o.current.addEventListener("loadstart",ct),o.current.addEventListener("canplaythrough",Fe),o.current.addEventListener("stalled",Br))}),()=>{o.current&&(o.current.pause(),o.current.removeEventListener("loadedmetadata",_e),o.current.removeEventListener("ended",Qe),o.current.removeEventListener("loadstart",ct),o.current.removeEventListener("canplaythrough",Fe),o.current.removeEventListener("stalled",Br))}},[fe,d,m,v,z]),L.useEffect(()=>{const K=setTimeout(()=>{r&&n.current&&h.current&&E.current&&h.current.progress()<.1&&o.current&&!h.current.isActive()&&!$&&(o.current.currentTime=m,n.current.update())},30);return()=>{clearTimeout(K)}},[r]),Z.jsx(Ut,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:G,pointerover:U,pointerout:R,children:Z.jsx(ee.Container,{ref:a,children:n.current&&Z.jsx(ee.Sprite,{texture:n.current,width:T,height:w,anchor:.5,x:_,y:x,ref:s,alpha:g?1:0,...!y&&g&&{interactive:!0,pointerdown:A},filters:[H,V,W,oe,...X>0?[ne]:[],...M>0?[ce]:[],...O>0?[ge]:[]]})})})});Ih.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const wC=L.forwardRef((t,e)=>{const[r,i]=L.useState(),n=P.useRef(null),s=P.useRef(null),{visible:a,disabled:o,transformation:{x:u,y:h,width:d,height:l,colorCorrection:c={}},pointerdown:f=()=>{},pointerout:p=()=>{},pointerover:m=()=>{},canvasImageRef:v}=t,g=v&&(v==null?void 0:v.getCanvas()),y=ee.useApp(),{onPointerDown:_,onPointerOut:x,onPointerOver:T}=Va(m,f,p,1),{blurRadius:w=0,vignette:b=0,noise:S=0}=c,{temperatureFilter:A,sharpnessFilter:I,hueFilter:F,blurFilter:B,adjustmentFilter:E,vignetteFilter:C,noiseFilter:$}=er(c);return ee.useTick(()=>{if(n.current&&n.current.texture){const G=n.current.texture.baseTexture;G&&G.update(),s.current&&y.renderer.render(s.current)}}),L.useEffect(()=>{if(!hr(g)){const G=$e.Texture.from(g);i(G)}},[g]),Z.jsx(Ut,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:_,pointerover:T,pointerout:x,children:Z.jsx(ee.Container,{ref:s,children:r&&Z.jsx(ee.Sprite,{texture:r,width:d,height:l,anchor:.5,x:u,y:h,ref:n,alpha:a?1:0,...!o&&a&&{interactive:!0,pointerdown:f},filters:[A,I,F,E,...w>0?[B]:[],...b>0?[C]:[],...S>0?[$]:[]]})})})}),SC=t=>{const{startAt:e,endAt:r,uniqueId:i}=t,n=P.useRef(null),s=P.useRef(null),a=P.useRef(null),o=P.useRef(null),{tl:u,totalDuration:h=0}=P.useContext(At);return L.useEffect(()=>{const d=k.context(()=>{if(n.current&&u.current){o.current&&(o.current.kill(),u.current.remove(o.current));const l=e<.2?1:0;o.current=k.timeline().set(n.current,{alpha:l}).to(n.current,{pixi:{alpha:1,eventMode:"static"},duration:Number(r)-Number(e)}).set(n.current,{alpha:0,eventMode:"none"}),u.current.add([o.current],e)}});return()=>{o.current&&(u.current.remove(o.current),o.current.progress(0).kill()),d.revert()}},[e,r,h,i]),Z.jsx(ee.Container,{ref:n,alpha:e<.2?1:0,eventMode:e<.2?"static":"none",children:Z.jsx(ee.Container,{ref:a,children:Z.jsx(ee.Container,{ref:s,alpha:1,children:t.children})})})},AC=t=>{const{startAt:e,endAt:r}=t,{setTotalDuration:i}=P.useContext(At);return L.useEffect(()=>{i&&i(Number(r)+.2)},[e,r]),t.children},EC=L.forwardRef((t,e)=>{const[r,i]=L.useState(),n=P.useRef(null),s=P.useRef(null),{visible:a,disabled:o,transformation:{x:u,y:h,width:d,height:l,colorCorrection:c={}},pointerdown:f=()=>{},pointerout:p=()=>{},pointerover:m=()=>{},canvasImageRef:v}=t,g=v&&(v==null?void 0:v.getCanvas()),y=ee.useApp(),{onPointerDown:_,onPointerOut:x,onPointerOver:T}=Va(m,f,p,1),{blurRadius:w=0,vignette:b=0,noise:S=0}=c,{temperatureFilter:A,sharpnessFilter:I,hueFilter:F,blurFilter:B,adjustmentFilter:E,vignetteFilter:C,noiseFilter:$}=er(c);return ee.useTick(()=>{if(n.current&&n.current.texture){const G=n.current.texture.baseTexture;G&&G.update(),s.current&&y.renderer.render(s.current)}}),L.useEffect(()=>{if(!hr(g)){const G=$e.Texture.from(g);i(G)}},[g]),Z.jsx(Ut,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:_,pointerover:T,pointerout:x,children:Z.jsx(ee.Container,{ref:s,children:r&&Z.jsx(ee.Sprite,{texture:r,width:d,height:l,anchor:.5,x:u,y:h,ref:n,alpha:a?1:0,...!o&&a&&{interactive:!0,pointerdown:f},filters:[A,I,F,E,...w>0?[B]:[],...b>0?[C]:[],...S>0?[$]:[]]})})})});var Rh=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t))(Rh||{});le.Animations=os,le.BlendModes=Rh,le.Events=we,le.GsapPixieContext=At,le.GsapPixieContextProvider=zh,le.PixiAnimatedSprite=Sh,le.PixiAudioSprite=Hw,le.PixiGifSprite=KE,le.PixiImageSprite=Gc,le.PixiRemotionSprite=EC,le.PixiSequence=SC,le.PixiSequenceWrapper=AC,le.PixiSvgPathSprite=jw,le.PixiTextSprite=ZE,le.PixiVideoCanvasSyncSprite=wC,le.PixiVideoSprite=Ih,le.emitCustomEvent=nr,le.newCustomEventEmitter=Gh,le.useCustomEventListener=Oe,le.useGsapEffect=sl,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
1990
+ */(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(I){var B=this;if(!B.ctx||!B.ctx.listener)return B;for(var U=B._howls.length-1;U>=0;U--)B._howls[U].stereo(I);return B},HowlerGlobal.prototype.pos=function(I,B,U){var V=this;if(!V.ctx||!V.ctx.listener)return V;if(B=typeof B!="number"?V._pos[1]:B,U=typeof U!="number"?V._pos[2]:U,typeof I=="number")V._pos=[I,B,U],typeof V.ctx.listener.positionX<"u"?(V.ctx.listener.positionX.setTargetAtTime(V._pos[0],Howler.ctx.currentTime,.1),V.ctx.listener.positionY.setTargetAtTime(V._pos[1],Howler.ctx.currentTime,.1),V.ctx.listener.positionZ.setTargetAtTime(V._pos[2],Howler.ctx.currentTime,.1)):V.ctx.listener.setPosition(V._pos[0],V._pos[1],V._pos[2]);else return V._pos;return V},HowlerGlobal.prototype.orientation=function(I,B,U,V,X,Y){var K=this;if(!K.ctx||!K.ctx.listener)return K;var J=K._orientation;if(B=typeof B!="number"?J[1]:B,U=typeof U!="number"?J[2]:U,V=typeof V!="number"?J[3]:V,X=typeof X!="number"?J[4]:X,Y=typeof Y!="number"?J[5]:Y,typeof I=="number")K._orientation=[I,B,U,V,X,Y],typeof K.ctx.listener.forwardX<"u"?(K.ctx.listener.forwardX.setTargetAtTime(I,Howler.ctx.currentTime,.1),K.ctx.listener.forwardY.setTargetAtTime(B,Howler.ctx.currentTime,.1),K.ctx.listener.forwardZ.setTargetAtTime(U,Howler.ctx.currentTime,.1),K.ctx.listener.upX.setTargetAtTime(V,Howler.ctx.currentTime,.1),K.ctx.listener.upY.setTargetAtTime(X,Howler.ctx.currentTime,.1),K.ctx.listener.upZ.setTargetAtTime(Y,Howler.ctx.currentTime,.1)):K.ctx.listener.setOrientation(I,B,U,V,X,Y);else return J;return K},Howl.prototype.init=function(I){return function(B){var U=this;return U._orientation=B.orientation||[1,0,0],U._stereo=B.stereo||null,U._pos=B.pos||null,U._pannerAttr={coneInnerAngle:typeof B.coneInnerAngle<"u"?B.coneInnerAngle:360,coneOuterAngle:typeof B.coneOuterAngle<"u"?B.coneOuterAngle:360,coneOuterGain:typeof B.coneOuterGain<"u"?B.coneOuterGain:0,distanceModel:typeof B.distanceModel<"u"?B.distanceModel:"inverse",maxDistance:typeof B.maxDistance<"u"?B.maxDistance:1e4,panningModel:typeof B.panningModel<"u"?B.panningModel:"HRTF",refDistance:typeof B.refDistance<"u"?B.refDistance:1,rolloffFactor:typeof B.rolloffFactor<"u"?B.rolloffFactor:1},U._onstereo=B.onstereo?[{fn:B.onstereo}]:[],U._onpos=B.onpos?[{fn:B.onpos}]:[],U._onorientation=B.onorientation?[{fn:B.onorientation}]:[],I.call(this,B)}}(Howl.prototype.init),Howl.prototype.stereo=function(I,B){var U=this;if(!U._webAudio)return U;if(U._state!=="loaded")return U._queue.push({event:"stereo",action:function(){U.stereo(I,B)}}),U;var V=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof B>"u")if(typeof I=="number")U._stereo=I,U._pos=[I,0,0];else return U._stereo;for(var X=U._getSoundIds(B),Y=0;Y<X.length;Y++){var K=U._soundById(X[Y]);if(K)if(typeof I=="number")K._stereo=I,K._pos=[I,0,0],K._node&&(K._pannerAttr.panningModel="equalpower",(!K._panner||!K._panner.pan)&&E(K,V),V==="spatial"?typeof K._panner.positionX<"u"?(K._panner.positionX.setValueAtTime(I,Howler.ctx.currentTime),K._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),K._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):K._panner.setPosition(I,0,0):K._panner.pan.setValueAtTime(I,Howler.ctx.currentTime)),U._emit("stereo",K._id);else return K._stereo}return U},Howl.prototype.pos=function(I,B,U,V){var X=this;if(!X._webAudio)return X;if(X._state!=="loaded")return X._queue.push({event:"pos",action:function(){X.pos(I,B,U,V)}}),X;if(B=typeof B!="number"?0:B,U=typeof U!="number"?-.5:U,typeof V>"u")if(typeof I=="number")X._pos=[I,B,U];else return X._pos;for(var Y=X._getSoundIds(V),K=0;K<Y.length;K++){var J=X._soundById(Y[K]);if(J)if(typeof I=="number")J._pos=[I,B,U],J._node&&((!J._panner||J._panner.pan)&&E(J,"spatial"),typeof J._panner.positionX<"u"?(J._panner.positionX.setValueAtTime(I,Howler.ctx.currentTime),J._panner.positionY.setValueAtTime(B,Howler.ctx.currentTime),J._panner.positionZ.setValueAtTime(U,Howler.ctx.currentTime)):J._panner.setPosition(I,B,U)),X._emit("pos",J._id);else return J._pos}return X},Howl.prototype.orientation=function(I,B,U,V){var X=this;if(!X._webAudio)return X;if(X._state!=="loaded")return X._queue.push({event:"orientation",action:function(){X.orientation(I,B,U,V)}}),X;if(B=typeof B!="number"?X._orientation[1]:B,U=typeof U!="number"?X._orientation[2]:U,typeof V>"u")if(typeof I=="number")X._orientation=[I,B,U];else return X._orientation;for(var Y=X._getSoundIds(V),K=0;K<Y.length;K++){var J=X._soundById(Y[K]);if(J)if(typeof I=="number")J._orientation=[I,B,U],J._node&&(J._panner||(J._pos||(J._pos=X._pos||[0,0,-.5]),E(J,"spatial")),typeof J._panner.orientationX<"u"?(J._panner.orientationX.setValueAtTime(I,Howler.ctx.currentTime),J._panner.orientationY.setValueAtTime(B,Howler.ctx.currentTime),J._panner.orientationZ.setValueAtTime(U,Howler.ctx.currentTime)):J._panner.setOrientation(I,B,U)),X._emit("orientation",J._id);else return J._orientation}return X},Howl.prototype.pannerAttr=function(){var I=this,B=arguments,U,V,X;if(!I._webAudio)return I;if(B.length===0)return I._pannerAttr;if(B.length===1)if(typeof B[0]=="object")U=B[0],typeof V>"u"&&(U.pannerAttr||(U.pannerAttr={coneInnerAngle:U.coneInnerAngle,coneOuterAngle:U.coneOuterAngle,coneOuterGain:U.coneOuterGain,distanceModel:U.distanceModel,maxDistance:U.maxDistance,refDistance:U.refDistance,rolloffFactor:U.rolloffFactor,panningModel:U.panningModel}),I._pannerAttr={coneInnerAngle:typeof U.pannerAttr.coneInnerAngle<"u"?U.pannerAttr.coneInnerAngle:I._coneInnerAngle,coneOuterAngle:typeof U.pannerAttr.coneOuterAngle<"u"?U.pannerAttr.coneOuterAngle:I._coneOuterAngle,coneOuterGain:typeof U.pannerAttr.coneOuterGain<"u"?U.pannerAttr.coneOuterGain:I._coneOuterGain,distanceModel:typeof U.pannerAttr.distanceModel<"u"?U.pannerAttr.distanceModel:I._distanceModel,maxDistance:typeof U.pannerAttr.maxDistance<"u"?U.pannerAttr.maxDistance:I._maxDistance,refDistance:typeof U.pannerAttr.refDistance<"u"?U.pannerAttr.refDistance:I._refDistance,rolloffFactor:typeof U.pannerAttr.rolloffFactor<"u"?U.pannerAttr.rolloffFactor:I._rolloffFactor,panningModel:typeof U.pannerAttr.panningModel<"u"?U.pannerAttr.panningModel:I._panningModel});else return X=I._soundById(parseInt(B[0],10)),X?X._pannerAttr:I._pannerAttr;else B.length===2&&(U=B[0],V=parseInt(B[1],10));for(var Y=I._getSoundIds(V),K=0;K<Y.length;K++)if(X=I._soundById(Y[K]),X){var J=X._pannerAttr;J={coneInnerAngle:typeof U.coneInnerAngle<"u"?U.coneInnerAngle:J.coneInnerAngle,coneOuterAngle:typeof U.coneOuterAngle<"u"?U.coneOuterAngle:J.coneOuterAngle,coneOuterGain:typeof U.coneOuterGain<"u"?U.coneOuterGain:J.coneOuterGain,distanceModel:typeof U.distanceModel<"u"?U.distanceModel:J.distanceModel,maxDistance:typeof U.maxDistance<"u"?U.maxDistance:J.maxDistance,refDistance:typeof U.refDistance<"u"?U.refDistance:J.refDistance,rolloffFactor:typeof U.rolloffFactor<"u"?U.rolloffFactor:J.rolloffFactor,panningModel:typeof U.panningModel<"u"?U.panningModel:J.panningModel};var xe=X._panner;xe?(xe.coneInnerAngle=J.coneInnerAngle,xe.coneOuterAngle=J.coneOuterAngle,xe.coneOuterGain=J.coneOuterGain,xe.distanceModel=J.distanceModel,xe.maxDistance=J.maxDistance,xe.refDistance=J.refDistance,xe.rolloffFactor=J.rolloffFactor,xe.panningModel=J.panningModel):(X._pos||(X._pos=I._pos||[0,0,-.5]),E(X,"spatial"))}return I},Sound.prototype.init=function(I){return function(){var B=this,U=B._parent;B._orientation=U._orientation,B._stereo=U._stereo,B._pos=U._pos,B._pannerAttr=U._pannerAttr,I.call(this),B._stereo?U.stereo(B._stereo):B._pos&&U.pos(B._pos[0],B._pos[1],B._pos[2],B._id)}}(Sound.prototype.init),Sound.prototype.reset=function(I){return function(){var B=this,U=B._parent;return B._orientation=U._orientation,B._stereo=U._stereo,B._pos=U._pos,B._pannerAttr=U._pannerAttr,B._stereo?U.stereo(B._stereo):B._pos?U.pos(B._pos[0],B._pos[1],B._pos[2],B._id):B._panner&&(B._panner.disconnect(0),B._panner=void 0,U._refreshBuffer(B)),I.call(this)}}(Sound.prototype.reset);var E=function(I,B){B=B||"spatial",B==="spatial"?(I._panner=Howler.ctx.createPanner(),I._panner.coneInnerAngle=I._pannerAttr.coneInnerAngle,I._panner.coneOuterAngle=I._pannerAttr.coneOuterAngle,I._panner.coneOuterGain=I._pannerAttr.coneOuterGain,I._panner.distanceModel=I._pannerAttr.distanceModel,I._panner.maxDistance=I._pannerAttr.maxDistance,I._panner.refDistance=I._pannerAttr.refDistance,I._panner.rolloffFactor=I._pannerAttr.rolloffFactor,I._panner.panningModel=I._pannerAttr.panningModel,typeof I._panner.positionX<"u"?(I._panner.positionX.setValueAtTime(I._pos[0],Howler.ctx.currentTime),I._panner.positionY.setValueAtTime(I._pos[1],Howler.ctx.currentTime),I._panner.positionZ.setValueAtTime(I._pos[2],Howler.ctx.currentTime)):I._panner.setPosition(I._pos[0],I._pos[1],I._pos[2]),typeof I._panner.orientationX<"u"?(I._panner.orientationX.setValueAtTime(I._orientation[0],Howler.ctx.currentTime),I._panner.orientationY.setValueAtTime(I._orientation[1],Howler.ctx.currentTime),I._panner.orientationZ.setValueAtTime(I._orientation[2],Howler.ctx.currentTime)):I._panner.setOrientation(I._orientation[0],I._orientation[1],I._orientation[2])):(I._panner=Howler.ctx.createStereoPanner(),I._panner.pan.setValueAtTime(I._stereo,Howler.ctx.currentTime)),I._panner.connect(I._node),I._paused||I._parent.pause(I._id,!0).play(I._id,!0)}})()})(howler);/**!
1991
+ * audioMotion-analyzer
1992
+ * High-resolution real-time graphic audio spectrum analyzer JS module
1993
+ *
1994
+ * @version 4.3.0
1995
+ * @author Henrique Avila Vianna <hvianna@gmail.com> <https://henriquevianna.com>
1996
+ * @license AGPL-3.0-or-later
1997
+ */const VERSION="4.3.0",PI=Math.PI,TAU=2*PI,HALF_PI=PI/2,C_1=8.17579892,CHANNEL_COMBINED="dual-combined",CHANNEL_HORIZONTAL="dual-horizontal",CHANNEL_SINGLE="single",CHANNEL_VERTICAL="dual-vertical",COLOR_BAR_INDEX="bar-index",COLOR_BAR_LEVEL="bar-level",COLOR_GRADIENT="gradient",DEBOUNCE_TIMEOUT=60,EVENT_CLICK="click",EVENT_FULLSCREENCHANGE="fullscreenchange",EVENT_RESIZE="resize",GRADIENT_DEFAULT_BGCOLOR="#111",FILTER_NONE="",FILTER_A="A",FILTER_B="B",FILTER_C="C",FILTER_D="D",FILTER_468="468",FONT_FAMILY="sans-serif",FPS_COLOR="#0f0",LEDS_UNLIT_COLOR="#7f7f7f22",MODE_GRAPH=10,REASON_CREATE="create",REASON_FSCHANGE="fschange",REASON_LORES="lores",REASON_RESIZE=EVENT_RESIZE,REASON_USER="user",SCALEX_BACKGROUND_COLOR="#000c",SCALEX_LABEL_COLOR="#fff",SCALEX_HIGHLIGHT_COLOR="#4f4",SCALEY_LABEL_COLOR="#888",SCALEY_MIDLINE_COLOR="#555",SCALE_BARK="bark",SCALE_LINEAR="linear",SCALE_LOG="log",SCALE_MEL="mel",PRISM=["#a35","#c66","#e94","#ed0","#9d5","#4d8","#2cb","#0bc","#09c","#36b"],GRADIENTS=[["classic",{colorStops:["red",{color:"yellow",level:.85,pos:.6},{color:"lime",level:.475}]}],["prism",{colorStops:PRISM}],["rainbow",{dir:"h",colorStops:["#817",...PRISM,"#639"]}],["orangered",{bgColor:"#3e2f29",colorStops:["OrangeRed"]}],["steelblue",{bgColor:"#222c35",colorStops:["SteelBlue"]}]],ERR_AUDIO_CONTEXT_FAIL=["ERR_AUDIO_CONTEXT_FAIL","Could not create audio context. Web Audio API not supported?"],ERR_INVALID_AUDIO_CONTEXT=["ERR_INVALID_AUDIO_CONTEXT","Provided audio context is not valid"],ERR_UNKNOWN_GRADIENT=["ERR_UNKNOWN_GRADIENT","Unknown gradient"],ERR_FREQUENCY_TOO_LOW=["ERR_FREQUENCY_TOO_LOW","Frequency values must be >= 1"],ERR_INVALID_MODE=["ERR_INVALID_MODE","Invalid mode"],ERR_REFLEX_OUT_OF_RANGE=["ERR_REFLEX_OUT_OF_RANGE","Reflex ratio must be >= 0 and < 1"],ERR_INVALID_AUDIO_SOURCE=["ERR_INVALID_AUDIO_SOURCE","Audio source must be an instance of HTMLMediaElement or AudioNode"],ERR_GRADIENT_INVALID_NAME=["ERR_GRADIENT_INVALID_NAME","Gradient name must be a non-empty string"],ERR_GRADIENT_NOT_AN_OBJECT=["ERR_GRADIENT_NOT_AN_OBJECT","Gradient options must be an object"],ERR_GRADIENT_MISSING_COLOR=["ERR_GRADIENT_MISSING_COLOR","Gradient colorStops must be a non-empty array"];class AudioMotionError extends Error{constructor(E,I){const[B,U]=E;super(U+(I!==void 0?`: ${I}`:"")),this.name="AudioMotionError",this.code=B}}const deprecate=(C,E)=>console.warn(`${C} is deprecated. Use ${E} instead.`),validateFromList=(C,E,I="toLowerCase")=>E[Math.max(0,E.indexOf((""+C)[I]()))],findY=(C,E,I,B,U)=>E+(B-E)*(U-C)/(I-C);Array.prototype.findLastIndex||(Array.prototype.findLastIndex=function(C){let E=this.length;for(;E-- >0;)if(C(this[E]))return E;return-1});class AudioMotionAnalyzer{constructor(E,I={}){this._ready=!1,this._aux={},this._canvasGradients=[],this._destroyed=!1,this._energy={val:0,peak:0,hold:0},this._flg={},this._fps=0,this._gradients={},this._last=0,this._outNodes=[],this._ownContext=!1,this._selectedGrads=[],this._sources=[];for(const[Z,_e]of GRADIENTS)this.registerGradient(Z,_e);this._container=E||document.body,this._defaultWidth=this._container.clientWidth||640,this._defaultHeight=this._container.clientHeight||270;let B;if(!(I.source&&(B=I.source.context))){if(!(B=I.audioCtx))try{B=new(window.AudioContext||window.webkitAudioContext),this._ownContext=!0}catch{throw new AudioMotionError(ERR_AUDIO_CONTEXT_FAIL)}}if(!B.createGain)throw new AudioMotionError(ERR_INVALID_AUDIO_CONTEXT);const U=this._analyzer=[B.createAnalyser(),B.createAnalyser()],V=this._splitter=B.createChannelSplitter(2),X=this._merger=B.createChannelMerger(2);this._input=B.createGain(),this._output=B.createGain(),I.source&&this.connectInput(I.source);for(const Z of[0,1])V.connect(U[Z],Z);X.connect(this._output),I.connectSpeakers!==!1&&this.connectOutput();const Y=document.createElement("canvas");Y.style="max-width: 100%;",this._ctx=Y.getContext("2d");for(const Z of["_scaleX","_scaleR"])this[Z]=document.createElement("canvas").getContext("2d");this._fsEl=I.fsElement||Y;const K=()=>{this._fsTimeout||(this._fsTimeout=window.setTimeout(()=>{this._fsChanging||(this._setCanvas(REASON_RESIZE),this._fsTimeout=0)},DEBOUNCE_TIMEOUT))};window.ResizeObserver&&(this._observer=new ResizeObserver(K),this._observer.observe(this._container)),this._controller=new AbortController;const J=this._controller.signal;window.addEventListener(EVENT_RESIZE,K,{signal:J}),Y.addEventListener(EVENT_FULLSCREENCHANGE,()=>{this._fsChanging=!0,this._fsTimeout&&window.clearTimeout(this._fsTimeout),this._setCanvas(REASON_FSCHANGE),this._fsTimeout=window.setTimeout(()=>{this._fsChanging=!1,this._fsTimeout=0},DEBOUNCE_TIMEOUT)},{signal:J});const xe=()=>{B.state=="suspended"&&B.resume(),window.removeEventListener(EVENT_CLICK,xe)};window.addEventListener(EVENT_CLICK,xe),document.addEventListener("visibilitychange",()=>{document.visibilityState!="hidden"&&(this._frames=0,this._time=performance.now())},{signal:J}),this._setProps(I,!0),this.useCanvas&&this._container.appendChild(Y),this._ready=!0,this._setCanvas(REASON_CREATE)}get alphaBars(){return this._alphaBars}set alphaBars(E){this._alphaBars=!!E,this._calcBars()}get ansiBands(){return this._ansiBands}set ansiBands(E){this._ansiBands=!!E,this._calcBars()}get barSpace(){return this._barSpace}set barSpace(E){this._barSpace=+E||0,this._calcBars()}get channelLayout(){return this._chLayout}set channelLayout(E){this._chLayout=validateFromList(E,[CHANNEL_SINGLE,CHANNEL_HORIZONTAL,CHANNEL_VERTICAL,CHANNEL_COMBINED]),this._input.disconnect(),this._input.connect(this._chLayout!=CHANNEL_SINGLE?this._splitter:this._analyzer[0]),this._analyzer[0].disconnect(),this._outNodes.length&&this._analyzer[0].connect(this._chLayout!=CHANNEL_SINGLE?this._merger:this._output),this._calcBars(),this._makeGrad()}get colorMode(){return this._colorMode}set colorMode(E){this._colorMode=validateFromList(E,[COLOR_GRADIENT,COLOR_BAR_INDEX,COLOR_BAR_LEVEL])}get fftSize(){return this._analyzer[0].fftSize}set fftSize(E){for(const B of[0,1])this._analyzer[B].fftSize=E;const I=this._analyzer[0].frequencyBinCount;this._fftData=[new Float32Array(I),new Float32Array(I)],this._calcBars()}get frequencyScale(){return this._frequencyScale}set frequencyScale(E){this._frequencyScale=validateFromList(E,[SCALE_LOG,SCALE_BARK,SCALE_MEL,SCALE_LINEAR]),this._calcBars()}get gradient(){return this._selectedGrads[0]}set gradient(E){this._setGradient(E)}get gradientLeft(){return this._selectedGrads[0]}set gradientLeft(E){this._setGradient(E,0)}get gradientRight(){return this._selectedGrads[1]}set gradientRight(E){this._setGradient(E,1)}get height(){return this._height}set height(E){this._height=E,this._setCanvas(REASON_USER)}get ledBars(){return this._showLeds}set ledBars(E){this._showLeds=!!E,this._calcBars()}get linearAmplitude(){return this._linearAmplitude}set linearAmplitude(E){this._linearAmplitude=!!E}get linearBoost(){return this._linearBoost}set linearBoost(E){this._linearBoost=E>=1?+E:1}get lineWidth(){return this._lineWidth}set lineWidth(E){this._lineWidth=+E||0}get loRes(){return this._loRes}set loRes(E){this._loRes=!!E,this._setCanvas(REASON_LORES)}get lumiBars(){return this._lumiBars}set lumiBars(E){this._lumiBars=!!E,this._calcBars(),this._makeGrad()}get maxDecibels(){return this._analyzer[0].maxDecibels}set maxDecibels(E){for(const I of[0,1])this._analyzer[I].maxDecibels=E}get maxFPS(){return this._maxFPS}set maxFPS(E){this._maxFPS=E<0?0:+E||0}get maxFreq(){return this._maxFreq}set maxFreq(E){if(E<1)throw new AudioMotionError(ERR_FREQUENCY_TOO_LOW);this._maxFreq=Math.min(E,this.audioCtx.sampleRate/2),this._calcBars()}get minDecibels(){return this._analyzer[0].minDecibels}set minDecibels(E){for(const I of[0,1])this._analyzer[I].minDecibels=E}get minFreq(){return this._minFreq}set minFreq(E){if(E<1)throw new AudioMotionError(ERR_FREQUENCY_TOO_LOW);this._minFreq=+E,this._calcBars()}get mirror(){return this._mirror}set mirror(E){this._mirror=Math.sign(E)|0,this._calcBars(),this._makeGrad()}get mode(){return this._mode}set mode(E){const I=E|0;if(I>=0&&I<=10&&I!=9)this._mode=I,this._calcBars(),this._makeGrad();else throw new AudioMotionError(ERR_INVALID_MODE,E)}get noteLabels(){return this._noteLabels}set noteLabels(E){this._noteLabels=!!E,this._createScales()}get outlineBars(){return this._outlineBars}set outlineBars(E){this._outlineBars=!!E,this._calcBars()}get peakLine(){return this._peakLine}set peakLine(E){this._peakLine=!!E}get radial(){return this._radial}set radial(E){this._radial=!!E,this._calcBars(),this._makeGrad()}get reflexRatio(){return this._reflexRatio}set reflexRatio(E){if(E=+E||0,E<0||E>=1)throw new AudioMotionError(ERR_REFLEX_OUT_OF_RANGE);this._reflexRatio=E,this._calcBars(),this._makeGrad()}get roundBars(){return this._roundBars}set roundBars(E){this._roundBars=!!E,this._calcBars()}get smoothing(){return this._analyzer[0].smoothingTimeConstant}set smoothing(E){for(const I of[0,1])this._analyzer[I].smoothingTimeConstant=E}get spinSpeed(){return this._spinSpeed}set spinSpeed(E){E=+E||0,(this._spinSpeed===void 0||E==0)&&(this._spinAngle=-HALF_PI),this._spinSpeed=E}get splitGradient(){return this._splitGradient}set splitGradient(E){this._splitGradient=!!E,this._makeGrad()}get stereo(){return deprecate("stereo","channelLayout"),this._chLayout!=CHANNEL_SINGLE}set stereo(E){deprecate("stereo","channelLayout"),this.channelLayout=E?CHANNEL_VERTICAL:CHANNEL_SINGLE}get trueLeds(){return this._trueLeds}set trueLeds(E){this._trueLeds=!!E}get volume(){return this._output.gain.value}set volume(E){this._output.gain.value=E}get weightingFilter(){return this._weightingFilter}set weightingFilter(E){this._weightingFilter=validateFromList(E,[FILTER_NONE,FILTER_A,FILTER_B,FILTER_C,FILTER_D,FILTER_468],"toUpperCase")}get width(){return this._width}set width(E){this._width=E,this._setCanvas(REASON_USER)}get audioCtx(){return this._input.context}get canvas(){return this._ctx.canvas}get canvasCtx(){return this._ctx}get connectedSources(){return this._sources}get connectedTo(){return this._outNodes}get fps(){return this._fps}get fsHeight(){return this._fsHeight}get fsWidth(){return this._fsWidth}get isAlphaBars(){return this._flg.isAlpha}get isBandsMode(){return this._flg.isBands}get isDestroyed(){return this._destroyed}get isFullscreen(){return this._fsEl&&(document.fullscreenElement||document.webkitFullscreenElement)===this._fsEl}get isLedBars(){return this._flg.isLeds}get isLumiBars(){return this._flg.isLumi}get isOctaveBands(){return this._flg.isOctaves}get isOn(){return!!this._runId}get isOutlineBars(){return this._flg.isOutline}get pixelRatio(){return this._pixelRatio}get isRoundBars(){return this._flg.isRound}static get version(){return VERSION}connectInput(E){const I=E instanceof HTMLMediaElement;if(!(I||E.connect))throw new AudioMotionError(ERR_INVALID_AUDIO_SOURCE);const B=I?this.audioCtx.createMediaElementSource(E):E;return this._sources.includes(B)||(B.connect(this._input),this._sources.push(B)),B}connectOutput(E=this.audioCtx.destination){if(!this._outNodes.includes(E)&&(this._output.connect(E),this._outNodes.push(E),this._outNodes.length==1))for(const I of[0,1])this._analyzer[I].connect(this._chLayout==CHANNEL_SINGLE&&!I?this._output:this._merger,0,I)}destroy(){if(!this._ready)return;const{audioCtx:E,canvas:I,_controller:B,_input:U,_merger:V,_observer:X,_ownContext:Y,_splitter:K}=this;this._destroyed=!0,this._ready=!1,this.stop(),B.abort(),X&&X.disconnect(),this.onCanvasResize=null,this.onCanvasDraw=null,this._fsEl=null,this.disconnectInput(),this.disconnectOutput(),U.disconnect(),K.disconnect(),V.disconnect(),Y&&E.close(),I.remove(),this._calcBars()}disconnectInput(E,I){E?Array.isArray(E)||(E=[E]):E=Array.from(this._sources);for(const B of E){const U=this._sources.indexOf(B);if(I&&B.mediaStream)for(const V of B.mediaStream.getAudioTracks())V.stop();U>=0&&(B.disconnect(this._input),this._sources.splice(U,1))}}disconnectOutput(E){if(!(E&&!this._outNodes.includes(E))&&(this._output.disconnect(E),this._outNodes=E?this._outNodes.filter(I=>I!==E):[],this._outNodes.length==0))for(const I of[0,1])this._analyzer[I].disconnect()}getBars(){return Array.from(this._bars,({posX:E,freq:I,freqLo:B,freqHi:U,hold:V,peak:X,value:Y})=>({posX:E,freq:I,freqLo:B,freqHi:U,hold:V,peak:X,value:Y}))}getEnergy(E,I){if(E===void 0)return this._energy.val;if(E!=+E){if(E=="peak")return this._energy.peak;const Y={bass:[20,250],lowMid:[250,500],mid:[500,2e3],highMid:[2e3,4e3],treble:[4e3,16e3]};if(!Y[E])return null;[E,I]=Y[E]}const B=this._freqToBin(E),U=I?this._freqToBin(I):B,V=this._chLayout==CHANNEL_SINGLE?1:2;let X=0;for(let Y=0;Y<V;Y++)for(let K=B;K<=U;K++)X+=this._normalizedB(this._fftData[Y][K]);return X/(U-B+1)/V}registerGradient(E,I){if(typeof E!="string"||E.trim().length==0)throw new AudioMotionError(ERR_GRADIENT_INVALID_NAME);if(typeof I!="object")throw new AudioMotionError(ERR_GRADIENT_NOT_AN_OBJECT);const{colorStops:B}=I;if(!Array.isArray(B)||!B.length)throw new AudioMotionError(ERR_GRADIENT_MISSING_COLOR);const U=B.length,V=X=>+X!=X||X<0||X>1;B.forEach((X,Y)=>{const K=Y/Math.max(1,U-1);typeof X!="object"?B[Y]={pos:K,color:X}:V(X.pos)&&(X.pos=K),V(X.level)&&(B[Y].level=1-Y/U)}),B.sort((X,Y)=>X.level<Y.level?1:X.level>Y.level?-1:0),B[0].level=1,this._gradients[E]={bgColor:I.bgColor||GRADIENT_DEFAULT_BGCOLOR,dir:I.dir,colorStops:B},this._selectedGrads.includes(E)&&this._makeGrad()}setCanvasSize(E,I){this._width=E,this._height=I,this._setCanvas(REASON_USER)}setFreqRange(E,I){if(E<1||I<1)throw new AudioMotionError(ERR_FREQUENCY_TOO_LOW);this._minFreq=Math.min(E,I),this.maxFreq=Math.max(E,I)}setLedParams(E){let I,B,U;E&&(I=E.maxLeds|0,B=+E.spaceV,U=+E.spaceH),this._ledParams=I>0&&B>0&&U>=0?[I,B,U]:void 0,this._calcBars()}setOptions(E){this._setProps(E)}setSensitivity(E,I){for(const B of[0,1])this._analyzer[B].minDecibels=Math.min(E,I),this._analyzer[B].maxDecibels=Math.max(E,I)}start(){this.toggleAnalyzer(!0)}stop(){this.toggleAnalyzer(!1)}toggleAnalyzer(E){const I=this.isOn;return E===void 0&&(E=!I),I&&!E?(cancelAnimationFrame(this._runId),this._runId=0):!I&&E&&!this._destroyed&&(this._frames=0,this._time=performance.now(),this._runId=requestAnimationFrame(B=>this._draw(B))),this.isOn}toggleFullscreen(){if(this.isFullscreen)document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();else{const E=this._fsEl;if(!E)return;E.requestFullscreen?E.requestFullscreen():E.webkitRequestFullscreen&&E.webkitRequestFullscreen()}}_binToFreq(E){return E*this.audioCtx.sampleRate/this.fftSize||1}_calcBars(){const E=this._bars=[];if(!this._ready){this._flg={isAlpha:!1,isBands:!1,isLeds:!1,isLumi:!1,isOctaves:!1,isOutline:!1,isRound:!1,noLedGap:!1};return}const{_ansiBands:I,_barSpace:B,canvas:U,_chLayout:V,_maxFreq:X,_minFreq:Y,_mirror:K,_mode:J,_radial:xe,_reflexRatio:Z}=this,_e=U.width>>1,Se=U.height>>1,Ee=V==CHANNEL_VERTICAL&&!xe,Ae=V==CHANNEL_HORIZONTAL,Re=J%10!=0,Te=Re&&this._frequencyScale==SCALE_LOG,we=this._showLeds&&Re&&!xe,Pe=this._lumiBars&&Re&&!xe,Ie=this._alphaBars&&!Pe&&J!=MODE_GRAPH,Me=this._outlineBars&&Re&&!Pe&&!we,Oe=this._roundBars&&Re&&!Pe&&!we,Le=V!=CHANNEL_VERTICAL||Z>0&&!Pe,Ne=U.height-(Ee&&!we?.5:0)>>Ee,Ve=Ne*(Pe||xe?1:1-Z)|0,Xe=U.width-_e*(Ae||K!=0),Ue=Ee?U.height-Ne*2:0,We=_e*(K==-1&&!Ae&&!xe),ze=Math.min(U.width,U.height)*(V==CHANNEL_VERTICAL?.375:.125)|0,He=Math.min(_e,Se),je=Ye=>E.push({...Ye,peak:[0,0],hold:[0],value:[0]}),$e=Ye=>{const Qe=this._freqToBin(Ye,"floor"),Ze=this._binToFreq(Qe),it=this._binToFreq(Qe+1),at=Math.log2(Ye/Ze)/Math.log2(it/Ze);return[Qe,at]};let De,Fe,ke;if(Te){const Ye=(nt,rt,tt)=>+nt.toPrecision(tt?Math.max(rt,1+Math.log10(nt)|0):rt),Qe=nt=>{const rt=[1,1.12,1.25,1.4,1.6,1.8,2,2.24,2.5,2.8,3.15,3.55,4,4.5,5,5.6,6.3,7.1,8,9,10],tt=Math.log10(nt)|0,ot=nt/10**tt;let ut=1;for(;ut<rt.length&&ot>rt[ut];)ut++;return ot-rt[ut-1]<rt[ut]-ot&&ut--,(rt[ut]*10**(tt+5)|0)/1e5},Ze=[0,24,12,8,6,4,3,2,1][J],it=I?10**(3/(Ze*10)):2**(1/Ze),at=it**.5;let st=I?7.94328235/(Ze%2?1:at):C_1;do{let nt=st;const rt=Ye(nt/at,4,!0),tt=Ye(nt*at,4,!0),[ot,ut]=$e(rt),[mt,pt]=$e(tt);I?nt=Ze<4?Qe(nt):Ye(nt,nt.toString()[0]<5?3:2):nt=Ye(nt,4,!0),nt>=Y&&je({posX:0,freq:nt,freqLo:rt,freqHi:tt,binLo:ot,binHi:mt,ratioLo:ut,ratioHi:pt}),st*=it}while(st<=X);De=Xe/E.length,E.forEach((nt,rt)=>nt.posX=We+rt*De);const Je=E[0],et=E[E.length-1];Fe=this._freqScaling(Je.freqLo),ke=Xe/(this._freqScaling(et.freqHi)-Fe),Je.freqLo<Y&&(Je.freqLo=Y,[Je.binLo,Je.ratioLo]=$e(Y)),et.freqHi>X&&(et.freqHi=X,[et.binHi,et.ratioHi]=$e(X))}else if(Re){const Ye=[0,24,12,8,6,4,3,2,1][J]*10,Qe=Ze=>{switch(this._frequencyScale){case SCALE_BARK:return 1960/(26.81/(Ze+.53)-1);case SCALE_MEL:return 700*(2**Ze-1);case SCALE_LINEAR:return Ze}};De=Xe/Ye,Fe=this._freqScaling(Y),ke=Xe/(this._freqScaling(X)-Fe);for(let Ze=0,it=0;Ze<Ye;Ze++,it+=De){const at=Qe(Fe+it/ke),st=Qe(Fe+(it+De/2)/ke),Je=Qe(Fe+(it+De)/ke),[et,nt]=$e(at),[rt,tt]=$e(Je);je({posX:We+it,freq:st,freqLo:at,freqHi:Je,binLo:et,binHi:rt,ratioLo:nt,ratioHi:tt})}}else{De=1,Fe=this._freqScaling(Y),ke=Xe/(this._freqScaling(X)-Fe);const Ye=this._freqToBin(Y,"floor"),Qe=this._freqToBin(X);let Ze=-999;for(let it=Ye;it<=Qe;it++){const at=this._binToFreq(it),st=We+Math.round(ke*(this._freqScaling(at)-Fe));if(st>Ze)je({posX:st,freq:at,freqLo:at,freqHi:at,binLo:it,binHi:it,ratioLo:0,ratioHi:0}),Ze=st;else if(E.length){const Je=E[E.length-1];Je.binHi=it,Je.freqHi=at,Je.freq=(Je.freqLo*at)**.5}}}let Ge=0,Be=0;if(we){const Ye=this._pixelRatio/(window.devicePixelRatio>1&&window.screen.height<=540?2:1),Qe=[[],[128,3,.45],[128,4,.225],[96,6,.225],[80,6,.225],[80,6,.125],[64,6,.125],[48,8,.125],[24,16,.125]],Ze=this._ledParams,[it,at,st]=Ze||Qe[J];let Je,et=Ve;if(Ze){const nt=2*Ye;let rt;Je=it+1;do Je--,rt=et/Je/(1+at),Be=rt*at;while((rt<nt||Be<nt)&&Je>1)}else{const nt=540/at;Be=Math.min(at*Ye,Math.max(2,et/nt+.1|0))}Le&&(et+=Be),Ze||(Je=Math.min(it,et/(Be*2)|0)),Ge=st>=1?st:De*st,this._leds=[Je,Ge,Be,et/Je-Be]}const qe=Math.min(De-1,B*(B>0&&B<1?De:1));Re&&(De-=Math.max(we?Ge:0,qe)),E.forEach((Ye,Qe)=>{let Ze=Ye.posX,it=De;Re&&(B==0&&!we?(Ze|=0,it|=0,Qe>0&&Ze>E[Qe-1].posX+E[Qe-1].width&&(Ze--,it++)):Ze+=Math.max(we?Ge:0,qe)/2,Ye.posX=Ze),Ye.barCenter=Ze+(De==1?0:it/2),Ye.width=it});const Ke=[];for(const Ye of[0,1]){const Qe=V==CHANNEL_VERTICAL?(Ne+Ue)*Ye:0,Ze=Qe+Ne,it=Qe+Ve-(!we||Le?0:Be);Ke.push({channelTop:Qe,channelBottom:Ze,analyzerBottom:it})}this._aux={analyzerHeight:Ve,analyzerWidth:Xe,centerX:_e,centerY:Se,channelCoords:Ke,channelHeight:Ne,channelGap:Ue,initialX:We,innerRadius:ze,outerRadius:He,scaleMin:Fe,unitWidth:ke},this._flg={isAlpha:Ie,isBands:Re,isLeds:we,isLumi:Pe,isOctaves:Te,isOutline:Me,isRound:Oe,noLedGap:Le},this._createScales()}_createScales(){if(!this._ready)return;const{analyzerWidth:E,initialX:I,innerRadius:B,scaleMin:U,unitWidth:V}=this._aux,{canvas:X,_frequencyScale:Y,_mirror:K,_noteLabels:J,_radial:xe,_scaleX:Z,_scaleR:_e}=this,Se=Z.canvas,Ee=_e.canvas,Ae=[],Re=this._chLayout==CHANNEL_HORIZONTAL,Te=this._chLayout==CHANNEL_VERTICAL,we=["C",,"D",,"E","F",,"G",,"A",,"B"],Pe=Math.min(X.width,X.height)/34|0,Ie=Se.height>>1,Me=Pe>>1,Oe=Ie*(J?.7:1.5),Le=Me*(J?1:2),Ne=2**(1/12);if(!J&&(this._ansiBands||Y!=SCALE_LOG))Ae.push(16,31.5,63,125,250,500,1e3,2e3,4e3),Y==SCALE_LINEAR?Ae.push(6e3,8e3,1e4,12e3,14e3,16e3,18e3,2e4,22e3):Ae.push(8e3,16e3);else{let He=C_1;for(let je=-1;je<11;je++)for(let $e=0;$e<12;$e++){if(He>=this._minFreq&&He<=this._maxFreq){const De=we[$e],Fe=De=="C";(De&&J&&!K&&!Re||Fe)&&Ae.push(J?[He,De+(Fe?je:"")]:He)}He*=Ne}}Ee.width=Ee.height=(B<<1)+Te*Pe;const Ve=Ee.width>>1,Xe=Ve-Pe*.7,Ue=(He,je)=>{const $e=TAU*(He/X.width),De=$e-HALF_PI,Fe=Xe*Math.cos(De),ke=Xe*Math.sin(De);_e.save(),_e.translate(Ve+Fe,Ve+ke),_e.rotate($e),_e.fillText(je,0,0),_e.restore()};Se.width|=0,Z.fillStyle=_e.strokeStyle=SCALEX_BACKGROUND_COLOR,Z.fillRect(0,0,Se.width,Se.height),_e.arc(Ve,Ve,Ve-Pe/2,0,TAU),_e.lineWidth=Pe,_e.stroke(),Z.fillStyle=_e.fillStyle=SCALEX_LABEL_COLOR,Z.font=`${Ie}px ${FONT_FAMILY}`,_e.font=`${Me}px ${FONT_FAMILY}`,Z.textAlign=_e.textAlign="center";let We=-Oe/4,ze=-Le;for(const He of Ae){const[je,$e]=Array.isArray(He)?He:[He,He<1e3?He|0:`${(He/100|0)/10}k`],De=V*(this._freqScaling(je)-U),Fe=Se.height*.75,ke=$e[0]=="C",Ge=Ie*(J&&!K&&!Re?ke?1.2:.6:3);if(Z.fillStyle=_e.fillStyle=ke&&!K&&!Re?SCALEX_HIGHLIGHT_COLOR:SCALEX_LABEL_COLOR,J){const Be=Y==SCALE_LOG,qe=Y==SCALE_LINEAR;let Ke=["C"];if((Be||je>2e3||!qe&&je>250||(!xe||Te)&&(!qe&&je>125||je>1e3))&&Ke.push("G"),(Be||je>4e3||!qe&&je>500||(!xe||Te)&&(!qe&&je>250||je>2e3))&&Ke.push("E"),(qe&&je>4e3||(!xe||Te)&&(Be||je>2e3||!qe&&je>500))&&Ke.push("D","F","A","B"),!Ke.includes($e[0]))continue}De>=We+Oe/2&&De<=E&&(Z.fillText($e,Re&&K==-1?E-De:I+De,Fe,Ge),(Re||K&&(De>Oe||K==1))&&Z.fillText($e,Re&&K!=1?E+De:(I||X.width)-De,Fe,Ge),We=De+Math.min(Ge,Z.measureText($e).width)/2),De>=ze+Le&&De<E-Le&&(Ue(Re&&K==1?E-De:De,$e),(Re||K&&(De>Le||K==1))&&Ue(Re&&K!=-1?E+De:-De,$e),ze=De)}}_draw(E){this._runId=requestAnimationFrame(lt=>this._draw(lt));const I=E-this._time,B=E-this._last,U=this._maxFPS?975/this._maxFPS:0;if(B<U)return;this._last=E-(U?B%U:0),this._frames++,I>=1e3&&(this._fps=this._frames/I*1e3,this._frames=0,this._time=E);const{isAlpha:V,isBands:X,isLeds:Y,isLumi:K,isOctaves:J,isOutline:xe,isRound:Z,noLedGap:_e}=this._flg,{analyzerHeight:Se,centerX:Ee,centerY:Ae,channelCoords:Re,channelHeight:Te,channelGap:we,initialX:Pe,innerRadius:Ie,outerRadius:Me}=this._aux,{_bars:Oe,canvas:Le,_canvasGradients:Ne,_chLayout:Ve,_colorMode:Xe,_ctx:Ue,_energy:We,fillAlpha:ze,_fps:He,_linearAmplitude:je,_lineWidth:$e,maxDecibels:De,minDecibels:Fe,_mirror:ke,_mode:Ge,overlay:Be,_radial:qe,showBgColor:Ke,showPeaks:Ye,useCanvas:Qe,_weightingFilter:Ze}=this,it=this._scaleX.canvas,at=this._scaleR.canvas,st=He>>1,Je=Ve==CHANNEL_COMBINED,et=Ve==CHANNEL_HORIZONTAL,nt=Ve==CHANNEL_VERTICAL,rt=Ve==CHANNEL_SINGLE,tt=Y&&this._trueLeds&&Xe==COLOR_GRADIENT,ot=qe?Le.width:this._aux.analyzerWidth,ut=Pe+ot,mt=Ye&&this._peakLine&&Ge==MODE_GRAPH,pt=qe?Me-Ie:Se,[yt,gt,_t,Pt]=this._leds||[];We.val>0&&(this._spinAngle+=this._spinSpeed*TAU/(60*He));const It=lt=>{if(this._reflexRatio>0&&!K&&!qe){let dt,$t;this.reflexFit||nt?(dt=nt&&lt==0?Te+we:0,$t=Te-Se):(dt=Le.height-Se*2,$t=Se),Ue.save(),Ue.globalAlpha=this.reflexAlpha,this.reflexBright!=1&&(Ue.filter=`brightness(${this.reflexBright})`),Ue.setTransform(1,0,0,-1,0,Le.height),Ue.drawImage(Le,0,Re[lt].channelTop,Le.width,Se,0,dt,Le.width,$t),Ue.restore()}},St=()=>{this.showScaleX&&(qe?(Ue.save(),Ue.translate(Ee,Ae),this._spinSpeed&&Ue.rotate(this._spinAngle+HALF_PI),Ue.drawImage(at,-at.width>>1,-at.width>>1),Ue.restore()):Ue.drawImage(it,0,Le.height-it.height))},Lt=lt=>{const dt=lt**2,$t=424.36,Et=11599.29,Jt=25122.25,Bt=544496.41,Dt=148693636,zt=Ht=>20*Math.log10(Ht);switch(Ze){case FILTER_A:const Ht=Dt*dt**2/((dt+$t)*Math.sqrt((dt+Et)*(dt+Bt))*(dt+Dt));return 2+zt(Ht);case FILTER_B:const jt=Dt*dt*lt/((dt+$t)*Math.sqrt(dt+Jt)*(dt+Dt));return .17+zt(jt);case FILTER_C:const rr=Dt*dt/((dt+$t)*(dt+Dt));return .06+zt(rr);case FILTER_D:const Qt=((103791848e-2-dt)**2+108076816e-2*dt)/((9837328-dt)**2+11723776*dt),ir=lt/68966888496476e-18*Math.sqrt(Qt/((dt+79919.29)*(dt+1345600)));return zt(ir);case FILTER_468:const er=-4737338981378384e-39*lt**6+2043828333606125e-30*lt**4-1363894795463638e-22*dt+1,Xt=1306612257412824e-34*lt**5-2118150887518656e-26*lt**3+.0005559488023498642*lt,Rt=.0001246332637532143*lt/Math.hypot(er,Xt);return 18.2+zt(Rt)}return 0},At=(lt,dt,$t)=>{Ue.beginPath(),Ue.moveTo(lt,dt),Ue.lineTo(lt,$t),Ue.stroke()},kt=lt=>{if(lt&&$e){const dt=Ue.globalAlpha;Ue.globalAlpha=1,Ue.stroke(),Ue.globalAlpha=dt}},Mt=lt=>Math.max(0,(lt*yt|0)*(Pt+_t)-_t),qt=lt=>{We.val=lt,We.peak>0&&(We.hold--,We.hold<0&&(We.peak+=We.hold/(st*st/2))),lt>=We.peak&&(We.peak=lt,We.hold=st)};Be&&Ue.clearRect(0,0,Le.width,Le.height);let Vt=0;const ar=Oe.length,or=rt?1:2;for(let lt=0;lt<or;lt++){const{channelTop:dt,channelBottom:$t,analyzerBottom:Et}=Re[lt],Jt=this._gradients[this._selectedGrads[lt]],Bt=Jt.colorStops,Dt=Bt.length,zt=!Ke||Y&&!Be?"#000":Jt.bgColor,Ht=nt&&qe&&lt?-1:1,jt=!lt&&ke==-1||lt&&ke==1,rr=!et||lt&&ke!=1?0:ot>>(lt||!jt),Qt=et&&jt?-1:1,ir=()=>{const ht=it.height,ft=ht>>1,ct=je?100:De,vt=je?0:Fe,bt=je?20:5,wt=Se/(ct-vt),Nt=ke!=-1&&(!et||lt==0||ke==1),Gt=ke!=1&&(!et||lt!=ke);Ue.save(),Ue.fillStyle=SCALEY_LABEL_COLOR,Ue.font=`${ft}px ${FONT_FAMILY}`,Ue.textAlign="right",Ue.lineWidth=1;for(let Ut=ct;Ut>vt;Ut-=bt){const Yt=dt+(ct-Ut)*wt,Tt=Ut%2==0|0;if(Tt){const Ct=Yt+ft*(Yt==dt?.8:.35);Nt&&Ue.fillText(Ut,ht*.85,Ct),Gt&&Ue.fillText(Ut,(et?ot:Le.width)-ht*.1,Ct),Ue.strokeStyle=SCALEY_LABEL_COLOR,Ue.setLineDash([2,4]),Ue.lineDashOffset=0}else Ue.strokeStyle=SCALEY_MIDLINE_COLOR,Ue.setLineDash([2,8]),Ue.lineDashOffset=1;Ue.beginPath(),Ue.moveTo(Pe+ht*Tt*Nt,~~Yt+.5),Ue.lineTo(ut-ht*Tt*Gt,~~Yt+.5),Ue.stroke()}Ue.restore()},er=(ht,ft)=>{const ct=Ot[ht]+(ht<Ot.length-1?(Ot[ht+1]-Ot[ht])*ft:0);return isNaN(ct)?-1/0:ct},Xt=(ht,ft=Qt)=>ft*TAU*((ht+rr)/Le.width)+this._spinAngle,Rt=(ht,ft,ct)=>{const vt=Ie+ft*Ht,bt=Xt(ht,ct);return[Ee+vt*Math.cos(bt),Ae+vt*Math.sin(bt)]},sr=(ht,ft,ct,vt,bt)=>{Ue.beginPath();for(const wt of ke&&!et?[1,-1]:[Qt]){const[Nt,Gt]=Z?[Xt(ht,wt),Xt(ht+ct,wt)]:[];Ue.moveTo(...Rt(ht,ft,wt)),Ue.lineTo(...Rt(ht,ft+vt,wt)),Z?Ue.arc(Ee,Ae,Ie+(ft+vt)*Ht,Nt,Gt,wt!=1):Ue.lineTo(...Rt(ht+ct,ft+vt,wt)),Ue.lineTo(...Rt(ht+ct,ft,wt)),Z&&!bt&&Ue.arc(Ee,Ae,Ie+ft*Ht,Gt,Nt,wt==1)}kt(bt),Ue.fill()},nr=(ht=0,ft=0)=>{let ct;if(Xe==COLOR_GRADIENT&&!tt||Ge==MODE_GRAPH)ct=Ne[lt];else{const vt=Xe==COLOR_BAR_INDEX?ft%Dt:Bt.findLastIndex(bt=>Y?Mt(ht)<=Mt(bt.level):ht<=bt.level);ct=Bt[vt].color}Ue.fillStyle=Ue.strokeStyle=ct};if(Qe){if(et&&!qe){const ht=ot*(lt+jt),ft=jt?-1:1;Ue.setTransform(ft,0,0,1,ht,0)}if((!Be||Ke)&&(Be&&(Ue.globalAlpha=this.bgAlpha),Ue.fillStyle=zt,(lt==0||!qe&&!Je)&&Ue.fillRect(Pe,dt-we,ot,(Be&&this.reflexAlpha==1?Se:Te)+we),Ue.globalAlpha=1),this.showScaleY&&!K&&!qe&&(lt==0||!Je)&&ir(),Y?(Ue.setLineDash([Pt,_t]),Ue.lineWidth=Oe[0].width):Ue.lineWidth=xe?Math.min($e,Oe[0].width/2):$e,Ue.save(),!qe){const ht=new Path2D;ht.rect(0,dt,Le.width,Se),Ue.clip(ht)}}let Ot=this._fftData[lt];this._analyzer[lt].getFloatFrequencyData(Ot),Ze&&(Ot=Ot.map((ht,ft)=>ht+Lt(this._binToFreq(ft)))),Ue.beginPath();let Zt=[];for(let ht=0;ht<ar;ht++){const ft=Oe[ht],{posX:ct,barCenter:vt,width:bt,freq:wt,binLo:Nt,binHi:Gt,ratioLo:Ut,ratioHi:Yt}=ft;let Tt=Math.max(er(Nt,Ut),er(Gt,Yt));for(let xt=Nt+1;xt<Gt;xt++)Ot[xt]>Tt&&(Tt=Ot[xt]);if(Tt=this._normalizedB(Tt),ft.value[lt]=Tt,Vt+=Tt,ft.peak[lt]>0&&(ft.hold[lt]--,ft.hold[lt]<0&&(ft.peak[lt]+=ft.hold[lt]/(st*st/2))),Tt>=ft.peak[lt]&&(ft.peak[lt]=Tt,ft.hold[lt]=st),!Qe)continue;K||V?Ue.globalAlpha=Tt:xe&&(Ue.globalAlpha=ze),nr(Tt,ht);const Ct=K?pt:Y?Mt(Tt):Tt*pt|0;if(Ge==MODE_GRAPH){const xt=ht?0:(this._normalizedB(Ot[Oe[1].binLo])*pt+Ct)/2;if(qe){if(ht==0&&(et&&Ue.moveTo(...Rt(0,0)),Ue.lineTo(...Rt(0,ct<0?xt:Ct))),ct>=0){const Ft=[ct,Ct];Ue.lineTo(...Rt(...Ft)),Zt.push(Ft)}}else{if(ht==0)if(ke==-1&&!et)Ue.moveTo(Pe,Et-(ct<Pe?xt:Ct));else{const Ft=Nt?this._normalizedB(Ot[Nt-1])*pt:Ct;Ue.moveTo(Pe-$e,Et-Ft)}(et||ke!=-1||ct>=Pe)&&Ue.lineTo(ct,Et-Ct)}}else if(Y){if(Ke&&!Be&&(lt==0||!Je)){const xt=Ue.globalAlpha;Ue.strokeStyle=LEDS_UNLIT_COLOR,Ue.globalAlpha=1,At(vt,dt,Et),Ue.strokeStyle=Ue.fillStyle,Ue.globalAlpha=xt}if(tt){const xt=K?0:Bt.findLastIndex(Wt=>Mt(Tt)<=Mt(Wt.level));let Ft=Et;for(let Wt=Dt-1;Wt>=xt;Wt--){Ue.strokeStyle=Bt[Wt].color;let lr=Et-(Wt==xt?Ct:Mt(Bt[Wt].level));At(vt,Ft,lr),Ft=lr-_t}}else At(vt,Et,Et-Ct)}else if(ct>=Pe)if(qe)sr(ct,0,bt,Ct,xe);else if(Z){const xt=bt/2,Ft=Et+xt;Ue.beginPath(),Ue.moveTo(ct,Ft),Ue.lineTo(ct,Ft-Ct),Ue.arc(vt,Ft-Ct,xt,PI,TAU),Ue.lineTo(ct+bt,Ft),kt(xe),Ue.fill()}else{const xt=xe?Ue.lineWidth:0;Ue.beginPath(),Ue.rect(ct,Et+xt,bt,-Ct-xt),kt(xe),Ue.fill()}const Kt=ft.peak[lt];if(Kt>0&&Ye&&!mt&&!K&&ct>=Pe&&ct<ut)if(xe&&$e>0?Ue.globalAlpha=1:V&&(Ue.globalAlpha=Kt),(Xe==COLOR_BAR_LEVEL||tt)&&nr(Kt),Y){const xt=Mt(Kt);xt>=_t&&Ue.fillRect(ct,Et-xt,bt,Pt)}else qe?Ge!=MODE_GRAPH&&sr(ct,Kt*pt,bt,-2):Ue.fillRect(ct,Et-Kt*pt,bt,2)}if(Qe){if(Ue.globalAlpha=1,Ge==MODE_GRAPH){if(nr(),qe&&!et){if(ke){let ht;for(;ht=Zt.pop();)Ue.lineTo(...Rt(...ht,-1))}Ue.closePath()}if($e>0&&Ue.stroke(),ze>0){if(qe){const ht=et?Xt(ot>>1):0,ft=et?Xt(ot):TAU;Ue.moveTo(...Rt(et?ot>>1:0,0)),Ue.arc(Ee,Ae,Ie,ht,ft,et?!jt:!0)}else Ue.lineTo(ut,Et),Ue.lineTo(Pe,Et);Ue.globalAlpha=ze,Ue.fill(),Ue.globalAlpha=1}if((mt||qe&&Ye)&&(Zt=[],Ue.beginPath(),Oe.forEach((ht,ft)=>{let ct=ht.posX,vt=ht.peak[lt],bt=ft?"lineTo":"moveTo";if(qe&&ct<0){const wt=Oe[ft+1];vt=findY(ct,vt,wt.posX,wt.peak[lt],0),ct=0}vt*=pt,mt?(Ue[bt](...qe?Rt(ct,vt):[ct,Et-vt]),qe&&ke&&!et&&Zt.push([ct,vt])):vt>0&&sr(ct,vt,1,-2)}),mt)){let ht;for(;ht=Zt.pop();)Ue.lineTo(...Rt(...ht,-1));Ue.lineWidth=1,Ue.stroke()}}Ue.restore(),et&&!qe&&Ue.setTransform(1,0,0,1,0,0),(!et&&!Je||lt)&&It(lt)}}if(qt(Vt/(ar<<or-1)),Qe&&(ke&&!qe&&!et&&(Ue.setTransform(-1,0,0,1,Le.width-Pe,0),Ue.drawImage(Le,Pe,0,Ee,Le.height,0,0,Ee,Le.height),Ue.setTransform(1,0,0,1,0,0)),Ue.setLineDash([]),St()),this.showFPS){const lt=it.height;Ue.font=`bold ${lt}px ${FONT_FAMILY}`,Ue.fillStyle=FPS_COLOR,Ue.textAlign="right",Ue.fillText(Math.round(He),Le.width-lt,lt*2)}this.onCanvasDraw&&(Ue.save(),Ue.fillStyle=Ue.strokeStyle=Ne[0],this.onCanvasDraw(this,{timestamp:E,_canvasGradients:Ne}),Ue.restore())}_freqScaling(E){switch(this._frequencyScale){case SCALE_LOG:return Math.log2(E);case SCALE_BARK:return 26.81*E/(1960+E)-.53;case SCALE_MEL:return Math.log2(1+E/700);case SCALE_LINEAR:return E}}_freqToBin(E,I="round"){const B=this._analyzer[0].frequencyBinCount-1,U=Math[I](E*this.fftSize/this.audioCtx.sampleRate);return U<B?U:B}_makeGrad(){if(!this._ready)return;const{canvas:E,_ctx:I,_radial:B,_reflexRatio:U}=this,{analyzerWidth:V,centerX:X,centerY:Y,initialX:K,innerRadius:J,outerRadius:xe}=this._aux,{isLumi:Z}=this._flg,_e=this._chLayout==CHANNEL_VERTICAL,Se=1-U,Ee=Z?E.height:E.height*(1-U*!_e)|0;for(const Ae of[0,1]){const Re=this._gradients[this._selectedGrads[Ae]],Te=Re.colorStops,we=Re.dir=="h";let Pe;if(B?Pe=I.createRadialGradient(X,Y,xe,X,Y,J-(xe-J)*_e):Pe=I.createLinearGradient(...we?[K,0,K+V,0]:[0,0,0,Ee]),Te){const Ie=_e&&!this._splitGradient&&(!we||B);for(let Me=0;Me<1+Ie;Me++){const Oe=Te.length-1;Te.forEach((Le,Ne)=>{let Ve=Le.pos;if(Ie&&(Ve/=2),_e&&!Z&&!B&&!we&&(Ve*=Se,!Ie&&Ve>.5*Se&&(Ve+=.5*U)),Me==1)if(B||Z){const Xe=Oe-Ne;Le=Te[Xe],Ve=1-Le.pos/2}else Ne==0&&Ve>0&&Pe.addColorStop(.5,Le.color),Ve+=.5;Pe.addColorStop(Ve,Le.color),_e&&Ne==Oe&&Ve<.5&&Pe.addColorStop(.5,Le.color)})}}this._canvasGradients[Ae]=Pe}}_normalizedB(E){const I=this._linearAmplitude,B=I?1/this._linearBoost:1,U=(K,J,xe)=>K<=J?J:K>=xe?xe:K,V=K=>10**(K/20);let X=this.maxDecibels,Y=this.minDecibels;return I&&(X=V(X),Y=V(Y),E=V(E)**B),U((E-Y)/(X-Y)**B,0,1)}_setCanvas(E){if(!this._ready)return;const{canvas:I,_ctx:B}=this,U=this._scaleX.canvas,V=window.devicePixelRatio/(this._loRes+1);let X=window.screen.width*V,Y=window.screen.height*V;Math.abs(window.orientation)==90&&X<Y&&([X,Y]=[Y,X]);const K=this.isFullscreen,J=K&&this._fsEl==I,xe=J?X:(this._width||this._container.clientWidth||this._defaultWidth)*V|0,Z=J?Y:(this._height||this._container.clientHeight||this._defaultHeight)*V|0;this._pixelRatio=V,this._fsWidth=X,this._fsHeight=Y,!(I.width==xe&&I.height==Z)&&(I.width=xe,I.height=Z,this.overlay||(B.fillStyle="#000",B.fillRect(0,0,xe,Z)),B.lineJoin="bevel",U.width=xe,U.height=Math.max(20*V,Math.min(xe,Z)/32|0),this._calcBars(),this._makeGrad(),this._fsStatus!==void 0&&this._fsStatus!==K&&(E=REASON_FSCHANGE),this._fsStatus=K,this.onCanvasResize&&this.onCanvasResize(E,this))}_setGradient(E,I){if(!this._gradients.hasOwnProperty(E))throw new AudioMotionError(ERR_UNKNOWN_GRADIENT,E);[0,1].includes(I)||(this._selectedGrads[1]=E,I=0),this._selectedGrads[I]=E,this._makeGrad()}_setProps(E,I){const B={alphaBars:!1,ansiBands:!1,barSpace:.1,bgAlpha:.7,channelLayout:CHANNEL_SINGLE,colorMode:COLOR_GRADIENT,fftSize:8192,fillAlpha:1,frequencyScale:SCALE_LOG,gradient:GRADIENTS[0][0],ledBars:!1,linearAmplitude:!1,linearBoost:1,lineWidth:0,loRes:!1,lumiBars:!1,maxDecibels:-25,maxFPS:0,maxFreq:22e3,minDecibels:-85,minFreq:20,mirror:0,mode:0,noteLabels:!1,outlineBars:!1,overlay:!1,peakLine:!1,radial:!1,reflexAlpha:.15,reflexBright:1,reflexFit:!0,reflexRatio:0,roundBars:!1,showBgColor:!0,showFPS:!1,showPeaks:!0,showScaleX:!0,showScaleY:!1,smoothing:.5,spinSpeed:0,splitGradient:!1,start:!0,trueLeds:!1,useCanvas:!0,volume:1,weightingFilter:FILTER_NONE},U=["onCanvasDraw","onCanvasResize"],V=["gradientLeft","gradientRight","height","width","stereo"],X=Object.keys(B).filter(Y=>Y!="start").concat(U,V);(I||E===void 0)&&(E={...B,...E});for(const Y of Object.keys(E))U.includes(Y)&&typeof E[Y]!="function"?this[Y]=void 0:X.includes(Y)&&(this[Y]=E[Y]);E.start!==void 0&&this.toggleAnalyzer(E.start)}}const waveConfig={[Waveforms.NONE]:{mode:2},[Waveforms.ROUNDBARS]:{mode:2,alphaBars:!1,ansiBands:!1,barSpace:.25,channelLayout:"single",colorMode:"bar-level",frequencyScale:"log",gradient:"prism",ledBars:!1,linearAmplitude:!0,linearBoost:1.6,lumiBars:!1,maxFreq:16e3,minFreq:30,mirror:0,radial:!1,reflexRatio:.3,reflexAlpha:1,roundBars:!0,showPeaks:!1,showScaleX:!1,showScaleY:!1,smoothing:.7,weightingFilter:"D"},[Waveforms.LED]:{mode:3,barSpace:.6,ledBars:!0,showScaleX:!1,showScaleY:!1},[Waveforms.RADIAL_SPECTRUM]:{mode:3,barSpace:.25,bgAlpha:.5,fillAlpha:.5,gradient:"prism",ledBars:!1,linearAmplitude:!0,linearBoost:1.8,lineWidth:1.5,maxDecibels:-30,maxFreq:16e3,radial:!0,showBgColor:!0,showPeaks:!0,spinSpeed:2,outlineBars:!0,showScaleX:!1,showScaleY:!1,reflexFit:!0},[Waveforms.LUMI_BARS]:{mode:3,barSpace:.6,lumiBars:!0,reflexRatio:.5,fillAlpha:.3,frequencyScale:"bark",gradientLeft:"steelblue",gradientRight:"orangered",showScaleX:!1,showScaleY:!1},[Waveforms.EQUALIZER]:{mode:2,gradient:"rainbow",lineWidth:1.5,fillAlpha:.5,showPeaks:!1,showScaleX:!1,showScaleY:!1}},initalTransforms={x:0,y:0,width:0,height:0,anchor:.5,maxX:0,maxY:0,scale:1,rotation:0,waveform:Waveforms.NONE},useAudioVisualizer=C=>{const E=React__namespace.useRef(),I=React.useRef(document.body),B=React__namespace.useRef(),[U,V]=React__namespace.useState(""),{uniqueId:X,src:Y,transformation:K=initalTransforms}=C,{waveform:J=Waveforms.NONE,width:xe=300,height:Z=300}=K,_e=async Se=>{try{return await fetch(Se,{mode:"cors",referrerPolicy:"no-referrer-when-downgrade"})}catch(Ee){const Ae=Ee;throw Ae.message.includes("Failed to fetch")||Ae.message.includes("Load failed")||Ae.message.includes("NetworkError when attempting to fetch resource")?new TypeError(`Failed to read from ${Se}: ${Ae.message}. Does the resource support CORS?`):Ee}};return React__namespace.useEffect(()=>()=>{isEmpty$1(U)||URL.revokeObjectURL(U),B.current},[U]),React__namespace.useEffect(()=>{const Se=waveConfig[J]||{};if(console.log("waveFormCOnfig",Se),E.current&&(I.current.removeChild(E.current),E.current=void 0),J!==Waveforms.NONE){E.current=document.createElement("div"),E.current.setAttribute("id",`${X}${J}audioContainer`),I.current.appendChild(E.current);const Ae=new AudioMotionAnalyzer(E.current,{audioCtx:Howler.ctx,height:Z,width:xe,...Se});B.current=Ae}return(async()=>{if(!isEmpty$1(Y)){const Re=await(await _e(Y)).arrayBuffer(),Te=new Blob([Re]),we=URL.createObjectURL(Te);V(we),E.current&&(E.current.style.display="none")}})(),()=>{E.current&&I.current&&(console.log("clearing the canvas",E.current),I.current.removeChild(E.current),E.current=void 0)}},[J,Y,X,xe,Z]),{audioMotionRef:B,blobUrl:U,canvasRef:E}},PixiAudioSprite=React__namespace.forwardRef((C,E)=>{const I={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,B]=React__namespace.useState(!1),[U,V]=React__namespace.useState(!1),X=React.useRef(null),Y=React.useRef(I),K=React.useRef(null),J=React__namespace.useRef(null),xe=React.useRef(null),Z=React__namespace.useRef(),{tl:_e,dragModeRef:Se}=React.useContext(GsapPixieContext),{uniqueId:Ee,src:Ae,startAt:Re,endAt:Te,mute:we,speed:Pe,audioStartAt:Ie,audioEndAt:Me,visible:Oe=!1,transformation:Le}=C,{width:Ne=300,height:Ve=300,x:Xe=100,y:Ue=100,waveform:We=Waveforms.NONE}=Le||{},{audioMotionRef:ze,blobUrl:He,canvasRef:je}=useAudioVisualizer({uniqueId:Ee,src:Ae,transformation:Le});useCustomEventListener(Events.PAUSE,()=>{var Ge;X.current&&J.current&&((Ge=J.current)==null||Ge.pause(),Y.current.isPlaying=!1)}),useCustomEventListener(Events.COMPLETE,()=>{Ie>0&&J.current&&J.current.seek(Ie)}),useCustomEventListener(Events.SCRUBBER_CLICKED,()=>{var Ge;X.current&&J.current&&((Ge=J.current)==null||Ge.pause(),Y.current.isPlaying=!1)}),React__namespace.useEffect(()=>{J.current&&(Se.current?(J.current.pause(),Y.current.isPlaying=!1,Y.current.isDragging=!0):Y.current.isDragging=!1)},[Se]);const $e=(Ge,Be)=>{_e.current&&_e.current.isActive()&&K.current&&K.current.isActive()&&!Se.current&&J.current&&(console.log("gsap on start 0020",Ee,Ge,Be),J.current.play(),Y.current.isPlaying=!0)},De=()=>{var Ge;X.current&&((Ge=J.current)==null||Ge.stop(),Y.current.isPlaying=!1,Y.current.completed=!0)},Fe=Ge=>{var qe,Ke;const Be=Ge+((qe=K.current)==null?void 0:qe.time());J.current&&Se.current?(J.current.seek(Be),J.current.pause(),Y.current.isPlaying=!1):X.current&&!Y.current.isPlaying&&((Ke=_e.current)!=null&&Ke.isActive())&&J.current&&(J.current.seek(Be),J.current.play(),Y.current.isPlaying=!0),Z.current&&Z.current.update()},ke=()=>{};return React.useEffect(()=>{let Ge=gsap$2.context(()=>{});if(X.current&&_e.current){const Be={duration:Number(Me)-Number(Ie),onStart:$e,onComplete:De,onStartParams:[Ie,Me],onCompleteParams:[],onInterrupt:ke,onUpdate:Fe,onUpdateParams:[Ie,Me],id:Ee};Ge=gsap$2.context(()=>{K.current=gsap$2.from(X.current,Be,Ie),_e.current.to(X.current,{alpha:1,duration:.01},Re).to(X.current,{alpha:0,duration:.1},Number(Te)),_e.current.add(K.current,Re)})}return()=>{K.current&&(K.current.kill(),gsap$2.killTweensOf(K.current)),Ge.revert()}},[Re,Te,Ie,Me,Ee]),React__namespace.useEffect(()=>(X.current&&B(!0),()=>{console.log("unmounting audio sprite",Ee),console.log("audioContainerRef.current",J.current)}),[]),React__namespace.useEffect(()=>(Z.current&&Z.current.update(),()=>{}),[U]),React__namespace.useEffect(()=>(isEmpty$1(He)||(J.current=new howler.Howl({src:[He],format:["mp3"],html5:!0,autoplay:!1,loop:!1,rate:Pe||1,onload:()=>{var Ge;if(Y.current.loaded=!0,J.current&&(Ie>0&&J.current.seek(Ie),J.current.volume(!we&&Oe?1:0),J.current.rate(Pe||1),J.current.pause(),Y.current.isPlaying=!1,Y.current.completed=!1,ze.current&&J.current)){console.log("reconnecting the audio motion analyser");try{ze.current.connectInput(J.current._sounds[0]._node)}catch(qe){console.log("error connecting audio motion"),console.log(qe)}const Be=PIXI__namespace.Texture.from(ze.current._fsEl,{pixiIdPrefix:`${(Ge=ze.current._container)==null?void 0:Ge.id}`});Z.current=Be,je.current&&je.current.setAttribute("style","display:none"),V(!0)}},onend:()=>{console.log("end of playing audio sprite"+Ee),Y.current.isPlaying=!1,Y.current.completed=!0},onplay:()=>{console.log("play of playing audio sprite"+Ee),Y.current.isPlaying=!0},onpause:()=>{console.log("pause of playing audio sprite"+Ee),Y.current.isPlaying=!1},onstop:()=>{console.log("stop of playing audio sprite"+Ee),Y.current.isPlaying=!1}}),Howler.ctx.resume().then(()=>{console.log("audio ctx resumed")})),()=>{console.log("unmounting the howler useeffect"),ze.current,J.current&&(J.current.stop(),J.current.unload(),J.current=void 0)}),[Ee,Ae,Re,Te,Ie,Me,we,Oe,Pe,He]),React__namespace.useEffect(()=>{J.current&&(console.log("running updateEffect 2002",Ee,Me),J.current.volume(!we&&Oe?1:0),J.current.rate(Pe||1),Y.current.isPlaying=!0)},[we,Oe,Pe]),jsxRuntimeExports.jsx(react.Container,{ref:X,children:We!==Waveforms.NONE&&U&&Z.current&&jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,isGif:!0,children:jsxRuntimeExports.jsx(react.Sprite,{texture:Z.current,width:Ne,height:Ve,anchor:.5,x:Xe,y:Ue,ref:xe,alpha:Oe?1:0})})})});function arrayMap$2(C,E){for(var I=-1,B=C==null?0:C.length,U=Array(B);++I<B;)U[I]=E(C[I],I,C);return U}var _arrayMap=arrayMap$2,Stack=_Stack,baseIsEqual$1=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(C,E,I,B){var U=I.length,V=U,X=!B;if(C==null)return!V;for(C=Object(C);U--;){var Y=I[U];if(X&&Y[2]?Y[1]!==C[Y[0]]:!(Y[0]in C))return!1}for(;++U<V;){Y=I[U];var K=Y[0],J=C[K],xe=Y[1];if(X&&Y[2]){if(J===void 0&&!(K in C))return!1}else{var Z=new Stack;if(B)var _e=B(J,xe,K,C,E,Z);if(!(_e===void 0?baseIsEqual$1(xe,J,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,B,Z):_e))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject$2=isObject_1;function isStrictComparable$2(C){return C===C&&!isObject$2(C)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$1=keys_1;function getMatchData$1(C){for(var E=keys$1(C),I=E.length;I--;){var B=E[I],U=C[B];E[I]=[B,U,isStrictComparable$1(U)]}return E}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(C,E){return function(I){return I==null?!1:I[C]===E&&(E!==void 0||C in Object(I))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(C){var E=getMatchData(C);return E.length==1&&E[0][2]?matchesStrictComparable$1(E[0][0],E[0][1]):function(I){return I===C||baseIsMatch(I,C,E)}}var _baseMatches=baseMatches$1,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$4(C){return typeof C=="symbol"||isObjectLike(C)&&baseGetTag(C)==symbolTag}var isSymbol_1=isSymbol$4,isArray$5=isArray_1,isSymbol$3=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$3(C,E){if(isArray$5(C))return!1;var I=typeof C;return I=="number"||I=="symbol"||I=="boolean"||C==null||isSymbol$3(C)?!0:reIsPlainProp.test(C)||!reIsDeepProp.test(C)||E!=null&&C in Object(E)}var _isKey=isKey$3,MapCache=_MapCache,FUNC_ERROR_TEXT$1="Expected a function";function memoize$1(C,E){if(typeof C!="function"||E!=null&&typeof E!="function")throw new TypeError(FUNC_ERROR_TEXT$1);var I=function(){var B=arguments,U=E?E.apply(this,B):B[0],V=I.cache;if(V.has(U))return V.get(U);var X=C.apply(this,B);return I.cache=V.set(U,X)||V,X};return I.cache=new(memoize$1.Cache||MapCache),I}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(C){var E=memoize(C,function(B){return I.size===MAX_MEMOIZE_SIZE&&I.clear(),B}),I=E.cache;return E}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped(function(C){var E=[];return C.charCodeAt(0)===46&&E.push(""),C.replace(rePropName,function(I,B,U,V){E.push(U?V.replace(reEscapeChar,"$1"):B||I)}),E}),_stringToPath=stringToPath$1,Symbol$1=_Symbol,arrayMap$1=_arrayMap,isArray$4=isArray_1,isSymbol$2=isSymbol_1,INFINITY$1=1/0,symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(C){if(typeof C=="string")return C;if(isArray$4(C))return arrayMap$1(C,baseToString$1)+"";if(isSymbol$2(C))return symbolToString?symbolToString.call(C):"";var E=C+"";return E=="0"&&1/C==-INFINITY$1?"-0":E}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(C){return C==null?"":baseToString(C)}var toString_1=toString$1,isArray$3=isArray_1,isKey$2=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$2(C,E){return isArray$3(C)?C:isKey$2(C,E)?[C]:stringToPath(toString(C))}var _castPath=castPath$2,isSymbol$1=isSymbol_1,INFINITY=1/0;function toKey$4(C){if(typeof C=="string"||isSymbol$1(C))return C;var E=C+"";return E=="0"&&1/C==-INFINITY?"-0":E}var _toKey=toKey$4,castPath$1=_castPath,toKey$3=_toKey;function baseGet$2(C,E){E=castPath$1(E,C);for(var I=0,B=E.length;C!=null&&I<B;)C=C[toKey$3(E[I++])];return I&&I==B?C:void 0}var _baseGet=baseGet$2,baseGet$1=_baseGet;function get$1(C,E,I){var B=C==null?void 0:baseGet$1(C,E);return B===void 0?I:B}var get_1=get$1;function baseHasIn$1(C,E){return C!=null&&E in Object(C)}var _baseHasIn=baseHasIn$1,castPath=_castPath,isArguments=isArguments_1,isArray$2=isArray_1,isIndex=_isIndex,isLength=isLength_1,toKey$2=_toKey;function hasPath$1(C,E,I){E=castPath(E,C);for(var B=-1,U=E.length,V=!1;++B<U;){var X=toKey$2(E[B]);if(!(V=C!=null&&I(C,X)))break;C=C[X]}return V||++B!=U?V:(U=C==null?0:C.length,!!U&&isLength(U)&&isIndex(X,U)&&(isArray$2(C)||isArguments(C)))}var _hasPath=hasPath$1,baseHasIn=_baseHasIn,hasPath=_hasPath;function hasIn$1(C,E){return C!=null&&hasPath(C,E,baseHasIn)}var hasIn_1=hasIn$1,baseIsEqual=_baseIsEqual,get=get_1,hasIn=hasIn_1,isKey$1=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$1=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(C,E){return isKey$1(C)&&isStrictComparable(E)?matchesStrictComparable(toKey$1(C),E):function(I){var B=get(I,C);return B===void 0&&B===E?hasIn(I,C):baseIsEqual(E,B,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1;function identity$1(C){return C}var identity_1=identity$1;function baseProperty$1(C){return function(E){return E==null?void 0:E[C]}}var _baseProperty=baseProperty$1,baseGet=_baseGet;function basePropertyDeep$1(C){return function(E){return baseGet(E,C)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey=_isKey,toKey=_toKey;function property$1(C){return isKey(C)?baseProperty(toKey(C)):basePropertyDeep(C)}var property_1=property$1,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity=identity_1,isArray$1=isArray_1,property=property_1;function baseIteratee$1(C){return typeof C=="function"?C:C==null?identity:typeof C=="object"?isArray$1(C)?baseMatchesProperty(C[0],C[1]):baseMatches(C):property(C)}var _baseIteratee=baseIteratee$1;function createBaseFor$1(C){return function(E,I,B){for(var U=-1,V=Object(E),X=B(E),Y=X.length;Y--;){var K=X[C?Y:++U];if(I(V[K],K,V)===!1)break}return E}}var _createBaseFor=createBaseFor$1,createBaseFor=_createBaseFor,baseFor$1=createBaseFor(),_baseFor=baseFor$1,baseFor=_baseFor,keys=keys_1;function baseForOwn$1(C,E){return C&&baseFor(C,E,keys)}var _baseForOwn=baseForOwn$1,isArrayLike$1=isArrayLike_1;function createBaseEach$1(C,E){return function(I,B){if(I==null)return I;if(!isArrayLike$1(I))return C(I,B);for(var U=I.length,V=E?U:-1,X=Object(I);(E?V--:++V<U)&&B(X[V],V,X)!==!1;);return I}}var _createBaseEach=createBaseEach$1,baseForOwn=_baseForOwn,createBaseEach=_createBaseEach,baseEach$1=createBaseEach(baseForOwn),_baseEach=baseEach$1,baseEach=_baseEach,isArrayLike=isArrayLike_1;function baseMap$1(C,E){var I=-1,B=isArrayLike(C)?Array(C.length):[];return baseEach(C,function(U,V,X){B[++I]=E(U,V,X)}),B}var _baseMap=baseMap$1,arrayMap=_arrayMap,baseIteratee=_baseIteratee,baseMap=_baseMap,isArray=isArray_1;function map(C,E){var I=isArray(C)?arrayMap:baseMap;return I(C,baseIteratee(E))}var map_1=map;const map$1=getDefaultExportFromCjs(map_1);var lib$1={},gif={},lib={};Object.defineProperty(lib,"__esModule",{value:!0}),lib.loop=lib.conditional=lib.parse=void 0;var parse=function C(E,I){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},U=arguments.length>3&&arguments[3]!==void 0?arguments[3]:B;if(Array.isArray(I))I.forEach(function(X){return C(E,X,B,U)});else if(typeof I=="function")I(E,B,U,C);else{var V=Object.keys(I)[0];Array.isArray(I[V])?(U[V]={},C(E,I[V],B,U[V])):U[V]=I[V](E,B,U,C)}return B};lib.parse=parse;var conditional=function(E,I){return function(B,U,V,X){I(B,U,V)&&X(B,E,U,V)}};lib.conditional=conditional;var loop=function(E,I){return function(B,U,V,X){for(var Y=[],K=B.pos;I(B,U,V);){var J={};if(X(B,E,U,J),B.pos===K)break;K=B.pos,Y.push(J)}return Y}};lib.loop=loop;var uint8={};Object.defineProperty(uint8,"__esModule",{value:!0}),uint8.readBits=uint8.readArray=uint8.readUnsigned=uint8.readString=uint8.peekBytes=uint8.readBytes=uint8.peekByte=uint8.readByte=uint8.buildStream=void 0;var buildStream=function(E){return{data:E,pos:0}};uint8.buildStream=buildStream;var readByte=function(){return function(E){return E.data[E.pos++]}};uint8.readByte=readByte;var peekByte=function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(I){return I.data[I.pos+E]}};uint8.peekByte=peekByte;var readBytes=function(E){return function(I){return I.data.subarray(I.pos,I.pos+=E)}};uint8.readBytes=readBytes;var peekBytes=function(E){return function(I){return I.data.subarray(I.pos,I.pos+E)}};uint8.peekBytes=peekBytes;var readString=function(E){return function(I){return Array.from(readBytes(E)(I)).map(function(B){return String.fromCharCode(B)}).join("")}};uint8.readString=readString;var readUnsigned=function(E){return function(I){var B=readBytes(2)(I);return E?(B[1]<<8)+B[0]:(B[0]<<8)+B[1]}};uint8.readUnsigned=readUnsigned;var readArray=function(E,I){return function(B,U,V){for(var X=typeof I=="function"?I(B,U,V):I,Y=readBytes(E),K=new Array(X),J=0;J<X;J++)K[J]=Y(B);return K}};uint8.readArray=readArray;var subBitsTotal=function(E,I,B){for(var U=0,V=0;V<B;V++)U+=E[I+V]&&Math.pow(2,B-V-1);return U},readBits=function(E){return function(I){for(var B=readByte()(I),U=new Array(8),V=0;V<8;V++)U[7-V]=!!(B&1<<V);return Object.keys(E).reduce(function(X,Y){var K=E[Y];return K.length?X[Y]=subBitsTotal(U,K.index,K.length):X[Y]=U[K.index],X},{})}};uint8.readBits=readBits,function(C){Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var E=lib,I=uint8,B={blocks:function(_e){for(var Se=0,Ee=[],Ae=_e.data.length,Re=0,Te=(0,I.readByte)()(_e);Te!==Se&&Te;Te=(0,I.readByte)()(_e)){if(_e.pos+Te>=Ae){var we=Ae-_e.pos;Ee.push((0,I.readBytes)(we)(_e)),Re+=we;break}Ee.push((0,I.readBytes)(Te)(_e)),Re+=Te}for(var Pe=new Uint8Array(Re),Ie=0,Me=0;Me<Ee.length;Me++)Pe.set(Ee[Me],Ie),Ie+=Ee[Me].length;return Pe}},U=(0,E.conditional)({gce:[{codes:(0,I.readBytes)(2)},{byteSize:(0,I.readByte)()},{extras:(0,I.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,I.readUnsigned)(!0)},{transparentColorIndex:(0,I.readByte)()},{terminator:(0,I.readByte)()}]},function(Z){var _e=(0,I.peekBytes)(2)(Z);return _e[0]===33&&_e[1]===249}),V=(0,E.conditional)({image:[{code:(0,I.readByte)()},{descriptor:[{left:(0,I.readUnsigned)(!0)},{top:(0,I.readUnsigned)(!0)},{width:(0,I.readUnsigned)(!0)},{height:(0,I.readUnsigned)(!0)},{lct:(0,I.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,E.conditional)({lct:(0,I.readArray)(3,function(Z,_e,Se){return Math.pow(2,Se.descriptor.lct.size+1)})},function(Z,_e,Se){return Se.descriptor.lct.exists}),{data:[{minCodeSize:(0,I.readByte)()},B]}]},function(Z){return(0,I.peekByte)()(Z)===44}),X=(0,E.conditional)({text:[{codes:(0,I.readBytes)(2)},{blockSize:(0,I.readByte)()},{preData:function(_e,Se,Ee){return(0,I.readBytes)(Ee.text.blockSize)(_e)}},B]},function(Z){var _e=(0,I.peekBytes)(2)(Z);return _e[0]===33&&_e[1]===1}),Y=(0,E.conditional)({application:[{codes:(0,I.readBytes)(2)},{blockSize:(0,I.readByte)()},{id:function(_e,Se,Ee){return(0,I.readString)(Ee.blockSize)(_e)}},B]},function(Z){var _e=(0,I.peekBytes)(2)(Z);return _e[0]===33&&_e[1]===255}),K=(0,E.conditional)({comment:[{codes:(0,I.readBytes)(2)},B]},function(Z){var _e=(0,I.peekBytes)(2)(Z);return _e[0]===33&&_e[1]===254}),J=[{header:[{signature:(0,I.readString)(3)},{version:(0,I.readString)(3)}]},{lsd:[{width:(0,I.readUnsigned)(!0)},{height:(0,I.readUnsigned)(!0)},{gct:(0,I.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,I.readByte)()},{pixelAspectRatio:(0,I.readByte)()}]},(0,E.conditional)({gct:(0,I.readArray)(3,function(Z,_e){return Math.pow(2,_e.lsd.gct.size+1)})},function(Z,_e){return _e.lsd.gct.exists}),{frames:(0,E.loop)([U,Y,K,V,X],function(Z){var _e=(0,I.peekByte)()(Z);return _e===33||_e===44})}],xe=J;C.default=xe}(gif);var deinterlace$1={};Object.defineProperty(deinterlace$1,"__esModule",{value:!0}),deinterlace$1.deinterlace=void 0;var deinterlace=function(E,I){for(var B=new Array(E.length),U=E.length/I,V=function(_e,Se){var Ee=E.slice(Se*I,(Se+1)*I);B.splice.apply(B,[_e*I,I].concat(Ee))},X=[0,4,2,1],Y=[8,8,4,2],K=0,J=0;J<4;J++)for(var xe=X[J];xe<U;xe+=Y[J])V(xe,K),K++;return B};deinterlace$1.deinterlace=deinterlace;var lzw$1={};Object.defineProperty(lzw$1,"__esModule",{value:!0}),lzw$1.lzw=void 0;var lzw=function(E,I,B){var U=4096,V=-1,X=B,Y,K,J,xe,Z,_e,Se,Oe,Ee,Ae,Me,Re,Le,Ne,Xe,Ve,Te=new Array(B),we=new Array(U),Pe=new Array(U),Ie=new Array(U+1);for(Re=E,K=1<<Re,Z=K+1,Y=K+2,Se=V,xe=Re+1,J=(1<<xe)-1,Ee=0;Ee<K;Ee++)we[Ee]=0,Pe[Ee]=Ee;var Me,Oe,Le,Ne,Ve,Xe;for(Me=Oe=Le=Ne=Ve=Xe=0,Ae=0;Ae<X;){if(Ne===0){if(Oe<xe){Me+=I[Xe]<<Oe,Oe+=8,Xe++;continue}if(Ee=Me&J,Me>>=xe,Oe-=xe,Ee>Y||Ee==Z)break;if(Ee==K){xe=Re+1,J=(1<<xe)-1,Y=K+2,Se=V;continue}if(Se==V){Ie[Ne++]=Pe[Ee],Se=Ee,Le=Ee;continue}for(_e=Ee,Ee==Y&&(Ie[Ne++]=Le,Ee=Se);Ee>K;)Ie[Ne++]=Pe[Ee],Ee=we[Ee];Le=Pe[Ee]&255,Ie[Ne++]=Le,Y<U&&(we[Y]=Se,Pe[Y]=Le,Y++,!(Y&J)&&Y<U&&(xe++,J+=Y)),Se=_e}Ne--,Te[Ve++]=Ie[Ne],Ae++}for(Ae=Ve;Ae<X;Ae++)Te[Ae]=0;return Te};lzw$1.lzw=lzw,Object.defineProperty(lib$1,"__esModule",{value:!0}),lib$1.decompressFrames=lib$1.decompressFrame=lib$1.parseGIF=void 0;var _gif=_interopRequireDefault(gif),_jsBinarySchemaParser=lib,_uint=uint8,_deinterlace=deinterlace$1,_lzw=lzw$1;function _interopRequireDefault(C){return C&&C.__esModule?C:{default:C}}var parseGIF=function(E){var I=new Uint8Array(E);return(0,_jsBinarySchemaParser.parse)((0,_uint.buildStream)(I),_gif.default)};lib$1.parseGIF=parseGIF;var generatePatch=function(E){for(var I=E.pixels.length,B=new Uint8ClampedArray(I*4),U=0;U<I;U++){var V=U*4,X=E.pixels[U],Y=E.colorTable[X]||[0,0,0];B[V]=Y[0],B[V+1]=Y[1],B[V+2]=Y[2],B[V+3]=X!==E.transparentIndex?255:0}return B},decompressFrame=function(E,I,B){if(!E.image){console.warn("gif frame does not have associated image.");return}var U=E.image,V=U.descriptor.width*U.descriptor.height,X=(0,_lzw.lzw)(U.data.minCodeSize,U.data.blocks,V);U.descriptor.lct.interlaced&&(X=(0,_deinterlace.deinterlace)(X,U.descriptor.width));var Y={pixels:X,dims:{top:E.image.descriptor.top,left:E.image.descriptor.left,width:E.image.descriptor.width,height:E.image.descriptor.height}};return U.descriptor.lct&&U.descriptor.lct.exists?Y.colorTable=U.lct:Y.colorTable=I,E.gce&&(Y.delay=(E.gce.delay||10)*10,Y.disposalType=E.gce.extras.disposal,E.gce.extras.transparentColorGiven&&(Y.transparentIndex=E.gce.transparentColorIndex)),B&&(Y.patch=generatePatch(Y)),Y};lib$1.decompressFrame=decompressFrame;var decompressFrames=function(E,I){return E.frames.filter(function(B){return B.image}).map(function(B){return decompressFrame(B,E.gct,I)})};lib$1.decompressFrames=decompressFrames;const reducer=(C,E={})=>{typeof E=="function"&&(E=E(C));const I=E.loaded&&C.loaded!==E.loaded,{playing:B,...U}=E,V={...C,...U};return I&&Object.assign(V,{playing:V.autoPlay&&V.loaded}),(E.delays!=null||E.frames!=null)&&Object.assign(V,{length:V.frames.length}),(E.index!=null||E.frames!=null)&&Object.assign(V,{index:V.length===0?0:(V.length+V.index)%V.length}),E.playing!=null&&Object.assign(V,V.loaded?{playing:B}:{autoPlay:B}),V},initializer=C=>reducer({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},C),usePlayerState=C=>React.useReducer(reducer,C,initializer);var code='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function WorkerFactory(C){const E=new Blob([code],{type:"application/javascript"}),I=URL.createObjectURL(E),B=new Worker(I,C);return URL.revokeObjectURL(I),B}const genearate=C=>({...C,frames:C.frames.map(E=>{const I=new ImageData(C.width,C.height);return I.data.set(new Uint8ClampedArray(E)),I})}),createSingleton=(C,E)=>{const I={};return()=>(I.instance||(I.instance=C()),React.useLayoutEffect(()=>(I.timeout?(clearTimeout(I.timeout),delete I.timeout):I.usageCount=(I.usageCount||0)+1,()=>{I.timeout=setTimeout(()=>{I.usageCount=I.usageCount-1,I.usageCount===0&&(E&&E(I.instance),delete I.instance,delete I.timeout)})}),[I,E]),I.instance)},useUpdatedRef=C=>{const E=React.useRef(C);return React.useEffect(()=>{E.current=C},[C]),E},useEventCallback=C=>{const E=useUpdatedRef(C);return React.useCallback(I=>E.current&&E.current(I),[])},useWorkerSingleton=createSingleton(()=>new WorkerFactory,C=>C.terminate()),useWorkerParser=(C,E)=>{const I=useEventCallback(E),B=useWorkerSingleton();React.useEffect(()=>{if(typeof C=="string"){const U=V=>{const X=V.data||V;if(X.src===C){const Y=X.error?X:genearate(X);I(Y)}};return B.addEventListener("message",U),B.postMessage({src:C,type:"parse"}),()=>{B.postMessage({src:C,type:"cancel"}),B.removeEventListener("message",U)}}},[B,C])},PixiAnimatedSpriteComp=({isPlaying:C,forwardRef:E,...I})=>{const B=React__namespace.useRef(null);return React__namespace.useImperativeHandle(E,()=>B.current,[B]),React__namespace.useEffect(()=>{if(B.current===null)return;const U=B.current;U[C?"gotoAndPlay":"gotoAndStop"](U.currentFrame)},[C]),jsxRuntimeExports.jsx(react.AnimatedSprite,{ref:B,...I,isPlaying:C})},PixiAnimatedSprite=React__namespace.memo(PixiAnimatedSpriteComp),initialState$2={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0,currentFrame:0},PixiGifSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(0),[U,V]=React__namespace.useState([]),[,X]=React.useState(!1),Y=React.useRef(null),K=React.useRef(null),J=React.useRef(initialState$2),xe=React.useRef(),[Z,_e]=usePlayerState({autoPlay:!1}),{tl:Se}=React.useContext(GsapPixieContext),{src:Ee,uniqueId:Ae,startAt:Re,endAt:Te,frameStartAt:we,frameEndAt:Pe,loop:Ie,visible:Me,disabled:Oe,transformation:{width:Le=0,height:Ne=0,x:Ve,y:Xe,colorCorrection:Ue={}},pointerdown:We}=C,{frames:ze,delays:He}=Z;useWorkerParser(Ee,_e);const{temperatureFilter:je,sharpnessFilter:$e,hueFilter:De,blurFilter:Fe,adjustmentFilter:ke,vignetteFilter:Ge,noiseFilter:Be}=withFiltersHook(Ue),{blurRadius:qe=0,vignette:Ke=0,noise:Ye=0}=Ue,Qe=.1;React__namespace.useEffect(()=>{if(!isEmpty$1(ze)){const Je=map$1(ze,nt=>{const{data:rt,width:tt,height:ot}=nt,ut=new Uint8Array(rt);return PIXI__namespace.Texture.fromBuffer(ut,tt,ot)}).map((nt,rt)=>({texture:nt,time:He[rt]}));V(Je);let et=0;He.forEach(nt=>{et+=nt}),B(et/1e3),J.current.totalDuration=et,J.current.totalFrames=ze.length}},[Ae,ze,He]);const Ze=()=>{Y.current&&(Y.current.stop(),J.current.isPlaying=!1)},it=()=>{if(Y.current&&xe.current){const st=xe.current.time();let Je=st===0?0:st/Qe;Je=isNaN(Je)?0:Je;const et=J.current.totalFrames;Je=Je>et?et:Je,Je=Math.round(Je),Je>=et?(Y.current.gotoAndStop(0),J.current.isPlaying=!1):(Y.current.currentFrame=Je,J.current.isPlaying=!0)}},at=()=>{X(!0)};return React.useEffect(()=>{let st=gsap$2.context(()=>{});if(K.current&&Se.current&&I>0){const Je={duration:Number(I),onInterrupt:Ze,onUpdate:it,onUpdateParams:[we,Pe]},et=Number(Te)-Number(Re),nt=Math.max(0,Math.floor(et/I)-1);xe.current&&xe.current.kill(),st=gsap$2.context(()=>{xe.current=gsap$2.timeline({repeat:Ie?nt:0,repeatDelay:0}).from(K.current,Je,we),Se.current.add(xe.current,Re)})}return()=>{xe.current&&(xe.current.kill(),gsap$2.killTweensOf(xe.current)),st.revert()}},[Ee,Ae,Re,Te,we,Pe,I,Ie]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,isGif:!0,children:jsxRuntimeExports.jsx(react.Container,{ref:K,children:!isEmpty$1(U)&&jsxRuntimeExports.jsx(PixiAnimatedSprite,{x:Ve,y:Xe,width:Le,height:Ne,animationSpeed:1,alpha:Me?1:0,loop:Ie,textures:U,onComplete:at,anchor:.5,forwardRef:Y,...!Oe&&Me&&{interactive:!0,pointerdown:We},filters:[je,$e,De,ke,...qe>0?[Fe]:[],...Ke>0?[Ge]:[],...Ye>0?[Be]:[]]})})})}),PixiTextSprite=React__namespace.forwardRef((C,E)=>{const B=React.useRef(null),U=React.useRef(0),V=React.useRef(null),X=React.useRef(null),Y=React.useRef(16),K=React.useRef(null),{visible:J,text:xe,disabled:Z,transformation:_e,pointerdown:Se,onDobuleClick:Ee}=C,{x:Ae,y:Re,fontFamily:Te="Arial",fontWeight:we="normal",fontStyle:Pe="normal",fontSize:Ie=16,fontVariant:Me="normal",fill:Oe="black",stroke:Le,strokeThickness:Ne=0,blurRadius:Ve=0,blurEnabled:Xe=!1,dropShadowColor:Ue=null,dropShadow:We=!1,dropShadowBlur:ze=0,wordWrapWidth:He=5e7,leading:je=0,letterSpacing:$e,colorCorrection:De={}}=_e,{temperatureFilter:Fe,sharpnessFilter:ke,hueFilter:Ge,blurFilter:Be,adjustmentFilter:qe}=withFiltersHook(De),{blurRadius:Ke=0}=De;React__namespace.useEffect(()=>{Y.current=Number(Ie)},[Ie]);const Ye=["italic","oblique"].includes(Pe)?Pe:void 0,Qe=["small-caps"].includes(Me),Ze=["bold","bolder","lighter","100","200","300"].includes(we)?we:void 0,it=Number($e)>0?$e:void 0,at=React__namespace.useMemo(()=>new PIXI__namespace.TextStyle({fontFamily:Te,fontSize:Ie,fill:Oe||"white",...Le&&Ne>0&&{stroke:Le,strokeThickness:Ne},...Ye&&{fontStyle:Ye},...Qe&&{fontVariant:Qe},...Ze&&{fontWeight:Ze},...it&&{letterSpacing:it},...Xe&&{dropShadow:!0,dropShadowBlur:Number(Ve),dropShadowColor:(Ue==null?void 0:Ue.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...We&&{dropShadow:!0,dropShadowBlur:Number(ze),dropShadowColor:(Ue==null?void 0:Ue.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:He||500,leading:je||0}),[Xe,Ve,Oe,Te,Ie,Pe,je,Ye,Ze,Qe,it,Ue,Le,Ne,He,We,ze]);React__namespace.useEffect(()=>{K.current={..._e}},[_e]);const st=()=>{const et=new Date().getTime();et-U.current<300&&Ee?Ee():Se&&Se(),U.current=et},Je=()=>{!Z&&Ee&&Ee()};return jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,isText:!0,onDoubleClick:Je,children:jsxRuntimeExports.jsx(react.Container,{ref:B,children:jsxRuntimeExports.jsx(react.Container,{alpha:1,ref:X,children:jsxRuntimeExports.jsx(react.Text,{style:at,x:Ae,y:Re,anchor:.5,text:xe,alpha:J?1:0,...J&&!Z&&{interactive:!0,buttonMode:!0,pointerdown:st},ref:V,filters:[Fe,ke,Ge,qe,...Ke>0?[Be]:[]]})})})})});var root=_root,now$1=function(){return root.Date.now()},now_1=now$1,reWhitespace=/\s/;function trimmedEndIndex$1(C){for(var E=C.length;E--&&reWhitespace.test(C.charAt(E)););return E}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(C){return C&&C.slice(0,trimmedEndIndex(C)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1,baseTrim=_baseTrim,isObject$1=isObject_1,isSymbol=isSymbol_1,NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(C){if(typeof C=="number")return C;if(isSymbol(C))return NAN;if(isObject$1(C)){var E=typeof C.valueOf=="function"?C.valueOf():C;C=isObject$1(E)?E+"":E}if(typeof C!="string")return C===0?C:+C;C=baseTrim(C);var I=reIsBinary.test(C);return I||reIsOctal.test(C)?freeParseInt(C.slice(2),I?2:8):reIsBadHex.test(C)?NAN:+C}var toNumber_1=toNumber$1,isObject=isObject_1,now=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(C,E,I){var B,U,V,X,Y,K,J=0,xe=!1,Z=!1,_e=!0;if(typeof C!="function")throw new TypeError(FUNC_ERROR_TEXT);E=toNumber(E)||0,isObject(I)&&(xe=!!I.leading,Z="maxWait"in I,V=Z?nativeMax(toNumber(I.maxWait)||0,E):V,_e="trailing"in I?!!I.trailing:_e);function Se(Oe){var Le=B,Ne=U;return B=U=void 0,J=Oe,X=C.apply(Ne,Le),X}function Ee(Oe){return J=Oe,Y=setTimeout(Te,E),xe?Se(Oe):X}function Ae(Oe){var Le=Oe-K,Ne=Oe-J,Ve=E-Le;return Z?nativeMin(Ve,V-Ne):Ve}function Re(Oe){var Le=Oe-K,Ne=Oe-J;return K===void 0||Le>=E||Le<0||Z&&Ne>=V}function Te(){var Oe=now();if(Re(Oe))return we(Oe);Y=setTimeout(Te,Ae(Oe))}function we(Oe){return Y=void 0,_e&&B?Se(Oe):(B=U=void 0,X)}function Pe(){Y!==void 0&&clearTimeout(Y),J=0,B=K=U=Y=void 0}function Ie(){return Y===void 0?X:we(now())}function Me(){var Oe=now(),Le=Re(Oe);if(B=arguments,U=this,K=Oe,Le){if(Y===void 0)return Ee(K);if(Z)return clearTimeout(Y),Y=setTimeout(Te,E),Se(K)}return Y===void 0&&(Y=setTimeout(Te,E)),X}return Me.cancel=Pe,Me.flush=Ie,Me}var debounce_1=debounce;const debounce$1=getDefaultExportFromCjs(debounce_1),useDebouncedPointerEvents=(C,E,I,B)=>{const U=React.useCallback(debounce$1(C,B),[C,B]),V=React.useCallback(debounce$1(E,B),[E,B]),X=React.useCallback(debounce$1(I,B),[I,B]),Y=React.useCallback(()=>{U()},[U]),K=React.useCallback(()=>{V()},[V]),J=React.useCallback(()=>{X()},[X]);return{onPointerOver:Y,onPointerDown:K,onPointerOut:J}},initialState$1={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},PixiVideoSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(!1),U=React__namespace.useRef(),V=React.useRef(null),X=React.useRef(null),Y=React.useRef(null),K=React.useRef(initialState$1),J=React.useRef(),{uniqueId:xe,mute:Z=!1,src:_e,startAt:Se,endAt:Ee,frameStartAt:Ae,frameEndAt:Re,visible:Te,disabled:we,transformation:{x:Pe,y:Ie,width:Me,height:Oe,animation:Le,colorCorrection:Ne={}},pointerdown:Ve=()=>{},pointerout:Xe=()=>{},pointerover:Ue=()=>{},fps:We=0}=C,{tl:ze,dragModeRef:He,isRemotion:je}=React.useContext(GsapPixieContext),{onPointerDown:$e,onPointerOut:De,onPointerOver:Fe}=useDebouncedPointerEvents(Ue,Ve,Xe,1),{blurRadius:ke=0,vignette:Ge=0,noise:Be=0}=Ne,{temperatureFilter:qe,sharpnessFilter:Ke,hueFilter:Ye,blurFilter:Qe,adjustmentFilter:Ze,vignetteFilter:it,noiseFilter:at}=withFiltersHook(Ne),st=_e||"",Je=React__namespace.useMemo(()=>{const ot=document.createElement("video");return ot.src=_e,ot.crossOrigin="Anonymus",ot.autoplay=!1,ot.currentTime=Ae===0?.001:Ae,ot},[_e,Ae]);useCustomEventListener(Events.PAUSE,()=>{Y.current&&(Y.current.pause(),K.current.isPlaying=!1)}),useCustomEventListener(Events.SCRUBBER_CLICKED,()=>{Y.current&&(Y.current.pause(),K.current.isPlaying=!1)}),useCustomEventListener(Events.REVERSE_MODE_END,()=>{Y.current&&(Y.current.pause(),K.current.isPlaying=!1)});const et=ot=>{if(Y.current){if(Y.current.currentTime=Number(ot),!He.current){const ut=Y.current,mt=ut.currentTime>0&&!ut.paused&&!ut.ended&&ut.readyState>ut.HAVE_CURRENT_DATA;ze.current&&ze.current.isActive()&&J.current&&J.current.isActive()&&(mt||Y.current.play(),K.current.isPlaying=!0)}K.current.progress=0}},nt=()=>{if(Y.current){const ot=Y.current;ot.currentTime>0&&!ot.paused&&!ot.ended&&ot.readyState>ot.HAVE_CURRENT_DATA&&Y.current.pause(),K.current.isPlaying=!1,J.current&&(K.current.progress=J.current.progress())}},rt=()=>{},tt=()=>{var ot,ut;if(J.current&&(K.current.progress=J.current.progress()),Y.current&&J.current){const mt=Ae+((ot=J==null?void 0:J.current)==null?void 0:ot.time()),pt=Math.abs(Y.current.currentTime-mt),yt=Y.current,gt=yt.currentTime>0&&!yt.paused&&!yt.ended&&yt.readyState>yt.HAVE_CURRENT_DATA;He.current&&U.current?(Y.current.currentTime=mt,U.current.update(),K.current.isPlaying=!1):(gt!==K.current.isPlaying||!gt)&&K.current.progress>.01&&K.current.progress<.99?(ut=ze.current)!=null&&ut.isActive()&&J.current&&J.current.isActive()&&(gt||Y.current.play(),K.current.isPlaying=!0):pt>.3&&K.current.progress>.01&&K.current.progress<.99&&(Y.current.currentTime=mt)}};return React.useEffect(()=>{let ot=gsap$2.context(()=>{});if(X.current&&ze.current){const ut={duration:Number(Ee)-Number(Se),onStart:et,onComplete:nt,onStartParams:[Ae,Re],onCompleteParams:[],onInterrupt:rt,onUpdate:tt,onUpdateParams:[Ae,Re],onPause:()=>{console.log("onPause video sprite pause",xe)},onResume:()=>{console.log("onResume video sprite resume",xe)},onReverseComplete:()=>{console.log("onReverseComplete video sprite reverse complete",xe)},onKill:()=>{console.log("onKill video sprite kill",xe)}};J.current&&(J.current.kill(),ze.current.remove(J.current)),ot=gsap$2.context(()=>{J.current=gsap$2.to(X.current,ut,Ae),ze.current.add(J.current,Se)})}return()=>{J.current&&(J.current.kill(),gsap$2.killTweensOf(J.current)),ot.revert()}},[Le,Se,Ee,Ae,Re,xe]),React__namespace.useEffect(()=>{Y.current&&(Y.current.muted=Z,K.current.isMuted=Z);const ot=setTimeout(()=>{Y.current&&(Y.current.muted=Z,K.current.isMuted=Z)},1500);return()=>{clearTimeout(ot)}},[Z]),React__namespace.useEffect(()=>{const ot=Math.round((Number(Ae)+Number.EPSILON)*100)/100,ut=function(){Y.current&&(Y.current.currentTime=ot,Y.current.muted=Z)},mt=function(){K.current.isWaiting=!1,K.current.isStalled=!1},pt=function(){K.current.isWaiting=!0,K.current.isStalled=!1},yt=function(){K.current.isWaiting=!1,K.current.isStalled=!1},gt=function(){K.current.isWaiting=!1,K.current.isStalled=!0},_t=Math.round((Number(Ae)+Number.EPSILON)*100)/100,Pt=Math.round((Number(Re)+Number.EPSILON)*100)/100,It=`${st}#t=${_t},${Pt}`;return PIXI__namespace.Texture.fromLoader(Je,It,xe,{pixiIdPrefix:xe,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:We?Math.max(120,Number(We)):30}}).then(St=>{St&&(U.current=St,B(!0),Y.current=St.baseTexture.resource.source,Y.current.id=xe,Y.current.addEventListener("loadedmetadata",ut),Y.current.addEventListener("ended",mt),Y.current.addEventListener("loadstart",pt),Y.current.addEventListener("canplaythrough",yt),Y.current.addEventListener("stalled",gt))}),()=>{Y.current&&(Y.current.pause(),Y.current.removeEventListener("loadedmetadata",ut),Y.current.removeEventListener("ended",mt),Y.current.removeEventListener("loadstart",pt),Y.current.removeEventListener("canplaythrough",yt),Y.current.removeEventListener("stalled",gt))}},[st,xe,Ae,Re,Je]),React__namespace.useEffect(()=>{const ot=setTimeout(()=>{I&&U.current&&J.current&&ze.current&&J.current.progress()<.1&&Y.current&&!J.current.isActive()&&!je&&(Y.current.currentTime=Ae,U.current.update())},30);return()=>{clearTimeout(ot)}},[I]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,pointerdown:$e,pointerover:Fe,pointerout:De,children:jsxRuntimeExports.jsx(react.Container,{ref:X,children:U.current&&jsxRuntimeExports.jsx(react.Sprite,{texture:U.current,width:Me,height:Oe,anchor:.5,x:Pe,y:Ie,ref:V,alpha:Te?1:0,...!we&&Te&&{interactive:!0,pointerdown:Ve},filters:[qe,Ke,Ye,Ze,...ke>0?[Qe]:[],...Ge>0?[it]:[],...Be>0?[at]:[]]})})})});PixiVideoSprite.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const PixiVideoCanvasSyncSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(),U=React.useRef(null),V=React.useRef(null),{visible:X,disabled:Y,transformation:{x:K,y:J,width:xe,height:Z,colorCorrection:_e={}},pointerdown:Se=()=>{},pointerout:Ee=()=>{},pointerover:Ae=()=>{},canvasImageRef:Re}=C,Te=Re&&(Re==null?void 0:Re.getCanvas()),we=react.useApp(),{onPointerDown:Pe,onPointerOut:Ie,onPointerOver:Me}=useDebouncedPointerEvents(Ae,Se,Ee,1),{blurRadius:Oe=0,vignette:Le=0,noise:Ne=0}=_e,{temperatureFilter:Ve,sharpnessFilter:Xe,hueFilter:Ue,blurFilter:We,adjustmentFilter:ze,vignetteFilter:He,noiseFilter:je}=withFiltersHook(_e);return react.useTick(()=>{if(U.current&&U.current.texture){const $e=U.current.texture.baseTexture;$e&&$e.update(),V.current&&we.renderer.render(V.current)}}),React__namespace.useEffect(()=>{if(!isEmpty$1(Te)){const $e=PIXI__namespace.Texture.from(Te);B($e)}},[Te]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,pointerdown:Pe,pointerover:Me,pointerout:Ie,children:jsxRuntimeExports.jsx(react.Container,{ref:V,children:I&&jsxRuntimeExports.jsx(react.Sprite,{texture:I,width:xe,height:Z,anchor:.5,x:K,y:J,ref:U,alpha:X?1:0,...!Y&&X&&{interactive:!0,pointerdown:Se},filters:[Ve,Xe,Ue,ze,...Oe>0?[We]:[],...Le>0?[He]:[],...Ne>0?[je]:[]]})})})}),PixiSequence=C=>{const{startAt:E,endAt:I,uniqueId:B}=C,U=React.useRef(null),V=React.useRef(null),X=React.useRef(null),Y=React.useRef(null),{tl:K,totalDuration:J=0}=React.useContext(GsapPixieContext);return React__namespace.useEffect(()=>{const xe=gsap$2.context(()=>{if(U.current&&K.current){Y.current&&(Y.current.kill(),K.current.remove(Y.current));const Z=E<.2?1:0;Y.current=gsap$2.timeline().set(U.current,{alpha:Z}).set(U.current,{pixi:{alpha:1,eventMode:"static"}},.01).to(U.current,{pixi:{},duration:Number(I)-Number(E)}).set(U.current,{alpha:0,eventMode:"none"}),K.current.add([Y.current],E)}});return()=>{Y.current&&(K.current.remove(Y.current),Y.current.progress(0).kill()),xe.revert()}},[E,I,J,B]),jsxRuntimeExports.jsx(react.Container,{ref:U,alpha:E<.2?1:0,eventMode:E<.2?"static":"none",children:jsxRuntimeExports.jsx(react.Container,{ref:X,children:jsxRuntimeExports.jsx(react.Container,{ref:V,alpha:1,children:C.children})})})},PixiSequenceWrapper=C=>{const{startAt:E,endAt:I}=C,{setTotalDuration:B}=React.useContext(GsapPixieContext);return React__namespace.useEffect(()=>{B&&B(Number(I)+.2)},[E,I]),C.children},PixiRemotionSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(),U=React.useRef(null),V=React.useRef(null),{visible:X,disabled:Y,transformation:{x:K,y:J,width:xe,height:Z,colorCorrection:_e={}},pointerdown:Se=()=>{},pointerout:Ee=()=>{},pointerover:Ae=()=>{},canvasImageRef:Re}=C,Te=Re&&(Re==null?void 0:Re.getCanvas()),we=react.useApp(),{onPointerDown:Pe,onPointerOut:Ie,onPointerOver:Me}=useDebouncedPointerEvents(Ae,Se,Ee,1),{blurRadius:Oe=0,vignette:Le=0,noise:Ne=0}=_e,{temperatureFilter:Ve,sharpnessFilter:Xe,hueFilter:Ue,blurFilter:We,adjustmentFilter:ze,vignetteFilter:He,noiseFilter:je}=withFiltersHook(_e);return react.useTick(()=>{if(U.current&&U.current.texture){const $e=U.current.texture.baseTexture;$e&&$e.update(),V.current&&we.renderer.render(V.current)}}),React__namespace.useEffect(()=>{if(!isEmpty$1(Te)){const $e=PIXI__namespace.Texture.from(Te);B($e)}},[Te]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,pointerdown:Pe,pointerover:Me,pointerout:Ie,children:jsxRuntimeExports.jsx(react.Container,{ref:V,children:I&&jsxRuntimeExports.jsx(react.Sprite,{texture:I,width:xe,height:Z,anchor:.5,x:K,y:J,ref:U,alpha:X?1:0,...!Y&&X&&{interactive:!0,pointerdown:Se},filters:[Ve,Xe,Ue,ze,...Oe>0?[We]:[],...Le>0?[He]:[],...Ne>0?[je]:[]]})})})});var lottie$1={exports:{}};(function(module,exports){typeof navigator<"u"&&function(C,E){module.exports=E()}(commonjsGlobal$1,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(E){_useWebWorker=!!E},getWebWorker=function(){return _useWebWorker},setLocationHref=function(E){locationHref=E},getLocationHref=function(){return locationHref};function createTag(C){return document.createElement(C)}function extendPrototype(C,E){var I,B=C.length,U;for(I=0;I<B;I+=1){U=C[I].prototype;for(var V in U)Object.prototype.hasOwnProperty.call(U,V)&&(E.prototype[V]=U[V])}}function getDescriptor(C,E){return Object.getOwnPropertyDescriptor(C,E)}function createProxyFunction(C){function E(){}return E.prototype=C,E}var audioControllerFactory=function(){function C(E){this.audios=[],this.audioFactory=E,this._volume=1,this._isMuted=!1}return C.prototype={addAudio:function(I){this.audios.push(I)},pause:function(){var I,B=this.audios.length;for(I=0;I<B;I+=1)this.audios[I].pause()},resume:function(){var I,B=this.audios.length;for(I=0;I<B;I+=1)this.audios[I].resume()},setRate:function(I){var B,U=this.audios.length;for(B=0;B<U;B+=1)this.audios[B].setRate(I)},createAudio:function(I){return this.audioFactory?this.audioFactory(I):window.Howl?new window.Howl({src:[I]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(I){this.audioFactory=I},setVolume:function(I){this._volume=I,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var I,B=this.audios.length;for(I=0;I<B;I+=1)this.audios[I].volume(this._volume*(this._isMuted?0:1))}},function(){return new C}}(),createTypedArray=function(){function C(I,B){var U=0,V=[],X;switch(I){case"int16":case"uint8c":X=1;break;default:X=1.1;break}for(U=0;U<B;U+=1)V.push(X);return V}function E(I,B){return I==="float32"?new Float32Array(B):I==="int16"?new Int16Array(B):I==="uint8c"?new Uint8ClampedArray(B):C(I,B)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?E:C}();function createSizedArray(C){return Array.apply(null,{length:C})}function _typeof$6(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(I){return typeof I}:_typeof$6=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$6(C)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var C=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],E,I=C.length;for(E=0;E<I;E+=1)BMMath[C[E]]=Math[C[E]]})(),BMMath.random=Math.random,BMMath.abs=function(C){var E=_typeof$6(C);if(E==="object"&&C.length){var I=createSizedArray(C.length),B,U=C.length;for(B=0;B<U;B+=1)I[B]=Math.abs(C[B]);return I}return Math.abs(C)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(C){C.style.position="absolute",C.style.top=0,C.style.left=0,C.style.display="block",C.style.transformOrigin="0 0",C.style.webkitTransformOrigin="0 0",C.style.backfaceVisibility="visible",C.style.webkitBackfaceVisibility="visible",C.style.transformStyle="preserve-3d",C.style.webkitTransformStyle="preserve-3d",C.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(C,E,I,B){this.type=C,this.currentTime=E,this.totalTime=I,this.direction=B<0?-1:1}function BMCompleteEvent(C,E){this.type=C,this.direction=E<0?-1:1}function BMCompleteLoopEvent(C,E,I,B){this.type=C,this.currentLoop=I,this.totalLoops=E,this.direction=B<0?-1:1}function BMSegmentStartEvent(C,E,I){this.type=C,this.firstFrame=E,this.totalFrames=I}function BMDestroyEvent(C,E){this.type=C,this.target=E}function BMRenderFrameErrorEvent(C,E){this.type="renderFrameError",this.nativeError=C,this.currentTime=E}function BMConfigErrorEvent(C){this.type="configError",this.nativeError=C}var createElementID=function(){var C=0;return function(){return C+=1,idPrefix$1+"__lottie_element_"+C}}();function HSVtoRGB(C,E,I){var B,U,V,X,Y,K,J,xe;switch(X=Math.floor(C*6),Y=C*6-X,K=I*(1-E),J=I*(1-Y*E),xe=I*(1-(1-Y)*E),X%6){case 0:B=I,U=xe,V=K;break;case 1:B=J,U=I,V=K;break;case 2:B=K,U=I,V=xe;break;case 3:B=K,U=J,V=I;break;case 4:B=xe,U=K,V=I;break;case 5:B=I,U=K,V=J;break}return[B,U,V]}function RGBtoHSV(C,E,I){var B=Math.max(C,E,I),U=Math.min(C,E,I),V=B-U,X,Y=B===0?0:V/B,K=B/255;switch(B){case U:X=0;break;case C:X=E-I+V*(E<I?6:0),X/=6*V;break;case E:X=I-C+V*2,X/=6*V;break;case I:X=C-E+V*4,X/=6*V;break}return[X,Y,K]}function addSaturationToRGB(C,E){var I=RGBtoHSV(C[0]*255,C[1]*255,C[2]*255);return I[1]+=E,I[1]>1?I[1]=1:I[1]<=0&&(I[1]=0),HSVtoRGB(I[0],I[1],I[2])}function addBrightnessToRGB(C,E){var I=RGBtoHSV(C[0]*255,C[1]*255,C[2]*255);return I[2]+=E,I[2]>1?I[2]=1:I[2]<0&&(I[2]=0),HSVtoRGB(I[0],I[1],I[2])}function addHueToRGB(C,E){var I=RGBtoHSV(C[0]*255,C[1]*255,C[2]*255);return I[0]+=E/360,I[0]>1?I[0]-=1:I[0]<0&&(I[0]+=1),HSVtoRGB(I[0],I[1],I[2])}var rgbToHex=function(){var C=[],E,I;for(E=0;E<256;E+=1)I=E.toString(16),C[E]=I.length===1?"0"+I:I;return function(B,U,V){return B<0&&(B=0),U<0&&(U=0),V<0&&(V=0),"#"+C[B]+C[U]+C[V]}}(),setSubframeEnabled=function(E){subframeEnabled=!!E},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(E){expressionsPlugin=E},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(E){expressionsInterfaces=E},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(E){defaultCurveSegments=E},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(E){idPrefix$1=E};function createNS(C){return document.createElementNS(svgNS,C)}function _typeof$5(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(I){return typeof I}:_typeof$5=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$5(C)}var dataManager=function(){var C=1,E=[],I,B,U={onmessage:function(){},postMessage:function(Se){I({data:Se})}},V={postMessage:function(Se){U.onmessage({data:Se})}};function X(_e){if(window.Worker&&window.Blob&&getWebWorker()){var Se=new Blob(["var _workerSelf = self; self.onmessage = ",_e.toString()],{type:"text/javascript"}),Ee=URL.createObjectURL(Se);return new Worker(Ee)}return I=_e,U}function Y(){B||(B=X(function(Se){function Ee(){function Re(je,$e){var De,Fe,ke=je.length,Ge,Be,qe,Ke;for(Fe=0;Fe<ke;Fe+=1)if(De=je[Fe],"ks"in De&&!De.completed){if(De.completed=!0,De.hasMask){var Ye=De.masksProperties;for(Be=Ye.length,Ge=0;Ge<Be;Ge+=1)if(Ye[Ge].pt.k.i)Me(Ye[Ge].pt.k);else for(Ke=Ye[Ge].pt.k.length,qe=0;qe<Ke;qe+=1)Ye[Ge].pt.k[qe].s&&Me(Ye[Ge].pt.k[qe].s[0]),Ye[Ge].pt.k[qe].e&&Me(Ye[Ge].pt.k[qe].e[0])}De.ty===0?(De.layers=Pe(De.refId,$e),Re(De.layers,$e)):De.ty===4?Ie(De.shapes):De.ty===5&&ze(De)}}function Te(je,$e){if(je){var De=0,Fe=je.length;for(De=0;De<Fe;De+=1)je[De].t===1&&(je[De].data.layers=Pe(je[De].data.refId,$e),Re(je[De].data.layers,$e))}}function we(je,$e){for(var De=0,Fe=$e.length;De<Fe;){if($e[De].id===je)return $e[De];De+=1}return null}function Pe(je,$e){var De=we(je,$e);return De?De.layers.__used?JSON.parse(JSON.stringify(De.layers)):(De.layers.__used=!0,De.layers):null}function Ie(je){var $e,De=je.length,Fe,ke;for($e=De-1;$e>=0;$e-=1)if(je[$e].ty==="sh")if(je[$e].ks.k.i)Me(je[$e].ks.k);else for(ke=je[$e].ks.k.length,Fe=0;Fe<ke;Fe+=1)je[$e].ks.k[Fe].s&&Me(je[$e].ks.k[Fe].s[0]),je[$e].ks.k[Fe].e&&Me(je[$e].ks.k[Fe].e[0]);else je[$e].ty==="gr"&&Ie(je[$e].it)}function Me(je){var $e,De=je.i.length;for($e=0;$e<De;$e+=1)je.i[$e][0]+=je.v[$e][0],je.i[$e][1]+=je.v[$e][1],je.o[$e][0]+=je.v[$e][0],je.o[$e][1]+=je.v[$e][1]}function Oe(je,$e){var De=$e?$e.split("."):[100,100,100];return je[0]>De[0]?!0:De[0]>je[0]?!1:je[1]>De[1]?!0:De[1]>je[1]?!1:je[2]>De[2]?!0:De[2]>je[2]?!1:null}var Le=function(){var je=[4,4,14];function $e(Fe){var ke=Fe.t.d;Fe.t.d={k:[{s:ke,t:0}]}}function De(Fe){var ke,Ge=Fe.length;for(ke=0;ke<Ge;ke+=1)Fe[ke].ty===5&&$e(Fe[ke])}return function(Fe){if(Oe(je,Fe.v)&&(De(Fe.layers),Fe.assets)){var ke,Ge=Fe.assets.length;for(ke=0;ke<Ge;ke+=1)Fe.assets[ke].layers&&De(Fe.assets[ke].layers)}}}(),Ne=function(){var je=[4,7,99];return function($e){if($e.chars&&!Oe(je,$e.v)){var De,Fe=$e.chars.length;for(De=0;De<Fe;De+=1){var ke=$e.chars[De];ke.data&&ke.data.shapes&&(Ie(ke.data.shapes),ke.data.ip=0,ke.data.op=99999,ke.data.st=0,ke.data.sr=1,ke.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},$e.chars[De].t||(ke.data.shapes.push({ty:"no"}),ke.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),Ve=function(){var je=[5,7,15];function $e(Fe){var ke=Fe.t.p;typeof ke.a=="number"&&(ke.a={a:0,k:ke.a}),typeof ke.p=="number"&&(ke.p={a:0,k:ke.p}),typeof ke.r=="number"&&(ke.r={a:0,k:ke.r})}function De(Fe){var ke,Ge=Fe.length;for(ke=0;ke<Ge;ke+=1)Fe[ke].ty===5&&$e(Fe[ke])}return function(Fe){if(Oe(je,Fe.v)&&(De(Fe.layers),Fe.assets)){var ke,Ge=Fe.assets.length;for(ke=0;ke<Ge;ke+=1)Fe.assets[ke].layers&&De(Fe.assets[ke].layers)}}}(),Xe=function(){var je=[4,1,9];function $e(Fe){var ke,Ge=Fe.length,Be,qe;for(ke=0;ke<Ge;ke+=1)if(Fe[ke].ty==="gr")$e(Fe[ke].it);else if(Fe[ke].ty==="fl"||Fe[ke].ty==="st")if(Fe[ke].c.k&&Fe[ke].c.k[0].i)for(qe=Fe[ke].c.k.length,Be=0;Be<qe;Be+=1)Fe[ke].c.k[Be].s&&(Fe[ke].c.k[Be].s[0]/=255,Fe[ke].c.k[Be].s[1]/=255,Fe[ke].c.k[Be].s[2]/=255,Fe[ke].c.k[Be].s[3]/=255),Fe[ke].c.k[Be].e&&(Fe[ke].c.k[Be].e[0]/=255,Fe[ke].c.k[Be].e[1]/=255,Fe[ke].c.k[Be].e[2]/=255,Fe[ke].c.k[Be].e[3]/=255);else Fe[ke].c.k[0]/=255,Fe[ke].c.k[1]/=255,Fe[ke].c.k[2]/=255,Fe[ke].c.k[3]/=255}function De(Fe){var ke,Ge=Fe.length;for(ke=0;ke<Ge;ke+=1)Fe[ke].ty===4&&$e(Fe[ke].shapes)}return function(Fe){if(Oe(je,Fe.v)&&(De(Fe.layers),Fe.assets)){var ke,Ge=Fe.assets.length;for(ke=0;ke<Ge;ke+=1)Fe.assets[ke].layers&&De(Fe.assets[ke].layers)}}}(),Ue=function(){var je=[4,4,18];function $e(Fe){var ke,Ge=Fe.length,Be,qe;for(ke=Ge-1;ke>=0;ke-=1)if(Fe[ke].ty==="sh")if(Fe[ke].ks.k.i)Fe[ke].ks.k.c=Fe[ke].closed;else for(qe=Fe[ke].ks.k.length,Be=0;Be<qe;Be+=1)Fe[ke].ks.k[Be].s&&(Fe[ke].ks.k[Be].s[0].c=Fe[ke].closed),Fe[ke].ks.k[Be].e&&(Fe[ke].ks.k[Be].e[0].c=Fe[ke].closed);else Fe[ke].ty==="gr"&&$e(Fe[ke].it)}function De(Fe){var ke,Ge,Be=Fe.length,qe,Ke,Ye,Qe;for(Ge=0;Ge<Be;Ge+=1){if(ke=Fe[Ge],ke.hasMask){var Ze=ke.masksProperties;for(Ke=Ze.length,qe=0;qe<Ke;qe+=1)if(Ze[qe].pt.k.i)Ze[qe].pt.k.c=Ze[qe].cl;else for(Qe=Ze[qe].pt.k.length,Ye=0;Ye<Qe;Ye+=1)Ze[qe].pt.k[Ye].s&&(Ze[qe].pt.k[Ye].s[0].c=Ze[qe].cl),Ze[qe].pt.k[Ye].e&&(Ze[qe].pt.k[Ye].e[0].c=Ze[qe].cl)}ke.ty===4&&$e(ke.shapes)}}return function(Fe){if(Oe(je,Fe.v)&&(De(Fe.layers),Fe.assets)){var ke,Ge=Fe.assets.length;for(ke=0;ke<Ge;ke+=1)Fe.assets[ke].layers&&De(Fe.assets[ke].layers)}}}();function We(je){je.__complete||(Xe(je),Le(je),Ne(je),Ve(je),Ue(je),Re(je.layers,je.assets),Te(je.chars,je.assets),je.__complete=!0)}function ze(je){je.t.a.length===0&&"m"in je.t.p}var He={};return He.completeData=We,He.checkColors=Xe,He.checkChars=Ne,He.checkPathProperties=Ve,He.checkShapes=Ue,He.completeLayers=Re,He}if(V.dataManager||(V.dataManager=Ee()),V.assetLoader||(V.assetLoader=function(){function Re(we){var Pe=we.getResponseHeader("content-type");return Pe&&we.responseType==="json"&&Pe.indexOf("json")!==-1||we.response&&_typeof$5(we.response)==="object"?we.response:we.response&&typeof we.response=="string"?JSON.parse(we.response):we.responseText?JSON.parse(we.responseText):null}function Te(we,Pe,Ie,Me){var Oe,Le=new XMLHttpRequest;try{Le.responseType="json"}catch{}Le.onreadystatechange=function(){if(Le.readyState===4)if(Le.status===200)Oe=Re(Le),Ie(Oe);else try{Oe=Re(Le),Ie(Oe)}catch(Ne){Me&&Me(Ne)}};try{Le.open(["G","E","T"].join(""),we,!0)}catch{Le.open(["G","E","T"].join(""),Pe+"/"+we,!0)}Le.send()}return{load:Te}}()),Se.data.type==="loadAnimation")V.assetLoader.load(Se.data.path,Se.data.fullPath,function(Re){V.dataManager.completeData(Re),V.postMessage({id:Se.data.id,payload:Re,status:"success"})},function(){V.postMessage({id:Se.data.id,status:"error"})});else if(Se.data.type==="complete"){var Ae=Se.data.animation;V.dataManager.completeData(Ae),V.postMessage({id:Se.data.id,payload:Ae,status:"success"})}else Se.data.type==="loadData"&&V.assetLoader.load(Se.data.path,Se.data.fullPath,function(Re){V.postMessage({id:Se.data.id,payload:Re,status:"success"})},function(){V.postMessage({id:Se.data.id,status:"error"})})}),B.onmessage=function(_e){var Se=_e.data,Ee=Se.id,Ae=E[Ee];E[Ee]=null,Se.status==="success"?Ae.onComplete(Se.payload):Ae.onError&&Ae.onError()})}function K(_e,Se){C+=1;var Ee="processId_"+C;return E[Ee]={onComplete:_e,onError:Se},Ee}function J(_e,Se,Ee){Y();var Ae=K(Se,Ee);B.postMessage({type:"loadAnimation",path:_e,fullPath:window.location.origin+window.location.pathname,id:Ae})}function xe(_e,Se,Ee){Y();var Ae=K(Se,Ee);B.postMessage({type:"loadData",path:_e,fullPath:window.location.origin+window.location.pathname,id:Ae})}function Z(_e,Se,Ee){Y();var Ae=K(Se,Ee);B.postMessage({type:"complete",animation:_e,id:Ae})}return{loadAnimation:J,loadData:xe,completeAnimation:Z}}(),ImagePreloader=function(){var C=function(){var Te=createTag("canvas");Te.width=1,Te.height=1;var we=Te.getContext("2d");return we.fillStyle="rgba(0,0,0,0)",we.fillRect(0,0,1,1),Te}();function E(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function I(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function B(Te,we,Pe){var Ie="";if(Te.e)Ie=Te.p;else if(we){var Me=Te.p;Me.indexOf("images/")!==-1&&(Me=Me.split("/")[1]),Ie=we+Me}else Ie=Pe,Ie+=Te.u?Te.u:"",Ie+=Te.p;return Ie}function U(Te){var we=0,Pe=setInterval((function(){var Ie=Te.getBBox();(Ie.width||we>500)&&(this._imageLoaded(),clearInterval(Pe)),we+=1}).bind(this),50)}function V(Te){var we=B(Te,this.assetsPath,this.path),Pe=createNS("image");isSafari?this.testImageLoaded(Pe):Pe.addEventListener("load",this._imageLoaded,!1),Pe.addEventListener("error",(function(){Ie.img=C,this._imageLoaded()}).bind(this),!1),Pe.setAttributeNS("http://www.w3.org/1999/xlink","href",we),this._elementHelper.append?this._elementHelper.append(Pe):this._elementHelper.appendChild(Pe);var Ie={img:Pe,assetData:Te};return Ie}function X(Te){var we=B(Te,this.assetsPath,this.path),Pe=createTag("img");Pe.crossOrigin="anonymous",Pe.addEventListener("load",this._imageLoaded,!1),Pe.addEventListener("error",(function(){Ie.img=C,this._imageLoaded()}).bind(this),!1),Pe.src=we;var Ie={img:Pe,assetData:Te};return Ie}function Y(Te){var we={assetData:Te},Pe=B(Te,this.assetsPath,this.path);return dataManager.loadData(Pe,(function(Ie){we.img=Ie,this._footageLoaded()}).bind(this),(function(){we.img={},this._footageLoaded()}).bind(this)),we}function K(Te,we){this.imagesLoadedCb=we;var Pe,Ie=Te.length;for(Pe=0;Pe<Ie;Pe+=1)Te[Pe].layers||(!Te[Pe].t||Te[Pe].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(Te[Pe]))):Te[Pe].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(Te[Pe]))))}function J(Te){this.path=Te||""}function xe(Te){this.assetsPath=Te||""}function Z(Te){for(var we=0,Pe=this.images.length;we<Pe;){if(this.images[we].assetData===Te)return this.images[we].img;we+=1}return null}function _e(){this.imagesLoadedCb=null,this.images.length=0}function Se(){return this.totalImages===this.loadedAssets}function Ee(){return this.totalFootages===this.loadedFootagesCount}function Ae(Te,we){Te==="svg"?(this._elementHelper=we,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function Re(){this._imageLoaded=E.bind(this),this._footageLoaded=I.bind(this),this.testImageLoaded=U.bind(this),this.createFootageData=Y.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return Re.prototype={loadAssets:K,setAssetsPath:xe,setPath:J,loadedImages:Se,loadedFootages:Ee,destroy:_e,getAsset:Z,createImgData:X,createImageData:V,imageLoaded:E,footageLoaded:I,setCacheType:Ae},Re}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(E,I){if(this._cbs[E])for(var B=this._cbs[E],U=0;U<B.length;U+=1)B[U](I)},addEventListener:function(E,I){return this._cbs[E]||(this._cbs[E]=[]),this._cbs[E].push(I),(function(){this.removeEventListener(E,I)}).bind(this)},removeEventListener:function(E,I){if(!I)this._cbs[E]=null;else if(this._cbs[E]){for(var B=0,U=this._cbs[E].length;B<U;)this._cbs[E][B]===I&&(this._cbs[E].splice(B,1),B-=1,U-=1),B+=1;this._cbs[E].length||(this._cbs[E]=null)}}};var markerParser=function(){function C(E){for(var I=E.split(`\r
1998
+ `),B={},U,V=0,X=0;X<I.length;X+=1)U=I[X].split(":"),U.length===2&&(B[U[0]]=U[1].trim(),V+=1);if(V===0)throw new Error;return B}return function(E){for(var I=[],B=0;B<E.length;B+=1){var U=E[B],V={time:U.tm,duration:U.dr};try{V.payload=JSON.parse(E[B].cm)}catch{try{V.payload=C(E[B].cm)}catch{V.payload={name:E[B].cm}}}I.push(V)}return I}}(),ProjectInterface=function(){function C(E){this.compositions.push(E)}return function(){function E(I){for(var B=0,U=this.compositions.length;B<U;){if(this.compositions[B].data&&this.compositions[B].data.nm===I)return this.compositions[B].prepareFrame&&this.compositions[B].data.xt&&this.compositions[B].prepareFrame(this.currentFrame),this.compositions[B].compInterface;B+=1}return null}return E.compositions=[],E.currentFrame=0,E.registerComposition=C,E}}(),renderers={},registerRenderer=function(E,I){renderers[E]=I};function getRenderer(C){return renderers[C]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var C in renderers)if(renderers[C])return C;return""}function _typeof$4(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function(I){return typeof I}:_typeof$4=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$4(C)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(C){(C.wrapper||C.container)&&(this.wrapper=C.wrapper||C.container);var E="svg";C.animType?E=C.animType:C.renderer&&(E=C.renderer);var I=getRenderer(E);this.renderer=new I(this,C.rendererSettings),this.imagePreloader.setCacheType(E,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=E,C.loop===""||C.loop===null||C.loop===void 0||C.loop===!0?this.loop=!0:C.loop===!1?this.loop=!1:this.loop=parseInt(C.loop,10),this.autoplay="autoplay"in C?C.autoplay:!0,this.name=C.name?C.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(C,"autoloadSegments")?C.autoloadSegments:!0,this.assetsPath=C.assetsPath,this.initialSegment=C.initialSegment,C.audioFactory&&this.audioController.setAudioFactory(C.audioFactory),C.animationData?this.setupAnimation(C.animationData):C.path&&(C.path.lastIndexOf("\\")!==-1?this.path=C.path.substr(0,C.path.lastIndexOf("\\")+1):this.path=C.path.substr(0,C.path.lastIndexOf("/")+1),this.fileName=C.path.substr(C.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(C.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(C){dataManager.completeAnimation(C,this.configAnimation)},AnimationItem.prototype.setData=function(C,E){E&&_typeof$4(E)!=="object"&&(E=JSON.parse(E));var I={wrapper:C,animationData:E},B=C.attributes;I.path=B.getNamedItem("data-animation-path")?B.getNamedItem("data-animation-path").value:B.getNamedItem("data-bm-path")?B.getNamedItem("data-bm-path").value:B.getNamedItem("bm-path")?B.getNamedItem("bm-path").value:"",I.animType=B.getNamedItem("data-anim-type")?B.getNamedItem("data-anim-type").value:B.getNamedItem("data-bm-type")?B.getNamedItem("data-bm-type").value:B.getNamedItem("bm-type")?B.getNamedItem("bm-type").value:B.getNamedItem("data-bm-renderer")?B.getNamedItem("data-bm-renderer").value:B.getNamedItem("bm-renderer")?B.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var U=B.getNamedItem("data-anim-loop")?B.getNamedItem("data-anim-loop").value:B.getNamedItem("data-bm-loop")?B.getNamedItem("data-bm-loop").value:B.getNamedItem("bm-loop")?B.getNamedItem("bm-loop").value:"";U==="false"?I.loop=!1:U==="true"?I.loop=!0:U!==""&&(I.loop=parseInt(U,10));var V=B.getNamedItem("data-anim-autoplay")?B.getNamedItem("data-anim-autoplay").value:B.getNamedItem("data-bm-autoplay")?B.getNamedItem("data-bm-autoplay").value:B.getNamedItem("bm-autoplay")?B.getNamedItem("bm-autoplay").value:!0;I.autoplay=V!=="false",I.name=B.getNamedItem("data-name")?B.getNamedItem("data-name").value:B.getNamedItem("data-bm-name")?B.getNamedItem("data-bm-name").value:B.getNamedItem("bm-name")?B.getNamedItem("bm-name").value:"";var X=B.getNamedItem("data-anim-prerender")?B.getNamedItem("data-anim-prerender").value:B.getNamedItem("data-bm-prerender")?B.getNamedItem("data-bm-prerender").value:B.getNamedItem("bm-prerender")?B.getNamedItem("bm-prerender").value:"";X==="false"&&(I.prerender=!1),I.path?this.setParams(I):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(C){C.op>this.animationData.op&&(this.animationData.op=C.op,this.totalFrames=Math.floor(C.op-this.animationData.ip));var E=this.animationData.layers,I,B=E.length,U=C.layers,V,X=U.length;for(V=0;V<X;V+=1)for(I=0;I<B;){if(E[I].id===U[V].id){E[I]=U[V];break}I+=1}if((C.chars||C.fonts)&&(this.renderer.globalData.fontManager.addChars(C.chars),this.renderer.globalData.fontManager.addFonts(C.fonts,this.renderer.globalData.defs)),C.assets)for(B=C.assets.length,I=0;I<B;I+=1)this.animationData.assets.push(C.assets[I]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(C){this.animationData=C;var E=getExpressionsPlugin();E&&E.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var C=this.animationData.segments;if(!C||C.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var E=C.shift();this.timeCompleted=E.time*this.frameRate;var I=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(I,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var C=this.animationData.segments;C||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(C){if(this.renderer)try{this.animationData=C,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(C),C.assets||(C.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(C.assets),this.markers=markerParser(C.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(E){this.triggerConfigError(E)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var C=getExpressionsPlugin();C&&C.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(C,E){var I=typeof C=="number"?C:void 0,B=typeof E=="number"?E:void 0;this.renderer.updateContainerSize(I,B)},AnimationItem.prototype.setSubframe=function(C){this.isSubframeEnabled=!!C},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(C){this.triggerRenderFrameError(C)}},AnimationItem.prototype.play=function(C){C&&this.name!==C||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(C){C&&this.name!==C||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(C){C&&this.name!==C||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(C){C&&this.name!==C||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(C){for(var E,I=0;I<this.markers.length;I+=1)if(E=this.markers[I],E.payload&&E.payload.name===C)return E;return null},AnimationItem.prototype.goToAndStop=function(C,E,I){if(!(I&&this.name!==I)){var B=Number(C);if(isNaN(B)){var U=this.getMarkerData(C);U&&this.goToAndStop(U.time,!0)}else E?this.setCurrentRawFrameValue(C):this.setCurrentRawFrameValue(C*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(C,E,I){if(!(I&&this.name!==I)){var B=Number(C);if(isNaN(B)){var U=this.getMarkerData(C);U&&(U.duration?this.playSegments([U.time,U.time+U.duration],!0):this.goToAndStop(U.time,!0))}else this.goToAndStop(B,E,I);this.play()}},AnimationItem.prototype.advanceTime=function(C){if(!(this.isPaused===!0||this.isLoaded===!1)){var E=this.currentRawFrame+C*this.frameModifier,I=!1;E>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(E>this.totalFrames?E%this.totalFrames:0)||(I=!0,E=this.totalFrames-1):E>=this.totalFrames?(this.playCount+=1,this.checkSegments(E%this.totalFrames)||(this.setCurrentRawFrameValue(E%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(E):E<0?this.checkSegments(E%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+E%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(I=!0,E=0)):this.setCurrentRawFrameValue(E),I&&(this.setCurrentRawFrameValue(E),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(C,E){this.playCount=0,C[1]<C[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=C[0]-C[1],this.timeCompleted=this.totalFrames,this.firstFrame=C[1],this.setCurrentRawFrameValue(this.totalFrames-.001-E)):C[1]>C[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=C[1]-C[0],this.timeCompleted=this.totalFrames,this.firstFrame=C[0],this.setCurrentRawFrameValue(.001+E)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(C,E){var I=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<C?I=C:this.currentRawFrame+this.firstFrame>E&&(I=E-C)),this.firstFrame=C,this.totalFrames=E-C,this.timeCompleted=this.totalFrames,I!==-1&&this.goToAndStop(I,!0)},AnimationItem.prototype.playSegments=function(C,E){if(E&&(this.segments.length=0),_typeof$4(C[0])==="object"){var I,B=C.length;for(I=0;I<B;I+=1)this.segments.push(C[I])}else this.segments.push(C);this.segments.length&&E&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(C){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),C&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(C){return this.segments.length?(this.adjustSegment(this.segments.shift(),C),!0):!1},AnimationItem.prototype.destroy=function(C){C&&this.name!==C||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(C){this.currentRawFrame=C,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(C){this.playSpeed=C,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(C){this.playDirection=C<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(C){this.loop=C},AnimationItem.prototype.setVolume=function(C,E){E&&this.name!==E||this.audioController.setVolume(C)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(C){C&&this.name!==C||this.audioController.mute()},AnimationItem.prototype.unmute=function(C){C&&this.name!==C||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(C){var E="";if(C.e)E=C.p;else if(this.assetsPath){var I=C.p;I.indexOf("images/")!==-1&&(I=I.split("/")[1]),E=this.assetsPath+I}else E=this.path,E+=C.u?C.u:"",E+=C.p;return E},AnimationItem.prototype.getAssetData=function(C){for(var E=0,I=this.assets.length;E<I;){if(C===this.assets[E].id)return this.assets[E];E+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(C){return C?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(C,E,I){try{var B=this.renderer.getElementByPath(C);B.updateDocumentData(E,I)}catch{}},AnimationItem.prototype.trigger=function(C){if(this._cbs&&this._cbs[C])switch(C){case"enterFrame":this.triggerEvent(C,new BMEnterFrameEvent(C,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(C,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(C,new BMCompleteLoopEvent(C,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(C,new BMCompleteEvent(C,this.frameMult));break;case"segmentStart":this.triggerEvent(C,new BMSegmentStartEvent(C,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(C,new BMDestroyEvent(C,this));break;default:this.triggerEvent(C)}C==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(C,this.currentFrame,this.totalFrames,this.frameMult)),C==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(C,this.loop,this.playCount,this.frameMult)),C==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(C,this.frameMult)),C==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(C,this.firstFrame,this.totalFrames)),C==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(C,this))},AnimationItem.prototype.triggerRenderFrameError=function(C){var E=new BMRenderFrameErrorEvent(C,this.currentFrame);this.triggerEvent("error",E),this.onError&&this.onError.call(this,E)},AnimationItem.prototype.triggerConfigError=function(C){var E=new BMConfigErrorEvent(C,this.currentFrame);this.triggerEvent("error",E),this.onError&&this.onError.call(this,E)};var animationManager=function(){var C={},E=[],I=0,B=0,U=0,V=!0,X=!1;function Y($e){for(var De=0,Fe=$e.target;De<B;)E[De].animation===Fe&&(E.splice(De,1),De-=1,B-=1,Fe.isPaused||Z()),De+=1}function K($e,De){if(!$e)return null;for(var Fe=0;Fe<B;){if(E[Fe].elem===$e&&E[Fe].elem!==null)return E[Fe].animation;Fe+=1}var ke=new AnimationItem;return _e(ke,$e),ke.setData($e,De),ke}function J(){var $e,De=E.length,Fe=[];for($e=0;$e<De;$e+=1)Fe.push(E[$e].animation);return Fe}function xe(){U+=1,Xe()}function Z(){U-=1}function _e($e,De){$e.addEventListener("destroy",Y),$e.addEventListener("_active",xe),$e.addEventListener("_idle",Z),E.push({elem:De,animation:$e}),B+=1}function Se($e){var De=new AnimationItem;return _e(De,null),De.setParams($e),De}function Ee($e,De){var Fe;for(Fe=0;Fe<B;Fe+=1)E[Fe].animation.setSpeed($e,De)}function Ae($e,De){var Fe;for(Fe=0;Fe<B;Fe+=1)E[Fe].animation.setDirection($e,De)}function Re($e){var De;for(De=0;De<B;De+=1)E[De].animation.play($e)}function Te($e){var De=$e-I,Fe;for(Fe=0;Fe<B;Fe+=1)E[Fe].animation.advanceTime(De);I=$e,U&&!X?window.requestAnimationFrame(Te):V=!0}function we($e){I=$e,window.requestAnimationFrame(Te)}function Pe($e){var De;for(De=0;De<B;De+=1)E[De].animation.pause($e)}function Ie($e,De,Fe){var ke;for(ke=0;ke<B;ke+=1)E[ke].animation.goToAndStop($e,De,Fe)}function Me($e){var De;for(De=0;De<B;De+=1)E[De].animation.stop($e)}function Oe($e){var De;for(De=0;De<B;De+=1)E[De].animation.togglePause($e)}function Le($e){var De;for(De=B-1;De>=0;De-=1)E[De].animation.destroy($e)}function Ne($e,De,Fe){var ke=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),Ge,Be=ke.length;for(Ge=0;Ge<Be;Ge+=1)Fe&&ke[Ge].setAttribute("data-bm-type",Fe),K(ke[Ge],$e);if(De&&Be===0){Fe||(Fe="svg");var qe=document.getElementsByTagName("body")[0];qe.innerText="";var Ke=createTag("div");Ke.style.width="100%",Ke.style.height="100%",Ke.setAttribute("data-bm-type",Fe),qe.appendChild(Ke),K(Ke,$e)}}function Ve(){var $e;for($e=0;$e<B;$e+=1)E[$e].animation.resize()}function Xe(){!X&&U&&V&&(window.requestAnimationFrame(we),V=!1)}function Ue(){X=!0}function We(){X=!1,Xe()}function ze($e,De){var Fe;for(Fe=0;Fe<B;Fe+=1)E[Fe].animation.setVolume($e,De)}function He($e){var De;for(De=0;De<B;De+=1)E[De].animation.mute($e)}function je($e){var De;for(De=0;De<B;De+=1)E[De].animation.unmute($e)}return C.registerAnimation=K,C.loadAnimation=Se,C.setSpeed=Ee,C.setDirection=Ae,C.play=Re,C.pause=Pe,C.stop=Me,C.togglePause=Oe,C.searchAnimations=Ne,C.resize=Ve,C.goToAndStop=Ie,C.destroy=Le,C.freeze=Ue,C.unfreeze=We,C.setVolume=ze,C.mute=He,C.unmute=je,C.getRegisteredAnimations=J,C}(),BezierFactory=function(){var C={};C.getBezierEasing=I;var E={};function I(we,Pe,Ie,Me,Oe){var Le=Oe||("bez_"+we+"_"+Pe+"_"+Ie+"_"+Me).replace(/\./g,"p");if(E[Le])return E[Le];var Ne=new Te([we,Pe,Ie,Me]);return E[Le]=Ne,Ne}var B=4,U=.001,V=1e-7,X=10,Y=11,K=1/(Y-1),J=typeof Float32Array=="function";function xe(we,Pe){return 1-3*Pe+3*we}function Z(we,Pe){return 3*Pe-6*we}function _e(we){return 3*we}function Se(we,Pe,Ie){return((xe(Pe,Ie)*we+Z(Pe,Ie))*we+_e(Pe))*we}function Ee(we,Pe,Ie){return 3*xe(Pe,Ie)*we*we+2*Z(Pe,Ie)*we+_e(Pe)}function Ae(we,Pe,Ie,Me,Oe){var Le,Ne,Ve=0;do Ne=Pe+(Ie-Pe)/2,Le=Se(Ne,Me,Oe)-we,Le>0?Ie=Ne:Pe=Ne;while(Math.abs(Le)>V&&++Ve<X);return Ne}function Re(we,Pe,Ie,Me){for(var Oe=0;Oe<B;++Oe){var Le=Ee(Pe,Ie,Me);if(Le===0)return Pe;var Ne=Se(Pe,Ie,Me)-we;Pe-=Ne/Le}return Pe}function Te(we){this._p=we,this._mSampleValues=J?new Float32Array(Y):new Array(Y),this._precomputed=!1,this.get=this.get.bind(this)}return Te.prototype={get:function(Pe){var Ie=this._p[0],Me=this._p[1],Oe=this._p[2],Le=this._p[3];return this._precomputed||this._precompute(),Ie===Me&&Oe===Le?Pe:Pe===0?0:Pe===1?1:Se(this._getTForX(Pe),Me,Le)},_precompute:function(){var Pe=this._p[0],Ie=this._p[1],Me=this._p[2],Oe=this._p[3];this._precomputed=!0,(Pe!==Ie||Me!==Oe)&&this._calcSampleValues()},_calcSampleValues:function(){for(var Pe=this._p[0],Ie=this._p[2],Me=0;Me<Y;++Me)this._mSampleValues[Me]=Se(Me*K,Pe,Ie)},_getTForX:function(Pe){for(var Ie=this._p[0],Me=this._p[2],Oe=this._mSampleValues,Le=0,Ne=1,Ve=Y-1;Ne!==Ve&&Oe[Ne]<=Pe;++Ne)Le+=K;--Ne;var Xe=(Pe-Oe[Ne])/(Oe[Ne+1]-Oe[Ne]),Ue=Le+Xe*K,We=Ee(Ue,Ie,Me);return We>=U?Re(Pe,Ue,Ie,Me):We===0?Ue:Ae(Pe,Le,Le+K,Ie,Me)}},C}(),pooling=function(){function C(E){return E.concat(createSizedArray(E.length))}return{double:C}}(),poolFactory=function(){return function(C,E,I){var B=0,U=C,V=createSizedArray(U),X={newElement:Y,release:K};function Y(){var J;return B?(B-=1,J=V[B]):J=E(),J}function K(J){B===U&&(V=pooling.double(V),U*=2),I&&I(J),V[B]=J,B+=1}return X}}(),bezierLengthPool=function(){function C(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,C)}(),segmentsLengthPool=function(){function C(){return{lengths:[],totalLength:0}}function E(I){var B,U=I.lengths.length;for(B=0;B<U;B+=1)bezierLengthPool.release(I.lengths[B]);I.lengths.length=0}return poolFactory(8,C,E)}();function bezFunction(){var C=Math;function E(_e,Se,Ee,Ae,Re,Te){var we=_e*Ae+Se*Re+Ee*Te-Re*Ae-Te*_e-Ee*Se;return we>-.001&&we<.001}function I(_e,Se,Ee,Ae,Re,Te,we,Pe,Ie){if(Ee===0&&Te===0&&Ie===0)return E(_e,Se,Ae,Re,we,Pe);var Me=C.sqrt(C.pow(Ae-_e,2)+C.pow(Re-Se,2)+C.pow(Te-Ee,2)),Oe=C.sqrt(C.pow(we-_e,2)+C.pow(Pe-Se,2)+C.pow(Ie-Ee,2)),Le=C.sqrt(C.pow(we-Ae,2)+C.pow(Pe-Re,2)+C.pow(Ie-Te,2)),Ne;return Me>Oe?Me>Le?Ne=Me-Oe-Le:Ne=Le-Oe-Me:Le>Oe?Ne=Le-Oe-Me:Ne=Oe-Me-Le,Ne>-1e-4&&Ne<1e-4}var B=function(){return function(_e,Se,Ee,Ae){var Re=getDefaultCurveSegments(),Te,we,Pe,Ie,Me,Oe=0,Le,Ne=[],Ve=[],Xe=bezierLengthPool.newElement();for(Pe=Ee.length,Te=0;Te<Re;Te+=1){for(Me=Te/(Re-1),Le=0,we=0;we<Pe;we+=1)Ie=bmPow(1-Me,3)*_e[we]+3*bmPow(1-Me,2)*Me*Ee[we]+3*(1-Me)*bmPow(Me,2)*Ae[we]+bmPow(Me,3)*Se[we],Ne[we]=Ie,Ve[we]!==null&&(Le+=bmPow(Ne[we]-Ve[we],2)),Ve[we]=Ne[we];Le&&(Le=bmSqrt(Le),Oe+=Le),Xe.percents[Te]=Me,Xe.lengths[Te]=Oe}return Xe.addedLength=Oe,Xe}}();function U(_e){var Se=segmentsLengthPool.newElement(),Ee=_e.c,Ae=_e.v,Re=_e.o,Te=_e.i,we,Pe=_e._length,Ie=Se.lengths,Me=0;for(we=0;we<Pe-1;we+=1)Ie[we]=B(Ae[we],Ae[we+1],Re[we],Te[we+1]),Me+=Ie[we].addedLength;return Ee&&Pe&&(Ie[we]=B(Ae[we],Ae[0],Re[we],Te[0]),Me+=Ie[we].addedLength),Se.totalLength=Me,Se}function V(_e){this.segmentLength=0,this.points=new Array(_e)}function X(_e,Se){this.partialLength=_e,this.point=Se}var Y=function(){var _e={};return function(Se,Ee,Ae,Re){var Te=(Se[0]+"_"+Se[1]+"_"+Ee[0]+"_"+Ee[1]+"_"+Ae[0]+"_"+Ae[1]+"_"+Re[0]+"_"+Re[1]).replace(/\./g,"p");if(!_e[Te]){var we=getDefaultCurveSegments(),Pe,Ie,Me,Oe,Le,Ne=0,Ve,Xe,Ue=null;Se.length===2&&(Se[0]!==Ee[0]||Se[1]!==Ee[1])&&E(Se[0],Se[1],Ee[0],Ee[1],Se[0]+Ae[0],Se[1]+Ae[1])&&E(Se[0],Se[1],Ee[0],Ee[1],Ee[0]+Re[0],Ee[1]+Re[1])&&(we=2);var We=new V(we);for(Me=Ae.length,Pe=0;Pe<we;Pe+=1){for(Xe=createSizedArray(Me),Le=Pe/(we-1),Ve=0,Ie=0;Ie<Me;Ie+=1)Oe=bmPow(1-Le,3)*Se[Ie]+3*bmPow(1-Le,2)*Le*(Se[Ie]+Ae[Ie])+3*(1-Le)*bmPow(Le,2)*(Ee[Ie]+Re[Ie])+bmPow(Le,3)*Ee[Ie],Xe[Ie]=Oe,Ue!==null&&(Ve+=bmPow(Xe[Ie]-Ue[Ie],2));Ve=bmSqrt(Ve),Ne+=Ve,We.points[Pe]=new X(Ve,Xe),Ue=Xe}We.segmentLength=Ne,_e[Te]=We}return _e[Te]}}();function K(_e,Se){var Ee=Se.percents,Ae=Se.lengths,Re=Ee.length,Te=bmFloor((Re-1)*_e),we=_e*Se.addedLength,Pe=0;if(Te===Re-1||Te===0||we===Ae[Te])return Ee[Te];for(var Ie=Ae[Te]>we?-1:1,Me=!0;Me;)if(Ae[Te]<=we&&Ae[Te+1]>we?(Pe=(we-Ae[Te])/(Ae[Te+1]-Ae[Te]),Me=!1):Te+=Ie,Te<0||Te>=Re-1){if(Te===Re-1)return Ee[Te];Me=!1}return Ee[Te]+(Ee[Te+1]-Ee[Te])*Pe}function J(_e,Se,Ee,Ae,Re,Te){var we=K(Re,Te),Pe=1-we,Ie=C.round((Pe*Pe*Pe*_e[0]+(we*Pe*Pe+Pe*we*Pe+Pe*Pe*we)*Ee[0]+(we*we*Pe+Pe*we*we+we*Pe*we)*Ae[0]+we*we*we*Se[0])*1e3)/1e3,Me=C.round((Pe*Pe*Pe*_e[1]+(we*Pe*Pe+Pe*we*Pe+Pe*Pe*we)*Ee[1]+(we*we*Pe+Pe*we*we+we*Pe*we)*Ae[1]+we*we*we*Se[1])*1e3)/1e3;return[Ie,Me]}var xe=createTypedArray("float32",8);function Z(_e,Se,Ee,Ae,Re,Te,we){Re<0?Re=0:Re>1&&(Re=1);var Pe=K(Re,we);Te=Te>1?1:Te;var Ie=K(Te,we),Me,Oe=_e.length,Le=1-Pe,Ne=1-Ie,Ve=Le*Le*Le,Xe=Pe*Le*Le*3,Ue=Pe*Pe*Le*3,We=Pe*Pe*Pe,ze=Le*Le*Ne,He=Pe*Le*Ne+Le*Pe*Ne+Le*Le*Ie,je=Pe*Pe*Ne+Le*Pe*Ie+Pe*Le*Ie,$e=Pe*Pe*Ie,De=Le*Ne*Ne,Fe=Pe*Ne*Ne+Le*Ie*Ne+Le*Ne*Ie,ke=Pe*Ie*Ne+Le*Ie*Ie+Pe*Ne*Ie,Ge=Pe*Ie*Ie,Be=Ne*Ne*Ne,qe=Ie*Ne*Ne+Ne*Ie*Ne+Ne*Ne*Ie,Ke=Ie*Ie*Ne+Ne*Ie*Ie+Ie*Ne*Ie,Ye=Ie*Ie*Ie;for(Me=0;Me<Oe;Me+=1)xe[Me*4]=C.round((Ve*_e[Me]+Xe*Ee[Me]+Ue*Ae[Me]+We*Se[Me])*1e3)/1e3,xe[Me*4+1]=C.round((ze*_e[Me]+He*Ee[Me]+je*Ae[Me]+$e*Se[Me])*1e3)/1e3,xe[Me*4+2]=C.round((De*_e[Me]+Fe*Ee[Me]+ke*Ae[Me]+Ge*Se[Me])*1e3)/1e3,xe[Me*4+3]=C.round((Be*_e[Me]+qe*Ee[Me]+Ke*Ae[Me]+Ye*Se[Me])*1e3)/1e3;return xe}return{getSegmentsLength:U,getNewSegment:Z,getPointInSegment:J,buildBezierData:Y,pointOnLine2D:E,pointOnLine3D:I}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(C,E){var I=this.offsetTime,B;this.propType==="multidimensional"&&(B=createTypedArray("float32",this.pv.length));for(var U=E.lastIndex,V=U,X=this.keyframes.length-1,Y=!0,K,J,xe;Y;){if(K=this.keyframes[V],J=this.keyframes[V+1],V===X-1&&C>=J.t-I){K.h&&(K=J),U=0;break}if(J.t-I>C){U=V;break}V<X-1?V+=1:(U=0,Y=!1)}xe=this.keyframesMetadata[V]||{};var Z,_e,Se,Ee,Ae,Re,Te=J.t-I,we=K.t-I,Pe;if(K.to){xe.bezierData||(xe.bezierData=bez.buildBezierData(K.s,J.s||K.e,K.to,K.ti));var Ie=xe.bezierData;if(C>=Te||C<we){var Me=C>=Te?Ie.points.length-1:0;for(_e=Ie.points[Me].point.length,Z=0;Z<_e;Z+=1)B[Z]=Ie.points[Me].point[Z]}else{xe.__fnct?Re=xe.__fnct:(Re=BezierFactory.getBezierEasing(K.o.x,K.o.y,K.i.x,K.i.y,K.n).get,xe.__fnct=Re),Se=Re((C-we)/(Te-we));var Oe=Ie.segmentLength*Se,Le,Ne=E.lastFrame<C&&E._lastKeyframeIndex===V?E._lastAddedLength:0;for(Ae=E.lastFrame<C&&E._lastKeyframeIndex===V?E._lastPoint:0,Y=!0,Ee=Ie.points.length;Y;){if(Ne+=Ie.points[Ae].partialLength,Oe===0||Se===0||Ae===Ie.points.length-1){for(_e=Ie.points[Ae].point.length,Z=0;Z<_e;Z+=1)B[Z]=Ie.points[Ae].point[Z];break}else if(Oe>=Ne&&Oe<Ne+Ie.points[Ae+1].partialLength){for(Le=(Oe-Ne)/Ie.points[Ae+1].partialLength,_e=Ie.points[Ae].point.length,Z=0;Z<_e;Z+=1)B[Z]=Ie.points[Ae].point[Z]+(Ie.points[Ae+1].point[Z]-Ie.points[Ae].point[Z])*Le;break}Ae<Ee-1?Ae+=1:Y=!1}E._lastPoint=Ae,E._lastAddedLength=Ne-Ie.points[Ae].partialLength,E._lastKeyframeIndex=V}}else{var Ve,Xe,Ue,We,ze;if(X=K.s.length,Pe=J.s||K.e,this.sh&&K.h!==1)if(C>=Te)B[0]=Pe[0],B[1]=Pe[1],B[2]=Pe[2];else if(C<=we)B[0]=K.s[0],B[1]=K.s[1],B[2]=K.s[2];else{var He=createQuaternion(K.s),je=createQuaternion(Pe),$e=(C-we)/(Te-we);quaternionToEuler(B,slerp(He,je,$e))}else for(V=0;V<X;V+=1)K.h!==1&&(C>=Te?Se=1:C<we?Se=0:(K.o.x.constructor===Array?(xe.__fnct||(xe.__fnct=[]),xe.__fnct[V]?Re=xe.__fnct[V]:(Ve=K.o.x[V]===void 0?K.o.x[0]:K.o.x[V],Xe=K.o.y[V]===void 0?K.o.y[0]:K.o.y[V],Ue=K.i.x[V]===void 0?K.i.x[0]:K.i.x[V],We=K.i.y[V]===void 0?K.i.y[0]:K.i.y[V],Re=BezierFactory.getBezierEasing(Ve,Xe,Ue,We).get,xe.__fnct[V]=Re)):xe.__fnct?Re=xe.__fnct:(Ve=K.o.x,Xe=K.o.y,Ue=K.i.x,We=K.i.y,Re=BezierFactory.getBezierEasing(Ve,Xe,Ue,We).get,K.keyframeMetadata=Re),Se=Re((C-we)/(Te-we)))),Pe=J.s||K.e,ze=K.h===1?K.s[V]:K.s[V]+(Pe[V]-K.s[V])*Se,this.propType==="multidimensional"?B[V]=ze:B=ze}return E.lastIndex=U,B}function slerp(C,E,I){var B=[],U=C[0],V=C[1],X=C[2],Y=C[3],K=E[0],J=E[1],xe=E[2],Z=E[3],_e,Se,Ee,Ae,Re;return Se=U*K+V*J+X*xe+Y*Z,Se<0&&(Se=-Se,K=-K,J=-J,xe=-xe,Z=-Z),1-Se>1e-6?(_e=Math.acos(Se),Ee=Math.sin(_e),Ae=Math.sin((1-I)*_e)/Ee,Re=Math.sin(I*_e)/Ee):(Ae=1-I,Re=I),B[0]=Ae*U+Re*K,B[1]=Ae*V+Re*J,B[2]=Ae*X+Re*xe,B[3]=Ae*Y+Re*Z,B}function quaternionToEuler(C,E){var I=E[0],B=E[1],U=E[2],V=E[3],X=Math.atan2(2*B*V-2*I*U,1-2*B*B-2*U*U),Y=Math.asin(2*I*B+2*U*V),K=Math.atan2(2*I*V-2*B*U,1-2*I*I-2*U*U);C[0]=X/degToRads,C[1]=Y/degToRads,C[2]=K/degToRads}function createQuaternion(C){var E=C[0]*degToRads,I=C[1]*degToRads,B=C[2]*degToRads,U=Math.cos(E/2),V=Math.cos(I/2),X=Math.cos(B/2),Y=Math.sin(E/2),K=Math.sin(I/2),J=Math.sin(B/2),xe=U*V*X-Y*K*J,Z=Y*K*X+U*V*J,_e=Y*V*X+U*K*J,Se=U*K*X-Y*V*J;return[Z,_e,Se,xe]}function getValueAtCurrentTime(){var C=this.comp.renderedFrame-this.offsetTime,E=this.keyframes[0].t-this.offsetTime,I=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(C===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=I&&C>=I||this._caching.lastFrame<E&&C<E))){this._caching.lastFrame>=C&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var B=this.interpolateValue(C,this._caching);this.pv=B}return this._caching.lastFrame=C,this.pv}function setVValue(C){var E;if(this.propType==="unidimensional")E=C*this.mult,mathAbs(this.v-E)>1e-5&&(this.v=E,this._mdf=!0);else for(var I=0,B=this.v.length;I<B;)E=C[I]*this.mult,mathAbs(this.v[I]-E)>1e-5&&(this.v[I]=E,this._mdf=!0),I+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var C,E=this.effectsSequence.length,I=this.kf?this.pv:this.data.k;for(C=0;C<E;C+=1)I=this.effectsSequence[C](I);this.setVValue(I),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(C){this.effectsSequence.push(C),this.container.addDynamicProperty(this)}function ValueProperty(C,E,I,B){this.propType="unidimensional",this.mult=I||1,this.data=E,this.v=I?E.k*I:E.k,this.pv=E.k,this._mdf=!1,this.elem=C,this.container=B,this.comp=C.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(C,E,I,B){this.propType="multidimensional",this.mult=I||1,this.data=E,this._mdf=!1,this.elem=C,this.container=B,this.comp=C.comp,this.k=!1,this.kf=!1,this.frameId=-1;var U,V=E.k.length;for(this.v=createTypedArray("float32",V),this.pv=createTypedArray("float32",V),this.vel=createTypedArray("float32",V),U=0;U<V;U+=1)this.v[U]=E.k[U]*this.mult,this.pv[U]=E.k[U];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(C,E,I,B){this.propType="unidimensional",this.keyframes=E.k,this.keyframesMetadata=[],this.offsetTime=C.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=E,this.mult=I||1,this.elem=C,this.container=B,this.comp=C.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(C,E,I,B){this.propType="multidimensional";var U,V=E.k.length,X,Y,K,J;for(U=0;U<V-1;U+=1)E.k[U].to&&E.k[U].s&&E.k[U+1]&&E.k[U+1].s&&(X=E.k[U].s,Y=E.k[U+1].s,K=E.k[U].to,J=E.k[U].ti,(X.length===2&&!(X[0]===Y[0]&&X[1]===Y[1])&&bez.pointOnLine2D(X[0],X[1],Y[0],Y[1],X[0]+K[0],X[1]+K[1])&&bez.pointOnLine2D(X[0],X[1],Y[0],Y[1],Y[0]+J[0],Y[1]+J[1])||X.length===3&&!(X[0]===Y[0]&&X[1]===Y[1]&&X[2]===Y[2])&&bez.pointOnLine3D(X[0],X[1],X[2],Y[0],Y[1],Y[2],X[0]+K[0],X[1]+K[1],X[2]+K[2])&&bez.pointOnLine3D(X[0],X[1],X[2],Y[0],Y[1],Y[2],Y[0]+J[0],Y[1]+J[1],Y[2]+J[2]))&&(E.k[U].to=null,E.k[U].ti=null),X[0]===Y[0]&&X[1]===Y[1]&&K[0]===0&&K[1]===0&&J[0]===0&&J[1]===0&&(X.length===2||X[2]===Y[2]&&K[2]===0&&J[2]===0)&&(E.k[U].to=null,E.k[U].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=E,this.keyframes=E.k,this.keyframesMetadata=[],this.offsetTime=C.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=I||1,this.elem=C,this.container=B,this.comp=C.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var xe=E.k[0].s.length;for(this.v=createTypedArray("float32",xe),this.pv=createTypedArray("float32",xe),U=0;U<xe;U+=1)this.v[U]=initFrame,this.pv[U]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",xe)},this.addEffect=addEffect}var PropertyFactory=function(){function C(I,B,U,V,X){B.sid&&(B=I.globalData.slotManager.getProp(B));var Y;if(!B.k.length)Y=new ValueProperty(I,B,V,X);else if(typeof B.k[0]=="number")Y=new MultiDimensionalProperty(I,B,V,X);else switch(U){case 0:Y=new KeyframedValueProperty(I,B,V,X);break;case 1:Y=new KeyframedMultidimensionalProperty(I,B,V,X);break}return Y.effectsSequence.length&&X.addDynamicProperty(Y),Y}var E={getProp:C};return E}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(E){this.dynamicProperties.indexOf(E)===-1&&(this.dynamicProperties.push(E),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var E,I=this.dynamicProperties.length;for(E=0;E<I;E+=1)this.dynamicProperties[E].getValue(),this.dynamicProperties[E]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(E){this.container=E,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function C(){return createTypedArray("float32",2)}return poolFactory(8,C)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(C,E){this.c=C,this.setLength(E);for(var I=0;I<E;)this.v[I]=pointPool.newElement(),this.o[I]=pointPool.newElement(),this.i[I]=pointPool.newElement(),I+=1},ShapePath.prototype.setLength=function(C){for(;this._maxLength<C;)this.doubleArrayLength();this._length=C},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(C,E,I,B,U){var V;switch(this._length=Math.max(this._length,B+1),this._length>=this._maxLength&&this.doubleArrayLength(),I){case"v":V=this.v;break;case"i":V=this.i;break;case"o":V=this.o;break;default:V=[];break}(!V[B]||V[B]&&!U)&&(V[B]=pointPool.newElement()),V[B][0]=C,V[B][1]=E},ShapePath.prototype.setTripleAt=function(C,E,I,B,U,V,X,Y){this.setXYAt(C,E,"v",X,Y),this.setXYAt(I,B,"o",X,Y),this.setXYAt(U,V,"i",X,Y)},ShapePath.prototype.reverse=function(){var C=new ShapePath;C.setPathData(this.c,this._length);var E=this.v,I=this.o,B=this.i,U=0;this.c&&(C.setTripleAt(E[0][0],E[0][1],B[0][0],B[0][1],I[0][0],I[0][1],0,!1),U=1);var V=this._length-1,X=this._length,Y;for(Y=U;Y<X;Y+=1)C.setTripleAt(E[V][0],E[V][1],B[V][0],B[V][1],I[V][0],I[V][1],Y,!1),V-=1;return C},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function C(){return new ShapePath}function E(U){var V=U._length,X;for(X=0;X<V;X+=1)pointPool.release(U.v[X]),pointPool.release(U.i[X]),pointPool.release(U.o[X]),U.v[X]=null,U.i[X]=null,U.o[X]=null;U._length=0,U.c=!1}function I(U){var V=B.newElement(),X,Y=U._length===void 0?U.v.length:U._length;for(V.setLength(Y),V.c=U.c,X=0;X<Y;X+=1)V.setTripleAt(U.v[X][0],U.v[X][1],U.o[X][0],U.o[X][1],U.i[X][0],U.i[X][1],X);return V}var B=poolFactory(4,C,E);return B.clone=I,B}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(C){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=C,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var C;for(C=0;C<this._length;C+=1)shapePool.release(this.shapes[C]);this._length=0};var shapeCollectionPool=function(){var C={newShapeCollection:U,release:V},E=0,I=4,B=createSizedArray(I);function U(){var X;return E?(E-=1,X=B[E]):X=new ShapeCollection,X}function V(X){var Y,K=X._length;for(Y=0;Y<K;Y+=1)shapePool.release(X.shapes[Y]);X._length=0,E===I&&(B=pooling.double(B),I*=2),B[E]=X,E+=1}return C}(),ShapePropertyFactory=function(){var C=-999999;function E(Te,we,Pe){var Ie=Pe.lastIndex,Me,Oe,Le,Ne,Ve,Xe,Ue,We,ze,He=this.keyframes;if(Te<He[0].t-this.offsetTime)Me=He[0].s[0],Le=!0,Ie=0;else if(Te>=He[He.length-1].t-this.offsetTime)Me=He[He.length-1].s?He[He.length-1].s[0]:He[He.length-2].e[0],Le=!0;else{for(var je=Ie,$e=He.length-1,De=!0,Fe,ke,Ge;De&&(Fe=He[je],ke=He[je+1],!(ke.t-this.offsetTime>Te));)je<$e-1?je+=1:De=!1;if(Ge=this.keyframesMetadata[je]||{},Le=Fe.h===1,Ie=je,!Le){if(Te>=ke.t-this.offsetTime)We=1;else if(Te<Fe.t-this.offsetTime)We=0;else{var Be;Ge.__fnct?Be=Ge.__fnct:(Be=BezierFactory.getBezierEasing(Fe.o.x,Fe.o.y,Fe.i.x,Fe.i.y).get,Ge.__fnct=Be),We=Be((Te-(Fe.t-this.offsetTime))/(ke.t-this.offsetTime-(Fe.t-this.offsetTime)))}Oe=ke.s?ke.s[0]:Fe.e[0]}Me=Fe.s[0]}for(Xe=we._length,Ue=Me.i[0].length,Pe.lastIndex=Ie,Ne=0;Ne<Xe;Ne+=1)for(Ve=0;Ve<Ue;Ve+=1)ze=Le?Me.i[Ne][Ve]:Me.i[Ne][Ve]+(Oe.i[Ne][Ve]-Me.i[Ne][Ve])*We,we.i[Ne][Ve]=ze,ze=Le?Me.o[Ne][Ve]:Me.o[Ne][Ve]+(Oe.o[Ne][Ve]-Me.o[Ne][Ve])*We,we.o[Ne][Ve]=ze,ze=Le?Me.v[Ne][Ve]:Me.v[Ne][Ve]+(Oe.v[Ne][Ve]-Me.v[Ne][Ve])*We,we.v[Ne][Ve]=ze}function I(){var Te=this.comp.renderedFrame-this.offsetTime,we=this.keyframes[0].t-this.offsetTime,Pe=this.keyframes[this.keyframes.length-1].t-this.offsetTime,Ie=this._caching.lastFrame;return Ie!==C&&(Ie<we&&Te<we||Ie>Pe&&Te>Pe)||(this._caching.lastIndex=Ie<Te?this._caching.lastIndex:0,this.interpolateShape(Te,this.pv,this._caching)),this._caching.lastFrame=Te,this.pv}function B(){this.paths=this.localShapeCollection}function U(Te,we){if(Te._length!==we._length||Te.c!==we.c)return!1;var Pe,Ie=Te._length;for(Pe=0;Pe<Ie;Pe+=1)if(Te.v[Pe][0]!==we.v[Pe][0]||Te.v[Pe][1]!==we.v[Pe][1]||Te.o[Pe][0]!==we.o[Pe][0]||Te.o[Pe][1]!==we.o[Pe][1]||Te.i[Pe][0]!==we.i[Pe][0]||Te.i[Pe][1]!==we.i[Pe][1])return!1;return!0}function V(Te){U(this.v,Te)||(this.v=shapePool.clone(Te),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function X(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var Te;this.kf?Te=this.pv:this.data.ks?Te=this.data.ks.k:Te=this.data.pt.k;var we,Pe=this.effectsSequence.length;for(we=0;we<Pe;we+=1)Te=this.effectsSequence[we](Te);this.setVValue(Te),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function Y(Te,we,Pe){this.propType="shape",this.comp=Te.comp,this.container=Te,this.elem=Te,this.data=we,this.k=!1,this.kf=!1,this._mdf=!1;var Ie=Pe===3?we.pt.k:we.ks.k;this.v=shapePool.clone(Ie),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=B,this.effectsSequence=[]}function K(Te){this.effectsSequence.push(Te),this.container.addDynamicProperty(this)}Y.prototype.interpolateShape=E,Y.prototype.getValue=X,Y.prototype.setVValue=V,Y.prototype.addEffect=K;function J(Te,we,Pe){this.propType="shape",this.comp=Te.comp,this.elem=Te,this.container=Te,this.offsetTime=Te.data.st,this.keyframes=Pe===3?we.pt.k:we.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var Ie=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,Ie),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=C,this.reset=B,this._caching={lastFrame:C,lastIndex:0},this.effectsSequence=[I.bind(this)]}J.prototype.getValue=X,J.prototype.interpolateShape=E,J.prototype.setVValue=V,J.prototype.addEffect=K;var xe=function(){var Te=roundCorner;function we(Pe,Ie){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=Ie.d,this.elem=Pe,this.comp=Pe.comp,this.frameId=-1,this.initDynamicPropertyContainer(Pe),this.p=PropertyFactory.getProp(Pe,Ie.p,1,0,this),this.s=PropertyFactory.getProp(Pe,Ie.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return we.prototype={reset:B,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var Ie=this.p.v[0],Me=this.p.v[1],Oe=this.s.v[0]/2,Le=this.s.v[1]/2,Ne=this.d!==3,Ve=this.v;Ve.v[0][0]=Ie,Ve.v[0][1]=Me-Le,Ve.v[1][0]=Ne?Ie+Oe:Ie-Oe,Ve.v[1][1]=Me,Ve.v[2][0]=Ie,Ve.v[2][1]=Me+Le,Ve.v[3][0]=Ne?Ie-Oe:Ie+Oe,Ve.v[3][1]=Me,Ve.i[0][0]=Ne?Ie-Oe*Te:Ie+Oe*Te,Ve.i[0][1]=Me-Le,Ve.i[1][0]=Ne?Ie+Oe:Ie-Oe,Ve.i[1][1]=Me-Le*Te,Ve.i[2][0]=Ne?Ie+Oe*Te:Ie-Oe*Te,Ve.i[2][1]=Me+Le,Ve.i[3][0]=Ne?Ie-Oe:Ie+Oe,Ve.i[3][1]=Me+Le*Te,Ve.o[0][0]=Ne?Ie+Oe*Te:Ie-Oe*Te,Ve.o[0][1]=Me-Le,Ve.o[1][0]=Ne?Ie+Oe:Ie-Oe,Ve.o[1][1]=Me+Le*Te,Ve.o[2][0]=Ne?Ie-Oe*Te:Ie+Oe*Te,Ve.o[2][1]=Me+Le,Ve.o[3][0]=Ne?Ie-Oe:Ie+Oe,Ve.o[3][1]=Me-Le*Te}},extendPrototype([DynamicPropertyContainer],we),we}(),Z=function(){function Te(we,Pe){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=we,this.comp=we.comp,this.data=Pe,this.frameId=-1,this.d=Pe.d,this.initDynamicPropertyContainer(we),Pe.sy===1?(this.ir=PropertyFactory.getProp(we,Pe.ir,0,0,this),this.is=PropertyFactory.getProp(we,Pe.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(we,Pe.pt,0,0,this),this.p=PropertyFactory.getProp(we,Pe.p,1,0,this),this.r=PropertyFactory.getProp(we,Pe.r,0,degToRads,this),this.or=PropertyFactory.getProp(we,Pe.or,0,0,this),this.os=PropertyFactory.getProp(we,Pe.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return Te.prototype={reset:B,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var Pe=Math.floor(this.pt.v)*2,Ie=Math.PI*2/Pe,Me=!0,Oe=this.or.v,Le=this.ir.v,Ne=this.os.v,Ve=this.is.v,Xe=2*Math.PI*Oe/(Pe*2),Ue=2*Math.PI*Le/(Pe*2),We,ze,He,je,$e=-Math.PI/2;$e+=this.r.v;var De=this.data.d===3?-1:1;for(this.v._length=0,We=0;We<Pe;We+=1){ze=Me?Oe:Le,He=Me?Ne:Ve,je=Me?Xe:Ue;var Fe=ze*Math.cos($e),ke=ze*Math.sin($e),Ge=Fe===0&&ke===0?0:ke/Math.sqrt(Fe*Fe+ke*ke),Be=Fe===0&&ke===0?0:-Fe/Math.sqrt(Fe*Fe+ke*ke);Fe+=+this.p.v[0],ke+=+this.p.v[1],this.v.setTripleAt(Fe,ke,Fe-Ge*je*He*De,ke-Be*je*He*De,Fe+Ge*je*He*De,ke+Be*je*He*De,We,!0),Me=!Me,$e+=Ie*De}},convertPolygonToPath:function(){var Pe=Math.floor(this.pt.v),Ie=Math.PI*2/Pe,Me=this.or.v,Oe=this.os.v,Le=2*Math.PI*Me/(Pe*4),Ne,Ve=-Math.PI*.5,Xe=this.data.d===3?-1:1;for(Ve+=this.r.v,this.v._length=0,Ne=0;Ne<Pe;Ne+=1){var Ue=Me*Math.cos(Ve),We=Me*Math.sin(Ve),ze=Ue===0&&We===0?0:We/Math.sqrt(Ue*Ue+We*We),He=Ue===0&&We===0?0:-Ue/Math.sqrt(Ue*Ue+We*We);Ue+=+this.p.v[0],We+=+this.p.v[1],this.v.setTripleAt(Ue,We,Ue-ze*Le*Oe*Xe,We-He*Le*Oe*Xe,Ue+ze*Le*Oe*Xe,We+He*Le*Oe*Xe,Ne,!0),Ve+=Ie*Xe}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],Te),Te}(),_e=function(){function Te(we,Pe){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=we,this.comp=we.comp,this.frameId=-1,this.d=Pe.d,this.initDynamicPropertyContainer(we),this.p=PropertyFactory.getProp(we,Pe.p,1,0,this),this.s=PropertyFactory.getProp(we,Pe.s,1,0,this),this.r=PropertyFactory.getProp(we,Pe.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return Te.prototype={convertRectToPath:function(){var Pe=this.p.v[0],Ie=this.p.v[1],Me=this.s.v[0]/2,Oe=this.s.v[1]/2,Le=bmMin(Me,Oe,this.r.v),Ne=Le*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(Pe+Me,Ie-Oe+Le,Pe+Me,Ie-Oe+Le,Pe+Me,Ie-Oe+Ne,0,!0),this.v.setTripleAt(Pe+Me,Ie+Oe-Le,Pe+Me,Ie+Oe-Ne,Pe+Me,Ie+Oe-Le,1,!0),Le!==0?(this.v.setTripleAt(Pe+Me-Le,Ie+Oe,Pe+Me-Le,Ie+Oe,Pe+Me-Ne,Ie+Oe,2,!0),this.v.setTripleAt(Pe-Me+Le,Ie+Oe,Pe-Me+Ne,Ie+Oe,Pe-Me+Le,Ie+Oe,3,!0),this.v.setTripleAt(Pe-Me,Ie+Oe-Le,Pe-Me,Ie+Oe-Le,Pe-Me,Ie+Oe-Ne,4,!0),this.v.setTripleAt(Pe-Me,Ie-Oe+Le,Pe-Me,Ie-Oe+Ne,Pe-Me,Ie-Oe+Le,5,!0),this.v.setTripleAt(Pe-Me+Le,Ie-Oe,Pe-Me+Le,Ie-Oe,Pe-Me+Ne,Ie-Oe,6,!0),this.v.setTripleAt(Pe+Me-Le,Ie-Oe,Pe+Me-Ne,Ie-Oe,Pe+Me-Le,Ie-Oe,7,!0)):(this.v.setTripleAt(Pe-Me,Ie+Oe,Pe-Me+Ne,Ie+Oe,Pe-Me,Ie+Oe,2),this.v.setTripleAt(Pe-Me,Ie-Oe,Pe-Me,Ie-Oe+Ne,Pe-Me,Ie-Oe,3))):(this.v.setTripleAt(Pe+Me,Ie-Oe+Le,Pe+Me,Ie-Oe+Ne,Pe+Me,Ie-Oe+Le,0,!0),Le!==0?(this.v.setTripleAt(Pe+Me-Le,Ie-Oe,Pe+Me-Le,Ie-Oe,Pe+Me-Ne,Ie-Oe,1,!0),this.v.setTripleAt(Pe-Me+Le,Ie-Oe,Pe-Me+Ne,Ie-Oe,Pe-Me+Le,Ie-Oe,2,!0),this.v.setTripleAt(Pe-Me,Ie-Oe+Le,Pe-Me,Ie-Oe+Le,Pe-Me,Ie-Oe+Ne,3,!0),this.v.setTripleAt(Pe-Me,Ie+Oe-Le,Pe-Me,Ie+Oe-Ne,Pe-Me,Ie+Oe-Le,4,!0),this.v.setTripleAt(Pe-Me+Le,Ie+Oe,Pe-Me+Le,Ie+Oe,Pe-Me+Ne,Ie+Oe,5,!0),this.v.setTripleAt(Pe+Me-Le,Ie+Oe,Pe+Me-Ne,Ie+Oe,Pe+Me-Le,Ie+Oe,6,!0),this.v.setTripleAt(Pe+Me,Ie+Oe-Le,Pe+Me,Ie+Oe-Le,Pe+Me,Ie+Oe-Ne,7,!0)):(this.v.setTripleAt(Pe-Me,Ie-Oe,Pe-Me+Ne,Ie-Oe,Pe-Me,Ie-Oe,1,!0),this.v.setTripleAt(Pe-Me,Ie+Oe,Pe-Me,Ie+Oe-Ne,Pe-Me,Ie+Oe,2,!0),this.v.setTripleAt(Pe+Me,Ie+Oe,Pe+Me-Ne,Ie+Oe,Pe+Me,Ie+Oe,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:B},extendPrototype([DynamicPropertyContainer],Te),Te}();function Se(Te,we,Pe){var Ie;if(Pe===3||Pe===4){var Me=Pe===3?we.pt:we.ks,Oe=Me.k;Oe.length?Ie=new J(Te,we,Pe):Ie=new Y(Te,we,Pe)}else Pe===5?Ie=new _e(Te,we):Pe===6?Ie=new xe(Te,we):Pe===7&&(Ie=new Z(Te,we));return Ie.k&&Te.addDynamicProperty(Ie),Ie}function Ee(){return Y}function Ae(){return J}var Re={};return Re.getShapeProp=Se,Re.getConstructorFunction=Ee,Re.getKeyframedConstructorFunction=Ae,Re}();/*!
1999
+ Transformation Matrix v2.0
2000
+ (c) Epistemex 2014-2015
2001
+ www.epistemex.com
2002
+ By Ken Fyrstenberg
2003
+ Contributions by leeoniya.
2004
+ License: MIT, header required.
2005
+ */var Matrix=function(){var C=Math.cos,E=Math.sin,I=Math.tan,B=Math.round;function U(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function V(Fe){if(Fe===0)return this;var ke=C(Fe),Ge=E(Fe);return this._t(ke,-Ge,0,0,Ge,ke,0,0,0,0,1,0,0,0,0,1)}function X(Fe){if(Fe===0)return this;var ke=C(Fe),Ge=E(Fe);return this._t(1,0,0,0,0,ke,-Ge,0,0,Ge,ke,0,0,0,0,1)}function Y(Fe){if(Fe===0)return this;var ke=C(Fe),Ge=E(Fe);return this._t(ke,0,Ge,0,0,1,0,0,-Ge,0,ke,0,0,0,0,1)}function K(Fe){if(Fe===0)return this;var ke=C(Fe),Ge=E(Fe);return this._t(ke,-Ge,0,0,Ge,ke,0,0,0,0,1,0,0,0,0,1)}function J(Fe,ke){return this._t(1,ke,Fe,1,0,0)}function xe(Fe,ke){return this.shear(I(Fe),I(ke))}function Z(Fe,ke){var Ge=C(ke),Be=E(ke);return this._t(Ge,Be,0,0,-Be,Ge,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,I(Fe),1,0,0,0,0,1,0,0,0,0,1)._t(Ge,-Be,0,0,Be,Ge,0,0,0,0,1,0,0,0,0,1)}function _e(Fe,ke,Ge){return!Ge&&Ge!==0&&(Ge=1),Fe===1&&ke===1&&Ge===1?this:this._t(Fe,0,0,0,0,ke,0,0,0,0,Ge,0,0,0,0,1)}function Se(Fe,ke,Ge,Be,qe,Ke,Ye,Qe,Ze,it,at,st,Je,et,nt,rt){return this.props[0]=Fe,this.props[1]=ke,this.props[2]=Ge,this.props[3]=Be,this.props[4]=qe,this.props[5]=Ke,this.props[6]=Ye,this.props[7]=Qe,this.props[8]=Ze,this.props[9]=it,this.props[10]=at,this.props[11]=st,this.props[12]=Je,this.props[13]=et,this.props[14]=nt,this.props[15]=rt,this}function Ee(Fe,ke,Ge){return Ge=Ge||0,Fe!==0||ke!==0||Ge!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,Fe,ke,Ge,1):this}function Ae(Fe,ke,Ge,Be,qe,Ke,Ye,Qe,Ze,it,at,st,Je,et,nt,rt){var tt=this.props;if(Fe===1&&ke===0&&Ge===0&&Be===0&&qe===0&&Ke===1&&Ye===0&&Qe===0&&Ze===0&&it===0&&at===1&&st===0)return tt[12]=tt[12]*Fe+tt[15]*Je,tt[13]=tt[13]*Ke+tt[15]*et,tt[14]=tt[14]*at+tt[15]*nt,tt[15]*=rt,this._identityCalculated=!1,this;var ot=tt[0],ut=tt[1],mt=tt[2],pt=tt[3],yt=tt[4],gt=tt[5],_t=tt[6],Pt=tt[7],It=tt[8],St=tt[9],Lt=tt[10],At=tt[11],kt=tt[12],Mt=tt[13],qt=tt[14],Vt=tt[15];return tt[0]=ot*Fe+ut*qe+mt*Ze+pt*Je,tt[1]=ot*ke+ut*Ke+mt*it+pt*et,tt[2]=ot*Ge+ut*Ye+mt*at+pt*nt,tt[3]=ot*Be+ut*Qe+mt*st+pt*rt,tt[4]=yt*Fe+gt*qe+_t*Ze+Pt*Je,tt[5]=yt*ke+gt*Ke+_t*it+Pt*et,tt[6]=yt*Ge+gt*Ye+_t*at+Pt*nt,tt[7]=yt*Be+gt*Qe+_t*st+Pt*rt,tt[8]=It*Fe+St*qe+Lt*Ze+At*Je,tt[9]=It*ke+St*Ke+Lt*it+At*et,tt[10]=It*Ge+St*Ye+Lt*at+At*nt,tt[11]=It*Be+St*Qe+Lt*st+At*rt,tt[12]=kt*Fe+Mt*qe+qt*Ze+Vt*Je,tt[13]=kt*ke+Mt*Ke+qt*it+Vt*et,tt[14]=kt*Ge+Mt*Ye+qt*at+Vt*nt,tt[15]=kt*Be+Mt*Qe+qt*st+Vt*rt,this._identityCalculated=!1,this}function Re(Fe){var ke=Fe.props;return this.transform(ke[0],ke[1],ke[2],ke[3],ke[4],ke[5],ke[6],ke[7],ke[8],ke[9],ke[10],ke[11],ke[12],ke[13],ke[14],ke[15])}function Te(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function we(Fe){for(var ke=0;ke<16;){if(Fe.props[ke]!==this.props[ke])return!1;ke+=1}return!0}function Pe(Fe){var ke;for(ke=0;ke<16;ke+=1)Fe.props[ke]=this.props[ke];return Fe}function Ie(Fe){var ke;for(ke=0;ke<16;ke+=1)this.props[ke]=Fe[ke]}function Me(Fe,ke,Ge){return{x:Fe*this.props[0]+ke*this.props[4]+Ge*this.props[8]+this.props[12],y:Fe*this.props[1]+ke*this.props[5]+Ge*this.props[9]+this.props[13],z:Fe*this.props[2]+ke*this.props[6]+Ge*this.props[10]+this.props[14]}}function Oe(Fe,ke,Ge){return Fe*this.props[0]+ke*this.props[4]+Ge*this.props[8]+this.props[12]}function Le(Fe,ke,Ge){return Fe*this.props[1]+ke*this.props[5]+Ge*this.props[9]+this.props[13]}function Ne(Fe,ke,Ge){return Fe*this.props[2]+ke*this.props[6]+Ge*this.props[10]+this.props[14]}function Ve(){var Fe=this.props[0]*this.props[5]-this.props[1]*this.props[4],ke=this.props[5]/Fe,Ge=-this.props[1]/Fe,Be=-this.props[4]/Fe,qe=this.props[0]/Fe,Ke=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/Fe,Ye=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/Fe,Qe=new Matrix;return Qe.props[0]=ke,Qe.props[1]=Ge,Qe.props[4]=Be,Qe.props[5]=qe,Qe.props[12]=Ke,Qe.props[13]=Ye,Qe}function Xe(Fe){var ke=this.getInverseMatrix();return ke.applyToPointArray(Fe[0],Fe[1],Fe[2]||0)}function Ue(Fe){var ke,Ge=Fe.length,Be=[];for(ke=0;ke<Ge;ke+=1)Be[ke]=Xe(Fe[ke]);return Be}function We(Fe,ke,Ge){var Be=createTypedArray("float32",6);if(this.isIdentity())Be[0]=Fe[0],Be[1]=Fe[1],Be[2]=ke[0],Be[3]=ke[1],Be[4]=Ge[0],Be[5]=Ge[1];else{var qe=this.props[0],Ke=this.props[1],Ye=this.props[4],Qe=this.props[5],Ze=this.props[12],it=this.props[13];Be[0]=Fe[0]*qe+Fe[1]*Ye+Ze,Be[1]=Fe[0]*Ke+Fe[1]*Qe+it,Be[2]=ke[0]*qe+ke[1]*Ye+Ze,Be[3]=ke[0]*Ke+ke[1]*Qe+it,Be[4]=Ge[0]*qe+Ge[1]*Ye+Ze,Be[5]=Ge[0]*Ke+Ge[1]*Qe+it}return Be}function ze(Fe,ke,Ge){var Be;return this.isIdentity()?Be=[Fe,ke,Ge]:Be=[Fe*this.props[0]+ke*this.props[4]+Ge*this.props[8]+this.props[12],Fe*this.props[1]+ke*this.props[5]+Ge*this.props[9]+this.props[13],Fe*this.props[2]+ke*this.props[6]+Ge*this.props[10]+this.props[14]],Be}function He(Fe,ke){if(this.isIdentity())return Fe+","+ke;var Ge=this.props;return Math.round((Fe*Ge[0]+ke*Ge[4]+Ge[12])*100)/100+","+Math.round((Fe*Ge[1]+ke*Ge[5]+Ge[13])*100)/100}function je(){for(var Fe=0,ke=this.props,Ge="matrix3d(",Be=1e4;Fe<16;)Ge+=B(ke[Fe]*Be)/Be,Ge+=Fe===15?")":",",Fe+=1;return Ge}function $e(Fe){var ke=1e4;return Fe<1e-6&&Fe>0||Fe>-1e-6&&Fe<0?B(Fe*ke)/ke:Fe}function De(){var Fe=this.props,ke=$e(Fe[0]),Ge=$e(Fe[1]),Be=$e(Fe[4]),qe=$e(Fe[5]),Ke=$e(Fe[12]),Ye=$e(Fe[13]);return"matrix("+ke+","+Ge+","+Be+","+qe+","+Ke+","+Ye+")"}return function(){this.reset=U,this.rotate=V,this.rotateX=X,this.rotateY=Y,this.rotateZ=K,this.skew=xe,this.skewFromAxis=Z,this.shear=J,this.scale=_e,this.setTransform=Se,this.translate=Ee,this.transform=Ae,this.multiply=Re,this.applyToPoint=Me,this.applyToX=Oe,this.applyToY=Le,this.applyToZ=Ne,this.applyToPointArray=ze,this.applyToTriplePoints=We,this.applyToPointStringified=He,this.toCSS=je,this.to2dCSS=De,this.clone=Pe,this.cloneFromProps=Ie,this.equals=we,this.inversePoints=Ue,this.inversePoint=Xe,this.getInverseMatrix=Ve,this._t=this.transform,this.isIdentity=Te,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(I){return typeof I}:_typeof$3=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$3(C)}var lottie={};function setLocation(C){setLocationHref(C)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(C){setSubframeEnabled(C)}function setPrefix(C){setIdPrefix(C)}function loadAnimation(C){return animationManager.loadAnimation(C)}function setQuality(C){if(typeof C=="string")switch(C){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(C)&&C>1&&setDefaultCurveSegments(C)}function inBrowser(){return typeof navigator<"u"}function installPlugin(C,E){C==="expressions"&&setExpressionsPlugin(E)}function getFactory(C){switch(C){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(C){for(var E=queryString.split("&"),I=0;I<E.length;I+=1){var B=E[I].split("=");if(decodeURIComponent(B[0])==C)return decodeURIComponent(B[1])}return null}var queryString="";{var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(C){}var ShapeModifiers=function(){var C={},E={};C.registerModifier=I,C.getModifier=B;function I(U,V){E[U]||(E[U]=V)}function B(U,V,X){return new E[U](V,X)}return C}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(C){if(!this.closed){C.sh.container.addDynamicProperty(C.sh);var E={shape:C.sh,data:C,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(E),this.addShapeToModifier(E),this._isAnimated&&C.setAsAnimated()}},ShapeModifier.prototype.init=function(C,E){this.shapes=[],this.elem=C,this.initDynamicPropertyContainer(C),this.initModifierProperties(C,E),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(C,E){this.s=PropertyFactory.getProp(C,E.s,0,.01,this),this.e=PropertyFactory.getProp(C,E.e,0,.01,this),this.o=PropertyFactory.getProp(C,E.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=E.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(C){C.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(C,E,I,B,U){var V=[];E<=1?V.push({s:C,e:E}):C>=1?V.push({s:C-1,e:E-1}):(V.push({s:C,e:1}),V.push({s:0,e:E-1}));var X=[],Y,K=V.length,J;for(Y=0;Y<K;Y+=1)if(J=V[Y],!(J.e*U<B||J.s*U>B+I)){var xe,Z;J.s*U<=B?xe=0:xe=(J.s*U-B)/I,J.e*U>=B+I?Z=1:Z=(J.e*U-B)/I,X.push([xe,Z])}return X.length||X.push([0,0]),X},TrimModifier.prototype.releasePathsData=function(C){var E,I=C.length;for(E=0;E<I;E+=1)segmentsLengthPool.release(C[E]);return C.length=0,C},TrimModifier.prototype.processShapes=function(C){var E,I;if(this._mdf||C){var B=this.o.v%360/360;if(B<0&&(B+=1),this.s.v>1?E=1+B:this.s.v<0?E=0+B:E=this.s.v+B,this.e.v>1?I=1+B:this.e.v<0?I=0+B:I=this.e.v+B,E>I){var U=E;E=I,I=U}E=Math.round(E*1e4)*1e-4,I=Math.round(I*1e4)*1e-4,this.sValue=E,this.eValue=I}else E=this.sValue,I=this.eValue;var V,X,Y=this.shapes.length,K,J,xe,Z,_e,Se=0;if(I===E)for(X=0;X<Y;X+=1)this.shapes[X].localShapeCollection.releaseShapes(),this.shapes[X].shape._mdf=!0,this.shapes[X].shape.paths=this.shapes[X].localShapeCollection,this._mdf&&(this.shapes[X].pathsData.length=0);else if(I===1&&E===0||I===0&&E===1){if(this._mdf)for(X=0;X<Y;X+=1)this.shapes[X].pathsData.length=0,this.shapes[X].shape._mdf=!0}else{var Ee=[],Ae,Re;for(X=0;X<Y;X+=1)if(Ae=this.shapes[X],!Ae.shape._mdf&&!this._mdf&&!C&&this.m!==2)Ae.shape.paths=Ae.localShapeCollection;else{if(V=Ae.shape.paths,J=V._length,_e=0,!Ae.shape._mdf&&Ae.pathsData.length)_e=Ae.totalShapeLength;else{for(xe=this.releasePathsData(Ae.pathsData),K=0;K<J;K+=1)Z=bez.getSegmentsLength(V.shapes[K]),xe.push(Z),_e+=Z.totalLength;Ae.totalShapeLength=_e,Ae.pathsData=xe}Se+=_e,Ae.shape._mdf=!0}var Te=E,we=I,Pe=0,Ie;for(X=Y-1;X>=0;X-=1)if(Ae=this.shapes[X],Ae.shape._mdf){for(Re=Ae.localShapeCollection,Re.releaseShapes(),this.m===2&&Y>1?(Ie=this.calculateShapeEdges(E,I,Ae.totalShapeLength,Pe,Se),Pe+=Ae.totalShapeLength):Ie=[[Te,we]],J=Ie.length,K=0;K<J;K+=1){Te=Ie[K][0],we=Ie[K][1],Ee.length=0,we<=1?Ee.push({s:Ae.totalShapeLength*Te,e:Ae.totalShapeLength*we}):Te>=1?Ee.push({s:Ae.totalShapeLength*(Te-1),e:Ae.totalShapeLength*(we-1)}):(Ee.push({s:Ae.totalShapeLength*Te,e:Ae.totalShapeLength}),Ee.push({s:0,e:Ae.totalShapeLength*(we-1)}));var Me=this.addShapes(Ae,Ee[0]);if(Ee[0].s!==Ee[0].e){if(Ee.length>1){var Oe=Ae.shape.paths.shapes[Ae.shape.paths._length-1];if(Oe.c){var Le=Me.pop();this.addPaths(Me,Re),Me=this.addShapes(Ae,Ee[1],Le)}else this.addPaths(Me,Re),Me=this.addShapes(Ae,Ee[1])}this.addPaths(Me,Re)}}Ae.shape.paths=Re}}},TrimModifier.prototype.addPaths=function(C,E){var I,B=C.length;for(I=0;I<B;I+=1)E.addShape(C[I])},TrimModifier.prototype.addSegment=function(C,E,I,B,U,V,X){U.setXYAt(E[0],E[1],"o",V),U.setXYAt(I[0],I[1],"i",V+1),X&&U.setXYAt(C[0],C[1],"v",V),U.setXYAt(B[0],B[1],"v",V+1)},TrimModifier.prototype.addSegmentFromArray=function(C,E,I,B){E.setXYAt(C[1],C[5],"o",I),E.setXYAt(C[2],C[6],"i",I+1),B&&E.setXYAt(C[0],C[4],"v",I),E.setXYAt(C[3],C[7],"v",I+1)},TrimModifier.prototype.addShapes=function(C,E,I){var B=C.pathsData,U=C.shape.paths.shapes,V,X=C.shape.paths._length,Y,K,J=0,xe,Z,_e,Se,Ee=[],Ae,Re=!0;for(I?(Z=I._length,Ae=I._length):(I=shapePool.newElement(),Z=0,Ae=0),Ee.push(I),V=0;V<X;V+=1){for(_e=B[V].lengths,I.c=U[V].c,K=U[V].c?_e.length:_e.length+1,Y=1;Y<K;Y+=1)if(xe=_e[Y-1],J+xe.addedLength<E.s)J+=xe.addedLength,I.c=!1;else if(J>E.e){I.c=!1;break}else E.s<=J&&E.e>=J+xe.addedLength?(this.addSegment(U[V].v[Y-1],U[V].o[Y-1],U[V].i[Y],U[V].v[Y],I,Z,Re),Re=!1):(Se=bez.getNewSegment(U[V].v[Y-1],U[V].v[Y],U[V].o[Y-1],U[V].i[Y],(E.s-J)/xe.addedLength,(E.e-J)/xe.addedLength,_e[Y-1]),this.addSegmentFromArray(Se,I,Z,Re),Re=!1,I.c=!1),J+=xe.addedLength,Z+=1;if(U[V].c&&_e.length){if(xe=_e[Y-1],J<=E.e){var Te=_e[Y-1].addedLength;E.s<=J&&E.e>=J+Te?(this.addSegment(U[V].v[Y-1],U[V].o[Y-1],U[V].i[0],U[V].v[0],I,Z,Re),Re=!1):(Se=bez.getNewSegment(U[V].v[Y-1],U[V].v[0],U[V].o[Y-1],U[V].i[0],(E.s-J)/Te,(E.e-J)/Te,_e[Y-1]),this.addSegmentFromArray(Se,I,Z,Re),Re=!1,I.c=!1)}else I.c=!1;J+=xe.addedLength,Z+=1}if(I._length&&(I.setXYAt(I.v[Ae][0],I.v[Ae][1],"i",Ae),I.setXYAt(I.v[I._length-1][0],I.v[I._length-1][1],"o",I._length-1)),J>E.e)break;V<X-1&&(I=shapePool.newElement(),Re=!0,Ee.push(I),Z=0)}return Ee};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(C,E.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(C,E){var I=E/100,B=[0,0],U=C._length,V=0;for(V=0;V<U;V+=1)B[0]+=C.v[V][0],B[1]+=C.v[V][1];B[0]/=U,B[1]/=U;var X=shapePool.newElement();X.c=C.c;var Y,K,J,xe,Z,_e;for(V=0;V<U;V+=1)Y=C.v[V][0]+(B[0]-C.v[V][0])*I,K=C.v[V][1]+(B[1]-C.v[V][1])*I,J=C.o[V][0]+(B[0]-C.o[V][0])*-I,xe=C.o[V][1]+(B[1]-C.o[V][1])*-I,Z=C.i[V][0]+(B[0]-C.i[V][0])*-I,_e=C.i[V][1]+(B[1]-C.i[V][1])*-I,X.setTripleAt(Y,K,J,xe,Z,_e,V);return X},PuckerAndBloatModifier.prototype.processShapes=function(C){var E,I,B=this.shapes.length,U,V,X=this.amount.v;if(X!==0){var Y,K;for(I=0;I<B;I+=1){if(Y=this.shapes[I],K=Y.localShapeCollection,!(!Y.shape._mdf&&!this._mdf&&!C))for(K.releaseShapes(),Y.shape._mdf=!0,E=Y.shape.paths.shapes,V=Y.shape.paths._length,U=0;U<V;U+=1)K.addShape(this.processPath(E[U],X));Y.shape.paths=Y.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var C=[0,0];function E(K){var J=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||J,this.a&&K.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&K.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&K.skewFromAxis(-this.sk.v,this.sa.v),this.r?K.rotate(-this.r.v):K.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?K.translate(this.px.v,this.py.v,-this.pz.v):K.translate(this.px.v,this.py.v,0):K.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function I(K){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||K){var J;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var xe,Z;if(J=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(xe=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/J,0),Z=this.p.getValueAtTime(this.p.keyframes[0].t/J,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(xe=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/J,0),Z=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/J,0)):(xe=this.p.pv,Z=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/J,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){xe=[],Z=[];var _e=this.px,Se=this.py;_e._caching.lastFrame+_e.offsetTime<=_e.keyframes[0].t?(xe[0]=_e.getValueAtTime((_e.keyframes[0].t+.01)/J,0),xe[1]=Se.getValueAtTime((Se.keyframes[0].t+.01)/J,0),Z[0]=_e.getValueAtTime(_e.keyframes[0].t/J,0),Z[1]=Se.getValueAtTime(Se.keyframes[0].t/J,0)):_e._caching.lastFrame+_e.offsetTime>=_e.keyframes[_e.keyframes.length-1].t?(xe[0]=_e.getValueAtTime(_e.keyframes[_e.keyframes.length-1].t/J,0),xe[1]=Se.getValueAtTime(Se.keyframes[Se.keyframes.length-1].t/J,0),Z[0]=_e.getValueAtTime((_e.keyframes[_e.keyframes.length-1].t-.01)/J,0),Z[1]=Se.getValueAtTime((Se.keyframes[Se.keyframes.length-1].t-.01)/J,0)):(xe=[_e.pv,Se.pv],Z[0]=_e.getValueAtTime((_e._caching.lastFrame+_e.offsetTime-.01)/J,_e.offsetTime),Z[1]=Se.getValueAtTime((Se._caching.lastFrame+Se.offsetTime-.01)/J,Se.offsetTime))}else Z=C,xe=Z;this.v.rotate(-Math.atan2(xe[1]-Z[1],xe[0]-Z[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function B(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function U(){}function V(K){this._addDynamicProperty(K),this.elem.addDynamicProperty(K),this._isDirty=!0}function X(K,J,xe){if(this.elem=K,this.frameId=-1,this.propType="transform",this.data=J,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(xe||K),J.p&&J.p.s?(this.px=PropertyFactory.getProp(K,J.p.x,0,0,this),this.py=PropertyFactory.getProp(K,J.p.y,0,0,this),J.p.z&&(this.pz=PropertyFactory.getProp(K,J.p.z,0,0,this))):this.p=PropertyFactory.getProp(K,J.p||{k:[0,0,0]},1,0,this),J.rx){if(this.rx=PropertyFactory.getProp(K,J.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(K,J.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(K,J.rz,0,degToRads,this),J.or.k[0].ti){var Z,_e=J.or.k.length;for(Z=0;Z<_e;Z+=1)J.or.k[Z].to=null,J.or.k[Z].ti=null}this.or=PropertyFactory.getProp(K,J.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(K,J.r||{k:0},0,degToRads,this);J.sk&&(this.sk=PropertyFactory.getProp(K,J.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(K,J.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(K,J.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(K,J.s||{k:[100,100,100]},1,.01,this),J.o?this.o=PropertyFactory.getProp(K,J.o,0,.01,K):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}X.prototype={applyToMatrix:E,getValue:I,precalculateMatrix:B,autoOrient:U},extendPrototype([DynamicPropertyContainer],X),X.prototype.addDynamicProperty=V,X.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function Y(K,J,xe){return new X(K,J,xe)}return{getTransformProperty:Y}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(C,E.c,0,null,this),this.o=PropertyFactory.getProp(C,E.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(C,E.tr,this),this.so=PropertyFactory.getProp(C,E.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(C,E.tr.eo,0,.01,this),this.data=E,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(C,E,I,B,U,V){var X=V?-1:1,Y=B.s.v[0]+(1-B.s.v[0])*(1-U),K=B.s.v[1]+(1-B.s.v[1])*(1-U);C.translate(B.p.v[0]*X*U,B.p.v[1]*X*U,B.p.v[2]),E.translate(-B.a.v[0],-B.a.v[1],B.a.v[2]),E.rotate(-B.r.v*X*U),E.translate(B.a.v[0],B.a.v[1],B.a.v[2]),I.translate(-B.a.v[0],-B.a.v[1],B.a.v[2]),I.scale(V?1/Y:Y,V?1/K:K),I.translate(B.a.v[0],B.a.v[1],B.a.v[2])},RepeaterModifier.prototype.init=function(C,E,I,B){for(this.elem=C,this.arr=E,this.pos=I,this.elemsData=B,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(C),this.initModifierProperties(C,E[I]);I>0;)I-=1,this._elements.unshift(E[I]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(C){var E,I=C.length;for(E=0;E<I;E+=1)C[E]._processed=!1,C[E].ty==="gr"&&this.resetElements(C[E].it)},RepeaterModifier.prototype.cloneElements=function(C){var E=JSON.parse(JSON.stringify(C));return this.resetElements(E),E},RepeaterModifier.prototype.changeGroupRender=function(C,E){var I,B=C.length;for(I=0;I<B;I+=1)C[I]._render=E,C[I].ty==="gr"&&this.changeGroupRender(C[I].it,E)},RepeaterModifier.prototype.processShapes=function(C){var E,I,B,U,V,X=!1;if(this._mdf||C){var Y=Math.ceil(this.c.v);if(this._groups.length<Y){for(;this._groups.length<Y;){var K={it:this.cloneElements(this._elements),ty:"gr"};K.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,K),this._groups.splice(0,0,K),this._currentCopies+=1}this.elem.reloadShapes(),X=!0}V=0;var J;for(B=0;B<=this._groups.length-1;B+=1){if(J=V<Y,this._groups[B]._render=J,this.changeGroupRender(this._groups[B].it,J),!J){var xe=this.elemsData[B].it,Z=xe[xe.length-1];Z.transform.op.v!==0?(Z.transform.op._mdf=!0,Z.transform.op.v=0):Z.transform.op._mdf=!1}V+=1}this._currentCopies=Y;var _e=this.o.v,Se=_e%1,Ee=_e>0?Math.floor(_e):Math.ceil(_e),Ae=this.pMatrix.props,Re=this.rMatrix.props,Te=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var we=0;if(_e>0){for(;we<Ee;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),we+=1;Se&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,Se,!1),we+=Se)}else if(_e<0){for(;we>Ee;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),we-=1;Se&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-Se,!0),we-=Se)}B=this.data.m===1?0:this._currentCopies-1,U=this.data.m===1?1:-1,V=this._currentCopies;for(var Pe,Ie;V;){if(E=this.elemsData[B].it,I=E[E.length-1].transform.mProps.v.props,Ie=I.length,E[E.length-1].transform.mProps._mdf=!0,E[E.length-1].transform.op._mdf=!0,E[E.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(B/(this._currentCopies-1)),we!==0){for((B!==0&&U===1||B!==this._currentCopies-1&&U===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(Re[0],Re[1],Re[2],Re[3],Re[4],Re[5],Re[6],Re[7],Re[8],Re[9],Re[10],Re[11],Re[12],Re[13],Re[14],Re[15]),this.matrix.transform(Te[0],Te[1],Te[2],Te[3],Te[4],Te[5],Te[6],Te[7],Te[8],Te[9],Te[10],Te[11],Te[12],Te[13],Te[14],Te[15]),this.matrix.transform(Ae[0],Ae[1],Ae[2],Ae[3],Ae[4],Ae[5],Ae[6],Ae[7],Ae[8],Ae[9],Ae[10],Ae[11],Ae[12],Ae[13],Ae[14],Ae[15]),Pe=0;Pe<Ie;Pe+=1)I[Pe]=this.matrix.props[Pe];this.matrix.reset()}else for(this.matrix.reset(),Pe=0;Pe<Ie;Pe+=1)I[Pe]=this.matrix.props[Pe];we+=1,V-=1,B+=U}}else for(V=this._currentCopies,B=0,U=1;V;)E=this.elemsData[B].it,I=E[E.length-1].transform.mProps.v.props,E[E.length-1].transform.mProps._mdf=!1,E[E.length-1].transform.op._mdf=!1,V-=1,B+=U;return X},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(C,E.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(C,E){var I=shapePool.newElement();I.c=C.c;var B,U=C._length,V,X,Y,K,J,xe,Z=0,_e,Se,Ee,Ae,Re,Te;for(B=0;B<U;B+=1)V=C.v[B],Y=C.o[B],X=C.i[B],V[0]===Y[0]&&V[1]===Y[1]&&V[0]===X[0]&&V[1]===X[1]?(B===0||B===U-1)&&!C.c?(I.setTripleAt(V[0],V[1],Y[0],Y[1],X[0],X[1],Z),Z+=1):(B===0?K=C.v[U-1]:K=C.v[B-1],J=Math.sqrt(Math.pow(V[0]-K[0],2)+Math.pow(V[1]-K[1],2)),xe=J?Math.min(J/2,E)/J:0,Re=V[0]+(K[0]-V[0])*xe,_e=Re,Te=V[1]-(V[1]-K[1])*xe,Se=Te,Ee=_e-(_e-V[0])*roundCorner,Ae=Se-(Se-V[1])*roundCorner,I.setTripleAt(_e,Se,Ee,Ae,Re,Te,Z),Z+=1,B===U-1?K=C.v[0]:K=C.v[B+1],J=Math.sqrt(Math.pow(V[0]-K[0],2)+Math.pow(V[1]-K[1],2)),xe=J?Math.min(J/2,E)/J:0,Ee=V[0]+(K[0]-V[0])*xe,_e=Ee,Ae=V[1]+(K[1]-V[1])*xe,Se=Ae,Re=_e-(_e-V[0])*roundCorner,Te=Se-(Se-V[1])*roundCorner,I.setTripleAt(_e,Se,Ee,Ae,Re,Te,Z),Z+=1):(I.setTripleAt(C.v[B][0],C.v[B][1],C.o[B][0],C.o[B][1],C.i[B][0],C.i[B][1],Z),Z+=1);return I},RoundCornersModifier.prototype.processShapes=function(C){var E,I,B=this.shapes.length,U,V,X=this.rd.v;if(X!==0){var Y,K;for(I=0;I<B;I+=1){if(Y=this.shapes[I],K=Y.localShapeCollection,!(!Y.shape._mdf&&!this._mdf&&!C))for(K.releaseShapes(),Y.shape._mdf=!0,E=Y.shape.paths.shapes,V=Y.shape.paths._length,U=0;U<V;U+=1)K.addShape(this.processPath(E[U],X));Y.shape.paths=Y.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(C,E){return Math.abs(C-E)*1e5<=Math.min(Math.abs(C),Math.abs(E))}function floatZero(C){return Math.abs(C)<=1e-5}function lerp(C,E,I){return C*(1-I)+E*I}function lerpPoint(C,E,I){return[lerp(C[0],E[0],I),lerp(C[1],E[1],I)]}function quadRoots(C,E,I){if(C===0)return[];var B=E*E-4*C*I;if(B<0)return[];var U=-E/(2*C);if(B===0)return[U];var V=Math.sqrt(B)/(2*C);return[U-V,U+V]}function polynomialCoefficients(C,E,I,B){return[-C+3*E-3*I+B,3*C-6*E+3*I,-3*C+3*E,C]}function singlePoint(C){return new PolynomialBezier(C,C,C,C,!1)}function PolynomialBezier(C,E,I,B,U){U&&pointEqual(C,E)&&(E=lerpPoint(C,B,1/3)),U&&pointEqual(I,B)&&(I=lerpPoint(C,B,2/3));var V=polynomialCoefficients(C[0],E[0],I[0],B[0]),X=polynomialCoefficients(C[1],E[1],I[1],B[1]);this.a=[V[0],X[0]],this.b=[V[1],X[1]],this.c=[V[2],X[2]],this.d=[V[3],X[3]],this.points=[C,E,I,B]}PolynomialBezier.prototype.point=function(C){return[((this.a[0]*C+this.b[0])*C+this.c[0])*C+this.d[0],((this.a[1]*C+this.b[1])*C+this.c[1])*C+this.d[1]]},PolynomialBezier.prototype.derivative=function(C){return[(3*C*this.a[0]+2*this.b[0])*C+this.c[0],(3*C*this.a[1]+2*this.b[1])*C+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(C){var E=this.derivative(C);return Math.atan2(E[1],E[0])},PolynomialBezier.prototype.normalAngle=function(C){var E=this.derivative(C);return Math.atan2(E[0],E[1])},PolynomialBezier.prototype.inflectionPoints=function(){var C=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(C))return[];var E=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/C,I=E*E-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/C;if(I<0)return[];var B=Math.sqrt(I);return floatZero(B)?B>0&&B<1?[E]:[]:[E-B,E+B].filter(function(U){return U>0&&U<1})},PolynomialBezier.prototype.split=function(C){if(C<=0)return[singlePoint(this.points[0]),this];if(C>=1)return[this,singlePoint(this.points[this.points.length-1])];var E=lerpPoint(this.points[0],this.points[1],C),I=lerpPoint(this.points[1],this.points[2],C),B=lerpPoint(this.points[2],this.points[3],C),U=lerpPoint(E,I,C),V=lerpPoint(I,B,C),X=lerpPoint(U,V,C);return[new PolynomialBezier(this.points[0],E,U,X,!0),new PolynomialBezier(X,V,B,this.points[3],!0)]};function extrema(C,E){var I=C.points[0][E],B=C.points[C.points.length-1][E];if(I>B){var U=B;B=I,I=U}for(var V=quadRoots(3*C.a[E],2*C.b[E],C.c[E]),X=0;X<V.length;X+=1)if(V[X]>0&&V[X]<1){var Y=C.point(V[X])[E];Y<I?I=Y:Y>B&&(B=Y)}return{min:I,max:B}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var C=this.bounds();return{left:C.x.min,right:C.x.max,top:C.y.min,bottom:C.y.max,width:C.x.max-C.x.min,height:C.y.max-C.y.min,cx:(C.x.max+C.x.min)/2,cy:(C.y.max+C.y.min)/2}};function intersectData(C,E,I){var B=C.boundingBox();return{cx:B.cx,cy:B.cy,width:B.width,height:B.height,bez:C,t:(E+I)/2,t1:E,t2:I}}function splitData(C){var E=C.bez.split(.5);return[intersectData(E[0],C.t1,C.t),intersectData(E[1],C.t,C.t2)]}function boxIntersect(C,E){return Math.abs(C.cx-E.cx)*2<C.width+E.width&&Math.abs(C.cy-E.cy)*2<C.height+E.height}function intersectsImpl(C,E,I,B,U,V){if(boxIntersect(C,E)){if(I>=V||C.width<=B&&C.height<=B&&E.width<=B&&E.height<=B){U.push([C.t,E.t]);return}var X=splitData(C),Y=splitData(E);intersectsImpl(X[0],Y[0],I+1,B,U,V),intersectsImpl(X[0],Y[1],I+1,B,U,V),intersectsImpl(X[1],Y[0],I+1,B,U,V),intersectsImpl(X[1],Y[1],I+1,B,U,V)}}PolynomialBezier.prototype.intersections=function(C,E,I){E===void 0&&(E=2),I===void 0&&(I=7);var B=[];return intersectsImpl(intersectData(this,0,1),intersectData(C,0,1),0,E,B,I),B},PolynomialBezier.shapeSegment=function(C,E){var I=(E+1)%C.length();return new PolynomialBezier(C.v[E],C.o[E],C.i[I],C.v[I],!0)},PolynomialBezier.shapeSegmentInverted=function(C,E){var I=(E+1)%C.length();return new PolynomialBezier(C.v[I],C.i[I],C.o[E],C.v[E],!0)};function crossProduct(C,E){return[C[1]*E[2]-C[2]*E[1],C[2]*E[0]-C[0]*E[2],C[0]*E[1]-C[1]*E[0]]}function lineIntersection(C,E,I,B){var U=[C[0],C[1],1],V=[E[0],E[1],1],X=[I[0],I[1],1],Y=[B[0],B[1],1],K=crossProduct(crossProduct(U,V),crossProduct(X,Y));return floatZero(K[2])?null:[K[0]/K[2],K[1]/K[2]]}function polarOffset(C,E,I){return[C[0]+Math.cos(E)*I,C[1]-Math.sin(E)*I]}function pointDistance(C,E){return Math.hypot(C[0]-E[0],C[1]-E[1])}function pointEqual(C,E){return floatEqual(C[0],E[0])&&floatEqual(C[1],E[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(C,E.s,0,null,this),this.frequency=PropertyFactory.getProp(C,E.r,0,null,this),this.pointsType=PropertyFactory.getProp(C,E.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(C,E,I,B,U,V,X){var Y=I-Math.PI/2,K=I+Math.PI/2,J=E[0]+Math.cos(I)*B*U,xe=E[1]-Math.sin(I)*B*U;C.setTripleAt(J,xe,J+Math.cos(Y)*V,xe-Math.sin(Y)*V,J+Math.cos(K)*X,xe-Math.sin(K)*X,C.length())}function getPerpendicularVector(C,E){var I=[E[0]-C[0],E[1]-C[1]],B=-Math.PI*.5,U=[Math.cos(B)*I[0]-Math.sin(B)*I[1],Math.sin(B)*I[0]+Math.cos(B)*I[1]];return U}function getProjectingAngle(C,E){var I=E===0?C.length()-1:E-1,B=(E+1)%C.length(),U=C.v[I],V=C.v[B],X=getPerpendicularVector(U,V);return Math.atan2(0,1)-Math.atan2(X[1],X[0])}function zigZagCorner(C,E,I,B,U,V,X){var Y=getProjectingAngle(E,I),K=E.v[I%E._length],J=E.v[I===0?E._length-1:I-1],xe=E.v[(I+1)%E._length],Z=V===2?Math.sqrt(Math.pow(K[0]-J[0],2)+Math.pow(K[1]-J[1],2)):0,_e=V===2?Math.sqrt(Math.pow(K[0]-xe[0],2)+Math.pow(K[1]-xe[1],2)):0;setPoint(C,E.v[I%E._length],Y,X,B,_e/((U+1)*2),Z/((U+1)*2))}function zigZagSegment(C,E,I,B,U,V){for(var X=0;X<B;X+=1){var Y=(X+1)/(B+1),K=U===2?Math.sqrt(Math.pow(E.points[3][0]-E.points[0][0],2)+Math.pow(E.points[3][1]-E.points[0][1],2)):0,J=E.normalAngle(Y),xe=E.point(Y);setPoint(C,xe,J,V,I,K/((B+1)*2),K/((B+1)*2)),V=-V}return V}ZigZagModifier.prototype.processPath=function(C,E,I,B){var U=C._length,V=shapePool.newElement();if(V.c=C.c,C.c||(U-=1),U===0)return V;var X=-1,Y=PolynomialBezier.shapeSegment(C,0);zigZagCorner(V,C,0,E,I,B,X);for(var K=0;K<U;K+=1)X=zigZagSegment(V,Y,E,I,B,-X),K===U-1&&!C.c?Y=null:Y=PolynomialBezier.shapeSegment(C,(K+1)%U),zigZagCorner(V,C,K+1,E,I,B,X);return V},ZigZagModifier.prototype.processShapes=function(C){var E,I,B=this.shapes.length,U,V,X=this.amplitude.v,Y=Math.max(0,Math.round(this.frequency.v)),K=this.pointsType.v;if(X!==0){var J,xe;for(I=0;I<B;I+=1){if(J=this.shapes[I],xe=J.localShapeCollection,!(!J.shape._mdf&&!this._mdf&&!C))for(xe.releaseShapes(),J.shape._mdf=!0,E=J.shape.paths.shapes,V=J.shape.paths._length,U=0;U<V;U+=1)xe.addShape(this.processPath(E[U],X,Y,K));J.shape.paths=J.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(C,E,I){var B=Math.atan2(E[0]-C[0],E[1]-C[1]);return[polarOffset(C,B,I),polarOffset(E,B,I)]}function offsetSegment(C,E){var I,B,U,V,X,Y,K;K=linearOffset(C.points[0],C.points[1],E),I=K[0],B=K[1],K=linearOffset(C.points[1],C.points[2],E),U=K[0],V=K[1],K=linearOffset(C.points[2],C.points[3],E),X=K[0],Y=K[1];var J=lineIntersection(I,B,U,V);J===null&&(J=B);var xe=lineIntersection(X,Y,U,V);return xe===null&&(xe=X),new PolynomialBezier(I,J,xe,Y)}function joinLines(C,E,I,B,U){var V=E.points[3],X=I.points[0];if(B===3||pointEqual(V,X))return V;if(B===2){var Y=-E.tangentAngle(1),K=-I.tangentAngle(0)+Math.PI,J=lineIntersection(V,polarOffset(V,Y+Math.PI/2,100),X,polarOffset(X,Y+Math.PI/2,100)),xe=J?pointDistance(J,V):pointDistance(V,X)/2,Z=polarOffset(V,Y,2*xe*roundCorner);return C.setXYAt(Z[0],Z[1],"o",C.length()-1),Z=polarOffset(X,K,2*xe*roundCorner),C.setTripleAt(X[0],X[1],X[0],X[1],Z[0],Z[1],C.length()),X}var _e=pointEqual(V,E.points[2])?E.points[0]:E.points[2],Se=pointEqual(X,I.points[1])?I.points[3]:I.points[1],Ee=lineIntersection(_e,V,X,Se);return Ee&&pointDistance(Ee,V)<U?(C.setTripleAt(Ee[0],Ee[1],Ee[0],Ee[1],Ee[0],Ee[1],C.length()),Ee):V}function getIntersection(C,E){var I=C.intersections(E);return I.length&&floatEqual(I[0][0],1)&&I.shift(),I.length?I[0]:null}function pruneSegmentIntersection(C,E){var I=C.slice(),B=E.slice(),U=getIntersection(C[C.length-1],E[0]);return U&&(I[C.length-1]=C[C.length-1].split(U[0])[0],B[0]=E[0].split(U[1])[1]),C.length>1&&E.length>1&&(U=getIntersection(C[0],E[E.length-1]),U)?[[C[0].split(U[0])[0]],[E[E.length-1].split(U[1])[1]]]:[I,B]}function pruneIntersections(C){for(var E,I=1;I<C.length;I+=1)E=pruneSegmentIntersection(C[I-1],C[I]),C[I-1]=E[0],C[I]=E[1];return C.length>1&&(E=pruneSegmentIntersection(C[C.length-1],C[0]),C[C.length-1]=E[0],C[0]=E[1]),C}function offsetSegmentSplit(C,E){var I=C.inflectionPoints(),B,U,V,X;if(I.length===0)return[offsetSegment(C,E)];if(I.length===1||floatEqual(I[1],1))return V=C.split(I[0]),B=V[0],U=V[1],[offsetSegment(B,E),offsetSegment(U,E)];V=C.split(I[0]),B=V[0];var Y=(I[1]-I[0])/(1-I[0]);return V=V[1].split(Y),X=V[0],U=V[1],[offsetSegment(B,E),offsetSegment(X,E),offsetSegment(U,E)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(C,E.a,0,null,this),this.miterLimit=PropertyFactory.getProp(C,E.ml,0,null,this),this.lineJoin=E.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(C,E,I,B){var U=shapePool.newElement();U.c=C.c;var V=C.length();C.c||(V-=1);var X,Y,K,J=[];for(X=0;X<V;X+=1)K=PolynomialBezier.shapeSegment(C,X),J.push(offsetSegmentSplit(K,E));if(!C.c)for(X=V-1;X>=0;X-=1)K=PolynomialBezier.shapeSegmentInverted(C,X),J.push(offsetSegmentSplit(K,E));J=pruneIntersections(J);var xe=null,Z=null;for(X=0;X<J.length;X+=1){var _e=J[X];for(Z&&(xe=joinLines(U,Z,_e[0],I,B)),Z=_e[_e.length-1],Y=0;Y<_e.length;Y+=1)K=_e[Y],xe&&pointEqual(K.points[0],xe)?U.setXYAt(K.points[1][0],K.points[1][1],"o",U.length()-1):U.setTripleAt(K.points[0][0],K.points[0][1],K.points[1][0],K.points[1][1],K.points[0][0],K.points[0][1],U.length()),U.setTripleAt(K.points[3][0],K.points[3][1],K.points[3][0],K.points[3][1],K.points[2][0],K.points[2][1],U.length()),xe=K.points[3]}return J.length&&joinLines(U,Z,J[0][0],I,B),U},OffsetPathModifier.prototype.processShapes=function(C){var E,I,B=this.shapes.length,U,V,X=this.amount.v,Y=this.miterLimit.v,K=this.lineJoin;if(X!==0){var J,xe;for(I=0;I<B;I+=1){if(J=this.shapes[I],xe=J.localShapeCollection,!(!J.shape._mdf&&!this._mdf&&!C))for(xe.releaseShapes(),J.shape._mdf=!0,E=J.shape.paths.shapes,V=J.shape.paths._length,U=0;U<V;U+=1)xe.addShape(this.processPath(E[U],X,K,Y));J.shape.paths=J.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(C){for(var E=C.fStyle?C.fStyle.split(" "):[],I="normal",B="normal",U=E.length,V,X=0;X<U;X+=1)switch(V=E[X].toLowerCase(),V){case"italic":B="italic";break;case"bold":I="700";break;case"black":I="900";break;case"medium":I="500";break;case"regular":case"normal":I="400";break;case"light":case"thin":I="200";break}return{style:B,weight:C.fWeight||I}}var FontManager=function(){var C=5e3,E={w:0,size:0,shapes:[],data:{shapes:[]}},I=[];I=I.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var B=127988,U=917631,V=917601,X=917626,Y=65039,K=8205,J=127462,xe=127487,Z=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function _e($e){var De=$e.split(","),Fe,ke=De.length,Ge=[];for(Fe=0;Fe<ke;Fe+=1)De[Fe]!=="sans-serif"&&De[Fe]!=="monospace"&&Ge.push(De[Fe]);return Ge.join(",")}function Se($e,De){var Fe=createTag("span");Fe.setAttribute("aria-hidden",!0),Fe.style.fontFamily=De;var ke=createTag("span");ke.innerText="giItT1WQy@!-/#",Fe.style.position="absolute",Fe.style.left="-10000px",Fe.style.top="-10000px",Fe.style.fontSize="300px",Fe.style.fontVariant="normal",Fe.style.fontStyle="normal",Fe.style.fontWeight="normal",Fe.style.letterSpacing="0",Fe.appendChild(ke),document.body.appendChild(Fe);var Ge=ke.offsetWidth;return ke.style.fontFamily=_e($e)+", "+De,{node:ke,w:Ge,parent:Fe}}function Ee(){var $e,De=this.fonts.length,Fe,ke,Ge=De;for($e=0;$e<De;$e+=1)this.fonts[$e].loaded?Ge-=1:this.fonts[$e].fOrigin==="n"||this.fonts[$e].origin===0?this.fonts[$e].loaded=!0:(Fe=this.fonts[$e].monoCase.node,ke=this.fonts[$e].monoCase.w,Fe.offsetWidth!==ke?(Ge-=1,this.fonts[$e].loaded=!0):(Fe=this.fonts[$e].sansCase.node,ke=this.fonts[$e].sansCase.w,Fe.offsetWidth!==ke&&(Ge-=1,this.fonts[$e].loaded=!0)),this.fonts[$e].loaded&&(this.fonts[$e].sansCase.parent.parentNode.removeChild(this.fonts[$e].sansCase.parent),this.fonts[$e].monoCase.parent.parentNode.removeChild(this.fonts[$e].monoCase.parent)));Ge!==0&&Date.now()-this.initTime<C?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function Ae($e,De){var Fe=document.body&&De?"svg":"canvas",ke,Ge=getFontProperties($e);if(Fe==="svg"){var Be=createNS("text");Be.style.fontSize="100px",Be.setAttribute("font-family",$e.fFamily),Be.setAttribute("font-style",Ge.style),Be.setAttribute("font-weight",Ge.weight),Be.textContent="1",$e.fClass?(Be.style.fontFamily="inherit",Be.setAttribute("class",$e.fClass)):Be.style.fontFamily=$e.fFamily,De.appendChild(Be),ke=Be}else{var qe=new OffscreenCanvas(500,500).getContext("2d");qe.font=Ge.style+" "+Ge.weight+" 100px "+$e.fFamily,ke=qe}function Ke(Ye){return Fe==="svg"?(ke.textContent=Ye,ke.getComputedTextLength()):ke.measureText(Ye).width}return{measureText:Ke}}function Re($e,De){if(!$e){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=$e.list;return}if(!document.body){this.isLoaded=!0,$e.list.forEach(function(at){at.helper=Ae(at),at.cache={}}),this.fonts=$e.list;return}var Fe=$e.list,ke,Ge=Fe.length,Be=Ge;for(ke=0;ke<Ge;ke+=1){var qe=!0,Ke,Ye;if(Fe[ke].loaded=!1,Fe[ke].monoCase=Se(Fe[ke].fFamily,"monospace"),Fe[ke].sansCase=Se(Fe[ke].fFamily,"sans-serif"),!Fe[ke].fPath)Fe[ke].loaded=!0,Be-=1;else if(Fe[ke].fOrigin==="p"||Fe[ke].origin===3){if(Ke=document.querySelectorAll('style[f-forigin="p"][f-family="'+Fe[ke].fFamily+'"], style[f-origin="3"][f-family="'+Fe[ke].fFamily+'"]'),Ke.length>0&&(qe=!1),qe){var Qe=createTag("style");Qe.setAttribute("f-forigin",Fe[ke].fOrigin),Qe.setAttribute("f-origin",Fe[ke].origin),Qe.setAttribute("f-family",Fe[ke].fFamily),Qe.type="text/css",Qe.innerText="@font-face {font-family: "+Fe[ke].fFamily+"; font-style: normal; src: url('"+Fe[ke].fPath+"');}",De.appendChild(Qe)}}else if(Fe[ke].fOrigin==="g"||Fe[ke].origin===1){for(Ke=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),Ye=0;Ye<Ke.length;Ye+=1)Ke[Ye].href.indexOf(Fe[ke].fPath)!==-1&&(qe=!1);if(qe){var Ze=createTag("link");Ze.setAttribute("f-forigin",Fe[ke].fOrigin),Ze.setAttribute("f-origin",Fe[ke].origin),Ze.type="text/css",Ze.rel="stylesheet",Ze.href=Fe[ke].fPath,document.body.appendChild(Ze)}}else if(Fe[ke].fOrigin==="t"||Fe[ke].origin===2){for(Ke=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),Ye=0;Ye<Ke.length;Ye+=1)Fe[ke].fPath===Ke[Ye].src&&(qe=!1);if(qe){var it=createTag("link");it.setAttribute("f-forigin",Fe[ke].fOrigin),it.setAttribute("f-origin",Fe[ke].origin),it.setAttribute("rel","stylesheet"),it.setAttribute("href",Fe[ke].fPath),De.appendChild(it)}}Fe[ke].helper=Ae(Fe[ke],De),Fe[ke].cache={},this.fonts.push(Fe[ke])}Be===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function Te($e){if($e){this.chars||(this.chars=[]);var De,Fe=$e.length,ke,Ge=this.chars.length,Be;for(De=0;De<Fe;De+=1){for(ke=0,Be=!1;ke<Ge;)this.chars[ke].style===$e[De].style&&this.chars[ke].fFamily===$e[De].fFamily&&this.chars[ke].ch===$e[De].ch&&(Be=!0),ke+=1;Be||(this.chars.push($e[De]),Ge+=1)}}}function we($e,De,Fe){for(var ke=0,Ge=this.chars.length;ke<Ge;){if(this.chars[ke].ch===$e&&this.chars[ke].style===De&&this.chars[ke].fFamily===Fe)return this.chars[ke];ke+=1}return(typeof $e=="string"&&$e.charCodeAt(0)!==13||!$e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",$e,De,Fe)),E}function Pe($e,De,Fe){var ke=this.getFontByName(De),Ge=$e;if(!ke.cache[Ge]){var Be=ke.helper;if($e===" "){var qe=Be.measureText("|"+$e+"|"),Ke=Be.measureText("||");ke.cache[Ge]=(qe-Ke)/100}else ke.cache[Ge]=Be.measureText($e)/100}return ke.cache[Ge]*Fe}function Ie($e){for(var De=0,Fe=this.fonts.length;De<Fe;){if(this.fonts[De].fName===$e)return this.fonts[De];De+=1}return this.fonts[0]}function Me($e){var De=0,Fe=$e.charCodeAt(0);if(Fe>=55296&&Fe<=56319){var ke=$e.charCodeAt(1);ke>=56320&&ke<=57343&&(De=(Fe-55296)*1024+ke-56320+65536)}return De}function Oe($e,De){var Fe=$e.toString(16)+De.toString(16);return Z.indexOf(Fe)!==-1}function Le($e){return $e===K}function Ne($e){return $e===Y}function Ve($e){var De=Me($e);return De>=J&&De<=xe}function Xe($e){return Ve($e.substr(0,2))&&Ve($e.substr(2,2))}function Ue($e){return I.indexOf($e)!==-1}function We($e,De){var Fe=Me($e.substr(De,2));if(Fe!==B)return!1;var ke=0;for(De+=2;ke<5;){if(Fe=Me($e.substr(De,2)),Fe<V||Fe>X)return!1;ke+=1,De+=2}return Me($e.substr(De,2))===U}function ze(){this.isLoaded=!0}var He=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};He.isModifier=Oe,He.isZeroWidthJoiner=Le,He.isFlagEmoji=Xe,He.isRegionalCode=Ve,He.isCombinedCharacter=Ue,He.isRegionalFlag=We,He.isVariationSelector=Ne,He.BLACK_FLAG_CODE_POINT=B;var je={addChars:Te,addFonts:Re,getCharData:we,getFontByName:Ie,measureText:Pe,checkLoadedFonts:Ee,setIsLoaded:ze};return He.prototype=je,He}();function SlotManager(C){this.animationData=C}SlotManager.prototype.getProp=function(C){return this.animationData.slots&&this.animationData.slots[C.sid]?Object.assign(C,this.animationData.slots[C.sid].p):C};function slotFactory(C){return new SlotManager(C)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(E){this.renderableComponents.indexOf(E)===-1&&this.renderableComponents.push(E)},removeRenderableComponent:function(E){this.renderableComponents.indexOf(E)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(E),1)},prepareRenderableFrame:function(E){this.checkLayerLimits(E)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(E){this.data.ip-this.data.st<=E&&this.data.op-this.data.st>E?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var E,I=this.renderableComponents.length;for(E=0;E<I;E+=1)this.renderableComponents[E].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var C={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(E){return C[E]||""}}();function SliderEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function AngleEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function ColorEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,1,0,I)}function PointEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,1,0,I)}function LayerIndexEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function MaskIndexEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function CheckboxEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function NoValueEffect(){this.p={}}function EffectsManager(C,E){var I=C.ef||[];this.effectElements=[];var B,U=I.length,V;for(B=0;B<U;B+=1)V=new GroupEffect(I[B],E),this.effectElements.push(V)}function GroupEffect(C,E){this.init(C,E)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(C,E){this.data=C,this.effectElements=[],this.initDynamicPropertyContainer(E);var I,B=this.data.ef.length,U,V=this.data.ef;for(I=0;I<B;I+=1){switch(U=null,V[I].ty){case 0:U=new SliderEffect(V[I],E,this);break;case 1:U=new AngleEffect(V[I],E,this);break;case 2:U=new ColorEffect(V[I],E,this);break;case 3:U=new PointEffect(V[I],E,this);break;case 4:case 7:U=new CheckboxEffect(V[I],E,this);break;case 10:U=new LayerIndexEffect(V[I],E,this);break;case 11:U=new MaskIndexEffect(V[I],E,this);break;case 5:U=new EffectsManager(V[I],E);break;default:U=new NoValueEffect(V[I]);break}U&&this.effectElements.push(U)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var E=0,I=this.data.masksProperties.length;E<I;){if(this.data.masksProperties[E].mode!=="n"&&this.data.masksProperties[E].cl!==!1)return!0;E+=1}return!1},initExpressions:function(){var E=getExpressionInterfaces();if(E){var I=E("layer"),B=E("effects"),U=E("shape"),V=E("text"),X=E("comp");this.layerInterface=I(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var Y=B.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(Y),this.data.ty===0||this.data.xt?this.compInterface=X(this):this.data.ty===4?(this.layerInterface.shapeInterface=U(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=V(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var E=getBlendMode(this.data.bm),I=this.baseElement||this.layerElement;I.style["mix-blend-mode"]=E},initBaseData:function(E,I,B){this.globalData=I,this.comp=B,this.data=E,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(E,I){var B,U=this.dynamicProperties.length;for(B=0;B<U;B+=1)(I||this._isParent&&this.dynamicProperties[B].propType==="transform")&&(this.dynamicProperties[B].getValue(),this.dynamicProperties[B]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(E){this.dynamicProperties.indexOf(E)===-1&&this.dynamicProperties.push(E)}};function FootageElement(C,E,I){this.initFrame(),this.initRenderable(),this.assetData=E.getAssetData(C.refId),this.footageData=E.imageLoader.getAsset(this.assetData),this.initBaseData(C,E,I)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var C=getExpressionInterfaces();if(C){var E=C("footage");this.layerInterface=E(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(C,E,I){this.initFrame(),this.initRenderable(),this.assetData=E.getAssetData(C.refId),this.initBaseData(C,E,I),this._isPlaying=!1,this._canPlay=!1;var B=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(B),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=C.tm?PropertyFactory.getProp(this,C.tm,0,E.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,C.au&&C.au.lv?C.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(C){if(this.prepareRenderableFrame(C,!0),this.prepareProperties(C,!0),this.tm._placeholder)this._currentTime=C/this.data.sr;else{var E=this.tm.v;this._currentTime=E}this._volume=this.lv.v[0];var I=this._volume*this._volumeMultiplier;this._previousVolume!==I&&(this._previousVolume=I,this.audio.volume(I))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(C){this.audio.rate(C)},AudioElement.prototype.volume=function(C){this._volumeMultiplier=C,this._previousVolume=C*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(C){var E,I=this.layers.length,B;for(this.completeLayers=!0,E=I-1;E>=0;E-=1)this.elements[E]||(B=this.layers[E],B.ip-B.st<=C-this.layers[E].st&&B.op-B.st>C-this.layers[E].st&&this.buildItem(E)),this.completeLayers=this.elements[E]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(C){switch(C.ty){case 2:return this.createImage(C);case 0:return this.createComp(C);case 1:return this.createSolid(C);case 3:return this.createNull(C);case 4:return this.createShape(C);case 5:return this.createText(C);case 6:return this.createAudio(C);case 13:return this.createCamera(C);case 15:return this.createFootage(C);default:return this.createNull(C)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(C){return new AudioElement(C,this.globalData,this)},BaseRenderer.prototype.createFootage=function(C){return new FootageElement(C,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var C,E=this.layers.length;for(C=0;C<E;C+=1)this.buildItem(C);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(C){this.completeLayers=!1;var E,I=C.length,B,U=this.layers.length;for(E=0;E<I;E+=1)for(B=0;B<U;){if(this.layers[B].id===C[E].id){this.layers[B]=C[E];break}B+=1}},BaseRenderer.prototype.setProjectInterface=function(C){this.globalData.projectInterface=C},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(C,E,I){for(var B=this.elements,U=this.layers,V=0,X=U.length;V<X;)U[V].ind==E&&(!B[V]||B[V]===!0?(this.buildItem(V),this.addPendingElement(C)):(I.push(B[V]),B[V].setAsParent(),U[V].parent!==void 0?this.buildElementParenting(C,U[V].parent,I):C.setHierarchy(I))),V+=1},BaseRenderer.prototype.addPendingElement=function(C){this.pendingElements.push(C)},BaseRenderer.prototype.searchExtraCompositions=function(C){var E,I=C.length;for(E=0;E<I;E+=1)if(C[E].xt){var B=this.createComp(C[E]);B.initExpressions(),this.globalData.projectInterface.registerComposition(B)}},BaseRenderer.prototype.getElementById=function(C){var E,I=this.elements.length;for(E=0;E<I;E+=1)if(this.elements[E].data.ind===C)return this.elements[E];return null},BaseRenderer.prototype.getElementByPath=function(C){var E=C.shift(),I;if(typeof E=="number")I=this.elements[E];else{var B,U=this.elements.length;for(B=0;B<U;B+=1)if(this.elements[B].data.nm===E){I=this.elements[B];break}}return C.length===0?I:I.getElementByPath(C)},BaseRenderer.prototype.setupGlobalData=function(C,E){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(C),this.globalData.fontManager.addChars(C.chars),this.globalData.fontManager.addFonts(C.fonts,E),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=C.fr,this.globalData.nm=C.nm,this.globalData.compSize={w:C.w,h:C.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function(){var E=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:E,localMat:E,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var E,I=this.finalTransform.mat,B=0,U=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;B<U;){if(this.hierarchy[B].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}B+=1}if(this.finalTransform._matMdf)for(E=this.finalTransform.mProp.v.props,I.cloneFromProps(E),B=0;B<U;B+=1)I.multiply(this.hierarchy[B].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var E=0,I=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;E<I;)this.localTransforms[E]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[E]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),E+=1;if(this.finalTransform._localMatMdf){var B=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(B),E=1;E<I;E+=1){var U=this.localTransforms[E].matrix;B.multiply(U)}B.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var V=this.finalTransform.localOpacity;for(E=0;E<I;E+=1)V*=this.localTransforms[E].opacity*.01;this.finalTransform.localOpacity=V}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var E=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(E.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var I=0,B=E.length;for(I=0;I<B;I+=1)this.localTransforms.push(E[I])}}},globalToLocal:function(E){var I=[];I.push(this.finalTransform);for(var B=!0,U=this.comp;B;)U.finalTransform?(U.data.hasMask&&I.splice(0,0,U.finalTransform),U=U.comp):B=!1;var V,X=I.length,Y;for(V=0;V<X;V+=1)Y=I[V].mat.applyToPointArray(0,0,0),E=[E[0]-Y[0],E[1]-Y[1],0];return E},mHelper:new Matrix};function MaskElement(C,E,I){this.data=C,this.element=E,this.globalData=I,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var B=this.globalData.defs,U,V=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(V),this.solidPath="";var X,Y=this.masksProperties,K=0,J=[],xe,Z,_e=createElementID(),Se,Ee,Ae,Re,Te="clipPath",we="clip-path";for(U=0;U<V;U+=1)if((Y[U].mode!=="a"&&Y[U].mode!=="n"||Y[U].inv||Y[U].o.k!==100||Y[U].o.x)&&(Te="mask",we="mask"),(Y[U].mode==="s"||Y[U].mode==="i")&&K===0?(Se=createNS("rect"),Se.setAttribute("fill","#ffffff"),Se.setAttribute("width",this.element.comp.data.w||0),Se.setAttribute("height",this.element.comp.data.h||0),J.push(Se)):Se=null,X=createNS("path"),Y[U].mode==="n")this.viewData[U]={op:PropertyFactory.getProp(this.element,Y[U].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,Y[U],3),elem:X,lastPath:""},B.appendChild(X);else{K+=1,X.setAttribute("fill",Y[U].mode==="s"?"#000000":"#ffffff"),X.setAttribute("clip-rule","nonzero");var Pe;if(Y[U].x.k!==0?(Te="mask",we="mask",Re=PropertyFactory.getProp(this.element,Y[U].x,0,null,this.element),Pe=createElementID(),Ee=createNS("filter"),Ee.setAttribute("id",Pe),Ae=createNS("feMorphology"),Ae.setAttribute("operator","erode"),Ae.setAttribute("in","SourceGraphic"),Ae.setAttribute("radius","0"),Ee.appendChild(Ae),B.appendChild(Ee),X.setAttribute("stroke",Y[U].mode==="s"?"#000000":"#ffffff")):(Ae=null,Re=null),this.storedData[U]={elem:X,x:Re,expan:Ae,lastPath:"",lastOperator:"",filterId:Pe,lastRadius:0},Y[U].mode==="i"){Z=J.length;var Ie=createNS("g");for(xe=0;xe<Z;xe+=1)Ie.appendChild(J[xe]);var Me=createNS("mask");Me.setAttribute("mask-type","alpha"),Me.setAttribute("id",_e+"_"+K),Me.appendChild(X),B.appendChild(Me),Ie.setAttribute("mask","url("+getLocationHref()+"#"+_e+"_"+K+")"),J.length=0,J.push(Ie)}else J.push(X);Y[U].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[U]={elem:X,lastPath:"",op:PropertyFactory.getProp(this.element,Y[U].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,Y[U],3),invRect:Se},this.viewData[U].prop.k||this.drawPath(Y[U],this.viewData[U].prop.v,this.viewData[U])}for(this.maskElement=createNS(Te),V=J.length,U=0;U<V;U+=1)this.maskElement.appendChild(J[U]);K>0&&(this.maskElement.setAttribute("id",_e),this.element.maskedElement.setAttribute(we,"url("+getLocationHref()+"#"+_e+")"),B.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(C){return this.viewData[C].prop},MaskElement.prototype.renderFrame=function(C){var E=this.element.finalTransform.mat,I,B=this.masksProperties.length;for(I=0;I<B;I+=1)if((this.viewData[I].prop._mdf||C)&&this.drawPath(this.masksProperties[I],this.viewData[I].prop.v,this.viewData[I]),(this.viewData[I].op._mdf||C)&&this.viewData[I].elem.setAttribute("fill-opacity",this.viewData[I].op.v),this.masksProperties[I].mode!=="n"&&(this.viewData[I].invRect&&(this.element.finalTransform.mProp._mdf||C)&&this.viewData[I].invRect.setAttribute("transform",E.getInverseMatrix().to2dCSS()),this.storedData[I].x&&(this.storedData[I].x._mdf||C))){var U=this.storedData[I].expan;this.storedData[I].x.v<0?(this.storedData[I].lastOperator!=="erode"&&(this.storedData[I].lastOperator="erode",this.storedData[I].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[I].filterId+")")),U.setAttribute("radius",-this.storedData[I].x.v)):(this.storedData[I].lastOperator!=="dilate"&&(this.storedData[I].lastOperator="dilate",this.storedData[I].elem.setAttribute("filter",null)),this.storedData[I].elem.setAttribute("stroke-width",this.storedData[I].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var C="M0,0 ";return C+=" h"+this.globalData.compSize.w,C+=" v"+this.globalData.compSize.h,C+=" h-"+this.globalData.compSize.w,C+=" v-"+this.globalData.compSize.h+" ",C},MaskElement.prototype.drawPath=function(C,E,I){var B=" M"+E.v[0][0]+","+E.v[0][1],U,V;for(V=E._length,U=1;U<V;U+=1)B+=" C"+E.o[U-1][0]+","+E.o[U-1][1]+" "+E.i[U][0]+","+E.i[U][1]+" "+E.v[U][0]+","+E.v[U][1];if(E.c&&V>1&&(B+=" C"+E.o[U-1][0]+","+E.o[U-1][1]+" "+E.i[0][0]+","+E.i[0][1]+" "+E.v[0][0]+","+E.v[0][1]),I.lastPath!==B){var X="";I.elem&&(E.c&&(X=C.inv?this.solidPath+B:B),I.elem.setAttribute("d",X)),I.lastPath=B}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var C={};C.createFilter=E,C.createAlphaToLuminanceFilter=I;function E(B,U){var V=createNS("filter");return V.setAttribute("id",B),U!==!0&&(V.setAttribute("filterUnits","objectBoundingBox"),V.setAttribute("x","0%"),V.setAttribute("y","0%"),V.setAttribute("width","100%"),V.setAttribute("height","100%")),V}function I(){var B=createNS("feColorMatrix");return B.setAttribute("type","matrix"),B.setAttribute("color-interpolation-filters","sRGB"),B.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),B}return C}(),featureSupport=function(){var C={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(C.maskType=!1),/firefox/i.test(navigator.userAgent)&&(C.svgLumaHidden=!1),C}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(C){var E,I="SourceGraphic",B=C.data.ef?C.data.ef.length:0,U=createElementID(),V=filtersFactory.createFilter(U,!0),X=0;this.filters=[];var Y;for(E=0;E<B;E+=1){Y=null;var K=C.data.ef[E].ty;if(registeredEffects$1[K]){var J=registeredEffects$1[K].effect;Y=new J(V,C.effectsManager.effectElements[E],C,idPrefix+X,I),I=idPrefix+X,registeredEffects$1[K].countsAsEffect&&(X+=1)}Y&&this.filters.push(Y)}X&&(C.globalData.defs.appendChild(V),C.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+U+")")),this.filters.length&&C.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(C){var E,I=this.filters.length;for(E=0;E<I;E+=1)this.filters[E].renderFrame(C)},SVGEffects.prototype.getEffects=function(C){var E,I=this.filters.length,B=[];for(E=0;E<I;E+=1)this.filters[E].type===C&&B.push(this.filters[E]);return B};function registerEffect$1(C,E,I){registeredEffects$1[C]={effect:E,countsAsEffect:I}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var E=null;if(this.data.td){this.matteMasks={};var I=createNS("g");I.setAttribute("id",this.layerId),I.appendChild(this.layerElement),E=I,this.globalData.defs.appendChild(I)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),E=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var B=createNS("clipPath"),U=createNS("path");U.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var V=createElementID();if(B.setAttribute("id",V),B.appendChild(U),this.globalData.defs.appendChild(B),this.checkMasks()){var X=createNS("g");X.setAttribute("clip-path","url("+getLocationHref()+"#"+V+")"),X.appendChild(this.layerElement),this.transformedElement=X,E?E.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+V+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(E){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[E]){var I=this.layerId+"_"+E,B,U,V,X;if(E===1||E===3){var Y=createNS("mask");Y.setAttribute("id",I),Y.setAttribute("mask-type",E===3?"luminance":"alpha"),V=createNS("use"),V.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),Y.appendChild(V),this.globalData.defs.appendChild(Y),!featureSupport.maskType&&E===1&&(Y.setAttribute("mask-type","luminance"),B=createElementID(),U=filtersFactory.createFilter(B),this.globalData.defs.appendChild(U),U.appendChild(filtersFactory.createAlphaToLuminanceFilter()),X=createNS("g"),X.appendChild(V),Y.appendChild(X),X.setAttribute("filter","url("+getLocationHref()+"#"+B+")"))}else if(E===2){var K=createNS("mask");K.setAttribute("id",I),K.setAttribute("mask-type","alpha");var J=createNS("g");K.appendChild(J),B=createElementID(),U=filtersFactory.createFilter(B);var xe=createNS("feComponentTransfer");xe.setAttribute("in","SourceGraphic"),U.appendChild(xe);var Z=createNS("feFuncA");Z.setAttribute("type","table"),Z.setAttribute("tableValues","1.0 0.0"),xe.appendChild(Z),this.globalData.defs.appendChild(U);var _e=createNS("rect");_e.setAttribute("width",this.comp.data.w),_e.setAttribute("height",this.comp.data.h),_e.setAttribute("x","0"),_e.setAttribute("y","0"),_e.setAttribute("fill","#ffffff"),_e.setAttribute("opacity","0"),J.setAttribute("filter","url("+getLocationHref()+"#"+B+")"),J.appendChild(_e),V=createNS("use"),V.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),J.appendChild(V),featureSupport.maskType||(K.setAttribute("mask-type","luminance"),U.appendChild(filtersFactory.createAlphaToLuminanceFilter()),X=createNS("g"),J.appendChild(_e),X.appendChild(this.layerElement),J.appendChild(X)),this.globalData.defs.appendChild(K)}this.matteMasks[E]=I}return this.matteMasks[E]},setMatte:function(E){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+E+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(E){this.hierarchy=E},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var C={initElement:function(I,B,U){this.initFrame(),this.initBaseData(I,B,U),this.initTransform(I,B,U),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var I=this.baseElement||this.layerElement;I.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var I=this.baseElement||this.layerElement;I.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(I){this._mdf=!1,this.prepareRenderableFrame(I),this.prepareProperties(I,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(C)],RenderableDOMElement)})();function IImageElement(C,E,I){this.assetData=E.getAssetData(C.refId),this.assetData&&this.assetData.sid&&(this.assetData=E.slotManager.getProp(this.assetData)),this.initElement(C,E,I),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var C=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",C),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(C,E){this.elem=C,this.pos=E}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(E){var I,B=this.shapeModifiers.length;for(I=0;I<B;I+=1)this.shapeModifiers[I].addShape(E)},isShapeInAnimatedModifiers:function(E){for(var I=0,B=this.shapeModifiers.length;I<B;)if(this.shapeModifiers[I].isAnimatedWithShape(E))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var E,I=this.shapes.length;for(E=0;E<I;E+=1)this.shapes[E].sh.reset();I=this.shapeModifiers.length;var B;for(E=I-1;E>=0&&(B=this.shapeModifiers[E].processShapes(this._isFirstFrame),!B);E-=1);}},searchProcessedElement:function(E){for(var I=this.processedElements,B=0,U=I.length;B<U;){if(I[B].elem===E)return I[B].pos;B+=1}return 0},addProcessedElement:function(E,I){for(var B=this.processedElements,U=B.length;U;)if(U-=1,B[U].elem===E){B[U].pos=I;return}B.push(new ProcessedElement(E,I))},prepareFrame:function(E){this.prepareRenderableFrame(E),this.prepareProperties(E,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(C,E,I){this.caches=[],this.styles=[],this.transformers=C,this.lStr="",this.sh=I,this.lvl=E,this._isAnimated=!!I.k;for(var B=0,U=C.length;B<U;){if(C[B].mProps.dynamicProperties.length){this._isAnimated=!0;break}B+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(C,E){this.data=C,this.type=C.ty,this.d="",this.lvl=E,this._mdf=!1,this.closed=C.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(C,E,I,B){this.elem=C,this.frameId=-1,this.dataProps=createSizedArray(E.length),this.renderer=I,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",E.length?E.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(B);var U,V=E.length||0,X;for(U=0;U<V;U+=1)X=PropertyFactory.getProp(C,E[U].v,0,0,this),this.k=X.k||this.k,this.dataProps[U]={n:E[U].n,p:X};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(C){if(!(this.elem.globalData.frameId===this.frameId&&!C)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||C,this._mdf)){var E=0,I=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),E=0;E<I;E+=1)this.dataProps[E].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[E].p.v:this.dashArray[E]=this.dataProps[E].p.v:this.dashoffset[0]=this.dataProps[E].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(C,E.o,0,.01,this),this.w=PropertyFactory.getProp(C,E.w,0,null,this),this.d=new DashProperty(C,E.d||{},"svg",this),this.c=PropertyFactory.getProp(C,E.c,1,255,this),this.style=I,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(C,E.o,0,.01,this),this.c=PropertyFactory.getProp(C,E.c,1,255,this),this.style=I}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.style=I}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(C,E,I){this.data=E,this.c=createTypedArray("uint8c",E.p*4);var B=E.k.k[0].s?E.k.k[0].s.length-E.p*4:E.k.k.length-E.p*4;this.o=createTypedArray("float32",B),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=B,this.initDynamicPropertyContainer(I),this.prop=PropertyFactory.getProp(C,E.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(C,E){for(var I=0,B=this.o.length/2,U;I<B;){if(U=Math.abs(C[I*4]-C[E*4+I*2]),U>.01)return!1;I+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var C=0,E=this.data.k.k.length;C<E;){if(!this.comparePoints(this.data.k.k[C].s,this.data.p))return!1;C+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(C){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||C){var E,I=this.data.p*4,B,U;for(E=0;E<I;E+=1)B=E%4===0?100:255,U=Math.round(this.prop.v[E]*B),this.c[E]!==U&&(this.c[E]=U,this._cmdf=!C);if(this.o.length)for(I=this.prop.v.length,E=this.data.p*4;E<I;E+=1)B=E%2===0?100:1,U=E%2===0?Math.round(this.prop.v[E]*100):this.prop.v[E],this.o[E-this.data.p*4]!==U&&(this.o[E-this.data.p*4]=U,this._omdf=!C);this._mdf=!C}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.initGradientData(C,E,I)}SVGGradientFillStyleData.prototype.initGradientData=function(C,E,I){this.o=PropertyFactory.getProp(C,E.o,0,.01,this),this.s=PropertyFactory.getProp(C,E.s,1,null,this),this.e=PropertyFactory.getProp(C,E.e,1,null,this),this.h=PropertyFactory.getProp(C,E.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(C,E.a||{k:0},0,degToRads,this),this.g=new GradientProperty(C,E.g,this),this.style=I,this.stops=[],this.setGradientData(I.pElem,E),this.setGradientOpacity(E,I),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(C,E){var I=createElementID(),B=createNS(E.t===1?"linearGradient":"radialGradient");B.setAttribute("id",I),B.setAttribute("spreadMethod","pad"),B.setAttribute("gradientUnits","userSpaceOnUse");var U=[],V,X,Y;for(Y=E.g.p*4,X=0;X<Y;X+=4)V=createNS("stop"),B.appendChild(V),U.push(V);C.setAttribute(E.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+I+")"),this.gf=B,this.cst=U},SVGGradientFillStyleData.prototype.setGradientOpacity=function(C,E){if(this.g._hasOpacity&&!this.g._collapsable){var I,B,U,V=createNS("mask"),X=createNS("path");V.appendChild(X);var Y=createElementID(),K=createElementID();V.setAttribute("id",K);var J=createNS(C.t===1?"linearGradient":"radialGradient");J.setAttribute("id",Y),J.setAttribute("spreadMethod","pad"),J.setAttribute("gradientUnits","userSpaceOnUse"),U=C.g.k.k[0].s?C.g.k.k[0].s.length:C.g.k.k.length;var xe=this.stops;for(B=C.g.p*4;B<U;B+=2)I=createNS("stop"),I.setAttribute("stop-color","rgb(255,255,255)"),J.appendChild(I),xe.push(I);X.setAttribute(C.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+Y+")"),C.ty==="gs"&&(X.setAttribute("stroke-linecap",lineCapEnum[C.lc||2]),X.setAttribute("stroke-linejoin",lineJoinEnum[C.lj||2]),C.lj===1&&X.setAttribute("stroke-miterlimit",C.ml)),this.of=J,this.ms=V,this.ost=xe,this.maskId=K,E.msElem=X}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(C,E.w,0,null,this),this.d=new DashProperty(C,E.d||{},"svg",this),this.initGradientData(C,E,I),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(C,E,I){this.transform={mProps:C,op:E,container:I},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(E,I,B,U){if(I===0)return"";var V=E.o,X=E.i,Y=E.v,K,J=" M"+U.applyToPointStringified(Y[0][0],Y[0][1]);for(K=1;K<I;K+=1)J+=" C"+U.applyToPointStringified(V[K-1][0],V[K-1][1])+" "+U.applyToPointStringified(X[K][0],X[K][1])+" "+U.applyToPointStringified(Y[K][0],Y[K][1]);return B&&I&&(J+=" C"+U.applyToPointStringified(V[K-1][0],V[K-1][1])+" "+U.applyToPointStringified(X[0][0],X[0][1])+" "+U.applyToPointStringified(Y[0][0],Y[0][1]),J+="z"),J},SVGElementsRenderer=function(){var C=new Matrix,E=new Matrix,I={createRenderFunction:B};function B(Z){switch(Z.ty){case"fl":return Y;case"gf":return J;case"gs":return K;case"st":return xe;case"sh":case"el":case"rc":case"sr":return X;case"tr":return U;case"no":return V;default:return null}}function U(Z,_e,Se){(Se||_e.transform.op._mdf)&&_e.transform.container.setAttribute("opacity",_e.transform.op.v),(Se||_e.transform.mProps._mdf)&&_e.transform.container.setAttribute("transform",_e.transform.mProps.v.to2dCSS())}function V(){}function X(Z,_e,Se){var Ee,Ae,Re,Te,we,Pe,Ie=_e.styles.length,Me=_e.lvl,Oe,Le,Ne,Ve;for(Pe=0;Pe<Ie;Pe+=1){if(Te=_e.sh._mdf||Se,_e.styles[Pe].lvl<Me){for(Le=E.reset(),Ne=Me-_e.styles[Pe].lvl,Ve=_e.transformers.length-1;!Te&&Ne>0;)Te=_e.transformers[Ve].mProps._mdf||Te,Ne-=1,Ve-=1;if(Te)for(Ne=Me-_e.styles[Pe].lvl,Ve=_e.transformers.length-1;Ne>0;)Le.multiply(_e.transformers[Ve].mProps.v),Ne-=1,Ve-=1}else Le=C;if(Oe=_e.sh.paths,Ae=Oe._length,Te){for(Re="",Ee=0;Ee<Ae;Ee+=1)we=Oe.shapes[Ee],we&&we._length&&(Re+=buildShapeString(we,we._length,we.c,Le));_e.caches[Pe]=Re}else Re=_e.caches[Pe];_e.styles[Pe].d+=Z.hd===!0?"":Re,_e.styles[Pe]._mdf=Te||_e.styles[Pe]._mdf}}function Y(Z,_e,Se){var Ee=_e.style;(_e.c._mdf||Se)&&Ee.pElem.setAttribute("fill","rgb("+bmFloor(_e.c.v[0])+","+bmFloor(_e.c.v[1])+","+bmFloor(_e.c.v[2])+")"),(_e.o._mdf||Se)&&Ee.pElem.setAttribute("fill-opacity",_e.o.v)}function K(Z,_e,Se){J(Z,_e,Se),xe(Z,_e,Se)}function J(Z,_e,Se){var Ee=_e.gf,Ae=_e.g._hasOpacity,Re=_e.s.v,Te=_e.e.v;if(_e.o._mdf||Se){var we=Z.ty==="gf"?"fill-opacity":"stroke-opacity";_e.style.pElem.setAttribute(we,_e.o.v)}if(_e.s._mdf||Se){var Pe=Z.t===1?"x1":"cx",Ie=Pe==="x1"?"y1":"cy";Ee.setAttribute(Pe,Re[0]),Ee.setAttribute(Ie,Re[1]),Ae&&!_e.g._collapsable&&(_e.of.setAttribute(Pe,Re[0]),_e.of.setAttribute(Ie,Re[1]))}var Me,Oe,Le,Ne;if(_e.g._cmdf||Se){Me=_e.cst;var Ve=_e.g.c;for(Le=Me.length,Oe=0;Oe<Le;Oe+=1)Ne=Me[Oe],Ne.setAttribute("offset",Ve[Oe*4]+"%"),Ne.setAttribute("stop-color","rgb("+Ve[Oe*4+1]+","+Ve[Oe*4+2]+","+Ve[Oe*4+3]+")")}if(Ae&&(_e.g._omdf||Se)){var Xe=_e.g.o;for(_e.g._collapsable?Me=_e.cst:Me=_e.ost,Le=Me.length,Oe=0;Oe<Le;Oe+=1)Ne=Me[Oe],_e.g._collapsable||Ne.setAttribute("offset",Xe[Oe*2]+"%"),Ne.setAttribute("stop-opacity",Xe[Oe*2+1])}if(Z.t===1)(_e.e._mdf||Se)&&(Ee.setAttribute("x2",Te[0]),Ee.setAttribute("y2",Te[1]),Ae&&!_e.g._collapsable&&(_e.of.setAttribute("x2",Te[0]),_e.of.setAttribute("y2",Te[1])));else{var Ue;if((_e.s._mdf||_e.e._mdf||Se)&&(Ue=Math.sqrt(Math.pow(Re[0]-Te[0],2)+Math.pow(Re[1]-Te[1],2)),Ee.setAttribute("r",Ue),Ae&&!_e.g._collapsable&&_e.of.setAttribute("r",Ue)),_e.e._mdf||_e.h._mdf||_e.a._mdf||Se){Ue||(Ue=Math.sqrt(Math.pow(Re[0]-Te[0],2)+Math.pow(Re[1]-Te[1],2)));var We=Math.atan2(Te[1]-Re[1],Te[0]-Re[0]),ze=_e.h.v;ze>=1?ze=.99:ze<=-1&&(ze=-.99);var He=Ue*ze,je=Math.cos(We+_e.a.v)*He+Re[0],$e=Math.sin(We+_e.a.v)*He+Re[1];Ee.setAttribute("fx",je),Ee.setAttribute("fy",$e),Ae&&!_e.g._collapsable&&(_e.of.setAttribute("fx",je),_e.of.setAttribute("fy",$e))}}}function xe(Z,_e,Se){var Ee=_e.style,Ae=_e.d;Ae&&(Ae._mdf||Se)&&Ae.dashStr&&(Ee.pElem.setAttribute("stroke-dasharray",Ae.dashStr),Ee.pElem.setAttribute("stroke-dashoffset",Ae.dashoffset[0])),_e.c&&(_e.c._mdf||Se)&&Ee.pElem.setAttribute("stroke","rgb("+bmFloor(_e.c.v[0])+","+bmFloor(_e.c.v[1])+","+bmFloor(_e.c.v[2])+")"),(_e.o._mdf||Se)&&Ee.pElem.setAttribute("stroke-opacity",_e.o.v),(_e.w._mdf||Se)&&(Ee.pElem.setAttribute("stroke-width",_e.w.v),Ee.msElem&&Ee.msElem.setAttribute("stroke-width",_e.w.v))}return I}();function SVGShapeElement(C,E,I){this.shapes=[],this.shapesData=C.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(C,E,I),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var C,E=this.shapes.length,I,B,U=this.stylesList.length,V,X=[],Y=!1;for(B=0;B<U;B+=1){for(V=this.stylesList[B],Y=!1,X.length=0,C=0;C<E;C+=1)I=this.shapes[C],I.styles.indexOf(V)!==-1&&(X.push(I),Y=I._isAnimated||Y);X.length>1&&Y&&this.setShapesAsAnimated(X)}},SVGShapeElement.prototype.setShapesAsAnimated=function(C){var E,I=C.length;for(E=0;E<I;E+=1)C[E].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(C,E){var I,B=new SVGStyleData(C,E),U=B.pElem;if(C.ty==="st")I=new SVGStrokeStyleData(this,C,B);else if(C.ty==="fl")I=new SVGFillStyleData(this,C,B);else if(C.ty==="gf"||C.ty==="gs"){var V=C.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;I=new V(this,C,B),this.globalData.defs.appendChild(I.gf),I.maskId&&(this.globalData.defs.appendChild(I.ms),this.globalData.defs.appendChild(I.of),U.setAttribute("mask","url("+getLocationHref()+"#"+I.maskId+")"))}else C.ty==="no"&&(I=new SVGNoStyleData(this,C,B));return(C.ty==="st"||C.ty==="gs")&&(U.setAttribute("stroke-linecap",lineCapEnum[C.lc||2]),U.setAttribute("stroke-linejoin",lineJoinEnum[C.lj||2]),U.setAttribute("fill-opacity","0"),C.lj===1&&U.setAttribute("stroke-miterlimit",C.ml)),C.r===2&&U.setAttribute("fill-rule","evenodd"),C.ln&&U.setAttribute("id",C.ln),C.cl&&U.setAttribute("class",C.cl),C.bm&&(U.style["mix-blend-mode"]=getBlendMode(C.bm)),this.stylesList.push(B),this.addToAnimatedContents(C,I),I},SVGShapeElement.prototype.createGroupElement=function(C){var E=new ShapeGroupData;return C.ln&&E.gr.setAttribute("id",C.ln),C.cl&&E.gr.setAttribute("class",C.cl),C.bm&&(E.gr.style["mix-blend-mode"]=getBlendMode(C.bm)),E},SVGShapeElement.prototype.createTransformElement=function(C,E){var I=TransformPropertyFactory.getTransformProperty(this,C,this),B=new SVGTransformData(I,I.o,E);return this.addToAnimatedContents(C,B),B},SVGShapeElement.prototype.createShapeElement=function(C,E,I){var B=4;C.ty==="rc"?B=5:C.ty==="el"?B=6:C.ty==="sr"&&(B=7);var U=ShapePropertyFactory.getShapeProp(this,C,B,this),V=new SVGShapeData(E,I,U);return this.shapes.push(V),this.addShapeToModifiers(V),this.addToAnimatedContents(C,V),V},SVGShapeElement.prototype.addToAnimatedContents=function(C,E){for(var I=0,B=this.animatedContents.length;I<B;){if(this.animatedContents[I].element===E)return;I+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(C),element:E,data:C})},SVGShapeElement.prototype.setElementStyles=function(C){var E=C.styles,I,B=this.stylesList.length;for(I=0;I<B;I+=1)this.stylesList[I].closed||E.push(this.stylesList[I])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var C,E=this.itemsData.length;for(C=0;C<E;C+=1)this.prevViewData[C]=this.itemsData[C];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),E=this.dynamicProperties.length,C=0;C<E;C+=1)this.dynamicProperties[C].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(C,E,I,B,U,V,X){var Y=[].concat(V),K,J=C.length-1,xe,Z,_e=[],Se=[],Ee,Ae,Re;for(K=J;K>=0;K-=1){if(Re=this.searchProcessedElement(C[K]),Re?E[K]=I[Re-1]:C[K]._render=X,C[K].ty==="fl"||C[K].ty==="st"||C[K].ty==="gf"||C[K].ty==="gs"||C[K].ty==="no")Re?E[K].style.closed=!1:E[K]=this.createStyleElement(C[K],U),C[K]._render&&E[K].style.pElem.parentNode!==B&&B.appendChild(E[K].style.pElem),_e.push(E[K].style);else if(C[K].ty==="gr"){if(!Re)E[K]=this.createGroupElement(C[K]);else for(Z=E[K].it.length,xe=0;xe<Z;xe+=1)E[K].prevViewData[xe]=E[K].it[xe];this.searchShapes(C[K].it,E[K].it,E[K].prevViewData,E[K].gr,U+1,Y,X),C[K]._render&&E[K].gr.parentNode!==B&&B.appendChild(E[K].gr)}else C[K].ty==="tr"?(Re||(E[K]=this.createTransformElement(C[K],B)),Ee=E[K].transform,Y.push(Ee)):C[K].ty==="sh"||C[K].ty==="rc"||C[K].ty==="el"||C[K].ty==="sr"?(Re||(E[K]=this.createShapeElement(C[K],Y,U)),this.setElementStyles(E[K])):C[K].ty==="tm"||C[K].ty==="rd"||C[K].ty==="ms"||C[K].ty==="pb"||C[K].ty==="zz"||C[K].ty==="op"?(Re?(Ae=E[K],Ae.closed=!1):(Ae=ShapeModifiers.getModifier(C[K].ty),Ae.init(this,C[K]),E[K]=Ae,this.shapeModifiers.push(Ae)),Se.push(Ae)):C[K].ty==="rp"&&(Re?(Ae=E[K],Ae.closed=!0):(Ae=ShapeModifiers.getModifier(C[K].ty),E[K]=Ae,Ae.init(this,C,K,E),this.shapeModifiers.push(Ae),X=!1),Se.push(Ae));this.addProcessedElement(C[K],K+1)}for(J=_e.length,K=0;K<J;K+=1)_e[K].closed=!0;for(J=Se.length,K=0;K<J;K+=1)Se[K].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var C,E=this.stylesList.length;for(C=0;C<E;C+=1)this.stylesList[C].reset();for(this.renderShape(),C=0;C<E;C+=1)(this.stylesList[C]._mdf||this._isFirstFrame)&&(this.stylesList[C].msElem&&(this.stylesList[C].msElem.setAttribute("d",this.stylesList[C].d),this.stylesList[C].d="M0 0"+this.stylesList[C].d),this.stylesList[C].pElem.setAttribute("d",this.stylesList[C].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var C,E=this.animatedContents.length,I;for(C=0;C<E;C+=1)I=this.animatedContents[C],(this._isFirstFrame||I.element._isAnimated)&&I.data!==!0&&I.fn(I.data,I.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(C,E,I,B,U,V){this.o=C,this.sw=E,this.sc=I,this.fc=B,this.m=U,this.p=V,this._mdf={o:!0,sw:!!E,sc:!!I,fc:!!B,m:!0,p:!0}}LetterProps.prototype.update=function(C,E,I,B,U,V){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var X=!1;return this.o!==C&&(this.o=C,this._mdf.o=!0,X=!0),this.sw!==E&&(this.sw=E,this._mdf.sw=!0,X=!0),this.sc!==I&&(this.sc=I,this._mdf.sc=!0,X=!0),this.fc!==B&&(this.fc=B,this._mdf.fc=!0,X=!0),this.m!==U&&(this.m=U,this._mdf.m=!0,X=!0),V.length&&(this.p[0]!==V[0]||this.p[1]!==V[1]||this.p[4]!==V[4]||this.p[5]!==V[5]||this.p[12]!==V[12]||this.p[13]!==V[13])&&(this.p=V,this._mdf.p=!0,X=!0),X};function TextProperty(C,E){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,E.d&&E.d.sid&&(E.d=C.globalData.slotManager.getProp(E.d)),this.data=E,this.elem=C,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(C,E){for(var I in E)Object.prototype.hasOwnProperty.call(E,I)&&(C[I]=E[I]);return C},TextProperty.prototype.setCurrentData=function(C){C.__complete||this.completeTextData(C),this.currentData=C,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(C){this.effectsSequence.push(C),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(C){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!C)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var E=this.currentData,I=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var B,U=this.effectsSequence.length,V=C||this.data.d.k[this.keysIndex].s;for(B=0;B<U;B+=1)I!==this.keysIndex?V=this.effectsSequence[B](V,V.t):V=this.effectsSequence[B](this.currentData,V.t);E!==V&&this.setCurrentData(V),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var C=this.data.d.k,E=this.elem.comp.renderedFrame,I=0,B=C.length;I<=B-1&&!(I===B-1||C[I+1].t>E);)I+=1;return this.keysIndex!==I&&(this.keysIndex=I),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(C){for(var E=[],I=0,B=C.length,U,V,X=!1,Y=!1,K="";I<B;)X=Y,Y=!1,U=C.charCodeAt(I),K=C.charAt(I),FontManager.isCombinedCharacter(U)?X=!0:U>=55296&&U<=56319?FontManager.isRegionalFlag(C,I)?K=C.substr(I,14):(V=C.charCodeAt(I+1),V>=56320&&V<=57343&&(FontManager.isModifier(U,V)?(K=C.substr(I,2),X=!0):FontManager.isFlagEmoji(C.substr(I,4))?K=C.substr(I,4):K=C.substr(I,2))):U>56319?(V=C.charCodeAt(I+1),FontManager.isVariationSelector(U)&&(X=!0)):FontManager.isZeroWidthJoiner(U)&&(X=!0,Y=!0),X?(E[E.length-1]+=K,X=!1):E.push(K),I+=K.length;return E},TextProperty.prototype.completeTextData=function(C){C.__complete=!0;var E=this.elem.globalData.fontManager,I=this.data,B=[],U,V,X,Y=0,K,J=I.m.g,xe=0,Z=0,_e=0,Se=[],Ee=0,Ae=0,Re,Te,we=E.getFontByName(C.f),Pe,Ie=0,Me=getFontProperties(we);C.fWeight=Me.weight,C.fStyle=Me.style,C.finalSize=C.s,C.finalText=this.buildFinalText(C.t),V=C.finalText.length,C.finalLineHeight=C.lh;var Oe=C.tr/1e3*C.finalSize,Le;if(C.sz)for(var Ne=!0,Ve=C.sz[0],Xe=C.sz[1],Ue,We;Ne;){We=this.buildFinalText(C.t),Ue=0,Ee=0,V=We.length,Oe=C.tr/1e3*C.finalSize;var ze=-1;for(U=0;U<V;U+=1)Le=We[U].charCodeAt(0),X=!1,We[U]===" "?ze=U:(Le===13||Le===3)&&(Ee=0,X=!0,Ue+=C.finalLineHeight||C.finalSize*1.2),E.chars?(Pe=E.getCharData(We[U],we.fStyle,we.fFamily),Ie=X?0:Pe.w*C.finalSize/100):Ie=E.measureText(We[U],C.f,C.finalSize),Ee+Ie>Ve&&We[U]!==" "?(ze===-1?V+=1:U=ze,Ue+=C.finalLineHeight||C.finalSize*1.2,We.splice(U,ze===U?1:0,"\r"),ze=-1,Ee=0):(Ee+=Ie,Ee+=Oe);Ue+=we.ascent*C.finalSize/100,this.canResize&&C.finalSize>this.minimumFontSize&&Xe<Ue?(C.finalSize-=1,C.finalLineHeight=C.finalSize*C.lh/C.s):(C.finalText=We,V=C.finalText.length,Ne=!1)}Ee=-Oe,Ie=0;var He=0,je;for(U=0;U<V;U+=1)if(X=!1,je=C.finalText[U],Le=je.charCodeAt(0),Le===13||Le===3?(He=0,Se.push(Ee),Ae=Ee>Ae?Ee:Ae,Ee=-2*Oe,K="",X=!0,_e+=1):K=je,E.chars?(Pe=E.getCharData(je,we.fStyle,E.getFontByName(C.f).fFamily),Ie=X?0:Pe.w*C.finalSize/100):Ie=E.measureText(K,C.f,C.finalSize),je===" "?He+=Ie+Oe:(Ee+=Ie+Oe+He,He=0),B.push({l:Ie,an:Ie,add:xe,n:X,anIndexes:[],val:K,line:_e,animatorJustifyOffset:0}),J==2){if(xe+=Ie,K===""||K===" "||U===V-1){for((K===""||K===" ")&&(xe-=Ie);Z<=U;)B[Z].an=xe,B[Z].ind=Y,B[Z].extra=Ie,Z+=1;Y+=1,xe=0}}else if(J==3){if(xe+=Ie,K===""||U===V-1){for(K===""&&(xe-=Ie);Z<=U;)B[Z].an=xe,B[Z].ind=Y,B[Z].extra=Ie,Z+=1;xe=0,Y+=1}}else B[Y].ind=Y,B[Y].extra=0,Y+=1;if(C.l=B,Ae=Ee>Ae?Ee:Ae,Se.push(Ee),C.sz)C.boxWidth=C.sz[0],C.justifyOffset=0;else switch(C.boxWidth=Ae,C.j){case 1:C.justifyOffset=-C.boxWidth;break;case 2:C.justifyOffset=-C.boxWidth/2;break;default:C.justifyOffset=0}C.lineWidths=Se;var $e=I.a,De,Fe;Te=$e.length;var ke,Ge,Be=[];for(Re=0;Re<Te;Re+=1){for(De=$e[Re],De.a.sc&&(C.strokeColorAnim=!0),De.a.sw&&(C.strokeWidthAnim=!0),(De.a.fc||De.a.fh||De.a.fs||De.a.fb)&&(C.fillColorAnim=!0),Ge=0,ke=De.s.b,U=0;U<V;U+=1)Fe=B[U],Fe.anIndexes[Re]=Ge,(ke==1&&Fe.val!==""||ke==2&&Fe.val!==""&&Fe.val!==" "||ke==3&&(Fe.n||Fe.val==" "||U==V-1)||ke==4&&(Fe.n||U==V-1))&&(De.s.rn===1&&Be.push(Ge),Ge+=1);I.a[Re].s.totalChars=Ge;var qe=-1,Ke;if(De.s.rn===1)for(U=0;U<V;U+=1)Fe=B[U],qe!=Fe.anIndexes[Re]&&(qe=Fe.anIndexes[Re],Ke=Be.splice(Math.floor(Math.random()*Be.length),1)[0]),Fe.anIndexes[Re]=Ke}C.yOffset=C.finalLineHeight||C.finalSize*1.2,C.ls=C.ls||0,C.ascent=we.ascent*C.finalSize/100},TextProperty.prototype.updateDocumentData=function(C,E){E=E===void 0?this.keysIndex:E;var I=this.copyData({},this.data.d.k[E].s);I=this.copyData(I,C),this.data.d.k[E].s=I,this.recalculate(E),this.setCurrentData(I),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(C){var E=this.data.d.k[C].s;E.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(E)},TextProperty.prototype.canResizeFont=function(C){this.canResize=C,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(C){this.minimumFontSize=Math.floor(C)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var C=Math.max,E=Math.min,I=Math.floor;function B(V,X){this._currentTextLength=-1,this.k=!1,this.data=X,this.elem=V,this.comp=V.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(V),this.s=PropertyFactory.getProp(V,X.s||{k:0},0,0,this),"e"in X?this.e=PropertyFactory.getProp(V,X.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(V,X.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(V,X.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(V,X.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(V,X.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(V,X.a,0,.01,this),this.dynamicProperties.length||this.getValue()}B.prototype={getMult:function(X){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var Y=0,K=0,J=1,xe=1;this.ne.v>0?Y=this.ne.v/100:K=-this.ne.v/100,this.xe.v>0?J=1-this.xe.v/100:xe=1+this.xe.v/100;var Z=BezierFactory.getBezierEasing(Y,K,J,xe).get,_e=0,Se=this.finalS,Ee=this.finalE,Ae=this.data.sh;if(Ae===2)Ee===Se?_e=X>=Ee?1:0:_e=C(0,E(.5/(Ee-Se)+(X-Se)/(Ee-Se),1)),_e=Z(_e);else if(Ae===3)Ee===Se?_e=X>=Ee?0:1:_e=1-C(0,E(.5/(Ee-Se)+(X-Se)/(Ee-Se),1)),_e=Z(_e);else if(Ae===4)Ee===Se?_e=0:(_e=C(0,E(.5/(Ee-Se)+(X-Se)/(Ee-Se),1)),_e<.5?_e*=2:_e=1-2*(_e-.5)),_e=Z(_e);else if(Ae===5){if(Ee===Se)_e=0;else{var Re=Ee-Se;X=E(C(0,X+.5-Se),Ee-Se);var Te=-Re/2+X,we=Re/2;_e=Math.sqrt(1-Te*Te/(we*we))}_e=Z(_e)}else Ae===6?(Ee===Se?_e=0:(X=E(C(0,X+.5-Se),Ee-Se),_e=(1+Math.cos(Math.PI+Math.PI*2*X/(Ee-Se)))/2),_e=Z(_e)):(X>=I(Se)&&(X-Se<0?_e=C(0,E(E(Ee,1)-(Se-X),1)):_e=C(0,E(Ee-X,1))),_e=Z(_e));if(this.sm.v!==100){var Pe=this.sm.v*.01;Pe===0&&(Pe=1e-8);var Ie=.5-Pe*.5;_e<Ie?_e=0:(_e=(_e-Ie)/Pe,_e>1&&(_e=1))}return _e*this.a.v},getValue:function(X){this.iterateDynamicProperties(),this._mdf=X||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,X&&this.data.r===2&&(this.e.v=this._currentTextLength);var Y=this.data.r===2?1:100/this.data.totalChars,K=this.o.v/Y,J=this.s.v/Y+K,xe=this.e.v/Y+K;if(J>xe){var Z=J;J=xe,xe=Z}this.finalS=J,this.finalE=xe}},extendPrototype([DynamicPropertyContainer],B);function U(V,X,Y){return new B(V,X)}return{getTextSelectorProp:U}}();function TextAnimatorDataProperty(C,E,I){var B={propType:!1},U=PropertyFactory.getProp,V=E.a;this.a={r:V.r?U(C,V.r,0,degToRads,I):B,rx:V.rx?U(C,V.rx,0,degToRads,I):B,ry:V.ry?U(C,V.ry,0,degToRads,I):B,sk:V.sk?U(C,V.sk,0,degToRads,I):B,sa:V.sa?U(C,V.sa,0,degToRads,I):B,s:V.s?U(C,V.s,1,.01,I):B,a:V.a?U(C,V.a,1,0,I):B,o:V.o?U(C,V.o,0,.01,I):B,p:V.p?U(C,V.p,1,0,I):B,sw:V.sw?U(C,V.sw,0,0,I):B,sc:V.sc?U(C,V.sc,1,0,I):B,fc:V.fc?U(C,V.fc,1,0,I):B,fh:V.fh?U(C,V.fh,0,0,I):B,fs:V.fs?U(C,V.fs,0,.01,I):B,fb:V.fb?U(C,V.fb,0,.01,I):B,t:V.t?U(C,V.t,0,0,I):B},this.s=TextSelectorProp.getTextSelectorProp(C,E.s,I),this.s.t=E.s.t}function TextAnimatorProperty(C,E,I){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=C,this._renderType=E,this._elem=I,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(I)}TextAnimatorProperty.prototype.searchProperties=function(){var C,E=this._textData.a.length,I,B=PropertyFactory.getProp;for(C=0;C<E;C+=1)I=this._textData.a[C],this._animatorsData[C]=new TextAnimatorDataProperty(this._elem,I,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:B(this._elem,this._textData.p.a,0,0,this),f:B(this._elem,this._textData.p.f,0,0,this),l:B(this._elem,this._textData.p.l,0,0,this),r:B(this._elem,this._textData.p.r,0,0,this),p:B(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=B(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(C,E){if(this.lettersChangedFlag=E,!(!this._mdf&&!this._isFirstFrame&&!E&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var I=this._moreOptions.alignment.v,B=this._animatorsData,U=this._textData,V=this.mHelper,X=this._renderType,Y=this.renderedLetters.length,K,J,xe,Z,_e=C.l,Se,Ee,Ae,Re,Te,we,Pe,Ie,Me,Oe,Le,Ne,Ve,Xe,Ue;if(this._hasMaskedPath){if(Ue=this._pathData.m,!this._pathData.n||this._pathData._mdf){var We=Ue.v;this._pathData.r.v&&(We=We.reverse()),Se={tLength:0,segments:[]},Z=We._length-1;var ze;for(Ne=0,xe=0;xe<Z;xe+=1)ze=bez.buildBezierData(We.v[xe],We.v[xe+1],[We.o[xe][0]-We.v[xe][0],We.o[xe][1]-We.v[xe][1]],[We.i[xe+1][0]-We.v[xe+1][0],We.i[xe+1][1]-We.v[xe+1][1]]),Se.tLength+=ze.segmentLength,Se.segments.push(ze),Ne+=ze.segmentLength;xe=Z,Ue.v.c&&(ze=bez.buildBezierData(We.v[xe],We.v[0],[We.o[xe][0]-We.v[xe][0],We.o[xe][1]-We.v[xe][1]],[We.i[0][0]-We.v[0][0],We.i[0][1]-We.v[0][1]]),Se.tLength+=ze.segmentLength,Se.segments.push(ze),Ne+=ze.segmentLength),this._pathData.pi=Se}if(Se=this._pathData.pi,Ee=this._pathData.f.v,Pe=0,we=1,Re=0,Te=!0,Oe=Se.segments,Ee<0&&Ue.v.c)for(Se.tLength<Math.abs(Ee)&&(Ee=-Math.abs(Ee)%Se.tLength),Pe=Oe.length-1,Me=Oe[Pe].points,we=Me.length-1;Ee<0;)Ee+=Me[we].partialLength,we-=1,we<0&&(Pe-=1,Me=Oe[Pe].points,we=Me.length-1);Me=Oe[Pe].points,Ie=Me[we-1],Ae=Me[we],Le=Ae.partialLength}Z=_e.length,K=0,J=0;var He=C.finalSize*1.2*.714,je=!0,$e,De,Fe,ke,Ge;ke=B.length;var Be,qe=-1,Ke,Ye,Qe,Ze=Ee,it=Pe,at=we,st=-1,Je,et,nt,rt,tt,ot,ut,mt,pt="",yt=this.defaultPropsArray,gt;if(C.j===2||C.j===1){var _t=0,Pt=0,It=C.j===2?-.5:-1,St=0,Lt=!0;for(xe=0;xe<Z;xe+=1)if(_e[xe].n){for(_t&&(_t+=Pt);St<xe;)_e[St].animatorJustifyOffset=_t,St+=1;_t=0,Lt=!0}else{for(Fe=0;Fe<ke;Fe+=1)$e=B[Fe].a,$e.t.propType&&(Lt&&C.j===2&&(Pt+=$e.t.v*It),De=B[Fe].s,Be=De.getMult(_e[xe].anIndexes[Fe],U.a[Fe].s.totalChars),Be.length?_t+=$e.t.v*Be[0]*It:_t+=$e.t.v*Be*It);Lt=!1}for(_t&&(_t+=Pt);St<xe;)_e[St].animatorJustifyOffset=_t,St+=1}for(xe=0;xe<Z;xe+=1){if(V.reset(),Je=1,_e[xe].n)K=0,J+=C.yOffset,J+=je?1:0,Ee=Ze,je=!1,this._hasMaskedPath&&(Pe=it,we=at,Me=Oe[Pe].points,Ie=Me[we-1],Ae=Me[we],Le=Ae.partialLength,Re=0),pt="",mt="",ot="",gt="",yt=this.defaultPropsArray;else{if(this._hasMaskedPath){if(st!==_e[xe].line){switch(C.j){case 1:Ee+=Ne-C.lineWidths[_e[xe].line];break;case 2:Ee+=(Ne-C.lineWidths[_e[xe].line])/2;break}st=_e[xe].line}qe!==_e[xe].ind&&(_e[qe]&&(Ee+=_e[qe].extra),Ee+=_e[xe].an/2,qe=_e[xe].ind),Ee+=I[0]*_e[xe].an*.005;var At=0;for(Fe=0;Fe<ke;Fe+=1)$e=B[Fe].a,$e.p.propType&&(De=B[Fe].s,Be=De.getMult(_e[xe].anIndexes[Fe],U.a[Fe].s.totalChars),Be.length?At+=$e.p.v[0]*Be[0]:At+=$e.p.v[0]*Be),$e.a.propType&&(De=B[Fe].s,Be=De.getMult(_e[xe].anIndexes[Fe],U.a[Fe].s.totalChars),Be.length?At+=$e.a.v[0]*Be[0]:At+=$e.a.v[0]*Be);for(Te=!0,this._pathData.a.v&&(Ee=_e[0].an*.5+(Ne-this._pathData.f.v-_e[0].an*.5-_e[_e.length-1].an*.5)*qe/(Z-1),Ee+=this._pathData.f.v);Te;)Re+Le>=Ee+At||!Me?(Ve=(Ee+At-Re)/Ae.partialLength,Ye=Ie.point[0]+(Ae.point[0]-Ie.point[0])*Ve,Qe=Ie.point[1]+(Ae.point[1]-Ie.point[1])*Ve,V.translate(-I[0]*_e[xe].an*.005,-(I[1]*He)*.01),Te=!1):Me&&(Re+=Ae.partialLength,we+=1,we>=Me.length&&(we=0,Pe+=1,Oe[Pe]?Me=Oe[Pe].points:Ue.v.c?(we=0,Pe=0,Me=Oe[Pe].points):(Re-=Ae.partialLength,Me=null)),Me&&(Ie=Ae,Ae=Me[we],Le=Ae.partialLength));Ke=_e[xe].an/2-_e[xe].add,V.translate(-Ke,0,0)}else Ke=_e[xe].an/2-_e[xe].add,V.translate(-Ke,0,0),V.translate(-I[0]*_e[xe].an*.005,-I[1]*He*.01,0);for(Fe=0;Fe<ke;Fe+=1)$e=B[Fe].a,$e.t.propType&&(De=B[Fe].s,Be=De.getMult(_e[xe].anIndexes[Fe],U.a[Fe].s.totalChars),(K!==0||C.j!==0)&&(this._hasMaskedPath?Be.length?Ee+=$e.t.v*Be[0]:Ee+=$e.t.v*Be:Be.length?K+=$e.t.v*Be[0]:K+=$e.t.v*Be));for(C.strokeWidthAnim&&(nt=C.sw||0),C.strokeColorAnim&&(C.sc?et=[C.sc[0],C.sc[1],C.sc[2]]:et=[0,0,0]),C.fillColorAnim&&C.fc&&(rt=[C.fc[0],C.fc[1],C.fc[2]]),Fe=0;Fe<ke;Fe+=1)$e=B[Fe].a,$e.a.propType&&(De=B[Fe].s,Be=De.getMult(_e[xe].anIndexes[Fe],U.a[Fe].s.totalChars),Be.length?V.translate(-$e.a.v[0]*Be[0],-$e.a.v[1]*Be[1],$e.a.v[2]*Be[2]):V.translate(-$e.a.v[0]*Be,-$e.a.v[1]*Be,$e.a.v[2]*Be));for(Fe=0;Fe<ke;Fe+=1)$e=B[Fe].a,$e.s.propType&&(De=B[Fe].s,Be=De.getMult(_e[xe].anIndexes[Fe],U.a[Fe].s.totalChars),Be.length?V.scale(1+($e.s.v[0]-1)*Be[0],1+($e.s.v[1]-1)*Be[1],1):V.scale(1+($e.s.v[0]-1)*Be,1+($e.s.v[1]-1)*Be,1));for(Fe=0;Fe<ke;Fe+=1){if($e=B[Fe].a,De=B[Fe].s,Be=De.getMult(_e[xe].anIndexes[Fe],U.a[Fe].s.totalChars),$e.sk.propType&&(Be.length?V.skewFromAxis(-$e.sk.v*Be[0],$e.sa.v*Be[1]):V.skewFromAxis(-$e.sk.v*Be,$e.sa.v*Be)),$e.r.propType&&(Be.length?V.rotateZ(-$e.r.v*Be[2]):V.rotateZ(-$e.r.v*Be)),$e.ry.propType&&(Be.length?V.rotateY($e.ry.v*Be[1]):V.rotateY($e.ry.v*Be)),$e.rx.propType&&(Be.length?V.rotateX($e.rx.v*Be[0]):V.rotateX($e.rx.v*Be)),$e.o.propType&&(Be.length?Je+=($e.o.v*Be[0]-Je)*Be[0]:Je+=($e.o.v*Be-Je)*Be),C.strokeWidthAnim&&$e.sw.propType&&(Be.length?nt+=$e.sw.v*Be[0]:nt+=$e.sw.v*Be),C.strokeColorAnim&&$e.sc.propType)for(tt=0;tt<3;tt+=1)Be.length?et[tt]+=($e.sc.v[tt]-et[tt])*Be[0]:et[tt]+=($e.sc.v[tt]-et[tt])*Be;if(C.fillColorAnim&&C.fc){if($e.fc.propType)for(tt=0;tt<3;tt+=1)Be.length?rt[tt]+=($e.fc.v[tt]-rt[tt])*Be[0]:rt[tt]+=($e.fc.v[tt]-rt[tt])*Be;$e.fh.propType&&(Be.length?rt=addHueToRGB(rt,$e.fh.v*Be[0]):rt=addHueToRGB(rt,$e.fh.v*Be)),$e.fs.propType&&(Be.length?rt=addSaturationToRGB(rt,$e.fs.v*Be[0]):rt=addSaturationToRGB(rt,$e.fs.v*Be)),$e.fb.propType&&(Be.length?rt=addBrightnessToRGB(rt,$e.fb.v*Be[0]):rt=addBrightnessToRGB(rt,$e.fb.v*Be))}}for(Fe=0;Fe<ke;Fe+=1)$e=B[Fe].a,$e.p.propType&&(De=B[Fe].s,Be=De.getMult(_e[xe].anIndexes[Fe],U.a[Fe].s.totalChars),this._hasMaskedPath?Be.length?V.translate(0,$e.p.v[1]*Be[0],-$e.p.v[2]*Be[1]):V.translate(0,$e.p.v[1]*Be,-$e.p.v[2]*Be):Be.length?V.translate($e.p.v[0]*Be[0],$e.p.v[1]*Be[1],-$e.p.v[2]*Be[2]):V.translate($e.p.v[0]*Be,$e.p.v[1]*Be,-$e.p.v[2]*Be));if(C.strokeWidthAnim&&(ot=nt<0?0:nt),C.strokeColorAnim&&(ut="rgb("+Math.round(et[0]*255)+","+Math.round(et[1]*255)+","+Math.round(et[2]*255)+")"),C.fillColorAnim&&C.fc&&(mt="rgb("+Math.round(rt[0]*255)+","+Math.round(rt[1]*255)+","+Math.round(rt[2]*255)+")"),this._hasMaskedPath){if(V.translate(0,-C.ls),V.translate(0,I[1]*He*.01+J,0),this._pathData.p.v){Xe=(Ae.point[1]-Ie.point[1])/(Ae.point[0]-Ie.point[0]);var kt=Math.atan(Xe)*180/Math.PI;Ae.point[0]<Ie.point[0]&&(kt+=180),V.rotate(-kt*Math.PI/180)}V.translate(Ye,Qe,0),Ee-=I[0]*_e[xe].an*.005,_e[xe+1]&&qe!==_e[xe+1].ind&&(Ee+=_e[xe].an/2,Ee+=C.tr*.001*C.finalSize)}else{switch(V.translate(K,J,0),C.ps&&V.translate(C.ps[0],C.ps[1]+C.ascent,0),C.j){case 1:V.translate(_e[xe].animatorJustifyOffset+C.justifyOffset+(C.boxWidth-C.lineWidths[_e[xe].line]),0,0);break;case 2:V.translate(_e[xe].animatorJustifyOffset+C.justifyOffset+(C.boxWidth-C.lineWidths[_e[xe].line])/2,0,0);break}V.translate(0,-C.ls),V.translate(Ke,0,0),V.translate(I[0]*_e[xe].an*.005,I[1]*He*.01,0),K+=_e[xe].l+C.tr*.001*C.finalSize}X==="html"?pt=V.toCSS():X==="svg"?pt=V.to2dCSS():yt=[V.props[0],V.props[1],V.props[2],V.props[3],V.props[4],V.props[5],V.props[6],V.props[7],V.props[8],V.props[9],V.props[10],V.props[11],V.props[12],V.props[13],V.props[14],V.props[15]],gt=Je}Y<=xe?(Ge=new LetterProps(gt,ot,ut,mt,pt,yt),this.renderedLetters.push(Ge),Y+=1,this.lettersChangedFlag=!0):(Ge=this.renderedLetters[xe],this.lettersChangedFlag=Ge.update(gt,ot,ut,mt,pt,yt)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(C,E,I){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(C,E,I),this.textProperty=new TextProperty(this,C.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(C.t,this.renderType,this),this.initTransform(C,E,I),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(C){this._mdf=!1,this.prepareRenderableFrame(C),this.prepareProperties(C,this.isInRange)},ITextElement.prototype.createPathShape=function(C,E){var I,B=E.length,U,V="";for(I=0;I<B;I+=1)E[I].ty==="sh"&&(U=E[I].ks.k,V+=buildShapeString(U,U.i.length,!0,C));return V},ITextElement.prototype.updateDocumentData=function(C,E){this.textProperty.updateDocumentData(C,E)},ITextElement.prototype.canResizeFont=function(C){this.textProperty.canResizeFont(C)},ITextElement.prototype.setMinimumFontSize=function(C){this.textProperty.setMinimumFontSize(C)},ITextElement.prototype.applyTextPropertiesToMatrix=function(C,E,I,B,U){switch(C.ps&&E.translate(C.ps[0],C.ps[1]+C.ascent,0),E.translate(0,-C.ls,0),C.j){case 1:E.translate(C.justifyOffset+(C.boxWidth-C.lineWidths[I]),0,0);break;case 2:E.translate(C.justifyOffset+(C.boxWidth-C.lineWidths[I])/2,0,0);break}E.translate(B,U,0)},ITextElement.prototype.buildColor=function(C){return"rgb("+Math.round(C[0]*255)+","+Math.round(C[1]*255)+","+Math.round(C[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(C,E,I){this.textSpans=[],this.renderType="svg",this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(C){for(var E=0,I=C.length,B=[],U="";E<I;)C[E]===String.fromCharCode(13)||C[E]===String.fromCharCode(3)?(B.push(U),U=""):U+=C[E],E+=1;return B.push(U),B},SVGTextLottieElement.prototype.buildShapeData=function(C,E){if(C.shapes&&C.shapes.length){var I=C.shapes[0];if(I.it){var B=I.it[I.it.length-1];B.s&&(B.s.k[0]=E,B.s.k[1]=E)}}return C},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var C,E,I=this.textProperty.currentData;this.renderedLetters=createSizedArray(I?I.l.length:0),I.fc?this.layerElement.setAttribute("fill",this.buildColor(I.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),I.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(I.sc)),this.layerElement.setAttribute("stroke-width",I.sw)),this.layerElement.setAttribute("font-size",I.finalSize);var B=this.globalData.fontManager.getFontByName(I.f);if(B.fClass)this.layerElement.setAttribute("class",B.fClass);else{this.layerElement.setAttribute("font-family",B.fFamily);var U=I.fWeight,V=I.fStyle;this.layerElement.setAttribute("font-style",V),this.layerElement.setAttribute("font-weight",U)}this.layerElement.setAttribute("aria-label",I.t);var X=I.l||[],Y=!!this.globalData.fontManager.chars;E=X.length;var K,J=this.mHelper,xe="",Z=this.data.singleShape,_e=0,Se=0,Ee=!0,Ae=I.tr*.001*I.finalSize;if(Z&&!Y&&!I.sz){var Re=this.textContainer,Te="start";switch(I.j){case 1:Te="end";break;case 2:Te="middle";break;default:Te="start";break}Re.setAttribute("text-anchor",Te),Re.setAttribute("letter-spacing",Ae);var we=this.buildTextContents(I.finalText);for(E=we.length,Se=I.ps?I.ps[1]+I.ascent:0,C=0;C<E;C+=1)K=this.textSpans[C].span||createNS("tspan"),K.textContent=we[C],K.setAttribute("x",0),K.setAttribute("y",Se),K.style.display="inherit",Re.appendChild(K),this.textSpans[C]||(this.textSpans[C]={span:null,glyph:null}),this.textSpans[C].span=K,Se+=I.finalLineHeight;this.layerElement.appendChild(Re)}else{var Pe=this.textSpans.length,Ie;for(C=0;C<E;C+=1){if(this.textSpans[C]||(this.textSpans[C]={span:null,childSpan:null,glyph:null}),!Y||!Z||C===0){if(K=Pe>C?this.textSpans[C].span:createNS(Y?"g":"text"),Pe<=C){if(K.setAttribute("stroke-linecap","butt"),K.setAttribute("stroke-linejoin","round"),K.setAttribute("stroke-miterlimit","4"),this.textSpans[C].span=K,Y){var Me=createNS("g");K.appendChild(Me),this.textSpans[C].childSpan=Me}this.textSpans[C].span=K,this.layerElement.appendChild(K)}K.style.display="inherit"}if(J.reset(),Z&&(X[C].n&&(_e=-Ae,Se+=I.yOffset,Se+=Ee?1:0,Ee=!1),this.applyTextPropertiesToMatrix(I,J,X[C].line,_e,Se),_e+=X[C].l||0,_e+=Ae),Y){Ie=this.globalData.fontManager.getCharData(I.finalText[C],B.fStyle,this.globalData.fontManager.getFontByName(I.f).fFamily);var Oe;if(Ie.t===1)Oe=new SVGCompElement(Ie.data,this.globalData,this);else{var Le=emptyShapeData;Ie.data&&Ie.data.shapes&&(Le=this.buildShapeData(Ie.data,I.finalSize)),Oe=new SVGShapeElement(Le,this.globalData,this)}if(this.textSpans[C].glyph){var Ne=this.textSpans[C].glyph;this.textSpans[C].childSpan.removeChild(Ne.layerElement),Ne.destroy()}this.textSpans[C].glyph=Oe,Oe._debug=!0,Oe.prepareFrame(0),Oe.renderFrame(),this.textSpans[C].childSpan.appendChild(Oe.layerElement),Ie.t===1&&this.textSpans[C].childSpan.setAttribute("transform","scale("+I.finalSize/100+","+I.finalSize/100+")")}else Z&&K.setAttribute("transform","translate("+J.props[12]+","+J.props[13]+")"),K.textContent=X[C].val,K.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}Z&&K&&K.setAttribute("d",xe)}for(;C<this.textSpans.length;)this.textSpans[C].span.style.display="none",C+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var C=this.layerElement.getBBox();this.bbox={top:C.y,left:C.x,width:C.width,height:C.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var C,E=this.textSpans.length,I;for(this.renderedFrame=this.comp.renderedFrame,C=0;C<E;C+=1)I=this.textSpans[C].glyph,I&&(I.prepareFrame(this.comp.renderedFrame-this.data.st),I._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var C,E,I=this.textAnimator.renderedLetters,B=this.textProperty.currentData.l;E=B.length;var U,V,X;for(C=0;C<E;C+=1)B[C].n||(U=I[C],V=this.textSpans[C].span,X=this.textSpans[C].glyph,X&&X.renderFrame(),U._mdf.m&&V.setAttribute("transform",U.m),U._mdf.o&&V.setAttribute("opacity",U.o),U._mdf.sw&&V.setAttribute("stroke-width",U.sw),U._mdf.sc&&V.setAttribute("stroke",U.sc),U._mdf.fc&&V.setAttribute("fill",U.fc))}};function ISolidElement(C,E,I){this.initElement(C,E,I)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var C=createNS("rect");C.setAttribute("width",this.data.sw),C.setAttribute("height",this.data.sh),C.setAttribute("fill",this.data.sc),this.layerElement.appendChild(C)};function NullElement(C,E,I){this.initFrame(),this.initBaseData(C,E,I),this.initFrame(),this.initTransform(C,E,I),this.initHierarchy()}NullElement.prototype.prepareFrame=function(C){this.prepareProperties(C,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(C){return new NullElement(C,this.globalData,this)},SVGRendererBase.prototype.createShape=function(C){return new SVGShapeElement(C,this.globalData,this)},SVGRendererBase.prototype.createText=function(C){return new SVGTextLottieElement(C,this.globalData,this)},SVGRendererBase.prototype.createImage=function(C){return new IImageElement(C,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(C){return new ISolidElement(C,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(C){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+C.w+" "+C.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",C.w),this.svgElement.setAttribute("height",C.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var E=this.globalData.defs;this.setupGlobalData(C,E),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=C;var I=createNS("clipPath"),B=createNS("rect");B.setAttribute("width",C.w),B.setAttribute("height",C.h),B.setAttribute("x",0),B.setAttribute("y",0);var U=createElementID();I.setAttribute("id",U),I.appendChild(B),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+U+")"),E.appendChild(I),this.layers=C.layers,this.elements=createSizedArray(C.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var C,E=this.layers?this.layers.length:0;for(C=0;C<E;C+=1)this.elements[C]&&this.elements[C].destroy&&this.elements[C].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(C){var E=0,I=this.layers.length;for(E=0;E<I;E+=1)if(this.layers[E].ind===C)return E;return-1},SVGRendererBase.prototype.buildItem=function(C){var E=this.elements;if(!(E[C]||this.layers[C].ty===99)){E[C]=!0;var I=this.createItem(this.layers[C]);if(E[C]=I,getExpressionsPlugin()&&(this.layers[C].ty===0&&this.globalData.projectInterface.registerComposition(I),I.initExpressions()),this.appendElementInPos(I,C),this.layers[C].tt){var B="tp"in this.layers[C]?this.findIndexByInd(this.layers[C].tp):C-1;if(B===-1)return;if(!this.elements[B]||this.elements[B]===!0)this.buildItem(B),this.addPendingElement(I);else{var U=E[B],V=U.getMatte(this.layers[C].tt);I.setMatte(V)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var C=this.pendingElements.pop();if(C.checkParenting(),C.data.tt)for(var E=0,I=this.elements.length;E<I;){if(this.elements[E]===C){var B="tp"in C.data?this.findIndexByInd(C.data.tp):E-1,U=this.elements[B],V=U.getMatte(this.layers[E].tt);C.setMatte(V);break}E+=1}}},SVGRendererBase.prototype.renderFrame=function(C){if(!(this.renderedFrame===C||this.destroyed)){C===null?C=this.renderedFrame:this.renderedFrame=C,this.globalData.frameNum=C,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=C,this.globalData._mdf=!1;var E,I=this.layers.length;for(this.completeLayers||this.checkLayers(C),E=I-1;E>=0;E-=1)(this.completeLayers||this.elements[E])&&this.elements[E].prepareFrame(C-this.layers[E].st);if(this.globalData._mdf)for(E=0;E<I;E+=1)(this.completeLayers||this.elements[E])&&this.elements[E].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(C,E){var I=C.getBaseElement();if(I){for(var B=0,U;B<E;)this.elements[B]&&this.elements[B]!==!0&&this.elements[B].getBaseElement()&&(U=this.elements[B].getBaseElement()),B+=1;U?this.layerElement.insertBefore(I,U):this.layerElement.appendChild(I)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(C,E,I){this.initFrame(),this.initBaseData(C,E,I),this.initTransform(C,E,I),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!E.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(C){if(this._mdf=!1,this.prepareRenderableFrame(C),this.prepareProperties(C,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=C/this.data.sr;else{var E=this.tm.v;E===this.data.op&&(E=this.data.op-1),this.renderedFrame=E}var I,B=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),I=B-1;I>=0;I-=1)(this.completeLayers||this.elements[I])&&(this.elements[I].prepareFrame(this.renderedFrame-this.layers[I].st),this.elements[I]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var C,E=this.layers.length;for(C=0;C<E;C+=1)(this.completeLayers||this.elements[C])&&this.elements[C].renderFrame()},ICompElement.prototype.setElements=function(C){this.elements=C},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var C,E=this.layers.length;for(C=0;C<E;C+=1)this.elements[C]&&this.elements[C].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(C,E,I){this.layers=C.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(C,E,I),this.tm=C.tm?PropertyFactory.getProp(this,C.tm,0,E.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(C){return new SVGCompElement(C,this.globalData,this)};function SVGRenderer(C,E){this.animationItem=C,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var I="";if(E&&E.title){var B=createNS("title"),U=createElementID();B.setAttribute("id",U),B.textContent=E.title,this.svgElement.appendChild(B),I+=U}if(E&&E.description){var V=createNS("desc"),X=createElementID();V.setAttribute("id",X),V.textContent=E.description,this.svgElement.appendChild(V),I+=" "+X}I&&this.svgElement.setAttribute("aria-labelledby",I);var Y=createNS("defs");this.svgElement.appendChild(Y);var K=createNS("g");this.svgElement.appendChild(K),this.layerElement=K,this.renderConfig={preserveAspectRatio:E&&E.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:E&&E.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:E&&E.contentVisibility||"visible",progressiveLoad:E&&E.progressiveLoad||!1,hideOnTransparent:!(E&&E.hideOnTransparent===!1),viewBoxOnly:E&&E.viewBoxOnly||!1,viewBoxSize:E&&E.viewBoxSize||!1,className:E&&E.className||"",id:E&&E.id||"",focusable:E&&E.focusable,filterSize:{width:E&&E.filterSize&&E.filterSize.width||"100%",height:E&&E.filterSize&&E.filterSize.height||"100%",x:E&&E.filterSize&&E.filterSize.x||"0%",y:E&&E.filterSize&&E.filterSize.y||"0%"},width:E&&E.width,height:E&&E.height,runExpressions:!E||E.runExpressions===void 0||E.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:Y,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(C){return new SVGCompElement(C,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(E){var I,B=E.length,U="_";for(I=0;I<B;I+=1)U+=E[I].transform.key+"_";var V=this.sequences[U];return V||(V={transforms:[].concat(E),finalTransform:new Matrix,_mdf:!1},this.sequences[U]=V,this.sequenceList.push(V)),V},processSequence:function(E,I){for(var B=0,U=E.transforms.length,V=I;B<U&&!I;){if(E.transforms[B].transform.mProps._mdf){V=!0;break}B+=1}if(V)for(E.finalTransform.reset(),B=U-1;B>=0;B-=1)E.finalTransform.multiply(E.transforms[B].transform.mProps.v);E._mdf=V},processSequences:function(E){var I,B=this.sequenceList.length;for(I=0;I<B;I+=1)this.processSequence(this.sequenceList[I],E)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var E="__lottie_element_luma_buffer",I=null,B=null,U=null;function V(){var K=createNS("svg"),J=createNS("filter"),xe=createNS("feColorMatrix");return J.setAttribute("id",E),xe.setAttribute("type","matrix"),xe.setAttribute("color-interpolation-filters","sRGB"),xe.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),J.appendChild(xe),K.appendChild(J),K.setAttribute("id",E+"_svg"),featureSupport.svgLumaHidden&&(K.style.display="none"),K}function X(){I||(U=V(),document.body.appendChild(U),I=createTag("canvas"),B=I.getContext("2d"),B.filter="url(#"+E+")",B.fillStyle="rgba(0,0,0,0)",B.fillRect(0,0,1,1))}function Y(K){return I||X(),I.width=K.width,I.height=K.height,B.filter="url(#"+E+")",I}return{load:X,get:Y}};function createCanvas(C,E){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(C,E);var I=createTag("canvas");return I.width=C,I.height=E,I}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(C){var E,I=C.data.ef?C.data.ef.length:0;this.filters=[];var B;for(E=0;E<I;E+=1){B=null;var U=C.data.ef[E].ty;if(registeredEffects[U]){var V=registeredEffects[U].effect;B=new V(C.effectsManager.effectElements[E],C)}B&&this.filters.push(B)}this.filters.length&&C.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(C){var E,I=this.filters.length;for(E=0;E<I;E+=1)this.filters[E].renderFrame(C)},CVEffects.prototype.getEffects=function(C){var E,I=this.filters.length,B=[];for(E=0;E<I;E+=1)this.filters[E].type===C&&B.push(this.filters[E]);return B};function registerEffect(C,E){registeredEffects[C]={effect:E}}function CVMaskElement(C,E){this.data=C,this.element=E,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var I,B=this.masksProperties.length,U=!1;for(I=0;I<B;I+=1)this.masksProperties[I].mode!=="n"&&(U=!0),this.viewData[I]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[I],3);this.hasMasks=U,U&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var C=this.element.finalTransform.mat,E=this.element.canvasContext,I,B=this.masksProperties.length,U,V,X;for(E.beginPath(),I=0;I<B;I+=1)if(this.masksProperties[I].mode!=="n"){this.masksProperties[I].inv&&(E.moveTo(0,0),E.lineTo(this.element.globalData.compSize.w,0),E.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),E.lineTo(0,this.element.globalData.compSize.h),E.lineTo(0,0)),X=this.viewData[I].v,U=C.applyToPointArray(X.v[0][0],X.v[0][1],0),E.moveTo(U[0],U[1]);var Y,K=X._length;for(Y=1;Y<K;Y+=1)V=C.applyToTriplePoints(X.o[Y-1],X.i[Y],X.v[Y]),E.bezierCurveTo(V[0],V[1],V[2],V[3],V[4],V[5]);V=C.applyToTriplePoints(X.o[Y-1],X.i[0],X.v[0]),E.bezierCurveTo(V[0],V[1],V[2],V[3],V[4],V[5])}this.element.globalData.renderer.save(!0),E.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var E=this.globalData.canvasContext,I=assetLoader.createCanvas(E.canvas.width,E.canvas.height);this.buffers.push(I);var B=assetLoader.createCanvas(E.canvas.width,E.canvas.height);this.buffers.push(B),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var E=this.globalData;if(E.blendMode!==this.data.bm){E.blendMode=this.data.bm;var I=getBlendMode(this.data.bm);E.canvasContext.globalCompositeOperation=I}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(E){E.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var E=this.buffers[0],I=E.getContext("2d");this.clearCanvas(I),I.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var E=this.buffers[1],I=E.getContext("2d");this.clearCanvas(I),I.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var B=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(B.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var U=assetLoader.getLumaCanvas(this.canvasContext.canvas),V=U.getContext("2d");V.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(U,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(E,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(E){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!E)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var I=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(I),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(I),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(C,E,I,B){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var U=4;E.ty==="rc"?U=5:E.ty==="el"?U=6:E.ty==="sr"&&(U=7),this.sh=ShapePropertyFactory.getShapeProp(C,E,U,C);var V,X=I.length,Y;for(V=0;V<X;V+=1)I[V].closed||(Y={transforms:B.addTransformSequence(I[V].transforms),trNodes:[]},this.styledShapes.push(Y),I[V].elements.push(Y))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(C,E,I){this.shapes=[],this.shapesData=C.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(C,E){var I={data:C,type:C.ty,preTransforms:this.transformsManager.addTransformSequence(E),transforms:[],elements:[],closed:C.hd===!0},B={};if(C.ty==="fl"||C.ty==="st"?(B.c=PropertyFactory.getProp(this,C.c,1,255,this),B.c.k||(I.co="rgb("+bmFloor(B.c.v[0])+","+bmFloor(B.c.v[1])+","+bmFloor(B.c.v[2])+")")):(C.ty==="gf"||C.ty==="gs")&&(B.s=PropertyFactory.getProp(this,C.s,1,null,this),B.e=PropertyFactory.getProp(this,C.e,1,null,this),B.h=PropertyFactory.getProp(this,C.h||{k:0},0,.01,this),B.a=PropertyFactory.getProp(this,C.a||{k:0},0,degToRads,this),B.g=new GradientProperty(this,C.g,this)),B.o=PropertyFactory.getProp(this,C.o,0,.01,this),C.ty==="st"||C.ty==="gs"){if(I.lc=lineCapEnum[C.lc||2],I.lj=lineJoinEnum[C.lj||2],C.lj==1&&(I.ml=C.ml),B.w=PropertyFactory.getProp(this,C.w,0,null,this),B.w.k||(I.wi=B.w.v),C.d){var U=new DashProperty(this,C.d,"canvas",this);B.d=U,B.d.k||(I.da=B.d.dashArray,I.do=B.d.dashoffset[0])}}else I.r=C.r===2?"evenodd":"nonzero";return this.stylesList.push(I),B.style=I,B},CVShapeElement.prototype.createGroupElement=function(){var C={it:[],prevViewData:[]};return C},CVShapeElement.prototype.createTransformElement=function(C){var E={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,C.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,C,this)}};return E},CVShapeElement.prototype.createShapeElement=function(C){var E=new CVShapeData(this,C,this.stylesList,this.transformsManager);return this.shapes.push(E),this.addShapeToModifiers(E),E},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var C,E=this.itemsData.length;for(C=0;C<E;C+=1)this.prevViewData[C]=this.itemsData[C];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),E=this.dynamicProperties.length,C=0;C<E;C+=1)this.dynamicProperties[C].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(C){var E,I=this.stylesList.length;for(E=0;E<I;E+=1)this.stylesList[E].closed||this.stylesList[E].transforms.push(C)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var C,E=this.stylesList.length;for(C=0;C<E;C+=1)this.stylesList[C].closed||this.stylesList[C].transforms.pop()},CVShapeElement.prototype.closeStyles=function(C){var E,I=C.length;for(E=0;E<I;E+=1)C[E].closed=!0},CVShapeElement.prototype.searchShapes=function(C,E,I,B,U){var V,X=C.length-1,Y,K,J=[],xe=[],Z,_e,Se,Ee=[].concat(U);for(V=X;V>=0;V-=1){if(Z=this.searchProcessedElement(C[V]),Z?E[V]=I[Z-1]:C[V]._shouldRender=B,C[V].ty==="fl"||C[V].ty==="st"||C[V].ty==="gf"||C[V].ty==="gs")Z?E[V].style.closed=!1:E[V]=this.createStyleElement(C[V],Ee),J.push(E[V].style);else if(C[V].ty==="gr"){if(!Z)E[V]=this.createGroupElement(C[V]);else for(K=E[V].it.length,Y=0;Y<K;Y+=1)E[V].prevViewData[Y]=E[V].it[Y];this.searchShapes(C[V].it,E[V].it,E[V].prevViewData,B,Ee)}else C[V].ty==="tr"?(Z||(Se=this.createTransformElement(C[V]),E[V]=Se),Ee.push(E[V]),this.addTransformToStyleList(E[V])):C[V].ty==="sh"||C[V].ty==="rc"||C[V].ty==="el"||C[V].ty==="sr"?Z||(E[V]=this.createShapeElement(C[V])):C[V].ty==="tm"||C[V].ty==="rd"||C[V].ty==="pb"||C[V].ty==="zz"||C[V].ty==="op"?(Z?(_e=E[V],_e.closed=!1):(_e=ShapeModifiers.getModifier(C[V].ty),_e.init(this,C[V]),E[V]=_e,this.shapeModifiers.push(_e)),xe.push(_e)):C[V].ty==="rp"&&(Z?(_e=E[V],_e.closed=!0):(_e=ShapeModifiers.getModifier(C[V].ty),E[V]=_e,_e.init(this,C,V,E),this.shapeModifiers.push(_e),B=!1),xe.push(_e));this.addProcessedElement(C[V],V+1)}for(this.removeTransformFromStyleList(),this.closeStyles(J),X=xe.length,V=0;V<X;V+=1)xe[V].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(C,E){(C._opMdf||E.op._mdf||this._isFirstFrame)&&(E.opacity=C.opacity,E.opacity*=E.op.v,E._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var C,E=this.stylesList.length,I,B,U,V,X,Y,K=this.globalData.renderer,J=this.globalData.canvasContext,xe,Z;for(C=0;C<E;C+=1)if(Z=this.stylesList[C],xe=Z.type,!((xe==="st"||xe==="gs")&&Z.wi===0||!Z.data._shouldRender||Z.coOp===0||this.globalData.currentGlobalAlpha===0)){for(K.save(),X=Z.elements,xe==="st"||xe==="gs"?(K.ctxStrokeStyle(xe==="st"?Z.co:Z.grd),K.ctxLineWidth(Z.wi),K.ctxLineCap(Z.lc),K.ctxLineJoin(Z.lj),K.ctxMiterLimit(Z.ml||0)):K.ctxFillStyle(xe==="fl"?Z.co:Z.grd),K.ctxOpacity(Z.coOp),xe!=="st"&&xe!=="gs"&&J.beginPath(),K.ctxTransform(Z.preTransforms.finalTransform.props),B=X.length,I=0;I<B;I+=1){for((xe==="st"||xe==="gs")&&(J.beginPath(),Z.da&&(J.setLineDash(Z.da),J.lineDashOffset=Z.do)),Y=X[I].trNodes,V=Y.length,U=0;U<V;U+=1)Y[U].t==="m"?J.moveTo(Y[U].p[0],Y[U].p[1]):Y[U].t==="c"?J.bezierCurveTo(Y[U].pts[0],Y[U].pts[1],Y[U].pts[2],Y[U].pts[3],Y[U].pts[4],Y[U].pts[5]):J.closePath();(xe==="st"||xe==="gs")&&(K.ctxStroke(),Z.da&&J.setLineDash(this.dashResetter))}xe!=="st"&&xe!=="gs"&&this.globalData.renderer.ctxFill(Z.r),K.restore()}},CVShapeElement.prototype.renderShape=function(C,E,I,B){var U,V=E.length-1,X;for(X=C,U=V;U>=0;U-=1)E[U].ty==="tr"?(X=I[U].transform,this.renderShapeTransform(C,X)):E[U].ty==="sh"||E[U].ty==="el"||E[U].ty==="rc"||E[U].ty==="sr"?this.renderPath(E[U],I[U]):E[U].ty==="fl"?this.renderFill(E[U],I[U],X):E[U].ty==="st"?this.renderStroke(E[U],I[U],X):E[U].ty==="gf"||E[U].ty==="gs"?this.renderGradientFill(E[U],I[U],X):E[U].ty==="gr"?this.renderShape(X,E[U].it,I[U].it):E[U].ty;B&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(C,E){if(this._isFirstFrame||E._mdf||C.transforms._mdf){var I=C.trNodes,B=E.paths,U,V,X,Y=B._length;I.length=0;var K=C.transforms.finalTransform;for(X=0;X<Y;X+=1){var J=B.shapes[X];if(J&&J.v){for(V=J._length,U=1;U<V;U+=1)U===1&&I.push({t:"m",p:K.applyToPointArray(J.v[0][0],J.v[0][1],0)}),I.push({t:"c",pts:K.applyToTriplePoints(J.o[U-1],J.i[U],J.v[U])});V===1&&I.push({t:"m",p:K.applyToPointArray(J.v[0][0],J.v[0][1],0)}),J.c&&V&&(I.push({t:"c",pts:K.applyToTriplePoints(J.o[U-1],J.i[0],J.v[0])}),I.push({t:"z"}))}}C.trNodes=I}},CVShapeElement.prototype.renderPath=function(C,E){if(C.hd!==!0&&C._shouldRender){var I,B=E.styledShapes.length;for(I=0;I<B;I+=1)this.renderStyledShape(E.styledShapes[I],E.sh)}},CVShapeElement.prototype.renderFill=function(C,E,I){var B=E.style;(E.c._mdf||this._isFirstFrame)&&(B.co="rgb("+bmFloor(E.c.v[0])+","+bmFloor(E.c.v[1])+","+bmFloor(E.c.v[2])+")"),(E.o._mdf||I._opMdf||this._isFirstFrame)&&(B.coOp=E.o.v*I.opacity)},CVShapeElement.prototype.renderGradientFill=function(C,E,I){var B=E.style,U;if(!B.grd||E.g._mdf||E.s._mdf||E.e._mdf||C.t!==1&&(E.h._mdf||E.a._mdf)){var V=this.globalData.canvasContext,X=E.s.v,Y=E.e.v;if(C.t===1)U=V.createLinearGradient(X[0],X[1],Y[0],Y[1]);else{var K=Math.sqrt(Math.pow(X[0]-Y[0],2)+Math.pow(X[1]-Y[1],2)),J=Math.atan2(Y[1]-X[1],Y[0]-X[0]),xe=E.h.v;xe>=1?xe=.99:xe<=-1&&(xe=-.99);var Z=K*xe,_e=Math.cos(J+E.a.v)*Z+X[0],Se=Math.sin(J+E.a.v)*Z+X[1];U=V.createRadialGradient(_e,Se,0,X[0],X[1],K)}var Ee,Ae=C.g.p,Re=E.g.c,Te=1;for(Ee=0;Ee<Ae;Ee+=1)E.g._hasOpacity&&E.g._collapsable&&(Te=E.g.o[Ee*2+1]),U.addColorStop(Re[Ee*4]/100,"rgba("+Re[Ee*4+1]+","+Re[Ee*4+2]+","+Re[Ee*4+3]+","+Te+")");B.grd=U}B.coOp=E.o.v*I.opacity},CVShapeElement.prototype.renderStroke=function(C,E,I){var B=E.style,U=E.d;U&&(U._mdf||this._isFirstFrame)&&(B.da=U.dashArray,B.do=U.dashoffset[0]),(E.c._mdf||this._isFirstFrame)&&(B.co="rgb("+bmFloor(E.c.v[0])+","+bmFloor(E.c.v[1])+","+bmFloor(E.c.v[2])+")"),(E.o._mdf||I._opMdf||this._isFirstFrame)&&(B.coOp=E.o.v*I.opacity),(E.w._mdf||this._isFirstFrame)&&(B.wi=E.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(C,E,I){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var C=this.textProperty.currentData;this.renderedLetters=createSizedArray(C.l?C.l.length:0);var E=!1;C.fc?(E=!0,this.values.fill=this.buildColor(C.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=E;var I=!1;C.sc&&(I=!0,this.values.stroke=this.buildColor(C.sc),this.values.sWidth=C.sw);var B=this.globalData.fontManager.getFontByName(C.f),U,V,X=C.l,Y=this.mHelper;this.stroke=I,this.values.fValue=C.finalSize+"px "+this.globalData.fontManager.getFontByName(C.f).fFamily,V=C.finalText.length;var K,J,xe,Z,_e,Se,Ee,Ae,Re,Te,we=this.data.singleShape,Pe=C.tr*.001*C.finalSize,Ie=0,Me=0,Oe=!0,Le=0;for(U=0;U<V;U+=1){K=this.globalData.fontManager.getCharData(C.finalText[U],B.fStyle,this.globalData.fontManager.getFontByName(C.f).fFamily),J=K&&K.data||{},Y.reset(),we&&X[U].n&&(Ie=-Pe,Me+=C.yOffset,Me+=Oe?1:0,Oe=!1),_e=J.shapes?J.shapes[0].it:[],Ee=_e.length,Y.scale(C.finalSize/100,C.finalSize/100),we&&this.applyTextPropertiesToMatrix(C,Y,X[U].line,Ie,Me),Re=createSizedArray(Ee-1);var Ne=0;for(Se=0;Se<Ee;Se+=1)if(_e[Se].ty==="sh"){for(Z=_e[Se].ks.k.i.length,Ae=_e[Se].ks.k,Te=[],xe=1;xe<Z;xe+=1)xe===1&&Te.push(Y.applyToX(Ae.v[0][0],Ae.v[0][1],0),Y.applyToY(Ae.v[0][0],Ae.v[0][1],0)),Te.push(Y.applyToX(Ae.o[xe-1][0],Ae.o[xe-1][1],0),Y.applyToY(Ae.o[xe-1][0],Ae.o[xe-1][1],0),Y.applyToX(Ae.i[xe][0],Ae.i[xe][1],0),Y.applyToY(Ae.i[xe][0],Ae.i[xe][1],0),Y.applyToX(Ae.v[xe][0],Ae.v[xe][1],0),Y.applyToY(Ae.v[xe][0],Ae.v[xe][1],0));Te.push(Y.applyToX(Ae.o[xe-1][0],Ae.o[xe-1][1],0),Y.applyToY(Ae.o[xe-1][0],Ae.o[xe-1][1],0),Y.applyToX(Ae.i[0][0],Ae.i[0][1],0),Y.applyToY(Ae.i[0][0],Ae.i[0][1],0),Y.applyToX(Ae.v[0][0],Ae.v[0][1],0),Y.applyToY(Ae.v[0][0],Ae.v[0][1],0)),Re[Ne]=Te,Ne+=1}we&&(Ie+=X[U].l,Ie+=Pe),this.textSpans[Le]?this.textSpans[Le].elem=Re:this.textSpans[Le]={elem:Re},Le+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var C=this.canvasContext;C.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var E,I,B,U,V,X,Y=this.textAnimator.renderedLetters,K=this.textProperty.currentData.l;I=K.length;var J,xe=null,Z=null,_e=null,Se,Ee,Ae=this.globalData.renderer;for(E=0;E<I;E+=1)if(!K[E].n){if(J=Y[E],J&&(Ae.save(),Ae.ctxTransform(J.p),Ae.ctxOpacity(J.o)),this.fill){for(J&&J.fc?xe!==J.fc&&(Ae.ctxFillStyle(J.fc),xe=J.fc):xe!==this.values.fill&&(xe=this.values.fill,Ae.ctxFillStyle(this.values.fill)),Se=this.textSpans[E].elem,U=Se.length,this.globalData.canvasContext.beginPath(),B=0;B<U;B+=1)for(Ee=Se[B],X=Ee.length,this.globalData.canvasContext.moveTo(Ee[0],Ee[1]),V=2;V<X;V+=6)this.globalData.canvasContext.bezierCurveTo(Ee[V],Ee[V+1],Ee[V+2],Ee[V+3],Ee[V+4],Ee[V+5]);this.globalData.canvasContext.closePath(),Ae.ctxFill()}if(this.stroke){for(J&&J.sw?_e!==J.sw&&(_e=J.sw,Ae.ctxLineWidth(J.sw)):_e!==this.values.sWidth&&(_e=this.values.sWidth,Ae.ctxLineWidth(this.values.sWidth)),J&&J.sc?Z!==J.sc&&(Z=J.sc,Ae.ctxStrokeStyle(J.sc)):Z!==this.values.stroke&&(Z=this.values.stroke,Ae.ctxStrokeStyle(this.values.stroke)),Se=this.textSpans[E].elem,U=Se.length,this.globalData.canvasContext.beginPath(),B=0;B<U;B+=1)for(Ee=Se[B],X=Ee.length,this.globalData.canvasContext.moveTo(Ee[0],Ee[1]),V=2;V<X;V+=6)this.globalData.canvasContext.bezierCurveTo(Ee[V],Ee[V+1],Ee[V+2],Ee[V+3],Ee[V+4],Ee[V+5]);this.globalData.canvasContext.closePath(),Ae.ctxStroke()}J&&this.globalData.renderer.restore()}};function CVImageElement(C,E,I){this.assetData=E.getAssetData(C.refId),this.img=E.imageLoader.getAsset(this.assetData),this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var C=createTag("canvas");C.width=this.assetData.w,C.height=this.assetData.h;var E=C.getContext("2d"),I=this.img.width,B=this.img.height,U=I/B,V=this.assetData.w/this.assetData.h,X,Y,K=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;U>V&&K==="xMidYMid slice"||U<V&&K!=="xMidYMid slice"?(Y=B,X=Y*V):(X=I,Y=X/V),E.drawImage(this.img,(I-X)/2,(B-Y)/2,X,Y,0,0,this.assetData.w,this.assetData.h),this.img=C}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(C,E,I){this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(C){return new CVShapeElement(C,this.globalData,this)},CanvasRendererBase.prototype.createText=function(C){return new CVTextElement(C,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(C){return new CVImageElement(C,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(C){return new CVSolidElement(C,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(C){C[0]===1&&C[1]===0&&C[4]===0&&C[5]===1&&C[12]===0&&C[13]===0||this.canvasContext.transform(C[0],C[1],C[4],C[5],C[12],C[13])},CanvasRendererBase.prototype.ctxOpacity=function(C){this.canvasContext.globalAlpha*=C<0?0:C},CanvasRendererBase.prototype.ctxFillStyle=function(C){this.canvasContext.fillStyle=C},CanvasRendererBase.prototype.ctxStrokeStyle=function(C){this.canvasContext.strokeStyle=C},CanvasRendererBase.prototype.ctxLineWidth=function(C){this.canvasContext.lineWidth=C},CanvasRendererBase.prototype.ctxLineCap=function(C){this.canvasContext.lineCap=C},CanvasRendererBase.prototype.ctxLineJoin=function(C){this.canvasContext.lineJoin=C},CanvasRendererBase.prototype.ctxMiterLimit=function(C){this.canvasContext.miterLimit=C},CanvasRendererBase.prototype.ctxFill=function(C){this.canvasContext.fill(C)},CanvasRendererBase.prototype.ctxFillRect=function(C,E,I,B){this.canvasContext.fillRect(C,E,I,B)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(C){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}C&&(this.globalData.blendMode="source-over"),this.contextData.restore(C)},CanvasRendererBase.prototype.configAnimation=function(C){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var E=this.animationItem.container.style;E.width="100%",E.height="100%";var I="0px 0px 0px";E.transformOrigin=I,E.mozTransformOrigin=I,E.webkitTransformOrigin=I,E["-webkit-transform"]=I,E.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=C,this.layers=C.layers,this.transformCanvas={w:C.w,h:C.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(C,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(C.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(C,E){this.reset();var I,B;C?(I=C,B=E,this.canvasContext.canvas.width=I,this.canvasContext.canvas.height=B):(this.animationItem.wrapper&&this.animationItem.container?(I=this.animationItem.wrapper.offsetWidth,B=this.animationItem.wrapper.offsetHeight):(I=this.canvasContext.canvas.width,B=this.canvasContext.canvas.height),this.canvasContext.canvas.width=I*this.renderConfig.dpr,this.canvasContext.canvas.height=B*this.renderConfig.dpr);var U,V;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var X=this.renderConfig.preserveAspectRatio.split(" "),Y=X[1]||"meet",K=X[0]||"xMidYMid",J=K.substr(0,4),xe=K.substr(4);U=I/B,V=this.transformCanvas.w/this.transformCanvas.h,V>U&&Y==="meet"||V<U&&Y==="slice"?(this.transformCanvas.sx=I/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=I/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=B/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=B/(this.transformCanvas.h/this.renderConfig.dpr)),J==="xMid"&&(V<U&&Y==="meet"||V>U&&Y==="slice")?this.transformCanvas.tx=(I-this.transformCanvas.w*(B/this.transformCanvas.h))/2*this.renderConfig.dpr:J==="xMax"&&(V<U&&Y==="meet"||V>U&&Y==="slice")?this.transformCanvas.tx=(I-this.transformCanvas.w*(B/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,xe==="YMid"&&(V>U&&Y==="meet"||V<U&&Y==="slice")?this.transformCanvas.ty=(B-this.transformCanvas.h*(I/this.transformCanvas.w))/2*this.renderConfig.dpr:xe==="YMax"&&(V>U&&Y==="meet"||V<U&&Y==="slice")?this.transformCanvas.ty=(B-this.transformCanvas.h*(I/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=I/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=B/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");var C,E=this.layers?this.layers.length:0;for(C=E-1;C>=0;C-=1)this.elements[C]&&this.elements[C].destroy&&this.elements[C].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(C,E){if(!(this.renderedFrame===C&&this.renderConfig.clearCanvas===!0&&!E||this.destroyed||C===-1)){this.renderedFrame=C,this.globalData.frameNum=C-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||E,this.globalData.projectInterface.currentFrame=C;var I,B=this.layers.length;for(this.completeLayers||this.checkLayers(C),I=B-1;I>=0;I-=1)(this.completeLayers||this.elements[I])&&this.elements[I].prepareFrame(C-this.layers[I].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),I=B-1;I>=0;I-=1)(this.completeLayers||this.elements[I])&&this.elements[I].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(C){var E=this.elements;if(!(E[C]||this.layers[C].ty===99)){var I=this.createItem(this.layers[C],this,this.globalData);E[C]=I,I.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var C=this.pendingElements.pop();C.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var C,E=15;for(C=0;C<E;C+=1){var I=new CanvasContext;this.stack[C]=I}this._length=E,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}CVContextData.prototype.duplicate=function(){var C=this._length*2,E=0;for(E=this._length;E<C;E+=1)this.stack[E]=new CanvasContext;this._length=C},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(C){this.cArrPos-=1;var E=this.stack[this.cArrPos],I=E.transform,B,U=this.cTr.props;for(B=0;B<16;B+=1)U[B]=I[B];if(C){this.nativeContext.restore();var V=this.stack[this.cArrPos+1];this.appliedFillStyle=V.fillStyle,this.appliedStrokeStyle=V.strokeStyle,this.appliedLineWidth=V.lineWidth,this.appliedLineCap=V.lineCap,this.appliedLineJoin=V.lineJoin,this.appliedMiterLimit=V.miterLimit}this.nativeContext.setTransform(I[0],I[1],I[4],I[5],I[12],I[13]),(C||E.opacity!==-1&&this.currentOpacity!==E.opacity)&&(this.nativeContext.globalAlpha=E.opacity,this.currentOpacity=E.opacity),this.currentFillStyle=E.fillStyle,this.currentStrokeStyle=E.strokeStyle,this.currentLineWidth=E.lineWidth,this.currentLineCap=E.lineCap,this.currentLineJoin=E.lineJoin,this.currentMiterLimit=E.miterLimit},CVContextData.prototype.save=function(C){C&&this.nativeContext.save();var E=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var I=this.stack[this.cArrPos],B;for(B=0;B<16;B+=1)I.transform[B]=E[B];this.cArrPos+=1;var U=this.stack[this.cArrPos];U.opacity=I.opacity,U.fillStyle=I.fillStyle,U.strokeStyle=I.strokeStyle,U.lineWidth=I.lineWidth,U.lineCap=I.lineCap,U.lineJoin=I.lineJoin,U.miterLimit=I.miterLimit},CVContextData.prototype.setOpacity=function(C){this.stack[this.cArrPos].opacity=C},CVContextData.prototype.setContext=function(C){this.nativeContext=C},CVContextData.prototype.fillStyle=function(C){this.stack[this.cArrPos].fillStyle!==C&&(this.currentFillStyle=C,this.stack[this.cArrPos].fillStyle=C)},CVContextData.prototype.strokeStyle=function(C){this.stack[this.cArrPos].strokeStyle!==C&&(this.currentStrokeStyle=C,this.stack[this.cArrPos].strokeStyle=C)},CVContextData.prototype.lineWidth=function(C){this.stack[this.cArrPos].lineWidth!==C&&(this.currentLineWidth=C,this.stack[this.cArrPos].lineWidth=C)},CVContextData.prototype.lineCap=function(C){this.stack[this.cArrPos].lineCap!==C&&(this.currentLineCap=C,this.stack[this.cArrPos].lineCap=C)},CVContextData.prototype.lineJoin=function(C){this.stack[this.cArrPos].lineJoin!==C&&(this.currentLineJoin=C,this.stack[this.cArrPos].lineJoin=C)},CVContextData.prototype.miterLimit=function(C){this.stack[this.cArrPos].miterLimit!==C&&(this.currentMiterLimit=C,this.stack[this.cArrPos].miterLimit=C)},CVContextData.prototype.transform=function(C){this.transformMat.cloneFromProps(C);var E=this.cTr;this.transformMat.multiply(E),E.cloneFromProps(this.transformMat.props);var I=E.props;this.nativeContext.setTransform(I[0],I[1],I[4],I[5],I[12],I[13])},CVContextData.prototype.opacity=function(C){var E=this.stack[this.cArrPos].opacity;E*=C<0?0:C,this.stack[this.cArrPos].opacity!==E&&(this.currentOpacity!==C&&(this.nativeContext.globalAlpha=C,this.currentOpacity=C),this.stack[this.cArrPos].opacity=E)},CVContextData.prototype.fill=function(C){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(C)},CVContextData.prototype.fillRect=function(C,E,I,B){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(C,E,I,B)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(C,E,I){this.completeLayers=!1,this.layers=C.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(C,E,I),this.tm=C.tm?PropertyFactory.getProp(this,C.tm,0,E.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var C=this.canvasContext;C.beginPath(),C.moveTo(0,0),C.lineTo(this.data.w,0),C.lineTo(this.data.w,this.data.h),C.lineTo(0,this.data.h),C.lineTo(0,0),C.clip();var E,I=this.layers.length;for(E=I-1;E>=0;E-=1)(this.completeLayers||this.elements[E])&&this.elements[E].renderFrame()},CVCompElement.prototype.destroy=function(){var C,E=this.layers.length;for(C=E-1;C>=0;C-=1)this.elements[C]&&this.elements[C].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(C){return new CVCompElement(C,this.globalData,this)};function CanvasRenderer(C,E){this.animationItem=C,this.renderConfig={clearCanvas:E&&E.clearCanvas!==void 0?E.clearCanvas:!0,context:E&&E.context||null,progressiveLoad:E&&E.progressiveLoad||!1,preserveAspectRatio:E&&E.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:E&&E.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:E&&E.contentVisibility||"visible",className:E&&E.className||"",id:E&&E.id||"",runExpressions:!E||E.runExpressions===void 0||E.runExpressions},this.renderConfig.dpr=E&&E.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=E&&E.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(C){return new CVCompElement(C,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var E=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var I=this.finalTransform.mat.toCSS();E.transform=I,E.webkitTransform=I}this.finalTransform._opMdf&&(E.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(C,E,I){this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var C;this.data.hasMask?(C=createNS("rect"),C.setAttribute("width",this.data.sw),C.setAttribute("height",this.data.sh),C.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(C=createTag("div"),C.style.width=this.data.sw+"px",C.style.height=this.data.sh+"px",C.style.backgroundColor=this.data.sc),this.layerElement.appendChild(C)};function HShapeElement(C,E,I){this.shapes=[],this.shapesData=C.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(C,E,I),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var C;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),C=this.svgElement;else{C=createNS("svg");var E=this.comp.data?this.comp.data:this.globalData.compSize;C.setAttribute("width",E.w),C.setAttribute("height",E.h),C.appendChild(this.shapesContainer),this.layerElement.appendChild(C)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=C},HShapeElement.prototype.getTransformedPoint=function(C,E){var I,B=C.length;for(I=0;I<B;I+=1)E=C[I].mProps.v.applyToPointArray(E[0],E[1],0);return E},HShapeElement.prototype.calculateShapeBoundingBox=function(C,E){var I=C.sh.v,B=C.transformers,U,V=I._length,X,Y,K,J;if(!(V<=1)){for(U=0;U<V-1;U+=1)X=this.getTransformedPoint(B,I.v[U]),Y=this.getTransformedPoint(B,I.o[U]),K=this.getTransformedPoint(B,I.i[U+1]),J=this.getTransformedPoint(B,I.v[U+1]),this.checkBounds(X,Y,K,J,E);I.c&&(X=this.getTransformedPoint(B,I.v[U]),Y=this.getTransformedPoint(B,I.o[U]),K=this.getTransformedPoint(B,I.i[0]),J=this.getTransformedPoint(B,I.v[0]),this.checkBounds(X,Y,K,J,E))}},HShapeElement.prototype.checkBounds=function(C,E,I,B,U){this.getBoundsOfCurve(C,E,I,B);var V=this.shapeBoundingBox;U.x=bmMin(V.left,U.x),U.xMax=bmMax(V.right,U.xMax),U.y=bmMin(V.top,U.y),U.yMax=bmMax(V.bottom,U.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(C,E,I,B){for(var U=[[C[0],B[0]],[C[1],B[1]]],V,X,Y,K,J,xe,Z,_e=0;_e<2;++_e)X=6*C[_e]-12*E[_e]+6*I[_e],V=-3*C[_e]+9*E[_e]-9*I[_e]+3*B[_e],Y=3*E[_e]-3*C[_e],X|=0,V|=0,Y|=0,V===0&&X===0||(V===0?(K=-Y/X,K>0&&K<1&&U[_e].push(this.calculateF(K,C,E,I,B,_e))):(J=X*X-4*Y*V,J>=0&&(xe=(-X+bmSqrt(J))/(2*V),xe>0&&xe<1&&U[_e].push(this.calculateF(xe,C,E,I,B,_e)),Z=(-X-bmSqrt(J))/(2*V),Z>0&&Z<1&&U[_e].push(this.calculateF(Z,C,E,I,B,_e)))));this.shapeBoundingBox.left=bmMin.apply(null,U[0]),this.shapeBoundingBox.top=bmMin.apply(null,U[1]),this.shapeBoundingBox.right=bmMax.apply(null,U[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,U[1])},HShapeElement.prototype.calculateF=function(C,E,I,B,U,V){return bmPow(1-C,3)*E[V]+3*bmPow(1-C,2)*C*I[V]+3*(1-C)*bmPow(C,2)*B[V]+bmPow(C,3)*U[V]},HShapeElement.prototype.calculateBoundingBox=function(C,E){var I,B=C.length;for(I=0;I<B;I+=1)C[I]&&C[I].sh?this.calculateShapeBoundingBox(C[I],E):C[I]&&C[I].it?this.calculateBoundingBox(C[I].it,E):C[I]&&C[I].style&&C[I].w&&this.expandStrokeBoundingBox(C[I].w,E)},HShapeElement.prototype.expandStrokeBoundingBox=function(C,E){var I=0;if(C.keyframes){for(var B=0;B<C.keyframes.length;B+=1){var U=C.keyframes[B].s;U>I&&(I=U)}I*=C.mult}else I=C.v*C.mult;E.x-=I,E.xMax+=I,E.y-=I,E.yMax+=I},HShapeElement.prototype.currentBoxContains=function(C){return this.currentBBox.x<=C.x&&this.currentBBox.y<=C.y&&this.currentBBox.width+this.currentBBox.x>=C.x+C.width&&this.currentBBox.height+this.currentBBox.y>=C.y+C.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var C=this.tempBoundingBox,E=999999;if(C.x=E,C.xMax=-E,C.y=E,C.yMax=-E,this.calculateBoundingBox(this.itemsData,C),C.width=C.xMax<C.x?0:C.xMax-C.x,C.height=C.yMax<C.y?0:C.yMax-C.y,this.currentBoxContains(C))return;var I=!1;if(this.currentBBox.w!==C.width&&(this.currentBBox.w=C.width,this.shapeCont.setAttribute("width",C.width),I=!0),this.currentBBox.h!==C.height&&(this.currentBBox.h=C.height,this.shapeCont.setAttribute("height",C.height),I=!0),I||this.currentBBox.x!==C.x||this.currentBBox.y!==C.y){this.currentBBox.w=C.width,this.currentBBox.h=C.height,this.currentBBox.x=C.x,this.currentBBox.y=C.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var B=this.shapeCont.style,U="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";B.transform=U,B.webkitTransform=U}}};function HTextElement(C,E,I){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var C=createNS("g");this.maskedElement.appendChild(C),this.innerElem=C}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var C=this.textProperty.currentData;this.renderedLetters=createSizedArray(C.l?C.l.length:0);var E=this.innerElem.style,I=C.fc?this.buildColor(C.fc):"rgba(0,0,0,0)";E.fill=I,E.color=I,C.sc&&(E.stroke=this.buildColor(C.sc),E.strokeWidth=C.sw+"px");var B=this.globalData.fontManager.getFontByName(C.f);if(!this.globalData.fontManager.chars)if(E.fontSize=C.finalSize+"px",E.lineHeight=C.finalSize+"px",B.fClass)this.innerElem.className=B.fClass;else{E.fontFamily=B.fFamily;var U=C.fWeight,V=C.fStyle;E.fontStyle=V,E.fontWeight=U}var X,Y,K=C.l;Y=K.length;var J,xe,Z,_e=this.mHelper,Se,Ee="",Ae=0;for(X=0;X<Y;X+=1){if(this.globalData.fontManager.chars?(this.textPaths[Ae]?J=this.textPaths[Ae]:(J=createNS("path"),J.setAttribute("stroke-linecap",lineCapEnum[1]),J.setAttribute("stroke-linejoin",lineJoinEnum[2]),J.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[Ae]?(xe=this.textSpans[Ae],Z=xe.children[0]):(xe=createTag("div"),xe.style.lineHeight=0,Z=createNS("svg"),Z.appendChild(J),styleDiv(xe)))):this.isMasked?J=this.textPaths[Ae]?this.textPaths[Ae]:createNS("text"):this.textSpans[Ae]?(xe=this.textSpans[Ae],J=this.textPaths[Ae]):(xe=createTag("span"),styleDiv(xe),J=createTag("span"),styleDiv(J),xe.appendChild(J)),this.globalData.fontManager.chars){var Re=this.globalData.fontManager.getCharData(C.finalText[X],B.fStyle,this.globalData.fontManager.getFontByName(C.f).fFamily),Te;if(Re?Te=Re.data:Te=null,_e.reset(),Te&&Te.shapes&&Te.shapes.length&&(Se=Te.shapes[0].it,_e.scale(C.finalSize/100,C.finalSize/100),Ee=this.createPathShape(_e,Se),J.setAttribute("d",Ee)),this.isMasked)this.innerElem.appendChild(J);else{if(this.innerElem.appendChild(xe),Te&&Te.shapes){document.body.appendChild(Z);var we=Z.getBBox();Z.setAttribute("width",we.width+2),Z.setAttribute("height",we.height+2),Z.setAttribute("viewBox",we.x-1+" "+(we.y-1)+" "+(we.width+2)+" "+(we.height+2));var Pe=Z.style,Ie="translate("+(we.x-1)+"px,"+(we.y-1)+"px)";Pe.transform=Ie,Pe.webkitTransform=Ie,K[X].yOffset=we.y-1}else Z.setAttribute("width",1),Z.setAttribute("height",1);xe.appendChild(Z)}}else if(J.textContent=K[X].val,J.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(J);else{this.innerElem.appendChild(xe);var Me=J.style,Oe="translate3d(0,"+-C.finalSize/1.2+"px,0)";Me.transform=Oe,Me.webkitTransform=Oe}this.isMasked?this.textSpans[Ae]=J:this.textSpans[Ae]=xe,this.textSpans[Ae].style.display="block",this.textPaths[Ae]=J,Ae+=1}for(;Ae<this.textSpans.length;)this.textSpans[Ae].style.display="none",Ae+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var C;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),C=this.svgElement.style;var E="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";C.transform=E,C.webkitTransform=E}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!(!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)){var I,B,U=0,V=this.textAnimator.renderedLetters,X=this.textProperty.currentData.l;B=X.length;var Y,K,J;for(I=0;I<B;I+=1)X[I].n?U+=1:(K=this.textSpans[I],J=this.textPaths[I],Y=V[U],U+=1,Y._mdf.m&&(this.isMasked?K.setAttribute("transform",Y.m):(K.style.webkitTransform=Y.m,K.style.transform=Y.m)),K.style.opacity=Y.o,Y.sw&&Y._mdf.sw&&J.setAttribute("stroke-width",Y.sw),Y.sc&&Y._mdf.sc&&J.setAttribute("stroke",Y.sc),Y.fc&&Y._mdf.fc&&(J.setAttribute("fill",Y.fc),J.style.color=Y.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var xe=this.innerElem.getBBox();this.currentBBox.w!==xe.width&&(this.currentBBox.w=xe.width,this.svgElement.setAttribute("width",xe.width)),this.currentBBox.h!==xe.height&&(this.currentBBox.h=xe.height,this.svgElement.setAttribute("height",xe.height));var Z=1;if(this.currentBBox.w!==xe.width+Z*2||this.currentBBox.h!==xe.height+Z*2||this.currentBBox.x!==xe.x-Z||this.currentBBox.y!==xe.y-Z){this.currentBBox.w=xe.width+Z*2,this.currentBBox.h=xe.height+Z*2,this.currentBBox.x=xe.x-Z,this.currentBBox.y=xe.y-Z,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),C=this.svgElement.style;var _e="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";C.transform=_e,C.webkitTransform=_e}}}};function HCameraElement(C,E,I){this.initFrame(),this.initBaseData(C,E,I),this.initHierarchy();var B=PropertyFactory.getProp;if(this.pe=B(this,C.pe,0,0,this),C.ks.p.s?(this.px=B(this,C.ks.p.x,1,0,this),this.py=B(this,C.ks.p.y,1,0,this),this.pz=B(this,C.ks.p.z,1,0,this)):this.p=B(this,C.ks.p,1,0,this),C.ks.a&&(this.a=B(this,C.ks.a,1,0,this)),C.ks.or.k.length&&C.ks.or.k[0].to){var U,V=C.ks.or.k.length;for(U=0;U<V;U+=1)C.ks.or.k[U].to=null,C.ks.or.k[U].ti=null}this.or=B(this,C.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=B(this,C.ks.rx,0,degToRads,this),this.ry=B(this,C.ks.ry,0,degToRads,this),this.rz=B(this,C.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var C,E=this.comp.threeDElements.length,I,B,U;for(C=0;C<E;C+=1)if(I=this.comp.threeDElements[C],I.type==="3d"){B=I.perspectiveElem.style,U=I.container.style;var V=this.pe.v+"px",X="0px 0px 0px",Y="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";B.perspective=V,B.webkitPerspective=V,U.transformOrigin=X,U.mozTransformOrigin=X,U.webkitTransformOrigin=X,B.transform=Y,B.webkitTransform=Y}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var C=this._isFirstFrame,E,I;if(this.hierarchy)for(I=this.hierarchy.length,E=0;E<I;E+=1)C=this.hierarchy[E].finalTransform.mProp._mdf||C;if(C||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(I=this.hierarchy.length-1,E=I;E>=0;E-=1){var B=this.hierarchy[E].finalTransform.mProp;this.mat.translate(-B.p.v[0],-B.p.v[1],B.p.v[2]),this.mat.rotateX(-B.or.v[0]).rotateY(-B.or.v[1]).rotateZ(B.or.v[2]),this.mat.rotateX(-B.rx.v).rotateY(-B.ry.v).rotateZ(B.rz.v),this.mat.scale(1/B.s.v[0],1/B.s.v[1],1/B.s.v[2]),this.mat.translate(B.a.v[0],B.a.v[1],B.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var U;this.p?U=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:U=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var V=Math.sqrt(Math.pow(U[0],2)+Math.pow(U[1],2)+Math.pow(U[2],2)),X=[U[0]/V,U[1]/V,U[2]/V],Y=Math.sqrt(X[2]*X[2]+X[0]*X[0]),K=Math.atan2(X[1],Y),J=Math.atan2(X[0],-X[2]);this.mat.rotateY(J).rotateX(-K)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var xe=!this._prevMat.equals(this.mat);if((xe||this.pe._mdf)&&this.comp.threeDElements){I=this.comp.threeDElements.length;var Z,_e,Se;for(E=0;E<I;E+=1)if(Z=this.comp.threeDElements[E],Z.type==="3d"){if(xe){var Ee=this.mat.toCSS();Se=Z.container.style,Se.transform=Ee,Se.webkitTransform=Ee}this.pe._mdf&&(_e=Z.perspectiveElem.style,_e.perspective=this.pe.v+"px",_e.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(C){this.prepareProperties(C,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(C,E,I){this.assetData=E.getAssetData(C.refId),this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var C=this.globalData.getAssetsPath(this.assetData),E=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",C),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(E),E.crossOrigin="anonymous",E.src=C,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(C,E){this.animationItem=C,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:E&&E.className||"",imagePreserveAspectRatio:E&&E.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(E&&E.hideOnTransparent===!1),filterSize:{width:E&&E.filterSize&&E.filterSize.width||"400%",height:E&&E.filterSize&&E.filterSize.height||"400%",x:E&&E.filterSize&&E.filterSize.x||"-100%",y:E&&E.filterSize&&E.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var C=this.pendingElements.pop();C.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(C,E){var I=C.getBaseElement();if(I){var B=this.layers[E];if(!B.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(I,E);else{for(var U=0,V,X,Y;U<E;)this.elements[U]&&this.elements[U]!==!0&&this.elements[U].getBaseElement&&(X=this.elements[U],Y=this.layers[U].ddd?this.getThreeDContainerByPos(U):X.getBaseElement(),V=Y||V),U+=1;V?(!B.ddd||!this.supports3d)&&this.layerElement.insertBefore(I,V):(!B.ddd||!this.supports3d)&&this.layerElement.appendChild(I)}else this.addTo3dContainer(I,E)}},HybridRendererBase.prototype.createShape=function(C){return this.supports3d?new HShapeElement(C,this.globalData,this):new SVGShapeElement(C,this.globalData,this)},HybridRendererBase.prototype.createText=function(C){return this.supports3d?new HTextElement(C,this.globalData,this):new SVGTextLottieElement(C,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(C){return this.camera=new HCameraElement(C,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(C){return this.supports3d?new HImageElement(C,this.globalData,this):new IImageElement(C,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(C){return this.supports3d?new HSolidElement(C,this.globalData,this):new ISolidElement(C,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(C){for(var E=0,I=this.threeDElements.length;E<I;){if(this.threeDElements[E].startPos<=C&&this.threeDElements[E].endPos>=C)return this.threeDElements[E].perspectiveElem;E+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(C,E){var I=createTag("div"),B,U;styleDiv(I);var V=createTag("div");if(styleDiv(V),E==="3d"){B=I.style,B.width=this.globalData.compSize.w+"px",B.height=this.globalData.compSize.h+"px";var X="50% 50%";B.webkitTransformOrigin=X,B.mozTransformOrigin=X,B.transformOrigin=X,U=V.style;var Y="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";U.transform=Y,U.webkitTransform=Y}I.appendChild(V);var K={container:V,perspectiveElem:I,startPos:C,endPos:C,type:E};return this.threeDElements.push(K),K},HybridRendererBase.prototype.build3dContainers=function(){var C,E=this.layers.length,I,B="";for(C=0;C<E;C+=1)this.layers[C].ddd&&this.layers[C].ty!==3?(B!=="3d"&&(B="3d",I=this.createThreeDContainer(C,"3d")),I.endPos=Math.max(I.endPos,C)):(B!=="2d"&&(B="2d",I=this.createThreeDContainer(C,"2d")),I.endPos=Math.max(I.endPos,C));for(E=this.threeDElements.length,C=E-1;C>=0;C-=1)this.resizerElem.appendChild(this.threeDElements[C].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(C,E){for(var I=0,B=this.threeDElements.length;I<B;){if(E<=this.threeDElements[I].endPos){for(var U=this.threeDElements[I].startPos,V;U<E;)this.elements[U]&&this.elements[U].getBaseElement&&(V=this.elements[U].getBaseElement()),U+=1;V?this.threeDElements[I].container.insertBefore(C,V):this.threeDElements[I].container.appendChild(C);break}I+=1}},HybridRendererBase.prototype.configAnimation=function(C){var E=createTag("div"),I=this.animationItem.wrapper,B=E.style;B.width=C.w+"px",B.height=C.h+"px",this.resizerElem=E,styleDiv(E),B.transformStyle="flat",B.mozTransformStyle="flat",B.webkitTransformStyle="flat",this.renderConfig.className&&E.setAttribute("class",this.renderConfig.className),I.appendChild(E),B.overflow="hidden";var U=createNS("svg");U.setAttribute("width","1"),U.setAttribute("height","1"),styleDiv(U),this.resizerElem.appendChild(U);var V=createNS("defs");U.appendChild(V),this.data=C,this.setupGlobalData(C,U),this.globalData.defs=V,this.layers=C.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var C,E=this.layers?this.layers.length:0;for(C=0;C<E;C+=1)this.elements[C]&&this.elements[C].destroy&&this.elements[C].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var C=this.animationItem.wrapper.offsetWidth,E=this.animationItem.wrapper.offsetHeight,I=C/E,B=this.globalData.compSize.w/this.globalData.compSize.h,U,V,X,Y;B>I?(U=C/this.globalData.compSize.w,V=C/this.globalData.compSize.w,X=0,Y=(E-this.globalData.compSize.h*(C/this.globalData.compSize.w))/2):(U=E/this.globalData.compSize.h,V=E/this.globalData.compSize.h,X=(C-this.globalData.compSize.w*(E/this.globalData.compSize.h))/2,Y=0);var K=this.resizerElem.style;K.webkitTransform="matrix3d("+U+",0,0,0,0,"+V+",0,0,0,0,1,0,"+X+","+Y+",0,1)",K.transform=K.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var C=this.globalData.compSize.w,E=this.globalData.compSize.h,I,B=this.threeDElements.length;for(I=0;I<B;I+=1){var U=this.threeDElements[I].perspectiveElem.style;U.webkitPerspective=Math.sqrt(Math.pow(C,2)+Math.pow(E,2))+"px",U.perspective=U.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(C){var E,I=C.length,B=createTag("div");for(E=0;E<I;E+=1)if(C[E].xt){var U=this.createComp(C[E],B,this.globalData.comp,null);U.initExpressions(),this.globalData.projectInterface.registerComposition(U)}};function HCompElement(C,E,I){this.layers=C.layers,this.supports3d=!C.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(C,E,I),this.tm=C.tm?PropertyFactory.getProp(this,C.tm,0,E.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(C,E){for(var I=0,B;I<E;)this.elements[I]&&this.elements[I].getBaseElement&&(B=this.elements[I].getBaseElement()),I+=1;B?this.layerElement.insertBefore(C,B):this.layerElement.appendChild(C)},HCompElement.prototype.createComp=function(C){return this.supports3d?new HCompElement(C,this.globalData,this):new SVGCompElement(C,this.globalData,this)};function HybridRenderer(C,E){this.animationItem=C,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:E&&E.className||"",imagePreserveAspectRatio:E&&E.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(E&&E.hideOnTransparent===!1),filterSize:{width:E&&E.filterSize&&E.filterSize.width||"400%",height:E&&E.filterSize&&E.filterSize.height||"400%",x:E&&E.filterSize&&E.filterSize.x||"-100%",y:E&&E.filterSize&&E.filterSize.y||"-100%"},runExpressions:!E||E.runExpressions===void 0||E.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(C){return this.supports3d?new HCompElement(C,this.globalData,this):new SVGCompElement(C,this.globalData,this)};var CompExpressionInterface=function(){return function(C){function E(I){for(var B=0,U=C.layers.length;B<U;){if(C.layers[B].nm===I||C.layers[B].ind===I)return C.elements[B].layerInterface;B+=1}return null}return Object.defineProperty(E,"_name",{value:C.data.nm}),E.layer=E,E.pixelAspect=1,E.height=C.data.h||C.globalData.compSize.h,E.width=C.data.w||C.globalData.compSize.w,E.pixelAspect=1,E.frameDuration=1/C.globalData.frameRate,E.displayStartTime=0,E.numLayers=C.layers.length,E}}();function _typeof$2(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function(I){return typeof I}:_typeof$2=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$2(C)}function seedRandom(C,E){var I=this,B=256,U=6,V=52,X="random",Y=E.pow(B,U),K=E.pow(2,V),J=K*2,xe=B-1,Z;function _e(Pe,Ie,Me){var Oe=[];Ie=Ie===!0?{entropy:!0}:Ie||{};var Le=Re(Ae(Ie.entropy?[Pe,we(C)]:Pe===null?Te():Pe,3),Oe),Ne=new Se(Oe),Ve=function(){for(var Ue=Ne.g(U),We=Y,ze=0;Ue<K;)Ue=(Ue+ze)*B,We*=B,ze=Ne.g(1);for(;Ue>=J;)Ue/=2,We/=2,ze>>>=1;return(Ue+ze)/We};return Ve.int32=function(){return Ne.g(4)|0},Ve.quick=function(){return Ne.g(4)/4294967296},Ve.double=Ve,Re(we(Ne.S),C),(Ie.pass||Me||function(Xe,Ue,We,ze){return ze&&(ze.S&&Ee(ze,Ne),Xe.state=function(){return Ee(Ne,{})}),We?(E[X]=Xe,Ue):Xe})(Ve,Le,"global"in Ie?Ie.global:this==E,Ie.state)}E["seed"+X]=_e;function Se(Pe){var Ie,Me=Pe.length,Oe=this,Le=0,Ne=Oe.i=Oe.j=0,Ve=Oe.S=[];for(Me||(Pe=[Me++]);Le<B;)Ve[Le]=Le++;for(Le=0;Le<B;Le++)Ve[Le]=Ve[Ne=xe&Ne+Pe[Le%Me]+(Ie=Ve[Le])],Ve[Ne]=Ie;Oe.g=function(Xe){for(var Ue,We=0,ze=Oe.i,He=Oe.j,je=Oe.S;Xe--;)Ue=je[ze=xe&ze+1],We=We*B+je[xe&(je[ze]=je[He=xe&He+Ue])+(je[He]=Ue)];return Oe.i=ze,Oe.j=He,We}}function Ee(Pe,Ie){return Ie.i=Pe.i,Ie.j=Pe.j,Ie.S=Pe.S.slice(),Ie}function Ae(Pe,Ie){var Me=[],Oe=_typeof$2(Pe),Le;if(Ie&&Oe=="object")for(Le in Pe)try{Me.push(Ae(Pe[Le],Ie-1))}catch{}return Me.length?Me:Oe=="string"?Pe:Pe+"\0"}function Re(Pe,Ie){for(var Me=Pe+"",Oe,Le=0;Le<Me.length;)Ie[xe&Le]=xe&(Oe^=Ie[xe&Le]*19)+Me.charCodeAt(Le++);return we(Ie)}function Te(){try{var Pe=new Uint8Array(B);return(I.crypto||I.msCrypto).getRandomValues(Pe),we(Pe)}catch{var Ie=I.navigator,Me=Ie&&Ie.plugins;return[+new Date,I,Me,I.screen,we(C)]}}function we(Pe){return String.fromCharCode.apply(0,Pe)}Re(E.random(),C)}function initialize$2(C){seedRandom([],C)}var propTypes={SHAPE:"shape"};function _typeof$1(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function(I){return typeof I}:_typeof$1=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$1(C)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(C){return C.constructor===Array||C.constructor===Float32Array}function isNumerable(C,E){return C==="number"||E instanceof Number||C==="boolean"||C==="string"}function $bm_neg(C){var E=_typeof$1(C);if(E==="number"||C instanceof Number||E==="boolean")return-C;if($bm_isInstanceOfArray(C)){var I,B=C.length,U=[];for(I=0;I<B;I+=1)U[I]=-C[I];return U}return C.propType?C.v:-C}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(C,E){var I=_typeof$1(C),B=_typeof$1(E);if(isNumerable(I,C)&&isNumerable(B,E)||I==="string"||B==="string")return C+E;if($bm_isInstanceOfArray(C)&&isNumerable(B,E))return C=C.slice(0),C[0]+=E,C;if(isNumerable(I,C)&&$bm_isInstanceOfArray(E))return E=E.slice(0),E[0]=C+E[0],E;if($bm_isInstanceOfArray(C)&&$bm_isInstanceOfArray(E)){for(var U=0,V=C.length,X=E.length,Y=[];U<V||U<X;)(typeof C[U]=="number"||C[U]instanceof Number)&&(typeof E[U]=="number"||E[U]instanceof Number)?Y[U]=C[U]+E[U]:Y[U]=E[U]===void 0?C[U]:C[U]||E[U],U+=1;return Y}return 0}var add=sum;function sub(C,E){var I=_typeof$1(C),B=_typeof$1(E);if(isNumerable(I,C)&&isNumerable(B,E))return I==="string"&&(C=parseInt(C,10)),B==="string"&&(E=parseInt(E,10)),C-E;if($bm_isInstanceOfArray(C)&&isNumerable(B,E))return C=C.slice(0),C[0]-=E,C;if(isNumerable(I,C)&&$bm_isInstanceOfArray(E))return E=E.slice(0),E[0]=C-E[0],E;if($bm_isInstanceOfArray(C)&&$bm_isInstanceOfArray(E)){for(var U=0,V=C.length,X=E.length,Y=[];U<V||U<X;)(typeof C[U]=="number"||C[U]instanceof Number)&&(typeof E[U]=="number"||E[U]instanceof Number)?Y[U]=C[U]-E[U]:Y[U]=E[U]===void 0?C[U]:C[U]||E[U],U+=1;return Y}return 0}function mul(C,E){var I=_typeof$1(C),B=_typeof$1(E),U;if(isNumerable(I,C)&&isNumerable(B,E))return C*E;var V,X;if($bm_isInstanceOfArray(C)&&isNumerable(B,E)){for(X=C.length,U=createTypedArray("float32",X),V=0;V<X;V+=1)U[V]=C[V]*E;return U}if(isNumerable(I,C)&&$bm_isInstanceOfArray(E)){for(X=E.length,U=createTypedArray("float32",X),V=0;V<X;V+=1)U[V]=C*E[V];return U}return 0}function div(C,E){var I=_typeof$1(C),B=_typeof$1(E),U;if(isNumerable(I,C)&&isNumerable(B,E))return C/E;var V,X;if($bm_isInstanceOfArray(C)&&isNumerable(B,E)){for(X=C.length,U=createTypedArray("float32",X),V=0;V<X;V+=1)U[V]=C[V]/E;return U}if(isNumerable(I,C)&&$bm_isInstanceOfArray(E)){for(X=E.length,U=createTypedArray("float32",X),V=0;V<X;V+=1)U[V]=C/E[V];return U}return 0}function mod(C,E){return typeof C=="string"&&(C=parseInt(C,10)),typeof E=="string"&&(E=parseInt(E,10)),C%E}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(C,E,I){if(E>I){var B=I;I=E,E=B}return Math.min(Math.max(C,E),I)}function radiansToDegrees(C){return C/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(C){return C*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(C,E){if(typeof C=="number"||C instanceof Number)return E=E||0,Math.abs(C-E);E||(E=helperLengthArray);var I,B=Math.min(C.length,E.length),U=0;for(I=0;I<B;I+=1)U+=Math.pow(E[I]-C[I],2);return Math.sqrt(U)}function normalize(C){return div(C,length(C))}function rgbToHsl(C){var E=C[0],I=C[1],B=C[2],U=Math.max(E,I,B),V=Math.min(E,I,B),X,Y,K=(U+V)/2;if(U===V)X=0,Y=0;else{var J=U-V;switch(Y=K>.5?J/(2-U-V):J/(U+V),U){case E:X=(I-B)/J+(I<B?6:0);break;case I:X=(B-E)/J+2;break;case B:X=(E-I)/J+4;break}X/=6}return[X,Y,K,C[3]]}function hue2rgb(C,E,I){return I<0&&(I+=1),I>1&&(I-=1),I<1/6?C+(E-C)*6*I:I<1/2?E:I<2/3?C+(E-C)*(2/3-I)*6:C}function hslToRgb(C){var E=C[0],I=C[1],B=C[2],U,V,X;if(I===0)U=B,X=B,V=B;else{var Y=B<.5?B*(1+I):B+I-B*I,K=2*B-Y;U=hue2rgb(K,Y,E+1/3),V=hue2rgb(K,Y,E),X=hue2rgb(K,Y,E-1/3)}return[U,V,X,C[3]]}function linear(C,E,I,B,U){if((B===void 0||U===void 0)&&(B=E,U=I,E=0,I=1),I<E){var V=I;I=E,E=V}if(C<=E)return B;if(C>=I)return U;var X=I===E?0:(C-E)/(I-E);if(!B.length)return B+(U-B)*X;var Y,K=B.length,J=createTypedArray("float32",K);for(Y=0;Y<K;Y+=1)J[Y]=B[Y]+(U[Y]-B[Y])*X;return J}function random(C,E){if(E===void 0&&(C===void 0?(C=0,E=1):(E=C,C=void 0)),E.length){var I,B=E.length;C||(C=createTypedArray("float32",B));var U=createTypedArray("float32",B),V=BMMath.random();for(I=0;I<B;I+=1)U[I]=C[I]+V*(E[I]-C[I]);return U}C===void 0&&(C=0);var X=BMMath.random();return C+X*(E-C)}function createPath(C,E,I,B){var U,V=C.length,X=shapePool.newElement();X.setPathData(!!B,V);var Y=[0,0],K,J;for(U=0;U<V;U+=1)K=E&&E[U]?E[U]:Y,J=I&&I[U]?I[U]:Y,X.setTripleAt(C[U][0],C[U][1],J[0]+C[U][0],J[1]+C[U][1],K[0]+C[U][0],K[1]+C[U][1],U,!0);return X}function initiateExpression(elem,data,property){function noOp(C){return C}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=(function C(E,I){var B,U,V=this.pv.length?this.pv.length:1,X=createTypedArray("float32",V);E=5;var Y=Math.floor(time*E);for(B=0,U=0;B<Y;){for(U=0;U<V;U+=1)X[U]+=-I+I*2*BMMath.random();B+=1}var K=time*E,J=K-Math.floor(K),xe=createTypedArray("float32",V);if(V>1){for(U=0;U<V;U+=1)xe[U]=this.pv[U]+X[U]+(-I+I*2*BMMath.random())*J;return xe}return this.pv+X[0]+(-I+I*2*BMMath.random())*J}).bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(C,E){return loopIn(C,E,!0)}function loopOutDuration(C,E){return loopOut(C,E,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(C,E){var I=[E[0]-C[0],E[1]-C[1],E[2]-C[2]],B=Math.atan2(I[0],Math.sqrt(I[1]*I[1]+I[2]*I[2]))/degToRads,U=-Math.atan2(I[1],I[2])/degToRads;return[U,B,0]}function easeOut(C,E,I,B,U){return applyEase(easeOutBez,C,E,I,B,U)}function easeIn(C,E,I,B,U){return applyEase(easeInBez,C,E,I,B,U)}function ease(C,E,I,B,U){return applyEase(easeInOutBez,C,E,I,B,U)}function applyEase(C,E,I,B,U,V){U===void 0?(U=I,V=B):E=(E-I)/(B-I),E>1?E=1:E<0&&(E=0);var X=C(E);if($bm_isInstanceOfArray(U)){var Y,K=U.length,J=createTypedArray("float32",K);for(Y=0;Y<K;Y+=1)J[Y]=(V[Y]-U[Y])*X+U[Y];return J}return(V-U)*X+U}function nearestKey(C){var E,I=data.k.length,B,U;if(!data.k.length||typeof data.k[0]=="number")B=0,U=0;else if(B=-1,C*=elem.comp.globalData.frameRate,C<data.k[0].t)B=1,U=data.k[0].t;else{for(E=0;E<I-1;E+=1)if(C===data.k[E].t){B=E+1,U=data.k[E].t;break}else if(C>data.k[E].t&&C<data.k[E+1].t){C-data.k[E].t>data.k[E+1].t-C?(B=E+2,U=data.k[E+1].t):(B=E+1,U=data.k[E].t);break}B===-1&&(B=E+1,U=data.k[E].t)}var V={};return V.index=B,V.time=U/elem.comp.globalData.frameRate,V}function key(C){var E,I,B;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+C);C-=1,E={time:data.k[C].t/elem.comp.globalData.frameRate,value:[]};var U=Object.prototype.hasOwnProperty.call(data.k[C],"s")?data.k[C].s:data.k[C-1].e;for(B=U.length,I=0;I<B;I+=1)E[I]=U[I],E.value[I]=U[I];return E}function framesToTime(C,E){return E||(E=elem.comp.globalData.frameRate),C/E}function timeToFrames(C,E){return!C&&C!==0&&(C=time),E||(E=elem.comp.globalData.frameRate),C*E}function seedRandom(C){BMMath.seedrandom(randSeed+C)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(C,E){return typeof value=="string"?E===void 0?value.substring(C):value.substring(C,E):""}function substr(C,E){return typeof value=="string"?E===void 0?value.substr(C):value.substr(C,E):""}function posterizeTime(C){time=C===0?0:Math.floor(time*C)/C,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(C){return value=C,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var C={};C.initExpressions=E,C.resetFrame=ExpressionManager.resetFrame;function E(I){var B=0,U=[];function V(){B+=1}function X(){B-=1,B===0&&K()}function Y(J){U.indexOf(J)===-1&&U.push(J)}function K(){var J,xe=U.length;for(J=0;J<xe;J+=1)U[J].release();U.length=0}I.renderer.compInterface=CompExpressionInterface(I.renderer),I.renderer.globalData.projectInterface.registerComposition(I.renderer),I.renderer.globalData.pushExpression=V,I.renderer.globalData.popExpression=X,I.renderer.globalData.registerExpressionProperty=Y}return C}(),MaskManagerInterface=function(){function C(I,B){this._mask=I,this._data=B}Object.defineProperty(C.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(C.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}});var E=function(B){var U=createSizedArray(B.viewData.length),V,X=B.viewData.length;for(V=0;V<X;V+=1)U[V]=new C(B.viewData[V],B.masksProperties[V]);var Y=function(J){for(V=0;V<X;){if(B.masksProperties[V].nm===J)return U[V];V+=1}return null};return Y};return E}(),ExpressionPropertyInterface=function(){var C={pv:0,v:0,mult:1},E={pv:[0,0,0],v:[0,0,0],mult:1};function I(X,Y,K){Object.defineProperty(X,"velocity",{get:function(){return Y.getVelocityAtTime(Y.comp.currentFrame)}}),X.numKeys=Y.keyframes?Y.keyframes.length:0,X.key=function(J){if(!X.numKeys)return 0;var xe="";"s"in Y.keyframes[J-1]?xe=Y.keyframes[J-1].s:"e"in Y.keyframes[J-2]?xe=Y.keyframes[J-2].e:xe=Y.keyframes[J-2].s;var Z=K==="unidimensional"?new Number(xe):Object.assign({},xe);return Z.time=Y.keyframes[J-1].t/Y.elem.comp.globalData.frameRate,Z.value=K==="unidimensional"?xe[0]:xe,Z},X.valueAtTime=Y.getValueAtTime,X.speedAtTime=Y.getSpeedAtTime,X.velocityAtTime=Y.getVelocityAtTime,X.propertyGroup=Y.propertyGroup}function B(X){(!X||!("pv"in X))&&(X=C);var Y=1/X.mult,K=X.pv*Y,J=new Number(K);return J.value=K,I(J,X,"unidimensional"),function(){return X.k&&X.getValue(),K=X.v*Y,J.value!==K&&(J=new Number(K),J.value=K,I(J,X,"unidimensional")),J}}function U(X){(!X||!("pv"in X))&&(X=E);var Y=1/X.mult,K=X.data&&X.data.l||X.pv.length,J=createTypedArray("float32",K),xe=createTypedArray("float32",K);return J.value=xe,I(J,X,"multidimensional"),function(){X.k&&X.getValue();for(var Z=0;Z<K;Z+=1)xe[Z]=X.v[Z]*Y,J[Z]=xe[Z];return J}}function V(){return C}return function(X){return X?X.propType==="unidimensional"?B(X):U(X):V}}(),TransformExpressionInterface=function(){return function(C){function E(X){switch(X){case"scale":case"Scale":case"ADBE Scale":case 6:return E.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return E.rotation;case"ADBE Rotate X":return E.xRotation;case"ADBE Rotate Y":return E.yRotation;case"position":case"Position":case"ADBE Position":case 2:return E.position;case"ADBE Position_0":return E.xPosition;case"ADBE Position_1":return E.yPosition;case"ADBE Position_2":return E.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return E.anchorPoint;case"opacity":case"Opacity":case 11:return E.opacity;default:return null}}Object.defineProperty(E,"rotation",{get:ExpressionPropertyInterface(C.r||C.rz)}),Object.defineProperty(E,"zRotation",{get:ExpressionPropertyInterface(C.rz||C.r)}),Object.defineProperty(E,"xRotation",{get:ExpressionPropertyInterface(C.rx)}),Object.defineProperty(E,"yRotation",{get:ExpressionPropertyInterface(C.ry)}),Object.defineProperty(E,"scale",{get:ExpressionPropertyInterface(C.s)});var I,B,U,V;return C.p?V=ExpressionPropertyInterface(C.p):(I=ExpressionPropertyInterface(C.px),B=ExpressionPropertyInterface(C.py),C.pz&&(U=ExpressionPropertyInterface(C.pz))),Object.defineProperty(E,"position",{get:function(){return C.p?V():[I(),B(),U?U():0]}}),Object.defineProperty(E,"xPosition",{get:ExpressionPropertyInterface(C.px)}),Object.defineProperty(E,"yPosition",{get:ExpressionPropertyInterface(C.py)}),Object.defineProperty(E,"zPosition",{get:ExpressionPropertyInterface(C.pz)}),Object.defineProperty(E,"anchorPoint",{get:ExpressionPropertyInterface(C.a)}),Object.defineProperty(E,"opacity",{get:ExpressionPropertyInterface(C.o)}),Object.defineProperty(E,"skew",{get:ExpressionPropertyInterface(C.sk)}),Object.defineProperty(E,"skewAxis",{get:ExpressionPropertyInterface(C.sa)}),Object.defineProperty(E,"orientation",{get:ExpressionPropertyInterface(C.or)}),E}}(),LayerExpressionInterface=function(){function C(J){var xe=new Matrix;if(J!==void 0){var Z=this._elem.finalTransform.mProp.getValueAtTime(J);Z.clone(xe)}else{var _e=this._elem.finalTransform.mProp;_e.applyToMatrix(xe)}return xe}function E(J,xe){var Z=this.getMatrix(xe);return Z.props[12]=0,Z.props[13]=0,Z.props[14]=0,this.applyPoint(Z,J)}function I(J,xe){var Z=this.getMatrix(xe);return this.applyPoint(Z,J)}function B(J,xe){var Z=this.getMatrix(xe);return Z.props[12]=0,Z.props[13]=0,Z.props[14]=0,this.invertPoint(Z,J)}function U(J,xe){var Z=this.getMatrix(xe);return this.invertPoint(Z,J)}function V(J,xe){if(this._elem.hierarchy&&this._elem.hierarchy.length){var Z,_e=this._elem.hierarchy.length;for(Z=0;Z<_e;Z+=1)this._elem.hierarchy[Z].finalTransform.mProp.applyToMatrix(J)}return J.applyToPointArray(xe[0],xe[1],xe[2]||0)}function X(J,xe){if(this._elem.hierarchy&&this._elem.hierarchy.length){var Z,_e=this._elem.hierarchy.length;for(Z=0;Z<_e;Z+=1)this._elem.hierarchy[Z].finalTransform.mProp.applyToMatrix(J)}return J.inversePoint(xe)}function Y(J){var xe=new Matrix;if(xe.reset(),this._elem.finalTransform.mProp.applyToMatrix(xe),this._elem.hierarchy&&this._elem.hierarchy.length){var Z,_e=this._elem.hierarchy.length;for(Z=0;Z<_e;Z+=1)this._elem.hierarchy[Z].finalTransform.mProp.applyToMatrix(xe);return xe.inversePoint(J)}return xe.inversePoint(J)}function K(){return[1,1,1,1]}return function(J){var xe;function Z(Ae){Se.mask=new MaskManagerInterface(Ae,J)}function _e(Ae){Se.effect=Ae}function Se(Ae){switch(Ae){case"ADBE Root Vectors Group":case"Contents":case 2:return Se.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return xe;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return Se.effect;case"ADBE Text Properties":return Se.textInterface;default:return null}}Se.getMatrix=C,Se.invertPoint=X,Se.applyPoint=V,Se.toWorld=I,Se.toWorldVec=E,Se.fromWorld=U,Se.fromWorldVec=B,Se.toComp=I,Se.fromComp=Y,Se.sampleImage=K,Se.sourceRectAtTime=J.sourceRectAtTime.bind(J),Se._elem=J,xe=TransformExpressionInterface(J.finalTransform.mProp);var Ee=getDescriptor(xe,"anchorPoint");return Object.defineProperties(Se,{hasParent:{get:function(){return J.hierarchy.length}},parent:{get:function(){return J.hierarchy[0].layerInterface}},rotation:getDescriptor(xe,"rotation"),scale:getDescriptor(xe,"scale"),position:getDescriptor(xe,"position"),opacity:getDescriptor(xe,"opacity"),anchorPoint:Ee,anchor_point:Ee,transform:{get:function(){return xe}},active:{get:function(){return J.isInRange}}}),Se.startTime=J.data.st,Se.index=J.data.ind,Se.source=J.data.refId,Se.height=J.data.ty===0?J.data.h:100,Se.width=J.data.ty===0?J.data.w:100,Se.inPoint=J.data.ip/J.comp.globalData.frameRate,Se.outPoint=J.data.op/J.comp.globalData.frameRate,Se._name=J.data.nm,Se.registerMaskInterface=Z,Se.registerEffectsInterface=_e,Se}}(),propertyGroupFactory=function(){return function(C,E){return function(I){return I=I===void 0?1:I,I<=0?C:E(I-1)}}}(),PropertyInterface=function(){return function(C,E){var I={_name:C};function B(U){return U=U===void 0?1:U,U<=0?I:E(U-1)}return B}}(),EffectsExpressionInterface=function(){var C={createEffectsInterface:E};function E(U,V){if(U.effectsManager){var X=[],Y=U.data.ef,K,J=U.effectsManager.effectElements.length;for(K=0;K<J;K+=1)X.push(I(Y[K],U.effectsManager.effectElements[K],V,U));var xe=U.data.ef||[],Z=function(Se){for(K=0,J=xe.length;K<J;){if(Se===xe[K].nm||Se===xe[K].mn||Se===xe[K].ix)return X[K];K+=1}return null};return Object.defineProperty(Z,"numProperties",{get:function(){return xe.length}}),Z}return null}function I(U,V,X,Y){function K(Se){for(var Ee=U.ef,Ae=0,Re=Ee.length;Ae<Re;){if(Se===Ee[Ae].nm||Se===Ee[Ae].mn||Se===Ee[Ae].ix)return Ee[Ae].ty===5?xe[Ae]:xe[Ae]();Ae+=1}throw new Error}var J=propertyGroupFactory(K,X),xe=[],Z,_e=U.ef.length;for(Z=0;Z<_e;Z+=1)U.ef[Z].ty===5?xe.push(I(U.ef[Z],V.effectElements[Z],V.effectElements[Z].propertyGroup,Y)):xe.push(B(V.effectElements[Z],U.ef[Z].ty,Y,J));return U.mn==="ADBE Color Control"&&Object.defineProperty(K,"color",{get:function(){return xe[0]()}}),Object.defineProperties(K,{numProperties:{get:function(){return U.np}},_name:{value:U.nm},propertyGroup:{value:J}}),K.enabled=U.en!==0,K.active=K.enabled,K}function B(U,V,X,Y){var K=ExpressionPropertyInterface(U.p);function J(){return V===10?X.comp.compInterface(U.p.v):K()}return U.p.setGroupProperty&&U.p.setGroupProperty(PropertyInterface("",Y)),J}return C}(),ShapePathInterface=function(){return function(E,I,B){var U=I.sh;function V(Y){return Y==="Shape"||Y==="shape"||Y==="Path"||Y==="path"||Y==="ADBE Vector Shape"||Y===2?V.path:null}var X=propertyGroupFactory(V,B);return U.setGroupProperty(PropertyInterface("Path",X)),Object.defineProperties(V,{path:{get:function(){return U.k&&U.getValue(),U}},shape:{get:function(){return U.k&&U.getValue(),U}},_name:{value:E.nm},ix:{value:E.ix},propertyIndex:{value:E.ix},mn:{value:E.mn},propertyGroup:{value:B}}),V}}(),ShapeExpressionInterface=function(){function C(Ee,Ae,Re){var Te=[],we,Pe=Ee?Ee.length:0;for(we=0;we<Pe;we+=1)Ee[we].ty==="gr"?Te.push(I(Ee[we],Ae[we],Re)):Ee[we].ty==="fl"?Te.push(B(Ee[we],Ae[we],Re)):Ee[we].ty==="st"?Te.push(X(Ee[we],Ae[we],Re)):Ee[we].ty==="tm"?Te.push(Y(Ee[we],Ae[we],Re)):Ee[we].ty==="tr"||(Ee[we].ty==="el"?Te.push(J(Ee[we],Ae[we],Re)):Ee[we].ty==="sr"?Te.push(xe(Ee[we],Ae[we],Re)):Ee[we].ty==="sh"?Te.push(ShapePathInterface(Ee[we],Ae[we],Re)):Ee[we].ty==="rc"?Te.push(Z(Ee[we],Ae[we],Re)):Ee[we].ty==="rd"?Te.push(_e(Ee[we],Ae[we],Re)):Ee[we].ty==="rp"?Te.push(Se(Ee[we],Ae[we],Re)):Ee[we].ty==="gf"?Te.push(U(Ee[we],Ae[we],Re)):Te.push(V(Ee[we],Ae[we])));return Te}function E(Ee,Ae,Re){var Te,we=function(Me){for(var Oe=0,Le=Te.length;Oe<Le;){if(Te[Oe]._name===Me||Te[Oe].mn===Me||Te[Oe].propertyIndex===Me||Te[Oe].ix===Me||Te[Oe].ind===Me)return Te[Oe];Oe+=1}return typeof Me=="number"?Te[Me-1]:null};we.propertyGroup=propertyGroupFactory(we,Re),Te=C(Ee.it,Ae.it,we.propertyGroup),we.numProperties=Te.length;var Pe=K(Ee.it[Ee.it.length-1],Ae.it[Ae.it.length-1],we.propertyGroup);return we.transform=Pe,we.propertyIndex=Ee.cix,we._name=Ee.nm,we}function I(Ee,Ae,Re){var Te=function(Me){switch(Me){case"ADBE Vectors Group":case"Contents":case 2:return Te.content;default:return Te.transform}};Te.propertyGroup=propertyGroupFactory(Te,Re);var we=E(Ee,Ae,Te.propertyGroup),Pe=K(Ee.it[Ee.it.length-1],Ae.it[Ae.it.length-1],Te.propertyGroup);return Te.content=we,Te.transform=Pe,Object.defineProperty(Te,"_name",{get:function(){return Ee.nm}}),Te.numProperties=Ee.np,Te.propertyIndex=Ee.ix,Te.nm=Ee.nm,Te.mn=Ee.mn,Te}function B(Ee,Ae,Re){function Te(we){return we==="Color"||we==="color"?Te.color:we==="Opacity"||we==="opacity"?Te.opacity:null}return Object.defineProperties(Te,{color:{get:ExpressionPropertyInterface(Ae.c)},opacity:{get:ExpressionPropertyInterface(Ae.o)},_name:{value:Ee.nm},mn:{value:Ee.mn}}),Ae.c.setGroupProperty(PropertyInterface("Color",Re)),Ae.o.setGroupProperty(PropertyInterface("Opacity",Re)),Te}function U(Ee,Ae,Re){function Te(we){return we==="Start Point"||we==="start point"?Te.startPoint:we==="End Point"||we==="end point"?Te.endPoint:we==="Opacity"||we==="opacity"?Te.opacity:null}return Object.defineProperties(Te,{startPoint:{get:ExpressionPropertyInterface(Ae.s)},endPoint:{get:ExpressionPropertyInterface(Ae.e)},opacity:{get:ExpressionPropertyInterface(Ae.o)},type:{get:function(){return"a"}},_name:{value:Ee.nm},mn:{value:Ee.mn}}),Ae.s.setGroupProperty(PropertyInterface("Start Point",Re)),Ae.e.setGroupProperty(PropertyInterface("End Point",Re)),Ae.o.setGroupProperty(PropertyInterface("Opacity",Re)),Te}function V(){function Ee(){return null}return Ee}function X(Ee,Ae,Re){var Te=propertyGroupFactory(Le,Re),we=propertyGroupFactory(Oe,Te);function Pe(Ne){Object.defineProperty(Oe,Ee.d[Ne].nm,{get:ExpressionPropertyInterface(Ae.d.dataProps[Ne].p)})}var Ie,Me=Ee.d?Ee.d.length:0,Oe={};for(Ie=0;Ie<Me;Ie+=1)Pe(Ie),Ae.d.dataProps[Ie].p.setGroupProperty(we);function Le(Ne){return Ne==="Color"||Ne==="color"?Le.color:Ne==="Opacity"||Ne==="opacity"?Le.opacity:Ne==="Stroke Width"||Ne==="stroke width"?Le.strokeWidth:null}return Object.defineProperties(Le,{color:{get:ExpressionPropertyInterface(Ae.c)},opacity:{get:ExpressionPropertyInterface(Ae.o)},strokeWidth:{get:ExpressionPropertyInterface(Ae.w)},dash:{get:function(){return Oe}},_name:{value:Ee.nm},mn:{value:Ee.mn}}),Ae.c.setGroupProperty(PropertyInterface("Color",Te)),Ae.o.setGroupProperty(PropertyInterface("Opacity",Te)),Ae.w.setGroupProperty(PropertyInterface("Stroke Width",Te)),Le}function Y(Ee,Ae,Re){function Te(Pe){return Pe===Ee.e.ix||Pe==="End"||Pe==="end"?Te.end:Pe===Ee.s.ix?Te.start:Pe===Ee.o.ix?Te.offset:null}var we=propertyGroupFactory(Te,Re);return Te.propertyIndex=Ee.ix,Ae.s.setGroupProperty(PropertyInterface("Start",we)),Ae.e.setGroupProperty(PropertyInterface("End",we)),Ae.o.setGroupProperty(PropertyInterface("Offset",we)),Te.propertyIndex=Ee.ix,Te.propertyGroup=Re,Object.defineProperties(Te,{start:{get:ExpressionPropertyInterface(Ae.s)},end:{get:ExpressionPropertyInterface(Ae.e)},offset:{get:ExpressionPropertyInterface(Ae.o)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function K(Ee,Ae,Re){function Te(Pe){return Ee.a.ix===Pe||Pe==="Anchor Point"?Te.anchorPoint:Ee.o.ix===Pe||Pe==="Opacity"?Te.opacity:Ee.p.ix===Pe||Pe==="Position"?Te.position:Ee.r.ix===Pe||Pe==="Rotation"||Pe==="ADBE Vector Rotation"?Te.rotation:Ee.s.ix===Pe||Pe==="Scale"?Te.scale:Ee.sk&&Ee.sk.ix===Pe||Pe==="Skew"?Te.skew:Ee.sa&&Ee.sa.ix===Pe||Pe==="Skew Axis"?Te.skewAxis:null}var we=propertyGroupFactory(Te,Re);return Ae.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",we)),Ae.transform.mProps.p.setGroupProperty(PropertyInterface("Position",we)),Ae.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",we)),Ae.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",we)),Ae.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",we)),Ae.transform.mProps.sk&&(Ae.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",we)),Ae.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",we))),Ae.transform.op.setGroupProperty(PropertyInterface("Opacity",we)),Object.defineProperties(Te,{opacity:{get:ExpressionPropertyInterface(Ae.transform.mProps.o)},position:{get:ExpressionPropertyInterface(Ae.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(Ae.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(Ae.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(Ae.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(Ae.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(Ae.transform.mProps.sa)},_name:{value:Ee.nm}}),Te.ty="tr",Te.mn=Ee.mn,Te.propertyGroup=Re,Te}function J(Ee,Ae,Re){function Te(Ie){return Ee.p.ix===Ie?Te.position:Ee.s.ix===Ie?Te.size:null}var we=propertyGroupFactory(Te,Re);Te.propertyIndex=Ee.ix;var Pe=Ae.sh.ty==="tm"?Ae.sh.prop:Ae.sh;return Pe.s.setGroupProperty(PropertyInterface("Size",we)),Pe.p.setGroupProperty(PropertyInterface("Position",we)),Object.defineProperties(Te,{size:{get:ExpressionPropertyInterface(Pe.s)},position:{get:ExpressionPropertyInterface(Pe.p)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function xe(Ee,Ae,Re){function Te(Ie){return Ee.p.ix===Ie?Te.position:Ee.r.ix===Ie?Te.rotation:Ee.pt.ix===Ie?Te.points:Ee.or.ix===Ie||Ie==="ADBE Vector Star Outer Radius"?Te.outerRadius:Ee.os.ix===Ie?Te.outerRoundness:Ee.ir&&(Ee.ir.ix===Ie||Ie==="ADBE Vector Star Inner Radius")?Te.innerRadius:Ee.is&&Ee.is.ix===Ie?Te.innerRoundness:null}var we=propertyGroupFactory(Te,Re),Pe=Ae.sh.ty==="tm"?Ae.sh.prop:Ae.sh;return Te.propertyIndex=Ee.ix,Pe.or.setGroupProperty(PropertyInterface("Outer Radius",we)),Pe.os.setGroupProperty(PropertyInterface("Outer Roundness",we)),Pe.pt.setGroupProperty(PropertyInterface("Points",we)),Pe.p.setGroupProperty(PropertyInterface("Position",we)),Pe.r.setGroupProperty(PropertyInterface("Rotation",we)),Ee.ir&&(Pe.ir.setGroupProperty(PropertyInterface("Inner Radius",we)),Pe.is.setGroupProperty(PropertyInterface("Inner Roundness",we))),Object.defineProperties(Te,{position:{get:ExpressionPropertyInterface(Pe.p)},rotation:{get:ExpressionPropertyInterface(Pe.r)},points:{get:ExpressionPropertyInterface(Pe.pt)},outerRadius:{get:ExpressionPropertyInterface(Pe.or)},outerRoundness:{get:ExpressionPropertyInterface(Pe.os)},innerRadius:{get:ExpressionPropertyInterface(Pe.ir)},innerRoundness:{get:ExpressionPropertyInterface(Pe.is)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function Z(Ee,Ae,Re){function Te(Ie){return Ee.p.ix===Ie?Te.position:Ee.r.ix===Ie?Te.roundness:Ee.s.ix===Ie||Ie==="Size"||Ie==="ADBE Vector Rect Size"?Te.size:null}var we=propertyGroupFactory(Te,Re),Pe=Ae.sh.ty==="tm"?Ae.sh.prop:Ae.sh;return Te.propertyIndex=Ee.ix,Pe.p.setGroupProperty(PropertyInterface("Position",we)),Pe.s.setGroupProperty(PropertyInterface("Size",we)),Pe.r.setGroupProperty(PropertyInterface("Rotation",we)),Object.defineProperties(Te,{position:{get:ExpressionPropertyInterface(Pe.p)},roundness:{get:ExpressionPropertyInterface(Pe.r)},size:{get:ExpressionPropertyInterface(Pe.s)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function _e(Ee,Ae,Re){function Te(Ie){return Ee.r.ix===Ie||Ie==="Round Corners 1"?Te.radius:null}var we=propertyGroupFactory(Te,Re),Pe=Ae;return Te.propertyIndex=Ee.ix,Pe.rd.setGroupProperty(PropertyInterface("Radius",we)),Object.defineProperties(Te,{radius:{get:ExpressionPropertyInterface(Pe.rd)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function Se(Ee,Ae,Re){function Te(Ie){return Ee.c.ix===Ie||Ie==="Copies"?Te.copies:Ee.o.ix===Ie||Ie==="Offset"?Te.offset:null}var we=propertyGroupFactory(Te,Re),Pe=Ae;return Te.propertyIndex=Ee.ix,Pe.c.setGroupProperty(PropertyInterface("Copies",we)),Pe.o.setGroupProperty(PropertyInterface("Offset",we)),Object.defineProperties(Te,{copies:{get:ExpressionPropertyInterface(Pe.c)},offset:{get:ExpressionPropertyInterface(Pe.o)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}return function(Ee,Ae,Re){var Te;function we(Ie){if(typeof Ie=="number")return Ie=Ie===void 0?1:Ie,Ie===0?Re:Te[Ie-1];for(var Me=0,Oe=Te.length;Me<Oe;){if(Te[Me]._name===Ie)return Te[Me];Me+=1}return null}function Pe(){return Re}return we.propertyGroup=propertyGroupFactory(we,Pe),Te=C(Ee,Ae,we.propertyGroup),we.numProperties=Te.length,we._name="Contents",we}}(),TextExpressionInterface=function(){return function(C){var E;function I(B){switch(B){case"ADBE Text Document":return I.sourceText;default:return null}}return Object.defineProperty(I,"sourceText",{get:function(){C.textProperty.getValue();var U=C.textProperty.currentData.t;return(!E||U!==E.value)&&(E=new String(U),E.value=U||new String(U),Object.defineProperty(E,"style",{get:function(){return{fillColor:C.textProperty.currentData.fc}}})),E}}),I}}();function _typeof(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(I){return typeof I}:_typeof=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof(C)}var FootageInterface=function(){var C=function(B){var U="",V=B.getFootageData();function X(){return U="",V=B.getFootageData(),Y}function Y(K){if(V[K])return U=K,V=V[K],_typeof(V)==="object"?Y:V;var J=K.indexOf(U);if(J!==-1){var xe=parseInt(K.substr(J+U.length),10);return V=V[xe],_typeof(V)==="object"?Y:V}return""}return X},E=function(B){function U(V){return V==="Outline"?U.outlineInterface():null}return U._name="Outline",U.outlineInterface=C(B),U};return function(I){function B(U){return U==="Data"?B.dataInterface:null}return B._name="Data",B.dataInterface=E(I),B}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(C){return interfaces[C]||null}var expressionHelpers=function(){function C(X,Y,K){Y.x&&(K.k=!0,K.x=!0,K.initiateExpression=ExpressionManager.initiateExpression,K.effectsSequence.push(K.initiateExpression(X,Y,K).bind(K)))}function E(X){return X*=this.elem.globalData.frameRate,X-=this.offsetTime,X!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<X?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(X,this._cachingAtTime),this._cachingAtTime.lastFrame=X),this._cachingAtTime.value}function I(X){var Y=-.01,K=this.getValueAtTime(X),J=this.getValueAtTime(X+Y),xe=0;if(K.length){var Z;for(Z=0;Z<K.length;Z+=1)xe+=Math.pow(J[Z]-K[Z],2);xe=Math.sqrt(xe)*100}else xe=0;return xe}function B(X){if(this.vel!==void 0)return this.vel;var Y=-.001,K=this.getValueAtTime(X),J=this.getValueAtTime(X+Y),xe;if(K.length){xe=createTypedArray("float32",K.length);var Z;for(Z=0;Z<K.length;Z+=1)xe[Z]=(J[Z]-K[Z])/Y}else xe=(J-K)/Y;return xe}function U(){return this.pv}function V(X){this.propertyGroup=X}return{searchExpressions:C,getSpeedAtTime:I,getVelocityAtTime:B,getValueAtTime:E,getStaticValueAtTime:U,setGroupProperty:V}}();function addPropertyDecorator(){function C(_e,Se,Ee){if(!this.k||!this.keyframes)return this.pv;_e=_e?_e.toLowerCase():"";var Ae=this.comp.renderedFrame,Re=this.keyframes,Te=Re[Re.length-1].t;if(Ae<=Te)return this.pv;var we,Pe;Ee?(Se?we=Math.abs(Te-this.elem.comp.globalData.frameRate*Se):we=Math.max(0,Te-this.elem.data.ip),Pe=Te-we):((!Se||Se>Re.length-1)&&(Se=Re.length-1),Pe=Re[Re.length-1-Se].t,we=Te-Pe);var Ie,Me,Oe;if(_e==="pingpong"){var Le=Math.floor((Ae-Pe)/we);if(Le%2!==0)return this.getValueAtTime((we-(Ae-Pe)%we+Pe)/this.comp.globalData.frameRate,0)}else if(_e==="offset"){var Ne=this.getValueAtTime(Pe/this.comp.globalData.frameRate,0),Ve=this.getValueAtTime(Te/this.comp.globalData.frameRate,0),Xe=this.getValueAtTime(((Ae-Pe)%we+Pe)/this.comp.globalData.frameRate,0),Ue=Math.floor((Ae-Pe)/we);if(this.pv.length){for(Oe=new Array(Ne.length),Me=Oe.length,Ie=0;Ie<Me;Ie+=1)Oe[Ie]=(Ve[Ie]-Ne[Ie])*Ue+Xe[Ie];return Oe}return(Ve-Ne)*Ue+Xe}else if(_e==="continue"){var We=this.getValueAtTime(Te/this.comp.globalData.frameRate,0),ze=this.getValueAtTime((Te-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(Oe=new Array(We.length),Me=Oe.length,Ie=0;Ie<Me;Ie+=1)Oe[Ie]=We[Ie]+(We[Ie]-ze[Ie])*((Ae-Te)/this.comp.globalData.frameRate)/5e-4;return Oe}return We+(We-ze)*((Ae-Te)/.001)}return this.getValueAtTime(((Ae-Pe)%we+Pe)/this.comp.globalData.frameRate,0)}function E(_e,Se,Ee){if(!this.k)return this.pv;_e=_e?_e.toLowerCase():"";var Ae=this.comp.renderedFrame,Re=this.keyframes,Te=Re[0].t;if(Ae>=Te)return this.pv;var we,Pe;Ee?(Se?we=Math.abs(this.elem.comp.globalData.frameRate*Se):we=Math.max(0,this.elem.data.op-Te),Pe=Te+we):((!Se||Se>Re.length-1)&&(Se=Re.length-1),Pe=Re[Se].t,we=Pe-Te);var Ie,Me,Oe;if(_e==="pingpong"){var Le=Math.floor((Te-Ae)/we);if(Le%2===0)return this.getValueAtTime(((Te-Ae)%we+Te)/this.comp.globalData.frameRate,0)}else if(_e==="offset"){var Ne=this.getValueAtTime(Te/this.comp.globalData.frameRate,0),Ve=this.getValueAtTime(Pe/this.comp.globalData.frameRate,0),Xe=this.getValueAtTime((we-(Te-Ae)%we+Te)/this.comp.globalData.frameRate,0),Ue=Math.floor((Te-Ae)/we)+1;if(this.pv.length){for(Oe=new Array(Ne.length),Me=Oe.length,Ie=0;Ie<Me;Ie+=1)Oe[Ie]=Xe[Ie]-(Ve[Ie]-Ne[Ie])*Ue;return Oe}return Xe-(Ve-Ne)*Ue}else if(_e==="continue"){var We=this.getValueAtTime(Te/this.comp.globalData.frameRate,0),ze=this.getValueAtTime((Te+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(Oe=new Array(We.length),Me=Oe.length,Ie=0;Ie<Me;Ie+=1)Oe[Ie]=We[Ie]+(We[Ie]-ze[Ie])*(Te-Ae)/.001;return Oe}return We+(We-ze)*(Te-Ae)/.001}return this.getValueAtTime((we-((Te-Ae)%we+Te))/this.comp.globalData.frameRate,0)}function I(_e,Se){if(!this.k)return this.pv;if(_e=(_e||.4)*.5,Se=Math.floor(Se||5),Se<=1)return this.pv;var Ee=this.comp.renderedFrame/this.comp.globalData.frameRate,Ae=Ee-_e,Re=Ee+_e,Te=Se>1?(Re-Ae)/(Se-1):1,we=0,Pe=0,Ie;this.pv.length?Ie=createTypedArray("float32",this.pv.length):Ie=0;for(var Me;we<Se;){if(Me=this.getValueAtTime(Ae+we*Te),this.pv.length)for(Pe=0;Pe<this.pv.length;Pe+=1)Ie[Pe]+=Me[Pe];else Ie+=Me;we+=1}if(this.pv.length)for(Pe=0;Pe<this.pv.length;Pe+=1)Ie[Pe]/=Se;else Ie/=Se;return Ie}function B(_e){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var Se=this._transformCachingAtTime.v;if(Se.cloneFromProps(this.pre.props),this.appliedTransformations<1){var Ee=this.a.getValueAtTime(_e);Se.translate(-Ee[0]*this.a.mult,-Ee[1]*this.a.mult,Ee[2]*this.a.mult)}if(this.appliedTransformations<2){var Ae=this.s.getValueAtTime(_e);Se.scale(Ae[0]*this.s.mult,Ae[1]*this.s.mult,Ae[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var Re=this.sk.getValueAtTime(_e),Te=this.sa.getValueAtTime(_e);Se.skewFromAxis(-Re*this.sk.mult,Te*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var we=this.r.getValueAtTime(_e);Se.rotate(-we*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var Pe=this.rz.getValueAtTime(_e),Ie=this.ry.getValueAtTime(_e),Me=this.rx.getValueAtTime(_e),Oe=this.or.getValueAtTime(_e);Se.rotateZ(-Pe*this.rz.mult).rotateY(Ie*this.ry.mult).rotateX(Me*this.rx.mult).rotateZ(-Oe[2]*this.or.mult).rotateY(Oe[1]*this.or.mult).rotateX(Oe[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var Le=this.px.getValueAtTime(_e),Ne=this.py.getValueAtTime(_e);if(this.data.p.z){var Ve=this.pz.getValueAtTime(_e);Se.translate(Le*this.px.mult,Ne*this.py.mult,-Ve*this.pz.mult)}else Se.translate(Le*this.px.mult,Ne*this.py.mult,0)}else{var Xe=this.p.getValueAtTime(_e);Se.translate(Xe[0]*this.p.mult,Xe[1]*this.p.mult,-Xe[2]*this.p.mult)}return Se}function U(){return this.v.clone(new Matrix)}var V=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(_e,Se,Ee){var Ae=V(_e,Se,Ee);return Ae.dynamicProperties.length?Ae.getValueAtTime=B.bind(Ae):Ae.getValueAtTime=U.bind(Ae),Ae.setGroupProperty=expressionHelpers.setGroupProperty,Ae};var X=PropertyFactory.getProp;PropertyFactory.getProp=function(_e,Se,Ee,Ae,Re){var Te=X(_e,Se,Ee,Ae,Re);Te.kf?Te.getValueAtTime=expressionHelpers.getValueAtTime.bind(Te):Te.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(Te),Te.setGroupProperty=expressionHelpers.setGroupProperty,Te.loopOut=C,Te.loopIn=E,Te.smooth=I,Te.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(Te),Te.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(Te),Te.numKeys=Se.a===1?Se.k.length:0,Te.propertyIndex=Se.ix;var we=0;return Ee!==0&&(we=createTypedArray("float32",Se.a===1?Se.k[0].s.length:Se.k.length)),Te._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:we},expressionHelpers.searchExpressions(_e,Se,Te),Te.k&&Re.addDynamicProperty(Te),Te};function Y(_e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),_e*=this.elem.globalData.frameRate,_e-=this.offsetTime,_e!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<_e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=_e,this.interpolateShape(_e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var K=ShapePropertyFactory.getConstructorFunction(),J=ShapePropertyFactory.getKeyframedConstructorFunction();function xe(){}xe.prototype={vertices:function(Se,Ee){this.k&&this.getValue();var Ae=this.v;Ee!==void 0&&(Ae=this.getValueAtTime(Ee,0));var Re,Te=Ae._length,we=Ae[Se],Pe=Ae.v,Ie=createSizedArray(Te);for(Re=0;Re<Te;Re+=1)Se==="i"||Se==="o"?Ie[Re]=[we[Re][0]-Pe[Re][0],we[Re][1]-Pe[Re][1]]:Ie[Re]=[we[Re][0],we[Re][1]];return Ie},points:function(Se){return this.vertices("v",Se)},inTangents:function(Se){return this.vertices("i",Se)},outTangents:function(Se){return this.vertices("o",Se)},isClosed:function(){return this.v.c},pointOnPath:function(Se,Ee){var Ae=this.v;Ee!==void 0&&(Ae=this.getValueAtTime(Ee,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(Ae));for(var Re=this._segmentsLength,Te=Re.lengths,we=Re.totalLength*Se,Pe=0,Ie=Te.length,Me=0,Oe;Pe<Ie;){if(Me+Te[Pe].addedLength>we){var Le=Pe,Ne=Ae.c&&Pe===Ie-1?0:Pe+1,Ve=(we-Me)/Te[Pe].addedLength;Oe=bez.getPointInSegment(Ae.v[Le],Ae.v[Ne],Ae.o[Le],Ae.i[Ne],Ve,Te[Pe]);break}else Me+=Te[Pe].addedLength;Pe+=1}return Oe||(Oe=Ae.c?[Ae.v[0][0],Ae.v[0][1]]:[Ae.v[Ae._length-1][0],Ae.v[Ae._length-1][1]]),Oe},vectorOnPath:function(Se,Ee,Ae){Se==1?Se=this.v.c:Se==0&&(Se=.999);var Re=this.pointOnPath(Se,Ee),Te=this.pointOnPath(Se+.001,Ee),we=Te[0]-Re[0],Pe=Te[1]-Re[1],Ie=Math.sqrt(Math.pow(we,2)+Math.pow(Pe,2));if(Ie===0)return[0,0];var Me=Ae==="tangent"?[we/Ie,Pe/Ie]:[-Pe/Ie,we/Ie];return Me},tangentOnPath:function(Se,Ee){return this.vectorOnPath(Se,Ee,"tangent")},normalOnPath:function(Se,Ee){return this.vectorOnPath(Se,Ee,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([xe],K),extendPrototype([xe],J),J.prototype.getValueAtTime=Y,J.prototype.initiateExpression=ExpressionManager.initiateExpression;var Z=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(_e,Se,Ee,Ae,Re){var Te=Z(_e,Se,Ee,Ae,Re);return Te.propertyIndex=Se.ix,Te.lock=!1,Ee===3?expressionHelpers.searchExpressions(_e,Se.pt,Te):Ee===4&&expressionHelpers.searchExpressions(_e,Se.ks,Te),Te.k&&_e.addDynamicProperty(Te),Te}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function C(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(E,I){var B=this.calculateExpression(I);if(E.t!==B){var U={};return this.copyData(U,E),U.t=B.toString(),U.__complete=!1,U}return E},TextProperty.prototype.searchProperty=function(){var E=this.searchKeyframes(),I=this.searchExpressions();return this.kf=E||I,this.kf},TextProperty.prototype.searchExpressions=C}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function C(E,I){var B=createNS("feMerge");B.setAttribute("result",E);var U,V;for(V=0;V<I.length;V+=1)U=createNS("feMergeNode"),U.setAttribute("in",I[V]),B.appendChild(U),B.appendChild(U);return B}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(C,E,I,B,U){this.filterManager=E;var V=createNS("feColorMatrix");V.setAttribute("type","matrix"),V.setAttribute("color-interpolation-filters","linearRGB"),V.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=V,V.setAttribute("result",B+"_tint_1"),C.appendChild(V),V=createNS("feColorMatrix"),V.setAttribute("type","matrix"),V.setAttribute("color-interpolation-filters","sRGB"),V.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),V.setAttribute("result",B+"_tint_2"),C.appendChild(V),this.matrixFilter=V;var X=this.createMergeNode(B,[U,B+"_tint_1",B+"_tint_2"]);C.appendChild(X)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E=this.filterManager.effectElements[0].p.v,I=this.filterManager.effectElements[1].p.v,B=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+B+" 0"),this.matrixFilter.setAttribute("values",I[0]-E[0]+" 0 0 0 "+E[0]+" "+(I[1]-E[1])+" 0 0 0 "+E[1]+" "+(I[2]-E[2])+" 0 0 0 "+E[2]+" 0 0 0 1 0")}};function SVGFillFilter(C,E,I,B){this.filterManager=E;var U=createNS("feColorMatrix");U.setAttribute("type","matrix"),U.setAttribute("color-interpolation-filters","sRGB"),U.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),U.setAttribute("result",B),C.appendChild(U),this.matrixFilter=U}SVGFillFilter.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E=this.filterManager.effectElements[2].p.v,I=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+E[0]+" 0 0 0 0 "+E[1]+" 0 0 0 0 "+E[2]+" 0 0 0 "+I+" 0")}};function SVGStrokeEffect(C,E,I){this.initialized=!1,this.filterManager=E,this.elem=I,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var C=this.elem.layerElement.children||this.elem.layerElement.childNodes,E,I,B,U;for(this.filterManager.effectElements[1].p.v===1?(U=this.elem.maskManager.masksProperties.length,B=0):(B=this.filterManager.effectElements[0].p.v-1,U=B+1),I=createNS("g"),I.setAttribute("fill","none"),I.setAttribute("stroke-linecap","round"),I.setAttribute("stroke-dashoffset",1),B;B<U;B+=1)E=createNS("path"),I.appendChild(E),this.paths.push({p:E,m:B});if(this.filterManager.effectElements[10].p.v===3){var V=createNS("mask"),X=createElementID();V.setAttribute("id",X),V.setAttribute("mask-type","alpha"),V.appendChild(I),this.elem.globalData.defs.appendChild(V);var Y=createNS("g");for(Y.setAttribute("mask","url("+getLocationHref()+"#"+X+")");C[0];)Y.appendChild(C[0]);this.elem.layerElement.appendChild(Y),this.masker=V,I.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(C=this.elem.layerElement.children||this.elem.layerElement.childNodes;C.length;)this.elem.layerElement.removeChild(C[0]);this.elem.layerElement.appendChild(I),this.elem.layerElement.removeAttribute("mask"),I.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=I},SVGStrokeEffect.prototype.renderFrame=function(C){this.initialized||this.initialize();var E,I=this.paths.length,B,U;for(E=0;E<I;E+=1)if(this.paths[E].m!==-1&&(B=this.elem.maskManager.viewData[this.paths[E].m],U=this.paths[E].p,(C||this.filterManager._mdf||B.prop._mdf)&&U.setAttribute("d",B.lastPath),C||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||B.prop._mdf)){var V;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var X=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,Y=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,K=U.getTotalLength();V="0 0 0 "+K*X+" ";var J=K*(Y-X),xe=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,Z=Math.floor(J/xe),_e;for(_e=0;_e<Z;_e+=1)V+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+" ";V+="0 "+K*10+" 0 0"}else V="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;U.setAttribute("stroke-dasharray",V)}if((C||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2),(C||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(C||this.filterManager.effectElements[3].p._mdf)){var Se=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(Se[0]*255)+","+bmFloor(Se[1]*255)+","+bmFloor(Se[2]*255)+")")}};function SVGTritoneFilter(C,E,I,B){this.filterManager=E;var U=createNS("feColorMatrix");U.setAttribute("type","matrix"),U.setAttribute("color-interpolation-filters","linearRGB"),U.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),C.appendChild(U);var V=createNS("feComponentTransfer");V.setAttribute("color-interpolation-filters","sRGB"),V.setAttribute("result",B),this.matrixFilter=V;var X=createNS("feFuncR");X.setAttribute("type","table"),V.appendChild(X),this.feFuncR=X;var Y=createNS("feFuncG");Y.setAttribute("type","table"),V.appendChild(Y),this.feFuncG=Y;var K=createNS("feFuncB");K.setAttribute("type","table"),V.appendChild(K),this.feFuncB=K,C.appendChild(V)}SVGTritoneFilter.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E=this.filterManager.effectElements[0].p.v,I=this.filterManager.effectElements[1].p.v,B=this.filterManager.effectElements[2].p.v,U=B[0]+" "+I[0]+" "+E[0],V=B[1]+" "+I[1]+" "+E[1],X=B[2]+" "+I[2]+" "+E[2];this.feFuncR.setAttribute("tableValues",U),this.feFuncG.setAttribute("tableValues",V),this.feFuncB.setAttribute("tableValues",X)}};function SVGProLevelsFilter(C,E,I,B){this.filterManager=E;var U=this.filterManager.effectElements,V=createNS("feComponentTransfer");(U[10].p.k||U[10].p.v!==0||U[11].p.k||U[11].p.v!==1||U[12].p.k||U[12].p.v!==1||U[13].p.k||U[13].p.v!==0||U[14].p.k||U[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",V)),(U[17].p.k||U[17].p.v!==0||U[18].p.k||U[18].p.v!==1||U[19].p.k||U[19].p.v!==1||U[20].p.k||U[20].p.v!==0||U[21].p.k||U[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",V)),(U[24].p.k||U[24].p.v!==0||U[25].p.k||U[25].p.v!==1||U[26].p.k||U[26].p.v!==1||U[27].p.k||U[27].p.v!==0||U[28].p.k||U[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",V)),(U[31].p.k||U[31].p.v!==0||U[32].p.k||U[32].p.v!==1||U[33].p.k||U[33].p.v!==1||U[34].p.k||U[34].p.v!==0||U[35].p.k||U[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",V)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(V.setAttribute("color-interpolation-filters","sRGB"),C.appendChild(V)),(U[3].p.k||U[3].p.v!==0||U[4].p.k||U[4].p.v!==1||U[5].p.k||U[5].p.v!==1||U[6].p.k||U[6].p.v!==0||U[7].p.k||U[7].p.v!==1)&&(V=createNS("feComponentTransfer"),V.setAttribute("color-interpolation-filters","sRGB"),V.setAttribute("result",B),C.appendChild(V),this.feFuncRComposed=this.createFeFunc("feFuncR",V),this.feFuncGComposed=this.createFeFunc("feFuncG",V),this.feFuncBComposed=this.createFeFunc("feFuncB",V))}SVGProLevelsFilter.prototype.createFeFunc=function(C,E){var I=createNS(C);return I.setAttribute("type","table"),E.appendChild(I),I},SVGProLevelsFilter.prototype.getTableValue=function(C,E,I,B,U){for(var V=0,X=256,Y,K=Math.min(C,E),J=Math.max(C,E),xe=Array.call(null,{length:X}),Z,_e=0,Se=U-B,Ee=E-C;V<=256;)Y=V/256,Y<=K?Z=Ee<0?U:B:Y>=J?Z=Ee<0?B:U:Z=B+Se*Math.pow((Y-C)/Ee,1/I),xe[_e]=Z,_e+=1,V+=256/(X-1);return xe.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E,I=this.filterManager.effectElements;this.feFuncRComposed&&(C||I[3].p._mdf||I[4].p._mdf||I[5].p._mdf||I[6].p._mdf||I[7].p._mdf)&&(E=this.getTableValue(I[3].p.v,I[4].p.v,I[5].p.v,I[6].p.v,I[7].p.v),this.feFuncRComposed.setAttribute("tableValues",E),this.feFuncGComposed.setAttribute("tableValues",E),this.feFuncBComposed.setAttribute("tableValues",E)),this.feFuncR&&(C||I[10].p._mdf||I[11].p._mdf||I[12].p._mdf||I[13].p._mdf||I[14].p._mdf)&&(E=this.getTableValue(I[10].p.v,I[11].p.v,I[12].p.v,I[13].p.v,I[14].p.v),this.feFuncR.setAttribute("tableValues",E)),this.feFuncG&&(C||I[17].p._mdf||I[18].p._mdf||I[19].p._mdf||I[20].p._mdf||I[21].p._mdf)&&(E=this.getTableValue(I[17].p.v,I[18].p.v,I[19].p.v,I[20].p.v,I[21].p.v),this.feFuncG.setAttribute("tableValues",E)),this.feFuncB&&(C||I[24].p._mdf||I[25].p._mdf||I[26].p._mdf||I[27].p._mdf||I[28].p._mdf)&&(E=this.getTableValue(I[24].p.v,I[25].p.v,I[26].p.v,I[27].p.v,I[28].p.v),this.feFuncB.setAttribute("tableValues",E)),this.feFuncA&&(C||I[31].p._mdf||I[32].p._mdf||I[33].p._mdf||I[34].p._mdf||I[35].p._mdf)&&(E=this.getTableValue(I[31].p.v,I[32].p.v,I[33].p.v,I[34].p.v,I[35].p.v),this.feFuncA.setAttribute("tableValues",E))}};function SVGDropShadowEffect(C,E,I,B,U){var V=E.container.globalData.renderConfig.filterSize,X=E.data.fs||V;C.setAttribute("x",X.x||V.x),C.setAttribute("y",X.y||V.y),C.setAttribute("width",X.width||V.width),C.setAttribute("height",X.height||V.height),this.filterManager=E;var Y=createNS("feGaussianBlur");Y.setAttribute("in","SourceAlpha"),Y.setAttribute("result",B+"_drop_shadow_1"),Y.setAttribute("stdDeviation","0"),this.feGaussianBlur=Y,C.appendChild(Y);var K=createNS("feOffset");K.setAttribute("dx","25"),K.setAttribute("dy","0"),K.setAttribute("in",B+"_drop_shadow_1"),K.setAttribute("result",B+"_drop_shadow_2"),this.feOffset=K,C.appendChild(K);var J=createNS("feFlood");J.setAttribute("flood-color","#00ff00"),J.setAttribute("flood-opacity","1"),J.setAttribute("result",B+"_drop_shadow_3"),this.feFlood=J,C.appendChild(J);var xe=createNS("feComposite");xe.setAttribute("in",B+"_drop_shadow_3"),xe.setAttribute("in2",B+"_drop_shadow_2"),xe.setAttribute("operator","in"),xe.setAttribute("result",B+"_drop_shadow_4"),C.appendChild(xe);var Z=this.createMergeNode(B,[B+"_drop_shadow_4",U]);C.appendChild(Z)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){if((C||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),C||this.filterManager.effectElements[0].p._mdf){var E=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(E[0]*255),Math.round(E[1]*255),Math.round(E[2]*255)))}if((C||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),C||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var I=this.filterManager.effectElements[3].p.v,B=(this.filterManager.effectElements[2].p.v-90)*degToRads,U=I*Math.cos(B),V=I*Math.sin(B);this.feOffset.setAttribute("dx",U),this.feOffset.setAttribute("dy",V)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(C,E,I){this.initialized=!1,this.filterManager=E,this.filterElem=C,this.elem=I,I.matteElement=createNS("g"),I.matteElement.appendChild(I.layerElement),I.matteElement.appendChild(I.transformedElement),I.baseElement=I.matteElement}SVGMatte3Effect.prototype.findSymbol=function(C){for(var E=0,I=_svgMatteSymbols.length;E<I;){if(_svgMatteSymbols[E]===C)return _svgMatteSymbols[E];E+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(C,E){var I=C.layerElement.parentNode;if(I){for(var B=I.children,U=0,V=B.length;U<V&&B[U]!==C.layerElement;)U+=1;var X;U<=V-2&&(X=B[U+1]);var Y=createNS("use");Y.setAttribute("href","#"+E),X?I.insertBefore(Y,X):I.appendChild(Y)}},SVGMatte3Effect.prototype.setElementAsMask=function(C,E){if(!this.findSymbol(E)){var I=createElementID(),B=createNS("mask");B.setAttribute("id",E.layerId),B.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(E);var U=C.globalData.defs;U.appendChild(B);var V=createNS("symbol");V.setAttribute("id",I),this.replaceInParent(E,I),V.appendChild(E.layerElement),U.appendChild(V);var X=createNS("use");X.setAttribute("href","#"+I),B.appendChild(X),E.data.hd=!1,E.show()}C.setMatte(E.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var C=this.filterManager.effectElements[0].p.v,E=this.elem.comp.elements,I=0,B=E.length;I<B;)E[I]&&E[I].data.ind===C&&this.setElementAsMask(this.elem,E[I]),I+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(C,E,I,B){C.setAttribute("x","-100%"),C.setAttribute("y","-100%"),C.setAttribute("width","300%"),C.setAttribute("height","300%"),this.filterManager=E;var U=createNS("feGaussianBlur");U.setAttribute("result",B),C.appendChild(U),this.feGaussianBlur=U}SVGGaussianBlurEffect.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E=.3,I=this.filterManager.effectElements[0].p.v*E,B=this.filterManager.effectElements[1].p.v,U=B==3?0:I,V=B==2?0:I;this.feGaussianBlur.setAttribute("stdDeviation",U+" "+V);var X=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",X)}};function TransformEffect(){}TransformEffect.prototype.init=function(C){this.effectsManager=C,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(C){if(this._opMdf=!1,this._mdf=!1,C||this.effectsManager._mdf){var E=this.effectsManager.effectElements,I=E[0].p.v,B=E[1].p.v,U=E[2].p.v===1,V=E[3].p.v,X=U?V:E[4].p.v,Y=E[5].p.v,K=E[6].p.v,J=E[7].p.v;this.matrix.reset(),this.matrix.translate(-I[0],-I[1],I[2]),this.matrix.scale(X*.01,V*.01,1),this.matrix.rotate(-J*degToRads),this.matrix.skewFromAxis(-Y*degToRads,(K+90)*degToRads),this.matrix.translate(B[0],B[1],0),this._mdf=!0,this.opacity!==E[8].p.v&&(this.opacity=E[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(C,E){this.init(E)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(C){this.init(C)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})})(lottie$1,lottie$1.exports);var lottieExports=lottie$1.exports;const lottie=getDefaultExportFromCjs(lottieExports),initialState={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},PixiLottieSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(0),[U,V]=React__namespace.useState(!1),X=React__namespace.useRef(null),Y=React__namespace.useRef(null),K=React__namespace.useRef(),J=React__namespace.useRef(),xe=React.useRef(),Z=React.useRef(initialState),_e=React__namespace.useRef(),Se=React.useRef(document.body),{uniqueId:Ee,src:Ae,startAt:Re,endAt:Te,frameStartAt:we,frameEndAt:Pe,visible:Ie,disabled:Me,loop:Oe=!1,transformation:{x:Le,y:Ne,width:Ve,height:Xe,colorCorrection:Ue={}},pointerdown:We=()=>{},pointerout:ze=()=>{},pointerover:He=()=>{}}=C,{tl:je}=React.useContext(GsapPixieContext);useCustomEventListener(Events.PAUSE,()=>{J.current&&J.current.pause()});const{onPointerDown:$e,onPointerOut:De,onPointerOver:Fe}=useDebouncedPointerEvents(He,We,ze,1),{blurRadius:ke=0,vignette:Ge=0,noise:Be=0}=Ue,{temperatureFilter:qe,sharpnessFilter:Ke,hueFilter:Ye,blurFilter:Qe,adjustmentFilter:Ze,vignetteFilter:it,noiseFilter:at}=withFiltersHook(Ue);React__namespace.useLayoutEffect(()=>{K.current=document.createElement("canvas"),K.current.setAttribute("id","lottieContainersvg"),K.current.setAttribute("id",`${Ee}lottieContainer`),K.current.setAttribute("width",`${Ve}`),K.current.setAttribute("height",`${Xe}`);const Je=Se.current;return Je.appendChild(K.current),()=>{K.current&&Je.removeChild(K.current)}},[]),React__namespace.useEffect(()=>{async function Je(){J.current&&J.current.destroy(),K.current.removeAttribute("style"),J.current=lottie.loadAnimation({container:K.current||document.getElementById("lottieroot"),renderer:"canvas",loop:!1,autoplay:!1,path:Ae,rendererSettings:{context:K.current.getContext("2d"),clearCanvas:!0,progressiveLoad:!1,preserveAspectRatio:"xMaxYMax meet"}}),J.current.addEventListener("data_ready",()=>{if(K.current&&K.current.setAttribute("style","display:none"),J.current&&J.current.renderer.canvasContext){const et=J.current.totalFrames;Z.current.totalFrames=et;const nt=J.current.getDuration();Z.current.totalDuration=nt;const rt=J.current.renderer.canvasContext.canvas,tt=PIXI__namespace.Texture.from(rt);_e.current=tt,V(!0),B(nt)}}),J.current.addEventListener("loaded_images",()=>{}),J.current.addEventListener("complete",()=>{}),J.current.addEventListener("loopComplete",()=>{}),J.current.addEventListener("enterFrame",()=>{}),J.current.addEventListener("config_ready",()=>{console.log("config_ready",J.current)}),J.current.addEventListener("error",et=>{console.log("error",et)})}return Je(),()=>{J.current&&(J.current.removeEventListener("complete"),J.current.removeEventListener("config_ready"),J.current.removeEventListener("enterFrame"),J.current.removeEventListener("loaded_images"),J.current.removeEventListener("loopComplete"),J.current.removeEventListener("data_ready"),J.current.removeEventListener("error"),J.current.destroy())}},[Ae,Ee]),React__namespace.useEffect(()=>(_e.current&&_e.current.update(),()=>{}),[U]);const st=Je=>{if(J.current&&X.current&&xe.current){const nt=Je(xe.current.time())/xe.current.duration()*Z.current.totalFrames,rt=Z.current.totalFrames;let tt=nt;tt=Math.round(Math.floor(tt)),tt>=rt?(J.current.goToAndStop(0,!0),_e.current&&_e.current.update(),Z.current.isPlaying=!1):(J.current.goToAndStop(tt,!0),_e.current&&_e.current.update(),Z.current.isPlaying=!0)}};return React__namespace.useEffect(()=>{let Je=gsap$2.context(()=>{});if(Y.current&&je.current&&I>0){const et=Number(Te)-Number(Re);xe.current&&(xe.current.kill(),je.current.remove(xe.current)),Je=gsap$2.context(()=>{const nt=gsap$2.utils.wrap(Re,I);xe.current=gsap$2.timeline({}).to(Y.current,{duration:Number(et),onUpdate:st,onUpdateParams:[nt,we,Pe]},we),je.current.add(xe.current,Re)})}return()=>{xe.current&&(xe.current.kill(),gsap$2.killTweensOf(xe.current)),Je.revert()}},[Re,Te,we,Pe,Ee,I,Oe]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,pointerdown:$e,pointerover:Fe,pointerout:De,children:jsxRuntimeExports.jsx(react.Container,{ref:Y,children:_e.current&&jsxRuntimeExports.jsx(react.Sprite,{texture:_e.current,width:Ve,height:Xe,anchor:.5,x:Le,y:Ne,ref:X,alpha:Ie?1:0,...!Me&&Ie&&{interactive:!0,pointerdown:We},filters:[qe,Ke,Ye,Ze,...ke>0?[Qe]:[],...Ge>0?[it]:[],...Be>0?[at]:[]]})})})});PixiLottieSprite.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiLottieSprite"};var BlendModes=(C=>(C[C.NORMAL=0]="NORMAL",C[C.ADD=1]="ADD",C[C.MULTIPLY=2]="MULTIPLY",C[C.SCREEN=3]="SCREEN",C[C.OVERLAY=4]="OVERLAY",C[C.DARKEN=5]="DARKEN",C[C.LIGHTEN=6]="LIGHTEN",C[C.COLOR_DODGE=7]="COLOR_DODGE",C[C.COLOR_BURN=8]="COLOR_BURN",C[C.HARD_LIGHT=9]="HARD_LIGHT",C[C.SOFT_LIGHT=10]="SOFT_LIGHT",C[C.DIFFERENCE=11]="DIFFERENCE",C[C.EXCLUSION=12]="EXCLUSION",C[C.HUE=13]="HUE",C[C.SATURATION=14]="SATURATION",C[C.COLOR=15]="COLOR",C[C.LUMINOSITY=16]="LUMINOSITY",C))(BlendModes||{});exports.Animations=Animations,exports.BlendModes=BlendModes,exports.Events=Events,exports.GsapPixieContext=GsapPixieContext,exports.GsapPixieContextProvider=GsapPixieContextProvider,exports.PixiAnimatedSprite=PixiAnimatedSprite,exports.PixiAudioSprite=PixiAudioSprite,exports.PixiGifSprite=PixiGifSprite,exports.PixiImageSprite=PixiImageSprite,exports.PixiLottieSprite=PixiLottieSprite,exports.PixiRemotionSprite=PixiRemotionSprite,exports.PixiSequence=PixiSequence,exports.PixiSequenceWrapper=PixiSequenceWrapper,exports.PixiSvgPathSprite=PixiSvgPathSprite,exports.PixiTextSprite=PixiTextSprite,exports.PixiVideoCanvasSyncSprite=PixiVideoCanvasSyncSprite,exports.PixiVideoSprite=PixiVideoSprite,exports.emitCustomEvent=emitCustomEvent,exports.newCustomEventEmitter=newCustomEventEmitter,exports.useCustomEventListener=useCustomEventListener,exports.useGsapEffect=useGsapEffect,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});